From: "Zhou, Yan" on
Hi there,

I implemented my own mail processor (Java program processing mails), and
defined my transport for that.

The problem is if my Java program throws an exception, the mail is
rejected and back to the sender. What I want is for it to go to the
deferred queue.

How can I do that? Either direct the mail to the deferred queue in Java
program or instruct Postfix to do that, so that it can be retried later?

Thanks,
Yan











Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster(a)MedPlus.com). After replying, please erase it from your computer system.

From: "Zhou, Yan" on
Solved my problem by having my transport returning appropriate error
code.











Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster(a)MedPlus.com). After replying, please erase it from your computer system.

From: Noel Jones on
On 8/2/2010 10:04 AM, Zhou, Yan wrote:
> Hi there,
>
> I implemented my own mail processor (Java program processing mails), and
> defined my transport for that.
>
> The problem is if my Java program throws an exception, the mail is
> rejected and back to the sender. What I want is for it to go to the
> deferred queue.
>
> How can I do that? Either direct the mail to the deferred queue in Java
> program or instruct Postfix to do that, so that it can be retried later?
>
> Thanks,
> Yan

Either arrange for your java program to exit with a temporary
error or you can add "-o soft_bounce=yes" to that transport
entry in master.cf.

-- Noel Jones