1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-05-21 22:33:16 +02:00

Merge branch 'master' into HorayNarea-feat-upgrade-alpine

This commit is contained in:
Dario Ernst 2019-07-14 09:40:58 +00:00
commit ce0c24e076
13 changed files with 50 additions and 2 deletions

View File

@ -85,6 +85,26 @@ def user(localpart, domain_name, password, hash_scheme=None):
db.session.commit() db.session.commit()
@mailu.command()
@click.argument('localpart')
@click.argument('domain_name')
@click.argument('password')
@click.argument('hash_scheme', required=False)
@flask_cli.with_appcontext
def password(localpart, domain_name, password, hash_scheme=None):
""" Change the password of an user
"""
email = '{0}@{1}'.format(localpart, domain_name)
user = models.User.query.get(email)
if hash_scheme is None:
hash_scheme = app.config['PASSWORD_SCHEME']
if user:
user.set_password(password, hash_scheme=hash_scheme)
else:
print("User " + email + " not found.")
db.session.commit()
@mailu.command() @mailu.command()
@click.argument('domain_name') @click.argument('domain_name')
@click.option('-u', '--max-users') @click.option('-u', '--max-users')

View File

@ -3,3 +3,4 @@ proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_http_version 1.1;

View File

@ -30,6 +30,11 @@ mydestination =
# Relayhost if any is configured # Relayhost if any is configured
relayhost = {{ RELAYHOST }} relayhost = {{ RELAYHOST }}
{% if RELAYUSER %}
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
{% endif %}
# Recipient delimiter for extended addresses # Recipient delimiter for extended addresses
recipient_delimiter = {{ RECIPIENT_DELIMITER }} recipient_delimiter = {{ RECIPIENT_DELIMITER }}

View File

@ -0,0 +1 @@
{{ RELAYHOST }} {{ RELAYUSER }}:{{ RELAYPASSWORD }}

View File

@ -48,6 +48,13 @@ for map_file in glob.glob("/overrides/*.map"):
os.system("postmap {}".format(destination)) os.system("postmap {}".format(destination))
os.remove(destination) os.remove(destination)
if "RELAYUSER" in os.environ:
path = "/etc/postfix/sasl_passwd"
convert("/conf/sasl_passwd", path)
os.system("postmap {}".format(path))
convert("/conf/rsyslog.conf", "/etc/rsyslog.conf")
# Run Podop and Postfix # Run Podop and Postfix
multiprocessing.Process(target=start_podop).start() multiprocessing.Process(target=start_podop).start()
os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing") os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing")

View File

@ -6,6 +6,7 @@ Managing users and aliases can be done from CLI using commands:
* alias * alias
* alias-delete * alias-delete
* domain * domain
* password
* user * user
* user-import * user-import
* user-delete * user-delete
@ -35,6 +36,14 @@ domain
docker-compose exec admin flask mailu domain example.net docker-compose exec admin flask mailu domain example.net
password
--------
.. code-block:: bash
docker-compose exec admin flask mailu password myuser example.net 'password123'
user user
---- ----

View File

@ -57,7 +57,8 @@ Docker services' outbound mail to be relayed, you can set this to ``172.16.0.0/1
to include **all** Docker networks. The default is to leave this empty. to include **all** Docker networks. The default is to leave this empty.
The ``RELAYHOST`` is an optional address of a mail server relaying all outgoing The ``RELAYHOST`` is an optional address of a mail server relaying all outgoing
mail. mail in following format: ``[HOST]:PORT``.
``RELAYUSER`` and ``RELAYPASSWORD`` can be used when authentication is needed.
The ``FETCHMAIL_DELAY`` is a delay (in seconds) for the fetchmail service to The ``FETCHMAIL_DELAY`` is a delay (in seconds) for the fetchmail service to
go and fetch new email if available. Do not use too short delays if you do not go and fetch new email if available. Do not use too short delays if you do not

View File

@ -0,0 +1 @@
Update user password in commandline

View File

@ -0,0 +1 @@
use HTTP/1.1 for proxyied connections

View File

@ -0,0 +1 @@
Update Rainloop to 1.13.0

View File

@ -0,0 +1 @@
Relays with authentication

View File

@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists \ && rm -rf /var/lib/apt/lists \
&& echo "ServerSignature Off" >> /etc/apache2/apache2.conf && echo "ServerSignature Off" >> /etc/apache2/apache2.conf
ENV RAINLOOP_URL https://github.com/RainLoop/rainloop-webmail/releases/download/v1.12.1/rainloop-community-1.12.1.zip ENV RAINLOOP_URL https://github.com/RainLoop/rainloop-webmail/releases/download/v1.13.0/rainloop-community-1.13.0.zip
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
unzip python3-jinja2 \ unzip python3-jinja2 \