content/blog/mail_server_alpine_postfix_dovecot_tutorial.md: fail2ban section

This commit is contained in:
revsuine 2024-11-25 01:39:35 +00:00
parent c6d8eb817c
commit 90732a7a89
Signed by: revsuine
GPG key ID: 3F257B68F5BC9339

View file

@ -1859,6 +1859,25 @@ you would write `"Inbox.Spam"` in that case.
# Miscellaneous suggestions
To use fail2ban for your mail server, create `/etc/fail2ban/jail.d/mail.local`:
```ini
[postfix]
enabled = true
logpath = /var/log/postfix.log
[dovecot]
enabled = true
logpath = /var/log/dovecot.log
[sieve]
enabled = true
logpath = /var/log/dovecot.log
```
These are the log file locations we configured above, but you can set them to the syslog if you didn't give Postfix and
Dovecot their own log files.
You may want to get your domain whitelisted on [dnswl.org](https://www.dnswl.org/), an email whitelist service where
admins can submit their domain and IP address to indicate trustworthiness.