diff options
Diffstat (limited to 'roles/common')
-rw-r--r-- | roles/common/templates/etc/fail2ban/jail.local.j2 | 10 | ||||
-rw-r--r-- | roles/common/templates/etc/iptables/services.j2 | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/roles/common/templates/etc/fail2ban/jail.local.j2 b/roles/common/templates/etc/fail2ban/jail.local.j2 index b92cb7a..96f2d6b 100644 --- a/roles/common/templates/etc/fail2ban/jail.local.j2 +++ b/roles/common/templates/etc/fail2ban/jail.local.j2 @@ -61,3 +61,13 @@ filter = postfix logpath = /var/log/mail.log maxretry = 10 {% endif %} + + +{% if 'IMAP' in group_names %} +[dovecot] + +enabled = true +port = imap2,imap3,imaps,pop3,pop3s +filter = dovecot +logpath = /var/log/mail.log +{% endif %} diff --git a/roles/common/templates/etc/iptables/services.j2 b/roles/common/templates/etc/iptables/services.j2 index 8a9409d..cd7a8bd 100644 --- a/roles/common/templates/etc/iptables/services.j2 +++ b/roles/common/templates/etc/iptables/services.j2 @@ -15,3 +15,6 @@ in tcp {{ ansible_ssh_port|default('22') }} # SSH {% if 'MX' in group_names %} in tcp 25 # SMTP {% endif %} +{% if 'IMAP' in group_names %} +in tcp 993 # IMAPS +{% endif %} |