http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5564
Summary: __RDNS_DYNAMIC_IPADDR does not hit all of its test
patterns
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: Rules
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
__RDNS_DYNAMIC_IPADDR does not hit the following patterns in its test set:
NNN-NNN-NNN-NNN.fibertel.com.ar
NN.NN.NNN.NNN.ap.yournet.ne.jp
NN.NNN.NN-NN.rev.gaoland.net
200-171-228-6.customer.telesp.net.br
80-218-47-160.dclient.hispeed.ch
74.67-201-80.adsl.skynet.be
12-218-225-223.client.mchsi.com
The comment:
# (require an alpha first, as legit HELO'ing-as-IP-address is hit otherwise)
indicates that this is intentional. However, we are not looking at HELO but at
RDNS. To fix this, simply drop the [a-z] at the beginning. The latter part of
the regex keeps it from matching raw IPs.
The regex also does not match 'pptp-81-30-186-139.ufanet.ru' and I think that it
should. It's written in an odd manner so that it needs three .foo groups when
the IP address is not followed by a non-digit (such as a letter). The regex
would match something like 'pptp-81-30-186-139a.ufanet.ru,' which is just plain
weird.
The regex will be changed in two places:
--1-- ------2------
[a-z]\S*\d+[^\d\s]\d+[^\d\s]\d+[^\d\s]\d+[^\d\s][^\.]*\.\S+\.\S+
\S*\d+[^\d\s]\d+[^\d\s]\d+[^\d\s]\d+ \S* \.\S+\.\S+
Place 1 eliminates the unnecessary requirement for the IP to be preceded by
alphanumerics.
Place 2 simplifies the pattern and corrects the above-mentioned issue.
In English, the regex is now:
header matter
IP address-like string
trailer matter
.domain.name
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.