Email configuration #9
|
@ -4,7 +4,7 @@ let
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
domain = config.fsr.domain;
|
domain = config.fsr.domain;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sops.secrets."rspamd-password".owner = config.users.user.rspamd.name;
|
sops.secrets."rspamd-password".owner = config.users.users.rspamd.name;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 25 465 993 ];
|
networking.firewall.allowedTCPPorts = [ 25 465 993 ];
|
||||||
|
|
||||||
|
@ -75,13 +75,41 @@ in
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
postfix.enable = true;
|
postfix.enable = true;
|
||||||
locals = {
|
locals = {
|
||||||
"worker-controller.inc".source = config.sops.secrets."rspamd-password".path;
|
"worker-controller.inc".source = config.sops.secrets."rspamd-password".path;
|
||||||
|
"redis.conf".text = ''
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
read_servers = "127.0.0.1";
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
write_servers = "127.0.0.1";
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
'';
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
};
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
};
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
redis = {
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
vmOverCommit = true;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
servers.rspamd = {
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
enable = true;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
port = 6379;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
recommendedOptimisation = true;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
recommendedProxySettings = true;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
recommendedTlsSettings = true;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
virtualHosts."${hostname}" = {
|
virtualHosts."${hostname}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
locations = {
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
"/rspamd" = {
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
proxyWebsockets = true;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
# maybe there is a more beautiful way for this
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
extraConfig = ''
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
if ($request_uri ~* "/rspamd/(.*)") {
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
proxy_pass http://127.0.0.1:11334/$1;
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
}
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
'';
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
};
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
};
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
sops.config.secrets.portunus_search.path
/var/lib/mail
rspamd.ifsr.de