pam_mail.8.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <?xml version="1.0" encoding='UTF-8'?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
  4. <refentry id="pam_mail">
  5. <refmeta>
  6. <refentrytitle>pam_mail</refentrytitle>
  7. <manvolnum>8</manvolnum>
  8. <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv id="pam_mail-name">
  11. <refname>pam_mail</refname>
  12. <refpurpose>Inform about available mail</refpurpose>
  13. </refnamediv>
  14. <refsynopsisdiv>
  15. <cmdsynopsis id="pam_mail-cmdsynopsis">
  16. <command>pam_mail.so</command>
  17. <arg choice="opt">
  18. close
  19. </arg>
  20. <arg choice="opt">
  21. debug
  22. </arg>
  23. <arg choice="opt">
  24. dir=<replaceable>maildir</replaceable>
  25. </arg>
  26. <arg choice="opt">
  27. empty
  28. </arg>
  29. <arg choice="opt">
  30. hash=<replaceable>count</replaceable>
  31. </arg>
  32. <arg choice="opt">
  33. noenv
  34. </arg>
  35. <arg choice="opt">
  36. nopen
  37. </arg>
  38. <arg choice="opt">
  39. quiet
  40. </arg>
  41. <arg choice="opt">
  42. standard
  43. </arg>
  44. </cmdsynopsis>
  45. </refsynopsisdiv>
  46. <refsect1 id="pam_mail-description">
  47. <title>DESCRIPTION</title>
  48. <para>
  49. The pam_mail PAM module provides the "you have new mail"
  50. service to the user. It can be plugged into any application
  51. that has credential or session hooks. It gives a single message
  52. indicating the <emphasis>newness</emphasis> of any mail it finds
  53. in the user's mail folder. This module also sets the PAM
  54. environment variable, <emphasis remap='B'>MAIL</emphasis>, to the
  55. user's mail directory.
  56. </para>
  57. <para>
  58. If the mail spool file (be it <filename>/var/mail/$USER</filename>
  59. or a pathname given with the <option>dir=</option> parameter) is
  60. a directory then pam_mail assumes it is in the
  61. <emphasis remap='I'>Maildir</emphasis> format.
  62. </para>
  63. </refsect1>
  64. <refsect1 id="pam_mail-options">
  65. <title>OPTIONS</title>
  66. <para>
  67. <variablelist>
  68. <varlistentry>
  69. <term>
  70. <option>close</option>
  71. </term>
  72. <listitem>
  73. <para>
  74. Indicate if the user has any mail also on logout.
  75. </para>
  76. </listitem>
  77. </varlistentry>
  78. <varlistentry>
  79. <term>
  80. <option>debug</option>
  81. </term>
  82. <listitem>
  83. <para>
  84. Print debug information.
  85. </para>
  86. </listitem>
  87. </varlistentry>
  88. <varlistentry>
  89. <term>
  90. <option>dir=<replaceable>maildir</replaceable></option>
  91. </term>
  92. <listitem>
  93. <para>
  94. Look for the user's mail in an alternative location defined by
  95. <filename>maildir/&lt;login&gt;</filename>. The default
  96. location for mail is <filename>/var/mail/&lt;login&gt;</filename>.
  97. Note, if the supplied
  98. <filename>maildir</filename> is prefixed by a '~', the
  99. directory is interpreted as indicating a file in the user's
  100. home directory.
  101. </para>
  102. </listitem>
  103. </varlistentry>
  104. <varlistentry>
  105. <term>
  106. <option>empty</option>
  107. </term>
  108. <listitem>
  109. <para>
  110. Also print message if user has no mail.
  111. </para>
  112. </listitem>
  113. </varlistentry>
  114. <varlistentry>
  115. <term>
  116. <option>hash=<replaceable>count</replaceable></option>
  117. </term>
  118. <listitem>
  119. <para>
  120. Mail directory hash depth. For example, a
  121. <emphasis>hashcount</emphasis> of 2 would
  122. make the mail file be
  123. <filename>/var/spool/mail/u/s/user</filename>.
  124. </para>
  125. </listitem>
  126. </varlistentry>
  127. <varlistentry>
  128. <term>
  129. <option>noenv</option>
  130. </term>
  131. <listitem>
  132. <para>
  133. Do not set the <emphasis remap='B'>MAIL</emphasis>
  134. environment variable.
  135. </para>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry>
  139. <term>
  140. <option>nopen</option>
  141. </term>
  142. <listitem>
  143. <para>
  144. Don't print any mail information on login. This flag is
  145. useful to get the <emphasis remap='B'>MAIL</emphasis>
  146. environment variable set, but to not display any information
  147. about it.
  148. </para>
  149. </listitem>
  150. </varlistentry>
  151. <varlistentry>
  152. <term>
  153. <option>quiet</option>
  154. </term>
  155. <listitem>
  156. <para>
  157. Only report when there is new mail.
  158. </para>
  159. </listitem>
  160. </varlistentry>
  161. <varlistentry>
  162. <term>
  163. <option>standard</option>
  164. </term>
  165. <listitem>
  166. <para>
  167. Old style "You have..." format which doesn't show the
  168. mail spool being used. This also implies "empty".
  169. </para>
  170. </listitem>
  171. </varlistentry>
  172. </variablelist>
  173. </para>
  174. </refsect1>
  175. <refsect1 id="pam_mail-types">
  176. <title>MODULE TYPES PROVIDED</title>
  177. <para>
  178. The <option>session</option> and
  179. <option>auth</option> (on establishment and
  180. deletion of credentials) module types are provided.
  181. </para>
  182. </refsect1>
  183. <refsect1 id='pam_mail-return_values'>
  184. <title>RETURN VALUES</title>
  185. <variablelist>
  186. <varlistentry>
  187. <term>PAM_BUF_ERR</term>
  188. <listitem>
  189. <para>
  190. Memory buffer error.
  191. </para>
  192. </listitem>
  193. </varlistentry>
  194. <varlistentry>
  195. <term>PAM_SERVICE_ERR</term>
  196. <listitem>
  197. <para>
  198. Badly formed arguments.
  199. </para>
  200. </listitem>
  201. </varlistentry>
  202. <varlistentry>
  203. <term>PAM_SUCCESS</term>
  204. <listitem>
  205. <para>
  206. Success.
  207. </para>
  208. </listitem>
  209. </varlistentry>
  210. <varlistentry>
  211. <term>PAM_USER_UNKNOWN</term>
  212. <listitem>
  213. <para>
  214. User not known.
  215. </para>
  216. </listitem>
  217. </varlistentry>
  218. </variablelist>
  219. </refsect1>
  220. <refsect1 id='pam_mail-examples'>
  221. <title>EXAMPLES</title>
  222. <para>
  223. Add the following line to <filename>/etc/pam.d/login</filename> to
  224. indicate that the user has new mail when they login to the system.
  225. <programlisting>
  226. session optional pam_mail.so standard
  227. </programlisting>
  228. </para>
  229. </refsect1>
  230. <refsect1 id='pam_mail-see_also'>
  231. <title>SEE ALSO</title>
  232. <para>
  233. <citerefentry>
  234. <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
  235. </citerefentry>,
  236. <citerefentry>
  237. <refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
  238. </citerefentry>,
  239. <citerefentry>
  240. <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
  241. </citerefentry>
  242. </para>
  243. </refsect1>
  244. <refsect1 id='pam_mail-author'>
  245. <title>AUTHOR</title>
  246. <para>
  247. pam_mail was written by Andrew G. Morgan &lt;morgan@kernel.org&gt;.
  248. </para>
  249. </refsect1>
  250. </refentry>