IMAP Backend does not work with Yahoo server

Bug #1367675 reported by Daniel Fett
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

Duplicity version: 0.6.18

When using Yahoo as a IMAP backend, an error appears:

error: FETCH command error: BAD ['[CLIENTBUG] FETCH Command arguments invalid']

The reason is that in the fetch command that the IMAP backend produces, a range is given as wrong ("1:" instead of "1:4"). Tracing down the bug I discovered that Yahoo, when listing the mail UIDs, adds an extra space in the end, which causes the split(" ") to produce an empty element as the last list item. This causes the fetch command to be formatted wrong. Changing Line 215 from

        nums=list[0].split(" ")

to

        nums=list[0].strip().split(" ")

resolves the bug.

Revision history for this message
John (wkmsbu) wrote :

I can confirm this bug, running 0.7.02-2 on debian jessie, though strangely I could connect successfully to the Yahoo IMAP backend and upload files for some time before I got the error. I then couldn't connect anymore.

Anyways, I someone else is wondering the "line 215" referred to is the in duplicity's imapbackend.py file, in my case located in /usr/lib/python2.7/dist-packages/duplicity/backends/ (find it by typing "locate imapbackend.py" in the terminal).

Revision history for this message
John (wkmsbu) wrote :

Oh, yeah, and the fix worked in my case to. I just edited the file and ran the same duplicity command again. Thanks!

Revision history for this message
Thomas (maxmusterm) wrote :

Got another problem with yahoo sel.conn.select tries to create remote_filename - yahoo doesn't allow that either so the fix is to add a

> self.conn.create(remote_filename)

before the

> self.conn.select(remote_filename)

Also now the split is needed twice.
> (result, list) = self.conn.fetch(list[0], "(RFC822)")
would fail otherwise

Revision history for this message
Thomas (maxmusterm) wrote :

PS
I know the create is weird and not intended and stupid...
But it's the only way (at least the only one I found) to get it working.
PPS
After the create we need a delete m-( there is probably a _right_ solution... but I guess this is a yahoo bug? Would be glad to be corrected on that

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.12
status: New → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.