You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2019/11/27 10:05:04 UTC

svn commit: r1870497 - in /spamassassin: branches/3.4/lib/Mail/SpamAssassin/Message/Metadata/Received.pm trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm

Author: hege
Date: Wed Nov 27 10:05:04 2019
New Revision: 1870497

URL: http://svn.apache.org/viewvc?rev=1870497&view=rev
Log:
Bug 5646 - Postfix with set mail_name option doesn't recognize authentication

Modified:
    spamassassin/branches/3.4/lib/Mail/SpamAssassin/Message/Metadata/Received.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm

Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/Message/Metadata/Received.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Message/Metadata/Received.pm?rev=1870497&r1=1870496&r2=1870497&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/Message/Metadata/Received.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/Message/Metadata/Received.pm Wed Nov 27 10:05:04 2019
@@ -434,8 +434,9 @@ sub parse_received_line {
     $auth = 'CriticalPath';
   }
   # Postfix 2.3 and later with "smtpd_sasl_authenticated_header yes"
-  elsif (/\) \(Authenticated sender: \S+\) by \S+ \(Postfix\) with /) {
-    $auth = 'Postfix';
+  # Normally $1 is "Postfix", but could be changed with mail_name (Bug 5646)
+  elsif (/\) \(Authenticated sender: \S+\) by \S+ \(([^\)]+)\) with /) {
+    $auth = $1 eq 'Postfix' ? $1 : "Postfix ($1)";
   }
   # Communigate Pro - Bug 6495 adds HTTP as possible transmission method
   # 	Bug 7277: XIMSS used by Pronto and other custom apps, IMAP supports XMIT extension

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm?rev=1870497&r1=1870496&r2=1870497&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm Wed Nov 27 10:05:04 2019
@@ -430,8 +430,9 @@ sub parse_received_line {
     $auth = 'CriticalPath';
   }
   # Postfix 2.3 and later with "smtpd_sasl_authenticated_header yes"
-  elsif (/\) \(Authenticated sender: \S+\) by \S+ \(Postfix\) with /) {
-    $auth = 'Postfix';
+  # Normally $1 is "Postfix", but could be changed with mail_name (Bug 5646)
+  elsif (/\) \(Authenticated sender: \S+\) by \S+ \(([^\)]+)\) with /) {
+    $auth = $1 eq 'Postfix' ? $1 : "Postfix ($1)";
   }
   # Communigate Pro - Bug 6495 adds HTTP as possible transmission method
   # 	Bug 7277: XIMSS used by Pronto and other custom apps, IMAP supports XMIT extension