1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
|
.TH dot-forward 1
.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 <shmoe@heaven.af.mil>
.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)
|