diff --git a/lib/Qpsmtpd/Plugin.pm b/lib/Qpsmtpd/Plugin.pm index b51b6cf..4c6cdb9 100644 --- a/lib/Qpsmtpd/Plugin.pm +++ b/lib/Qpsmtpd/Plugin.pm @@ -12,7 +12,7 @@ our @hooks = qw( logging config user_config post-fork pre-connection connect ehlo_parse ehlo helo_parse helo auth_parse auth auth-plain auth-login auth-cram-md5 rcpt_parse rcpt_pre rcpt mail_parse mail mail_pre - data data_headers_end data_post queue_pre queue queue_post vrfy noop + data data_headers_end data_post data_post_final queue_pre queue queue_post vrfy noop quit reset_transaction disconnect post-connection unrecognized_command deny ok received_line help ); diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index ccc88d8..ef533e4 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -781,9 +781,10 @@ sub data_respond { return 1; } + $self->run_hooks("data_post"); $self->authentication_results(); $self->received_line(); - $self->run_hooks("data_post"); + $self->run_hooks("data_post_final"); } sub authentication_results { @@ -888,7 +889,7 @@ sub received_line { $self->transaction->header->add('Received', $header_str, 0); } -sub data_post_respond { +sub data_post_final_respond { my ($self, $rc, $msg, $args) = @_; if ($rc == DONE) { return 1; diff --git a/plugins/dspam b/plugins/dspam index 295fcdf..3ac60ab 100644 --- a/plugins/dspam +++ b/plugins/dspam @@ -220,7 +220,7 @@ sub register { $self->get_dspam_bin() or return DECLINED; - $self->register_hook('data_post', 'data_post_handler'); + $self->register_hook('data_post_final', 'data_post_handler'); } sub get_dspam_bin { diff --git a/plugins/spamassassin b/plugins/spamassassin index 5d1a0ce..f179f04 100644 --- a/plugins/spamassassin +++ b/plugins/spamassassin @@ -164,7 +164,7 @@ sub register { $self->{_args}{reject_type} = 'perm'; } - $self->register_hook('data_post', 'data_post_handler'); + $self->register_hook('data_post_final', 'data_post_handler'); } sub data_post_handler {