> > 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?
Thinking about this a bit more, I think what you say is the crux of the difference between yours and mine. In your Python, time.ctime(-59008522098) throws the ValueError, and in mine it returns a date string which may cause problems later on in the processing. I think the difference is not with a Python version per se, but rather with the underlying C environment and C library 'time' functions that Python was compiled with. In any case, I think I now have enough understanding of the issue to work up some kind of fix that will work in both your situation and mine. Note that your original suggested patch won't solve the problem for me because my time.ctime(-59008522098) does not throw a ValueError. -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org https://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9