1

Topic: Iredmail 1.0 without functional iredadmin

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.0
- Downloadable installer
- FreeBSD12.1 distribution 
- Store mail accounts in MySQL(MariaDB)
- Web server Nginx)
- Manage mail accounts with iRedAdmin
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

The installation was o.k, only some small incidents which where easy to solve.
When i was done with the installation it was time for adding domains & users
First i got "internal server error" after some attempts to try an fix it myself i got "502 BAD GATEWAY"
Also when i restarted the iredapd service i got an error message

*****************************

Starting iredapd.
Traceback (most recent call last):
  File "/opt/iredapd/iredapd.py", line 20, in <module>
    from libs import __version__, daemon, utils
  File "/opt/iRedAPD-3.3/libs/utils.py", line 14, in <module>
    from sqlalchemy import create_engine
ImportError: No module named sqlalchemy

***************************************************************
So i tried installing these packages / ports, but it didn't solve the problem.

is there a fix already for this issue ? or am i the first one with the FreeBSD 12.1-release / iredmail 1.0 errors ?

It looks like something is missing in the installation(script)

Regards,

Dennis

----

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

2

Re: Iredmail 1.0 without functional iredadmin

ddv98 wrote:

ImportError: No module named sqlalchemy

How did you start iredapd service? Are you running Python3?

3

Re: Iredmail 1.0 without functional iredadmin

Hello, with FreeBSD you can run 2.x and 3.x together on the same system. The package or port will choose the right one itself. With openssl / libressl  en also different versions of them is 1 way ticket to destroy the normally very stable system. in FreeBSD you can use /usr/local/etc/rc.d/iredapd <reload / restart / start / stop > BUT ! a service must be switched enabled in /etc/rc.conf with the text : uwsgi_enable="YES" (example)  or syslogd_flags="whatyouwanttotell"

I noticed after trying one of the python sqlalchemy packages  that there was a slight positive change. But i just checked to be sure my VMware workstation with the same setup and it also told me BAD GATEWAY en uwsgi was crashing and restarting every second.

4

Re: Iredmail 1.0 without functional iredadmin

- We don't need the "uwsgi_enable="YES"" line in rc.conf, because we use "uwsgi" program, but we do not run "uwsgi" as a standalone daemon service which manages multiple wsgi applications.
- How did you start "iredapd" service?
- Does iRedAPD service work if you start it manually with command below?

cd /opt/iredapd/
python2 iredapd.py

Note: we use "python2" in above command, not "python" or "python3".

5

Re: Iredmail 1.0 without functional iredadmin

I also noticed the download of installation packages. Great news. with ONE command you can only download/or install everything ! Example... new FreeBSD server,  and i want my favourite editor/tools/ network monitoring stuff. Then i only have to type : 1. pkg update upgrade   2. pkg install mc nano nmap htop samba410 bind9 mc <enter> DONE and if i don't want to be asked anything ? use -y behind this line and it will do a silent install wink with the ports tree is slower but also very nice ! portmaster -ady  will update every installed port wink  Maybe ab idea for the future of iredmail ??

6

Re: Iredmail 1.0 without functional iredadmin

FreeBSD will recognise if you use a wrong python version, it will stop the installation and warn you to use v3 of v2

I think i do a quick install with version 0.9.9 in VMware , if that one is working then i will reinstall my server later this week. If it doesn't..  just throw de virtual machine away , very handy  software to test and develop.  I will keep you informed.

7

Re: Iredmail 1.0 without functional iredadmin

Yesssss !!! everything is working now !

I did a fresh reinstallation of FreeBSD 12.1-release

This time i did no pkg update/upgrade before installing Iredmail 1.0

So the solution = NEVER update/upgrade the pkg 's

And the job was also done much faster by removing the ssd in the server and install in into my i7 PC
Now i only have to edit /etc/fstab and /etc/rc.conf  and rename RE0(realtek) network interface with EM0 (intel)

8

Re: Iredmail 1.0 without functional iredadmin

This is geting me crazy !
Now it stopped working  after changing my SSL-cert file

This is taking wayy to many hours of trying to use my server.

What can i do to reinstall only the iredadmin part again ?

9

Re: Iredmail 1.0 without functional iredadmin

Back into working "virtual" system!! VMware workstation 15 with FreeBSD 12.1 iredmail 1.0
Everything allright now, and found a solution to convert VMware virtual machine to  export this to my server wink

But converting  VMWare to Server will be done tomorrow .

Until now every test passed !!

10

Re: Iredmail 1.0 without functional iredadmin

Good luck. big_smile

11

Re: Iredmail 1.0 without functional iredadmin

It is working on VMware but on the "live" server iredadmin keeps returning "internal server error"... very strange !

12

Re: Iredmail 1.0 without functional iredadmin

ddv98 wrote:

on the "live" server iredadmin keeps returning "internal server error"... very strange !

Just get me related error log in log file for troubleshooting, i will try to help fix it.

13 (edited by ddv98 2020-01-01 10:43:39)

Re: Iredmail 1.0 without functional iredadmin

Hello ZhangHuangbin , After many hours of testing / installing and reinstalling i foud out what went wrong!!

1st.. It is working now on my "live" FreeBSD 12,1 server !
2nd : I installed FreeBSD 12.1 release on the live server
3rd : I Didn't install any ports / packages ( only nano, text editor and wget downloader and and bash shell
4th : I executed bash iredmail.sh script

After installation everything works !!! including iredadmin !
( BUT don't use Firefox !!! is keeps telling you "failed login"

5th  MOST IMPORTANT !!!! Never EVER use PKG INSTALLL   < package name> after iredmail installation !!! it will remove python and other needed software for Iredmail/IredAdmin  !!!!!!!  i noticed it when i typed "pkg install samba"  and the system showed me "before continue .. can i remove these packasges .....  and it showed me a lot of package name necessary for Iredmail/iredadmin  " 

So after installing Iredmail i installed everything throug the ports tree just like Iredmail and it is working for sure now !

14 (edited by ddv98 2020-01-01 10:50:17)

Re: Iredmail 1.0 without functional iredadmin

to show it is working now !

15

Re: Iredmail 1.0 without functional iredadmin

Iredmail , SOGo, Roundcube, Iredadmin in action
@ FreeBSD 12.1

16

Re: Iredmail 1.0 without functional iredadmin

SO lesson 4 all : use FreeBSD 12.1 iso / memstick and install FreeBSD.
After install , only install nano / wget and bash  ( chsh -s /usr/local/bin/bash) and for local users chsh -s /usr/local/bin/bash <username>

Then exit root shell en use su command te re-enter root user shell with bash
After this.. use wget <iredmail download link> 
then tar xvf 1.0.tar.gz
then cd Iredmail......
and execute bash iredmailxxx.sh

afterward reboot !!!! and NEVER use pkg install <package name> but install the wanted package after iredmail installation through the  /usr/ports/... tree !!  with the usual make config .. make install clean method !

17

Re: Iredmail 1.0 without functional iredadmin

Thanks for sharing. smile