Skip to content

Well, that explains the spam volume going through the roof.

Apr 5 20:56:16 uriel spamd[10688]: info: setuid to gr succeeded
Apr 5 20:56:16 uriel spamd[10688]: Cannot open bayes databases /home/gr/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format
Apr 5 20:56:16 uriel spamd[10688]: processing message <000001c65914$e56d4780$0100007f@AMY-SGZ3XPNGO4> for gr:1000.
Apr 5 20:56:16 uriel spamd[10688]: Cannot open bayes databases /home/gr/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format
Apr 5 20:56:20 uriel spamd[10688]: identified spam (8.8/4.1) for gr:1000 in 5.0 seconds, 26195 bytes.

Now, granted, that message was still sufficiently obviously bullshit to get dumped, but there's plenty slipping through.

Dammit.

I don't really care what I did, or whether it might be fixable with real effort… lazyweb, is there a single command I can run to make this go away:

uriel:~% sa-learn -D –spam –mbox mail/missed-spam
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting PATH
debug: PATH included '/home/gr/bin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: PATH included '/sbin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/bin', keeping.
debug: PATH included '/usr/pkg/bin', keeping.
debug: PATH included '/usr/local/bin', keeping.
debug: PATH included '/usr/local/sbin', keeping.
debug: PATH included '/usr/pkg/sbin', keeping.
debug: PATH included '/usr/games', keeping.
debug: PATH included '/usr/X11R6/bin', keeping.
debug: Final PATH set to: /home/gr/bin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/pkg/bin:/usr/local/bin:/usr/local/sbin:/usr/pkg/sbin:/usr/games:/usr/X11R6/bin
debug: using “/usr/pkg/share/spamassassin” for default rules dir
debug: using “/usr/pkg/etc/spamassassin” for site rules dir
debug: using “/home/gr/.spamassassin/user_prefs” for user prefs file
debug: bayes: 10860 tie-ing to DB file R/O /home/gr/.spamassassin/bayes_toks
Cannot open bayes databases /home/gr/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format
debug: Score set 0 chosen.
debug: Initialising learner
debug: Initialising learner
debug: Syncing Bayes journal and expiring old tokens…
debug: lock: 10860 created /home/gr/.spamassassin/bayes.lock.uriel.eclipsed.net.10860
debug: lock: 10860 trying to get lock on /home/gr/.spamassassin/bayes with 0 retries
debug: lock: 10860 link to /home/gr/.spamassassin/bayes.lock: link ok
debug: bayes: 10860 tie-ing to DB file R/W /home/gr/.spamassassin/bayes_toks
debug: unlock: 10860 unlink /home/gr/.spamassassin/bayes.lock
Cannot open bayes databases /home/gr/.spamassassin/bayes_* R/W: tie failed: Inappropriate file type or format
debug: lock: 10860 created /home/gr/.spamassassin/bayes.lock.uriel.eclipsed.net.10860
debug: lock: 10860 trying to get lock on /home/gr/.spamassassin/bayes with 0 retries
debug: lock: 10860 link to /home/gr/.spamassassin/bayes.lock: link ok
debug: bayes: 10860 tie-ing to DB file R/W /home/gr/.spamassassin/bayes_toks
debug: unlock: 10860 unlink /home/gr/.spamassassin/bayes.lock
Cannot open bayes databases /home/gr/.spamassassin/bayes_* R/W: tie failed: Inappropriate file type or format
debug: Syncing complete.
debug: Removing Markup
debug: Learning Spam
debug: uri tests: Done uriRE
debug: lock: 10860 created /home/gr/.spamassassin/bayes.lock.uriel.eclipsed.net.10860
debug: lock: 10860 trying to get lock on /home/gr/.spamassassin/bayes with 0 retries
debug: lock: 10860 link to /home/gr/.spamassassin/bayes.lock: link ok
debug: bayes: 10860 tie-ing to DB file R/W /home/gr/.spamassassin/bayes_toks
debug: unlock: 10860 unlink /home/gr/.spamassassin/bayes.lock
Cannot open bayes databases /home/gr/.spamassassin/bayes_* R/W: tie failed: Inappropriate file type or format
Learned from 0 message(s) (1 message(s) examined).
debug: bayes: 10860 untie-ing
debug: bayes: 10860 untie-ing db_toks
ERROR: the Bayes learn function returned an error, please re-run with -D for more information

Or am I just dicked and should rebuild my Bayes DB?

(Note that rebuilding the Bayes DB is not very much effort, really. I have all real email since 1997 and all spam for the past 13 months. So… that's two non-trivial command lines involving loops, and then I go to bed while the aging G3 chugs.)

Update: I R'ed TFM. No, sa-learn –rebuild doesn't fix this, it gets the same locking error. Fuck it, move the files aside, –rebuild, then start feeding it again. If anybody's got a clue, let me know, since I didn't delete the old files yet, but, eh.

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*