Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2002 04:58:30 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Taylor Dondich <thexder@lvcm.com>, chat@freebsd.org
Subject:   Re: qmail (Was: Maintaining Access Control Lists )
Message-ID:  <3C9F1EF6.CB28EDD7@mindspring.com>
References:  <F61GQUEYvZmDvHbYxPo0000a6bd@hotmail.com> <20020323002608.B20699@rain.macguire.net> <3C9C84CF.2090300@flash.net> <20020323084327.A354@rain.macguire.net> <3C9DF87D.5050306@cream.org> <p05101505b8c430e28572@[10.0.1.9]> <000c01c1d3ab$6d2c6960$6600a8c0@penguin> <xzp3cyo7rbu.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav wrote:
> You can't have looked very hard at Postfix.

Wedging per domain mail queues into Postfix is much harder
than wedging them into sendmail.  They are almost natural
in sendmail (well, older versions of sendmail; the newer
stuff breaks a lot of intersting things by putting security
barriers in the way).

If you do wedge them in, then on an ETRN/ATRN, you are
guaranteed a 100% hit rate on queue messages, instead of
just the percentage of the main queue of the messages for
a particular domain.

Yeah, it's an "abuse of the file system", but with the qmail
or postfix file format, there's no way to key on the file
name for this sort order, even if you were guaranteed a btree
directory structure, since you have to traverse all entries
and post-compare them for a match, even if you could jam it
into the name.


Actually, Windows has an advantage here: the Windows directory
searching code is passed a globbing pattern, and does the
globbing for you.  That way, only files matching the pattern
have their directory information copied back from kernel to
user space.  Doing globbing in the kernel is a *significant*
performance win.  A hack for this for Samba shows about a 30%
performance inprovement in directory operations (Ed Lane did
this work) due to reduced directory iteration overhead.

Unfortunately, UNIX is pretty set in concrete in this regard
(shells do globbing expansion of argument lists prior to
pasing them to programs), and changing this would be really
hard at this point (you can't just expand in main(), because
you don't know if the paremeters passed were unquoted before
they got to your main(); you'd have to screw with all sorts
of semantics to make it work out "magically".  And you'd need
to be able to turn it off on a per program basis, if a program
understood how to handle globbing by itself.  It's a mess.  8-(.

Even kernel globbing means you have to traverse twice the
average directory length than you would for a specific file
(average for an exact match is 50% of the directory; globbing
requires doing the whole directory, since you can't just stop
after the first match).  So you might get 30% out of it for
SAMBA, which is emulating the Windows globbing behaviour anyway,
but the win for a mail server will be much less.  And for domains,
in sendmail you have to open the present before you can see who
it's for (the domain name is not part of the file name, because
of multiple recipients).

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C9F1EF6.CB28EDD7>