876: Add wildcard aliases with the cli r=mergify[bot] a=hoellen

## What type of PR?
enhancement

## What does this PR do?
Add a possibility to add wildcard aliases with the cli.

### Related issue(s)
- closes #869 

## Prerequistes
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [x] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: place entry in the [changelog](CHANGELOG.md), under the latest un-released version.


Co-authored-by: hoellen <dev@hoellen.eu>
master
bors[bot] 6 years ago
commit 77ec049edc

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

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

Loading…
Cancel
Save