change domain sendmail
Submitted by saurabh on Wed, 2006-09-13 12:44
How to change the identifier name which is to be specified during conversation of sendmail with the recipient
- Currently if we look at header of any client from whom we receive mail the received header would be
Received: from merce.bangalore.azbpartners.com - This is the FQDN of the host from which the mail is sent
- Just because the recipient does not carry out a DNS check on merce.bangalore.azbpartners.com the mails are delivered.
- But if merce.bangalore.azbpartners.com is looked up to it wont resolve and hence the mail would bounce back to the sender
- Hence we need to change the sendmail configuration so that when the sender MTA tries to identify itself it uses the FQDN of the mail server i.e. mail.azbpartners.com
- This is done as follows
- Dig the fully qualified name of the host from which is the end point of the communication to the internet. i.e. firewall, gatekeeper machines
- In case of azb their mailserver is merce.bangalore.azbpartners.com
- dig merce.mumbai.azbparnters.com
- This will not resolve.
- If the name resolves to an IP then there is no need to configure the domain. Quit at this point.
- In the current scenario for azbpartners.com dig the mail server
- This is done by executing "dig azbpartners.com mx"
- In the answer section the output will be of type
azbpartners.com. 3538 IN MX 7 delhi-gate1.azbpartners.com.
azbpartners.com. 3538 IN MX 8 delhi-gate2.azbpartners.com.
azbpartners.com. 3538 IN MX 10 mail1.azbpartners.com.
azbpartners.com. 3538 IN MX 5 mail.azbpartners.com.
azbpartners.com. 3538 IN MX 6 mail2.azbpartners.com. - Note down the mail server name with the lowest rank i.e. here mail.azbpartners.com
- On the client side mail server carry out the following change
- cd /etc/mail/
- ci -l merce.mc with the message "Changing the domain name to be displayed during conversation"
- vi merce.mc
- Add this line
define(`confDOMAIN_NAME',`mail.azbpartners.com') - Please note that here the name mail.azbpartners.com is specific only to azb client. As per the other client mail servers we should make the corresponding changes.
- Save and quit
- Execute this command
m4 /etc/mail/merce.mc > /var/tmp/sendmail.cf - vimdiff /var/tmp/sendmail.cf /etc/sendmail.cf
- Note down any manual configuration changes in /etc/sendmail.cf for eg.
"CN root net backup mailchk" line where in mailchk was added explicitly - Make the manual changes and again execute
vimdiff /var/tmp/sendmail.cf /etc/sendmail.cf - This time the only differentiating lines would be the commented lines and
the entry
#Dj$w.Foo.COM in /etc/sendmail.cf would be
Djmail.azbpartners.com in /var/tmp/sendmail.cf - cd /etc/
- ci -l /etc/sendmail.cf with the message "Changing the domain name to be displayed during conversation"
- cp /var/tmp/sendmail.cf /etc/sendmail.cf
- Restart sendmail
/etc/init.d/sendmail restart - Check if you can telnet to port 10025
telnet localhost 10025 - Send a test mail from local machine to gmail.
- When mail is received check out the headers, the received from header
should be of the type
Received: from mail.azbpartners.com - Please note again that here the name mail.azbpartners.com is specific only to azb client. As per the other client mail servers we should make the corresponding changes.
»
- Login to post comments
- Printer-friendly version
- Send to friend