Page 1 of 1
Exporting blacklist/whitelist
Posted: 08 Feb 2019 10:43
by Justin
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
Re: Exporting blacklist/whitelist
Posted: 08 Feb 2019 22:47
by shawniverson
Yes, you can.
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.
Re: Exporting blacklist/whitelist
Posted: 10 Feb 2019 16:10
by shawniverson
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
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=
Step 2
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
Posted: 11 Feb 2019 09:07
by Justin
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
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=
Step 2
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=
Thank you!
Had no idea where to begin, but this works perfectly!