Debian Codegraph @

upstream/debian-unstable/man8/pam_mail.8

raw
1 '\" t
2 .\" Title: pam_mail
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\" Date: 06/29/2025
6 .\" Manual: Linux-PAM Manual
7 .\" Source: Linux-PAM
8 .\" Language: English
9 .\"
10 .TH "PAM_MAIL" "8" "06/29/2025" "Linux\-PAM" "Linux\-PAM Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 pam_mail \- Inform about available mail
32 .SH "SYNOPSIS"
33 .HP \w'\fBpam_mail\&.so\fR\ 'u
34 \fBpam_mail\&.so\fR [close] [debug] [dir=\fImaildir\fR] [empty] [hash=\fIcount\fR] [noenv] [nopen] [quiet] [standard]
35 .SH "DESCRIPTION"
36 .PP
37 The pam_mail PAM module provides the "you have new mail" service to the user\&. It can be plugged into any application that has credential or session hooks\&. It gives a single message indicating the
38 \fInewness\fR
39 of any mail it finds in the user\*(Aqs mail folder\&. This module also sets the PAM environment variable,
40 \fBMAIL\fR, to the user\*(Aqs mail directory\&.
41 .PP
42 If the mail spool file (be it
43 /var/mail/$USER
44 or a pathname given with the
45 \fBdir=\fR
46 parameter) is a directory then pam_mail assumes it is in the
47 \fIMaildir\fR
48 format\&.
49 .SH "OPTIONS"
50 .PP
51 .PP
52 close
53 .RS 4
54 Indicate if the user has any mail also on logout\&.
55 .RE
56 .PP
57 debug
58 .RS 4
59 Print debug information\&.
60 .RE
61 .PP
62 dir=maildir
63 .RS 4
64 Look for the user\*(Aqs mail in an alternative location defined by
65 maildir/<login>\&. The default location for mail is
66 /var/mail/<login>\&. Note, if the supplied
67 maildir
68 is prefixed by a \*(Aq~\*(Aq, the directory is interpreted as indicating a file in the user\*(Aqs home directory\&.
69 .RE
70 .PP
71 empty
72 .RS 4
73 Also print message if user has no mail\&.
74 .RE
75 .PP
76 hash=count
77 .RS 4
78 Mail directory hash depth\&. For example, a
79 \fIhashcount\fR
80 of 2 would make the mail file be
81 /var/spool/mail/u/s/user\&.
82 .RE
83 .PP
84 noenv
85 .RS 4
86 Do not set the
87 \fBMAIL\fR
88 environment variable\&.
89 .RE
90 .PP
91 nopen
92 .RS 4
93 Don\*(Aqt print any mail information on login\&. This flag is useful to get the
94 \fBMAIL\fR
95 environment variable set, but to not display any information about it\&.
96 .RE
97 .PP
98 quiet
99 .RS 4
100 Only report when there is new mail\&.
101 .RE
102 .PP
103 standard
104 .RS 4
105 Old style "You have\&.\&.\&." format which doesn\*(Aqt show the mail spool being used\&. This also implies "empty"\&.
106 .RE
107 .SH "MODULE TYPES PROVIDED"
108 .PP
109 The
110 \fBsession\fR
111 and
112 \fBauth\fR
113 (on establishment and deletion of credentials) module types are provided\&.
114 .SH "RETURN VALUES"
115 .PP
116 PAM_BUF_ERR
117 .RS 4
118 Memory buffer error\&.
119 .RE
120 .PP
121 PAM_SERVICE_ERR
122 .RS 4
123 Badly formed arguments\&.
124 .RE
125 .PP
126 PAM_SUCCESS
127 .RS 4
128 Success\&.
129 .RE
130 .PP
131 PAM_USER_UNKNOWN
132 .RS 4
133 User not known\&.
134 .RE
135 .SH "EXAMPLES"
136 .PP
137 Add the following line to
138 /etc/pam\&.d/login
139 to indicate that the user has new mail when they login to the system\&.
140 .sp
141 .if n \{\
142 .RS 4
143 .\}
144 .nf
145 session optional pam_mail\&.so standard
146
147 .fi
148 .if n \{\
149 .RE
150 .\}
151 .sp
152 .SH "SEE ALSO"
153 .PP
154 \fBpam.conf\fR(5),
155 \fBpam.d\fR(5),
156 \fBpam\fR(7)
157 .SH "AUTHOR"
158 .PP
159 pam_mail was written by Andrew G\&. Morgan <morgan@kernel\&.org>\&.