How can I disable the "No mail" notice on text-based login sessions?

I have had an Ubuntu Server (12.04.2) running for quite some time. I was playing around with WooCommerce on WordPress the other day, and wanted to figure out how to get the email notifications to work. In my endeavors, I installed (and uninstalled; well, apt-get purge'ed) both sendmail and postfix.

After I was done playing, and uninstalling everything I had installed (since I could not get either to work), I noticed that a prompt telling me that I had mail would pop-up every time I logged onto the system.

enter image description here

How can I get rid of this Prompt? I went many, many months without it, and I don't need it or the mail that it wants to tell me I have. Even better, can I turn off the local mail system entirely?

1 Answer

Edit the pam_mail line in the appropriate PAM configuration file. For local logins, this is /etc/pam.d/login. For ssh, it is /etc/pam.d/sshd. Note that this affects all users. By default it uses standard, which does print a message if you have no mail. You can change it to quiet to only print if you do have mail. See the pam_mail manpage for full details.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like