The information in this document describes the procedure for
configuring your mail server and applies to AIX Versions 4.2.x and 4.3.x. Root authority is required for this process.
NOTE: The following configuration steps do not implement the open relay control features available in sendmail 8.8.8 and 8.9.3, which allows you to block spam attacks. For implementation of open relay control features (anti-spamming or anti-relaying), please refer to the following documents: Configuring Anti-Spam in AIX 4.3.2 and Configuring Anti-Spam in AIX 4.3.3. This configuration is recommended for mail servers that are potentially vulnerable to open relay attacks.
You must tell sendmail to accept mail addressed to <user>@test.com. This is accomplished by changing the setting of the Cw macro in the sendmail.cf file.
/etc/sendmail.cf
#Cw localhost $w $?m$w.$m$. YourHostAliases #Cm $m YourOtherDomainNames Cwlocalhost
Cw localhost $w $?m$w.$m$. test.com #Cm $m YourOtherDomainNames #Cwlocalhost
Now tell sendmail to remove the system's hostname in the from line. This is necessary to allow recipients to reply to messages sent out. Assume that the relay machine's full name is relay.test.com.
By default, any mail sent out from this relay will be from the following:
<user>@relay.test.com
The conventional method will have the from line display the message below:
<user>@test.com
You will need to make two changes to the sendmail.cf file for configuration.
The original setting follows:
# who I masquerade as (null for no masquerading) (see also $=M) DM
Change this setting to the following:
DMtest.com
Original setting:
################################################################### ### Ruleset 94 -- convert envelope names to masqueraded form ### ################################################################### S94 R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2 #R$+ $@ $>93 $1 <- [This last line may not be listed.]----------- Change this to: ################################################################### ### Ruleset 94 -- convert envelope names to masqueraded form ### ################################################################### S94 R$+ $@ $>93 $1
Enter the following command:
refresh -s sendmail
This updates sendmail with the new configurations. If sendmail is not running, you need to check to see if it is active using the following command:
lssrc -s sendmail
Information similar to the following will be displayed.
Subsystem Group PID Status sendmail mail 5424 active
If it is not active, start it up by issuing the following command:
startsrc -s sendmail -a "-bd -q30m"
sendmail must be told where to send mail it receives for users that do not exist on the relay machine. This is done using the /etc/aliases file. For example, if a user has a username of John on machine nixon.test.com, we must add the following entry to this alias file:
john:john@nixon.test.com
NOTE: If you want a specific message to be delivered to more than one user, just add another alias separated by a comma and a space.
For example:
john:john@nixon.test.com, frank@venus.test.com
After saving the aliases file, you need to run:
newaliases
This rebuilds the alias database. Now, when mail is sent to john@test.com, it will be relayed to john@nixon.test.com.
NOTE: Other machines within the network should also revise their
from lines to exclude the hostname. This is done by repeating step
two on each host, followed by a refresh of the sendmail daemon. This
is called masquerading and is necessary so that mail from
john@nixon.test.com goes out as john@test.com. This will
allow john to receive message replies.
[ Doc Ref: 95626291116492 Publish Date: Jan. 17, 2001 4FAX Ref: 8789 ]