13.8 The User??™s ~/.forward File | 505
If a program requires no arguments (as opposed to ignoring them), the ~/.forward
program specifications can be made unique by including a shell comment:
user 1 ?†’ \user1, "|/bin/notify #user1"
user 2 ?†’ \user2, "|/bin/notify #user2"
13.8.5 Specialty Programs for Use with ~/.forward
Rather than expecting users to write home-grown programs for use in ~/.forward
files, offer them any or all of the publicly available alternatives. The most common
are listed in the following sections.
13.8.5.1 The procmail program
The procmail(1) program, originally written by Stephen R. van den Berg and currently
maintained by Philip Guenther, is purported to be the most reliable of the
delivery programs. It can sort incoming mail into separate folders and files, run programs,
preprocess mail (filtering out unwanted mail), and selectively forward mail
elsewhere. It can function as a substitute for the local delivery agent or handle mail
delivery for the individual user. The procmail program (as recommended in its manual)
is typically used in the ~/.forward file like this:
"|exec /usr/local/bin/procmail #user"
Note that procmail does not accept a username as a command-line argument.
Because of this, a dummy shell comment is needed for pre-V8 versions of sendmail to
make the address unique. The procmail program is available from the site http://
www.
Pages:
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905