Previous   Next   Contents       (Exim 4.20 Specification)

26. 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. It is usually run as the result of mail filtering, a ``vacation'' message being the standard example. However, it can also be run directly from a router like any other transport. To reduce the possibility of message cascades, messages created by the autoreply transport always have empty envelope sender addresses, like bounce messages.

The parameters of the message to be sent can be specified in the configuration by options described below. However, these are used only when the address passed to the transport does not contain its own reply information. When the transport is run as a consequence of a mail or vacation command in a filter file, the parameters of the message are supplied by the filter, and passed with the address. The transport's options that define the message are then ignored (so they are not usually set in this case). The message is specified entirely by the filter or by the transport; it is never built from a mixture of options. However, the file_optional, mode, and return_message options apply in all cases.

Autoreply is implemented as a local transport. When used as a result of a command in a user's filter file, autoreply normally runs under the uid and gid of the user, and with appropriate current and home directories (see chapter 22).

There is a subtle difference between routing a message to a pipe transport that generates some text to be returned to the sender, and routing 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, whereas if autoreply is used, a separate message is generated for each address that is passed to it.

Non-printing characters are not permitted in the header lines generated for the message that autoreply creates, with the exception of newlines that are immediately followed by whitespace. If any non-printing characters are found, the transport defers. Whether characters with the top bit set count as printing characters or not is controlled by the print_topbitchars global option.

If any of the generic options for manipulating headers (for example, headers_add) are set on an autoreply transport, they apply to the copy of the original message that is included in the generated message when return_message is set. They do not apply to the generated message itself.

If the autoreply transport receives return code 2 from Exim when it submits the message, indicating that there were no recipients, it does not treat this as an error. This means that autoreplies sent to $sender_address when this is empty (because the incoming message is a bounce message) do not cause problems. They are just discarded.

26.1. Private options for autoreply


bcc

Type:  string, expanded
Default:  unset

This specifies the addresses that are to receive ``blind carbon copies'' of the message when the message is specified by the transport.


cc

Type:  string, expanded
Default:  unset

This specifies recipients of the message and the contents of the Cc: header when the message is specified by the transport.


file

Type:  string, expanded
Default:  unset

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


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

Type:  boolean
Default:  false

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


from

Type:  string, expanded
Default:  unset

This specifies the contents of the From: header when the message is specified by the transport.


headers

Type:  string, expanded
Default:  unset

This specifies additional RFC 2822 headers that are to be added to the message when the message is specified by the transport. Several can be given by using ``\n'' to separate them. There is no check on the format.


log

Type:  string, expanded
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.


mode

Type:  octal integer
Default:  0600

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


once

Type:  string, expanded
Default:  unset

This option names a file or DBM database in which a record of each To: recipient is kept when the message is specified by the transport. Note: This does not apply to Cc: or Bcc: recipients. If once_file_size is not set, a DBM database is used, and it is allowed to grow as large as necessary. If a potential recipient is already in the database, no message is sent by default. However, if once_repeat specifies a time greater than zero, the message is sent if that much time has elapsed since a message was last sent to this recipient. If once is unset, the message is always sent.

If once_file_size is set greater than zero, it changes the way Exim implements the once option. Instead of using a DBM file to record every recipient it sends to, it uses a regular file, whose size will never get larger than the given value. In the file, it keeps a linear list of recipient addresses and times at which they were sent messages. If the file is full when a new address needs to be added, the oldest address is dropped. If once_repeat is not set, this means that a given recipient may receive multiple messages, but at unpredictable intervals that depend on the rate of turnover of addresses in the file. If once_repeat is set, it specifies a maximum time between repeats.


once_file_size

Type:  integer
Default:  0

See once above.


once_repeat

Type:  time, expanded
Default:  0s

See once above. After expansion, the value of this option must be a valid time value.


reply_to

Type:  string, expanded
Default:  unset

This specifies the contents of the Reply-To: header when the message is specified by the transport.


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 global configuration option.


subject

Type:  string, expanded
Default:  unset

This specifies the contents of the Subject: header when the message is specified by the transport.


text

Type:  string, expanded
Default:  unset

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


to

Type:  string, expanded
Default:  unset

This specifies recipients of the message and the contents of the To: header when the message is specified by the transport.




Previous  Next  Contents       (Exim 4.20 Specification)