Re: [EXIM] How to remove string in subject?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Frederick Page
CC: exim-users
Sujet: Re: [EXIM] How to remove string in subject?
On Sat, 27 Feb 1999, Frederick Page wrote:

> if
>    $header_Subject: contains "[Debian]: "
> then
>    testprint "subject=$header_Subject:"
>    pipe "sed -e 's/\[Debian\]: //'"
> endif


That will certain remove [Debian], but it won't achieve the effect you
want, because the output of sed will, presumably, be written to the
standard output rather than into your mailbox. When a pipe delivery
produces output, it normally gets returned to the sender.

If you want to make changes to messages as they are delivered, you
should look into delivering through procmail. Do not naively add
something like "> /my/mailbox" to your existing command because that
will not apply the correct interlocking. (Actually, it won't work
anyway, because pipes are not run via a shell unless you specify it
explicitly.)

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



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