MailHost.py does not set the "Date" header, who's bug?
Hello: I have noticed that all of my notifications on page edits in my ZWiki are dated year=1969. This happens because there is no "Date" header in the email message sent from ZWiki (version 0.10) The MailHost product that comes with Zope 2.5.1 does not add a Date header to mail messages. My mozilla email client seems to interpret the lack of a date header as date="the beginning of time", or somewhere in 1969 ;-) My Zope-based web app *also* uses MailHost to send out emails. It has the same problem. Here is my question. Should ZWiki, my web app, and everybody else's Zope-based web app in the world have to add "Date" headers? Or maybe MailHost should be smart enough to add a Date header with Date=now if Date is missing from the header...? If someone from ZC agrees that this is a good idea, I would be happy to provide a patch. Regards, --Craeg
From: "Craeg K Strong" <cstrong@arielpartners.com>
Here is my question. Should ZWiki, my web app, and everybody else's Zope-based web app in the world have to add "Date" headers? Or maybe MailHost should be smart enough to add a Date header with Date=now if Date is missing from the header...?
Indeed, reading in RFC 2822, the origination date-field is required, which means that the header munging done in MailHost should also look for a date header and add it if it doesn't exist. Best Regards Lennart Regebro, Torped http://www.easypublisher.com/
From: "Lennart Regebro" <lennart@torped.se>
Indeed, reading in RFC 2822, the origination date-field is required, which means that the header munging done in MailHost should also look for a date header and add it if it doesn't exist.
A simple addition of: if not mo.getheader('Date'): mo['Date'] = DateTime().rfc822() in _mungeHeaders did it. I'll check this in. I did however find a possible bug in DateTime().rfc822(), see next post about that. Best Regards Lennart Regebro, Torped http://www.easypublisher.com/
participants (2)
-
Craeg K Strong -
Lennart Regebro