1 (edited by Neovana 2025-01-16 17:59:49)

Topic: OpenBSD 7.6 and iRedMail 1.7.2

Congratulations, it looks like you've just updated iRedMail to 1.7.2 (but the announcement post isn't out yet). Please let me know if OpenBSD 7.6 is recommended (main page lists 7.5).

----

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

2 (edited by Neovana 2025-01-15 18:30:35)

Re: OpenBSD 7.6 and iRedMail 1.7.2

# wget -O /usr/local/bin/fail2ban_banned_db https://raw.githubusercontent.com/iredmail/iRedMail/1.7.2/samples/fail2ban/bin/fail2ban_banned_db

https://raw.githubusercontent.com/iredm … _banned_db

Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133,

185.199.108.133, 185.199.109.133, ...

Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.

HTTP request sent, awaiting response... 404 Not Found

I think this link works:

https://raw.githubusercontent.com/iredm … _banned_db

3

Re: OpenBSD 7.6 and iRedMail 1.7.2

Neovana wrote:

Congratulation, it looks like you've just updated iRedMail to 1.7.2 (but the announcement post isn't out yet). Please let me know if OpenBSD 7.6 is recommended (main page lists 7.5).

We're preparing iRedMail v1.7.2, release note and upgrade tutorial are ready, just need to tag the version in git repo.

And yes OpenBSD 7.6 is recommended with v1.7.2, 7.5 was dropped.

In the meantime, new iRedAdmin-Pro is ready too. More important thing is, first stable release of iRedMail Enterprise Edition ("EE" for short) v1.0.0 is coming, and we have good news for iRedAdmin-Pro license owners and iRedMail Easy subscribers (annual subscription only).

4 (edited by Neovana 2025-01-16 18:25:40)

Re: OpenBSD 7.6 and iRedMail 1.7.2

I upgraded to 1.7.2 and OpenBSD 7.6.

I am experiencing issues with: mimmjadminuwsgil, iredadminuwsgil, and fail2ban. During boot, the following errors are produced:

starting package daemons: postgresql nginx php81_fpm dovecot clamd freshclam amavisd postfix mimmjadminuwsgi[1287]: pinsyscalls addr 45a52ec4259 code 253, pinoff Oxffffffff (pin 330 45a7d5ee000-45a7d5fc66d e66d) (libcpin 0 0-0 0) error 78 (failed) iredapd iredadminuwsgi[91938]: pinsyscalls addr c99aa8ac259 code 253, pinoff Oxffffffff (pin 330 c99122a4000-c99122b266d e66d) (libcpin 0 0-0 0) error 78 (failed) fail2ban(failed) gemu_ga.
starting local daemons: cron.

Additionally, after login - when I try to run:

doas fail2ban-client -x reload

I get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/fail2ban-client", line 34, in <module>
    from fail2ban.client.fail2banclient import exec_command_line, sys
ModuleNotFoundError: No module named 'fail2ban'

I've also received an email from root on the server with the following error message:

Subject: Cron <root@mail> /usr/local/bin/bash /usr/local/bin/fail2ban_banned_db unban_db
Body: ld.so: psql: can't load library 'liblzma.so.2.2'

All system patches have been applied and all packages are updated. The issue persists after rebooting.

It looks like I have a file /usr/local/lib/liblzma.so.2.3, so I tried:

doas ln -s /usr/local/lib/liblzma.so.2.3 /usr/local/lib/liblzma.so.2.2

I also tried replacing the shabang line in doas nano /usr/local/bin/fail2ban_banned_db to:

#!/usr/local/bin/bash

Neither helped.

5 (edited by Neovana 2025-01-23 06:32:56)

Re: OpenBSD 7.6 and iRedMail 1.7.2

I know that you're working on some fail2ban issues, but I just wanted to make sure you were aware of all the issues (as described above) that I've come across:

OpenBSD 7.6 (GENERIC.MP) #0: Thu Jan  9 07:32:40 MST 2025
    root@syspatch-76-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

1:30AM  up 4 days,  6:17, 0 users, load averages: 0.08, 0.02, 0.01

Services that should be running but aren't:
fail2ban
iredadmin
mlmmjadmin

6 (edited by Neovana 2025-01-25 06:59:49)

Re: OpenBSD 7.6 and iRedMail 1.7.2

I've spun up a fresh OpenBSD 7.6 install, but have run into a problem installing iRedMail:

iredmail-openbsd-test# cd /root/iRedMail-1.7.2                                                                                                                 
iredmail-openbsd-test# bash iRedMail.sh       
< SKIP > Function: check_new_iredmail.
[ INFO ] Fetching source tarballs ...
[ INFO ] + 1 of 6: https://dl.iredmail.org/yum/misc/uwsgi-2.0.28.tar.gz
ftp: Error retrieving https://dl.iredmail.org/yum/misc/uwsgi-2.0.28.tar.gz: 404 Not Found
[ INFO ] + 2 of 6: https://dl.iredmail.org/yum/misc/iRedAdmin-2.6.tar.gz
iRedAdmin-2.6.tar.gz 100% |*************************************************************************************************************|  1853 KB    00:01   
[ INFO ] + 3 of 6: https://dl.iredmail.org/yum/misc/mlmmja … 2.2.tar.gz
mlmmjadmin-3.2.2.tar.gz 100% |**********************************************************************************************************|   112 KB    00:00   
[ INFO ] + 4 of 6: https://dl.iredmail.org/yum/misc/iRedAPD-5.8.1.tar.gz
iRedAPD-5.8.1.tar.gz 100% |*************************************************************************************************************|   180 KB    00:00   
[ INFO ] + 5 of 6: https://dl.iredmail.org/yum/misc/roundc … ete.tar.gz
roundcubemail-1.6.9-co... 100% |********************************************************************************************************|  5761 KB    00:03   
[ INFO ] + 6 of 6: https://dl.iredmail.org/yum/misc/fail2ban-1.1.0.tar.gz
fail2ban-1.1.0.tar.gz 100% |************************************************************************************************************|   589 KB    00:01   
[ INFO ] Validate downloaded source tarballs ...
cksum: cannot open misc/uwsgi-2.0.28.tar.gz: No such file or directory
(SHA256) misc/uwsgi-2.0.28.tar.gz: MISSING
(SHA256) misc/iRedAdmin-2.6.tar.gz: OK
(SHA256) misc/mlmmjadmin-3.2.2.tar.gz: OK
(SHA256) misc/iRedAPD-5.8.1.tar.gz: OK
(SHA256) misc/roundcubemail-1.6.9-complete.tar.gz: OK
(SHA256) misc/fail2ban-1.1.0.tar.gz: OK
    [ FAILED ]
<< ERROR >> Package verification failed. Script exit ...

Latest in that directory is:

[   ]    uwsgi-2.0.25.1.tar.gz    2024-04-26 07:26    793K

7

Re: OpenBSD 7.6 and iRedMail 1.7.2

Neovana wrote:

I am experiencing issues with: mimmjadminuwsgil, iredadminuwsgil, and fail2ban. During boot, the following errors are produced:

Please re-upgrade these packages: Download the latest version of mlmmjadmin, iredadmin, iredapd, fail2ban, then install or upgrade -- no matter whether you were running the latest version or not. The upgrade script will install requires packages and python modules for you, and it fixes the issue.

8

Re: OpenBSD 7.6 and iRedMail 1.7.2

Neovana wrote:

ftp: Error retrieving https://dl.iredmail.org/yum/misc/uwsgi-2.0.28.tar.gz: 404 Not Found

Fixed. Thanks for the feedback. smile

9 (edited by Neovana 2025-01-25 17:26:57)

Re: OpenBSD 7.6 and iRedMail 1.7.2

ZhangHuangbin wrote:
Neovana wrote:

I am experiencing issues with: mimmjadminuwsgil, iredadminuwsgil, and fail2ban. During boot, the following errors are produced:

Please re-upgrade these packages: Download the latest version of mlmmjadmin, iredadmin, iredapd, fail2ban, then install or upgrade -- no matter whether you were running the latest version or not. The upgrade script will install requires packages and python modules for you, and it fixes the issue.

https://docs.iredmail.org/upgrade.mlmmjadmin.html

Download the latest stable release and check its release notes.

https://github.com/iredmail/mlmmjadmin/releases

There aren’t any releases here
You can create a release to package software, along with release notes and links to binary files, for other people to use. Learn more about releases in our docs.

If I go to "tags" on that page

https://github.com/iredmail/mlmmjadmin/tags

I can download 3.3.0, which I will re-download and reinstall as requested.

10 (edited by Neovana 2025-01-25 17:27:44)

Re: OpenBSD 7.6 and iRedMail 1.7.2

# cd mlmmjadmin-3.3.0/tools
# bash upgrade_mlmmjadmin.sh

* Detected Linux/BSD distribution: OPENBSD
* Checking Python 3.
* Checking required Python(-3) modules:
  + [required] psycopg2
  + [required] web.py
error: externally-managed-environment

× This environment is externally managed
╰─> This Python installation is managed by pkg_add(1).
   
    To install Python packages system-wide, use the OS packages where possible, for example: "pkg_add py3-somepackage".
   
    Otherwise, for software which is not available in packages, it is recommended to create a "venv" (virtual environment, see
    https://docs.python.org/3/library/venv.html) and install it there. For standalone applications, pipx (in the py3-pipx package) can help manage this for you.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
<<< ERROR >>> Failed to install Python 3 modules, please try to install them manually:  web.py>=0.61

# pkg_add psycopg2 web.py

quirks-7.50 signed on 2025-01-23T15:28:26Z
Can't find psycopg2
Can't find web.py

# pkg_add py3-psycopg2 py3-web.py

quirks-7.50 signed on 2025-01-23T15:28:26Z
Can't find py3-web.py

Seems like there aren't OpenBSD 7.6 ports for those python packages yet.

11 (edited by Neovana 2025-01-25 17:29:56)

Re: OpenBSD 7.6 and iRedMail 1.7.2

# cd iRedMail-master
# bash iRedMail.sh

[ INFO ] Validate downloaded source tarballs ...
(SHA256) misc/uwsgi-2.0.28.tar.gz: FAILED
(SHA256) misc/iRedAdmin-2.6.tar.gz: OK
(SHA256) misc/mlmmjadmin-3.2.2.tar.gz: OK
(SHA256) misc/iRedAPD-5.8.1.tar.gz: OK
(SHA256) misc/roundcubemail-1.6.9-complete.tar.gz: OK
(SHA256) misc/fail2ban-1.1.0.tar.gz: OK
    [ FAILED ]
<< ERROR >> Package verification failed. Script exit ...

12

Re: OpenBSD 7.6 and iRedMail 1.7.2

Neovana wrote:

(SHA256) misc/uwsgi-2.0.28.tar.gz: FAILED

Fixed now.

The packages offered on GitHub and uwsgi website are different.

13 (edited by Neovana 2025-01-25 18:46:02)

Re: OpenBSD 7.6 and iRedMail 1.7.2

So on the fresh OpenBSD 7.6 and the iRedMail-master.zip (test amd64 server), after your troubleshooting, no errors upon boot.

But I noticed it installed:
• mlmmjadmin-3.2.2

iRedMail 1.7.2 upgrade instructions list
• mlmmjadmin-3.3.0

My real server with OpenBSD 7.6 and upgraded iRedMail 1.7.2 is still failing load mlmmjadmin, iredadmin, and fail2ban at boot - and I am unable to reinstall mlmmjadmin due to

<<< ERROR >>> Failed to install Python 3 modules, please try to install them manually:  web.py>=0.61

Should I downgrade to mlmmjadmin-3.2.2?

14 (edited by Neovana 2025-01-25 19:06:50)

Re: OpenBSD 7.6 and iRedMail 1.7.2

On the fresh OpenBSD 7.6 and the iRedMail-master.zip (test amd64 server), it did not appear to load fail2ban jails upon boot.

# rcctl start fail2ban
# fail2ban-client -x start

Do not load jails.

# cat /var/log/daemon | grep jail

Jan 25 05:20:02 iredmail-openbsd-test fail2ban.jail[27156]: INFO Creating new jail 'sshd'
Jan 25 05:20:02 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'sshd' uses poller {}
Jan 25 05:20:02 iredmail-openbsd-test fail2ban.jail[27156]: INFO Initiated 'polling' backend
Jan 25 05:20:03 iredmail-openbsd-test fail2ban.jail[27156]: INFO Creating new jail 'nginx-http-auth'
Jan 25 05:20:03 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'nginx-http-auth' uses poller {}
Jan 25 05:20:03 iredmail-openbsd-test fail2ban.jail[27156]: INFO Initiated 'polling' backend
Jan 25 05:20:03 iredmail-openbsd-test fail2ban.jail[27156]: INFO Creating new jail 'postfix'
Jan 25 05:20:03 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'postfix' uses poller {}
Jan 25 05:20:03 iredmail-openbsd-test fail2ban.jail[27156]: INFO Initiated 'polling' backend
Jan 25 05:20:03 iredmail-openbsd-test fail2ban.jail[27156]: INFO Creating new jail 'dovecot'
Jan 25 05:20:03 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'dovecot' uses poller {}
Jan 25 05:20:03 iredmail-openbsd-test fail2ban.jail[27156]: INFO Initiated 'polling' backend
Jan 25 05:20:04 iredmail-openbsd-test fail2ban.jail[27156]: INFO Creating new jail 'pregreet'
Jan 25 05:20:04 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'pregreet' uses poller {}
Jan 25 05:20:04 iredmail-openbsd-test fail2ban.jail[27156]: INFO Initiated 'polling' backend
Jan 25 05:20:04 iredmail-openbsd-test fail2ban.jail[27156]: INFO Creating new jail 'roundcube'
Jan 25 05:20:04 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'roundcube' uses poller {}
Jan 25 05:20:04 iredmail-openbsd-test fail2ban.jail[27156]: INFO Initiated 'polling' backend
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'sshd' started
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.actions[27156]: ERROR Failed to start jail 'sshd' action 'banned_db': Error starting action Jail('sshd')/banned_db: 'Script error'
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.actions[27156]: ERROR Failed to start jail 'nginx-http-auth' action 'banned_db-nginx': Error starting action Jail('nginx-http-auth')/banned_db-nginx: 'Script error'
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'nginx-http-auth' started
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.actions[27156]: ERROR Failed to start jail 'postfix' action 'banned_db': Error starting action Jail('postfix')/banned_db: 'Script error'
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'postfix' started
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.actions[27156]: ERROR Failed to start jail 'dovecot' action 'banned_db': Error starting action Jail('dovecot')/banned_db: 'Script error'
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'dovecot' started
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.actions[27156]: ERROR Failed to start jail 'pregreet' action 'banned_db': Error starting action Jail('pregreet')/banned_db: 'Script error'
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'pregreet' started
Jan 25 05:20:05 iredmail-openbsd-test fail2ban.actions[27156]: ERROR Failed to start jail 'roundcube' action 'banned_db': Error starting action Jail('roundcube')/banned_db: 'Script error'
Jan 25 05:20:06 iredmail-openbsd-test fail2ban.jail[27156]: INFO Jail 'roundcube' started
2025-01-25 05:49:34,016 fail2ban                [54442]: ERROR   Server already running

# doas fail2ban-client -x reload
# cat /var/log/daemon | grep jail

Jan 25 05:51:23 iredmail-openbsd-test fail2ban.server[27156]: INFO Reload all jails
Jan 25 05:51:23 iredmail-openbsd-test fail2ban.server[27156]: INFO Reload jail 'sshd'
Jan 25 05:51:23 iredmail-openbsd-test fail2ban.server[27156]: INFO Reload jail 'nginx-http-auth'
Jan 25 05:51:23 iredmail-openbsd-test fail2ban.server[27156]: INFO Reload jail 'postfix'
Jan 25 05:51:23 iredmail-openbsd-test fail2ban.server[27156]: INFO Reload jail 'dovecot'
Jan 25 05:51:23 iredmail-openbsd-test fail2ban.server[27156]: INFO Reload jail 'pregreet'
Jan 25 05:51:23 iredmail-openbsd-test fail2ban.server[27156]: INFO Reload jail 'roundcube'

Maybe just run the "doas fail2ban-client -x reload" command after boot as a temporary workaround?

15

Re: OpenBSD 7.6 and iRedMail 1.7.2

We use this command in /etc/rc.d/fail2ban to start fail2ban as a temporary solution:

nohup ${daemon} -xf start ${daemon_flags} &

This issue was reported to upstream, but no better solution yet:
https://github.com/fail2ban/fail2ban/issues/3923