diff options
| author | bwarsaw | 2001-08-04 06:08:07 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-08-04 06:08:07 +0000 |
| commit | d14bcf7bddcd97fe9e6248e157c932bb354ac804 (patch) | |
| tree | ab412f958d266610af5ee416f3d7aeeb2dc98d8a | |
| parent | b2c4b6401de89f675977bd8ef9f1607e1647ef1b (diff) | |
| download | mailman-d14bcf7bddcd97fe9e6248e157c932bb354ac804.tar.gz mailman-d14bcf7bddcd97fe9e6248e157c932bb354ac804.tar.zst mailman-d14bcf7bddcd97fe9e6248e157c932bb354ac804.zip | |
intermediate
| -rw-r--r-- | Mailman/Bouncers/LLNL.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Mailman/Bouncers/LLNL.py b/Mailman/Bouncers/LLNL.py new file mode 100644 index 000000000..51b4205c4 --- /dev/null +++ b/Mailman/Bouncers/LLNL.py @@ -0,0 +1,35 @@ +# Copyright (C) 2001 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +"""LLNL's custom Sendmail bounce message.""" + +import re +from mimelib.MsgReader import MsgReader + +acre = re.compile(r',\s*(?P<addr>\S+@[^,]+),', re.IGNORECASE) + + + +def process(msg): + mi = MsgReader(msg) + while 1: + line = mi.readline() + if not line: + break + mo = acre.search(line) + if mo: + return [mo.group('addr')] + return [] |
