File: spec_25.html

package info (click to toggle)
exim-html 3.20-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge, woody
  • size: 2,868 kB
  • ctags: 4,188
  • sloc: makefile: 40; sh: 19
file content (106 lines) | stat: -rw-r--r-- 3,747 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
     from spec on 25 November 2000 -->

<TITLE>Exim Specification - 25. The localuser director</TITLE>
</HEAD>
<body bgcolor="#FFFFFF" text="#00005A" link="#FF6600" alink="#FF9933" vlink="#990000">
Go to the <A HREF="spec_1.html">first</A>, <A HREF="spec_24.html">previous</A>, <A HREF="spec_26.html">next</A>, <A HREF="spec_59.html">last</A> section, <A HREF="spec_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC672" HREF="spec_toc.html#TOC672">25. The localuser director</A></H1>
<P>
<A NAME="IDX1555"></A>
The <EM>localuser</EM> director checks whether the local part of an address is the
login of a local user, by calling the <EM>getpwnam()</EM> function. If it is, and if
other conditions set by options are met, it accepts the address and sets up a
transport for it. The generic <EM>transport</EM> option must always be specified,
unless the generic <EM>verify_only</EM> option is set.

</P>
<P>
<A NAME="IDX1556"></A>
The user's uid and  gid are set up by default to be used while running the
delivery process. If the generic <EM>home_directory</EM> option (see chapter
21) is unset, the user's home directory is passed to the transport
for use during delivery. Setting

<PRE>
home_directory = $home
</PRE>

<P>
does not work, because $<EM>home</EM> is not set during the expansion of
<EM>home_directory</EM>.

</P>
<P>
When processing the <EM>require_files</EM> generic option, the value of $<EM>home</EM> is
the value of <EM>home_directory</EM> if set, and otherwise the user's home directory.
Using <EM>require_files</EM>
it is possible to pick out all users with particular files in their home
directories and route their mail to a specific transport. This could be used,
for example, to check for a <EM>.procmailrc</EM> file and then to direct delivery via
<A NAME="IDX1557"></A>
<EM>procmail</EM> if one is found.

</P>

<P>

<P>
<A NAME="IDX1558"></A>


<H3><A NAME="SEC673" HREF="spec_toc.html#TOC673">match_directory (localuser)</A></H3>

<P>
Type: string, expanded<BR>
Default: unset

</P>
<P>
If this option is set, the user's home directory, as obtained from
<EM>getpwnam()</EM>, must match the given string. If it does not, the director declines
to handle the address. This provides a way of partitioning the local users by
home directory. The string is expanded before use. If the expansion fails, Exim
panics, unless the failure was explicitly triggered by a `fail' item in a
conditional sub-expression in the expansion, in which case the director just
declines to handle the address.

</P>
<P>
If the expanded string starts with an asterisk, the remainder must match
the end of the home directory name; if it starts with a circumflex, a regular
expression match is performed. In fact, the matching process is the same as is
used for domain list items and may include file lookups.

</P>
<P>
<font color=green>
If the pattern starts with an exclamation mark, the user's home directory must
<EM>not</EM> match the rest of the given string. For example, with

<PRE>
match_directory = !^/group
</PRE>

<P>
the director declines if the user's home directory starts with <EM>/group</EM>.
</font>

</P>

<P>
On central systems at Cambridge University, when a user account is cancelled,
it remains in the password file for a while, with the home directory set to
<EM>/home/CANCELLED</EM>. We use the <EM>match_directory</EM> option to detect mail
addressed to such users and bounce it with an explanatory message.

</P>
<P><HR><P>
Go to the <A HREF="spec_1.html">first</A>, <A HREF="spec_24.html">previous</A>, <A HREF="spec_26.html">next</A>, <A HREF="spec_59.html">last</A> section, <A HREF="spec_toc.html">table of contents</A>.
</BODY>
</HTML>