Exporting blacklist/whitelist

Testing of eFa 4
Post Reply
Justin
Posts: 95
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Exporting blacklist/whitelist

Post by Justin » 08 Feb 2019 10:43

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

User avatar
shawniverson
Posts: 2761
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Exporting blacklist/whitelist

Post by shawniverson » 08 Feb 2019 22:47

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.
Version eFa 4.0.0 RC3 now available in testing repo. Come join us in advancing eFa!

User avatar
shawniverson
Posts: 2761
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Exporting blacklist/whitelist

Post by shawniverson » 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=
Version eFa 4.0.0 RC3 now available in testing repo. Come join us in advancing eFa!

Justin
Posts: 95
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Re: Exporting blacklist/whitelist

Post by Justin » 11 Feb 2019 09:07

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!

Post Reply