Import Existing Whitelist domains

AllCore James

New Member
Dec 20, 2018
11
0
1
50
Hello,

As we are moving from our old spam product we are finding a number of our clients have extensive white lists for their email accounts...

Is there a way we can import a number of email addresses that should be white listed for individual users ?

I don't want to be asking any of our staff to type / add some of these white lists that are 400 / 500 emails ?
 
Hi,

you can import email adresses by CLI with a text file.
Take a look at here - thats how you push mails to black/white list.
In the above thread email adresses get pushed to the blacklist so adjust the ID to your whitelist id.

Greetz
 
Hello, thanks for your reply... I think your solution works for the global whitelist / global blacklist... I am looking to add it for a single email user... Is that possible ? Did I miss something from the original post ?
 
Hi,

yeah thats for global white/black list.
Following command to push to user whitelist:
Code:
while read line;do pmgsh create /quarantine/whitelist --pmail "user@yourdomain.com" --address "$line" ; done < /path/to/file.txt
(edit the path to your whitelist file)

`pmail` is the primary mail address from your user and `address` is the mail address you want to whitelist.
Valid mail adresses for parameter `address`:
*.com (all mails from .com domains)
*@example.com (all mails from domain example.com)
john@example.com (all mails from john@example.com)

The API docs for that can be found on your pmg host:
https://FQDN:8006/pmg-docs/api-viewer/index.html

Greetz
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!