Re: [Exim] altering outgoing mail

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Robin Meijboom
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] altering outgoing mail
> On Mon, 23 Dec 2002, Robin Meijboom wrote:
>
> > Hello Exim-users,
> >
> > I want my smtpserver (exim...) to filter messages before they are being

sent
> > away. I do it with a system-wide filter, but it doesn't seem to work

very
> > well.
> >
> > My settings are:
> > --exim.conf--
> > system_filter = /etc/exim.filter
> > system_filter_user = exim
> > system_filter_pipe_transport = address_pipe
> >
> > --exim.filter--
> > # Exim filter
> > if $message_body_end: contains "beer"
> > then pipe "/usr/bin/sed 's/beer/water/'"
> > endif
> >
> > Messages without beer do arrive, but messages with 'beer' don't.
>
> sed does not pipe back the message to exim, and what you really want is a
> transport_filter, check spec.txt for more infos.
>
> ciao
>


You mean that when I use a transport filter I can't use sed anyways?
I set up a transport filter (using sed...) and when i do 'cat file|
exim.transportf' it gives the right output...
But how do i get that back to exim to send it away? When i try it this way,
it says 'broken pipe'.

If I can't use sed, what should I use instead to change the content of the
message?

Robin