Source: postfix
Version: 3.4.5-1
Severity: important

postfix uses an init script which tries to read /proc/*/exe to determine
whether the process is running.  If this file is not readable, or the
symlink cannot be dereferenced, then the init script always thinks
postfix is not running.  Consequently, attempts to restart postfix using
the init script fail.

This configuration occurs when running in a Docker container, because by
default containers lack the SYS_PTRACE capability.  Using a Docker
container to test Postfix configurations is therefore not possible with
the default init script[0].  Using systemd in a container is not a
viable approach because (at least as shipped in Debian) it hangs because
it cannot mount filesystems (which is also not allowed in containers).

Postfix should start, stop, restart, and provide status output correctly
when using the default init script in a container.

Steps to reproduce:

  docker run -it --rm debian:buster # (also works with debian:sid)

  # Inside the container:
  apt-get update
  DEBIAN_FRONTEND=noninteractive apt-get -y install postfix procps
  service postfix start
  service postfix status
  # Notice the above printed the following: "postfix is not running."
  ps ax | grep -v grep | grep postfix
  # Notice that that statement is clearly false.
  service postfix restart
  # Notice that it fails because "the Postfix mail system is already running".

[0] My particular use case is testing Postfix configurations with
Puppet, which will start and stop services, so the inability to restart
the service to apply new configurations is, well, limiting.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-rc5-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_WARN
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 /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature

Reply via email to