Re: system filters and pipe

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Roger Books
CC: exim-users
Subject: Re: system filters and pipe
On Fri, 10 Jan 1997, Roger Books wrote:

> In order to correct this problem I'd like to have a system filter that
> filters things for local delivery, stripping out whoever is in the
> To: line and replacing it with ${local_part}@???, not exactly
> standard but it would correct my problem and save me a ton of phone calls.
>
> To that end I made the following changes:


> # This director handles a systemwide filter
> system_filter:
> no_verify,
> driver=forwardfile;
> no_check_local_user,
> filter,
> file = /etc/system-mail-filter,
> user = nobody


That will obey the filter file for *every* message; I take it that is
what you want.

> # Exim filter
> save /tmp/system-mail-filter.out
> if ${domain} is mail.dms.state.fl.us or
>    ${domain} is mail.dms.state.fl.us or
>    ${domain} is rtssec1.dms.state.fl.us 
> then
>    pipe "/usr/local/bin/remove_to_line ${local_part}@???"
> endif


That will save a copy of all messages in /tmp/system-mail-filter.out,
and pass some to your script. Ah! Perhaps that's your problem. Should
that really be "unseen save"? Messages that are to domains other than
those you test for will just get saved there and not passed on to
anything else.

> Then I wrote the following tcl script.


I don't know tcl, but the script doesn't seem to be resubmitting the
message anywhere... Have I missed where it is directing the output back
to Exim?

Regards,
Philip

--
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714