https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6353

--- Comment #13 from Mark Martinec <[email protected]> 2010-03-01 19:16:32 
UTC ---
> Ok I really doubt the point here is to test a _valid_ TLD. It would require
> much more code, which someone is free to create.

Why invite the trouble and ask for another round of a bug report
on "the FH_FROMEML_NOTLD is FP-ing on my Russian domain", when
it can be done right the first time around.

> I've added this to the mix:
> header T_BUG6353_3 From:addr !~ /\...@.+?\.[a-z]/i [if-unset: [email protected]]

What's the point of if-unset? - the rule description says "E-mail address
doesn't have TLD", and a missing From header field fits the description,
it doesn't have a TLD.

The proposed rule is also missing anchoring, matching addresses
like [email protected].

The .+ should be excluding further @ characters, otherwise
a <"t...@foo"@.com> would not get a hit.

So I think either a:
  From:addr !~ /\...@[^@]+\.(?:[a-z]{2,}|xn--[a-z0-9]+(?:-[a-z0-9]*)?)$/i

or a simple:
  From:addr !~ /\...@[^@]+\.(?:[a-z0-9-]+)$/i

would do, I suppose.

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to