dkim: added karma for dkim results (allow/reject)
This commit is contained in:
parent
8e437ec305
commit
58b860c0eb
@ -152,6 +152,7 @@ sub get_details {
|
|||||||
sub handle_sig_fail {
|
sub handle_sig_fail {
|
||||||
my ( $self, $dkim, $mess ) = @_;
|
my ( $self, $dkim, $mess ) = @_;
|
||||||
|
|
||||||
|
$self->adjust_karma( -1 );
|
||||||
return $self->get_reject( "DKIM signature invalid: " . $dkim->result_detail, $mess );
|
return $self->get_reject( "DKIM signature invalid: " . $dkim->result_detail, $mess );
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -179,6 +180,7 @@ sub handle_sig_invalid {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$self->adjust_karma( -1 );
|
||||||
$self->log(LOGINFO, $mess );
|
$self->log(LOGINFO, $mess );
|
||||||
|
|
||||||
if ( $prs->{accept} ) {
|
if ( $prs->{accept} ) {
|
||||||
@ -212,6 +214,7 @@ sub handle_sig_pass {
|
|||||||
if ( $prs->{accept} ) {
|
if ( $prs->{accept} ) {
|
||||||
$self->add_header( $mess );
|
$self->add_header( $mess );
|
||||||
$self->log(LOGINFO, "pass, valid signature, accept policy");
|
$self->log(LOGINFO, "pass, valid signature, accept policy");
|
||||||
|
$self->adjust_karma( 1 );
|
||||||
return DECLINED;
|
return DECLINED;
|
||||||
}
|
}
|
||||||
elsif ( $prs->{neutral} ) {
|
elsif ( $prs->{neutral} ) {
|
||||||
@ -222,6 +225,7 @@ sub handle_sig_pass {
|
|||||||
}
|
}
|
||||||
elsif ( $prs->{reject} ) {
|
elsif ( $prs->{reject} ) {
|
||||||
$self->log(LOGINFO, $mess );
|
$self->log(LOGINFO, $mess );
|
||||||
|
$self->adjust_karma( -1 );
|
||||||
return $self->get_reject(
|
return $self->get_reject(
|
||||||
"DKIM signature valid but fails policy, $mess",
|
"DKIM signature valid but fails policy, $mess",
|
||||||
"fail, valid sig, reject policy"
|
"fail, valid sig, reject policy"
|
||||||
@ -252,7 +256,6 @@ sub handle_sig_none {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if ( $prs->{accept} ) {
|
if ( $prs->{accept} ) {
|
||||||
$self->log( LOGINFO, "pass, no signature, accept policy" );
|
$self->log( LOGINFO, "pass, no signature, accept policy" );
|
||||||
return DECLINED;
|
return DECLINED;
|
||||||
|
Loading…
Reference in New Issue
Block a user