Proxmox Mail gatewa...
 
Notifications
Clear all

[Solved] Proxmox Mail gateway

5 Posts
2 Users
2 Reactions
1,151 Views
(@algorges)
Joined: 1 year ago
Posts: 5
Topic starter  

I have a PMG server as an antispam/antivirus gateway.
Messages classified by PMG, when forwarded to Carbonio, are analyzed again by amavis/spamassassin, resulting in spam classification errors.

How can Carbonio consider the header X-Spam-Flag: YES coming from PMG and not passing spamassassin again?


   
Quote
antonio
(@antonio)
Joined: 1 year ago
Posts: 48
 

Hi, I think SpamAssassin should always check all messages as a normal behavior but you can always add a SpamAssassin configuration rule (using header or header_eval rule types) to control it and not making more tests.

header      X-Spam-Flag      X-Custom-Header =~ /YES/
describe    X-Spam-Flag      Marked as spam at PMG level
score         X-Spam-Flag      0.0

With this rule, SpamAssassin will check the specified header field for the specified value. If the condition is met, no spam score will be added to the message bypassing further spam checks for that message.

hope this gives you a clue

let us know if you make it work

Have a nice day


   
ReplyQuote
(@algorges)
Joined: 1 year ago
Posts: 5
Topic starter  

I will configure PMG to send a custom header to carbonio and test.
Thanks.


   
ReplyQuote
(@algorges)
Joined: 1 year ago
Posts: 5
Topic starter  

It worked.
I configured PMG to add the X-PMG-Flag header: YES

I created a file /opt/zextras/data/spamassassin/localrules/zzsauser.cf

header PMG_SPAM X-PMG-Flag =~ /YES/
describe PMG_SPAM PMG SPAM
score PMG_SPAM 5.0

bayes_ignore_header X-PMG-Flag

 

zmamavisdctl restart

Now messages marked as spam by PMG go directly to the user's spam folder.


   
jelledj reacted
ReplyQuote
antonio
(@antonio)
Joined: 1 year ago
Posts: 48
 

@algorges Glad you managed. Nice work.

Have a nice day


   
algorges reacted
ReplyQuote