Smart Relay Host Port in Sendmail: Difference between revisions
No edit summary |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
''''' | [[category:CDIL]] | ||
'''Issue:''' Database Server 192.168.1.1 was not able to send the cron mails to local server 192.168.1.10 | |||
Diagnosis : | |||
# Was connecting to internet for email.cdil.com , it should connect to local server 192.168.1.10 for sending mails | |||
# 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: – | |||
''' | '''DSemail.cdil.com''' | ||
2. Find “Mrelay” in /etc/mail/sendmail.cf and add “26” to “A=TCP $h” as below: – | |||
''' | '''A=TCP $h 26''' | ||
3. Then, restart your Sendmail service as below: – | |||
Latest revision as of 10:12, 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 :
- Was connecting to internet for email.cdil.com , it should connect to local server 192.168.1.10 for sending mails
- 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: –
DSemail.cdil.com
2. Find “Mrelay” in /etc/mail/sendmail.cf and add “26” to “A=TCP $h” as below: –
A=TCP $h 26
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/