Chapter 16. Email 207
# sendmail.cw - include all aliases for your machine
# here.
torgo.bigcorp.com
poodle.bigcorp.com
devel.bigcorp.com
Figure 16-2. Example settings for local-host-names
On the other machines, torgo, poodle, and devel, edit /etc/sendmail.cf to "masquerade" as
mail.bigcorp.com when sending mail and to forward any local mail processing to bigcorp.com.
Find the DH and DM lines in /etc/sendmail.cf and edit them as such:
# who I send unqualified names to
# (null means deliver locally)
DRmail.bigcorp.com
# who gets all local email traffic
DHmail.bigcorp.com
# who I masquerade as (null for no masquerading)
DMbigcorp.com
Figure 16-3. Example settings for sendmail.cf
With this type of configuration, all mail sent will appear as if it were sent from bigcorp.com, and
any mail sent to torgo.bigcorp.com or the other hosts will be delivered to mail.bigcorp.com.
16.3.5. Stopping Spam with Sendmail
Email spam can be defined as unnecessary and unwanted email received by a user who never requested
the communication. It is a disruptive, costly, and widespread abuse of Internet communication stan-
dards.
Sendmail has made it relatively easy to block new spamming techniques being employed to send
junk email using your system. It even blocks many of the more usual spamming methods by default.
You would need to consciously activate them by changing your /etc/mail/sendmail.mc file in a
particular way to make your system susceptible.
For example, forwarding of SMTP messages, also referred to as SMTP relaying, has been disabled
by default since Sendmail version 8.9. Before this change occurred, Sendmail would direct your mail
host (x.org) to accept messages from one party (y.com) and send them to a different party (z.net).
Now, however, you have to specifically tell Sendmail to permit a domain to relay mail through your
domain. Simply edit the /etc/mail/relay-domains file and restart Sendmail by typing the ser-
vice sendmail restart command as root to activate the changes.
However, many times, your users may be bombarded with spam from other servers throughout the In-
ternet that are beyond your control. In these instances, you can use Sendmail’s access control features
available through the /etc/mail/access file. As root, add the domains that you would like to block
or specifically allow access, such as:
badspammer.com 550 Go away and do not spam us anymore
tux.badspammer.com OK
10.0 RELAY
Figure 16-4. Example settings for access
Commenti su questo manuale