Changing/Adding the __SPAMSTARS__ Macro

May 17, 2021
17
0
6
35
We are looking to change out our current spam server with Proxmox. The only problem we have is with the SPAMSTARS marco. Our current spam filter sends a header over that reads X-SPAM-LEVEL: X-SPAM-XXXXX, where the trailing X's represent the score. Our mail server has a rule looking for *X-SPAM-XXXX* depending on the level that the person wants to start sending spam to their junk folder.

The mail server uses *'s as a wildcard, so we are unable to send the SPAMSTARS over as the mail server would not sort spam correctly. I have gone into /usr/bin/pmg-smtp-filer and change the following lines:

From:
'SPAMSTARS' => '*' x (($spaminfo->{sa_score} || 0) > 100 ? 100 : $spaminfo->{sa_score} || 0),

To:
'SPAMSTARS' => 'X' x (($spaminfo->{sa_score} || 0) > 100 ? 100 : $spaminfo->{sa_score} || 0),

Doing this, I am able to send the X's that I need. I was hoping that we'd be able to get this made permanent as I would assume an update will wipe this out and we'd have to edit the files again. Is this something that could be added to the next version?
 
I would sincerly suggest to try to adapt the rule in your downstream server (if possible to match for any character) - or to match on the score)

Else - you can also open an enhancement request at https://bugzilla.proxmox.com to make this configurable (but I don't think it will be implemented soon)

I hope this helps!
 

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!