%20in%20Postfix%3F.png)
Ich habe Port 465 aktiviert, indem ich diese Zeilen in master.cf auskommentiert habe:
smtps inet n - y - - smtpd
-o smtpd_sasl_auth_enable=yes
-o smtpd_reject_unlisted_recipient=no
-o smtpd_client_restrictions=$mua_client_restrictions
-o smtpd_helo_restrictions=$mua_helo_restrictions
-o smtpd_sender_restrictions=$mua_sender_restrictions
Und Port 465 war aktiviert. Aber als ich PHPMailer verwendete, um mich über SSL damit zu verbinden, hieß es, es könne keine Verbindung hergestellt werden. Aber wenn ich STARTTLS verwende, funktioniert es. Warum ist das so? Ich denke, es soll funktionieren, wenn wir uns über SSL damit verbinden. Gibt es irgendwelche Lösungen?
Die PHPMailer-Konfiguration:
$mail->isSMTP();
$mail->Host = 'example.com';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
$mail->Port = 465;
$mail->SMTPAutoTLS = false;
main.cf:
# TLS configuration starts here
tls_random_source = dev:/dev/urandom
# SMTP from your server to others
smtp_tls_key_file = /some/place/to/ssl/domain.key
smtp_tls_cert_file = /some/place/to/ssl/domain.crt
smtp_tls_CAfile = /some/place/to/ssl/domain.crt
smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
smtp_tls_mandatory_protocols=!SSLv2,!SSLv3,!TLSv1,!TLSv1.1
smtp_tls_protocols=!SSLv2,!SSLv3,!TLSv1,!TLSv1.1
smtp_tls_loglevel = 0
smtp_tls_session_cache_database =
btree:/var/lib/postfix/smtp_tls_session_cache
# SMTP from other servers to yours
smtpd_tls_key_file = /some/place/to/ssl/domain.key
smtpd_tls_cert_file = /some/place/to/ssl/domain.crt
smtpd_tls_CAfile = /some/place/to/ssl/domain.crt
smtpd_tls_security_level = encrypt
smtpd_tls_auth_only = yes
smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3,!TLSv1,!TLSv1.1
smtpd_tls_protocols=!SSLv2,!SSLv3,!TLSv1,!TLSv1.1
smtpd_tls_loglevel = 0
smtpd_tls_session_cache_database =
btree:/var/lib/postfix/smtpd_tls_session_cache
# TLS configuration ends here