Downloads
Installation
- Download and install the libspf2 and libspf2-progs RPMs.
- Download and install the geoip RPM.
- Download the latest GeoLite Country Binary Format data file, uncompress it and copy it into /usr/share/GeoIP/GeoIP.dat, ensuring it is world-readable.
- Download and install the latest bind-devel RPM from "yum update bind-devel" if you're on RedHat 5 or CentOS 5.
- Create a user called "milter" with a group of its own also called "milter". "useradd milter" should do it for you.
- Download and install the relevant milter-greylist RPM for your version of RedHat or CentOS.
- Read the documentation on the milter-greylist site about how to incorporate it into your sendmail.mc file. The sendmail file will be in place already, so you can use the "FEATURE(milter-greylist)" in your mc file.
- Setup your /etc/mail/greylist.conf to do all the stuff you want. My greylist.conf is supplied as a sample to get you started, it includes examples of many of the things you'll want to do.
- /usr/bin/milter-greylist -D
will run it in the foreground to show you if you have any syntax errors in your greylist.conf file. Ctrl-C to quit it.
- service milter-greylist start
- service MailScanner restart
That should just about do it. Incorporating it into sendmail.mc is left as
an exercise for the reader. It's pretty simple and is all documented. My
chunk of sendmail.mc looks like this:
dnl
define(`_FFR_MILTER', `1')dnl
dnl
dnl --- Milter-Greylist -----------------------------------------------
dnl
dnl See /usr/share/doc for the milter-greylist documentation.
dnl
FEATURE(`milter-greylist',`S=local:/var/milter-greylist/milter-greylist.sock')dnl
define(`confMILTER_MACROS_CONNECT', `j, {if_addr}')
dnl This makes it bypass greylisting for users that use STARTTLS with a
dnl client certificate
define(`confMILTER_MACROS_HELO', `{verify}, {cert_subject}')
dnl This makes it bypass greylisting for users who have SMTP AUTHed
define(`confMILTER_MACROS_ENVFROM', `i, {auth_authen}')
dnl This lets you do fancy greylisting using the WHITE value in access.db
define(`confMILTER_MACROS_ENVRCPT', `{greylist}')
|