diff options
| author | bwarsaw | 2000-04-10 17:25:03 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-04-10 17:25:03 +0000 |
| commit | d1f9d0829163a7bd0d05ed978e770b14917889bb (patch) | |
| tree | 2f969d24fd554170480951035bb91b3083034035 /Mailman/Bouncers/Exim.py | |
| parent | 1362a143bb25ab811e9e72ff42e03c6f666e6c92 (diff) | |
| download | mailman-d1f9d0829163a7bd0d05ed978e770b14917889bb.tar.gz mailman-d1f9d0829163a7bd0d05ed978e770b14917889bb.tar.zst mailman-d1f9d0829163a7bd0d05ed978e770b14917889bb.zip | |
Diffstat (limited to 'Mailman/Bouncers/Exim.py')
| -rw-r--r-- | Mailman/Bouncers/Exim.py | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Mailman/Bouncers/Exim.py b/Mailman/Bouncers/Exim.py index 4568c87f3..5dd955662 100644 --- a/Mailman/Bouncers/Exim.py +++ b/Mailman/Bouncers/Exim.py @@ -14,22 +14,16 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -"""Parse messages that contain X-Failed-Recipients headers. -What MTA generates these? -""" +"""Parse bounce messages generated by Exim. -import string +Exim adds an X-Failed-Recipients: header to bounce messages containing +an `addresslist' of failed addresses. +""" def process(mlist, msg): - failures = msg.getallmatchingheaders('x-failed-recipients') - if not failures: - return None addrs = [] - for failed in failures: - i = string.find(failed, ':') - if i < 0: - continue - addrs.append(string.strip(failed[i+1:])) + for fullname, addr in msg.getaddrlist('x-failed-recipients'): + addrs.append(addr) return addrs or None |
