working solution for rbl on debian
I have everything to make it work, i especially want to thank you shadowman cause of something on one of the posts you linked to or whatever i was able to finally get a working solution. Now just to see how many rbls i can load in without it cr4pp1ng out.
Install xinetd, create two files inside of /etc/xinet.d
one called smtp and the other called smtps
inside of each it should read as follows.
service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = -Rt0 /usr/sbin/rblsmtpd -r sbl-xbl.spamhaus.org -r bl.spamcop.net /var/qmail/bin/relaylock /var/qmail /bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
edit your /etc/default/spamassassin file so it looks like this. ***make note yours has a -L which prevents it from doing network lookups, remove the -L ***
# /etc/default/spamassassin
# Duncan Findlay
# WARNING: please read README.spamd before using.
# There may be security risks.
# Change to one to enable spamd
ENABLED=1
# Options
# See man spamd for possible options. The -d option is automatically added.
# NOTE: version 3.0.x has switched to a "preforking" model, so you
# need to make sure --max-children is not set to anything higher than
# 5, unless you know what you're doing.
OPTIONS="--create-prefs --max-children 5 --helper-home-dir -s /var/log/spamd.log"
# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.
PIDFILE="/var/run/spamd.pid"
edit your /etc/spamassassin/init.pre it should
look like below.
###########################################################################
# RelayCountry - add metadata for Bayes learning, marking the countries
# a message was relayed through
#
loadplugin Mail::SpamAssassin:
lugin::RelayCountry
# URIDNSBL - look up URLs found in the message against several DNS
# blocklists.
#
loadplugin Mail::SpamAssassin:
lugin::URIDNSBL
# Hashcash - perform hashcash verification.
#
loadplugin Mail::SpamAssassin:
lugin::Hashcash
# SPF - perform SPF verification.
#
loadplugin Mail::SpamAssassin:
lugin::SPF
next you need to make sure you have all of these perl modules loaded as follows.
run this.
perl -MCPAN -e shell
the first time this is done its going to force you setup your perl distro if its not already done, follow the prompts and if you want to make it a bit easier/faster on you when you get the mirrors part test each of the mirrors by opening up another window and just ping the domain names they list as cpan mirrors to chose the fastest ones. then go back to the cpan screen and select those mirrors for your sources.
Once that is finished you will run this
cpan>install Mail::SpamAssassin:
lugin::RelayCountry Mail::SpamAssassin:
lugin::URIDNSBL
Mail::SpamAssassin:
lugin::Hashcash
Mail::SpamAssassin:
lugin::SPF
Now restart each of those services
/etc/init.d/xinetd restart
/etc/init.d/spamassassin restart
/etc/init.d/qmail restart
Now test.
That should get you working on debian.
Word of warning. You may not see these rbl lookups in your logs, qmail since it drops them appears to not even log them...
yet another reason why postfix is a WAY better choice than qmail... to get this functionality with qmailit appears you need to patch the source and recompile.
Hoping someone can prove me wrong on the logging or show me a way to get it to log everything but i havent found anything in my logs about rbls dropping/denying connections or connecting IP's.
Next thing i want is auto_reporting to spamcop... while i have it in i can't tell if its working yet.
If your wanting to enable something like that you would do it in the user_prefs file in
/var/qmail/mailnames/example.net/username/user_prefs
mine reads as follows
rewrite_header subject *****SPAM*****
required_score 7
report_safe 0
spamcop_to_address
[email protected]
Hope this helps someone.