Syncronization by imapsync

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

SarganSaor

Syncronization by imapsync

Postby SarganSaor » Mon Jul 23, 2007 6:03 am

Hello

After some months testing I need to return on the previous imap server (dovecot)
But instead successfull syncronization have .....

+ NO msg #1548 [rVCxU9+ReLrJvWSG22q+LQ:53003] in &BBEEOAQ3BD0ENQRB-.&BBEEQwRFBDMEMAQ7BEIENQRABDgETw-
+ Copying msg #1548:53003 to folder &BBEEOAQ3BD0ENQRB-.&BBEEQwRFBDMEMAQ7BEIENQRABDgETw-
flags from : [\Seen $MdnSent \X-Has-Attach][]
101 BAD Invalid system flag \X-HAS-ATTACH
at /usr/bin/imapsync line 1173
Couldn't append msg #1548 (Subject:[=?windows-1251?Q?=CF=CF_=ED=E0=EB=EE=E3=E8_=E7=E0_=EC=E0=F0=F2?=]) to folder &BBEEOAQ3BD0ENQRB-.&BBEEQwRFBDMEMAQ7BEIENQRABDgETw-: 101 BAD Invalid system flag \X-HAS-ATTACH


for all messages.

Previous synchronozation dovecot2scalix was successfull complete.

Help.

les
Scalix Star
Scalix Star
Posts: 819
Joined: Thu Feb 23, 2006 10:18 am
Location: Sydney, Australia

Re: Syncronization by imapsync

Postby les » Mon Jul 23, 2007 6:27 pm

SarganSaor wrote:Hello

After some months testing I need to return on the previous imap server (dovecot)
But instead successfull syncronization have .....

+ NO msg #1548 [rVCxU9+ReLrJvWSG22q+LQ:53003] in &BBEEOAQ3BD0ENQRB-.&BBEEQwRFBDMEMAQ7BEIENQRABDgETw-
+ Copying msg #1548:53003 to folder &BBEEOAQ3BD0ENQRB-.&BBEEQwRFBDMEMAQ7BEIENQRABDgETw-
flags from : [\Seen $MdnSent \X-Has-Attach][]
101 BAD Invalid system flag \X-HAS-ATTACH
at /usr/bin/imapsync line 1173
Couldn't append msg #1548 (Subject:[=?windows-1251?Q?=CF=CF_=ED=E0=EB=EE=E3=E8_=E7=E0_=EC=E0=F0=F2?=]) to folder &BBEEOAQ3BD0ENQRB-.&BBEEQwRFBDMEMAQ7BEIENQRABDgETw-: 101 BAD Invalid system flag \X-HAS-ATTACH


for all messages.

Previous synchronozation dovecot2scalix was successfull complete.

Help.


Thats because scalix imap has additional flags which dont exist on dovecot.
When you went from dovecot to scalix that was fine because you were only importing dovecot standard flags.

You need to use exclude switches in imapsync to ignore those flags. Check the help pages of imapsync.

p.s. out of curiosity why are you going back? what didn't scalix do for you such that you are returning to dovecot?
Regards,

Les Stott

SarganSaor

Postby SarganSaor » Wed Jul 25, 2007 1:29 pm

Ок... Little question. How I can use this server, if simple sync operation cannot be execute?


Still find solution for migration from scalix.... imapsync doesn't work.

SarganSaor

Postby SarganSaor » Wed Jul 25, 2007 3:14 pm

Ок... Little question. How I can use this server, if simple sync operation cannot be execute?


Still find solution for migration from scalix.... imapsync doesn't work.

les
Scalix Star
Scalix Star
Posts: 819
Joined: Thu Feb 23, 2006 10:18 am
Location: Sydney, Australia

Postby les » Wed Jul 25, 2007 4:49 pm

SarganSaor wrote:Ок... Little question. How I can use this server, if simple sync operation cannot be execute?


Still find solution for migration from scalix.... imapsync doesn't work.


Don't quite understand what you want.....

you can easily use imapsync to "backup" or sync mail from scalix to dovecot. I used to do it back in version 10 for backup.

My old backup script looked sort of like this. Note the --regexflag lines will exclude the specific flags when merging into dovecot. You will obviously need to adjust to suit your environment.

imapsync --include "Public Folders" \
--regexflag 's/JunkRecorded//g' \
--regexflag 's/\$Junk//g' \
--regexflag 's/\$NotJunk//g' \
--regexflag 's/NotJunk//g' \
--regexflag 's/Junk//g' \
--regexflag 's/\\X-Has-Attach//g' \
--regexflag 's/\\X-Owner//g' \
--regexflag 's/\\X-Forwarded//g' \
--syncinternaldates \
--host1 $HOST1 \
--port1 $PORT1 \
--user1 $MBOXADMIN \
--password1 $PASSWORD1 \
--port2 $PORT2 \
--user2 $MBOXADMIN \
--password2 $PASSWORD2 \
--host2 $HOST2 >> $LOGFILE 2>> $ERRORFILE
Regards,

Les Stott

SarganSaor

Postby SarganSaor » Mon Jul 30, 2007 9:56 am

Doesn't work

++++ Statistics ++++
Time : 2628 sec
Messages transferred : 1530
Messages skipped : 0
Total bytes transferred: 191593464
Total bytes skipped : 0
Total bytes error : 873135
Detected 3 errors

..but, size of scalix mail folder - 3.9G , and size of dovecot maildir - 186M .....

Question! Where the rest?

les
Scalix Star
Scalix Star
Posts: 819
Joined: Thu Feb 23, 2006 10:18 am
Location: Sydney, Australia

Postby les » Mon Jul 30, 2007 10:44 am

SarganSaor wrote:Doesn't work

++++ Statistics ++++
Time : 2628 sec
Messages transferred : 1530
Messages skipped : 0
Total bytes transferred: 191593464
Total bytes skipped : 0
Total bytes error : 873135
Detected 3 errors

..but, size of scalix mail folder - 3.9G , and size of dovecot maildir - 186M .....

Question! Where the rest?


Where's the rest of the info?????

Detected 3 errors? what are they? what commands are you running? We cant help if you dont give us enough info......
Regards,

Les Stott

SarganSaor

Postby SarganSaor » Mon Jul 30, 2007 12:04 pm

ok

1. imapsync --host1=mail.domain.ru --user1=user@domain.ru --password1=xxxxx --host2=mail.domain.ru --user2=user --password2=xxxxx --port2=10143 --noauthmd5 --include "Public Folders" --regexflag 's/JunkRecorded//g' --regexflag 's/\$Junk//g' --regexflag 's/\$NotJunk//g' --regexflag 's/NotJunk//g' --regexflag 's/Junk//g' --regexflag 's/\\X-Has-Attach//g' --regexflag 's/\\X-Owner//g' --regexflag 's/\\X-Forwarded//g' --syncinternaldates

2. 3 error:

From Folder Other Users : Could not select 3367 NO cannot SELECT that mailbox
From Folder Public Folders : Could not select 3368 NO cannot SELECT that mailbox
Use of uninitialized value in split at /usr/bin/imapsync line 1964.

les
Scalix Star
Scalix Star
Posts: 819
Joined: Thu Feb 23, 2006 10:18 am
Location: Sydney, Australia

Postby les » Mon Jul 30, 2007 6:14 pm

SarganSaor wrote:ok

1. imapsync --host1=mail.domain.ru --user1=user@domain.ru --password1=xxxxx --host2=mail.domain.ru --user2=user --password2=xxxxx --port2=10143 --noauthmd5 --include "Public Folders" --regexflag 's/JunkRecorded//g' --regexflag 's/\$Junk//g' --regexflag 's/\$NotJunk//g' --regexflag 's/NotJunk//g' --regexflag 's/Junk//g' --regexflag 's/\\X-Has-Attach//g' --regexflag 's/\\X-Owner//g' --regexflag 's/\\X-Forwarded//g' --syncinternaldates

2. 3 error:

From Folder Other Users : Could not select 3367 NO cannot SELECT that mailbox
From Folder Public Folders : Could not select 3368 NO cannot SELECT that mailbox
Use of uninitialized value in split at /usr/bin/imapsync line 1964.


add an option to exclude "Other Users" in imapsync. You dont need it.

you can only really grab Public Folders if you are a "full admin" with mbox priveleges. If you have no Public Folders then add an option to exclude it also (dont include them).

does the output of imapsync show that you successfully logon to both sides?
i gather that you've got dovecot on the same box and its running on port 10143. Can you telnet to that port?
Regards,

Les Stott

SarganSaor

Postby SarganSaor » Wed Aug 01, 2007 1:00 pm

1. Ok add --exclude "Public Folders" and --exclude "Other Users"

2. Yes, sure

$RCSfile: imapsync,v $ $Revision: 1.219 $ $Date: 2007/04/04 09:32:20 $
Here is a linux system Linux server 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686)
with perl 5.8.8
Mail::IMAPClient version used here is 2.2.9
Command line used :
/usr/bin/imapsync --host1=mail.domain.ru --user1=user1@domain.ru --password1=xxxxx --host2=mail.domain.ru --user2=user2 --password2=xxx --port2=10143 --noauthmd5 --exclude Public Folders --regexflag s/JunkRecorded//g --regexflag
s/\$Junk//g --regexflag s/\$NotJunk//g --regexflag s/NotJunk//g --regexflag s/Junk//g --regexflag s/\\X-Has-Attach//g
--regexflag s/\\X-Owner//g --regexflag s/\\X-Forwarded//g --syncinternaldates --exclude Other Users
will try to use LOGIN authentication on host1
will try to use LOGIN authentication on host2
From imap server [mail.domain.ru] port [143] user [user1@domain.ru]
To imap server [mail.domain.ru] port [10143] user [user2]
Banner : * OK Scalix IMAP server 11.1.0.10849 ready on server.domain.ru
Host mail.domain.ru says it has CAPABILITY for AUTHENTICATE LOGIN
Success login on [mail.domain.ru] with user [user1@domain.ru] auth [LOGIN]
Banner : * OK Dovecot ready.
Host mail.domain.ru says it has CAPABILITY for AUTHENTICATE LOGIN
Success login on [mail.domain.ru] with user [user2] auth [LOGIN]
From capability : ID NAMESPACE AUTH=DIGEST-MD5 IDLE X-SCALIX-3 LOGIN-REFERRALS X-SCALIX-1 UIDPLUS IMAP4 IMAP4REV1 AUTH
=CRAM-MD5 X-SCALIX-2 AUTH=GSSAPI AUTH=PLAIN X-SCALIX-FOLDER-STATUS AUTH=LOGIN X-DELEGATE ACL X-SCALIX-4
To capability : STARTTLS NAMESPACE MULTIAPPEND SASL-IR AUTH=PLAIN IDLE AUTH=LOGIN LOGIN-REFERRALS UNSELECT LITERAL+
SORT CHILDREN IMAP4REV1 THREAD=REFERENCES
From state Authenticated
To state Authenticated
Excluding folders matching pattern 'Public Folders'
Excluding folders matching pattern 'Other Users'
From separator and prefix : [/][]
To separator and prefix : [.][]
++++ Calculating sizes ++++


....etc

++++ Statistics ++++
Time : 3246 sec
Messages transferred : 1550
Messages skipped : 0
Total bytes transferred: 186261964
Total bytes skipped : 0
Total bytes error : 873135 <<<<WTF?
Detected 1 errors
Please, rate imapsync at http://freshmeat.net/projects/imapsync/
?Happy with this free, open source and gratis GPL software?
Feel free to thank the author by giving him a book:
http://www.amazon.com/gp/registry/wishl ... NDIH3P7R7/


3 Errors

Use of uninitialized value in split at /usr/share/perl5/Mail/IMAPClient.pm line 2634.
Couldn't append msg #3 (Subject:[0]) to folder Sent: Search completed successfully but found no matching messages

les
Scalix Star
Scalix Star
Posts: 819
Joined: Thu Feb 23, 2006 10:18 am
Location: Sydney, Australia

Postby les » Wed Aug 01, 2007 6:11 pm

SarganSaor wrote:++++ Statistics ++++
Time : 3246 sec
Messages transferred : 1550
Messages skipped : 0
Total bytes transferred: 186261964
Total bytes skipped : 0
Total bytes error : 873135 <<<<WTF?
Detected 1 errors
Please, rate imapsync at http://freshmeat.net/projects/imapsync/
?Happy with this free, open source and gratis GPL software?
Feel free to thank the author by giving him a book:
http://www.amazon.com/gp/registry/wishl ... NDIH3P7R7/


3 Errors

Use of uninitialized value in split at /usr/share/perl5/Mail/IMAPClient.pm line 2634.
Couldn't append msg #3 (Subject:[0]) to folder Sent: Search completed successfully but found no matching messages


so that looks fine except for missing one message as i see above (bytes error).....

was anybody using imap and manipulating messages at the time you were using imapsync???

ignore the use of unitialized value errors, they often come up but do not affect the overall operation.

In my experience there are always some messages that will not transfer. They could have bad headers or odd characters that cannot be interpreted correctly.

you could enable "--debug" to see why, or for full imap transactions "--debugimap"

if you do that i suggest you only do one folder as you will get bucketloads of output.

mind you now that imapsync has transferred all the messages it will no not to re-transmit them again.

hope that helps.
Regards,

Les Stott


Return to “Scalix Server”



Who is online

Users browsing this forum: Google [Bot] and 3 guests