Don't interpret invalid return codes as OK
This commit is contained in:
parent
b24f766cc5
commit
dcdda3a5e7
@ -302,6 +302,10 @@ sub run_continuation {
|
||||
$self->log(LOGERROR, $log_msg . "undef!");
|
||||
next;
|
||||
}
|
||||
if ( !return_code($r[0]) ) {
|
||||
$self->log(LOGERROR, $log_msg . $r[0]);
|
||||
next;
|
||||
}
|
||||
|
||||
if ($tran) {
|
||||
my $tnotes = $tran->notes($name);
|
||||
|
13
t/qpsmtpd.t
13
t/qpsmtpd.t
@ -149,12 +149,13 @@ sub __run_continuation {
|
||||
descr => 'DECLINED -> DENY',
|
||||
},
|
||||
# TODO: ignore invalid return codes rather than treating them like OK
|
||||
#{
|
||||
# hooks => [ [123456,undef], [DENY, 'goaway'] ],
|
||||
# expected_response => '550/goaway',
|
||||
# disconnected => 0,
|
||||
# descr => 'INVALID -> DENY',
|
||||
#},
|
||||
{
|
||||
hooks => [ [123456,undef], [DENY, 'goaway'] ],
|
||||
expected_response => '550/goaway',
|
||||
disconnected => 0,
|
||||
logged => 'LOGERROR:Plugin ___FakeHook___, hook helo returned 123456',
|
||||
descr => 'INVALID -> DENY',
|
||||
},
|
||||
{
|
||||
hooks => [ sub { die "dead\n" }, [DENY, 'begone'] ],
|
||||
expected_response => '550/begone',
|
||||
|
Loading…
Reference in New Issue
Block a user