https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7886

            Bug ID: 7886
           Summary: Qmail received header fails when FcrDNS is ok and TLS
                    is used ( ESMTPS )
           Product: Spamassassin
           Version: 3.4.4
          Hardware: PC
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Libraries
          Assignee: dev@spamassassin.apache.org
          Reporter: undersp...@gmail.com
  Target Milestone: Undefined

Created attachment 5739
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5739&action=edit
patch

When receiving an email with FcrDNS and TLS qmail creates an header like this:

Received: from mta.example.net ([192.0.0.3])
          (envelope-sender <esm...@example.net>)
          by qmail-mta02 (qmail-qmail-1.0.0) with ESMTPS
          for <u...@example.net>; 3 Mar 2021 17:42:22 -0000

which translates to

Mar  5 11:41:57.086 [59009] dbg: received-header: parsed as [ ip=192.0.0.3
rdns= helo=mta.example.net by=qmail-mta02 ident= envfrom=esm...@example.net
intl=0 id= auth= msa=0 ]

with "rdns= " and triggers RDNS_NONE and then others .
The attached sample can be used to test

cat sample.eml | spamassassin  -Dreceived-header  2>&1 | grep parsed

Before patch :

Mar  5 11:41:57.085 [59009] dbg: received-header: parsed as [ ip=192.0.0.2
rdns=mta.example.net helo=mta.example.net by=qmail-mta02 ident=
envfrom=s...@example.net intl=0 id= auth= msa=0 ]
Mar  5 11:41:57.086 [59009] dbg: received-header: parsed as [ ip=192.0.0.3
rdns= helo=mta.example.net by=qmail-mta02 ident= envfrom=esm...@example.net
intl=0 id= auth= msa=0 ]
Mar  5 11:41:57.086 [59009] dbg: received-header: parsed as [ ip=192.0.0.1
rdns=mta.example.com helo=helo.example.com by=qmail-mta01 ident=
envfrom=esm...@example.com intl=0 id= auth= msa=0 ]
Mar  5 11:41:57.087 [59009] dbg: received-header: parsed as [ ip=192.0.0.4
rdns=mta.example.com helo=helo.example.com by=qmail-mta01 ident=
envfrom=s...@example.com intl=0 id= auth= msa=0 ]

After patch :
Mar  5 11:41:31.939 [58932] dbg: received-header: parsed as [ ip=192.0.0.2
rdns=mta.example.net helo=mta.example.net by=qmail-mta02 ident=
envfrom=s...@example.net intl=0 id= auth= msa=0 ]
Mar  5 11:41:31.939 [58932] dbg: received-header: parsed as [ ip=192.0.0.3
rdns=mta.example.net helo=mta.example.net by=qmail-mta02 ident=
envfrom=esm...@example.net intl=0 id= auth= msa=0 ]
Mar  5 11:41:31.940 [58932] dbg: received-header: parsed as [ ip=192.0.0.1
rdns=mta.example.com helo=helo.example.com by=qmail-mta01 ident=
envfrom=esm...@example.com intl=0 id= auth= msa=0 ]
Mar  5 11:41:31.940 [58932] dbg: received-header: parsed as [ ip=192.0.0.4
rdns=mta.example.com helo=helo.example.com by=qmail-mta01 ident=
envfrom=s...@example.com intl=0 id= auth= msa=0 ]

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to