Great Circle Associates Majordomo-Workers
(April 2000)
 

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

Subject: majordomo.pl address matching
From: John Relph <relph @ cthulhu . engr . sgi . com>
Date: Sun, 23 Apr 2000 12:53:21 -0700 (PDT)
To: majordomo-workers @ greatcircle . com
Cc: majordomo-patches @ cloud . ccsf . cc . ca . us
Reply-to: relph @ sgi . com


Folks,

So, since my first try didn't seem to have made it, here's yet another
patch for Majordomo 1.94.5.

This patch tries to do better checking to see if two email addresses
match because they are on different machines in the same domain.  For
example, as in the example in majordomo.pl, <foo@baz.bax.edu> is
considered to match <foo@bax.edu>.

This patch increases the debugging output as well as doing a slightly
better job of checking.

Any comments?

	-- John

*** majordomo.pl.O      Sun Feb 27 16:21:38 2000
--- majordomo.pl        Thu Apr 22 21:35:13 1999
***************
*** 173,183 ****
        return(undef);
      }
  
!     if ($partial == 2 && ($a1[0] ne $a2[0])) { # see if addresses are
                                                 # foo@baz.bax.edu, foo@bax.edu
-        local(@addr1,@addr2);
-         @addr1 = split(/\@/, $a1[0]);
-         @addr2 = split(/\@/, $a2[0]);
          if ( $#addr1 == $#addr2 && $#addr1 == 1 && 
                 $addr1[0] eq $addr2[0] && (index($addr1[1], $addr2[1]) >= $[))
          {
--- 178,193 ----
        return(undef);
      }
  
!     if ($a1[0] eq $a2[0]) {
!         return(1);
!     }
! 
!     local(@addr1,@addr2);
!     @addr1 = split(/\@/, $a1[0]);
!     @addr2 = split(/\@/, $a2[0]);
! 
!     if ($partial == 2) {      # see if addresses are
                                                 # foo@baz.bax.edu, foo@bax.edu
          if ( $#addr1 == $#addr2 && $#addr1 == 1 && 
                 $addr1[0] eq $addr2[0] && (index($addr1[1], $addr2[1]) >= $[))
          {
***************
*** 185,191 ****
          }
         }
  
!     return($a1[0] eq $a2[0]);
  }
  
  # These are package globals referenced by &setabortaddr and &abort
--- 195,217 ----
          }
         }
  
!     if ($#addr1 == 1) {
!       print STDERR "addr_match: comparing $addr1[1] against $main'whereami\n" if $DEBUG;
!     }
!     if ($#addr2 == 1) {
!       print STDERR "addr_match: comparing $addr2[1] against $main'whereami\n" if $DEBUG;
!     }
! 
!     if ($addr1[0] eq $addr2[0]) {
!       if ($#addr1 == 0 && $#addr2 == 1 && $addr2[1] eq $main'whereami) { #'
!           return(1);
!       }
!       if ($#addr2 == 0 && $#addr1 == 1 && $addr1[1] eq $main'whereami) { #'
!           return(1);
!       }
!     }
! 
!     return(0);
  }
  
  # These are package globals referenced by &setabortaddr and &abort



Follow-Ups:
Indexed By Date Previous: Re: resend 1.94.5 patch
From: "Joe R. Jah" <jjah@sol.ccsf.cc.ca.us>
Next: Change between Majordomo-1.94.4 and 1.94.5
From: "Eric M. Sisson" <ems@mdacc.tmc.edu>
Indexed By Thread Previous: Mj2 docs
From: SRE <eckert@climber.org>
Next: Re: majordomo.pl address matching
From: Dave Wolfe <dwolfe@lists.linuxppc.org>

Google
 
Search Internet Search www.greatcircle.com