[ 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:
|
|