apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
486 stars 136 forks source link

regression: Reply does not work because of urn:uuid usernames anymore #198

Closed macosforgebot closed 13 years ago

macosforgebot commented 13 years ago

mail@… originally submitted this as ticket:457


Hi,

I missed several response mails to meeting invitations. Looking into this I found that this is because the organizer now is stored as urn:uuid.

2011-07-03 00:44:56+0200 [-] [mailgateway] 2011-07-03 00:44:56+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.MailHandler#error] Mail gateway didn't find an icalendar attachment in message <4E0F9F53.3000205@derklecks.de>
2011-07-03 00:44:56+0200 [-] [mailgateway] 2011-07-03 00:44:56+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.MailHandler#error] looking at organizer urn:uuid:272c501f-366c-517d-8af3-44c37777ef83
2011-07-03 00:44:56+0200 [-] [mailgateway] 2011-07-03 00:44:56+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.MailHandler#error] Don't have an email address for the organizer; ignoring reply.

this is caused by the following code in mail.py

           result = self.db.lookupByToken(token)
        if result is None:
            # This isn't a token we recognize
            self.log_error("Mail gateway found a token (%s) but didn't recognize it in message %s" % (token, msg['Message-ID']))
            return

        organizer, attendee, icaluid = result
        organizer = str(organizer)
        attendee = str(attendee)
        icaluid = str(icaluid)

        for part in msg.walk():
            if part.get_content_type() == "text/calendar":
                calBody = part.get_payload(decode=True)
                break
        else:
            # No icalendar attachment
            self.log_error("Mail gateway didn't find an icalendar attachment in message %s" % (msg['Message-ID'],))
            self.log_error("looking at organizer %s" % (organizer,))
            if not organizer.startswith("mailto:"):

which checks if the organizer starts with urn:uuid ....

The reply emails are lost and therefore data loss occurs.

macosforgebot commented 13 years ago

@m0rgen originally submitted this as comment:1:⁠ticket:457


Right, the tokens DB has the organizer's CUA in urn: form and not mailto: any longer. mail.py needs to look up the mailto: form so the reply can be forwarded. This only happens in the case where the attendee's calendar client didn't include an actual IMIP text/calendar attachment though.

macosforgebot commented 13 years ago

@m0rgen originally submitted this as comment:2:⁠ticket:457

macosforgebot commented 13 years ago

mail@… originally submitted this as comment:3:⁠ticket:457


is there a fix for this?

This happens every time if the receiver replies via a plain mail client, which at least in my setup is really common...

macosforgebot commented 13 years ago

@m0rgen originally submitted this as comment:4:⁠ticket:457


Please try with https://trac.calendarserver.org/changeset/7782/CalendarServer/trunk

macosforgebot commented 13 years ago

mail@… originally submitted this as comment:5:⁠ticket:457


thanks this works.