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