1

Topic: Error: InvalidHeader("Value for header {X-MLMMJADMIN-API-AUTH-TOKEN:

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.0
- Deployed with iRedMail Easy or the downloadable installer?: neither, manual
- Linux/BSD distribution name and version: FreeBSD 11.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL 8.0.19
- Web server (Apache or Nginx): Nginx 1.16
- Manage mail accounts with iRedAdmin-Pro? Yes, IredAdmin-Pro 4.2

I get this nasty error message when trying to edit existing user mail accounts:
Error: InvalidHeader("Value for header {X-MLMMJADMIN-API-AUTH-TOKEN: ['43a89b7aa34354 (token hash)']} must be of type str or bytes, not <type 'list'>",)

So far the only thing I have been able to deduce is that it is Python related. Maybe my Nginx mangles the header. I don't know. Both IredAdmin and mlmj processes are running using the UWSGI web service which is compiled against Python 2.7.

Please advise.

On a side note: this one reason why I wish the mlmj dependency would become optional in future IredAdmin releases.

----

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

2

Re: Error: InvalidHeader("Value for header {X-MLMMJADMIN-API-AUTH-TOKEN:

ph7 wrote:

Error: InvalidHeader("Value for header {X-MLMMJADMIN-API-AUTH-TOKEN: ['43a89b7aa34354 (token hash)']} must be of type str or bytes, not <type 'list'>",)

It's clear that your iRedAdmin-Pro config file /opt/www/iredadmin/settings.py contains an invalid value.

The correct one is:

mlmmjadmin_api_auth_token = '43a89b7aa34354...'

But you have:

mlmmjadmin_api_auth_token = ['43a89b7aa34354...']

Remove the "[]" and restart "iredadmin" service will fix the issue.

3

Re: Error: InvalidHeader("Value for header {X-MLMMJADMIN-API-AUTH-TOKEN:

ZhangHuangbin wrote:
ph7 wrote:

Error: InvalidHeader("Value for header {X-MLMMJADMIN-API-AUTH-TOKEN: ['43a89b7aa34354 (token hash)']} must be of type str or bytes, not <type 'list'>",)

It's clear that your iRedAdmin-Pro config file /opt/www/iredadmin/settings.py contains an invalid value.

The correct one is:

mlmmjadmin_api_auth_token = '43a89b7aa34354...'

But you have:

mlmmjadmin_api_auth_token = ['43a89b7aa34354...']

Remove the "[]" and restart "iredadmin" service will fix the issue.

This fixed the error indeed. Only to be replaced by another one:

Error: JSONDecodeError('Expecting value: line 1 column 1 (char 0)',)

4

Re: Error: InvalidHeader("Value for header {X-MLMMJADMIN-API-AUTH-TOKEN:

This fixed the error indeed. Only to be replaced by another one:

Error: JSONDecodeError('Expecting value: line 1 column 1 (char 0)',)

5

Re: Error: InvalidHeader("Value for header {X-MLMMJADMIN-API-AUTH-TOKEN:

Let's move to your another topic for further discussion:
https://forum.iredmail.org/post74284.html#p74284