On 10/28/2010 11:20 AM, qpsmtpdfrose.20.ftu...@spamgourmet.com wrote:
Matt Sergeant - m...@sergeant.org wrote:
You need a queue plugin (or hook) which pretends to deliver and
returns OK, but basically does nothing.
I currently have a plugin that has a hook_data_post. I presume I can put
a hook_queue in the same plugin.
Of course.
Is there some sort of notes mechanism
for communicating between hooks, like AxKit2?
The notes mechanism works across plugins and hooks. It doesn't work
across individual email transactions. IOW: you get a new one when the
MAIL FROM happens. For example, I generate a sessionid at MAIL FROM in
a note(), and can refer to it at every subsequent plugin/hook for the
rest of the lifetime of the email transaction. It's part of the log
record I produce in a postqueue hook in a different plugin.
If you're trying to get around a downstream mail server temporarily
down/slow, you probably do NOT want to silently discard. The sender
thinks it's sent and dequeues it, and you lose legit email that way.
Better to have the queue plugin return a temporary failure and the
sender will retry. Since bots don't retry, even if your filters missed
it, the bot won't bother.
My smtpforward plugin knows how to failover between multiple outbound
servers, and if _none_ of them works, knows how to parse the returns
from the outbounds, and send the return back (possibly adjusted) to the
sending MTA.