Dan Farrell wrote:
Greetings postfix gurus,
I have a modest postfix server; my own mailbox has thousands of
messages, but most boxes have hundreds or even less. But, I want to
migrate to a new server which also runs postfix, but uses mysql for
some storage, and perhaps even mail message storage itself.
If I wanted to migrate with the flat-file message system I am using
now, I could just shut down the primary mailserver and let a backup
mailserver pick up the mail while I move the old mailboxes, right?
yes. but if users check their mail (imap, pop) during this migration,
they will not see all their mail. so some planning is needed to avoid
annoying users too much!
Then I can repoint the primary mailserver DNS A record, start up the
new server, and watch the newest batch of mail pour in, right?
you start the new server and make it work (and test it) before you
change the DNS records.
you can add another MX record and let both servers deliver mail to the
new server. then only stop the old server after a few days.
If I wanted to use mysql to store the mail, I'll have to send it over
to the new mail server some other way to get it stored into mysql. I
could perhaps write a little code to do it, but I would rather use a
built-in mechanism.
you could try dbmail, but it's not widely used. do you really want to go
that road?
Is there any way to re-process already delivered mail?
if you chose the sql way, you can re-deliver old mail, although this may
be non trivial (if you redeliver with postfix, you may need to
remove/rewrite Delivered-To headers to avoid postfix thinking there is a
loop).
but better keep using files...
I would very
much like to update the MX records for all hosted mail domains and then
tell the old server to requeue all the mail in all the boxes. I could
forsee the server picking up all this old mail and faithfully sending
it to the listed MX for the domain, which would by then be the new
server.
Is something like that available, or would I have to script it myself?
Thanks,
Dan Farrell