Wired system email problem

Hello,

I’m running different nc-instances for some organizations and with one I have a really wired problem with one of them. I configured the email settings as usual, but no emails are sent via smtp. I copied all the email-settings from another instance, but still get no emails sent out. After checking that I can send emails from the server via phpmailer, I tried to install a new instance of nextcloud, the same version as the production system. The fresh installed Version sends emails as expected, but still can’t get the production one to send emails. I triple checked all the email-settings, but still nothing.

Where should the setting ‘mail_smtpdebug’ => true, write some information too? I couldn’t find anything on the nextcloud log or anywhere else.

Any suggestions will be appreciated.

Best regards

Andreas

Nextcloud dropped NTLM support because they switched the framework the mailer used in the past. The new mailing framework detects what the mailserver is able to support and it will use TLS if it’s offered by the mailserver regardless of what you set inside the nextcloud backend!

Email — Nextcloud latest Administration Manual latest documentation
Warning

There were changes to the 3rd party mailer library in Nextcloud 26:

STARTTLS cannot be enforced. It will be used automatically if the mail server supports it. The encryption type should be set to ‘None’ in this case. See here for an example on how to configure self signed certificates.
NTLM authentication for Microsoft Exchange is not supported by the new mailer library

The smtp_debug does nothing.

As far as i understood it should output some get lines directly visible inside the backend where you setup email - but nothing happens.

You can try to use smtp_streamoptions to hopefully get around the TLS certificate verification.

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

To check your mailserver you can use telnet. (let’s say you mailserver uses 10.20.30.40 as it’s ip)
telnet 10.20.30.40 25

then type :
ehlo 10.20.30.40

The output should be something like this

250-smtp.domain.dom Hello your-server.local.lan [ip-address]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN CRAM-MD5                 # <<< Supported auth protocols
250-STARTTLS                                  # <<< Encryption is supported
250 HELP
1 Like

Hello, thank you for the explanation
My provider just accepts tls so thats what i have configured. I can’t understand why, tow nextcloud instances, with the same configuration, on the same machine, act different.