Re: [Dovecot] Migration from courier to dovecot

2013-04-12 Thread Kim Johansen

Hey,

I am working on doing this migration myself. I have migrated some test 
users. And I have build this script to help me, maybe you can use it for 
inspiration(It is on your own risk to use it!):


#!/bin/sh
#Source="/var/vpopmail/"
Destination="/var/mail/vmail/"
i=0
for line in $(cat mailboxs.txt)
do
if [ -d $Source$line.maildir ]
then
# Create destination
echo "--Creating $Destination$line"
mkdir -p $Destination$line

# Load new data from backup
echo "--Copy from $Source$line to $Destination$line"
cp -a $Source$line.maildir $Destination$line

#If they exist mv trash, send and draft to .INBOX.
echo "--If exist then, mv trash send and draft to 
.INBOX.XXX in $Destination$line"

if [ -d $Destination$line/.maildir/.Drafts ]; then
mv $Destination$line/.maildir/.Drafts 
$Destination$line/.maildir/.INBOX.Drafts

fi
if [ -d $Destination$line/.maildir/.Trash ]; then
mv $Destination$line/.maildir/.Trash 
$Destination$line/.maildir/.INBOX.Trash

fi
if [ -d $Destination$line/.maildir/.Sent ]; then
mv $Destination$line/.maildir/.Sent 
$Destination$line/.maildir/.INBOX.Sent

fi

# Change the file right to the new system incl hidden files
echo "--Changes owner to vmail:vmail on 
$Destination$line recursive"

   chown -R vmail:vmail $Destination$line $Destination$line.*

# Run converter script if et reports an error we stop 
the whole script

echo "--Calling courier-dovecot-migrate.pl"
/home/weiser/courier-dovecot-migrate.pl --to-dovecot 
--convert $Destination$line.maildir

current=$?
if [ $current -ne "0" ]; then
echo "$current"
   exit
fi

# move data from .maildir to ..
echo "--Moving data from ./.maildir to ."
mv $Destination$line.maildir/* $Destination$line
mv $Destination$line.maildir/.* $Destination$line

# remove old unused .maildir
echo "--Remove old courierfiles and folder and .maildir"
rmdir $Destination$line.maildir
/usr/bin/find $Destination$line -name 
courierimapsubscribed -exec rm {} \;
/usr/bin/find $Destination$line -name courierimapuiddb 
-exec rm {} \;
/usr/bin/find $Destination$line -name 
courierpop3dsizelist -exec rm {} \;
/usr/bin/find $Destination$line -name courierimapacl 
-exec rm {} \;
/usr/bin/find $Destination$line -name 
courierimapkeywords -exec rm -f -R {} \;

i=$(( i + 1 ))
else
echo "$Source$line.maildir folder not found"
fi
done;
echo "$i mailbox mirgrated"



it needs to external files to work:

mailboxs.txt, which have a path to each mail folder:
domain1/user1/
domain1/user2/
domain2/user1/

and the courier-dovecot-migrate.pl which you can find more information 
about here:

http://wiki2.dovecot.org/Migration/Courier

good luck.

--
Kim Johansen


On 2013-04-12 11:34, ChandranManikandan wrote:

Hi,
I am using Courier imap+Qmail+Vpopmail.
My IMAP having slow issues on our email client while download message as
well switch to another folder. I would request you to give me the procedure
for migration as well let me know if anything going wrong after migrate. We
have 100 mailboxes and some email box more than 25 GB. I want to access
email fast in oulook client 2010 as well squirrelmail. Kindly guide me . Am
waiting for your reply asap.





[Dovecot] Migration from courier to dovecot

2013-04-12 Thread ChandranManikandan
Hi,
I am using Courier imap+Qmail+Vpopmail.
My IMAP having slow issues on our email client while download message as
well switch to another folder. I would request you to give me the procedure
for migration as well let me know if anything going wrong after migrate. We
have 100 mailboxes and some email box more than 25 GB. I want to access
email fast in oulook client 2010 as well squirrelmail. Kindly guide me . Am
waiting for your reply asap.

-- 
*Thanks & Best Regards,
Manikandan.C
*


Re: [Dovecot] migration from courier to dovecot

2011-08-14 Thread Michael
hmm, in the meantime i ran Courier on a new server and the situation is the same
messages are downloaded again, I do not understand completely why the change
machine ip is so important for email clients , or i miss smth :( 






Re: [Dovecot] migration from courier to dovecot

2011-08-14 Thread Michael



domain is the same as was , only ip is changed ( new machine for mx ) 
the same config ( i dont want to users had to change smth ) 
i'm confused :(( 



Re: [Dovecot] migration from courier to dovecot

2011-08-14 Thread Timo Sirainen
So the UIDLs are preserved perfectly. The problem is with something else
then. Such as did you change the server address in the client's config?
Some clients trigger a redownload because of that.

On Sun, 2011-08-14 at 21:43 +, Michael wrote:
> send same in email ( first saw the email ) 
> uidl's are to above mailbox conversion
> 
> thanks for fast reply
> 
> 1 UID87-1290084761   1 UID87-1290084761
> 2 UID88-1290084761   2 UID88-1290084761
> 3 UID89-1290084761   3 UID89-1290084761
> 4 UID90-1290084761   4 UID90-1290084761
> .
> .
> .
> .
> 
> 775 UID909-1290084761 775 UID909-1290084761
> 776 UID910-1290084761 776 UID910-1290084761
> 777 UID911-1290084761 777 UID911-1290084761
> 778 UID912-1290084761 778 UID912-1290084761
> 779 UID913-1290084761 779 UID913-1290084761
> 780 UID914-1290084761 780 UID914-1290084761
> 781 UID915-1290084761 781 UID915-1290084761
> 782 UID916-1290084761 782 UID916-1290084761
> 783 UID917-1290084761 783 UID917-1290084761
> 784 UID918-1290084761 784 UID918-1290084761
> 785 UID919-1290084761 785 UID919-1290084761
> 786 UID920-1290084761 786 035e4ce520de
> courierdovecot
> 
> 
> 




Re: [Dovecot] migration from courier to dovecot

2011-08-14 Thread Michael

send same in email ( first saw the email ) 
uidl's are to above mailbox conversion

thanks for fast reply

1 UID87-1290084761   1 UID87-1290084761
2 UID88-1290084761   2 UID88-1290084761
3 UID89-1290084761   3 UID89-1290084761
4 UID90-1290084761   4 UID90-1290084761
.
.
.
.

775 UID909-1290084761 775 UID909-1290084761
776 UID910-1290084761 776 UID910-1290084761
777 UID911-1290084761 777 UID911-1290084761
778 UID912-1290084761 778 UID912-1290084761
779 UID913-1290084761 779 UID913-1290084761
780 UID914-1290084761 780 UID914-1290084761
781 UID915-1290084761 781 UID915-1290084761
782 UID916-1290084761 782 UID916-1290084761
783 UID917-1290084761 783 UID917-1290084761
784 UID918-1290084761 784 UID918-1290084761
785 UID919-1290084761 785 UID919-1290084761
786 UID920-1290084761 786 035e4ce520de
courierdovecot





Re: [Dovecot] migration from courier to dovecot

2011-08-14 Thread Timo Sirainen
On Sun, 2011-08-14 at 19:33 +, Michael wrote:

> I have a problem with the conversion of files containing UIDL Courier to 
> dovecot
> uidl , dovecot version is 1.2.15 , format in dovecot is  pop3_uidl_format =
> %08Xu%08Xv  i try any other from available list without success 

1) Check some user's UIDL reply from Courier.

2) Check the same user's UIDL reply from Dovecot after running the
migration script.

What do you see?




[Dovecot] migration from courier to dovecot

2011-08-14 Thread Michael
hi all 

I have a problem with the conversion of files containing UIDL Courier to dovecot
uidl , dovecot version is 1.2.15 , format in dovecot is  pop3_uidl_format =
%08Xu%08Xv  i try any other from available list without success 

courierpop3dsizelist format

/2 920 1290084761
1296206202.H818256P31717.domain.tld,S=57135:2,S 57679 87:1290084761
1296239411.H289216P22896.domain.tld,S=1660:2,S 1694 88:1290084761
1296480156.H578502P4335.domain.tld,S=26610:2,S 26995 89:1290084761
1296552510.H517452P28309.domain.tld,S=2894:2,S 2980 90:1290084761
1296740128.H139710P22101.domain.tld,S=4983:2,S 5121 91:1290084761
1296807457.H887067P13955.domain.tld,S=7841:2,S 8038 92:1290084761
1296807652.H904999P14102.domain.tld,S=114839:2,S 116421 93:1290084761


courierimapuiddb

1 1290084574 847
53 1296206202.H818256P31717.domain.tld,S=57135
54 1296239411.H289216P22896.domain.tld,S=1660
55 1296480156.H578502P4335.domain.tld,S=26610
56 1296552510.H517452P28309.domain.tld,S=2894
57 1296740128.H139710P22101.domain.tld,S=4983
58 1296807457.H887067P13955.domain.tld,S=7841
59 1296807652.H904999P14102.domain.tld,S=114839



and after using a script to convert from
http://www.dovecot.org/tools/courier-dovecot-migrate.pl
got this file 

dovecot-uidlist
3 V1290084574 N862
53 PUID87-1290084761 W57679 :1296206202.H818256P31717.domain.tld,S=57135:2,S
54 PUID88-1290084761 W1694 :1296239411.H289216P22896.domain.tld,S=1660:2,S
55 PUID89-1290084761 W26995 :1296480156.H578502P4335.domain.tld,S=26610:2,S
56 PUID90-1290084761 W2980 :1296552510.H517452P28309.domain.tld,S=2894:2,S
57 PUID91-1290084761 W5121 :1296740128.H139710P22101.domain.tld,S=4983:2,S
58 PUID92-1290084761 W8038 :1296807457.H887067P13955.domain.tld,S=7841:2,S
59 PUID93-1290084761W116421:1296807652.H904999P14102.domain.tld,S=114839:2,S

Unfortunately, messages are downloaded to the client again and with over 300
account its problematic 

if someone would be willing and able to help I will be grateful , i don't have
any idea what next can do with it ;( 

if any other information would be helpful please let me know




Re: [Dovecot] Migration from Courier to Dovecot: is it recommended to "force" d.index* creation?

2010-06-08 Thread Timo Sirainen
On ti, 2010-06-08 at 14:07 +0200, Sandro Tosi wrote:
> But we are also wondering it it might be wise to "force" the creation of 
> dovecot.index{,.cache} files at conversion-time. It seems that, at 
> least, d.i.c is created at FETCH of a mail, i.e. reading it, but we do 
> not want to "alter" mails status of our clients.
> 
> Is there a way to create them in batch, or is it better to just let them 
> be created once clients start accessing their mailboxes via dovecot?

Problem is, the contents of cache files depends on what client is being
used. You could of course try to fetch the most commonly used fields
that clients use. Anyway, it's probably not a big deal. The worst that
can happen without index files is slightly higher load temporarily than
what it would have been under Courier.

With v2.0 you could do this pretty easily with doveadm command, but with
v1.x there's no super easy way to do it.




[Dovecot] Migration from Courier to Dovecot: is it recommended to "force" d.index* creation?

2010-06-08 Thread Sandro Tosi

Hello,
we are planning to migrate from Courier to Dovecot.

We already know courier-dovecot-migrate.pl, that will convert UID list 
and subscriptions files to dovecot format, and we will run it in batch 
on all Maildir + enable it at login, once we do the switch


But we are also wondering it it might be wise to "force" the creation of 
dovecot.index{,.cache} files at conversion-time. It seems that, at 
least, d.i.c is created at FETCH of a mail, i.e. reading it, but we do 
not want to "alter" mails status of our clients.


Is there a way to create them in batch, or is it better to just let them 
be created once clients start accessing their mailboxes via dovecot?


Thanks in advance,
Sandro


Re: [Dovecot] Migration from Courier to dovecot

2010-01-20 Thread Werner Detter
Am 20.01.10 23:35, schrieb Timo Sirainen:

> Some version of the script can do dovecot -> courier migration, without the 
> courier* files,
> but perhaps unsurprisingly I've never been interested in writing or testing 
> that code, so in 
> the recent versions that I've modified it's probably broken.

Thanks for the info. I've asked because the convert-script offers the 
"--to-courier"-option,
I've tried that and it didn't work for me =)

regards,
Werner


Re: [Dovecot] Migration from Courier to dovecot

2010-01-20 Thread David Halik

On 01/20/2010 05:35 PM, Timo Sirainen wrote:

On 21.1.2010, at 0.23, Werner Detter wrote:

   
 

The conversion of the Mailbox from Courier to Dovecot will be done with
"courier-dovecot-migrate.pl"-script[1], which works fine. However after
running "courier-dovecot-migrate.pl" the Courier-Files still remain in
the Maildir.
   

expressed unlucky :-)

sure, dovecot doesn't need these files after the migration. I have to
test, if it's possible to convert from a previously "courier to
dovecot migrated maildir" back to courier-format.
 

Some version of the script can do dovecot ->  courier migration, without the 
courier* files, but perhaps unsurprisingly I've never been interested in writing 
or testing that code, so in the recent versions that I've modified it's probably 
broken.


   


I just wanted to chime in that we're going to rewriting part of the 
script to handle --location= at some point if anyone is interested. The 
script works great, but it doesn't have the ability to point to an area 
outside of the users' homedir for the conversion. If you're moving your 
users' index/uid/subscriptions to a non-quota area outside their homedir 
then this is necessary.


Unfortunately,  that was something we learned too late after we did our 
migration. =)


--

David Halik
System Administrator
OIT-CSS Rutgers University
dha...@jla.rutgers.edu




Re: [Dovecot] Migration from Courier to dovecot

2010-01-20 Thread Timo Sirainen
On 21.1.2010, at 0.23, Werner Detter wrote:

> 
>> The conversion of the Mailbox from Courier to Dovecot will be done with
>> "courier-dovecot-migrate.pl"-script[1], which works fine. However after
>> running "courier-dovecot-migrate.pl" the Courier-Files still remain in
>> the Maildir.
> 
> expressed unlucky :-)
> 
> sure, dovecot doesn't need these files after the migration. I have to
> test, if it's possible to convert from a previously "courier to
> dovecot migrated maildir" back to courier-format.

Some version of the script can do dovecot -> courier migration, without the 
courier* files, but perhaps unsurprisingly I've never been interested in 
writing or testing that code, so in the recent versions that I've modified it's 
probably broken.



Re: [Dovecot] Migration from Courier to dovecot

2010-01-20 Thread Nick Douma
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 20-1-2010 17:20, Werner Detter wrote:
> hi list,
> 
> I've just registered to the list, so please be tolerant ;) I'm currently
> in the process of planning the migration from courier to dovecot as
> POP/IMAP-Server. I'm migration from Courier 0.58 (Debian-Etch-packages)
> to Dovecot 1.1.13 (Debian Lenny Backport).
> 
> The conversion of the Mailbox from Courier to Dovecot will be done with
> "courier-dovecot-migrate.pl"-script[1], which works fine. However after
> running "courier-dovecot-migrate.pl" the Courier-Files still remain in
> the Maildir.
> 
> Can i just delete those Courier-specific-files or does dovecot need them
> somehow (do you normally get rid of these after conversion)?
> 
> It's about these files:
> courierimapacl
> courierimapsubscribed
> courierimapuiddb
> courierpop3dsizelist
> 
> And those directories:
> courierimaphieracl
> courierimaphieracl
> 
> Can i simply delete those with "find" ? 

I 'migrated' a few years back from Courier to Dovecot without a script.
A few weeks ago I noticed those same files, and removed them with
`find`. I haven't noticed any degradation whatsoever :P.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktXgzgACgkQkPq5zKsAFijVzwCghnlpxhinrnAzGE702j3gfQ23
HRMAniY4fZ3f4bjKpwH1GllXyiTiCvbB
=MpBR
-END PGP SIGNATURE-


Re: [Dovecot] Migration from Courier to dovecot

2010-01-20 Thread Werner Detter

> The conversion of the Mailbox from Courier to Dovecot will be done with
> "courier-dovecot-migrate.pl"-script[1], which works fine. However after
> running "courier-dovecot-migrate.pl" the Courier-Files still remain in
> the Maildir.

expressed unlucky :-)

sure, dovecot doesn't need these files after the migration. I have to
test, if it's possible to convert from a previously "courier to
dovecot migrated maildir" back to courier-format.





[Dovecot] Migration from Courier to dovecot

2010-01-20 Thread Werner Detter
hi list,

I've just registered to the list, so please be tolerant ;) I'm currently
in the process of planning the migration from courier to dovecot as
POP/IMAP-Server. I'm migration from Courier 0.58 (Debian-Etch-packages)
to Dovecot 1.1.13 (Debian Lenny Backport).

The conversion of the Mailbox from Courier to Dovecot will be done with
"courier-dovecot-migrate.pl"-script[1], which works fine. However after
running "courier-dovecot-migrate.pl" the Courier-Files still remain in
the Maildir.

Can i just delete those Courier-specific-files or does dovecot need them
somehow (do you normally get rid of these after conversion)?

It's about these files:
courierimapacl
courierimapsubscribed
courierimapuiddb
courierpop3dsizelist

And those directories:
courierimaphieracl
courierimaphieracl

Can i simply delete those with "find" ? Furthermore: is it possible to
convert back from Dovecot-Format to Courier-Format?

Thanks in advance,
Werner

[1] http://www.dovecot.org/tools/courier-dovecot-migrate.pl