EC2에서 SSL을 사용하는 Dovecot/Postfix

EC2에서 SSL을 사용하는 Dovecot/Postfix

나는 다음에서 튜토리얼을 진행해 왔습니다.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.

Amazon에 역방향 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

관련 정보