[SOLVED] PMG Import Whitelist SMTP Domain Objects Not Supported?

Hubguru

Renowned Member
Jan 22, 2016
16
1
68
Hey Folks,

I'm attempting to import whitelist smtp domains but there is no convention for create objects:
no 'create' handler for 'config/whitelist/objects'

I can add through GUI Configuration-Mail Proxy-Whitelist-Add-Domain (Sender), this puts the smtp domain in the objects group, but there is no create for the objects group for pmgsh command-api. Is there any way to get around this and import SMTP Domains?

Thanks.

JR
 
Yep, that's what I was missing, the domain object. So just to clarify for anyone else, to import SMTP Whitelist of domains or IPs or whatever object you want, create a text file with an object on each line:

nano whitelist-domains.txt:

domain-a.com
domain-b.com
domain-c.com
...

Then read the file lines into the pmgsh script using this string (change "/domain --domain" to your object" :

# while read line; do pmgsh create /config/whitelist/domain --domain "$line"; done < whitelist-domains.txt

Thanks.

JR
 

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!