#!/bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin tmpdir=/tmp/amavis-test.$$ /bin/rm -f amavis.log debug from="${USER:-amavis-test}@${HOST:-`hostname`}" to="$from" if [ -f ./amavisd-test ]; then AMAVIS="../amavis/amavis" SCRIPT="./amavisd-test" xhdr=`sed -n 's/^$X_HEADER_TAG = "\([^"]*\).*$/\1/p' ./amavisd.conf`: mta=`sed -n 's/^#.*for amavisd with \([^ ]*\)$/\1/p' ./amavisd.conf` else AMAVIS="./amavis-test" SCRIPT="$AMAVIS" xhdr=`sed -n 's/^$X_HEADER_TAG = "\([^"]*\).*$/\1/p' ${SCRIPT}`: mta=`sed -n 's/^.*command line parsing, \([^ ]*\) .*$/\1/p' ${SCRIPT}` fi # for testing, only the number of cmd line args is of importance case "$mta" in exim) args="-f $from -d $to" ;; libmilter) args="$tmpdir $from $to" /bin/rm -rf $tmpdir (umask 077 && mkdir $tmpdir) || exit 1 ;; postfix) args="$from $to" ;; sendmail) args="$from $to arg3 arg4" ;; *) echo "$mta currently not supported by test suite!" exit 1 ;; esac