• Support
  • I can't Configure WP Mail SMTP on my wordpress

aaPanel_Kern
Hello Certificate is ok, and am using secure TLS port 587..

If I try with port 25 this is what I get

Versions:
WordPress: 6.0.2
WordPress MS: No
PHP: 7.4.30
WP Mail SMTP: 3.5.2

Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Host: mx.pressplay.top
Port: 25
SMTPSecure: string(0) ""
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)

Server:
OpenSSL: OpenSSL 1.1.1f 31 Mar 2020
Apache.mod_security: No

Debug:
Email Source: WP Mail SMTP
Mailer: Other SMTP
SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

SMTP Debug:
2022-10-10 04:52:06 Connection: opening to mx.pressplay.top:25, timeout=300, options=array()

2022-10-10 04:52:07 Connection: opened

2022-10-10 04:52:07 SERVER -> CLIENT: 220 v1377591.hosted-by-vdsina.ru ESMTP Postfix (Ubuntu)

2022-10-10 04:52:07 CLIENT -> SERVER: EHLO www.pressplay.top

2022-10-10 04:52:07 SERVER -> CLIENT: 250-v1377591.hosted-by-vdsina.ru250-PIPELINING250-SIZE 102400000250-VRFY250-ETRN250-STARTTLS250-AUTH PLAIN LOGIN250-ENHANCEDSTATUSCODES250-8BITMIME250-DSN250-SMTPUTF8250 CHUNKING

2022-10-10 04:52:07 CLIENT -> SERVER: STARTTLS

2022-10-10 04:52:07 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS

2022-10-10 04:52:07 Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [/www/wwwroot/pressplay.top/wp-includes/PHPMailer/SMTP.php line 468]

SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

2022-10-10 04:52:07 CLIENT -> SERVER: QUIT

2022-10-10 04:52:07

2022-10-10 04:52:07

2022-10-10 04:52:07 Connection: closed

SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

    David_Chriss
    Try to apply for SSL. Check the configuration of postfix at the same time

    openssl s_client -connect mx.pressplay.top:587 -starttls smtp

      7 days later

      aaPanel_Kern Try to apply for SSL. Check the configuration of postfix at the same time

      openssl s_client -connect mx.pressplay.top:587 -starttls smtp

      Where to put that command please and where is the file location of postfix. Thanks

      aaPanel_Kern Put: smtpd_tls_chain_files=/etc/ssl/private/ssl-cert-snakeoil.key,/etc/ssl/certs/ssl-cert-snakeoil.pem
      Change to: smtpd_tls_chain_files = /www/server/panel/plugin/mail_sys/cert/135mailtest.com/privkey.pem,/www/server/panel/plugin/mail_sys/cert/135mailtest.com/fullchain.pem
      Note to replace 135mailtest.com with your domain name.

      Also You give me this, but I don know where to put, Please help me in this

        David_Chriss

        This is my normal configuration. You can refer to

        # See /usr/share/postfix/main.cf.dist for a commented, more complete version
        
        
        # Debian specific:  Specifying a file name will cause the first
        # line of that file to be used as the name.  The Debian default
        # is /etc/mailname.
        #myorigin = /etc/mailname
        
        smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
        biff = no
        
        # appending .domain is the MUA's job.
        append_dot_mydomain = no
        
        # Uncomment the next line to generate "delayed mail" warnings
        #delay_warning_time = 4h
        
        readme_directory = no
        
        # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
        # fresh installs.
        compatibility_level = 2
        
        
        
        # TLS parameters
        #smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
        #smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
        smtpd_tls_security_level = may
        
        smtp_tls_CApath=/etc/ssl/certs
        smtp_tls_security_level = may
        smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
        
        
        smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
        myhostname = kern123.top
        alias_maps = hash:/etc/aliases
        alias_database = hash:/etc/aliases
        mydestination = 
        relayhost = 
        mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
        mailbox_command = procmail -a "$EXTENSION"
        mailbox_size_limit = 0
        recipient_delimiter = +
        inet_interfaces = all
        inet_protocols = all
        virtual_mailbox_domains = sqlite:/etc/postfix/sqlite_virtual_domains_maps.cf
        virtual_alias_maps = sqlite:/etc/postfix/sqlite_virtual_alias_maps.cf, sqlite:/etc/postfix/sqlite_virtual_alias_domain_maps.cf, sqlite:/etc/postfix/sqlite_virtual_alias_domain_catchall_maps.cf
        virtual_mailbox_maps = sqlite:/etc/postfix/sqlite_virtual_mailbox_maps.cf, sqlite:/etc/postfix/sqlite_virtual_alias_domain_mailbox_maps.cf
        smtpd_sasl_type = dovecot
        smtpd_sasl_path = private/auth
        smtpd_sasl_auth_enable = yes
        smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
        smtpd_use_tls = yes
        virtual_transport = lmtp:unix:private/dovecot-lmtp
        smtpd_milters = inet:127.0.0.1:11332
        non_smtpd_milters = inet:127.0.0.1:11332
        milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
        milter_protocol = 6
        milter_default_action = accept
        message_size_limit = 102400000
        
        #smtpd_tls_chain_files = /etc/ssl/private/ssl-cert-snakeoil.key,/etc/ssl/certs/ssl-cert-snakeoil.pem
        smtpd_tls_chain_files = /www/server/panel/plugin/mail_sys/cert/xxxx.top/privkey.pem,/www/server/panel/plugin/mail_sys/cert/xxxx.top/fullchain.pem
        tls_server_sni_maps = hash:/etc/postfix/vmail_ssl.map

          aaPanel_Kern Sorry I don't understand am not too good on this.. Can I please give you my Login To Server and help me to fix it please?

          Here is the Log from WordPress SMTP Plugin

          Versions:
          WordPress: 6.0.2
          WordPress MS: No
          PHP: 7.4.30
          WP Mail SMTP: 3.6.1
          
          Params:
          Mailer: smtp
          Constants: No
          ErrorInfo: SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
          error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
          Host: mx.pressplay.top
          Port: 587
          SMTPSecure: tls
          SMTPAutoTLS: bool(true)
          SMTPAuth: bool(true)
          
          Server:
          OpenSSL: OpenSSL 1.1.1f 31 Mar 2020
          Apache.mod_security: No
          
          Debug:
          Email Source: WPForms Lite
          Mailer: Other SMTP
          SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
          error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
          Email Source: WP Mail SMTP
          Mailer: Other SMTP
          SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
          error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
          Email Source: WP Core
          Mailer: Other SMTP
          SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
          error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
          Email Source: wpDiscuz
          Mailer: Other SMTP
          SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
          error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
          
          SMTP Debug:
          2022-10-17 04:17:54 Connection: opening to mx.pressplay.top:587, timeout=300, options=array()
          
          2022-10-17 04:17:55 Connection: opened
          
          2022-10-17 04:17:55 SERVER -> CLIENT: 220 v1377591.hosted-by-vdsina.ru ESMTP Postfix (Ubuntu)
          
          2022-10-17 04:17:55 CLIENT -> SERVER: EHLO www.pressplay.top
          
          2022-10-17 04:17:55 SERVER -> CLIENT: 250-v1377591.hosted-by-vdsina.ru250-PIPELINING250-SIZE 102400000250-VRFY250-ETRN250-STARTTLS250-ENHANCEDSTATUSCODES250-8BITMIME250-DSN250-SMTPUTF8250 CHUNKING
          
          2022-10-17 04:17:55 CLIENT -> SERVER: STARTTLS
          
          2022-10-17 04:17:55 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
          
          2022-10-17 04:17:55 Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [/www/wwwroot/pressplay.top/wp-includes/PHPMailer/SMTP.php line 468]
          
          SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
          
          2022-10-17 04:17:55 CLIENT -> SERVER: QUIT
          
          2022-10-17 04:17:55
          
          2022-10-17 04:17:55
          
          2022-10-17 04:17:55 Connection: closed
          
          SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

            David_Chriss
            Hi, can you give us your aapanel information? The server makes a snapshot backup first, if possible, please send it to kern@aapanel.com.
            It is recommended to fill in the following
            Post link:
            SSH IP address, account password and port:
            aapanel login link address and account password:

            No post link will not be able to know which user's information is

              a month later

              Hello, I also have the same problem with my WordPress.
              But I don't know how to solve it?

              Can you give me some guidelines to follow?

              Or do I have to give my login information as well?



                aaP_krissiankg
                Hello, please try to reapply for SSLs at the mail server. At the same time, check the postfix configuration, which can be viewed in the server status
                "mail.135mailtest.com" is replaced with your domain name
                Put:
                smtpd_tls_chain_files=/etc/ssl/private/ssl-cert-snakeoil.key,/etc/ssl/certs/ssl-cert-snakeoil.pem
                Change to:
                smtpd_tls_chain_files = /www/server/panel/plugin/mail_sys/cert/135mailtest.com/privkey.pem,/www/server/panel/plugin/mail_sys/cert/135mailtest.com/fullchain.pem
                Note to replace 135mailtest.com with your domain name.
                Also check /www/server/panel/plugin/mail_sys/cert/135mailtest.com/ for privkey.pem and fullchain.pem files

                You can use this command to check whether the correct SSL is configured
                openssl s_client -connect mail.135mailtest.com:587 -starttls smtp
                or
                openssl s_client -connect mail.135mailtest.com:465 -starttls smtp

                  aaPanel_Kern

                  Hello Mr
                  unfortunately my problem still continues.

                  here is the information from the postfix_config_file :

                  See /usr/share/postfix/main.cf.dist for a commented, more complete version

                  Debian specific: Specifying a file name will cause the first

                  line of that file to be used as the name. The Debian default

                  is /etc/mailname.

                  #myorigin = /etc/mailname

                  smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
                  biff = no

                  appending .domain is the MUA's job.

                  append_dot_mydomain = no

                  Uncomment the next line to generate "delayed mail" warnings

                  #delay_warning_time = 4h

                  readme_directory = no

                  See http://www.postfix.org/COMPATIBILITY_README.html -- default to 3.6 on

                  fresh installs.

                  compatibility_level = 3.6

                  TLS parameters

                  #smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
                  #smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
                  smtpd_tls_security_level = may

                  smtp_tls_CApath=/etc/ssl/certs
                  smtp_tls_security_level = may
                  smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

                  smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
                  myhostname = ip-172-31-0-172.ec2.internal
                  alias_maps = hash:/etc/aliases
                  alias_database = hash:/etc/aliases
                  mydestination =
                  relayhost =
                  mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
                  mailbox_command = procmail -a "$EXTENSION"
                  mailbox_size_limit = 0
                  recipient_delimiter = +
                  inet_interfaces = all
                  inet_protocols = all
                  virtual_mailbox_domains = sqlite:/etc/postfix/sqlite_virtual_domains_maps.cf
                  virtual_alias_maps = sqlite:/etc/postfix/sqlite_virtual_alias_maps.cf, sqlite:/etc/postfix/sqlite_virtual_alias_domain_maps.cf, sqlite:/etc/postfix/sqlite_virtual_alias_domain_catchall_maps.cf
                  virtual_mailbox_maps = sqlite:/etc/postfix/sqlite_virtual_mailbox_maps.cf, sqlite:/etc/postfix/sqlite_virtual_alias_domain_mailbox_maps.cf
                  smtpd_sasl_type = dovecot
                  smtpd_sasl_path = private/auth
                  smtpd_sasl_auth_enable = yes
                  smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
                  smtpd_use_tls = yes
                  virtual_transport = lmtp:unix:private/dovecot-lmtp
                  smtpd_milters = inet:127.0.0.1:11332
                  non_smtpd_milters = inet:127.0.0.1:11332
                  milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
                  milter_protocol = 6
                  milter_default_action = accept
                  message_size_limit = 102400000

                  smtpd_tls_chain_files = /www/server/panel/plugin/mail_sys/cert/guelichwebboost.xyz/privkey.pem,/www/server/panel/plugin/mail_sys/cert/guelichwebboost.xyz/fullchain.pem

                  tls_server_sni_maps = hash:/etc/postfix/vmail_ssl.map

                  I have launched the verification
                  openssl s_client -connect mail.135mailtest.com:465 -starttls smtp

                  here is the result

                  pourtant sur mon wordpress, j'ai toujours le mm problème :

                  --------------------------------- FULL ERROR LOG
                  Versions:
                  WordPress: 6.1.1
                  WordPress MS: No
                  PHP: 7.4.33
                  WP Mail SMTP: 3.6.1

                  Params:
                  Mailer: smtp
                  Constants: No
                  ErrorInfo: SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server
                  Host: mail.guelichwebboost.xyz
                  Port: 465
                  SMTPSecure: ssl
                  SMTPAutoTLS: bool(true)
                  SMTPAuth: bool(true)

                  Server:
                  OpenSSL: OpenSSL 1.0.2u 20 Dec 2019

                  Debug:
                  Email Source: WP Mail SMTP Pro
                  Mailer: Autre SMTP
                  SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server

                  SMTP Debug:
                  2022-11-23 10:19:21 Connection: opening to ssl://mail.guelichwebboost.xyz:465, timeout=300, options=array()

                  2022-11-23 10:19:21 Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol [/www/wwwroot/form.guelichwebboost.xyz/wp-includes/PHPMailer/SMTP.php line 389]

                  2022-11-23 10:19:21 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [/www/wwwroot/form.guelichwebboost.xyz/wp-includes/PHPMailer/SMTP.php line 389]

                  2022-11-23 10:19:21 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://mail.guelichwebboost.xyz:465 (Unknown error) [/www/wwwroot/form.guelichwebboost.xyz/wp-includes/PHPMailer/SMTP.php line 389]

                  2022-11-23 10:19:21 SMTP ERROR: Failed to connect to server: (0)

                  SMTP Error: Could not connect to SMTP host. Failed to connect to server

                  aaP_krissiankg
                  Hello, a message is displayed indicating that the server cannot be connected. Run the command to check the connection
                  apt install telnet -y && telnet mail.guelichwebboost.xyz 465

                    aaPanel_Kern

                    root@ip-172-31-0-172:~# apt install telnet -y && telnet mail.guelichwebboost.xyz 465
                    Reading package lists... Done
                    Building dependency tree... Done
                    Reading state information... Done
                    telnet is already the newest version (0.17-44build1).
                    telnet set to manually installed.
                    The following packages were automatically installed and are no longer required:
                    libflashrom1 libftdi1-2 liblockfile-bin liblockfile1 lockfile-progs
                    sendmail-base sensible-mda
                    Use 'apt autoremove' to remove them.
                    0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
                    Trying 3.81.197.65...
                    Connected to mail.guelichwebboost.xyz.
                    Escape character is '^]'.
                    220 ip-172-31-0-172.ec2.internal ESMTP Postfix (Ubuntu)

                      aaPanel_Kern

                      please check with me
                      Here is the information for the server and the users
                      I will take one of the users and fill my wp

                      here is the filling of the wp

                        aaP_krissiankg
                        Hello, could you please send your aapanel information to us? The server does snapshot backup first. If yes, send it to kern@aapanel.com.
                        You are advised to enter the value as follows
                        Link to post:
                        SSH IP address, account password, and port number:
                        aapanel login link and account password:
                        There is no way to know which user's message is without a link to the post
                        wordpress Background login Information and email user information:

                          aaP_krissiankg
                          Hello, your server prompts that port 25 cannot be used. Generally, the server provider will disable port 25. I suggest you consult the server
                          You can run commands to check

                            aaPanel_Kern

                            root@ip-172-31-0-172:~# telnet hello-mail.aapanel.com 25
                            Trying 128.1.164.230...
                            telnet: Unable to connect to remote host: Connection timed out
                            root@ip-172-31-0-172:~#

                              Connect with us: 📨 Telegram 💬 Discord Email: support@aapanel.com