1

Topic: Please include python3-webpy for Debian.

iRedMail version 1.7.3.
Installed with downloadable installer
Debian 12
PGSQL
Nginx

As long as I can remember, when I do a clean install of iRedMail, I always get Python errors saying that the module web is missing. I have had to manually install python3-webpy on Debian as long as I can remember, and then the errors went away.

----

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

2

Re: Please include python3-webpy for Debian.

Your information is out of date. webpy is embedded in iRedAPD, mlmmjadmin and iRedAdmin(-Pro), no need to install python3-webpy at all.

3 (edited by Davesworld 2025-05-25 16:16:26)

Re: Please include python3-webpy for Debian.

ZhangHuangbin wrote:

Your information is out of date. webpy is embedded in iRedAPD, mlmmjadmin and iRedAdmin(-Pro), no need to install python3-webpy at all.

Then why did I get the error from a fresh new install yesterday on Debian 12? I only saw webapi.py in any of those sources.

4

Re: Please include python3-webpy for Debian.

What's the original error message? In which log file?

5 (edited by Davesworld 2025-06-09 09:13:09)

Re: Please include python3-webpy for Debian.

I just did a fresh install of 1.7.4 and I get a cron log .

Cron <root@mail2> python3 /opt/www/iredadmin/tools/delete_mailboxes.py

Traceback (most recent call last):
  File "/opt/www/iredadmin/tools/delete_mailboxes.py", line 43, in <module>
    import web
ModuleNotFoundError: No module named 'web'

Installing python3-webpy from debian solves it.

6

Re: Please include python3-webpy for Debian.

- Do you have directory "/opt/www/iredadmin/web/" on your machine?
- I will investigate this issue shortly. Thanks for the feedback.

7

Re: Please include python3-webpy for Debian.

I cannot reproduce the issue locally.
Does it report any error if you run command manually?

python3 /opt/www/iredadmin/tools/delete_mailboxes.py

8

Re: Please include python3-webpy for Debian.

ZhangHuangbin wrote:

I cannot reproduce the issue locally.
Does it report any error if you run command manually?

python3 /opt/www/iredadmin/tools/delete_mailboxes.py

Yes, I removed python3-webpy with apt and then ran:

python3 /opt/www/iredadmin/tools/delete_mailboxes.py

root@mail2:~# python3 /opt/www/iredadmin/tools/delete_mailboxes.py
Traceback (most recent call last):
  File "/opt/www/iredadmin/tools/delete_mailboxes.py", line 43, in <module>
    import web
ModuleNotFoundError: No module named 'web'

I installed python3.webpy again which also installed python3-cheroot python3-jaraco.functools python3-more-itertools and ran it again manually and no errors.

9

Re: Please include python3-webpy for Debian.

Do you have directory "/opt/www/iredadmin/web/" on your machine?

10

Re: Please include python3-webpy for Debian.

ZhangHuangbin wrote:

Do you have directory "/opt/www/iredadmin/web/" on your machine?

Yes, in both Admin and Admin Pro, I have that directory, and each contains a Python file called webapi.py. There is no web.py in either of them. In Debian, after installing web.py, it is located at /usr/lib/python3/dist-packages/pygments/lexers/web.py. Installing web.py makes the error go away.