1

Topic: iredadmin internal server error (FreeBSD)

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

iRedMail installed and running inside a thick jail.

Accessing /iredadmin/ throws Internal server errors. Upon accessing the page, the maillogs show the following:
```
queued_as: 4fn0BH2lTlz718nY, Subject: "bug: <class 'RuntimeError'>: 'cryptography' package is required for sha256_password or caching_sha2_", From: <postmaster@example.arpa>, helo=, dkim_new=dkim:example.arpa, 121 ms
```

The python module 'cryptography' is installed..
```
# pkg info py311-cryptography | head -1
py311-cryptography-46.0.5_1,1
```

When I run 'python3 iredadmin.py' I can login with no errors.

----

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

2

Re: iredadmin internal server error (FreeBSD)

That error usually means the MySQL/MariaDB auth plugin (like caching_sha2_password) needs cryptography available in the same Python environment iRedAdmin is using. Since it works via CLI, check if Nginx/uwsgi is using a different Python path or virtualenv.

3

Re: iredadmin internal server error (FreeBSD)

You might want to check the server logs for more details-FreeBSD errors like this are often related to permissions or missing dependencies. Also, try restarting the iRedAdmin service and verifying your configuration files. Let us know if you can share the exact error message

4 (edited by GenZod Yesterday 18:16:17)

Re: iredadmin internal server error (FreeBSD)

I think I found the culprit.

It was the last line in the file '/usr/local/www/iredadmin/rc_scripts/uwsgi/freebsd.ini'

wsgi-file = iredadmin.py

It should have been 'uwsgi-file = iredadmin.py' instead :<

After changing that, I restarted the jail and try to access /iredadmin/ and it works now..

Edit: I checked with another friend who is testing iRedMail on FreeBSD 15.0-RELEASE and that last line is also 'wsgi-file = iredadmin.py'.. maybe a typo :>