about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-04-03 21:27:11 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-04-03 21:31:02 +0200
commit8c8a4bd4227c7b8034f4d120e681c8edd2807adc (patch)
treebcf9a5c01d7126a2bec5a52f0e25c968996d6b95
parentd50bb5772a702359bdec40aefb05ace9f1226389 (diff)
downloadmblaze-8c8a4bd4227c7b8034f4d120e681c8edd2807adc.tar.gz
mblaze-8c8a4bd4227c7b8034f4d120e681c8edd2807adc.tar.xz
mblaze-8c8a4bd4227c7b8034f4d120e681c8edd2807adc.zip
blaze822: blaze822_addr: ignore leading obs-route
-rw-r--r--blaze822.c2
-rwxr-xr-xt/1500-maddr.t4
2 files changed, 4 insertions, 2 deletions
diff --git a/blaze822.c b/blaze822.c
index 855a5f1..6a5c305 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -241,7 +241,7 @@ blaze822_addr(char *s, char **dispo, char **addro)
 					}
 					if (*s == '"')
 						s++;
-				} else if (*s == '<') {
+				} else if (*s == '<' || *s == ':') {
 					c = tok;
 					s++;
 				} else {
diff --git a/t/1500-maddr.t b/t/1500-maddr.t
index 0f0ca06..f745f7d 100755
--- a/t/1500-maddr.t
+++ b/t/1500-maddr.t
@@ -1,7 +1,7 @@
 #!/bin/sh -e
 cd ${0%/*}
 . ./lib.sh
-plan 10
+plan 11
 
 rm -rf test.dir
 mkdir test.dir
@@ -12,6 +12,7 @@ mkdir -p "inbox/cur"
 
 cat <<! | mmime >"inbox/cur/1:2,"
 From: Rajwinder Kaur <rajwinder@example.com>
+Obs-Test: Rajwinder Kaur <@example.org:rajwinder@example.com>
 Subject: namaste
 Date: Thu, 30 Mar 2017 15:42:05 +0200
 Message-Id: <EOH1F3NUOY.2KBVMHSBFATNY@example.org>
@@ -66,6 +67,7 @@ export MAILSEQ=seq
 
 check_same 'from one' 'maddr 1' 'echo "Rajwinder Kaur <rajwinder@example.com>"'
 check_same 'from address' 'maddr -a 1' 'echo "rajwinder@example.com"'
+check_same 'from one' 'maddr -h obs-test 1' 'echo "Rajwinder Kaur <rajwinder@example.com>"'
 
 cat <<! >expect
 имярек <имярек@example.com>