Guide updated on 29th of February 2016

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


cp /downloads/scripts/jgreylist /var/qmail/bin
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

cd /downloads/scripts/
mv /downloads/scripts/jgreylist /downloads/scripts/
make jgreylist
cp /downloads/scripts/jgreylist /var/qmail/bin
chown root:vchkpw /var/qmail/bin/jgreylist
chmod 0750 /var/qmail/bin/jgreylist

List of optional features

Users comments

Error connecting to Database!

Color Coded Qmail Installation Key
  Regular Black Text     Qmail installation notes and summaries by the author.
  Bold Black Text     Commands to be run by you, the installer.
  Bold/Regular Red Text    Vital and/or critical information.
  Regular Blue text     Denotes helpful tips and hints or hyperlinks.
  Regular Orange Text     Command line output.
  Bold/Regular green text     Denotes the contents of a file or script.