Add the following block to your rcpt acl:

  # query the daemon
  warn    set acl_m9     = ${readsocket{inet:127.0.0.1:21980}\
                            {request=smtpd_access_policy\n\
                            helo_name=$sender_helo_name\n\
                            queue_id=$message_exim_id\n\
                            sender=$sender_address\n\
                            recipient=$local_part@$domain\n\
                            client_address=$sender_host_address\n\
                            reverse_client_name=$sender_host_name\n\n}\
                            {20s}{\n}{action=DUNNO Error on connecting to socket} }

  # Split the response
  warn    set acl_m8     = ${extract{action}{$acl_m9} }
          set acl_m7     = ${sg{$acl_m9}{\Naction=[^ ]+ (.*)\n\n\N}{\$1} }

  # Log in case of errors
  warn    condition      = ${if eq{$acl_m8}{DUNNO}{yes}{no} }
          logwrite       = :main,panic: ARSoft.MultiPolicyDaemon error: $acl_m7

  # Insert header if requested
  warn    condition      = ${if eq{$acl_m8}{PREPEND}{yes}{no} }
          message        = $acl_m7

  # Reject if requested
  deny    condition      = ${if eq{$acl_m8}{REJECT}{yes}{no} }
          message        = Rejected by ARSoft.MultiPolicyDaemon: $acl_m7

  # Defer if requested
  defer   condition      = ${if eq{$acl_m8}{DEFER}{yes}{no} }
          message        = Greylisted by ARSoft.MultiPolicyDaemon: $acl_m7


For more information refer the exim documentation (http://www.exim.org/exim-html-current/doc/html/spec_html/ch14.html#SECID106) for more information.

Last edited Oct 4, 2010 at 7:26 PM by AlexReinert, version 2

Comments

No comments yet.