[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2023-11-24 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

Sidney Markowitz  changed:

   What|Removed |Added

 CC||sid...@sidney.com
   Target Milestone|Undefined   |4.0.1

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2023-02-20 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

--- Comment #13 from RvdH  ---
Thx, will check/test it

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2023-02-20 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

Giovanni Bechis  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 CC||giova...@paclan.it

--- Comment #12 from Giovanni Bechis  ---
Sendinglib/Mail/SpamAssassin/PerMsgStatus.pm
Transmitting file data .done
Committing transaction...
Committed revision 1907776.

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2023-01-23 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

--- Comment #11 from Giovanni Bechis  ---
Created attachment 5877
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5877=edit
Ignore some tags

in some circumstances, some valid tags might not get their entry in
pms->{tag_data} and they should be ignored.
Added ASN, ASNCIDR and EXTRACTTEXTFLAGS to the list.

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2023-01-21 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

Christer Mjellem Strand  changed:

   What|Removed |Added

 CC||dilld...@bjork.org

--- Comment #10 from Christer Mjellem Strand  ---
FWIW this same problem very much exists with ExtractText. For any message
without an attachment scanned by it, which frankly will be the majority of
messages, the header will look like this:

X-Spam-ExtractText-Flags: _EXTRACTTEXTFLAGS_

It's not a huge problem, granted, but it also looks kinda ugly and broken.
Would be very nice if, as noted in a previous comment, it was possible to make
headers conditional on whether there is a tag to replace, as any header which
doesn't won't really have any value or purpose (not even in a training context
AFAICS). Ideally, don't add the header if not, but otherwise even an empty
value or N/A or some such would probably look less broken.

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2022-09-19 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

--- Comment #9 from RvdH  ---
FYI, i have not seen a single occasion where 4.0.0-rc2 didn't return a ASN
using GeoLite2-ASN.mmdb, except for localhost (127.0.0.1)

X-Spam-Checker-Version: SpamAssassin 4.0.0-r1903986 (2022-09-10) on
WIN-9UGLTTGHFTK
X-Spam-Flag: YES
X-Spam-Level: *
X-Spam-Status: Yes, score=25.1 required=4.0 tests=ALL_TRUSTED,BAYES_99,
 BAYES_999,FREEMAIL_FORGED_REPLYTO,KAM_DMARC_STATUS,KAM_MARKSPAM,
 KAM_VERY_BLACK_DBL,RAZOR2_CF_RANGE_51_100,RAZOR2_CHECK,
 URIBL_ABUSE_SURBL,URIBL_AMI_DBLACK,URIBL_BLACK,URIBL_DBL_SPAM autolearn=spam
 autolearn_force=no version=4.0.0-r1903986
X-Spam-ASN: _ASN_
X-Spam-Relay-Country: 
X-Spam-Report: 
 * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
 *  0.9 RAZOR2_CHECK Listed in Razor2 (http://razor.sf.net/)
 *  2.5 URIBL_DBL_SPAM Contains a spam URL listed in the Spamhaus DBL
 *  blocklist
 *  [URI: go.tygyguip.com]
 *  1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
 *  [URI: tygyguip.com]
 *  3.0 URIBL_AMI_DBLACK Contains a spam URL listed in the Abusix Mail
 *  Intelligence domain blocklist
 *  [URI: tygyguip.com]
 *  1.2 URIBL_ABUSE_SURBL Contains an URL listed in the ABUSE SURBL
 *  blocklist
 *  [URI: go.tygyguip.com]
 *  0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict
 *  Alignment
 *  5.0 KAM_VERY_BLACK_DBL Email that hits both URIBL Black and Spamhaus DBL
 *  0.2 BAYES_999 BODY: Bayes spam probability is 99.9 to 100%
 *  [score: 1.]
 *  3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100%
 *  [score: 1.]
 *  4.0 KAM_MARKSPAM Email arrived marked as Spam
 *  2.1 FREEMAIL_FORGED_REPLYTO Freemail in Reply-To, but not From
 *  1.9 RAZOR2_CF_RANGE_51_100 Razor2 gives confidence level above 50%
 *  [cf: 100]
Received: from mail.myserver.nl (localhost [127.0.0.1]) by mail.myserver.nl
with ESMTP ; Mon, 19 Sep 2022 11:10:12 +0200

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2022-09-19 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

--- Comment #8 from RvdH  ---
Here is a typical report for 3.4.6, where ASN lookup failed using routeviews

X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-18) on mail.myserver.nl
X-Spam-Flag: YES
X-Spam-Level: **
X-Spam-Status: Yes, score=30.3 required=4.0 tests=BAYES_99,BAYES_999,
 CUSTOM_MANY_BL,DKIM_NONE,HTML_MESSAGE,KAM_DMARC_STATUS,
 RCVD_IN_AMI_BLACK,RCVD_IN_AMI_DYN,RCVD_IN_GBUDB,RCVD_IN_HOSTKARMA_BL,
 RCVD_IN_SPAMRATS_NOPTR,RCVD_IN_UCEPROTECT1,RCVD_IN_UCEPROTECT2,
 RDNS_NONE,RELAYCOUNTRY_BAD,RELAYCOUNTRY_CN,SPF_HELO_NONE,SPF_SOFTFAIL
 autolearn=no autolearn_force=no version=3.4.6
X-Spam-ASN: _ASN_ _ASNCIDR_
X-Spam-Relay-Country: CN CN
X-Spam-Report: 
 *  3.0 RCVD_IN_HOSTKARMA_BL RBL: Sender listed in HOSTKARMA-BLACK
 *  [106.75.245.128 listed in hostkarma.junkemailfilter.com]
 *  3.0 RCVD_IN_AMI_BLACK RBL: Received via a relay in Abusix Mail
 *  Intelligence Black
 *  [106.75.245.128 listed in combined.mail.abusix.zone]
 *  3.0 RCVD_IN_AMI_DYN RBL: Received via a relay in Abusix Mail
 *  Intelligence Dynamic
 *  3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100%
 *  [score: 1.]
 *  0.2 BAYES_999 BODY: Bayes spam probability is 99.9 to 100%
 *  [score: 1.]
 *  1.5 RELAYCOUNTRY_BAD First untrusted relay is China, Brazil, India,
 *  Vietnam or Russia
 *  3.0 RELAYCOUNTRY_CN Relayed through China at some point
 *  0.5 RCVD_IN_UCEPROTECT2 RBL: Network listed in
 *  dnsbl-2.uceprotect.net
 *  [NET 106.75.245.0/24 is UCEPROTECT-Level2 listed]
 *  [because 5 impacts are seen from CHINANET-SH-AP]
 *  [China Telecom Group, CN/AS4812 there. See:]
 *  []
 *  1.5 RCVD_IN_SPAMRATS_NOPTR RBL: RATS-NoPtr: sender has no reverse
 *  DNS
 *  [106.75.245.128 listed in all.spamrats.com]
 *  1.0 RCVD_IN_UCEPROTECT1 RBL: Listed in dnsbl-1.uceprotect.net
 *  [IP 106.75.245.128 is UCEPROTECT-Level 1 listed.]
 *  [See ]
 *  2.5 RCVD_IN_GBUDB RBL: Listed in truncate.gbudb.net
 *  [106.75.245.128 listed in truncate.gbudb.net]
 *  0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
 *  0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
 *  0.0 HTML_MESSAGE BODY: HTML included in message
 *  0.8 RDNS_NONE Delivered to internal network by a host with no rDNS
 *  6.0 CUSTOM_MANY_BL Message received in more than 3 RBLs
 *  0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict
 *  Alignment
 *  0.1 DKIM_NONE message not signed with DKIM
Received: from server1.rewbd.online (Unknown [106.75.245.128]) by
mail.myserver.nl
 with ESMTP ; Mon, 19 Sep 2022 12:04:11 +0200



I think this might also happen for 4.x, where GeoLite2-ASN.mmdb may not contain
all entries the paid version (GeoIP2-ISP.mmdb) might contain

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2022-09-15 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

--- Comment #7 from RvdH  ---
To bad...as ASN_EXISTS seems to return the proper value, eg: true or false 
exists:X-ASN is false for a message send through localhost for example

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2022-09-15 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

--- Comment #6 from Henrik Krohns  ---
(In reply to RvdH from comment #5)
> I think something like this should/could work... check on X-ASN metadata 
> 
> for 4.x
> 
> headerASN_EXISTS exists:X-ASN 
> if (can(Mail::SpamAssassin::Plugin::ASN::has_check_asn) && ASN_EXISTS)
>   add_header all ASN _ASN_
> endif # has_check_asn

This kind of logic can't work since if() blocks are evaluated at SA startup. It
doesn't exist at message scan time anyway.

Returning empty string just requires a set_tag somewhere in ASN.pm, but at the
moment I have barely time to write these comments.

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2022-09-15 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

--- Comment #5 from RvdH  ---
I think something like this should/could work... check on X-ASN metadata 

for 4.x

header  ASN_EXISTS exists:X-ASN 
if (can(Mail::SpamAssassin::Plugin::ASN::has_check_asn) && ASN_EXISTS)
add_header all ASN _ASN_
endif   # has_check_asn

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2022-09-15 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

--- Comment #4 from RvdH  ---
returning a empty string should be better (in my opinion) then returning _ASN_
_ASNCIDR_, as it may look like something is broken, eg: like
X-Spam-Relay-Country


Might be i am, or you think i am nitpicking here though... and no it does not
cause actual problem, it just looks weird, not? :-)

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2022-09-15 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

Henrik Krohns  changed:

   What|Removed |Added

 CC||apa...@hege.li

--- Comment #3 from Henrik Krohns  ---
(In reply to RvdH from comment #1)
> Just thinking out loud, would it be possible to only add X-Spam-ASN and/or
> X-Spam-Relay-Country if they actually hold a (valid) value?

I think it's limitation of add_header. It always adds the headers, regardless
of finding tags to replace or not.

Does this pose any actual problem though? It's not limited to ASN.

Alternative is only to either add empty, or some other value like "unknown".

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2022-09-15 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

--- Comment #2 from RvdH  ---
And not only when send through localhost, especially with 4.x using geodb both
X-Spam-ASN and X-Spam-Relay-Country can return null or empty values using the:
Lite (free) MaxMind mmdb versions (GeoLite2-ASN.mmdb, GeoLite2-City.mmdb)

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

[Bug 8046] X-Spam-ASN header added without successful ASN lookup

2022-09-15 Thread bugzilla-daemon
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8046

RvdH  changed:

   What|Removed |Added

 CC||ruud.vd.h...@gmail.com

--- Comment #1 from RvdH  ---
Just thinking out loud, would it be possible to only add X-Spam-ASN and/or
X-Spam-Relay-Country if they actually hold a (valid) value?

Or can i do this manually? Something like, exists:X-ASN?

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