Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th March 2009, 20:29
klausengelmann klausengelmann is offline
Junior Member
 
Join Date: Mar 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to klausengelmann Send a message via Skype™ to klausengelmann
Default Mailscanner SA Bayes Permissions

Hello everybody !!!

After a complete installation of Postfix + Mailscanner + SA + Mailwatch according to some Howtoforge Tutorials I run into this error:

A Learn: error code 13 returned from sa-learn: bayes: cannot open bayes databases /var/spool/MailScanner/spamassassin/bayes_* R/O: tie failed: Permission denied bayes: cannot open bayes databases /var/spool/MailScanner/spamassassin/bayes_* R/W: tie failed: Permission denied bayes: cannot open bayes databases /var/spool/MailScanner/spamassassin/bayes_* R/W: tie failed: Permission denied bayes: cannot open bayes databases /var/spool/MailScanner/spamassassin/bayes_* R/W: tie failed: Permission denied ERROR: the Bayes learn function returned an error, please re-run with -D for more information Learned tokens from 0 message(s) (1 message(s) examined)
Delete: deleted file /var/spool/MailScanner/quarantine/20090319/spam/9C5428630220.2DC3A

My filesystem permissions regarding this problem are:

[root@prometeu spamassassin]# pwd
/var/spool/MailScanner/spamassassin
[root@prometeu spamassassin]# ls -lah
total 10M
drwxrwsr-x 2 postfix apache 4.0K Mar 19 16:25 .
drwxr-xr-x 5 postfix postfix 4.0K Dec 1 16:11 ..
-rw------- 1 postfix postfix 2.5M Mar 19 16:25 auto-whitelist
-rw------- 1 postfix apache 29K Mar 19 16:25 bayes_journal
-rw-rw---- 1 apache apache 30 Mar 19 16:23 bayes.mutex
-rw-rw---- 1 postfix apache 5.0M Mar 19 16:25 bayes_seen
-rw------- 1 postfix apache 5.0M Mar 19 16:25 bayes_toks
[root@prometeu spamassassin]#

The worst thing is that if I change the permissions according to what it is recommended here (g+rw) after some the permissions change again.

I also tried to edit /etc/MailScanner/spam.assassin.prefs.conf without success.

Anyone knows how to solve this issue ?

I like to train my SA using Bayes.

Thanks,

Klaus
Reply With Quote
Sponsored Links
  #2  
Old 20th March 2009, 13:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by klausengelmann View Post
A Learn: error code 13 returned from sa-learn: bayes: cannot open bayes databases /var/spool/MailScanner/spamassassin/bayes_* R/O: tie failed: Permission denied bayes: cannot open bayes databases /var/spool/MailScanner/spamassassin/bayes_* R/W: tie failed: Permission denied bayes: cannot open bayes databases /var/spool/MailScanner/spamassassin/bayes_* R/W: tie failed: Permission denied bayes: cannot open bayes databases /var/spool/MailScanner/spamassassin/bayes_* R/W: tie failed: Permission denied ERROR: the Bayes learn function returned an error, please re-run with -D for more information Learned tokens from 0 message(s) (1 message(s) examined)
Delete: deleted file /var/spool/MailScanner/quarantine/20090319/spam/9C5428630220.2DC3A
What user is getting this error (i.e., what user is trying to access /var/spool/MailScanner/spamassassin/bayes_*)?

Is this the Spamsnake tutorial you're using?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 21st March 2009, 02:12
klausengelmann klausengelmann is offline
Junior Member
 
Join Date: Mar 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to klausengelmann Send a message via Skype™ to klausengelmann
Default

Thanks for your reply falko !!!

The tutorial I was using was:

Virtual Users And Domains With Postfix, MailScanner, Mailwatch & MySQL On CentOS 5.1

I also took a look a the Perfect SpamSnake but I am still having the same problem. Using mailwatch there is an error pointing to bayes_* files in /var/spool/Mailscanner/spamassassin directories.

Any thoughts about the issue ?

Klaus Engelmann
UFCSPA - Brazil
Reply With Quote
  #4  
Old 21st March 2009, 21:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Did you disable SELinux?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 21st March 2009, 22:18
klausengelmann klausengelmann is offline
Junior Member
 
Join Date: Mar 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to klausengelmann Send a message via Skype™ to klausengelmann
Default

Yes, indeed SElinux is disabled.

By the way, I tried this on /etc/MailScanner/MailScanner.conf

Run As User = postfix
Run As Group = postfix

Incoming Work User =
Incoming Work Group = clamav

Quarantine User = root
Quarantine Group = apache

SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin

Quarantine Permissions = 0660
Incoming Work Permissions = 0640

Rebuild Bayes Every = 0
Wait During Bayes Rebuild = no

And this is what I done on /etc/MailScanner/spam.assassin.prefs.conf:

bayes_path /var/spool/MailScanner/spamassassin/bayes
bayes_file_mode 0660
# bayes_auto_learn 0
#bayes_auto_expire 0

The error still continues. Because I am running out of resources I am ready to investigate the VMWARE image available.

Any other suggestions ?

Klaus Engelmann
Reply With Quote
  #6  
Old 22nd March 2009, 15:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What happens when you use
Code:
bayes_path /var/spool/MailScanner/spamassassin/bayes
bayes_file_mode 0666
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Tags
bayes, mailscanner, spamassassin

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Verify proper permissions filch General 6 7th February 2009 15:05
suPHP, Joomla! 1.5, file & diretory permissions pjdevries Installation/Configuration 17 19th June 2008 02:58
domain keys with postfix and mailscanner serge005 HOWTO-Related Questions 0 20th April 2008 22:15
Logcheck Permissions Problems Drek Server Operation 1 7th September 2007 15:43
Samba and filesystem permissions Anteaus Server Operation 0 17th July 2007 09:19


All times are GMT +2. The time now is 14:46.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.