Jump to content

Smart Relay Host Port in Sendmail: Difference between revisions

From TetraWiki
Sakshi (talk | contribs)
Created page with "'''''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 ..."
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''''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: –'''''
[[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






1. Find “DS” in /etc/mail/sendmail.cf and add your mail server name as below: –
'''''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: –'''''


'''DSmail.example.com'''




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


'''A=TCP $h 2525'''
'''DSemail.cdil.com'''




3. Add the following line below in /etc/mail/access file in one line: –
2. Find “Mrelay” in /etc/mail/sendmail.cf and add “26” to “A=TCP $h” as below: –


'''AuthInfo:mail.example.com "U:user@example.com" "I:user@example.com" "P:password" "R:example.com" "M:LOGIN PLAIN"'''
'''A=TCP $h 26'''




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




Line 29: Line 39:




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

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 :

  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: –

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/