diff --git a/services/mailu/helmrelease.yaml b/services/mailu/helmrelease.yaml index 59d9bec8..2584291a 100644 --- a/services/mailu/helmrelease.yaml +++ b/services/mailu/helmrelease.yaml @@ -537,6 +537,8 @@ spec: $patch: delete - name: VAULT_ENV_FILE value: /vault/secrets/mailu-env.sh + - name: MAILU_POSTFIX_DISABLE_POSTLOG_UNIX_DGRAM + value: "true" volumeMounts: - name: mailu-vault-entrypoint mountPath: /entrypoint.sh diff --git a/services/mailu/scripts/vault-entrypoint.sh b/services/mailu/scripts/vault-entrypoint.sh index fa3b791e..924f05aa 100644 --- a/services/mailu/scripts/vault-entrypoint.sh +++ b/services/mailu/scripts/vault-entrypoint.sh @@ -31,4 +31,23 @@ if [ -n "${VAULT_COPY_FILES:-}" ]; then IFS="$old_ifs" fi +if [ -d /app/venv/bin ]; then + PATH="/app/venv/bin:$PATH" + export PATH +fi + +if [ "${MAILU_POSTFIX_DISABLE_POSTLOG_UNIX_DGRAM:-}" = "true" ]; then + mkdir -p /tmp/mailu-wrapper-bin + cat > /tmp/mailu-wrapper-bin/postfix <<'EOF' +#!/bin/sh +if [ "${1:-}" = "start-fg" ]; then + /usr/sbin/postconf -MX postlog/unix-dgram 2>/dev/null || true +fi +exec /usr/sbin/postfix "$@" +EOF + chmod 0755 /tmp/mailu-wrapper-bin/postfix + PATH="/tmp/mailu-wrapper-bin:$PATH" + export PATH +fi + exec "$@"