Kerio® allows user created whitelists. The user simply adds addresses through their webmail interface, but internally rules are added to a "filter.siv" file in the Kerio mail store directory for that user.
A problem can arise when users whitelist people within their own organization. That's usually unnecessary because spam tests are normally not applied to "trustworthy relay agents" - in otherwords, the people who you allow to send email outside of your own domain. The "Enable rating of messages sent from trustyworthy relay agents" is NOT checked, which means that email sent by those users will not be processed by the spam filtering.
Further, local networks are also automatically whitelisted from and RBL blocking (not that these ever should be on RBL's anyway).
If users do add other users to their filter.siv whitelist, it would not matter unless outside spammers are sending mail impersonating as local users - if they do this and the user they impersonate is in the filter.siv file's whitelist, the message won't be seen as spam no matter how spammy it is!
One way to avoid some of that impersonation is to use Caller-ID and/or SPF for your own domain. You would then set the Invalid Action (in Content Filter->Spam Filter) to Add Spam Score to email that fails these tests.
However, that still leaves you with the problem of the filter.siv file. You could ask people to clean up their files, but if that's not likely to be done, you may need to do something about it yourself.
One thought would be to overwrite each user's filter.siv with a fresh and basically empty version. You can obtain one easily enough: simply create a new user, snag their filter.siv file and copy it to other users. However, that also wipes out vacation settings and any other rules they may have - it's drastic action.
It's possible to write a Perl script to only remove certain addresses. I wrote such a script, and accidentally introduced an error which caused people to get messages like this:
Hello, The following error occured in your mail sorting script on mail server at mail.xxx.com: line 2: Bad token: string expected All your mail will be delivered to your INBOX folder until you fix the error.
I had to quickly write another script to fix those errors - we had done some testing, but were not rigorous enough.
I THINK the following script will work correctly. You'd need to adjust the STORE directory and of course the domain name(s) you want removed. My concern is that there may be some examples of filter.siv where this script could fail - you'd need to check thoroughly and be prepared to revert if there is something I did not think of.
#!/usr/bin/perl
$STORE="/opt/kerio/mailserver/store/mail/aplawrence.com";
chdir($STORE) or die "No $store!\n";
opendir(DIR,".") or die "Can't open $store";
while (defined($file=readdir(DIR))) {
if (open(SIV, "$file/filter.siv" )) {
@stuff=<SIV>; close SIV;
open(ORIG,">$file/filter.ORIG");
open(SIV,">$file/filter.siv");
foreach (@stuff) {
print ORIG;
if (/spamtest, not address :all :is "From"/) {
s/"[^ ]*yourdomain.com", *//g;
s/\[ *"[^ ]*yourdomain.com", */\[/g;
s/, * "[^ ]*yourdomain.com"]/\]/g;
}
print SIV;
}
}
}
If you do find conditions where this fails, please let me know and we'll post fixes here.
Kerio®, and related trademarks, names and logos are the property of Kerio Technologies, Inc. and are registered and/or used in the U.S. and other countries. Used under license from Kerio Technologies, Inc.
More Articles by Anthony Lawrence - Find me on Google+
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. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar