Import Existing Whitelist domains

AllCore James

New Member
Dec 20, 2018

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 ?

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.

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 ?

yeah thats for global white/black list.
Following command to push to user whitelist:
while read line;do pmgsh create /quarantine/whitelist --pmail "" --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)
* (all mails from domain (all mails from

The API docs for that can be found on your pmg host:



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!