在登录时禁用邮件通知

Mar*_*ter 4 login debian

当我通过 ssh 登录到我的机器时,横幅显示:“没有邮件”。其他时候,即使我没有新邮件,它也会说“你有邮件”。显然,我不需要知道我已经阅读过的邮件。这些信息完全没有用。我可以一起禁用它吗?

我正在使用 Debian Wheezy

小智 5

编辑您的/etc/pam.d/sshd并更改行

# Print the status of the user's mailbox upon successful login.
session    optional     pam_mail.so standard noenv # [1]
Run Code Online (Sandbox Code Playgroud)

# Print the status of the user's mailbox upon successful login.
session    optional     nopen noenv
Run Code Online (Sandbox Code Playgroud)

或完全取消注释该行。

也可以看看 man 8 pam_mail