Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

SMTP: disabling verification of SSL certificate

  • limewolf
  • limewolf's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 week ago #227314 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!

Please Log in to join the conversation.

More
2 years 1 week ago #227322 by jelo

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.
 
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?
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
  • limewolf's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 week ago #227324 by limewolf
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:

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:

Code:
Warning: stream_socket_enable_crypto(): SSL operation failed with code 1.
OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
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 a 
Code:
STARTTLS
 command immediately followed by a 
Code:
QUIT
 command.


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.

More
2 months 1 week ago - 2 months 1 week ago #256154 by rehanseo
ChatGPT
Last edit: 2 months 1 week ago by DenisChenu. Reason: ChatGPT

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 months 1 week ago #256190 by DenisChenu
Replied by DenisChenu on topic SMTP: disabling verification of SSL certificate
Since @rehanseo send some chatGPT forum post.

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.

Lime-years ahead

Online-surveys for every purse and purpose