procmail
[Top] [All Lists]

Re: How to filter aldready delivered email

2004-12-08 06:09:10
Am 2004-12-08 11:24:57, schrieb Jan Banan:
Hello!

I want to filter emails that have already been delivered. The emails are 
stored in a Maildir-structure. The reason is that I have updated my mail 
filter file with new rules and want to apply those on all emails in the 
incoming folder (~/Maildir/cur/).

1. Is it possible to use procmail to do this? I would like to keep the 
same name and timestamp on the email filename if possible!

???  -  Refiltering change nothing...

With maildrop (http://www.courier-mta.org/maildrop/) I can do "cat 
themail | maildrop -d theuser" but then also the email filename will be 
changed and the timestamp updated. So hopefully I can solve this with 
procmail instead!

I use:

  ____( '/home/michelle/bin/tdformail' )________________________________
 /
| #!/bin/bash
| 
| MPATH=$HOME/Maildir/*/*
| 
| let X=1
| for i in `ls $MPATH` ; do
|     echo -n $X" : "
|     cat $i | formail -ds procmail
|     sleep 1
|     rm -f $i
|     let X=$X+1
| done
 \______________________________________________________________________


2. Is it possible to convert the maildrop filter rules (~/.mailfilter) 
to procmail filter rules? The rules in maildrop are very simple, like:
      if ((/^Sender: *thelist-list-bounces\(_at_)list\(_dot_)com/))
      {
         to "./Maildir/.thelist/."
      }

Yes to:

    :0
    * ^Sender:(_dot_)*thelist-list-bounces(_at_)list(_dot_)com
    Maildir/.thelist/


Thanks for any help!

Best regards,
Jan

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail