On 08/06/2013 12:22 PM, Felix Rubio Dalmau wrote:
Hi all,
I have set up a postfix+dovecot mail server that stores all the mails
under /home mountpoint, and that has been working for half a year. Now I have
bought a new disk and I'd like to move all the existing mail to this new
location. How should I do it, without stopping the postfix service?
I have figured out a strategy:
a) ask postfix to hold every incoming mail in its queue
(postsuper -h ALL)
That only works once, at that moment. You don't want that.
In fact, keeping all incoming mail /in the incoming queue/ is exactly
what you want.
b) stop dovecot service
c) move the mail folder into its new location
d) update folder locations for postfix and dovecot
e) restart service dovecot, reload postix config and deliver
enqueued mails (postsuper -r ALL)
Do you think it can work?
Simply stop the queue manager and all incoming mail will stay in the queue:
# dovecot stop
# postconf -e master_service_disable=qmgr.unix
# postfix reload
Then move the mail store, tell postfix and dovecot where to find it, and
start the services up again:
# postconf -e master_service_disable=
# postfix reload
# dovecot start
The queue will be processed immediately.
--
J.