projects
/
fail2ban-cn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- lintian fixevi
[fail2ban-cn.git]
/
debian
/
postinst
diff --git
a/debian/postinst
b/debian/postinst
index
9bd5843
..
ea2b57b
100755
(executable)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-33,11
+33,23
@@
esac
CONF=/etc/fail2ban/jail.conf
if [ -e "$CONF" ]; then
CONF=/etc/fail2ban/jail.conf
if [ -e "$CONF" ]; then
- # enable ssh and pam-generic services
- perl -ne 'if (/\[(ssh|pam-generic)\]/ .. /enabled/) { $_ =~ s/enabled = false/enabled = true/gi }; print $_' "$CONF" > "$CONF.$$" && \
+ # enable ssh, pam-generic, sasl, proftpd and vsftpd service
+ perl -ne 'if (/\[(ssh|pam-generic|sasl|proftpd|vsftpd)\]/ .. /enabled/) { $_ =~ s/enabled = false/enabled = true/gi }; print $_' "$CONF" > "$CONF.$$" && \
cp_mv "$CONF.$$" "$CONF"
rm -f "$CONF.$$"
cp_mv "$CONF.$$" "$CONF"
rm -f "$CONF.$$"
+ # enable dovecot service
+ cp-update fail2ban-cn "$CONF.$$" <<EOF
+[dovecot]
+
+enabled = true
+port = 110,143
+protocol = tcp
+filter = dovecot
+logpath = /var/log/mail.log
+EOF
+ cp_mv "$CONF.$$" "$CONF"
+
# add network address and class if needed
cp_get_netaddr || true
NETADDR="$RET"
# add network address and class if needed
cp_get_netaddr || true
NETADDR="$RET"