Spam filter rule to check subject for part of recipient name

larsen

Active Member
Feb 28, 2020
155
17
38
Hi,

we currently get a lot of spam where the subject contains part of the email adress the spam is sent to. It's already filtered after passing PMG, but I'd like to not accept the mail at all.

Example for "j.doe@example.com": "j doe You want this"
- Text varies
- First part is always the email address without the dot

I could add single rules for every user with the apparent downsides, so prefer to have a generic solution.
I could probably use SpamAssassin but then the mail would already have been accepted, wouldn't it?

So, is it possible to write a generic filter rule to check the subject for part of the email address?
 
Try this what object, subject match field. Adjust the 25 character to the length you want.

(?i)(\W|^)([\w.\-]{0,25}?example\.com)(\W|$)
 
I understand that this will need to have "example.com" in the subject, but that is not the case. See example above (only the part behind the colon is the subject).
 
I didn't find a solution and ended up using a single filter rule for each user, e.g. "j doe[ ,:].*"
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!