Ref: https://hobo.house/2017/07/17/using-offlineimap-with-the-gmail-imap-api/