mailu: fix postfix startup on rwx queue

This commit is contained in:
jenkins 2026-06-07 02:18:26 -03:00
parent 2b0e2764c6
commit 0532fe2634
2 changed files with 21 additions and 0 deletions

View File

@ -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

View File

@ -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 "$@"