diff options
author | Bruce Guenter <bruce@untroubled.org> | 2017-03-01 09:49:48 -0600 |
---|---|---|
committer | Bruce Guenter <bruce@untroubled.org> | 2017-03-01 09:49:48 -0600 |
commit | babec3b1054a370b18fd156b1a60490bd952783e (patch) | |
tree | 82c7f36684380e70e0760deb356e554075322f15 /test/tests | |
parent | 541e456a6ba31ecc39c1e19c3121f81d8f6da26f (diff) |
nullmailer-inject: Drop leading "From " lines
This fixes problems with some broken mail senders that mistakenly add
them. Patch suggested by Sebastian Wiedenroth <wiedi@frubar.net>
Diffstat (limited to 'test/tests')
-rw-r--r-- | test/tests/inject/from_ | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/tests/inject/from_ b/test/tests/inject/from_ new file mode 100644 index 0000000..33e973b --- /dev/null +++ b/test/tests/inject/from_ @@ -0,0 +1,10 @@ +. functions + +injectfrom() { injectlines "${1}From somebody" "Subject: test1" "To: nowhere"; } + +for lead in '' '>' +do + echo "Checking that inject ignores a leading \"${lead}From \" line" + injectfrom "$lead" | egrep -qv '^>?From ' + injectfrom "$lead" | head -n 1 | grep -q '^Subject:' +done |