Hi, I have a weird issue with XMLApi usage to remotely add/remove email forwarding to users.
I just created my forum account in order to report the issue but I can't post to the report forum, so here I am.
The fact is that a call to enable forwarding sometimes ends up doing the opposite thing and removes the forwarding. You can see the debug for the XML call to enable the forwarding and the weird log about "mailmng-mailname --remove-redirect" instead of "--add-redirect".
This results in the error "Unable to activate or deactivate mail group: You should add a mail group member before enabling the mail group." and my user is not correctly updated.
Sometimes repeating the same API call more times ends up doing the right thing: same XML, bug "mailmng-mailname" call changes.
Sounds like a bug, but as I cannot open a post in report I ask for suggestions about checks/debug I can do and if you think this is a bug, how to escalate it.
I just created my forum account in order to report the issue but I can't post to the report forum, so here I am.
The fact is that a call to enable forwarding sometimes ends up doing the opposite thing and removes the forwarding. You can see the debug for the XML call to enable the forwarding and the weird log about "mailmng-mailname --remove-redirect" instead of "--add-redirect".
This results in the error "Unable to activate or deactivate mail group: You should add a mail group member before enabling the mail group." and my user is not correctly updated.
Sometimes repeating the same API call more times ends up doing the right thing: same XML, bug "mailmng-mailname" call changes.
Sounds like a bug, but as I cannot open a post in report I ask for suggestions about checks/debug I can do and if you think this is a bug, how to escalate it.
[2023-03-11 14:25:14.744] 35230:640c813a8af68 DEBUG [panel] finish()
[2023-03-11 14:25:14.807] 35237:640c813ac52b6 DEBUG [panel] init Agent
[2023-03-11 14:25:14.835] 35237:640c813ac52b6 DEBUG [util_exec] [640c813acbf65] Starting: sys_auth
[2023-03-11 14:25:14.884] 35237:640c813ac52b6 DEBUG [util_exec] [640c813acbf65] Finished in 0.0489s, Error code: TRUE
[2023-03-11 14:25:14.922] 35237:640c813ac52b6 INFO [api-rpc] Incoming API-RPC request [d424924f4f8da6e4cdb1702707059bf4]:
<?xml version="1.0" encoding="UTF-8"?>
<packet>
<mail>
<update>
<set>
<filter>
<site-id>2</site-id>
<mailname>
<name>name.surname</name>
<forwarding>
<enabled>true</enabled>
<address>redactedemail@gmail.com</address>
</forwarding>
</mailname>
</filter>
</set>
</update>
</mail>
</packet>
[2023-03-11 14:25:14.922] 35237:640c813ac52b6 DEBUG [panel] Protocol version: 1.6.9.1
[2023-03-11 14:25:14.954] 35237:640c813ac52b6 DEBUG [util_exec] [640c813ae8f53] Starting: filwrpr 68
[2023-03-11 14:25:14.966] 35237:640c813ac52b6 DEBUG [util_exec] [640c813ae8f53] Finished in 0.01194s, Error code: TRUE
[2023-03-11 14:25:14.969] 35237:640c813ac52b6 DEBUG [panel] run operator mail
[2023-03-11 14:25:15.021] 35237:640c813ac52b6 DEBUG [util_exec] Starting with task-manager: /usr/local/psa/admin/bin/php -f /usr/local/psa/admin/plib/scripts/interface_async_executor.php -- EventListener /usr/local/psa/admin/pl
ib/modules/log-browser/library/EventListener.php handleEvent admin
[2023-03-11 14:25:15.030] 35237:640c813ac52b6 DEBUG [util_exec] Starting with task-manager: /usr/local/psa/admin/bin/php -f /usr/local/psa/admin/plib/scripts/interface_async_executor.php -- EventListener /usr/local/psa/admin/pl
ib/registry/EventListener/drweb.php handleEvent admin
[2023-03-11 14:25:15.047] 35237:640c813ac52b6 DEBUG [util_exec] [7ab4e312fc64e04d95fd1bbcbc1038a8-0] Starting: mailmng-mailname --remove-redirect --domain-name=mydomain.it --mailname=name.surname --redirect-email=redacted@gmail.com
[2023-03-11 14:25:15.077] 35237:640c813ac52b6 DEBUG [util_exec] [7ab4e312fc64e04d95fd1bbcbc1038a8-0] Finished in 0.03023s, Error code: 0
[2023-03-11 14:25:15.090] 35237:640c813ac52b6 INFO [api-rpc] API-RPC response [d424924f4f8da6e4cdb1702707059bf4]:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.9.1">
<mail>
<update>
<set>
<result>
<status>error</status>
<errcode>1023</errcode>
<errtext>Unable to activate or deactivate mail group: You should add a mail group member before enabling the mail group.</errtext>
<mailname>
<name>name.surname</name>
</mailname>
</result>
</set>
</update>
</mail>
</packet>
[2023-03-11 14:25:15.090] 35237:640c813ac52b6 DEBUG [panel] finish()