Sendmail with MAILDIR format delivery

  • First you need to setup sendmail to handle mail delivery by procmail. In /etc/mail/sendmail.mc file edit the following line as follows:

Existing settings: dnl # FEATURE(local_procmail, `’, `procmail -t -Y -a $h -d         $u’)dnl

Modified Settings: FEATURE(local_procmail)dnl

MAILER(procmail)dnl

  • Create /etc/procmailrc file for global implementation or you may create per user basis file in $HOME/.procmailrc. Add the following contents to it:

PATH=/usr/local/bin:/usr/bin:/bin

MAILDIR=$HOME/Maildir      # you’d better make sure it exists with new, cur & tmp                         # subdirectories

DEFAULT=$MAILDIR/new   #completely optional

LOGFILE=$MAILDIR/log   #recommended

  • make & restart sendmail. You are Done…

Leave a Reply

Your email address will not be published. Required fields are marked *