6

I'm in charge of a Debian GNU/Linux (Wheezy) DomU for the mail services of the company I work for.

Yesterday one hard drive that was used for this particular server died.

After installing Debian again, Dovecot decided to no longer listen on any ports (checked with netstat -l). Other services (like Postfix and MySQL) work without problems.

dovecot -n:

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-3-amd64 x86_64 Debian wheezy/sid ext3
auth_mechanisms = plain login
disable_plaintext_auth = no
first_valid_uid = 150
last_valid_uid = 150
mail_gid = mail
mail_location = maildir:/var/vmail/%d/%n
mail_uid = vmail
namespace inbox {
  inbox = yes
  location = 
  prefix = 
}
pass db {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = mail
    mode = 0666
    user = vmail
  }
}
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service pop3-login {
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
ssl_cert = </etc/ssl/private/mail.crt
ssl_key = </etc/ssl/private/mail.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol imap {
  mail_max_userip_connections = 25
}

UID 150 is vmail (I double checked file permissions). I didn't install Dovecot from source, but via apt from the official Debian US mirror. There are no messages concerning Dovecot in /var/log/syslog except for:

Oct 21 06:36:29 server dovecot: master: Dovecot v2.1.7 starting up (core dumps disabled)

Any ideas?

Giacomo1968
  • 3,542
  • 27
  • 38

2 Answers2

10

You're missing a protocols directive to tell Dovecot which protocols to serve.

An example:

protocols = imap imaps pop3 pop3s
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • 11
    On Debian there is a `!include_try /usr/share/dovecot/protocols.d/*.protocol` setting. These protocols are enabled automatically by an installation of corresponding packages, `dovecot-pop3d` for example. – Neurotransmitter May 15 '15 at 10:18
  • 1
    @TranslucentCloud Thank you very much for that comment. I was wondering, why systemd was listening on the port instead of dovecot. Turns out, I was in fact missing dovecot-imapd :) – Manawyrm Oct 25 '15 at 14:21
3

I realize this is an old question with an equally old answer, but on Ubuntu and Debian installs there is /usr/share/dovecot/protocols.d/ directory that should contain .protocol files. These are separate packages that one can install outside of the main Dovecot install. As explained here on the official Ubuntu page for Dovecot:

The installation is extremely simple, just install the following packages:

  1. dovecot-imapd
  2. dovecot-pop3d

For example, using apt-get:

sudo apt-get install dovecot-imapd dovecot-pop3d

So I recommend that you just go ahead and install those packages like this:

sudo apt-get install dovecot-imapd dovecot-pop3d

Pretty sure after you do that and then check the /usr/share/dovecot/protocols.d/ directory you will see some .protocol files in there. Just restart Dovecot after doing that and you should be good. And feel free to install other .protocol files as needed.

Giacomo1968
  • 3,542
  • 27
  • 38
  • 1
    Good God! Is there no end to the insanity of Debian systems? – Michael Hampton Aug 10 '18 at 18:55
  • @MichaelHampton Well, to be fair, I started my sysadmin career mainly dealing with Ubuntu boxes and now I am on RedHat and CentOS and it drives me nuts how if I upgrade a package like Apache, file system permissions are always changed for things like log files—which I often need to make non-admin readable—so each distro has its own strengths and weaknesses. – Giacomo1968 Aug 10 '18 at 20:59
  • 1
    ACLs solve that problem pretty neatly, most of the time. I've [run into that one before myself](https://serverfault.com/a/695554/126632). – Michael Hampton Aug 10 '18 at 21:11