I don't really like the idea of parsing qpsmtpd's log files, because
in high debug modes (like we run) there's a ton of "garbage" in
there.
Funny, I thought that was what regexes were for... ;)
- We teach plugins to record things.. so spamassassin could do
something like $qp->transaction->notes( 'stats_spam' => 1 ); or
something.
That is, of course, the weakness of this method: all of the plugins have to be modified. As an interim solution, why not have run_hooks() always add a bare minimum (plugin name, result code) into the ->notes(). The key would then need to be the plugin name:
$qp->transaction->notes( 'spamassassin' =>
{ return => DECLINED, } );On the other hand, if the plugin desired to create an entry, it would store it's information in a hash:
$qp->transaction->notes( 'spamassassin' =>
{'hits' => 16.5,
'tests => 'FORGED_RCVD_NET_HELO,FROM_ENDS_IN_NUMS,HTML_30_40',
}
);and the default return would be added to the hash by run_hooks.
Finally, the transaction_end hook would split that out as three columns:
PLUGIN ATTRIBUTE VALUE spamassassin return DECLINED spamassassin hits 16.5 spamassassin tests FORGED_RCVD_NET_HELO,...
How's that sound?
John
