就像所说的,当我尝试与Thunderbird连接时,Dovecot身份validation失败。 传入和传出的邮件工作正常。
我用例如本教程(以及更多)作为参考: https : //serverfault.com/questions/ask 。 这应该是好的,因为它是Ubuntu 12.04。 (不幸的是我们不能升级,直到一些遗留的东西被迁移到LXC容器)。
我testing了auth:
root@mail ~ # doveadm auth prta Password: passdb: prta auth succeeded extra fields: user=prta
SMTP:
root@mail ~ # telnet localhost 25 Trying 127.0.0.1... Connected to mail.prteamwork.com. Escape character is '^]'. 220 mail.prteamwork.com ESMTP Postfix ehlo localhost 250-mail.prteamwork.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN
投稿方式:
root@mail ~ # telnet localhost 587 Trying 127.0.0.1... Connected to mail.prteamwork.com. Escape character is '^]'. 220 mail.prteamwork.com ESMTP Postfix ehlo localhost 250-mail.prteamwork.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN
IMAP:
root@mail ~ # telnet localhost 143 Trying 127.0.0.1... Connected to mail.prteamwork.com. Escape character is '^]'. * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
似乎工作…
但是,当我尝试使用Thunderbird(IMAP:153 STARTTLS和SMTP:587 STARTTLS)身份validation连接失败,在mail.log中:
Jun 22 19:59:03 mail postfix/submission/smtpd[10100]: connect from 78-27-114-110.bb.dnainternet.fi[78.27.114.110] Jun 22 19:59:03 mail dovecot: imap-login: Aborted login (no auth attempts): rip=78.27.114.110, lip=188.40.118.13 Jun 22 19:59:03 mail postfix/submission/smtpd[10100]: improper command pipelining after EHLO from 78-27-114-110.bb.dnainternet.fi[78.27.114.110]: QUIT\r\n Jun 22 19:59:03 mail postfix/submission/smtpd[10100]: disconnect from 78-27-114-110.bb.dnainternet.fi[78.27.114.110] Jun 22 19:59:25 mail dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<prta>, method=PLAIN, rip=78.27.114.110, lip=188.40.118.13, TLS Jun 22 19:59:45 mail dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<[email protected]>, method=PLAIN, rip=78.27.114.110, lip=188.40.118.13, TLS Jun 22 19:59:50 mail postfix/submission/smtpd[10100]: connect from 78-27-114-110.bb.dnainternet.fi[78.27.114.110] Jun 22 19:59:50 mail postfix/submission/smtpd[10317]: connect from 78-27-114-110.bb.dnainternet.fi[78.27.114.110] Jun 22 19:59:50 mail postfix/submission/smtpd[10321]: connect from 78-27-114-110.bb.dnainternet.fi[78.27.114.110] Jun 22 19:59:50 mail postfix/submission/smtpd[10322]: connect from 78-27-114-110.bb.dnainternet.fi[78.27.114.110] Jun 22 19:59:50 mail dovecot: imap-login: Aborted login (no auth attempts): rip=78.27.114.110, lip=188.40.118.13 Jun 22 19:59:50 mail dovecot: imap-login: Aborted login (no auth attempts): rip=78.27.114.110, lip=188.40.118.13
这里是dovecot.conf:
disable_plaintext_auth = no mail_privileged_group = mail mail_location = mbox:~/mail:INBOX=/var/mail/%u userdb { driver = passwd } passdb { args = %s driver = pam } protocols = " imap" protocol imap { mail_plugins = " autocreate" } plugin { autocreate = Trash autocreate2 = Sent autosubscribe = Trash autosubscribe2 = Sent } service auth { unix_listener /var/spool/postfix/private/auth { #group = postfix mode = 0660 #user = postfix } } auth_mechanisms = plain login ssl=required ssl_cert = </etc/ssl/certs/mail.prteamwork.pem ssl_key = </etc/ssl/private/mail.prteamwork.key
这里是Postix main.cfg:
#Base config myhostname = mail.prteamwork.com myorigin = /etc/mailname mydestination = $myhostname, $mydomain, localhost, localhost.$mydomain relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all relay_domains = $mydestination syslog_name=postfix/submission #Aliases / Recipients alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases local_recipient_maps = proxy:unix:passwd.byname $alias_maps #SSL/TLS smtpd_tls_cert_file=/etc/ssl/certs/mail.prteamwork.pem smtpd_tls_key_file=/etc/ssl/private/mail.prteamwork.key smtpd_use_tls=yes smtpd_tls_auth_only = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_tls_security_level=may smtp_tls_security_level=may smtpd_tls_protocols = !SSLv2, !SSLv3 smtpd_tls_wrappermode=no smtpd_sasl_type=dovecot smtpd_sasl_path=private/auth smtpd_sasl_auth_enable=yes milter_macro_daemon_name=ORIGINATING #Security and Anti-Spam cinfig policy-spf_time_limit = 3600s smtpd_helo_required = yes smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_unknown_recipient_domain permit _mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service unix:private/policy-spf check_policy_service inet:127.0.0.1:10023 smtpd_helo_restrictions = permit_mynetworks reject_non_fqdn_helo_hostname reject_invalid_helo_hostname smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated reject_unknown_client_hostname smtpd_data_restrictions = reject_unauth_pipelining #DKIM milter_default_action = accept milter_protocol = 6 smtpd_milters = inet:localhost:8891 non_smtpd_milters = inet:localhost:8891
并在Postix master.cf SMTP和提交启用+ SPF添加:
... smtp inet n - - - - smtpd #smtp inet n - - - 1 postscreen #smtpd pass - - - - - smtpd #dnsblog unix - - - - 0 dnsblog #tlsproxy unix - - - - 0 tlsproxy submission inet n - - - - smtpd # -o syslog_name=postfix/submission # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING ... policy-spf unix - nn - - spawn user=nobody argv=/usr/sbin/postfix-policyd-spf-perl
我真的很感激一些gru的帮助,我完全坚持这个:/
最好的祝福,
Temexter
所有提交的参数仍然被注释掉:
submission inet n - - - - smtpd # -o syslog_name=postfix/submission # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING
删除所有#
取消注释,您将在所有其他设置中包含smtpd_sasl_auth_enable=yes
。
解决了。 Ubuntu 12.04。 似乎需要不同的参数PAMvalidation。
passdb { driver = pam args = failure_show_msg=yes }
不
args = %s