Fozzologs

RSS Feeds

About...

These posts are the creation of Doran L. Barton (AKA Fozziliny Moo). To learn more about Doran, check out his website at fozzilinymoo.org.

Right Side

This space reserved for future use.

Solving SpamAssassin ioctl problem

Posted: 12 August 2003 at 15:11:15

Just a note about SpamAssassin.

SpamAssassin error: Inappropriate ioctl for device

I ran into this problem on a Red Hat box after I installed Red Hat 9 on new hard drives after the old hard drives (which had Red Hat 8 installed) died. I had a backup of the SpamAssassin Bayes database and restored it in the same location on the Red Hat 9 system, but everytime I started the SpamAssassin daemon, I got this error:

Aug 11 20:57:06 mail spamd[20318]: Cannot open bayes_path /var/lib/spamassassin/bayes.tokens R/O: Inappropriate ioctl for device

This was confusing to me.

I searched all over the Net for a solution, but found none. Finally, I figured it out on my own. :-)

I executed the file command on the backed-up database files and got this:

Berkeley DB (Hash, version 7, native byte-order)

When I ran the file command on new database files created by SpamAssassin, I got this:

GNU dbm 1.x or ndbm database, little endian

I looked through the SpamAssassin code and discovered that it could use the GDBM_File module and the DB_File module for tie-ing hashes to databases. THe GDBM_File module was installed and the DB_File module was not.

Once I installed the DB_File module, SpamAssassin was able to use the restored databases files just fine.