When setting up
Maildir in Debian 5.0, getting the generic
mail
applications working correctly can be tricky.
- Install the 'mailutils' package, not the bsd mailx package.
- Do not touch the mailutils /etc/mail.rc file; there are some promising looking variables here like
mailbox-type
but these do not do what is desired. When the MAIL environment variable is set correctly mailutils will automatically detect the maildir box type.
- Do not touch /etc/login.defs; the promising looking lines in here are deprecated.
- Edit files in
/etc/pam.d
, changing the pam_mail.so lines as shown (assuming ~/Maildir as the selected location):
- login: default login shells
session optional pam_mail.so dir=~/Maildir standard
- su: set up for proper MAIL when using su; nopen does not show 'new mail' message
session optional pam_mail.so dir=~/Maildir nopen
- sshd: set up MAIL properly when logging in with ssh; this line probably has a noenv by default which needs removed to set this properly
session optional pam_mail.so dir=~/Maildir standard