dmarc: skip processing for null sender

This commit is contained in:
Matt Simerson 2014-01-08 19:22:16 -05:00
parent 4d1b9ffe32
commit 3a47dd2ac2

View File

@ -106,6 +106,10 @@ sub data_post_handler {
my $dmarc = $self->{_dmarc}; my $dmarc = $self->{_dmarc};
$dmarc->init(); $dmarc->init();
my $from = $transaction->header->get('From'); my $from = $transaction->header->get('From');
if ( ! $from ) {
$self->log(LOGINFO, "skip, null sender" );
return $self->get_reject("empty from address, null sender?");
};
eval { $dmarc->header_from_raw( $from ); }; eval { $dmarc->header_from_raw( $from ); };
if ( $@ ) { if ( $@ ) {
$self->log(LOGERROR, "unparseable from header: $from" ); $self->log(LOGERROR, "unparseable from header: $from" );