On Mon, 10 Sep 2007, Peter J. Holzer wrote:

The right solution to this problem has been discussed here previously -

I know that it has been discussed several times, but I don't agree this
is the right solution.

Interesting.

the smtp-forward plugin should hook into multiple hooks, and pass the
mail_from and rcpt_to data to the back end as it is received, relaying
responses as the back end gives them.

That forces smtp-forward to be the last plugin in the rcpt hook, because
any later plugin could return a 5xx (or worse, a 4xx) error to the
client while the backend has already accepted the recipient.

Since a large percentage of the recipients doesn't exist IME, the check
for existing recipients should be (one of) the first, not the last.

That's worth thinking about some more. Which plugins might you wish to run after the backend recipient checks? If any of those plugins returns 5xx or 4xx, would you then proceed to receive and deliver the message body? If not, then it doesn't matter that you've already passed the recipient address to the backend.

If it really matters, you could still have two backend recipient checks - one early and one late. You'd just need two smtp connections to the backend.

---
Charlie

Reply via email to