HaydenKatz

Registered
Sep 11, 2018
3
0
1
Australia
cPanel Access Level
Root Administrator
I need to automate setting the URL used in "Contact Manager" -> "Post to URL" when deploying new servers with puppet.

I cannot see an API call I can use to do this, the only functions I can find are related to testing an existing post URL. (verify_posturl_access and send_test_posturl)

Instead I am looking at directly modifying /etc/wwwacct.conf.shadow to add (or update) a record for CONTACTPOSTURL.

In the absence of an API method, is this a valid way to do this?
Is there a better way to do this?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
I am not aware of a better way to do this, it looks like that's only stored in /etc/wwwacct.conf.shadow.

I do see other threads on this as well: Standardized hook - Retrieve PostURL

I'll also check in with one of our development teams on this to see if they have any insight.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Hi @HaydenKatz

Based on what I discussed with the development team that manages a lot of our API functions and there's really not a better solution than what you'd found already, modifying the wwwacct.conf.shadow
 

holochris

Registered
Mar 3, 2020
3
3
1
Hastings, East Sussex
cPanel Access Level
Root Administrator
Could I ask a follow up question here, I've been looking into setting CONTACTPOSTURL via ansible.

This post helped me locate the value of the url & I've been able to set this, however I'm wondering where the communication type setting is stored? As I would also like to automatically set this to HighAndMediumOnly.

I can't seem to find where this is stored / if there is an API method to set it.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston