Re: Synchro for migration

2018-04-16 Thread Michael Menge


Quoting Albert Shih :



It seems like the following imapsync options allow you to use proxy
authentication

--authmech1 --authmech2
--authuser1 --authuser2
--proxyauth1 --proxyauth2


I'm not sure to understand how proxyauth works. I google it and find lots
of doc about...proxy imap.

Currently I need to authenticate my user against a LDAP(openldap),  
so I configure

saslauthd with ldap and works perfectly.

So one of my solution is to have a getpwent (local passwd) with real login
and fake password. And after the migration switch to ldap auth.



This will work but it is not necessary.

imapsync --host1 oldserver.yourdomain --port1 143 --authmech1 PLAIN  
--proxyauth1
 --authuser1 DovecotAdmin --user1 UserYouWantToMigrate  
--password1 DovecotAdminPW
 --host2 newserver.yourdomain --port1 143 --authmech2 PLAIN  
--proxyauth2
 --authuser2 CyrusAdmin   --user2 UserYouWantToMigrate  
--password2 CyrusAdminPW


Depending on your setup you will need other settings as well, and you  
may want to use the

passfile options so that the adminpassword is not shown in the process list




M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Synchro for migration

2018-04-16 Thread Andreas Haumer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi!

Am 16.04.2018 um 09:01 schrieb Albert Shih:
> Le 15/04/2018 à 01:17:00+0200, Michael Menge a écrit Hi,
> 
[...]
> 
>> 
>> Cyrus allows admins to proxy authenticate for users, if the sasl mech 
>> support it (PLAIN does suppot it, LOGIN does not) 
>> https://www.cyrusimap.org/sasl/sasl/authentication_mechanisms.html
>> 
>> It seems like the following imapsync options allow you to use proxy 
>> authentication
>> 
>> --authmech1 --authmech2 --authuser1 --authuser2 --proxyauth1 --proxyauth2
> 
> I'm not sure to understand how proxyauth works. I google it and find lots of 
> doc about...proxy imap.
> 
> Currently I need to authenticate my user against a LDAP(openldap), so I 
> configure saslauthd with ldap and works perfectly.
> 
> So one of my solution is to have a getpwent (local passwd) with real login 
> and fake password. And after the migration switch to ldap auth.
> 

I did several migrations with imapsync in the past and it worked quite well.

Usually I use a simple script like the one I've attached.

As authuser you have to use an account with cyrus admin rights
(listed in /etc/imapd.conf). You have to know their passwords, of course.
My script expects the admin users passwords in plain text in the files
"passfile1.txt" and "passfile2.txt"

The script also expects a list of IMAP accountnames as argument.

You then call the script like this:

./doit.sh accounts


You can use the script as an example, but you have to check the options
and adapt them for your need! Use the "--dry" option first!

HTH

- - andreas

- -- 
Andreas Haumer | mailto:andr...@xss.co.at
*x Software + Systeme  | http://www.xss.co.at/
Karmarschgasse 51/2/20 | Tel: +43-1-6060114-0
A-1100 Vienna, Austria | Fax: +43-1-6060114-71
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iD8DBQFa1FCtxJmyeGcXPhERAiMwAJ4r38w7zUZ4s5rvB6bfk2OxB7AVsQCgmoyv
yZIq1qZGPNAMsgJL3EU4LEM=
=PzbH
-END PGP SIGNATURE-


doit.sh
Description: application/shellscript

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Synchro for migration

2018-04-16 Thread Albert Shih
Le 15/04/2018 à 01:17:00+0200, Michael Menge a écrit
Hi,

>
> Quoting Albert Shih :
>
> > Hi everyone.
> >
> > Totally new in the world of cyrusimapd, I'm trying to migrate my current
> > imap server from dovecot to cyrusimapd.
> >
>
> welcome to the list.

Thanks.

>
> > I'm still in the prototype stage.
> >
> > I've ~ 4To of mailbox for ~ 2000 users.
> >
> > I would like to know what's the best way to migrate all mailbox and
> > subscription.
> >
>
> Using IMAP is the best way I can think of to migrate the Mails.
> Depending of the tool you use it might not be the fastest way but
> you can migrate all information with out worrying about the on disk
> formats. May years ago (~10), at the time we migrated form UW-Imap to Cyrus
> we uses imapcopy (it was part of the UW-Imap library) because it
> was much faster as imapsync aat that time.

Ok. That's also my guessing.

>
> Cyrus allows admins to proxy authenticate for users, if the sasl mech
> support it (PLAIN does suppot it, LOGIN does not)
> https://www.cyrusimap.org/sasl/sasl/authentication_mechanisms.html
>
> It seems like the following imapsync options allow you to use proxy
> authentication
>
> --authmech1 --authmech2
> --authuser1 --authuser2
> --proxyauth1 --proxyauth2

I'm not sure to understand how proxyauth works. I google it and find lots
of doc about...proxy imap.

Currently I need to authenticate my user against a LDAP(openldap), so I 
configure
saslauthd with ldap and works perfectly.

So one of my solution is to have a getpwent (local passwd) with real login
and fake password. And after the migration switch to ldap auth.

Thanks for your help.

--
Albert SHIH
Observatoire de Paris
France
xmpp: j...@obspm.fr
Heure local/Local time:
Mon Apr 16 08:57:17 CEST 2018

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: Synchro for migration

2018-04-14 Thread Michael Menge

Hi,

Quoting Albert Shih :


Hi everyone.

Totally new in the world of cyrusimapd, I'm trying to migrate my current
imap server from dovecot to cyrusimapd.



welcome to the list.


I'm still in the prototype stage.

I've ~ 4To of mailbox for ~ 2000 users.

I would like to know what's the best way to migrate all mailbox and
subscription.



Using IMAP is the best way I can think of to migrate the Mails.
Depending of the tool you use it might not be the fastest way but
you can migrate all information with out worrying about the on disk
formats. May years ago (~10), at the time we migrated form UW-Imap to Cyrus
we uses imapcopy (it was part of the UW-Imap library) because it
was much faster as imapsync aat that time.



I already try imapsync, but how can I do that without knowing the password
of my user ? I think they are something call master user in dovecot, but is
they are anything similar in cyrusimapd ? And if yes how I choose the user
name in imapsync ?



Cyrus allows admins to proxy authenticate for users, if the sasl mech
support it (PLAIN does suppot it, LOGIN does not)
https://www.cyrusimap.org/sasl/sasl/authentication_mechanisms.html

It seems like the following imapsync options allow you to use proxy  
authentication


--authmech1 --authmech2
--authuser1 --authuser2
--proxyauth1 --proxyauth2






M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus