C-NET :: PROJECTS

cat disable-the-no-mail-notification-on-machines-which-have-no-local-mail.md

Disable the "No mail" notification on machines which have no local mail

Posted
Filed under
Howto's · Linux

On machines which are set up to have no local mail and send all their messages to a smarthost, using e.g. exim4, the "No mail." message at login is both unnecessary and annoying, because when things are set up correctly, there should never be any local mail in the first place.

This can be remedied by editing /etc/pam.d/ssh (or whichever file corresponds to the login method you're using) and taking a look at the two following lines:

# Print the status of the user's mailbox upon successful login.
session optional pam_mail.so standard noenv # [1]
text

It's time to comment something out :)

Comments