0
|
1 #! /bin/bash
|
|
2
|
|
3 # should be run from within tests dir
|
|
4 # set if you move this:
|
|
5 mm_src_dir=../src
|
|
6 mm_bin=$mm_src_dir/masqmail
|
|
7
|
|
8 #
|
|
9 hfrom="\"Fritz Meier\" <`logname`@RECV_HOST>"
|
|
10 hto=$hfrom
|
|
11 to=`logname`@RECV_HOST
|
|
12 hsubject="MasqMail stdin Test"
|
|
13
|
|
14 #
|
|
15 # Testing with rcpt on cmd line
|
|
16 # (dot does end)
|
|
17 #
|
|
18 # the command to be run:
|
|
19 cmd="$mm_bin -C ./test.conf $to"
|
|
20
|
|
21 $cmd <<EOF
|
|
22 From: $hfrom
|
|
23 To: $hto
|
|
24 Subject: $hsubject
|
|
25
|
|
26 Hallo Fritz!
|
|
27
|
|
28 ..
|
|
29 there is a dot above (Yes, one and not two).
|
|
30
|
|
31 command was: $cmd
|
|
32
|
|
33 Fritz
|
|
34 .
|
|
35
|
|
36 EOF
|
|
37
|
|
38 #
|
|
39 # Testing with rcpt on cmd line with -oi option
|
|
40 # (dot does not end)
|
|
41 #
|
|
42 # the command to be run:
|
|
43 cmd="$mm_bin -C ./test.conf -oi $to"
|
|
44
|
|
45 $cmd <<EOF
|
|
46 From: $hfrom
|
|
47 To: $hto
|
|
48 Subject: $hsubject
|
|
49
|
|
50 Hallo Fritz!
|
|
51 .
|
|
52 there is a dot above.
|
|
53
|
|
54 command was: $cmd
|
|
55
|
|
56 Fritz
|
|
57
|
|
58 EOF
|
|
59
|
|
60 #
|
|
61 # Testing with rcpt read from headers (-t option)
|
|
62 # (dot does end)
|
|
63 #
|
|
64 # the command to be run:
|
|
65 cmd="$mm_bin -C ./test.conf -t"
|
|
66
|
|
67 $cmd <<EOF
|
|
68 From: $hfrom
|
|
69 To: $hto
|
|
70 Subject: $hsubject
|
|
71
|
|
72 Hallo Fritz!
|
|
73 ..
|
|
74 there is a dot above.
|
|
75
|
|
76 command was: $cmd
|
|
77
|
|
78 Fritz
|
|
79 .
|
|
80
|
|
81 EOF
|