Fresh install of mailcow .. first attempt to get to the UI:
When the page loads, the error message below slides out:
Database initialisation failed: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE NOT EXISTS (SELECT * FROM `admin`)' at line 3
Then it pops out again when one tries to login with the default username/password .. I vaguely remember resolving this the last time I installed mailcow (a few months ago) by editing some of the xml files ..
Going through the various containers, it seems the problem lies in the phpfpm container ..
bash-4.3# grep -rHn 'WHERE NOT EXISTS' /web/
/web/inc/init_db.inc.php:653: WHERE NOT EXISTS (SELECT * FROM `admin`);");
Indeed, the problem goes away with mariadb:10.1 .. So, you may need to update your docs to indicate that mariadb max version is 10.1, until that query is adapted to use a prepared query.
Am not quite sure why you would need to add warning about the usage of MariaDB10.2, Mailcow come with mariadb:10.1 which works fine with the current syntax.
The only users that will see this issue are user that changed the version of Mariadb in docker-compose.yml so it not as such a Mailcow issue.
@K2rool, there is a history here, and a reason why I ended up using mariadb 10.2 (I tried so many others too, with @andryyy's awareness) .
Perhaps you should read through linked tickets before jumping to conclusions?
I did read it, I was talking generally if a user changes a version of the docker container e.g. Dovecot,Mysql,Rspamd etc to a different version that Mailcow ships and it break it the user caused it not rely a Mailcow issue.
sorry if i'm annoying you over my last reply.
'Annoyed' is the wrong word.
If you did read it, then the usefulness of your response is what I am struggling to understand, because in that other issue, @andryyy himself suggested I try other mysql distros (and did not specify a version limit). So, I'd thought that perhaps he was unaware of the version problem.
In any case, what's wrong with spelling out a list of requirements for a system? I would think this is standard practice .. no?
Instead of documenting that it's broken with 10.2, the affected SQL statements need to be fixed. They probably rely on some non-standard behavior of old versions. That should be reasonably easy to change and we need it done anyway as the day will come when we need to upgrade MariaDB.
My awareness, yes, but I also wrote that it may/will break things if we just switch to 10.2. 👍
There shouldn't be more problems, though. The given query is also fine to run unprepared (we use prepared stmts everywhere else, I think). But not with strict SQL. I switched to 10.2 and disabled the strict mode for now (dev).
Thanks for catching that error! 👍
PS: The backticks are not a problem. You need to add a "from admin" after selecing the hard coded values.
@andryyy, thanks for all your support .. :100:
I felt a bit like I was beginning to pester you yesterday .. and have one more quick question, and I am trying to avoid opening a new issue over such a simple question ..
Question
Thanks again ..
The ip address for Postfix in Mailcow is 172.22.1.1 that page in the documentation need to be edited to show the right ip address.
Sorry i forgot the .1 in end I've edited my comment to the correct ip of 172.22.1.1
Thanks @K2rool .. will work with that.
I did enter the container to check, but none of the ip discovery commands worked .. and docker-compose did not indicate that either. So, much appreciated ..
Argh, sorry! Will correct it now.
Edit: Issues are fine. :)
I can confirm that 172.22.1.1 works .. needs a username and password defined as well to work, because smtp sending is only authorised for authenticated users ..
Try port 588. :-)
Am 13.09.2017 um 14:34 schrieb laymonk notifications@github.com:
Thanks @K2rool .. will work with that.
I did enter the container to check, but none of the ip discovery commands worked .. and docker-compose did not indicate that either. So, much appreciated ..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
588 doesn't work .. Nothing listening there ? Firewalled?
# netcat -vvvz 172.22.1.1 588
netcat: connect to 172.22.1.1 port 588 (tcp) failed: Connection refused
# netcat -vvvz 172.22.1.1 587
Connection to 172.22.1.1 587 port [tcp/submission] succeeded!
Forgot to mention, on that your mailcow guide for gogs, the stated DB server IP address is also wrong
Only issue is that when I restart the container, gitea-mailcow, I get the following errors
# docker-compose restart gitea-mailcow
WARNING: The DBROOT variable is not set. Defaulting to a blank string.
WARNING: The DBNAME variable is not set. Defaulting to a blank string.
WARNING: The DBUSER variable is not set. Defaulting to a blank string.
WARNING: The DBPASS variable is not set. Defaulting to a blank string.
WARNING: The MAILCOW_HOSTNAME variable is not set. Defaulting to a blank string.
WARNING: The TZ variable is not set. Defaulting to a blank string.
WARNING: The ADDITIONAL_SAN variable is not set. Defaulting to a blank string.
Restarting mailcowdockerized_gitea-mailcow_1 ... done
Perhaps, we need a new guide for gitea?
You need to run the docker-compose command from within the mailcow-dockerized folder. It needs to parse the .env file (a link to mailcow.conf).
Indeed, that was the problem .. I was in a sub-directory of it .. thanks