On 05/22/2011 09:06 PM, Sahil Tandon wrote:
On Sun, 2011-05-22 at 17:16:52 +0200, Leon Meßner wrote:
On Sun, May 22, 2011 at 04:39:22PM +0200, Pascal Volk wrote:
On 05/22/2011 04:24 PM Leon Meßner wrote:
Hi,
i'm curious if there is a mechanism to stop postfix from delivering mail
for just specific recipients. I ask because i need to migrate some users
mail storage and need to umount it. It would be nice to generate no
errors and just hold the mails in the queue until i release them again.
/etc/postfix/main.cf:
transport_maps = hash:/etc/postfix/transport
/etc/postfix/transport:
john....@example.com retry:4.0.0 Mailbox being migrated
jane....@exmpale.com retry:4.0.0 Mailbox being migrated
postmap /etc/postfix/transport&& postfix reload
If i understand right, this will send 4.0.0 as smtp status code and thus
force a retry on the other end. This will suffice i suppose.
You misunderstand. As documented in error(8), when the service name is
retry, Postfix defers all recipients in the delivery request using the
next-hop information as the reason for non-delivery.
That said, temporarily rejecting mail is actually the RFC-correct way to
take a mail server and its mailboxes out of commission.
The HOLD queue is useful when you need to act on a small number of
specific messages, but in general soft-rejecting would be better,
because it informs the sender as well.
Of course, if he adapts his migration plan by first setting up the new
mailbox destination system, a simple transport_maps entry is all that is
required.
--
J.