Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Kopano 8.7.1 IMAP APPEND ignoring timezone for INTERNALDATE

    Kopano Groupware Core
    2
    2
    261
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • aeb
      aeb last edited by

      Hi,

      we’re using Kopano on UCS.
      When syncing emails from a dovecot server to Kopano via “mbsync”, we noticed that the “Received” date had a two hour shift.
      After some debugging we found out, that the timezone part of the date string passed to the IMAP APPEND command seems to be ignored.
      For example, this APPEND command:

      9 APPEND "INBOX" "24-May-2019 15:44:22 +0200" {533+}
      

      The email added using this command was added with a time of 15:44:22 +0000 (UTC), respectively 17:44:22 +0200 as it showed in the Webapp and via IMAP.
      When syncing the other way around, from Kopano to dovecot, we don’t see this issue.

      So, my question is: Are we doing something wrong, or is this a bug?

      All the best,
      aeb

      1 Reply Last reply Reply Quote 0
      • sarabanjina
        sarabanjina last edited by

        Hi,

        We’re observing exactly the same symptom as yours : when syncing emails from a groupwise server to Kopano via ‘kopano-migration-imap’, we noticed that the “Received” date had a two hour shift.

        I wonder if it could be related to commit 764b2072a79be5a31006aa55652a1892f371ab9c (gateway: refactor StringToFileTime to use strptime and validate timestamp).

        I finally found a (dirty) workaround by patching kopano-migration-imap to append a converted date in UTC :

                my $h1_date_patched = POSIX::strftime('%d-%b-%Y %T +0000', gmtime(str2time(substr $h1_date, 1, -1)));
        

        In your example, the APPEND command is patched like this :

        9 APPEND "INBOX" "24-May-2019 13:44:22 +0000" {533+}
        

        And the received date in Kopano is displaying correctly…

        Regards,
        Nicolas

        1 Reply Last reply Reply Quote 0
        • First post
          Last post