Wietse Venema wrote:
> Bob Proulx:
> > I have been trying to deduce if it is possible to force a message
> > waiting in the mail queue with temporary errors (domain name
> > resolution failures) to bounce right now instead of waiting for the
> > timeout.
> 
> It would be incorrect to force a message to bounce. Messages can
> have multiple recipients. It would be more correct to force-bounce
> a recipient.

Sorry for using an imperfect description.  I had an imperfect
understanding of the problem.  I appreciate the education on that
point.

Using Jeroen's suggestion to reduce the maximal_queue_lifetime to a
small value and then flushing the queue had the desired effect due to
Postfix itself understanding the difference in the above points.  It
was sufficient to handle my problem case.

However your solution is more surgically precise and since some people
here have a habit of making the same typo errors repeatedly it has the
convenience of allowing me to target those very common typos specially
and handle them in the future without further action on my part.

> To flag a destination or recipient as undeliverable:
> /etc/postfix/transport:
>     typodomain.example        error:5.1.2 Bad destination system address

That is a nice solution to the problem and works very well for me.
Thank you for that suggestion.  That is the way I went on the system.

> Flagging one recipient in a queue file as undeliverable requires a
> lot of code that currently does not exist: 1) a way for postsuper
> to mark as "expired" one recipient in the middle of a list of
> recipients, 2) a way to extract from the defer logfile the record
> that says why that recipient was not yet delivered for use in the
> non-delivery notification, and 3) a way to mark that defer logfile
> record as "deleted" so that the problem won't be reported again.

Thanks for the expanded explanation of the problem.  That does sound
messy to implement and for only a small return on investment.  I don't
think it is worth it.  And now that I have a better understanding of
the problem and two recipes that solve the problem for me it isn't
something I require.  I knew there would be a method that would enable
that operation.  I just needed to learn it.

Thanks!
Bob

Reply via email to