Submitted by Lucian on Wed, 04/29/2020 - 15:59
Hello,
I am trying to get to a state where I can deploy Virtualmin programmatically 100%, via the API preferably. Right now this is not entirely possible using full feature set, for example setting up domain keys is not covered by the API, nor is email rate limiting, greylisting, mail client configuration and so on.
Would it be possible to expand the API and cover the aforementioned features?
PS: happy to learn of any workarounds, if can be suggested
Regards, Lucian
Status:
Active
Comments
Submitted by Lucian on Thu, 04/30/2020 - 04:12 Comment #1
Submitted by Lucian on Thu, 04/30/2020 - 10:16 Comment #2
Ok, I somehow managed to work around it like this. It can probably be done much better than this. The below is just to enable dkim:
Change the settings and switch to the old theme as javascript gets in the way
Run this curl commands:
curl -c ./cookie.txt -k https://$hostname:10000
curl -k -c ./cookie.txt -b ./cookie.txt -d "user=root" -d "pass=$password" -d "page=/" "https://$hostname:10000/session_login.cgi"
curl -k -b ./cookie.txt -d "user=root" -d "pass=$password" "https://$hostname:10000/virtual-server/enable_dkim.cgi?enabled=1&selector=2020&verify=0&size=2048&extra=&exclude=&undefined=&xnavigation=1"
Submitted by JamieCameron on Sat, 05/02/2020 - 15:38 Comment #3
Yes, we can add more API functions. What kind of DKIM setup are you looking to do?
Submitted by Lucian on Sat, 05/02/2020 - 16:19 Comment #4
Just the regular kind virtualmin does when enabled, though for security it'd be best if by default every domain had their own key, so they can't impersonat each other etc. Not sure if this answers your question. Thanks!
Submitted by JamieCameron on Sun, 05/03/2020 - 15:26 Comment #5
Ok - we'll update this ticket with progress
Submitted by JamieCameron on Sun, 05/10/2020 - 19:30 Comment #6
The next release will include a
set-dkim
API command to enable, disable and configure DKIM.