Skip to content

Automatically set allow_self_signed=true if mail_smtphost = localhost #41935

@Cybso

Description

@Cybso

The newer versions of Nextcloud use StartTLS per default, resulting in many bug reports when used with self-signed certificates:

#37329
#37694
#38957
#39452
#39538
#40073

There is a workaround to allow self signed certificates by manually editing config.php:

  "mail_smtpstreamoptions" => array(
    'ssl' => array(
        'allow_self_signed' => true,
        'verify_peer' => false,
        'verify_peer_name' => false
    )   
  ),  

But since many users will stumble across this problem let me suggest a small change:

If "mail_smtphost" is set to "localhost" or "127.0.0.1" and the above parameters are not explicitly configured, then assume that the user wants to accept unverified self-signed certificates by default - or do not use StartTLS at all for local connections.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions