2020-07-29 17:29:59 +08:00
|
|
|
# Fail2ban Instructions
|
|
|
|
|
|
|
|
This modified version of RainLoop logs to the system (when syslog works in PHP).
|
|
|
|
|
2021-03-24 05:04:27 +08:00
|
|
|
If you use other ports then http, https & 2096, modify them in /jail.d/*.conf
|
2020-07-29 17:29:59 +08:00
|
|
|
|
|
|
|
## Systemd journal PHP-FPM
|
|
|
|
|
|
|
|
Upload the following to /etc/fail2ban/*
|
|
|
|
|
2020-09-30 20:31:12 +08:00
|
|
|
- /filter.d/snappymail-fpm-journal.conf
|
|
|
|
- /jail.d/snappymail-fpm-journal.conf
|
2020-07-29 17:29:59 +08:00
|
|
|
|
|
|
|
Modify your /etc/fail2ban/jail.local with:
|
|
|
|
|
2021-03-24 05:01:04 +08:00
|
|
|
```
|
|
|
|
[snappymail-fpm-journal]
|
|
|
|
enabled = true
|
|
|
|
```
|
2020-07-29 17:29:59 +08:00
|
|
|
|
|
|
|
## Default log (not recommended)
|
|
|
|
|
2021-03-24 05:04:27 +08:00
|
|
|
Modify `/PATH-TO-RAINLOOP-DATA/_data_/_default_/configs/application.ini`
|
2020-07-29 17:29:59 +08:00
|
|
|
|
2021-03-24 05:01:04 +08:00
|
|
|
```
|
|
|
|
[logs]
|
|
|
|
auth_logging = On
|
|
|
|
auth_logging_filename = "fail2ban/auth-fail.log"
|
2020-07-29 17:29:59 +08:00
|
|
|
auth_logging_format = "[{date:Y-m-d H:i:s T}] Auth failed: ip={request:ip} user={imap:login} host={imap:host} port={imap:port}"
|
2021-03-24 05:01:04 +08:00
|
|
|
```
|
2020-07-29 17:29:59 +08:00
|
|
|
|
2020-09-30 20:31:12 +08:00
|
|
|
Modify the path in /jail.d/snappymail-log.conf
|
2020-07-29 17:29:59 +08:00
|
|
|
|
|
|
|
Upload the following to /etc/fail2ban/*
|
|
|
|
|
2020-09-30 20:31:12 +08:00
|
|
|
- /filter.d/snappymail-log.conf
|
|
|
|
- /jail.d/snappymail-log.conf
|
2020-07-29 17:29:59 +08:00
|
|
|
|
|
|
|
Modify your /etc/fail2ban/jail.local with:
|
|
|
|
|
2021-03-24 05:01:04 +08:00
|
|
|
```
|
|
|
|
[snappymail-log]
|
|
|
|
enabled = true
|
|
|
|
```
|