Articles

Affichage des articles du août, 2011

Using maildirs on Ubuntu [en/fr]

Among all the operations that I do not so frequently, there's the one consisting in setting up system-wide maildirs. As I always forget how to redefine this pesky MAIL variable set by default to /var/mail/username, I've decided to blog about it to record the solution:

If you're directed to  /etc/login.defs  forget about it, just read the comments in it that points you to /etc/pam.d/* files.

The change to do are in

/etc/pam.d/su:
#session    optional   pam_mail.so  nopen session    optional   pam_mail.so dir=~/Maildir nopen
/etc/pam.d/sshd:
#session    optional     pam_mail.so standard noenv # [1]
session    optional     pam_mail.so dir=~/Maildir standard

/etc/pam.d/login:
#session    optional   pam_mail.so standard
session    optional     pam_mail.so dir=~/Maildir standard

I used to call my maildirs folder simply 'Mail' but as most software expect them to be called 'Maildir' by default. I now follow the 'Maildir' name convention to avoid redefining the …