[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Qmail/Postfix/Sendmail for fastest outgoing mail



On Tue, Nov 26, 2002 at 01:33:57AM -0600, Jorge.Lehner@gmx.net wrote:
> El lun, 25-11-2002 a las 07:00, Craig Sanders escribi?:
> > On Mon, Nov 25, 2002 at 11:37:58PM +1100, Jason Lim wrote:
> > > > nope, because postfix has no way of knowing that they were
> > > > originally the same email(*).  postfix has been handed 10 individual
> > > > emails by qmail, so it will deliver 10 individual emails.
> > > 
> > > Mmm... but, for example, if it scanned it's queue every 30 seconds,
> > > for example, it could then combine them together? 
> > 
> > nope.
> 
> For example at www.exim.org you find the following paragraphs:
> 
> SMTP batching                          
> [...]
>    When an SMTP delivery succeeds, Exim consults the database to see
>    if there are any other messages waiting for the same host and
>    address.  If it finds any, it creates a new Exim process and passes
>    it the open SMTP channel and a message identification. The new
>    process then delivers the waiting message down the existing channel
>    and may in turn cause the creation of yet another process. Any
>    other waiting addresses in the message are skipped. The maximum
>    number of messages sent down one connection is configurable.

this is what postfix, and i believe sendmail too, calls "connection
caching", or re-using an existing SMTP connection to deliver a second
(or third or...) message, instead of closing the connection after
sending one message and opening new connections for subsequent messages.

tis isn't what Jason wanted, which was combining multiple
almost-identical messages together into one message.

postfix can't do this yet. the author, wietse venema, says it is on his
TODO list - i guess he'll start working on it for the dev snapshot after
the postfix 1.2 has been released (due about a month from now)

what postfix does now is open multiple smtp connections to the same host
in parallel if there are multiple different messages to deliver to that
host.  this is controlled by the smtp_destination_concurrency_limit
option.

qmail also does multiple parallel deliveries to the same host (always,
even when one message is CC-ed to 2+ addresses at the same domain).  i
don't know whether qmail also does connection caching or not.

personally, i'd like to have both connection caching AND parallel
delivery - but if i had to choose between them, i'd probably choose
parallel.  it isn't one of the reasons i use postfix, but i'm not at all
dissatisfied with postfix's performance...quite the contrary.


>    This scheme achieves some SMTP efficiency when a number of messages
>    have been queued up for a given host, without the overhead of a
>    heavyweight queueing apparatus.

yep, it avoids the overhead of establishing new smtp connections to the
same host - i.e. saves a few round-trip delays of possibly several
hundred milliseconds (or sometimes more) each.  this can be significant.  

it is particularly useful when outbound smtp connections go through a
firewall or NAT box which can only keep track of a limited number of
connections.  some commercial firewalls have this problem, linux
ipchains/iptables doesn't.

craig

-- 
craig sanders <cas@taz.net.au>

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch



Reply to: