--- lib/Mail/SpamAssassin/Plugin/DomainKeys.pm (revision 328647) +++ lib/Mail/SpamAssassin/Plugin/DomainKeys.pm (working copy) @@ -163,7 +163,7 @@ return 0; } - my $comment = $self->_dkmsg_hdr($message); + my $comment = $self->_dkstatus($message); $comment ||= ''; $comment =~ s/\s+/ /gs; # no newlines please @@ -203,14 +203,17 @@ $scan->{domainkeys_signall} = 1; } - my $comment = $self->_dkmsg_hdr($message); + my $comment = $self->_dkstatus($message); dbg("dk: comment is '$comment'"); } -# get the DK status "header" from the Mail::DomainKeys::Message object -sub _dkmsg_hdr { +# get the DK status from the Mail::DomainKeys::Message object +sub _dkstatus { my ($self, $message) = @_; - return $message->header->value(); + if (!$message->signed) { + return "no signature"; + } + return $message->signature->status; } sub sanitize_header_for_dk {