To extract all the email information you need to recreate all mail accounts.
SELECT mail.mail_name,domains.name,accounts.password, mail.postbox, mail.redirect, mail.redir_addr, mail.mail_group,mail.autoresponder, mail.mbox_quota FROM domains,mail,accounts WHERE domains.id=mail.dom_id AND accounts.id=mail.account_id ORDER BY domains.name ASC,mail.mail_name ASC;
To extract all aliases
SELECT mail.mail_name, domains.name, mail_aliases.alias FROM mail, domains, mail_aliases WHERE mail.dom_id = domains.id AND mail.id = mail_aliases.mn_id;
Leave a Reply