1

Topic: iredamin page isn't display properly

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

The only respond given by browser is Internal Server Error.
And the nginx's log only "GET /iredadmin HTTP/2.0" 500 21"

Where I should check more to solve this?

Anyway, the mail itself loaded properly, only the iredadmin page has problem. Thanks in advance.

----

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

2

Re: iredamin page isn't display properly

- Any related error in /var/log/syslog?
- Did you change anything recently before this issue happens?

3

Re: iredamin page isn't display properly

ZhangHuangbin wrote:

- Any related error in /var/log/syslog?
- Did you change anything recently before this issue happens?

No relate log at syslog.

I am not change anything recently, since this is old setup.
The only change actually the /iredadmin -> /admin
And that's years ago when first setup.
The only usual change is update system only.

I just check the service of iredapd.service is failed stated.

Errors are:
/opt/iredapd/iredapd.py:6: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12.
The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
Traceback (most recent call last):
  File "/opt/iredapd/iredapd.py", line 20, in <module>
    from libs import __version__, daemon, utils
  File "/opt/iRedAPD-5.0.4/libs/utils.py", line 19, in <module>
    from web import sqlquote
ModuleNotFoundError: No module named 'web'

4

Re: iredamin page isn't display properly

Please upgrade iRedAPD to latest release then check again:
https://docs.iredmail.org/upgrade.iredapd.html

5

Re: iredamin page isn't display properly

Here the result of upgrade process:

 bash upgrade_iredapd.sh
* Detected Linux/BSD distribution: UBUNTU
* Checking dependent Python modules:
  + [required] wheel
  + [required] sqlalchemy
  + [required] dnspython
  + [required] requests
* Found iRedAPD directory: /opt/iredapd, symbol link of /opt/iRedAPD-5.0.4
* Found iRedAPD config file: /opt/iredapd/settings.py
* Add new SQL tables - if there's any
* Create directory /opt/iRedAPD-5.9.3.
* Copying new version to /opt/iRedAPD-5.9.3
* Copy old config file: settings.py (/opt/iredapd/settings.py -> /opt/iRedAPD-5.9.3/settings.py)
* Copy custom plugins: /opt/iRedAPD-5.0.4/plugins/custom_*.py.
* Set correct owner and permission for /opt/iRedAPD-5.9.3: root:root, 0500.
* Set permission for iRedAPD config file: /opt/iRedAPD-5.9.3/settings.py -> 0400.
* Re-create symbol link: /opt/iredapd -> /opt/iRedAPD-5.9.3
* Remove existing systemd service files.
* Copy systemd service file: /opt/iredapd/rc_scripts/iredapd.service -> /lib/systemd/system/iredapd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/iredapd.service -> /lib/systemd/system/iredapd.service.
* Replace py2 by py3 in cron jobs.
* Restarting iRedAPD service.
Job for iredapd.service failed because the control process exited with error code.
See "systemctl status iredapd.service" and "journalctl -xeu iredapd.service" for details.
Failed, please restart iRedAPD service manually.
Traceback (most recent call last):
  File "/opt/iredapd/tools/fix_throttle_priority.py", line 22, in <module>
    import web
  File "/opt/iredapd/tools/../web/__init__.py", line 4, in <module>
    from . import (  # noqa: F401
  File "/opt/iredapd/tools/../web/debugerror.py", line 19, in <module>
    from . import webapi as web
  File "/opt/iredapd/tools/../web/webapi.py", line 12, in <module>
    import multipart
ModuleNotFoundError: No module named 'multipart'
* Upgrade completed.

< NOTE > If iRedAPD doesn't work as expected, please post your issue in our
< NOTE > online support forum: http://www.iredmail.org/forum/
< NOTE >
< NOTE > * Turn on debug mode: http://www.iredmail.org/docs/debug.iredapd.html
< NOTE > * iRedAPD log file is /var/log/iredapd/iredapd.log.

And there the result of "journalctl -xeu iredapd.service"

Traceback (most recent call last):
python3[3074403]:   File "/opt/iredapd/iredapd.py", line 20, in <module>
python3[3074403]:     from libs import __version__, daemon, utils
python3[3074403]:   File "/opt/iRedAPD-5.9.3/libs/utils.py", line 20, in <module>
python3[3074403]:     from web import sqlquote
python3[3074403]:   File "/opt/iRedAPD-5.9.3/web/__init__.py", line 4, in <module>
python3[3074403]:     from . import (  # noqa: F401
python3[3074403]:   File "/opt/iRedAPD-5.9.3/web/debugerror.py", line 19, in <module>
python3[3074403]:     from . import webapi as web
python3[3074403]:   File "/opt/iRedAPD-5.9.3/web/webapi.py", line 12, in <module>
python3[3074403]:     import multipart
python3[3074403]: ModuleNotFoundError: No module named 'multipart'
systemd[1]: iredapd.service: Control process exited, code=exited, status=1/FAILURE

Any advices?

6

Re: iredamin page isn't display properly

Sorry about this issue. Please upgrade to iRedAPD 5.9.4 instead, it fixes this issue.
https://github.com/iredmail/iRedAPD/tags

7

Re: iredamin page isn't display properly

Here the update process:

 bash upgrade_iredapd.sh
* Detected Linux/BSD distribution: UBUNTU
* Checking dependent Python modules:
  + [required] wheel
  + [required] sqlalchemy
  + [required] dnspython
  + [required] requests
Install packages: python3-multipart
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  python3-multipart
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.8 kB of archives.
After this operation, 150 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 python3-multipart all 0.0.5-2 [27.8 kB]
Fetched 27.8 kB in 0s (70.4 kB/s)
Selecting previously unselected package python3-multipart.
(Reading database ... 313035 files and directories currently installed.)
Preparing to unpack .../python3-multipart_0.0.5-2_all.deb ...
Unpacking python3-multipart (0.0.5-2) ...
Setting up python3-multipart (0.0.5-2) ...
Scanning processes...

* Found iRedAPD directory: /opt/iredapd, symbol link of iRedAPD-5.9.3
* Found iRedAPD config file: /opt/iredapd/settings.py
* Add new SQL tables - if there's any
* Create directory /opt/iRedAPD-5.9.4.
* Copying new version to /opt/iRedAPD-5.9.4
* Copy old config file: settings.py (/opt/iredapd/settings.py -> /opt/iRedAPD-5.9.4/settings.py)
* Copy custom plugins: iRedAPD-5.9.3/plugins/custom_*.py.
* Set correct owner and permission for /opt/iRedAPD-5.9.4: root:root, 0500.
* Set permission for iRedAPD config file: /opt/iRedAPD-5.9.4/settings.py -> 0400.
* Re-create symbol link: /opt/iredapd -> /opt/iRedAPD-5.9.4
* Remove existing systemd service files.
* Copy systemd service file: /opt/iredapd/rc_scripts/iredapd.service -> /lib/systemd/system/iredapd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/iredapd.service -> /lib/systemd/system/iredapd.service.
* Replace py2 by py3 in cron jobs.
* Restarting iRedAPD service.
* Upgrade completed.

< NOTE > If iRedAPD doesn't work as expected, please post your issue in our
< NOTE > online support forum: http://www.iredmail.org/forum/
< NOTE >
< NOTE > * Turn on debug mode: http://www.iredmail.org/docs/debug.iredapd.html
< NOTE > * iRedAPD log file is /var/log/iredapd/iredapd.log.

However when I check the service's status:

systemctl status iredapd.service
● iredapd.service - iRedAPD (A simple posfix policy server)
     Loaded: loaded (/lib/systemd/system/iredapd.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2025-12-13 06:26:40 WIB; 1min 2s ago
    Process: 1609741 ExecStart=/usr/bin/python3 /opt/iredapd/iredapd.py (code=exited, status=0/SUCCESS)
   Main PID: 1609763 (python3)
      Tasks: 1 (limit: 14204)
     Memory: 36.9M
        CPU: 729ms
     CGroup: /system.slice/iredapd.service
             └─1609763 /usr/bin/python3 /opt/iredapd/iredapd.py

python3[1609741]: iredapd Loading plugin (priority: 99): wblist_rdns
python3[1609741]: iredapd Loading plugin (priority: 90): reject_sender_login_mismatch
python3[1609741]: iredapd Loading plugin (priority: 80): greylisting
python3[1609741]: iredapd Loading plugin (priority: 60): throttle
python3[1609741]: iredapd Loading plugin (priority: 50): sql_alias_access_policy
python3[1609741]: iredapd Loading plugin (priority: 40): amavisd_wblist
python3[1609741]: iredapd Starting SRS sender rewriting channel, listening on 127.0.0.1:7778
python3[1609741]: iredapd Starting SRS recipient rewriting channel, listening on 127.0.0.1:7779
systemd[1]: iredapd.service: Can't open PID file /run/iredapd.pid (yet?) after start: Operation not permitted
systemd[1]: Started iRedAPD (A simple posfix policy server).

There is an error about PID file...

And, after I reboot the server, I still can't access the iRedAdmin url. Respond is same: 'Internal Server Error'

The mail url still accessible and operate properly.

8

Re: iredamin page isn't display properly

Please upgrade iRedAdmin to latest v2.7 too.
FYI
https://docs.iredmail.org/migrate.or.up … admin.html
https://github.com/iredmail/iRedAdmin/tags