On 2025-03-12 at 16:31:04 UTC-0400 (Wed, 12 Mar 2025 13:31:04 -0700)
Doug Hardie via Postfix-users <bc...@lafn.org>
is rumored to have said:
My mail server is over 13 years old. Rather than waiting for it to
fail, I have provisioned a replacement. It has the identical
configration as the production server. It has been tested on my local
LAN and works just the same as the production server. My plan for the
switch over is to shutdown postfix on the production server and wait a
few minutes.
It would be best to disable the various SMTP services only, and let the
queues drain normally. You can do that by commenting everything that
runs smtpd out of master.cf and restarting Postfix. After doing that,
change your MX to point ONLY at the new server. Then run 'sendmail -q'
to make Postfix run through the whole queue to clear it.
You can let Postfix sit on that state indefinitely, so if there are
'stuck' messages you can leave the non-accepting server up until Postfix
manages to deliver them or bounce them.
Hopefully the queue will be empty at that point.
Hope is an unreliable work partner.
However, I suspect that mailq will show some messages waiting to be
delivered.
Not if you shut down input to the queue first while Postfix works to
drain them.
What is the best way to move any queued messages to the new server?
You don't. You close off the incoming flow and wait. Postfix queues are
not to be fiddled with if you want them to work.
Other suggestions that you can stop the queues and rsync files are
ill-advised. It could work if you're using long IDs and have a simple
queue state, but then again it might not.
If mailq shows no messages, it that adequate to believe there will be
no lost messages?
Yes
--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo@toad.social and many *@billmail.scconsult.com
addresses)
Not Currently Available For Hire
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org