Package: fail2ban
Version: 0.9.6-2
Severity: normal
Tags: upstream patch

Dear Maintainer,

fail2ban typically send emails on exit to inform about all stopped
jails. This is done by running sendmail or mail. When fail2ban.service
is stopped by systemd, it kills remaining processes in the cgroup after
the main process has exited. This can abort ongoing transfers of
outgoing mail.

In my case (running exim4), this lead to emails that were delivered
multiple times: Since exim4 was killed during mail transfer, mails
remained in the queue even if the transmission was already complete.
Mails then got resent from the queue by the running exim4 daemon.

As a workaround, "KillMode=none" can be added to fail2ban.service. I'm
not sure if this is the best solution for the problem. Since upstream
provides a similar service file, this bug may apply to upstream as well.

(Please ignore the broken debsums on
/lib/systemd/system/fail2ban.service as I temporarily implemented the
workaround directly in that file)


-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.27-x86_64-jb1 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages fail2ban depends on:
ii  init-system-helpers  1.48
ii  lsb-base             9.20161125
ii  python3              3.5.3-1

Versions of packages fail2ban recommends:
ii  iptables           1.6.0+snapshot20161117-6
ii  python             2.7.13-2
ii  python3-pyinotify  0.9.6-1
ii  python3-systemd    233-1
ii  whois              5.2.15

Versions of packages fail2ban suggests:
ii  mailutils [mailx]            1:3.1.1-1
pn  monit                        <none>
ii  rsyslog [system-log-daemon]  8.24.0-1

-- no debconf information

-- debsums errors found:
debsums: changed file /lib/systemd/system/fail2ban.service (from fail2ban 
package)

Reply via email to