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

Shared folder notification via email (external mail) not working #3170

Closed
aventrax opened this issue Jan 19, 2017 · 9 comments
Closed

Shared folder notification via email (external mail) not working #3170

aventrax opened this issue Jan 19, 2017 · 9 comments

Comments

@aventrax
Copy link

Steps to reproduce

  1. Create folder
  2. Share the folder and type an external email address into the box
  3. Click on the auto-completed "email@youinserted.com (email)" and click
  4. A message with just "Error" is shown on the top bar on the center and no email is sent.

Expected behaviour

The email should be sent and no error should be displayed.

Actual behaviour

No email sent and this cryptic message appears.

Server configuration

Operating system: Debian 8.6

Web server: NGINX

Database: MariaDB

PHP version: 5.6

Nextcloud version: 11.0.1

Updated from an older Nextcloud/ownCloud or fresh install: from owncloud 9

Where did you install Nextcloud from: tgz downloaded from ufficial page

Integrity checker has been disabled. Integrity cannot be verified.

List of activated apps:

App list
Enabled:
  - activity: 2.4.1
  - calendar: 1.5.0
  - comments: 1.1.0
  - contacts: 1.5.2
  - dav: 1.1.1
  - federatedfilesharing: 1.1.1
  - files: 1.6.1
  - files_external: 1.1.2
  - files_pdfviewer: 1.0.1
  - files_sharing: 1.1.1
  - files_texteditor: 2.2
  - files_videoplayer: 1.0.0
  - gallery: 16.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - mail: 0.6.2
  - nextcloud_announcements: 1.0
  - notifications: 1.0.1
  - password_policy: 1.1.0
  - provisioning_api: 1.1.0
  - serverinfo: 1.1.1
  - sharebymail: 1.0.1
  - survey_client: 0.1.5
  - systemtags: 1.1.3
  - theming: 1.1.1
  - twofactor_backupcodes: 1.0.0
  - updatenotification: 1.1.1
  - user_ldap: 1.1.1
  - workflowengine: 1.1.1
Disabled:
  - admin_audit
  - encryption
  - external
  - federation
  - files_accesscontrol
  - files_automatedtagging
  - files_retention
  - files_trashbin
  - files_versions
  - firstrunwizard
  - templateeditor
  - user_external
  - user_saml

The content of config/config.php:

Config report
{
    "system": {
        "instanceid": "ocryv1eidw3w",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.domain.com",
            "172.22.11.50"
        ],
        "datadirectory": "\/var\/www\/nextcloud\/data",
        "overwrite.cli.url": "https:\/\/cloud.domain.com",
        "dbtype": "mysql",
        "version": "11.0.1.2",
        "default_language": "en",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Europe\/Rome",
        "installed": true,
        "filesystem_check_changes": 1,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "0": "\/tmp\/redis.sock",
            "port": 6379,
            "timeout": 0,
            "dbindex": 0
        },
        "ldapIgnoreNamingRules": false,
        "loglevel": 5,
        "debug": true,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "PLAIN",
        "maintenance": false,
        "mail_from_address": "cloud",
        "mail_domain": domain.com",
        "mail_smtpauth": 1,
        "mail_smtphost": "mail.domain.com",
        "mail_smtpport": "25",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "updatechecker": false,
        "upgrade.disable-web": false,
        "htaccess.RewriteBase": "\/",
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "appstore.experimental.enabled": true,
        "updater.release.channel": "production",
        "trusted_proxies": [
            "172.22.11.1",
            "172.22.11.2",
            "172.22.11.3"
        ],
        "overwritehost": "cloud.domain.com",
        "overwriteprotocol": "https"
    }
}

Are you using external storage, if yes which one: NO

Are you using encryption: NO

Are you using an external user-backend, if yes which one: LDAP

LDAP configuration (delete this part if not used)

LDAP config
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------                                                        +
| Configuration                 | s01                                                                                                                                                                                                        |
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------                                                        +
| hasMemberOfFilterSupport      | 1                                                                                                                                                                                                          |
| hasPagedResultSupport         |                                                                                                                                                                                                            |
| homeFolderNamingRule          |                                                                                                                                                                                                            |
| lastJpegPhotoLookup           | 0                                                                                                                                                                                                          |
| ldapAgentName                 | ldapqueryuser@myad.local                                                                                                                                                                                 |
| ldapAgentPassword             | ***                                                                                                                                                                                                        |
| ldapAttributesForGroupSearch  |                                                                                                                                                                                                            |
| ldapAttributesForUserSearch   | cn;givenname;sn;sAMAccountName;displayname;mail                                                                                                                                                            |
| ldapBackupHost                |                                                                                                                                                                                                            |
| ldapBackupPort                |                                                                                                                                                                                                            |
| ldapBase                      | DC=myad,DC=local                                                                                                                                                                                         |
| ldapBaseGroups                | DC=myad,DC=local                                                                                                                                                                                         |
| ldapBaseUsers                 | DC=myad,DC=local                                                                                                                                                                                         |
| ldapCacheTTL                  | 15                                                                                                                                                                                                         |
| ldapConfigurationActive       | 1                                                                                                                                                                                                          |
| ldapDynamicGroupMemberURL     |                                                                                                                                                                                                            |
| ldapEmailAttribute            | mail                                                                                                                                                                                                       |
| ldapExperiencedAdmin          | 0                                                                                                                                                                                                          |
| ldapExpertUUIDGroupAttr       |                                                                                                                                                                                                            |
| ldapExpertUUIDUserAttr        |                                                                                                                                                                                                            |
| ldapExpertUsernameAttr        | sAMAccountName                                                                                                                                                                                             |
| ldapGroupDisplayName          | cn                                                                                                                                                                                                         |
| ldapGroupFilter               |                                                                                                                                                                                                            |
| ldapGroupFilterGroups         |                                                                                                                                                                                                            |
| ldapGroupFilterMode           | 0                                                                                                                                                                                                          |
| ldapGroupFilterObjectclass    |                                                                                                                                                                                                            |
| ldapGroupMemberAssocAttr      | member                                                                                                                                                                                                     |
| ldapHost                      | 10.1.1.3                                                                                                                                                                                                   |
| ldapIgnoreNamingRules         |                                                                                                                                                                                                            |
| ldapLoginFilter               | (&(&(memberOf:1.2.840.113556.1.4.1941:=CN=ownCloud,OU=Utenti,DC=myad,DC=local))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))))                                                         |
| ldapLoginFilterAttributes     |                                                                                                                                                                                                            |
| ldapLoginFilterEmail          | 1                                                                                                                                                                                                          |
| ldapLoginFilterMode           | 1                                                                                                                                                                                                          |
| ldapLoginFilterUsername       | 1                                                                                                                                                                                                          |
| ldapNestedGroups              | 0                                                                                                                                                                                                          |
| ldapOverrideMainServer        |                                                                                                                                                                                                            |
| ldapPagingSize                | 500                                                                                                                                                                                                        |
| ldapPort                      | 389                                                                                                                                                                                                        |
| ldapQuotaAttribute            |                                                                                                                                                                                                            |
| ldapQuotaDefault              |                                                                                                                                                                                                            |
| ldapTLS                       | 0                                                                                                                                                                                                          |
| ldapUserDisplayName           | displayname                                                                                                                                                                                                |
| ldapUserDisplayName2          |                                                                                                                                                                                                            |
| ldapUserFilter                | (&(memberOf:1.2.840.113556.1.4.1941:=CN=ownCloud,OU=Utenti,DC=myad,DC=local))                                                                                                                           |
| ldapUserFilterGroups          |                                                                                                                                                                                                            |
| ldapUserFilterMode            | 1                                                                                                                                                                                                          |
| ldapUserFilterObjectclass     | person                                                                                                                                                                                                     |
| ldapUuidGroupAttribute        | auto                                                                                                                                                                                                       |
| ldapUuidUserAttribute         | auto                                                                                                                                                                                                       |
| turnOffCertCheck              | 0                                                                                                                                                                                                          |
| turnOnPasswordChange          | 0                                                                                                                                                                                                          |
| useMemberOfToDetectMembership | 1                                                                                                                                                                                                          |
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------     

Client configuration

Browser: Firefox

Operating system: Windows

Logs

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Nothing relevant ```

Browser log

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

a) The javascript console log
b) The network log
c) ...

</details>
@nickvergessen
Copy link
Member

There should be something in the log, when this happens.
Do any other emails work? Have you tried sending the test mail?

@aventrax
Copy link
Author

I forgot to say, sharing a file result in the email sent normally, sharing a folder has the described behavior. I think this answer your question :)

@aventrax
Copy link
Author

aventrax commented Jan 19, 2017

Checked again. At the moment I clicked on the email to confirm sending nothing shows up on nextcloud.log and nothing on the nginx's error log. Just a few requests on the access.log.

Moreover, nothing on the mail.log (postfix on localhost).

[19/Jan/2017:20:13:32 +0100] "GET /ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=test%40gmail.com&perPage=200&itemType=folder HTTP/1.1" 200 562 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[19/Jan/2017:20:13:34 +0100] "POST /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json HTTP/1.1" 403 14700 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
[19/Jan/2017:20:13:34 +0100] "GET /ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=Test+(test%40gmail.com)&perPage=200&itemType=folder HTTP/1.1" 200 225 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"

On a different NC 11.0.1 installation, I've got the same error, but on the web page I got a message:

No users or groups found for Test (test@gmail.com)

But, as on the first nextcloud server, the same thing sharing a single file works without issues.

@schiessle
Copy link
Member

I forgot to say, sharing a file result in the email sent normally, sharing a folder has the described behavior. I think this answer your question :)

I tried it but I can't reproduce it. Anything special about the folder? For example are you the owner of the folder or was the folder shared with you by another user? Anything else worth mentioning?

No users or groups found for Test (test@gmail.com)

This sounds like you didn't selected the entry with (email) at the end which results in Nextcloud assuming that you want to share with a internal user/group.

@aventrax
Copy link
Author

aventrax commented Jan 20, 2017

The folders is owned by me, after this error the folder does not become shared. So probably the missing notification is just a side-effect. If I click on "share link" and then I write the email to notify, same error but the file become shared..
Please tell me how to produce an helpful log... via browser or on the server.
I don't know how to help, but doing the same thing with a file I have no errors. As I said the behavoir is the same on 2 different installations, the first is a OC9 upgraded to NC 11.0.1 with LDAP (my company cloud); the second is my personal cloud, NC 11.0.1 upgraded from OC8 with more apps but no LDAP. So, nothing in common, I think.

@aventrax
Copy link
Author

aventrax commented Jan 20, 2017

I just saw on the NGINX access log, a difference happening from sharing a file and sharing a folder. Sharing a folder produces a HTTP 403 error, this doesn not happen with a file:

Sharing a file...

[20/Jan/2017:21:21:51 +0100] "GET /ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=test%40email.it&perPage=200&itemType=file HTTP/1.1" 200 310 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0" [20/Jan/2017:21:21:53 +0100] "POST /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json HTTP/1.1" 200 583 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0" [20/Jan/2017:21:21:53 +0100] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2Fwallpapers%2F16.jpg&reshares=true HTTP/1.1" 200 585 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"

Sharing a folder....

[20/Jan/2017:21:22:43 +0100] "GET /ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=test%40email.it&perPage=200&itemType=folder HTTP/1.1" 200 310 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0" [20/Jan/2017:21:22:44 +0100] "POST /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json HTTP/1.1" 403 14700 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0" [20/Jan/2017:21:22:45 +0100] "GET /ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=test%40email.it&perPage=200&itemType=folder HTTP/1.1" 200 310 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"

@aventrax
Copy link
Author

aventrax commented Jan 25, 2017

In the meantime I updated one of the two NC installations to the Debian Stretch (PHP 7.0) but the error persists, as before only sharing a folder.

@aventrax
Copy link
Author

aventrax commented Mar 7, 2017

Same error on NC 11.0.2...

@aventrax
Copy link
Author

@nickvergessen I'd like to inform that the issue is gone on NC12 :)

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

3 participants