SMTP (sendmail)
Install Sendmail
We use the sendmail that comes stock with RHEL.
- edit /etc/mail/sendmail.mc
-
-
DAEMON_OPTIONS(`Port=smtp,Addr=10.1.34.2,Name=MTA')dnl
-
MASQUERADE_AS(`usno.nrao.edu')dnl
-
FEATURE(masquerade_envelope)dnl
-
FEATURE(masquerade_entire_domain)dnl
-
MASQUERADE_DOMAIN(usno.nrao.edu)dnl
- Make the sendmail.cf file
-
cd /etc/mail ; make
- Add the internal network to /etc/mail/access
-
echo "Connect:10.1.34 RELAY" >> /etc/mail/access
makemap hash access < access
- Allow sendmail in TCP wrappers
-
echo "sendmail:10.1.34.*" >> /etc/hosts.allow
- Set sendmail to start up boot up
-
chkconfig --level 345 sendmail on
- Start sendmail manually
-
/etc/init.d/sendmail start
Sendmail checks the space available in /var/spool/clientmqueue. If it thinks it is insufficient it won't send email. Since that directory is in the NFS mounted /, it appears to have no available space. We get around this by linking
that directory to /dev/shm which is a shared memory, tmpfs mounted ram disk. This is all done with the /opt/bin/setup_clientmqueue.sh script, called from rc.local, when the node boots. It is only mentioned here for information sake.
Also,
configure submit.cf
The node needs to know to what machine to send email and as what domain to masquerade so it will get through.
emacs -nw /etc/mail/submit.mc
-
MASQUERADE_AS(`usno.nrao.edu')dnl
-
FEATURE(`msp', `[usno-serv-1]')dnl
Make the submit.cf file:
cd /etc/mail ; make
Add the following to /etc/hosts on both dropbox (MDA) and revere (MTA)
198.116.24.185 usno-serv-1.usno.nrao.edu
198.116.24.186 usno-serv-2.usno.nrao.edu