proposed patch to Kernel/System/PostMaster/DestQueue.pm

Hi, I proposed the following patch to Kernel/System/PostMaster/DestQueue.pm: *** DestQueue.pm.ORIG Thu Aug 28 16:52:43 2003 --- DestQueue.pm Thu Aug 28 16:53:17 2003 *************** *** 71,77 **** foreach (@EmailAddresses) { my $Address = $Self->{ParseObject}->GetEmailAddress(Email => $_); foreach (keys %SystemAddresses) { ! if ($_ =~ /\Q$Address/i) { if ($Self->{Debug} > 0) { print STDERR "* matched email: $_ (QueueID=$SystemAddresses{$_})\n"; } --- 71,77 ---- foreach (@EmailAddresses) { my $Address = $Self->{ParseObject}->GetEmailAddress(Email => $_); foreach (keys %SystemAddresses) { ! if ($_ =~ /^\Q$Address\E$/i) { if ($Self->{Debug} > 0) { print STDERR "* matched email: $_ (QueueID=$SystemAddresses{$_})\n"; } This patch helps putting the message in the right queue when we have SystemAddresses that "include" others. The example: it-help@domain.pt -AND- help@domain.pt I don't know if this might have side-effects elsewhere. I hope that the authors might know that :-)) Best regards, p ("help@domain.pt" =~ /\Qhelp@domain.pt/i) 1 DB<36> p ("it-help@domain.pt" =~ /\Qhelp@domain.pt/i) 1 DB<37> p ("it-help@domain.pta" =~ /\Qhelp@domain.pt/i) 1 DB<38> p ("ahelp@domain.pta" =~ /^help@domain.pt$/i) DB<41> p ("help@domain.pt" =~ /^\Qhelp@domain.pt\E$/i) 1 DB<42> p ("it-help@domain.pt" =~ /^\Qhelp@domain.pt\E$/i) DB<43>

Hi Carlos, On Thu, Aug 28, 2003 at 05:09:45PM +0100, Carlos Canau wrote:
I proposed the following patch to Kernel/System/PostMaster/DestQueue.pm:
*** DestQueue.pm.ORIG Thu Aug 28 16:52:43 2003 --- DestQueue.pm Thu Aug 28 16:53:17 2003 *************** *** 71,77 **** foreach (@EmailAddresses) { my $Address = $Self->{ParseObject}->GetEmailAddress(Email => $_); foreach (keys %SystemAddresses) { ! if ($_ =~ /\Q$Address/i) { if ($Self->{Debug} > 0) { print STDERR "* matched email: $_ (QueueID=$SystemAddresses{$_})\n"; } --- 71,77 ---- foreach (@EmailAddresses) { my $Address = $Self->{ParseObject}->GetEmailAddress(Email => $_); foreach (keys %SystemAddresses) { ! if ($_ =~ /^\Q$Address\E$/i) { if ($Self->{Debug} > 0) { print STDERR "* matched email: $_ (QueueID=$SystemAddresses{$_})\n"; }
This patch helps putting the message in the right queue when we have SystemAddresses that "include" others. The example:
it-help@domain.pt -AND- help@domain.pt
I don't know if this might have side-effects elsewhere. I hope that the authors might know that :-))
The \E is just for regexp quoting? If it is so, the is was missing! Thanks for the info. :)
Martin -- Martin Edenhofer - <martin at edenhofer.de> - http://martin.edenhofer.de/ -- "The number of Unix installations has grown to 10, with more expected." The Unix Programmer's Manual, 2nd Edition, June 1972

On Thu, Aug 28, 2003 at 07:38:15PM +0200, Martin Edenhofer wrote:
it-help@domain.pt -AND- help@domain.pt
I don't know if this might have side-effects elsewhere. I hope that the authors might know that :-))
The \E is just for regexp quoting? If it is so, the is was missing!
I put there \E to be able to put $ afterwards :-) ... and yes I had to dig on the manual pages for \Q :-> My objective is to avoid that messages to help@domain.pt don't fall into it-help@domain.pt queue. best regards,
participants (3)
-
Carlos Canau
-
Carlos Canau
-
Martin Edenhofer