badrcptto: smite matches with -2 karma

useful for (reject=>naughty) + spam filter training
This commit is contained in:
Matt Simerson 2013-03-23 01:04:03 -04:00
parent e7f9f3bf21
commit d5f1f3f72b

View File

@ -64,6 +64,7 @@ sub hook_rcpt {
my ($bad, $reason) = split /\s+/, $line, 2; my ($bad, $reason) = split /\s+/, $line, 2;
next if ! $bad; next if ! $bad;
if ( $self->is_match( $to, lc($bad), $host ) ) { if ( $self->is_match( $to, lc($bad), $host ) ) {
$self->adjust_karma( -2 );
if ( $reason ) { if ( $reason ) {
return (DENY, "mail to $bad not accepted here"); return (DENY, "mail to $bad not accepted here");
} }