PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin MAILDIR=/home/blovett/mail LOGFILE=/home/blovett/.procmail/procmail.log MONTH=`date +%Y/%m` # example $MONTH = 1999/08 # so it will make a directory for each month # in each year's directory ## Note: If you sort all of your mail, you can set MONTH to # be something like /home/seymour/mail/$MONTH and then # just enter the name of the mailbox to filter to as follows: # # :0: # * ^Sender:(_dot_)*owner-mutt-users(_at_)mutt(_dot_)org # mutt-users # ----- check for existance of this month's directory ----- #:0 ic #* ? test ! -d $MONTH #| mkdir -p $MONTH && chmod 0700 $MONTH && touch $MONTH/mbox && chmod 0700 $MONTH/mbox :0 ic * ? test ! -d $MONTH | mkdir -p $MONTH/Inbox/cur && mkdir -p $MONTH/Inbox/new && mkdir -p $MONTH/Inbox && chmod -R 700 $MONTH/Inbox # ----- add Lines: header for Maildir mail ----- :0 fhw * ! ^Lines: [0-9]+$ * 1^1 B ?? ^.*$ * -1^0 | formail -i "Lines: $=" #:0 bw #LINES=|wc -l | tr -d " " #:0 fhw #|formail -a "Lines: $LINES" :0 Wh: msgid.lock | formail -D 16384 msgid.cache #| formail -D 8192 msgid.cache # ----- header rewriting ----- # As listed in the Mutt docs to convert old-style PGP messages to MIME :0 * !^Content-Type: multipart/ * !^Content-Type: application/pgp { :0 fBw * ^-----BEGIN PGP MESSAGE----- * ^-----END PGP MESSAGE----- | formail -i "Content-Type: application/pgp; format=text; x-action=encrypt" :0 fBw * ^-----BEGIN PGP SIGNED MESSAGE----- * ^-----BEGIN PGP SIGNATURE----- * ^-----END PGP SIGNATURE----- | formail -i "Content-Type: application/pgp; format=text; x-action=sign" }