regex to block emails while having word bounce before @ sign.
Indunil Jayasooriya
indunil75 at gmail.com
Fri Mar 11 05:50:40 CET 2016
Hi,
I get mails from addresses like these.
Pls pay attention to the *username* part before *@ sign.*
the string* bounce* is present somewhere *before @ sign. *
*bounce*@anydomain.com
list*bounce*s at anydoamin.com
list*bounce*s-myword at anydoamin.com
*bounce*r at me-ss2-qaesx6.domain.com
*bounce*-684_HTML-239103804-572627-1363516-4539 at rock.info.domain.com
*bounce*-7071912-884185899 at sub.domain.com
*bounce*s+1501722-c815-sam=mydomain.com at mail.123xyz.com
ml-*bounce*-newsletter at anydomain.com
ab-*bounce*s-newsletter at anydomain.com
I want to block these email address with spam assassin.
I wrote a *from.cf <http://from.cf>* file to match these?
header FROM_BOUNCE From:addr =~* /(bounce)/i*
describe FROM_BOUNCE From address contain the word bounce
score FROM_BOUNCE 3.1
it matches the word *bounce *any where* before and after @ sign.*
e.g -
ml-*bounce*-newsletter@*bounce*.anydomain.com
So, it is NOT the regex I expect since I *DO NOT* want to filter
anything *after
@* sign.
So I am trying like this. But it still does NOT work.
*(bounce)\@* instead of* /(bounce)/i*
header FROM_BOUNCE From:addr =~ */(bounce)\@/i*
describe FROM_BOUNCE From address contain the word bounce and bounces
score FROM_BOUNCE 3.1
I go to below site and see whether it matches.
https://regex101.com/
it does NOT matches.
Can you guys make any comments on this?
-
cat /etc/motd
Thank you
Indunil Jayasooriya
http://www.theravadanet.net/
http://www.siyabas.lk/sinhala_how_to_install.html - Download Sinhala
Fonts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20160311/89e432b3/attachment.html>
More information about the amavis-users
mailing list