chore(services): Tweak SMTP config
This commit is contained in:
parent
9046a53e3e
commit
913b582d2e
2 changed files with 9 additions and 4 deletions
|
@ -74,8 +74,9 @@ storage:
|
||||||
path: /data/db.sqlite3
|
path: /data/db.sqlite3
|
||||||
|
|
||||||
notifier:
|
notifier:
|
||||||
|
disable_startup_check: true
|
||||||
smtp:
|
smtp:
|
||||||
address: 'smtp.gasdev.fr'
|
address: 'smtp://smtp.gasdev.fr:25'
|
||||||
username: 'postmaster@gasdev.fr'
|
username: 'postmaster@gasdev.fr'
|
||||||
sender: 'Authelia <authelia@gasdev.fr>'
|
sender: 'Authelia <authelia@gasdev.fr>'
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
{config, ...}: let
|
{config, ...}: let
|
||||||
domain = "mail.gasdev.fr";
|
domain = "gasdev.fr";
|
||||||
in {
|
in {
|
||||||
sops.secrets."stalwart-mail/ADMIN_SECRET".owner = "stalwart-mail";
|
sops.secrets."stalwart-mail/ADMIN_SECRET".owner = "stalwart-mail";
|
||||||
|
|
||||||
services.caddy.virtualHosts."${domain}".extraConfig = ''
|
services.caddy.virtualHosts."${domain}".extraConfig = ''
|
||||||
|
redir https://www.gasdev.fr
|
||||||
|
'';
|
||||||
|
|
||||||
|
services.caddy.virtualHosts."mail.${domain}".extraConfig = ''
|
||||||
reverse_proxy 127.0.0.1:8080
|
reverse_proxy 127.0.0.1:8080
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.stalwart-mail = {
|
services.stalwart-mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
lookup.default.hostname = "${domain}";
|
lookup.default.hostname = "mail.${domain}";
|
||||||
server = {
|
server = {
|
||||||
tls.certificate = "default";
|
tls.certificate = "default";
|
||||||
http = {
|
http = {
|
||||||
|
@ -107,7 +111,7 @@ in {
|
||||||
cat "''\${CADDY_CERT_DIR}/${domain}.key" > "''\${STALWART_CERT_DIR}/${domain}.priv.pem"
|
cat "''\${CADDY_CERT_DIR}/${domain}.key" > "''\${STALWART_CERT_DIR}/${domain}.priv.pem"
|
||||||
|
|
||||||
chown -R stalwart-mail:stalwart-mail "''\${STALWART_CERT_DIR}"
|
chown -R stalwart-mail:stalwart-mail "''\${STALWART_CERT_DIR}"
|
||||||
chmod -R 0600 "''\${STALWART_CERT_DIR}"
|
chmod -R 0700 "''\${STALWART_CERT_DIR}"
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
Loading…
Reference in a new issue