1
0
mirror of https://github.com/tomav/docker-mailserver.git synced 2024-07-04 23:21:23 +02:00
docker-mailserver/docs/content/config/user-management/accounts.md

25 lines
1.3 KiB
Markdown
Raw Normal View History

Users (email accounts) are managed in `config/postfix-accounts.cf`.
2016-04-24 17:18:18 +02:00
Just add the full email address and its encrypted password separated by a pipe.
Example:
2016-06-14 18:07:42 +02:00
user1@domain.tld|{SHA512-CRYPT}$6$2YpW1nYtPBs2yLYS$z.5PGH1OEzsHHNhl3gJrc3D.YMZkvKw/vp.r5WIiwya6z7P/CQ9GDEJDr2G2V0cAfjDFeAQPUoopsuWPXLk3u1
user2@otherdomain.tld|{SHA512-CRYPT}$6$2YpW1nYtPBs2yLYS$z.5PGH1OEzsHHNhl3gJrc3D.YMZkvKw/vp.r5WIiwya6z7P/CQ9GDEJDr2G2V0cAfjDFeAQPUoopsuWPXLk3u1
2016-04-24 17:18:18 +02:00
In the previous example, we added 2 mail accounts for 2 different domains.
2017-06-19 20:39:22 +02:00
This is will automagically configure the mail-server as multi-domains.
To generate a new mail account entry in your configuration, you could run for example the following:
2016-04-24 17:18:18 +02:00
docker run --rm \
-e MAIL_USER=user1@domain.tld \
2016-04-25 06:06:15 +02:00
-e MAIL_PASS=mypassword \
2016-05-11 10:28:51 +02:00
-ti tvial/docker-mailserver:latest \
2016-06-14 18:07:42 +02:00
/bin/sh -c 'echo "$MAIL_USER|$(doveadm pw -s SHA512-CRYPT -u $MAIL_USER -p $MAIL_PASS)"' >> config/postfix-accounts.cf
2016-04-24 17:18:18 +02:00
You will be asked for a password. Just copy all the output string in the file `config/postfix-accounts.cf`.
The `doveadm pw` command let you choose between several encryption schemes for the password.
Use doveadm pw -l to get a list of the currently supported encryption schemes.
> Note: changes made with this script require a restart of the container. See [#552](../issues/552)