LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 06-22-2010, 04:19 AM   #1
XXLRay
Member
 
Registered: May 2010
Posts: 126

Rep: Reputation: 16
spamassassin: sa-learn --sync -> "Argument "M-HM-JM-J" isn't numeric"


sa-learn throws an error when I try to synch with the database:
Code:
# sa-learn --sync
Argument "M-HM-JM-J" isn't numeric in umask at /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin/Locker/UnixNFSSafe.pm line 75.
bayes: synced databases from journal in 1 seconds: 2745 unique entries (3407 total entries)
There is a hint that there might be something wrong with the database permissions (http://old.nabble.com/-Bug-5771---Ne...d14678924.html).

I tried to change the file mode:
Code:
# chmod 0775 /var/spool/amavis/.spamassassin/bayes_journal
# chmod 0775 /var/spool/amavis/.spamassassin/bayes_toks
But this changed nothing. Any idea what I can do to fix this problem?

System-Information:
Code:
# cat /etc/issue.net
Red Hat Enterprise Linux AS release 4 (Nahant Update 8)

# uname -r
2.6.9-89.0.11.ELsmp

# spamassassin -V
SpamAssassin version 3.2.4
running on Perl version 5.8.5
 
Old 06-22-2010, 04:51 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Hi,

According to the link you've posted, you don't need to change file permissions. You have to edit local.cf (usually located at /etc/mail/spamassassin/local.cf) and use:
Code:
bayes_file_mode 0755
Regards
 
1 members found this post helpful.
Old 06-22-2010, 06:59 AM   #3
XXLRay
Member
 
Registered: May 2010
Posts: 126

Original Poster
Rep: Reputation: 16
Thank you for this hint.

I changed the settings in my local.cf:
Code:
...
bayes_path /var/spool/amavis/.spamassassin/bayes
bayes_file_mode 0775
...
My local permissions are:
Code:
#ls -l ~vscan/.spamassassin/bayes*
-rwxrw-r--  1 vscan vscan     86208 Jun 22 12:52 /var/spool/amavis/.spamassassin/bayes_journal
-rwxrwxr-x  1 vscan vscan 335368192 Jun 22 12:42 /var/spool/amavis/.spamassassin/bayes_seen
-rwx------  1 vscan vscan   5423104 Jun 22 12:42 /var/spool/amavis/.spamassassin/bayes_toks
-rwxrwxr-x  1 vscan vscan   3223552 Jun 28  2007 /var/spool/amavis/.spamassassin/bayes_toks.expire18391
-rwxrwxr-x  1 vscan vscan   2330624 Apr 15  2008 /var/spool/amavis/.spamassassin/bayes_toks.expire24608
-rwxr--r--  1 vscan vscan   2985984 Mar 11 17:46 /var/spool/amavis/.spamassassin/bayes_toks.expire5867
I restarted amavisd-new (which uses spamassassin) but the output for sa-learn --sync is still the same.

Any more ideas?
 
Old 06-22-2010, 07:29 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Comparing the same 3 files ( bayes_journal, bayes_seen, bayes_toks) in my server, their attributes are 660 (rw-rw----)
So I guess the problem could be with bayes_toks that is not group writable.
 
1 members found this post helpful.
Old 06-22-2010, 08:23 AM   #5
XXLRay
Member
 
Registered: May 2010
Posts: 126

Original Poster
Rep: Reputation: 16
Thank you. This was very helpful to eliminate a possible error. I changed the permissions of my files:
Code:
# ls -l ~vscan/.spamassassin/bayes*
-rw-rw-r--  1 vscan vscan     62832 Jun 22 14:19 /var/spool/amavis/.spamassassin/bayes_journal
-rwxrwxr-x  1 vscan vscan 335368192 Jun 22 14:14 /var/spool/amavis/.spamassassin/bayes_seen
-rwxrwx---  1 vscan vscan   5423104 Jun 22 14:14 /var/spool/amavis/.spamassassin/bayes_toks
-rwxrwxr-x  1 vscan vscan   3223552 Jun 28  2007 /var/spool/amavis/.spamassassin/bayes_toks.expire18391
-rwxrwxr-x  1 vscan vscan   2330624 Apr 15  2008 /var/spool/amavis/.spamassassin/bayes_toks.expire24608
-rwxr--r--  1 vscan vscan   2985984 Mar 11 17:46 /var/spool/amavis/.spamassassin/bayes_toks.expire5867
Afterwards I restarted Amavis with "/etc/init.d/amavisd restart" but the error message on "sa-learn --sync" is still the same

edit: Maybe the problem is that I have no bayes_journal. My standard salearn call is "sa-learn -p ~vscan/.spamassassin/user_prefs --dbpath ~vscan/.spamassassin --showdots --spam --dir /spamdirectory" which I ought to imply is syncing by default (as the --no-sync switch is not set). I think as follows there is no journal created. Maybe I should have mentioned this earlier.

update: I started sa-learn with the no-sync option. The journal was created but sa-learn --sync still refuses to offer proper output.

Last edited by XXLRay; 06-22-2010 at 08:50 AM. Reason: Updated information on no-sync
 
Old 06-22-2010, 09:08 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
The journal is created during SA normal operation and stays there until bayes db is updated by sa-learn.

Regarding the problem:
Did sa-learn worked previously? Because since you're running RHEL it could be a SELinux problem.
Another thing is to check ~vscan/.spamassassin/user_prefs for a different bayes_file_mode setting.
Also try to run sa-learn adding the -u vscan option
 
Old 06-22-2010, 09:44 AM   #7
XXLRay
Member
 
Registered: May 2010
Posts: 126

Original Poster
Rep: Reputation: 16
Thank you for your remarks

I suppose sa-learn worked previously as "sa-learn --dump" offers a lot of input and the bayesian filter gives scores to mails.

~vscan/.spamassassin/user_prefs has no bayes_file_mode setting (it is almost empty).

The -u vscan option did not do any improvement.

The whole thing seems to be very mysterious for me.
 
Old 06-22-2010, 10:15 AM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
I'm also baffled
The fact is that actually sa-learn syncing works:
Quote:
bayes: synced databases from journal in 1 seconds: 2745 unique entries (3407 total entries)
but the perl module compains about the file permissions.
Could be that you have to upgrade perl. Also if possible I suggest you to upgrada SA too

Regards
 
1 members found this post helpful.
Old 06-22-2010, 11:10 AM   #9
XXLRay
Member
 
Registered: May 2010
Posts: 126

Original Poster
Rep: Reputation: 16
Yes, a colleague of mine upgraded perl (I think because of a new amavis version). This might possibly be the problem. Unfortunately RHEL4 does not offer a newer Version of spamassassin and we don't want too many modules being installed separate from the package management. Thus I will have to leave it as it is.
 
  


Reply

Tags
spamassassin


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Error for wireless request "Set Mode" (8B06) : invalid argument "roaming" penguin chick Linux - Wireless Networking 5 08-22-2008 02:16 PM
RAID 5 with mdadm "spare" and "active sync" confusion ufmale Linux - Server 1 12-08-2007 11:31 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM
"cp -p" fails with "cp: setting permissions for `/home/svbld/t': Invalid argument" mkhesin Red Hat 1 02-28-2007 01:57 AM


All times are GMT -5. The time now is 10:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration