One last followup, in case anyone researching something similar notices he same semi-problem....
David Guntner grabbed a keyboard and wrote: > > Found the section in /etc/pam.d/login (and the corresponding one in > /etc/pam.d/su) which reads: > > # Prints the status of the user's mailbox upon succesful login > # (Replaces the `MAIL_CHECK_ENAB' option from login.defs). > # > # This also defines the MAIL environment variable > # However, userdel also needs MAIL_DIR and MAIL_FILE variables > # in /etc/login.defs to make sure that removing a user > # also removes the user's mail spool file. > # See comments in /etc/login.defs > session optional pam_mail.so standard > > Read up on "man pam_mail" and found what needs to be changed there to > point it to the right directory within a user's home directory and > tested it. $MAIL now points where it should - w00t! :-) Well, it works, *almost* perfectly. If I login via SSH or on the console in a virtual terminal (alt-F1, etc.), it works just fine. But for some reason, if I login directly via the GUI login manager (I'm using KDE; don't know if Gnome does this or not), then the $MAIL variable ends up completely empty. It's probably been doing this all along and I just never noticed it until I had made the change to Maildir and started looking around. If I open up any kind of shell window within the GUI that was logged into, doing an "echo $MAIL" brings back an empty response. I can actually go so far as to do a su - {myself} and then an "echo $MAIL" it has the correct value. It's almost like somehow logging in via the KDM manager (again, haven't tested with GDM since I don't use Gnome, so I don't know if the problem is repeatable there), it misses that part of the PAM authentication/setup or otherwise just doesn't bother to pass that variable along. So I ultimately did have to create a file in /etc/profile.d that sets $MAIL and exports it. Now, even when logging in directly to the GUI, "echo $MAIL" shows what it should. :-) --Dave
signature.asc
Description: OpenPGP digital signature