Name

forward - Mail forwarding file

Description

Mail addressed to a local user may be automatically forwarded to any other e-mail address by creating a file called forward in the user’s home directory ($/usr/username/forward). This file typically consists of one line which holds one e-mail address, but multiple lines and multiple e-mail addresses (space-separated) may also be given. Forwarding addresses can reference other local or offsite accounts.

For example, a user on this system named jsbach can create a forward file that contains this address:

johann@pro-musette.cts.com

Any mail destined for jsbach on this site will effectively be forwarded to johann@pro-musette.cts.com instead. Note that the local user jsbach will not receive a copy of the letter — it is simply passed onto the forwarding address.

To forward a letter and have a copy retained in the local mailbox, include the user’s name, a space (or a new line), and the forwarding address. Example:

jsbach johann@pro-musette.cts.com

Mail addressed to jsbach is copied to jsbach’s local mailbox as well as forward to johann@pro-musette.cts.com. A number of additional forwarding addresses can be supplied.

Note

To discontinue forwarding, remove or rename the forward file.

For loop protection, an address in the forward file cannot reference another local user that has a forward file.

Files

$/usr/*/forward

See Also

aliases(F), mail(C), sendmail(C)