PDA

View Full Version : HOWTO :: Enable local Sendmail to forward to a SMARTHOST with AUTHENTICATION


royong
26-04-2006, 16:22
Check to ensure that you have sasl installed
# rpm -qa | grep sasl
cyrus-sasl-2.1.19-3
cyrus-sasl-md5-2.1.19-3
cyrus-sasl-plain-2.1.19-3 Edit the /etc/mail/sendmail.mc file and add in the following lines
The first line defines the SMART HOST to be mail.example.com
The second line defines the port to connect to the SMART HOST
In this case, mail.example.com runs a MTA on Port 26 instead of the usual Port 25
define(`SMART_HOST',`mail.example.com')
dnl # define(`RELAY_MAILER_ARGS', `IPC $h 26') dnl
define(`RELAY_MAILER_ARGS', `TCP $h 26')
define(`ESMTP_MAILER_ARGS', `TCP $h 26') Save and exit from editing /etc/mail/sendmail.mc
Edit the /etc/mail/access file and add in the following line
AuthInfo:mail.example.com "U:username@example.com" "P:123456" "M:LOGIN" Where "user@mail.example.com" is a legitimate user on example.com and has a password of "123456"
Save and exit from editing /etc/mail/access
Restart your local sendmail service
/etc/init.d/sendmail restart Try sending email by specifying your outgoing host as 127.0.0.1 port 25 in your preferred email client.
Emails should be redirected to mail.example.com successfully