Mailing List Archive

svn commit: r422056 - in /spamassassin/branches/3.1: lib/Mail/SpamAssassin/Message/Metadata/Received.pm t/rcvd_parser.t
Author: dos
Date: Fri Jul 14 14:27:42 2006
New Revision: 422056

URL: http://svn.apache.org/viewvc?rev=422056&view=rev
Log:
bug 4980: support Postfix 2.3 auth headers

Modified:
spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm
spamassassin/branches/3.1/t/rcvd_parser.t

Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm?rev=422056&r1=422055&r2=422056&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm Fri Jul 14 14:27:42 2006
@@ -417,6 +417,10 @@
elsif (/\) by .+ \(\d{1,2}\.\d\.\d{3}(?:\.\d{1,3})?\) \(authenticated as .+\) id /) {
$auth = 'CriticalPath';
}
+ # Postfix 2.3 and later with "smtpd_sasl_authenticated_header yes"
+ elsif (/\)\s+\(Authenticated sender:\s+\S+\)\s+by\s+\S+\s+\(Postfix\)\s+with\s+/) {
+ $auth = 'Postfix';
+ }

if (/^from /) {
# try to catch enveloper senders

Modified: spamassassin/branches/3.1/t/rcvd_parser.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/t/rcvd_parser.t?rev=422056&r1=422055&r2=422056&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/rcvd_parser.t (original)
+++ spamassassin/branches/3.1/t/rcvd_parser.t Fri Jul 14 14:27:42 2006
@@ -18,7 +18,7 @@

use lib '.'; use lib 't';
use SATest; sa_t_init("rcvd_parser");
-use Test; BEGIN { plan tests => 49 };
+use Test; BEGIN { plan tests => 50 };


use strict;
@@ -621,6 +621,20 @@
} => q{

[ ip=70.20.57.51 rdns= helo=KRYPTIK by=host.name ident= envfrom= id=M2006040415284308595 auth= ]
+
+},
+q{
+
+Received: from bar.example.org (bar.example.org [127.0.0.1])
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
+ (Client did not present a certificate)
+ (Authenticated sender: sender.example.net)
+ by foo.example.net (Postfix) with ESMTP id 44A8959ED6B0
+ for <recip@example.com>; Fri, 30 Jun 2006 08:02:00 +0100 (BST)
+
+} => q{
+
+[ ip=127.0.0.1 rdns=bar.example.org helo=bar.example.org by=foo.example.net ident= envfrom= id=44A8959ED6B0 auth=Postfix ]

},
);