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.





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?




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.




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.