RE: [Exim] Per user filter

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Dan Muey
Datum:  
To: exim-users
Betreff: RE: [Exim] Per user filter
> On Wed, 3 Sep 2003, Dan Muey wrote:
>
> > I take it from the crickets that this is impossible to do with Exim?
>
> > > I'd like to filter certain user's email through a script.
> The script
> > > will take a message on STDIN and do some stuff then print
> either the
> > > original message or a modified message to STDOUT be delivered.
> > >
> > > If the message is to be dropped it will print nothing.
>
> You shouldn't listen to crickets. You don't say which release
> of Exim you are using, but this is possible with both Exim 3
> and Exim 4. Just pipe the message to your script. If it wants
> to re-send it, get it to pipe the message back to Exim. Or on
> to procmail for delivery.
>
> This is no different from one way of scaning for spam,
> viruses, etc. There are comments about it in the Exim 4 book
> and in the FAQ. And it's been discussed on this list a lot.
>
> > > I also need the account it is being sent to as the
> argument to the
> > > script. With qmail I can do this for a user in their .qmail file
> > > like so:
> > >
> > > |myfilter.pl email@??? | safecat ARG ARG
> > >
> > > How would one go about accomplishing the same thing in Exim?
>
> In a user's .forward file, put
>
> |/some/script email@???
>
> However, Exim doesn't use a shell by default. If you want to
> pipe it on, as you are doing, either interpose another script, or use
>
> |/bin/sh -c 'whatever....'
>
> All this stuff is to be found in the docs and FAQ.


Thanks Philip! The info is great especially the .forward file
Now I have a better starting point in the docs, thanks a bunch!

Dan

>
> --
> Philip Hazel            University of Cambridge Computing Service,
> ph10@???      Cambridge, England. Phone: +44 1223 334714.
> Get the Exim 4 book:    http://www.uit.co.uk/exim-book

>
>