~launchpad-pqm/mailman/2.1

« back to all changes in this revision

Viewing changes to Mailman/Bouncers/SimpleMatch.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-10-21 01:06:17 UTC
  • mfrom: (975.1.1 mailman.2112)
  • Revision ID: launchpad@pqm.canonical.com-20091021010617-prbs2ay6nhxx515v
[rs=flacoste] Upgrade Mailman to upstream 2.1.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 1998-2006 by the Free Software Foundation, Inc.
 
1
# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
2
2
#
3
3
# This program is free software; you can redistribute it and/or
4
4
# modify it under the terms of the GNU General Public License
87
87
    (_c('Unable to deliver message to the following address\(es\)\.'),
88
88
     _c('--- Original message follows\.'),
89
89
     _c('<(?P<addr>[^>]*)>:')),
90
 
    # kundenserver.de
91
 
    (_c('A message that you sent could not be delivered'),
 
90
    # googlemail.com
 
91
    (_c('Delivery to the following recipient(s)? failed'),
 
92
     _c('----- Original message -----'),
 
93
     _c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
 
94
    # kundenserver.de, mxlogic.net
 
95
    (_c('A message that you( have)? sent could not be delivered'),
92
96
     _c('^---'),
93
97
     _c('<(?P<addr>[^>]*)>')),
94
98
    # another kundenserver.de
95
 
    (_c('A message that you sent could not be delivered'),
 
99
    (_c('A message that you( have)? sent could not be delivered'),
96
100
     _c('^---'),
97
101
     _c('^(?P<addr>[^\s@]+@[^\s@:]+):')),
98
 
    # thehartford.com
99
 
    (_c('Delivery to the following recipients failed'),
100
 
     _c("Bogus - there actually isn't anything"),
101
 
     _c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
 
102
    # thehartford.com and amenworld.com
 
103
    (_c('Del(i|e)very to the following recipient(s)? (failed|was aborted)'),
 
104
     # this one may or may not have the original message, but there's nothing
 
105
     # unique to stop on, so stop on the first line of at least 3 characters
 
106
     # that doesn't start with 'D' (to not stop immediately) and has no '@'.
 
107
     _c('^[^D][^@]{2,}$'),
 
108
     _c('^\s*(. )?(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
102
109
    # and another thehartfod.com/hartfordlife.com
103
110
    (_c('^Your message\s*$'),
104
111
     _c('^because:'),
105
112
     _c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
106
 
    # kviv.be (NTMail)
 
113
    # kviv.be (InterScan NT)
107
114
    (_c('^Unable to deliver message to'),
108
115
     _c(r'\*+\s+End of message\s+\*+'),
109
116
     _c('<(?P<addr>[^>]*)>')),
119
126
    (_c('^Invalid final delivery userid:'),
120
127
     _c('^Original message follows.'),
121
128
     _c('\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
122
 
    # E500_SMTP_Mail_Service@lerctr.org
123
 
    (_c('------ Failed Recipients ------'),
124
 
     _c('-------- Returned Mail --------'),
 
129
    # E500_SMTP_Mail_Service@lerctr.org and similar
 
130
    (_c('---- Failed Recipients ----'),
 
131
     _c(' Mail ----'),
125
132
     _c('<(?P<addr>[^>]*)>')),
126
133
    # cynergycom.net
127
134
    (_c('A message that you sent could not be delivered'),
128
135
     _c('^---'),
129
136
     _c('(?P<addr>[^\s@]+@[^\s@)]+)')),
 
137
    # LSMTP for Windows
 
138
    (_c('^--> Error description:\s*$'),
 
139
     _c('^Error-End:'),
 
140
     _c('^Error-for:\s+(?P<addr>[^\s@]+@[^\s@]+)')),
 
141
    # Qmail with a tri-language intro beginning in spanish
 
142
    (_c('Your message could not be delivered'),
 
143
     _c('^-'),
 
144
     _c('<(?P<addr>[^>]*)>:')),
 
145
    # socgen.com
 
146
    (_c('Your message could not be delivered to'),
 
147
     _c('^\s*$'),
 
148
     _c('(?P<addr>[^\s@]+@[^\s@]+)')),
 
149
    # dadoservice.it
 
150
    (_c('Your message has encountered delivery problems'),
 
151
     _c('Your message reads'),
 
152
     _c('addressed to\s*(?P<addr>[^\s@]+@[^\s@)]+)')),
 
153
    # gomaps.com
 
154
    (_c('Did not reach the following recipient'),
 
155
     _c('^\s*$'),
 
156
     _c('\s(?P<addr>[^\s@]+@[^\s@]+)')),
 
157
    # EYOU MTA SYSTEM
 
158
    (_c('This is the deliver program at'),
 
159
     _c('^-'),
 
160
     _c('^(?P<addr>[^\s@]+@[^\s@<>]+)')),
 
161
    # A non-standard qmail at ieo.it
 
162
    (_c('this is the email server at'),
 
163
     _c('^-'),
 
164
     _c('\s(?P<addr>[^\s@]+@[^\s@]+)[\s,]')),
 
165
    # pla.net.py (MDaemon.PRO ?)
 
166
    (_c('- no such user here'),
 
167
     _c('There is no user'),
 
168
     _c('^(?P<addr>[^\s@]+@[^\s@]+)\s')),
 
169
    # fastdnsservers.com
 
170
    (_c('The following recipient.*could not be reached'),
 
171
     _c('bogus stop pattern'),
 
172
     _c('^(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
 
173
    # lttf.com
 
174
    (_c('Could not deliver message to'),
 
175
     _c('^\s*--'),
 
176
     _c('^Failed Recipient:\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
130
177
    # Next one goes here...
131
178
    ]
132
179
 
157
204
                if mo:
158
205
                    addr = mo.group('addr')
159
206
                    if addr:
160
 
                        addrs[mo.group('addr')] = 1
 
207
                        addrs[addr.strip('<>')] = 1
161
208
                elif ecre.search(line):
162
209
                    break
163
210
        if addrs: