[Greylist-users] Bagley: A standalone binary greylister for Exim 4

William Blunn bill--greylist at tao-group.com
Tue Mar 2 05:08:53 PST 2004


> Using an ACL hook means that I can (temporarily) reject messages before
> receiving the message DATA, whereas local_scan only works after the
> message DATA has already been received.

Here is my ACL hook, which I put in the ACL pointed to by the acl_smtp_rcpt directive (by default "acl_check_rcpt"):

  require  condition = ${run{/usr/local/lib/bagley/bagley $sender_host_address "${sg{$sender_address}{([\\\\"])}{\\\\\$1}}" "${sg{${quote_local_part:$local_part}@$domain}{([\\\\"])}{\\\\\$1}}"}}

I have put in escaping to cope with the fact that Exim's expansion item "run" appears to take a space-separated optionally-double-quoted ARG list, but I need the arguments to go exactly into argv[1], argv[2], argv[3], regardless of whether they are empty or contain spaces or quotes or backslashes.

The escaping I have put in seems to cope alright with the worst scenarios I have been able to think of, e.g.

  caller = 1.2.3.4
  MAIL FROM: <>
  RCPT TO: <"\" \\ \""@wibble.com>

Bill

The contents of this e-mail and any attachments are confidential and may
be legally privileged. If you have received this e-mail and you are not
a named addressee, please inform us as soon as possible on
+44 118 901 2999 and then delete the e-mail from your system. If you are
not a named addressee you must not copy, use, disclose, distribute,
print or rely on this e-mail. Any views expressed in this e-mail or any
attachments may not necessarily reflect those of Tao's management.
Although we routinely screen for viruses, addressees should scan this
e-mail and any attachments for viruses. Tao makes no representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that for the protection of our business, we may monitor and
read e-mails sent to and from our server(s).


More information about the Greylist-users mailing list