No email notification #20962

Landver opened this Issue Dec 4, 2015 · 15 comments


None yet

6 participants

Landver commented Dec 4, 2015

Steps to reproduce

  1. Setup "Email server" settings and my profile email, so I succesfully reseive test emails. So Email server is OK
  2. Setup Cron to work not with Ajax, but with cron. My Apache user is name: apache, and in "Admin" panel I see that cron job perform each 15 min as I set before. So cron is OK
  3. Set all possible "V" in notification pannel for my user and some others.
  4. Used different Email servers and different email in my profile
  5. For tests I deleted files, created files, shared files

Expected behaviour

I should receive notifications about changes.

Actual behaviour

But I not receive nothing. Only test emails.

Server configuration

Operating system:
Linux 3.10.0-229.20.1.el7.x86_64 x86_64
CentOS Linux 7 (Core)
Web server:
Server version: Apache/2.4.6 (CentOS)
Server built: Aug 24 2015 18:11:25
5.5.44-MariaDB MariaDB Server
PHP version:
ownCloud version:
ownCloud 8.2.0 (stable)
Updated from an older ownCloud or fresh install:
I uploaded 9 gb files, created users and groups, and had been testing owncloud for 2 weeks. But you can say it's fresh install, because only 3 man test it.
List of activated apps:
sudo -u apache php occ app:list

  • activity: 2.1.3
  • files: 1.2.0
  • files_locking:
  • files_pdfviewer: 0.7
  • files_sharing: 0.7.0
  • files_texteditor: 2.0
  • files_trashbin: 0.7.0
  • files_versions: 1.1.0
  • files_videoviewer: 0.1.3
  • firstrunwizard: 1.1
  • gallery: 14.2.0
  • notifications: 0.1.0
  • provisioning_api: 0.3.0
  • templateeditor: 0.1
  • updater: 0.6


  • encryption
  • external
  • files_external
  • user_external
  • user_ldap

The content of config/config.php:
I don't use in command public option, because: "The "--public" option does not exist. "
sudo -u apache php occ config:list system
"system": {
"instanceid": "oc2oi4887h9v",
"passwordsalt": "_REMOVED SENSITIVE VALUE",
"trusted_domains": [
"datadirectory": "/var/www/html/owncloud/data",
"overwrite.cli.url": "",
"dbtype": "mysql",
"version": "",
"dbname": "clouddb",
"dbhost": "localhost",
"dbtableprefix": "oc
"logtimezone": "UTC",
"installed": true,
"loglevel": 2,
"memcache.local": "\OC\Memcache\APC",
"filelocking.enabled": "true",
"memcache.locking": "\OC\Memcache\APC",
"mail_smtpmode": "smtp",
"mail_from_address": "blablabla",
"mail_domain": "",
"mail_smtphost": "",
"mail_smtpport": "465",
"mail_smtpsecure": "ssl",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtpname": "_REMOVED SENSITIVE VALUE_",
"mail_smtppassword": "_REMOVED SENSITIVE VALUE*"

Are you using external storage, if yes which one: local/smb/sftp/...
I do not use external storage

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Chrome: Version 47.0.2526.73
Operating system:
Windows 7 profesional


Web server error log

cat /var/log/httpd/ssl_error_log
[Thu Dec 03 17:03:00.596397 2015] [autoindex:error] [pid 61867] [client] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive

cat /var/log/httpd/error_log

ownCloud log (data/owncloud.log)

owncloud (1).txt

Abowe is to much info in log, maybe it's easie for you to see log by some key words like:
tail -10000 /var/www/html/owncloud/data/owncloud.log |grep mail
{"reqId":"Vlblc0jDxWJXANWWnm3LMAAAAA8","remoteAddr":"","app":"no app in context","message":"Error while running background job: Connection could not be established with host [Permission denied #13]","level":3,"time":"2015-11-26T10:56:56+00:00"}

or the same entry:
tail -10000 /var/www/html/owncloud/data/owncloud.log |grep background
{"reqId":"Vlblc0jDxWJXANWWnm3LMAAAAA8","remoteAddr":"","app":"no app in context","message":"Error while running background job: Connection could not be established with host [Permission denied #13]","level":3,"time":"2015-11-26T10:56:56+00:00"}

Browser log

I have no idea what I can give you here

@Landver Landver changed the title from No notification to No email notification Dec 4, 2015

The background job is being restricted from sending emails, as your logs show. Please check any security measures such as SELinux, and make sure they are properly configured to allow access to the sendmail binary

Landver commented Dec 5, 2015

That was 1 time during 2 weeks. It does not connected to my problem, that message appear 1 time for 2 weeks, but I test notification 100 times during 2 weeks.
Anyway I set notification each hour. And I don't receive nothing in logs in a time when I should receive email.
Security measure performed as it must be, there are guides in documetation of owncloud: "how to setup Selinux" and firewalld. I used that guides in my installation.
Anyway I tuned off both selinux and firewall for test time, and I still didn't received only notifications.
All test emails I receive perfectly in time

ghost commented Dec 5, 2015

@Landver Are you testing with different users? If not you need to tick the "Notify about your own actions via email" box in your personal settings to get notifications for your own actions.

Landver commented Dec 5, 2015

Yes, I tested with another admin user with another email clients, and another email servers
And I also set all possible "V", the same as "V" on "Notify about your own actions via email"

PVince81 commented Dec 7, 2015

So far this still looks like an environment issue.

@nickvergessen is there any additional info that we look at ?

@Landver you can try manually running your cron: sudo -uwww php cron.php (replace "www" with your web server user). You can also check the mail queue tables and see if something changes: oc_activity_mq

@PVince81 PVince81 added the needs info label Dec 7, 2015
@PVince81 PVince81 added this to the backlog milestone Dec 7, 2015

Other idea: SELECT * FROM oc_jobs and see what the last_run timestamp of the activity cron job is

Landver commented Dec 8, 2015

@PVince81 seems like cron doing his job as I asked him(each 15 min), here is example of log:
/var/log/cron-20151207:2779:Dec 7 03:00:02 localhost CROND[8963]: (apache) CMD (php -f /var/www/html/owncloud/cron.php)
/var/log/cron-20151207:2780:Dec 7 03:00:02 localhost CROND[8964]: (root) CMD (/usr/lib64/sa/sa1 1)
/var/log/cron-20151207:2781:Dec 7 03:01:01 localhost CROND[9281]: (root) CMD (run-parts etc/cron.hourly)
/var/log/cron-20151207:2789:Dec 7 03:10:01 localhost CROND[9683]: (root) CMD (/usr/lib64/sa/sa1 1 1)
/var/log/cron-20151207:2790:Dec 7 03:15:01 localhost CROND[9899]: (apache) CMD (php -f /var/www/html/owncloud/cron.php)
/var/log/cron-20151207:2791:Dec 7 03:20:01 localhost CROND[10250]: (root) CMD (/usr/lib64/sa/sa1 1 1)
/var/log/cron-20151207:2792:Dec 7 03:30:01 localhost CROND[10524]: (root) CMD (/usr/lib64/sa/sa1 1 1)
/var/log/cron-20151207:2793:Dec 7 03:30:01 localhost CROND[10525]: (apache) CMD (php -f /var/www/html/owncloud/cron.php)
/var/log/cron-20151207:2794:Dec 7 03:40:01 localhost CROND[10932]: (root) CMD (/usr/lib64/sa/sa1 1 1)
/var/log/cron-20151207:2795:Dec 7 03:45:01 localhost CROND[11148]: (apache) CMD (php -f /var/www/html/owncloud/cron.php)

At the same time there I see that apache each 15 min send mail, because cron want that, here is example:
/var/log/maillog-20151207:417:Dec 2 14:00:02 localhost postfix/local[59126]: 640F682F7E18: to=root@localhost.localdomain, orig_to=, relay=local, delay=0.27, delays=0.2/0.02/0/0.05, dsn=2.0.0, status=sent (delivered to mailbox)
/var/log/maillog-20151207:422:Dec 2 14:15:02 localhost postfix/local[59960]: 266BB82F7E18: to=root@localhost.localdomain, orig_to=, relay=local, delay=0.23, delays=0.17/0.02/0/0.05, dsn=2.0.0, status=sent (delivered to mailbox)
/var/log/maillog-20151207:427:Dec 2 14:30:03 localhost postfix/local[60945]: 9F044863704B: to=root@localhost.localdomain, orig_to=, relay=local, delay=0.61, delays=0.22/0.06/0/0.33, dsn=2.0.0, status=sent (delivered to mailbox)

But I don't see at all in any logs something about my email, I can't find nothing with key word "". It must be somewhere, because I use that email also as source email in admin panel of ownCloud, and also as my profile email. Here is example of commande that I used:
grep -Hrn 'gmail' /var/log/
That command don't give me output at all.


Other idea: SELECT * FROM oc_jobs and see what the last_run timestamp of the activity cron job is


same problem in Debian server with 8.2.1 (stable).
Users receive only email notifications of share events and NOT on creation, deletion and modification of files and folders.
All tests done like Landver...


In my fresh 8.2.1 installation was missing a " OCA\Activity\BackgroundJob\EmailNotification" record into the oc_jobs table. This record was present in an updated (8.2.1 from 8.0) installation on another server.
I solved the problem with the following query in my db:
insert into oc_jobs (class,argument) values ('OCA\Activity\BackgroundJob\EmailNotification','null');

er47 commented Dec 22, 2015

Thanks paolotws! This solved my problem. I upgraded from 8.2 to 8.2.1 and didn't get any activity emails anymore.


Might be caused by an issue we fixed with #21289 then.
It deleted cron jobs in case an error occured.

ghost commented Feb 23, 2016

@nickvergessen Are deleted background jobs added again after #21289 ?


Not automatically, but all apps readd their jobs on update

ghost commented Feb 24, 2016

Thanks for the info. So 8.2.3 will fix that and will also add the job again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment