summaryrefslogtreecommitdiff
path: root/test/aux-fixed/resubmit
blob: 6c47db2859f0f7ef8046761001ea2eb8737493b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /usr/bin/env perl

# A test script that reads a message and resubmits it to Exim (having 
# notionally checked it - but there's no checking here).

# The message is on the standard input.
# The sender is in the first argument.
# The recipients are comma separated in the second argument.
# The number of the test is in the third argument - so we can call Exim
# with the appropriate configuration file.

($sender,$recipients,$dir,$caller) = @ARGV;

$cmd = 
  "$dir/eximdir/exim -C $dir/test-config -DCALLER=$caller -DDIR=$dir " .
  "-DEXIM_PATH=$dir/eximdir/exim " . 
  "-odi -oi -oMr scanned-ok -f $sender '$recipients'";

open(OUT, "|$cmd") || die "Failed to set up Exim process\n";
print OUT while (<STDIN>);
close(OUT);

# End