Bug 425838

Summary: mbsync exits with an error with gmail IMAP
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: isyncAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: isync-1.0.3-5.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-17 12:28:54 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 235705    

Description Nicolas Mailhot 2007-12-16 07:27:30 EST
Description of problem:

Mbsync is chatty even with -qq, making it unsuitable for running in cron jobs

$ mbsync -a -qq > /dev/null
IMAP warning: SSL support not available
*** IMAP Warning *** Password is being sent in the clear
IMAP error: malformed SEARCH response
IMAP error: malformed SEARCH response
IMAP warning: SSL support not available
*** IMAP Warning *** Password is being sent in the clear
IMAP warning: SSL support not available
*** IMAP Warning *** Password is being sent in the clear
IMAP warning: SSL support not available
*** IMAP Warning *** Password is being sent in the clear
IMAP warning: SSL support not available
*** IMAP Warning *** Password is being sent in the clear

Version-Release number of selected component (if applicable):

isync-1.0.3-4.fc9.x86_64
Comment 1 Lubomir Kundrak 2007-12-16 13:18:41 EST
Nicolas, Thanks for the report!

Problem is that mbsync does not use getopt() for parsing command line arguments
and treats '-qq' as single '-q'. Therefore the workaround for you is to use '-q
-q' and mbsync should be quiet. Please let me know if it solved your problem and
if mbsync is quiet then.

I'll try to inspect how hard would it be to teach mbsync use getopt or modify it
to understand multiple single letter options with a single dash, or eventually
adjust the documentation.
Comment 2 Lubomir Kundrak 2007-12-16 14:08:41 EST
Not. I shamelessly lied. mbsync was ignoring all but first one-letter option
from the last argument. The fix is in CVS and is building in koji as
isync-1.0.3-5.fc9 [1].  Please test the fix and confirm if it solves your
problem and doesn't break anything else for you. Thanks!

[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=295913
Comment 3 Nicolas Mailhot 2007-12-17 06:57:54 EST
This one is better but I still get

$ mbsync -qq -a
IMAP error: malformed SEARCH response

And IIRC gmail is causing this, so it's going to hit a lot of people
Comment 4 Lubomir Kundrak 2007-12-17 07:21:32 EST
Thanks for the feedback, Nicholas. I assume this is not to be quietened by -q as
it is not a warning but an error.

I do not have a gmail account and I am wondering if it really violates IMAP (I
did not even know gmail supports IMAP), or mbsync just misunderstands something.
Could you please run mbsync with -V argument and paste/attach the relevant part
of the IMAP conversation?

(Please don't forget to double check that it doesn't contain password and other
private data before you paste, though mbsync should attempt to remove those from
the log)
Comment 5 Lubomir Kundrak 2007-12-17 12:28:54 EST
Nicolas: This problem seems like one that is reported in bug #420721. I'll close
this bug now, make an updated package, and add a note there.