offlineimap3 icon indicating copy to clipboard operation
offlineimap3 copied to clipboard

ERROR: command: APPEND => no response after x secs

Open TonyBarganski opened this issue 3 years ago • 2 comments

General informations

  • system/distribution (with version): macOS 11.6.5
  • offlineimap version (offlineimap -V): 8.0.0, imaplib2 v3.06, OpenSSL 1.1.1o
  • Python version: v3.7.13
  • server name or domain: outlook.office365.com
  • CLI options: offlineimap -c offlineimaprc -o -a live

Configuration file offlineimaprc

[general]
# List of accounts to be synced, separated by a comma.
accounts = live 
#ssl_version = ssl23
#ssl_version = tls1_2

# Help recover from computer suspend
socktimeout = 10 

[Account live]
# Identifier for the local repository; e.g. the maildir to be synced via IMAP.
localrepository = live-local

# Minutes between syncs
#autorefresh = 1 # In minutes not seconds. Doesn't work on OS X. Don't use since we use wrapper 'offlineimap-load'

# Identifier for the remote repository; i.e. the actual IMAP, usually non-local.
remoterepository = live-remote

# Maxage of mail to synchronize in days
# maxage = 90  # 3 months
maxage = 182
# 6 months

### LOCAL REPOSITORY ### 
[Repository live-local]
type = Maildir
localfolders = ~/Maildir-live
nametrans = lambda foldername: foldername.replace('Junk Email', 'Junk')

### REMOTE REPOSITORY ### 
[Repository live-remote]
type = IMAP
# This only works in continuous mode since using '-o' option runs and exits by nature
keepalive = 100
holdconnectionopen = yes
#auth_mechanisms = LOGIN, GSSAPI, CRAM-MD5, PLAIN, XOAUTH2 
auth_mechanisms = XOAUTH2, PLAIN 

#remotehost = imap-mail.outlook.com
remotehost = outlook.office365.com
remoteuser = 
remotepass = 
remoteport = 993
ssl = yes
maxconnections = 1
realdelete = no
nametrans = lambda foldername: foldername.replace('Junk', 'Junk Email')
sslcacertfile = /etc/ssl/certs/ca-certificates.crt

pythonfile (if any)

REMOVE PRIVATE DATA.

Logs, error

Folder Sent [acc: live]:
 Syncing Sent: IMAP -> Maildir
 Copy message UID 1391 (1/1) live-remote:Sent -> live-local:Sent
 Copy message UID -1 (1/1) live-local:Sent -> live-remote:Sent
Folder Snoozed [acc: live]:
 Syncing Snoozed: IMAP -> Maildir
Account sync live:
 *** Finished account 'live' in 0:45
ERROR: Exceptions occurred during the run!
ERROR: command: APPEND => no response after 10.0 secs

Traceback:
  File "/usr/local/lib/python3.7/site-packages/offlineimap/folder/IMAP.py", line 710, in savemessage
    date,  msg.as_bytes(policy=output_policy))
  File "/usr/local/lib/python3.7/site-packages/imaplib2/imaplib2.py", line 687, in append
    return self._simple_command(name, mailbox, flags, date_time, **kw)
  File "/usr/local/lib/python3.7/site-packages/imaplib2/imaplib2.py", line 1705, in _simple_command
    return self._command_complete(self._command(name, *args), kw)
  File "/usr/local/lib/python3.7/site-packages/imaplib2/imaplib2.py", line 1449, in _command_complete
    typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
  File "/usr/local/lib/python3.7/site-packages/imaplib2/imaplib2.py", line 212, in get_response
    raise typ(exc_fmt % str(val))

ERROR: Saving msg ( <AM6PR01MB4742E397392FFECA16170697ECD09@AM6PR01MB4742.eurprd01.prod.exchangelabs.com>) in folder 'Inbox', repository 'live-remote' failed (abort). Server responded: command: APPEND => no response after 10.0 secs

Traceback:
  File "/usr/local/lib/python3.7/site-packages/offlineimap/folder/Base.py", line 815, in copymessageto
    new_uid = dstfolder.savemessage(uid, message, flags, rtime)
  File "/usr/local/lib/python3.7/site-packages/offlineimap/folder/IMAP.py", line 742, in savemessage
    exc_info()[2])

Press any key to continue...

---
Yahoo Account: Error message

Steps to reproduce the error

I'm not sure how to reproduce the error as this happens intermittently on various emails on both my Outlook and my Yahoo accounts with the same APPEND timeout message.

I've cleared out my offlineimap cache using rm -fR ./offlineimap/* but to no effect.

I had noticed a large (22Mb) file attachment in my 'sent' folder locally which I deleted from my Yahoo as a troubeshooting task after reading and old post, but this had no effect.

My wrapper script tests for failures and although I think I'm receiving all my emails, I'm not sure and my wrapper script is configured with Zenity pop-ups alerting me that mail fetch ran with problems.

I don't know how to find the UID of an email in my local Maildir folders and the one in the error log above is on the remote server it seems.

TonyBarganski avatar May 21 '22 10:05 TonyBarganski

It seems this may be a known issue as stated in issue 18: Big messages cause an APPEND timeout?

TonyBarganski avatar May 24 '22 07:05 TonyBarganski

You should increase that socktimeout = 10 in your [general] section, to e.g. socktimeout = 50.

It worked for me. (it will take longer for offlineimap to recognize broken connections on e.g. suspend/resume on laptops, but it will fix issue for big mails / slow links).

mnalis avatar Feb 11 '24 23:02 mnalis