On Wed, 4 Dec 2019 12:40:27 -0800
Chris Mulcahy wrote:

> Hi.
> 
> I’m relatively new to complex custom rules.  I have plenty of simple
> and some multi-condition rules but need something custom.
> 
> My approach to using my domain name is bad but I started it in the
> 90s so… I have some sites where I gave them my email address as “
> sitename....@mydomain.com” so I would know who sold my address.
> Obviously, now there are a bunch of leaked lists so I get spam to
> those addresses even though it wasn’t really sold.
> 
> I want a rule that scores if “sitename” is not in the From: line.  

I think this should work:

header  ABUSED_CONTACT_ADDRESS ALL =~  
/\A(?=.*^To:\s(?:[^\n]*[<.\s])?([a-z0-9-]+)\.(?:com|net|org)\@yourdomain\.com).*^From:\s(?![^\n]+\1)/ism

Adapt the list of TLDs as necessary, and substitute your own domain for
yourdomain\.com.



Reply via email to