summaryrefslogtreecommitdiff
path: root/content/mail/security.md
diff options
context:
space:
mode:
authorDavid Uhden <david@uhden.dev>2025-01-28 01:07:18 +0100
committerDavid Uhden <david@uhden.dev>2025-01-28 01:07:18 +0100
commit002e68cab0e4f87bd7299e837d32e8985d4380d1 (patch)
tree29b1e70132348abfcf4d22914bb551773e3d2fbb /content/mail/security.md
parentd7419c697d6f76aa41321c36ab914861c0c6c051 (diff)
Make the Fail2Ban configuration work
Diffstat (limited to 'content/mail/security.md')
-rw-r--r--content/mail/security.md11
1 files changed, 7 insertions, 4 deletions
diff --git a/content/mail/security.md b/content/mail/security.md
index 76dac80..67ad079 100644
--- a/content/mail/security.md
+++ b/content/mail/security.md
@@ -42,18 +42,20 @@ Go down to the `# Mail servers` line and paste this:
enabled = true
port = smtp,ssmtp,submission
filter = postfix
- logpath = /var/log/mail.log
+ logpath = %(postfix_log)s
+ backend = systemd
[sasl]
enabled = true
port = smtp,ssmtp,submission,imap2,imap3,imaps,pop3,pop3s
- filter = postfix-sasl
+ filter = postfix[mode=auth]
# You might consider monitoring /var/log/mail.warn instead if you are
# running postfix since it would provide the same log lines at the
# "warn" level but overall at the smaller filesize.
- logpath = /var/log/mail.warn
+ logpath = %(postfix_log)s
+ backend = systemd
maxretry = 1
bantime = 21600
@@ -62,7 +64,8 @@ Go down to the `# Mail servers` line and paste this:
enabled = true
port = smtp,ssmtp,submission,imap2,imap3,imaps,pop3,pop3s
filter = dovecot
- logpath = /var/log/mail.log
+ logpath = %(dovecot_log)s
+ backend = systemd
This will only grant 2 login attempts and then block the requester for 6 hours. Now restart `fail2ban`: