[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim Filter

On Mon, 26 Apr 1999, Chris Hoover wrote:

>   I'm working on setting up my exim filter to filter all my mail and have run
> into a couple of questions for which I have not found an answer.
> 1.  Is it possible to have the filter check all "incoming" fields w/o
> specifically spelling them out? (something similar to procmails ^TO)
> 2.  How can I have exim dump any mail that passes through all my filters into a
> special misc folder?  I don't want any mail to end up in my
> /var/spool/mail/user file.

Hi Chris, I can answer most of this because I just switched from procmail
to exim filtering. You can do everything you want to do, except you'll
have to check with someone (or read the docs) on how to do the misc.
dumping step. Here's my .forward which tells exim to filter all my mailing
lists into their own folders (the first line is required to tell exim
that the .forward is an exim-specific filter specification):

	# Exim filter

	#  take care of mailing list debian-user
	   $message_headers contains debian-user
	   save $home/mail/IN.debian-user

	#  take care of mailing list lyx-users
	   $message_headers contains lyx-users
	   save $home/mail/IN.lyx

	#  deliver personal mail to local account syrus
	   deliver syrus

	if error_message then finish endif

So, as you see, $message_headers refers to all the message headers as you
asked. The last section on personal mail may be able to do what you want
if you simple redirect it to a file using a save command instead of the
deliver command, but I'm new at this so I'm not confident.

Cheers. Syrus.


Syrus Nemat-Nasser <syrus@ucsd.edu>    UCSD Physics Dept.

Reply to: