2017-11-02 21:05:12 +02:00
Mailu command line
==================
Managing users and aliases can be done from CLI using commands:
* alias
2019-01-24 23:38:09 +02:00
* alias-delete
2019-02-13 11:53:40 +02:00
* domain
2019-07-08 10:35:59 +02:00
* password
2017-11-02 21:05:12 +02:00
* user
2019-01-24 23:38:09 +02:00
* user-import
* user-delete
* config-update
2017-11-02 21:05:12 +02:00
alias
-----
.. code-block :: bash
2018-11-08 22:35:41 +02:00
docker-compose exec admin flask mailu alias foo example.net "mail1@example.com,mail2@example.com"
2017-11-02 21:05:12 +02:00
2019-01-24 23:38:09 +02:00
alias-delete
2017-11-02 21:05:12 +02:00
------------
.. code-block :: bash
2019-01-24 23:38:09 +02:00
docker-compose exec admin flask mailu alias-delete foo@example.net
2017-11-02 21:05:12 +02:00
2019-02-13 11:53:40 +02:00
domain
2019-08-27 09:34:46 +02:00
------
2019-02-13 11:53:40 +02:00
.. code-block :: bash
docker-compose exec admin flask mailu domain example.net
2019-07-08 10:35:59 +02:00
password
--------
.. code-block :: bash
docker-compose exec admin flask mailu password myuser example.net 'password123'
2017-11-02 21:05:12 +02:00
user
----
.. code-block :: bash
2019-02-13 11:30:08 +02:00
docker-compose exec admin flask mailu user myuser example.net 'password123'
2017-11-02 21:05:12 +02:00
2019-01-24 23:38:09 +02:00
user-import
2017-11-02 21:05:12 +02:00
-----------
primary difference with simple `user` command is that password is being imported as a hash - very useful when migrating users from other systems where only hash is known.
.. code-block :: bash
2019-02-09 16:12:24 +02:00
docker-compose run --rm admin flask mailu user-import myuser example.net '$6$51ebe0cb9f1dab48effa2a0ad8660cb489b445936b9ffd812a0b8f46bca66dd549fea530ce' 'SHA512-CRYPT'
2017-11-02 21:05:12 +02:00
2019-01-24 23:38:09 +02:00
user-delete
2017-11-02 21:05:12 +02:00
------------
.. code-block :: bash
2019-01-24 23:38:09 +02:00
docker-compose exec admin flask mailu user-delete foo@example.net
2017-11-02 21:05:12 +02:00
2019-01-24 23:38:09 +02:00
config-update
2017-11-02 21:05:12 +02:00
-------------
2018-03-01 18:49:30 +02:00
The sole purpose of this command is for importing users/aliases in bulk and synchronizing DB entries with external YAML template:
2017-11-02 21:05:12 +02:00
.. code-block :: bash
2019-02-13 11:30:08 +02:00
cat mail-config.yml | docker-compose exec -T admin flask mailu config-update --delete-objects
2017-11-02 21:05:12 +02:00
where mail-config.yml looks like:
.. code-block :: bash
users:
- localpart: foo
domain: example.com
password_hash: klkjhumnzxcjkajahsdqweqqwr
aliases:
- localpart: alias1
domain: example.com
destination: "user1@example.com,user2@example.com"
2019-02-13 11:30:08 +02:00
without `` --delete-object `` option config-update will only add/update new values but will *not* remove any entries missing in provided YAML input.
2017-11-02 21:05:12 +02:00
Users
-----
following are additional parameters that could be defined for users:
* comment
* quota_bytes
* global_admin
* enable_imap
* enable_pop
* forward_enabled
* forward_destination
* reply_enabled
* reply_subject
* reply_body
* displayed_name
* spam_enabled
* spam_threshold
Alias
-----
additional fields:
* wildcard