Go to the first, previous, next, last section, table of contents.


The localuser director

The `localuser' director checks whether the local part of an address is the login of a local user, by calling the `getpwnam()' 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 user's uid, gid, and home directory are set up by default to be used while running the delivery process. The generic `transport' option must always be specified, unless the generic `verify_only' option is set.

The generic `require_files' option may contain references to `$home' when used with this director. Thus 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 `.procmailrc' file and then to route delivery via `procmail' if one is found.

current_directory (localuser) option

Option: current_directory
Type: string
Default: unset

This option string is expanded and set as the current directory during the delivery process, unless overridden by a setting on the transport. See chapter "Environment for running local transports" for details of the local delivery environment.

directory (localuser) option

Option: directory
Type: string
Default: unset

This is an obsolete name for the `match_directory' option. It was changed to avoid confusion with `directory' options in other drivers, which have a different kind of meaning.

home_directory (localuser) option

Option: home_directory
Type: string
Default: unset

This option overrides the home directory that is obtained from the `getpwnam()' function. The string is expanded and set as the home directory during the delivery process, unless overridden by a setting on the transport. See chapter "Environment for running local transports" for details of the local delivery environment.

When processing the `require_files' generic option, the value of `$home' is the value of this option if it is set. Otherwise the value of `$home' is the user's home directory as obtained from `getpwnam()'.

match_directory (localuser) option

Option: match_directory
Type: string
Default: unset

If this option is set, the user's home directory, as obtained from `getpwnam()', must match the given string. If it does not, the director fails to match the address. This provides a way of partitioning the local users by home directory. The string is expanded before use if it contains any $ characters. 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 fails to handle the address.

If the expanded string starts with an asterisk, then 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.

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


Go to the first, previous, next, last section, table of contents.