https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6353
--- Comment #14 from Henrik Krohns <[email protected]> 2010-03-01 19:33:58 UTC --- (In reply to comment #13) > > 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. If you are referring to IDN, my third rule handles it just fine. What I'm meant with valid is checking the TLD exists. That's a completely another matter. > > 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. I don't agree. Missing header is again a completely different thing than a "missing TLD". It makes much more sense to have a separate MISSING_FROM rule then, if one doesn't exists. > 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. I'm not saying you are wrong, but we are getting into unnecessary complex territories. This is turning into a VALID_FROM_ADDRESS. As I somehow dragged myself into this, I've added yet another rules to the mix. header T_BUG6353_4 From:addr !~ /\...@[^@]+\.(?:[a-z]{2,}|xn--[a-z0-9]+(?:-[a-z0-9]*)?)$/i header T_BUG6353_5 From:addr !~ /\...@[^@]+\.(?:[a-z]{2,}|xn--[a-z0-9]+(?:-[a-z0-9]*)?)$/i [if-unset: [email protected]] header T_BUG6353_6 From:addr !~ /\...@[^@]+\.(?:[a-z0-9-]+)$/i header T_BUG6353_7 From:addr !~ /\...@[^@]+\.(?:[a-z0-9-]+)$/i [if-unset: [email protected]] header T_MISSING_FROM From =~ /^UNSET$/ [if-unset: UNSET] -- Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
