Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Spam - Custom Rules adds X-Spam entry instead of replacing it
  •  
stk_jj

Messages: 47
Karma: 0
Send a private message to this user
having some log-mails sorted to spam I added a custom rule to fix this:

if mail-header subject contains substring "xyz" treat message as non-spam (override SpamAssassin score)


mail-header instead shows that:

X-Spam-Status: No, hits=0.0 required=4.5
	tests=AWL: 0.001,BAYES_00: -1.665,HTML_MESSAGE: 0.001,
	MIME_HTML_ONLY: 0.001,T_RP_MATCHES_RCVD: -0.01,CUSTOM_RULE_SUBJECT: ALLOW,
	TOTAL_SCORE: -1.672,autolearn=ham
X-Spam-Level: 
X-Spam-Flag: YES
X-Spam-Score: 4.081
X-Spam-Level: ****
X-Spam-Status: Yes, score=4.081 tagged_above=-999 required=3
	tests=[FSL_BULK_SIG=1, HTML_MESSAGE=0.001, MIME_HTML_ONLY=1.105,
	PYZOR_CHECK=1.985, T_RP_MATCHES_RCVD=-0.01] autolearn=no


e.g. original X-Spam-Score is kept alive and custom X-Spam-Status is added, but overridden, Mail is still treated as spam.

My actual tests are to reduce Spam-Score instead of modifying the Status, but that does not fix the X-Spam-Status bug.

Kerio Connect 9.0.0 (291) running on Mac OS X (10.9.5), x86_64

any comments on this?

best regards Stefan
  •  
Pavel Dobry (Kerio)

Messages: 5228
Karma: 251
Send a private message to this user
Custom spam rules (and Allow action in particular) are affecting only spam rating from Spam Filter in Kerio Connect. The rules are not intended to modify email headers added by previous SMTP MTAs. In this case I recommend to configure the same exception in antispam filter on previous (upstream) SMTP server which added those headers.

[Updated on: Fri, 04 December 2015 10:46]

  •  
stk_jj

Messages: 47
Karma: 0
Send a private message to this user
Decreasing Score by 9 doesn't work either!
  •  
Pavel Dobry (Kerio)

Messages: 5228
Karma: 251
Send a private message to this user
stk_jj wrote on Fri, 04 December 2015 10:46
Decreasing Score by 9 doesn't work either!


It has nothing to do with score. Previous antispam added "X-Spam-Flag: YES" header and marked it as a spam.
  •  
MarkK

Messages: 454
Karma: 46
Send a private message to this user
Is the upstream server something that you have access to so that you can change the spam filter there?

If not, you may be able to do something with Spam Assassin.
Disclaimer: I have never tried this, theory only; but after writing the custom rule it is simple to put in place and remove if it has ill effects. Try at your own risk.

SA offers the ability to add and remove headers, if Kerio left that ability in their implementation.
spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Con f.html

I would wonder if you had a custom rule that was processed first, meaning the rule file name starts with 05_{filename}.cf, if you could remove the X-Spam-Flag header first before SA processes the email again and adds the spam headers. I believe that SA is processed first, then the Kerio custom rules. (Kerio does add some rules in to the SA system, at the 10_ level, but I don't know how it decides what to put there from the custom rules.) When you look at the spam rules hit list, the custom rules from Kerio Admin are always at the end of that.

Just a theory, as I mentioned above.
Previous Topic: Outlook 2013 EAS and KerioConnect Server 9
Next Topic: Kerio IMAP Migration Tool
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sun Apr 30 07:10:55 CEST 2017

Total time taken to generate the page: 0.00785 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.