Hi Sebastien!

On Sat, 07 May 2011 22:42:00 +0200, Sebastian Spaeth wrote:
>>    self.outfd.write(data)
>> IOError: [Errno 32] Broken pipe
>> 
>> Next sync in 30:00
>> 1: [  0:10]       PcaHome: imap(luca.capello): Info: Disconnected for
>> inactivity bytes=228496/11784489
>  
> Well, after some time idling, the server disconnected you and the
> connection became invalid. We should have caught that better.
>
>
> You might want to try the
> keepalive = 60
>
> option to keep you connected during that time.

According to /usr/share/doc/offlineimap/examples/offlineimap.conf.gz (it
is a pity that there is no `man offlineimaprc`):

  # If you want to have "keepalives" sent while waiting between syncs,
  # specify the amount of time IN SECONDS between keepalives here.  Note that
  # sometimes more than this amount of time might pass, so don't make it
  # tight.  This setting has no effect if autorefresh and holdconnectionopen
  # are not both set.
  #
  # keepalive = 60

Which means that I should set holdconnectionopen for the remote server,
always according to the file above:

  # OfflineIMAP normally closes IMAP server connections between refreshes if
  # the global option autorefresh is specified.  If you wish it to keep the
  # connection open, set this to true.  If not specified, the default is
  # false.  Keeping the connection open means a faster sync start the
  # next time and may use fewer server resources on connection, but uses
  # more server memory.  This setting has no effect if autorefresh is not set.
  #
  holdconnectionopen = no

This is a no-op, sorry, the connection *must* be closed between
refreshes.

> Also I am not sure why you need to keepconnectionsopen=True for those
> idling 30 minutes. Surely you can close them inbetween?

Except for the fact that it is holdconnectionopen (I still do not
understand why the mixture of 'hold' and 'keep'...), this option is not
set for the remote server, but only for the local one:

  
<http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=gismo_dot-offlineimaprc;att=1;bug=618551>

> That having said, it seems we need to work on the robustness of the
> thing, so we detect when the connection has been broken. I have noted
> that down in our TODO list.

Thank you.

Nevertheless, it seemed it was actually a server-connection problem,
i.e. the ADSL on the server end seemed to disconnect from time to time
even it it was supposed to be a full-time, dedicated commercial line
(not end-user).  However, after having changed the ADSL modem and
checked that the connection is not broken anymore, re-trying in the
latest days gives a similar error, but I am not sure it is the same
(fell free to clone this bug in case):
=====
luca.capello@gismo:~$ time offlineimap -u Blinkenlinghts -f INBOX
OfflineIMAP 6.3.3
[...]
COPYING for details.  This is free software, and you are welcome
to distribute it under the conditions laid out in COPYING.
***** Processing account PcaHome
Copying folder structure from IMAP to MappedIMAP
Establishing connection to home.pca.it:993.
Establishing connection to tunnel:MAIL=maildir:$HOME/Maildir 
/usr/lib/dovecot/imap.
Syncing INBOX: IMAP -> MappedIMAP
Scanning folder [MappedIMAP/INBOX]
Scanning folder [IMAP/INBOX]
Copy message 8543 IMAP[INBOX] -> MappedIMAP[INBOX]
Copy message 8545 IMAP[INBOX] -> MappedIMAP[INBOX]
Copy message 8544 IMAP[INBOX] -> MappedIMAP[INBOX]
Next sync in 30:00
2: [active]      *Control: .
***** Finished processing account PcaHome
Copying folder structure from IMAP to MappedIMAP
Establishing connection to home.pca.it:993.
WARNING: Error occured attempting to sync account PcaHome: Traceback (most 
recent call last):
  File "/usr/lib/pymodules/python2.6/offlineimap/accounts.py", line 207, in 
syncrunner
    self.sync(siglistener)
  File "/usr/lib/pymodules/python2.6/offlineimap/accounts.py", line 246, in sync
    remoterepos.syncfoldersto(localrepos, [statusrepos])
  File "/usr/lib/pymodules/python2.6/offlineimap/repository/Base.py", line 122, 
in syncfoldersto
    destfolders = dest.getfolders()
  File "/usr/lib/pymodules/python2.6/offlineimap/repository/IMAP.py", line 249, 
in getfolders
    listresult = listfunction(directory = self.imapserver.reference)[1]
  File "/usr/lib/pymodules/python2.6/offlineimap/imaplib2.py", line 770, in list
    return self._simple_command(name, directory, pattern, **kw)
  File "/usr/lib/pymodules/python2.6/offlineimap/imaplib2.py", line 1492, in 
_simple_command
    return self._command_complete(self._command(name, *args), kw)
  File "/usr/lib/pymodules/python2.6/offlineimap/imaplib2.py", line 1190, in 
_command
    self._check_bye()
  File "/usr/lib/pymodules/python2.6/offlineimap/imaplib2.py", line 1138, in 
_check_bye
    raise self.abort(bye[-1])
abort: Disconnected for inactivity.

Next sync in 30:00
1: [  0:10]       PcaHome: imap(luca.capello): Info: Disconnected for 
inactivity bytes=17851/59486
CTRL-C pressed, aborting...

real    31m35.701s
user    0m2.052s
sys     0m0.624s
You have mail in /home/luca.capello/Maildir

luca.capello@gismo:~$ 
=====

> BTW, IMAP<->Maildir is much more robust than IMAP<->IMAP, so if possible
> I would recommend that mode of operation.

I know, as I explained at the beginning when reporting the bug, the
problem is the nnimaildir support in Gnus, which is not going to be
fixed soon: 

  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8055>

Thx, bye,
Gismo / Luca

Attachment: pgpfvRcHI52S3.pgp
Description: PGP signature

Reply via email to