[geary/mjog/dovecot-envelope-mailbox-quirk: 8/8] Geary.Imap.Quirks: Add quirks for Dovecot




commit de1794bc6f6646b32a647da21568eac34942ff20
Author: Michael Gratton <mike vee net>
Date:   Tue Aug 18 15:13:56 2020 +1000

    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 b4443a953..8be50d845 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 Outlook.com.
+     *
+     * 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";
+    }
+
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]