[vchkpw] Migrating vmailmgr to vpopmail+mysql

2005-10-30 Thread aichains

Resurrecting previous post that I found on MARC:

hi together,

does anybody know a way to convert mails and accounts from vmailmgr to
vpopmail?  i already searched the archive and google without any result.

thanks!

regards

alex

-

I'm currently in the same situation and am looking for feedback in the
same area.

So far as I have planned it out, I have come up with this steps:

1) Create the domains using the vpopmail script
2) Create mailboxes through vpopmail script of all the mailboxes in
vmailmgr.   Once the mailboxes are created, replace the password
strings in vpopmail with the password strings (md5 or crypt) that were
in vmailmgr.  Then copy the contents of mailbox from vmailmgr to
vpopmail (understanding a little change in the directory structure).
3) Aliases ... can just use .qmail-alias when moving over.

This is the way I was thinking might work since I don't have a second
machine to put vpopmail on and then transfer everything that way.  If
anybody has any thoughts on problems/concerns/pointers I would greatly
appreciate it.

James

-

If you use the -e option to vadduser, you should be able to pass in the
encrypted password.

--
Tom Collins  -  [EMAIL PROTECTED]

-

I have a python script which helped me with the conversion. But its only
in a undocumented just-worked-for-me state. I can post it if someone is
interested, but merely as a pointer to what needs to be done as a
working script.

It reads the informationen from listvdomain and starts the vpopmail
scripts with this infos.

If I remeber correctly, I had to patch listvdomain to also print out the
md5-password, but then you can use the -e option of vadduser.


Florian

-

Thanks for those tidbits, fellows...but I would like to consult with you 
for any further experiences/scripts/anything regarding this type of 
migration.


Here's the background...I'm replacing our existing stand-alone servers 
with a cluster backed by vpopmail+mysql replication.  With that solution 
engineered, the next step is figuring out how to incur 'zero customer 
impact' - aka flawless (I pray) migration.


The above poster mentions a patch to listvdomains that echo's the hashed 
password.  That would be fantastic, as it could easily be fed into 
vadduser -e $whatever, creating the accounts and maildirs in a flash...I 
could then rsync the mail over until the actual cutover takes place.  Or 
 move dns...smtproutes on old box - new 
box...sticky-bit...tar...scp...untar...fix perms...

/dreamworld

Does anyone have any experiences to share ?

Thanks for any help, guys.

-- aichains


Re: [vchkpw] Migrating vmailmgr to vpopmail+mysql

2005-10-30 Thread John Simpson

On 2005-10-30, at 1033, aichains wrote:

Resurrecting previous post that I found on MARC:

does anybody know a way to convert mails and accounts from vmailmgr to
vpopmail?  i already searched the archive and google without any  
result.


...
I'm currently in the same situation and am looking for feedback in the
same area.

So far as I have planned it out, I have come up with this steps:

1) Create the domains using the vpopmail script
2) Create mailboxes through vpopmail script of all the mailboxes in
vmailmgr.   Once the mailboxes are created, replace the password
strings in vpopmail with the password strings (md5 or crypt) that were
in vmailmgr.  Then copy the contents of mailbox from vmailmgr to
vpopmail (understanding a little change in the directory structure).


after changing the vpasswd file, remember to run vmkpasswd to  
rebuild the vpasswd.cdb file (which is what vpopmail actually uses.)


and if the old and new systems are on the same machine, instead of  
copying the files you should be able to move them. you'll save disk  
space and save time. just make sure you do it on a mailbox-by-mailbox  
basis rather than a domain-by-domain basis.


also be aware that if you have enough domains, or enough mailboxes  
within any one domain, vpopmail may start hashing directory entries  
(i.e. instead of ~vpopmail/domains/domain.xyz, it may create  
~vpopmail/domains/0/domain.xyz.) after creating the domain your  
script can run vdominfo -d domain.xyz to find the physical  
directory for the domain, regardless of whether it was hashed or  
not... and vuserinfo -d [EMAIL PROTECTED] will give you the physical  
directory for a user's mailbox, again regardless of hashing. make  
sure you write your scripts to use these commands to locate the  
directories instead of assuming that vpopmail will always use the  
same directory structure.



3) Aliases ... can just use .qmail-alias when moving over.


i know nothing about vmailmgr... i would imagine it handles aliases  
the same way vpopmail does, but if the physical structure of a user's  
mailbox changes, any .qmail-* file which points to a physical Maildir  
may need to have its patch adjusted to match the physical location  
created by vpopmail. for example, if the domain has enough users to  
trigger user hashing, you may have to change a line like ./user/ 
Maildir/ to say ./0/user/Maildir/ instead, depending on where that  
user's directory was created in relation to the domain directory.


--
| John M. Simpson - KG4ZOW - Programmer At Large |
| http://www.jms1.net/   [EMAIL PROTECTED] |
--
| Mac OS X proves that it's easier to make UNIX  |
| pretty than it is to make Windows secure.  |
--




PGP.sig
Description: This is a digitally signed message part