On Feb 20, 2006, at 01:57, Robin Bowes wrote:
I'm finding that hook_reset_transation is firing three times for just
one msg.
I think this can be called "expected behaviour" in a way.
The first hook_reset_transaction fires on MAIL FROM: -- this is where
the connection gets its first transaction (and one could interpret it
as if a "null transaction" gets "killed"). The second
hook_reset_transaction fires after qpsmtpd has told the client that
the message has been queued successfully -- i.e. the transaction ends
because the message is out of the SMTP scope. The third transaction
that gets "killed" on disconnect is also a sort of "null transaction".
I think a good explanation of the transaction "model" on the wiki,
and maybe a renaming/reordering of the hooks into
hook_transaction_create
hook_transaction_finished
hook_transaction_aborted (by disconnect, RSET or DENYSOFT for example)
may be a thing worth looking into.
As for the plugin, maybe you should take a peek into the variables at
each of the three calls. I am not sure what you'll find; I am still
running a (prehistoric|old) version of qpsmtd.
-Johan