Re: [Exim] [possible faq] how do modify headers in a ~/.forw…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Spiro Trikaliotis
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] [possible faq] how do modify headers in a ~/.forward?
Hello Marc,

* On Fri, May 14, 2004 at 07:11:26PM +0200 Marc Haber wrote:

> I would like to modify the subject of incoming messages depending on
> some conditions. For example, I would like to change the subject to
> "[bugtraq] $subject" if the message comes in for the recipient
> mh+bugtraq@???.


For me, it's the opposite: I remove these headers which are added by
some mailing lists.


> Unfortunately, I can't seem to find any possibilities to remove/add
> headers in a filter file. Is this really not possible, or is there a
> trick?


Why don't you use procmail + formail:


:0:
* ^Sender: .*full-disclosure-admin@???
{
        SUBJECT=`formail -xSubject: \
          | sed -e 's/[;\`\\]/ /g' \
          | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g' \
          | sed -e 's/\[Full-Disclosure\] //'`
        :0fhw:
        | formail -i "Subject: ${SUBJECT}"


        :0:
        Mail/IN/fulldisclosure
}



Gruß,
Spiro.

--
Spiro R. Trikaliotis
http://www.trikaliotis.net/