[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Files Reference

.forward File


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:


Copies of messages sent to mickey are forwarded to user donald on host wonderful.world.disney, and to pluto on the local system.

  1. The addresses listed in the .forward file can be a comma-separated list of addresses; for example:
    donald@wonderful.world.disney, pluto
  2. Addresses can specify programs. The following example forwards a message to the vacation command:
    mickey, "|/usr/bin/vacation mickey"

    This example sends a message to user mickey and to the vacation program.

  3. This file must be created by the user in the $HOME directory.

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.

Related Information

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.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]