No Default Relaying

One of the most effective ways of making it hard for spammers to operate is to stop them from using your mail server(s) to relay their spam.

Traditionally, sendmail would accept any incoming email and relay it to its destination. Starting with 8.9, sendmail will not relay mail unless it is specificly configured to do so for a given destination.

Here are some of the m4 directives that will allow you to control the relaying behavior in your .mc file:
Directive Explanation
RELAY_DOMAIN(domainname) This adds domainname to the list of domains which sendmail is allowed to relay mail to.
RELAY_DOMAIN_FILE(/full/path/to/file) If you have a large number of domains that you relay to, you can use this directive to list them in an external file instead of using many RELAY_DOMAIN() directives. The default file is /etc/mail/relay-domains, and is only read when sendmail starts up.
FEATURE(relay_hosts_only) Normally, the entries in your relay list are domains. This option tells sendmail to parse them as hosts instead of as domains. This affects entries in the Access Control Database as well.
FEATURE(promiscuous_relay) This directive causes sendmail to return to the traditional behavior and relay anything it can. Use of this directive is highly discouraged.



Mark D. Roth <roth@feep.net>