1 (edited by robmit68 2023-05-25 10:56:10)

Topic: iredMail Self Certificate for internal and external users

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 2.2 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? : Easy
- Linux/BSD distribution name and version: Ubuntu 20.04.6 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL 2.2
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? iRedAdmin
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello team, i am trying to best configure my home lab iRedMail Server - it is sending an receiving email no issues, but i recently added an openssl cert for the outside mail.fxxx.com even though his internal name is fncmail.fxxx.local since is my LAN Local Internal Domain, and my issue and challenge i am presented with my configuration is that wp mail smtp a wp forms software will need to send emails to my mailbox for alerts and it fails stating the following message below:


Versions:
WordPress: 6.2.2
WordPress MS: No
PHP: 7.3.31-1~deb10u3
WP Mail SMTP: 3.8.0

Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): Peer certificate CN=`mail.fxxx.com' did not match expected CN=`fncmail.fxxx.local'SMTP server error: QUIT command failed
Host: fncmail.fxxx.local
Port: 587
SMTPSecure: tls
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)

Server:
OpenSSL: OpenSSL 1.1.1n  15 Mar 2022
Apache.mod_security: No

Debug:
Email Source: WP Mail SMTP Pro
Mailer: Other SMTP
SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): Peer certificate CN=`mail.fxxx.com' did not match expected CN=`fncmail.fxxx.local'SMTP server error: QUIT command failed

SMTP Debug:

2023-05-25 01:28:58 Connection: opening to fncmail.fxxx.local:587, timeout=300, options=array()

2023-05-25 01:28:58 Connection: opened

2023-05-25 01:28:58 SERVER -> CLIENT: 220 mail.fxxx.com ESMTP Postfix (Ubuntu)

2023-05-25 01:28:58 CLIENT -> SERVER: EHLO wordpress-turnkey-01.fxxx.local

2023-05-25 01:28:58 SERVER -> CLIENT: 250-mail.fxxx.com250-PIPELINING250-SIZE 15728640250-ETRN250-STARTTLS250-ENHANCEDSTATUSCODES250-8BITMIME250-DSN250-SMTPUTF8250 CHUNKING

2023-05-25 01:28:58 CLIENT -> SERVER: STARTTLS

2023-05-25 01:28:58 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS

2023-05-25 01:28:58 Connection failed. Error #2: stream_socket_enable_crypto(): Peer certificate CN=`mail.fxxx.com' did not match expected CN=`fncmail.fxxx.local' [/var/www/wordpress/wp-includes/PHPMailer/SMTP.php line 468]

SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): Peer certificate CN=`mail.fxxx.com' did not match expected CN=`fncmail.fxxx.local'

2023-05-25 01:28:58 CLIENT -> SERVER: QUIT

2023-05-25 01:28:58 SERVER -> CLIENT:

2023-05-25 01:28:58 SMTP ERROR: QUIT command failed:

2023-05-25 01:28:58 Connection: closed

SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): Peer certificate CN=`mail.fxxx.com' did not match expected CN=`fncmail.fxxx.local'

Thank you for looking at it and time.

Regards

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.