Kopano 8.7.1 IMAP APPEND ignoring timezone for INTERNALDATE



  • 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



  • 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


Log in to reply