I'm configuring Exim to cooperate with Postgrey on FreeBSD 12.0-RC1 and everything work's very well when MTA connecting via inet, but when I change to UNIX socket there is no reaction even if I run Postgrey with verbose mode.

rc.conf:

postgrey_enable="YES"
postgrey_flags="--unix /var/run/postgrey/postgrey.sock --delay=120 --lookup-by-host --exim"

exim/configure:

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\n\n
  set acl_m0  = ${sg{${readsocket{/var/run/postgrey/postgrey.sock}{$acl_m0}{5s}{}{action=DUNNO}}}{action=}{}}
  message     = ${sg{$acl_m0}{^\\w+\\s*}{}}
  condition   = ${if eq{${uc:${substr{0}{5}{$acl_m0}}}}{DEFER}{true}{false}}

Postgrey verbose output:

2018/11/23-12:36:02 postgrey (type Net::Server::Multiplex) starting! pid(30205)
Binding to UNIX socket file "/var/run/postgrey/postgrey.sock"
Setting gid to "225 225"
Setting uid to "225"

When I connect to socket via telnet:

telnet /var/run/postgrey/postgrey.sock

And typed:

request=smtpd_access_policy
protocol_state=RCPT
protocol_name=ESMTP
client_address=201.1.2.3
client_name=imaspammer.brasiltelecom.net.br
helo_name=imaspammerl.brasiltelecom.net.br
sender=bogus@user.com
recipient=poorfoool@somedomain.com
queue_id=
[...]

I got verbose output:

action=greylist, reason=early-retry (26s missing), client_name=imaspammer.brasiltelecom.net.br, client_address=201.1.2.3, sender=bogus@user.com, recipient=poorfoool@somedomain.com

So I think it's Exim bug that it can not connect or maybe never try.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.