Quanah Gibson-Mount:
> My understanding is that postfix is not multi-threaded in general, but I 
> saw this: 
> <http://www.linux-magazine.com/Online/News/Multithreaded-Mail-Carrier-Postfix-2.6.0>
>  
> and it made me wonder if that changed with 2.6 and later.
> 
> If it remains that it is not multi-threaded, are there portions of postfix 
> (i.e., interacting with milters, etc) when it is?

Nothing has changed since the initial design.

Postfix is single threaded on the outside interface.  This is for
robustness - if one process fails it does not affect other mail
transactions. Some internal processes such as cleanup and bounce
are single threaded as well - these can just be restarted without
visible effect outside.

Postfix uses event selection on the inside, in daemons that maintain
persistent state (qmgr, verify, tlsmgr) and in some inside daemons
that do simple processing (trivial-rewrite). These programs are
restarted automatically but loss of state may affect performance.

The only departure from this is postscreen which maintains persistent
state and talks to the outside. The reason to use one process is that
it's too expensive to waste one process per client, when almost
90% of all mail is sent by zombies. Even here, a program crash 
and restart is mostly invisible since postscreen hands off good
clients to smtpd processes as quickly as possible.

        Wietse

Reply via email to