Sfoglia il codice sorgente

IMAP Folder Liste zum Abgleich

gc-server3 11 ore fa
parent
commit
d86db0ea76
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      mailserver/imap.py

+ 3 - 0
mailserver/imap.py

@@ -41,6 +41,9 @@ class Imap:
 
         with self.connect("archiv") as mb:
             folder_list = [f.name for f in mb.folder.list() if "Archive." in f.name]
+            folder_list.sort()
+            with open("mailserver/folder_list.json", "w") as fwh:
+                json.dump(folder_list, fwh, indent=2)
 
             for folder in folder_list:
                 msg_count = mb.folder.status(folder)["MESSAGES"]