Commit | Line | Data |
---|---|---|
b042c1f1 | 1 | #! /usr/bin/env perl |
9ba4af2b PH |
2 | |
3 | # A test script that reads a message and resubmits it to Exim (having | |
4 | # notionally checked it - but there's no checking here). | |
5 | ||
6 | # The message is on the standard input. | |
7 | # The sender is in the first argument. | |
8 | # The recipients are comma separated in the second argument. | |
9 | # The number of the test is in the third argument - so we can call Exim | |
10 | # with the appropriate configuration file. | |
11 | ||
12 | ($sender,$recipients,$dir,$caller) = @ARGV; | |
13 | ||
14 | $cmd = | |
15 | "$dir/eximdir/exim -C $dir/test-config -DCALLER=$caller -DDIR=$dir " . | |
16 | "-DEXIM_PATH=$dir/eximdir/exim " . | |
17 | "-odi -oi -oMr scanned-ok -f $sender '$recipients'"; | |
18 | ||
19 | open(OUT, "|$cmd") || die "Failed to set up Exim process\n"; | |
20 | print OUT while (<STDIN>); | |
21 | close(OUT); | |
22 | ||
23 | # End |