Ubuntu – “speak IMAP” and review the actual mail quota

command lineemailthunderbird

I'm trying to troubleshoot a frustrating inbox quota issue. Thunderbird says my inbox is 80% full. My ISP says it isn't. We made some tweaks and I should have 2G available (it had been "unlimited"). Thunderbird, unfortunately, still reports that I'm using 206456 of my 256000 KB limit on Quota Root "ROOT."

Is there a command line method I can use to find out what my mail host is telling Thunderbird? Can Mutt tell me?

Best Answer

  • Perhaps the Python imaplib library could help. Launch a python console from the terminal with python. Then, create an IMAP connection with the following commands:

    >>> import imaplib
    >>> conn = imaplib.IMAP4('hostname')
    >>> conn.login('username', 'password')

    If your IMAP server uses SSL, use the IMAP4_SSL constructor instead of IMAP4. You can then use the getquotaroot or getquota methods on the connection. For example:

    >>> conn.getquotaroot('INBOX')
    >>> conn.getquota('quota root') # using the root from the previous command
  • Related Question