Quarantine list-unsubscribe emails by default

littlejohn

New Member
Sep 2, 2024
2
0
1
Hi

We've recently installed Proxmox Email gateway and are really pleased with the results;

I notice that there are a lot of emails that come through with unsubscribe links, for lists that have never actually been joined (or not joined voluntarily) - these emails tend to have the List-Unsubcribe header in them.

Is it possible to mark all incoming emails that have List-Unsubscribe so that they go into the Quarantine list for the user? If the user really wants that mailing list, they would see it in the Daily Spam Report and would be able to whitelist the sender - and I imagine that, once whitelisted, the List-Unsubscribe check would no longer happen for that sender.

Thanks
John
 
Is it possible to mark all incoming emails that have List-Unsubscribe so that they go into the Quarantine list for the user? If the user really wants that mailing list, they would see it in the Daily Spam Report and would be able to whitelist the sender - and I imagine that, once whitelisted, the List-Unsubscribe check would no longer happen for that sender.
It should be possible, but consider that this might cause quite a lot of false positives!

Create a rule with appropriate priority (usually it should not need to be too high, but you can see which rules cause the e-mails on your deployment to be accepted in the Logs/Tracking Center):
* What Object: Match Field: List-Unsubscribe, value : '.*'
* Action Object: Quarantine

I have not explicitly tested this - so try it in a test-environment (or keep an eye on the logs, and be prepared to deactivate the rule)

I hope this helps!
 
Hi

We've recently installed Proxmox Email gateway and are really pleased with the results;

I notice that there are a lot of emails that come through with unsubscribe links, for lists that have never actually been joined (or not joined voluntarily) - these emails tend to have the List-Unsubcribe header in them.

Is it possible to mark all incoming emails that have List-Unsubscribe so that they go into the Quarantine list for the user? If the user really wants that mailing list, they would see it in the Daily Spam Report and would be able to whitelist the sender - and I imagine that, once whitelisted, the List-Unsubscribe check would no longer happen for that sender.

Thanks
John
In my (pre-) PMG -setup i had postfix do header-checks via main.cf
Code:
header_checks =
        regexp:/etc/postfix/header_checks

And every time a mail that originates from an unwanted list makes it thru i add it to this file in the below format
Code:
/^List-Unsubscribe:.*thefightback\.info.*/      REJECT

So i re-introduced the same setting in PMG to it's main.cf via the template.
Its a bit of a manual way, but it works for my small business setup.

Just be sure when introducing this setting you also create a/the empty file ( touch /etc/postfix/header_checks ) before reloading postfix.

- Glowsome
 
Last edited:
Thanks folks - I've tried this and it works - I didn't need to do anything except use the Mail Filter.

However, the mailing list emails always go into the Quarantine, and the user's whitelist is ignored. I've added an extra Action to mark the email with a custom header, so I know that the email is definitely being detected by my "is a mailing list" filter

If I look at the Whitelist filter rule (which is much higher priority than my "is a mailing list" filter rule), it only mentions global whitelist entries.

How can I get a user's own whitelist to kick in and accept the email before my filter?

Thanks
John
 

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!