Hello Yue Wu,

Am 2010-08-05 21:18:45, hacktest Du folgendes herunter:
>         for j in $(find $2 -type d | grep cur) ; do (
>             cd $j ;
>             for i in * ;
>             do cat $i | formail -ds procmail ;
>             done) ;
>         done
> 
> But after redeliverd, all emails are new, i.e. unread in mutt, that's not what
> I want.

What about with:

    for j in $(find $2 -type d | grep cur) ; do
        cd ${j}
        for i in * ; do
            formail -I "X-Re-Filter: true" <${i} |procmail
        done
    done

and then in Procmail do at the beginning

   :0
   * ^X-Re-Filter: true
   {
     TRAP='DIR=$(dirname ${LASTFOLDER} |sed 's|/new$|/cur|') ; FILE=$(basename 
${LASTFOLDER}) ; mv ${LASTFOLDER} ${DIR}/${FILE}:2,S'
     :0fw
     | formail -I X-Re-Filter:
   }

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsyst...@tdnet France EURL       itsyst...@tdnet UG (limited liability)
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz                 Kinzigstraße 17
67100 Strasbourg/France           77694 Kehl/Germany
Tel: +33-6-61925193 mobil         Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber linux4miche...@jabber.ccc.de
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature

Reply via email to