From 69e30117fa20c1a858954a83188011bdb290c34a Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Sat, 30 Jun 2012 19:10:14 -0400 Subject: [PATCH] resolvable_fromhost: additional logging --- plugins/resolvable_fromhost | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/resolvable_fromhost b/plugins/resolvable_fromhost index d65bece..3181470 100644 --- a/plugins/resolvable_fromhost +++ b/plugins/resolvable_fromhost @@ -68,6 +68,7 @@ Default: temp (temporary, aka soft, aka 4xx). use strict; use warnings; +use lib 'lib'; use Qpsmtpd::Constants; use Qpsmtpd::DSN; use Qpsmtpd::TcpServer; @@ -114,13 +115,14 @@ sub hook_mail { }; my $result = $transaction->notes('resolvable_fromhost') or do { + $self->log(LOGINFO, 'error, missing result' ); return Qpsmtpd::DSN->temp_resolver_failed( $self->get_reject_type(), '' ); }; return DECLINED if $result =~ /^(?:a|ip|mx)$/; # success return DECLINED if $result =~ /^(?:whitelist|null|naughty)$/; # immunity - $self->log(LOGINFO, $result ); # log error + $self->log(LOGINFO, "fail, $result" ); # log error return Qpsmtpd::DSN->addr_bad_from_system( $self->get_reject_type(), "FQDN required in the envelope sender");