mirror of
https://github.com/Mailu/Mailu.git
synced 2025-02-11 13:25:44 +02:00
Merge branch 'master' into HorayNarea-feat-upgrade-alpine
This commit is contained in:
commit
ce0c24e076
@ -85,6 +85,26 @@ def user(localpart, domain_name, password, hash_scheme=None):
|
||||
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()
|
||||
@click.argument('domain_name')
|
||||
@click.option('-u', '--max-users')
|
||||
|
@ -3,3 +3,4 @@ proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
|
||||
proxy_http_version 1.1;
|
||||
|
@ -30,6 +30,11 @@ mydestination =
|
||||
|
||||
# Relayhost if any is configured
|
||||
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 = {{ RECIPIENT_DELIMITER }}
|
||||
|
1
core/postfix/conf/sasl_passwd
Normal file
1
core/postfix/conf/sasl_passwd
Normal file
@ -0,0 +1 @@
|
||||
{{ RELAYHOST }} {{ RELAYUSER }}:{{ RELAYPASSWORD }}
|
@ -48,6 +48,13 @@ for map_file in glob.glob("/overrides/*.map"):
|
||||
os.system("postmap {}".format(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
|
||||
multiprocessing.Process(target=start_podop).start()
|
||||
os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing")
|
||||
|
@ -6,6 +6,7 @@ Managing users and aliases can be done from CLI using commands:
|
||||
* alias
|
||||
* alias-delete
|
||||
* domain
|
||||
* password
|
||||
* user
|
||||
* user-import
|
||||
* user-delete
|
||||
@ -35,6 +36,14 @@ domain
|
||||
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
|
||||
----
|
||||
|
||||
|
@ -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.
|
||||
|
||||
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
|
||||
go and fetch new email if available. Do not use too short delays if you do not
|
||||
|
1
towncrier/newsfragments/1066.feature
Normal file
1
towncrier/newsfragments/1066.feature
Normal file
@ -0,0 +1 @@
|
||||
Update user password in commandline
|
1
towncrier/newsfragments/1070.feature
Normal file
1
towncrier/newsfragments/1070.feature
Normal file
@ -0,0 +1 @@
|
||||
use HTTP/1.1 for proxyied connections
|
1
towncrier/newsfragments/1071.feature
Normal file
1
towncrier/newsfragments/1071.feature
Normal file
@ -0,0 +1 @@
|
||||
Update Rainloop to 1.13.0
|
1
towncrier/newsfragments/958.feature
Normal file
1
towncrier/newsfragments/958.feature
Normal file
@ -0,0 +1 @@
|
||||
Relays with authentication
|
@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y \
|
||||
&& rm -rf /var/lib/apt/lists \
|
||||
&& 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 \
|
||||
unzip python3-jinja2 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user