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


25 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.

`Smartuser' can generate a new address from the old one, and cause that to be reprocessed, or it can set a transport for the current address, optionally changing the address. Common uses are to pipe the message to a script that generates an information message to be returned to the sender, or to send the message to another host for processing.

new_address (smartuser) option

Option: new_address
Type: string
Default: unset

This option specifies a new address, to replace the current one. It must be a qualified address (that is, contain an @ character). The string is expanded, and 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 generic `transport' option is not specified, this option is required, and the new address is processed by the directors and routers in the normal way. In particular, if it is a duplicate of any other address in the message, it is discarded. However, if a transport is specified, the new address just replaces the old one when the message is delivered, and no checking for duplication takes place.

panic_expansion_fail (smartuser) option

Option: panic_expansion_fail
Type: boolean
Default: true

If the expansion of `new_address' 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 option is set false, in which case the same action is taken as for `fail'.


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