Problem
You have configured your system to use relaying with Sendmail 8.8.8, but other people can connect to your SMTP port and send mail through you.
Solution
If you're still running 8.8.x and can't upgrade for some reason, this TA should help you. However, the recommended way to deal with anti-relay problems is to upgrade to 8.9.3 or higher.
Sendmail 8.9.3 is installed on OpenServer 5.0.6 by default and can be upgraded to 8.11.0 after rs506a is installed.
The following examples are tentative and unsupported. However, they may prove useful to people who are having problems with spammers. It is highly recommended that you upgrade your version of Sendmail to a supported version, 8.9.3 or higher.
It is recommended you install sse022 on the system. Please read
this article for information regarding this System Security
Enhancement:https://ftp.scoexpert.com/SSE/sse022.ltrYou can obtain this System Security Enhancement here:
https://ftp.scoexpert.com/SSE/sse022.tarMail must originate or terminate locally (on this host), with exceptions made for hosts listed, one per line, in /etc/sendmail.cR. This ruleset does not allow relaying within your domain, except for the hosts listed in /etc/sendmail.cR.
Note: You must list fully qualified host names for each host you wish to allow relaying. Simply listing a domain name is not enough. Ideally, it would only restrict relaying from outside your domain. This is particularly useful if you are using mail clients such as MH or Eudora that like to try to find an SMTP relay on the local network to do outgoing mail submission.
FR-o /etc/sendmail.cRScheck_rcpt
# anything terminating locally is ok
R< $+ @ $=w > $@ OK
R< $+ @ $=R > $@ OK# anything originating locally is ok
R$* $: $(dequote "" $&{client_name} $)
R$=w $@ OK
R$=R $@ OK
R$@ $@ OK# anything else is bogus
R$* $#error $: "550 Relaying Denied"Notes: If you would prefer to list domains in sendmail.cR, you can replace all occurrences of $=R with $* $=R in the ruleset above. This rule doesn't block user%other.domain.com@your.domain.com. If you want to block this type of addressing, you'll need sendmail 8.8.6 or greater and this change to the ruleset. Replace the first section:
# anything terminating locally is ok
R< $+ @ $=w > $@ OK
R< $+ @ $=R > $@ OKwith# anything terminating locally is ok
R$* $: $>Parse0 $>3 $1
R$+ < @ $* . > $* $: $1 < @ $2 >
R$+ < @ $=w > $@ OK
R$+ < @ $=R > $@ OKIf your site is a backup mail server for another site (you are a higher numbered MX record for them), be sure to add the domain names of that site to your new sendmail.cR file.
In sendmail 8.9, relaying is disabled by default.
NOTES: If you copy rules from this page, you must change the white space
between the fields to tabs. Sendmail will reject the rule if there
are merely spaces between the fields.If your text editor changes tabs to spaces as they are entered, you may have to use another editor that does not.
See also
ta105884 How can I make sendmail filter unsolicited mail (spam) and prevent others sites from using my site as a mail relay under SCO OpenServer 5?
Selected clippings for this TA are taken from:
http://www.sendmail.org/antispam.html