http://www.ols.es/exim/dlext/ pipe_message Runs program injecting current message or file into it's stdin and returning the stdout output. Usage: ${dlfunc{/usr/local/exim/exim-ext.so}{pipe_message}{app}{file}} If {file} is ommited, the current message is piped to the application. returns: application stdout output. DSpam usage example:: # the trick here is to call dspam in deliver=summary mode, which will # return only the dspam header, so you only need to add this header # to the message (no need to reinject it): warn set acl_m13 = ${dlfunc{/usr/local/exim/exim-ext.so}{pipe_message}\ {/usr/local/bin/dspam --deliver=summary --client \ --mode=teft --user global}} set acl_m14 = ${extract {result}{$acl_m13}} set acl_m15 = ${extract {signature}{$acl_m13}} # now you get in acl_m13 the dspam header, the signature in acl_m15 # (if you need it for logging or something else) and the result # in acl_m14 # you could optionally retrain it if it comes from a very trusted sender: warn condition = [VERY TRUSTED SENDER] condition = ${if match {$acl_m14}{Spam}} set acl_m13 = ${dlfunc{/usr/local/exim/exim-ext.so}{pipe_message}\ {/usr/local/bin/dspam --user global --client \ --class=innocent --source=error \ --deliver=summary --signature=$acl_m15}} set acl_m14 = Innocent (retrained) set acl_m15 = # deny at SMTP time if it's spam: deny condition = ${if match {$acl_m14}{Spam}} message = Spam not welcome # and if accepted add the proper header so it could be latter retrained # if need: warn condition = ${if def:acl_m14} add_header = $acl_m13 This enables exim to run dspam and add the result header to the message (both at data acl or at transport/router time) without having to run ugly transports which reinject the message again into exim.