Web Talk for Wireheads: Cookies
Sendmail 8.8.0 and Virtual Users
At long last, it's easy to make email@example.com and firstname.lastname@example.org go to different mailboxes with the same mailserver receiving mail for both domains. With releases before 8.8.0, sendmail required various hacks to the sendmail.cf file, including ruleset changes, to get this to work. Frankly, I never managed it between my legacy sendmail.cf (a converted SunOS file) and other dbm problems, now resolved.
Sendmail 8.8.0 adds this functionality directly as a supported feature. The documentation is okay (in the ./cf/cf/README file that comes with the distribution), but essentially you either set the FEATURE() correctly in your m4 file to generate the configuration file, or you uncomment about two dozen lines if you use the default m4 file and edit the cf.
Several items have to be coordinated for addressing like this to work. First, in your DNS files, the same mailserver should be specified in the MX records. Next, you add the domain to the list of hosts for which mail should be received by that server by either specifying them using the Cw config line (each domain separated by a space), or by using the Fw command to specify a file containing one host or domain per line. This latter method is suggested to make changes easier.
Then, you create the database source files in the /etc directory. The source should be tab-delimited text files; the default names are virtusertable and genericstable. In virtusertable, you put the incoming address on the left, a tab, and then the local mailbox or remote mail address for delivery on the right (see example below):
email@example.com fish-info firstname.lastname@example.org email@example.com firstname.lastname@example.org bill-abc email@example.com bill-xyz
Similarly, in the genericstable, you put the local mailbox on the left, a tab, and the address should appear on the right:
bill-abc firstname.lastname@example.org bill-xyz email@example.com
Finally, you have to use makemap (it comes with the sendmail distribution), to create the database files. The command is:
makemap hash virtuserstable.db < vir- tuserstable
This is repeated with genericstable (If you want to use btree instead of hash — recommended to me by a colleague — you need to change the two configuration lines in sendmail.cf for these tables (near the top)). The lookups occur on each transmission, so there's no necessity to restart or kill -HUP sendmail.
Thanks to Nik Mouat of Interconnected Associates in Seattle, and Stuart Williams, a UNIX consultant in Calgary, for making this all sensible.
As you all know, I've been putting my money where my mouth is for the last two and a half years, running one of the first companies devoted to creating and hosting Web sites for businesses. To follow the same metaphor, I'm now sticking my entire checkbook past the epiglottis, and joining Amazon.com, a two-year-old "startup" Internet company that sells books over the Internet.
| [ < Web Talk for Wireheads: Cookies: |
Part 2 ]
| [ Web Talk for Wireheads: Cookies: |
Part 1 > ]