|
|
The aliases database map /etc/mail/aliases describes user ID aliases
used by Sendmail and is formatted as a series of lines of the form
name: addr_1, addr_2, addr_3, . . .
The name is the name to alias, and the addr_n are the aliases for that
name. addr_n can be another alias, a local username, a local filename,
a command, an include file, or an external e-mail address.
Local Username
- username
The username must be available via getpwnam(3). Note that names
specified here will be subject to recursive alias lookups; to suppress
further alias lookups against this name, prefix the name with a backslash
(\) character. MPE usernames have the format USER.ACCOUNT.
Local Filename
- /path/name
Messages are appended to the file specified by the full absolute
pathname (starting with a slash (/))
Command
- |command
A command starts with a pipe symbol (|), it receives messages via
standard input. To execute a command with parameters, enclose the entire
expression in quotes, i.e., "|command parm1 parm2 parm3".
Include File
- :include: /path/name
The aliases in pathname are added to the aliases for name.
External E-Mail Address
- user@domain
An e-mail address in RFC 822 format.
Lines beginning with white space are continuation lines. Another
way to continue lines is by placing a backslash directly before
a newline. Lines beginning with # are comments.
Aliasing occurs only on local names. Loops cannot occur, since
no message will be sent to any person more than once.
After aliasing has been done, local and valid recipients who
have a ".forward" file in their home directory
have messages forwarded to the list of users defined in that file.
This is only the raw data file; the actual aliasing information
is placed into a binary format in the file /etc/mail/aliases.db using
the program newaliases(1). A newaliases command
must be executed each time the aliases file is changed for the change
to take effect:
:HELLO SERVER.SENDMAIL
:XEQ SH.HPBIN.SYS -L
shell/iX> newaliases
Each local user can create a .forward file to alter the delivery of their own
mail. When delivering mail to local users, Sendmail looks for a file called
/ACCOUNT/GROUP/.forward where ACCOUNT is the user's MPE account and
GROUP is the user's MPE home group. If this file is found, the contents are
parsed as if they were the right-hand side of an aliases file entry. Consider
the following example .forward file:
\USER.ACCOUNT, "|/SENDMAIL/CURRENT/bin/vacation USER.ACCOUNT"
This will cause Sendmail to deliver one copy of an email message to the user's
normal mailbox (\USER.ACCOUNT), and another copy of an email message
will be piped to the Sendmail vacation autoresponder program.
Access_db Feature
The access database map allows you to accept or reject e-mail
based on the message envelope and connecting mail server host name.
For example:
:HELLO SERVER.SENDMAIL
:XEQ SH.HPBIN.SYS -L
shell/iX> /bin/cat - >/etc/mail/access
imaspammer.com REJECT
:EOD
shell/iX> makemap hash /etc/mail/access
</etc/mail/access
This will reject all e-mail originating from the domain imaspammer.com.
For more information about the access_db feature, please see
/SENDMAIL/CURRENT/cf/README.
Domaintable Feature
The domaintable database map is used to rewrite domain names
in e-mail headers. You might find this useful if your company was
acquired by a different company and you were forced to change your
email domain names. For example:
:HELLO SERVER.SENDMAIL
:XEQ SH.HPBIN.SYS -L
shell/iX> /bin/cat - >/etc/mail/domaintable
oldcompany.com newcompany.com
:EOD
shell/iX> makemap hash /etc/mail/domaintable
</etc/mail/domaintable
All occurrences of oldcompany.com in e-mail headers would be
rewritten to newcompany.com.
For more information about the domaintable feature, please
see /SENDMAIL/CURRENT/cf/README.
Genericstable Feature
The genericstable database map is used to rewrite both the
user and domain portions of e-mail addresses in outgoing e-mail
headers. For example:
:HELLO SERVER.SENDMAIL
:XEQ SH.HPBIN.SYS -L
shell/iX> /bin/cat - >/etc/mail/genericstable
USER.ACCOUNT@my.local.host customer_servce@company.com
:EOD
shell/iX> makemap hash /etc/mail/genericstable
</etc/mail/genericstable
All e-mail sent by USER.ACCOUNT on the local host my.local.host
would have the sender address(es) rewritten as
customer_service@company.com. Note that domains being modified by
genericstable must be added to /etc/mail/sendmail.cf class {G}.
For more information about the genericstable feature, please
see /SENDMAIL/CURRENT/cf/README.
Mailertable Feature
The mailertable database map is used to override the default mail routing
behavior in /etc/mail/sendmail.cf. You might find this useful if you
needed to route e-mail for certain domains through specific e-mail relays.
For example:
:HELLO SERVER.SENDMAIL
:XEQ SH.HPBIN.SYS -L
shell/iX> /bin/cat - >/etc/mail/mailertable
.bitnet smtp:relay.bit.net
:EOD
shell/iX> makemap hash /etc/mail/mailertable
</etc/mail/mailertable
All mail addressed to hostnames ending in ".bitnet" would
be relayed via the host relay.bit.net.
For more information about the mailertable feature, please
see /SENDMAIL/CURRENT/cf/README.
Virtusertable Feature
The virtusertable database map is used to remap incoming e-mail
addresses in order to facilitate multiple virtual e-mail domains
on the same machine. This is very similar to how aliasing works,
except that you can also specify domain names in addition to user
names. For example:
:HELLO SERVER.SENDMAIL
:XEQ SH.HPBIN.SYS -L
shell/iX> /bin/cat - >/etc/mail/virtusertable
info@bar.com INFO.BAR
info@foo.com INFO.FOO
:EOD
shell/iX> makemap hash /etc/mail/virtusertable
</etc/mail/virtusertable
All e-mail addressed to info@bar.com will be delivered to user
INFO.BAR, and all e-mail addressed to info@foo.com will be delivered
to user INFO.FOO. Note that all domains used in the map keys must also be
present in /etc/mail/local-host-names and that your DNS server(s) have been
configured with MX entries that route e-mail for those domains to your local
machine.
For more information about the virtusertable feature, please
see /SENDMAIL/CURRENT/cf/README.
|