NAME
makealiases - Create an alias databaseSYNOPSIS
makealiases
[-protocol= protocol] [-alias=filename] [-src=pathname]
[-tmp= filename] [-chk] [-dump] [module]
DESCRIPTION
The Courier mail server's /etc/courier/aliases.dat file is a unified implementation of sendmail-style address aliasing, qmail-style virtual domains, plus several Courier mail server-style enhancements. The term aliasing refers to substituting one or more addresses for another address. A one-to-one substitution results in the Courier mail server accepting mail for one address, and delivering the mail to another address. A one-to-many substitution results in the Courier mail server accepting mail for one address, and delivering a separate copy of the message to every address defined by the alias. /etc/courier/aliases.dat is a binary database file. makealiases creates the binary database file by reading the aliases from plain text files, and makealiases creates /etc/courier/aliases.dat by default. makealiases creates /etc/courier/aliases.dat from one or more source files, which are plain text files that may be created by any text editor. The format of those source files is defined below. By default, makealiases obtains the source text from /etc/courier/aliases. If this is a text file, it is used verbatim. If this is a directory (the Courier mail server creates it as a directory by default), all the non-hidden files in this directory are concatenated together.OPTIONS
-alias= filenameCreate filename, instead of
/etc/courier/aliases.dat.
-chk
Try to search for bad addresses used in the
aliases.dat file. This option takes some time to complete. It does not create
an aliases.dat file, but instead tries to check every address specified by the
source text file. Why is this necessary? That's because non-delivery reports
will not be sent to the sender for failures in delivering mail to an aliased
address. This is by design. the Courier mail server considers aliases to be
private mailing lists. Because non-delivery notices are not sent, bad
addresses will not be immediately detected.
Note
The -chk option is really effective for addresses which are local,
because there is no real way to determine if a remote mail address is valid.
-dump
Do not create aliases.dat, instead display the
contents of the alias database, in plain text form. The contents will be the
combined contents of all the source files, with all addresses converted to
canonical format, with duplicates removed and sub-aliases expanded.
-src= pathname
Use pathname instead of
/etc/courier/aliases as the source file. pathname can also refer to a
directory. This concatenates every non-hidden file in the directory.
-tmp= filename
Use filename as a temporary file,
instead of /etc/courier/aliases.tmp. makealiases requires a temporary
file for its own purposes, which is automatically removed when done. This
temporary file MUST reside on the same filesystem as aliases.dat. If the
-alias option specifies a file on a different filesystem, use this
option to specify where to temporary place a file in the same filesystem.
Because makealiases always uses the same name for a temporary file you
cannot run more than one makealiases process at the same time.
-protocol= protocol
Use an alias list that's private to messages
coming from protocol. See below.
The optional module specifies the module whose rewriting rules are used
to convert E-mail addresses into a canonical form. If not specified, the local
module's address rewriting rules will be used.
PROTOCOL ALIASES
Addresses in /etc/courier/aliases.dat will be checked in every message. Use the -protocol option to create aliases that will be checked only for message that are received via a specific protocol, such as ESMTP, UUCP, or locally-generated mail. This allows you, for example, to create an alias such as "everyone", which is only avaliable to locally generated mail, and does not work for mail received via ESMTP. The argument to the -protocol option is one of: esmtp, uucp, or local. Protocol-specific alias files are /etc/courier/aliases- protocol.dat, where " protocol" is the specific protocol, such as "local", "esmtp", or "uucp", and the source file read by makealiases would be /etc/courier/aliases- protocol. If the -protocol option is specified, makealiases will access these files instead of /etc/courier/aliases.dat and /etc/courier/aliases.ALIAS SPECIFICATIONS
The sources file used to create the binary aliases.dat database are plain text files that may be created using any editor. Each alias specification takes the following form:alias: address1, address2, ...
alias: :include:/absolute/pathname
larry: larry, moe, curly, shemp
DUPLICATE ADDRESSES
Alias definitions may refer to other alias definitions, and makealiases automatically incorporates addresses from other aliases. If the same address is listed in multiple aliases, and two or more of them are specified as recipients of the same message, only one copy of the message will be delivered to the address.VIRTUAL DOMAINS
The following special syntax implements a virtual domain. A virtual domain redirects all mail for an entire domain to one user:@domain: user
tom: [email protected] @example.com: larry
tom: larry-john
PROGRAM OR MAILBOX ALIASES
The following notation associates an address directly with a mailbox, or with a program:info: /var/shared/info
info: | /usr/local/shared/info
UUCP VIRTUAL DOMAINS
The following notation allows mail addressed to a certain domain to be forwarded via uucp:@domain: uucp!bang!path!
DELIVERY STATUS NOTIFICATIONS
An alias with only one address does not affect delivery status notification attributes of an E-mail message. An alias with multiple addresses is treated like a private mailing list, as defined by RFC 1894[3]. If the message requests a successful delivery notification, the Courier mail server generates a delivery status notification for the successful delivery to the aliased address, and each alias recipient address will have DSNs set to NEVER.BUGS
This has nothing to do with the Courier mail server's support for a Qmail-style alias account. owner-foo feature of sendmail's aliasing is not supported. the Courier mail server normally tries to eliminate duplicate addresses listed as recipients for the same message. Some mail servers are not capable of delivering messages with multiple recipients, and will transmit a separate copy of the same message addressed to each recipient. The Courier mail server can't do anything in this case. Each copy of the same original text is considered an individual, separate, message. Duplicate elimination can fail in certain rare circumstances, involving exotic features of RFC 2822[1] concerning case sensitivity. "@example.com: jack, jill" is allowed, but strongly discouraged under the penalty of law. Because multiple-recipient aliases are treated like private mailing lists, failure DSNs are turned off, and a bad recipient address is hardly noticed by anyone. The makealiases command may execute while the Courier mail server is running, and any changes take effect immediately. However, only one instance of makealiases is permitted to run at the same time.SEE ALSO
esmtpd(8)[4].AUTHOR
Sam VarshavchikAuthor
NOTES
- 1.
- RFC 2822
- 3.
- RFC 1894
- 4.
- esmtpd(8)
10/28/2020 | Courier Mail Server |