From 928b5470d4f371b88a2ee41706a7fc4be46ac18e Mon Sep 17 00:00:00 2001 From: hoellen Date: Thu, 24 Jan 2019 22:38:09 +0100 Subject: [PATCH 01/21] fix some cli commands in the docs --- docs/cli.rst | 26 +++++++++++++------------- docs/kubernetes/mailu/index.rst | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/cli.rst b/docs/cli.rst index bdf4a6d1..36899801 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -4,11 +4,11 @@ Mailu command line Managing users and aliases can be done from CLI using commands: * alias -* alias_delete +* alias-delete * user -* user_import -* user_delete -* config_update +* user-import +* user-delete +* config-update alias ----- @@ -18,12 +18,12 @@ alias docker-compose exec admin flask mailu alias foo example.net "mail1@example.com,mail2@example.com" -alias_delete +alias-delete ------------ .. code-block:: bash - docker-compose exec admin flask mailu alias_delete foo@example.net + docker-compose exec admin flask mailu alias-delete foo@example.net user ---- @@ -32,30 +32,30 @@ user docker-compose exec admin flask mailu user --hash_scheme='SHA512-CRYPT' myuser example.net 'password123' -user_import +user-import ----------- primary difference with simple `user` command is that password is being imported as a hash - very useful when migrating users from other systems where only hash is known. .. code-block:: bash - docker-compose run --rm admin python manage.py user --hash_scheme='SHA512-CRYPT' myuser example.net '$6$51ebe0cb9f1dab48effa2a0ad8660cb489b445936b9ffd812a0b8f46bca66dd549fea530ce' + docker-compose run --rm admin flask mailu user-import --hash_scheme='SHA512-CRYPT' myuser example.net '$6$51ebe0cb9f1dab48effa2a0ad8660cb489b445936b9ffd812a0b8f46bca66dd549fea530ce' -user_delete +user-delete ------------ .. code-block:: bash - docker-compose exec admin flask mailu user_delete foo@example.net + docker-compose exec admin flask mailu user-delete foo@example.net -config_update +config-update ------------- The sole purpose of this command is for importing users/aliases in bulk and synchronizing DB entries with external YAML template: .. code-block:: bash - cat mail-config.yml | docker-compose exec admin flask mailu config_update --delete_objects + cat mail-config.yml | docker-compose exec admin flask mailu config-update --delete_objects where mail-config.yml looks like: @@ -72,7 +72,7 @@ where mail-config.yml looks like: domain: example.com destination: "user1@example.com,user2@example.com" -without ``--delete_object`` option config_update will only add/update new values but will *not* remove any entries missing in provided YAML input. +without ``--delete_object`` option config-update will only add/update new values but will *not* remove any entries missing in provided YAML input. Users ----- diff --git a/docs/kubernetes/mailu/index.rst b/docs/kubernetes/mailu/index.rst index 0f2451fa..0711abbd 100644 --- a/docs/kubernetes/mailu/index.rst +++ b/docs/kubernetes/mailu/index.rst @@ -128,7 +128,7 @@ And in the pod run the following command. The command uses following entries: .. code-block:: bash - python manage.py admin root example.com password + flask mailu admin root example.com password - ``admin`` Make it an admin user - ``root`` The first part of the e-mail adres (ROOT@example.com) @@ -207,4 +207,4 @@ If the login problem still persists, or more specific, happens now and then and kubectl -n mailu-mailserver get po kubectl -n mailu-mailserver delete po/mailu-imap... -Happy mailing! \ No newline at end of file +Happy mailing! From 39444c794e97bc0413d5e6964286085b902b4c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abel=20Alfonso=20F=C3=ADrvida=20Don=C3=A9stevez?= Date: Wed, 6 Feb 2019 15:01:02 -0500 Subject: [PATCH 02/21] Install bash in alpine based images. This fix https://github.com/Mailu/Mailu/issues/918 Bash shell is used by default in Kubernetes' dashboard console, which is very useful for admins. --- core/admin/Dockerfile | 2 +- core/dovecot/Dockerfile | 2 +- core/nginx/Dockerfile | 2 +- core/postfix/Dockerfile | 2 +- optional/clamav/Dockerfile | 2 +- optional/postgresql/Dockerfile | 2 +- optional/radicale/Dockerfile | 2 +- services/fetchmail/Dockerfile | 2 +- services/rspamd/Dockerfile | 2 +- services/unbound/Dockerfile | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/admin/Dockerfile b/core/admin/Dockerfile index 4f887ff2..40f9ff59 100644 --- a/core/admin/Dockerfile +++ b/core/admin/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.8 # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git \ + python3 py3-pip git bash \ && pip3 install --upgrade pip RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart # Image specific layers under this line diff --git a/core/dovecot/Dockerfile b/core/dovecot/Dockerfile index 02c9e49d..94432564 100644 --- a/core/dovecot/Dockerfile +++ b/core/dovecot/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.8 # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git \ + python3 py3-pip git bash \ && pip3 install --upgrade pip # Shared layer between rspamd, postfix, dovecot, unbound and nginx RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart diff --git a/core/nginx/Dockerfile b/core/nginx/Dockerfile index 9bc4c745..0156cccf 100644 --- a/core/nginx/Dockerfile +++ b/core/nginx/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.8 # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git \ + python3 py3-pip git bash \ && pip3 install --upgrade pip # Shared layer between rspamd, postfix, dovecot, unbound and nginx RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart diff --git a/core/postfix/Dockerfile b/core/postfix/Dockerfile index 4b6c4aee..3eff5218 100644 --- a/core/postfix/Dockerfile +++ b/core/postfix/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.8 # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git \ + python3 py3-pip git bash \ && pip3 install --upgrade pip # Shared layer between rspamd, postfix, dovecot, unbound and nginx RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart diff --git a/optional/clamav/Dockerfile b/optional/clamav/Dockerfile index a4a889c7..27254544 100644 --- a/optional/clamav/Dockerfile +++ b/optional/clamav/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.8 # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip \ + python3 py3-pip bash \ && pip3 install --upgrade pip # Image specific layers under this line RUN apk add --no-cache clamav rsyslog wget clamav-libunrar diff --git a/optional/postgresql/Dockerfile b/optional/postgresql/Dockerfile index 22409597..b03ff2d1 100644 --- a/optional/postgresql/Dockerfile +++ b/optional/postgresql/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.8 # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip \ + python3 py3-pip bash \ && pip3 install --upgrade pip # Shared layer between rspamd, postfix, dovecot, unbound and nginx RUN pip3 install jinja2 diff --git a/optional/radicale/Dockerfile b/optional/radicale/Dockerfile index 4616d53d..de63daec 100644 --- a/optional/radicale/Dockerfile +++ b/optional/radicale/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:edge RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && apk add --no-cache radicale@testing py-dulwich@testing curl + && apk add --no-cache radicale@testing py-dulwich@testing curl bash COPY radicale.conf /radicale.conf diff --git a/services/fetchmail/Dockerfile b/services/fetchmail/Dockerfile index 52f794d5..8e4d5db0 100644 --- a/services/fetchmail/Dockerfile +++ b/services/fetchmail/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.8 # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip \ + python3 py3-pip bash \ && pip3 install --upgrade pip # Image specific layers under this line RUN apk add --no-cache fetchmail ca-certificates \ diff --git a/services/rspamd/Dockerfile b/services/rspamd/Dockerfile index 32e93fac..70e6286d 100644 --- a/services/rspamd/Dockerfile +++ b/services/rspamd/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.8 # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git \ + python3 py3-pip git bash \ && pip3 install --upgrade pip # Shared layer between rspamd, postfix, dovecot, unbound and nginx RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart diff --git a/services/unbound/Dockerfile b/services/unbound/Dockerfile index 9d40b691..325584fd 100644 --- a/services/unbound/Dockerfile +++ b/services/unbound/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.8 # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git \ + python3 py3-pip git bash \ && pip3 install --upgrade pip # Shared layer between rspamd, postfix, dovecot, unbound and nginx RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart From 328db510329374eb66d43195c55fc9b37123dd9f Mon Sep 17 00:00:00 2001 From: Dario Ernst Date: Sat, 9 Feb 2019 12:33:33 +0100 Subject: [PATCH 03/21] Add FAQ about clients on port 25 generating non-helpful errors --- docs/faq.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/faq.rst b/docs/faq.rst index 4abd8874..cec7fb98 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -421,3 +421,7 @@ We **strongly** advice against downgrading the TLS version and ciphers! .. _`681`: https://github.com/Mailu/Mailu/pull/681 .. _`698`: https://github.com/Mailu/Mailu/issues/698 .. _`unbound`: https://nlnetlabs.nl/projects/unbound/about/ + +A user gets ``Sender address rejected: Access denied. Please check the message recipient […] and try again`` even though the sender is legitimate? +```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` +First, check if you are really sure the user is a legitimate sender, i.e. the registered user is authenticated successfully and own either the account or alias he/she is trying to send from. If you are really sure this is correct, then the user might try to errornously send via port 25 insteadof the designated SMTP client-ports. Port 25 is meant for server-to-server delivery, while users should use port 587 or 465. From 3cfaa00fac6c1edb1fc31a446193b896efa44350 Mon Sep 17 00:00:00 2001 From: Adrian Gruntkowski Date: Sat, 9 Feb 2019 15:12:24 +0100 Subject: [PATCH 04/21] Update command for user import The current example seems to be obsolete. --- docs/cli.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cli.rst b/docs/cli.rst index bdf4a6d1..d666ab4b 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -39,7 +39,7 @@ primary difference with simple `user` command is that password is being imported .. code-block:: bash - docker-compose run --rm admin python manage.py user --hash_scheme='SHA512-CRYPT' myuser example.net '$6$51ebe0cb9f1dab48effa2a0ad8660cb489b445936b9ffd812a0b8f46bca66dd549fea530ce' + docker-compose run --rm admin flask mailu user-import myuser example.net '$6$51ebe0cb9f1dab48effa2a0ad8660cb489b445936b9ffd812a0b8f46bca66dd549fea530ce' 'SHA512-CRYPT' user_delete ------------ From 111dae351af6aa996f17961dca38a462aa6a5aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Tue, 12 Feb 2019 18:17:38 +0200 Subject: [PATCH 05/21] Fix typo in migration file Fixes #905 --- core/admin/migrations/versions/5aeb5811408e_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/admin/migrations/versions/5aeb5811408e_.py b/core/admin/migrations/versions/5aeb5811408e_.py index 2ea06ea9..647a61f7 100644 --- a/core/admin/migrations/versions/5aeb5811408e_.py +++ b/core/admin/migrations/versions/5aeb5811408e_.py @@ -106,7 +106,7 @@ def upgrade(): # lower relays for relay in connection.execute(relay_table.select()): connection.execute(relay_table.update().where( - relay_tbale.c.name == relay.name + relay_table.c.name == relay.name ).values( name=relay.name.lower() )) From c1485f9381be87dd4d8d0662171e81ab9000dead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Tue, 12 Feb 2019 18:18:52 +0200 Subject: [PATCH 06/21] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13c5a25f..99691cc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ v1.6.1 - unreleased - Bug: Fix creating new fetched accounts - Enhancement: Missing wildcard option in alias flask command ([#869](https://github.com/Mailu/Mailu/issues/869)) - Bug: Fix poor performance if ANTIVIRUS is configured to none. +- Bug: Fix typo in migration script ([#905](https://github.com/Mailu/Mailu/issues/905)) v1.6.0 - 2019-01-18 ------------------- From bc617cf8ec16ebca652b82dbb54cc7a96472451b Mon Sep 17 00:00:00 2001 From: Roman Hoellen Date: Wed, 13 Feb 2019 10:30:08 +0100 Subject: [PATCH 07/21] replace _ with - in cli options --- core/admin/mailu/manage.py | 10 +++++----- docs/cli.rst | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/core/admin/mailu/manage.py b/core/admin/mailu/manage.py index 3a8256ad..cbc8b6c9 100644 --- a/core/admin/mailu/manage.py +++ b/core/admin/mailu/manage.py @@ -86,10 +86,10 @@ def user(localpart, domain_name, password, hash_scheme=None): @mailu.command() -@click.option('-n', '--domain_name') -@click.option('-u', '--max_users') -@click.option('-a', '--max_aliases') -@click.option('-q', '--max_quota_bytes') +@click.option('-n', '--domain-name') +@click.option('-u', '--max-users') +@click.option('-a', '--max-aliases') +@click.option('-q', '--max-quota-bytes') @flask_cli.with_appcontext def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0): domain = models.Domain.query.get(domain_name) @@ -126,7 +126,7 @@ def user_import(localpart, domain_name, password_hash, hash_scheme = None): @mailu.command() @click.option('-v', '--verbose') -@click.option('-d', '--delete_objects') +@click.option('-d', '--delete-objects') @flask_cli.with_appcontext def config_update(verbose=False, delete_objects=False): """sync configuration with data from YAML-formatted stdin""" diff --git a/docs/cli.rst b/docs/cli.rst index 7328db0f..6fb2a786 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -30,7 +30,8 @@ user .. code-block:: bash - docker-compose exec admin flask mailu user --hash_scheme='SHA512-CRYPT' myuser example.net 'password123' + docker-compose exec admin flask mailu user myuser example.net 'password123' + user-import ----------- @@ -55,7 +56,7 @@ The sole purpose of this command is for importing users/aliases in bulk and sync .. code-block:: bash - cat mail-config.yml | docker-compose exec admin flask mailu config-update --delete_objects + cat mail-config.yml | docker-compose exec -T admin flask mailu config-update --delete-objects where mail-config.yml looks like: @@ -72,7 +73,7 @@ where mail-config.yml looks like: domain: example.com destination: "user1@example.com,user2@example.com" -without ``--delete_object`` option config-update will only add/update new values but will *not* remove any entries missing in provided YAML input. +without ``--delete-object`` option config-update will only add/update new values but will *not* remove any entries missing in provided YAML input. Users ----- From 1dfef1609a0f4c6a9778c49ff4c371e90ff5e20e Mon Sep 17 00:00:00 2001 From: Roman Hoellen Date: Wed, 13 Feb 2019 10:53:40 +0100 Subject: [PATCH 08/21] add domain cli to docs --- core/admin/mailu/manage.py | 6 ++++-- docs/cli.rst | 10 ++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core/admin/mailu/manage.py b/core/admin/mailu/manage.py index cbc8b6c9..462bce67 100644 --- a/core/admin/mailu/manage.py +++ b/core/admin/mailu/manage.py @@ -64,7 +64,7 @@ def admin(localpart, domain_name, password): @click.argument('localpart') @click.argument('domain_name') @click.argument('password') -@click.argument('hash_scheme') +@click.argument('hash_scheme', required=False) @flask_cli.with_appcontext def user(localpart, domain_name, password, hash_scheme=None): """ Create a user @@ -86,12 +86,14 @@ def user(localpart, domain_name, password, hash_scheme=None): @mailu.command() -@click.option('-n', '--domain-name') +@click.argument('domain_name') @click.option('-u', '--max-users') @click.option('-a', '--max-aliases') @click.option('-q', '--max-quota-bytes') @flask_cli.with_appcontext def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0): + """ Create a domain + """ domain = models.Domain.query.get(domain_name) if not domain: domain = models.Domain(name=domain_name) diff --git a/docs/cli.rst b/docs/cli.rst index 6fb2a786..bdd030f9 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -5,6 +5,7 @@ Managing users and aliases can be done from CLI using commands: * alias * alias-delete +* domain * user * user-import * user-delete @@ -25,6 +26,15 @@ alias-delete docker-compose exec admin flask mailu alias-delete foo@example.net + +domain +---- + +.. code-block:: bash + + docker-compose exec admin flask mailu domain example.net + + user ---- From 9dbe623c1885fa2adb8cde39d7258897005f73ad Mon Sep 17 00:00:00 2001 From: Roman Hoellen Date: Wed, 13 Feb 2019 11:02:26 +0100 Subject: [PATCH 09/21] update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13c5a25f..c6aed9d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,10 @@ v1.6.1 - unreleased ------------------- - Enhancement: Make Unbound drop privileges after binding to port - Enhancement: Create an Authentication Token with IPv6 address restriction ([#829](https://github.com/Mailu/Mailu/issues/829)) -- Bug: Fix creating new fetched accounts - Enhancement: Missing wildcard option in alias flask command ([#869](https://github.com/Mailu/Mailu/issues/869)) +- Bug: Fix creating new fetched accounts - Bug: Fix poor performance if ANTIVIRUS is configured to none. +- Bug: Rename cli commands and their options (replace "\_" with "-") ([#877](https://github.com/Mailu/Mailu/issues/877)) v1.6.0 - 2019-01-18 ------------------- From 4d2844c1f5cc20b49cc9ab0f9767fd00cb64cb66 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Wed, 13 Feb 2019 16:43:45 +0200 Subject: [PATCH 10/21] Fixed arguments passed to domain --- core/admin/mailu/manage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/admin/mailu/manage.py b/core/admin/mailu/manage.py index 3a8256ad..ac60d2d5 100644 --- a/core/admin/mailu/manage.py +++ b/core/admin/mailu/manage.py @@ -94,7 +94,8 @@ def user(localpart, domain_name, password, hash_scheme=None): def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0): domain = models.Domain.query.get(domain_name) if not domain: - domain = models.Domain(name=domain_name) + domain = models.Domain(name=domain_name, max_users=max_users, + max_aliases=max_aliases, max_quota_bytes=max_quota_bytes) db.session.add(domain) db.session.commit() From 4a03e32882c7ce2a8f5deae704c95e512fdc20ef Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 15:48:21 +0200 Subject: [PATCH 11/21] Towncrieri implementation --- towncrier/pyproject.toml | 9 +++++++++ towncrier/template.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 towncrier/pyproject.toml create mode 100644 towncrier/template.md diff --git a/towncrier/pyproject.toml b/towncrier/pyproject.toml new file mode 100644 index 00000000..2e966cc0 --- /dev/null +++ b/towncrier/pyproject.toml @@ -0,0 +1,9 @@ +[tool.towncrier] + #package = "mypackage" + #package_dir = "src" + filename = "CHANGELOG.md" + underlines = ["-", "", ""] + template = "template.md" + title_format = "v{version} - {project_date}" + issue_format = "[#{issue}](https://github.com/Mailu/Mailu/issues/{issue})" + start_string = "upgrading Freposte.io as some changes will include useful notes.\n" diff --git a/towncrier/template.md b/towncrier/template.md new file mode 100644 index 00000000..07ccb4f6 --- /dev/null +++ b/towncrier/template.md @@ -0,0 +1,32 @@ +{% for section, _ in sections.items() %} +{% set underline = underlines[0] %}{% if section %}{{section}} +{{ underline * section|length }}{% set underline = underlines[1] %} + +{% endif %} + +{% if sections[section] %} +{% for category, val in definitions.items() if category in sections[section]%} +{{ definitions[category]['name'] }} +{{ underline * definitions[category]['name']|length }} +{% if definitions[category]['showcontent'] %} +{% for text, values in sections[section][category].items() %} +- {{ text }} ({{ values|join(', ') }}) +{% endfor %} + +{% else %} +- {{ sections[section][category]['']|join(', ') }} + +{% endif %} +{% if sections[section][category]|length == 0 %} +No significant changes. + +{% else %} +{% endif %} + +{% endfor %} +{% else %} +No significant changes. + + +{% endif %} +{% endfor %} \ No newline at end of file From e548c4e531a9e465647ace70787a540b3d4e050c Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 16:33:45 +0200 Subject: [PATCH 12/21] Moved towncrier to project root --- CHANGELOG.md | 2 ++ towncrier/pyproject.toml => pyproject.toml | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) rename towncrier/pyproject.toml => pyproject.toml (62%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13c5a25f..f66826ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ Notable changes to this project are documented in the current file. For more details about individual changes, see the Git log. You should read this before upgrading Freposte.io as some changes will include useful notes. + + v1.6.1 - unreleased ------------------- - Enhancement: Make Unbound drop privileges after binding to port diff --git a/towncrier/pyproject.toml b/pyproject.toml similarity index 62% rename from towncrier/pyproject.toml rename to pyproject.toml index 2e966cc0..17d66169 100644 --- a/towncrier/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [tool.towncrier] #package = "mypackage" - #package_dir = "src" + package_dir = "towncrier" filename = "CHANGELOG.md" underlines = ["-", "", ""] - template = "template.md" + template = "towncrier/template.md" title_format = "v{version} - {project_date}" issue_format = "[#{issue}](https://github.com/Mailu/Mailu/issues/{issue})" - start_string = "upgrading Freposte.io as some changes will include useful notes.\n" + start_string = "" From e674a6fe3d7ed08d6ee830a9eeea8be5ec43a31a Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 17:18:10 +0200 Subject: [PATCH 13/21] Added docs for new changelog entries --- docs/contributors/guide.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/contributors/guide.rst b/docs/contributors/guide.rst index a3b6d95a..4b9820b7 100644 --- a/docs/contributors/guide.rst +++ b/docs/contributors/guide.rst @@ -69,6 +69,24 @@ After some testing on master, we will approve and merge this new PR as well. At the end of every milestone, a new stable branch will be created from ``master`` or any previous commit that matches the completion of the milestone. +CHANGELOG +````````` + +Adding entries in the CHANGELOG is an automated process which requires creation of a file under +``towncrier/newsfragments`` directory. + +The start of the filename is the ticket number, and the content is what will end up in the news file. +For example, if ticket #850 is about adding a new widget, the filename would be towncrier/newsfragments/850.feature +and the content would be ``Feature that has just been added``. + +Supported file extensions are: + +- .feature: Signifying a new feature. +- .bugfix: Signifying a bug fix. +- .doc: Signifying a documentation improvement. +- .removal: Signifying a deprecation or removal of public API. +- .misc: A ticket has been closed, but it is not of interest to users. + Forked projects --------------- From 8489bcb05e871252705b73c77f169716d2d98be9 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 17:24:12 +0200 Subject: [PATCH 14/21] Minor changes to changelog doc --- docs/contributors/guide.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/contributors/guide.rst b/docs/contributors/guide.rst index 4b9820b7..0ae15c03 100644 --- a/docs/contributors/guide.rst +++ b/docs/contributors/guide.rst @@ -76,16 +76,16 @@ Adding entries in the CHANGELOG is an automated process which requires creation ``towncrier/newsfragments`` directory. The start of the filename is the ticket number, and the content is what will end up in the news file. -For example, if ticket #850 is about adding a new widget, the filename would be towncrier/newsfragments/850.feature +For example, if ticket ``#850`` is about adding a new widget, the filename would be towncrier/newsfragments/850.feature and the content would be ``Feature that has just been added``. Supported file extensions are: -- .feature: Signifying a new feature. -- .bugfix: Signifying a bug fix. -- .doc: Signifying a documentation improvement. -- .removal: Signifying a deprecation or removal of public API. -- .misc: A ticket has been closed, but it is not of interest to users. +- ``.feature``: Signifying a new feature. +- ``.bugfix``: Signifying a bug fix. +- ``.doc``: Signifying a documentation improvement. +- ``.removal``: Signifying a deprecation or removal of public API. +- ``.misc``: A ticket has been closed, but it is not of interest to users. Forked projects --------------- From 72b94d28f77203fe718d875ade3ebe074befbdd9 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 14 Feb 2019 17:53:34 +0200 Subject: [PATCH 15/21] Modified PR template --- PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 856fa5a0..a5315d30 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -13,4 +13,4 @@ Before we can consider review and merge, please make sure the following list is If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly -- [ ] Unless it's docs or a minor change: place entry in the [changelog](CHANGELOG.md), under the latest un-released version. +- [ ] Unless it's docs or a minor change: add changelog entry file. From e9cce18ffe1c542ed80dfc09d259901ae854e7de Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Mon, 18 Feb 2019 10:50:02 +0200 Subject: [PATCH 16/21] Add changelog link to docs --- PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index a5315d30..64afc4a1 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -13,4 +13,4 @@ Before we can consider review and merge, please make sure the following list is If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly -- [ ] Unless it's docs or a minor change: add changelog entry file. +- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/1.6/contributors/guide.html#changelog) entry file. From fbc323035b4eb5962e0efcf2c04a495011c30995 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Wed, 20 Feb 2019 12:10:54 +0200 Subject: [PATCH 17/21] Changed docs version from 1.6 to master --- PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 64afc4a1..059318fc 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -13,4 +13,4 @@ Before we can consider review and merge, please make sure the following list is If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly -- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/1.6/contributors/guide.html#changelog) entry file. +- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file. From 8d347560231b3283b7a907ee3d85bc3ae25b6d0d Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Thu, 21 Feb 2019 17:15:56 +0200 Subject: [PATCH 18/21] Increase dovecot mail max userip --- core/dovecot/conf/dovecot.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/core/dovecot/conf/dovecot.conf b/core/dovecot/conf/dovecot.conf index b7cca76c..f4181e0c 100644 --- a/core/dovecot/conf/dovecot.conf +++ b/core/dovecot/conf/dovecot.conf @@ -84,6 +84,7 @@ service auth-worker { ############### protocol imap { mail_plugins = $mail_plugins imap_quota imap_sieve + mail_max_userip_connections = 20 } protocol pop3 { From 2dcaf5ed317d2559704c7a04739822f898a6fbd1 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Fri, 22 Feb 2019 15:01:06 +0200 Subject: [PATCH 19/21] Renamed config file --- webmails/rainloop/Dockerfile | 2 +- webmails/rainloop/{config.ini => application.ini} | 0 webmails/rainloop/include.php | 2 +- webmails/rainloop/start.py | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename webmails/rainloop/{config.ini => application.ini} (100%) diff --git a/webmails/rainloop/Dockerfile b/webmails/rainloop/Dockerfile index c20f1975..975227b0 100644 --- a/webmails/rainloop/Dockerfile +++ b/webmails/rainloop/Dockerfile @@ -27,7 +27,7 @@ RUN apt-get update && apt-get install -y \ COPY include.php /var/www/html/include.php COPY php.ini /php.ini -COPY config.ini /config.ini +COPY application.ini /application.ini COPY default.ini /default.ini COPY start.py /start.py diff --git a/webmails/rainloop/config.ini b/webmails/rainloop/application.ini similarity index 100% rename from webmails/rainloop/config.ini rename to webmails/rainloop/application.ini diff --git a/webmails/rainloop/include.php b/webmails/rainloop/include.php index 2376c683..fde91324 100644 --- a/webmails/rainloop/include.php +++ b/webmails/rainloop/include.php @@ -15,5 +15,5 @@ function __get_custom_data_full_path() */ function __get_additional_configuration_name() { - return 'config.ini'; + return 'application.ini'; } diff --git a/webmails/rainloop/start.py b/webmails/rainloop/start.py index 495eb376..8d369e47 100755 --- a/webmails/rainloop/start.py +++ b/webmails/rainloop/start.py @@ -20,7 +20,7 @@ os.makedirs(base + "domains", exist_ok=True) os.makedirs(base + "configs", exist_ok=True) convert("/default.ini", "/data/_data_/_default_/domains/default.ini") -convert("/config.ini", "/data/_data_/_default_/configs/config.ini") +convert("/application.ini", "/data/_data_/_default_/configs/application.ini") convert("/php.ini", "/usr/local/etc/php/conf.d/rainloop.ini") os.system("chown -R www-data:www-data /data") From 131406774b250fcdd1c1a9c2dd7a4d0875150faa Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Mon, 25 Feb 2019 11:46:42 +0200 Subject: [PATCH 20/21] Handle setup subnet error --- setup/server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup/server.py b/setup/server.py index 4dfd49ae..0bb25a51 100644 --- a/setup/server.py +++ b/setup/server.py @@ -90,7 +90,10 @@ def build_app(path): def submit(): data = flask.request.form.copy() data['uid'] = str(uuid.uuid4()) - data['dns'] = str(ipaddress.IPv4Network(data['subnet'])[-2]) + try: + data['dns'] = str(ipaddress.IPv4Network(data['subnet'])[-2]) + except ValueError as err: + return "Error while generating files: " + str(err) db.set(data['uid'], json.dumps(data)) return flask.redirect(flask.url_for('.setup', uid=data['uid'])) From b798ea94d29264ec3427f80937b1d03fe7ef48a8 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Fri, 1 Mar 2019 16:56:08 +0200 Subject: [PATCH 21/21] Split quoted text on two lines and fix underlines --- docs/faq.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index cec7fb98..61cb8daf 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -422,6 +422,6 @@ We **strongly** advice against downgrading the TLS version and ciphers! .. _`698`: https://github.com/Mailu/Mailu/issues/698 .. _`unbound`: https://nlnetlabs.nl/projects/unbound/about/ -A user gets ``Sender address rejected: Access denied. Please check the message recipient […] and try again`` even though the sender is legitimate? -```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` +A user gets ``Sender address rejected: Access denied. Please check the`` ``message recipient […] and try again`` even though the sender is legitimate? +`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` First, check if you are really sure the user is a legitimate sender, i.e. the registered user is authenticated successfully and own either the account or alias he/she is trying to send from. If you are really sure this is correct, then the user might try to errornously send via port 25 insteadof the designated SMTP client-ports. Port 25 is meant for server-to-server delivery, while users should use port 587 or 465.