1
0

postfix.sh 464 B

123456789101112131415161718
  1. #!/bin/sh
  2. set -e
  3. echo "$POSTMAP_PATHS" | while IFS= read -r postmap_path; do
  4. # by default, postmap runs setresuid(file owner).
  5. # disable via -o cause file owner might not have write perms on dir
  6. # (e.g., due to dockerd --userns-remap).
  7. [ -z "$postmap_path" ] || (set -x; postmap -o "$postmap_path")
  8. done
  9. set -x
  10. # http://www.postfix.org/postconf.5.html#alias_database
  11. # http://www.postfix.org/newaliases.1.html
  12. newaliases
  13. exec postfix start-fg