temp_resolver_failed is a transaction note

The mail hook sets a transaction note 'temp_resolver_failed', but the
 rcpt hook queried a connection note of the same name (which didn't
 exist, of course).
 Now it queries the transaction note.
This commit is contained in:
Peter J. Holzer 2011-01-03 12:03:13 +01:00 committed by Robert
parent 24d09fa4a9
commit b7668c0468

View File

@ -41,7 +41,7 @@ sub hook_mail {
sub hook_rcpt {
my ($self, $transaction, $recipient, %args) = @_;
if (my $host = $self->qp->connection->notes('temp_resolver_failed')) {
if (my $host = $transaction->notes('temp_resolver_failed')) {
# default of temp_resolver_failed is DENYSOFT
return Qpsmtpd::DSN->temp_resolver_failed("Could not resolve " . $host);
}
@ -148,4 +148,4 @@ sub mx_valid {
return 0;
}
# vim: ts=2 sw=2 expandtab syn=perl
# vim: ts=2 sw=2 expandtab syn=perl