1832780 Members
3123 Online
110045 Solutions
New Discussion

Open E-Mail Relay

 
Nick Bryan
New Member

Open E-Mail Relay

I'm running sendmail 8.9.3 on UX 11.0.

I'm trying to close down an open mail relay. I understand the later versions of sendmail have a number of options that previous versions didn't that make it easier to restrict spamming. I'm still using a "level 6 config file" for my sendmail.cf, however. In my research, I keep seeing references like "If you're not using M4 macros to generate your sendmail.cf, you're on your own." Does this apply to me? If so, how do I start this process?

If not, what do I need to add to my file to only accept relay mail for my domain?
1 REPLY 1
Christopher Caldwell
Honored Contributor

Re: Open E-Mail Relay

Relaying is off by default on 8.9.3.

cp sendmail.cf sendmail.cf.bak

Get the new config file from
/usr/newconfig/etc/mail
and
put it in /etc/mail

Add your localizations. Localization ARE permitted. The sendmail.cf file tells you which options are localizable.

Search for
Anti-spamming:
in the new 8.9.3 config file.

The directions for turn on the anti-spam features are there.

Uncomment the applicable rulesets.

There's some holes in the default sendmail.cf file. You might want to try something like
# check_rcpt updated to deal with quoted addresses
Scheck_rcpt
# first: get client address
R$+ $: $(dequote "" $&{client_addr} $) $| $1
R0 $| $* $@ ok client_addr is 0 for sendmail -bs
R$={LocalIP}$* $| $* $@ ok from here
# not local, check rcpt
R$* $| $* $: $>3 $2
# remove local part, maybe repeatedly
R$+ $:$>removelocal $1
# still something left?
R$*<@$*>$* $#error $@ 5.7.1 $: 550 we do not relay

If folks are still using you as a relay. Buyer beware - formatting matters when your messing with rulesets.