Great Circle Associates Majordomo-Users
(September 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: return receipts to a list
From: dwolfe @ risc . sps . mot . com (Dave Wolfe)
Date: Fri, 8 Sep 1995 09:08:56 -0500 (CDT)
To: uunet!euler.math.USMA.EDU!ae6244
Cc: majordomo-users @ greatcircle . com (Majordomo user's mailing list), majordomo-workers @ greatcircle . com (Majordomo developer's mailing list), cwilson @ snarf . engr . sgi . com (Chan Wilson)
In-reply-to: <9509081315.AA14721@euler.math.usma.edu> from "Markert Erich Mr." at Sep 8, 95 09:15:51 am
Reply-to: David Wolfe <david_wolfe @ risc . sps . mot . com>

[ Markert Erich Mr. writes: ]
> 
> I found a nasty little bug in the resend code that prevents
> RCPT subjects from being properly handled.  In the check
> for administrivia requests portion of resend the code is:
> 
> 	/^subject:\s*RCPT:\b/ ||
> 
> [...] I removed the colon after RCPT and made another small change so
> that the regular expression looks like:
> 
> 	/^subject:\s*RCPT\b/i ||
> 
> Viola!  It now works.

Erich posted his observation before I could reply to his previous
message, but let me add my $.02 worth...

He was right about the 'i' modifier, the match needs to be case
insensitive since the subject header is usually spelled "Subject",
but the other bug is that ':' is already a "non-word" character
(non-alphanumeric), so unless it's immediately followed by an
alphanumeric character, the '\b' fails to match, i.e. if the colon is
followed by a space (another non-word character), there is no word
boundary between them and the '\b' (word boundary meta-(non)character)
fails to match. Removing either the ':' or the '\b' from the regexp
works, but I think it's safer to match the ':' explicitly and forget
about what follows it.

Therefore I'm submitting the following patch to resend to correct such
problems (if some of the match strings *must* match in upper-case, i.e.
RCPT, then the fix is going to have to take a different approach because
the "subject:" part of the match is case insensitive):

*** resend.orig	Wed Mar  1 08:43:24 1995
--- resend	Fri Sep  8 08:58:30 1995
***************
*** 206,218 ****
  		       && (/^subject:\s*subscribe\b/i ||
  			   /^subject:\s*unsubscribe\b/i ||
  			   /^subject:\s*help\b/i ||
! 			   /^subject:\s*RCPT:\b/ ||
! 			   /^subject:\s*Delivery Confirmation\b/ ||
! 			   /^subject:\s*NON-DELIVERY of:/ ||
! 			   /^subject:\s*Undeliverable Message\b/ ||
! 			   /^subject:\s*Receipt Confirmation\b/ ||
! 			   /^subject:\s*Failed mail\b/ ||
! 			   /^subject:\s.*\bchange\b.*\baddress\b/ ||
  			   /^subject:\s*request\b.*\baddition\b/i)) {
  		       &bounce("Admin request");
  		       } 
--- 206,218 ----
  		       && (/^subject:\s*subscribe\b/i ||
  			   /^subject:\s*unsubscribe\b/i ||
  			   /^subject:\s*help\b/i ||
! 			   /^subject:\s*RCPT:/i ||
! 			   /^subject:\s*Delivery Confirmation\b/i ||
! 			   /^subject:\s*NON-DELIVERY of:/i ||
! 			   /^subject:\s*Undeliverable Message\b/i ||
! 			   /^subject:\s*Receipt Confirmation\b/i ||
! 			   /^subject:\s*Failed mail\b/i ||
! 			   /^subject:\s.*\bchange\b.*\baddress\b/i ||
  			   /^subject:\s*request\b.*\baddition\b/i)) {
  		       &bounce("Admin request");
  		       } 

-- 
 Dave Wolfe    *Not a spokesman for Motorola*  (512) 891-3246
 Motorola MMTG  6501 Wm. Cannon Dr. W. OE112  Austin  TX  78735-8598


References:
Indexed By Date Previous: A suggestion: Logging of resent messages
From: Marko Hotti <mhotti@paju.oulu.fi>
Next: Re: A suggestion: Logging of resent messages
From: dwolfe@risc.sps.mot.com (Dave Wolfe)
Indexed By Thread Previous: Re: return receipts to a list
From: ae6244@euler.math.USMA.EDU (Markert Erich Mr.)
Next: Re: return receipts to a list
From: ae6244@euler.math.USMA.EDU (Markert Erich Mr.)

Google
 
Search Internet Search www.greatcircle.com