2
API set domain disk space problem
Problem reported by Meysam Farazmand - 11/11/2020 at 12:11 AM
Resolved
Hi

i tried to add a domain to Smartermail free edtion via API call. i set all required parameters and desired maxSize to be 51200000. then i called the following API:
api/v1/settings/sysadmin/domain-put 
but when domain was created, Disk space was 9MB.
I also tried WHMCS provisioning module and faced the same issue.
is there any matter with Smartermail API functionality?

Smartermail version: Build 7619 (Nov 10, 2020)

Regards

5 Replies

Reply to Thread
0
Meysam Farazmand Replied
i found the solution. I should consider maxSize multiplied by 1024. so when i set it to 53687091200 (50GB), it set correctly.
now i have problem with setting "outgoingIP". i tested lots of ways and got no result.
0
Employee Replied
Employee Post
@Meysam, you can use the gateway-put API to add a gateway.  The one that I created in the image below has the following properties:

address - IP/FQDN of gateway
authPassword - Authentication password, if required
authUsername - Authentication username, if required
description - Optional description for this gateway configuration
encryptionType - 0 = None, 1 = SSL, 2 = TLS
id - Must be null for new gateways
isEnabled - Whether or not this gateway is enabled
port - Port on which to connect to this gateway
shouldAuthenticate - True if authUsername and authPassword are required; otherwise, false
smPassword - Password if using SmarterMail Gateway mode
smUrl - URL if using SmarterMail Gateway mode
smUserName - Username if using SmarterMail Gateway mode
type - 0 = Round Robin, 1 = Specific domains

0
Meysam Farazmand Replied
@Robert,

thank you for your response.
but i am going to set outgoing IP for a specific domain.
I did it through SM web interface and noticed that it calls "api/v1/settings/sysadmin/domain-settings/" to set an outgoing IP for a domain.
when i call this API in my app, it does not set IP for domain.
so i am curious why it works in web interface but not in my app API call.
0
Employee Replied
Employee Post Marked As Resolution
What does your request payload look like? Are you providing the gatewayGuid for the gateway you're setting, for example:

0
Meysam Farazmand Replied
Thank you for your guide. i set gatewayGuid and problem solved.

Reply to Thread