Help - Search - Members - Calendar
Full Version: How-To SpamAssassin 3.0.0 with SURBL
The Planet Forums > Control Panels > Ensim > Ensim HOWTOs
Pages: 1, 2, 3, 4
tyrnight
Updated 1/18/05 4PM


I am not a Expert HOW-TO maker, But this did work for me.. Please read entire post Before Attempting


The install is just like SpamAssassin 2.64 and I will use the HOW-TO from Jafo (Thanks Jafo!!)
http://forum.ev1servers.net/showthread.php...&threadid=42806

I will modify it to suite our needs for SA-3.0.2
----------------------------------------------------------------------

Here we go
Login as root
# su -
# LANG=C
# cd /usr/src
# wget http://apache.cs.utah.edu/spamassassin/Mai...in-3.0.2.tar.gz
# tar zxvf Mail-SpamAssassin-3.0.2.tar.gz <-----this ,of course, is what ever the "current" download name would be.
# cd Mail-SpamAssassin-3.0.2 <-----this ,of course, is what ever the "current" download name would be.

--------------------------------------
Then add/update the Net::DNS adn other needed modules perl module (especially for those using Whitebox linux/Fedora)
It doesnt hurt to do it on ALL linux flavors

perl -MCPAN -e shell

CPAN> install Net::DNS
install Time::HiRes
install DBI
install IO::Socket::SSL
install Net::Ident
install IP::Country::Fast
install Mail::SPF::Query
install Net::SMTP
install DB_File
install MIME::Base64
install MIME::QuotedPrint

exit or quit CPAN

now for the ACTUAL install
# perl Makefile.PL INSTALLDIRS=vendor
It will as a few questions..
enter in your email address you want to use, I used postmaster@mydomain.com
and enter "n" for all the rest of the questions

# make
# make test
# make install

# make distclean

make sure this next line is COMPLETE by using ONE line and all the text between the #'s or this will fail to work, starting with "perl" and ending with "vendor"

# perl Makefile.PL PREFIX=/home/virtual/FILESYSTEMTEMPLATE/spam_filter/usr SYSCONFDIR=/home/virtual/FILESYSTEMTEMPLATE/spam_filter/etc INSTALLDIRS=vendor

# make
# make test
# make install




--------------------------------------
Then we need to turn off the Auto_whitelist variable or ensim's setup will crash spamd!

pico /etc/sysconfig/spamassassin

it will say:

# Options to spamd
SPAMDOPTIONS="-d -c -a -m 5 "

Remove the "-a" from the SPAMDOPTIONS
Like so:

# Options to spamd
SPAMDOPTIONS="-d -c -m 5 "

then save it

and edit both files:
pico /etc/mail/spamassassin/local.cf
pico /home/virtual/FILESYSTEMTEMPLATE/spam_filter/etc/mail/spamassassin/local.cf

change:
rewrite_subject 1
subject_tag [SPAM]

to say:


rewrite_header Subject [SPAM]

add this line at the end:

use_auto_whitelist 1


then save it

then:
mkdir /var/www/.spamassassin
chown apache:apache -R /var/www/.spamassassin

then follow ffeingo's How-To at (thanks ffeingol)
http://www.cpguru.com/content/view/39/37/

then import all the old Bayes DB from your old stuff (makes it easier for it to take the old Learing DB and implement it in the new DB)

service spamassassin stop
sa-learn --import -D
sa-learn --sync -D


--------------------------------------

Then we need to upgrade all the domains to include the latest spamd, this will reset the Spam filter flags
I had some erroneous errors but it was safe to ignore them (i.e. I had some sites with spam checking turned off, this will turn them back on)

# mkdir /root/stuff
# cd /root/stuff
# pico -w upgrade-spamass

Then paste the following into the editor:

#!/bin/sh

cd /home/virtual

for site in site*; do
echo "upgrading $site ..."
/usr/local/bin/EditVirtDomain -c spam_filter,enabled=0 $site
/usr/local/bin/EditVirtDomain -c spam_filter,enabled=1 $site
done

Then hit CTRL-X to save the file.

# chmod u+x upgrade-spamass
# ./upgrade-spamass

as stated by Jafo:
Now sit back and watch. You will see it disable/enable spamassassin for each Ensim account, upgrading the spamassassin files at the same time. (Yes there are other ways to do it but this is easy). If you do NOT want spamassassin enabled in all of your Ensim accounts then you'll need to come up with a way to do it selectively.

now, I do maintanance JUST incase :


/usr/local/sbin/set_pre_maintenance
/usr/local/sbin/set_maintenance
/usr/local/sbin/set_post_maintenance
/sbin/service webppliance restart


And do a restart of mailscanner and SpamAssassin (I know the pre maintanance does this.. but just to see any errors.)

/sbin/service MailScanner restart
/sbin/service spamassassin restart

You may want to just do a server restart, as somtimes spamd doesnt restart correctly

NOW!!!! let SpamAssassin check 200 spams and its bayesian filters will learn from those spams.. and the more you use it the better it gets

I use the MailScanner MailWatch to view my statistics:
http://forums.ev1servers.net/showthread.ph...&threadid=45146

I did notice a increase in spams and it decreased after 20 minutes or so..

once again I am not a HOW-To writer.. and I did this for my own sake..

USE AT YOUR OWN RISK!! and this was tested on Ensim 4.0.2

I also use DCC and RAZOR2 and RulesDeJour, I will make a how to for those shortly...

Recommended!!!!
CYBERLOT made a Razor2 How-to:
Here
tyrnight
here is my /etc/mail/spamassassin/spamcop_uri.cf file
incase you want to check yours against mine


____________________________________________________

#SpamAssasin Version 3

urirhsbl URIBL_SC_SURBL sc.surbl.org. A
header URIBL_SC_SURBL eval:check_uridnsbl('URIBL_SC_SURBL')
describe URIBL_SC_SURBL Contains a URL listed in the sc.surbl.org blocklist
tflags URIBL_SC_SURBL net
score URIBL_SC_SURBL 4.0

urirhsbl URIBL_WS_SURBL ws.surbl.org. A
header URIBL_WS_SURBL eval:check_uridnsbl('URIBL_WS_SURBL')
describe URIBL_WS_SURBL Contains a URL listed in sa-blacklist
tflags URIBL_WS_SURBL net
score URIBL_WS_SURBL 3.0

urirhsbl URIBL_OB_SURBL ob.surbl.org. A
header URIBL_OB_SURBL eval:check_uridnsbl('URIBL_OB_SURBL')
describe URIBL_OB_SURBL Contains a URL listed in ob.surbl.org
tflags URIBL_OB_SURBL net
score URIBL_OB_SURBL 4.0

urirhsbl URIBL_AB_SURBL ab.surbl.org. A
header URIBL_AB_SURBL eval:check_uridnsbl('URIBL_AB_SURBL')
describe URIBL_AB_SURBL Contains a URL listed in ab.surbl.org
tflags URIBL_AB_SURBL net
score URIBL_AB_SURBL 5.0



# old SpamAssassin 2.xx - will not work for 3.xx
# open redirect resolution off by default
# spamcop_uri_resolve_open_redirects 1

#open_redirect_list_spamcop_uri snurl.com *.snurl.com
#open_redirect_list_spamcop_uri snipurl.com *.snipurl.com
#open_redirect_list_spamcop_uri tinyclick.com *.tinyclick.com
#open_redirect_list_spamcop_uri babyurl.com *.babyurl.com
#open_redirect_list_spamcop_uri lin.kz *.lin.kz
#open_redirect_list_spamcop_uri *.v3.net
#open_redirect_list_spamcop_uri shorl.com *.shorl.com
#open_redirect_list_spamcop_uri tinyurl.com *.tinyurl.com
#open_redirect_list_spamcop_uri xurl.us


# whitelist_spamcop_uri *.yahoo.com
# blacklist_spamcop_uri *medz4cheap.com
mlx
Does this really work fine on your server?

I did the upgrade right away yesterday on my RHEL/Ensim 4.0.2 server. It seemed to work fine, but now I've noticed that I'm receiving some emails which haven't been checked at all. No X-Spam headers at all. While some/most are checked fine. Very confusing to me. I didn't follow your how-to though. So I'm not sure ... maybe it's just my mistake, but if anyone else should have the same problem and has an idea please let me know.

And by the way, if you still want to mark the spammails with the [SPAM] tag you need to:

# pico /etc/mail/spamassassin/local.cf

replace:
CODE
rewrite_subject 1

subject_tag [SPAM]


with:
CODE
rewrite_header Subject [SPAM]


To get all of your domains updated afterwards you will need to follow that part of the how-to again.
tyrnight
I added your edit to the how-to and as I go along I'll add more..

Here is a tag from an email:

X-Spam-Status: No, score=2.1 required=5.0 tests=FROM_ENDS_IN_NUMS,HTML_90_100,
HTML_FONT_BIG,HTML_MESSAGE,MIME_HTML_ONLY autolearn=no version=3.0.0


so it is working..
lets see how far we get.. LOL

also dont forget to do this

sa-learn --import -D
sa-learn --sync -D
Aidden
Edit: Sorry jsut realized this was a source update, and answeredmy own question icon_smile.gif
ffeingol
unless I'm missing something, there is still a small "gotcha" with this. In each users home directory there is a .spamassassin/user_prefs In this file there is also the "rewrite_subject" and "subject_tag" Each users user_prefs would need to be converted to the new rewrite_header format (I'm working on a script to do that). The rub is if they go into the control panel and change the subject. It will overrite the user_prefs and put it back to the old format.

Frank
tyrnight
Definetly! If you make a script, we should add it above.. let me know, and full credit to you for figuring it out.. icon_smile.gif


I have had no issues so far.. but we'll see what happens
ffeingol
OK, it's only been VERY lightly tested on a couple of domain test server, but ...

http://www.cpguru.com/content/view/39/37/

Frank
tyrnight
you need to change the ls command

you forgot the fst part

ls /home/virtual/site*/fst/home/*/.spamassassin/user_prefs

thanks for the help!!
icon_smile.gif
ffeingol
Sorry, made a typo and missed the /fst. It should be:

/home/virtual/site*/fst/home/*/.spamassassin/user_prefs

how-to updated.

Frank
aussie
You guys forgot to mention that if you were using Bayes, you must update the old database to the new 3.0 format or you will be v2 db errors in your maillogs;

1) Stopping exim or whatever mail server your running
2) If spamd is running, turn it off
3) run sa-learn --sync

Restart everthing, make sure your old db has been upgraded by watching for db issues in the maillogs.
tyrnight
that is listed in the how-to

QUOTE
service spamassassin stop
sa-learn --import -D
sa-learn --sync -D
aussie
Oh sorry, i missed that!
flippy
Sorry for the dual post, but here it is again(i previously posted it in the wrong thread).

I've followed these instructions. It compiles/installs correctly, but has errors in /var/maillog when scanning messages. It appears to intermittently work. Any help would be great! Compiled from source Sep 21 19:59 Mail-SpamAssassin-current.tar.gz from the spamassassin.apache.org site. What security level are your sites set at. Since usernames work differently for insecure(i.e. in the real /etc/passwd) or secure sites(in the chrooted filesystem's etc/passwd).

Here is the log file results, with username and hostname changed:


Sep 27 00:05:26 hostname spamd[6373]: connection from localhost.localdomain [127.0.0.1] at port 48127
Sep 27 00:05:27 hostname spamd[6373]: handle_user: unable to find user 'user@domain.com'!
Sep 27 00:05:27 hostname spamd[6373]: Still running as root: user not specified with -u, not found, or set to root. Fall back to nobody.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in pattern match (m//) at /usr/bin/spamd line 1046, line 4.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in pattern match (m//) at /usr/bin/spamd line 1047, line 4.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in concatenation (.) or string at /usr/bin/spamd line 1049, line 4.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in concatenation (.) or string at /usr/bin/spamd line 1049, line 4.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in scalar assignment at /usr/bin/spamd line 1050, line 4.
Sep 27 00:05:27 hostname spamd[6373]: fatal: setuid to nobody failed
Sep 27 00:05:27 hostname spamd[6373]: error: Died at /usr/bin/spamd line 1053, line 4._ , continuing
tyrnight
QUOTE
Originally posted by flippy
Sorry for the dual post, but here it is again(i previously posted it in the wrong thread).

I've followed these instructions. It compiles/installs correctly, but has errors in /var/maillog when scanning messages. It appears to intermittently work. Any help would be great! Compiled from source Sep 21 19:59 Mail-SpamAssassin-current.tar.gz from the spamassassin.apache.org site. What security level are your sites set at. Since usernames work differently for insecure(i.e. in the real /etc/passwd) or secure sites(in the chrooted filesystem's etc/passwd).

Here is the log file results, with username and hostname changed:


Sep 27 00:05:26 hostname spamd[6373]: connection from localhost.localdomain [127.0.0.1] at port 48127
Sep 27 00:05:27 hostname spamd[6373]: handle_user: unable to find user 'user@domain.com'!
Sep 27 00:05:27 hostname spamd[6373]: Still running as root: user not specified with -u, not found, or set to root. Fall back to nobody.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in pattern match (m//) at /usr/bin/spamd line 1046, line 4.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in pattern match (m//) at /usr/bin/spamd line 1047, line 4.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in concatenation (.) or string at /usr/bin/spamd line 1049, line 4.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in concatenation (.) or string at /usr/bin/spamd line 1049, line 4.
Sep 27 00:05:27 hostname spamd[6373]: Use of uninitialized value in scalar assignment at /usr/bin/spamd line 1050, line 4.
Sep 27 00:05:27 hostname spamd[6373]: fatal: setuid to nobody failed
Sep 27 00:05:27 hostname spamd[6373]: error: Died at /usr/bin/spamd line 1053, line 4._ , continuing


I have never seen this error before.. but I did a search on google.. and it looks to be pearl related..

http://www.google.com/search?hl=en&ie=ISO-...G=Google+Search

or http://article.gmane.org/gmane.mail.spam.s...n.general/55225
flippy
The main problem is perl trying to find the user, and since it can't, it obviously produces these unitialized value errors. So the main problem is :

Sep 27 00:05:27 hostname spamd[6373]: handle_user: unable to find user 'user@domain.com'!

Does anyone know how ensim handles user authentication?
terry
Hi I have the same problem...
Does anyone found a fix to this:
spamd[5519]: handle_user: unable to find user
tyrnight
this SURBL works purfectly for me and I never had this issue
flippy
My solution to the problem terry references, i.e. perl not finding the correct user/homedir is to eliminate the use of user config files. Its a bad fix, since individual users cannot customize it. But it works for me.

Just change the options in /etc/sysconfig/spamassassin and restart spamassassin.
tyrnight
.
Catalyst
QUOTE
Originally posted by flippy
My solution to the problem terry references, i.e. perl not finding the correct user/homedir is to eliminate the use of user config files. Its a bad fix, since individual users cannot customize it. But it works for me.

Just change the options in /etc/sysconfig/spamassassin and restart spamassassin.


Won't help in this case ... Procmailrc runs Spamc using the User/Domain it's passed.

CODE
:0 fw

| /usr/bin/spamc -u "${LOGNAME}@${HOSTNAME}"


Even if you disable User Config files, it still attempts to run Spamc as that user. And ... If someone address the mail to "LegitmateUserName@SomeDomain.Tld," then spamc tries to use it literally, instead of "legitimateusername@somedomain.tld" --- and of course, it errors out. It's merely an issue of Case Sensitivity. Try it out.

Can't think of a quick and dirty way to fix it, either, since LOGNAME and HOSTNAME would have to be checked with the user table PRIOR to being sent to Procmail for processing... There used to be a Sendmail setting for that...
cian
Worked a dream, thanks Used this with your mailscanner / mailwatch howto :-)

Thanks for a great contribution

Ensim 4.0.2|8
cian
After stucking on MailWatch and looking at SpamAssassin LINT, I noticed a few warnings

Stuff that I'm wondering about - should I be concerned / take action?
CODE
debug: mkdir /var/www/.spamassassin failed: mkdir /var/www/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin.pm line 1442

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: mkdir /var/www/.spamassassin failed: mkdir /var/www/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin.pm line 1442

lint: 6 issues detected. please rerun with debug enabled for more information.


Full LINT

CODE
debug: SpamAssassin version 3.0.1  

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 '/sbin', keeping.

debug: PATH included '/usr/sbin', keeping.

debug: PATH included '/bin', keeping.

debug: PATH included '/usr/bin', keeping.

debug: PATH included '/usr/X11R6/bin', keeping.

debug: Final PATH set to: /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin

debug: diag: module installed: DBI, version 1.32

debug: diag: module installed: DB_File, version 1.806

debug: diag: module installed: Digest::SHA1, version 2.01

debug: diag: module installed: IO::Socket::UNIX, version 1.2

debug: diag: module installed: MIME::Base64, version 2.12

debug: diag: module installed: Net::DNS, version 0.31

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.06

debug: diag: module installed: URI, version 1.21

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/local.cf

debug: mkdir /var/www/.spamassassin failed: mkdir /var/www/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin.pm line 1442

debug: using "/etc/MailScanner/spam.assassin.prefs.conf" for user prefs file

debug: config: read file /etc/MailScanner/spam.assassin.prefs.conf

debug: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC

debug: plugin: registered Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc)

debug: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC

debug: plugin: registered Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8c245f4)

debug: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC

debug: plugin: registered Mail::SpamAssassin::Plugin::SPF=HASH(0x8c07860)
cian
Continues (10000 char limit)
CODE


debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) implements 'parse_config'

debug: plugin: Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8c245f4) implements 'parse_config'

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) inhibited further callbacks

warning: score set for non-existent rule X_OSIRU_DUL_FH

warning: score set for non-existent rule RCVD_IN_OSIRUSOFT_COM

warning: score set for non-existent rule X_OSIRU_SPAM_SRC

warning: score set for non-existent rule X_OSIRU_OPEN_RELAY

warning: score set for non-existent rule X_OSIRU_SPAMWARE_SITE

warning: score set for non-existent rule X_OSIRU_DUL

debug: bayes: Using username: apache

debug: bayes: Database connection established

debug: bayes: found bayes db version 3

debug: bayes: Using userid: 15

debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB < 200

debug: Score set 1 chosen.

debug: ---- MIME PARSER START ----

debug: main message type: text/plain

debug: parsing normal part

debug: added part, type: text/plain

debug: ---- MIME PARSER END ----

debug: bayes: Database connection established

debug: bayes: found bayes db version 3

debug: bayes: Using userid: 15

debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB < 200

debug: metadata: X-Spam-Relays-Trusted:

debug: metadata: X-Spam-Relays-Untrusted:

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) implements 'parsed_metadata'

debug: Net::DNS version is 0.31, but need 0.34

debug: decoding: no encoding detected

debug: Running tests for priority: 0

debug: running header regexp tests; score so far=0

debug: registering glue method for check_hashcash_double_spend (Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8c245f4))

debug: registering glue method for check_for_spf_helo_pass (Mail::SpamAssassin::Plugin::SPF=HASH(0x8c07860))

debug: all '*From' addrs: [email]ignore@compiling.spamassassin.taint.org[/email]

debug: registering glue method for check_hashcash_value (Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8c245f4))

debug: all '*To' addrs:

debug: registering glue method for check_for_spf_softfail (Mail::SpamAssassin::Plugin::SPF=HASH(0x8c07860))

debug: registering glue method for check_for_spf_pass (Mail::SpamAssassin::Plugin::SPF=HASH(0x8c07860))

debug: registering glue method for check_for_spf_helo_softfail (Mail::SpamAssassin::Plugin::SPF=HASH(0x8c07860))

debug: registering glue method for check_for_spf_helo_fail (Mail::SpamAssassin::Plugin::SPF=HASH(0x8c07860))

debug: running body-text per-line regexp tests; score so far=-2.623

debug: running uri tests; score so far=-2.623

debug: registering glue method for check_uridnsbl (Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc))

debug: Razor2 is not available

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) implements 'check_tick'

debug: running raw-body-text per-line regexp tests; score so far=-2.623

debug: running full-text regexp tests; score so far=-2.623

debug: Razor2 is not available

debug: Current PATH is: /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin

debug: Pyzor is not available: pyzor not found

debug: DCCifd is not available: no r/w dccifd socket found.

debug: DCC is not available: no executable dccproc found.

debug: Running tests for priority: 500

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc) implements 'check_post_dnsbl'

debug: running meta tests; score so far=-2.623

debug: running header regexp tests; score so far=-1.053

debug: running body-text per-line regexp tests; score so far=-1.053

debug: running uri tests; score so far=-1.053

debug: running raw-body-text per-line regexp tests; score so far=-1.053

debug: running full-text regexp tests; score so far=-1.053

debug: Running tests for priority: 1000

debug: running meta tests; score so far=-1.053

debug: running header regexp tests; score so far=-1.053

debug: mkdir /var/www/.spamassassin failed: mkdir /var/www/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin.pm line 1442

No such file or directory

debug: open of AWL file failed: lock: 19435 cannot create tmp lockfile /var/www/.spamassassin/auto-whitelist.lock.secure1.draiocht.com.19435 for /var/www/.spamassassin/auto-whitelist.lock: No such file or directory

debug: Post AWL score: -1.053

debug: running body-text per-line regexp tests; score so far=-1.053

debug: running uri tests; score so far=-1.053

debug: running raw-body-text per-line regexp tests; score so far=-1.053

debug: running full-text regexp tests; score so far=-1.053

debug: is spam? score=-1.053 required=5

debug: tests=ALL_TRUSTED,MISSING_DATE,MISSING_SUBJECT,NO_REAL_NAME

debug: subtests=__HAS_MSGID,__MSGID_OK_DIGITS,__MSGID_OK_HOST,__SANE_MSGID,__UNUSABLE_M
SGID

lint: 6 issues detected. please rerun with debug enabled for more information.
tyrnight
just create a .spamassassin dir and that will correct that error. Its not important.. but I like clean logs.. so just do this..

mkdir /var/www/.spamassassin

that should do it..

now for the rest of the config..

[PHP]
warning: score set for non-existent rule X_OSIRU_DUL_FH
warning: score set for non-existent rule RCVD_IN_OSIRUSOFT_COM
warning: score set for non-existent rule X_OSIRU_SPAM_SRC
warning: score set for non-existent rule X_OSIRU_OPEN_RELAY
warning: score set for non-existent rule X_OSIRU_SPAMWARE_SITE
warning: score set for non-existent rule X_OSIRU_DUL
[/PHP]

just open up :
pico /etc/MailScanner/spam.assassin.prefs.conf

find section :
# Osirusoft is dead
score RCVD_IN_OSIRUSOFT_COM 0.0
score X_OSIRU_OPEN_RELAY 0.0
score X_OSIRU_DUL 0.0
score X_OSIRU_SPAM_SRC 0.0
score X_OSIRU_SPAMWARE_SITE 0.0
score X_OSIRU_DUL_FH 0.0

and put #'s in front of all of the score
like:

# Osirusoft is dead
#score RCVD_IN_OSIRUSOFT_COM 0.0
#score X_OSIRU_OPEN_RELAY 0.0
#score X_OSIRU_DUL 0.0
#score X_OSIRU_SPAM_SRC 0.0
#score X_OSIRU_SPAMWARE_SITE 0.0
#score X_OSIRU_DUL_FH 0.0

and ctrl-x and save

service MailScanner restart
service spamassassin restart

this is due to the fact SA 3 doesnt like it anymore as OSIRUS SOFT is a dead list and it doesnt under stand what it is.. it was removed from SA version 3

you can safely ignore the

[PHP]
debug:plugin:Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c6cc)inhibitedfurthe
r callbacks
[/PHP]
Your Lint should be clean from that point on.. :)
cian
Thanks,

I repeat your howtos were amazing, just after I got them done I started getting mailbombed as a result of someone spamming and faking me as a sender - They were coming in almost every second until I DNSed them away, and the system stayed up without dragging everything else down to a snails pace.

Next release of sendmail should autosend hatemail to sysops of these servers for Unsolicated Technical Email (UTE) - telling me a spam i didn't send was rejected. hehehe.

Cian
tyrnight
Actually that is built in MailScanner.. to the sender email address(not sysop)
But its not wise to use.. as the return address is ALWAYS fake.. and youll always get Mail failed to your ROOT account.. way to annoying, just as bad as the spam itself
cian
I still have permissions errors on the .spammassassin folder, who should I chown it to?

CODE
debug: open of AWL file failed: lock: 23751 cannot create tmp lockfile /var/www/.spamassassin/auto-whitelist.lock.secure1.draiocht.com.23751 for /var/www/.spamassassin/auto-whitelist.lock: Permission denied

Doesn't autowhitelist break ensim's setup?

Also as you are about, what does this mean:
CODE
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c7f8) inhibited further callbacks

Thanks for all your help this evening!

Cian
cian
Probablly a result of the obscene load I just had, but I'm getting a few cron messages:
(HTML EMAIL)


Warning: fopen(/home/virtual/FILESYSTEMTEMPLATE/services/sendmail/mqueue.scanned/qfiAE4Iv0a022915): failed to open stream: No such file or directory in /usr/local/bin/mailq.php on line 35

I do not get this for every message, just now and then - and I was running a load up to 4, now down under .3 at last after a DNS change.
tyrnight
Autowhitelist is ok to use if you use the settings from the how-to..


do this :
chown apache:apache -R /var/www/.spamassassin

restart MailScanner and spamassassin
tyrnight
QUOTE
Originally posted by cian
Probablly a result of the obscene load I just had, but I'm getting a few  cron messages:
(HTML EMAIL)


Warning:  fopen(/home/virtual/FILESYSTEMTEMPLATE/services/sendmail/mqueue.scanned/qfiAE4Iv0a022915): failed to open stream: No such file or directory in /usr/local/bin/mailq.php on line 35

I do not get this for every message, just now and then - and I was running a load up to 4, now down under .3 at last after a DNS change.


I get these now and then aswell but its ok to ignore.. Im gonna reseach it and find out as I only get about 1 a week, and I get over 4000 spams through my server a day
tyrnight
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c7f
icon_cool.gif inhibited further callbacks

this is still alien to me.. but I think it has to do with the # of running SpamAssassin's allowed to run on the system.. SA 3.0.0 only had like 4 of these messages.. SA 3.0.1 has a whole long list.. but its ok..
cian
It's probablly a result of mailq being too slow in a highly dynamic situation, and it doesnt get more so than I had recently - it's fine - thanks. My logs show I was getting hit by up 2 emails a second - talk about a baptism of fire! :-)

Cian

QUOTE
Originally posted by tyrnight
I get these now and then aswell but its ok to ignore.. Im gonna reseach it and find out as I only get about 1 a week, and I get over 4000 spams through my server a day
Catalyst
QUOTE
Originally posted by tyrnight
debug: plugin:  Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x849c7f
icon_cool.gif inhibited further callbacks

this is still alien to me.. but I think it has to do with the # of running SpamAssassin's allowed to run on the system.. SA 3.0.0 only had like 4 of these messages.. SA 3.0.1 has a whole long list.. but its ok..


It's due to be fixed in the next version ... Still dead on 3.0.1.
DomineauX
This is very much an issue:

handle_user: unable to find user 'realuser@realdomain.com'!
Still running as root: user not specified with -u, not found, or set to root. Fall back to nobody.
Use of uninitialized value in pattern match (m//) at /usr/bin/spamd line 1047, line 4.
Use of uninitialized value in pattern match (m//) at /usr/bin/spamd line 1048, line 4.
Use of uninitialized value in concatenation (.) or string at /usr/bin/spamd line 1050, line 4.
Use of uninitialized value in concatenation (.) or string at /usr/bin/spamd line 1050, line 4.
Use of uninitialized value in scalar assignment at /usr/bin/spamd line 1051, line 4.
fatal: setuid to nobody failed
error: Died at /usr/bin/spamd line 1054, line 4._ , continuing




This is not due to case sensitivity, and I have confirmed also that this is not due to mail addressed to email aliases either.

Anyone have an actual resolution to this?


I suggest everyone try the following to see if this issue is effecting your mail as well:

#grep 'handle_user: unable to find user' /var/log/maillog
DomineauX
--just FYI--

This error also does not have to do with security levels of sites as I have confirmed that these errors are occuring with sites on high security mode as well as 3.1 compat mode.
Catalyst
QUOTE
This is not due to case sensitivity, and I have confirmed also that this is not due to mail addressed to email aliases either.


Look at the line

  • handle_user: unable to find user 'realuser@realdomain.com'!


Look at this error in context: open your sendmail log and check out the Message that's being delivered when this occurrs (the lines immediately preceeding the error). You will find that the user is "realuser@REALDOMAIN.COM" or "RealUser@RealDomain.com" or "Realuser@Realdomain.com" or something of that nature. The problem is that Sendmail is accepting the mail as legitimate because the user exists, and Procmail is using a literal translation of $USER@$DOMAIN. When there's a case issue, it pukes.

Another thing ... Type "spamassassin --lint" and see if it pops up with any errors. (Yeah, people keep telling me, "spamassassin -D --lint" --- personally, I don't feel like hand-picking through 3000-ish lines of useless information to hunt for a bug that I can get just as easily with using the Debug flag).

And still another thing ... perl-Net-DNS on Fedora & RHEL are stuck at 0.31. SA requires .34 to function. There are Dag updates out there for perl-Net-DNS-0.38. You'll need to recompile SA once you get it.
DomineauX
As I mentioned, I have confirmed that the issue has nothing to do with case sensitivity as the maillog shows the mail being handled as for the user with their entire address in lower case and perfectly correct.


##Here is the output of --lint
[root@ns01 mail]# spamassassin --lint
You have new mail in /var/spool/mail/root
[root@ns01 mail]#


I edited the /etc/sysconfig/spamassassin file to disable the use of user preference files and the error is gone, but this can only be a temp solution as users will soon notice that their prefs aren't being followed.
DomineauX
Also I did install Net::DNS
cian
QUOTE
Originally posted by tyrnight
I get these now and then aswell but its ok to ignore.. Im gonna reseach it and find out as I only get about 1 a week, and I get over 4000 spams through my server a day


I just looked at
/home/virtual/FILESYSTEMTEMPLATE/spam_filter/etc/mail/spamassassin/local.cf and see a quite different file

CODE
# This is the right place to customize your installation of SpamAssassin.

#

# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be

# tweaked.

#

###########################################################################

#

# rewrite_header Subject *****SPAM*****

# report_safe 1

# trusted_networks 212.17.35.

# lock_method flock

rewrite_header Subject [SPAM]

use_auto_whitelist 1

# Enable the Bayes system

bayes_store_module      Mail::SpamAssassin::BayesStore::SQL

bayes_sql_dsn           DBI:mysql:spamassassin:localhost

bayes_sql_username      spamassassin

bayes_sql_password      spamassassin

use_bayes               1

bayes_auto_learn        1


Would that FLOCK off cause this error, Still getting it every other hour and I suspect not all email is going through SA.

Cian
cian
QUOTE
Originally posted by tyrnight
[B]Updated 11/14/04 4PM


perl -MCPAN -e shell

CPAN> install Net::DNS


I have noticed some rbl type tests may not be running, and there was a warning during install about a version of Net::DNS that was too old.

Mailwatch/Mailscanner SA Lint shows Net::DNS V 0.31

But CPAN untterly insists that I have 0.48

Help - what am I doing wrong?

Cian

CODE
cpan> get Net::DNS

Running get for module Net::DNS

 Is already unwrapped into directory /root/.cpan/build/Net-DNS-0.48



cpan> make Net::DNS

Running make for module Net::DNS

Running make for C/CR/CREIN/Net-DNS-0.48.tar.gz

 Is already unwrapped into directory /root/.cpan/build/Net-DNS-0.48

 Has already been processed within this session



cpan> install Net::DNS

Net::DNS is up to date.



cpan> test Net::DNS

---SNIP--

All tests successful, 2 tests and 7 subtests skipped.

Files=20, Tests=825, 17 wallclock secs ( 3.65 cusr +  0.32 csys =  3.97 CPU)

 /usr/bin/make test -- OK
tyrnight
QUOTE
Originally posted by cian
I just looked at  
/home/virtual/FILESYSTEMTEMPLATE/spam_filter/etc/mail/spamassassin/local.cf and see a quite different file

CODE
# This is the right place to customize your installation of SpamAssassin.

#

# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be

# tweaked.

#

###########################################################################

#

# rewrite_header Subject *****SPAM*****

# report_safe 1

# trusted_networks 212.17.35.

# lock_method flock

rewrite_header Subject [SPAM]

use_auto_whitelist 1

# Enable the Bayes system

bayes_store_module      Mail::SpamAssassin::BayesStore::SQL

bayes_sql_dsn           DBI:mysql:spamassassin:localhost

bayes_sql_username      spamassassin

bayes_sql_password      spamassassin

use_bayes               1

bayes_auto_learn        1
 

Would that FLOCK off cause this error, Still getting it every other hour and I suspect not all email is going through SA.

Cian


Make sure that: /home/virtual/FILESYSTEMTEMPLATE/spam_filter/etc/mail/spamassassin/local.cf

says the same as the /etc/mail/spamassassin/local.cf
you may want to make sure to make a backup of home/virtual/FILESYSTEMTEMPLATE/spam_filter/etc/mail/spamassassin/local.cf and copy the one from /etc/mail/spamassassin/local.cf to that location.. I made sure mine was the same and its been working flawlessly.

the rewrite_header is important to be the updated version.. Ill update the howto to reflect this..
Mine has been working great even though it wasnt modified.. but it doesnt hurt to make it correct..
miplhost
We have EnsimPro server with RedHat Enterprise Linux running with SpamAssassin 2.55 version running.

Whenever we enable SPAM and AV on a particular name-based site, all its users get a spam score of 5 in Spam Tolerance Level, by default.

Can we change the settings somewhere so that the default score is always 10.

Have you done this setting before ?

Also, is this possible that all the mails filtered and tagged as SPAM, Virus and Dangerous Content are automatically forwarded to a single admin mail ID instead of all individual users.

any spotlights ??
tyrnight
QUOTE
Originally posted by miplhost
We have EnsimPro server with RedHat Enterprise Linux running with SpamAssassin 2.55 version running.

Whenever we enable SPAM and AV on a particular name-based site, all its users get a spam score of 5 in Spam Tolerance Level, by default.

Can we change the settings somewhere so that the default score is always 10.

Have you done this setting before ?

Also, is this possible that all the mails filtered and tagged as SPAM, Virus and Dangerous Content are automatically forwarded to a single admin mail ID instead of all individual users.

any spotlights ??


all of this is possible through the each users control panel settings, individually.. or you could try editing a line in :

/etc/MailScanner/spam.assassin.prefs.conf

to say

required_hits 10


and the forwarding part is set through the /etc/MailScanner/MailScanner.conf file,

Spam Actions = youradminemailaddress@domain.com
High Scoring Spam Actions = delete

this setting is a GLOBAL SETTING for the WHOLE server.. not just a single domain..

and I wouldnt recommend all spam getting forwarded to a admin account.. my server handles over 4000 emails a day, and only 100 may be good emails.
cian
Yep, I've been struggling to find out why no remote testing is working and have made some progress.. found the problem, but not the solution yet.

I followed the HOW-TO instructions on how to update Net::DNS, and CPAN now reports it as 0.48 - but perldiver and spamassassin LINT are both complaining about version 0.31.

find . got to work, and I discovered two version in there - CPAN had installed it in the wrong place?

/usr/lib/perl5/vendor_perl/5.8.0/Net/DNS.pm
was seen by virtual sites and the main accounts (root and others). This is version 0.31 as confirmed by picoing it. Found with find & perldiver.

/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm
is where I found 0.48, and this is not a part of the virtual system, only the main server accounts see it. /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/ is on virtual, but no /Net subdirectory.

I forceably copied the DNS module to the old location - time will tell if it works, and I didn't break something else. LINT seems happy.
cian
QUOTE
Originally posted by tyrnight
here is my /etc/mail/spamassassin/spamcop_uri.cf file  
incase you want to check yours against mine


____________________________________________________

#SpamAssasin Version 3  

urirhsbl  URIBL_SC_SURBL  sc.surbl.org.   A
header    URIBL_SC_SURBL  eval:check_uridnsbl('URIBL_SC_SURBL')
describe  URIBL_SC_SURBL  Contains a URL listed in the sc.surbl.org blocklist
tflags    URIBL_SC_SURBL  net
score URIBL_SC_SURBL    4.0

-SNIP, rest has same issue-

I think this file won't work on 3.0.1, see http://www.surbl.org/quickstart.html

"Important Note Regarding SpamAssassin 3.0.1 and later: When adding URIDNSBL rules, including SURBL or SBL ones using urirhsbl, urirhssub or uridnsbl, be sure to set the rule type to body. For example:" etc..

It is now working, I used etc/mail/spamassassin/spamcop_uri.cf
CODE
urirhssub URIBL_JP_SURBL  multi.surbl.org.        A   64

body      URIBL_JP_SURBL  eval:check_uridnsbl('URIBL_JP_SURBL')

describe  URIBL_JP_SURBL  Has URI in JP at [url]http://www.surbl.org/lists.html[/url]

tflags    URIBL_JP_SURBL  net



score URIBL_JP_SURBL    4.0


Also - there is a test you can run :-)
CODE
2. Send yourself a message from an external email account and include the URI [url]http://surbl-org-permanent-test-point.com[/url] in the email.



i.      The rule “SPAMCOP_URI_RBL” should trigger on your test message.

Thanks to http://www.aldridge-borden.com/surbl.html for this. Test worked for me. It may only show in the message if the 4.0 points (selected above) is your spam threshold, just change your threshold to 4 for this test.

Cian
plattapuss
Hello,

After a little googling I found this patch for the inhibited futher callbacks warning. If applied the patch to all the PluginHandler.pm files on the server minus the virtual site ones. I then reran a lint test of spamassassin and the warnings were gone.

Here is the link:

http://bugzilla.spamassassin.org/show_bug.cgi?id=3931

If those warnings are annoying to you this is the solution. At least it worked for.

Enjoy.
tyrnight
I started this Howto with version 3.00 then 3.01 came out so...
in order to make the upgrade from 3.00 to 3.01 I had to do some CPAN updates..

perl -MCPAN -e shell

CPAN> install Mail:SpamAssassin

CPAN> install URI

CPAN>exit

this will just update the perl modules

this some how made thing runn alot better.. so if any of you have this case, try that out...
plattapuss
First off, I think you might have meant CPAN> install Mail::SpamAssassin? Assuming yes, then my SpamAssassin was already up to date.

Second, The last two problems I have, have not been referenced here or anywhere else I don't think. Here is a partial output from Lint showing the errors:

CODE
debug: mkdir /root/.spamassassin failed: mkdir /root/.spamassassin:

Permission denied at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin.pm

line 1442

debug: bayes: no dbs present, cannot tie DB R/O:

/root/.spamassassin/bayes_toks


I get the feeling that it should be looking at /var/www/.spamassassin which I created as per the howto. Does anyone know why I have this and how I can fix it? I would presume the second error above stems from the first problem. Incidently, the /root/.spamassassin directory already exists. I tried removing it and the error stayed the same.

Much appreciated. Excellent how to by the way!
tyrnight
try this manually

mkdir /var/www/.spamassassin
chown apache:apache -R /var/www/.spamassassin
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.