Problem with syncing mail with attachments

Britt Anderson britt at uwaterloo.ca
Sun Feb 15 12:52:21 GMT 2015


Britt Anderson <britt <at> uwaterloo.ca> writes:

> 
> I would appreciate advice on whether this is an issue correctible
> within offlineimap, and if not, any suggestions for pursuing a solution.
> 
> I now receive an error message when trying to append messages from my
> local to remote if they have a pdf attachment. It reports Errno 14 Bad
> Address socket error.
> 
> As more background, For sometime now I have been happily using offlineimap
to get my mails
> from an exchange server at my university, and after using mutt to
> locally refile, write, and so forth, using offlineimap to sync the
> changes back. Everything has worked well until the last few days when
> things would occasionally hang. It took me awhile to identify the
> pattern in the messages, but it appears the problem is only with mails
that have pdf attachments when I refile
> them on my laptop and then try to communicate that change to the remote.
> The downloading from remote to local works fine, and email without
> attachments still do what I want.
> 
> Appreciate any advice. -- Some of the info and debug files follows. I
> can post the entire debug output if advised. /Britt
> 
> Here is the Offline Info output:
> 
> OfflineIMAP 6.5.5
>   Licensed under the GNU GPL v2+ (v2 or any later version)
> Remote repository 'uwloo-remote': type 'IMAP'
> Host: connect.uwaterloo.ca Port: 993 SSL: True
> Establishing connection to connect.uwaterloo.ca:993
> Server welcome string: * OK The Microsoft Exchange IMAP4 service is ready.
> Server capabilities: ('IMAP4', 'IMAP4REV1', 'AUTH=NTLM', 'AUTH=GSSAPI',
'AUTH=PLAIN', 'UIDPLUS',
> 'CHILDREN', 'IDLE', 'NAMESPACE', 'LITERAL+')
> 
> folderfilter= lambda foldername: foldername in
['watching','INBOX','archives/y2015','Sent Items']
> 
> Folderlist:
>  actReq (disabled)
>  Archive (disabled)
>  archives (disabled)
>  archives/y2005 (disabled)
>  archives/y2006 (disabled)
>  archives/y2007 (disabled)
>  archives/y2008 (disabled)
>  archives/y2009 (disabled)
>  archives/y2010 (disabled)
>  archives/y2011 (disabled)
>  archives/y2012 (disabled)
>  archives/y2013 (disabled)
>  archives/y2014 (disabled)
>  archives/y2015
>  Calendar (disabled)
>  Contacts (disabled)
>  Deleted Items (disabled)
>  Deleted Items/actReq (disabled)
>  Deleted Items/Junk E-Mail (disabled)
>  Drafts (disabled)
>  INBOX
>  Journal (disabled)
>  Junk (disabled)
>  Junk E-Mail (disabled)
>  Notes (disabled)
>  Outbox (disabled)
>  RSS Feeds (disabled)
>  Sent (disabled)
>  Sent Items
>  Sync Issues (disabled)
>  Sync Issues/Conflicts (disabled)
>  Sync Issues/Local Failures (disabled)
>  Sync Issues/Server Failures (disabled)
>  Tasks (disabled)
>  Templates (disabled)
>  Trash (disabled)
>  watching
> 
> Local repository 'uwloo-local': type 'Maildir'
> Folderlist:
>  Sent Items
>  INBOX
>  Trash
>  watching
>  archives.y2014
>  archives.y2015
>  Drafts
> 
> And here are some of the relevant lines of the end of debug file where the
> error messages appear and the tracing information is printed.
> 
> 2015-02-08 13:46:26 DEBUG: [imap]:   46:26.15 Account sync uwloo
_get_untagged_response(CAPABILITY)
> => ['IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN UIDPLUS CHILDREN
IDLE NAMESPACE LITERAL+']
> 2015-02-08 13:46:26 DEBUG: [imap]:   46:26.15 Account sync uwloo
_untagged_response(OK, ?, CAPABILITY)
> => ['IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN UIDPLUS CHILDREN
IDLE NAMESPACE LITERAL+']
> 2015-02-08 13:46:26 INFO: ERROR: Saving msg in folder 'archives/y2015',
repository 'uwloo-remote'
> failed (abort). Server responded: command: APPEND => socket error: <class
'socket.error'> - [Errno 14]
> Bad address
> Message content was: Received: from mailchk-m05.uwaterloo.ca
(129.97.128.141) by
>  connhub2.connect.uwaterloo.ca (129.97.149.119) with Microsoft SMTP Server
>  (TLS) id 14....DQolJUVPRg0K
> 2015-02-08 13:46:26 INFO: *** Finished account 'uwloo' in 1:06
> 2015-02-08 13:46:26 WARNING: ERROR: Exceptions occurred during the run!
> 2015-02-08 13:46:26 WARNING: ERROR: command: APPEND => socket error:
<class 'socket.error'> - [Errno
> 14] Bad address
> 2015-02-08 13:46:26 WARNING: 
> Traceback:
>   File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line
560, in savemessage
>     date, content)
>   File "/usr/lib/python2.7/site-packages/offlineimap/imaplib2.py", line
624, in append
>     return self._simple_command(name, mailbox, flags, date_time, **kw)
>   File "/usr/lib/python2.7/site-packages/offlineimap/imaplib2.py", line
1615, in _simple_command
>     return self._command_complete(self._command(name, *args), kw)
>   File "/usr/lib/python2.7/site-packages/offlineimap/imaplib2.py", line
1378, in _command_complete
>     typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
>   File "/usr/lib/python2.7/site-packages/offlineimap/imaplib2.py", line
176, in get_response
>     raise typ(exc_fmt % str(val))
> 
> 2015-02-08 13:46:26 WARNING: ERROR: Saving msg in folder 'archives/y2015',
repository 'uwloo-remote'
> failed (abort). Server responded: command: APPEND => socket error: <class
'socket.error'> - [Errno 14]
> Bad address
> Message content was: Received: from mailchk-m05.uwaterloo.ca
(129.97.128.141) by
>  connhub2.connect.uwaterloo.ca (129.97.149.119) with Microsoft SMTP Server
>  (TLS) id 14....DQolJUVPRg0K
> 
> --20cf3011dd8180da44050e97c12b--
> 
> 2015-02-08 13:46:26 WARNING: 
> Traceback:
>   File "/usr/lib/python2.7/site-packages/offlineimap/folder/Base.py", line
586, in copymessageto
>     new_uid = dstfolder.savemessage(uid, message, flags, rtime)
>   File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line
586, in savemessage
>     OfflineImapError.ERROR.MESSAGE)
> 
> _______________________________________________
> OfflineIMAP-project mailing list: OfflineIMAP-project <at>
lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
> 
> OfflineIMAP homepages:
> - https://github.com/OfflineIMAP
> - http://offlineimap.org
> 
> 


This is a follow-up to provide some further information in case anyone else
should be so unfortunate as to suffer a similar problem.

To refresh: I had a failure between offlineimap and an exchange server only
for the special case that I changed the folder of an email with pdf and doc
attachments. The error was a socket error Errno 14. 

I reviewed the system with maintainers of the Exchange server at my
university. A review of the logs could not pinpoint the problem. 

I set up a second laptop with the same versions of python, offlineimap and
mutt and everything always worked. So, presumably there is some machine
specific setting that I cannot find to fix. I ran out of ideas, and was
forced to try, <sigh> isync/mbsync

This has worked perfectly on the same machine where offlineimap fails. So,
there appears to be some inexplicable interaction between offlineimap and
some occult other library or something. I wish I could provide more
specifics and I am happy to test other ideas.

I would like to end by saying that I like offlineimap, have used it happily
for years, and appreciate the work done by the team to develop and maintain.
It is with great regret that I am forced to something else, but ultimately I
exhausted my fund of knowledge and needed a functioning system on this laptop. 






More information about the OfflineIMAP-project mailing list