diff options
| author | bwarsaw | 1999-12-16 17:05:47 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-12-16 17:05:47 +0000 |
| commit | df3fcc153b9ddf8566b55c68965b245f12561bc2 (patch) | |
| tree | c21c85eb506e7bdf214f78f4bf940a27be7a002a /Mailman/MailList.py | |
| parent | ba783393c53bb0bcfe7f784c94c45793b8adc681 (diff) | |
| download | mailman-df3fcc153b9ddf8566b55c68965b245f12561bc2.tar.gz mailman-df3fcc153b9ddf8566b55c68965b245f12561bc2.tar.zst mailman-df3fcc153b9ddf8566b55c68965b245f12561bc2.zip | |
HasExplicitDest(): The argument order of the re.match()s is backwards;
it should match the found recipient against the acceptable
alternative.
Diffstat (limited to 'Mailman/MailList.py')
| -rw-r--r-- | Mailman/MailList.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index f9d6bde0a..9e835fde2 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -1145,12 +1145,12 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, # Note that qualified host can be different! This allows, eg, for # relaying from remote lists that have the same name. Still # stringent, but offers a way to provide for remote exploders. - lowname = string.lower(self.real_name) + listname = self.internal_name() recips = [] # First check all dests against simple name: for recip in msg.getaddrlist('to') + msg.getaddrlist('cc'): curr = string.lower(string.split(recip[1], '@')[0]) - if lowname == curr: + if listname == curr: return 1 recips.append(curr) # ... and only then try the regexp acceptable aliases. @@ -1160,12 +1160,12 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, try: # The list alias in `stripped` is a user supplied regexp, # which could be malformed. - if stripped and re.match(stripped, recip): + if stripped and re.match(recip, stripped): return 1 except re.error: # `stripped' is a malformed regexp -- try matching # safely, with all non-alphanumerics backslashed: - if stripped and re.match(re.escape(stripped), recip): + if stripped and re.match(recip, re.escape(stripped)): return 1 return 0 |
