Additional Info

A learning experience is one of those things that say, "You know that thing you just did? Don't do that." (Douglas Adams)

Technology is a word that describes something that doesn’t work yet. (Douglas Adams)

This post tagged:


Multiple Spam folders with Kerio Connect


If you are a Kerio Connect user or administrator, you have certainly seen messages marked as "**SPAM**". You may also be aware that you can change that to prefix spam messages with something else.

For example, here I've changed mine to read "**SPAM** [%s]":

Changing Spam Prefix in Kerio Connect

If you are a new to Kerio Connect, you may be puzzled by this. The current manuals don't mention anything about that. Why would I do that?

Actually, it's something that used to be mentioned in the manuals, and fortunately it still works.

Using %s in Spam Prefix

What does it do? It makes your Spam messages look like this:

Results of using %s

That gives you an immediate visual clue as to the actual Spam rating. If I'm looking for false positives (things marked as Spam that might not be), I'd look at those with "**SPAM** [****]" (4 stars) first, because those have the lowest Spam rating.

It would be nice if you could sort by Subject so that the lower scoring messages came first, but neither Outlook nor Webmail pay any attention to that and instead sort by alphanumerics only.

There is another way, though.

Sort messages into multiple Junk Folders

As you'll see shortly, this isn't something most of us would want to do because it affects out of office settings. Think about all of this before rushing to implement it!

This comes from the tip in the older manuals that suggests that you could write rules to sort messages out into multiple folders based on the Subject line. That involves a bit more work, but we can do it.

You'll need to add Mail filter rules for each condition you want to sort specially. I moved "[****]" and "[*****]" messages to their own folders with these three rules:

Rule 4

Rule 5

 Any Spam

* Be sure to use "contains" and not "matches" to avoid interpreting the "*"'s as wildcards.

To allow these new rules to work, you need to disable the default spam rule:

 Disable default rule

With this all in place, I now have lower scoring spam separate from high scoring spam. That could make it easier for me to quickly check for false positives.

Note: the new rules here are not the same as the default rule. That rule uses a different test and also takes the whitelist into account. You could edit the filters manually to do the same; see Using Sieve for spam in Kerio Mailserver. If you use the personal whitelist, you'd definitely want to do that (and you'd need to update your rules whenever that whitelist changes!)

Look at the "filter.siv" file in your mail directory to see these default rules.

#!1 __WebmailJunk__
if allof (spamtest, not address :all :is "From" "") {
  fileinto "Junk E-mail";

#!0 __WebmailAutoreply__
#if true {
#  vacation :days 7 "I am out of office today.  Please call 774 213-1199 if urgent\r\n\r\n";

Also, this affects the out of office rule. With the default spam rule, out of office messages won't be sent in reply to messages that are marked "**SPAM**". Unless you move that rule below your new rules, out of office messages will be sent. This requires manual editing of "filter.siv". As the normal out of office message will get moved right back to the top every time it is enabled, you'd probably want to define your own rule, instead.

Another way to handle that is to re-enable the default rule before you enable out of office messages. The disadvantage of that is that your Spam won;'t be sorted out into your new folders, because your rules won't ever be seen. No matter what, this isn't going to be ideal.

Got something to add? Send me email.

(OLDER) <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> Multiple Spam folders with Kerio Connect

Increase ad revenue 50-250% with Ezoic

More Articles by

Find me on Google+

© Anthony Lawrence

Kerio Connect Mailserver

Kerio Samepage

Kerio Control Firewall

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us