From 09f632a7c9e4eea0a02c7ec0f66c8a2f9b10aed7 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Mon, 18 Apr 2016 09:13:15 +0200 Subject: [PATCH] Enable addr decoding in replcomps and replgroupcomps --- etc/rcvdistcomps | 2 +- etc/replcomps | 4 +-- etc/replgroupcomps | 6 ++-- test/tests/repl/test-decode-addr | 71 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 test/tests/repl/test-decode-addr diff --git a/etc/rcvdistcomps b/etc/rcvdistcomps index f5cc117..3d1fd71 100644 --- a/etc/rcvdistcomps +++ b/etc/rcvdistcomps @@ -1,2 +1,2 @@ %(lit)%(formataddr{addresses})\ -%<(nonnull)%(void(width))%(putaddr Resent-To: )\n%> +%<(nonnull)%(void(width))%(void(decode))%(putaddr Resent-To: )\n%> diff --git a/etc/replcomps b/etc/replcomps index 87532ba..5c98142 100644 --- a/etc/replcomps +++ b/etc/replcomps @@ -11,14 +11,14 @@ %(formataddr{prev-resent-to})\ %(formataddr{x-to})\ %(formataddr{apparently-to})\ -%(void(width))%(putaddr To: ) +%(void(width))%(void(decode))%(putaddr To: ) %(lit)%(formataddr{to})\ %(formataddr{cc})\ %(formataddr{x-cc})\ %(formataddr{resent-cc})\ %(formataddr{prev-resent-cc})\ %(formataddr(me))\ -%(void(width))%(putaddr Cc: ) +%(void(width))%(void(decode))%(putaddr Cc: ) Fcc: +sent Subject: %<{subject}Re: %(void{subject})%(trim)%(decode)%> %; diff --git a/etc/replgroupcomps b/etc/replgroupcomps index ae55a7b..ffbe6ff 100644 --- a/etc/replgroupcomps +++ b/etc/replgroupcomps @@ -21,12 +21,12 @@ %; personal address %; %(lit)%(formataddr{mail-followup-to})\ -%<(nonnull)%(void(width))%(putaddr To: )\n\ +%<(nonnull)%(void(width))%(void(decode))%(putaddr To: )\n\ %|\ %(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)\ -%<(nonnull)%(void(width))%(putaddr To: )\n%>\ +%<(nonnull)%(void(width))%(void(decode))%(putaddr To: )\n%>\ %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\ -%<(nonnull)%(void(width))%(putaddr Cc: )\n%>%>\ +%<(nonnull)%(void(width))%(void(decode))%(putaddr Cc: )\n%>%>\ %; Fcc: +sent Subject: %<{subject}Re: %(void{subject})%(trim)%(decode)%> diff --git a/test/tests/repl/test-decode-addr b/test/tests/repl/test-decode-addr new file mode 100644 index 0000000..145957c --- /dev/null +++ b/test/tests/repl/test-decode-addr @@ -0,0 +1,71 @@ +#!/bin/sh +###################################################### +# +# Test that repl and repl -g decode recipient addrs +# +###################################################### + +. "$MH_TEST_COMMON" + + +# create message to reply to + +msgfile=`mhpath b +inbox` +cat >"$msgfile" < +To: bob@example.com +Cc: =?UTF-8?Q?K=C3=A4the?= +Subject: repl addr decode +Date: Mon, 18 Apr 2016 08:36:14 +0200 +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Message-ID: <1as2n8-1Q9-00@deseo.home.schnalke.org> + +foo +EOF + + +# create the reply draft +runandcheck 'repl -nocc all -whatnow true l +inbox' < +Cc: +Fcc: +sent +Subject: Re: repl addr decode +In-reply-to: <1as2n8-1Q9-00@deseo.home.schnalke.org> +References: <1as2n8-1Q9-00@deseo.home.schnalke.org> +Comments: In-reply-to Jürgen + message dated "Mon, 18 Apr 2016 08:36:14 +0200." +-------- +[2016-04-18 08:36] Jürgen +> +> part text/plain 4 +> foo +! + + + +# create the group reply draft +runandcheck 'repl -group -nocc me -whatnow true l +inbox' < +Cc: bob@example.com, Käthe +Fcc: +sent +Subject: Re: repl addr decode +In-reply-to: <1as2n8-1Q9-00@deseo.home.schnalke.org> +References: <1as2n8-1Q9-00@deseo.home.schnalke.org> +Comments: In-reply-to Jürgen + message dated "Mon, 18 Apr 2016 08:36:14 +0200." +-------- +[2016-04-18 08:36] Jürgen +> +> part text/plain 4 +> foo +! + -- 1.7.10.4