How to transfer Mailman configuration and content manually to another Plesk server?

Created:

2017-04-05 10:29:14 UTC

Modified:

2017-08-08 13:28:31 UTC

1

Was this article helpful?


Have more questions?

Submit a request

How to transfer Mailman configuration and content manually to another Plesk server?

Applicable to:

  • Plesk for Linux

Question

How to transfer Mailman configuration and content manually to another Plesk server?

Answer

Note: before the transferring, make sure the Mailman service is set up according to the instructions .

I. Transfer Mailman configuration stored in Plesk database

1. get the list of maillists and domain names on the source server:

[psa]> select m.id, m.dom_id, m.name, m.status, domains.name as domNAME from  MailLists m inner join domains on m.dom_id = domains.id;

+--------+-------------+-----------+------------+----------------+
| id   | dom_id | name | status | domNAME |
+----+--------+--------+--------+---------+
| 4 | 632 | list1 | 0 | example.com       |
| 5 | 323 | list2 | 0 | example2.com      |
| 7 | 207 | list3 | 0 | example3.com      |

2. make a dump of psa.MailLists table on the source server:

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin psa MailLists > /root/tbl_psa_Maillists.sql

3. transfer the dump to the target server:

# scp  203.0.113.2:/root/tbl_psa_Maillists.sql ~

4.  on the target server, get the IDs of domains listed in the SQL query above:

mysql> select id, name from domains where name='example.com';

mysql> select id, name from domains where name='example2.com';

mysql> select id, name from domains where name='example3.com';

5. on the target server, open /root/tbl_psa_Maillists.sql and update the domain IDs with values found on the previous step. The ID is the second value as it is shown in the example below:

INSERT INTO `MailLists` VALUES (4, 378 ,'list1',0),(5, 1027 ,'list2',0),(7, 1253 ,'list2',0)

6. restore the dump on the target server:

# plesk db < tbl_psa_Maillists.sql

7. go to Plesk > Domains > example.com > Mail > Mailing lists and make sure the mail list members are shown there.

8. Turn off and then turn on every transferred maillist in order to refresh the mailman database located at /var/spool/postfix/plesk/virtual.db

II. Transfer Mailman content

1. Back up the following directories on the source server.

/var/lib/mailman

/var/spool/mailman

2. stop Mailman service:

# service mailman stop

3. Transfer and restore with replacement the directories on the target server

4. start Mailman service:

# service mailman start

5. Log in to the Maillist panel at http://lists.<target_server_name>/mailman/admin/mailman/members using Mailman administrator password from the source server.

Have more questions? Submit a request
Please sign in to leave a comment.