[exim-dev] Minor Dovecot SASL change

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Timo Sirainen
Datum:  
To: exim-dev
Betreff: [exim-dev] Minor Dovecot SASL change
I noticed today that dovecot-auth process wastes memory by holding onto
authentication requests for 3,5 minutes after a successful
authentication. This is required for Dovecot itself (and possibly some
other external authenticators that want Dovecot-like client/master
split), but for Exim it's pointless.

The patch below adds a "nologin" field for AUTH request which prevents
dovecot-auth from doing this using the upcoming Dovecot versions
(v1.0.11, v1.1.beta14). Earlier versions just ignore it. I might change
the protocol later so that this is the default behavior, but it probably
has to wait for v2.0 which won't come anytime soon. Note that the
"nologin" must be before "resp".

The memory wasting happens only when both client and master sockets are
defined for a single socket listen {} block. Using separate listen
blocks for them would also fix this, but I don't think that should be a
permanent solution.

--- dovecot.c.orig    2008-01-04 03:58:02.000000000 +0200
+++ dovecot.c    2008-01-04 03:58:58.000000000 +0200
@@ -280,7 +280,7 @@
 ****************************************************************************/


        auth_command = string_sprintf("VERSION\t%d\t%d\nCPID\t%d\n"
-               "AUTH\t%d\t%s\tservice=smtp\t%srip=%s\tlip=%s\tresp=%s\n",
+               "AUTH\t%d\t%s\tservice=smtp\t%srip=%s\tlip=%s\tnologin\tresp=%s\n",
                VERSION_MAJOR, VERSION_MINOR, getpid(), cuid,
                ablock->public_name, auth_extra_data, sender_host_address,
                interface_address, data ? (char *) data : "");