Test mail works <> Mail notifications don't work

Dear all,

I have to support a Nextcloud environment which was implemented and maintained (so far) by someone else. Moreover I’m nearly completely new to Nextcloud… .

Our setup:
Nextcloud 21.0.4 (running on CentOS 7 (64-bit))
PHP 7.3.20

Config.php:

<?php
$CONFIG = array (
  'instanceid' => '***********',
  'passwordsalt' => '***********',
  'secret' => '***********',
  'has_internet_connection' => false,
  'simpleSignUpLink.shown' => false,
  'trusted_domains' =>
  array (
    0 => 'DNSname',
    1 => 'Hostname',
    2 => 'IP',
  ),
  'skeletondirectory' => '/NextData/data/skeleton',
  'share_folder' => '/Shares',
  'auth.bruteforce.protection.enabled' => false,
  'debug' => false,
  'datadirectory' => '/NextData/data',
  'dbtype' => 'mysql',
  'version' => '21.0.4.1',
  'overwrite.cli.url' => 'http://DNSname',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '***********',
  'dbpassword' => '***********',
  'installed' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => ***********,
  ),
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'mysql.utf8mb4' => true,
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
    0 => 'admin',
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'mail_from_address' => '***********',
  'mail_domain' => '***********',
  'mail_smtphost' => 'our mail relay',
  'mail_smtpport' => '25',
  'updater.release.channel' => 'stable',
  'default_phone_region' => 'DE',
);

Issue:
The test mail, which can be triggered in “Administration > Basic settings > Email server”, works flawlessly! I receive the test message immediately. However notification mails (if someone uploads a file or changes a file) aren’t sent. On our mail relay I only see the triggered test mails but no notification mails at all. So it looks like that these notification mails aren’t triggered.
Maybe some kind of mechanism, which checks for changes (and therefore triggers notification mails) doesn’t work?

Circumstances:
At some point of time the notification mails stopped working. As I wasn’t responsible for the system back then, I cannot say if something was changed. The only thing I know: this issue exists for at least 3 months. I saw that there was a fix for notifications in 21.0.4. Therefore we upgraded our Nextcloud server from 21.0.2 to 21.0.4. Unfortunately it didn’t get fixed.

Does anybody know what/where to check?
Is there any specific log regarding “notifications” which we can analyze for errors?

Thank you very much!

Do you have the server set up to run the cronjob?
Look in Settings --> Administration --> Basic settings --> Background jobs to see if the job ran recently and make sure that you have it set to cron, and in the admin manual, you can see that it recommends a line in the apache user’s (not root or some other user!!!) crontab to the effect of */5 * * * * php -f /path/to/ncroot/cron.php

Hello Larry,

Thank you for your answer. Yes, we are using “Cron” as background job:
image

Here is some more info:
image

Has anyone else any idea?

I observed the same issue which is described here:

We also fixed it on database level. Although the checkbox stays “enabled” now, there are no notification emails :frowning:

image

Same issue here, the notification used to work reliably when set up initially about 4 months ago and I was quite happy with it. I used it for newsletter notifications.
But with the last two versions it doesn’t work anymore. Looks like it does not make sense to wait for yet another firmware update.
Does anyone know where to offload this bug, so that development will get to know about it?

We have to offload it at Github:

O.k. I will try.
By the way, the test mail is sent as well as the daily report mail, so I am sure that the email settings are alright. Just the favorites notification isn’t sending any mails.
And my sys admin has assured me that the cron job is executed cyclically.

Stupid question: do you have all email notifications actives into “activity”?

There is no such thing as a stupid question, there are only stupid answers!

I have selected email notification under “Settings/Activities/Notifications” at

  • “A file or folder has changed”
  • “A file has been added or removed from your favorites”

I also have selected “Send daily activity summary in the morning”, which works; I do receive this daily mail correctly. Also, I receive the test mail which I can initiate under “Basic Settings”.

I have the same issue since I updated to Nextcloud 21 on my Univention server.
Even the yesterday’s update to 21.0.7 did not solve the problem.