# Dovecot upgrade: auth-master connection refused

## serotonin

I upgraded to dovecot 1.2.12 Friday evening.  Since then, every morning around 3am Nagios wakes me up with notifications that my mail server is having issues.  Looking into the log files It's clear that there is an issue with dovecot authentication as the likely cause for the pre-dawn wakeup calls.   :Evil or Very Mad:   Restarting dovecot and postfix has fixed the issue, temporarily.  I've tried recompiling dovecot and postfix.  There has not been any changes to the postfix or dovecot configurations in weeks.  It's odd to me that it usually happens at the same time, I've checked cron and there are not any jobs scheduled there.  It's interesting to me that the server works for many hours if not a full day and then the problems creep in.  I've left some configuration information as well as the error below.  Thank you in advance!

```

Jul 14 08:57:05 mail dovecot: deliver(user@domain.com): userdb lookup: connect(/var/run/dovecot/auth-master) failed: Connection refused

```

```

mail ~ # dovecot -n

# 1.2.12: /etc/dovecot/dovecot.conf

# OS: Linux 2.6.33-gentoo i686 Gentoo Base System release 2.0.1 rootfs

protocols: imap imaps pop3

ssl_cert_file: /etc/ssl/dovecot/server.pem

ssl_key_file: /etc/ssl/dovecot/server.key

disable_plaintext_auth: no

login_dir: /var/run/dovecot/login

login_executable(default): /usr/libexec/dovecot/imap-login

login_executable(imap): /usr/libexec/dovecot/imap-login

login_executable(pop3): /usr/libexec/dovecot/pop3-login

first_valid_uid: 8

last_valid_uid: 8

first_valid_gid: 12

last_valid_gid: 12

mail_privileged_group: mail

mail_uid: 8

mail_gid: 12

mail_location: maildir:/var/mail/%d/%n/Maildir:INDEX=/var/mail/%d/%n/indexes

mmap_disable: yes

mail_nfs_storage: yes

mail_nfs_index: yes

mail_executable(default): /usr/libexec/dovecot/imap

mail_executable(imap): /usr/libexec/dovecot/imap

mail_executable(pop3): /usr/libexec/dovecot/pop3

mail_plugin_dir(default): /usr/lib/dovecot/imap

mail_plugin_dir(imap): /usr/lib/dovecot/imap

mail_plugin_dir(pop3): /usr/lib/dovecot/pop3

imap_client_workarounds(default): outlook-idle

imap_client_workarounds(imap): outlook-idle

imap_client_workarounds(pop3):

lda:

  postmaster_address: postmaster@example.com

auth default:

  mechanisms: plain login

  user: nobody

  passdb:

    driver: sql

    args: /etc/dovecot/dovecot-sql.conf

  userdb:

    driver: prefetch

  userdb:

    driver: sql

    args: /etc/dovecot/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: 384

      user: mail

      group: mail

mail ~ #
```

/etc/dovecot/dovecot-sql.conf contains

```

driver = mysql

connect = host=/var/run/mysqld/mysqld.sock user=**** password=***** dbname=******

default_pass_scheme = MD5

user_query = SELECT CONCAT('/var/mail/', maildir) AS home, CONCAT('*:bytes=', quota) AS quota_rule \

        FROM mailbox WHERE username = '%u' AND active = 1

password_query = SELECT CONCAT('/var/mail/', maildir) AS userdb_home, username as user, password, \

 CONCAT('*:bytes=', quota) AS userdb_quota_rule FROM mailbox WHERE username = '%u' AND active = 1

```

----------

