add password hashes

This commit is contained in:
Robin Raymond 2017-08-13 15:51:41 +02:00
parent d7d27db605
commit f51811b236
3 changed files with 18 additions and 5 deletions

View file

@ -10,7 +10,7 @@
- [x] receive email on submission port 587
- [x] lmtp with dovecot
* Dovecot
- [x] lmpto with postfix
- [x] lmtp with postfix
- [x] creates maildir folders, saves mails
- [x] imap retrieval
- [x] pop3 retrieval
@ -27,7 +27,7 @@
- [ ] TODO: Implement
* User Management
- [x] Creates Users
- [ ] TODO: Set Passwords in config file
- [x] Set Passwords in config file
### How to Test

View file

@ -31,9 +31,21 @@ let
#
# The login account of the domain. Every account is mapped to a unix user,
# e.g. `user1@example.com`.
# e.g. `user1@example.com`. To generate the passwords use `mkpasswd` as
# follows
#
login_accounts = [ "user1" "user2" ];
# ```
# mkpasswd -m sha-512 "super secret password"
# ```
#
login_accounts = [
{ name = "user1";
password = "$6$evQJs5CFQyPAW09S$Cn99Y8.QjZ2IBnSu4qf1vBxDRWkaIZWOtmu1Ddsm3.H3CFpeVc0JU4llIq8HQXgeatvYhh5O33eWG3TSpjzu6/";
}
{ name = "user2";
password = "$6$oE0ZNv2n7Vk9gOf$9xcZWCCLGdMflIfuA0vR1Q1Xblw6RZqPrP94mEit2/81/7AKj2bqUai5yPyWE.QYPyv6wLMHZvjw3Rlg7yTCD/";
}
];
#
# Virtual Aliases. A virtual alias { from = "info"; to = "user1"; } means that

View file

@ -29,9 +29,10 @@ let
# accountsToUser :: String -> UserRecord
accountsToUser = x: {
name = x + "@" + domain;
name = x.name + "@" + domain;
isNormalUser = false;
group = vmail_group_name;
hashedPassword = x.password;
};
# mail_user :: [ UserRecord ]