Cannot write to /qmail/.spamassassin/user_pref

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Cannot write to /qmail/.spamassassin/user_pref

Unread post by breun »

I find this sequence a lot in my maillog. I found other people having similar problems, but no solution yet:
Sep 1 10:22:07 host spamd[3590]: connection from localhost [127.0.0.1] at port
41013
Sep 1 10:22:07 host spamd[3590]: Creating default_prefs [/qmail/.spamassassin/u
ser_prefs]
Sep 1 10:22:07 host spamd[3590]: Cannot write to /qmail/.spamassassin/user_pref
s: No such file or directory
Sep 1 10:22:07 host spamd[3590]: Couldn't create readable default_prefs for [/q
mail/.spamassassin/user_prefs]
Other people usually have /root/.spamassassin/user_pref there though. Of course there is no /qmail/ on my system, but I wonder why spamd would trying to create prefs there.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Yeah thats definitely wrong, I reckon the path has been mucked around with in a not-so-good way. I'll see if I can throw an exception into atomic-psa to catch conditions like that.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

I'm kinda confused now. Is there something I can/should do?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

make sure /etc/sysconfig/spamassassin has -H /var/qmail set in it. Then restart spamd
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

My /etc/sysconfig/spamassassin reads (I never edited it myself):
Options to spamd
SPAMDOPTIONS="-d -u qmailq -c -H /var/qmail"
(vim tells me this file is in dos format?)
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

thats fine, but you can always dos2unix that file if it annoys you
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Ok, but so I had -H /var/qmail set in /etc/sysconfig/spamassassin, but still I get these errors with /qmail. Any idea?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

You'll have to debug that one on your own I reckon, sounds like you have some instance of spamd running that isnt reading the spamassassin file.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

I wouldn't know how to debug this. I just installed your spamassassin art rpm for FC3 and did service spamassassin start and then installed the qmail-scanner art rpm for FC3.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Just installed a fresh FC3 server and I'm seeing the same error. Somehow /qmail is used instead of /var/qmail, while /etc/sysconfig/spamassassin really has (the default) /var/qmail.
spamd[5695]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm line 1467
spamd[5695]: config: cannot write to /qmail/.spamassassin/user_prefs: No such file or directory
spamd[5695]: spamd: failed to create readable default_prefs: /qmail/.spamassassin/user_prefs
brink spamd[5695]: mkdir /qmail: Permission denied at /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm line 1467
spamd[5695]: locker: safe_lock: cannot create tmp lockfile /qmail/.spamassassin/auto-whitelist.lock.<hostname snipped here>.5695 for /qmail/.spamassassin/auto-whitelist.lock: No such file or directory
spamd[5695]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /qmail/.spamassassin/auto-whitelist.lock.<hostname snipped here>.5695 for /qmail/.spamassassin/auto-whitelist.lock: No such file or directory
spamd[5695]: Can't call method "finish" on an undefined value at /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin/Plugin/AWL.pm line 397, <GEN11> line 12.
However, I believe spamassassin is working...
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Yeah thats not a critical error or anything, worst case, if youre not using mysql with SA, awl and bayes wont work. I can't duplicate this on my systems so I suspect its not something specifically core to SA, it might be a mix of psa-spamassassin (which I dont use) causing it.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

I don't have psa-spamassassin on my servers.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

OK that helps a bit, I'll see what I can do
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

I recently built another fresh FC3 server and I get the same errors on that box. Any new ideas?
electronicfur
Forum User
Forum User
Posts: 5
Joined: Thu Jan 12, 2006 11:53 am

Unread post by electronicfur »

FYI I have the same problem on clean FC3 and the ART spamassassin and qmail-scanner packages.

Havent managed to figure it out yet either.

Cheers,
EF.
Post Reply