• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Problems with RPC API and mail names

S

sclinter

Guest
Hi,
I'm trying to add mailnames to my plesk system via the RPC API, I've managed to get it working however, when I try and add 2 mail names with the same name to different domains the first one succeeds and all subsequent ones fail, for example:

[email protected] - succeed
[email protected] - fails
[email protected] - fails

Here is the XML I'm using...

This one succeeds...
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<packet version="1.4.1.0">
<mail><create><filter><domain_id>517</domain_id>
<mailname><name>info</name>
<redirect><enabled>true</enabled>
<address>[email protected]</address>
</redirect>
<password>hfsd75y34u</password>
</mailname>
</filter>
</create>
</mail>
</packet>

This second one fails...
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<packet version="1.4.1.0">
<mail><create><filter><domain_id>522</domain_id>
<mailname><name>info</name>
<redirect><enabled>true</enabled>
<address>[email protected]</address>
</redirect>
<password>hfsd75y34u</password>
</mailname>
</filter>
</create>
</mail>
</packet>

The error I get back from the API is as follows:

ERROR: Unable to create mailname :Unable to update the mail name properties:
The password is incorrect, use at least 5 characters. The password should not contain mail name as its part.
Only Latin characters, no dictionary words (optional). (1023)


It seems to suggest that it's something to do with the password but this is not the case, it seems that it is trying to update the existing mailname of the same name even though its on a different domain.

This is really urgent so any help would be really appriciated!
Many thanks,
Tom
 
To use duplicate passwords, you must use "full names" for email names. From the Control Panel, click <SERVER><MAIL> and make sure you have the "use full names only" check box checked.

If you use short names, Plesk uses the password to determine what account you want. Example:

[email protected] and [email protected] would have to have different passwords IF you use "mailname" only as the account.
 
Back
Top