Do you want to relay mails from your local sendmail server to your ISP. Just follow the below steps
Open sendmail.mc using default editor vi, edit, emacs # vi /etc/mail/sendmail.mc define(`SMART_HOST',`[smtp.yourisphost.com]') FEATUREdnl
Save the File and exit
Open the File authinfo (If not Present Create a New File).
vi /etc/mail/authinfo Add the following Line "AuthInfo:smtp.yourisphost.com "U:UsernamefromISP" "P:passwordfromISP" "M:LOGIN PLAIN"
Save the File and Exit
Just run the below commands to recreate the sendmail.cf file
# cd /etc/mail/ # m4 sendmail.mc > sendmail.cf
Make Map will recreate the database for authinfo to be used in sendmail
# makemap hash /etc/mail/authinfo < /etc/mail/authinfo
Restart the Sendmail Service and check if All's Good !!!
# /etc/init.d/sendmail restart
echo '/map authinfo AuthInfo:smtp.yourisphost.com' | /usr/sbin/sendmail -bt
Sent Mail Check in Logs
Enjoy.....
Comment if issues or modification required.
If you happen to use Windows, check out the disk cleaner to keep system safe and secure.
Related posts:
- Simple Steps to Send Mail Using Sendmail in Linux, Fedora, Centos, Ubuntu Have you got your Linux distribution like Fedora, Centos, Redhat,...
- Blocking Specific Sender to Specific Recipient or IPs Spamming Using Sendmail in Linux Maintaining a MailServer is really a all time headache for...
- Understanding and Reading Mail Logs, Postfix Logs, Sendmail Logs, Qmail Logs How do I read Mail Log? Logs play a crucial...



