OfflineIMAP / offlineimap

Read/sync your IMAP mailboxes (python2) [LEGACY: move to offlineimap3]
http://www.offlineimap.org
Other
1.78k stars 360 forks source link

Server responded: APPEND command error: BAD [b'[TOOBIG] Message too large. https://support.google.com/mail/answer/6584#limit'] #724

Open cpbl opened 2 years ago

cpbl commented 2 years ago

General informations

Configuration file offlineimaprc


[general]
accounts = meuserStanfordGMAIL
maxsyncaccounts=1

metadata=~/.offlineimap

# Simply provides passwords
pythonfile=~/Private/bin/offlineimap.py

[Account meuserStanfordGMAIL]
localrepository = gmailStanfordLocal
remoterepository = gmailStanfordRemote

[Repository gmailStanfordLocal]
type = Maildir
localfolders = /home/meuser/imap/gmailStanford
nametrans = lambda folder: re.sub('spam', '[Gmail].Spam',
                           re.sub('drafts', '[Gmail].Drafts',
                           re.sub('sent', '[Gmail].Sent Mail',
                           re.sub('^trash$', '[Gmail].Trash',
               re.sub('spam', '[Gmail]/Spam',
                           re.sub('drafts', '[Gmail]/Drafts',
                           re.sub('sent', '[Gmail]/Sent Mail',
                           re.sub('[Gmail].Spam','spam', 
                           re.sub('[Gmail].Drafts','drafts', 
                           re.sub('[Gmail].Sent Mail','sent', 
                           re.sub('[Gmail].Trash$','trash',
                           re.sub('[Gmail]/Spam','spam', 
                           re.sub('[Gmail]/Drafts','drafts', 
                           re.sub('[Gmail]/Sent Mail','sent', 
                           re.sub('[Gmail]/Trash$','trash', folder)))))))))))))))
foldersort=mycmp

[Repository gmailStanfordRemote]

createfolders=False

type = Gmail
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
ssl_version=tls1_2 
remoteuser = meuser@alumni.stanford.edu
remotepass=mypass
realdelete = no
foldersort=mycmp

nametrans = lambda folder: re.sub('spam', '[Gmail].Spam',
                           re.sub('drafts', '[Gmail].Drafts',
                           re.sub('sent', '[Gmail].Sent Mail',
                           re.sub('^trash$', '[Gmail].Trash',
               re.sub('spam', '[Gmail]/Spam',
                           re.sub('drafts', '[Gmail]/Drafts',
                           re.sub('sent', '[Gmail]/Sent Mail',
                           re.sub('[Gmail].Spam','spam', 
                           re.sub('[Gmail].Drafts','drafts', 
                           re.sub('[Gmail].Sent Mail','sent', 
                           re.sub('[Gmail].Trash$','trash',
                           re.sub('[Gmail]/Spam','spam', 
                           re.sub('[Gmail]/Drafts','drafts', 
                           re.sub('[Gmail]/Sent Mail','sent', 
                           re.sub('[Gmail]/Trash$','trash', folder)))))))))))))))

folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail','[Gmail].All Mail','[Gmail]/Important','[Gmail]/Sent Mail','[Gmail]/Sent Mail', '[Gmail]/Chats','sent','[Gmail].Starred']
maxconnections = 3

pythonfile (if any)

def get_password(server):
  ...

Logs, error


2022-09-04 10:31:01 WARNING: ERROR: Exceptions occurred during the run!
2022-09-04 10:31:01 WARNING: ERROR: Saving msg ( <...........CANPRD01.PROD.OUTLOOK.COM>) folder 'myfolder', repo 'myrepo'failed (error). Server responded: APPEND command error: BAD [b'[TOOBIG] Message too large. https://support.google.com/mail/answer/6584#limit']. Data: b'DBBL29 APPEND myfolder (\\Seen) "09-Nov-2021 12:01:30 -0500" {36512387}\r\n'

2022-09-04 10:31:01 WARNING: 
Traceback:
  File "/usr/share/offlineimap3/offlineimap/folder/Base.py", line 815, in copymessageto
    new_uid = dstfolder.savemessage(uid, message, flags, rtime)
  File "/usr/share/offlineimap3/offlineimap/folder/Gmail.py", line 199, in savemessage
    return super(GmailFolder, self).savemessage(uid, msg, flags, rtime)
  File "/usr/share/offlineimap3/offlineimap/folder/IMAP.py", line 752, in savemessage
    raise OfflineImapError(

Steps to reproduce the error

I cannot find the offending email message, but my offlineimap run fails every time due to this TOOBIG error. Any help to further characterize the problem or to debug this?