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?
* email protectionEmail Servers* Postfix* Mail Relay

Avatar of undefined
Last Comment
skullnobrains

8/22/2022 - Mon
Dr. Klahn

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

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

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
Elemica

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.
Your help has saved me hundreds of hours of internet surfing.
fblack61
skullnobrains

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