Page 1 of 1

blacklist email script or csv import

Posted: 16 Jul 2019, 16:06
by fantomduck
Hi,

I'm preparing a node for a customer which had another antispam solution. We have a very big blacklist of emails that we have to import on the new node. Is there any way to import them via csv or with an script?

Thanks in advance

Ilias

Re: blacklist email script or csv import

Posted: 02 Aug 2019, 10:17
by frba
fantomduck wrote:
16 Jul 2019, 16:06
I'm preparing a node for a customer which had another antispam solution. We have a very big blacklist of emails that we have to import on the new node. Is there any way to import them via csv or with an script?
Yes, you can add them using e.g. the "script" CLI command. First create a file where the first line is to enter the email control profile that you have. After that add a line for each address you want to blacklist as in this example:

cc EmailControlProfile test
add EmailFilter SrcEmail=foo1@example.net -silent -force
add EmailFilter SrcEmail=foo2@example.net -silent -force
add EmailFilter SrcEmail=foo2@example.net -silent -force

If you use Linux scripting or something equivalent for Windows you can easily add new lines for each email address.

Upload this script to the firewall, run the script, and save and activate as usual. You have further details about how scripts work, and how to upload and execute them, in the cOS Core Administration Guide section 2.1.7 "CLI Scripts".

Best regards,
Fredrick B