Provided by: fastforward_0.51-8_amd64
NAME
newaliases - create a forwarding database from /etc/aliases
SYNOPSIS
newaliases
DESCRIPTION
newaliases reads a table of sendmail-style forwarding instructions from /etc/aliases and converts them into a forwarding database in /etc/aliases.cdb. The forwarding database can be used by fastforward. For safety, newaliases writes the forwarding database to /etc/aliases.tmp and then moves /etc/aliases.tmp to /etc/aliases.cdb. If there is a problem creating /etc/aliases.tmp, newaliases complains and leaves /etc/aliases.cdb alone. Deliveries can continue using /etc/aliases.cdb in the meantime. newaliases always creates /etc/aliases.cdb world-readable. newaliases makes no attempt to protect against simultaneous updates of /etc/aliases.cdb.
INSTRUCTION FORMAT
newaliases imitates sendmail's handling of /etc/aliases. For example, root: alice, bill says that mail for root should be forwarded to alice and bill. COMPATIBILITY WARNING: newaliases does not support file deliveries. You can use the file delivery mechanism described in dot-qmail(5) instead.
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 the recipient address recip. 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@heaven.af.mil or root@heaven.af.mil will be delivered to Bob: postmaster@heaven.af.mil: bob@heaven.af.mil root@heaven.af.mil: postmaster@heaven.af.mil COMPATIBILITY WARNING: With sendmail, entries in /etc/aliases can override usernames. With qmail, if you install fastforward in ~alias/.qmail-default, it will not see addresses that are controlled by other users. See qmail-getpw(8). To change this, see qmail- users(5). COMPATIBILITY WARNING: Various versions of sendmail do various strange things with circular alias definitions. See setforward(1) for details on fastforward's behavior. COMPATIBILITY WARNING: If there are several forwarding instructions for a single alias, sendmail will complain; fastforward will silently use the first instruction.
WILDCARDS
alias can have the form user@host.dom for one user at one host, @host.dom for all users at one host, or user for one user at all hosts. COMPATIBILITY WARNING: sendmail supports only user; it does not support per-host aliases. It accepts user@host.dom if host.dom is a local host, but it then treats it the same way as user, applying to all local hosts and virtual domains.
ADDRESS FORMATS
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 recipient address without a fully qualified domain name is fed through the defaulthost, defaultdomain, and plusdomain mechanisms described in qmail-header(5). COMPATIBILITY WARNING: sendmail's handling of quotes and backslashes violates RFC 821 and RFC 822, and is not supported by newaliases. The qmail-local delivery mechanism lets each user manage several addresses, so there is no need for a special syntax to get around forwarding.
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 COMPATIBILITY WARNING: sendmail requires the colon to be on the first line of a multi-line forwarding instruction. newaliases doesn't care whether the colon is present at all. 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.
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. COMPATIBILITY WARNING: sendmail does not permit continuations of comment lines.
PROGRAMS
If a recipient address does not contain a domain name, and begins with a vertical bar, newaliases takes the rest of the address as a program to run: weather: "|weather-server" fastforward will run weather-server when a message arrives for weather. COMPATIBILITY WARNING: Internet addresses can legitimately start with a slash or vertical bar. 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. COMPATIBILITY WARNING: newaliases does not allow a vertical bar before double quotes.
INCLUDE FILES
A recipient address of the form :include:file means ``every address listed in file.'' (Actually fastforward reads file.bin; see newinclude(1) for further details.) Note that file is read by fastforward, not newaliases, so the system administrator does not have to run newaliases every time file changes. file must be world-readable and accessible to fastforward. COMPATIBILITY WARNING: If an :include: file is unreadable or nonexistent, sendmail skips it; fastforward defers delivery of the message. COMPATIBILITY WARNING: sendmail does not permit spaces inside the literal text :include:. newaliases does. COMPATIBILITY WARNING: Versions of sendmail before V8 did not strip quotes from :include: filenames.
ALIAS OWNERS
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. COMPATIBILITY WARNING: When an alias includes the same recipient both inside and outside a mailing list, 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.
SEE ALSO
fastforward(1), setforward(1), newinclude(1), printforward(1), dot-qmail(5) newaliases(1)