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'm experiencing the above problem with postfix setup. Below are various logs and configs;

postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mailman_destination_recipient_limit = 1
mydestination = example.com, mail.example.com, mail, localhost.localdomain, localhost
myhostname = mail.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.128.0/24 172.1.1.1/32 10.10.1.0/24
myorigin = example.com
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = example.com
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport.db

dovecot -n

# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-23-generic x86_64 Ubuntu 12.04 LTS 
auth_mechanisms = plain login
disable_plaintext_auth = no
mail_access_groups = mail
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_privileged_group = mail
passdb {
  driver = pam
}
passdb {
  driver = passwd
}
passdb {
  args = scheme=CRYPT username_format=%u /etc/dovecot/users
  driver = passwd-file
}
protocols = " imap pop3"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  driver = passwd
}
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  imap_logout_format = bytes=%i/%o
  mail_plugins = 
}

telnet command log

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.prisaltd.com ESMTP Postfix
ehlo example.com
250-mail.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth plain
334 
cHJpc2FAcHJpc2FsdGQuY29tCg==
535 5.7.8 Error: authentication failed: 
auth login cHJpc2FAcHJpc2FsdGQuY29tCg==
535 5.7.8 Error: authentication failed: 
auth plain cHJpc2FAcHJpc2FsdGQuY29tCg==
535 5.7.8 Error: authentication failed: 

mail.log

Nov 24 20:59:20 mail postfix/smtpd[3430]: connect from localhost[127.0.0.1]
Nov 24 20:59:20 mail postfix/smtpd[3430]: match_list_match: localhost: no match
Nov 24 20:59:20 mail postfix/smtpd[3430]: match_list_match: 127.0.0.1: no match
Nov 24 20:59:20 mail postfix/smtpd[3430]: match_list_match: localhost: no match
Nov 24 20:59:20 mail postfix/smtpd[3430]: match_list_match: 127.0.0.1: no match
Nov 24 20:59:20 mail postfix/smtpd[3430]: smtp_stream_setup: maxtime=300 enable_deadline=0
Nov 24 20:59:20 mail postfix/smtpd[3430]: match_hostname: localhost ~? 127.0.0.0/8
Nov 24 20:59:20 mail postfix/smtpd[3430]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Nov 24 20:59:20 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 220 mail.example.com ESMTP Postfix
Nov 24 20:59:20 mail postfix/smtpd[3430]: xsasl_dovecot_server_create: SASL service=smtp, realm=example.com
Nov 24 20:59:20 mail postfix/smtpd[3430]: name_mask: noanonymous
Nov 24 20:59:20 mail postfix/smtpd[3430]: xsasl_dovecot_server_mech_filter: keep mechanism: PLAIN
Nov 24 20:59:20 mail postfix/smtpd[3430]: xsasl_dovecot_server_mech_filter: keep mechanism: LOGIN
Nov 24 20:59:34 mail postfix/smtpd[3430]: < localhost[127.0.0.1]: ehlo example.com
Nov 24 20:59:34 mail postfix/smtpd[3430]: match_list_match: localhost: no match
Nov 24 20:59:34 mail postfix/smtpd[3430]: match_list_match: 127.0.0.1: no match
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-mail.example.com
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-PIPELINING
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-SIZE 10240000
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-VRFY
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-ETRN
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-STARTTLS
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-AUTH PLAIN LOGIN
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-AUTH=PLAIN LOGIN
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-ENHANCEDSTATUSCODES
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250-8BITMIME
Nov 24 20:59:34 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 250 DSN
Nov 24 20:59:49 mail postfix/smtpd[3430]: < localhost[127.0.0.1]: auth plain
Nov 24 20:59:49 mail postfix/smtpd[3430]: xsasl_dovecot_server_first: sasl_method plain
Nov 24 20:59:49 mail postfix/smtpd[3430]: xsasl_dovecot_handle_reply: auth reply: CONT?1?
Nov 24 20:59:49 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 334 
Nov 24 21:00:02 mail postfix/smtpd[3430]: < localhost[127.0.0.1]: cHJpc2FAcHJpc2FsdGQuY29tCg==
Nov 24 21:00:04 mail postfix/smtpd[3430]: xsasl_dovecot_handle_reply: auth reply: FAIL?1
Nov 24 21:00:04 mail postfix/smtpd[3430]: warning: localhost[127.0.0.1]: SASL plain authentication failed: 
Nov 24 21:00:04 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 535 5.7.8 Error: authentication failed: 
Nov 24 21:00:10 mail postfix/smtpd[3430]: < localhost[127.0.0.1]: auth login cHJpc2FAcHJpc2FsdGQuY29tCg==
Nov 24 21:00:10 mail postfix/smtpd[3430]: xsasl_dovecot_server_first: sasl_method login, init_response cHJpc2FAcHJpc2FsdGQuY29tCg==
Nov 24 21:00:16 mail postfix/smtpd[3430]: xsasl_dovecot_handle_reply: auth reply: FAIL?2
Nov 24 21:00:16 mail postfix/smtpd[3430]: warning: localhost[127.0.0.1]: SASL login authentication failed: 
Nov 24 21:00:16 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 535 5.7.8 Error: authentication failed: 
Nov 24 21:00:22 mail postfix/smtpd[3430]: < localhost[127.0.0.1]: auth plain cHJpc2FAcHJpc2FsdGQuY29tCg==
Nov 24 21:00:22 mail postfix/smtpd[3430]: xsasl_dovecot_server_first: sasl_method plain, init_response cHJpc2FAcHJpc2FsdGQuY29tCg==
Nov 24 21:00:32 mail postfix/smtpd[3430]: xsasl_dovecot_handle_reply: auth reply: FAIL?3
Nov 24 21:00:32 mail postfix/smtpd[3430]: warning: localhost[127.0.0.1]: SASL plain authentication failed: 
Nov 24 21:00:32 mail postfix/smtpd[3430]: > localhost[127.0.0.1]: 535 5.7.8 Error: authentication failed:

Thanks for helping out.

share|improve this question
    
I hate to go this way, but, is there a chance you have something wrong with the username and password ? –  melsayed Nov 24 '12 at 20:25
    
probably. i think I never supplied a password. I only supplied the user. How am I suppose to supply both the username and password when I type auth login? Also in dovecot, where do you suggest I put auth_verbose = yes, just to see what dovecot has got to say? –  drecute Nov 24 '12 at 20:32
    
Try this command: perl -MMIME::Base64 -e 'print encode_base64("\000jms1\@jms1.net\000not.my.real.password")' Full details here: qmail.jms1.net/test-auth.shtml –  melsayed Nov 24 '12 at 20:43
    
i really don't know why it is rejecting it. If I try from thunderbird, I get the following: Sending of message failed. An error occurred sending mail: Unable to establish a secure link with SMTP server mail.example.com using STARTTLS since it doesn't advertise that feature. Switch off STARTTLS for that server or contact your service provider.. The request is not getting to the SMTP server at all. –  drecute Nov 24 '12 at 21:03
    
From dovecot logs, I get this: Nov 24 22:12:28 mail postfix/smtpd[1727]: xsasl_dovecot_server_first: sasl_method plain, init_response xxx Nov 24 22:12:30 mail dovecot: auth-worker: pam(user@example.com,127.0.0.1): pam_authenticate() failed: Authentication failure (password mismatch?) Nov 24 22:12:30 mail dovecot: auth-worker: passwd(user@example.com,127.0.0.1): unknown user Nov 24 22:12:30 mail dovecot: auth: passwd-file(user@example.com,127.0.0.1): unknown user Nov 24 22:12:32 mail postfix/smtpd[1727]: xsasl_dovecot_handle_reply: auth reply: FAIL?1?user=user@example.com –  drecute Nov 24 '12 at 21:16

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.