On 07/30/2014 10:39 AM, Jogi Hofmüller wrote:
I would like to stay away from this option since we plan on doing a
transparent migration that will take a few nights.  Turning MTA off
every night seems a bit drastic.
What I do is I implement a delivery lock in the database. I like to use exim + mysql, but I think you can probably figure something out with postfix + whatever, too.

In exim-ese:

mailbox_locked:
  debug_print = "R: mailbox_locked for $local_part@$domain"
  driver = redirect
  allow_defer
  verify = false
  retry_use_local_part = true
  domains = +virtual_domains
condition = ${lookup mysql{select locked from mailbox where localpart='${quote_mysql:$local_part}' and domain='${quote_mysql:$domain}' and locked=1 and active}}
  data = :defer: Delivery deferred, mailbox is locked

Reply via email to