On 2017-04-09 10:52:58 (+0200), Dominic Raferd <domi...@timedicer.co.uk>
wrote:
Is there a best/recommended way to pause postfix local deliveries so
that I
can take an LVM snapshot of the local mails for backup purposes? The
pause
only has to be momentary, while the snapshot is taken, but the files
need
to be in a consistent state. If anyone also knows the way to pause
Dovecot
imap/pop3 similarly (as this could also be accessing the same files),
that
would be helpful too.
You can kill two birds with one stone if you deliver mails using LMTP
instead of letting Postfix local(8) deliver directly to mailboxes.
As I understand it, Dovecot's LMTP implementation will ensure the mail
store is always in a consistent state: either a message will be stored
and indexed or it won't.
If you want to ensure no deliveries are attempted while you're taking a
snapshot, running LMTP over a TCP socket and blocking new connections
with the firewall would do it. Postfix will queue messages for later
delivery when it can't connect to the LMTP server.
Philip
--
Philip Paeps
Senior Reality Engineer
Ministry of Information