owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.38k stars 2.06k forks source link

No mail invitation send for new appointment on CalDav sync #23600

Closed jokakilla closed 6 years ago

jokakilla commented 8 years ago
### Steps to reproduce 1. Create a new appointment with an external participant on your smartphone 2. Sync the calendar using CalDav with your owncloud ### Expected behaviour Owncloud should sent an invitation to all participants like it does if an appointment was created using the Owncloud Webinterface. ### Actual behaviour Owncloud does not sent an email even though the caldav sync was successful and the new appointment is visible at the Owncloud webinterface. After selecting the appointment at the webinterface it even shows the participant. ### Server configuration **Operating system**: CentOS Linux release 7.2.1511 (Core) **Web server:** Apache 2.4.6 **Database:** Maria DB 5.5.44 **PHP version:** PHP 7.0.4 **ownCloud version:** (see ownCloud admin page) Owncloud 9.0.0 **Updated from an older ownCloud or fresh install:** 8.0, 8.1, 8.2 **Where did you install ownCloud from:** http://download.owncloud.org/download/repositories/stable/CentOS_7 **Signing status (ownCloud 9.0 and above):** ?? ``` Integrity Check: Only two additional php scripts added by me. No changes on the owncloud code base. Results ======= - core - EXTRA_FILE - dyndns/update.php - adminer/index.php ``` **List of activated apps:** ``` Enabled: - activity: 2.2.1 - calendar: 1.0 - comments: 0.2 - contacts: 1.1.0.0 - dav: 0.1.5 - federatedfilesharing: 0.1.0 - federation: 0.0.4 - files: 1.4.4 - files_pdfviewer: 0.8 - files_sharing: 0.9.1 - files_texteditor: 2.1 - files_trashbin: 0.8.0 - files_versions: 1.2.0 - files_videoplayer: 0.9.8 - firstrunwizard: 1.1 - gallery: 14.5.0 - notifications: 0.2.3 - provisioning_api: 0.4.1 - systemtags: 0.2 - templateeditor: 0.1 - updatenotification: 0.1.0 Disabled: - encryption - external - files_external - user_external - user_ldap ``` **The content of config/config.php:** ``` { "system": { "instanceid": "ocuu9enp4kko", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "private_ip", "public_domain", "private_hostname" ], "datadirectory": "\/var\/ownclouddata", "memcache.local": "\\OC\\Memcache\\APCu", "overwrite.cli.url": "http:\/\/private_ip\/owncloud", "dbtype": "mysql", "version": "9.0.0.19", "dbname": "owncloud", "dbhost": "localhost", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "UTC", "installed": true, "mail_smtpmode": "smtp", "mail_smtphost": "myprovider.com", "mail_smtpsecure": "tls", "mail_smtpport": "587", "mail_smtpauth": 1, "mail_smtpauthtype": "LOGIN", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "givenname.lastname", "mail_domain": "myprovider.com", "maintenance": false, "theme": "", "loglevel": 2, "updatechecker": false, "trashbin_retention_obligation": "auto" } } ``` **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:** No ### Client configuration **Browser:** Not applicable. Calendar Client "Business Calendar 1.4.8.5". CalDav Client "CalendarSync 13.44". **Operating system:** Android 4.4 ### Logs #### Web server error log ``` private_ip - joka [27/Mar/2016:14:59:56 +0200] "OPTIONS /owncloud/remote.php/caldav/calendars/joka/owncloudpers%c3%b6nlich/ HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0 like (Lightning/1.0b2 Thunderbird/3.1.13)" private_ip - joka [27/Mar/2016:14:59:56 +0200] "REPORT /owncloud/remote.php/caldav/calendars/joka/owncloudpers%c3%b6nlich/ HTTP/1.1" 207 174271 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0 like (Lightning/1.0b2 Thunderbird/3.1.13)" private_ip - joka [27/Mar/2016:14:59:57 +0200] "REPORT /owncloud/remote.php/caldav/calendars/joka/owncloudpers%c3%b6nlich/ HTTP/1.1" 207 4441 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0 like (Lightning/1.0b2 Thunderbird/3.1.13)" private_ip - joka [27/Mar/2016:14:59:59 +0200] "PROPFIND /owncloud/remote.php/caldav/calendars/joka/owncloudpers%c3%b6nlich/ HTTP/1.1" 207 455 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0 like (Lightning/1.0b2 Thunderbird/3.1.13)" private_ip - joka [27/Mar/2016:14:59:59 +0200] "OPTIONS /owncloud/remote.php/caldav/calendars/joka/owncloudgeburtstage/ HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0 like (Lightning/1.0b2 Thunderbird/3.1.13)" private_ip - joka [27/Mar/2016:15:00:00 +0200] "REPORT /owncloud/remote.php/caldav/calendars/joka/owncloudgeburtstage/ HTTP/1.1" 207 18711 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0 like (Lightning/1.0b2 Thunderbird/3.1.13)" private_ip - joka [27/Mar/2016:15:00:00 +0200] "PROPFIND /owncloud/remote.php/caldav/calendars/joka/owncloudgeburtstage/ HTTP/1.1" 207 450 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0 like (Lightning/1.0b2 Thunderbird/3.1.13)" ``` #### ownCloud log (data/owncloud.log) ``` Even on loglevel 0 nothing is printed out during caldav sync. ```
DeepDiver1975 commented 8 years ago

Any ideas where I could look at?

the relevant information is stored in the organizer field within the event. As far as my research and debugging goes GOA is not setting the proper email address in the organizer field. No idea about davdroid.

allgood commented 8 years ago

the relevant information is stored in the organizer field within the event. As far as my research and debugging goes GOA is not setting the proper email address in the organizer field. No idea about davdroid.

Looking at the ICS file downloaded from owncloud, organizer looks correct, with ORGANIZER;CN:My Name:MAILTO:my@email

any point on owncloud code where I can intercept the ics file right after it comes from the client app?

allgood commented 8 years ago

@DeepDiver1975 , I've fixed this on nextcloud 10 with the following changes:

--- nextcloud/apps/dav/appinfo/v1/caldav.php    2016-08-25 03:59:50.000000000 -0300
+++ nextcloud-imip/apps/dav/appinfo/v1/caldav.php   2016-09-21 14:23:36.251450162 -0300
@@ -78,6 +78,8 @@
 }

 $server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
+$server->addPlugin(new \Sabre\CalDAV\Schedule\Plugin());
+$server->addPlugin(new OCA\DAV\CalDAV\Schedule\IMipPlugin( \OC::$server->getMailer(), \OC::$server->getLogger()));
 $server->addPlugin(new ExceptionLoggerPlugin('caldav', \OC::$server->getLogger()));

 // And off we go!

When running from web page, this code is never executed, and apps/dav/appinfo/v2/remote.php is executed instead, adding the Schedule and IMip plugins.

DeepDiver1975 commented 8 years ago

Oh yes .... sure. The gnome integration uses v1 webdav endpoint. :facepalm:

Mind submitting a pull request?

Thanks a lot

allgood commented 8 years ago

Mind submitting a pull request?

I will submit.

brianjmurrell commented 8 years ago

So I patched my OC 9.0.4 installation "in situ" with the merged patch but I am still not getting e-mail invitations to invitees through a GOA.

Is there anything more I should need to do than to just apply that patch?

I am still getting e-mail invites when using a Caldav account rather than a GOA account.

allgood commented 8 years ago

@brianjmurrell , As I've stated on my yesterday's message, I'm running nextcloud 10 and while looking to solve this bug got to this thread.

The pull request I've made is a simple copy without testing from the one that worked for me with nextcloud. It is possible that there is more diferences between owncloud and nextcloud, so, I think you should debug a little more before accepting the merge.

brianjmurrell commented 8 years ago

@ctodobom That's fair enough. My comment could just be taken as a confirmation that just applying your patch is not enough for owncloud.

DeepDiver1975 commented 8 years ago

My comment could just be taken as a confirmation that just applying your patch is not enough for owncloud.

@brianjmurrell please double check if ORGANIZER value in an event submitted via a GOA setup matches the email address in the users settings.

brianjmurrell commented 8 years ago

@DeepDiver1975 Happy to. Where can I intercept that to see what the value is? I think it goes over the network with SSL so I can't sniff it.

DeepDiver1975 commented 8 years ago

The event is stored in the db - table oc_calendarobjects

brianjmurrell commented 8 years ago

Ahhhh! It's working now! I did indeed have the wrong "From" address selected in the Organiser field in Evolution when creating the event. TBH, I hadn't really ever noticed that one can select an organiser from one's list of e-mail accounts.

So the above mentioned patch does fix this in OC9. Can we get it applied for the next release?

ghost commented 7 years ago

@PVince81 @DeepDiver1975 @jokakilla oC 9.1.2 was released yesterday fixing this issue according to the changelog so this probably could bee closed here.

creopard commented 7 years ago

Does not seem to work yet.

Using oC 9.1.2 I created a calendar event on my smartphone and invited someone else, but no invitation was sent. The result in the caleandar app in oC looks like this: calendar_details

Question 1: is the prefix "mailto:" supposed to be there? Question 2: I guess the second line should contain the email adress of the person which was invited, but it's blank

By the way: Modifying this specific appointment and adding a new(!) email adress using the oC calendar web interface sends out an email to the newly invited person immediately.

JB1985 commented 7 years ago

After Update from ownCloud 9.1.1 to 9.1.3 i cant sent mail invitation with Lightning/Thunderbird.

With 9.1.1 it has works.

Any workaround?

JB1985 commented 7 years ago

On iOS10.2 is not working too.

JB1985 commented 7 years ago

Is it again a LDAP problem? If I add a new event, I cant see the field to add a email, but only for LDAP User. If I add a local user I see the field.

bildschirmfoto vom 2017-01-06 14-00-02

creopard commented 7 years ago

I've retested this issue with OC 9.1.4 again. It seems to work (again) :joy_cat:

Test scenarios:

Maybe someone else can confirm this :)

ownclouders commented 6 years ago

Hey, this issue has been closed because the label needs info is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.