Directions to export and import black/white lists from mailwatch to 
baruwa:

mysql> use mailscanner;


SELECT * FROM whitelist WHERE to_address='domain.com' INTO OUTFILE 
'whitelist.csv';

SELECT * FROM blacklist WHERE to_address='domain.com' INTO OUTFILE 
'blacklist.csv';

Output file layout:

+-----+--------------+--------------+-------------------------+
| id  | to_address   | to_domain    | from_address            |

75    domain.com    domain.com    domain.net
74    domain.com    domain.com    domain2.net

Spread sheet:
Open csv file in spread sheet.
Delete all data in first column and assign a value of 1 for a whitelist, 
or 2 for a blacklist. Fill down so all cells in column are 1, or 2.
Delete column "to_domain"
Add column after "from_address" and fill all cells with domain admin 
user id. You can determine the users id by:
mysql> use baruwa;
select * FROM auth_user;

Save the finished file, and use an editor to remove all deliminators, 
except for a comma between each field.

Your finished file should look like this:

2,domain.com,[email protected],6 (2=blacklist,domain.com=to_address, 
domain.net=from_address, 6=user_id)

Launch mysql and switch to baruwa database.
Paste the following line (changing file name):


LOAD DATA LOCAL INFILE '/whitelist.csv' INTO TABLE lists FIELDS 
TERMINATED BY ',' LINES TERMINATED BY '\n' (list_type, to_address, 
from_address, user_id );

Black/White list should show up now for the admin user of the domain.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Baruwa mailing list
[email protected]
http://lists.baruwa.org/mailman/listinfo/baruwa

Reply via email to