Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I run a Ubuntu 10.04 VPS with Postfix and Dovecot installed. For a while I had problems with the mailserver itself (Postfix) but now it runs ok. I can telnet into it from localhost (telnet localhost 25 while logged in) and Im blocked if I try to do it from the outside (telnet mail.example.org 25). This is as it should be according to my main.cf

However when I try to log in using Dovecot (openssl s_client -connect mail.example.com:993) I'm allowed in but denied when trying to identify myself as a user:

Excerpt from Dovecot log in:

Key-Arg   : None
Start Time: 1341074622
Timeout   : 300 (sec)
Verify return code: 18 (self signed certificate)
OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN         AUTH=LOGIN] Dovecot ready.

When I continue and try to log in to a specific user with the command: A001 login user password

I get:

A001 NO [AUTHENTICATIONFAILED] Authentication failed.

I've reset the password to ensure it is correct and I know the user (user) exists on the system.

When I do /etc/init.d/dovecot reload I get:

/etc/init.d/dovecot: 29: maildir:~/Maildir: not found
 * Reloading IMAP/POP3 mail server dovecot                                                                            [ OK ] 

Could it be that the mailboxes isn't found?

Postfix main.cf:

home_mailbox = Maildir/
mailbox_command =
recipient_delimiter = +
inet_interfaces = all
smtpd_use_tls = yes
smtpd_tls_auth_only = no
smtpd_tls_loglevel = 1
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_sasl_auth_enable = yes
smtpd_client_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $mydomain

Dovecot.conf:

protocols = imap imaps
disable_plaintext_auth = no
log_timestamp = "%b %d %H:%M:%S "
ssl = yes
ssl_cert_file = /etc/postfix/ssl/smtpd.crt
ssl_key_file = /etc/postfix/ssl/smtpd.key
mail_location = maildir:~/Maildir
auth_verbose = yes
mail_access_groups = mail
auth_username_chars = abcdefghijklmnopqrstuvwxyz0123456789
protocol imap {
  imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}
auth default {
  mechanisms = plain login
  passdb pam {
  }
  userdb passwd {
  }
  socket listen {
     client {
      path = /var/spool/postfix/private/auth
      user = postfix
      group = postfix
      mode = 0660
    }
  }
}
share|improve this question
2  
You need to check your logfile, dude! "tail -f /var/log/maillog" and see what does it say –  Andrew Smith Jun 30 '12 at 17:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.