Il 16/03/2015 11:18, Marco Giusti ha scritto:
Comunque non c'è cosa che non si possa fare con procmail.

     #  python.it
     :0
     * ! ^List-Id: Discussioni generali sul linguaggio Python 
<python\.lists\.python\.it>
     * ! ^TO_python@lists\.python\.it
     { }
     :0 Efhw
     {
       :0 fhw
       | formail -I "X-List-Classify: zonapython"

       # Remove [Python] from the subject.
       :0 fhw
       | sed -e "s/^\(Subject:.*\)\[Python\]\( \)*/\1/I"
     }
:0
     * ^X-List-Classify: \/.*
     {
       # Remove X-List-Classify header.
       :0 fhw
       | formail -I X-List-Classify
# Remove [listname] from the subject.
       :0 fhw
       | sed -e "s/^\(Subject:.*\)\[$MATCH\]\( \)*/\1/I" \
         -e "/^Reply-To:.*$MATCH@/ d" \
         -e "s/^Old-Reply-To:/Reply-To:/"
# Remove duplicate reply strings.
       :0 fhw
       * ^Subject:[ \t]*Re?:
       | sed -re "s/^(Subject: *)(Re: *)+/Subject: Re: /I"
# For reading.
       :0
       lists/$MATCH/
     }

Così riesco a trasformare un soggetto come:
     Subject: Re: [Python] Re: Re:  Re:  Richiesta di aiuto
in:
     Subject: Re: Richiesta di aiuto



Vabbe' ma questa e' roba da ninja.. una cosa umana?
:)
_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Rispondere a