Debian – dovecot not letting me telnet localhost 110 — imap and pop3-login not starting up

debiandovecotemailpostfix

I'm setting up a mailserver along the lines of http://workaround.org/ispmail/squeeze/setting-up-dovecot. I've done it successfully in the past, the only wrinkle this time is that dovecot has moved up to version 2 with some different config files.

Per dovecot's docs, I converted my old working dovecot.conf from version 1.2.15. From there I made what seemed logical, small changes.

Dovecot starts up, but does not allow me to do a simple manual login via telnet localhost 110 from the command line. I get the error:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

When I look to see what dovecot processes are running, I see:

116:root      5139  0.0  0.0  21516   884 ?        Ss   09:41   0:00 /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf
117:dovecot   5142  0.0  0.0  13044  1044 ?        S    09:41   0:00 dovecot/anvil
118:root      5143  0.0  0.0  13172  1212 ?        S    09:41   0:00 dovecot/log
119:root      5145  0.0  0.0  23424  3212 ?        S    09:41   0:00 dovecot/config
124:root      5374  0.0  0.0   7832   888 pts/1    S+   09:57   0:00 grep -n --color=always dovecot

and only these. I do not see pop3-login and imap-login processes, which I would expect to see.

But if I netstat -tap, I do see ports listening correctly:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:pop3                  *:*                     LISTEN      3960/dovecot    
tcp        0      0 *:imap2                 *:*                     LISTEN      3960/dovecot 

I would appreciate any thoughts on why this isn't letting me log-in. The dovecot logs have not shown me anything useful. It's not a firewall issue as I've taken that down too.

Below please find my config file settings.

Thank you.

 # 2.1.7: /etc/dovecot/dovecot.conf
    # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.1 ext3
    auth_debug = yes
    auth_debug_passwords = yes
    auth_mechanisms = plain login
    auth_verbose = yes
    debug_log_path = /var/log/dovecot/dovecot-debug.log
    disable_plaintext_auth = no
    log_path = /var/log/dovecot/dovecot-deliver.log
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_debug = yes
    mail_location = maildir:/var/vmail/%d/%n/Maildir
    mail_plugins = " quota"
    mail_privileged_group = mail
    namespace inbox {
      inbox = yes
      location = 
      mailbox Drafts {
        special_use = \Drafts
      }
      mailbox Junk {
        special_use = \Junk
      }
      mailbox Sent {
        special_use = \Sent
      }
      mailbox "Sent Messages" {
        special_use = \Sent
      }
      mailbox Trash {
        special_use = \Trash
      }
      prefix = 
    }
    passdb {
      driver = pam
    }
    passdb {
      args = /etc/dovecot/dovecot-sql.conf.ext
      driver = sql
    }
    plugin {
      quota = maildir:storage=1000000
      sieve = ~/.dovecot.sieve
      sieve_dir = ~/sieve
      sieve_global_path = /var/vmail/globalsieverc
    }
    protocols = " imap pop3"
    service auth {
        unix_listener /var/spool/postfix/private/auth {
        group = postfix
        mode = 0660
        user = postfix
      }
      unix_listener auth-master {
        mode = 0600
        user = vmail
      }
      user = root
    }
    service imap-login {
      inet_listener imap {
        port = 143
      }
      inet_listener imaps {
        port = 993
        ssl = yes
      }
    }
    service imap {
      process_limit = 1024 
    }
    service pop3-login {
      inet_listener pop3 {
        port = 110
      }
      inet_listener pop3s {
        port = 995
        ssl = yes
      }
    }
    service pop3 {
       process_limit = 1024
    }
    ssl_cert = </etc/dovecot/dovecot.pem
    ssl_cert_username_field = example.com
    ssl_key = </etc/dovecot/private/dovecot.pem
    ssl_key_password = secretsecret
    userdb {
      driver = passwd
    }
    userdb {
      args = uid=5000 gid=5000 home=/var/vmail/%d/%n allow_all_users=yes
      driver = static
    }
    verbose_ssl = yes
    protocol lda {
      auth_socket_path = /var/run/dovecot/auth-master
      log_path = /var/log/dovecot/dovecot-deliver.log
      mail_plugins = sieve
      postmaster_address = postmaster@example.com
    }
    protocol imap {
      mail_plugins = " quota imap_quota"
    }
    protocol pop3 {
      mail_plugins = " quota"
      pop3_uidl_format = %08Xu%08Xv
    }
}

Best Answer

SOLVED --

In my case, earlier I had created my own ssl certificate and attempted to have dovecot use the cert. when dovecot would not work properly for me, I returned to the ssl pem's that are installed by default with dovecot. But I neglected to comment out two lines:

ssl_cert_username_field = example.com
ssl_key_password = secretsecret

both in conf.d/10-ssl.conf.

These are associated with the ssl certificate that I created. They had nothing to do with the default pem's from dovecot.

Once I commented out these two lines, all started working properly.

I'll have to uncomment them once I decide to use a different, non-dovecot pem.