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.
13 lines
398 B
Bash
13 lines
398 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Fix quarantine dir permissions before dropping privileges — the dir is
|
|
# bind-mounted from the host (owned by the decnet user) and must be writable
|
|
# by the logrelay process inside the container.
|
|
if [ -n "$SMTP_QUARANTINE_DIR" ]; then
|
|
mkdir -p "$SMTP_QUARANTINE_DIR"
|
|
chmod 0777 "$SMTP_QUARANTINE_DIR"
|
|
fi
|
|
|
|
exec su -s /bin/sh logrelay -c "exec python3 /opt/server.py"
|