pam_mail.8 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. '\" t
  2. .\" Title: pam_mail
  3. .\" Author: [see the "AUTHOR" section]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 09/03/2021
  6. .\" Manual: Linux-PAM Manual
  7. .\" Source: Linux-PAM Manual
  8. .\" Language: English
  9. .\"
  10. .TH "PAM_MAIL" "8" "09/03/2021" "Linux-PAM Manual" "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. \fBclose\fR
  53. .RS 4
  54. Indicate if the user has any mail also on logout\&.
  55. .RE
  56. .PP
  57. \fBdebug\fR
  58. .RS 4
  59. Print debug information\&.
  60. .RE
  61. .PP
  62. \fBdir=\fR\fB\fImaildir\fR\fR
  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. \fBempty\fR
  72. .RS 4
  73. Also print message if user has no mail\&.
  74. .RE
  75. .PP
  76. \fBhash=\fR\fB\fIcount\fR\fR
  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. \fBnoenv\fR
  85. .RS 4
  86. Do not set the
  87. \fBMAIL\fR
  88. environment variable\&.
  89. .RE
  90. .PP
  91. \fBnopen\fR
  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. \fBquiet\fR
  99. .RS 4
  100. Only report when there is new mail\&.
  101. .RE
  102. .PP
  103. \fBstandard\fR
  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. .fi
  147. .if n \{\
  148. .RE
  149. .\}
  150. .sp
  151. .SH "SEE ALSO"
  152. .PP
  153. \fBpam.conf\fR(5),
  154. \fBpam.d\fR(5),
  155. \fBpam\fR(8)
  156. .SH "AUTHOR"
  157. .PP
  158. pam_mail was written by Andrew G\&. Morgan <morgan@kernel\&.org>\&.