Feature #94544
closedAllow more SMTP Configuration Settings (verify_peer)
100%
Description
Hi,
I need to send SMTP-Mails with ssl and a self signed certificate. In default configuration from Backend test mail I always receive:
Core: Error handler (BE): PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in /data/www/httpdocs/releases/2021-06-28_19 47/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php line 155
Now I added in the \TYPO3\CMS\Core\Mail\TransportFactory the options to disable verfify check:
$stream = $transport->getStream();
$streamOptions = $stream->getStreamOptions();
$streamOptions['ssl']['verify_peer'] = false;
$streamOptions['ssl']['verify_peer_name'] = false;
$stream->setStreamOptions($streamOptions);
With this change sending works great.
I wish that can add this settings in LocalConfiguration Mail Settings
Updated by Guido Schmechel over 3 years ago
I have a few questions about this:
- Where did you add these options? My guess is public function get(array $mailSettings) at the type "smtp"?
- Do you have an overview of all StreamOptions?
So that we can implement it in a meaningful way. I imagine an array in the AdditionalConfiguration, which is not editable by the Install Tool. Comparable to the HTTP options ([HTTP][proxy]). Here we have no UI on the part of the InstallTool.
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69907
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69907
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69907
Updated by Guido Schmechel over 3 years ago
I add a first approach. Maybe you can check this patch and add some feedback?
Updated by David Henninger about 3 years ago
I added the patch to my Typo3 10.4.21 setup and mail worked again after adding the new transport_smtp_stream_options to LocalConfiguration MAIL:
'MAIL' => [
'transport' => 'smtp',
'transport_sendmail_command' => '/usr/sbin/sendmail -t -i ',
'transport_smtp_encrypt' => false,
'transport_smtp_password' => '',
'transport_smtp_server' => 'localhost:25',
'transport_smtp_username' => '',
'transport_smtp_stream_options' => [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false
]
]
]
However, the 'Configure Installation-Wide Options' in the install tool fails with the patch as "type: mixed" cannot handle the array above:
PHP Warning: mb_strlen() expects parameter 1 to be string, array given in typo3_src/typo3_src-10.4.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 3300
Also, some indentation spaces for the new options are missing in DefaultConfigurationDescription.yaml as well
P.S. yaml is the worst
Updated by Gerrit Code Review about 3 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69907
Updated by Gerrit Code Review about 3 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69907
Updated by Guido Schmechel about 3 years ago
- Related to Feature #96034: Add Symfony mailer configuration added
Updated by Gerrit Code Review almost 3 years ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69907
Updated by Gerrit Code Review almost 3 years ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69907
Updated by Gerrit Code Review almost 3 years ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69907
Updated by Gerrit Code Review almost 3 years ago
Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69907
Updated by Guido Schmechel almost 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9d044bad26b3f114a93bd8e0146436c275d265d4.
Updated by Benni Mack almost 3 years ago
- Related to Bug #96803: Use proper default config values for new mail settings added