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


The smartuser director

The `smartuser' director matches any local part, so it can be used to handle local addresses that all other directors have failed. It is, of course, subject to the generic director options, so specific instances can be used for all addresses in certain domains, or all local parts with certain prefixes or suffixes, or specific local parts, or any other generic condition.

If a transport is specified, `smartuser' directs the message to that transport, either using the original address, or, if `new_address' is set, using a new envelope address. No checking for duplication takes place. The original address is available to the transport via the expansion variables `$original_local_part' and `$original_domain'.

If no transport is specified, then `new_address' must be set, and `smartuser' treats its value as if it were a line from an alias file. It must consist of a comma-separated list of items as defined in section "Types of alias item" in chapter "The aliasfile director". The special values `:blackhole:', `:defer:', and `:fail:' (but not `:include:') may be used. If any new address is a duplicate of any other address in the message, it is discarded.

new_address (smartuser) option

Option: new_address
Type: string
Default: unset

When `transport' is set, this option specifies a single new address, to replace the current one in the message's envelope when it is transported. The address must qualified (that is, contain an @ character).

When `transport' is not set, this option is treated like a line from an alias file. Any unqualified addresses it contains are qualified using the value of `qualify_recipient'.

In both cases, new addresses are rewritten by Exim's normal rewriting rules (see chapter "Address rewriting") unless the `rewrite' option is turned off.

The value of `new_address' is expanded, so settings such as

new_address = ${local_part}@some.new.host

can be used, or a file lookup on the local part can be done. If the expansion fails as a result of an explicit `fail' item in an expansion sub-expression, the director just fails to handle the address. Otherwise, an expansion failure is treated as a serious configuration error, and causes a panic, unless this `panic_expansion_fail' is set false, in which case the same action is taken as for `fail'.

panic_expansion_fail (smartuser) option

Option: panic_expansion_fail
Type: boolean
Default: true

See `new_address' above.

rewrite (smartuser) option

Option: rewrite
Type: boolean
Default: true

If this option is set false, addresses specified by `new_address' are not subject to rewriting.


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