1 (edited by pavelrybalka 2019-03-26 23:31:41)

Topic: RESTful API - Update profile - forwarding not setting

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.5
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Ubuntu 16
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi!
I'm try to update existing user profile with curl. I can change all settings, but forwarding=user1@domain.com is not working. In admin panel I can set forwarding without problem. What may be the problem?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: RESTful API - Update profile - forwarding not setting

Dear @pavelrybalka,

Could you please show me the full curl commands you used to update forwarding?
I will try to reproduce this issue locally and fix it.

3

Re: RESTful API - Update profile - forwarding not setting

ZhangHuangbin wrote:

Dear @pavelrybalka,
Could you please show me the full curl commands you used to update forwarding?
I will try to reproduce this issue locally and fix it.

Hi, thnx for reply.
I run login from curl to create cookie.txt and then run, as written in document:
curl -X PUT -i -b cookie.txt -d "forwarding=user1@domain.com" https://myserver/iredadmin/api/user/myemail@myserver

(I replaced my real server and user names)
I tested some other options for update here - language, name, quota - they are working fine. Only forwarding is not fire.

4

Re: RESTful API - Update profile - forwarding not setting

pavelrybalka wrote:

curl -X PUT -i -b cookie.txt -d "forwarding=user1@domain.com" https://myserver/iredadmin/api/user/myemail@myserver

I can not reproduce this issue. Questions:

- Which iRedAdmin-Pro release are you running? You mentioned the iRedMail version is 0.9.5, i suppose you're running an old iRedAdmin-Pro release too?
- In post data, "forwarding=user1@domain.com", is the mail domain in address "user1@domain.com" hosted on your server? If yes, does "user1@domain.com" exist?
- Does it work if @domain.com (in "forwardings=") is an external domain like "user1@gmail.com"?

5

Re: RESTful API - Update profile - forwarding not setting

1)  iRedAdmin-Pro 2.4.0

2) 3) user1@domain.com used in real request is existing gmail address - I can set forwarding to it in admin panel. And it works.

6

Re: RESTful API - Update profile - forwarding not setting

iRedAdmin-Pro-SQL-2.4.0 is too old, any chance you can upgrade iRedMail and iRedAdmin-Pro to the latest release?