Skip to content

Instantly share code, notes, and snippets.

@cbeier
Created November 13, 2009 09:42
Show Gist options
  • Save cbeier/233710 to your computer and use it in GitHub Desktop.
Save cbeier/233710 to your computer and use it in GitHub Desktop.
Devecot fail2ban config
# -> /etc/fail2ban/filter.d/devecot.conf
# Fail2Ban configuration file
#
# Author: burner
#
# $Revision: 1 $
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P\S+)
# Values: TEXT
#
failregex = dovecot-auth: pam_unix\(dovecot:auth\): authentication failure;.*rhost=
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
# -> /etc/fail2ban/jail.local
[dovecot]
enabled = true
port = imap,imaps,pop3,pop3s
filter = dovecot
logpath = /var/log/mail.log
# -> Restart fail2ban
fail2ban-client reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment