1.1 Install Sendmail
1.2 Configure Sendmail
1.2.1 Sendmail files:
/etc/mail: configuration files
/etc/mail/sendmail.mc: sendmail configuration file, m4 to sendmail.cf
/etc/mail/sendmail.cf: sendmail running using configuration file
/etc/mail/access: accessabled clients
/etc/mail/local-host-names: local host names.
/etcr/mail/domaintale:
/etc/mail/mailertable:
/usr/mail:
/var/spool :
/var/spool/mqueue: email queues
/var/log/maillog : running logs
/var/log/messages : running logs
1.2.2 Configue /etc/mail/sendmail.mc
In most Linux configuration files a # symbol is used at the beginning of a line convert it into a comment line or to deactivate any commands that may reside on that line.
The sendmail.mc file doesn't use this character for commenting, but instead uses the string "dnl". Here are some valid examples of comments used with the sendmail.mc configuration file:
These statements are disabled by dnl commenting.
modify these lines to:
…
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
...
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
...
This configuration just allow smtp authentication for external domain relay only. If you also need to authentication for local domain, please modify it like this:
…
TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', ` GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
...
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA,M=Ea')dnl
...