diff --git a/services/authelia/configuration.yml b/services/authelia/configuration.yml index 21b3358..ffdb8f5 100644 --- a/services/authelia/configuration.yml +++ b/services/authelia/configuration.yml @@ -74,8 +74,9 @@ storage: path: /data/db.sqlite3 notifier: + disable_startup_check: true smtp: - address: 'smtp.gasdev.fr' + address: 'smtp://smtp.gasdev.fr:25' username: 'postmaster@gasdev.fr' sender: 'Authelia ' diff --git a/services/stalwart-mail/default.nix b/services/stalwart-mail/default.nix index 3415de2..4397185 100644 --- a/services/stalwart-mail/default.nix +++ b/services/stalwart-mail/default.nix @@ -1,16 +1,20 @@ {config, ...}: let - domain = "mail.gasdev.fr"; + domain = "gasdev.fr"; in { sops.secrets."stalwart-mail/ADMIN_SECRET".owner = "stalwart-mail"; services.caddy.virtualHosts."${domain}".extraConfig = '' + redir https://www.gasdev.fr + ''; + + services.caddy.virtualHosts."mail.${domain}".extraConfig = '' reverse_proxy 127.0.0.1:8080 ''; services.stalwart-mail = { enable = true; settings = { - lookup.default.hostname = "${domain}"; + lookup.default.hostname = "mail.${domain}"; server = { tls.certificate = "default"; http = { @@ -107,7 +111,7 @@ in { cat "''\${CADDY_CERT_DIR}/${domain}.key" > "''\${STALWART_CERT_DIR}/${domain}.priv.pem" chown -R stalwart-mail:stalwart-mail "''\${STALWART_CERT_DIR}" - chmod -R 0600 "''\${STALWART_CERT_DIR}" + chmod -R 0700 "''\${STALWART_CERT_DIR}" ''; serviceConfig = { Type = "oneshot";