• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Issue Mail Account XML API: mailbox - This element is not expected

pmg

Basic Pleskian
Server operating system version
Linux
Plesk version and microupdate number
Plesk Obsidian 18.0.71 Update #2
Having issue creating email accounts with mailbox enabled.
Request:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<packet>
    <mail>
        <create>
            <filter>
                <site-id>248</site-id>
                <mailname>
                    <name>info1</name>
                    <password>
                        <value>redacted</value>
                        <type>plain</type>
                    </password>
                    <mailbox>
                        <enabled>true</enabled>
                        <quota>1024000</quota>
                    </mailbox>
                </mailname>
            </filter>
        </create>
    </mail>
</packet>

Response:
XML:
<?xml version="1.0"?>
<packet version="1.6.9.1">
    <system>
        <status>error</status>
        <errcode>1014</errcode>
        <errtext>Parser error: Request is invalid. Error in line 14: Element &#039;mailbox&#039;:
            This element is not expected. Expected is one of ( antivir,
            outgoing-messages-mbox-limit, description ).</errtext>
    </system>
</packet>

Using docs/examples from Creating Mail Accounts
 
Try switching the order of the <mailbox> element with the <password> element (i.e having the <password> element last within the <mailname> element). The order should not matter, but it seems it does :(
 
Hey @Kaspar , thanks for the quick response!
This might explain some other hickups I've faced with XML API. Will keep in mind that order sometimes matter.
Right now I've worked around this using <update> packet to enable mailbox post email creation.
 
Back
Top