Hello everybody,
I have an old ispCP installation with only one domain left on it, and that domain only has e-mail hosting.
The problem is, there are 2376 e-mail accounts on that domain, moving them manually would be a nightmare.
I was thinking if it's somehow possible to export manually from phpMyAdmin the table with only the e-mail accounts and forwards from this domain, and than importing them into the other i-MSCP phpMyAdmin.
I already have the unencrypted passwords for all the accounts (i found a nice script that extracts them from the db)
Of course it would be nice if i could also export the passwords, but if that's not possible at least some method to copy those accounts all at once and not manually adding each one would be great!
I've read about using incremental values in SQL when importing a table but i'm not really sure that it won't conflict with e-mail ID's already present on the server where I want to move the domain, that server also has 2500+ e-mail addresses.
As you can see below, I have mail_id ranging from 3 to 4700. Maybe i could change those values with a SQL command to replace all of them with an incremental value starting with the last value from the i-MSCP installation ? Just asking.
-- phpMyAdmin SQL Dump
-- version 4.2.1
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 12, 2019 at 02:45 PM
-- Server version: 5.1.73-1
-- PHP Version: 5.3.3-7+squeeze19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `ispcp`
--
-- --------------------------------------------------------
--
-- Table structure for table `mail_users`
--
CREATE TABLE IF NOT EXISTS `mail_users` (
`mail_id` int(10) unsigned NOT NULL,
`mail_acc` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
`mail_pass` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
`mail_forward` text COLLATE utf8_unicode_ci,
`domain_id` int(10) unsigned DEFAULT NULL,
`mail_type` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
`sub_id` int(10) unsigned DEFAULT NULL,
`status` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`mail_auto_respond` tinyint(1) NOT NULL DEFAULT '0',
`mail_auto_respond_text` text COLLATE utf8_unicode_ci,
`quota` int(10) DEFAULT '209715200',
`mail_addr` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5735 ;
--
-- Dumping data for table `mail_users`
--
INSERT INTO `mail_users` (`mail_id`, `mail_acc`, `mail_pass`, `mail_forward`, `domain_id`, `mail_type`, `sub_id`, `status`, `mail_auto_respond`, `mail_auto_respond_text`, `quota`, `mail_addr`) VALUES
(426, '2mfarm', 'jn8zVsLASv4=', '2mfarm@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, '2mfarm@oldlimited.co'),
(4762, '2nafarm', 'a3w+yEa7SyQ=', '2nafarm@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, '2nafarm@oldlimited.co'),
(2767, '4lifepharma', 'a3w+yEa7SyQ=', '4lifepharma@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, '4lifepharma@oldlimited.co'),
(1620, 'a_mielcioiu', 'kO8SITdIR0LbLkmv3va9XQ==', 'a_mielcioiu@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'a_mielcioiu@oldlimited.co'),
(1655, 'aafarm', 'GiKH3xtDLAI=', 'aafarm@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'aafarm@oldlimited.co'),
(4274, 'abba_farm', 'axkNI+VSIh23JPJvIo3SVw==', 'abba_farm@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'abba_farm@oldlimited.co'),
(1629, 'abifarm', 'rpegOFWpSd3fAM0rLMr31w==', 'abifarm@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'abifarm@oldlimited.co'),
(3, 'abuse', '_no_', 'marius.ciuperca@ldlimited.co,mihai.nastasescu@oldlimited.co', 1, 'normal_forward', 0, 'ok', 0, NULL, 209715200, 'abuse@oldlimited.co'),
(4068, 'acama', 'axkNI+VSIh23JPJvIo3SVw==', 'acama@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'acama@oldlimited.co'),
(1451, 'action', 'iFmx+7kj82tjiR47G00Jdg==', 'action@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'action@oldlimited.co'),
(278, 'activ', 'SBCpOqq2Kng=', 'activ@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'activ@oldlimited.co'),
(142, 'adefarm', 'lFTjdAt/HMI=', 'adefarm@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'adefarm@oldlimited.co'),
(2414, 'adela', 'uzcJsJWN8ic=', 'adela@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'adela@oldlimited.co'),
(1240, 'adelaida', 'Pca0NQGS+ac=', 'adelaida@oldlimited.co', 1, 'normal_mail,normal_forward', 0, 'ok', 0, NULL, 209715200, 'adelaida@oldlimited.co'),
Any solution, I really mean, ANY solution would be great!
Thank you!