1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

mail api bug with update/set and group memberships

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by jgc94131, Feb 4, 2011.

  1. jgc94131

    jgc94131 Guest

    0
     
    PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
    Plesk 9.5.2 on FC4 linux x86

    PROBLEM DESCRIPTION AND STEPS TO REPRODUCE
    The mail/update/set request (version 1.5.2.0 shown below) treats just the <group> parameters as if the
    request was for mail/update/add.

    ACTUAL RESULT

    Doing a mail/update/set with no <group> setting does not remove the account from all groups.

    Doing a mail/update/set with one <group> setting adds that account to that group, but does not
    remove the account from all other groups.

    EXPECTED RESULT

    As with <alias>, mail/update/set with no <group> should remove the account from all mail groups.

    As with <alias>, mail/update/set with one or more <group> elements should set the current group memberships
    to just the groups selected, not the intersection of the existing group memberships and the new <group> elements sent.

    ANY ADDITIONAL INFORMATION

    Work around: For just groups, you MUST use mail/update/add and mail/update/remove.

    ===
    Example:

    mail/get_info response:

    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.5.2.0">
    <mail>
    <get_info>
    <result>
    <status>ok</status>
    <mailname>
    <id>51</id>
    <name>test.user</name>
    <mailbox>
    <enabled>true</enabled>
    <quota>-1</quota>
    </mailbox>
    <redirect>
    <enabled>true</enabled>
    <address>xxx@gmail.com</address>
    </redirect>
    <group>as@nts.org</group>
    <group>fs@nts.org</group>
    <alias>robin</alias>
    <password>xxxyyyzzz</password>
    <password_type>plain</password_type>
    <antivir>off</antivir>
    </mailname>
    </result>
    </get_info>
    </mail>
    </packet>

    mail/update/set request:

    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.5.2.0">
    <mail>
    <update>
    <set>
    <filter>
    <domain_id>5</domain_id>
    <mailname>
    <name>test.user</name>
    <redirect>
    <enabled>true</enabled>
    <address>zzz@xxx.com</address>
    </redirect>
    <group>dr@nts.org</group>
    <alias>robin</alias>
    <password>XXWWZZ123</password>
    <password_type>plain</password_type>
    </mailname>
    </filter>
    </set>
    </update>
    </mail>
    </packet>

    mail/update/set response:

    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.5.2.0">
    <mail>
    <update>
    <set>
    <result>
    <status>ok</status>
    <mailname>
    <name>test.user</name>
    </mailname>
    </result>
    </set>
    </update>
    </mail>
    </packet>

    mail/get_info response:

    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.5.2.0">
    <mail>
    <get_info>
    <result>
    <status>ok</status>
    <mailname>
    <id>51</id>
    <name>test.user</name>
    <mailbox>
    <enabled>true</enabled>
    <quota>-1</quota>
    </mailbox>
    <redirect>
    <enabled>true</enabled>
    <address>zzz@xxx.com</address>
    </redirect>
    <group>dr@ents.org</group>
    <group>as@ents.org</group>
    <group>fs@ents.org</group>
    <alias>robin</alias>
    <password>XXWWZZ123</password>
    <password_type>plain</password_type>
    <antivir>off</antivir>
    </mailname>
    </result>
    </get_info>
    </mail>
    </packet>
     
Loading...