postfix: add to vno1-oh2

This commit is contained in:
2023-07-26 13:26:11 +03:00
parent 60936605c9
commit bac191ef2f
17 changed files with 120 additions and 91 deletions

View File

@@ -18,6 +18,11 @@ in {
timeZone = "UTC";
services = {
postfix = {
enable = true;
saslPasswdPath = config.age.secrets.sasl-passwd.path;
};
zfsunlock = {
enable = true;
targets."vno1-oh2.servers.jakst" = {
@@ -371,31 +376,6 @@ in {
};
};
postfix = {
enable = true;
enableSmtp = true;
networks = [
"127.0.0.1/8"
"[::ffff:127.0.0.0]/104"
"[::1]/128"
myData.tailscale_subnet.cidr
];
hostname = "${config.networking.hostName}.${config.networking.domain}";
relayHost = "smtp.sendgrid.net";
relayPort = 587;
mapFiles = {
sasl_passwd = config.age.secrets.sasl-passwd.path;
};
extraConfig = ''
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
header_size_limit = 4096000
'';
};
logrotate = {
settings = {
"/var/log/caddy/access-jakstys.lt.log" = {