Since I know neither SpamExperts nor DirectAdmin I can't really imagine what the plugin does - could you explain?
if you want to automatically configure a PMG installation you can use the REST-API - see the wiki-page for PVE (the api is quite similar) and the api-viewer for the paths and methods:
The plugin add/removes the domains from directadmin to the spamexperts spamfilter and set the delivery route to the directadmin server.
I am not known with programming API, but if there isn't such a fuction i think its a great addon to Proxmox Mail Gateway because a lot of webhosters use DirectAdmin.