RE: Stock spam in images
-Original Message- From: Randal, Phil [mailto:[EMAIL PROTECTED] Sent: Monday, October 02, 2006 3:58 AM To: Dylan Bouterse; users@spamassassin.apache.org Subject: RE: Stock spam in images This has been covered so many times on this list. 1: if you're not on spamassassin 3.1.5 get it now, and run sa-update (via a cron job daily, but test first with a manual sa-update -D) 2: pop over to http://www.rulesemporium.com and get an appropriate selection of their rules, and configure Rules du Jour ( http://www.exit0.us/index.php?pagename=RulesDuJour ) to download them daily. [Wilson] Does RulesDuJour support an auto update for Step #4 (ImageInfo.cf)? 3: don't forget the additional rules here: http://www.rulesemporium.com/other-rules.htm I've found Fred's header rules helpful 4: add the ImageInfo plugin from http://www.rulesemporium.com/plugins.htm [Wilson] # Install (From ImageInfo.pm): # 1) place ruleset in your local config dir # 2) place plugin in your plugins dir # 3) add to init.pre (or v310.pre) the following line # loadplugin Mail::SpamAssassin::Plugin::ImageInfo # or if not in plugin dir.. # loadplugin Mail::SpamAssassin::Plugin::ImageInfo /path/to/plugin #4) restart spamd (if necessary) For installing the ImageInfo plugin where do you put the ImageInfo.pm without defining a path? Im running CentOS4.4 Fedora Core 5 as test machines. Thanks! Wilson
RE: sa-update gives Can't locate LWP/UserAgent.pm in @INC ?
-Original Message- From: Evan Platt [mailto:[EMAIL PROTECTED] Sent: Monday, August 07, 2006 8:53 AM To: users@spamassassin.apache.org Subject: sa-update gives Can't locate LWP/UserAgent.pm in @INC ? Had the same problem on Fedora Core 5. I had to install these additional packages. ==Install via Yum== perl-Archive-Tar perl-IO-Zlib perl-libwww-perl Also, once you get the packages installed. Try running sa-update -D to see what its doing in the background. :) -Wilson
RE: Custom SA Filters
Are you looking to catch a particular type of spam? Most people with an up-to-date SpamAssassin version and a complement of SARE rules are either looking to catch something specific or are looking to fix a mis-configuration. Daryl Im basically trying to build a better spam filtering box then what they have in the commerical side. With SARE, Sendmail SBL, my box is doing pretty good, but spam is still getting through. Wilson
RE: Bayes not learning (autolearn=failed)
Still getting autolearn=failed but its no longer complaining about running spamd as root but its trying to create read files from root still even though I have the local.cf defined for the location of the bayes files. Any ideas? Thanks! May 22 08:13:57 localhost spamd[25519]: Creating default_prefs [/root/.spamassassin/user_prefs] May 22 08:13:57 localhost spamd[25519]: Cannot write to /root/.spamassassin/user_prefs: Permission denied May 22 08:13:57 localhost spamd[25519]: Couldn't create readable default_prefs for [/root/.spamassassin/user _prefs] I took everyone's advice and made theses changes below: /etc/sysconfig/spamassin *added -u spam to get rid of the previous error /etc/mail/spamassassin/local.cf *added bayes_path /home/spam/.spamassassin/bayes *added bayes_file_mode 0777 Wilson -Original Message- From: Sergei Gerasenko [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 1:04 PM To: users@spamassassin.apache.org Subject: Re: Bayes not learning (autolearn=failed) I think I'm dealing with a similar situation. Here's what you could try. Forget about changing the user that spamd runs as. The fact that it falls back to nobody maybe ok. Say your tokens are located in /home/admin/.spamassassin. Open /etc/spamassassin/local.cf and put these two lines in there: bayes_path /home/me/.spamassassin/bayes bayes_file_mode 0777 Make sure the directory /home/me/.spamassassin and files in that directory have write and read permissions for your nobody user. OK, then restart spamd and send yourself a test message. Look inside the message and look for the X-Spam-Status line. If it mentions BAYES, then it worked. If not, run spamd with the -D option. That will put debug messages in your syslog. Look at those messages and see what it's doing. It's pretty descriptive. Don't forget to remove the -D option after you're done :) By the way, where do you call spamc from? I'm not an expert on SA by any means, so take it with a grain of salt. On Sun, May 21, 2006 at 12:46:32PM -1000, Chan, Wilson wrote: I read the man docs and I need to specify -u username so the question is where do I put this? I create a username called spam and gave it full rights to where the bayes tok files are to be located. I tried to add it to SPAMDOPTIONS=-d -c -m5 -H -u spam Is this correct because after I restarted the service I still see the same error message. :( /etc/init.d/spamassassin #!/bin/sh # # spamassassin This script starts and stops the spamd daemon # # chkconfig: - 80 30 # processname: spamd # description: spamd is a daemon process which uses SpamAssassin to check \ # email messages for SPAM. It is normally called by spamc \ # from a MDA. # Source function library. . /etc/rc.d/init.d/functions prog=spamd # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = no ] exit 0 # Set default spamd configuration. SPAMDOPTIONS=-d -c -m5 -H -u spam SPAMD_PID=/var/run/spamassassin/spamd.pid # Source spamd configuration. if [ -f /etc/sysconfig/spamassassin ] ; then . /etc/sysconfig/spamassassin fi [ -f /usr/bin/spamd -o -f /usr/local/bin/spamd ] || exit 0 PATH=$PATH:/usr/bin:/usr/local/bin # By default it's all good RETVAL=0 # See how we were called. case $1 in start) # Start daemon. echo -n $Starting $prog: daemon $NICELEVEL spamd $SPAMDOPTIONS -r $SPAMD_PID RETVAL=$? echo if [ $RETVAL = 0 ]; then [ -n $SPAMD_PID ] ln -s $SPAMD_PID /var/run/spamd.pid touch /var/lock/subsys/spamassassin fi ;; stop) # Stop daemons. echo -n $Stopping $prog: killproc spamd RETVAL=$? echo if [ $RETVAL = 0 ]; then rm -f /var/lock/subsys/spamassassin rm -f /var/run/spamd.pid fi ;; restart) $0 stop $0 start ;; condrestart) [ -e /var/lock/subsys/spamassassin ] $0 restart ;; status) status spamd RETVAL=$? ;; *) echo Usage: $0 {start|stop|restart|status|condrestart} RETVAL=1 ;; esac exit $RETVAL Wilson -Original Message- From: Theo Van Dinter [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 11:58 AM To: users@spamassassin.apache.org Subject: Re: Bayes not learning (autolearn=failed) On Sun, May 21, 2006 at 11:16:14AM -1000, Chan, Wilson wrote: By default on CentOS I think it runs as root. How do you change it so that spamd is not running as root? I assume I'd have to change a parameter in /etc/rc.d/init.d/spamassassin? Thanks! If you read the spamd man page, it tells you how to specify the user to run as. You will also want to check out the Mail::SpamAssassin::Conf man/pod to see configuration options related
RE: Bayes not learning (autolearn=failed)
That seemed to fix it. I guess the default is to create a prefs path. Thanks! /etc/sysconfig/spamasassin # Options to spamd SPAMDOPTIONS=-d -m5 -c -H -u spam --Removed -c Wilson -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 8:42 AM To: users@spamassassin.apache.org Subject: Re: Bayes not learning (autolearn=failed) On Mon, May 22, 2006 at 08:17:57AM -1000, Chan, Wilson wrote: Still getting autolearn=failed but its no longer complaining about running spamd as root but its trying to create read files from root still even though I have the local.cf defined for the location of the bayes files. Any ideas? Thanks! May 22 08:13:57 localhost spamd[25519]: Creating default_prefs [/root/.spamassassin/user_prefs] May 22 08:13:57 localhost spamd[25519]: Cannot write to /root/.spamassassin/user_prefs: Permission denied May 22 08:13:57 localhost spamd[25519]: Couldn't create readable default_prefs for [/root/.spamassassin/user _prefs] I took everyone's advice and made theses changes below: /etc/sysconfig/spamassin *added -u spam to get rid of the previous error /etc/mail/spamassassin/local.cf *added bayes_path /home/spam/.spamassassin/bayes *added bayes_file_mode 0777 It's possible that spamd is running with the -c (--create-prefs ) option. Do ps ax | grep spamd and see if either -c or --create-prefs is one of the parameters. If it is, you need to edit, my guess, /etc/default/spamassassin and get rid of that option.
RE: Bayes not learning (autolearn=failed)
Do you have a sample local.cf file I can base my on? Right now this is what I have. /etc/mail/spamassassin/local.cf required_hits 5.0 report_safe 0 rewrite_header Subject** SPAM ** # Setup Bayesian Database Files bayes_path /home/spam/.spamassassin/bayes bayes_file_mode 0777 # Enable the Bayes system use_bayes 1 # Enable Bayes auto-learning bayes_auto_learn1 Wilson -Original Message- From: Sergei Gerasenko [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 9:20 AM To: users@spamassassin.apache.org Subject: Re: Bayes not learning (autolearn=failed) Also, I would add the path to your auto-whitelist file by adding this to your local.cf: auto_whitelist_path /home/spam/.spamassassin/auto-whitelist On Mon, May 22, 2006 at 09:07:48AM -1000, Chan, Wilson wrote: That seemed to fix it. I guess the default is to create a prefs path. Thanks!
SA Milter problem
Any else having this problem with spamass-milter with spamassassin? Looks like spamass-milter locks up and dies randomly. Is there a simple script that I can write to check say service spamass-milter to see if it comes back as running? If it isn't then just restart the service as a temp solution while I track down what's wrong? Thanks! May 22 10:41:08 localhost sendmail[31120]: k4MKf8dD031120: Milter (spamassassin): to error state May 22 10:41:08 localhost sendmail[31119]: k4MKf84A031119: Milter (spamassassin): error connecting to filter: Connection refused by /var/run/spamass.sock Wilson
RE: SA Milter problem
This seems weird but as soon as I started specifying the location for the whitelist bayes SA-milter in local.cf SA-milter started to fail randomly. Could it be that SA-milter can't handle the all the email coming in? I also noticed it was more stable when I was using RBL's in sendmail. Any ideas? Wilson -Original Message- From: Craig McLean [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 12:23 PM To: Chan, Wilson Cc: Spamassassin Users List Subject: Re: SA Milter problem -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chan, Wilson wrote: Any else having this problem with spamass-milter with spamassassin? Nope. (ask a vague question...) C. - -- Craig McLeanhttp://fukka.co.uk [EMAIL PROTECTED] Where the fun never starts Powered by FreeBSD, and GIN! -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEcjndMDDagS2VwJ4RApjPAJ9wIzFBnqp7lqgZVNkfTibksaU/uACfZe/n 5MUqsaJzNJkQc+4/pjkHn0U= =3Qkr -END PGP SIGNATURE-
Bayes not learning (autolearn=failed)
Hi, Hi! My logs are showing that spamd is falling back to the nobody user. I think this is why my bayes auto-learning is always failing. Anyone know how I can fix this problem? Spec's below: /var/log/maillog May 21 08:32:26 localhost spamd[29258]: info: setuid to root succeeded May 21 08:32:26 localhost spamd[29258]: Still running as root: user not specified with -u, not found, or set to root. Fall back to nobody. CentOS v4.3 with SA SA-Milter running sendmail as a smtp proxy for another mail server. Name: spamassassin Relocations: (not relocatable) Version : 3.0.5 Vendor: CentOS Release : 3.el4 Build Date: Wed 08 Mar 2006 03:53:01 AM HST Name: spamass-milter Relocations: (not relocatable) Version : 0.3.0 Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ Release : 1.2.el4.rfBuild Date: Tue 22 Feb 2005 03:01:27 AM HST Name: sendmail Relocations: (not relocatable) Version : 8.13.1Vendor: CentOS Release : 3.RHEL4.3 Build Date: Wed 22 Mar 2006 07:18:54 AM HST [EMAIL PROTECTED] ~]# spamassassin --lint -D debug: SpamAssassin version 3.0.5 debug: Score set 0 chosen. debug: running in taint mode? yes debug: Running in taint mode, removing unsafe env vars, and resetting PATH debug: PATH included '/usr/kerberos/sbin', keeping. debug: PATH included '/usr/kerberos/bin', keeping. debug: PATH included '/usr/local/sbin', keeping. debug: PATH included '/usr/local/bin', keeping. debug: PATH included '/sbin', keeping. debug: PATH included '/bin', keeping. debug: PATH included '/usr/sbin', keeping. debug: PATH included '/usr/bin', keeping. debug: PATH included '/usr/X11R6/bin', keeping. debug: PATH included '/root/bin', which doesn't exist, dropping. debug: Final PATH set to: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbi n:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin debug: diag: module not installed: DBI ('require' failed) debug: diag: module installed: DB_File, version 1.809 debug: diag: module installed: Digest::SHA1, version 2.07 debug: diag: module installed: IO::Socket::UNIX, version 1.21 debug: diag: module installed: MIME::Base64, version 3.01 debug: diag: module installed: Net::DNS, version 0.48 debug: diag: module not installed: Net::LDAP ('require' failed) debug: diag: module not installed: Razor2::Client::Agent ('require' failed) debug: diag: module installed: Storable, version 2.13 debug: diag: module not installed: URI ('require' failed) debug: ignore: using a test message to lint rules debug: using /etc/mail/spamassassin/init.pre for site rules init.pre debug: config: read file /etc/mail/spamassassin/init.pre debug: using /usr/share/spamassassin for default rules dir debug: config: read file /usr/share/spamassassin/10_misc.cf debug: config: read file /usr/share/spamassassin/20_anti_ratware.cf debug: config: read file /usr/share/spamassassin/20_body_tests.cf debug: config: read file /usr/share/spamassassin/20_compensate.cf debug: config: read file /usr/share/spamassassin/20_dnsbl_tests.cf debug: config: read file /usr/share/spamassassin/20_drugs.cf debug: config: read file /usr/share/spamassassin/20_fake_helo_tests.cf debug: config: read file /usr/share/spamassassin/20_head_tests.cf debug: config: read file /usr/share/spamassassin/20_html_tests.cf debug: config: read file /usr/share/spamassassin/20_meta_tests.cf debug: config: read file /usr/share/spamassassin/20_phrases.cf debug: config: read file /usr/share/spamassassin/20_porn.cf debug: config: read file /usr/share/spamassassin/20_ratware.cf debug: config: read file /usr/share/spamassassin/20_uri_tests.cf debug: config: read file /usr/share/spamassassin/23_bayes.cf debug: config: read file /usr/share/spamassassin/25_body_tests_es.cf debug: config: read file /usr/share/spamassassin/25_hashcash.cf debug: config: read file /usr/share/spamassassin/25_spf.cf debug: config: read file /usr/share/spamassassin/25_uribl.cf debug: config: read file /usr/share/spamassassin/30_text_de.cf debug: config: read file /usr/share/spamassassin/30_text_fr.cf debug: config: read file /usr/share/spamassassin/30_text_nl.cf debug: config: read file /usr/share/spamassassin/30_text_pl.cf debug: config: read file /usr/share/spamassassin/50_scores.cf debug: config: read file /usr/share/spamassassin/60_whitelist.cf debug: using /etc/mail/spamassassin for site rules dir debug: config: read file /etc/mail/spamassassin/70_sare_adult.cf debug: config: read file /etc/mail/spamassassin/70_sare_bayes_poison_nxm.cf debug: config: read file /etc/mail/spamassassin/70_sare_html.cf debug: config: read file /etc/mail/spamassassin/70_sare_obfu.cf debug: config: read file /etc/mail/spamassassin/70_sare_spoof.cf debug: config: read file /etc/mail/spamassassin/70_sare_stocks.cf debug: config: read file
RE: Bayes not learning (autolearn=failed)
By default on CentOS I think it runs as root. How do you change it so that spamd is not running as root? I assume I'd have to change a parameter in /etc/rc.d/init.d/spamassassin? Thanks! Wilson -Original Message- From: Theo Van Dinter [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 9:17 AM To: users@spamassassin.apache.org Subject: Re: Bayes not learning (autolearn=failed) On Sun, May 21, 2006 at 08:40:58AM -1000, Chan, Wilson wrote: My logs are showing that spamd is falling back to the nobody user. I think this is why my bayes auto-learning is always failing. Anyone know how I can fix this problem? Spec's below: Don't run spamc as root. Or if you're doing site-wide filtering, run spamd as another user and setup a site-wide bayes db with that user's ownership/etc. -- Randomly Generated Tagline: I'm going to live forever, or die trying! -- Spider Robinson
RE: Bayes not learning (autolearn=failed)
I read the man docs and I need to specify -u username so the question is where do I put this? I create a username called spam and gave it full rights to where the bayes tok files are to be located. I tried to add it to SPAMDOPTIONS=-d -c -m5 -H -u spam Is this correct because after I restarted the service I still see the same error message. :( /etc/init.d/spamassassin #!/bin/sh # # spamassassin This script starts and stops the spamd daemon # # chkconfig: - 80 30 # processname: spamd # description: spamd is a daemon process which uses SpamAssassin to check \ # email messages for SPAM. It is normally called by spamc \ # from a MDA. # Source function library. . /etc/rc.d/init.d/functions prog=spamd # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = no ] exit 0 # Set default spamd configuration. SPAMDOPTIONS=-d -c -m5 -H -u spam SPAMD_PID=/var/run/spamassassin/spamd.pid # Source spamd configuration. if [ -f /etc/sysconfig/spamassassin ] ; then . /etc/sysconfig/spamassassin fi [ -f /usr/bin/spamd -o -f /usr/local/bin/spamd ] || exit 0 PATH=$PATH:/usr/bin:/usr/local/bin # By default it's all good RETVAL=0 # See how we were called. case $1 in start) # Start daemon. echo -n $Starting $prog: daemon $NICELEVEL spamd $SPAMDOPTIONS -r $SPAMD_PID RETVAL=$? echo if [ $RETVAL = 0 ]; then [ -n $SPAMD_PID ] ln -s $SPAMD_PID /var/run/spamd.pid touch /var/lock/subsys/spamassassin fi ;; stop) # Stop daemons. echo -n $Stopping $prog: killproc spamd RETVAL=$? echo if [ $RETVAL = 0 ]; then rm -f /var/lock/subsys/spamassassin rm -f /var/run/spamd.pid fi ;; restart) $0 stop $0 start ;; condrestart) [ -e /var/lock/subsys/spamassassin ] $0 restart ;; status) status spamd RETVAL=$? ;; *) echo Usage: $0 {start|stop|restart|status|condrestart} RETVAL=1 ;; esac exit $RETVAL Wilson -Original Message- From: Theo Van Dinter [mailto:[EMAIL PROTECTED] Sent: Sunday, May 21, 2006 11:58 AM To: users@spamassassin.apache.org Subject: Re: Bayes not learning (autolearn=failed) On Sun, May 21, 2006 at 11:16:14AM -1000, Chan, Wilson wrote: By default on CentOS I think it runs as root. How do you change it so that spamd is not running as root? I assume I'd have to change a parameter in /etc/rc.d/init.d/spamassassin? Thanks! If you read the spamd man page, it tells you how to specify the user to run as. You will also want to check out the Mail::SpamAssassin::Conf man/pod to see configuration options related to bayes_path, etc. -- Randomly Generated Tagline: Stewie: Ah! Damn it! I want pancakes. God! You people understand every language except English. Yo quiero pancakes. Dali mua pancakes. Clik clik bloody clik pancakes! - Family Guy, Love Thy Trophy