Bug 5495 - Ignore Received with ([unix socket]) local-to-local handover
Summary: Ignore Received with ([unix socket]) local-to-local handover
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 3.1.7
Hardware: All All
: P5 normal
Target Milestone: Future
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
: 6194 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-04 15:25 UTC by John K. Hohm
Modified: 2018-08-31 23:43 UTC (History)
5 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
ignore ([unix socket]) Received header patch None John K. Hohm [NoCLA]
Patch to ignore headers generated on local unix socket handover from cyrus. patch None bjoern [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description John K. Hohm 2007-06-04 15:25:17 UTC
During local LMTP delivery, Cyrus IMAPD generates the following almost-standard
Received header with ([unix socket]) in place of the client IP address, which
SpamAssassin currently considers it unparseable, breaking the trust chain at the
first link:

Received: from isp.provinetsolutions.com ([unix socket])
         by isp.provinetsolutions.com (Cyrus v2.2.13-Debian-2.2.13-5bpo2) with
LMTPA;
         Tue, 08 May 2007 14:27:51 -0500
Comment 1 John K. Hohm 2007-06-04 15:32:01 UTC
Created attachment 3968 [details]
ignore ([unix socket]) Received header
Comment 2 Anderson Medeiros Gomes 2008-08-08 14:44:57 UTC
The patch could not be applied to SA 3.2.3 and I'm needing it...

SpamAssassin can't parse headers from the message below. It was generated when a recipient forwarded the message to another account, with Sieve.

-------------------

Return-Path: <sender1@example.com>
Received: from murder ([unix socket])
	 by example.com (Cyrus v2.2.13-Debian-2.2.13-14) with LMTPA;
	 Fri, 08 Aug 2008 17:30:00 -0300
X-Sieve: CMU Sieve 2.2
Received: from localhost (localhost [127.0.0.1])
	by mx.example.com (Postfix) with ESMTP id AAE3F15CD9F
	for <recipient@example.com>; Fri,  8 Aug 2008 17:29:59 -0300 (BRT)
Received: from mx.example.com ([127.0.0.1])
	by localhost (mx.example.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id GAmta5qXpmEL for <recipient@example.com>;
	Fri,  8 Aug 2008 17:29:59 -0300 (BRT)
Received: by mx.example.com (Postfix, from userid 105)
	id 6B42415C520; Fri,  8 Aug 2008 17:29:59 -0300 (BRT)
Received: from murder ([unix socket])
	 by example.com (Cyrus v2.2.13-Debian-2.2.13-14) with LMTPA;
	 Fri, 08 Aug 2008 17:29:59 -0300
X-Sieve: CMU Sieve 2.2
Received: from localhost (localhost [127.0.0.1])
	by mx.example.com (Postfix) with ESMTP id 494F815CC86
	for <sender2@example.com>; Fri,  8 Aug 2008 17:29:56 -0300 (BRT)
Received: from mx.example.com ([127.0.0.1])
	by localhost (mx.example.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id D247WnpYTa-u for <sender2@example.com>;
	Fri,  8 Aug 2008 17:29:56 -0300 (BRT)
Received: by mx.example.com (Postfix, from userid 33)
	id 1B5A215CC74; Fri,  8 Aug 2008 17:29:55 -0300 (BRT)
Received: from station.example.com (station.example.com
	[192.168.3.119]) by webmail.example.com (Horde Framework) with HTTP;
	Fri, 08 Aug 2008 17:29:55 -0300
Message-ID: <20080808172955.10896ztot6t3qq04@webmail.example.com>
Date: Fri, 08 Aug 2008 17:29:55 -0300
From: "sender1" <sender1@example.com>
To: "sender2" <sender2@example.com>
Subject: Test
MIME-Version: 1.0
Content-Type: text/plain;
	charset=ISO-8859-1;
	DelSp="Yes";
	format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
User-Agent: Internet Messaging Program (IMP) H3 (4.2)
X-AV-Checked: ClamAV using ClamSMTP
X-AV-Checked: ClamAV using ClamSMTP



test
Comment 3 Sidney Markowitz 2008-08-08 15:29:48 UTC
I don't know what version of Received.pm the attachment is patched against (it isn't current trunk or current branch 3.2), but if you want to apply the patch for yourself, simply look for the comment line

 # HANDOVERS WE KNOW WE CAN'T DEAL WITH: TCP transmission, but to MTAs that

and insert the three new lines of the patch before that. Actually only one line of it contains the code itself. Insert this before the comment line to get the same result:

  if (/^from \S+ \(\[unix socket\]\) by \S+ \(/) { return; }

DISCLAIMER: I haven't looked at this patch, I'm only saying what you have to do to apply it to your Received.pm
Comment 4 Anderson Medeiros Gomes 2008-08-11 09:40:56 UTC
It worked. Thanks!
Comment 5 Anderson Medeiros Gomes 2008-08-11 09:52:29 UTC
Oops... Actually, it worked with my test message, but it didn't work in a real message:

------------------------------------

Return-Path: <amg1127@cefetrs.tche.br>
Received: from murder ([unix socket]) 
         by cefetrs.tche.br (Cyrus v2.2.13-Debian-2.2.13-14) with LMTPA;
         Mon, 11 Aug 2008 13:49:13 -0300                                
X-Sieve: CMU Sieve 2.2                                                  
X-Spam-Flag: NO                                                         
X-Spam-Checker-Version: SpamAssassin 3.2.3-spambr_20030926a (2007-08-08) on
        cmi.cefetrs.tche.br                                                
X-Spam-Level:                                                              
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY          
        autolearn=ham version=3.2.3-spambr_20030926a                       
X-Spam-Report:                                                             
        *  0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines
Received: from localhost (localhost [127.0.0.1])                                   
        by cmi.cefetrs.tche.br (Postfix) with ESMTP id ABAD015E366                 
        for <maicon@cefetrs.tche.br>; Mon, 11 Aug 2008 13:49:12 -0300 (BRT)        
Received: from cmi.cefetrs.tche.br ([127.0.0.1])
        by localhost (cmi.cefetrs.tche.br [127.0.0.1]) (amavisd-new, port 10024)
        with ESMTP id H50GJS1EyPRE for <maicon@cefetrs.tche.br>;
        Mon, 11 Aug 2008 13:49:12 -0300 (BRT)
Received: by cmi.cefetrs.tche.br (Postfix, from userid 105)
        id 61B2515608C; Mon, 11 Aug 2008 13:49:12 -0300 (BRT)
Received: from murder ([unix socket])
         by cefetrs.tche.br (Cyrus v2.2.13-Debian-2.2.13-14) with LMTPA;
         Mon, 11 Aug 2008 13:49:12 -0300
X-Sieve: CMU Sieve 2.2
Received: from localhost (localhost [127.0.0.1])
        by cmi.cefetrs.tche.br (Postfix) with ESMTP id 5808315E2F7
        for <cipf@cefetrs.tche.br>; Mon, 11 Aug 2008 13:49:10 -0300 (BRT)
Received: from cmi.cefetrs.tche.br ([127.0.0.1])
        by localhost (cmi.cefetrs.tche.br [127.0.0.1]) (amavisd-new, port 10024)
        with ESMTP id oXbn8WDuSShH for <cipf@cefetrs.tche.br>;
        Mon, 11 Aug 2008 13:49:10 -0300 (BRT)
Received: by cmi.cefetrs.tche.br (Postfix, from userid 33)
        id 1FFF715E29D; Mon, 11 Aug 2008 13:49:09 -0300 (BRT)
Received: from tux.adm.cefetrs.tche.br (tux.adm.cefetrs.tche.br
        [200.19.244.119]) by webmail.cefetrs.tche.br (Horde Framework) with HTTP;
        Mon, 11 Aug 2008 13:49:09 -0300
Message-ID: <20080811134909.344572f40xu2zkow@webmail.cefetrs.tche.br>
Date: Mon, 11 Aug 2008 13:49:09 -0300
From: "Anderson Medeiros Gomes" <amg1127@cefetrs.tche.br>
To: "cipf cipf" <cipf@cefetrs.tche.br>
Subject: Teste..
MIME-Version: 1.0
Content-Type: text/plain;
        charset=ISO-8859-1;
        DelSp="Yes";
        format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
User-Agent: Internet Messaging Program (IMP) H3 (4.2)
X-AV-Checked: ClamAV using ClamSMTP
X-AV-Checked: ClamAV using ClamSMTP

Isso =E9 apenas uma mensagem para monitoramento do sistema anti-spam.

Esta mensagem pode ser ignorada com seguran=E7a.

Obrigado.
--=20
Anderson Medeiros Gomes
amg1127@cefetrs.tche.br

Coordenadoria de Manuten=E7=E3o e Redes
Centro Federal de Educa=E7=E3o Tecnol=F3gica de Pelotas
http://www.cefetrs.tche.br/
Comment 6 bjoern 2009-07-21 07:51:58 UTC
Created attachment 4486 [details]
Patch to ignore headers generated on local unix socket handover from cyrus.
Comment 7 Karsten Bräckelmann 2009-09-07 03:49:00 UTC
*** Bug 6194 has been marked as a duplicate of this bug. ***
Comment 8 Mike Stupalov 2009-10-22 12:35:11 UTC
Patch from bjoern works fine (spamassassin 3.2.5, cyrus 2.2.13).

Please integrate into the main release.
Comment 9 Justin Mason 2009-10-22 13:10:44 UTC
hmm. vague chance this could make it into 3.3.0....
Comment 10 Justin Mason 2010-01-27 02:21:07 UTC
moving most remaining 3.3.0 bugs to 3.3.1 milestone
Comment 11 Justin Mason 2010-01-27 03:16:45 UTC
reassigning, too
Comment 12 Justin Mason 2010-03-23 16:33:57 UTC
moving all open 3.3.1 bugs to 3.3.2
Comment 13 Karsten Bräckelmann 2010-03-23 17:43:01 UTC
Moving back off of Security, which got changed by accident during the mass Target Milestone move.
Comment 14 Kevin A. McGrail 2013-06-21 16:08:48 UTC
Moving all open bugs where target is defined and 3.4.0 or lower to 3.4.1 target
Comment 15 Kevin A. McGrail 2015-04-06 23:48:56 UTC
Is this a current issue?  Pushing to future.
Comment 16 Bill Cole 2018-08-31 23:43:37 UTC
Fixed in 3.4 and trunk, r1839797