rhsbl: added default reject settings
This commit is contained in:
parent
7a045474f9
commit
723fe314fa
@ -46,6 +46,11 @@ sub register {
|
|||||||
else {
|
else {
|
||||||
$self->{_args} = { @_ };
|
$self->{_args} = { @_ };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ( ! defined $self->{_args}{reject} ) {
|
||||||
|
$self->{_args}{reject} = 1;
|
||||||
|
};
|
||||||
|
$self->{_args}{reject_type} ||= 'perm';
|
||||||
}
|
}
|
||||||
|
|
||||||
sub hook_mail {
|
sub hook_mail {
|
||||||
@ -94,17 +99,17 @@ sub hook_mail {
|
|||||||
$self->log(LOGDEBUG, "TXT record found: " . $rr->txtdata);
|
$self->log(LOGDEBUG, "TXT record found: " . $rr->txtdata);
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( $result ) {
|
next if ! $result;
|
||||||
$self->log(LOGINFO, "fail, $result");
|
|
||||||
|
|
||||||
my $host = $transaction->sender->host;
|
$self->log(LOGINFO, "fail, $result");
|
||||||
if ($result =~ /^$host\./ ) {
|
|
||||||
return $self->get_reject( "Mail from $host rejected because it $result" );
|
|
||||||
};
|
|
||||||
|
|
||||||
my $hello = $self->qp->connection->hello_host;
|
my $host = $transaction->sender->host;
|
||||||
return $self->get_reject( "Mail from HELO $hello rejected because it $result" );
|
if ($result =~ /^$host\./ ) {
|
||||||
|
return $self->get_reject( "Mail from $host rejected because it $result" );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my $hello = $self->qp->connection->hello_host;
|
||||||
|
return $self->get_reject( "Mail from HELO $hello rejected because it $result" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user