Jelajahi Sumber

Mail-Adressen angepasst

gc-server3 2 jam lalu
induk
melakukan
320a1c8296
2 mengubah file dengan 14 tambahan dan 9 penghapusan
  1. 8 8
      contacts/o365_copy.py
  2. 6 1
      mailserver/imap.py

+ 8 - 8
contacts/o365_copy.py

@@ -21,15 +21,15 @@ account = Account(
 )
 
 mailboxes = [
-    "winter@global-cube.net",
-    "bedner@global-cube.net",
-    "brandt@global-cube.net",
+    "winter@global-cube.de",
+    "burghard@global-cube.de",
+    "brandt@global-cube.de",
     # 'd.ankenbrand@global-cube.de',
     # 'gawliczek@global-cube.de',
-    "m.geiss@global-cube.net",
-    "matarrelli@global-cube.net",
-    "winkler@global-cube.net",
-    "karaca@global-cube.net",
+    "m.geiss@global-cube.de",
+    "matarrelli@global-cube.de",
+    "winkler@global-cube.de",
+    "karaca@global-cube.de",
 ]
 
 base_dir = Path(__file__).parent / "data"
@@ -147,7 +147,7 @@ def copy_contact(p_from: Contact, p_to: Contact) -> SerialContact:
 @app.command()
 def sync_contacts():
     account.authenticate()
-    shared = account.address_book(resource="adressbuch@global-cube.net", address_book="personal")
+    shared = account.address_book(resource="support@global-cube.de", address_book="personal")
     shared_contacts = {p.display_name: p for p in shared.get_contacts(limit=None)}
     shared_contacts_serial = [SerialContact.from_o365_contact(p) for p in shared_contacts.values()]
     shared_contacts_serial.sort()

+ 6 - 1
mailserver/imap.py

@@ -62,7 +62,12 @@ class Imap:
     def move(self):
         with self.connect("archiv") as mb:
             messages = mb.fetch(
-                criteria=AND(from_="@global-cube.com"), mark_seen=True, bulk=True, limit=1000, headers_only=True
+                criteria=AND(from_="@global-cube.com"),
+                mark_seen=True,
+                bulk=True,
+                limit=2_000,
+                headers_only=True,
+                reverse=True,
             )
 
             for msg in messages: