Re: bayes_journal
Matt Kettler wrote on Sun, 11 Jan 2009 15:17:12 -0500: My guess is it's used in the initial creation of .spamassassin, if none exists when bayes kicks up. Although one of the devs (theo?) once mentioned temp directories being created... not sure when that would ever happen. Well, but this directive gets usually used for a site-wide Bayes database and you would create the directory in advance. And for user-specific Bayes you would not need/want to have all users have access to the other Bayes directories. Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
Re: bayes_journal
Kai Schaetzl wrote: Matt Kettler wrote on Fri, 09 Jan 2009 07:57:17 -0500: No it's not. The mode is really a mask, and is sometimes used in the creation of directories. well, it has worked all the years for me on those setups that use dbm storage. What directories should be created there? We only have db, index, journal, mutexes, locks and such, no directories. My guess is it's used in the initial creation of .spamassassin, if none exists when bayes kicks up. Although one of the devs (theo?) once mentioned temp directories being created... not sure when that would ever happen. Files will be created at 666 when 0777 is used, Ok, I didn't know that. Yeah, the bayes config options are quite a bit misleading. bayes_path isn't a path, it's a path plus partial filename. bayes_mode isn't a mode, it's a mask. Great stuff eh?
Re: bayes_journal
Matt Kettler wrote on Thu, 08 Jan 2009 21:08:49 -0500: bayes_file_mode 0777 well, 0666 is definitely sufficient ;-) Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
Re: bayes_journal
Kai Schaetzl wrote: Matt Kettler wrote on Thu, 08 Jan 2009 21:08:49 -0500: bayes_file_mode 0777 well, 0666 is definitely sufficient ;-) No it's not. The mode is really a mask, and is sometimes used in the creation of directories. Files will be created at 666 when 0777 is used,
Re: bayes_journal
Matt Kettler wrote on Fri, 09 Jan 2009 07:57:17 -0500: No it's not. The mode is really a mask, and is sometimes used in the creation of directories. well, it has worked all the years for me on those setups that use dbm storage. What directories should be created there? We only have db, index, journal, mutexes, locks and such, no directories. Files will be created at 666 when 0777 is used, Ok, I didn't know that. Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
bayes_journal
I just upgraded from SA 3.0.1 to 3.2.5 today. The bayes_journal keeps disappearing and SA kept complaining it didn't have permission to re-create it. So I chmod 777 the parent directory (/usr/local/etc/mail/spamassassin) and SA finally recreated the bayes_journal file. However it looks like SA used setuid to create it as the user the email was delivering to with 600 permissions. So what happens when a different user's email gets processed when the bayes_journal already has different ownership/permissions? Is there anyway to just have either root update bayes_journal or leave the bayes_journal there with 666 permissions? Brenden -- View this message in context: http://www.nabble.com/bayes_journal-tp21364727p21364727.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: bayes_journal
On Fri, January 9, 2009 02:37, boogybren wrote: Is there anyway to just have either root update bayes_journal or leave the bayes_journal there with 666 permissions? remove bayes_path in your config if defined in sitewide it needs root to update it, but if you use bayes_path in user_prefs then its not that problem :) do the user that runs spamassassin have a ~ ? -- Benny Pedersen Need more webspace ? http://www.servage.net/?coupon=cust37098
Re: bayes_journal
boogybren wrote: I just upgraded from SA 3.0.1 to 3.2.5 today. The bayes_journal keeps disappearing and SA kept complaining it didn't have permission to re-create it. So I chmod 777 the parent directory (/usr/local/etc/mail/spamassassin) and SA finally recreated the bayes_journal file. However it looks like SA used setuid to create it as the user the email was delivering to with 600 permissions. So what happens when a different user's email gets processed when the bayes_journal already has different ownership/permissions? Is there anyway to just have either root update bayes_journal or leave the bayes_journal there with 666 permissions? If you're sharing a bayes database among multiple users you need this line in your local.cf so SA uses the right permissions: bayes_file_mode 0777
Re: bayes_journal
On Fri, January 9, 2009 03:08, Matt Kettler wrote: bayes_file_mode 0777 and any user on that host can overwrite it -- Benny Pedersen Need more webspace ? http://www.servage.net/?coupon=cust37098
Re: bayes_journal
The reason why I use the bayes path is because on my server (virtual private freebsd), the SA install writes the config files to /usr/local/etc/mail/spamassassin instead of /etc/mail/spamassassin. So if I don't specify bayes_path, then it will stick the bayes stuff under /etc/mail/spamassassin. Although using bayes_file_mode 0777 is insecure, I am okay with it giving the fact that I am the only one with shell access to the box. However, I would like to identify the right way to do it so I don't have to throw a work around into play. Thanks for all your input! -- View this message in context: http://www.nabble.com/bayes_journal-tp21364727p21365382.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: bayes_journal
Benny Pedersen wrote: On Fri, January 9, 2009 03:08, Matt Kettler wrote: bayes_file_mode 0777 and any user on that host can overwrite it Yep, that's what you need if you're sharing a single bayes DB amongst all your users. They all need to be able to write it. The alternative is doing one bayes DB per user, or switching to SQL.
Re: bayes_journal
boogybren wrote: The reason why I use the bayes path is because on my server (virtual private freebsd), the SA install writes the config files to /usr/local/etc/mail/spamassassin instead of /etc/mail/spamassassin. So if I don't specify bayes_path, then it will stick the bayes stuff under /etc/mail/spamassassin. It shouldn't be in either location by default. It should be in the invoking user's home directory.
Re: bayes_journal mysteriously disappears - nevermind, foundit
David C. McCall wrote: DOH! I didn't include --sync in periodic sa-learn runs slaps his forehead and returns into cave. :-( You shouldn't need --sync, unless you want to force the journal to be synced and deleted when you run sa-learn. In general it will decide if it needs to be synced on its own. It's also redundant if you have --force-expire, as SA always syncs the journal prior to doing expiry. In general, the journal disappearing is normal. It's just a holding tank for atime updates (and tokens if you have learn to journal enabled), It periodically gets dumped into the main database and deleted during the expiry checks. So, don't be concerned about it disappearing, that just means it's been synced and hasn't been recreated by mail scanning.
bayes_journal mysteriously disappears
SpamAssassin Server version 3.2.5 running on Perl 5.8.8 with SSL support (IO::Socket::SSL 1.07) with zlib support (Compress::Zlib 2.005) My user primarily uses pine as the interface, and I've got .procmailrc set as follows: INCLUDERC=/etc/mail/spamassassin/spamassassin-spamc.rc and that file looks like: # send mail through spamassassin :0fw | /usr/local/bin/spamc -f Sun Nov 23 19:26:31 PST 2008 total 6.1M 8.0K drwxrwxr-x 2 lynnc spam 4.0K Nov 23 19:16 . 516K drwxr-xr-x 54 lynnc lynnc 508K Nov 23 17:19 .. 592K -rw-rw-r-- 1 lynnc spam 668K Nov 23 19:16 auto-whitelist 8.0K -rw--- 1 spam spam 3.6K Nov 23 19:16 bayes_journal 936K -rw-rw-r-- 1 lynnc spam 1.3M Nov 23 19:16 bayes_seen 4.1M -rw--- 1 spam spam 5.1M Nov 23 19:16 bayes_toks 12K -rw-rw-r-- 1 lynnc spam 5.9K Oct 13 18:03 user_prefs /var/log # date;dir ~lynnc/.spam* Sun Nov 23 19:31:10 PST 2008 total 6.1M 8.0K drwxrwxr-x 2 lynnc spam 4.0K Nov 23 19:30 . 516K drwxr-xr-x 54 lynnc lynnc 508K Nov 23 17:19 .. 592K -rw-rw-r-- 1 lynnc spam 668K Nov 23 19:16 auto-whitelist 936K -rw-rw-r-- 1 lynnc spam 1.3M Nov 23 19:30 bayes_seen 4.1M -rw--- 1 spam spam 5.1M Nov 23 19:30 bayes_toks 12K -rw-rw-r-- 1 lynnc spam 5.9K Oct 13 18:03 user_prefs === last entry in spamd.log: Sun Nov 23 19:16:00 2008 [8375] info: spamd: connection from localhost.localdomain [127.0.0.1] at port 41450 Sun Nov 23 19:16:00 2008 [8375] info: spamd: processing message [EMAIL PROTECTED] for lynnc:548 Sun Nov 23 19:16:17 2008 [8375] info: spamd: identified spam (16.0/5.0) for lynnc:548 in 16.9 seconds, 112674 bytes. Sun Nov 23 19:16:17 2008 [8375] info: spamd: result: Y 16 - BAYES_50,DNS_FROM_DOB,FU_LONG_QUERY3,HTML_MESSAGE,MILLION_USD,MIME_HTML_ONLY,RCVD_IN_DOB,RDNS_D YNAMIC,SPF_HELO_PASS,SPF_PASS,STRONG_BUY,URIBL_BLACK,URIBL_GREY,URIBL_OB_SURBL,URIBL_RHS_DOB,URI_HEX,US_DOLLARS_3,WHOIS_UNLISTED scantime=16.9,size=112674, user=lynnc,uid=548,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=41450,mid=[EMAIL PROTECTED],bayes=0.5 0,autolearn=spam Sun Nov 23 19:16:17 2008 [8335] info: prefork: child states: II thanks ahead of time, sorry ahead of time if I'm missing something obvious dmc -- View this message in context: http://www.nabble.com/bayes_journal-mysteriously-disappears-tp20654371p20654371.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: bayes_journal mysteriously disappears - nevermind, foundit
DOH! I didn't include --sync in periodic sa-learn runs slaps his forehead and returns into cave. :-( David C. McCall wrote: SpamAssassin Server version 3.2.5 running on Perl 5.8.8 with SSL support (IO::Socket::SSL 1.07) with zlib support (Compress::Zlib 2.005) My user primarily uses pine as the interface, and I've got .procmailrc set as follows: INCLUDERC=/etc/mail/spamassassin/spamassassin-spamc.rc and that file looks like: # send mail through spamassassin :0fw | /usr/local/bin/spamc -f Sun Nov 23 19:26:31 PST 2008 total 6.1M 8.0K drwxrwxr-x 2 lynnc spam 4.0K Nov 23 19:16 . 516K drwxr-xr-x 54 lynnc lynnc 508K Nov 23 17:19 .. 592K -rw-rw-r-- 1 lynnc spam 668K Nov 23 19:16 auto-whitelist 8.0K -rw--- 1 spam spam 3.6K Nov 23 19:16 bayes_journal 936K -rw-rw-r-- 1 lynnc spam 1.3M Nov 23 19:16 bayes_seen 4.1M -rw--- 1 spam spam 5.1M Nov 23 19:16 bayes_toks 12K -rw-rw-r-- 1 lynnc spam 5.9K Oct 13 18:03 user_prefs /var/log # date;dir ~lynnc/.spam* Sun Nov 23 19:31:10 PST 2008 total 6.1M 8.0K drwxrwxr-x 2 lynnc spam 4.0K Nov 23 19:30 . 516K drwxr-xr-x 54 lynnc lynnc 508K Nov 23 17:19 .. 592K -rw-rw-r-- 1 lynnc spam 668K Nov 23 19:16 auto-whitelist 936K -rw-rw-r-- 1 lynnc spam 1.3M Nov 23 19:30 bayes_seen 4.1M -rw--- 1 spam spam 5.1M Nov 23 19:30 bayes_toks 12K -rw-rw-r-- 1 lynnc spam 5.9K Oct 13 18:03 user_prefs === last entry in spamd.log: Sun Nov 23 19:16:00 2008 [8375] info: spamd: connection from localhost.localdomain [127.0.0.1] at port 41450 Sun Nov 23 19:16:00 2008 [8375] info: spamd: processing message [EMAIL PROTECTED] for lynnc:548 Sun Nov 23 19:16:17 2008 [8375] info: spamd: identified spam (16.0/5.0) for lynnc:548 in 16.9 seconds, 112674 bytes. Sun Nov 23 19:16:17 2008 [8375] info: spamd: result: Y 16 - BAYES_50,DNS_FROM_DOB,FU_LONG_QUERY3,HTML_MESSAGE,MILLION_USD,MIME_HTML_ONLY,RCVD_IN_DOB,RDNS_D YNAMIC,SPF_HELO_PASS,SPF_PASS,STRONG_BUY,URIBL_BLACK,URIBL_GREY,URIBL_OB_SURBL,URIBL_RHS_DOB,URI_HEX,US_DOLLARS_3,WHOIS_UNLISTED scantime=16.9,size=112674, user=lynnc,uid=548,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=41450,mid=[EMAIL PROTECTED],bayes=0.5 0,autolearn=spam Sun Nov 23 19:16:17 2008 [8335] info: prefork: child states: II thanks ahead of time, sorry ahead of time if I'm missing something obvious dmc -- View this message in context: http://www.nabble.com/bayes_journal-mysteriously-disappears-tp20654371p20654489.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
bayes_journal
I installed spamassassin-3.1.3. I have bayes_seen and bayes_toks, but I have not bayes_journal. Why? Can you help me? Thank Andrea
Re: bayes_journal
On Thu, Nov 02, 2006 at 02:08:46PM +0100, Andrea Bencini wrote: I have bayes_seen and bayes_toks, but I have not bayes_journal. Why? The journal goes away when its data is synced into the DB. -- Randomly Selected Tagline: Direct from the Ministry of Silly Walks. pgpm0Uu7Gw5DD.pgp Description: PGP signature
bayes_journal file and bayes value at spam.log
after the spamassassin had run fine around 2 days, i found that at bayes directory (set to /etc/mail/spamassassin/bayes/), it had a new plain text file bayes_journal created and at spam.log, at even scanned mail, a bayes value like 2006-04-13 03:07:34 [11243] i: result: Y 17 - BAYES_99,DNS_FROM_RFC_POST,HELO_DYNAMIC_IPADDR,LONG WORDS, RCVD_IN_NJABL_DUL, URIBL_JP_SURBL, URIBL_OB_SURBL scantime=1.2, size=1702, mid=unknown, bayes=0.9840567, autolearn=no also logged to the spam.log which not exist as before. so, i wonder like to ask that the bayes value mean and the using of file bayes_journal. Coz from maillist, i found that some problem will caused by huge size of bayes_journal file. thx all.
RE: Huge size of bayes_journal
Hi Gary V, Sorry for the delayed reply. A clue was given to you in a previous post: http://marc.theaimsgroup.com/?l=spamassassin-usersm=114269315700923w=2 But I am not getting the full picture. You said earlier that the bayes files were in /var/amavis/.spamassassin yet you say you changed the home directory of 'clamav' to /var/amavisd. Are your bayes files in /var/amavis/.spamassassin or /var/amavisd/.spamassassin? What user is running amavisd-new? Please do this for me as I asked before: My bayes files are under /var/amavis/.spamassassin (sorry for the typo) What do you have $daemon_user and $daemon_group set to in amavisd.conf? $daemon_user = 'clamav' $daemon_group = 'clamav' What does this say?: cat /etc/passwd | grep amavis clamav:x:1005:103::/var/amavis:/bin/sh When you ran /usr/local/bin/sa-learn -D --sync, what user were you running this as? I was logged in as user clamav after changing the initially assigned home directory of user clamav from something else to /var/avamvis Another hint, you also need to run 'sa-learn --sync --force-expire' as your amavisd-new user. If it takes some time to complete then it is probably working.
RE: Huge size of bayes_journal
Hi Gary V, My bayes files are under /var/amavis/.spamassassin (sorry for the typo) $daemon_user = 'clamav' $daemon_group = 'clamav' clamav:x:1005:103::/var/amavis:/bin/sh Thanks for clarifying, everything should be OK then. Then you should create a cron job to run sa-learn --sync --force-expire each day (as clamav, or su to clamav). The 3.1 documentation says a --force-expire will also run --sync. Gary V _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/
RE: Huge size of bayes_journal
Hi, Many thanks Theo Van Dinter, Gary V and others who helped. As suggested by Theo Van Dinter, I change the home directory of clamav user as /var/amavisd and then executed /usr/local/bin/sa-learn -D --sync it took around 6 hours but now bayes_journal has been reduced from 3.5 GB 42 KB. How I can prevent this problem from reoccuring? ___ Mohammad Junaid A clue was given to you in a previous post: http://marc.theaimsgroup.com/?l=spamassassin-usersm=114269315700923w=2 But I am not getting the full picture. You said earlier that the bayes files were in /var/amavis/.spamassassin yet you say you changed the home directory of 'clamav' to /var/amavisd. Are your bayes files in /var/amavis/.spamassassin or /var/amavisd/.spamassassin? What user is running amavisd-new? Please do this for me as I asked before: What do you have $daemon_user and $daemon_group set to in amavisd.conf? What does this say?: cat /etc/passwd | grep amavis When you ran /usr/local/bin/sa-learn -D --sync, what user were you running this as? Another hint, you also need to run 'sa-learn --sync --force-expire' as your amavisd-new user. If it takes some time to complete then it is probably working. Gary V _ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
RE: Huge size of bayes_journal
Hi, Many thanks Theo Van Dinter, Gary V and others who helped. As suggested by Theo Van Dinter, I change the home directory of clamav user as /var/amavisd and then executed /usr/local/bin/sa-learn -D --sync it took around 6 hours but now bayes_journal has been reduced from 3.5 GB 42 KB. How I can prevent this problem from reoccuring? ___ Mohammad Junaid
Huge size of bayes_journal
Hi, I am running postfix 2.2.4 on Solaris 8 with amavisd-new.2.3.2, SpamAssassin 3.1.0 and Clamav 0.8.7.1 as an AV/AS gateway to my main email system. The problem is that in our /var/amavis/.spamassassin directory most of the files are increasing specially bayes_jornal is reaching to 3.4 GB. I have read that this file should not be more than few KB, Can anyone help what could be the reason? Here is the ls -l output for this directory. == bash-2.03# ls -l /var/amavis/.spamassassin -rw--- 1 clamav clamav 335904768 Mar 18 12:01 auto-whitelist -rw--- 1 clamav clamav 6 Mar 18 12:01 auto-whitelist.mutex -rw--- 1 clamav clamav 2196 Mar 18 12:01 bayes.mutex -rw--- 1 clamav clamav 3441876576 Mar 18 12:01 bayes_journal -rw--- 1 clamav clamav 167813120 Mar 18 12:01 bayes_seen -rw--- 1 clamav clamav 336117760 Mar 18 12:01 bayes_toks == Thanks, Mohammad Junaid.
Re: Huge size of bayes_journal
On Sat, Mar 18, 2006 at 12:07:35PM +0300, MJ wrote: I am running postfix 2.2.4 on Solaris 8 with amavisd-new.2.3.2, I don't know if amavisd does something special wrt bayes, reaching to 3.4 GB. I have read that this file should not be more than few KB, Can anyone help what could be the reason? As the appropriate user, run sa-learn -D --sync and see what happens. -rw--- 1 clamav clamav 3441876576 Mar 18 12:01 bayes_journal -rw--- 1 clamav clamav 167813120 Mar 18 12:01 bayes_seen -rw--- 1 clamav clamav 336117760 Mar 18 12:01 bayes_toks These are all extremely large. It looks like auto-expire and/or auto-sync may be disabled. -- Randomly Generated Tagline: Cold Boot: What a programmer puts on feet in winter. pgpH62mAeCS3d.pgp Description: PGP signature
RE: Huge size of bayes_journal
Hi Theo Van Dinter I don't know if amavisd does something special wrt bayes, Do you need me to send amavisd.conf? usually they (mailing list of amavisd-new) suggest to post SA related issues to this list and not on Amavisd-new list. As the appropriate user, run sa-learn -D --sync and see what happens. I did but still the same size, following is the output. = bash-2.03# /usr/local/bin/sa-learn -D --sync [17329] dbg: logger: adding facilities: all [17329] dbg: logger: logging level is DBG [17329] dbg: generic: SpamAssassin version 3.1.0 [17329] dbg: config: score set 0 chosen. [17329] dbg: util: running in taint mode? yes [17329] dbg: util: taint mode: deleting unsafe environment variables, resetting PATH [17329] dbg: util: PATH included 'PATH', which is not absolute, dropping [17329] dbg: util: PATH included '/usr/sbin', keeping [17329] dbg: util: PATH included '/usr/bin', keeping [17329] dbg: util: PATH included '/export/home/mg1', keeping [17329] dbg: util: final PATH set to: /usr/sbin:/usr/bin:/export/home/mg1 [17329] dbg: dns: is Net::DNS::Resolver available? yes [17329] dbg: dns: Net::DNS version: 0.52 [17329] dbg: dns: name server: 212.119.64.2, family: 2, ipv6: 0 [17329] dbg: config: using /etc/mail/spamassassin for site rules pre files [17329] dbg: config: read file /etc/mail/spamassassin/init.pre [17329] dbg: config: read file /etc/mail/spamassassin/v310.pre [17329] dbg: config: using /usr/local/share/spamassassin for sys rules pre files [17329] dbg: config: using /usr/local/share/spamassassin for default rules dir [17329] dbg: config: read file /usr/local/share/spamassassin/10_misc.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_advance_fee.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_anti_ratware.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_body_tests.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_compensate.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_dnsbl_tests.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_drugs.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_fake_helo_tests.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_head_tests.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_html_tests.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_meta_tests.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_net_tests.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_phrases.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_porn.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_ratware.cf [17329] dbg: config: read file /usr/local/share/spamassassin/20_uri_tests.cf [17329] dbg: config: read file /usr/local/share/spamassassin/23_bayes.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_accessdb.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_antivirus.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_body_tests_es.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_body_tests_pl.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_dcc.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_domainkeys.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_hashcash.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_pyzor.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_razor2.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_replace.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_spf.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_textcat.cf [17329] dbg: config: read file /usr/local/share/spamassassin/25_uribl.cf [17329] dbg: config: read file /usr/local/share/spamassassin/30_text_de.cf [17329] dbg: config: read file /usr/local/share/spamassassin/30_text_fr.cf [17329] dbg: config: read file /usr/local/share/spamassassin/30_text_it.cf [17329] dbg: config: read file /usr/local/share/spamassassin/30_text_nl.cf [17329] dbg: config: read file /usr/local/share/spamassassin/30_text_pl.cf [17329] dbg: config: read file /usr/local/share/spamassassin/30_text_pt_br.cf [17329] dbg: config: read file /usr/local/share/spamassassin/50_scores.cf [17329] dbg: config: read file /usr/local/share/spamassassin/60_awl.cf [17329] dbg: config: read file /usr/local/share/spamassassin/60_whitelist.cf [17329] dbg: config: read file /usr/local/share/spamassassin/60_whitelist_spf.cf [17329] dbg: config: read file /usr/local/share/spamassassin/60_whitelist_subject.cf [17329] dbg: config: using /etc/mail/spamassassin for site rules dir [17329] dbg: config: read file /etc/mail/spamassassin/cyberia.cf [17329] dbg: config: read file /etc/mail/spamassassin/local.cf [17329] dbg: config: using //.spamassassin/user_prefs for user prefs file [17329]
Re: Huge size of bayes_journal
On Sat, Mar 18, 2006 at 01:07:30PM +0300, MJ wrote: I did but still the same size, following is the output. bash-2.03# /usr/local/bin/sa-learn -D --sync The # implies you're running as root. Is that the same user as amavis runs as? [...] [17329] dbg: bayes: tie-ing to DB file R/O //.spamassassin/bayes_toks [17329] dbg: bayes: tie-ing to DB file R/O //.spamassassin/bayes_seen This isn't the same path as you posted before, so I'm not surprised those files didn't change. Do you need me to send amavisd.conf? usually they (mailing list of amavisd-new) suggest to post SA related issues to this list and not on Amavisd-new list. Not specifically related to this thread, but just as a FWIW, the general policy here is that unless the problem is reproducable with the standard SpamAssassin tools (spamassassin, spamc/spamd, etc,) you'd need to talk to the third parties involved (amavis, qmail-scanner, spamass-milter, etc.) -- Randomly Generated Tagline: Bit - The increment by which programmers slowly go mad. pgp2rC8wkD6jf.pgp Description: PGP signature
RE: Huge size of bayes_journal
Hi Theo van Dinter, Thanks for you quick response. The # implies you're running as root. Is that the same user as amavis runs as? No, there is another user for daemon with a false shell, can't be use to login as a normal user. This isn't the same path as you posted before, so I'm not surprised those files didn't change. You mean which path? My bayes_* files are under /var/amavis/.spamassassin. Many thanks for your time. ___ Mohammad Junaid
Re: Huge size of bayes_journal
On Sat, Mar 18, 2006 at 01:51:45PM +0300, MJ wrote: Thanks for you quick response. :) The # implies you're running as root. Is that the same user as amavis runs as? No, there is another user for daemon with a false shell, can't be use to login as a normal user. You need to somehow access that user's database files. The usual method would be switch to the appropriate user and run the previously stated sa-learn command, then look at the debug output. Another possibility is to use another user and setting bayes_path to access those files, but that may lead to ownership/permission issues, generally if an expire occurs. If amavis has a spamassassin debug option, you could enable that, and then look at the logs to see what the problem is, but the output may be very large before you see the problem. This isn't the same path as you posted before, so I'm not surprised those files didn't change. You mean which path? My bayes_* files are under /var/amavis/.spamassassin. Exactly. As shown in the debug output you sent previously, by running as root, sa-learn was using the files in /.spamassassin which isn't the same as /var/amavis/.spamassassin. -- Randomly Generated Tagline: Dying is the leading cause of death in the world. pgpI5NuD0HfAj.pgp Description: PGP signature
Re: Huge size of bayes_journal
On Samstag, 18. März 2006 11:51 MJ wrote: No, there is another user for daemon with a false shell, can't be use to login as a normal user. su -l $USER_AMAVIS_RUNS_AS -s /bin/bash That way you can run as the user with bash. mfg zmi -- // Michael Monnerie, Ing.BSc --- it-management Michael Monnerie // http://zmi.at Tel: 0660/4156531 Linux 2.6.11 // PGP Key: lynx -source http://zmi.at/zmi2.asc | gpg --import // Fingerprint: EB93 ED8A 1DCD BB6C F952 F7F4 3911 B933 7054 5879 // Keyserver: www.keyserver.net Key-ID: 0x70545879 pgpi5QH04VMnq.pgp Description: PGP signature
RE: Huge size of bayes_journal
Title: RE: Huge size of bayes_journal Hi Theo, I manage to switch to that user and executed the sa-learn command but since it has it' own home directory it created new .spamassassin directory under it's home directory. Actually /var/amavisd/.spamassassin which has these files is not a home directory for any user. So how to tell sa-learn command to read from this location? I am afraid that my filesystem soon will be full. Mohammad Junaid.
Re: Huge size of bayes_journal
Title: RE: Huge size of bayes_journal You can and probably should remove the journal file. These are unlearned tokens, so they aren't affecting the classification of mail. The journal is so huge that it might take days to learn, and it also indicates that you are accumulating new material fairly quickly. So losing the current journal file shouldn't hurt anything. Loren
RE: Huge size of bayes_journal
You can and probably should remove the journal file. These are unlearned tokens, so they aren't affecting the classification of mail. The journal is so huge that it might take days to learn, and it also indicates that you are accumulating new material fairly quickly. So losing the current journal file shouldn't hurt anything. Hi Loren Wilton, Are you sure that it will not have any adverse effect on my system, I am not in the position to take any chance? Many thanks. Regards, ___ Mohammad Junaid
Re: Huge size of bayes_journal
On Samstag, 18. März 2006 11:51 MJ wrote: No, there is another user for daemon with a false shell, can't be use to login as a normal user. The user 'clamav' should have a home dir of /var/amavis otherwise I wouldn't think the spamassasin files would end up in /var/amavis/.spamassassin. what does this say? cat /etc/passwd | grep clamav To run sa-learn as this user (who does not have a shell), I would run: sudo -H -u clamav sa-learn --sync --force-expire I would set up a cron job to run this daily as it seems you have disabled auto expire and sync as noted. You can't do that without manually cleaning up on a regular basis. You can do that if you do. But as noted, I think you are in a bit of a pickle now. The files are so hugh that I'm not sure how your system will handle it when the sync and expire are performed. One thing I'm reasonably confident of, the procedure will slow your system down for a considerable period of time. Gary V _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
RE: Huge size of bayes_journal
Hi Gary, The user 'clamav' should have a home dir of /var/amavis otherwise I wouldn't think the spamassasin files would end up in /var/amavis/.spamassassin. what does this say? cat /etc/passwd | grep clamav clamav:x:1005:103::/home/clamav:/bin/false To run sa-learn as this user (who does not have a shell), I would run: sudo -H -u clamav sa-learn --sync --force-expire You want me to try above command? I would set up a cron job to run this daily as it seems you have disabled auto expire and sync as noted. You can't do that without manually cleaning up on a regular basis. You can do that if you do. I didn't change anything related to auto expire or sync in amavisd.conf, infact another machine with same configuration doesn't have such a huge bayes_* files. Any idea how to resolve this issue. Many thanks, Mohammad Junaid.
RE: Huge size of bayes_journal
Hi Gary, The user 'clamav' should have a home dir of /var/amavis otherwise I wouldn't think the spamassasin files would end up in /var/amavis/.spamassassin. what does this say? cat /etc/passwd | grep clamav clamav:x:1005:103::/home/clamav:/bin/false To run sa-learn as this user (who does not have a shell), I would run: sudo -H -u clamav sa-learn --sync --force-expire You want me to try above command? Hmm, I don't know at this point. It is strange that the files are owned by 'clamav'. Due to the fact that they are, I assumed you were running amavisd-new as user 'clamav'. What do you have $daemon_user and $daemon_group set to in amavisd.conf? What does this say?: cat /etc/passwd | grep amavis I would set up a cron job to run this daily as it seems you have disabled auto expire and sync as noted. You can't do that without manually cleaning up on a regular basis. You can do that if you do. I didn't change anything related to auto expire or sync in amavisd.conf, infact another machine with same configuration doesn't have such a huge bayes_* files. The settings would be in local.cf, not amavisd.conf. If the other machine has the same configuration, are the same files on that machine also owned by 'clamav'? Any idea how to resolve this issue. Many thanks, Mohammad Junaid. Gary V _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Re: Huge size of bayes_journal
MJ a écrit : Hi Gary, The user 'clamav' should have a home dir of /var/amavis otherwise I wouldn't think the spamassasin files would end up in /var/amavis/.spamassassin. what does this say? cat /etc/passwd | grep clamav clamav:x:1005:103::/home/clamav:/bin/false I guess amavisd-new is running as clamav. To run sa-learn as this user (who does not have a shell), I would run: sudo -H -u clamav sa-learn --sync --force-expire You want me to try above command? yes, if you have sudo. otherwise, use your imagination: 1- change the login shell to a valid one, purge the file, and then change the login shell back to /bin/false. 2- cp the file to $user/.spamassassin/ for some user with a valid shell, purge as this user, then rename the resulting file to the original one.
Re: Huge size of bayes_journal
From: MJ [EMAIL PROTECTED] You can and probably should remove the journal file. These are unlearned tokens, so they aren't affecting the classification of mail. The journal is so huge that it might take days to learn, and it also indicates that you are accumulating new material fairly quickly. So losing the current journal file shouldn't hurt anything. Hi Loren Wilton, Are you sure that it will not have any adverse effect on my system, I am not in the position to take any chance? Rename it and see if the system runs OK. If it does, delete it. {^_^}
bayes_journal permissions
Is there a control for the permissions on the bayes_journal file? I'm using a shared bayes db, and users do not have permissiosn on the file because it is created chmod 600. Is there something i can do in the config files? Thanks. David
Re: bayes_journal permissions
On 12/06/2005 12:27 am, Matt Kettler wrote: David Buttrick wrote: Is there a control for the permissions on the bayes_journal file? I'm using a shared bayes db, and users do not have permissiosn on the file because it is created chmod 600. Is there something i can do in the config files? What's your bayes_file_mode setting set to? If you have a shared bayes db, it should be 0777 (note: 0777 not 0666 due to use in dir creation) Wouldn't it be better to set bayes_file_mode to 0770 and add the users to the same group as the file, say users group? 8)
Re: bayes_journal permissions
Thanks! On Dec 5, 2005, at 6:27 PM, Matt Kettler wrote: David Buttrick wrote: Is there a control for the permissions on the bayes_journal file? I'm using a shared bayes db, and users do not have permissiosn on the file because it is created chmod 600. Is there something i can do in the config files? What's your bayes_file_mode setting set to? If you have a shared bayes db, it should be 0777 (note: 0777 not 0666 due to use in dir creation)
Re: bayes_journal permissions
Pollywog wrote: On 12/06/2005 12:27 am, Matt Kettler wrote: David Buttrick wrote: Is there a control for the permissions on the bayes_journal file? I'm using a shared bayes db, and users do not have permissiosn on the file because it is created chmod 600. Is there something i can do in the config files? What's your bayes_file_mode setting set to? If you have a shared bayes db, it should be 0777 (note: 0777 not 0666 due to use in dir creation) Wouldn't it be better to set bayes_file_mode to 0770 and add the users to the same group as the file, say users group? 8) That works too, although you also have to add nobody to that group (any mail set to scan as root falls back to nobody). At that point the difference between 0770 and 0777 is not exactly very large. Sure named, http, cron and other service users can't write it, but that's about it. For someone exploiting as a service user, It *might* be possible to privilege escalate by maliciously corrupting the bayes DB. However, when using spamd bayes is never accessed as root so the potential gain here is small, you'd only be able to escalate to a regular local user, not to root. From there they might have better tools available to hop into root via another privilege escalation, but it's a long shot that they couldn't just do it directly from the service user. While I agree it's a good idea from a belt and suspenders approach, there are better measures one should take first. (ie: make sure all network daemon processes are chroot as well as setuid)
Bayes_journal and locking
on our mailcluster we have spamassassin running with bayes turned on, but auto learning turned off, we then hand train the bayesdb and push it out to all the machines. However weven with bayes_auto_learn turned off, spamd is still creating the bayes_journal files, which isn't a problem until spamd decides to flush the journal file to no where it still locks the bayesdb file causing concurrent spamd processes to be unable to use the db resulting in inconsistent scores every few seconds. The quick and dirty solution was to create a +i bayes_journal file, spamd never writes to the journal, so it never tries to flush it...except it now throws an error everytime it tries to write to bayes_journal. Just wondering if anyone out there has run into this problem before? Is there a more elegant solution? Here is the pertinent section of local.cf: use_bayes 1 bayes_path /etc/mail/bayes/bayes bayes_auto_learn0 bayes_auto_expire 0 bayes_use_hapaxes 1 bayes_use_chi2_combining1 bayes_learn_to_journal 0 Thx in advance for any help. -Rocky -- __ what's with today, today? Email: [EMAIL PROTECTED] PGP:http://rocky.mindphone.org/rocky_mindphone.org.gpg signature.asc Description: Digital signature
SA 3.02 - How to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks to another device?
I know this might seem like an odd request for those of you with tons of disk space available so please be kind. I'm running SpamAssassin version 3.0.2. For server space reasons (I'm a user on this system not root), I need to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks which resides in the default ~/.spamassassin directory to another device. With Linux you can't simply do a link ('ln') across devices, so the files need to actually be moved. I want to leave user_prefs in he default ~/.spamassassin. What is the best way to move these files without messing up the successful running operation of SA? Thanks in advance, David Roth rothmail -at- comcast.net
Re: SA 3.02 - How to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks to another device?
David A. Roth wrote: I know this might seem like an odd request for those of you with tons of disk space available so please be kind. I'm running SpamAssassin version 3.0.2. For server space reasons (I'm a user on this system not root), I need to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks which resides in the default ~/.spamassassin directory to another device. With Linux you can't simply do a link ('ln') across devices, You can't create hard links, no. You should be able to create symlinks, however (ln -s). I don't know if this will work correctly on the bayes_* files themselves; however I've successfully moved user's .spamassassin directories to deal with quota issues caused by large AWL files. so the files need to actually be moved. I want to leave user_prefs in he default ~/.spamassassin. What is the best way to move these files without messing up the successful running operation of SA? Can you use bayes_path in your user_prefs? I don't recall whether that's allowed in there, and I don't have a 3.x to refer to. Check the man page. -kgd -- Get your mouse off of there! You don't know where that email has been!
Re: SA 3.02 - How to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks to another device?
David A. Roth wrote: I know this might seem like an odd request for those of you with tons of disk space available so please be kind. I'm running SpamAssassin version 3.0.2. For server space reasons (I'm a user on this system not root), I need to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks which resides in the default ~/.spamassassin directory to another device. With Linux you can't simply do a link ('ln') across devices, so the files need to actually be moved. I want to leave user_prefs in he default ~/.spamassassin. What is the best way to move these files without messing up the successful running operation of SA? Thanks in advance, David Roth rothmail -at- comcast.net Use auto_whitelist_path and bayes_path in your local.cf file to tell SA where to find the files after moving them.
Re: SA 3.02 - How to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks to another device?
On Feb 18, 2005, at 2:38 PM, Kevin Peuhkurinen wrote: David A. Roth wrote: I know this might seem like an odd request for those of you with tons of disk space available so please be kind. I'm running SpamAssassin version 3.0.2. For server space reasons (I'm a user on this system not root), I need to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks which resides in the default ~/.spamassassin directory to another device. With Linux you can't simply do a link ('ln') across devices, so the files need to actually be moved. I want to leave user_prefs in he default ~/.spamassassin. What is the best way to move these files without messing up the successful running operation of SA? Thanks in advance, David Roth rothmail -at- comcast.net Use auto_whitelist_path and bayes_path in your local.cf file to tell SA where to find the files after moving them. Ah, the local.cf file, of course! Thanks! Here I was thinking something needed to be re-built. So something as simple as this (see below) being added to the bottom of the local.cf file is all that is needed for SA 3.02 to find it? auto_whitelist_path /bigdisk/safiles bayes_path /bigdisk/safiles I assume I can keep the permission for /safiles at chmod 700 too? Thanks, David Roth rothmail -at- comcast.net
Re: SA 3.02 - How to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks to another device?
David A. Roth wrote: On Feb 18, 2005, at 2:38 PM, Kevin Peuhkurinen wrote: David A. Roth wrote: I know this might seem like an odd request for those of you with tons of disk space available so please be kind. I'm running SpamAssassin version 3.0.2. For server space reasons (I'm a user on this system not root), I need to relocate auto-whitelist, bayes_journal, bayes_seen and bayes_toks which resides in the default ~/.spamassassin directory to another device. With Linux you can't simply do a link ('ln') across devices, so the files need to actually be moved. I want to leave user_prefs in he default ~/.spamassassin. What is the best way to move these files without messing up the successful running operation of SA? Thanks in advance, David Roth rothmail -at- comcast.net Use auto_whitelist_path and bayes_path in your local.cf file to tell SA where to find the files after moving them. Ah, the local.cf file, of course! Thanks! Here I was thinking something needed to be re-built. So something as simple as this (see below) being added to the bottom of the local.cf file is all that is needed for SA 3.02 to find it? auto_whitelist_path /bigdisk/safiles bayes_path /bigdisk/safiles Yup. That should be all.At risk of stating the obvious, you should probably stop spamd before moving the files to avoid any chance of corruption. I assume I can keep the permission for /safiles at chmod 700 too? Mode 700 is the default, so should be fine as long as the spamd user is the owner (again with the obvious!) Thanks, David Roth rothmail -at- comcast.net
Re: cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored: Permission denied
Ah, it's not safe to open the root directory. You should redirect email for root to an unprivileged account. 'Nix systems are not like Windows systems in which you really can't do a blasted thing as a normal user. They are designed so that the only thing you do as root is reconfigure the system. {^_^} - Original Message - From: Chris Harvey [EMAIL PROTECTED] I'm seeing in my maillog file (SA 3.x running in Debug mode) the following: cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored: Permission denied This is right after all the bayes token statements. It suggests it's a problem, but I don't seem to be able to fix it. My default bayes location is /root/.spamassassin and I've tried making permissions on it wide open (777). The files in it are: -rw--- 1 root root 618496 Jan 28 13:26 auto-whitelist -rw--- 1 root root 1323008 Jan 28 14:05 bayes_seen -rw--- 1 root root 10489856 Jan 28 14:05 bayes_toks -rw-r--r-- 1 root root 1313 Jan 28 13:26 user_prefs And spam assassin is being started with service spamassassin start (via root) So I'm a little lost as to why this error would be coming up. Any suggestions? As I said, I'm not sure this is actually a problem, but it does suggest that the bayes DB's are not being updated. Thanks for any help in advance, Chris --- The most important tool in your toolbox is the question why?.
Re: cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored: Permission denied
At 04:26 PM 1/28/2005, Chris Harvey wrote: cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored: Permission denied This is right after all the bayes token statements. It suggests it's a problem, but I don't seem to be able to fix it. My default bayes location is /root/.spamassassin and I've tried making permissions on it wide open (777). The files in it are: First, I assume you're using a bayes_path statement to force the bayes DB for all users to be in roots homedir. If so, DO NOT proceed.. In order for your bayes DB to be wide open, ALL users must have r_x access to /root... that's a bad thing that you don't want to give them. move it to someplace in /var, /etc, /usr/share, or some other directory normal users can safely have read access to the directory. Also, be sure to set SA's bayes_file_mode to 777 in your local.cf, otherwise SA will just change the permisisons every time it updates the file.
RE: cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored: Permission denied
First, I assume you're using a bayes_path statement to force the bayes DB for all users to be in roots homedir. Yep! If so, DO NOT proceed.. In order for your bayes DB to be wide open, ALL users must have r_x access to /root... that's a bad thing that you don't want to give them. Done. I just opened up the directory rather than the files within it. They still have the same permissions. move it to someplace in /var, /etc, /usr/share, or some other directory normal users can safely have read access to the directory. Changed to a different location as you suggested. Also, be sure to set SA's bayes_file_mode to 777 in your local.cf, otherwise SA will just change the permisisons every time it updates the file. Did that too. Now in the log I see it looks much better. debug: bayes token 'H*c:NHxtPHrt' = 0.152853685441601 debug: bayes: score = 4.01130517690973e-10 debug: bayes: 21457 untie-ing debug: bayes: 21457 untie-ing db_toks debug: bayes: 21457 untie-ing db_seen debug: madiff: left: 0, orig: 11, max-difference: 0.00% The strange thing is I temporarily had opened up /root/.spamassassin to be wide open but still got the same results. So I can only think it must have been the file_mode setting which made a fundamental difference. Anyway, looks much better now thanks! Chris
RE: cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored: Permission denied
Ok, now I'm noticing this Creating default_prefs [/root/.spamassassin/user_prefs] Creating default_prefs [/root/.spamassassin/user_prefs] Is there a file path I can set so that the new working directory is my new .spamassasin directory I created? I specifically set the bayes and the autowhitelist paths, I'm assuming there's a general path statement I can set also, although I didn't see it in the manuals.
bayes_journal problem
Hi I am using 2.64 with local.cf settings bayes_path /var/spamd/.spamassassin/bayes bayes_file_mode 777 to get round ownership and other issues like space under users accounts. problem i have is with bayes_journal , it always seem to be owned by user.group of the mail owner. log shows Dec 29 18:05:13 proteus2a spamd[7352]: write failed to Bayes journal /var/spamd/.spamassassin/bayes_journal (0 of 1960)! Mark -- Obantec Support www.obantec.net 0845 458 3121 WebHosting and Domains Nominet UK Tag Holder CentralNic Accredited Reseller
RE: Oh where, oh where does my bayes_journal go?
Good to know - I was not aware that it did the --sync after learning. Ed At 03:54 PM Friday, 10/8/2004, Nate Schindler wrote -= a --sync operation is performed when you sa-learn things. This commits the journal to the database, and removes the file. it's recreated, written to, committed, and removed automatically when needed. sa-learn just forces this to happen whenever it's run. it's by design. -Original Message- From: Ed Kasky [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 3:09 PM I am currently running SA 3.0.0 with a site wide bayes and spamd running as user spamd. Database is in /home/spamd When I pipe false negatives through sa-learn, the bayes_journal file disappears. Is this by design or is there something I need to change or fix? Ed . . . . . . . . Avenge yourself. Live long enough to be a problem to your children.
Oh where, oh where does my bayes_journal go?
I am currently running SA 3.0.0 with a site wide bayes and spamd running as user spamd. Database is in /home/spamd When I pipe false negatives through sa-learn, the bayes_journal file disappears. Is this by design or is there something I need to change or fix? Thanks... Ed . . . . . . . . It's not a very big step from contentment to complacency. - Simone De Beauvoir
RE: Oh where, oh where does my bayes_journal go?
a --sync operation is performed when you sa-learn things. This commits the journal to the database, and removes the file. it's recreated, written to, committed, and removed automatically when needed. sa-learn just forces this to happen whenever it's run. it's by design. -Original Message- From: Ed Kasky [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 3:09 PM To: [EMAIL PROTECTED] Subject: Oh where, oh where does my bayes_journal go? I am currently running SA 3.0.0 with a site wide bayes and spamd running as user spamd. Database is in /home/spamd When I pipe false negatives through sa-learn, the bayes_journal file disappears. Is this by design or is there something I need to change or fix? Thanks... Ed . . . . . . . . It's not a very big step from contentment to complacency. - Simone De Beauvoir