#!/bin/sh # =================================================== # file ~/.genplist/postfix # # additional genplist replacements for postfix # =================================================== TMPF=${1}.$$ # SMTP/LMTP test server and generator sed -i '' -E -e "s|^(bin/qmqp-sink)|%%TEST%%\1|g" \ -e "s|^(bin/qmqp-source)|%%TEST%%\1|g" \ -e "s|^(bin/smtp-sink)|%%TEST%%\1|g" \ -e "s|^(bin/smtp-source)|%%TEST%%\1|g" ${1} # postfix config files cat > ${TMPF} << _EOH @unexec if cmp -s %D/libexec/postfix/main.cf %%PFETC%%/main.cf; then rm -f %%PFETC%%/main.cf; fi @unexec if cmp -s %D/libexec/postfix/master.cf %%PFETC%%/master.cf; then rm -f %%PFETC%%/master.cf; fi _EOH cat ${1} >> ${TMPF} mv ${TMPF} ${1}