[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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?
Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?


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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Suggested Courses

656 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