2
SmarterMail API forwarding settings
Question asked by Paul van Wanrooij - 1/21/2022 at 5:21 AM
Answered
As a system admin, how can I configure the email forwarding settings via the SmarterMail API?

With POST api/v1/settings/sysadmin/user-mail/{email} I can change the enableMailForwarding option. But not the email address of the destination.

6 Replies

Reply to Thread
1
Sébastien Riccio Replied
Marked As Answer
Hello Paul,

It looks you need an additional call:

To read the list and options:

To set the list and options:

You need first to impersonate in domain admin context using:

At least, that's how we currently do it in our control panel :


You can also do it from the user context (when impersonating the user instead of domain admin) with:

and

I haven't found a function that let you manage a user forwarding options directly from the System admin context without first impersonating as the domain admin or directly the user, but maybe I missed it.

Hope this will help.
Sébastien Riccio System & Network Admin https://swisscenter.com
0
Paul van Wanrooij Replied
Hello Sebastien,

Thank you.

If we want to use the function POST api/v1/settings/sysadmin/manage-domain/{domain} . What value should the input of the POST have then?
0
Sébastien Riccio Replied
As far as I know it needs no input data, or maybe only an empty json string "{}" as data input. 
It's only required that the method is POST and the {domain} in the url to be specified.

Sébastien Riccio System & Network Admin https://swisscenter.com
0
Paul van Wanrooij Replied
Thank you. An empty POST will not work either. We'll keep looking.
0
Sébastien Riccio Replied
Well, I use this call in some python script I wrote for our incoming mail filtering gateway, and I've just checked, I pass and empty data set, and it correctly returns the impersonation token.


I guess I unfortunately can't help you much more at this point. I hope you'll sort it out.

Sébastien Riccio System & Network Admin https://swisscenter.com
1
Paul van Wanrooij Replied
The admin user we used for the API call did not have the correct permissions. After we activated it, it worked.

Reply to Thread