1

Topic: Adding alias to user cause Internal Error Server

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 5.0
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version:  Debian 10.10.
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- 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.
====

Hello,

I want to know how enable debug mode in iredadmin restful api beause i'm getting internal server error when i'm trying to add alias to user.
To add alias for user i'm using this endpoint: /api/user/<mail> with put method and aliases parameter (addAlias parameter also didn't work).

2

Re: Adding alias to user cause Internal Error Server

Any related error in /var/log/syslog?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: Adding alias to user cause Internal Error Server

When I tried add alias to my test user I got also 500 error and in syslog is this line:
Oct 19 09:38:03 mail iredadmin: [212.122.192.174] PUT /iredadmin/api/user/ldap-iredmail11102021-test@pbs.edu.pl 500 202 "-"

4

Re: Adding alias to user cause Internal Error Server

I'm still waiting for answer in this thread. Maybe anyone else can help?

5

Re: Adding alias to user cause Internal Error Server

mikolaj.werner wrote:

I'm still waiting for answer in this thread. Maybe anyone else can help?

sorry about my late reply.

I expect there’re more detailed log lines in /var/log/syslog, could you help check and extract the log lines?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

6

Re: Adding alias to user cause Internal Error Server

ZhangHuangbin wrote:
mikolaj.werner wrote:

I'm still waiting for answer in this thread. Maybe anyone else can help?

sorry about my late reply.

I expect there’re more detailed log lines in /var/log/syslog, could you help check and extract the log lines?

Do you mean the entire syslog file or something else?

7

Re: Adding alias to user cause Internal Error Server

mikolaj.werner wrote:

Do you mean the entire syslog file or something else?

Please check this log file and try to extract related log lines, do not send the whole log file.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

8

Re: Adding alias to user cause Internal Error Server

ZhangHuangbin wrote:
mikolaj.werner wrote:

Do you mean the entire syslog file or something else?

Please check this log file and try to extract related log lines, do not send the whole log file.

These are just two lines related to the user alias update error I found in syslog.

Nov  9 09:25:14 mail iredadmin [API] Reset per-user alias address for ldap-iredmail11102021-test@pbs.edu.pl to: ldap-iredmailxxx11@pbs.edu.pl. admin=ired-api@pbs.edu.pl, domain=pbs.edu.pl, username=ldap-iredmail11102021-test@pbs.edu.pl, event=update, ip=212.122.192.174 (/opt/www/iRedAdmin-Pro-LDAP-5.0/libs/logger.py, L76)
Nov  9 09:25:14 mail iredadmin: [212.122.192.174] PUT /iredadmin/api/user/ldap-iredmail11102021-test@pbs.edu.pl 500 202 "-" 

9

Re: Adding alias to user cause Internal Error Server

This is normal log, not (500) error.
Possible to reproduce the error?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

10

Re: Adding alias to user cause Internal Error Server

ZhangHuangbin wrote:

This is normal log, not (500) error.
Possible to reproduce the error?

That was reproduction of error (In postman which i'm using to testing iredmail api, I got Internal Server Error without any details). Maybe I should increase level of logging but I don't know how.

11

Re: Adding alias to user cause Internal Error Server

Please try to reproduce the error with postman, with "internal server error", there must be some related detailed error log in /var/log/syslog (on Debian/Ubuntu).

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

12

Re: Adding alias to user cause Internal Error Server

ZhangHuangbin wrote:

Please try to reproduce the error with postman, with "internal server error", there must be some related detailed error log in /var/log/syslog (on Debian/Ubuntu).

Now I know why in syslog is no errors about inserting alias to user: After insert alias to user, inserted alias is appear in user when i check user in iredadmin panel. The only problem is bad response after insert alias (should be 200 but is 500).

13

Re: Adding alias to user cause Internal Error Server

The "500" is internal server error which means our iRedAdmin-Pro code has some error, i need log for troubleshooting, i can not judge based on your description.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee