cd /etc/mail mkdir auth chmod 700 auth cd auth vi client-infoEnter the following, substituting the desired mail server, username and password
AuthInfo:mail.server.com "U:username" "P:password"Now we create the hash
makemap hash client-info < client-info chmod 600 client-info* cd /etc/mail vi sendmail.mcNow we tell sendmail to smarthost and use our authentication hash, substituting the desired mail server
define(`SMART_HOST',`mail.server.com')dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnlFind the existing line for smarthost and replace it with those three lines.
Lastly, rebuild the config and restart sendmail
m4 sendmail.mc > sendmail.cf service sendmail restart
No comments:
Post a Comment