• 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

How to change mail account infos without deleting mail-aliases??

Micha2409

New Pleskian
Hello all 2gether,

this is my first thread in this forum since my hosting-provider switched from "parallels" to "PLESK 12.5".
I'm that kind of "autodidact" who tries to handle issues by myself as far as I come. ('cause: when you try 'wrong' stuff, you learn something, too! Right!? (at least many other ways, how you should NOT do this or that... but maybe other cool stuff :cool:)

Actually I'm trying' to change/update the mail-account-information without changing/removing(?) other mail-account-settings.
In this special case I want to change the password of an account without removing it's alias(es).

First, I tried:
$request = <<<EOF
<packet>
<mail>
<update>
<set>
<filter>
<site-id>some site-id</site-id>
<mailname>
<name>some name</name>
<password>
<value>some value</value>
<type>some new password</type>
</password>
<description><![CDATA["some description"]]></description>
</mailname>
</filter>
</set>
</update>
</mail>
</packet>
EOF;

When I execute this, everything works fine BUT: all mail-aliases are gone! :mad: What I really don't understand so far is "why"?? I don't touch the alias(es) at all...

So the second approach I thought about was 'getting' the alias(es) first, change the password with the code above and stick the "old" alias(es) to it again.
But when I try to get the alias(es) with:

$request = <<<EOF
<packet>
<mail>
<get_info>
<filter>
<site-id>some site-id</site-id>
<name>some name</name>
</filter>
<aliases/>
</get_info>
</mail>
</packet>
EOF;
$response = $client->request($request);
var_dump($response);

the output is: string(int) "ok id name mailalias1 mailalias2 xxx off description" (what is right so far as I have added two aliases manually)

Now I have two questions:
1.) Which way would be the best/correct one to make "my wishes happen"? ;-)
2.) How do I get single informations out of the response from PLESK (i.e.: just the alias(es))

Thanks a lot in advance! :)
Micha


PS: By the way: The Example-"XML Schemas" in the online-reference are not linked right. Trying to see a .xsd-file on: http://docs.plesk.com/en-US/12.5/api-rpc/reference/xml-schemas-for-xml-api-operators/ brings up a "404 not found"! ;)
[EDIT] That "bug" seems to be fixed now! :) But my problem is still there and I couldn't believe that here's NOBODY who could help me or even give me a little hint?!?

PPS: Sorry for my "unpolished" english... It's a looooong time ago! :rolleyes:
 
Last edited:
Back
Top