How do I set "relay_hosts_only" setting using sendmail / m4
Posted
by
Dave
on Super User
See other posts from Super User
or by Dave
Published on 2014-08-25T15:17:36Z
Indexed on
2014/08/25
16:22 UTC
Read the original article
Hit count: 345
We're using CentOS and sendmail's m4 configuration. How do I set domains where emails should be delivered? I only want two domains, and would like email to all other domains blocked. I tried this in my "/etc/mail/sendmail.mc" file ...
FEATURE(`relay_hosts_only,mydomain1.com,mydomain2.com')dnl
But then got this error tryiing to generate the sendmail.cf file ...
[dalvarado@mymachine ~]$ sudo m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
m4:/etc/mail/sendmail.mc:156: Warning: excess arguments to builtin `include' ignored
m4:/etc/mail/sendmail.mc:156: cannot open `/usr/share/sendmail-cf/feature/relay_hosts_only': No such file or directory
Thanks for your advice, - Dave
© Super User or respective owner