At Mon, 11 Jun 2012 15:30:59 +0300, Timo Sirainen wrote:
Dovecot auth process has a problem that Dovecot auth delays exiting about between 20 and 60 seconds when Dovecot dovecot (master) process is already terminated by an administrator.
Yes. I can reproduce with dovecot 1:2.1.7-1 (Debian unstable package) with PAM passdb. This PAM environment is configured for local UNIX passwd file only (no LDAP).
I can't reproduce this. I installed the 1:2.1.7-1 Debian unstable package. Put your dovecot.conf to /etc/dovecot/. Did:
/etc/init.d/dovecot start telnet localhost 143 x login foo bar x logout /etc/init.d/dovecot stop
No dovecot processes left.
If an auth client remains a connection to dovecot/auth, dovecot/auth does NOT exit immediately when dovecot master exits.
(1) Install Postfix and Dovecot.
# apt-get install postfix dovecot
(2) Configure Postfix /etc/postfix/main.cf with the following:
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options =
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
(3) Configre Dovecot /etc/dovecot/conf.d/10-master with the following:
service auth {
unix_listener auth-userdb {
}
unix_listener /var/spool/postfix/private/auth {
mode = 0666
}
}
(4) Start postfix and dovecot service.
# /etc/init.d/dovecot start # /etc/init.d/postfix start
(5) Invoke Postfix smtpd(8), it connects to dovecot/auth socket.
$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 sugar.osstech.co.jp ESMTP Postfix
AUTH PLAIN dummy
535 5.7.8 Error: authentication failed:
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
Or use netcat-openbsd to connect to dovecot/auth socket:
# nc.openbsd -U /var/spool/postfix/private/dovecot-auth &
(6) Stop dovecot service.
# /etc/init.d/dovecot stop
-- -- Name: SATOH Fumiyasu (fumiyas @ osstech co jp) -- Business Home: http://www.OSSTech.co.jp/ -- GitHub Home: https://GitHub.com/fumiyas/