Jump to content

Smart Relay Host Port in Sendmail: Difference between revisions

From TetraWiki
No edit summary
No edit summary
Line 7: Line 7:
# 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 )
# 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  
So to resolve the Point 1 , entry on /etc/hosts was done as shown Below
192.168.1.10  mailserver.cdil.com '''email.cdil.com'''
 
Point 2 , We have enabled relay on sendmail to port 26 as per the below details





Revision as of 09:55, 28 October 2019


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 to resolve the Point 1 , entry on /etc/hosts was done as shown Below

192.168.1.10  mailserver.cdil.com email.cdil.com

Point 2 , We have enabled relay on sendmail to port 26 as per the below details


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/