We help IT Professionals succeed at work.

Issues with changing relayhost in Postfix

25 Views
Last Modified: 2020-07-07
I have a few Postfix servers that send outbound email through MessageLabs Smarthost.  We are now migrating to Mimecast.  Of the first 2 servers that I did, I made the same changes, but only 1 of them is sending through Mimecast.  Even though the relayhost is the DNS for the Mimecast on both of them, the second is still sending through to message labs.  Not sure where else to look.  Any thoughts?
Comment
Watch Question

Dr. KlahnPrincipal Software Engineer
CERTIFIED EXPERT

Commented:
Has the problem system been rebooted to load all configuration changes, including Postfix?
ElemicaIT Manager

Author

Commented:
Yes. Initially restarted postfix. Which didn’t resolve it, so I rebooted the server
Running postconf -x lists the correct relayhost, but it’s still going to the old one. 

Principal Software Engineer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
ElemicaIT Manager

Author

Commented:
I ran the grep -r -i for the old relayhost in /etc/postfix/*

it showed that it was commented out in main.cf

In the output, it showed Binary file /etc/postfix/transport.db matches

So i ran a postmap /etc/postfix/transport.  

This fixed the problem.  Which is weird because my transport file has neither the old relayhost or the new relayhost, but its working now.
CERTIFIED EXPERT

Commented:
yeah. postmap updated transports.db with the contents of transports or whatever file you used on the command line. your predecessor probably updated the transport table and forgot to run postmap
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.