[Webinar] Streamline your web hosting managementRegister Today


bayes: not available for scanning

Posted on 2009-04-07
Medium Priority
Last Modified: 2012-05-06
Hello guys,

For a couple of months i've got a mailserver with spamassassin running. All works fine but lately i get more spam. When i do spamassinss -D i see this:
[3305] dbg: bayes: tie-ing to DB file R/O /var/amavis/.spamassassin/bayes_toks
[3305] dbg: bayes: tie-ing to DB file R/O /var/amavis/.spamassassin/bayes_seen
[3305] dbg: bayes: found bayes db version 3
[3305] dbg: bayes: DB journal sync: last sync: 0
[3305] dbg: bayes: not available for scanning, only 0 spam(s) in bayes DB < 50
[3305] dbg: bayes: untie-ing

I know the number off spam message must be greater then 50 to get bayes to work but the number of spams stays on 0. What can be the problem?

Hope you can help me out.
Question by:Netaffairs
  • 8
  • 7
LVL 16

Expert Comment

ID: 24136434
are there other filters running? or can just be that emails get downloaded and deleted from the server by users before the bayesian filter can start running?

Author Comment

ID: 24136516
After the email is scanned with SA the mail is scanned with amavisd. This is all automatic and users can't interupt this process.
LVL 16

Expert Comment

ID: 24136553
but what if the critical quota of 50 can't be reached because the mailbox keeps getting empty?
Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!


Author Comment

ID: 24136791
The scanning is done before the message gets to the mailbox. The system recieves the mail, SA (with bayes) and amavis scans the messages and if the message is no spam the message is dropped in the mailbox.
LVL 16

Expert Comment

ID: 24138952
then, it's spamassassin which is not blocking the spam emails; otherwise they would be dropped into the database and analyzed

Author Comment

ID: 24138985
OK. What can i do to fix the problem?
LVL 16

Expert Comment

ID: 24148698
With the information I've got, I can't tell. Post configuration files

Author Comment

ID: 24155578
Hi ai ja nai:

This is the top of my local.cf:
use_auto_whitelist 0
use_bayes 1
use_razor2 1
bayes_auto_learn 1
bayes_auto_learn_threshold_spam 8
bayes_min_spam_num 100
bayes_path  /var/amavis/.spamassassin/bayes

Do you need more conf files?

Thanks for the help.
LVL 16

Expert Comment

ID: 24155665
I need the spamassassin conf file

Author Comment

ID: 24155732
This is the spamassassin conf file(local.cf):
use_auto_whitelist 0
use_bayes 1
use_razor2 1
bayes_auto_learn 1
bayes_auto_learn_threshold_spam 8
bayes_min_spam_num 100
bayes_path  /var/amavis/.spamassassin/bayes

#loadplugin Mail::SpamAssassin::Plugin::ocrtext /etc/mail/spamassassin/ocrtext.pm

#header RCVD_IN_SOBER            eval:check_rbl('sober', 'sober.bl.spamtraps.org.')
#describe RCVD_IN_SOBER          SOBER: sender is listed in SOBER.BL.SPAMTRAPS.ORG
#tflags RCVD_IN_SOBER            net
#score RCVD_IN_SOBER            2.0

# Quick ruleset to block the german (Sober) spamflood (C) Prolocation
# V0.2

# 01 Subject: Gegen das Vergessen
# 02 Subject: Verbrechen der deutschen Frau
# 03 Subject: Dresden Bombing Is To Be Regretted Enormously
# 04 Subject: Graeberschaendung auf bundesdeutsche Anordnung
# 05 Subject: Deutsche Buerger trauen sich nicht ...
# 06 Subject: S.O.S. Kiez! Polizei schlaegt Alarm
# 07 Subject: Schily ueber Deutschland
# 08 Subject: Massenhafter Steuerbetrug durch auslaendische Arbeitnehmer
# 09 Subject: The Whore Lived Like a German
# 10 Subject: Transparenz ist das Mindeste
# 11 Subject: Volk wird nur zum zahlen gebraucht!
# 12 Subject: Trotz Stellenabbau
# 13 Subject: Augen auf
# 14 Subject: Armenian Genocide Plagues Ankara 90 Years On
# 15 Subject: Du wirst ausspioniert ....!
# 16 Subject: Dresden 1945
# 17 Subject: Blutige Selbstjustiz
# 18 Subject: Turkish Tabloid Enrages Germany with Nazi Comparisons
# 19 Subject: Multi-Kulturell = Multi-Kriminell
# 20 Subject: 60 Jahre Befreiung: Wer feiert mit?
# 21 Subject: Vorbildliche Aktion
# 22 Subject: Auf Streife durch den Berliner Wedding
# 23 Subject: Tuerkei in die EU
# 24 Subject: Paranoider Deutschenmoerder kommt in Psychiatrie
# 25 Subject: Hier sind wir Lehrer die einzigen Auslaender
# 26 Subject: 4,8 Mill. Osteuropaeer durch Fischer-Volmer Erlass
# 27 Subject: Du wirst zum Sklaven gemacht!!!
# 28 Subject: Deutsche werden kuenftig beim Arzt abgezockt
# 29 Subject: Auslaenderpolitik
# 30 Subject: Auslaender bevorzugt

header PROLO_GSPAM01 Subject =~ /Gegen das Vergessen/i
header PROLO_GSPAM02 Subject =~ /Verbrechen der deutschen Frau/i
header PROLO_GSPAM03 Subject =~ /Dresden Bombing Is To Be Regretted Enormously/i
header PROLO_GSPAM04 Subject =~ /Graeberschaendung auf bundesdeutsche Anordnung/i
header PROLO_GSPAM05 Subject =~ /Deutsche Buerger trauen sich nicht \.\.\./i
header PROLO_GSPAM06 Subject =~ /S\.O\.S. Kiez\! Polizei schlaegt Alarm/i
header PROLO_GSPAM07 Subject =~ /Schily ueber Deutschland/i
header PROLO_GSPAM08 Subject =~ /Massenhafter Steuerbetrug durch auslaendische Arbeitnehmer/i
header PROLO_GSPAM09 Subject =~ /The Whore Lived Like a German/i
header PROLO_GSPAM10 Subject =~ /Transparenz ist das Mindeste/i
header PROLO_GSPAM11 Subject =~ /Volk wird nur zum zahlen gebraucht!/i
header PROLO_GSPAM12 Subject =~ /Trotz Stellenabbau/i
header PROLO_GSPAM13 Subject =~ /Augen auf/i
header PROLO_GSPAM14 Subject =~ /Armenian Genocide Plagues Ankara 90 Years On/i
header PROLO_GSPAM15 Subject =~ /Du wirst ausspioniert \.\.\.\.\!/i
header PROLO_GSPAM16 Subject =~ /Dresden 1945/i
header PROLO_GSPAM17 Subject =~ /Blutige Selbstjustiz/i
header PROLO_GSPAM18 Subject =~ /Turkish Tabloid Enrages Germany with Nazi Comparisons/i
header PROLO_GSPAM19 Subject =~ /Multi-Kulturell \= Multi-Kriminell/i
header PROLO_GSPAM20 Subject =~ /60 Jahre Befreiung: Wer feiert mit?/i
header PROLO_GSPAM21 Subject =~ /Vorbildliche Aktion/i
header PROLO_GSPAM22 Subject =~ /Auf Streife durch den Berliner Wedding/i
header PROLO_GSPAM23 Subject =~ /Tuerkei in die EU/i
header PROLO_GSPAM24 Subject =~ /Paranoider Deutschenmoerder kommt in Psychiatrie/i
header PROLO_GSPAM25 Subject =~ /Hier sind wir Lehrer die einzigen Auslaender/i
header PROLO_GSPAM26 Subject =~ /4\,8 Mill\. Osteuropaeer durch Fischer-Volmer Erlass/i
header PROLO_GSPAM27 Subject =~ /Du wirst zum Sklaven gemacht\!\!\!/i
header PROLO_GSPAM28 Subject =~ /Deutsche werden kuenftig beim Arzt abgezockt/i
header PROLO_GSPAM29 Subject =~ /Auslaenderpolitik/i
header PROLO_GSPAM30 Subject =~ /Auslaender bevorzugt/i

header PROLO_GSPAM31 Subject =~ /Nieuwsbrief Sanitair betreffende displaymogelijkheden Damixa./i

score PROLO_GSPAM01 8
score PROLO_GSPAM02 8
score PROLO_GSPAM03 8
score PROLO_GSPAM04 8
score PROLO_GSPAM05 8
score PROLO_GSPAM06 8
score PROLO_GSPAM07 8
score PROLO_GSPAM08 8
score PROLO_GSPAM09 8
score PROLO_GSPAM10 8
score PROLO_GSPAM11 8
score PROLO_GSPAM12 8
score PROLO_GSPAM13 8
score PROLO_GSPAM14 8
score PROLO_GSPAM15 8
score PROLO_GSPAM16 8
score PROLO_GSPAM17 8
score PROLO_GSPAM18 8
score PROLO_GSPAM19 8
score PROLO_GSPAM20 8
score PROLO_GSPAM21 8
score PROLO_GSPAM22 8
score PROLO_GSPAM23 8
score PROLO_GSPAM24 8
score PROLO_GSPAM25 8
score PROLO_GSPAM26 8
score PROLO_GSPAM27 8
score PROLO_GSPAM28 8
score PROLO_GSPAM29 8
score PROLO_GSPAM30 8
score PROLO_GSPAM31 8
describe PROLO_GSPAM30 Imbos mailing block

rawbody _GEOCITIES1 /how to make yourself and your woman happy\!/
score _GEOCITIES1 0.1
rawbody _GEOCITIES2 /http\:\/\/uk\.geocities\.com/
score _GEOCITIES2 0.1


rawbody _SPAMTEST1 /Dit is een Intermax test SPAM mail/
score _SPAMTEST1 8

rawbody _KILLDOG1 /I am ready to kill myself and eat my dog/
score _KILLDOG1 10

rawbody _MEATCHICK1 /I\'ve meat cool chick yesterday/
score _MEATCHICK1 10

# Viagra type spammails (1)
rawbody _VIAGRA1 /gra \$3\.41/
score _VIAGRA1 0.1
rawbody _VIAGRA2 /\$3\.72/
score _VIAGRA2 0.1

score _VIAGRA 8

# Viagra type spammails (2)
rawbody _VIAGRA3 /Viagra \$3/
score _VIAGRA3 8

# TXHE / Texhoma Energy spam

rawbody _TXHE1 /Texhoma/
score _TXHE1 0.1
rawbody _TXHE2 /TXHE/
score _TXHE2 0.1

meta _TXHE (_TXHE1 && _TXHE2)
score _TXHE 10
LVL 16

Expert Comment

ID: 24155973
Have you got Razor (and its conf file)?

Author Comment

ID: 24156005
Yes here it is:
debuglevel             = 3
identity               = identity
ignorelist             = 0
listfile_catalogue     = servers.catalogue.lst
listfile_discovery     = servers.discovery.lst
listfile_nomination    = servers.nomination.lst
logfile                = razor-agent.log
logic_method           = 4
min_cf                 = ac
razordiscovery         = discovery.spamnet.com
rediscovery_wait       = 172800
report_headers         = 1
turn_off_discovery     = 0
use_engines            = 4,8
whitelist              = razor-whitelist
LVL 16

Expert Comment

ID: 24156024
I can't see in any of those files where the spam is quarantined once it's recognized

Accepted Solution

Netaffairs earned 0 total points
ID: 24156785
Hi found the solution:
I couldn't find bayes_path  /var/amavis/.spamassassin/bayes so i created it and it all works.
LVL 16

Expert Comment

ID: 24163761
Happy to hear it!
Mark your last comment as solution

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome back to our beginners guide of the popular Unix tool, cron. If you missed part one where we introduced this tool, the link is below. We left off learning how to build a simple script to schedule automatic back ups. Now, we’ll learn how to se…
This article explains how to move an Exchange 2013/2016 mailbox database and logs to a different drive.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question