On Sun, 2011-05-22 at 23:57:18 +0200, Jeroen Geilman wrote:

> 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.

Perhaps this is not an option for the OP due to reasons unknown to us.

> 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.

The retry transport results in messages being placed into the deferred
(not hold) queue.

> 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.

Sure, but the OP had a specific requirement, and the proposed transport
solution should fulfill it.  A related example from the archives:

 http://article.gmane.org/gmane.mail.postfix.user/198002 

-- 
Sahil Tandon <sa...@freebsd.org>

Reply via email to