diff --git a/core/admin/mailu/manage.py b/core/admin/mailu/manage.py index cbc8b6c9..462bce67 100644 --- a/core/admin/mailu/manage.py +++ b/core/admin/mailu/manage.py @@ -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,12 +86,14 @@ def user(localpart, domain_name, password, hash_scheme=None): @mailu.command() -@click.option('-n', '--domain-name') +@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) diff --git a/docs/cli.rst b/docs/cli.rst index 6fb2a786..bdd030f9 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -5,6 +5,7 @@ Managing users and aliases can be done from CLI using commands: * alias * alias-delete +* domain * user * user-import * user-delete @@ -25,6 +26,15 @@ alias-delete 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 ----