[TASK] Run Postfix with the fewest privileges it needs

Offen
#485 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Aravinda-HWK arbeitet bereits daran.

Seit 30.11.2026.

  • #491 von @Aravinda-HWK — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

security
What needs to be done?

Run Postfix with the fewest privileges it needs.

Current state

  • Trivy reports DS-0002 on services/smtp/Dockerfile, because the image has no USER and runs as root.
  • The chart runs Postfix as UID 0 with the runtime's default capabilities plus NET_BIND_SERVICE.

Postfix can't run without root: its master and postfix commands exit with "reserved for the superuser" unless they start as root. They then drop privileges themselves, running their daemons as the postfix user, mostly in a chroot. So DS-0002 can't be fixed. What we can do is reduce what root inside the container is allowed to do.

Tasks

  1. Drop all capabilities and add back only those Postfix needs, such as SETUID, SETGID, CHOWN, DAC_OVERRIDE, FOWNER, SYS_CHROOT, KILL and NET_BIND_SERVICE. Find the exact set by testing.
  2. Accept DS-0002 in .trivyignore with the reason, a link to this issue and an expiry date.
  3. Check that mail is received on 25 and 587 and delivered to Raven, in the kind CI job and on a test server.
Vorherrschende Sprache
Shell
Sterne
13
Forks
12
Ø Merge
1 T. 2 Std.
Gemergte PRs (30 T.)
56

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus OpenGovMail/OpenGovMail

Alle Issues in OpenGovMail/OpenGovMail

Ähnliche Issues

Weitere Issues zu Shell/Bash

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.