#!/bin/bash # Writes /etc/postfix/transport.sandbox from a temp file and runs postmap. # Usage: mailwolt-sandbox-sync set -e DEST="/etc/postfix/transport.sandbox" SRC="$1" if [[ -z "$SRC" || ! -f "$SRC" ]]; then echo "Usage: mailwolt-sandbox-sync " >&2 exit 1 fi cp "$SRC" "$DEST" chmod 644 "$DEST" postmap "$DEST"