Bob Dodds wrote:
$transaction->header->print;
"can't call method print on an undefined value"
no header yet at data hook?
Correct. The data hook is called _after_ the remote MTA has sent DATA but
before the local MTA (qpsmtpd) has responded with 250.
Looking at the register() for that plugin from before the "Great Renaming" it
shows this:
$self->register_hook("data_post", "data_handler");
so that's why it used to work and throws errors now. I just committed this:
=== plugins/sender_permitted_from
==================================================================
--- plugins/sender_permitted_from (revision 614)
+++ plugins/sender_permitted_from (local)
@@ -106,7 +106,7 @@
return $str;
}
-sub hook_data {
+sub hook_data_post {
my ($self, $transaction) = @_;
my $query = $transaction->notes('spfquery');
which should be much better...
John
p.s. I fixed plugins/milter too and checked all of the other plugins which
formerly hooked data_post and promoted those changes to branches/0.31 too...