[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [imapsync] BAD parse error: invalid digit in date string


From "Phil Pearl (Lobbes)" <phil at zimbra dot com>
Subject Re: [imapsync] BAD parse error: invalid digit in date string
Date Mon, 30 Nov 2009 07:24:08 -0800 (PST)

Using this info...

> internal date from 1: [30-Dec-2003 19:25:26 -0500]
> internal date from 1: ["30-Dec-2003 19:25:26 -05:00:00"] (fixed) 
> flags from: [\Seen $NotJunk]["30-Dec-2003 19:25:26 -05:00:00"] 
> Couldn't append msg #101 (Subject:[RE: Greetings!]) to folder Inbox/Joseph: Error sending '110 APPEND Inbox/Jobs (\Seen $NotJunk) "30-Dec-2003 19:25:26 -05:00:00" {6116}': 110 BAD parse error: invalid digit in date string 

For some reason the append is being attempted with an invalid date-time specifier.  For reference, here's what the rfc (http://www.faqs.org/rfcs/rfc3501.html) has:

  append          = "APPEND" SP mailbox [SP flag-list] [SP date-time] SP
                    literal
  ...
  date-time       = DQUOTE date-day-fixed "-" date-month "-" date-year
                    SP time SP zone DQUOTE
  ...
  zone            = ("+" / "-") 4DIGIT
                      ; Signed four-digit value of hhmm representing
                      ; hours and minutes east of Greenwich (that is,
                      ; the amount that the given time differs from
                      ; Universal Time).  Subtracting the timezone
                      ; from the given time will give the UT form.
                      ; The Universal Time zone is "+0000".

The curious thing is that looking at the debug a good date-time specifier (30-Dec-2003 19:25:26 -0500) is being turned into a bad date-time specifier (30-Dec-2003 19:25:26 -05:00:00).  In the code a subroutine good_date() is called using UnixDate(ParseDate(...)) to fix up the date but it appears for some reason on your system the wrong thing happens.

What version of Date::Manip is imapsync using when this happens?  Please try the following and let us know the output (this may require you adjust PERL5LIB or use -I @INCPATH to match whatever you use when running imapsync):

  $ perl -le 'use Date::Manip; my $d = shift; print Date::Manip->VERSION, " gives: ", UnixDate(ParseDate($d), "%d-%b-%Y %H:%M:%S %z");' "30-Dec-2003 19:25:26 -0500"

On my RHEL4 test box I get good output:
  5.54 gives: 30-Dec-2003 19:25:26 -0500

Phil

----- Original Message ----- 
From: "Mike" <mike at soroki dot com> 
To: imapsync at linux-france dot org 
Sent: Sunday, November 29, 2009 10:25:58 PM GMT -05:00 US/Canada Eastern 
Subject: [imapsync] BAD parse error: invalid digit in date string 

Hi, 

Tried posting a similar question on Zimbra forum but so far without any feedback. I was hoping that maybe this forum might be a more appropriate place to ask... 

I was planning to migrate from Qmail/Courier-imap v4.1.1 to the latest OpenSource Zimbra GA. I have a few accounts that I would like to move over to the new setup. Reading through the posts, I am sensing that a lot of people recommending to utilize ImapSync tool to migrate existing e-mail accounts over. 

My initial efforts resulted in an empty IMAP folders with errors related to date format in the header for each email message. Tried searching through the forum and no one seems to yet doubt with this particular error in this particular release... Any help would be greatly appreciated... 

zcs-6.0.3_GA_1915.F11.20091118105056 
imapsync-1.286 
Courier-imap v4.1.1 

imapsync --buffersize 8192000 --nosyncacls --subscribe --syncinternaldates --host1 10.0.0.1 --user1 client1 --password1  PWCHANGED --host2 10.0.0.2 --user2 client2 --password2  PWCHANGED --noauthmd5 --folder Inbox.Jobs --debug 

++++ Looping on each folder ++++ 
>From Folder [Inbox.Jobs] 
To Folder [Inbox/Jobs] 
To Folder Inbox/Jobs does not exist 
Creating folder [Inbox/Jobs] 
++++ From [Inbox.Jobs] Parse 1 ++++ 
++++ To [Inbox/Jobs] Parse 1 ++++ 
++++ Verifying [Inbox.Jobs] -> [Inbox/Jobs] ++++ 

+ NO msg #4 [R7k4uMKC0mCiZgQLnmzYeg:12320] in Inbox/Jobs 
+ Copying msg #4:12320 to folder Inbox/Jobs 
flags from: [\Seen $NotJunk]["21-May-2002 11:37:52 -04:00:00"] 
Couldn't append msg #4 (Subject:[Delivered: Admin]) to folder Inbox/Jobs: Error sending '13 APPEND Inbox/Jobs (\Seen $NotJunk) "21-May-2002 11:37:52 -04:00:00" {12320}': 13 BAD parse error: invalid digit in date string 


------=_NextPart_000_0ED0_01C58F26.6170F890-- 
F message content ended on previous line 
================================================== ============================== 
internal date from 1: [30-Dec-2003 19:25:26 -0500] 
internal date from 1: ["30-Dec-2003 19:25:26 -05:00:00"] (fixed) 
flags from: [\Seen $NotJunk]["30-Dec-2003 19:25:26 -05:00:00"] 
Couldn't append msg #101 (Subject:[RE: Greetings!]) to folder Inbox/Joseph: Error sending '110 APPEND Inbox/Jobs (\Seen $NotJunk) "30-Dec-2003 19:25:26 -05:00:00" {6116}': 110 BAD parse error: invalid digit in date string 
Time: 7 s 
++++ End looping on each folder ++++ 
++++ Statistics ++++ 
Time: 8 sec 
Messages transferred : 0 
Messages skipped : 0 
Total bytes transferred: 0 
Total bytes skipped : 0 
Total bytes error : 2178889 
Detected 101 errors