Migrate from Postfix Admin to ISPCONFIG 3

Discussion in 'General' started by maileh, Sep 28, 2014.

  1. maileh

    maileh Member

    Is it possibleto migrate my email domain from postfixadmin , mailbox, user+password etc etc to ispconfig 3 email ... please can anyone help :)
     
  2. mmmexp

    mmmexp New Member

    Yes it is possible.

    you should dump postfix database and move it to where your ispconfig database is.

    If you want all postfix domains to be under admin user then it is quite easy:
    mysql dbispconfig

    for domain:
    Code:
    insert into mail_domain (sys_userid,sys_groupid,sys_perm_user,sys_perm_group,server_id,domain) select
    '0','1','riud','riud','1',domain from postfix.domain;
    
    Then you insert users:
    Code:
    insert into mail_user (sys_userid,sys_groupid,sys_perm_user,sys_perm_group,server_id,email,login,password,maildir,quota,homedir)
    select '0','1','riud','riud','1',username,username,password,concat('/var/mail/',maildir),quota,'/var/vmail'
    from postfix.mailbox;
    
    then you get your forwards:
    Code:
    insert into mail_forwarding (sys_userid,sys_groupid,sys_perm_user,sys_perm_group,server_id,source,destination,type)
    select '0','1','riud','riud','1',alias.address,alias.goto,'forward' from
    postfix.alias where (postfix.alias.address != postfix.alias.goto);
    
    that's it.
    well it is only for very simple scenario.

    do not forget to:
    update mail_domain set active='y';
    update mail_forwarding set active='y';
    update mail_user set postfix='y';
     

Share This Page