Implement greylisting feature
Greylisting (or graylisting) is a method of defending e-mail users against spam.
With this feature, qmail will "temporarily reject" any email from a sender it does not recognize. If the mail is legitimate the originating server will, after a delay, try again and, if sufficient time has elapsed, the email will be accepted. If the mail is from a spam sender, sending to many thousands of email addresses, it will probably not be retried.
We 'll make use of Perl scripts jgreylist and jgreylist-clean written by John Simpson
Edit /var/qmail/supervise/qmail-smtpd/run and change the following
JGREYLIST_DIR="$VQ/jgreylist"
cp /downloads/scripts/jgreylist-clean /usr/local/sbin
chown root:vchkpw /var/qmail/bin/jgreylist
chmod 0750 /var/qmail/bin/jgreylist
chown root:root /usr/local/sbin/jgreylist-clean
chmod 0755 /usr/local/sbin/jgreylist-clean
mkdir -m 0700 /var/qmail/jgreylist
chown vpopmail:vchkpw /var/qmail/jgreylist
echo '/usr/local/sbin/jgreylist-clean 2>&1 > /dev/null' > /etc/cron.daily/jgreylist-clean
qmailctl restart
OPTIONAL : If you need more performance you can use a compiled version of jgreylist
mv /downloads/scripts/jgreylist /downloads/scripts/jgreylist.pl
make jgreylist
cp /downloads/scripts/jgreylist /var/qmail/bin
chown root:vchkpw /var/qmail/bin/jgreylist
chmod 0750 /var/qmail/bin/jgreylist
Users comments
Any ideas why I get this for some domains?
------------------------------------------
var/qmail/bin/qmail-remote: 25: [[: not found
sxxx.xxx.xxx.xxx does not like recipient.
Remote host said: 450 4.2.0 : Recipient address rejected: Greylisted, see
http://postgrey.schweikert.ch/help/xxx.com.html
Giving up on xxx.xxx.xxx.xxx.
------------------------------------------
Hello,
You probably missed the installation of daemontools as described on package-install.php.
aptitude install ucspi-tcp daemontools daemontools-run
Hei Guys,
i crefully followed steps for the qmail installation ... i double check but i'm blocked right now ...
qmailctl restart
Restarting qmail:
* Stopping qmail-smtpdssl.
/usr/bin/qmailctl: 126: svc: not found
* Stopping qmail-smtpd.
/usr/bin/qmailctl: 126: svc: not found
* Sending qmail-send SIGTERM and restarting.
/usr/bin/qmailctl: 126: svc: not found
* Restarting qmail-smtpd.
/usr/bin/qmailctl: 126: svc: not found
* Restarting qmail-smtpdssl.
/usr/bin/qmailctl: 126: svc: not found
i had problems with the final step in qmail installation when i have to :
Create symlinks in /etc/service directory
ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /var/qmail/supervise/qmail-smtpdssl /etc/service
Because /etc/service in squeeze is not a dir. i created manually the dir, created the sym links and then ln -s /etc/service /service.
the link is present ...
lrwxrwxrwx 1 root root 23 Nov 17 16:00 qmailctl -> /var/qmail/bin/qmailctl
@Abel : I think so but I'm not 100% sure. Best is to ask to the scripts maker
If I use a compiled version of jgreylist, should I also install the script jgreylist-clean?
Thankyou
It's just temporary rejected.
Take a look on http://qmailrocks.thibs.com/greylisting.php for more explanation (in this case it's how to implement it)