• DAVx5 complains about a calendar entry. I do not have this entry created yourself, another user has an invitation for a conference received. In this someone has the email address at the end of a participant (not the recipient) made a point. At this point stumbles DAVx5.

    Would it be possible for DAVx5 to be able to handle this correctly? It is not
    helpful if the error keeps reporting. I can do that unfortunately, do not change the calendar entry: firstly, it belongs to someone else, second, this user would need a new invitation from the organizer of the conference.

    In addition, the other DAV programs that I use (Evolution, Thunderbird, Outlook CalDav Synchronizer) the appointment without errors synchronize. So you should be able to handle this with DAVx5.

    You would probably have liked to have attached the davx5-debug file. but it contains too much personal data for me. If you tell me I can send you exactly what you need.

  • developer

    @daniel Hello,

    Can you please provide steps to reproduce the problem?

    Also, as you have said, debug info are required. You can also send the file over the secure form: https://www.davx5.com/support (see Support Privacy Policy).

    Without debug info and detailled information, there’s unfortunately nothing I can do.


  • @rfc2822 said in Domain with dot at the end:

    @daniel Hello,

    Can you please provide steps to reproduce the problem?
    Naturally.

    I (user) synchronize the calendar of another user (otheruser) so that I can see this calendars on my device. That’s why you can share calendars.

    A third person has sent otheruser an appointment invitation. Various people were invited to this appointment. In one of them, a point was placed at the end of the email address. This can be clearly seen in the debug-info.txt file: Error at line 129: javax.mail.internet.AddressException: Domain ends with dot in string.
    This error is generated when synchronizing with DAVx5. The person who received the appointment invitation (otheruser) has no problem, they use an iOS device.

    As I mentioned before, this problem only occurs in DAVx5. Other programs such as Evolution, Thunderbird, Outlook CalDav Synchronizer or CardDAV Sync from dmfs GmbH do not have this problem. They synchronize this appointment invitation without errors.

    Your finding that the domain incorrectly ends with a period is of course correct. The only stupid thing is that you cannot correct this yourself if you are invited by a third party. So I would be happy if you filtered this out and synced the event anyway.

    Also, as you have said, debug info are required. You can also send the file over the secure form: https://www.davx5.com/support (see Support Privacy Policy).

    Without debug info and detailled information, there’s unfortunately nothing I can do.

    I have uploaded the desired files about the secure form.

  • developer

    Thanks for the uploaded files. The error is:

    
    EXCEPTION
    at.bitfire.ical4android.InvalidCalendarException: Couldn't parse iCalendar
       at at.bitfire.ical4android.ICalendar$Companion.fromReader(ICalendar.kt:10)
       at at.bitfire.ical4android.Event$Companion.eventsFromReader(Event.kt:1)
       at at.bitfire.ical4android.Event$Companion.eventsFromReader$default(Event.kt:1)
       at at.bitfire.davdroid.syncadapter.CalendarSyncManager.processVEvent(CalendarSyncManager.kt:1)
       at at.bitfire.davdroid.syncadapter.CalendarSyncManager.access$processVEvent(CalendarSyncManager.kt:1)
       at at.bitfire.davdroid.syncadapter.CalendarSyncManager$downloadRemote$1$1$1.invoke(CalendarSyncManager.kt:8)
    …
       at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:14)
       at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334)
    Caused by: net.fortuna.ical4j.data.ParserException: Error at line 129:javax.mail.internet.AddressException: Domain ends with dot in string ``xxxxxxxxxxxxxxxx@gmail.com.''
       at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:17)
       at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:3)
       at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:2)
       at at.bitfire.ical4android.ICalendar$Companion.fromReader(ICalendar.kt:4)
       ... 32 more
    Caused by: java.lang.IllegalArgumentException: javax.mail.internet.AddressException: Domain ends with dot in string ``xxxxxxxxxxxxxxxx@gmail.com.''
       at net.fortuna.ical4j.model.parameter.Email$Factory.createParameter(Email.java:2)
    …
    Caused by: javax.mail.internet.AddressException: Domain ends with dot in string ``xxxxxxxxxxxxxxxx@gmail.com.''
       at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:32)
       at net.fortuna.ical4j.model.parameter.Email.<init>(Email.java:37)
    

    The server is SOGo.

    So the error seems to be caused by an email address with a dot after the domain name (xxxxxxxxxxxxxxxx@gmail.com.), which is passed as an EMAIL parameter.

    ical4j parses this email address with Java Mail, which checks the email address and throws an exception when the email address ends with a dot. According to the source code of checkEmail, RFC 1034 is applicable and doesn’t allow a dot at the end of the domain name.

    So my next questions are:

    1. Why is there a dot at the end of the email address (xxxxxxxxxxxxxxxx@gmail.com.)? Is there a dot after other email addresses, too?
    2. Is this dot by intention? Is it set by SOGo or the user? Was the email address with dot at the end set by a user?
    3. Is this dot required? Can it be removed and does it work when it is removed?
    4. Is this dot really forbidden by the standards?
      • If yes: maybe we could suggest a patch to ical4j so that trailing dots are removed for compatibility.
      • If no: this should be reported to Java Mail.

    Point 4 would need further investigation; maybe we should check the other questions too.


  • @rfc2822 said in Domain with dot at the end:

    Thanks for the uploaded files. The error is:

    
    EXCEPTION
    at.bitfire.ical4android.InvalidCalendarException: Couldn't parse iCalendar
     at at.bitfire.ical4android.ICalendar$Companion.fromReader(ICalendar.kt:10)
     at at.bitfire.ical4android.Event$Companion.eventsFromReader(Event.kt:1)
     at at.bitfire.ical4android.Event$Companion.eventsFromReader$default(Event.kt:1)
     at at.bitfire.davdroid.syncadapter.CalendarSyncManager.processVEvent(CalendarSyncManager.kt:1)
     at at.bitfire.davdroid.syncadapter.CalendarSyncManager.access$processVEvent(CalendarSyncManager.kt:1)
     at at.bitfire.davdroid.syncadapter.CalendarSyncManager$downloadRemote$1$1$1.invoke(CalendarSyncManager.kt:8)
    …
     at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:14)
     at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334)
    Caused by: net.fortuna.ical4j.data.ParserException: Error at line 129:javax.mail.internet.AddressException: Domain ends with dot in string ``xxxxxxxxxxxxxxxx@gmail.com.''
     at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:17)
     at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:3)
     at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:2)
     at at.bitfire.ical4android.ICalendar$Companion.fromReader(ICalendar.kt:4)
     ... 32 more
    Caused by: java.lang.IllegalArgumentException: javax.mail.internet.AddressException: Domain ends with dot in string ``xxxxxxxxxxxxxxxx@gmail.com.''
     at net.fortuna.ical4j.model.parameter.Email$Factory.createParameter(Email.java:2)
    …
    Caused by: javax.mail.internet.AddressException: Domain ends with dot in string ``xxxxxxxxxxxxxxxx@gmail.com.''
     at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:32)
     at net.fortuna.ical4j.model.parameter.Email.<init>(Email.java:37)
    

    The server is SOGo.

    So the error seems to be caused by an email address with a dot after the domain name (xxxxxxxxxxxxxxxx@gmail.com.), which is passed as an EMAIL parameter.

    ical4j parses this email address with Java Mail, which checks the email address and throws an exception when the email address ends with a dot. According to the source code of checkEmail, RFC 1034 is applicable and doesn’t allow a dot at the end of the domain name.

    So my next questions are:

    1. Why is there a dot at the end of the email address (xxxxxxxxxxxxxxxx@gmail.com.)? Is there a dot after other email addresses, too?

    A third person has sent otheruser an appointment invitation. Various people were invited to this appointment. In one of them, a point was placed at the end of the email address. This was a mistake from the event creator.

    1. Is this dot by intention? Is it set by SOGo or the user? Was the email address with dot at the end set by a user?

    The event creator has made the dot as a mistake. Perhaps the invite email was not sent do this person, but I dont know.

    1. Is this dot required? Can it be removed and does it work when it is removed?

    I cannot remove the dot.

    1. Is this dot really forbidden by the standards?

    I does not know the standard. I only see that DAVx5 cannot sync the event, but other DAV clients can.

    - If yes: maybe we could suggest a patch to ical4j so that trailing dots are removed for compatibility.
    - If no: this should be reported to Java Mail.
    

    Point 4 would need further investigation; maybe we should check the other questions too.


  • @daniel said in Domain with dot at the end:

    The event creator has made the dot as a mistake. Perhaps the invite email was not sent do this person, but I dont know.

    The easiest way to fix the problem is to ask the user to get in touch with the creator of the event and ask him to fix the email address. Just my 2ct to the discussion 😉

  • developer

    RFC 2821 says:

    Domain = (sub-domain 1*("." sub-domain)) / address-literal
    sub-domain = Let-dig [Ldh-str]
    
    address-literal = "[" IPv4-address-literal /
        IPv6-address-literal /
        General-address-literal "]"
    ; See section 4.1.3
    
    Mailbox = Local-part "@" Domain
    

    So it seems quite clear to me that en email address must not end with a dot; which is the reason that InternetAddress doesn’t allow that.

    So @daniel: Please fix the broken event; email addresses must not contain a dot. Can you tell the organizer of the event to remove the dot?

    But I also wonder how to avoid this problem in the future (because it clearly causes problems for users). The problem is that the exception occurs while ical4j is still parsing the event; so we can’t use some kind of validation after the parsing process. Maybe we could suggest to ical4j that they do something like checkEmail() before parsing it with InternetAddress(), and checkEmail() could fix common problems that can be repaired (like a dot at the end).

  • developer


  • @rfc2822 said in Domain with dot at the end:

    RFC 2821 says:

    Domain = (sub-domain 1*("." sub-domain)) / address-literal
    sub-domain = Let-dig [Ldh-str]
    
    address-literal = "[" IPv4-address-literal /
        IPv6-address-literal /
        General-address-literal "]"
    ; See section 4.1.3
    
    Mailbox = Local-part "@" Domain
    

    So it seems quite clear to me that en email address must not end with a dot; which is the reason that InternetAddress doesn’t allow that.

    I’ve been saying that all along.

    So @daniel: Please fix the broken event; email addresses must not contain a dot. Can you tell the organizer of the event to remove the dot?

    I can not do that. I cannot change the date. I have not been invited to the event. It is an appointment for another user.
    I do not know the appointment organizer. So I don’t get in touch with him.

    But I also wonder how to avoid this problem in the future (because it clearly causes problems for users). The problem is that the exception occurs while ical4j is still parsing the event; so we can’t use some kind of validation after the parsing process. Maybe we could suggest to ical4j that they do something like checkEmail() before parsing it with InternetAddress(), and checkEmail() could fix common problems that can be repaired (like a dot at the end).

    Thanks for opening the bug report at ical4j.

  • developer

    @daniel said in Domain with dot at the end:

    I do not know the appointment organizer. So I don’t get in touch with him.

    You can download the iCalendar file (its URL is mentioned in the debug info). Therein you can find an ORGANIZER field with the organizer of the event.

  • developer

    This problem should be avoided with ical4j 3.1.2; so it should be avoided with the next DAVx⁵ version.


  • @rfc2822 Thank you very much. I’m very pleased.

Similar topics