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


16 The autoreply transport

The `autoreply' transport is not a true transport in that it does not cause the message to be transmitted. Instead, it generates another mail message, usually as the result of mail filtering. A traditional `vacation' message is the standard example.

`Autoreply' is implemented as a local transport so that it runs under the uid and gid of the local user and with appropriate current and home directories (see chapter "Environment for running local transports"). The parameters of the message to be sent can be specified in the configuration by the options described below, but in the common case when `autoreply' is activated as a result of filtering, none of them are normally set, because all the information is obtained from the filter file.

In an attempt to reduce the possibility of message cascades, messages created by the `autoreply' transport always take the form of delivery error messages. That is, the envelope sender field is empty.

There is a subtle difference between directing a message to a pipe transport that generates some text to be returned to the sender, and directing it to an autoreply transport. This difference is noticeable only if more than one address from the same message is so handled. In the case of a pipe, the separate outputs from the different addresses are gathered up and returned to the sender in a single message, while if `autoreply' is used, a separate message is generated for each address passed to it.

The private options of the `autoreply' transport that describe the message are used only when the address passed to it does not contain any reply information. Thus the message is specified entirely by the director or by the transport; it is never built from a mixture of options. The remaining private options (`file_optional', `group', `initgroups', `mode', `return_message', and `user') apply in all cases.

16.1 Private options for autoreply

bcc (autoreply) option

Option: bcc
Type: string
Default: unset

Specifies the addresses that are to receive `blind carbon copies' of the message when the message is specified by the transport. The string is expanded.

cc (autoreply) option

Option: cc
Type: string
Default: unset

Specifies recipients of the message and the contents of the `Cc:' header when the message is specified by the transport. The string is expanded.

file (autoreply) option

Option: file
Type: string
Default: unset

The contents of the file are sent as the body of the message when the message is specified by the transport. The string is expanded. If both `file' and `text' are set, the text string comes first.

file_expand (autoreply) option

Option: file_expand
Type: boolean
Default: false

If this is set, the contents of the file named by the `file' option are subjected to string expansion as they are added to the message.

file_optional (autoreply) option

Option: file_optional
Type: boolean
Default: false

If this option is true, no error is generated if the file named by the `file' option does not exist or cannot be read.

from (autoreply) option

Option: from
Type: string
Default: unset

The contents of the `From:' header when the message is specified by the transport. The string is expanded.

group (autoreply) option

Option: group
Type: string
Default: unset

If this option is set, it specifies the group under whose gid the delivery process is to be run. If it is not set, a value associated with a user may be used (see below); otherwise a value must have been associated with the address by the director which handled it. If the string contains no $ characters, it is resolved when Exim starts up. Otherwise, the string is expanded at the time the transport is run, and must yield either a digit string or a name which can be looked up using `getgrnam()'.

headers (autoreply) option

Option: headers
Type: string
Default: unset

Specified additional RFC 822 headers that are to be added to the message when the message is specified by the transport. The string is expanded. Several can be given by using `\n' to separate them. There is no check on the format.

initgroups (autoreply) option

Option: initgroups
Type: boolean
Default: false

If this option is true and the uid is provided by the transport, then the `initgroups()' function is called when running the transport to ensure that any additional groups associated with the uid are set up. By default no additional groups are present.

log (autoreply) option

Option: log
Type: string
Default: unset

This option names a file in which a record of every message sent is logged when the message is specified by the transport. The string is expanded.

mode (autoreply) option

Option: mode
Type: integer
Default: 0600

If either the log file or the `once' file has to be created, this mode is used.

once (autoreply) option

Option: once
Type: string
Default: unset

This option names a DBM database in which a record of each recipient is kept when the message is specified by the transport. The string is expanded. If a potential recipient is already in the database, no message is sent.

return_message (autoreply) option

Option: return_message
Type: boolean
Default: false

If this is set, a copy of the original message is returned with the new message, subject to the maximum size set in the `return_size_limit' general configuration option.

subject (autoreply) option

Option: subject
Type: string
Default: unset

The contents of the `Subject:' header when the message is specified by the transport. The string is expanded.

text (autoreply) option

Option: text
Type: string
Default: unset

This specifies a single string to be used as the body of the message when the message is specified by the transport. The string is expanded. If both `text' and `file' are set, the text comes first.

to (autoreply) option

Option: to
Type: string
Default: unset

Specifies recipients of the message and the contents of the `To:' header when the message is specified by the transport. The string is expanded.

user (autoreply) option

Option: user
Type: string
Default: unset

If this option is set, it specifies the user under whose uid the delivery process is to be run. If it is not set, a value must have been associated with the address by the director that handled it. If the string contains no $ characters, it is resolved when Exim starts up. Otherwise, the string is expanded at the time the transport is run, and must yield either a digit string or a name which can be looked up using `getpwnam()'. When `getpwnam()' is used, either at start-up time or later, the group id value associated with the user is taken as the value to be used if the `group' option is not set.


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