Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon API > New accounts added by xmlAPI will not inherit settings from "new Accounts" template

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon API  /

New accounts added by xmlAPI will not inherit settings from "new Accounts" template

When adding new accounts through the xmlAPI I can't seem to get the settings I want for "Remote Administration" settings. Specifically edit password so the user can change to a different password than the one we create for them.

My first assumption was that ALL new accounts inherited these settings.

I tried to include them in the request (see example) but still no luck.

The account gets created and has some settings per the default template but not the ones I need.

this is my request and response:

--- [Start request] ------------------------------------------------------------+
 > Logging in ...
 > sending ...
////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="utf-8"?><MDaemon><API><Request encoding="utf-8" version="19.5.0" echo="1" verbose="1">
    <Operation>CreateUser</Operation>
        <Parameters>
            <Domain>mxxxx.com</Domain>
<Mailbox>spip20</Mailbox>
<Details>
<FullName>spip20</FullName>
<Frozen>No</Frozen>
<Disabled>No</Disabled>
<MustChangepassword>No</MustChangepassword>
<DontExpirePassword>Yes</DontExpirePassword>
<Password>XXXX</Password>
</Details>
</Parameters>
    <RemoteAdmin>
<Enabled>1</Enabled>
<EditFullname>1</EditFullname>
<EditPassword>1</EditPassword>
<EditFwd>1</EditFwd>
<EditAutoResponder>1</EditAutoResponder>
<EditImapRules>1</EditImapRules>
</RemoteAdmin>
</Request></API></MDaemon>

////////////////////////////////////////////////////////////
--- [Debug response] ------------------------------------------------------------+
 > recieving ...1459 bytes
////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="utf-8"?>
<MDaemon>
<API>
<Request encoding="utf-8" version="19.5.0" echo="1" verbose="1">
    <Operation>CreateUser</Operation>
        <Parameters>
            <Domain>mxxxx.com</Domain>
<Mailbox>spip20</Mailbox>
<Details>
<FullName>spip20</FullName>
<Frozen>No</Frozen>
<Disabled>No</Disabled>
<MustChangepassword>No</MustChangepassword>
<DontExpirePassword>Yes</DontExpirePassword>
<Password>XXXX</Password>
</Details>
</Parameters>
    <RemoteAdmin>
<Enabled>1</Enabled>
<EditFullname>1</EditFullname>
<EditPassword>1</EditPassword>
<EditFwd>1</EditFwd>
<EditAutoResponder>1</EditAutoResponder>
<EditImapRules>1</EditImapRules>
</RemoteAdmin>
</Request>
<Response version="19.5" session="18301082" et="10.106285">
<Status id="0" value="0x00000000" message="The operation completed successfully."/>
<ServiceName>Management Web Service (64bit) for MDaemon Messaging Server</ServiceName>
<ProductVersion>19.5.0</ProductVersion>
<ServiceVersion>19.5.0.5</ServiceVersion>
<SERVER_NAME>XXXX</SERVER_NAME>
<DOMAIN>XXXX</DOMAIN>
<URL>/MdMgmtWS/</URL>
<AUTH_USER>XXXX</AUTH_USER>
<TimeStamp>2019-10-15T10:55:18.000Z</TimeStamp>
<Uptime>16 days 4 hours 41 minutes 50 seconds</Uptime>
<Operation>CreateUser</Operation>
<Result>
<User id="spip20" displayname="spip20" domain="mxxxx.com"/>
</Result>
</Response>
</API>
</MDaemon>
////////////////////////////////////////////////////////////

any assistance would be appreciated

  (older msg: 4)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Patrik K - Dec 9, 2019 5:02 am (#5 Total: 9)  

 

Photo of Author
Patrik K
Newbie
Newbie
Posts: 6
I have changed the xml per your suggestion (moved remote tag into parameters tag).

The "CreateUser" still does not behave as expected and does not inherit the "NewAccounts" template settings. However your workaround is now working , the "UpdateUser" call now sets the RemoteAdmin setting the way I have them in the xml request.

I still get the message about public folders though(I verified that the public folder setting is indeed off in the GUI)

(I only included the last part of the call ie "UpdateUser", the first part CreateUser gives no error)

> Logging in to ...
 > sending ...
////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="utf-8"?><MDaemon><API><Request encoding="utf-8" version="19.5.0" echo="1" verbose="1">
    <Operation>UpdateUser</Operation>
        <Parameters>
            <Domain>mxxxx.com</Domain>
<Mailbox>spip24</Mailbox>
<Details>
<Frozen>No</Frozen>
<Disabled>No</Disabled>
<MustChangepassword>No</MustChangepassword>
<DontExpirePassword>Yes</DontExpirePassword>
</Details>
<RemoteAdmin>
<Enabled>1</Enabled>
<EditFullname>1</EditFullname>
<EditPassword>1</EditPassword>
<EditFwd>1</EditFwd>
<EditAutoResponder>1</EditAutoResponder>
<EditImapRules>1</EditImapRules>
</RemoteAdmin>
</Parameters>
</Request></API></MDaemon>

////////////////////////////////////////////////////////////
--- [Debug response] ------------------------------------------------------------+
 > recieving ...1308 bytes
////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="utf-8"?>
<MDaemon>
<API>
<Request encoding="utf-8" version="19.5.0" echo="1" verbose="1">
    <Operation>UpdateUser</Operation>
        <Parameters>
            <Domain>mxxxx.com</Domain>
<Mailbox>spip24</Mailbox>
<Details>
<Frozen>No</Frozen>
<Disabled>No</Disabled>
<MustChangepassword>No</MustChangepassword>
<DontExpirePassword>Yes</DontExpirePassword>
</Details>
<RemoteAdmin>
<Enabled>1</Enabled>
<EditFullname>1</EditFullname>
<EditPassword>1</EditPassword>
<EditFwd>1</EditFwd>
<EditAutoResponder>1</EditAutoResponder>
<EditImapRules>1</EditImapRules>
</RemoteAdmin>
</Parameters>
</Request>
<Response version="19.5" session="08A7FF89" et="0.057419">
<Status id="0" value="0x8135403A" message="Public folders are not enabled"/>
<ServiceName>Management Web Service (64bit) for MDaemon Messaging Server</ServiceName>
<ProductVersion>19.5.0</ProductVersion>
<ServiceVersion>19.5.0.5</ServiceVersion>
<SERVER_NAME>XXXX</SERVER_NAME>
<DOMAIN>XXXX</DOMAIN>
<URL>/MdMgmtWS/</URL>
<AUTH_USER>XXXX</AUTH_USER>
<TimeStamp>2019-10-15T10:55:18.000Z</TimeStamp>
<Uptime>1 days 18 hours 47 minutes 48 seconds</Uptime>
<Operation>UpdateUser</Operation>
</Response>
</API>
</MDaemon>
////////////////////////////////////////////////////////////

< InitUser -> [0x8135403A] Public folders are not enabled >



  (newer msg:4)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



 Content:

Read New | Search

 Guest:

Email to Admin



You are visiting as a Guest user.