Hi,
It would be nice to have README.exim explain things a bit more
straightforwardly. Basically, I had to do this on my system:
1. create a file /etc/exim4/postgrey_acl_smtp_rcpt containing the following
# use postgrey to to greylisting
defer log_message = greylisted host $sender_host_address
set acl_m0 = request=smtpd_access_policy\nprotocol_state=RCPT\nprotocol_name=${uc:$received_protocol}\nhelo_name=$sender_helo_name\nclient_address=$sender_host_address\nclient_name=$sender_host_name\nsender=$sender_address\nrecipient=$local_part@$domain\ninstance=$sender_host_address/$sender_address/$local_part@$domain\n\n
set acl_m0 = ${sg{${readsocket{/var/run/postgrey}{$acl_m0}{5s}{}{action=DUNNO}}}{action=}{}}
message = ${sg{$acl_m0}{^\\w+\\s*}{}}
condition = ${if eq{${uc:${substr{0}{5}{$acl_m0}}}}{DEFER}{true}{false}}
warn message = ${sg{$acl_m0}{^\\w+\\s*}{}}
condition = ${if eq{${uc:${substr{0}{7}{$acl_m0}}}}{PREPEND}{true}{false}}
2. add CHECK_RCPT_LOCAL_ACL_FILE=/etc/exim4/postgrey_acl_smtp_rcpt to
/etc/exim4/conf.d/main/000_localmacros
3. change /etc/default/postgrey to have the following options:
POSTGREY_OPTS="--unix=/var/run/postgrey --exim"
4. Restart postgrey and exim4.
Just my 4¢,
cheers, piem