To sendmail or to postfix that is the question?

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Mar 11 11:08:54 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/03/2010 10:13:21, Paul Wootton wrote:

> Sorry to hi-jack your thread, but this is also something I am currently
> looking in to
> 
> I really wanted to use Sendmail as a friend knows Sendmail fairly well
> and I have a Sendmail book, but what I am wanting is the ability to have
> mail for virtual users, ie I might have 4 admin accounts,
> admin at domain1.com admin at domain2.com admin at domain3.com and
> admin at domain4.com and want all the accounts to be independent of each
> other and not necessarily have a real UNIX user account. I know I can
> create 4 different admin accounts say admin1, admin2, admin3, admin4 and
> then use the "virtual users" table, but I can see that getting a little
> messy and from the end user's point they are going to have unusual login
> names.
> I know I can do this in Postfix, but is it possible in Sendmail?


Sure, this is possible in sendmail, and you have already identified the
way to do it: virtusertable, but as you say, the local user accounts end
up looking pretty unusual.

Unless you've got a delivery system that also takes account of the
domain part of an e-mail address (something that is pretty unusual with
sendmail(8)) you have to map all of the accepted mail addresses into a
set of local userids: so admin at domainX.com --> admin-domainX.

The only good way of doing that is with virtusertable, since that's the
only aliasing mechanism in sendmail which looks at the domain part of
an address.  aliases treats all of the RHSes as equivalent, so long as
they belong to the set of addresses sendmail knows is locally
delivered. On the other hand, virtusertable is a 1:1 transformation,
aliases is a 1:many transformation -- the two different address
transformation mechanisms is a historical peculiarity of sendmail and
makes virtual server setups like this pretty tricky.

To deliver to mailboxes where the userid includes a domain part, you
have to have a mail-user database distinct from the password file and
you will need to rewrite large parts of the basic message processing in
sendmail.cf.  As well, you'll need a fairly heavy-weight IMAP server
like cyrus IMAPd for this functionality (does dovecot support it? no
idea.) Doing this sort of stuff in other MTAs is easier than doing it in
sendmail.  postfix would be my choice.

	Cheers,

	Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuYzzYACgkQ8Mjk52CukIxSMwCffdtKiVQ8XWvpjLPs+zMmsDth
aw8Ani9AhuC04YMAkLsDLfMWhR4mo9QP
=FMxw
-----END PGP SIGNATURE-----


More information about the freebsd-hackers mailing list