Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email notification about new share #1277

Closed
rezabj opened this issue Sep 6, 2016 · 12 comments
Closed

Email notification about new share #1277

rezabj opened this issue Sep 6, 2016 · 12 comments

Comments

@rezabj
Copy link

rezabj commented Sep 6, 2016

Steps to reproduce

If I share a file or directory, the notification email isn't send. But testing email from admin page work correctly. Other type of notification email (like Activity notification email) work correctly too.

Expected behaviour

Notification "Sharing email (HTML) will be send when I share a file o directory.

Actual behaviour

It doesn't send notification email.

Server configuration

Operating system:
Ubuntu 16.04.1

Web server:
Apache/2.4.18

Database:
Type: mysql
Version: 5.7.13

PHP version:
Version: 7.0.8
Memory Limit: 512.0 MB
Max Execution Time: 3600
Upload max size: 1.0 GB

Nextcloud version: (see Nextcloud admin page)
10.0 (stable)

Updated from an older Nextcloud/ownCloud or fresh install:
Update from ownCloud 9 to nextCloud 9 and then to nextCloud 10.

Where did you install Nextcloud from:
Onpromis. Downloaded from nextcloud.com/install

Signing status:

Signing status

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:

App list

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Enabled:

  • activity: 2.3.2
  • admin_audit: 1.0.0
  • comments: 1.0.0
  • dav: 1.0.0
  • external: 1.2
  • federatedfilesharing: 1.0.1
  • federation: 1.0.1
  • files: 1.5.2
  • files_pdfviewer: 0.8.1
  • files_sharing: 1.0.0
  • files_texteditor: 2.1
  • files_trashbin: 1.0.0
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 15.0.0
  • notifications: 0.3.0
  • password_policy: 1.0.0
  • provisioning_api: 1.0.0
  • serverinfo: 1.1.1
  • survey_client: 0.1.5
  • systemtags: 1.0.2
  • templateeditor: 0.1
  • theming: 1.0.1
  • updatenotification: 1.0.1
  • user_ldap: 1.0.1
  • workflowengine: 1.0.1
    Disabled:
  • encryption
  • files_accesscontrol
  • files_automatedtagging
  • files_external
  • files_retention
  • user_external
  • user_saml

The content of config/config.php:

Config report

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here
(Without the database password, passwordsalt and secret)

{
"system": {
"instanceid": "oc48vrlql87a",
"passwordsalt": "_REMOVED SENSITIVE VALUE",
"secret": "_REMOVED SENSITIVE VALUE
",
"trusted_domains": [
"cloud.xxxx.cz",
"192.168.246.190",
"cloud.xxx.lcl"
],
"datadirectory": "/var/www/html/owncloud/data",
"overwrite.cli.url": "https://cloud.xxxx.cz/owncloud",
"dbtype": "mysql",
"version": "9.1.0.16",
"dbname": "owncloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "_REMOVED SENSITIVE VALUE",
"dbpassword": "_REMOVED SENSITIVE VALUE
",
"logtimezone": "UTC",
"installed": true,
"default_language": "cs_CZ",
"ldapIgnoreNamingRules": false,
"mail_from_address": "cloud",
"mail_smtpmode": "smtp",
"mail_domain": "xxxx.cz",
"mail_smtphost": "vm_mail1.xxx.lcl",
"mail_smtpport": "25",
"theme": "xxxx",
"memcache.local": "\OC\Memcache\APCu",
"loglevel": 3,
"maintenance": false,
"htaccess.RewriteBase": "/owncloud",
"updater.release.channel": "stable",
"ldapProviderFactory": "\OCA\User_LDAP\LDAPProviderFactory",
"trashbin_retention_obligation": "auto, 30"
}
}

Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
ActiveDirectory

LDAP configuration (delete this part if not used)

LDAP config

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

+-------------------------------+--------------------------------------------------------------------------------------------+
| Configuration                 |                                                                                            |
+-------------------------------+--------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                          |
| hasPagedResultSupport         |                                                                                            |
| homeFolderNamingRule          |                                                                                            |
| lastJpegPhotoLookup           | 0                                                                                          |
| ldapAgentName                 | CN=ownCloud srv,OU=SERVICES,OU=Other Accounts,DC=xxx,DC=lcl                                |
| ldapAgentPassword             | ***                                                                                        |
| ldapAttributesForGroupSearch  |                                                                                            |
| ldapAttributesForUserSearch   |                                                                                            |
| ldapBackupHost                | hdc2.xxx.lcl                                                                               |
| ldapBackupPort                | 389                                                                                        |
| ldapBase                      | OU=Xxxx.cz,DC=xxx,DC=lcl                                                                   |
| ldapBaseGroups                | OU=Xxxx.cz,DC=xxx,DC=lcl                                                                   |
| ldapBaseUsers                 | OU=Xxxx.cz,DC=xxx,DC=lcl                                                                   |
| ldapCacheTTL                  | 600                                                                                        |
| ldapConfigurationActive       | 1                                                                                          |
| ldapDynamicGroupMemberURL     |                                                                                            |
| ldapEmailAttribute            | mail                                                                                       |
| ldapExperiencedAdmin          | 1                                                                                          |
| ldapExpertUUIDGroupAttr       |                                                                                            |
| ldapExpertUUIDUserAttr        |                                                                                            |
| ldapExpertUsernameAttr        |                                                                                            |
| ldapGroupDisplayName          | cn                                                                                         |
| ldapGroupFilter               |                                                                                            |
| ldapGroupFilterGroups         |                                                                                            |
| ldapGroupFilterMode           | 0                                                                                          |
| ldapGroupFilterObjectclass    |                                                                                            |
| ldapGroupMemberAssocAttr      | member                                                                                     |
| ldapHost                      | hdc1.xxx.lcl                                                                               |
| ldapIgnoreNamingRules         |                                                                                            |
| ldapLoginFilter               | (&(&(|(objectclass=user)))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid)))) |
| ldapLoginFilterAttributes     |                                                                                            |
| ldapLoginFilterEmail          | 1                                                                                          |
| ldapLoginFilterMode           | 0                                                                                          |
| ldapLoginFilterUsername       | 1                                                                                          |
| ldapNestedGroups              | 0                                                                                          |
| ldapOverrideMainServer        |                                                                                            |
| ldapPagingSize                | 500                                                                                        |
| ldapPort                      | 389                                                                                        |
| ldapQuotaAttribute            |                                                                                            |
| ldapQuotaDefault              |                                                                                            |
| ldapTLS                       | 0                                                                                          |
| ldapUserDisplayName           | displayname                                                                                |
| ldapUserDisplayName2          | description                                                                                |
| ldapUserFilter                | (&(|(objectclass=user)))                                                                   |
| ldapUserFilterGroups          |                                                                                            |
| ldapUserFilterMode            | 0                                                                                          |
| ldapUserFilterObjectclass     | user                                                                                       |
| ldapUuidGroupAttribute        | auto                                                                                       |
| ldapUuidUserAttribute         | auto                                                                                       |
| turnOffCertCheck              | 0                                                                                          |
| useMemberOfToDetectMembership | 1                                                                                          |
+-------------------------------+--------------------------------------------------------------------------------------------+


Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

+-----------+-----------------------------------+--------------------------------------------------------------------------------------------+
| appid | configkey | configvalue |
+-----------+-----------------------------------+--------------------------------------------------------------------------------------------+
| user_ldap | cleanUpJobOffset | 250 |
| user_ldap | enabled | yes |
| user_ldap | has_memberof_filter_support | 1 |
| user_ldap | home_folder_naming_rule | |
| user_ldap | installed_version | 1.0.1 |
| user_ldap | last_jpegPhoto_lookup | 0 |
| user_ldap | ldap_agent_password | *** |
| user_ldap | ldap_attributes_for_group_search | |
| user_ldap | ldap_attributes_for_user_search | |
| user_ldap | ldap_backup_host | hdc2.xxx.lcl |
| user_ldap | ldap_backup_port | 389 |
| user_ldap | ldap_base | OU=Xxxx.cz,DC=xxx,DC=lcl |
| user_ldap | ldap_base_groups | OU=Xxxx.cz,DC=xxx,DC=lcl |
| user_ldap | ldap_base_users | OU=Xxxx.cz,DC=xxx,DC=lcl |
| user_ldap | ldap_cache_ttl | 600 |
| user_ldap | ldap_configuration_active | 1 |
| user_ldap | ldap_display_name | displayname |
| user_ldap | ldap_dn | CN=ownCloud srv,OU=SERVICES,OU=Other Accounts,DC=xxx,DC=lcl |
| user_ldap | ldap_dynamic_group_member_url | |
| user_ldap | ldap_email_attr | mail |
| user_ldap | ldap_experienced_admin | 1 |
| user_ldap | ldap_expert_username_attr | |
| user_ldap | ldap_expert_uuid_group_attr | |
| user_ldap | ldap_expert_uuid_user_attr | |
| user_ldap | ldap_group_display_name | cn |
| user_ldap | ldap_group_filter | |
| user_ldap | ldap_group_filter_mode | 0 |
| user_ldap | ldap_group_member_assoc_attribute | member |
| user_ldap | ldap_groupfilter_groups | |
| user_ldap | ldap_groupfilter_objectclass | |
| user_ldap | ldap_host | hdc1.xxx.lcl |
| user_ldap | ldap_login_filter | (&(&(|(objectclass=user)))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid)))) |
| user_ldap | ldap_login_filter_mode | 0 |
| user_ldap | ldap_loginfilter_attributes | |
| user_ldap | ldap_loginfilter_email | 1 |
| user_ldap | ldap_loginfilter_username | 1 |
| user_ldap | ldap_nested_groups | 0 |
| user_ldap | ldap_override_main_server | |
| user_ldap | ldap_paging_size | 500 |
| user_ldap | ldap_port | 389 |
| user_ldap | ldap_quota_attr | |
| user_ldap | ldap_quota_def | |
| user_ldap | ldap_tls | 0 |
| user_ldap | ldap_turn_off_cert_check | 0 |
| user_ldap | ldap_user_display_name_2 | description |
| user_ldap | ldap_user_filter_mode | 0 |
| user_ldap | ldap_userfilter_groups | |
| user_ldap | ldap_userfilter_objectclass | user |
| user_ldap | ldap_userlist_filter | (&(|(objectclass=user))) |
| user_ldap | types | authentication |
| user_ldap | use_memberof_to_detect_membership | 1 |
+-----------+-----------------------------------+--------------------------------------------------------------------------------------------+

### Client configuration

Browser:
Last chrome / IE
Operating system:
Windows 7/8/8.1/10

Logs

Web server error log

Web server error log

Insert your webserver log here
#### Nextcloud log (data/nextcloud.log)

Nextcloud log

Insert your Nextcloud log here

{"reqId":"gkHNRT0xA15oocRwD0RU","remoteAddr":"xxx.xxx.xxx.xxx","app":"index","message":"Exception: {"Exception":"Symfony\Component\Routing\Exception\MissingMandatoryParametersException","Message":"Some mandatory parameters are missing (\"fileid\") to generate a URL for route \"files.viewcontroller.showFile\".","Code":0,"Trace":"#0 \/var\/www\/html\/owncloud\/3rdparty\/symfony\/routing\/Generator\/UrlGenerator.php(136): Symfony\Component\Routing\Generator\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'files.viewcontr...', 1, Array, Array)\n#1 \/var\/www\/html\/owncloud\/lib\/private\/Route\/Router.php(333): Symfony\Component\Routing\Generator\UrlGenerator->generate('files.viewcontr...', Array, 1)\n#2 \/var\/www\/html\/owncloud\/lib\/private\/Route\/CachingRouter.php(60): OC\Route\Router->generate('files.viewcontr...', Array, false)\n#3 \/var\/www\/html\/owncloud\/lib\/private\/URLGenerator.php(69): OC\Route\CachingRouter->generate('files.viewcontr...', Array)\n#4 \/var\/www\/html\/owncloud\/lib\/private\/URLGenerator.php(82): OC\URLGenerator->linkToRoute('files.viewcontr...', Array)\n#5 \/var\/www\/html\/owncloud\/lib\/private\/Share\/MailNotifications.php(126): OC\URLGenerator->linkToRouteAbsolute('files.viewcontr...', Array)\n#6 \/var\/www\/html\/owncloud\/core\/ajax\/share.php(77): OC\Share\MailNotifications->sendInternalShareMail(Array, '9914', 'folder')\n#7 \/var\/www\/html\/owncloud\/lib\/private\/Route\/Route.php(155) : runtime-created function(1): require_once('\/var\/www\/html\/o...')\n#8 [internal function]: __lambda_func()\n#9 \/var\/www\/html\/owncloud\/lib\/private\/Route\/Router.php(293): call_user_func('\x00lambda_1010', Array)\n#10 \/var\/www\/html\/owncloud\/lib\/base.php(967): OC\Route\Router->match('\/core\/ajax\/shar...')\n#11 \/var\/www\/html\/owncloud\/index.php(48): OC::handleRequest()\n#12 {main}","File":"\/var\/www\/html\/owncloud\/3rdparty\/symfony\/routing\/Generator\/UrlGenerator.php","Line":165}","level":3,"time":"2016-09-06T07:23:43+00:00","method":"POST","url":"/owncloud/index.php/core/ajax/share.php","user":"xxxxxxxx-xxxx-xxxx-xxxx-49433F05F065"}

#### Browser log

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@hkocam
Copy link

hkocam commented Sep 9, 2016

same here

@darthkhamul
Copy link

Same here using Centos 7 with packaged apache and php7.

@Stet3112
Copy link

same here

@nickvergessen
Copy link
Member

The checkbox gets a 302, because core/ajax/share.php does not exist anymore.
@rullzer does the notification endpoint exist anywhere else already?

@rullzer
Copy link
Member

rullzer commented Sep 13, 2016

I tought we covered everything. Let me dive into this.

@nickvergessen
Copy link
Member

Stable10 fix is in #1394

@rezabj
Copy link
Author

rezabj commented Sep 13, 2016

Works well. Thx.

@darthkhamul
Copy link

Here too. Thanks.

@Stet3112
Copy link

Works. Thank you very much

@rullzer
Copy link
Member

rullzer commented Sep 13, 2016

#1394 is in for stable10.
I'll make sure we'll fix it properly for NC11 as well

@nickvergessen
Copy link
Member

The email feature was removed with #657
So I guess we can close this @schiessle

@rullzer
Copy link
Member

rullzer commented Nov 3, 2016

Agreed.

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

No branches or pull requests

7 participants