chatmail/scripts/get_imap_capabilities.py

15 lines
299 B
Python
Raw Normal View History

import os
import time
import imaplib
domain = os.environ.get("CHATMAIL_DOMAIN", "c3.testrun.org")
print("connecting")
conn = imaplib.IMAP4_SSL(domain)
print("logging in")
2023-10-15 19:14:18 +02:00
conn.login(f"imapcapa", "pass")
2023-10-15 19:14:18 +02:00
status, res = conn.capability()
for capa in sorted(res[0].decode().split()):
print(capa)