aliases(5)

NAME
aliases - format of qmsmac aliases file

OVERVIEW
The file /var/qmsmac/etc/aliases contains forwarding instructions. For example,
       root: alice, bill
says that mail for root should be forwarded to alice and bill. Forwarding instructions fed to newaliases will be used by qmsmac. See newaliases(8).

SIMPLE ALIASES
The simplest type of forwarding instruction is a line of the form
       alias: recip
Any message sent to alias will be forwarded to recip. alias must be an address reachable through qmsmac. Addresses are compared to alias without regard to case. Forwarding instructions are cumulative. If recip is itself an alias, messages to alias will be forwarded the same way as messages to recip. For example, with the following instructions, messages to postmaster or root will be delivered to Bob:
       postmaster: bob
       root: postmaster
The order of forwarding instructions in etc/aliases does not matter. Addresses in etc/aliases are parsed the same way as addresses in RFC 822 message headers. Parenthesized comments and bracketed addresses are permitted:
       root: bob (Bob, the postmaster)
       joe: Joe Shmoe <shmoe@heaven.af.mil>
Addresses with special characters must be quoted:
       fred: "spaced out mailbox"@heaven.af.mil
Address groups are not permitted, since colons have a different use in etc/aliases. Any address without a fully qualified domain name is handled as described in qmail-header(5).

MULTIPLE RECIPIENTS
An instruction may list more than one recipient address:
       alias: recip1, recip2, recip3
Any message sent to 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:
       hostmaster:
          fred,
          joe
There can be only one forwarding instruction for a single alias.

COMMENTS
Any line in etc/aliases that begins with # is ignored:
       # this is a comment
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.

INCLUDE FILES
A recipient address of the form :include:file means ``every address listed in file.'' file may contain any number of lines; each line may contain any number of addresses, possibly including more :include: files. Any line in file beginning with # is ignored. Note that file is read by qmsmac, not newaliases, so it can be changed on the fly. For safety, if you want to update file, you should move another file on top of it. file must be world-readable and accessible to the uid running qmsmac.

ALIAS OWNERS
Normally, if a message is forwarded to a bad address, it will bounce back to the original envelope sender. However, if there is an alias for owner-list, any message forwarded through list will have its envelope sender set to owner-list, so that bounces go back to owner-list.

DUPLICATES
If an alias refers to the same recipient several times, a message to the alias is forwarded to the recipient only once. For example:
       everybody: programmers, testers
       programmers: joe, bob
       testers: joe, fred
A message to everybody will be sent to joe only once. Exception: If owner-list exists, recipients inside list are considered different from recipients outside list.

DEFAULT INSTRUCTIONS
You can set up a catch-all forwarding instruction for all addresses at a domain:
       @nowhere.af.mil: joe
This instruction applies to any address at nowhere.af.mil that does not have its own instruction.

MAJOR COMPATIBILITY ISSUES
sendmail's handling of quotes and backslashes violates RFC 821 and RFC 822, and is not supported by qmsmac. The qmail-alias delivery mechanism lets each user manage several addresses, so there is no need for a special syntax to get around forwarding. sendmail and smail support file and program deliveries out of /etc/aliases and :include: files. qmsmac does not. You can use the delivery mechanism described in qmail-alias(8) to set up secure file and program deliveries. sendmail does not support default instructions. If an :include: file is unreadable or nonexistent, sendmail skips it; qmsmac defers delivery of the message. Various versions of sendmail do various strange things with circular alias definitions. When an alias includes the same recipient both inside and outside a mailing list, sendmail sends the message only once. Its choice of envelope sender for that recipient depends on the phase of the moon.

MINOR COMPATIBILITY ISSUES
sendmail does not permit spaces inside the literal text :include:. qmsmac does. sendmail requires the colon to be on the first line of a multi-line forwarding instruction. qmsmac doesn't care whether the colon is present at all. 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. sendmail also does not permit continuations of comment lines. If there are several forwarding instructions for one alias, sendmail will complain; qmsmac will silently use the first instruction. Versions of sendmail before V8 did not strip quotes from :include: filenames. Versions of sendmail before V8 did not allow comments in :include: files.

SEE ALSO
newaliases(8), qmail-alias(8), qmsmac(8)