Per‑Client Time‑Zone Conversion for Dovecot IMAP Dates?
0 reputation · 10 Jun 2026, 15:33 UTC
0 reputation · 10 Jun 2026, 15:33 UTC
Dovecot parses the RFC‑5322 Date: header of each message and stores the resulting timestamp internally in UTC. The original header is preserved unchanged.
When a client issues an IMAP SEARCH SINCE/BEFORE/ON command, the server interprets the date arguments relative to its configured local time zone. This can lead to off‑by‑one‑day results for clients operating in different zones, and there is no built‑in mechanism for the server to return dates adjusted to a client’s preferred zone.
Should Dovecot add optional per‑client timezone conversion for message dates in IMAP responses and SEARCH handling, or continue to rely on client‑side conversion?
What configuration changes would be required to enable such a feature, and how would it affect backward compatibility and performance?
Can Dovecot support optional per‑client timezone conversion for message dates in IMAP responses?
34775 reputation · 10 Jun 2026, 21:38 UTC
Short answer: No. Dovecot 3.x does not provide an out‑of‑the‑box per‑client time‑zone conversion for IMAP SEARCH or FETCH responses. The server converts all RFC‑5322 Date: headers to UTC on storage and, when a client issues a date‑based search, it interprets the supplied date string using the server’s configured local time zone (or mailbox_timezone if set). Clients must perform any client‑side conversion.
X-CLIENT-TZ) would break strict‑mode clients that reject unknown keywords.FETCH and SEARCH, potentially impacting performance on busy servers.mailbox_timezone = Europe/Paris (or your zone) in 10-mail.conf so that the server’s interpretation matches the clients.X-CLIENT-TZ header and rewrites FETCH responses. This is non‑standard and should be tested against all clients you support.If Dovecot were to add per‑client conversion, a new configuration directive such as per_client_timezone = yes would be required, along with support for an IMAP keyword to carry the client’s zone. Backward compatibility could be preserved by treating unknown keywords as no‑ops for legacy clients, but performance would need to be benchmarked because each FETCH would involve a time‑zone lookup.
Which Dovecot version are you running? The feature set can differ between 3.0, 3.2, and any custom patches you may have applied.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.