Hi there,
Our backup EFA MX crashed, which wasnt used a lot anyway.
So i would like to setup a new one with v4.
How can i Export the blacklist/whitelist from my primary EFA MX v3 and import them in my clean EFA MX v4?
Found this topic, but i only want the two lists instead of the whole system.
Kind regards,
Justin
Exporting blacklist/whitelist
- shawniverson
- Posts: 3649
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Exporting blacklist/whitelist
Yes, you can.
At a high level, you need to:
If this is a lot for you to do, hang in there. I probably can make a smaller import tool that can just grab these lists for you instead from a v3 backup.
At a high level, you need to:
- Export the whitelist and blacklists from the mailscanner database in mysql
- Import the whitelist and blacklist into the new mailscanner database in mariadb
If this is a lot for you to do, hang in there. I probably can make a smaller import tool that can just grab these lists for you instead from a v3 backup.
- shawniverson
- Posts: 3649
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Exporting blacklist/whitelist
Actually, this is so simple, it is probably easier just to make a little howto...
Step 1
Run these commands on the v3 as root
Step 2
Copy the list.sql from your v3 to v4 using whatever means
Step 3
Run this on the v4 as root
Step 1
Run these commands on the v3 as root
Code: Select all
MYSQLPWD=$(grep MYSQLROOTPWD /etc/EFA-Config | sed -e 's/^.*://')
mysqldump --user=root --password=$MYSQLPWD mailscanner blacklist > list.sql
mysqldump --user=root --password=$MYSQLPWD mailscanner whitelist >> list.sql
MYSQLPWD=
Copy the list.sql from your v3 to v4 using whatever means
Step 3
Run this on the v4 as root
Code: Select all
MYSQLPWD=$(grep MYSQLROOTPWD /etc/eFa/MySQL-Config | sed -e 's/^.*://')
mysql --user=root --password=$MYSQLPWD mailscanner < list.sql
MYSQLPWD=
Re: Exporting blacklist/whitelist
Thank you!shawniverson wrote: ↑10 Feb 2019 16:10 Actually, this is so simple, it is probably easier just to make a little howto...
Step 1
Run these commands on the v3 as root
Step 2Code: Select all
MYSQLPWD=$(grep MYSQLROOTPWD /etc/EFA-Config | sed -e 's/^.*://') mysqldump --user=root --password=$MYSQLPWD mailscanner blacklist > list.sql mysqldump --user=root --password=$MYSQLPWD mailscanner whitelist >> list.sql MYSQLPWD=
Copy the list.sql from your v3 to v4 using whatever means
Step 3
Run this on the v4 as root
Code: Select all
MYSQLPWD=$(grep MYSQLROOTPWD /etc/eFa/MySQL-Config | sed -e 's/^.*://') mysql --user=root --password=$MYSQLPWD mailscanner < list.sql MYSQLPWD=
Had no idea where to begin, but this works perfectly!