Am getting familiar with email Mail Server components and configuration.

Knowing that there have been quite a few configuration changes to Dovecot 2.x and willing to use SSL encryption, I have come across this guide. Postfix, Dovecot and POP with SSL configuration. The difference between IMAP and SSL is just a difference of packages (dovecot-imapd & dovecot-pop3d) and parameters in '/etc/dovecot/conf.d/10-master.conf'.

Have thoroughly followed the guide, creating 2 email user accounts. I first run into the following issue, when trying to connect with OSX Mail program.

dovecot: auth: Error: passwd-file /etc/dovecot/passwd: User xx@domain is missing userdb info 

Noting that usernames and passwords are stored in separate files, I changed '/etc/dovecot/conf.d/auth-system.conf.ext', to include the user file, as follows

passdb {
  driver = passwd-file
  args = scheme=cram-md5 username_format=%u /etc/dovecot/passwd
  #driver = pam
  #[session=yes] [setcred=yes] [failure_show_msg=yes] [max_requests=<n>]
  #[cache_key=<key>] [<service name>]
  #args = dovecot

userdb {
  driver = passwd-file
  args = username_format=%u /etc/dovecot/users
  #driver = passwd
  #args =

  # Override fields from passwd
  #override_fields = home=/home/virtual/%u

Also after an issue similar to here, I also changed 'etc/postfix/main.cf', by commenting:

smtpd_sasl_application_name = smtpd

All is fine, apart from this final issue I am facing. Postfix of course working, having send test email with mailutils. Error message is:

dovecot: imap-login: Aborted login (auth failed, 1 attempts in 2 secs): user=xx, method=LOGIN, rip=xx.xx.xx.xx, lip=xx.xx.xx.xx, TLS, session=<xxxxxxx> 

I am only using IMAP with SSH STARTTLS, on ports 993 and 587 respectively. Say this as other email protocol ports are blocked by UFW Firewall, on my Amazon EC2 Ubuntu 14.04 instance. Strangely when sending email from another domain account to my domain, no email trace shows under '/home/vmail/domain/user/new'. Have also set relevant DNS records as follows:

* 10800 IN A server-ip
@ 10800 IN A server-ip
@ 10800 IN MX 10 mail.mydomain 

This is my situation; any input would be highly appreciated.


In /etc/postfix/master.cf add:

dovecot   unix  -       n       n       -       -       pipe
  flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}

In /etc/postfix main.cf add:

dovecot_destination_recipient_limit = 1
virtual_mailbox_domains = your.domain.here
virtual_transport = dovecot 

This assume the user vmail is the owner of /home/virtual, adjust as necessary.

If after confirming you have this configuration in postfix you still have trouble, post you full postfix (feel free to sanitize domain info to examplt.com etc) and dovecot configuration files.

  • Hi Aaron, Thanks for your answer. I added modifications to '/etc/postfix/master.cf' and '/etc/postfix main.cf', but still same "imap-login: Aborted login" error. My Postfix and Dovecot config files are here uploaded Other '/etc/postfix/vhosts', '/etc/postfix/vmaps', '/etc/dovecot/users', '/etc/dovecot/passwd' are identical to tutorial I posted earlier (just with my details of course). Thanks again – user3484001 Sep 9 '15 at 6:44
  • In that log line with Aborted login, is the rip=xxx.xxx.xxx.xxx the ip of the local machine? – Aaron Tate Sep 9 '15 at 11:30
  • rip IP is of email client host, not of web-server. – user3484001 Sep 9 '15 at 12:39
  • I dont think the error you posted really has anything to do with email delivery to your mailboxes and more related to an imap connection and authentication attempt, can you send a test message then grab and post the last 50 lines of your info/warn/error logs (usually mail.log and mail.err on recent debian based systems) – Aaron Tate Sep 10 '15 at 5:51
  • Indeed is linked with authentication. Sending test message from gmail to server now shows under '/home/vmail/domain/user/new', after opening port 25. Connecting via telnet port 143 or 'openssl s_client -connect' on port 993 both work, but not login process (wiki2.dovecot.org/TestInstallation). I moved all user data content to 1 file '/etc/dovecot/passwd', following format at wiki2.dovecot.org/AuthDatabase/PasswdFile. passwd file format is "user@domain:{CRAM-MD5}xxxx:5000:5000::/home/vmail/domain/user/:/bin/false::". Having problems understanding how Dovecot processes login. – user3484001 Sep 10 '15 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.