blob: 828af13e618b5acd6b798eb241cb74a3ed7a50ab (
plain)
- #!/bin/sh
- set -e
- basedir="$(dirname "$0")/.."
- domains="$(cat "$basedir/realms" | sed 's/#.*//')"
- exit1() {
- response="${1:+Error: }${1:-Internal error!}"
- echo "$response"
- exit 1
- }
- for domain in $domains; do
- [ -r "$basedir/$domain/mailnetworks" ] || exit1 "Could not read input file $basedir/$domain/mailnetworks"
- done
- echo '' > "$basedir/postfix/permit_mx_backup_networks"
- for domain in $domains; do
- cat "$basedir/$domain/mailnetworks" >> "$basedir/postfix/permit_mx_backup_networks"
- done
|