masqmail-0.2
annotate tests/hostname-stdin/test.tpl @ 179:ec3fe72a3e99
Fixed an important bug with folded headers!
g_strconcat() returns a *copy* of the string, but hdr->value still
pointed to the old header (which probably was a memory leak, too).
If the folded part had been quite small it was likely that the new
string was at the same position as the old one, thus making everything
go well. But if pretty long headers were folded several times it was
likely that the new string was allocated somewhere else in memory,
thus breaking things. In result mails to lots of recipients (folded
header) were frequently only sent to the ones in the first line. Sorry
for the inconvenience.
author | meillo@marmaro.de |
---|---|
date | Fri, 03 Jun 2011 09:52:17 +0200 |
parents | 0379789a847b |
children |
rev | line source |
---|---|
meillo@64 | 1 #!/bin/sh |
meillo@0 | 2 |
meillo@64 | 3 # path to the masqmail executable |
meillo@63 | 4 mm_bin=../../src/masqmail |
meillo@0 | 5 |
meillo@0 | 6 hfrom="\"Fritz Meier\" <`logname`@RECV_HOST>" |
meillo@63 | 7 hto="$hfrom" |
meillo@0 | 8 to=`logname`@RECV_HOST |
meillo@68 | 9 hsubject="Masqmail test: hostname-stdin" |
meillo@0 | 10 |
meillo@63 | 11 |
meillo@0 | 12 # Testing with rcpt on cmd line |
meillo@0 | 13 # (dot does end) |
meillo@0 | 14 # |
meillo@0 | 15 # the command to be run: |
meillo@0 | 16 cmd="$mm_bin -C ./test.conf $to" |
meillo@0 | 17 |
meillo@0 | 18 $cmd <<EOF |
meillo@0 | 19 From: $hfrom |
meillo@0 | 20 To: $hto |
meillo@0 | 21 Subject: $hsubject |
meillo@0 | 22 |
meillo@0 | 23 Hallo Fritz! |
meillo@0 | 24 .. |
meillo@0 | 25 there is a dot above (Yes, one and not two). |
meillo@0 | 26 |
meillo@0 | 27 command was: $cmd |
meillo@0 | 28 |
meillo@0 | 29 Fritz |
meillo@0 | 30 . |
meillo@0 | 31 |
meillo@0 | 32 EOF |
meillo@0 | 33 |
meillo@64 | 34 |
meillo@0 | 35 # Testing with rcpt on cmd line with -oi option |
meillo@0 | 36 # (dot does not end) |
meillo@0 | 37 # |
meillo@0 | 38 # the command to be run: |
meillo@0 | 39 cmd="$mm_bin -C ./test.conf -oi $to" |
meillo@0 | 40 |
meillo@0 | 41 $cmd <<EOF |
meillo@0 | 42 From: $hfrom |
meillo@0 | 43 To: $hto |
meillo@0 | 44 Subject: $hsubject |
meillo@0 | 45 |
meillo@0 | 46 Hallo Fritz! |
meillo@0 | 47 . |
meillo@0 | 48 there is a dot above. |
meillo@0 | 49 |
meillo@0 | 50 command was: $cmd |
meillo@0 | 51 |
meillo@0 | 52 Fritz |
meillo@0 | 53 |
meillo@0 | 54 EOF |
meillo@0 | 55 |
meillo@64 | 56 |
meillo@0 | 57 # Testing with rcpt read from headers (-t option) |
meillo@0 | 58 # (dot does end) |
meillo@0 | 59 # |
meillo@0 | 60 # the command to be run: |
meillo@0 | 61 cmd="$mm_bin -C ./test.conf -t" |
meillo@0 | 62 |
meillo@0 | 63 $cmd <<EOF |
meillo@0 | 64 From: $hfrom |
meillo@0 | 65 To: $hto |
meillo@0 | 66 Subject: $hsubject |
meillo@0 | 67 |
meillo@0 | 68 Hallo Fritz! |
meillo@0 | 69 .. |
meillo@0 | 70 there is a dot above. |
meillo@0 | 71 |
meillo@0 | 72 command was: $cmd |
meillo@0 | 73 |
meillo@0 | 74 Fritz |
meillo@0 | 75 . |
meillo@0 | 76 |
meillo@0 | 77 EOF |