diff options
| author | bwarsaw | 2002-04-29 01:56:06 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-04-29 01:56:06 +0000 |
| commit | 9ba95dd12bdffd75614117b4f4e772e8068f767b (patch) | |
| tree | 12b256a488be072167d54838d4cc3ee75b614a13 | |
| parent | ac57b6eaccaf5b223e7acc868cd7eecb8c7f76c9 (diff) | |
| download | mailman-9ba95dd12bdffd75614117b4f4e772e8068f767b.tar.gz mailman-9ba95dd12bdffd75614117b4f4e772e8068f767b.tar.zst mailman-9ba95dd12bdffd75614117b4f4e772e8068f767b.zip | |
Article.__init__(): Use the Reply-To: address as the self.email only
as a last resort, if no valid email address could be retrieved from
the From: line. Previously it would always defer to the Reply-To:
address with unintended side effects.
Closes SF bug #224274.
| -rw-r--r-- | Mailman/Archiver/pipermail.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py index b3195a800..2f1306e7a 100644 --- a/Mailman/Archiver/pipermail.py +++ b/Mailman/Archiver/pipermail.py @@ -168,15 +168,17 @@ class Article: self._set_date(message) - # Figure out the e-mail address and poster's name + # Figure out the e-mail address and poster's name. Use the From: + # field first, followed by Reply-To: self.author, self.email = email.Utils.parseaddr(message['From']) e = message['Reply-To'] - if e is not None: - self.email = e + if not self.email and e is not None: + ignoreauthor, self.email = email.Utils.parseaddr(e) self.email = strip_separators(self.email) self.author = strip_separators(self.author) - if self.author == "": self.author = self.email + if self.author == "": + self.author = self.email # Save the In-Reply-To:, References:, and Message-ID: lines # |
