Skip to content

Expose Mailer stream options (setStreamOptions) in configuration #12702

Closed

Description

@stalker314314

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

Activity

  1. nextcloud-bot commented on Nov 27, 2018

    @nextcloud-bot
    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).

  2. added 3 commits that reference this issue on Nov 30, 2018
    8b7fc09
    94f8e2e
    72d97b4
  3. added and removed
    1. to developAccepted and waiting to be taken care of
    on Dec 17, 2018
  4. added a commit that references this issue on Dec 18, 2018
    6f994be
  5. added this to the Nextcloud 16 milestone on Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions