Add fail2ban configuration for Postfix and adjust logging settings

This commit is contained in:
2025-04-24 19:34:28 +02:00
parent e980abcb2e
commit 558c867bc7
2 changed files with 20 additions and 2 deletions
@@ -93,6 +93,14 @@ fail2ban_jails:
maxretry: 5
findtime: 600
bantime: 3600
postfix:
enabled: true
port: "smtp,ssmtp"
filter: "postfix"
logpath: "/var/log/postfix/current"
maxretry: 3
findtime: 600
bantime: 3600
# aide
install_aide: true
+12 -2
View File
@@ -53,7 +53,7 @@ locals {
DOVECOT_AUTH_PORT = 31000
DOVECOT_LMTP_ADDRESS = "dovecot-lmtp.mail.svc.cluster.local"
DOVECOT_LMTP_PORT = 31024
LOG_TO_STDOUT = 1
LOG_TO_STDOUT = 0
}
password_hashes = {
@@ -435,7 +435,6 @@ resource "kubernetes_deployment" "dovecot" {
ignore_changes = [spec[0].template[0].metadata[0].annotations]
replace_triggered_by = [
kubernetes_config_map.dovecot_config,
# kubernetes_secret.dovecot_users,
kubernetes_config_map.dovecot_sieve,
]
}
@@ -515,6 +514,11 @@ resource "kubernetes_deployment" "postfix" {
mount_path = "/etc/letsencrypt"
read_only = true
}
volume_mount {
name = "postfix-logs"
mount_path = "/var/log/postfix"
read_only = false
}
}
volume {
name = "email-storage"
@@ -540,6 +544,12 @@ resource "kubernetes_deployment" "postfix" {
secret_name = "mail-tls"
}
}
volume {
name = "postfix-logs"
host_path {
path = "/var/log/postfix"
}
}
}
}
}