0
I uninstalled mailutils
and postfix
on Ubuntu 16.04.1
but I still get the no mail
message after logging into my VPS.
0
I uninstalled mailutils
and postfix
on Ubuntu 16.04.1
but I still get the no mail
message after logging into my VPS.
0
To get rid of this message, edit /etc/pam.d/sshd
and change this line:
From:
# Print the status of the user's mailbox upon successful login.
session optional pam_mail.so standard noenv # [1]
To:
# Print the status of the user's mailbox upon successful login.
session optional pam_mail.so nopen noenv # [1]
Delete /var/mail/
by running cd /var/ && rm -rf mail
.
1
I wouldn't have expected removing mailutils
to have resolved this issue. Mail to root
is often used as a last ditch attempt to notify the administrator of a failure.
Many system use the pam_mail
module to report mail. This is likely enabled by default. The quiet
option should make it report only if there is mail.
The no mail for root
message is telling you that there are no such messages. Different systems use different methods to determine if there is mail during login. Check the scripts run by your shell during login.
On Linux it is common to configure an alias to the system administrator's real email address. This requires a working mail delivery system, usually forwarding to a mail relay that can get the message delivered.
@rany same argument applies, This is normally handled by checking for the existence of a file containing unread mail. Its location may be specified by the
MAIL
environment variable. – BillThor – 2016-09-01T12:25:57.717