This is how sendmail should be configured on new band site hosting servers.
See also: Creating a Band Site Hosting Server
# yum install sendmail # yum install sendmail-cf
Stop postfix
# /etc/init.d/postfix stop
# /etc/init.d/sendmail stop
edit /etc/mail/submit.mc
add (If this server is hosted outside the Peak10 ecosystem, the IP address is 68.71.99.148)
define(`confDEF_USER_ID',`8:12')dnl
define(`confDONT_PROBE_INTERFACES',true)
define(`confTO_QUEUEWARN_DSN',`')
MASQUERADE_AS(`bombplates.com')dnl
FEATURE(masquerade_envelope)dnl
define(`confTO_QUEUERETURN_DSN',`12h')
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
dnl FEATURE(`msp', `[127.0.0.1]')dnl
FEATURE(`msp', `[]')dnlAdd apache to the email trusted-users list
# vi /etc/mail/trusted-users
add
apache
backup /etc/mail/sendmail.cf and install the new config
# mv /etc/mail/sendmail.cf /etc/mail/sendmail.cf.BCK # m4 /etc/mail/submit.mc > /etc/mail/submit.cf
You may see the error "*** ERROR: FEATURE() should be before MAILER()". Ignore it.
# ln -s /etc/mail/submit.cf /etc/mail/sendmail.cf
Whitelist the server on the core Bombplates host
$ ssh USER@shell.mcnutility.com $ sudo vim /etc/exim4/update-exim4.conf.conf
Add the new server's IP address to the list in dc_relay_nets
$ sudo service exim4 restart
Disable the sendmail daemon (back on the new server)
# vi /etc/sysconfig/sendmail DAEMON=no QUEUE= SMQUEUE=p1h
# /sbin/chkconfig sendmail off # /sbin/chkconfig postfix off
If this server is hosted outside of Peak10's ecosystem, email Peak10 asking for a firewall exception
to: support@peak10.com
subject: open port on fw and forward to IP
Body: Please open port 25 from IP X.X.X.X to IP 68.71.99.148(10.1.10.56)
Make sure logwatch is sending its messages to a coherent address
# yum install logwatch # vi /usr/share/logwatch/default.conf/logwatch.conf
MailTo = security@bombplates.com