O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The User’s ~/.forward File

The sendmail program allows each user to have a :include:-style list to customize the receipt of personal mail. That file (actually a possible sequence of files) is defined by the ForwardPath option (ForwardPath). Traditionally, that file is located in a user’s home directory.[7] We use the C-shell notation ~ to indicate user home directories, so we will compactly refer to this file as ~/.forward.

If a recipient address selects a delivery agent with the F=w flag set (F=w), that address is considered the address of a local user whose ~/.forward file can be processed. If the user part of that address contains a backslash, sendmail disallows further processing, and the message is handed to the local delivery agent’s P= program for delivery to the mail-spooling directory. If a backslash is absent, sendmail tries to read that user’s ~/.forward file.

If all the .forward files listed in the ForwardPath option (ForwardPath) cannot be read, their absence is silently ignored. This is how sendmail behaves when those files don’t exist. Users often choose not to have ~/.forward files. But problems can arise when users’ home directories are remotely mounted. If the user’s home directory is temporarily absent (as it would be if an NFS server is down), or if a user has no home directory, sendmail syslog(3)s the following error message and falls back to the other directories in its ForwardPath option:

forward: no home

If there are no further directories to fall back to, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required