我一直在进行以下教程:http://www.cerebellumstrategies.com/amazon-linux-postfix-dovecot/整个教程中的一切都顺利进行,直到检查身份验证。
在实例内部,我可以运行:
[ec2-user@domU-... ~]$ openssl s_client -starttls smtp -connect localhost:25
CONNECTED(00000003)
didn't found starttls in server response, try anyway...
140326462789448:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:699:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 238 bytes and written 148 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
[ec2-user@domU-12-31-39-05-61-27 ~]$
但从我自己的笔记本电脑来看:
Drew-Sonnes-MacBook-Pro:~ drew$ openssl s_client -starttls smtp -connect mail.symbiosislaboratories.com:25
connect: Connection refused
connect:errno=61
我的安全组中的 25 端口已经打开(并且已经打开了几个星期)。为了调试我的问题,我关闭了 iptables:
[ec2-user@domU-... ~]$ sudo service iptables status
iptables: Firewall is not running.
我已经向亚马逊申请了反向 DNS 和开放端口 25,他们几天前就完成了。我已确保我的 DNS 解析正确。我已完成教程,修正了拼写错误,反复检查了设置,没有发现任何错误。还有谁知道还有什么可以阻止这种情况吗?
答案1
这是用 SASL 做的。Key 是密钥,pem 是 CA 文件,crt 是颁发的证书。
/etc/dovecot/conf.d/main.cf:
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
mailbox_size_limit = 0
allow_percent_hack = no
## Specify the keys/certificates
smtpd_tls_key_file = /etc/pki/tls/private/localhost.key
smtpd_tls_CAfile = /etc/pki/tls/cert.pem
smtpd_tls_cert_file = /etc/ssl/certs/localhost.crt
smtpd_tls_security_level = may
##
/etc/dovecot/master.cf:
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes
smtps inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes