Dovecot/Postfix mit SSL auf EC2

Dovecot/Postfix mit SSL auf EC2

Ich habe ein Tutorial unter folgender Adresse durchgearbeitet:http://www.cerebellumstrategies.com/amazon-linux-postfix-dovecot/und durch das komplette Tutorial bis hin zur Überprüfung der Authentifizierung klappt alles.

Innerhalb der Instanz kann ich Folgendes ausführen:

[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 ~]$ 

Aber von meinem eigenen Laptop:

Drew-Sonnes-MacBook-Pro:~ drew$ openssl s_client -starttls smtp -connect mail.symbiosislaboratories.com:25
connect: Connection refused
connect:errno=61

Ich habe Port 25 in meiner Sicherheitsgruppe geöffnet (und das schon seit einigen Wochen). Um mein Problem zu debuggen, habe ich iptables deaktiviert:

[ec2-user@domU-... ~]$ sudo service iptables status
iptables: Firewall is not running.

Ich habe bei Amazon um die Öffnung meines Reverse-DNS und Port 25 gebeten und das wurde vor ein paar Tagen erledigt. Ich habe sichergestellt, dass mein DNS richtig aufgelöst wird. Ich habe das Tutorial durchgearbeitet, Tippfehler korrigiert, meine Einstellungen doppelt und dreifach überprüft und kann nichts finden, was ich falsch gemacht habe. Kennt jemand noch etwas, das dies verhindern würde?

Antwort1

Dies ist mit SASL. Key ist der Schlüssel, pem ist die CA-Datei und crt und das ausgestellte Zertifikat.

/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

verwandte Informationen