Link to home
Avatar of Elemica
ElemicaFlag for United States of America

asked on

Issues with changing relayhost in Postfix

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?
Avatar of Dr. Klahn
Dr. Klahn

Has the problem system been rebooted to load all configuration changes, including Postfix?
Avatar of Elemica

ASKER

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. 

ASKER CERTIFIED SOLUTION
Avatar of Dr. Klahn
Dr. Klahn

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Elemica

ASKER

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.
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