Can't locate Mail/SPF/Query.pm in @INC

HappymanUK

Well-Known Member
May 3, 2003
255
1
168
I have just been looking at /var/log/maillog and keep noticing the following error:

Does anyone know what is likely to be causing this problem ?

Sep 21 22:28:42 server spamd[15944]: Can't locate Mail/SPF/Query.pm in @INC (@INC contains: ../lib /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3 /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl) at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Plugin/SPF.pm line 272, <GEN72> line 42.

Sep 21 22:32:09 server spamd[11842]: spamd: still running as root: user not specified with -u, not found, or set to root, falling back to nobody at /usr/bin/spamd line 1150, <GEN278> line 4.
Sep 21 22:32:09 server spamd[11842]: spamd: processing message <[email protected]> for root:99
Sep 21 22:32:09 server spamd[11842]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin.pm line 1467
Sep 21 22:32:09 server spamd[11842]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.XXXXX.com.11842 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Sep 21 22:32:09 server spamd[11842]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.XXXXX.com.11842 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Sep 21 22:32:09 server spamd[11842]: Can't call method "finish" on an undefined value at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Plugin/AWL.pm line 397, <GEN278> line 30.


Thanks in advance for your help,

Daniel
 
Last edited:

justinosx

Member
Jun 19, 2004
5
0
151
Is The Mail::SPF::Query Perl Module installed

Make sure you've installed the Mail::SPF::Query. As root,
run cpan
> cpan
and make sure the module is installed
> install Mail::SPF::Query
if it's not installed, it should try and install it, otherwise it will tell you it's up to date.
 

HappymanUK

Well-Known Member
May 3, 2003
255
1
168
BianchiDude said:
Do you have your mail server check for SPF? How did you set that up?
I haven't set it up - It should just be the default cpanel installation ??

Thanks
Daniel
 

HappymanUK

Well-Known Member
May 3, 2003
255
1
168
BianchiDude said:
Do you have your mail server check for SPF? How did you set that up?
Any idea how this would have been installed, as I haven't manually installed this feature ?

Thanks
Daniel
 

HappymanUK

Well-Known Member
May 3, 2003
255
1
168
justinosx said:
Make sure you've installed the Mail::SPF::Query. As root,
run cpan
> cpan
and make sure the module is installed
> install Mail::SPF::Query
if it's not installed, it should try and install it, otherwise it will tell you it's up to date.
Thanks - I have tried that, and it did install a few different components.

The following errors are now showing in /var/log/maillog is the following:

Sep 22 18:38:48 server spamd[12674]: prefork: child states: BI
Sep 22 18:38:48 server spamd[12674]: spamd: handled cleanup of child pid 21073 due to SIGCHLD
Sep 22 18:38:48 server spamd[12674]: prefork: select returned error on server filehandle:
Sep 22 18:38:48 server spamd[12674]: spamd: server successfully spawned child process, pid 32628
Sep 22 18:38:48 server spamd[12674]: prefork: child states: II

Sep 22 18:42:40 server spamd[25295]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin.pm line 1467
Sep 22 18:42:40 server spamd[25295]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.rhdns.com.25295 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Sep 22 18:42:40 server spamd[25295]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.rhdns.com.25295 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Sep 22 18:42:40 server spamd[25295]: Can't call method "finish" on an undefined value at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Plugin/AWL.pm line 397, <GEN94> line 30.

Any idea what has happened ?

Thanks in advance for your help,

Daniel
 
Last edited:

gupi

Well-Known Member
Apr 27, 2004
125
0
166
I have very similar erors and I am fighting to get a solution.

First of all, why spamd is launched as root ?
Sep 21 22:32:09 server spamd[11842]: spamd: still running as root: user not specified with -u, not found, or set to root, falling back to nobody at /usr/bin/spamd line 1150, <GEN278> line 4.
Sep 21 22:32:09 server spamd[11842]: spamd: processing message <[email protected]> for root:99
Sep 21 22:32:09 server spamd[11842]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin.pm line 1467
Sep 21 22:32:09 server spamd[11842]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.XXXXX.com.11842 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Sep 21 22:32:09 server spamd[11842]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.XXXXX.com.11842 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Sep 21 22:32:09 server spamd[11842]: Can't call method "finish" on an undefined value at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Plugin/AWL.pm line 397, <GEN278> line 30.
Where can I configure the user which will be running spamd ?

Thanks.
 

HappymanUK

Well-Known Member
May 3, 2003
255
1
168
Still having the same problem here, but unfortunately no nearer to resolving it :(

Anyone have anymore ideas ?

Thanks
Daniel
 

rvskin

Well-Known Member
PartnerNOC
Feb 19, 2003
399
1
168
Latest SpamAssassin (v3.10) query the SPF information by default. But some servers that may not have properly SPF installed. To fix this run

perl /scripts/perlinstaller --force Mail::SPF::Query
 

rvskin

Well-Known Member
PartnerNOC
Feb 19, 2003
399
1
168
Sep 21 22:32:09 server spamd[11842]: spamd: still running as root: user not specified with -u, not found, or set to root, falling back to nobody at /usr/bin/spamd line 1150, <GEN278> line 4.
Sep 21 22:32:09 server spamd[11842]: spamd: processing message <[email protected]> for root:99
Sep 21 22:32:09 server spamd[11842]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin.pm line 1467
Sep 21 22:32:09 server spamd[11842]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.XXXXX.com.11842 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Sep 21 22:32:09 server spamd[11842]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.XXXXX.com.11842 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Sep 21 22:32:09 server spamd[11842]: Can't call method "finish" on an undefined value at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Plugin/AWL.pm line 397, <GEN278> line 30.
This error could be ignore. cpsrvd check spamd periodically to ensure it is up. cpsrvd run by root and cause this problem.
 

forlinuxsupport

Well-Known Member
PartnerNOC
Dec 22, 2004
386
0
166
cPanel Access Level
Root Administrator
Hi

thanks for help :) :)

I have installed that perl module via the WHM , and also via cpan... but still get the error inthe logs.

I have tried your method and will see if it works, so far no errors, so looks like it might have worked.

Is there a way to turn SPF off ? is it worth while having it on ?

Thanks again
Andy
 

HappymanUK

Well-Known Member
May 3, 2003
255
1
168
forlinuxsupport said:
hey

did you find the solution ??

I now have the same problem on my server :(

cheers
Andy
No, didn't find a solution, but I have just tried the solution mentioned today, and so far it seems OK - I will see how it goes.

Thanks
Daniel
 

HappymanUK

Well-Known Member
May 3, 2003
255
1
168
Errors are coming up for me :(

============================================================

Nov 1 19:08:23 server imapd[10720]: Logout user=??? domain=??? host=localhost [127.0.0.1]
Nov 1 19:08:23 server cpanelpop[10728]: Connection from host=127.0.0.1 to ip=127.0.0.1
Nov 1 19:08:23 server cpanelpop[10728]: Session Closed host=127.0.0.1 ip= user=root realuser= totalxfer=55
Nov 1 19:08:23 server spamd[5126]: spamd: connection from localhost [127.0.0.1] at port 55592
Nov 1 19:08:23 server spamd[5126]: spamd: setuid to root succeeded
Nov 1 19:08:23 server spamd[5126]: spamd: still running as root: user not specified with -u, not found, or set to root, falling back to nobody at /usr/bin/spamd line 1150, <GEN774> line 4.
Nov 1 19:08:23 server spamd[5126]: spamd: processing message <[email protected]> for root:99
Nov 1 19:08:23 server spamd[5126]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin.pm line 1467
Nov 1 19:08:23 server spamd[5126]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.MYDOMAIN.com.5126 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Nov 1 19:08:23 server spamd[5126]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.server.rhdns.com.5126 for /root/.spamassassin/auto-whitelist.lock: Permission denied
Nov 1 19:08:23 server spamd[5126]: Can't call method "finish" on an undefined value at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Plugin/AWL.pm line 397, <GEN774> line 30.
Nov 1 19:08:23 server spamd[5126]: spamd: identified spam (1000.0/5.0) for root:99 in 0.1 seconds, 834 bytes.
Nov 1 19:08:23 server spamd[5126]: spamd: result: Y 999 - GTUBE,NO_RECEIVED,NO_RELAYS scantime=0.1,size=834,user=root,uid=99,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=55592,mid=<[email protected]>,autolearn=no

============================================================

Any ideas ???

Thanks in advance,

Daniel
 

HappymanUK

Well-Known Member
May 3, 2003
255
1
168
forlinuxsupport said:
If you read on post above, he says dont worry about those errors

Im still getting them, but email is working fine.
OK Thanks, but is there anyway to stop these errors, as they never used to be displayed ??

Thanks
Daniel
 

JColvard

Member
May 15, 2005
14
0
151
errors... but their ok? alternatives to spamd?

as far as i can tell, the clamv/spamd is nothing but a big error.

:rolleyes: lets see, not supposed to run as root, yet by defualt, runs as root? yo, wtf? are we looking at a faulty install script? As far as i can tell, spamd is losing my emails.

personally, my dislike/distrust for both clamav and spamd started with the discovery of the SORBS list. the whole picture looks dirty now.

what are alternatives to spamassasin that wont require a huge time investment to install/wont be erased by updates? i'd really rather not support SORBS/ISUX or anything related to these developers/projects.

I understand that free is free, so the price is right.

after writing this bitch, i had an idea which may resolve the issue(s) i'm experiencing. if it works, i'll post it.

mean time, what are the alternatives? the basic dislike of the developers tactics wont allow me to use the product with a clear conscience. (after all, they aint M$)


thanks in advance; j
 

JColvard

Member
May 15, 2005
14
0
151
digging deeper...

:mad: apparently, spamd thinks its not installed... it is in WHM, checked, looks good. update scripts fail, says not installed. this is an install/upgrade issue caused by spamd itself. how to get the script to actaully install? also, why is it running as root?