[Mailman-Developers] Patch for HyperArch

Sebastian Hagedorn Hagedorn at uni-koeln.de
Wed Mar 9 08:26:50 EST 2016


Hi Mark,

thanks for looking into this.

--On 8. März 2016 um 15:43:11 -0800 Mark Sapiro <mark at msapiro.net> wrote:

> I'm still having difficulty duplicating what you saw.
>
> For the above three messages, the first one just gets detected as an
> invalid date and archived under the current date by the current bin/arch.
>
> The other two throw "ValueError: year out of range" at
>
>   File "/var/MM/21/Mailman/Archiver/HyperArch.py", line 984, in
> dateToVolName
>     return time.strftime("%Y-%B",datetuple)
>
> which is a problem, but not the one you saw. I would like to see
> messages that cause this error
>
>   File "/usr/lib/mailman/Mailman/Archiver/HyperArch.py", line 601, in
> _set_date
>     self.fromdate = time.ctime(int(self.date))
> ValueError: timestamp out of range for platform time_t
>
> that you reported. Can you find those bad messages in the .mbox input
> file you used and send them to me?

We played around and found that the error is related to our version of 
Python. Here's a minimal test script that shows the issue:

from email.Utils import parseaddr, parsedate_tz, mktime_tz, formatdate
print mktime_tz(parsedate_tz("Fri, 4 Feb 100 00:51:42 +0100 (MET)"));

That's the Date header from the single piece of legitimate mail. Python 2.4 
throws the same exception you were seeing: "ValueError: year out of range". 
However, our Python 2.7 (which we use for Mailman) does this:

-59008522098

When that value is then passed to time.ctime(), you get "ValueError: 
timestamp out of range for platform time_t". We're on RHEL 5, and our 
version of Python 2.7 is from the IUSCommunity repo: 
python27-2.7.10-1.ius.el5. Which version of Python were you using?

Thanks,
Sebastian
-- 
    .:.Sebastian Hagedorn - Weyertal 121 (Gebäude 133), Zimmer 2.02.:.
                 .:.Regionales Rechenzentrum (RRZK).:.
   .:.Universität zu Köln / Cologne University - ✆ +49-221-470-89578.:.


More information about the Mailman-Developers mailing list