Merge branch 'master' of github.com:msimerson/qpsmtpd-dev
This commit is contained in:
commit
394cbc3324
@ -5,7 +5,7 @@ use warnings;
|
|||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
my $QPDIR = '/usr/home/qpsmtpd/smtpd';
|
my $QPDIR = get_qp_dir();
|
||||||
my $logfile = "$QPDIR/log/main/current";
|
my $logfile = "$QPDIR/log/main/current";
|
||||||
|
|
||||||
my $is_ip = 0;
|
my $is_ip = 0;
|
||||||
@ -20,7 +20,7 @@ if ( $search =~ /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/ ) {
|
|||||||
$is_ip++;
|
$is_ip++;
|
||||||
};
|
};
|
||||||
|
|
||||||
open my $LOG, '<', $logfile;
|
open my $LOG, '<', $logfile or die "unable to open $logfile\n";
|
||||||
|
|
||||||
if ( $is_ip ) { # look for the connection start message for the IP
|
if ( $is_ip ) { # look for the connection start message for the IP
|
||||||
my $ip_matches;
|
my $ip_matches;
|
||||||
|
@ -68,6 +68,7 @@ Default: temp (temporary, aka soft, aka 4xx).
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
use lib 'lib';
|
||||||
use Qpsmtpd::Constants;
|
use Qpsmtpd::Constants;
|
||||||
use Qpsmtpd::DSN;
|
use Qpsmtpd::DSN;
|
||||||
use Qpsmtpd::TcpServer;
|
use Qpsmtpd::TcpServer;
|
||||||
@ -114,13 +115,14 @@ sub hook_mail {
|
|||||||
};
|
};
|
||||||
|
|
||||||
my $result = $transaction->notes('resolvable_fromhost') or do {
|
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 Qpsmtpd::DSN->temp_resolver_failed( $self->get_reject_type(), '' );
|
||||||
};
|
};
|
||||||
|
|
||||||
return DECLINED if $result =~ /^(?:a|ip|mx)$/; # success
|
return DECLINED if $result =~ /^(?:a|ip|mx)$/; # success
|
||||||
return DECLINED if $result =~ /^(?:whitelist|null|naughty)$/; # immunity
|
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(),
|
return Qpsmtpd::DSN->addr_bad_from_system( $self->get_reject_type(),
|
||||||
"FQDN required in the envelope sender");
|
"FQDN required in the envelope sender");
|
||||||
|
Loading…
Reference in New Issue
Block a user