You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2018/12/19 02:07:06 UTC

[Bug 7671] New: ASN patch to configure IPv4/IPv6 lookups to use different zones

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

            Bug ID: 7671
           Summary: ASN patch to configure IPv4/IPv6 lookups to use
                    different zones
           Product: Spamassassin
           Version: 3.4.2
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Plugins
          Assignee: dev@spamassassin.apache.org
          Reporter: jyxmqw@protonmail.com
  Target Milestone: Undefined

Created attachment 5639
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5639&action=edit
Split lookups for IPv4 and IPv6 origin addresses

As outlined by Andy Smith in
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7211#c6 when using the ASN
plugin on a dual stack host (ie, IPv4 and IPv6) results will be incorrect or
missing.

This is not a configuration problem.

The zone listed in the documentation
https://spamassassin.apache.org/full/3.4.x/doc/Mail_SpamAssassin_Plugin_ASN.html#TEMPLATE-TAGS
asn.routeviews.org, only supports IPv4 addresses.

Attempting to look up IPv6 addresses in this zone will lead to incorrect
results.

For example:
$ dig +short MX freebsd.org
10 mx1.freebsd.org.
30 mx66.freebsd.org.

$ dig +short AAAA mx1.freebsd.org
2610:1c1:1:606c::19:1

$ dig -x 2610:1c1:1:606c::19:1 | egrep -v '^;|^$'
1.0.0.0.9.1.0.0.0.0.0.0.0.0.0.0.c.6.0.6.1.0.0.0.1.c.1.0.0.1.6.2.ip6.arpa. 22 IN
PTR mx1.freebsd.org.

$ dig +short TXT
1.0.0.0.9.1.0.0.0.0.0.0.0.0.0.0.c.6.0.6.1.0.0.0.1.c.1.0.0.1.6.2.asn.routeviews.org
"3215" "2.6.0.0" "16" <--- WRONG

$ dig +short TXT
1.0.0.0.9.1.0.0.0.0.0.0.0.0.0.0.c.6.0.6.1.0.0.0.1.c.1.0.0.1.6.2.origin.asn.cymru.com
"3215 | 2.6.0.0/16 | FR | ripencc | 2010-07-12" <--- ALSO WRONG

$ dig +short TXT
1.0.0.0.9.1.0.0.0.0.0.0.0.0.0.0.c.6.0.6.1.0.0.0.1.c.1.0.0.1.6.2.origin6.asn.cymru.com
"11403 | 2610:1c1:1::/48 | US | arin | 2007-04-11" <--- RIGHT


The attacked patch solves the problem by adding the ability to split the DNS
look ups into different zones based on address family.

The patch adds the config option asn_lookup_ipv6 to specify the IPv6 specific
zone:

loadplugin Mail::SpamAssassin::Plugin::ASN
asn_lookup origin.asn.cymru.com    _ASN_ _ASNCIDR_
asn_lookup_ipv6 origin6.asn.cymru.com    _ASN_ _ASNCIDR_
add_header all ASN _ASN_ _ASNCIDR_

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

[Bug 7671] ASN patch to configure IPv4/IPv6 lookups to use different zones

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7671

Henrik Krohns <he...@hege.li> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hege@hege.li
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Henrik Krohns <he...@hege.li> ---
Continuing in 7211.

*** This bug has been marked as a duplicate of bug 7211 ***

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

[Bug 7671] ASN patch to configure IPv4/IPv6 lookups to use different zones

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7671

Kevin A. McGrail <km...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |4.0.0
                 CC|                            |kmcgrail@apache.org

--- Comment #1 from Kevin A. McGrail <km...@apache.org> ---
Good idea.  Targeting for 4.0

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