Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Mailer stream options (setStreamOptions) in configuration #12702

Closed
stalker314314 opened this issue Nov 27, 2018 · 1 comment
Closed

Comments

@stalker314314
Copy link
Contributor

tl;dr Filing a request for new feature that puts content from configuration (config.php) to setStreamOptions. I am also available to create/send patch, but wanted to first file the issue and see if this would get be accepted. Since setStreamOptions accept ordinary array, it could fit nicely in config.php IMHO, as mail_smtpstreamoptions (following current namespaces there)

Steps to reproduce

I am having Nextcloud locally (QNAP), but mail provider that I want to use is fastmail.

  • Fastmail is fairly advanced mail provider, yet I didn't found that they have ability to allow less secure apps, like google is having.
  • I am using SMTP as an mail_smtpmode and none of the configuration parameters is working for me.
  • I also cannot change QNAP easily (add cert/move instance domain)

So, at the end, I have to change Nextcloud:) So, based on this this is my dance I am doing whenever Mailer.php is overwitten:

$transport->setStreamOptions(array('ssl' => array('allow_self_signed' => true, 'verify_peer' => false, 'verify_peer_name' => false)));

(in Mailer.php in getSmtpInstance)

We might add separate config param to allow specifically this (allow_self_signed, _verify_peer=false...), but this is just promoting insecure usage and exposing setStreamOptions seems like a more generic solution.

Expected behaviour

Test mail should be sent when SMTP with my setup is sent

Actual behaviour

Uncaught Swift_TransportException: Connection could not be established with host smtp.fastmail.com

Server configuration

Operating system:

QNAP

Web server:

Apache2

Database:

PGSQL

PHP version:

7.x

Nextcloud version: (see Nextcloud admin page)

14.x

Updated from an older Nextcloud/ownCloud or fresh install:

Updated

Where did you install Nextcloud from:

tar.gz

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #12209 (Nextcloud exposes internal configuration/setup information), #6304 ("none" option no available on email configuration), #8960 (Gray-out relevant configuration options when config_is_read_only is set), #9142 (Stream endpoint), and #1670 (Support more libsmbclient options).

@ChristophWurst ChristophWurst added feature: emails 1. to develop Accepted and waiting to be taken care of and removed feature: dav labels Nov 29, 2018
stalker314314 added a commit to stalker314314/server that referenced this issue Nov 30, 2018
stalker314314 added a commit to stalker314314/server that referenced this issue Nov 30, 2018
Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
stalker314314 added a commit to stalker314314/server that referenced this issue Nov 30, 2018
Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Dec 17, 2018
skjnldsv added a commit that referenced this issue Dec 18, 2018
Expose Swift Mailer streaming options in config, fixes #12702
@MorrisJobke MorrisJobke added this to the Nextcloud 16 milestone Jan 2, 2019
@come-nc come-nc mentioned this issue Oct 4, 2022
52 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants