[Dovecot] Problem with multiple Dovecot Instances

Manuel Maurer lists at mainserver.org
Thu Aug 21 20:44:10 EEST 2008


Hello,

first i want to say that i never used a mailing list before, so if i made
something wrong do not hesitate to contact me via e-mail.

I try to set up multiple Dovecot instances running at the same time. Goal
is to provide IMAPS with a valid SSL Certificate on selected IP Addresses.
To reach this i want to set it up as follows:

1 Dovecot Daemon listening on localhost (for webmail), providing LDA and
Authentification (over MySQL)
4 Dovecot Daemons listening on each IP Address, querying the localhost
daemon for authentification

Just for your Information:
I replaced all real data with placeholders, like the IP Address of my
Server with MY_IP. Also i removed some absolutely non relevant lines from
the configuration output (like settings for logging)

This is my localhost config-output:

# 1.1.2: /opt/dovecot/etc/dovecot.conf
base_dir: /var/run/dovecot
protocols: pop3 imap
listen(default): 127.0.0.1:143
listen(imap): 127.0.0.1:143
listen(pop3): 127.0.0.1:110
ssl_disable: yes
login_dir: /var/run/dovecot/login
login_executable(default): /opt/dovecot/libexec/dovecot/imap-login
login_executable(imap): /opt/dovecot/libexec/dovecot/imap-login
login_executable(pop3): /opt/dovecot/libexec/dovecot/pop3-login
login_chroot: no
first_valid_uid: 5000
last_valid_uid: 5000
mail_location: mbox:/home/vmail/%d/%u
mail_executable(default): /opt/dovecot/libexec/dovecot/imap
mail_executable(imap): /opt/dovecot/libexec/dovecot/imap
mail_executable(pop3): /opt/dovecot/libexec/dovecot/pop3
mail_plugin_dir(default): /opt/dovecot/lib/dovecot/imap
mail_plugin_dir(imap): /opt/dovecot/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/dovecot/lib/dovecot/pop3
auth default:
  mechanisms: plain login
  user: nobody
  passdb:
    driver: sql
    args: /opt/dovecot/etc/dovecot-sql.conf
  userdb:
    driver: sql
    args: /opt/dovecot/etc/dovecot-sql.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/private/auth
      mode: 432
      user: postfix
      group: postfix
    master:
      path: /var/run/dovecot/auth-master
      mode: 438
      user: dovecot
      group: dovecot

deliver and webmail works fine when i start this Daemon. Now i made a
second conf-file:

# 1.1.2: /opt/dovecot/etc/dovecot_main.conf
base_dir: /var/run/dovecot_main
protocols: pop3s imaps
ssl_listen(default): MY_IP:993
ssl_listen(imap): MY_IP:993
ssl_listen(pop3): MY_IP:995
ssl_cert_file: /opt/certs/example.crt
ssl_key_file: /opt/certs/example.key
ssl_cipher_list: ALL:!LOW:!SSLv2
login_dir: /var/run/dovecot/login
login_executable(default): /opt/dovecot/libexec/dovecot/imap-login
login_executable(imap): /opt/dovecot/libexec/dovecot/imap-login
login_executable(pop3): /opt/dovecot/libexec/dovecot/pop3-login
login_chroot: no
first_valid_uid: 5000
last_valid_uid: 5000
mail_location: mbox:/home/vmail/%d/%u
mail_executable(default): /opt/dovecot/libexec/dovecot/imap
mail_executable(imap): /opt/dovecot/libexec/dovecot/imap
mail_executable(pop3): /opt/dovecot/libexec/dovecot/pop3
mail_plugin_dir(default): /opt/dovecot/lib/dovecot/imap
mail_plugin_dir(imap): /opt/dovecot/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/dovecot/lib/dovecot/pop3
auth extern:
  socket:
    type: connect
    master:
      path: /var/run/dovecot/auth-master
      mode: 384

Starting up the second Daemon is also no problem, it listen to the correct
IP, Logfiles does not show any errors. When i try to connect with
Thunderbird to this Daemon using IMAPS, i got the following errors logged:

Logfile for dovecot_main:

dovecot: “2008-08-21 19:16:47 ”Info: imap-login: Internal login failure
(auth failed, 1 attempts): user=<MY_USERNAME>, method=PLAIN, rip=REMOTE_IP,
lip=LOCAL_IP, TLS

Logfile for dovecot_local:

dovecot: Info: auth(default): client in: AUTH     1       PLAIN  
service=imap    secured lip=LOCAL_IP        rip=REMOTE_IP  lport=993       
rport=3107
dovecot: Info: auth(default): client out: CONT    1
dovecot: Info: auth(default): client in: CONT<hidden>
dovecot: Info: auth-worker(default): sql(MY_EMAIL,REMOTE_IP): query: SELECT
email AS user, NULL AS password, 1 AS nopassword, 
'/home/vmail/MY_DOMAIN/MY_USERNAME' AS userdb_home,
'mbox:/home/vmail/MY_DOMAIN/MY_USERNAME' AS userdb_mail, 5000 AS
userdb_uid, 5000 AS userdb_gid FROM users WHERE email = 'MY_EMAIL' AND
password = MD5('MY_PASSWORD') AND locked = 0 AND inactive = 0
dovecot: Info: auth(default): client out: OK      1       user=MY_EMAIL
dovecot: Info: auth(default): master in: REQUEST  1       5416    1
dovecot: Error: auth(default): Master requested auth for nonexisting client
5416

I understand what this error message means, when i run top during login i
can see one imap-login process (running under the Daemon "main") is
disappearing and coming up again a few seconds later.
What is causing this behaviour?

Thanks in advance.

Manuel



More information about the dovecot mailing list