[SOLVED] Move mails with special text to quarantaine

wwweiss

Well-Known Member
Apr 28, 2018
31
6
48
63
I would like to filter out mails having a link in the message body with .../ub.php?... If a mail has this content it should be moved to the users spam-quarantaine. I know about the risk of false positives, but during my tests over one week I had about 10.000 spam mails and only one false!
How can I get this filter? As far as I understand now the way should be to add a custom.cf into the spamassassin directory /etc/mail/spamassassin, but I have no idea how to make such a rule. Can someone give me an example what I should have inside custom.cf? Or is there any other option available in the web interface?
 
this is quite well explained in the Spamassassin documentation:
https://cwiki.apache.org/confluence/display/SPAMASSASSIN/WritingRules

add a body rule (the part between the '/' is a regular expression) with fitting score

afterwards you need to restart pmg-smtp-filter

make sure to keep an eye on your logs (especially the processing time)

I hope this helps!
 
Thank you very much! It is really very easy - I just needed this hint, because I already made some tests before, which all were not working because I did not restart pmg-smtp-filter. Maybe an important note for anyone else playing with additional rules.
 
  • Like
Reactions: Stoiko Ivanov
Glad that worked out.

Please mark the thread as 'SOLVED' - it could help others in similar situations

Thanks!
 

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!