From 392637e16acd0db0eb73e7943f5c6517ad3ead72 Mon Sep 17 00:00:00 2001
From: Dario Ernst
Date: Fri, 25 Jan 2019 20:08:05 +0100
Subject: [PATCH 1/4] Correct the URL users are directed to after using setup
without exposing /admin
closes #885
---
setup/.env | 2 +-
setup/docker-compose.yml | 2 +-
setup/flavors/compose/setup.html | 9 +++++++--
setup/flavors/stack/setup.html | 11 ++++++++---
4 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/setup/.env b/setup/.env
index 2c1113ce..676b07fd 100644
--- a/setup/.env
+++ b/setup/.env
@@ -1,5 +1,5 @@
# Hostname passed to Traefik
-ADDRESS=setup.mailu.io
+ADDRESS=test02.usrpro.io
# Current release
RELEASE=master
diff --git a/setup/docker-compose.yml b/setup/docker-compose.yml
index 9c93fd6f..b7b4b05f 100644
--- a/setup/docker-compose.yml
+++ b/setup/docker-compose.yml
@@ -13,4 +13,4 @@ services:
depends_on:
- redis
ports:
- - 127.0.0.1:8001:80
+ - 0.0.0.0:80:80
diff --git a/setup/flavors/compose/setup.html b/setup/flavors/compose/setup.html
index 46369577..1c372143 100644
--- a/setup/flavors/compose/setup.html
+++ b/setup/flavors/compose/setup.html
@@ -44,8 +44,13 @@ Before you can use Mailu, you must create the primary administrator user account
one of the hostnames
{{ hostnames.split(',')[0] }}{{ admin_path }}.
{% else %}
-http://127.0.0.1:8080 (only directly from the host running docker).
+http://127.0.0.1:8080/ui (only directly from the host running docker).
+If you run mailu on a remote server, and wish to access the admin interface via a SSH tunnel, you can create a port-forward from your local machine to your server like
+ssh -L 127.0.0.1:8080:127.0.0.1:8080 <user>@<server>
+
+And access the above URL from your local machine.
+
{% endif %}
-And choose the "Update password" option in the left menu.
+Also, choose the "Update password" option in the left menu.
{% endcall %}
diff --git a/setup/flavors/stack/setup.html b/setup/flavors/stack/setup.html
index 81470b5b..9a243ccb 100644
--- a/setup/flavors/stack/setup.html
+++ b/setup/flavors/stack/setup.html
@@ -50,11 +50,16 @@ Before you can use Mailu, you must create the primary administrator user account
Login to the admin interface to change the password for a safe one, at
{% if admin_enabled %}
-one of the hostnames
+one of the hostnames
{{ hostnames.split(',')[0] }}{{ admin_path }}.
{% else %}
-http://127.0.0.1:8080 (only directly from the host running docker).
+http://127.0.0.1:8080/ui (only directly from the host running docker).
+If you run mailu on a remote server, and wish to access the admin interface via a SSH tunnel, you can create a port-forward from your local machine to your server like
+
ssh -L 127.0.0.1:8080:127.0.0.1:8080 <user>@<server>
+
+And access the above URL from your local machine.
+
{% endif %}
-And choose the "Update password" option in the left menu.
+Also, choose the "Update password" option in the left menu.
{% endcall %}
From d9d6f514aaab9fb3e3c33cb3c54df7c7929dc973 Mon Sep 17 00:00:00 2001
From: Dario Ernst
Date: Sat, 26 Jan 2019 19:15:46 +0100
Subject: [PATCH 2/4] Catch webmail-url empty but webmail configured and force
to default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Quite some users managed to delete the contents of the webmail-url field in
setup, which forces front into a restart loop. Catch the case where a webmail
service is configured, but url is empty — and force to default /webmail.
closes #856
---
setup/flavors/compose/mailu.env | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/setup/flavors/compose/mailu.env b/setup/flavors/compose/mailu.env
index 5ccd8ace..a23a2c4b 100644
--- a/setup/flavors/compose/mailu.env
+++ b/setup/flavors/compose/mailu.env
@@ -116,7 +116,11 @@ WEBROOT_REDIRECT=/webmail
WEB_ADMIN={{ admin_path }}
# Path to the webmail if enabled
+{% if webmail_type != 'none' and webmail_path == '' %}
+WEB_WEBMAIL=/webmail
+{% else %}
WEB_WEBMAIL={{ webmail_path }}
+{% endif %}
# Website name
SITENAME={{ site_name }}
From 0676252ec1c26fa83d60625a46729453ad49d2d7 Mon Sep 17 00:00:00 2001
From: Dario Ernst
Date: Mon, 28 Jan 2019 20:23:41 +0100
Subject: [PATCH 3/4] Revert accidental setup commits and fix code/pre tags
---
setup/.env | 2 +-
setup/docker-compose.yml | 2 +-
setup/flavors/compose/setup.html | 2 +-
setup/flavors/stack/setup.html | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/setup/.env b/setup/.env
index 676b07fd..2c1113ce 100644
--- a/setup/.env
+++ b/setup/.env
@@ -1,5 +1,5 @@
# Hostname passed to Traefik
-ADDRESS=test02.usrpro.io
+ADDRESS=setup.mailu.io
# Current release
RELEASE=master
diff --git a/setup/docker-compose.yml b/setup/docker-compose.yml
index b7b4b05f..9c93fd6f 100644
--- a/setup/docker-compose.yml
+++ b/setup/docker-compose.yml
@@ -13,4 +13,4 @@ services:
depends_on:
- redis
ports:
- - 0.0.0.0:80:80
+ - 127.0.0.1:8001:80
diff --git a/setup/flavors/compose/setup.html b/setup/flavors/compose/setup.html
index 1c372143..b29e726a 100644
--- a/setup/flavors/compose/setup.html
+++ b/setup/flavors/compose/setup.html
@@ -47,7 +47,7 @@ one of the hostnames
http://127.0.0.1:8080/ui (only directly from the host running docker).
If you run mailu on a remote server, and wish to access the admin interface via a SSH tunnel, you can create a port-forward from your local machine to your server like
ssh -L 127.0.0.1:8080:127.0.0.1:8080 <user>@<server>
-
+
And access the above URL from your local machine.
{% endif %}
diff --git a/setup/flavors/stack/setup.html b/setup/flavors/stack/setup.html
index 9a243ccb..9d51a949 100644
--- a/setup/flavors/stack/setup.html
+++ b/setup/flavors/stack/setup.html
@@ -56,7 +56,7 @@ one of the hostnames
http://127.0.0.1:8080/ui (only directly from the host running docker).
If you run mailu on a remote server, and wish to access the admin interface via a SSH tunnel, you can create a port-forward from your local machine to your server like
ssh -L 127.0.0.1:8080:127.0.0.1:8080 <user>@<server>
-
+
And access the above URL from your local machine.
{% endif %}
From ef5a114cff9d1ba661d1df695ac16a94ece9e8e6 Mon Sep 17 00:00:00 2001
From: Dario Ernst
Date: Mon, 28 Jan 2019 20:32:36 +0100
Subject: [PATCH 4/4] Put webmail on / for empty webmail_path from setup
---
setup/flavors/compose/mailu.env | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup/flavors/compose/mailu.env b/setup/flavors/compose/mailu.env
index a23a2c4b..f7bccd3f 100644
--- a/setup/flavors/compose/mailu.env
+++ b/setup/flavors/compose/mailu.env
@@ -117,7 +117,7 @@ WEB_ADMIN={{ admin_path }}
# Path to the webmail if enabled
{% if webmail_type != 'none' and webmail_path == '' %}
-WEB_WEBMAIL=/webmail
+WEB_WEBMAIL=/
{% else %}
WEB_WEBMAIL={{ webmail_path }}
{% endif %}