X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/059ec3d9952740285fb1ebf47961b8aca2eb1b4a..17792b53d16f2061cb7350001e81c995bac6a9eb:/src/src/exinext.src diff --git a/src/src/exinext.src b/src/src/exinext.src index c942120b0..80d636972 100644 --- a/src/src/exinext.src +++ b/src/src/exinext.src @@ -1,5 +1,5 @@ #! /bin/sh -# $Cambridge: exim/src/src/exinext.src,v 1.1 2004/10/07 10:39:01 ph10 Exp $ +# $Cambridge: exim/src/src/exinext.src,v 1.4 2009/10/30 15:14:04 nm4 Exp $ # Copyright (c) 1996-2004 University of Cambridge. # See the file NOTICE for conditions of use and distribution. @@ -26,16 +26,16 @@ config= eximmacdef= exim_path= -if expr $1 : '\-' >/dev/null ; then - while expr $1 : '\-' >/dev/null ; do +if expr -- $1 : '\-' >/dev/null ; then + while expr -- $1 : '\-' >/dev/null ; do if [ "$1" = "-C" ]; then config=$2 shift shift - elif expr $1 : '\-D' >/dev/null ; then + elif expr -- $1 : '\-D' >/dev/null ; then eximmacdef="$eximmacdef $1" - if expr $1 : '\-DEXIM_PATH=' >/dev/null ; then - exim_path=`expr $1 : '\-DEXIM_PATH=\(.*\)'` + if expr -- $1 : '\-DEXIM_PATH=' >/dev/null ; then + exim_path=`expr -- $1 : '\-DEXIM_PATH=\(.*\)'` fi shift else @@ -65,9 +65,9 @@ if [ "$config" = "" ]; then # suffixed file in each case. set `awk -F: '{ for (i = 1; i <= NF; i++) print $i }' <||" exit 1 fi -perl - $exim_path "$eximmacdef" $argone $spool_directory $qualify_domain <<'End' +perl - $exim_path "$eximmacdef" $argone $spool_directory $qualify_domain $config <<'End' # Name the arguments @@ -122,6 +123,7 @@ perl - $exim_path "$eximmacdef" $argone $spool_directory $qualify_domain <<'End' $subject = $ARGV[2]; $spool = $ARGV[3]; $qualify = $ARGV[4]; + $config = $ARGV[5]; # If the subject doesn't contain an @ then construct an address # for the domain, and ensure that in both cases the domain is @@ -133,7 +135,7 @@ perl - $exim_path "$eximmacdef" $argone $spool_directory $qualify_domain <<'End' # Run Exim to get a list of hosts for the given domain; for # each one construct the appropriate retry key. - open(LIST, "$exim -v -bt $address |") || + open(LIST, "$exim -C $config -v -bt $address |") || die "can't run exim to route $address"; while ()