fix(smtp): chmod quarantine dir before dropping to logrelay

The bind-mounted quarantine dir is owned by the host decnet user; the
logrelay process had no write access because the Dockerfile USER directive
pre-applied before the entrypoint could fix permissions.

Run entrypoint as root, chmod 0777 the quarantine dir, then exec the
server under logrelay via su.
This commit is contained in:
2026-04-30 12:25:37 -04:00
parent 8ae7b9636e
commit f0d47c5195
2 changed files with 12 additions and 2 deletions

View File

@@ -20,5 +20,6 @@ RUN useradd -r -s /bin/false -d /opt logrelay \
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD kill -0 1 || exit 1
USER logrelay
# Entrypoint runs as root so it can fix quarantine dir permissions before
# dropping to logrelay via su.
ENTRYPOINT ["/entrypoint.sh"]