Cannot enable Mail module

Nextcloud version _20.0.2
Operating system and version : NethServer 7.9.2009
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.6
PHP version (eg, 7.1): 7.3.11

Mail module version: 1.7.2

Hi - I am unable to enable the Mail module. It was running but was disabled in an upgrade.

When enabling it, I get a ’ An error occured during the request. Unable to proceed.’ Which is helpful.

Is this the first time you’ve seen this error? (Y/N): Have not been able to enable for a few days since upgrade

Steps to replicate it:

  1. click enable.
  2. Wait

The output of your Nextcloud log in Admin > Logging:

[index] Error: Exception: Class 'Horde_Mail_Rfc822_Address' not found at <<closure>>

0. /usr/share/nextcloud/lib/private/AppFramework/App.php line 152
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings\Con ... {}, "enableApps")
1. /usr/share/nextcloud/lib/private/Route/Router.php line 308
   OC\AppFramework\App::main("OCA\\Settings\\ ... r", "enableApps", OC\AppFramework\ ... {}, {action: null,_r ... "})
2. /usr/share/nextcloud/lib/base.php line 1008
   OC\Route\Router->match("/settings/apps/enable")
3. /usr/share/nextcloud/index.php line 37
   OC::handleRequest()

POST /index.php/settings/apps/enable
from 10.0.0.179 by 9F148BB1-11EC-453B-9BE3-A330C5E408DA at 2020-12-07T22:40:31+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'datadirectory' => '/var/lib/nethserver/nextcloud/data',
  'overwrite.cli.url' => 'https://cloud.rnet.duckdns.org',
  'dbtype' => 'mysql',
  'version' => '20.0.2.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'overwriteprotocol' => 'https',
  'loglevel' => 3,
  'defaultapp' => 'mail',
  'theme' => '',
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'no-reply',
  'mail_domain' => 'rnet.duckdns.org',
  'session_lifetime' => 3600,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'logfile' => '/var/lib/nethserver/nextcloud/nextcloud.log',
  'mail_smtpsecure' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'app_install_overwrite' => 
  array (
    0 => 'tasks',
    1 => 'cookbook',
  ),
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'server.rnet.duckdns.org',
    2 => '10.0.0.2',
    3 => '10.0.1.2',
    4 => 'cloud.rnet.duckdns.org',
    5 => 'cloud.robertson.net.nz',
  ),
);

The output of your Apache/nginx/system log in /var/log/____: No errors generated

searching the forum for Horde_Mail_Rfc822_Address

in the end got me to that issue on GH:

read closely through it as there are some hints given of how to solve the problem.

Thanks - I searched but did not find that. Had been having trouble with something else so didn’t search thoroughly enough I guess.

Cheers.

1 Like

it’s all good… I’m just mentioning how I found a possible solution :wink:

Hope it’ll get you further.

Seems to have done the trick. Also, re-populated the table and got the collected addresses back :slight_smile:

1 Like

Well, was fixed. now not. Is this going to be a regular thing?

Apparently yes.

Got any proof for this?

Well, back again. Open Nextcloud. Hmm, where’s my mail app? go to apps. Oh - it has been disabled and there is an update. Click update. wait. wait. nothing. Button becomes active. click again. Error message. An error has occurred. Informative.

Open the log page in new tab. Go back hit reload then upgrade. No log entry. App upgrades. click enable. nothing. reload. click upgrade again. finally upgrades.

wonder what the … what it was I was trying to do in the first place.