This repository has been archived on 2021-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
mail/postfix/scripts/map-virtual.sh
2019-03-30 23:17:59 +00:00

8 lines
300 B
Bash
Executable file

#!/bin/sh
if [ "$1" == "c" ] && [ "$2" == "/etc/postfix/aliases.d/" ] && [ "$3" == "virtual" ]; then
cp /etc/postfix/aliases.d/virtual /etc/postfix/virtual
chown root:root /etc/postfix/virtual
postmap /etc/postfix/virtual
echo "$(date +"%b %d %H:%M:%H"): remapped virtual aliases"
fi