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