When I cron the script in order to make spamassassin to learn the spam I
get the errors:

bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/O: tie
failed:
bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/W: tie
failed: Inappropriate ioctl for device
Learned tokens from 0 message(s) (0 message(s) examined)
bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/O: tie
failed:
bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/W: tie
failed: Inappropriate ioctl for device
Learned tokens from 0 message(s) (0 message(s) examined)
bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/O: tie
failed:
bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/W: tie
failed: Inappropriate ioctl for device
Learned tokens from 0 message(s) (0 message(s) examined)
bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/O: tie
failed:
bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/W: tie
failed: Inappropriate ioctl for device
Learned tokens from 0 message(s) (0 message(s) examined)
bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/O: tie
failed:
bayes: cannot open bayes databases /root/.spamassassin/bayes_* R/W: tie
failed: Inappropriate ioctl for device

I run the script as root? Is that correct?
The script that I am running is:

#!/bin/bash
 # Spam Assassin Bayes Training
 # Learn spam!
 cd /home/vpopmail/domains/wavin.ro/spam/Maildir/cur
 /usr/bin/sa-learn --spam ./*
 rm -rf /home/vpopmail/domains/wavin.ro/spam/Maildir/cur/*
 cd /home/vpopmail/domains/wavin.ro/spam/Maildir/new
 /usr/bin/sa-learn --spam ./*
 rm -rf /home/vpopmail/domains/wavin.ro/spam/Maildir/new/*
 # Learn ham!
 cd /home/vpopmail/domains/wavin.ro/notspam/Maildir/cur
 /usr/bin/sa-learn --ham ./*
 rm -rf /home/vpopmail/domains/wavin.ro/notspam/Maildir/cur/*
 cd /home/vpopmail/domains/wavin.ro/notspam/Maildir/new
 /usr/bin/sa-learn --ham ./*
 rm -rf /home/vpopmail/domains/wavin.ro/notspam/Maildir/new/*
 # Update the Bayes DB
 /usr/bin/sa-learn --sync

What is wrong?

Thanks,
Razvan


---------------------------------------------------------------------
     QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to