1PAM_MAIL(8)                    Linux-PAM Manual                    PAM_MAIL(8)
2
3
4

NAME

6       pam_mail - Inform about available mail
7

SYNOPSIS

9       pam_mail.so [close] [debug] [dir=maildir] [empty] [hash=count] [noenv]
10                   [nopen] [quiet] [standard]
11

DESCRIPTION

13       The pam_mail PAM module provides the "you have new mail" service to the
14       user. It can be plugged into any application that has credential or
15       session hooks. It gives a single message indicating the newness of any
16       mail it finds in the user's mail folder. This module also sets the PAM
17       environment variable, MAIL, to the user's mail directory.
18
19       If the mail spool file (be it /var/mail/$USER or a pathname given with
20       the dir= parameter) is a directory then pam_mail assumes it is in the
21       Maildir format.
22

OPTIONS

24       close
25           Indicate if the user has any mail also on logout.
26
27       debug
28           Print debug information.
29
30       dir=maildir
31           Look for the user's mail in an alternative location defined by
32           maildir/<login>. The default location for mail is
33           /var/mail/<login>. Note, if the supplied maildir is prefixed by a
34           '~', the directory is interpreted as indicating a file in the
35           user's home directory.
36
37       empty
38           Also print message if user has no mail.
39
40       hash=count
41           Mail directory hash depth. For example, a hashcount of 2 would make
42           the mail file be /var/spool/mail/u/s/user.
43
44       noenv
45           Do not set the MAIL environment variable.
46
47       nopen
48           Don't print any mail information on login. This flag is useful to
49           get the MAIL environment variable set, but to not display any
50           information about it.
51
52       quiet
53           Only report when there is new mail.
54
55       standard
56           Old style "You have..." format which doesn't show the mail spool
57           being used. This also implies "empty".
58

MODULE TYPES PROVIDED

60       The session and auth (on establishment and deletion of credentials)
61       module types are provided.
62

RETURN VALUES

64       PAM_BUF_ERR
65           Memory buffer error.
66
67       PAM_SERVICE_ERR
68           Badly formed arguments.
69
70       PAM_SUCCESS
71           Success.
72
73       PAM_USER_UNKNOWN
74           User not known.
75

EXAMPLES

77       Add the following line to /etc/pam.d/login to indicate that the user
78       has new mail when they login to the system.
79
80           session  optional  pam_mail.so standard
81
82
83

SEE ALSO

85       pam.conf(5), pam.d(5), pam(8)
86

AUTHOR

88       pam_mail was written by Andrew G. Morgan <morgan@kernel.org>.
89
90
91
92Linux-PAM Manual                  05/18/2017                       PAM_MAIL(8)
Impressum