Robin Bowes wrote:
>> In any case, the solution is that the log pluging that is hooking queue can
>> simply return OK instead of DECLINED and everything will be correct (since 
>> it is
>> the terminal queue plugin then).
> 
> True, but then the logging plugin is coupled to the queue plugin again.

You've already linked them together by patching the queue plugin to support
placing your plugin second.  The whole design of Qpsmtpd is that there must be
one queue plugin that successfully (OK) delivers the message.  I agree with Ask
that wrapping the queue plugin is far less obtrusive than patching it.

It just occurred to me that since you are presupposing loading the log plugin,
there shouldn't be any reason to have the wrapper in some other plugin file to
begin with (thus making the configuration even simpler).  Add the wrapping code
to the logging/adaptive init() sub and then call it like this:

  logging/adaptive accept 4 reject 7 prefix # queue queue/qmail-queue

(or whatever queue you are using).

However, it would be cleaner if we had _pre and _post hooks for each distinct
stage in the SMTP conversation.  It would go along with the standard rhetorical
motif:

1) I'm going to do 'X';
2) I'm doing 'X';
3) I just did 'X'.

At the very least, the presence of a _post hook for each stage will be better
than what we have now.  Shall I just add a queue_post hook (it's a matter of a
few lines)?

John

Reply via email to