qmail_deliverable: smite null sender to email list
This commit is contained in:
parent
78ac01df76
commit
f63c029bbb
@ -328,8 +328,11 @@ sub rcpt_handler {
|
||||
my $recipients = scalar $self->transaction->recipients;
|
||||
return DECLINED if $recipients < 2; # only one recipient
|
||||
|
||||
my $karma = $self->connection->notes('karma_history');
|
||||
return DECLINED if $karma > 0; # good karma, no limit
|
||||
my $history = $self->connection->notes('karma_history');
|
||||
return DECLINED if $history > 0; # good history, no limit
|
||||
|
||||
my $karma = $self->connection->notes('karma');
|
||||
return DECLINED if $karma > 0; # good connection, no limit
|
||||
|
||||
# limit # of recipients if host has negative or unknown karma
|
||||
return $self->get_reject("too many recipients");
|
||||
@ -337,9 +340,16 @@ sub rcpt_handler {
|
||||
|
||||
sub data_handler {
|
||||
my ($self, $transaction) = @_;
|
||||
return DECLINED if !$self->qp->connection->relay_client;
|
||||
|
||||
if ( $self->qp->connection->relay_client ) {
|
||||
$self->adjust_karma(5); # big karma boost for authenticated user/IP
|
||||
};
|
||||
|
||||
my $karma = $self->connection->notes('karma');
|
||||
if ( $karma < -3 ) { # bad karma
|
||||
return $self->get_reject("very bad karma: $karma");
|
||||
};
|
||||
|
||||
return DECLINED;
|
||||
}
|
||||
|
||||
|
@ -201,8 +201,10 @@ sub rcpt_handler {
|
||||
$self->log(LOGINFO, "pass, bouncesaying with program"), $k++ if $rv == 0x13;
|
||||
if ($rv == 0x14) {
|
||||
my $s = $transaction->sender->address;
|
||||
return (DENY, "mailing lists do not accept null senders")
|
||||
if (!$s || $s eq '<>');
|
||||
if (!$s || $s eq '<>') {
|
||||
$self->adjust_karma(-1);
|
||||
return (DENY, "mailing lists do not accept null senders");
|
||||
};
|
||||
$self->log(LOGINFO, "pass, ezmlm list");
|
||||
$k++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user