Automatically forwards mail as it is received.
When mail is sent to a local user, the sendmail command checks for the $HOME/.forward file. The $HOME/.forward file can contain one or more addresses or aliases. If the file exists, the message is not sent to the user. The message is sent to the addresses or aliases in the .forward file. For example, if user mickey's .forward file on host disney contains:
donald@wonderful.world.disney pluto
Copies of messages sent to mickey are forwarded to user donald on host wonderful.world.disney, and to pluto on the local system.
donald@wonderful.world.disney, pluto
mickey, "|/usr/bin/vacation mickey"
This example sends a message to user mickey and to the vacation program.
To stop forwarding mail, use the rm command to remove the .forward file from your home directory:
rm .forward
The .forward file is deleted. Incoming mail is delivered to the user's system mailbox.
$HOME/.forward | Specifies the path of the file. |
The mail command, vacation command.
Creating an Alias or Distribution List, Forwarding Mail, Sending a Vacation Message Notice, Customizing the Mail Program in AIX 5L Version 5.2 System User's Guide: Communications and Networks.