Previous   Next   Contents       (Exim Filter Specification)

14. The deliver command

   deliver <mail address>
  e.g. deliver "Dr Livingstone <David@somewhere.africa.example>"

This provides a forwarding operation. The message is sent on to the given address, exactly as happens if the address had appeared in a traditional .forward file. If you want to deliver the message to a number of different addresses, you can use more than one deliver command (each one may have only one address). However, duplicate addresses are discarded.

To deliver a copy of the message to your normal mailbox, your login name can be given as the address. Once an address has been processed by the filtering mechanism, an identical generated address will not be so processed again, so doing this does not cause a loop.

However, if you have a mail alias, you should not refer to it here. For example, if the mail address L.Gulliver is aliased to lg103 then all references in Gulliver's .forward file should be to lg103. A reference to the alias will not work for messages that are addressed to that alias, since, like .forward file processing, aliasing is performed only once on an address, in order to avoid looping.

Following the new address, an optional second address, preceded by errors_to may appear. This changes the address to which delivery errors on the forwarded message will be sent. Instead of going to the message's original sender, they go to this new address. For ordinary users, the only value that is permitted for this address is the user whose filter file is being processed. For example, the user lg103 whose mailbox is in the domain lilliput.example could have a filter file that contains

       deliver jon@elsewhere.example errors_to lg103@lilliput.example

Clearly, using this feature makes sense only in situations where not all messages are being forwarded. In particular, bounce messages must not be forwarded in this way, as this is likely to create a mail loop if something goes wrong.


Previous  Next  Contents       (Exim Filter Specification)