Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some message dates rewritten to "now" on restore. #434

Open
Leftium opened this issue Aug 17, 2023 · 0 comments
Open

Some message dates rewritten to "now" on restore. #434

Leftium opened this issue Aug 17, 2023 · 0 comments

Comments

@Leftium
Copy link

Leftium commented Aug 17, 2023

Full steps to reproduce the issue:

  1. Backup emails with GYB.
  2. Restore emails with GYB (to a different email address).

Expected outcome:
Dates are preserved.

Actual outcome:
Some dates are changed to "now" date.

Notes:

  • ~42% of "in:sent" message dates were rewritten to "now." (3,809/9,038)
  • ~10% of all message dates were rewritten to "now." (18,551/195,729)
  • "--clean" was not used.
  • The source Gmail account was already a collection of various email accounts (other email accounts were forwarding emails to this account, and other email accounts had already been imported via IMAP/Outlook)
  • Presumably there is a bug in the way GYB is calling the Google API, or a bug in the API itself.
  • It seems the Gmail API rewrites the "Date" header to now if it rewrites another header (like removing quotes from the "From" header). Or if just adding a time zone offset to the Date itself? Is there some way to ensure the Gmail API doesn't do this?
  • Sometimes messages with rewritten dates are restored multiple times (searching for the rfc822msgid returns multiple messages, all with different dates less than a minute apart)

Sample message where "Date" header was rewritten:

Original

From: "J*** M*****" <m*****[email protected]>
To: <w*******@carleton.edu>
Subject: hey Hans
Date: Wed, 23 Aug 2000 05:01:16
Message-ID: <15eb01c82368$46efc9f0$d4cf5dd0$@edu>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
Thread-Index: AcZRahYIdq3e/QfWTG+/6JQFXkJtWg==
X-OlkEid: 1A647033011E848FB761854FBE6605E33324AA1F
x-mimeole: Produced By Microsoft MimeOLE V6.00.2800.1106

Restored

X-Google-Smtp-Source: AGHT+IFH0BpcjkbadkVS/jlRYj3nSwZko6UUJyNCypxV8dK/g7BKxj20TwgRZwbgzYUuEWPqRK9fAehnOKUHmtnlbQ==
X-Received: by 2002:a0c:fe91:0:b0:63f:8839:658 with SMTP id d17-20020a0cfe91000000b0063f88390658mr2749634qvs.1.1692122605179;
        Tue, 15 Aug 2023 11:03:25 -0700 (PDT)
Received: from 879096941799 named unknown by gmailapi.google.com with HTTPREST; Tue, 15 Aug 2023 13:03:25 -0500
From: J*** M***** <m*****[email protected]>
To: <w*******@carleton.edu>
Subject: hey Hans
Date: Tue, 15 Aug 2023 13:03:25 -0500
Message-ID: <15eb01c82368$46efc9f0$d4cf5dd0$@edu>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
Thread-Index: AcZRahYIdq3e/QfWTG+/6JQFXkJtWg==
X-OlkEid: 1A647033011E848FB761854FBE6605E33324AA1F
x-mimeole: Produced By Microsoft MimeOLE V6.00.2800.1106

Sample message where "Date" header was preserved:

Original

From: J*** M***** <l******@gmail.com>
Mime-Version: 1.0 (1.0)
Date: Tue, 23 Sep 2014 22:53:38 -0500
Delivered-To: l******@gmail.com
Message-ID: <-2717672033979977412@unknownmsgid>
Subject: Marla's Caribbean Cuisine
To: N**** C**** <c********[email protected]>
Content-Type: text/plain; charset=UTF-8

Restored

X-Google-Smtp-Source: AGHT+IE+cKdd/uBOSDm75XjH7FDQB769oqlfyYnd9Im9o1SajB5r9BzpeZ3NyODaxaUxdYC06XShb5a0WxdFyJeHGg==
X-Received: by 2002:a0c:e3c3:0:b0:63c:ec39:13d0 with SMTP id e3-20020a0ce3c3000000b0063cec3913d0mr9116257qvl.64.1692092336136;
        Tue, 15 Aug 2023 02:38:56 -0700 (PDT)
Received: from 879096941799 named unknown by gmailapi.google.com with HTTPREST; Tue, 15 Aug 2023 05:38:56 -0400
From: J*** M***** <l******@gmail.com>
Mime-Version: 1.0 (1.0)
Date: Tue, 23 Sep 2014 22:53:38 -0500
Delivered-To: l******@gmail.com
Message-ID: <-2717672033979977412@unknownmsgid>
Subject: Marla's Caribbean Cuisine
To: N**** C**** <c********[email protected]>
Content-Type: text/plain; charset=UTF-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant