# # Sample procmailrc for maildir delivery # # See: http://www.procmail.org # # # ------------------------------- # # Yyou want to set two environment variables for mailboxes. # 1) main inbox is specified as DEFUALT (it has a trailing slash). # 2) f MAILDIR you can build other directories for delivery. # # The below example shows filtering out spam to separate folder, setting up a simple archive and also regular delivery. # Notice how each subfolder has a period instead of a slash. Thus, .spam actually goes into $HOME/Maildir/.spam --------------------------------------------------------- DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir SHELL=/bin/sh # filter spam :0: * ^X-Spam-Status: Yes .spam/ # archive (NOTICE again that hierarchical folders use periods as separators ) YEARDIR=archive.`date +%Y` MONTH=`date +%b` MK_ARCHIVE_DIR=`test -d ${YEARDIR} || mkdir ${YEARDIR} && chmod 700 ${YEARDIR}` :0c .${YEARDIR}.${MONTH}/ # deliver the rest to default (the default recipe)