Nextcloud v820 Mailserver Problem

stream_socket_client","args":["ssl://mail.cyon.ch:465",0,"",10,4,null]},{"file":"/snap/nex
tcloud/820/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php","line":275,"funct
ion":"initialize","class":"Symfony\\Component\\Mailer\\Transport\\Smtp\\Stream\\So
cketStream","type":" → ","args":},{"file":"/snap/nextcloud/820/nextcloud/3rdparty/symfony
/mailer/Transport/Smtp/SmtpTransport.php","line":209,"function":"start","class":"Symfony\
\Component\\Mailer\\Transport\\Smtp\\SmtpTransport","type":" → ","args":},{"file"
:"/snap/nextcloud/820/nextcloud/3rdparty/symfony/mailer/Transport/AbstractTransport.php","line":
69,"function":"doSend","class":"Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTr
ansport","type":" → ","args":[{"class":"Symfony\\Component\\Mailer\\SentMessage"
}]},{"file":"/snap/nextcloud/820/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.p
hp","line":137,"function":"send","class":"Symfony\\Component\\Mailer\\Transport\\A
bstractTransport","type":" → ","args":[{"class":"Symfony\\Component\\Mime\\Email
“},{"class":"Symfony\\Component\\Mailer\\DelayedEnvelope"}]},{"file":"/snap/nextclo
ud/820/nextcloud/3rdparty/symfony/mailer/Mailer.php","line":42,"function":"send","class":"
Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport","type":" → ","args":[{"
class":"Symfony\\Component\\Mime\\Email"},null]},{"file":"/snap/nextcloud/820/nextcl
oud/lib/private/Mail/Mailer.php","line":205,"function":"send","class":"Symfony\\Componen
t\\Mailer\\Mailer","type":" → ","args":[{"class":"Symfony\\Component\\Mime\\E
mail"}]},{"file":"/snap/nextcloud/820/nextcloud/apps/settings/lib/Controller/MailSettingsControl
ler.php","line":148,"function":"send","class":"OC\\Mail\\Mailer","type":" → ","ar
gs":[{"class":"OC\\Mail\\Message"}]},{"file":"/snap/nextcloud/820/nextcloud/lib/priv
ate/AppFramework/Http/Dispatcher.php","line":208,"function":"sendTestMail","class":"OCA\
\Settings\\Controller\\MailSettingsController","type":" → ","args":},{"file":"/snap/n
extcloud/820/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"ex
ecuteController","class":"OC\\AppFramework\\Http\\Dispatcher","type":" → ","args":[{
"class":"OCA\\Settings\\Controller\\MailSettingsController"},"sendTestMail"]},{"fil
e":"/snap/nextcloud/820/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"d
ispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":" → ","args":[{"clas
s
":"OCA\\Settings\\Controller\\MailSettingsController"},"sendTestMail"]},{"file":"/s
nap/nextcloud/820/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","clas
s":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\MailS
ettingsController","sendTestMail",{"class":"OC\\AppFramework\\DependencyInjection\\D
IContainer"},{"_route":"settings.mailsettings.sendtestmail"}]},{"file":"/snap/nextcloud/820/
nextcloud/lib/base.php","line":1003,"function":"match","class":"OC\\Route\\Router","
type":" → ","args":["/settings/admin/mailtest"]},{"file":"/snap/nextcloud/820/nextcloud/ind
ex.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":}],
“File":"/snap/nextcloud/820/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/Stream/SocketStream.p
hp","Line":154,"message":"Sending mail to \"Array\n(\n [mailbox@ahk.ch] => christoph\n
)\n\" with subject \"Email setting test\" failed","exception":{},"CustomMessage":"Sendi
ng mail to \"Array\n(\n [mailbox@ahk.ch] => christoph\n)\n\" with subject \"Email setti
ng test\" failed"}”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/201001
01 Firefox/134.0”,“version”:“30.0.4.1”}
Feb 01 15:12:30 syncloud Nextcloud[11999]: {“reqId”:“1FkF4jWNpBD6Mohk0GAM”,“level”:0,“time”:“2025-02
-01T15:12:30+00:00”,“remoteAddr”:“83.150.49.13”,“user”:“Christoph”,“app”:“core”,“method”:“POST”,“url
“:”/settings/admin/mailtest”,“message”:”“,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:
134.0) Gecko/20100101 Firefox/134.0”,“version”:“30.0.4.1”,“data”:{“app”:“core”}}
Feb 01 15:12:30 syncloud ld-2.31.so[565]: syncloud nginx: 83.150.49.13 - - [01/Feb/2025:15:12:30 +00
00] “POST /settings/admin/mailtest HTTP/1.1” 400 135 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64;
rv:134.0) Gecko/20100101 Firefox/134.0”
Feb 01 15:12:30 syncloud Nextcloud[12222]: {“reqId”:“SpIzD3p8CHAIvoVrd2OS”,“level”:0,“time”:“2025-02
-01T15:12:30+00:00”,“remoteAddr”:“83.150.49.13”,“user”:“Christoph”,“app”:“no app in context”,“method
“:“POST”,“url”:”/settings/admin/mailtest”,“message”:”{"Exception":"RuntimeException","Message"
:"ignorable exception","Code":0,"Trace":[{"file":"/snap/nextcloud/820/nextcloud/lib/private
/AppConfig.php","line":1180,"function":"loadConfig","class":"OC\\AppConfig","type":"
→ ","args":[null]},{"file":"/snap/nextcloud/820/nextcloud/lib/private/AppConfig.php","line"
:100,"function":"loadConfigAll","class":"OC\\AppConfig","type":" → ","args":},{"fi
le":"/snap/nextcloud/820/nextcloud/lib/private/AllConfig.php","line":169,"function":"getKeys
","class":"OC\\AppConfig","type":" → ","args":["user_ldap"]},{"file":"/snap/nextclo
ud/820/nextcloud/apps/user_ldap/lib/Helper.php","line":111,"function":"getAppKeys","class":
"OC\\AllConfig","type":" → ","args":["user_ldap"]},{"file":"/snap/nextcloud/820/nextcl
oud/apps/user_ldap/lib/Helper.php","line":52,"function":"getServersConfig","class":"OCA\
\User_LDAP\\Helper","type":" → ","args":["ldap_configuration_active"]},{"file":"/snap/n
extcloud/820/nextcloud/apps/user_ldap/lib/AppInfo/Application.php","line":114,"function":"getS
erverConfigurationPrefixes","class":"OCA\\User_LDAP\\Helper","type":" → ","args":[true
]},{"file":"/snap/nextcloud/820/nextcloud/lib/private/AppFramework/Bootstrap/FunctionInjector.php
","line":28,"function":"OCA\\User_LDAP\\AppInfo\\{closure}","class":"OCA\\User_LDA
P\\AppInfo\\Application","type":" → ","args":["*** sensitive parameters replaced ***"]},
{"file":"/snap/nextcloud/820/nextcloud/lib/private/AppFramework/Bootstrap/BootContext.php","lin
e":32,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector",
"type":" → ","args":[{"class":"Closure"}]},{"file":"/snap/nextcloud/820/nextcloud/app
s/user_ldap/lib/AppInfo/Application.php","line":105,"function":"injectFn","class":"OC\\A
ppFramework\\Bootstrap\\BootContext","type":" → ","args":[{"class":"Closure"}]},{
"file":"/snap/nextcloud/820/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line
":157,"function":"boot","class":"OCA\\User_LDAP\\AppInfo\\Application","type":" → "
,"args":[{"class":"OC\\AppFramework\\Bootstrap\\BootContext"}]},{"file":"/snap/ne
xtcloud/820/nextcloud/lib/private/App/AppManager.php","line":434,"function":"bootApp","class
":"OC\\AppFramework\\Bootstrap\\Coordinator","type":" → ","args":["user_ldap"]},{"f
ile":"/snap/nextcloud/820/nextcloud/lib/private/App/AppManager.php","line":211,"function":"l
oadApp","class":"OC\\App\\AppManager","type":" → ","args":["user_ldap"]},{"file":
“/snap/nextcloud/820/nextcloud/lib/private/legacy/OC_App.php","line":85,"function":"loadApps"
,"class":"OC\\App\\AppManager","type":" → ","args":[["authentication"]]},{"file":"
/snap/nextcloud/820/nextcloud/lib/base.php","line":975,"function":"loadApps","class":"OC_A
pp","type":"::","args":[["authentication"]]},{"file":"/snap/nextcloud/820/nextcloud/inde
x.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":}],"
File":"/snap/nextcloud/820/nextcloud/lib/private/AppConfig.php","Line":1194,"message":"The l
oading of lazy AppConfig values have been requested","exception":{},"CustomMessage":"The loadi
ng of lazy AppConfig values have been requested"}”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64
; x64; rv:134.0) Gecko/20100101 Firefox/134.0”,“version”:“30.0.4.1”}

echo "Q" | openssl s_client -connect  mail.cyon.ch:465 > /dev/null
journalctl -u snap.nextcloud.* | grep -i ssl

Hello Boris
Sorry, I was on holiday.
I have now entered the two commands and got the following answer:

root@syncloud:~# echo "Q" | openssl s_client -connect  mail.cyon.ch:465 > /dev/null
depth=1 C = BE, O = GlobalSign nv-sa, CN = GlobalSign GCC R6 AlphaSSL CA 2023
verify error:num=20:unable to get local issuer certificate
verify return:0
DONE
root@syncloud:~# journalctl -u snap.nextcloud.* | grep -i ssl
root@syncloud:~#

I have now run the mail test a few times and sent you the log.
Thank you for your patience!

Interesting, your device does not trust mail.cyon.ch

While mine does:

depth=2 OU = GlobalSign Root CA - R6, O = GlobalSign, CN = GlobalSign
verify return:1
depth=1 C = BE, O = GlobalSign nv-sa, CN = GlobalSign GCC R6 AlphaSSL CA 2023
verify return:1
depth=0 CN = *.cyon.ch
verify return:1
CONNECTED(00000003)
---
Certificate chain
 0 s:CN = *.cyon.ch
   i:C = BE, O = GlobalSign nv-sa, CN = GlobalSign GCC R6 AlphaSSL CA 2023
 1 s:C = BE, O = GlobalSign nv-sa, CN = GlobalSign GCC R6 AlphaSSL CA 2023
   i:OU = GlobalSign Root CA - R6, O = GlobalSign, CN = GlobalSign
---
Server certificate
-----BEGIN CERTIFICATE-----
...
DONE

Can you run

nslookup mail.cyon.ch

I get the following error message

root@syncloud:~# nslookup mail.cyon.ch
-bash: nslookup: command not found

apt install -y nslookup

Then try again

root@syncloud:~# apt install -y nslookup
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package nslookup
root@syncloud:~#

Sorry it should be

apt install -y dnsutils

It looks as if there is another problem.

root@syncloud:~# apt install -y dnsutils
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
rblcheck
The following NEW packages will be installed:
dnsutils
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 120 kB of archives.
After this operation, 389 kB of additional disk space will be used.
Err http://security.debian.org/ jessie/updates/main dnsutils amd64 1:9.9.5.dfsg-9+deb8u18
404 Not Found [IP: 151.101.66.132 80]
E: Failed to fetch http://security.debian.org/pool/updates/main/b/bind9/dnsutils_9.9.5.dfsg-9+deb8u18_amd64.deb 404 Not Found [IP: 151.101.66.132 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@syncloud:~# ^C

apt update
apt install -y dnsutils
nslookup mail.cyon.ch

root@syncloud:~# apt update
Ign http://security.debian.org jessie/updates InRelease
Hit http://archive.debian.org jessie-backports InRelease
Ign http://security.debian.org jessie/updates Release.gpg
Ign http://security.debian.org jessie/updates Release
Ign http://security.debian.org jessie/updates/main amd64 Packages/DiffIndex
Ign http://archive.debian.org jessie-backports InRelease
Ign http://security.debian.org jessie/updates/contrib amd64 Packages/DiffIndex
Ign http://archive.debian.org jessie-backports/main amd64 Packages/DiffIndex
Ign http://security.debian.org jessie/updates/non-free amd64 Packages/DiffIndex
Hit http://archive.debian.org jessie-backports/main Translation-en
Ign http://ftp.us.debian.org jessie InRelease
Err http://archive.debian.org jessie-backports/main amd64 Packages

Hit http://archive.debian.org jessie-backports/main amd64 Packages
Ign http://ftp.us.debian.org jessie Release.gpg
Ign http://ftp.us.debian.org jessie Release
Ign http://ftp.us.debian.org jessie/main amd64 Packages/DiffIndex
Ign http://ftp.us.debian.org jessie/contrib amd64 Packages/DiffIndex
Ign http://ftp.us.debian.org jessie/non-free amd64 Packages/DiffIndex
Ign http://security.debian.org jessie/updates/contrib Translation-en
Ign http://security.debian.org jessie/updates/main Translation-en
Ign http://security.debian.org jessie/updates/non-free Translation-en
Err http://security.debian.org jessie/updates/main amd64 Packages
404 Not Found [IP: 151.101.2.132 80]
Err http://security.debian.org jessie/updates/contrib amd64 Packages
404 Not Found [IP: 151.101.2.132 80]
Err http://security.debian.org jessie/updates/non-free amd64 Packages
404 Not Found [IP: 151.101.2.132 80]
Ign http://ftp.us.debian.org jessie/contrib Translation-en
Ign http://ftp.us.debian.org jessie/main Translation-en
Ign http://ftp.us.debian.org jessie/non-free Translation-en
Err http://ftp.us.debian.org jessie/main amd64 Packages
404 Not Found [IP: 208.80.154.139 80]
Err http://ftp.us.debian.org jessie/contrib amd64 Packages
404 Not Found [IP: 208.80.154.139 80]
Err http://ftp.us.debian.org jessie/non-free amd64 Packages
404 Not Found [IP: 208.80.154.139 80]
W: GPG error: http://archive.debian.org jessie-backports InRelease: The following signatures were invalid: KEYEXPIRED 1587841717 KEYEXPIRED 1668891673
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages 404 Not Found [IP: 151.101.2.132 80]

W: Failed to fetch http://security.debian.org/dists/jessie/updates/contrib/binary-amd64/Packages 404 Not Found [IP: 151.101.2.132 80]

W: Failed to fetch http://security.debian.org/dists/jessie/updates/non-free/binary-amd64/Packages 404 Not Found [IP: 151.101.2.132 80]

W: Failed to fetch http://ftp.us.debian.org/debian/dists/jessie/main/binary-amd64/Packages 404 Not Found [IP: 208.80.154.139 80]

W: Failed to fetch http://ftp.us.debian.org/debian/dists/jessie/contrib/binary-amd64/Packages 404 Not Found [IP: 208.80.154.139 80]

W: Failed to fetch http://ftp.us.debian.org/debian/dists/jessie/non-free/binary-amd64/Packages 404 Not Found [IP: 208.80.154.139 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
root@syncloud:~# apt install -y dnsutils
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
rblcheck
The following NEW packages will be installed:
dnsutils
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 120 kB of archives.
After this operation, 389 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
dnsutils
E: There are problems and -y was used without --force-yes
root@syncloud:~# nslookup mail.cyon.ch
-bash: nslookup: command not found
root@syncloud:~#

Ah I see, you are on debian jessie, you must have installed Syncloud years ago.

I think your device is mising up to date certificates, can you run this:

awk -v cmd='openssl x509 -noout -subject' '
    /BEGIN/{close(cmd)};{print | cmd}' < /etc/ssl/certs/ca-certificates.crt | grep GlobalSign

My output is here

subject=OU = GlobalSign ECC Root CA - R4, O = GlobalSign, CN = GlobalSign
subject=OU = GlobalSign ECC Root CA - R5, O = GlobalSign, CN = GlobalSign
subject=C = BE, O = GlobalSign nv-sa, OU = Root CA, CN = GlobalSign Root CA
subject=OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign
subject=OU = GlobalSign Root CA - R3, O = GlobalSign, CN = GlobalSign
subject=OU = GlobalSign Root CA - R6, O = GlobalSign, CN = GlobalSign

My output is here

root@syncloud:~# awk -v cmd=‘openssl x509 -noout -subject’ ’

/BEGIN/{close(cmd)};{print | cmd}' < /etc/ssl/certs/ca-certificates.crt | grep GlobalSign

subject= /OU=GlobalSign ECC Root CA - R4/O=GlobalSign/CN=GlobalSign
subject= /OU=GlobalSign ECC Root CA - R5/O=GlobalSign/CN=GlobalSign
subject= /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA
subject= /OU=GlobalSign Root CA - R2/O=GlobalSign/CN=GlobalSign
subject= /OU=GlobalSign Root CA - R3/O=GlobalSign/CN=GlobalSign
root@syncloud:~# My output is here

GlobalSign Root CA - R6

Is missing

Can you run

snap --version
snap list

root@syncloud:~# snap --version
snap 595
snapd 595
series 16
debian 8
kernel 3.16.0-4-amd64
root@syncloud:~# snap list

I have the following hardware from you:

Syncloud S
Order ID 207; 02/06/2020

I realised that an update was still available and executed it.

root@syncloud:~# snap --version
snap 608
snapd 608
series 16
debian 8
kernel 3.16.0-4-amd64
root@syncloud:~# snap list
Name Version Rev Tracking Publisher Notes
collabora 45 45 latest/stable syncloud** -
nextcloud 820 820 latest/stable syncloud** -
platform 2221 2221 latest/stable syncloud** base
users 299 299 latest/stable syncloud** -
root@syncloud:~#