add domain cli to docs

master
Roman Hoellen 6 years ago
parent bc617cf8ec
commit 1dfef1609a

@ -64,7 +64,7 @@ def admin(localpart, domain_name, password):
@click.argument('localpart') @click.argument('localpart')
@click.argument('domain_name') @click.argument('domain_name')
@click.argument('password') @click.argument('password')
@click.argument('hash_scheme') @click.argument('hash_scheme', required=False)
@flask_cli.with_appcontext @flask_cli.with_appcontext
def user(localpart, domain_name, password, hash_scheme=None): def user(localpart, domain_name, password, hash_scheme=None):
""" Create a user """ Create a user
@ -86,12 +86,14 @@ def user(localpart, domain_name, password, hash_scheme=None):
@mailu.command() @mailu.command()
@click.option('-n', '--domain-name') @click.argument('domain_name')
@click.option('-u', '--max-users') @click.option('-u', '--max-users')
@click.option('-a', '--max-aliases') @click.option('-a', '--max-aliases')
@click.option('-q', '--max-quota-bytes') @click.option('-q', '--max-quota-bytes')
@flask_cli.with_appcontext @flask_cli.with_appcontext
def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0): def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=0):
""" Create a domain
"""
domain = models.Domain.query.get(domain_name) domain = models.Domain.query.get(domain_name)
if not domain: if not domain:
domain = models.Domain(name=domain_name) domain = models.Domain(name=domain_name)

@ -5,6 +5,7 @@ Managing users and aliases can be done from CLI using commands:
* alias * alias
* alias-delete * alias-delete
* domain
* user * user
* user-import * user-import
* user-delete * user-delete
@ -25,6 +26,15 @@ alias-delete
docker-compose exec admin flask mailu alias-delete foo@example.net 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 user
---- ----

Loading…
Cancel
Save