meillo@64: #!/bin/sh
meillo@0: 
meillo@64: # path to the masqmail executable
meillo@63: mm_bin=../../src/masqmail
meillo@0: 
meillo@64: 
meillo@63: hfrom="\"Fritz Meier\" <`logname`@localhost>"
meillo@0: hto=$hfrom
meillo@63: to=`logname`@localhost
meillo@64: hsubject="Masqmail test: localhost-stdin"
meillo@0: 
meillo@64: 
meillo@0: # Testing with rcpt on cmd line
meillo@0: # (dot does end)
meillo@0: #
meillo@0: # the command to be run:
meillo@0: cmd="$mm_bin -C ./test.conf $to"
meillo@0: 
meillo@0: $cmd <<EOF
meillo@0: From: $hfrom
meillo@0: To: $hto
meillo@0: Subject: $hsubject
meillo@0: 
meillo@0: Hallo Fritz!
meillo@0: ..
meillo@0: there is a dot above (Yes, one and not two).
meillo@0: 
meillo@0: command was: $cmd
meillo@0: 
meillo@0: Fritz
meillo@0: .
meillo@0: 
meillo@0: EOF
meillo@0: 
meillo@64: 
meillo@0: # Testing with rcpt on cmd line with -oi option
meillo@0: # (dot does not end)
meillo@0: #
meillo@0: # the command to be run:
meillo@0: cmd="$mm_bin -C ./test.conf -oi $to"
meillo@0: 
meillo@0: $cmd <<EOF
meillo@0: From: $hfrom
meillo@0: To: $hto
meillo@0: Subject: $hsubject
meillo@0: 
meillo@0: Hallo Fritz!
meillo@0: .
meillo@0: there is a dot above.
meillo@0: 
meillo@0: command was: $cmd
meillo@0: 
meillo@0: Fritz
meillo@0: 
meillo@0: EOF
meillo@0: 
meillo@64: 
meillo@0: # Testing with rcpt read from headers (-t option)
meillo@0: # (dot does end)
meillo@0: #
meillo@0: # the command to be run:
meillo@0: cmd="$mm_bin -C ./test.conf -t"
meillo@0: 
meillo@0: $cmd <<EOF
meillo@0: From: $hfrom
meillo@0: To: $hto
meillo@0: Subject: $hsubject
meillo@0: 
meillo@0: Hallo Fritz!
meillo@0: ..
meillo@0: there is a dot above.
meillo@0: 
meillo@0: command was: $cmd
meillo@0: 
meillo@0: Fritz
meillo@0: .
meillo@0: 
meillo@0: EOF