No Email Notification

Hi,
I made a fresh install of Owncloud 10.5.0.10. I configured smtp-Email in the settings (Test Email works). Then i activated the activity app and configured a Cron job (* * * * * /usr/bin/php -f /var/www/owncloud/cron.php).
Unfortunately i don’t get Email-Notifications. In /var/log/syslog i see that Cron has no MTA (Logs Entries at the end of the text)
Is an additional configuration necessary here?
I thought the activity-app is using the Email-Settings from Owncloud. Ist that right?
Thanks for help.

Server configuration

Operating system: Ubuntu:** 18.04.5 LTS

Web server: Apache/2.4.29

Database: 10.1.47-MariaDB

PHP version: PHP 7.2.24

ownCloud version: 10.5.0.10

Updated from an older ownCloud or fresh install: fresh install

Signing status (ownCloud 9.0 and above):
No errors have been found.

List of activated apps:

  • activity: 2.6.0
  • comments: 0.3.0
  • configreport: 0.2.0
  • dav: 0.6.0
  • federatedfilesharing: 0.5.0
  • federation: 0.1.0
  • files: 1.5.2
  • files_external: 0.7.1
  • files_mediaviewer: 1.0.3
  • files_sharing: 0.13.0
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • firstrunwizard: 1.2.0
  • market: 0.6.0
  • notifications: 0.5.2
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • updatenotification: 0.2.1
  • user_ldap: 0.15.2

Logs

Syslog

CRON[2878]: (www-data) CMD (/usr/bin/php -f /var/www/owncloud/cron.php)
CRON[2877]: (CRON) info (No MTA installed, discarding output)

Hi fraundichris,

I entered “email” into the forum’s search box and found this result:

Is this helpful for you?
Is the user’s email address set, where you are expecting notifications?
Are there errors in the owncloud.log?

You can ignore the No MTA installed message, this is from the cron daemon itself and not required for owncloud.

Yes, the email address is set.
I created a new user und get the email for setting the password. Then i set the notification setting at activity.
I have also activated the option “Notify me of your own activities via email”.
But I don’t get an email.
In the owncloud.log are no erros.
Is it normal for this log to be very confusing?
I don’t see any date or time and there are no breaks.

If this happens that means the command cron tried to run exited with an error code, I recommend running the command manually and you will find that…

This is old. The file cron.php has been deprecated since 10.3.0. Use the occ command system:cron instead. Read about it in the documentation:
https://doc.owncloud.com/server/admin_manual/configuration/server/background_jobs_configuration.html
https://doc.owncloud.com/server/admin_manual/release_notes.html#changes-to-background-job-execution

2 Likes

Thanks for this information. I changed it.
Problem still exist.

Is your cron job properly executing? Is it being shown as executed in the WebUI?

Please also note that activity app settings are user settings (sensible defaults, mostly no mail notifications). Additionally, by default, you won’t be notified about your own actions.

My solution was. https://doc.owncloud.com/server/admin_manual/configuration/server/background_jobs_configuration.html#maintenance-commands

I set this in crontab:
“* * * * * /usr/bin/php /path/to/your/owncloud/occ system:cron”

Now the Notification works.

Many thanks!

1 Like

I think I was too quick with the success message.

I received one email with the notifications.
If I upload / delete something now, there is no notification.

In the settings is set E_Mails send to “As soon as possible”

Make sure that you have the setting set that you will be notified about your own actions.
Double check about what you will receive emails.

Obviously they can only be sent once the cronjob runs, so it depends on how often you run your cronjob.
But if you have set to what you pasted it should be executed once every minute.

Finally there is an activity message queue table (select * from oc_activity_mq;), perhaps check whether your actions are being shown in there.

I found out that there is a delay of 5-15 minutes when sending the email.
When i make a change and look in the table ( select * from oc_activity_mq;) ther is one entry.

Is the delay in sending or receiving? Because receiving emails between untrusted systems can easily take 5-15 minutes.

1 Like

In receiving. Ok Thanks, then I’ll leave it at that.

1 Like

You could try to increase the trust level of the ownCloud server by including it in SPF records.

If you have administrative access to the mail server you could also whitelist your ownCloud server and make it therefore trusted. Alternatively you can try and ask your mail provider.

1 Like