From 75e40cf10185c8b7d69ee0e01727655a2965250f Mon Sep 17 00:00:00 2001 From: joy <> Date: Fri, 6 Oct 2000 21:49:57 -0800 Subject: [PATCH] [project @ 2000-10-06 22:49:57 by joy] handle case where Reply-To: header exists but contains only whitespace or nothing --- scripts/service.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/service.in b/scripts/service.in index 931cc283..87576fe1 100755 --- a/scripts/service.in +++ b/scripts/service.in @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# $Id: service.in,v 1.17 2000/10/06 20:31:46 joy Exp $ +# $Id: service.in,v 1.18 2000/10/06 22:49:57 joy Exp $ # # Usage: service .nn # Temps: incoming/P.nn @@ -55,7 +55,12 @@ for ($i=0; $i<=$#msg; $i++) } defined($header{'from'}) || &quit("no From header"); -$replyto= defined($header{'reply-to'}) ? $header{'reply-to'} : $header{'from'}; +delete $header{'reply-to'} if ( defined($header{'reply-to'}) && $header{'reply-to'} =~ m/^\s*$/ ); +if ( defined($header{'reply-to'}) && $header{'reply-to'} ne "" ) { + $replyto = $header{'reply-to'}; +} else { + $replyto = $header{'from'}; +} $controlrequestaddr= $control ? "control\@$gEmailDomain" : "request\@$gEmailDomain"; $transcript=''; -- 2.39.5