Or:
poll <your mail server here> protocol imap user <you> password <your
password> mda "/usr/bin/procmail -d %T"
You will have to create a .procmailrc. You need to read all the
documentation on procmail as it is quite powerful (that is, you can
really hurt yourself if you are not careful :-) )
Here is a simple .procmailrc:
DEFAULT=<some file in your home directory>
MAILDIR=$HOME/IMAP
LOGFILE=$MAILDIR/procmail.log
##VERBOSE=on
##LOGABSTRACT=all
###################################
# Back up processed mail to be safe
#
:0 c
_ProcMailBackup
:0 ic
| cd _ProcMailBackup && rm -f dummy `ls -t msg.* | sed -e 1,100d`
#######
# Rules
#######
##
# Test
##:0:
##* ^Subject:.*test
##tests
##
# Jakarta General
:0:
* ^TO_general(_at_)jakarta(_dot_)apache(_dot_)org
Tomcat_general
Fetchmail-friends mailing list
Fetchmail-friends(_at_)lists(_dot_)ccil(_dot_)org
http://lists.ccil.org/mailman/listinfo/fetchmail-friends