From aca80d5890ef1ed561bbbf33c555bef93a1cea4b Mon Sep 17 00:00:00 2001 From: cjwatson <> Date: Thu, 5 Aug 2004 14:09:30 -0800 Subject: [PATCH] [project @ 2004-08-05 15:09:30 by cjwatson] Cope with empty Reply-To: header (#263741). --- scripts/process.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/process.in b/scripts/process.in index 8bc23501..267d77f9 100755 --- a/scripts/process.in +++ b/scripts/process.in @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: process.in,v 1.85 2004/02/27 02:05:17 cjwatson Exp $ +# $Id: process.in,v 1.86 2004/08/05 15:09:30 cjwatson Exp $ # # Usage: process nn # Temps: incoming/Pnn @@ -152,7 +152,14 @@ if (defined $header{'resent-from'} && !defined $header{'from'}) { $header{'from'} = $header{'resent-from'}; } defined($header{'from'}) || &quit("no From header"); -$replyto= defined($header{'reply-to'}) ? $header{'reply-to'} : $header{'from'}; + +$replyto = $header{'reply-to'}; +$replyto = '' unless defined $replyto; +$replyto =~ s/^ +//; +$replyto =~ s/ +$//; +unless (length $replyto) { + $replyto = $header{'from'}; +} $_= $replyto; $_= "$2 <$1>" if m/^([^\<\> \t\n\(\)]+) \(([^\(\)\<\>]+)\)$/; -- 2.39.5