Setting up General Email (IMAP, SMTP) fails

I also was having hard time adding general email accounts. It seems the correct way was to add them and then do a reboot/shut down. Only after that they synced with no problem.

Account creation should be more verbose in my opinion.

I agree with this. An explicit ‘Accept’ would make it easier. Also a dedicated action “Renew credentials” in the pulley menu would help.

A reboot should not be necessary. After tapping ‘Accept’ the last time, you should see momentarily this: “General email: Setting up account….” at the Settings > Accounts page (where all existing accounts are listed).

Yes, it should work like you said.

I guess i recalled the earlier wrong: after creating the account, it tries to check credentials (“Tarkistetaan kirjautumistietoja” in Finnish), then it says they’re wrong, and the account is not created (not giving even the “Accept” tap option). Then after a reboot the account is added right, and can be accepted. I don’t know what is going wrong, but this has been an issue since i was using Jolla 1 (up until 2020 or so).

It’s possible i am doing something wrong. I should look further into this.

Some of us occasionally never get that far. Unfortunately, the conditions which lead to this dysfunction have never been fully discovered, let alone documented. I understand that it never happened at Jolla in the QA process, and “there’s something wrong with General Email accounts in SFOS” is not the nicest bug report I can think of … but regardless, it is at least annoying and made some of us think IMAP/SMTP accounts would be entirely unsupported. “It worked OK back in SFOS 1” doesn’t help those who joined later.

What can be done? Maybe this:

  1. Ensure that the basics are right - credentials and the settings required by the service provider.
  2. Collect logs (some guidance here) when trying to sign in to the account.

Just another data point from a freshly installed Xperia XA2 (4.4.0.72):

  • Setting up an e-mail account fails in the way described in this bug report (timeout, no network activity on device or server)
  • Installing jolla-settings-accounts-extensions-email-crypto did not make any difference
  • Letting the account set-up run into the timeout, then reboot did work and successfully added the account

(so I now only have to deal with the incredible slowness of the e-mail client which was already a major nuisance on the Jolla and the Xperia X’s I have/had :roll_eyes:)

Tried again to set up an account with my own domain name using infomaniak as provider and using a SSL connection with both SMTP and IMAP server and I get a Connection timeout.

I tried to monitor the traffic with the command netstat -tupce and nothing changed. Seems messageserver5 never connects to the Internet…

Here some logs:

Jun 14 09:52:25 Xperia10II-DualSIM estart[4627]: [D] unknown:0 - Messaging :  opening database                                                                              
Jun 14 09:52:25 Xperia10II-DualSIM systemd[3507]: selinux: Unknown permission status for class system                                                                       
Jun 14 09:52:25 Xperia10II-DualSIM systemd[3507]: selinux: Unknown class service                                                                                            
Jun 14 09:52:25 Xperia10II-DualSIM systemd[3507]: selinux: Unknown class service                                                                                            
Jun 14 09:52:25 Xperia10II-DualSIM systemd[3507]: Started messageserver5.                                                                                                   
Jun 14 09:52:26 Xperia10II-DualSIM invoker[4593]: WARNING: requestActivate() called for  QQuickView(0x32ed3a60)  which has Qt::WindowDoesNotAcceptFocus set.                
Jun 14 09:53:02 Xperia10II-DualSIM rmt_storage:INFO:rmt_storage_rw_iovec_cb: Write iovec request received for /boot/modem_fs2
Jun 14 09:53:02 Xperia10II-DualSIM rmt_storage:INFO:rmt_storage_client_thread: Calling Write [offset=0, size=2097152]for /boot/modem_fs2!
Jun 14 09:53:02 Xperia10II-DualSIM rmt_storage:INFO:rmt_storage_client_thread: Done Write (bytes = 2097152) for /boot/modem_fs2!
Jun 14 09:54:42 Xperia10II-DualSIM dbus-daemon[3524]: dbus-daemon[3524]: [session uid=100000 pid=3524] Activating service name='com.google.code.AccountsSSO.SingleSignOn' re
quested by ':1.70' (uid=100000 pid=5384 comm="/usr/libexec/buteo-oopp-runner caldav caldav-sync-" label="u:r:kernel:s0")
Jun 14 09:54:42 Xperia10II-DualSIM dbus-daemon[3524]: dbus-daemon[3524]: [session uid=100000 pid=3524] Successfully activated service 'com.google.code.AccountsSSO.SingleSig
nOn'
Jun 14 09:54:43 Xperia10II-DualSIM buteo-oopp-runner[5384]: [W] unknown:0 - "PROPFIND" request failed. Buteo::SyncResults::MinorCode(INTERNAL_ERROR) "Cannot parse response 
body for PROPFIND"
Jun 14 09:54:43 Xperia10II-DualSIM buteo-oopp-runner[5384]: [W] unknown:0 - Cannot find the calendar root for this user, guess it from account.
Jun 14 09:54:45 Xperia10II-DualSIM dbus-daemon[3524]: dbus-daemon[3524]: [session uid=100000 pid=3524] Activating service name='org.nemomobile.calendardataservice' requeste
d by ':1.22' (uid=100000 pid=3903 comm="/usr/bin/lipstick -plugin evdevtouch -plugin evdev" label="u:r:kernel:s0")
Jun 14 09:54:45 Xperia10II-DualSIM dbus-daemon[3524]: dbus-daemon[3524]: [session uid=100000 pid=3524] Successfully activated service 'org.nemomobile.calendardataservice'
Jun 14 09:54:45 Xperia10II-DualSIM calendardataservice[5409]: [D] unknown:0 - Messaging :  opening database
Jun 14 09:54:45 Xperia10II-DualSIM calendardataservice[5409]: [D] unknown:0 - Default plugin: account "48" do not have a valid email address
Jun 14 09:54:45 Xperia10II-DualSIM calendardataservice[5409]: [W] unknown:0 - Default account was not found!
Jun 14 09:54:45 Xperia10II-DualSIM calendardataservice[5409]: [D] unknown:0 - Default plugin: account "8" do not have a valid email address
Jun 14 09:54:46 Xperia10II-DualSIM calendardataservice[5409]: [W] unknown:0 - No transactionId, discarding results
Jun 14 09:54:47 Xperia10II-DualSIM calendardataservice[5409]: [D] unknown:0 - Default plugin: account "48" do not have a valid email address
Jun 14 09:54:47 Xperia10II-DualSIM calendardataservice[5409]: [D] unknown:0 - Default plugin: account "8" do not have a valid email address
Jun 14 09:54:47 Xperia10II-DualSIM calendardataservice[5409]: [W] unknown:0 - No transactionId, discarding results
Jun 14 09:55:26 Xperia10II-DualSIM estart[4627]: [W] unknown:293 - file:///usr/share/accounts/ui/email.qml:293:9: QML EmailBusyPage: Binding loop detected for property "sta
tus"
Jun 14 09:56:09 Xperia10II-DualSIM dbus-daemon[3524]: dbus-daemon[3524]: [session uid=100000 pid=3524] Activating service name='com.google.code.AccountsSSO.SingleSignOn' re
quested by ':1.34' (uid=100000 pid=4627 comm="booster [silica-qt5]                             " label="u:r:kernel:s0")
Jun 14 09:56:09 Xperia10II-DualSIM dbus-daemon[3524]: dbus-daemon[3524]: [session uid=100000 pid=3524] Successfully activated service 'com.google.code.AccountsSSO.SingleSig
nOn'
Jun 14 09:56:09 Xperia10II-DualSIM estart[4627]: [W] unknown:0 - writeProfileFile() called, forcing disk write: "/home/defaultuser/.local/share/system/privileged/msyncd/syn
c/syncemail-53.xml"
Jun 14 09:56:09 Xperia10II-DualSIM invoker[5262]: terminate called after throwing an instance of 'std::bad_alloc'
Jun 14 09:56:09 Xperia10II-DualSIM invoker[5262]:   what():  std::bad_alloc
Jun 14 09:56:09 Xperia10II-DualSIM booster-qt5[3522]: *** signal=17 pid=3522
Jun 14 09:56:09 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-qt5[3522]: warning: boosted process (pid=5092) signal(Aborted)
Jun 14 09:56:09 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 09:56:09 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-qt5[3522]: warning: Daemon: sending exit(1) to invoker(5262)
Jun 14 09:56:09 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Failed with result 'exit-code'.
Jun 14 09:56:09 Xperia10II-DualSIM invoker[5262]: warning: application (pid=-1) exit(1) signal(0)
Jun 14 09:56:11 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Service hold-off time over, scheduling restart.
Jun 14 09:56:11 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Scheduled restart job, restart counter is at 1.
Jun 14 09:56:11 Xperia10II-DualSIM systemd[3507]: Stopped messageserver5.
Jun 14 09:56:11 Xperia10II-DualSIM systemd[3507]: Starting check accounts for messageserver5...
Jun 14 09:56:11 Xperia10II-DualSIM qmf-accountscheck[5464]: [D] unknown:0 - QMF accounts check: checking email accounts in the system
Jun 14 09:56:11 Xperia10II-DualSIM qmf-accountscheck[5464]: [D] unknown:0 - QMF accounts check: found enabled accounts
Jun 14 09:56:11 Xperia10II-DualSIM booster-generic[3528]: *** signal=17 pid=3528
Jun 14 09:56:11 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-generic[3528]: warning: Daemon: sending exit(0) to invoker(5831)
Jun 14 09:56:11 Xperia10II-DualSIM systemd[3507]: Started check accounts for messageserver5.
Jun 14 09:56:11 Xperia10II-DualSIM systemd[3507]: Started messageserver5.
Jun 14 09:56:11 Xperia10II-DualSIM kernel: binder: 1276:1276 transaction failed 29189/-22, size 32-0 line 3096
Jun 14 09:56:11 Xperia10II-DualSIM booster-qt5[3522]: *** signal=17 pid=3522
Jun 14 09:56:11 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-qt5[3522]: warning: boosted process (pid=5819) signal(Segmentation fault)
Jun 14 09:56:11 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-qt5[3522]: warning: Daemon: sending exit(1) to invoker(5836)
Jun 14 09:56:11 Xperia10II-DualSIM invoker[5836]: warning: application (pid=-1) exit(1) signal(0)
Jun 14 09:56:11 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 09:56:11 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Failed with result 'exit-code'.
Jun 14 09:56:12 Xperia10II-DualSIM kernel: binder: 1276:1276 transaction failed 29189/-22, size 32-0 line 3096
Jun 14 09:56:13 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Service hold-off time over, scheduling restart.
Jun 14 09:56:13 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Scheduled restart job, restart counter is at 2.
Jun 14 09:56:13 Xperia10II-DualSIM systemd[3507]: Stopped messageserver5.
Jun 14 09:56:13 Xperia10II-DualSIM systemd[3507]: Starting check accounts for messageserver5...
Jun 14 09:56:13 Xperia10II-DualSIM qmf-accountscheck[5832]: [D] unknown:0 - QMF accounts check: checking email accounts in the system
Jun 14 09:56:13 Xperia10II-DualSIM qmf-accountscheck[5832]: [D] unknown:0 - QMF accounts check: found enabled accounts
Jun 14 09:56:13 Xperia10II-DualSIM booster-generic[3528]: *** signal=17 pid=3528
Jun 14 09:56:13 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-generic[3528]: warning: Daemon: sending exit(0) to invoker(5845)
Jun 14 09:56:13 Xperia10II-DualSIM systemd[3507]: Started check accounts for messageserver5.
Jun 14 09:56:13 Xperia10II-DualSIM systemd[3507]: Started messageserver5.
Jun 14 09:56:13 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-qt5[3522]: warning: boosted process (pid=5837) signal(Segmentation fault)
Jun 14 09:56:13 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 09:56:13 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-qt5[3522]: warning: Daemon: sending exit(1) to invoker(5850)
Jun 14 09:56:13 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Failed with result 'exit-code'.
Jun 14 09:56:13 Xperia10II-DualSIM invoker[5850]: warning: application (pid=-1) exit(1) signal(0)
Jun 14 09:56:15 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Service hold-off time over, scheduling restart.
Jun 14 09:56:15 Xperia10II-DualSIM systemd[3507]: messageserver5.service: Scheduled restart job, restart counter is at 3.
Jun 14 09:56:15 Xperia10II-DualSIM systemd[3507]: Stopped messageserver5.
Jun 14 09:56:15 Xperia10II-DualSIM systemd[3507]: Starting check accounts for messageserver5...
Jun 14 09:56:15 Xperia10II-DualSIM qmf-accountscheck[5846]: [D] unknown:0 - QMF accounts check: checking email accounts in the system
Jun 14 09:56:15 Xperia10II-DualSIM qmf-accountscheck[5846]: [D] unknown:0 - QMF accounts check: found enabled accounts
Jun 14 09:56:15 Xperia10II-DualSIM booster-generic[3528]: *** signal=17 pid=3528
Jun 14 09:56:15 Xperia10II-DualSIM /usr/libexec/mapplauncherd/booster-generic[3528]: warning: Daemon: sending exit(0) to invoker(5861)
Jun 14 09:56:15 Xperia10II-DualSIM systemd[3507]: Started check accounts for messageserver5.
Jun 14 09:56:15 Xperia10II-DualSIM systemd[3507]: Started messageserver5.

Can you retry to create the account, while running the messageserver in debug mode ?

[defaultuser@Sailfish ~]$ systemctl --user stop messageserver5
[defaultuser@Sailfish ~]$ devel-su -p
[defaultuser@Sailfish ~]$ QT_LOGGING_RULES="*.debug=true" messageserver5

It seems that the message server is failing and restarted by systemd from your logs.

After you get the debug log, you can start it again in normal mode with:

[defaultuser@Sailfish ~]$ systemctl --user start messageserver5

I think I did something wrong, after I run devel-su -p I get:

Enjoy your privileges.
bash-5.0$

Then I run:

bash-5.0$ QT_LOGGING_RULES="*.debug=true" messageserver5

And saw nothing. I still get the error Connection timeout.
Running journalctl -f on another window, I saw a lot of message related to the OOM Killer…
And I need to force kill the process.

Nothing wrong done. I just didn’t put the message from running devel-su -p, because they are irrelevant.

About logging from message server, I wrote a mistake, and the proper way to get debug outputs is to edit ~/.config/QtProject/Messageserver.conf.

Here are some errors got with gdb:

(gdb) bt
#0  0x0000007fbebe37ec in raise () from /lib64/libc.so.6
#1  0x0000007fbebccd20 in abort () from /lib64/libc.so.6
#2  0x0000007fbede80f8 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#3  0x0000007fbede5c2c in ?? () from /usr/lib64/libstdc++.so.6
#4  0x0000007fbede5c90 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5  0x0000007fbede5f80 in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6  0x0000007fbefe5a88 in qBadAlloc() () from /usr/lib64/libQt5Core.so.5
#7  0x0000007fbf085c28 in QString::reallocData(unsigned int, bool) () from /usr/lib64/libQt5Core.so.5
#8  0x0000007fbf085cf0 in QString::resize(int) () from /usr/lib64/libQt5Core.so.5
#9  0x0000007fbf085d58 in QString::expand(int) () from /usr/lib64/libQt5Core.so.5
#10 0x0000007fbf08644c in QString::insert(int, QChar) () from /usr/lib64/libQt5Core.so.5
#11 0x0000007fb66b220c in ?? () from /usr/lib64/qt5/plugins/ssoauth/libpasswordplugin.so
#12 0x0000007fb66b236c in ?? () from /usr/lib64/qt5/plugins/ssoauth/libpasswordplugin.so
#13 0x0000007fb66b31a4 in ?? () from /usr/lib64/qt5/plugins/ssoauth/libpasswordplugin.so
#14 0x0000007fb66b4ff8 in ?? () from /usr/lib64/qt5/plugins/ssoauth/libpasswordplugin.so
#15 0x0000007fbfa93de0 in SSOSessionManager::sessionResponse(SignOn::SessionData const&) () from /usr/lib64/libQmfClient.so.5
#16 0x0000007fbf1f8cdc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#17 0x0000007fbe9a9974 in SignOn::AuthSession::response(SignOn::SessionData const&) () from /usr/lib64/libsignon-qt5.so.1
#18 0x0000007fbe99c7d4 in ?? () from /usr/lib64/libsignon-qt5.so.1
#19 0x0000007fbf1f8cdc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#20 0x0000007fbe9aa108 in ?? () from /usr/lib64/libsignon-qt5.so.1
#21 0x0000007fbe9930e8 in ?? () from /usr/lib64/libsignon-qt5.so.1
#22 0x0000007fbf1f8cdc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#23 0x0000007fbf9f27d8 in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) () from /usr/lib64/libQt5DBus.so.5
#24 0x0000007fbf1f98cc in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#25 0x0000007fbf1ccb98 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#26 0x0000007fbf1cefcc in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#27 0x0000007fbf220208 in ?? () from /usr/lib64/libQt5Core.so.5
#28 0x0000007fbe0dc4dc in ?? () from /usr/lib64/libglib-2.0.so.0
#29 0x0000007fbe0df648 in ?? () from /usr/lib64/libglib-2.0.so.0
#30 0x0000007fbe0dfe34 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#31 0x0000007fbf22067c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#32 0x0000007fbf1caf84 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#33 0x0000007fbf1d29e4 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#34 0x0000005555560924 in main ()
1 Like