Once you have settled on a naming scheme and dealt with routing issues
it is time to implement it. First you should establish an appropriate
forwarding mechanism to convert incoming addresses to your internal
format, i.e., to accept incoming mail and forward it to the
appropriate internal mailbox. Several methods of doing this are
discussed in Section 3.5 . A specific example is also presented
below. After establishing a method to handle incoming mail, you are
ready to begin emitting mail to the outside world using your new
address format. This is accomplished with either an address reversal
database or REVERSE mapping as described in Section 3.3.2 . Either of
these will convert addresses in outbound mail messages to your
centralized naming format. If your format leaves the mailbox portion of
addresses alone, then you can accomplish this step more efficiently
with domain rewrite rules similar to those described in Section 3.5.2.1
. In this case, however, you would use the $R
flag instead
of $F
.
If the conversion from internal addresses to centralized addresses is very algorithmic and an address in one format contains all of the information required to construct the equivalent address in the other format, then you should be able to use FORWARD and REVERSE mappings. However, this is rarely the case. At best, it is usually only possible to do this in one direction (e.g., Jane.Doe@Acme.Com -> jdoe@Acme.Com). It is far more likely that you will need to use the alias and address reversal databases, possibly in conjunction with the REVERSE mapping too. This is the situation covered in the example which follows.
Suppose the domain Acme.Com has two general purpose computing machines,
Marvel.Acme.Com and Admin.Acme.Com, an enclave of cc:Mail users reached
via the gateway ccMail.Acme.Com, and ALL-IN-1 IOS users reached via
PMDF-MR using the gateway A1.Acme.Com. From the outside world all mail
to Acme employees is addressed to
first.last@Acme.Com
and Acme.Com is actually the
host Marvel.Acme.Com. Suppose further that within ALL-IN-1, the mailbox
name space is of the form "Last,
First
", in cc:Mail it is "First
Last
", and on vaxa.Acme.Com and Admin.Acme.Com mailbox
names correspond to usernames. The name space for the four machines is
shown in Table 3-6 .
Internal address | Centralized address |
---|---|
Marvel.Acme.Com mailboxes | |
richardsr@Marvel.Acme.Com | Mr.Fantastic@Acme.Com |
grimmb | The.Thing |
storms | Invisible.Girl |
stormj | Human.Torch |
Admin.Acme.Com mailboxes | |
wchristopher@Admin.Acme.Com | Warren.Christopher@Acme.Com |
lbentsen | Lloyd.Bentsen |
laspin | Les.Aspin |
jreno | Janet.Reno |
bbabbitt | Bruce.Babbitt |
mespy | Mike.Espy |
rbrown | Ronald.Brown |
rreich | Robert.Reich |
dshalala | Donna.Shalala |
hcisneros | Henry.Cisneros |
fpena | Federico.Pena |
holeary | Hazel.OLeary |
rriley | Richard.Riley |
jbrown | Jesse.Brown |
ccMail.Acme.Com mailboxes | |
"Harry Blackmun"@ccMail.Acme.Com | Harry.Blackmun@Acme.Com |
"William Rehnquist" | William.Rehnquist |
"John Paul Stevens" | John.Paul.Stevens |
"Sandra Day OConnor" | Sandra.Day.OConnor |
"Antonin Scalia" | Antonin.Scalia |
"Anthony Kennedy" | Anthony.Kennedy |
"David Souter" | David.Souter |
"Clarence Thomas" | Clarence.Thomas |
"Ruth Bader Ginsberg" | Ruth.Bader.Ginsburg |
A1.Acme.Com mailboxes | |
"Burford, Anne"@A1.Acme.Com | Anne.Burford@Acme.Com |
"Deaver, Michael" | Michael.Deaver |
"Donovan, Raymond" | Raymond.Donovan |
"Meese, Ed" | Ed.Meese |
"Nofziger, Lyn" | Lyn.Nofziger |
For this case, we can easily map back and forth between the centralized format and cc:Mail or ALL-IN-1 addresses. However, we can only take advantage of this with outbound messages. For inbound messages you still need to know which host, ccMail.Acme.Com or A1.Acme.Com, to which to direct a message. We will use an alias database to handle incoming mail.
There should be a DNS MX record for Acme.Com which points to
Marvel.Acme.Com. Moreover, Marvel.Acme.Com should either use Acme.Com
as its official local host name (host name on the local channel), or
rewrite Acme.Com to its official local host name. By doing this, mail
to user@Acme.Com
is equated to the local channel
and user
is then looked up in to the alias file
or database. This then allows us to use the alias database as a means
of forwarding incoming mail for Acme.Com to its correct, internal
destination. Also, USE_REVERSE_DATABASE should be set to 5,
USE_REVERSE_DATABASE=5in the PMDF option file. A setting of 5 causes PMDF to apply the REVERSE mapping and address reversal database to all header addresses instead of just reverse pointing addresses.
The alias database source file shown in Example 3-9 , the address reversal database source file shown in Example 3-10 , and the REVERSE mapping table shown in Example 3-11 together implement this centralized naming scheme.d For instance, a message coming from jreno@Admin.Acme.Com will have its From: address changed to Janet.Reno@Acme.Com in accord with the entry in the address reversal database. Similarly messages from "Harry Blackmun"@ccMail.Acme.Com and "Sandra Day OConnor"@Acme.Com will have their From: addresses changed to Harry.Blackmun@Acme.Com and Sandra.Day.OConnor@Acme.Com by the second and first entries in the REVERSE mapping table. Incoming mail messages to Janet.Reno@Acme.Com will be forwarded to jreno@Admin.Acme.Com in accord with the entry in the alias database.
Example 3-9 Alias database source file
! ! Marvel.Acme.Com users ! Mr.Fantastic richardsr@Marvel.Acme.Com The.Thing grimmb@Marvel.Acme.Com Invisible.Girl storms@Marvel.Acme.Com Human.Torch stormj@Marvel.Acme.Com ! ! Admin.Acme.Com users ! Warren.Christopher wchristopher@Admin.Acme.Com Lloyd.Bentsen lbentsen@Admin.Acme.Com Les.Aspin laspin@Admin.Acme.Com Janet.Reno jreno@Admin.Acme.Com Bruce.Babbitt bbabbitt@Admin.Acme.Com Mike.Espy mespy@Admin.Acme.Com Ronald.Brown rbrown@Admin.Acme.Com Robert.Reich rreich@Admin.Acme.Com Donna.Shalala dshalala@Admin.Acme.Com Henry.Cisneros hcisneros@Admin.Acme.Com Federico.Pena fpena@Admin.Acme.Com Hazel.OLeary holeary@Admin.Acme.Com Richard.Riley rriley@Admin.Acme.Com Jesse.Brown jbrown@Admin.Acme.Com ! ! ccMail.Acme.Com users ! Harry.Blackmun "Harry Blackmun"@ccMail.Acme.Com William.Rehnquist "William Rehnquist"@ccMail.Acme.Com John.Paul.Stevens "John Paul Stevens"@ccMail.Acme.Com Sandra.Day.OConnor "Sandra Day OConnor"@ccMail.Acme.Com Antonin.Scalia "Antonin Scalia"@ccMail.Acme.Com Anthony.Kennedy "Anthony Kennedy"@ccMail.Acme.Com David.Souter "David Souter"@ccMail.Acme.Com Clarence.Thomas "Clarence Thomas"@ccMail.Acme.Com Ruth.Bader.Ginsburg "Ruth Bader Ginsberg"@ccMail.Acme.Com ! ! A1.Acme.Com users ! Anne.Burford "Burford, Anne"@A1.Acme.Com Michael.Deaver "Deaver, Michael"@A1.Acme.Com Raymond.Donovan "Donovan, Raymond"@A1.Acme.Com Ed.Meese "Meese, Ed"@A1.Acme.Com Lyn.Nofziger "Nofziger, Lyn"@A1.Acme.Com
Example 3-10 Reverse database source file
! ! Marvel.Acme.Com users ! richardsr@Marvel.Acme.Com Mr.Fantastic@Acme.Com grimmb@Marvel.Acme.Com The.Thing@Acme.Com storms@Marvel.Acme.Com Invisible.Girl@Acme.Com stormj@Marvel.Acme.Com Human.Torch@Acme.Com ! ! Admin.Acme.Com users ! wchristopher@Admin.Acme.Com Warren.Christopher@Acme.Com lbentsen@Admin.Acme.Com Lloyd.Bentsen@Acme.Com laspin@Admin.Acme.Com Les.Aspin@Acme.Com jreno@Admin.Acme.Com Janet.Reno@Acme.Com bbabbitt@Admin.Acme.Com Bruce.Babbitt@Acme.Com mespy@Admin.Acme.Com Mike.Espy@Acme.Com rbrown@Admin.Acme.Com Ronald.Brown@Acme.Com rreich@Admin.Acme.Com Robert.Reich@Acme.Com dshalala@Admin.Acme.Com Donna.Shalala@Acme.Com hcisneros@Admin.Acme.Com Henry.Cisneros@Acme.Com fpena@Admin.Acme.Com Federico.Pena@Acme.Com holeary@Admin.Acme.Com Hazel.OLeary@Acme.Com rriley@Admin.Acme.Com Richard.Riley@Acme.Com jbrown@Admin.Acme.Com Jesse.Brown@Acme.Com
Example 3-11 REVERSE mapping table
REVERSE "*$ *$ *"@ccMail.Acme.Com $0.$1.$2@Acme.Com$Y "*$ *"@ccMail.Acme.Com $0.$1@Acme.Com$Y "*,$ *"@A1.Acme.Com $1.$0@Acme.Com$Y
The alias and address reversal databases are generated from your source
files with the PMDF CRDB (OpenVMS) or pmdf crdb
(UNIX or
NT) utility as described in Sections 3.1.3 and 3.3.2
. See for information on the CRDB or crdb
utility itself.
When generating these databases, it is best to use an intermediate file
so as to eliminate any windows during which the "live"
databases are in a mixed state. For instance, use the OpenVMS commands,
$ PMDF CRDB alias-source-file PMDF_TABLE:aliases.tmp $ PMDF CRDB reverse-source-file PMDF_TABLE:reverse.tmp $ RENAME PMDF_TABLE:aliases.tmp PMDF_ALIAS_DATABASE $ RENAME PMDF_TABLE:reverse.tmp PMDF_REVERSE_DATABASEor, on UNIX systems, the commands,
# pmdf crdb alias-source-file /pmdf/table/aliasesdb-tmp # pmdf crdb reverse-source-file /pmdf/table/reversedb-tmp # pmdf renamedb /pmdf/table/aliasesdb-tmp PMDF_ALIAS_DATABASE # pmdf renamedb /pmdf/table/reversedb-tmp PMDF_REVERSE_DATABASEor, on NT systems, the commands,
C:\ pmdf crdb alias-source-file /pmdf/table/aliasesdb-tmp C:\ pmdf crdb reverse-source-file /pmdf/table/reversedb-tmp C:\ pmdf renamedb /pmdf/table/aliasesdb-tmp PMDF_ALIAS_DATABASE C:\ pmdf renamedb /pmdf/table/reversedb-tmp PMDF_REVERSE_DATABASE
If you are using the PMDF multithreaded SMTP server (tcp_* channels), then be sure to restart the SMTP server after generating new database files. If you have merely added entries to an existing database file, then you do not need to restart the SMTP server.