You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2015/04/09 03:17:14 UTC

svn commit: r1672227 - in /spamassassin/trunk: lib/Mail/SpamAssassin/Message/Metadata/Received.pm t/rcvd_parser.t

Author: mmartinec
Date: Thu Apr  9 01:17:13 2015
New Revision: 1672227

URL: http://svn.apache.org/r1672227
Log:
Bug 7101: Received.pm: United Internet changed the way they indicate authenticated HTTP submitted mail

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

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=1672227&r1=1672226&r2=1672227&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm Thu Apr  9 01:17:13 2015
@@ -404,9 +404,8 @@ sub parse_received_line {
   # with ASMTP (Authenticated SMTP) is used by Earthlink, Exim 4.34, and others
   # with HTTP should only be authenticated webmail sessions
   # with HTTPU is used by Communigate Pro with Pronto! webmail interface
-  # via $PROTOCOL is used by froufrou mailers like United Internet and shouldn't cause issues to allow - see bug 7101
   # IANA registry: http://www.iana.org/assignments/mail-parameters/mail-parameters.xhtml
-  if (/ by / && / (?:with|via) ((?:ES|L|UTF8S|UTF8L)MTPS?A|ASMTP|HTTPU?)(?: |;|$)/i) {
+  if (/ by / && / with ((?:ES|L|UTF8S|UTF8L)MTPS?A|ASMTP|HTTPU?)(?: |;|$)/i) {
     $auth = $1;
   }
   # GMail should use ESMTPSA to indicate that it is in fact authenticated,
@@ -442,6 +441,10 @@ sub parse_received_line {
   elsif (/ with Microsoft Exchange Server HTTP-DAV\b/) {
     $auth = 'HTTP-DAV';
   }
+  # froufrou mailers like United Internet use a '(via HTTP)' comment, Bug 7101
+  elsif (/ by / && / \(via (HTTP.?)\)(?: |;|$)/i) {
+    $auth = $1;
+  }
 
 # ---------------------------------------------------------------------------
 

Modified: spamassassin/trunk/t/rcvd_parser.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/rcvd_parser.t?rev=1672227&r1=1672226&r2=1672227&view=diff
==============================================================================
--- spamassassin/trunk/t/rcvd_parser.t (original)
+++ spamassassin/trunk/t/rcvd_parser.t Thu Apr  9 01:17:13 2015
@@ -18,7 +18,7 @@ if (-e 'test_dir') {            # runnin
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("rcvd_parser");
-use Test; BEGIN { plan tests => 145 };
+use Test; BEGIN { plan tests => 146 };
 use strict;
 
 # format is:
@@ -475,6 +475,10 @@ my %data = (
   'from unknown (HELO ?151.80.38.67?) (myuser@mydomain.it@151.80.38.67) by mail.it-connect.it with SMTP; 28 Jan 2013 21:50:51 +0100' => 
   '[ ip=151.80.38.67 rdns= helo=?151.80.38.67? by=mail.it-connect.it ident=myuser@mydomain.it envfrom= id= auth= msa=0 ]',
 
+  #Bug 7101
+  'from [94.79.161.130] by 3capp-webde-bs01.dlan.cinetic.de (via HTTP); Tue, 11 Nov 2014 20:32:34 +0100' => 
+  '[ ip=94.79.161.130 rdns= helo= by=3capp-webde-bs01.dlan.cinetic.de ident= envfrom= id= auth=HTTP msa=0 ]',
+
 );
 
 my $sa = create_saobj();