User Tools

Site Tools


linuxsendmail
Sendmail

The following is a VERY brief overview of sendmail. Sendmail is very complex to configure and run correctly and securely. The following is largely only relevant to configuring sendmail as a SMTP client.

General Info
  • By default, the Red Hat sendmail daemon config will only listen locally (127.0.0.1)
  • /etc/mail/sendmail.cf - main config file for the daemon
  • /etc/mail/sendmail.mc - input file for m4 macro to produce sendmail.cf (m4 sendmail.mc>sendmail.cf)
  • /etc/mail/submit.cf - main config file for the client
  • /etc/mail/submit.mc - input file for m4 macro to produce submit.cf (m4 submit.mc>submit.cf)
  • /var/spool/mqueue - contains queued mail (when server is acting as SMTP server)
  • /var/spool/clientmqueue - contains queued mail (when server is acting as SMTP relay)
To config as SMTP client:
  • edit /etc/sysconfig/sendmail: DAEMON=no
  • edit /etc/mail/submit.cf: D{MTAHost}smtp.domain.com
Notes:
  • Forwarding via $HOME/.forward file only valid if daemon is running
  • /etc/mail/sendmail.cf - main config file
  • /etc/mail/sendmail.mc - macro file, creates .cf file
  • /usr/share/sendmail_cf - m4 macros
  • /etc/aliases - email aliases, updates /etc/aliases.db
  • /home/.forward - per user forwarding rules
  • /etc/mail/local_host_names - domain list OK to recieve mail
  • /etc/mail/helpfile - help and syntax
  • /etc/mail/statistics - use mailstats cmd to display
  • /var/spool/mqueue - use mailq cmd to view mail queue
linuxsendmail.txt · Last modified: 2017/11/10 00:47 by mark