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

Re: [imapsync] --userregextrans :-) No.


From Gilles LAMIRAL <gilles dot lamiral at laposte dot net>
Subject Re: [imapsync] --userregextrans :-) No.
Date Tue, 19 Jan 2010 14:24:50 +0100

Hello Peer,

Very often it's necessary to change usernames during the migration from one server to another.

Ok.


Sure, it's easy to write a little script to use different usernames on host1 and host2.

Yes.


But consequently it would be necessary to migratione usernamens in ACL-
rules too. Otherweise the whole ACL-setup is broken.

I don't understand. When you migrate Bill account to Joe account then Bill' acls are synced to Joe' acls, no? Bill becomes Joe and the acls follow.

That's nothing we can do with just some parameters, because each imapsync migration process has to know *all* pairs of old/new usernames. -A single account will have several ACL-rules for different users.

I don't understand. A single account with different users with different acls?


Migrating ACLs would be easy if imapsync would understand a parameter like --user-translation-file:

olduser1 newuser1
olduser2 newuser2
olduser3 newuser3

No. Migration is already easy with a file.


    A file.csv file contains:
    user0001;password0001;user0002;password0002
    user0011;password0011;user0012;password0012 ...
    A shell program:
     { while IFS=';' read  u1 p1 u2 p2; do
            imapsync --user1 "$u1" --password1  PWCHANGED --user2 "$u2" --password2  PWCHANGED ...
     done ; } < file.csv


And sometimes it's possible to describe all changes by a simple regular expressions. A parameter like "--userregextrans" would be nice to (for stuff like s/(.+)@(.+)/\2_\1/).

No since with this regex it's then easy to generate the file.csv


imapsync should migrate all usernames during the --syncacl-process.

No. Write a small script doing that, document it, I'll add them in the distribution. (I don't understand the multi-user acls issue)

Having that kind of translation-file the parameter "--user2" could be optional:

The --user1 too. All parameters could be optional by putting them in a file. So write this file and add imapsync at the beginning of each line.

If no "--user2" is given, then "--user1" is used (same for --
password2/--password1).

No, since "very often it's necessary to change usernames during the migration".


If furthermore --user-translation-file or --userregextrans exists, then imapsync should migrate the username used for the login (and for ACLs) automatically from old to new.

imapsync works for one account to another, that's enough job to deal with.



-- Au revoir, 02 99 64 31 77 Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06