.TH dot-forward 1qmail .SH NAME dot-forward \- read a .forward file under qmail .SH SYNOPSIS in .BR ~/.qmail : .B | dot-forward [ .B \-nN ] .I file ... .SH OVERVIEW .B dot-forward forwards incoming messages according to sendmail-style instructions in .IR file , if .I file exists. Normally .I file is .BR .forward . .B WARNING: If you create a .B .qmail file to enable .BR dot-forward , make sure to add a second line specifying delivery to your normal mailbox. For example: .EX |dot-forward .forward .br ./Mailbox .EE .B COMPATIBILITY WARNING: .B dot-forward does not support .B :include: or mbox deliveries. You can use the delivery mechanism described in .BR dot-qmail (5) instead. .SH OPTIONS .TP 5 .B \-N (Default.) Read and forward a message. .TP .B \-n Parse .I file and print the forwarding instructions in it, one per line; do not follow the instructions. You can use this option from the command line to see how your .B .forward file will be interpreted: .EX dot-forward -n .forward .EE .SH "FILE HANDLING" When a message arrives, .B dot-forward opens .I file and handles it as discussed below. It exits 99, so .B qmail-local will ignore further instructions in .BR .qmail . Exception: If .I file specifies delivery directly to you, .B dot-forward exits 0, so .B qmail-local will read further instructions in .BR .qmail . If .I file does not exist, .B dot-forward exits 0. You can list several .IR file s; then .B dot-forward will try each one in turn, using the first one that exists, or exiting 0 if none exist. .B COMPATIBILITY WARNING: .B dot-forward treats an empty .I file as if it did not exist. Versions of sendmail before V8 would throw away the incoming message. .B COMPATIBILITY WARNING: If .B dot-forward encounters a temporary error opening .IR file , it exits 111, so that .B qmail-local will try again later. sendmail assumes incorrectly that .I file does not exist. .B COMPATIBILITY WARNING: .I file must be readable by .BR dot-forward , which is normally running as the user. sendmail places different constraints on its .B .forward permissions, since it is normally running as root. .SH "FORWARDING" Normally .I file contains an address. .B dot-forward forwards the message to that address. The address is parsed as if it were in an RFC 822 message header. Parenthesized comments and bracketed addresses are permitted: .EX bob (Bob, the postmaster) @heaven.af.mil .EE Addresses with special characters must be quoted: .EX "spaced out mailbox"@heaven.af.mil .EE Address groups are not permitted. .I file can contain any number of lines, each line containing any number of addresses. .B dot-forward forwards the message to each address: .EX bob, fred, susan .br Joe Shmoe .EE An address without a fully qualified domain name is handled as described in .BR qmail-header (5). Exception: Certain addresses without domain names are handled specially, as described below. .SH "DIRECT DELIVERY" If an address does not contain a domain name, and matches the environment variable .B $USER (without regard to case), it specifies delivery directly to you. If an address matches .B $USER@$HOST (without regard to case), it specifies delivery directly to you. .B COMPATIBILITY WARNING: sendmail's handling of quotes and backslashes violates RFC 821 and RFC 822, and is not supported by .BR dot-forward . .B dot-forward treats .B \ejoe the same way as .BR joe . The .B dot-qmail delivery mechanism lets each user manage several addresses, so there is no need for a special syntax to get around forwarding. .SH "COMMANDS" If an address does not contain a domain name, and begins with a vertical bar, .B dot-forward takes the rest of the address as a command to run: .EX bob, "|vacation bob" .EE .B dot-forward feeds the message to the command, preceded by the environment variables .BR $UFLINE , .BR $RPLINE , and .BR $DTLINE . .B COMPATIBILITY WARNING: Internet addresses can legitimately start with a slash or vertical bar. .B dot-forward treats anything with an unquoted @ as an address. sendmail appears to have various problems coping with these addresses, and with commands that contain @ signs. .SH "COMMENTS" Any line in .I file that begins with # is ignored: .EX # this is a comment .EE .B COMPATIBILITY WARNING: Versions of sendmail before V8 did not allow comments in .B .forward files. .SH VERSION This is .B dot-forward 0.71. The .B dot-forward home page is .BR http://pobox.com/~djb/dot-forward.html . .SH "SEE ALSO" qmail-header(5), dot-qmail(5)