Nextcloud mail app deactivated

I rebooted my nethserver after I saw that it was updated to latest version. Now I realize that nextcloud mail app is deactivated. Tried to update it within nextcloud, but it does not start. Is this a known issue? How can I fix this?

Why it is disabled after the upgrade:

Release notes 7 — NethServer 7 Final
To prevent errors during Nextcloud upgrades, the mail and theming have been disabled. After each upgrade, both applications should be manually updated and re-enabled by accessing Nextcloud administration interface.

On Nextcloud, did the mail app update successfully? After the mail app update did you re-enabled it?

Not related to your problem, but you might also want to check:

New installations of Nextcloud honor the StartTLS setting of the Active Directory accounts provider. As old installations ignore that setting and always send clear-text passwords, it is recommended to upgrade them to the new behavior. Make sure the remote AD accounts provider supports StartTLS, then run the following commands

config setprop nextcloud HonorAdStartTls enabled
signal-event nethserver-sssd-save

First attempt to update it within nextcloud lead to nextcloud remaining in maintenance mode. After that checked and aparently it was updated. But it cannot be enabled.

What is it with the mailapp. Why was it deactivated? What’s needed to re-enable it? Installed is version 1.7.2 and trying to activate there is an error: An error happened during request… cannot continue… I also tried removing it and re-installing it without success. Same error.

Thanks for the pointer on StartTLS. Enabled it, and checked that login still works.

As our users use nextcloud mail as webmail client, I would be glad to know how I can reactivate the nextcloud mail app.

Any error on nextcloud.log when reactivating the app?
Have you tried from occ command line?

Did not see any error, but cannot afford to check now that everyone is working. I can try tonight. What would be the correct occ command? And what log to check? There is no log in /var/log, only found one in /var/lib/nethserver/nextcloud/nextcloud.log is that the correct one to check? I’ll report back if you could provide me the correct occ command, but as said, will have to try that later in the evening.

The log you point out is the correct one.

Command would be:

sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ app:enable mail

Possible error (like @giacomo found out):

Oct 27 10:33:08 nethservice esmith::event[26939]: Update app mail from appstore
Oct 27 10:33:23 nethservice esmith::event[26939]: An unhandled exception has been thrown:
Oct 27 10:33:23 nethservice esmith::event[26939]: Error: Class 'OCA\Mail\AppInfo\BootstrapSingleton' not found in /usr/share/nextcloud/apps/mail/lib/AppInfo/Application.php:
35
Oct 27 10:33:23 nethservice esmith::event[26939]: Stack trace:
(...)

Nextcloud mail app issue to track on github (pointed by @giacomo):

No proper fix at the time of writing but a possible workaround manipulating the database:

DELETE FROM oc_mail_coll_addresses
you’ll lose collected sender addresses, though

1 Like

Trying with the occ command I get:

An unhandled exception has been thrown:
Error: Class ‘Horde_Mail_Rfc822_Address’ not found in /usr/share/nextcloud/apps/mail/lib/Migration/FixCollectedAddresses.php:72
Stack trace:
#0 /usr/share/nextcloud/apps/mail/lib/Migration/FixCollectedAddresses.php(56): OCA\Mail\Migration\FixCollectedAddresses->fixAddress(Object(OCA\Mail\Db\CollectedAddress), Object(OC\Repair))
#1 /usr/share/nextcloud/lib/private/Repair.php(106): OCA\Mail\Migration\FixCollectedAddresses->run(Object(OC\Repair))
#2 /usr/share/nextcloud/lib/private/legacy/OC_App.php(1042): OC\Repair->run()
#3 /usr/share/nextcloud/lib/private/Installer.php(160): OC_App::executeRepairSteps(‘mail’, Array)
#4 /usr/share/nextcloud/core/Command/App/Enable.php(123): OC\Installer->installApp(‘mail’, false)
#5 /usr/share/nextcloud/core/Command/App/Enable.php(93): OC\Core\Command\App\Enable->enableApp(‘mail’, Array, false, Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /usr/share/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\App\Enable->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /usr/share/nextcloud/3rdparty/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /usr/share/nextcloud/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\App\Enable), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /usr/share/nextcloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /usr/share/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /usr/share/nextcloud/console.php(100): OC\Console\Application->run()
#12 /usr/share/nextcloud/occ(11): require_once(’/usr/share/next…’)

This is not the same error pointed by @giacomo right? Should I still try the mentioned workaround, or does this nothing have to do with this?

Solved by
Login from console to
mysql -u nextcloud -p
Password from
/var/lib/nethserver/secrets/nextcloud

then use nextcloud;
DELETE FROM oc_mail_coll_addresses;

Solution found here by google:

4 Likes

I found mail app deactivated today and it could not be activated in webinterface by admin login. This time dnutan’s post was helpful, as activating with occ command was successfull. Thanks :+1:

2 Likes