diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2013-12-02 20:18:28 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:51:08 +0200 |
commit | 7d1622f3e5db18b40cab6cecfd3c2f1fab20d782 (patch) | |
tree | c5753fb80444467fe2fcb205e4d03595ff1412de /roles/common/templates/etc | |
parent | f2dc55cd77aae4e6e9c4258a64547a16a90ea579 (diff) |
Configure the IMAP server.
(For now, only LMTP and IMAP processes, without replication.)
Diffstat (limited to 'roles/common/templates/etc')
-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 @@ -44,20 +44,30 @@ maxretry = 2 enabled = true # pam-generic filter can be customized to monitor specific subset of 'tty's filter = pam-generic # port actually must be irrelevant but lets leave it all for some possible uses port = all banaction = iptables-allports port = anyport logpath = /var/log/auth.log maxretry = 6 {% if 'MX' in group_names %} [postfix] enabled = true port = smtp 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 @@ -1,17 +1,20 @@ # {{ ansible_managed }} # Do NOT edit this file directly! # # direction protocol destination port source port # (in|out|inout)[46]? (tcp|udp|..) (port|port:port|port,port) (port|port:port|port,port) inout udp 500 500 # ISAKMP #inout udp 4500 4500 # IPSec NAT Traversal out tcp 80,443 # HTTP/HTTPS out udp 53 # DNS out udp 67 # DHCP 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 %} |