spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: r374491 - /spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm
Date Thu, 02 Feb 2006 20:51:32 GMT
Author: jm
Date: Thu Feb  2 12:51:30 2006
New Revision: 374491

URL: http://svn.apache.org/viewcvs?rev=374491&view=rev
Log:
support new Mail::DomainKeys API, which changed incompatibly between 0.18 and 0.80 without
warning

Modified:
    spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm

Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm?rev=374491&r1=374490&r2=374491&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm Thu Feb  2 12:51:30
2006
@@ -211,7 +211,15 @@
 # get the DK status "header" from the Mail::DomainKeys::Message object
 sub _dkmsg_hdr {
   my ($self, $message) = @_;
-  return $message->header->value();
+  # try to use the signature() API if it exists (post-0.80)
+  if ($message->can("signature")) {
+    if (!$message->signed) {
+      return "no signature";
+    }
+    return $message->signature->status;
+  } else {
+    return $message->header->value;
+  }
 }
 
 sub sanitize_header_for_dk {



Mime
View raw message