📜 ⬆️ ⬇️

Independent testing of various AntiSpam solutions (commercial and free products)

The purpose of this test was to evaluate the effectiveness of various anti-spam systems. The following products were selected for testing:
• Apache Spamassassin - SA (free)
• Yandex Spamooborona 2.3 - SO (commercial)
• Kaspersky Antispam 3.0 - KAS (commercial)
• FastBL 0.7.0 (free)
• dnsbl listings:
bl.spamcop.net
cbl.abuseat.org
dnsbl.sorbs.net
dul.nsbl.sorbs.net
dul.ru
sbl-xbl.spamhaus.org
zen.spamhaus.org


DNSBL listings were chosen for popularity of use.
A separate server (P4 3.0GHz HT / 1GB RAM / FreeBSD 7.2-PRERELEASE) was allocated for each product, on which mail correspondence was tested. As MTA, sendmail compiled with milter support was used to connect the SA, SO, KAS services. To test commercial products, temporary licenses obtained from the developers site were used.

Mail traffic was used incoming for two domains, registered in 2002 and 2003. The total daily traffic for these domains ranges from 5 to 12 thousand letters, which is an ample amount of mail for testing. These domains are mainly used for personal correspondence, subscription to mailing lists and have about 10 real mail recipients available. Personal traffic on these domains ranges from 10 to 40 emails per day, which allows us to evaluate the effectiveness of the products tested, as well as the False Negative coefficient for each of the systems. Unfortunately, because of the small personal traffic, it was not possible to estimate the False Positive coefficient, but this is not a problem, since the systems under test use standard methods for evaluating spam and the probability of normal email getting into spam is very small.
')
The server connectivity for analysis was as follows:


The main relay accepted all incoming connections and performed their initial analysis by querying DNSBL lists, verifying the compliance of the RFC session (FastBL), then redirecting the letters further to the servers with the tested products. At once I will say that the requests in the DNSBL zone were only for receiving information about the IP address, but the address was not blocked. Testing was carried out without additional “tuning” of products in the form of overstatement of estimated coefficients, i.e. "As is".

Due to the fact that the systems under test have different methods for testing letters, the products were updated according to the following scheme:
"Apache Spamassassin" - sa-update once a day
"Kaspersky Antispam" - every 3 minutes
Yandex Spamooborona - every 20 minutes

The specified time intervals are due to the possible frequency of new updates and recommendations of the developers.

Each of the products has its own characteristics of testing email content:
Kaspersky Anti-Spam uses offline testing, regularly updating its local databases, plus the ability to connect dnsbl sheets.
Yandex Spam Defense uses online-testing technology, constantly working with its central server, as well as updating its local databases as needed, while also having the ability to connect dnsbl sheets.
Apache Spamassassin uses offline data processing, as well as online services of DNSBL, Razor, Pyzor, DKIM, SPF lists.

SA and KAS use fork () to process each letter, and SO, in turn, uses Threads, which is much more economical in terms of memory consumption. At the same time, SA uses preforked processes, limiting the likelihood of memory overruns, and KAS forks as needed, without exceeding the level of filtering processes above the limit specified in the configuration file.
Approximate memory consumption for each process:
SA ~ 40 MB
KAS ~ 30 MB
SO ~ 90 MB

Below are the results table with comments.
Abbreviations used in the tables:
PS - Passed (number of missed letters)
BL - Blocked (the number of blocked letters defined as SPAM)
FN - FalseNegative (The number of emails identified as good but being spam)
FP - FalsePositive (The number of letters defined as SPAM, but not such).
Date: 04/02/2009. Count: 10291PSBLFnFP
Spamooborona5610235420
SpamAssassin88794068730
Kaspersky Antispam27710014264one
bl.spamcop.net5107518450930
cbl.abuseat.org2353793823390
dnsbl.sorbs.net5732455957180
dul.nsbl.sorbs.net7773251877590
dul.ru1025536102410
Fastbl8910202750
sbl-xbl.spamhaus.org2336795523220
zen.spamhaus.org39598963810

The first day of testing began with a strange breakdown of the anti-spam protection of the Kaspersky Antispam product, and therefore KAS missed more letters than expected. The same day showed the weakness of the separate work of dnsbl lists and SpamAssassin against Russian spam. When testing, I specifically sent 4 letters with quoting of one of the spam emails with word mixing to the test server. Kaspersky in connection with contextual content analysis sent a valid letter signed by DKIM from gmail.com to SPAM. On the one hand, the content of the letter was indeed spam, but, in turn, the letter was rated [SPAM] instead of [Possible Spam]. Taking into account that this letter could be forwarded to the system administrator to analyze the contents of the headers, KAS received 1 FP.
Date: 04/03/2009 Count: 6357PSBLFnFP
Spamooborona616296310
SpamAssassin78055797500
Kaspersky Antispam656292350
bl.spamcop.net3455290234250
cbl.abuseat.org1571478615410
dnsbl.sorbs.net3759259837290
dul.nsbl.sorbs.net4801155647710
dul.ru63312663010
Fastbl776280470
sbl-xbl.spamhaus.org1557480015270
zen.spamhaus.org32560322950

On the second day of testing, Spamooborona and Kaspersky Antispam leveled their positions.
Date: 04/05/2009. Count: 7025PSBLFnFP
Spamooborona596966390
SpamAssassin1291573912710
Kaspersky Antispam29699690
bl.spamcop.net4170285541500
cbl.abuseat.org2031499420110
dnsbl.sorbs.net4424260144040
dul.nsbl.sorbs.net5180184551600
dul.ru69863969660
Fastbl426983220
sbl-xbl.spamhaus.org2018500719980
zen.spamhaus.org36866573480

On the third and fourth day of testing (weekends), Spamooborona’s protection was worn out a little because of a sharp surge in single messages. Since the data on the constituent components of letters from Yandex Spamooborona are processed online, it is likely that there will be misses of messages that have not had frequent repetitions. Kaspersky Antispam, in turn, showed the advantages of its offline rating system.

Date: 04/06/2009. Count: 9963PSBLFnFP
Spamooborona539906330
SpamAssassin1506845914860
Kaspersky Antispam12598371050
bl.spamcop.net7042292170220
cbl.abuseat.org2562740125420
dnsbl.sorbs.net6420354364000
dul.nsbl.sorbs.net7561240275410
dul.ru99075698870
Fastbl689895480
sbl-xbl.spamhaus.org2549741425290
zen.spamhaus.org30896552880

On the fifth day, there were no special surprises, except for an increase in the number of breakouts in Kaspersky Antispam.
Date: 04/07/2009. Count: 10923PSBLFnFP
Spamooborona881083248one
SpamAssassin1418950313770
Kaspersky Antispam190107271490
bl.spamcop.net6405451863640
cbl.abuseat.org2651827226100
dnsbl.sorbs.net6478444564370
dul.nsbl.sorbs.net8237268681960
dul.ru1087746108360
Fastbl10310820620
sbl-xbl.spamhaus.org2633829025920
zen.spamhaus.org293106302520

On the sixth day, Spamooborona grabbed FP, blocking a valid newsletter with subscribe.newsland.ru. On all days of testing, quite a large number of NDRs came with reports about non-delivery of spam messages, but all NDRs were filtered by products like SPAM and did not deal with this. Although this is not true.
Total. Count: 44552PSBLFnFP
Spamooborona31744235193one
SpamAssassin58823868657570
Kaspersky Antispam68643866562one
bl.spamcop.net2617818374260530
cbl.abuseat.org1116833384110430
dnsbl.sorbs.net2681217740266870
dul.nsbl.sorbs.net3355111001334260
dul.ru44353199442280
Fastbl379441732540
sbl-xbl.spamhaus.org1109333459109680
zen.spamhaus.org16894286315640

At the end of all tests, 125 absolutely valid letters were allocated from the total volume of letters (44552 letters), on the basis of which the parameters FalseNegative and FalsePositive were calculated. If we exclude the first day of testing, then we see how commercial products go hand in hand when analyzing spam. Spamassassin is still designed for the analysis of foreign spam and often misses letters due to the lack of content normalization. Commercial products lead letters to a particular type. For example, the method used by spammers to insert extra characters in words like: “PAA, S.Y., L = KI,” and also replacing Russian letters with similar English letters is completely ineffective against normalization, in which the distorted the word will still turn into “mailings” and will fall under contextual analysis, adding for each such word a certain amount of points to the entire letter. In turn, SpamAssassin quite well distinguishes foreign spam of the type “Medical, Viagra, Cialis, Enlargement”, and also well filters “bayes poisoning” context analyzers.

Concerning dnsbl-lists the opinion has developed ambiguous. On the one hand, the popularity of public dnsbl is very high, and they can provide protection against spam to a certain extent. But, on the other hand, dnsbl lists cannot be used as a panacea, since there are still FPs when working with valid domains. As for checking incoming connections by RFC (FastBL), not a single FP happened during testing and the level of filtering is comparable to commercial products. But that's another story. :)

Well, and finally, I decided to tabulate the variants of events in the event that the context analyzers worked in conjunction with DNSBL lists. As expected, I got 100% effective spam filtering even when using a foreign Apache SpamAssassin product.

Total Count: 44552PSBLFnFP
bl.spamcop.net + so12444243184one
bl.spamcop.net + sa1253870257250
bl.spamcop.net + kas12444050377one
cbl.abuseat.org + so12444266161one
cbl.abuseat.org + sa1254054138860
cbl.abuseat.org + kas12444264163one
dnsbl.sorbs.net + so12444258169one
dnsbl.sorbs.net + sa1253983245950
dnsbl.sorbs.net + kas12444068359one
dul.nsbl.sorbs.net + so12444247180one
dul.nsbl.sorbs.net + sa1253939850290
dul.nsbl.sorbs.net + kas12444013414one
dul.ru + so12444236191one
dul.ru + sa1253871457130
dul.ru + kas12443872555one
FastBL + so1244441314one
FastBL + sa12544374530
FastBL + kas1244441215one
sbl-xbl.spamhaus.org + so12444268159one
sbl-xbl.spamhaus.org + sa1254051939080
sbl-xbl.spamhaus.org + kas12444265162one
zen.spamhaus.org + so12444309118one
zen.spamhaus.org + sa125437476800
zen.spamhaus.org + kas1244438740one


Now about the saddest thing in this informative story about anti-spam - about setting up and licensing commercial products.
Despite the almost flawless core of products, the outer wrapper is very unsuccessful and inconvenient. Personally, I expected more professionalism from the developers of such products.
So, a few "spoons of tar in a barrel of honey."
Both products are focused on installation on the FreeBSD 6.2 system, which has long been outdated in terms of security, as well as the product versions used in the release (I had to use shaman compat6x).
Kaspersky antispam contains perl 5.6.2 in its distribution, as well as some of the specific perl modules. The KAS administration console uses thttpd and system harness in the form of pearl barley CGI scripts. Of course, it looks beautiful, but, in my opinion, not very informative, although it has filter schedules. It is possible to create user groups with different filtering methods, there are white / black lists - both users and ip addresses. Unfortunately, I did not find the ability to use external databases of users and groups in the administrator’s web console (perhaps buried somewhere in console utilities). With licensing, it is also not entirely clear; formally, I have nowhere found a quantitative unit by which per-user licensing is assessed. In a temporary license, the specified processing threshold of 250 megabytes actually ranges from 250 to 499 megabytes. Product licensing is based on the license file obtained upon purchase. The system supports the addition and installation of multiple licenses. Well, my biggest “fi” towards KAS developers is the method of installing the milter filter in the sendmail.cf configuration file.
Guys!!! Why do you rule the WORKING COMPUTER CONFIG, which, with the FIRST update, will cancel all the changes made?
The script of adding a filter to the config upon closer inspection has the same-hidden flag, which allows you to specify sendmail.mc to inject the lines that call the filter, but this flag is not called from the MTA-config.pl configuration script
All KAS processes run under the user mailflt3, which has its own directory for / usr / local / ap-mailfilter3. Startup scripts use the old service startup mechanism, which is not controlled from /etc/rc.conf.

Yandex Spamooborona also surprised me. The configurator is written in DIALOG, I didn’t expect this at installation. The branches of the configurator are very "razlapistye" and very easy to get lost there. Most of the settings are already preset, but it is better to go through all the items in the menu and set the parameters you need. SO has the ability to work with plaintext files, LDAP and judging by the pieces of SQL code in the config, it also knows MySQL. After I set up the work of SO, one person asked me: “I just heard reviews from some anti-spam vendors that supposedly spam defense was terribly difficult to set up and no one who bought direct support from Yandex couldn’t get it. Or are you the only one rare, or someone lying somewhere. ”
In reality, setting up with plaintext files is not so complicated, and, in principle, completely transparent. But it seems to me that the main configuration problems are still related to LDAP and MySQL. Licensing policy is also unusual. To protect against spam, you must either manually or automatically register all email addresses that the system will protect. Because it is really uncomfortable in a dynamically growing network, it makes you wonder. Per-user licensing is based on this list of users. I can’t say what will happen if the list of users increases the maximum level specified in the license, but it seems to me that this is not entirely correct. In my organization there are about 30 domains, 600 users and about 50 groups. Given that each user can have addresses from two domains (for example, alias), I will have to buy an almost unlimited license for the normal operation of my company. A separate article is the licensing key. The key is generated from two files: spam.ini (the main config of the filter) and domains (the list of protected domains). These two files are sent to the SO web server “manually” and, after filling in the necessary information in the web form, the server generates a key. The key is saved to the so.key file and placed in the directory where the other SO settings are located. And God forbid you to fix at least one bit in the spam.ini and domains files - the whole registration procedure will have to be repeated, otherwise the filter will not work. A good plus for novice administrators is the Russification of the SO configuration interface.

Describing the configuration and operation of SpamAssassin makes no special sense, since it is installed on the vast majority of mail relays.

Well, in principle, everything seems to be. What I wanted to write and say - wrote and explained.
Doubts about the bias of testing, I, of course, accept from anyone. If you think that this testing was biased and you can get other results without seriously tightening the screws, you can send me a personal configuration file of the product you are interested in, and I can put a couple more servers with the existing and your configs, then we will again compare the results.

PS: If there are questions about testing, then Kaspersky Lab wrote a wonderful document: www.spamtest.ru/document.html?context=15948&pubid=16638 , in which you can find all the recommendations for tests. In my tests, they were observed as accurately as possible, except for the testing time, all the same 2004 document.
ZZY: Ready to catch the stones in your garden.

ABORCHE 2009

SpamAssassin config:
bayes_auto_learn 1
bayes_ignore_header X-Bogosity
bayes_ignore_header X-Spam-Flag
bayes_ignore_header X-Spam-Status
loadplugin Mail :: SpamAssassin :: Plugin :: AWL
loadplugin Mail :: SpamAssassin :: Plugin :: AutoLearnThreshold
loadplugin Mail :: SpamAssassin :: Plugin :: Bayes
loadplugin Mail :: SpamAssassin :: Plugin :: BodyEval
loadplugin Mail :: SpamAssassin :: Plugin :: Check
loadplugin Mail :: SpamAssassin :: Plugin :: DKIM
loadplugin Mail :: SpamAssassin :: Plugin :: DNSEval
loadplugin Mail :: SpamAssassin :: Plugin :: HTMLEval
loadplugin Mail :: SpamAssassin :: Plugin :: HTTPSMismatch
loadplugin Mail :: SpamAssassin :: Plugin :: Hashcash
loadplugin Mail :: SpamAssassin :: Plugin :: HeaderEval
loadplugin Mail :: SpamAssassin :: Plugin :: ImageInfo
loadplugin Mail :: SpamAssassin :: Plugin :: MIMEEval
loadplugin Mail :: SpamAssassin :: Plugin :: MIMEHeader
loadplugin Mail :: SpamAssassin :: Plugin :: Pyzor
loadplugin Mail :: SpamAssassin :: Plugin :: Razor2
loadplugin Mail :: SpamAssassin :: Plugin :: RelayEval
loadplugin Mail :: SpamAssassin :: Plugin :: ReplaceTags
loadplugin Mail :: SpamAssassin :: Plugin :: Rule2XSBody
loadplugin Mail :: SpamAssassin :: Plugin :: SPF
loadplugin Mail :: SpamAssassin :: Plugin :: SpamCop
loadplugin Mail :: SpamAssassin :: Plugin :: URIDNSBL
loadplugin Mail :: SpamAssassin :: Plugin :: URIDetail
loadplugin Mail :: SpamAssassin :: Plugin :: URIEval
loadplugin Mail :: SpamAssassin :: Plugin :: VBounce
loadplugin Mail :: SpamAssassin :: Plugin :: WLBLEval
loadplugin Mail :: SpamAssassin :: Plugin :: WhiteListSubject
report_safe 0
rewrite_header Subject ***** SPAM *****
use_bayes 1

Source: https://habr.com/ru/post/56779/


All Articles