Scalix backup w/ imapsync to dovecot

Best practice information from Scalix users relating to integration of Scalix with other products.

Moderator: ScalixSupport

justadecoy

Scalix backup w/ imapsync to dovecot

Postby justadecoy » Tue Sep 08, 2009 11:56 pm

hi all.

I'm trying to back up my scalix server to a vanilla dovecot install so I can play with the mail outside the production environment.

I'm having some issues getting imapsync working.
I've been going through the imapsync help, Scalix help, Dovecot help, Hell, prayer and several bucketloads of coffee on this one.

The issue seems to be that it won't sync anything with an attachment because Scalix appends the flag \X-HAS-ATTACH to the individual emails and dovecot can't deal with it / doesn't know what to do with it (I think)

Initial error reads: "Couldn't append msg #478 (Subject:[0]) to folder Trash: Error trying to append string: 926 BAD Invalid system flag \X-HAS-ATTACH"

To get around this I tried the command --regexflag s/\\X-Has-Attach//g

Whole command now looks like:

andrew@pintsized:~]$ imapsync --host1 scalix --user1 andrew.sharp --password1 mypassword --host2 dovecot --user2 andrew --password2 mypassword --noauthmd5 --regexflag s/\\X-Has-Attach//g

Which churns through everything throwing this error (msg # xxx changes per email) on every email with an attachment:
"Couldn't append msg #478 (Subject:[0]) to folder Trash: Error trying to append string: 926 BAD Invalid system flag \"

So I tried using --fast (which the man page says makes it not sync flags) and got the \X-HAS-ATTACH error again so I combined the 2 switches like this:

imapsync --host1 scalix --user1 andrew.sharp --password1 mypassword --host2 dovecot --user2 andrew --password2 mypassword --fast --noauthmd5 --regexflag s/\\X-Has-Attach//g

and got the "BAD Invalid system flag \" error again.

adding the switch --regexflag s/\\//g or --regexflag s/\\*//g or --regexflag s/\\*\//g doesn't achieve anything either, I still get the "BAD Invalid system flag \" error.

Can anyone spot the error of my ways on this one or offer some advice of where to look?

I'm guessing I might need to preprocess the stream to remove the flags from the headers but I'm just not sure.
Any advice appreciated.

Thanks,
Andrew

matfra01

Re: Scalix backup w/ imapsync to dovecot

Postby matfra01 » Thu Sep 10, 2009 10:08 pm

i have exactly the same problem..
Scalix -> Dovecat with imapsync

please can someone help us :)
thank you
best regards

matfra01

Re: Scalix backup w/ imapsync to dovecot

Postby matfra01 » Fri Sep 11, 2009 2:17 pm

solved:
imapsync add:
--regexflag 's/\\X-Has-Attach//g' --regexflag 's/\\X-*//g'

if you have problem with directory like "linux.com", you have to replace "."
--regextrans2 "s/\//_/g"

regards


Return to “Third Party Integration”



Who is online

Users browsing this forum: No registered users and 2 guests

cron