davmail
davmail copied to clipboard
ICS returned from Exchange is wrong, not RFC-2445 compliant
I try to create an event on Office 365 server, using DavMail. I push the folloving ICS using Thunderbird or cadaver:
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20210226T104139Z
LAST-MODIFIED:20210226T104308Z
DTSTAMP:20210226T104308Z
UID:f5dac9b4-39bc-4a2a-aa89-be1c9157f899
SUMMARY:TESTGLETBJB3
STATUS:CONFIRMED
ORGANIZER;CN=XXXXXXXXXX Pxxxx:mailto:[email protected]
ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTIC
IPANT:mailto:[email protected]
ATTENDEE;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT:mailto:1
[email protected]
CATEGORIES:Rendez-vous
DTSTART:20210405T100000Z
DTEND:20210405T110000Z
SEQUENCE:0
DESCRIPTION:Ne rien faire avec cette invitation
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
This is an event to schedule a meeting, the organizer is [email protected], the participant is [email protected]. The ICS is created by Thunderbird.
The event is accepted by Exchange, but [email protected] lost the status of organizer. If I download the event using Thunderbird or Cadaver - I receive a wrong, corrupted ICS, not RFC-2445 compliant:
BEGIN:VCALENDAR
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/London
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T010000
TZOFFSETFROM:+0000
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Jxxxxxxx XX
XXXXXXX":mailto:[email protected]
DESCRIPTION;LANGUAGE=en-US:Ne rien faire avec cette invitation\n
UID:f5dac9b4-39bc-4a2a-aa89-be1c9157f899
SUMMARY;LANGUAGE=en-US:TESTGLETBJB3
DTSTART;TZID="Europe/London":20210405T110000
DTEND;TZID="Europe/London":20210405T120000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20210226T104308Z
TRANSP:TRANSPARENT
STATUS:CONFIRMED
SEQUENCE:0
CATEGORIES:Rendez-vous
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-OWNERAPPTID:2119356428
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
ATTENDEE;CN="Jxxxxxxx XXXXXXXXX";PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:m
ailto:[email protected]
LAST-MODIFIED:20210226T142620Z
END:VEVENT
END:VCALENDAR
The first participant (organizer) is NOT present, but the second participant is mentioned twice. According to RFC-2445:
Property Name: ORGANIZER
...
Conformance: This property MUST be specified in an iCalendar object that specifies a group scheduled calendar entity.
Thunderbird tries to workaround the issue, adding the calendar's owner as an organizer and re-pushing the event to server, but during the next synchronization cycle (if the event is changed on server side) the problem comes back.
If I create a group event directly on Exchange (using Outlook or Web interface) - everything works as expected, I get the organizer correctly in ICS file.
Please, fix this major bug.
I'm having problems with duplicate attendees similar to this one. The additional ATTENDEE property at the end is added by 'fixAttendees()' calls at
https://github.com/mguessan/davmail/blob/679fe6d92fc47ddf23bebe277c1010cc29b061a8/src/java/davmail/exchange/ews/EwsExchangeSession.java#L2184
or
https://github.com/mguessan/davmail/blob/679fe6d92fc47ddf23bebe277c1010cc29b061a8/src/java/davmail/exchange/ews/EwsExchangeSession.java#L2199
I can't find out what are they trying to fix, but if I remove the line that appends the 'fixed' attendee record at
https://github.com/mguessan/davmail/blob/679fe6d92fc47ddf23bebe277c1010cc29b061a8/src/java/davmail/exchange/ews/EwsExchangeSession.java#L2252
then, the original record is the only one listed, and the duplicate attendee goes away in my client.