Jump to content

Smart Relay Host Port in Sendmail

From TetraWiki
Revision as of 09:51, 28 October 2019 by Biswajit (talk | contribs)


Issue: Database Server 192.168.1.1 was not able to send the cron mails to local server 192.168.1.10

Diagnosis :

  1. Was connecting to internet for email.cdil.com , it should connect to local server 192.168.1.10 for sending mails
  2. database server was using sendmail on port 25 to send the mails , It should relay all the mails via 192.168.1.10 on port 26 ( only port opened on it , 25 was closed )

So


There is an alternative to relay email using a different port at their mail server and their mail server supports SMTP authentication. You may follow the simple Sendmail setup below: –


1. Find “DS” in /etc/mail/sendmail.cf and add your mail server name as below: –

DSmail.example.com


2. Find “Mrelay” in /etc/mail/sendmail.cf and add “2525” to “A=TCP $h” as below: –

A=TCP $h 2525


3. Then, restart your Sendmail service as below: –


service sendmail restart


5. Finally, you can monitor your maillog using the command below: –

tail -f /var/log/maillog


Reference [1] http://wingloon.com/2008/04/06/setup-smart-relay-host-port-in-sendmail/