sendmail administration

Moving the per-user forward files

Some sites mount each user's home directory from a local disk on their workstation, so that local access is fast. However, the result is that .forward file lookups are slow. In some cases, mail can even be delivered on machines inappropriately because of a file server being down. The performance can be especially bad if you run the automount facility.

The ForwardPath (J) option allows you to set a path of forward files. For example, the following configuration file line would first look for a file with the same name as the user's login in /usr/forward; if that is not found (or is inaccessible) the file .forward in the user's home directory is searched.

   O ForwardPath=/usr/forward/$u:$z/.forward
A truly perverse site could also search by sender by using $r, $s, or $f.

If you create a directory such as /usr/forward, it should be mode 1777 (that is, the sticky bit should be set). Users should create the files mode 644. Note that you must use the forwardfileinunsafedirpath and forwardfileinunsafedirpathsafe flags with the DontBlameSendmail option to allow forward files in a world writable directory. This might also be used as a denial of service attack (users could create forward files for other users); a better approach might be to create /var/forward mode 755 and create empty files for each user, owned by that user, mode 644. If you do this, you don't have to set the DontBlameSendmail options indicated above.

Next topic: Setting mail queue filesystem free space
Previous topic: Using sendmail with a name server

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003