LINUX – Command Line Login “You have mail.” Fix
This makes the SSH / command line login say if you have new mail at the time of log on:
Edit two files as root – Adding the text in the file
Vi — > /etc/pam.d/login
add the following line to bottom of file
session optional pam_mail.so standard
Vi — >/etc/pam.d/sshd
add the following line:
session optional pam_mail.so standard noenv
By default it seems that CentOS linux does not have the “you have mail ” feature enabled for ssh logins. My issue was that I had a brand new Cetos 7 server -> Installed sendmail, setup the box as mail server and then never the email notification”you have new mail” at time of ssh login. This sent me down a long path to find the under documented pam.d feature.
No comments yet.