- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
SMTP: disabling verification of SSL certificate
- limewolf
- Topic Author
- Offline
- New Member
Less
More
2 years 1 month ago #227314
by limewolf
SMTP: disabling verification of SSL certificate was created by limewolf
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3.9
Own server or LimeSurvey hosting: own server
Survey theme/template: n/a
==================
Hi,
I just installed Lime Survey in my home lab and I am struggling with setting up the email function.
My mail server is also self hosted in my home lab. I can only connect to it internally (via its local IP address). Therefore, its external LE SSL certificate doesn't check out. So when I try and send a mail, I get an error that Lime Survey can't connect to the mail server.
This is nothing new and in other programs I am running (i.a. nextcloud), this can be mitigated by disabling the checking of the mail server's certificate. In the Lime Survey SMTP settings, I have found not such option. I have tried editing the config.php and copied over the settings I use in nextcloud's config.php:
'mail_smtpstreamoptions' =>
array (
'ssl' =>
array (
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
),
)
But it seems that they are not accepted (as it does not make a difference).
Is there a way to disable the checking of the mail server's SSL certificate?
Thanks!
Your LimeSurvey version: 5.3.9
Own server or LimeSurvey hosting: own server
Survey theme/template: n/a
==================
Hi,
I just installed Lime Survey in my home lab and I am struggling with setting up the email function.
My mail server is also self hosted in my home lab. I can only connect to it internally (via its local IP address). Therefore, its external LE SSL certificate doesn't check out. So when I try and send a mail, I get an error that Lime Survey can't connect to the mail server.
This is nothing new and in other programs I am running (i.a. nextcloud), this can be mitigated by disabling the checking of the mail server's certificate. In the Lime Survey SMTP settings, I have found not such option. I have tried editing the config.php and copied over the settings I use in nextcloud's config.php:
'mail_smtpstreamoptions' =>
array (
'ssl' =>
array (
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
),
)
But it seems that they are not accepted (as it does not make a difference).
Is there a way to disable the checking of the mail server's SSL certificate?
Thanks!
Please Log in to join the conversation.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5036
- Thank you received: 1259
2 years 1 month ago #227322
by jelo
Use the SMTP debug mode to get more infos.
LimeSurvey uses the thirdparty library phpmailer for email stuff.
Troubleshooting phpmailer issues are discussed here:
github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic SMTP: disabling verification of SSL certificate
Why are you so sure the issue is a failed verfication of a cert? What is the exact errormessage and what are the mail settings in LimeSurvey?My mail server is also self hosted in my home lab. I can only connect to it internally (via its local IP address). Therefore, its external LE SSL certificate doesn't check out. So when I try and send a mail, I get an error that Lime Survey can't connect to the mail server.
Use the SMTP debug mode to get more infos.
LimeSurvey uses the thirdparty library phpmailer for email stuff.
Troubleshooting phpmailer issues are discussed here:
github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Please Log in to join the conversation.
- limewolf
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
2 years 1 month ago #227324
by limewolf
Replied by limewolf on topic SMTP: disabling verification of SSL certificate
Well, it is the same behaviour I know from other programs I run. Unless I disable the verification, the connection to my mail server fails.
This is the from the log:
According to the PHP Mailer docs this may have to do with the certificate verification:
It all fits together.
But, of course, it is just a theory until I can prove it right or wrong by disabling the checking of the SSL certificate.
This is the from the log:
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
SMTP Error: Could not connect to SMTP host.
CLIENT -> SERVER: QUIT
According to the PHP Mailer docs this may have to do with the certificate verification:
If there's a problem relating to the certificate, you will get an error like this:
You may not see this error; In implicit encryption mode (SMTPS) it may be hidden because there isn't a way for the channel to show messages - SMTP+STARTTLS is generally easier to debug because of this. In an SMTP transcript this will typically be shown as trying to send aCode:Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failedcommand immediately followed by aCode:STARTTLScommand.Code:QUIT
It all fits together.
But, of course, it is just a theory until I can prove it right or wrong by disabling the checking of the SSL certificate.
Please Log in to join the conversation.
- rehanseo
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
3 months 3 days ago - 3 months 3 days ago #256154
by rehanseo
Replied by rehanseo on topic SMTP: disabling verification of SSL certificate
ChatGPT
Last edit: 3 months 3 days ago by DenisChenu. Reason: ChatGPT
Please Log in to join the conversation.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13716
- Thank you received: 2502
3 months 3 days ago #256190
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic SMTP: disabling verification of SSL certificate
Since @rehanseo send some chatGPT forum post.
gitlab.com/SondagesPro/coreAndTools/AllowSelfSignedSSLSmtp
gitlab.com/SondagesPro/coreAndTools/AllowSelfSignedSSLSmtp
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Please Log in to join the conversation.