Merge branch 'master' into replace-gethostbyname

master
Ionut Filip 5 years ago committed by GitHub
commit ac0fc41421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,14 +5,18 @@ 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.
<!-- TOWNCRIER -->
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: Implement mailustart to resolve webmail in admin ([#716](https://github.com/Mailu/Mailu/issues/716))
- Bug: Rename cli commands and their options (replace "\_" with "-") ([#877](https://github.com/Mailu/Mailu/issues/877))
- Bug: Fix typo in migration script ([#905](https://github.com/Mailu/Mailu/issues/905))
v1.6.0 - 2019-01-18
-------------------

@ -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](https://mailu.io/master/contributors/guide.html#changelog) entry file.

@ -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

@ -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,15 +86,18 @@ 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.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)
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()
@ -126,7 +129,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"""

@ -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()
))

@ -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

@ -84,6 +84,7 @@ service auth-worker {
###############
protocol imap {
mail_plugins = $mail_plugins imap_quota imap_sieve
mail_max_userip_connections = 20
}
protocol pop3 {

@ -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

@ -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

@ -4,11 +4,12 @@ Mailu command line
Managing users and aliases can be done from CLI using commands:
* alias
* alias_delete
* alias-delete
* domain
* user
* user_import
* user_delete
* config_update
* user-import
* user-delete
* config-update
alias
-----
@ -18,44 +19,54 @@ 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
domain
----
.. code-block:: bash
docker-compose exec admin flask mailu domain example.net
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
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 myuser example.net '$6$51ebe0cb9f1dab48effa2a0ad8660cb489b445936b9ffd812a0b8f46bca66dd549fea530ce' 'SHA512-CRYPT'
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 -T admin flask mailu config-update --delete-objects
where mail-config.yml looks like:
@ -72,7 +83,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
-----

@ -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
---------------

@ -464,3 +464,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.

@ -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!
Happy mailing!

@ -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

@ -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

@ -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

@ -0,0 +1,9 @@
[tool.towncrier]
#package = "mypackage"
package_dir = "towncrier"
filename = "CHANGELOG.md"
underlines = ["-", "", ""]
template = "towncrier/template.md"
title_format = "v{version} - {project_date}"
issue_format = "[#{issue}](https://github.com/Mailu/Mailu/issues/{issue})"
start_string = "<!-- TOWNCRIER -->"

@ -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 \

@ -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

@ -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

@ -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']))

@ -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 %}

@ -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

@ -15,5 +15,5 @@ function __get_custom_data_full_path()
*/
function __get_additional_configuration_name()
{
return 'config.ini';
return 'application.ini';
}

@ -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")

Loading…
Cancel
Save