Gmailでのimapsync移行日付の修正
imapsyncの移行がGmailで間違った日付を表示する理由
imapsync is frequently used to migrate メールボックス to Gmail and Google Workspace accounts via IMAP. When imapsync uploads messages to Gmail's IMAP interface, Gmail processes each message through its own mail pipeline. Even when the --syncinternaldates flag is specified, Gmail's IMAP implementation may override the requested INTERNALDATE in certain situations, 特に when the message goes through Gmail's spam and security filters.
Gmail's IMAP behavior is notably different from standard IMAP servers. Gmail adds its own Receivedヘッダー (通常 containing "gmailapi.google.com" or the IMAP gateway identifier) with the upload timestamp. Additionally, Gmail's handling of the APPEND command with a specified INTERNALDATE is not always consistent. Some messages receive the requested date, while others are stamped with the upload timestamp, creating an unpredictable mix of correct and in正しい日付s within the same migrated メールボックス.
For Gmail web ユーザー, the display date is derived from the Dateヘッダー, which masks the INTERNALDATE issue. But ユーザー who connect to their Gmail account via Outlook, Apple Mail, or Thunderbird see the 移行日 on affected messages. The inconsistency between Gmail web and IMAP clients creates confusion, and the partial nature of the problem (some dates correct, some not) makes it even harder to diagnose and quantify the scope of affected messages.
Gmailへの影響
Gmail's dual-date behavior means the problem is invisible in the Gmail Webインターフェース but fully visible in IMAP clients. Users who only use Gmail in a browser may never notice the issue. Users who connect Outlook, Apple Mail, or Thunderbird to the same Gmail account see the 移行日 on affected emails. This inconsistency leads to conflicting ユーザー reports that complicate support efforts.
Gmail's IMAP search (SEARCH SINCE/BEFORE commands) uses the INTERNALDATE, so IMAP clients that perform server-side date searches return incorrect results. Third-party バックアップ tools that connect to Gmail via IMAP archive the 間違った日付s, creating permanent inaccuracies in バックアップ records. Google Vault and Workspace コンプライアンス tools may also reference the INTERNALDATE for date-based holds, potentially impacting legal and regulatory workflows.
よくある質問
Why does imapsync --syncinternaldates not work reliably with Gmail?
Gmail IMAP implementation has specific behaviors that differ from standard IMAP servers. Gmail may override the requested INTERNALDATE during its internal processing pipeline, 特に when messages pass through spam filters or security scanning. This is a Gmail-specific behavior, not an imapsync bug.
How can I tell which emails in Gmail have the wrong INTERNALDATE?
Redate.io scans メールボックス and identifies emails where the INTERNALDATE does not match the original Dateヘッダー. The scan is free and shows exactly how many emails are affected, so 管理者 can assess the scope before committing to a fix.
Does Redate.io handle Gmail labels when fixing dates?
はい。 Redate.io preserves all Gmail labels, stars, read/unread status, and other metadata when correcting the email. The fixed message appears in the same location with the same labels as the original.