Adding items to custom.cf for Spamassassin

May 17, 2021
17
0
6
35
I am trying to add a custom header to Spamassassin. I am editing the custom.cf file in /etc/mail/spamassassin but it doesn't seem to be working. The line I am adding is:

add_header all Level X-SPAM-_STARS(X)_

We have a current mail filter that adds this and is what our mail server looks for when moving items to junk. Is this something that should work and I am doing it wrong or can this not be done?
 
You want to add custom header field to all your incoming/outgoing email?
Create mail filter with action object to add your custom header field/attribute.

1621293495879.png
 
  • Like
Reactions: steven99
You want to add custom header field to all your incoming/outgoing email?
Create mail filter with action object to add your custom header field/attribute.

View attachment 26073
I have tried it this way, but the macros only add *'s and I need X's. The X's are dynamically added based on the spam score. For example, if the spam score it 5.6 then there would be a header that says X-SPAM-LEVEL: X-SPAM-XXXXXX. Our current mail system is specifically looking for the X-SPAM-XXXXXX and move mail based on the amount of X's.
 
So you are saying that I cannot add add_header all Relay-Country X-SPAM-_STARS(X)_ to the custom.cf file?
it won't solve your problem of actually getting a fitting header in all mails
 
it won't solve your problem of actually getting a fitting header in all mails
I have tried adding that custom line but nothing ever shows up in the header. Is this expected behavior? A simple, yes it will work or a no it will not work, would be great. This is just a trial run and if we cannot get this to work, we will move on to something else.
 
sorry if my last answer was not clear - no this will not work
(because PMG uses SpamAssassin as a perl-module, thus not all configuration-options of SpamAssassin have an effect)
 

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!