[vchkpw] vpopmail + simscan + spamassassin
Greetings, I hope this is ok to post to this list, I'm not sure where to ask and this seems my best option. I've got qmail + vpopmail + simscan + spamassassin running as installed by Inter7. Everything works great but I'm having a small problem with the spamassassin, Bayes and autolearning. The problem is that spamd won't read the Bayes files for scanning, and then can't write to them for autolearning. I've tracked it down to a permissons problem, I'm just not sure how to resolve it with all the players involved. My Bayes files in /etc/mail/spamassassin are all 0770 and I've set bayes_file_mode in local.cf to 0770, per the SpamAssassin Wiki for SiteWideBayesSetup. After making this change spamd now checks and uses BAYES* rules; I see this in my log files and in email headers. But, I still get nothing but autolearn=failed. I tried setting the /etc/mail/spamassassin/bayes* files to 0777 and still no luck. In desperation just changed the whole /etc/mail/spamassassin directory to 0777. That worked, I immediately started seeing autolearn=spam and autolearn=ham in my log files. So, then, my question is what should I change to safely allow spamd to do it's work? Currently it's being called by simscan setuid=qmaill, but I don't know that I can change that to something else without breaking everything? Any advice or help is appreciated. Please forgive the long message. If this is the wrong place to ask please let me know where I should ask. Thanks, Rob Wright [EMAIL PROTECTED]
Re: [vchkpw] vpopmail + simscan + spamassassin
On Tue, 2007-06-19 at 10:27 -0500, Rob Wright wrote: Greetings, I hope this is ok to post to this list, I'm not sure where to ask and this seems my best option. I've got qmail + vpopmail + simscan + spamassassin running as installed by Inter7. Everything works great but I'm having a small problem with the spamassassin, Bayes and autolearning. The problem is that spamd won't read the Bayes files for scanning, and then can't write to them for autolearning. I've tracked it down to a permissons problem, I'm just not sure how to resolve it with all the players involved. My Bayes files in /etc/mail/spamassassin are all 0770 and I've set bayes_file_mode in local.cf to 0770, per the SpamAssassin Wiki for SiteWideBayesSetup. After making this change spamd now checks and uses BAYES* rules; I see this in my log files and in email headers. But, I still get nothing but autolearn=failed. I tried setting the /etc/mail/spamassassin/bayes* files to 0777 and still no luck. In desperation just changed the whole /etc/mail/spamassassin directory to 0777. That worked, I immediately started seeing autolearn=spam and autolearn=ham in my log files. So, then, my question is what should I change to safely allow spamd to do it's work? Currently it's being called by simscan setuid=qmaill, but I don't know that I can change that to something else without breaking everything? It is likely that the directory and files are owned by the wrong user. For example, my spamd and clamd runs as vpopmail and the group of vchkpw so the permissions on the folder are ls -la /etc/mail/spamassassin/.spamassassin/ total 9368 drwxr-xr-x 2 vpopmail vchkpw 4096 2007-06-19 23:43 . drwxr-xr-x 5 root root 4096 2007-06-11 09:59 .. -rw--- 1 vpopmail vchkpw10128 2007-06-19 23:45 bayes_journal -rw--- 1 vpopmail vchkpw 10162176 2007-06-19 23:43 bayes_seen -rw--- 1 vpopmail vchkpw 2588672 2007-06-19 23:43 bayes_toks Hope that helps. cheers Shane
Re: [vchkpw] vpopmail + simscan + spamassassin
On Tuesday 19 June 2007 10:49, Shane Chrisp wrote: It is likely that the directory and files are owned by the wrong user. For example, my spamd and clamd runs as vpopmail and the group of vchkpw so the permissions on the folder are ls -la /etc/mail/spamassassin/.spamassassin/ total 9368 drwxr-xr-x 2 vpopmail vchkpw 4096 2007-06-19 23:43 . drwxr-xr-x 5 root root 4096 2007-06-11 09:59 .. -rw--- 1 vpopmail vchkpw10128 2007-06-19 23:45 bayes_journal -rw--- 1 vpopmail vchkpw 10162176 2007-06-19 23:43 bayes_seen -rw--- 1 vpopmail vchkpw 2588672 2007-06-19 23:43 bayes_toks Hope that helps. Shane, That did help. Rather than using vpopmail I needed to use the simscan user and that did the trick. Thanks, Rob
Re: [vchkpw] vpopmail 5.4.5 + spamassassin 2.64 sql user prefrences
Nick Bright wrote: and my .qmail-default file contains: | /usr/bin/spamc -U /var/run/spamd.socket | /usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox As far as I can tell, this should tell spamd to get the username from vpopmail and query the information out of the database, creating the prefrences if they don't exist already. When I send a test message I get this error in my maillog: Aug 18 14:09:47 node0 spamd[32368]: SQL Error: select preference, value from user_prefs where username = 'vpopmail' or username = 'GLOBAL' or username = '@GLOBAL' order by username asc Table 'spamassassin.user_prefs' doesn't exist so, it appears to me, that it isn't getting the proper username for some reason. I also tried the same SPAMDOPTIONS without the --username=vpopmail option, and it still came up with a username of vpopmail (since that is the user that calls spamc, I belive). I use: preline /usr/bin/spamc -s 1000 -u [EMAIL PROTECTED] Works like a charm for me. Hope that helps, Nick Harring Webley Systems
Re: [vchkpw] vpopmail 5.4.5 + spamassassin 2.64 sql user prefrences
Well, It looks like I was having a dumbass attack. The table name in my database was wrong, once I fixed that, the error message went away (as it was table doesn't exist. It still appears to be not pulling the username correctly though, and I would like to know how to properly adjust that. It is also not creating the prefrences entry if it doesn't exist, which I belive it should. Again, any assistance is greatly appreciated. On Wed, 2004-08-18 at 14:30, Nick Bright wrote: Greetings, I'm using vpopmail 5.4.5 on WhiteBox EL 3.0, and I'm trying to set up per-user prefrences with spamassassin (spamc called from .qmail). I don't care if it works with SQL or just puts a user_prefs file in each users' Maildir. My spamd is running with the following options: SPAMDOPTIONS=--daemonize --local --nouser-config --sql-config --create-prefs --username=vpopmail --vpopmail --socketpath=/var/run/spamd.socket --max-children=64 and my .qmail-default file contains: | /usr/bin/spamc -U /var/run/spamd.socket | /usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox As far as I can tell, this should tell spamd to get the username from vpopmail and query the information out of the database, creating the prefrences if they don't exist already. When I send a test message I get this error in my maillog: Aug 18 14:09:47 node0 spamd[32368]: SQL Error: select preference, value from user_prefs where username = 'vpopmail' or username = 'GLOBAL' or username = '@GLOBAL' order by username asc Table 'spamassassin.user_prefs' doesn't exist so, it appears to me, that it isn't getting the proper username for some reason. I also tried the same SPAMDOPTIONS without the --username=vpopmail option, and it still came up with a username of vpopmail (since that is the user that calls spamc, I belive). How can I make spamc read the appropriate username and pass it to spamd, or how can I make spamd read this from vpopmail? I have also tried this configuration, which I thought should have created/used a file in the users' Maildir: SPAMDOPTIONS=--daemonize --local --create-prefs --username=vpopmail --vpopmail --socketpath=/var/run/spamd.socket --max-children=64 Again, I tried this one with and without the --username=vpopmail, they both showed it being run as the vpopmail user in the log file. I don't care if it works via a file in the maildir, or via SQL, but I would really like to get user prefrences working, any advice that anyone can give would be very much appreciated. Thanks. -- - Nick Bright Terraworld, Inc http://home.terraworld.net | 888-332-1616
Re: [vchkpw] vpopmail 5.4.5 + spamassassin 2.64 sql user prefrences
On Aug 18, 2004, at 12:30 PM, Nick Bright wrote: and my .qmail-default file contains: | /usr/bin/spamc -U /var/run/spamd.socket | /usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox What if you add -u [EMAIL PROTECTED] to the spamc options? -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
Re: [vchkpw] vpopmail 5.4.5 + spamassassin 2.64 sql user prefrences
On Wed, 2004-08-18 at 14:37, Nicholas Harring wrote: Nick Bright wrote: and my .qmail-default file contains: | /usr/bin/spamc -U /var/run/spamd.socket | /usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox As far as I can tell, this should tell spamd to get the username from vpopmail and query the information out of the database, creating the prefrences if they don't exist already. When I send a test message I get this error in my maillog: Aug 18 14:09:47 node0 spamd[32368]: SQL Error: select preference, value from user_prefs where username = 'vpopmail' or username = 'GLOBAL' or username = '@GLOBAL' order by username asc Table 'spamassassin.user_prefs' doesn't exist so, it appears to me, that it isn't getting the proper username for some reason. I also tried the same SPAMDOPTIONS without the --username=vpopmail option, and it still came up with a username of vpopmail (since that is the user that calls spamc, I belive). I use: preline /usr/bin/spamc -s 1000 -u [EMAIL PROTECTED] Ok, I added your -u [EMAIL PROTECTED] to my spamc line, and I get the following log entries when sending a message: Aug 18 14:35:09 node0 spamd[32486]: processing message [EMAIL PROTECTED] for [EMAIL PROTECTED]:0. Aug 18 14:35:09 node0 spamd[32486]: identified spam (1001.0/5.0) for [EMAIL PROTECTED]:0 in 0.1 seconds, 2678 bytes. So it appears to be getting the address properly (yay!), however, it didn't create a prefs entry in the database. If it's as simple as it doesn't make it automatically, and just uses the default if it's not there is fine, I just don't know and couldn't really tell from the documentation. My table is set up as such: ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | username | varchar(100) | | MUL | || | preference | varchar(30) | | | || | value | varchar(100) | | | || | prefid | int(11) | | PRI | NULL| auto_increment | ++--+--+-+-++ Does that cause a problem? It's the table description I got from the documentation at http://old.spamassassin.org/full/2.6x/dist/sql/README, but I had to remove the word default because it wouldn't create the table with that on there. Maybe that's the problem? Perhaps at this point, I need to take my question to the spamassassin list? Thanks for your time. Works like a charm for me. Hope that helps, Nick Harring Webley Systems -- - Nick Bright Terraworld, Inc http://home.terraworld.net | 888-332-1616
Re: [vchkpw] vpopmail 5.4.5 + spamassassin 2.64 sql user prefrences
On Wednesday 18 August 2004 02:45 pm, Nick Bright wrote: So it appears to be getting the address properly (yay!), however, it didn't create a prefs entry in the database. If it's as simple as it doesn't make it automatically, and just uses the default if it's not there is fine, I just don't know and couldn't really tell from the documentation. yes, that's what it does. -Jeremy -- Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc. [EMAIL PROTECTED] ++ www.inter7.com ++ 866.528.3530 ++ 847.492.0470 int'l kitchen @ #qmail #gentoo on EFnet ++ scriptkitchen.com/qmail
[vchkpw] Vpopmail 5.4.0 + spamassassin
Im trying to achieve this: Vpopmail 5.4.0 with SpamAssassin 2.6.3 with auto-created .spamassassin dirs and the user_prefs file copied over. I have the patch on SpamAssassin 2.6.3 to do the auto creation. I am currently calling spamc from .qmail-default with the line: | spamc -f -u [EMAIL PROTECTED] | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox This does not appear to be auto creating the dirs. Do I have to patch vpopmail to make this happen? And if so .. is : http://sourceforge.net/tracker/index.php?func=detailaid=877367group_id=85937atid=577800 the patch I need.. and if so.. how can I download it since its not available for d/l off of that site. btw.. Vpopmail 5.4.0 and SpamAssassin 2.6.3 are both functioning properly and user's ~/.spamassassin/user_prefs is being used
Re: [vchkpw] Vpopmail 5.4.0 + spamassassin
On Tuesday 30 March 2004 12:39 pm, Phisher1 wrote: Im trying to achieve this: Vpopmail 5.4.0 with SpamAssassin 2.6.3 with auto-created .spamassassin dirs and the user_prefs file copied over. I have the patch on SpamAssassin 2.6.3 to do the auto creation. I am currently calling spamc from .qmail-default with the line: | spamc -f -u [EMAIL PROTECTED] | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox This does not appear to be auto creating the dirs. Do I have to patch vpopmail to make this happen? And if so .. is : http://sourceforge.net/tracker/index.php?func=detailaid=877367group_id=85 937atid=577800 the patch I need.. and if so.. how can I download it since its not available for d/l off of that site. btw.. Vpopmail 5.4.0 and SpamAssassin 2.6.3 are both functioning properly and user's ~/.spamassassin/user_prefs is being used Pull down the cvs version of vpopmail. It has my changes to support all of this. Be sure to use the new option --enable-spamassassin=y Then use the default .qmail-default file. vdelivermail will fork the spamc process with the right variables create the directory. Also be sure to patch spamassassin with the patch up on source forge. This setup works great for us. Hope that helps, Ken Jones inter7.com
Re: [vchkpw] Vpopmail 5.4.0 + spamassassin
Ken Jones wrote: On Tuesday 30 March 2004 12:39 pm, Phisher1 wrote: Im trying to achieve this: Vpopmail 5.4.0 with SpamAssassin 2.6.3 with auto-created .spamassassin dirs and the user_prefs file copied over. I have the patch on SpamAssassin 2.6.3 to do the auto creation. I am currently calling spamc from .qmail-default with the line: | spamc -f -u [EMAIL PROTECTED] | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox This does not appear to be auto creating the dirs. Do I have to patch vpopmail to make this happen? And if so .. is : http://sourceforge.net/tracker/index.php?func=detailaid=877367group_id=85 937atid=577800 the patch I need.. and if so.. how can I download it since its not available for d/l off of that site. btw.. Vpopmail 5.4.0 and SpamAssassin 2.6.3 are both functioning properly and user's ~/.spamassassin/user_prefs is being used Pull down the cvs version of vpopmail. It has my changes to support all of this. Be sure to use the new option --enable-spamassassin=y Then use the default .qmail-default file. vdelivermail will fork the spamc process with the right variables create the directory. Also be sure to patch spamassassin with the patch up on source forge. This setup works great for us. Hope that helps, Ken Jones inter7.com Thanks alot Ken. I got it working great.. One question though, which template file is it copying over for SpamAssassin I thought it was .../Mail-SpamAssassin-2.63/rules/user_prefs.template But that isn't so..
RE: [vchkpw] Vpopmail 5.4.0 + spamassassin
Never mind. /usr/share/spamassassin/user_prefs.template -Original Message- From: Phisher1 [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 3:35 PM To: [EMAIL PROTECTED] Subject: Re: [vchkpw] Vpopmail 5.4.0 + spamassassin Ken Jones wrote: On Tuesday 30 March 2004 12:39 pm, Phisher1 wrote: Im trying to achieve this: Vpopmail 5.4.0 with SpamAssassin 2.6.3 with auto-created .spamassassin dirs and the user_prefs file copied over. I have the patch on SpamAssassin 2.6.3 to do the auto creation. I am currently calling spamc from .qmail-default with the line: | spamc -f -u [EMAIL PROTECTED] | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox This does not appear to be auto creating the dirs. Do I have to patch vpopmail to make this happen? And if so .. is : http://sourceforge.net/tracker/index.php?func=detailaid=877367group_ id=85 937atid=577800 the patch I need.. and if so.. how can I download it since its not available for d/l off of that site. btw.. Vpopmail 5.4.0 and SpamAssassin 2.6.3 are both functioning properly and user's ~/.spamassassin/user_prefs is being used Pull down the cvs version of vpopmail. It has my changes to support all of this. Be sure to use the new option --enable-spamassassin=y Then use the default .qmail-default file. vdelivermail will fork the spamc process with the right variables create the directory. Also be sure to patch spamassassin with the patch up on source forge. This setup works great for us. Hope that helps, Ken Jones inter7.com Thanks alot Ken. I got it working great.. One question though, which template file is it copying over for SpamAssassin I thought it was .../Mail-SpamAssassin-2.63/rules/user_prefs.template But that isn't so..
[vchkpw] vpopmail and spamassassin
Hello, I have a qmail/vpopmail installation that works great. I'm also running spamassassin for the accounts that want it through maildrop. What I'm looking for is a way to use sa-learn with vpopmail to use bayes filtering. I'm looking to have a system where each uer would have their own database for bayes. sa-learn doesn't have a -u function like spamc, so all generated databases are setup for the actual vpopmail user. I imagine it would be possible to setup some script to copy these databases to the user's .spamassassin account, does anyone have any example? I know it's not a vpopmail question, but I figured some users' might have had the experience. Thanks
RE: [vchkpw] vpopmail and spamassassin
I have is setup and running fine. I have the following in my .qmail-default |preline /usr/bin/spamc -f -u [EMAIL PROTECTED] |preline maildrop mailfilter and the mailfilter is like this: VPOP=| /home/vpopmail/bin/vdelivermail '' /home/vpopmail/domains/italy1.com/postmaster VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED] if ( $SIZE 262144 ) { exception { xfilter /usr/bin/spamc -f -u [EMAIL PROTECTED] } } if (/^X-Spam-Flag: *YES/) { # try filtering it using user-defined rules exception { include $VHOME/Maildir/mailfilter } # then try delivering it to a Spam folder exception { # to $VPOP to $VHOME/Maildir/.spam/ } # ah well, I guess they'll just have to live with disappointment exception { to $VPOP } } else { exception { include $VHOME/Maildir/mailfilter } exception { to $VPOP } } good luck, REMO -Original Message- From: Jasper Metselaar [mailto:[EMAIL PROTECTED] Sent: Sunday, March 02, 2003 4:18 AM To: [EMAIL PROTECTED] Subject: [vchkpw] vpopmail and spamassassin Hi, I am trying to get Spamassassin working with Vpopmail, but I am not succeeding so far... Right now I am using version: vpopmail 5.3.12 Spamd (the spamassassin daemon) is running. I tried to do something with Ifspamh (www.gbnet.net/~jrg/qmail/ifspamh/) but this didn't work so far. Does anyone have a good solution to use Spamassasin with vpopmail. Thanks, Jasper
Re: [vchkpw] vpopmail and SpamAssassin
On Sunday, February 2, 2003, at 05:26 AM, Gabriel Ambuehl wrote: Hello, I just finished hacking SpamAssassin support into vdelivermail. Basically, you need to have the spamd Daemon of the spamassassin package running on port 783 (standard port for it) thru which all messages smaller than 300k are filtered which means they get the SpamAssassin score (and nothing else!) added to their headers like: X-SpamAssassin-Score: 8.6/5.0 By default, the filtering is turned off so people who don't want to use it won't note much difference. For the others, if spamd isn't running, all messages will get delivered unchanged. To enable the functionality, pass --enable-spamassassing=y to configure. There's one remaining bug: the size parameter of Maildir++ won't get updated accordingly, I suppose this could be solved by stat()ing the file at the end and then renaming it, thoughts? Anyway, you can get the tarball at http://www.buz.ch/software Gabriel, I have done some testing on this patch. There were a few minor problems that were easily fixed (configure.in typos), but I noticed that there is no FALLBACK support. So when I take down spamd, vdelivermail crashes. I don't have time to add that, but if you can, I'll retest the patch for integration. Also, does this patch allow for user defined preferences? Regards, Bill Shupp