I can see how all those would match, why don't you think so? Here's the first one you thought shouldn't match broken down 210-20-54-173.rev.home.ne.jp matched pattern *-*-*-*.home.ne.jp * matches 210 - matches - * matches 20 - matches - * matches 54 - matches - * matches 173.rev ..home.ne.jp matches .home.ne.jp
Bill >---------- >From: Tracy[SMTP:[EMAIL PROTECTED] >Sent: Wednesday, August 18, 2004 7:06 AM >To: [EMAIL PROTECTED] >Subject: [xmail] Odd things happening with StrWildMatch > > >I know Davide is gone and all, but this was kind of weird and I wanted to >see if anyone else had noticed it. > >I've made a couple of custom mods to the xmail source code so that I can >block on RDNS patterns (as well as MAIL FROM patterns). However, none of my >modifications touched any of the string routine code (it was all in the >SMTPSvr code). > >So, I've been merrily adding RDNS patterns for blocking purposes, and my >file is getting pretty good sized, so I start wondering if there are >duplicate patterns in there somewhere (by duplicate patterns, I mean >patterns which are not identical, but which would catch the same domain >names). > >So, I wrote a little program that parses the headers of emails that have >been rejected due to RDNS pattern matching, and it scans against the same >pattern list that xmail is, and reports which patterns were matched by any >particular RDNS. This was accomplished by pulling the code from >StrWildMatch out of xmail, putting it in a DLL, and calling it from my own >code. > >And I'm noticing some odd occurances, things I can't explain (I'm *way* not >a C++ guy, and I get lost in the pointer jungle in StrWildMatch). I've got >things that appear to be matching multiple patterns, but from my >understanding of the way the matching works, they should not match both >patterns. I've included some examples below. > >Has anyone else seen similar things? Or perhaps someone has looked at the >StrWildMatch code and had a better understanding than I have and can tell >me where I'm going wrong here? > >Thanks for any suggestions. If I don't find an answer before then, I'll >mention it again when Davide gets back. > >-------- Samples of multiple matches -------- >(second match is expected, but not first) >210-20-54-173.rev.home.ne.jp matched pattern *-*-*-*.home.ne.jp >210-20-54-173.rev.home.ne.jp matched pattern *-*-*-*.rev.home.ne.jp > >(first match is expected, but not second) >adsl-64-167-79-69.dsl.lsan03.pacbell.net matched pattern *.dsl.*.pacbell.net >adsl-64-167-79-69.dsl.lsan03.pacbell.net matched pattern adsl*.*.pacbell.net > >(first match is expected, but not second) >chello080108085161.2.11.vie.surfer.at matched pattern chello*.*.*.*.surfer.at >chello080108085161.2.11.vie.surfer.at matched pattern chello*.*.surfer.at > >(second match is expected, but not first) >lsanca2-ar37-4-62-192-032.lsanca2.dsl-verizon.net matched pattern >*-*-*-*-*-*.dsl-verizon.net >lsanca2-ar37-4-62-192-032.lsanca2.dsl-verizon.net matched pattern >*.*.dsl-verizon.net > >(first match is expected,. but not second) >modemcable036.209-131-66.mc.videotron.ca matched pattern *.*.mc.videotron.ca >modemcable036.209-131-66.mc.videotron.ca matched pattern *.mc.videotron.ca > >- >To unsubscribe from this list: send the line "unsubscribe xmail" in >the body of a message to [EMAIL PROTECTED] >For general help: send the line "help" in the body of a message to >[EMAIL PROTECTED] > > - To unsubscribe from this list: send the line "unsubscribe xmail" in the body of a message to [EMAIL PROTECTED] For general help: send the line "help" in the body of a message to [EMAIL PROTECTED]