[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

procmail postprocess directory in Maildir format howto?



Hi,

I am experimenting with procmail to process my mail. 
So i have a directory called inbox
/home/mlaks/Mail/inbox
in my ~Mail directory that has subdirectories 
cur new tmp.

How do I run procmail on this directory to separate out the files to other 
subdirectories.

The man  page of procmail describes a recipe for mbox format (i believe)

"
     Procmail  can  also  be invoked to postprocess an already filled system
       mailbox.  This can be useful if you  don’t  want  to  or  can’t  use  a
       $HOME/.forward  file (in which case the following script could periodi‐
       cally be called from within cron(1),  or  whenever  you  start  reading
       mail):

              #!/bin/sh

              ORGMAIL=/var/mail/$LOGNAME

              if cd $HOME &&
               test -s $ORGMAIL &&
               lockfile -r0 -l1024 .newmail.lock 2>/dev/null
              then
                trap "rm -f .newmail.lock" 1 2 3 13 15
                umask 077
                lockfile -l1024 -ml
                cat $ORGMAIL >>.newmail &&
                 cat /dev/null >$ORGMAIL
                lockfile -mu
                formail -s procmail <.newmail &&
                 rm -f .newmail
                rm -f .newmail.lock
              fi
              exit 0
"

the crucial line is 
formail -s procmail <.newmail &&

do i simply do 

ORGMAIL=/home/mlaks/Mail/inbox

procmail < $ORGMAIL 

as a test?

thanks,
Mitchell
procmail < 



Reply to: