@@ -5,6 +5,10 @@ services:
build: .
image: fphammerle/postfix
ports: ['127.0.0.1:25:25']
+ environment:
+ POSTMAP_PATHS: |
+ /etc/postfix/edit-docker-compose.yml
+ /etc/postfix/replace-me
security_opt: [no-new-privileges]
restart: unless-stopped
@@ -1,6 +1,12 @@
#!/bin/sh
-set -ex
+set -e
+
+echo "$POSTMAP_PATHS" | while IFS= read -r postmap_path; do
+ [ -z "$postmap_path" ] || (set -x; postmap "$postmap_path")
+done
+set -x
# http://www.postfix.org/postconf.5.html#alias_database
# http://www.postfix.org/newaliases.1.html