Extending Use of Sendmail and Procmail for Virtual Mail Hosting Randolph Langley
[email protected] April 2, 2007 Postfix [Ven] natively handles virtual domains and users better than Sendmail does. Perhaps the most needling problem with Sendmail’s handling of virtual users and domains is the problem of “name folding”: Sendmail doesn’t prop- erly allow for the same username in two different domains. If Sendmail tries to handle a single mail that has an envelope with both user
[email protected] and
[email protected], it will just deliver the message to one of the users. Also, although Sendmail lets you use an LDAP database, it doesn’t allow you to directly store domain and user configuration in a relational database. One way to get around that is by using a relational database as a back-end for OpenLDAP, creating the metadata for that takes a good bit of effort and in practice it is not very fast. I suggest in the final section a different means to access to a database via send- mail’s new socket map feature. That will allow you to keep all user and domain information in a database. With some caching and failover capabilities, it also allows a good bit of redundancy to be introduced. The Sendmail Consortium’s website has a very good introduction to using sendmail to host virtual domains at http://www.sendmail.org/virtual-host- ing.html. The approach outlined here extends that approach in making a mail- hub: 1. It uses two cooperating sendmail processes, an “incoming” and an “out- going” sendmail to solve the name “folding” problem.