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 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
|
.TH newaliases 1
.SH NAME
newaliases \- create a forwarding database from /etc/aliases
.SH SYNOPSIS
.B newaliases
.SH DESCRIPTION
.B newaliases
reads a table of
sendmail-style
forwarding instructions from
.B /etc/aliases
and converts them into a forwarding database in
.BR /etc/aliases.cdb .
The forwarding database can be used by
.BR fastforward .
For safety,
.B newaliases
writes the forwarding database to
.B /etc/aliases.tmp
and then moves
.B /etc/aliases.tmp
to
.BR /etc/aliases.cdb .
If there is a problem creating
.BR /etc/aliases.tmp ,
.B newaliases
complains and leaves
.B /etc/aliases.cdb
alone.
Deliveries can continue using
.B /etc/aliases.cdb
in the meantime.
.B newaliases
always creates
.B /etc/aliases.cdb
world-readable.
.B newaliases
makes no attempt to protect against
simultaneous updates of
.BR /etc/aliases.cdb .
.SH "INSTRUCTION FORMAT"
.B newaliases
imitates
sendmail's
handling of
.BR /etc/aliases .
For example,
.EX
root: alice, bill
.EE
says that mail for
.B root
should be forwarded to
.B alice
and
.BR bill .
.B COMPATIBILITY WARNING:
.B newaliases
does not support file deliveries.
You can use the file delivery mechanism described in
.B dot-qmail(5)
instead.
.SH "SIMPLE ALIASES"
The simplest type of forwarding instruction
is a line of the form
.EX
alias: recip
.EE
Any message sent to
.I alias
will be forwarded to the recipient address
.IR recip .
Addresses are compared to
.I alias
without regard to case.
Forwarding instructions are cumulative.
If
.I recip
is itself an alias,
messages to
.I alias
will be forwarded the same way as
messages to
.IR recip .
For example, with the following instructions,
messages to
.B postmaster@heaven.af.mil
or
.B root@heaven.af.mil
will be delivered to Bob:
.EX
postmaster@heaven.af.mil: bob@heaven.af.mil
.EE
.br
.EX
root@heaven.af.mil: postmaster@heaven.af.mil
.EE
.B COMPATIBILITY WARNING:
With
sendmail,
entries in
.B /etc/aliases
can override usernames.
With
.BR qmail ,
if you install
.B fastforward
in
.BR ~alias/.qmail-default ,
it will not see addresses that are controlled by other users.
See
.BR qmail-getpw (8).
To change this, see
.BR qmail-users (5).
.B COMPATIBILITY WARNING:
Various versions of
sendmail
do various strange things with circular alias definitions.
See
.BR setforward (1)
for details on
.BR fastforward 's
behavior.
.B COMPATIBILITY WARNING:
If there are several forwarding instructions for a single
.IR alias ,
sendmail
will complain;
.B fastforward
will silently use the first instruction.
.SH "WILDCARDS"
.I alias
can have the form
.I user@host.dom
for one user at one host,
.I @host.dom
for all users at one host, or
.I user
for one user at all hosts.
.B COMPATIBILITY WARNING:
sendmail
supports only
.IR user ;
it does not support per-host aliases.
It accepts
.I user@host.dom
if
.I host.dom
is a local host,
but it then treats it the same way as
.IR user ,
applying to all local hosts and virtual domains.
.SH "ADDRESS FORMATS"
Addresses in
.B /etc/aliases
are parsed the same way as addresses in RFC 822 message headers.
Parenthesized comments and bracketed addresses are permitted:
.EX
root: bob (Bob, the postmaster)
joe: Joe Shmoe <shmoe@heaven.af.mil>
.EE
Addresses with special characters must be quoted:
.EX
fred: "spaced out mailbox"@heaven.af.mil
.EE
Address groups are not permitted,
since colons have a different use in
.BR /etc/aliases .
Any recipient address without a fully qualified domain name is
fed through the
.BR defaulthost ,
.BR defaultdomain ,
and
.B plusdomain
mechanisms described in
.BR qmail-header (5).
.B COMPATIBILITY WARNING:
sendmail's
handling of quotes and backslashes violates RFC 821 and RFC 822,
and is not supported by
.BR newaliases .
The
.B qmail-local
delivery mechanism
lets each user manage several addresses,
so there is no need for a special syntax to get around forwarding.
.SH "MULTIPLE RECIPIENTS"
An instruction may list more than one recipient address:
.EX
alias: recip1, recip2, recip3
.EE
Any message sent to
.I alias
will be forwarded to all of the addresses.
A forwarding instruction may be split across several lines.
Each line past the first must either (1) begin with space or tab
or (2) be empty:
.EX
hostmaster:
.EE
.br
.EX
fred,
.EE
.br
.EX
joe
.EE
.B COMPATIBILITY WARNING:
sendmail
requires the colon to be on the first line
of a multi-line forwarding instruction.
.B newaliases
doesn't care whether the colon is present at all.
.B COMPATIBILITY WARNING:
sendmail
does not permit blank lines in the middle of continuations.
This has the undesirable effect that a blank line behaves differently
from a line containing a single space.
.SH "COMMENTS"
Any line in
.B /etc/aliases
that begins with # is ignored:
.EX
# this is a comment
.EE
A comment may be split across several lines.
Each line past the first must either (1) begin with space or tab
or (2) be empty.
.B COMPATIBILITY WARNING:
sendmail
does not permit continuations of comment lines.
.SH "PROGRAMS"
If a recipient address does not contain a domain name,
and begins with a vertical bar,
.B newaliases
takes the rest of the address as a program to run:
.EX
weather: "|weather-server"
.EE
.B fastforward
will run
.B weather-server
when a message arrives for
.BR weather .
.B COMPATIBILITY WARNING:
Internet addresses can legitimately start with
a slash or vertical bar.
.B newaliases
treats anything with an unquoted @ as an address.
sendmail appears to have various problems
coping with these addresses,
and with commands that contain @ signs.
.B COMPATIBILITY WARNING:
.B newaliases
does not allow a vertical bar before double quotes.
.SH "INCLUDE FILES"
A recipient address of the form
.B :include:\fIfile
means ``every address listed in
.IR file .''
(Actually
.B fastforward
reads
.IR file\fB.bin ;
see
.BR newinclude (1)
for further details.)
Note that
.I file
is read by
.BR fastforward ,
not
.BR newaliases ,
so the system administrator does not have to run
.B newaliases
every time
.I file
changes.
.I file
must be world-readable
and accessible to
.BR fastforward .
.B COMPATIBILITY WARNING:
If an
.B :include:
file is unreadable or nonexistent,
sendmail
skips it;
.B fastforward
defers delivery of the message.
.B COMPATIBILITY WARNING:
sendmail
does not permit spaces inside the literal text
.BR :include: .
.B newaliases
does.
.B COMPATIBILITY WARNING:
Versions of
sendmail
before V8 did not strip quotes from
.B :include:
filenames.
.SH "ALIAS OWNERS"
If there is an alias for
.BR owner-\fIlist ,
any message forwarded through
.I list
will have its envelope sender set to
.BR owner-\fIlist ,
so that bounces go back to
.BR owner-\fIlist .
.B COMPATIBILITY WARNING:
When an alias includes the same recipient both inside and outside
a mailing list,
.B fastforward
sends the message twice,
once with each envelope sender.
sendmail
sends the message only once;
its choice of envelope sender for that recipient
depends on the phase of the moon.
.SH "SEE ALSO"
fastforward(1),
setforward(1),
newinclude(1),
printforward(1),
dot-qmail(5)
|