Configuring fetchmail and procmail for local delivery

I wanted to fetch my email from a IMAP server and be able to read it using good old elm. To do this I decided to use fetchmail to get the email from the IMAP server, and procmail to do the local delivery. The fetchmail config file (~/.fetchmailrc) file needs to call procmail with '-f-':
# Configuration created Wed Mar  8 10:06:26 2000 by fetchmailconf
set postmaster "pere"
set daemon 30 # seconds between mail checks
poll eeserver.ee.uwa.edu.au with proto IMAP
  mda "/usr/bin/procmail -f-"
poll odin.ee.uwa.edu.au with proto IMAP
  mda "/usr/bin/procmail -f-"
The procmail config file need to specify path to required support programs, and where to store the incoming email:
PATH=/bin:/usr/bin:/usr/sbin
MAILDIR=$HOME/Mail           #you'd better make sure it exists
DEFAULT=$MAILDIR/imap-mbox   #completely optional
LOGFILE=$MAILDIR/from        #recommended

Petter Reinholdtsen, March 2000