0

First, I am a CentOS 7 newbie. I am running an email server on CentOS 7, I am currently having issue with setting SMTPS up on postfix. BTW, imap over SSL on port 993 is working fine. Port 465 and SMTPS service were already added to firewall as well.

problem # 1: result of running telnet localhost 465

sudo telnet localhost 465
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

problem # 2: result of running sudo openssl s_client -connect mail.server.com:465

CONNECTED(00000003)
write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 247 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

Here is my config under /etc/postfix/main.cf

smtp_use_tls = yes
smtp_tls_key_file = /etc/pki/tls/private/server.com.key
smtp_tls_cert_file = /etc/pki/tls/certs/server.com.crt
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

And config under /etc/postfix/master.cf

smtp      inet  n       -       n       -       -       smtpd
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy
#submission inet n       -       n       -       -       smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_tls_security_level=encrypt
#  -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
#  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       n       -       -       smtpd
# -o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes

I've tried many different methods to setup SMTPS on postfix online, but non of them worked. Could anyone help me? Thanks!

WillyBoy
  • 21
  • 1
  • 5
  • smtp_tls_cert_file = /etc/pki/tls/certs/server.com.crt shold be smtpd_tls_cert_file – user993553 Mar 29 '17 at 18:37
  • SMTPS has been deprecated for a number of years now, so should only be used to support legacy email clients or other such bespoke needs. (Instead use STARTTLS at tcp/25 or tcp/587.) – thrig Mar 29 '17 at 18:57

0 Answers0