You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by an...@new-destiny.co.uk on 2004/07/23 19:06:32 UTC

Rule to match invalid addresses at domain?

Perhaps this email is more appropriate for spamassassin-dev; if so, my
apologies. This seemed a sensible first place to try. 

I'm trying to develop a rule which only matches invalid addresses, at my
domain. For example, I would want: 

blather@mydomain.com to match
invalidaddress1@mydomain.com to match
validaddress1@mydomain.com to NOT match 

Also, clearly the rule has to not match on anything else either (this is
what makes it hard). So far I have come up with (with the help of people
from #perl!): 

/\b(?!(valid1|valid2)\@)[\w.]+\@mydomain\.com/ 

I have only tested this in a perl script so far (not in SA itself), but
this works, unless valid1 or valid2 contain a '.'. If they do, it doesn't
work (yes, I am escaping the '.'). Does anyone know how I can overcome this
problem? 

Thanks,
Andrew. 

PS: I intend to use ALL ~= /thepattern/ as my rule.