GreyListd for DirectAdmin
== Get greylistd ==
cd /tmp
wget http://ubuntu2.cica.es/ubuntu/ubuntu/pool/universe/g/greylistd/greylistd_0.8.6.tar.gz
tar -zxvf greylistd_0.8.6.tar.gz
cd greylistd-0.8.6/
== Make the folders ==
mkdir /etc/greylistd/
mkdir /var/run/greylistd/
mkdir /var/lib/greylistd/
Provided you are still in the greylistd-0.8.3.2 folder, copy the files:
cp config/* /etc/greylistd/
cp program/greylist* /usr/sbin/
Edit the config at /etc/greylistd/config
== Change permissions ==
chown -R mail:mail /etc/greylistd/
chown -R mail:mail /var/run/greylistd/
chown -R mail:mail /var/lib/greylistd/
chown -R mail:mail /usr/sbin/greylist*
== Run greylistd in the background ==
su mail
/usr/sbin/greylistd &
exit
or /usr/sbin/greylistd
== Edit the exim.conf ==
Now (as root) open /etc/exim.conf and search for the following section:
# accept mail to errors@example.com, regardless of source
# accept local_parts = errors
# domains = example.com
Add the following below it:
#GREYLIST
defer message = $sender_host_address is greylisted
log_message = greylisted.
hosts = !+relay_hosts
domains = +relay_domains
!senders = : postmaster@*
set acl_m6 = $sender_host_address $sender_address $local_part@$domain
set acl_m6 = ${readsocket{/var/run/greylistd/socket}{$acl_m6}{5s}{}{}}
condition = ${if eq {$acl_m6}{grey}{true}{false}}
# authenticated = *
Restart exim
/usr/local/etc/rc.d/exim restart