snappymail/fail2ban
2021-03-23 22:01:04 +01:00
..
filter.d Rename fail2ban syslog 'rainloop' to 'snappymail' 2020-09-30 14:31:12 +02:00
jail.d Rename fail2ban syslog 'rainloop' to 'snappymail' 2020-09-30 14:31:12 +02:00
README.md Fix for github markdown view 2021-03-23 22:01:04 +01:00

Fail2ban Instructions

This modified version of RainLoop logs to the system (when syslog works in PHP).

If you use other ports then http, https & 2096, modify them in /filter.d/*.conf

Systemd journal PHP-FPM

Upload the following to /etc/fail2ban/*

  • /filter.d/snappymail-fpm-journal.conf
  • /jail.d/snappymail-fpm-journal.conf

Modify your /etc/fail2ban/jail.local with:

[snappymail-fpm-journal]
enabled = true

Modify /PATH-TO-RAINLOOP-DATA/data/default/configs/application.ini

[logs]
auth_logging = On
auth_logging_filename = "fail2ban/auth-fail.log"
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}"

Modify the path in /jail.d/snappymail-log.conf

Upload the following to /etc/fail2ban/*

  • /filter.d/snappymail-log.conf
  • /jail.d/snappymail-log.conf

Modify your /etc/fail2ban/jail.local with:

[snappymail-log]
enabled = true