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

Hubguru

Renowned Member
Jan 22, 2016
18
2
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