Re: [EXIM] Filtering out duplicate messages

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Lee Bradshaw
CC: Exim-users
題目: Re: [EXIM] Filtering out duplicate messages
On Sat, 28 Nov 1998, Lee Bradshaw wrote:

> I asked on the debian list because someone asked about procmail and was
> told to use exim filters because they were better. They are much more
> readable, but they aren't as powerful as procmail.


Exim filters provide a different (though related) facility to procmail.
Each provides facilities that the other does not.

As filters are run at directing time, they act in a similar manner to a
.forward file, but with the possibility of attaching conditions to the
forwarding. What I mean by this is that a filter can convert one
incoming address into several new addresses, all on the same message.
The delivery is then as if the original message were addressed to those
new recipients (if any one is a duplicate, for example, it gets
discarded). Using a delivery agent like procmail provides a different
facility, because it can use the results of running pipes, etc. However,
from the MTA's point of view, it is *one* delivery down a pipe to the
agent; if it then wants to forward for several new recipients, it has to
create a new message and pass it back to the MTA. I'm not saying that
either of these is "better"; just that they are different.

The use of Exim filter files and procmail is not mutually exclusive. You
can easily provide both facilities if you want to, and let the users
choose which they want to use. You can even automate things so that if a
user has a .procmailrc file, then delivery automatically goes via
procmail. Use a director something along the lines of

procmail_check:
driver = localuser
require_files = $home/.procmailrc
transport = procmail_transport
user = $local_part

together with a suitable pipe transport that passes the message to 
procmail. The above director should go *before* the localuser director 
that sets up the remaining deliveries.    



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



--
*** Exim information can be found at http://www.exim.org/ ***