You are not logged in.

#1 2016-07-12 03:38:09

Kingedgar
Member
Registered: 2016-07-12
Posts: 1

Postfix/Dovecot/SASL authentication troubles.

Hello everyone!

I have run into a problem with my postfix/dovecot/sasl installation. I have followed the wiki pages for Postfix, Dovecot and have followed the Virtual User Mail System page as well. I have postfixadmin setup have added my domain and a few virtual users. Everything went ok there. I have been attempting to send mail through a secondary host via an application on said host. All I get is failed to authenticate to mail server. I am using credentials from one of the virtual users. I will post configs as follows.

postconf -n
alias_database = $alias_maps
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/bin
compatibility_level = 2
daemon_directory = /usr/lib/postfix/bin
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
home_mailbox = Maildir/
html_directory = no
inet_protocols = ipv4
local_recipient_maps = $virtual_mailbox_maps
local_transport = virtual
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
meta_directory = /etc/postfix
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = kingedgar.xyz
myhostname = mail.kingedgar.xyz
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix
relay_domains = $mydestination
sample_directory = /etc/postfix
sendmail_path = /usr/bin/sendmail
setgid_group = postdrop
shlib_directory = /usr/lib/postfix
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/private/vmail.crt
smtpd_tls_key_file = /etc/ssl/private/vmail.key
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/postfix/virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/virtual_mailbox_domains.cf
virtual_mailbox_limit = 512000000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5000
doveconf -n
# 2.2.25 (7be1766): /etc/dovecot/dovecot.conf
# OS: Linux 4.6.3-1-ec2 x86_64  
auth_mechanisms = plain login
mail_home = /home/vmail/%d/%n
mail_location = maildir:~
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocols = imap pop3
service auth {
  unix_listener auth-client {
    group = vmail
    mode = 0666
    user = vmail
  }
  user = root
}
ssl_cert = </etc/ssl/private/vmail.crt
ssl_key = </etc/ssl/private/vmail.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}

And the relevant section from journalctl -xe

Jul 12 03:27:54 ip-172-31-50-187 postfix/submission/smtpd[4659]: SSL_accept:unknown state
Jul 12 03:27:54 ip-172-31-50-187 postfix/submission/smtpd[4659]: Anonymous TLS connection established from unknown[52.205.143.120]: TLSv1.2 
Jul 12 03:27:56 ip-172-31-50-187 postfix/submission/smtpd[4659]: warning: unknown[52.205.143.120]: SASL PLAIN authentication failed:
Jul 12 03:27:56 ip-172-31-50-187 postfix/submission/smtpd[4659]: lost connection after AUTH from unknown[52.205.143.120]
Jul 12 03:27:56 ip-172-31-50-187 postfix/submission/smtpd[4659]: disconnect from unknown[52.205.143.120] ehlo=2 starttls=1 auth=0/1 commands

If anyone could shed some light on what I am doing wrong it would be greatly appreciated.

Offline

Board footer

Powered by FluxBB