working: mailserver
This commit is contained in:
parent
7f1e38c11d
commit
3919c5f2d4
34
mail.nix
34
mail.nix
|
@ -1,4 +1,8 @@
|
|||
{ mailserver , ... }:
|
||||
let
|
||||
domain = "sondell.org";
|
||||
fqdn = "mail.${domain}";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
mailserver
|
||||
|
@ -6,8 +10,8 @@
|
|||
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "mail.sondell.org";
|
||||
domains = [ "sondell.org" ];
|
||||
fqdn = fqdn;
|
||||
domains = [ domain ];
|
||||
|
||||
# A list of all login accounts. To create the password hashes, use
|
||||
# cat .secrets/nextadminpw | nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' > .secrets/mailpw.hash
|
||||
|
@ -23,18 +27,18 @@
|
|||
certificateScheme = "acme-nginx";
|
||||
};
|
||||
|
||||
# services.roundcube = {
|
||||
# enable = true;
|
||||
# # this is the url of the vhost, not necessarily the same as the fqdn of
|
||||
# # the mailserver
|
||||
# hostName = "webmail.sondell.org";
|
||||
# extraConfig = ''
|
||||
# # starttls needed for authentication, so the fqdn required to match
|
||||
# # the certificate
|
||||
# $config['smtp_server'] = "tls://${mailserver.fqdn}";
|
||||
# $config['smtp_user'] = "%u";
|
||||
# $config['smtp_pass'] = "%p";
|
||||
# '';
|
||||
# };
|
||||
services.roundcube = {
|
||||
enable = true;
|
||||
# this is the url of the vhost, not necessarily the same as the fqdn of
|
||||
# the mailserver
|
||||
hostName = "webmail.${domain}";
|
||||
extraConfig = ''
|
||||
# starttls needed for authentication, so the fqdn required to match
|
||||
# the certificate
|
||||
$config['smtp_server'] = "tls://${fqdn}";
|
||||
$config['smtp_user'] = "%u";
|
||||
$config['smtp_pass'] = "%p";
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue