Message: stream_socket_enable_crypto(): Peer certificate CN=`some-address-here` did not match expected CN=`127.0.0.1' - smtp

I want to send an email using gmail but it has error as shown:
Message: stream_socket_enable_crypto(): Peer certificate CN=some-address-here did not match expected CN=`127.0.0.1'
Filename: PHPMailer-master/class.smtp.php
Message was not sentMailer Error: SMTP connect() failed.
Kindly help me. Thanks!

In drupal following one of its solutions worked for me, you may find your solution in the given link. PHPMailer generates PHP Warning: stream_socket_enable_crypto(): Peer certificate did not match expected
For me, this solution worked, Disable SMTP restrictions in WHM by searching SMTP.
I was facing the same issue. Follow the reference, it might help you to find settings.
stream_socket_enable_crypto():

Probably, you used ssl connection on 465 port instead tls on 587.

Related

Issue setting up EmailJS with ionas

I'm trying to set up an Email Service with EmailJS and I'm having issues connecting an SMTP account,
I don't have much experience with SMTP's and not sure if I've overlooked something.
I followed the instructions found on the IONAS website here
Using a port of 465 for SSL and I'm getting the response:
412SMTP: getaddrinfo ENOTFOUND smtp.ionos.co.uk
Thanks

MySQL TLS verification via OpenSSL Fails

I have my MySQL instance configured to use TLS. I have verified this by intentionally using untrusted certificates and watching the clients fail to connect (with an appropriate error message) and then restarting the MySQL service with trusted certificates configured and having the clients connect successfully.
I wanted to do a final check using openssl's s_client but I can't get it to work. When I execute the command below, I get an error saying "SSL23_GET_SERVER_Hello:unknown protocol" followed by "no peer certificate available" followed by some more text. However, when I use the same command against a TLS-enabled Tomcat instance and against the Remote Desktop port, I am able to establish the connection and view the server's certificate. What am I doing wrong? Does MySQL do some extra pre-negotiation before the TLS handshake starts?
openssl s_client -showcerts -connect host:port
While MySQL may use TLS, it isn't the total outside layer. There is a small amount of preamble that occurs before TLS starts. The openssl command line isn't aware of this.
Use the mysql client with its TLS options to test the client certificate.
I marked the response from #danblack correct as he did answer the question. However, I want to provide more information in case it helps anyone else. The
small amount of preamble that occurs before TLS starts
that he refers to can be found on GitHub here.

Sending test mail fails in confluence

I need to evaluate notification functionality in confluence.
I have installed confluence locally on my PC.
I have configured mail server in it by going to General Configuration->Mail Servers->Add a new SMTP mail server
I have provided smtp.office365.com as Server Host Name and 587 as Server port.
I have used my company user id as User name and corresponding password.
However when I try to send a test mail, it fails with below exception
"Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.office365.com, port: 587" and also we have tried to configure our smtp server and getting error as "Caused by: java.net.SocketException: Permission denied: connect"
I have seen accepted answers for this question at post https://answers.atlassian.com/questions/139025/error-while-configuring-mail-server
However that is related to a bug Java1.7 whereas I am using Java1.8.
Can someone please suggest any idea what thing can be wrong?
Looking at the hostname it seems that the mail server is in the internet. If you are behind a proxy you will need to configure this in the java options as described here
https://confluence.atlassian.com/doc/configuring-web-proxy-support-for-confluence-117068.html

Pingfederate SCIM Inbound provisioning

I have configured SCIM inbound provisioning in pingfederate 7.2.0 using Active Directory as an user store. But when I hit the URL exposed by ping to search for an user I get the following error on the browser-
{ "totalResults":0,"itemsPerPage":0,"startIndex":0,
"errors":[{"description":"User and/or certificate not found","code":"401"}]
}
In the logs it says
11:34:29,251 DEBUG [Authenticator] AuthnInfo: ID='null' cert:false
basic:false from CERT:'null' BASIC:'null' 11:34:29,251 ERROR [UsersIdResource]
Unable to find a connection associated with the username/password and/or
certificate passed in with the request.
11:34:29,252 DEBUG [TrackingIdSupport] [cross-reference-message]
entityid:null subject:ranajoy
Can someone please help me with this?
I was having this exact same issue. I set up my Provisioning connection correctly, and it worked in other environments, and everything looked good. But then I got this error. If I changed the Basic Auth to a bad password, the error message at least changed to "Bad Password for <user>".
I took another look at my connection and realized I never actually activated the connection:

Jira dont work with mailgun.org

I have an issue with Mailgun.org in combination with our selfhosted Jira.
I want to add it as SMTP Outgoing, but he said Username/Password Error. Yeah , I triple checked the Username/Password combination.
In Confluence, Bamboo, Stash work the same Configuration fine.
The atlassian-jira.log just said:
2014-01-24 11:49:32,219 http-bio-8080-exec-22 ERROR xx 709x65334x1 hub9zg xx,127.0.0.1 /secure/admin/VerifySmtpServerConnection!update.jspa [plugins.mail.webwork.VerifyMailServer] Unable to authenticate to smtp.mailgun.org
Without TLS, the same.
If I try a Gmail Account, its works fine.
Any ideas?
I had the same issue and spoke to Jira support. It turns out the 'Test Connection' button was returning that it had failed with Unable to authenticate to smtp.mailgun.org message.
However if you actually add the Mailgun details as a smtp server it works correctly.
You can verify by sending a test email afterwards.
They have added a bug report for this issue.
https://jira.atlassian.com/browse/JRA-41342
Here is what worked for me. Very confusing since I receive an error message if I set it up any other way.
Protocol: SMTP (do not use secure smtp option)
Host Name: smtp.mailgun.org
SMTP Port: 587
Timeout: 10000
TLS: Enabled (checked)
Username/Password: Your mailgun postmaster username and password