certificate scheme 2
On the fly create certificates via openssl (Maybe change this to libressl in the future?). This is probably the best scheme to get something that simply works. Self signed certificates only pose a problem when connecting to retrieve the email via imap or pop3.
This commit is contained in:
parent
be5d8c09d8
commit
b68e64ec72
6 changed files with 70 additions and 40 deletions
|
@ -16,8 +16,23 @@
|
|||
|
||||
{ mail_dir, vmail_user_name, vmail_group_name, valiases, domain, enable_imap,
|
||||
enable_pop3, virus_scanning, dkim_signing, certificate_scheme, cert_file,
|
||||
key_file }:
|
||||
key_file, cert_dir }:
|
||||
|
||||
let
|
||||
# cert :: PATH
|
||||
cert = if certificate_scheme == 1
|
||||
then cert_file
|
||||
else if certificate_scheme == 2
|
||||
then "${cert_dir}/cert-${domain}.pem"
|
||||
else "";
|
||||
|
||||
# key :: PATH
|
||||
key = if certificate_scheme == 1
|
||||
then key_file
|
||||
else if certificate_scheme == 2
|
||||
then "${cert_dir}/key-${domain}.pem"
|
||||
else "";
|
||||
in
|
||||
{
|
||||
# rspamd
|
||||
rspamd = {
|
||||
|
@ -29,11 +44,11 @@ key_file }:
|
|||
};
|
||||
|
||||
postfix = import ./postfix.nix {
|
||||
inherit mail_dir domain valiases certificate_scheme cert_file key_file;
|
||||
inherit mail_dir domain valiases cert key;
|
||||
};
|
||||
|
||||
dovecot2 = import ./dovecot.nix {
|
||||
inherit vmail_group_name vmail_user_name mail_dir enable_imap
|
||||
enable_pop3 certificate_scheme cert_file key_file;
|
||||
enable_pop3 cert key;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue