From fba246e9a1d1d96a385789ee4a25c24e8682e6ba Mon Sep 17 00:00:00 2001 From: hoellen Date: Thu, 24 Jan 2019 21:32:22 +0100 Subject: [PATCH] add wildcard option to cli (alias) --- CHANGELOG.md | 1 + core/admin/mailu/manage.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbd22a47..469ef722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ 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)) +- Enhancement: Missing wildcard option in alias flask command ([#869](https://github.com/Mailu/Mailu/issues/869)) v1.6.0 - 2019-01-18 ------------------- diff --git a/core/admin/mailu/manage.py b/core/admin/mailu/manage.py index e11644e7..3a8256ad 100644 --- a/core/admin/mailu/manage.py +++ b/core/admin/mailu/manage.py @@ -292,8 +292,9 @@ def alias_delete(email): @click.argument('localpart') @click.argument('domain_name') @click.argument('destination') +@click.option('-w', '--wildcard', is_flag=True) @flask_cli.with_appcontext -def alias(localpart, domain_name, destination): +def alias(localpart, domain_name, destination, wildcard=False): """ Create an alias """ domain = models.Domain.query.get(domain_name) @@ -303,6 +304,7 @@ def alias(localpart, domain_name, destination): alias = models.Alias( localpart=localpart, domain=domain, + wildcard=wildcard, destination=destination.split(','), email="%s@%s" % (localpart, domain_name) )