Re: [exim] Using a pipe filter to allow or deny a message, b…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Kieran Simkin
CC: exim-users
Asunto: Re: [exim] Using a pipe filter to allow or deny a message, but nothing else.
On Thu, 2 Feb 2006, Kieran Simkin wrote:

> The problem I'm having is that I'd like a copy of every message that's sent by
> one of my users (either locally or via ASMTP) to be passed to a program on
> stdin, and the return code to be used to determine whether or not to continue
> processing the message.


This is not possible. You cannot use the result of one delivery to
control another delivery of the same message.

Having said that, it may be fudgeable, using a queryprogram router to
run a program that fishes the original message off the spool files. This
is extreme hackery.

The only "non-hack" way is to deliver the message to a script that
re-injects it for further delivery if that is what is required.

> The first thing I tried was a transport_filter line in my remote_smtp
> transport:


That won't work even if it works. :-) Local deliveries are done before
remote deliveries.

> T=remote_smtp defer (-24): transport filter process failed (1)


Transport filters are not expected to fail.

> even with "unseen", it's impossible to write an accept/reject filter based on
> the return value of a pipe.


That is correct. Quite apart from anything else, the order in which the
deliveries to the individual recipients of a message occur is not
defined (other than that local deliveries happen before remote ones),
and indeed, remote deliveries may occur in parallel. So you cannot even
expect the result of one delivery to be able to control the others.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book