Skip to content

Commit

Permalink
Changed config volume to overrides volume
Browse files Browse the repository at this point in the history
  • Loading branch information
jkarlosb committed Aug 2, 2016
1 parent 0bf53d0 commit efff62c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Expand Up @@ -47,7 +47,7 @@ services:
volumes:
- /freeposte/freeposte:/data
- /freeposte/certs:/certs
- /freeposte/config/postfix:/config
- /freeposte/overrides:/overrides

milter:
build: rmilter
Expand Down
14 changes: 7 additions & 7 deletions postfix/start.sh
Expand Up @@ -6,25 +6,25 @@ for VARIABLE in `env | cut -f1 -d=`; do
done

# Override Postfix configuration
if [ -f /config/main.cf ]; then
if [ -f /overrides/postfix.cf ]; then
while read line; do
postconf -e "$line"
done < /config/main.cf
echo "Loaded 'config/main.cf'"
done < /overrides/postfix.cf
echo "Loaded '/overrides/postfix.cf'"
else
echo "No extra postfix settings loaded because optional '/config/main.cf' not provided."
echo "No extra postfix settings loaded because optional '/overrides/postfix.cf' not provided."
fi

# Include table-map files
if ls -A /config/*.map 1> /dev/null 2>&1; then
cp /config/*.map /etc/postfix/
if ls -A /overrides/*.map 1> /dev/null 2>&1; then
cp /overrides/*.map /etc/postfix/
postmap /etc/postfix/*.map
rm /etc/postfix/*.map
chown root:root /etc/postfix/*.db
chmod 0600 /etc/postfix/*.db
echo "Loaded 'map files'"
else
echo "No extra map files loaded because optional '/config/*.map' not provided."
echo "No extra map files loaded because optional '/overrides/*.map' not provided."
fi

# Actually run Postfix
Expand Down

0 comments on commit efff62c

Please sign in to comment.