Could it be updated to v1.3? :)
Closed this issue · 18 comments
Could you please send me a pull-request? :-)
@lejmr Ping :)
It looks like just version should be changed. Correct? If yes, accept please PRs and issue a new release. Thank you.
Github is not doing a good job in notifications for me..
Nevertheless, there is an 1.2 branch which delivers 1.2.1. The reason why we do not have version 1.3 yet is due to schema changes: https://docs.iredmail.org/upgrade.iredmail.1.2.1-1.3.html#mysqlmariadb-backend-special. I used to write the schema upgrade script with information on how to apply that. I stopped upgrading this container due to lack of time for writing upgrade scripts..
With 1.2 version I did a complete rewrite of Dockerfile and service entrypoints. I was planning to write the automatic schema upgrade in this "else" section: https://github.com/lejmr/iredmail-docker/blob/1.2/mysql/static_files/services/mariadb-server.sh#L112. Designwise, I think one extra table needs to be added, so the database keeps information what version schema is installed.. then this section would install only newest "patches"... Once this is done, a release should be rather simple.
If you felt this is something you would like to implement, we can meet on some IM and discuss the design..
I will try to come back to this at the beginning of the next month, also because of lack of time.
I did a kick off on 1.3 branch. I am open to discussions, but the general pilars are:
versions
table is used invmail
database holding version of iredmail- sql migration files are stored in directory
/opt/iredmail/migrations/${db}/*_*__*.sql
, i.e., each database has its own database. One database is also an option.. I dont mind.
I managed to validate the entrypoint for MariaDB, and with my local test case it worked just fine.
# start an old version in order to generate `legacy` database
sudo rm -rf data
docker run --name iredmail --rm -h mail.example.com -v $PWD/data:/var/lib/mysql lejmr/iredmail:mysql-1.1-latest
# Create migration table
mysql
use vmail
CREATE TABLE IF NOT EXISTS `versions` (
`component` varchar(120) NOT NULL,
`version` varchar(20) NOT NULL,
PRIMARY KEY(`component`)
);
INSERT INTO versions VALUES('iredmail', '1.1');
## STOP the container
# start my local testing version of 1.3 branch
docker run --name iredmail --rm -h mail.example.com -v $PWD/data:/var/lib/mysql iredmail:test
which gave following output
*** Updating password credentials
200730 13:52:54 mysqld_safe Logging to '/var/lib/mysql/mail.example.com.err'.
200730 13:52:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
mysqld is alive
1
1
*** Current database schema version as of 1.1
*** Installing database migrations
** Installing /opt/iredmail/migrations/amavisd/01_1.2__emoji_characters.sql
** Installing /opt/iredmail/migrations/amavisd/02_1.3__missing_index.sql
*** Starting MySQL database..
Would be great, if you managed to verify this branch works for you fine. I have just prepared the build configuration on hub.docker.com, so lejmr/iredmail:mysql-1.3-latest should be available rather soon!
Ideally, I would like to merge the code to the master branch and put 1.3 label on the master branch.
Thanks @lejmr On Monday i will start a fresh server to test it and come back with a report.
Can not send email - SMTP Error (451): Failed to add recipient "blabla@blabla.com" (4.3.5 Server configuration problem).
Aug 3 20:41:57 mail postfix/submission/smtpd[5577]: connect from localhost[127.0.0.1]
Aug 3 20:41:57 mail postfix/submission/smtpd[5577]: Anonymous TLS connection established from localhost[127.0.0.1]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
Aug 3 20:41:58 mail postfix/submission/smtpd[5577]: warning: connect to 127.0.0.1:7777: Connection refused
Aug 3 20:41:58 mail postfix/submission/smtpd[5577]: warning: problem talking to server 127.0.0.1:7777: Connection refused
Aug 3 20:41:59 mail postfix/submission/smtpd[5577]: warning: connect to 127.0.0.1:7777: Connection refused
Aug 3 20:41:59 mail postfix/submission/smtpd[5577]: warning: problem talking to server 127.0.0.1:7777: Connection refused
Aug 3 20:41:59 mail postfix/submission/smtpd[5577]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.5 Server configuration problem; from=<postmaster@mydomain.com> to=<blabla@blabla.com> proto=ESMTP helo=<localhost>
Aug 3 20:41:59 mail roundcube: <r35is2pb> PHP Error: Invalid response code received from server (POST /mail/?_task=mail&_unlock=loading1596487317687&_framed=1&_lang=en&_action=send)
Aug 3 20:41:59 mail roundcube: <r35is2pb> SMTP Error: Failed to add recipient 'blabla@blabla.com'. 4.3.5 Server configuration problem (Code: 451) in /opt/www/roundcubemail-1.4.6/program/lib/Roundcube/rcube.php on line 1702 (POST /mail/?_task=mail&_unlock=loading1596487317687&_framed=1&_lang=en&_action=send)
Aug 3 20:41:59 mail postfix/submission/smtpd[5577]: disconnect from localhost[127.0.0.1]
Based on this thread I found that iRedAdmin's log is empty. Checked https://mail.mydomain.com/iredadmin/ and indeed it does not work -> Internal Server Error
P.S: There is v1.3.1 already.
Seems it was due to iredapd switched to python3.. Locally it worked, I have just pushed the fix..
I would like to make 1.3.0 working then on this branch will increase by .1 ...
I see you updated mysql-1.3-latest
. I will test it later today.
Tested - still the same issue. Even locally does not work. https://localhost/mail/ works, https://localhost/iredadmin/ - doesn't.
Send me command you are using for starting the container, so I can try to reproduce it. Thanks
docker run -p 80:80 -p 443:443 \
-h localhost \
-e "MYSQL_ROOT_PASSWORD=password" \
-e "SOGO_WORKERS=1" \
-e "TZ=Europe/Prague" \
-e "POSTMASTER_PASSWORD={PLAIN}password" \
-e "IREDAPD_PLUGINS=['reject_null_sender', 'reject_sender_login_mismatch', 'greylisting', 'throttle', 'amavisd_wblist', 'sql_alias_access_policy']" \
-v /srv/iredmail/mysql:/var/lib/mysql \
-v /srv/iredmail/vmail:/var/vmail \
-v /srv/iredmail/clamav:/var/lib/clamav \
--name=iredmail mysql-1.3-latest
Great work! The iredadmin issue was caused by iredmail itself, I had to fix it by a workaround... should be working now.
I will check it tomorrow.
Is there any chance you wrote a set of tests for the image validation using for example ServerSpec or Test infra frameworks? I think it would be cool to have such functionality because every commit might be tested by this.
Tested and it works.
Regarding to wrote a set of tests
... Unfortunately, at least until October "no", because I got a 370 hours task which must be done till October.
Perfect! I am going to merge it to master