Maildir format - notification, mailx command

Using Maildir format in Debian 7:

  • mail notification after login
  • mail notification after ssh login
  • read mail using mailx or mail command

BTW: set delivery agents to use Maildir before

People suggest:

  • don t modify /etc/login.def (depreciated)
  • don t modify /etc/profile ( use /etc/profile.d/)
    echo 'MAIL=$HOME/Maildir/' > /etc/profile.d/local_mailx.sh
  • install heirloom-mailx or mailutils (bsd-mailx not work)
  • set /etc/pam.d/* policy (login, su, ssh)
    find pam_mail.so:
    in login and ssh change to pam_mail.so dir=~/Maildir standard
    in su change to pam_mail.so dir=~/Maildir nopen
Suburban Glory Web Design