Ama*_*nda 7 email command-line thunderbird
我正在尝试解决令人沮丧的收件箱配额问题。Thunderbird 说我的收件箱已满 80%。我的 ISP 说不是。我们做了一些调整,我应该有 2G 可用(它已经“无限”)。不幸的是,Thunderbird 仍然报告说我在配额根“ROOT”上使用了 256000 KB 限制中的 206456。
是否有命令行方法可以用来找出我的邮件主机告诉 Thunderbird 的内容?穆特能告诉我吗?
也许 Pythonimaplib库可以提供帮助。从终端启动一个 python 控制台python。然后,使用以下命令创建 IMAP 连接:
>>> import imaplib
>>> conn = imaplib.IMAP4('hostname')
>>> conn.login('username', 'password')
Run Code Online (Sandbox Code Playgroud)
如果您的 IMAP 服务器使用 SSL,请使用IMAP4_SSL构造函数而不是IMAP4. 然后您可以在连接上使用getquotaroot或getquota方法。例如:
>>> conn.getquotaroot('INBOX')
>>> conn.getquota('quota root') # using the root from the previous command
Run Code Online (Sandbox Code Playgroud)