Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I need some help using realtime open relay databases to filter spam in qmail. Unfortunately, I did not set up qmail on my server (someone else did) so it was not configured the same way that Life with Qmail suggests (ie. there is no /var/qmail/supervise/qmail-smtpd/run script). So, the directions that the book gives on how to use filtering don't really work for me.
Here is what I know about my setup:
1) I'm using vpopmail
2) qmail-smtpd is invoked using xinetd:
service smtp
{
flags = REUSE NAMEINARGS
socket_type = stream
protocol = tcp
wait = no
user = qmaild
server = /usr/sbin/tcpd
server_args = /var/qmail/bin/tcp-env -R /var/qmail/bin/qmail-smtpd
}
Can anyone help me use rblsmtpd to block blacklisted mail servers? The amount of spam my server is getting is beginning to get really high. Also, the blocking doesn't have to be through rblsmtpd. If you know of any other things that would work, I'm open to that too.
The following is the steps that I have used on RH7.3 with PSA 5.0.5
Step 1. Install rblsmtpd
First we are going to turn MAPS On from within the PSA Admin Control Panel.
1. Log into admin control panel
2. Click on Server
3. Click on Mail
4. Place a tick in the box beside "Enable MAPS spam protection"
5. In the box directly below labeled "MAPS server" type the following: relays.ordb.org
6. Click on Set
7. Log Out.
Now back to the shell screen.
# cd /usr/src/
# wget http://ns.at.com.au/rblsmtpd-with-log.tar.gz
# tar xzf rblsmtpd-with-log.tar.gz
# cp /usr/sbin/rblsmtpd ~/rblsmtpd.bak
# cp rblsmtpd /usr/sbin
You will be prompted to overwrite. Answer "y" and press enter
# touch /var/log/rblsmtpd.log
# chown qmaild:qmail /var/log/rblsmtpd.log
# chmod 600 /var/log/rblsmtpd.log
# cp /etc/xinetd.d/smtp_psa /etc/xinetd.d/smtp_psa.2003
# pico /etc/xinetd.d/smtp_psa
Add the following to the server_args line AFTER -r relays.ordb.org
/usr/sbin/rblsmtpd -r bl.spamcop.net /usr/sbin/rblsmtpd -r relays.visi.com
So the original would have looked like:
server_args = /usr/sbin/rblsmtpd -r relays.ordb.org /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
Now it should look like:
server_args = /usr/sbin/rblsmtpd -r relays.ordb.org /usr/sbin/rblsmtpd -r bl.spamcop.net /usr/sbin/rblsmtpd -r relays.visi.com /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
****NOTE****
WHEN USING PICO, IT WILL TRY TO WRAP THIS TO SEVERAL LINES.
DO NOT LET IT. THIS CODE MUST BE ALL ON ONE LINE.
to save and exit in pico press CTRL+X then Y
Now you need to tell xinetd to load the new settings and test sending and receiving emails.
service xinetd reload
These instructions were obtained in the following thread at some other forum:
Additionally, I have a modified version of rblsmtpd that allows logging of the messages bounced (RBL that caused the bounce, IP, HostID and HostInfo) via the syslog function (i.e. the log entries go to the same file as your other mail related log entries as configured in your syslog.conf file). You can download the binary and source at:
For those who are reading and don't know much about PICO but don't want it to wrap the text, you can start PICO using "pico -w" which forces it to not wrap.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
Advertisement
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Click Here to receive a complimentary subscription courtesy of LQ.