From 50f2ca98b519836eb4e8526748d6859c83fa4abf Mon Sep 17 00:00:00 2001 From: Michael Gratton Date: Tue, 18 Aug 2020 15:13:56 +1000 Subject: [PATCH] Geary.Imap.Quirks: Add quirks for Dovecot Dovecot 2.3.4.1 and earlier uses "MISSING_MAILBOX" and "MISSING_DOMAIN" in the address structures of FETCH ENVELOPE replies when the mailbox or domain is missing. See https://dovecot.org/pipermail/dovecot/2020-August/119658.html --- src/engine/imap/api/imap-quirks.vala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/engine/imap/api/imap-quirks.vala b/src/engine/imap/api/imap-quirks.vala index b4443a95..c24ae55b 100644 --- a/src/engine/imap/api/imap-quirks.vala +++ b/src/engine/imap/api/imap-quirks.vala @@ -67,6 +67,8 @@ public class Geary.Imap.Quirks : BaseObject { update_for_gmail(); } else if (greeting.has_prefix("The Microsoft Exchange")) { update_for_outlook(); + } else if (greeting.has_prefix("Dovecot")) { + update_for_dovecot(); } } } @@ -101,4 +103,18 @@ public class Geary.Imap.Quirks : BaseObject { this.max_pipeline_batch_size = 25; } + /** + * Updates this quirks object with known quirks for Dovecot + * + * Dovecot 2.3.4.1 and earlier uses "MISSING_MAILBOX" and + * "MISSING_DOMAIN" in the address structures of FETCH ENVELOPE + * replies when the mailbox or domain is missing. + * + * See [[https://dovecot.org/pipermail/dovecot/2020-August/119658.html]] + */ + public void update_for_dovecot() { + this.empty_envelope_mailbox_name = "MISSING_MAILBOX"; + this.empty_envelope_host_name = "MISSING_DOMAIN"; + } + }