From a68aa926bb30d46adb47fa6efc3b20b4012eaac4 Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Mon, 31 Oct 2005 04:39:25 +0000 Subject: Obscure email address in the subject line. --- Mailman/Archiver/HyperArch.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Mailman') diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py index 0440dc6d..84e04856 100644 --- a/Mailman/Archiver/HyperArch.py +++ b/Mailman/Archiver/HyperArch.py @@ -406,6 +406,15 @@ class Article(pipermail.Article): if email: self.decoded['email'] = email if subject: + if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS: + otrans = i18n.get_translation() + try: + i18n.set_language(self._lang) + atmark = unicode(_(' at '), Utils.GetCharSet(self._lang)) + subject = re.sub(r'([-+,.\w]+)@([-+.\w]+)', + '\g<1>' + atmark + '\g<2>', subject) + finally: + i18n.set_translation(otrans) self.decoded['subject'] = subject self.decoded['stripped'] = self.strip_subject(subject or self.subject) -- cgit v1.2.3