From 23cb056ec574c20e1841ebc95e4974053d617e47 Mon Sep 17 00:00:00 2001 From: andryyy Date: Wed, 22 Mar 2017 15:48:31 +0100 Subject: [PATCH 1/5] Fix server_name for 80 > 433 rediret --- docs/u_and_e.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/u_and_e.md b/docs/u_and_e.md index 0eb9ab03..73714627 100644 --- a/docs/u_and_e.md +++ b/docs/u_and_e.md @@ -215,7 +215,7 @@ Open `data/conf/nginx/site.conf` and add a new "catch-all" site at the top of th ``` server { listen 80 default_server; - server_name _; + include /etc/nginx/conf.d/server_name.active; return 301 https://$host$request_uri; } ``` From 748d69e52e329e124b240cfddaa3725d8a7ee398 Mon Sep 17 00:00:00 2001 From: andryyy Date: Wed, 22 Mar 2017 18:44:06 +0100 Subject: [PATCH 2/5] Fix check_sender_access --- docs/u_and_e.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/u_and_e.md b/docs/u_and_e.md index 73714627..aa9c2982 100644 --- a/docs/u_and_e.md +++ b/docs/u_and_e.md @@ -74,9 +74,9 @@ Simply create a file `data/conf/postfix/check_sender_access` and enter the follo user-to-allow-everything@example.com OK ``` -Open `data/conf/postfix/main.cf` and find `smtpd_sender_restrictions`. Prepend `check_sasl_access hash:/opt/postfix/conf/check_sender_access` like this: +Open `data/conf/postfix/main.cf` and find `smtpd_sender_restrictions`. Prepend `check_sender_access hash:/opt/postfix/conf/check_sender_access` like this: ``` -smtpd_sender_restrictions = check_sasl_access hash:/opt/postfix/conf/check_sender_access reject_authenticated_sender [...] +smtpd_sender_restrictions = check_sender_access hash:/opt/postfix/conf/check_sender_access reject_authenticated_sender [...] ``` Run postmap on check_sender_access: From 8d1e6a5b2d00e58f114ac8258e2a0872aa6ac24a Mon Sep 17 00:00:00 2001 From: andryyy Date: Wed, 22 Mar 2017 18:52:22 +0100 Subject: [PATCH 3/5] Fix sasl_access info --- docs/u_and_e.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/u_and_e.md b/docs/u_and_e.md index aa9c2982..f348efee 100644 --- a/docs/u_and_e.md +++ b/docs/u_and_e.md @@ -69,20 +69,20 @@ docker-compose up -d This option is not best-practice and should only be implemented when there is no other option available to archive whatever you are trying to do. -Simply create a file `data/conf/postfix/check_sender_access` and enter the following content: +Simply create a file `data/conf/postfix/check_sasl_access` and enter the following content. This user must exist in your installation and needs to authenticate before sending mail. ``` user-to-allow-everything@example.com OK ``` -Open `data/conf/postfix/main.cf` and find `smtpd_sender_restrictions`. Prepend `check_sender_access hash:/opt/postfix/conf/check_sender_access` like this: +Open `data/conf/postfix/main.cf` and find `smtpd_sender_restrictions`. Prepend `check_sasl_access hash:/opt/postfix/conf/check_sasl_access` like this: ``` -smtpd_sender_restrictions = check_sender_access hash:/opt/postfix/conf/check_sender_access reject_authenticated_sender [...] +smtpd_sender_restrictions = check_sasl_access hash:/opt/postfix/conf/check_sasl_access reject_authenticated_sender_login_mismatch [...] ``` -Run postmap on check_sender_access: +Run postmap on check_sasl_access: ``` -docker-compose exec postfix-mailcow postmap /opt/postfix/conf/check_sender_access +docker-compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access ``` Restart the Postfix container. From f5c549f6eacb946ad137b255c7380f950e400120 Mon Sep 17 00:00:00 2001 From: andryyy Date: Thu, 23 Mar 2017 19:43:52 +0100 Subject: [PATCH 4/5] Fix pagination for aliases --- data/web/js/mailbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/web/js/mailbox.js b/data/web/js/mailbox.js index 1dc21abe..1ddf0c35 100644 --- a/data/web/js/mailbox.js +++ b/data/web/js/mailbox.js @@ -240,7 +240,7 @@ $(document).ready(function() { "paging": { "enabled": true, "limit": 5, - "size": 5 + "size": pagination_size }, "filtering": { "enabled": true, From e1b44482a7d3774be909581790a2b1e953fc3cea Mon Sep 17 00:00:00 2001 From: andryyy Date: Fri, 24 Mar 2017 20:38:58 +0100 Subject: [PATCH 5/5] Install methods --- docs/install.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/docs/install.md b/docs/install.md index 1274ed84..7c383a63 100644 --- a/docs/install.md +++ b/docs/install.md @@ -49,8 +49,10 @@ The database will be initialized right after a connection to MySQL can be establ ## Update mailcow -There is no update routine. You need to refresh your pulled repository clone and apply your local changes (if any). Actually there are many ways to merge local changes. Here is one to -stash all local changes, pull changes from the remote master branch and apply your stash on top of it. You will most likely see warnings about non-commited changes; you can ignore them: +There is no update routine. You need to refresh your pulled repository clone and apply your local changes (if any). Actually there are many ways to merge local changes. + +### Step 1, method 1 +Stash all local changes, pull changes from the remote master branch and apply your stash on top of it. You will most likely see warnings about non-commited changes; you can ignore them: ``` # Stash local changes @@ -61,6 +63,49 @@ git pull git stash pop ``` +### Step 1, method 2 +Fetch new data from GitHub, commit changes and merge remote repository: + +``` +# Get updates/changes +git fetch +# Add all changed files to local clone +git add -A +# Commit changes, ignore git complaining about username and mail address +git commit -m "Local config aat $(date)" +# Merge changes +git merge +``` + +If git complains about conflicts, solve them! Example: +``` +CONFLICT (content): Merge conflict in data/web/index.php +``` + +Open `data/web/index.php`, solve the conflict, close the file and run `git add -A` + `git commit -m "Solved conflict"`. + +### Step 1, method 3 + +Thanks to fabreg @ GitHub! + +In case both methods do not work (for many reason like you're unable to fix the CONFLICTS or any other reasons) you can simply start all over again. + +Keep in mind that all local changes _to configuration files_ will be lost. However, your volumes will not be removed. + +- Copy mailcow.conf somewhere outside the mailcow-dockerized directory +- Stop and remove mailcow containers: `docker-compose down` +- Delete the directory or rename it +- Clone the remote repository again (`git clone https://github.com/andryyy/mailcow-dockerized && cd mailcow-dockerized`). **Pay attention** to this step - the folder must have the same name of the previous one! +- Copy back your previous `mailcow.conf` into the mailcow-dockerizd folder + +If you forgot to stop Docker before deleting the cloned directoy, you can use the following commands: +``` +docker stop $(docker ps -a -q) +docker rm $(docker ps -a -q) +``` + +### Step 2 + Pull new images (if any) and recreate changed containers: ``` @@ -68,6 +113,7 @@ docker-compose pull docker-compose up -d --remove-orphans ``` +### Step 3 Clean-up dangling (unused) images and volumes: ```