Re: [Exim] Filter to weed out duplicate messages?

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Dan Lowe
CC: exim-users
題目: Re: [Exim] Filter to weed out duplicate messages?
On Thu, 23 Dec 1999, Dan Lowe wrote:

> However I can't figure out a way to pipe a message to a program, and
> test the result (all that procmail recipe did was pipe to 'formail'
> and then based on the exit code it would either /dev/null the message
> or it would deliver it).


You can't. Exim filters operate at a different stage of the processing,
while it is deciding where to send the message, not while it is actually
transporting it. As the FAQ says:

Q0417: What I really need is the ability to obtain the result of a pipe   
       command so that I can filter externally and redirect internally. Is    
       this possible?                                                       


A0417: This is not possible. The result of a pipe command is not available to
       a filter, because it doesn't run any deliveries while filtering. It just
       sets up deliveries. They all happen later. If you want to run pipes
       and examine their results, you need to set up a single delivery to a
       delivery agent such as procmail which provides this kind of facility.  


There are things a filter can do that a local delivery agent (i.e.
procmail) can't, and vice versa. If you want to do those things, you are
forced to use the one that can do them.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.