1

Topic: mlmmjadmin error: iRedAdmin-Pro fail to start

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.



After doing the upgrade to iRedMail 0.9.8 and iRedAdminPro 2.9, I can no longer access the iRedAdminPro web site. All I get is:

internal server error

I installed the mlmmj mail list manager and I see in in the log file: /var/log/uwsgi-iredadmin.log

 File "/usr/local/www/iRedAdmin-Pro-SQL-2.9.0/libs/mlmmj/__init__.py", line 12, in <module>
    api_headers = {settings.MLMMJADMIN_API_AUTH_HEADER: settings.mlmmjadmin_api_auth_token}
AttributeError: 'module' object has no attribute 'mlmmjadmin_api_auth_token'

This is from my mlmmj/settings.py conf file:

backend_api = 'bk_none'
backend_cli = 'bk_iredmail_sql'

# A list of API AUTH tokens (secret strings) used for authentication.
# It's strong recommended to use a long string as auth token, program will log
# first 8 characters to help you identity the client.

api_auth_tokens = ['@PC^z********************efMN5ur']

# Load extra config file.
#from custom_settings import *                                                                                                 

# database access
iredmail_sql_db_type = 'mysql'
iredmail_sql_db_server = '127.0.0.1'
iredmail_sql_db_port = 3306
iredmail_sql_db_name = 'vmail'
iredmail_sql_db_user = 'vmailadmin'
iredmail_sql_db_password = '******************************'

# directories
MLMMJ_SPOOL_DIR = '/var/vmail/mlmmj'
MLMMJ_ARCHIVE_DIR = '/var/vmail/mlmmj-archive'
MLMMJ_DEFAULT_PROFILE_SETTINGS.update({'smtp_port': 10027})
MLMMJ_SKEL_DIR = '/usr/local/share/mlmmj/text.skel'

Mail delivery to users via IMAP works find and Roundcube Webmail interface is also working. It is just iRedAdmin-Pro web interface.

I can't find anything else in the log files.

Any ideas?

----

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

2

Re: mlmmjadmin error: iRedAdmin-Pro fail to start

Did you have mlmmj and mlmmjadmin integrated in iRedMail? It's mentioned in iRedMail-0.9.8 upgrade tutorial.
https://docs.iredmail.org/iredmail.releases.html

After you have mlmmjadmin running, re-run iRedAdmin-Pro upgrade tutorial:
https://docs.iredmail.org/migrate.or.up … admin.html

3

Re: mlmmjadmin error: iRedAdmin-Pro fail to start

Hi,

I have managed to get iRedAdmin-Pro to work by re-running the upgrade script.

By trial and error, I also had to do the following to get the iRedAdmin-Pro to display a user page or the Preferences page:

mlmmj/settings.py conf file:

1.   changed the line :

      api_auth_tokens = ['@PC^z********************efMN5ur']

to
       mlmmjadmin_api_auth_token = ['@PC^z********************efMN5ur']

(added 'mlmmjadmin_' in front, removed the 's' from the end)

2.  changed the random string so that it is not a random string of ASCII characters, but a MD5 checksum of a random string. I found that if there are any characters in the token that are not hexadecimal characters, it does not work.

Are these "fixes" really fixes or do you think there is something else wrong with my setup?

4

Re: mlmmjadmin error: iRedAdmin-Pro fail to start

Your fix is fine.