Software: greysmtpd

tcpserver-compatible anti-spam (greylisting) smtpd

Description

Use greylisting to protect against spam.

Greylisting will not be used if $RELAYCLIENT is set. Greylisting will not be used if client not listed in RBL and client's domain name doesn't looks like dynamic IP (dial-up, DSL, etc.). These rules allow most of non-spam email to be delivered without additional delay, like if you don't use greylisting at all.

Inspired by qgreylistrbl and rblsmtpd.

How it differs from qgreylistrbl?

Requirements

Install

If you use my portage overlay then just run: emerge greysmtpd

Or you can install it manually:

  1. Make sure you've adns installed (on Gentoo just run emerge adns).
  2. Download latest greysmtpd-x.y.z.tgz.
  3. Execute: tar xzf greysmtpd-x.y.z.tgz cd greysmtpd-x.y.z cp greysmtpd /usr/bin/ mkdir /var/greysmtpd for i in $(seq 0 255); do mkdir /var/greysmtpd/$i; done chown -R qmaild /var/greysmtpd
  4. Add this line to root's crontab, to run every hour: 0 * * * * find /var/greysmtpd/ -type f -mtime +0 -delete
  5. Setup greysmtpd to run between tcpserver and your SMTP daemon (qmail). # Gentoo: add into /var/qmail/control/conf-smtpd this line QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} greysmtpd" # Other systems, in general: replace something like this tcpserver -p -v -R 0.0.0.0 smtp qmail-smtpd # with this tcpserver -p -v -R 0.0.0.0 smtp greysmtpd qmail-smtpd

That's all! Now you've 80-90% less spam delivered to your server. :-)