Monitoring mailbox in Maildir format with bash and pam_mail

[Translate]

After switch to Maildir format mailbox my bash stopped monitoring new mail. To bring this functionality back I need to set location of my new mailbox:

export MAIL=~/Maildir

And after $MAILCHECK seconds I got You have new mail in /home/kb/Maildir.

To set $MAIL for all login shells and for all user I use […]