Closed floschoepfer closed 4 months ago
I can confirm this problem! After upgrade from v6 to v7 mails are not sent anymore. The logs look similiar to the ones above. Interesting is, that we don't use encryption at all (MAIL_ENCRYPTION=null in .env) but still get an error saying certificate verify failed.
Thank you for your report @LRA-Fr3d We don't use encryption as well and set the variable like you at null in the .env file. On v6 this worked like it should with this. @snipe are you aware of this issue?
This is a duplicate of #14909 no?
This is a duplicate of #14909 no?
I just tested this (I had to read through this case until I found the setting I needed) and it worked now, thank you for the hint!
@LRA-Fr3d you have to add MAIL_TLS_VERIFY_PEER=false
to your .env file, and you can delete the line with MAIL_ENCRYPTION=null
, since this does not do anything now.
https://github.com/snipe/snipe-it/issues/14909#issuecomment-2181198519:
Symfony tries to be "smart" and "secure" at the same time, and takes a lot of control away... for instance MAIL_ENCRYTION=null no longer does anything.. it just decides to use encryption if the server advertises it, which can be a problem if the certificate say one thing and you access it as a different name.... like with an IP address. I'm guessing that's what happening here.
For your old configuration, you may need to add MAIL_TLS_VERIFY_PEER=false
@snipe Maybe it would make sense to change this in the documentation, so other people will find this by themselves? https://snipe-it.readme.io/docs/configuration#required-outgoing-mail-settings
Docs updated - thanks for the reminder!
I ran into this problem and was reading the documentation. Having the MAIL_TLS_VERIFY_PEER=false statement sort of as a footnote to the table in the docs makes it a little hard to find. I would recommend that it be added to the table with a description even though it is not technically "required".
I would like to add that the acceptance of the item is not properly logged when the mail function fails. The signature file as well as EULA PDF is definitely there, but it's not shown; neither in the Dashboard history nor in the Asset history. @snipe
Debug mode
Describe the bug
Since I updated from v6 to v7 (v7.0.6), I get an Error 500 when using the mailing function. I did not change anything in my .env file and there was nothing changed on our mail server. Shortly before I updated, I used the mailing function, and it worked just fine. But after the update, I get this Error 500 and with debug mode enabled, this is the description:
Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:0A000086:SSL routines::certificate verify failed
Reproduction steps
Email List of All Assigned
Expected behavior
The mailing should work like in v6. Or was there a significant change of the mailing function?
Screenshots
No response
Snipe-IT Version
v7.0.6 build 14112 (ge1a6b441d)
Operating System
Ubuntu 22.04.4 LTS
Web Server
Apache I think (installed via the Installer from you)
PHP Version
8.1.2-1ubuntu2.18
Operating System
Windows 10 Pro
Browser
Microsoft Edge
Version
120.0.2210.91
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
After Upgrade from v6 to v7