Postfix – SASLAuthentication问题带有StartTLS的Cram-MD5

最近我configuration了使用Postfix和Courier的邮件服务器。 除了通过Postfix服务器(在端口587上运行)发送邮件时启用了StartTLS并使用SASLAuthentication与虚拟域和地图进行validation时,所有工作都可以正常进行。

日志

当我尝试连接我的电子邮件客户端发送消息时,我收到以下消息,显示在/var/log/mail.log中:

postfix/smtpd[5108]: connect from ip domain.com[xxx.xxx.xxx.xxx] postfix/smtpd[5108]: Anonymous TLS connection established from domain.com[xxx.xxx.xxx.xxx]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits) postfix/smtpd[5108]: warning: domain.com[xxx.xxx.xxx.xxx]: SASL CRAM-MD5 authentication failed: authentication failure postfix/smtpd[5108]: disconnect from domain.com[xxx.xxx.xxx.xxx] 

组态

/etc/postfix/main.cf文件:

 smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no readme_directory = no smtpd_use_tls = yes smtpd_tls_received_header = yes smtpd_tls_cert_file = /etc/ssl/private/domain_com.crt smtpd_tls_key_file = /etc/ssl/private/domain.key smtpd_tls_CAfile = /etc/ssl/private/certificates.ca-bundle smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache broken_sasl_auth_clients = yes smtpd_sasl_path = smtpd smtpd_tls_session_cache_timeout = 3600s smtpd_tls_loglevel = 1 tls_random_source = dev:/dev/urandom myhostname = domain.com virtual_mailbox_domains = /etc/postfix/virtual_domains virtual_mailbox_base = /home/vmail virtual_mailbox_maps = hash:/etc/postfix/virtual_maps virtual_minimum_uid = 100 virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 myorigin = domain.com mydestination = domain.com, localhost.com, , localhost reject_unknown_recipient_domain, reject_unauth_destination, reject_rbl_client sbl.spamhaus.org, permit smtpd_helo_restrictions = reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_helo_hostname smtpd_client_restrictions = reject_rbl_client dnsbl.sorbs.net smtpd_sasl_local_domain = smtpd_sasl_authenticated_header = yes smtp_use_tls = yes smtp_tls_note_starttls_offer = yes home_mailbox = Maildir/ smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_security_options = noanonymous noplaintext smtpd_recipient_restrictions = reject_unauth_destination permit_sasl_authenticated smtpd_tls_security_level = encrypt smtpd_tls_loglevel = 1 smtpd_tls_auth_only = no 

/ etc / default / saslauthd

 START=yes PWDIR="/var/spool/postfix/var/run/saslauthd" PARAMS="-m ${PWDIR}" PIDFILE="${PWDIR}/saslauthd.pid" DESC="SASL Authentication Daemon" NAME="saslauthd" MECHANISMS="rimap" MECH_OPTIONS="127.0.0.1" THREADS=5 OPTIONS="-c -r -m /var/spool/postfix/var/run/saslauthd" 

目录

ls / etc / postfix / sasl /:

 (empty) 

ls / etc / postfix /:

 dynamicmaps.cf main.cf master.cf postfix-files postfix-script post-install sasl smtpd.conf virtual.db virtual_domains virtual_maps virtual_maps.db 

ls / etc / courier /:

 authdaemonrc imapd imapd.cnf imapd-ssl shared userdb userdb.dat userdb.lock userdbshadow.dat 

笔记

  • 使用imaps的快递服务器的userdb整个身份validation工作得很好。 所以我的后缀configuration必须有一些问题。

问题

  1. 我如何修复我的configuration,使authenticationfunction。
  2. 是否有可能debuggingSASLAuthentication,它只告诉我它是否成功,但不是,例如用户名无法find。

如果您需要更多的信息,请不要犹豫,问。 如果你注意到我的configuration有些奇怪,或者如果你有任何改进的build议,请让我知道。 非常感谢你。 任何帮助是非常感激的。