Need your advice.
I have vpopmail 5.2.1 installed with oracle. Now i want to upgrade with
vpopmail 5.4.0 and move to mysql away from oracle(mysql is on the same
host where oracle and vpopmail).

oracle configure params were:

./configure \
    --enable-md5-passwords=y \
    --enable-clear-passwd=n \
    --enable-default-domain=test.com \
    --enable-oracle=y \
    --enable-large-site=n \
    --enable-passwd=n \
    --enable-valias=y \

planning configure params for mysql:

./configure \
    --disable-roaming-users \
    --enable-logging=p \
    --disable-ip-alias-domains \
    --disable-passwd \
    --enable-clear-passwd \
    --disable-domain-quotas \
    --enable-auth-module=mysql \
    --disable-many-domains \
    --enable-auth-logging \
    --enable-mysql-logging \
    --enable-valias \
    --disable-mysql-limits \
    --enable-mysql-replication \
    --enable-md5-passwords \

and maybe:


So from my previous oracle config i want to have some new different
1) mysql back-end with --enable-auth-module=mysql
2) separate table per virtual domain instead of storing all users in
single table with --disable-many-domains
3) clear passwords for users in addition to md5 with
4) auth and mysql logging: --enable-auth-logging and 
5) mysq replication (planning to use this feature in near future)

My questions are:
1) How in my case migrate data stored in oracle db?

My thoughts are:
I need to create tables of following layout for each virtual domain with
corresponding names like 'test_com', 'master_test_com' and so on:
#define TABLE_LAYOUT "pw_name char(32) not null, \
pw_passwd char(40), \
pw_uid int, pw_gid int, \
pw_gecos char(48), \
pw_dir char(160), \
pw_shell char(20), \
pw_clear_passwd char(16), \
primary key (pw_name ) "

2) Default table in my oracle installation for default domain was
'vpopmail' for storing users. If now i want to use table per domain and
my default domain will be 'is.lg.ua' should i create table with above
layout and call it 'is_lg_ua' and put there clients with
pw_domain='is.lg.ua' from my oracle vpopmail table or users with default
domain will go to 'vpopmail' table in my mysql db?

3) is it ok to leave pw_clear_passwd_char empty in my mysql table for
old users, because in oracle vpopmail users have only md5 based

4) so algorith of my migration script will be following(FIXME if i'm
missing something):
  a) in loop take record from oracle vpopmail table
  b) check pw_domain and create the table in mysql with the same
name(after mangling . and - to _) if it doesn't exists yet
  c) insert into mysql table values from oracle record leaving
pw_clear_passwd_char empty
  d) configure vpopmail 5.4.0 and install it into location of my
vpopmail 5.2.1

5) Are there any inricacies in changing auth-module from oracle to mysql
i should be aware of?

Any help is appreciated.
Thanks in advance.

Best regards,

Reply via email to