grant beattie
2006-May-19 01:46 UTC
[Dovecot] Thunderbird 1.5 and messages with no Date: header
hi, some of my Thunderbird users have a minor but annoying problem with messages that have no Date: header. these clients use BODY[HEADER.FIELDS (Date)] as the date for messages. when a message has no Date: header, they display the date as 01/01/1970 10:00:00 because Dovecot returns empty string. would it be possible for Dovecot to return INTERNALDATE instead, for messages that contain no Date: header? I know this is not *technically* correct, but it's a reasonable best-guess, and better than returning nothing. perhaps as a client-workaround? I vaguely recalled a previous message about this, but I couldn't find it today. grant.
Jan Kundrát
2006-May-19 11:08 UTC
[Dovecot] Thunderbird 1.5 and messages with no Date: header
grant beattie wrote:> some of my Thunderbird users have a minor but annoying problem with > messages that have no Date: header. > > these clients use BODY[HEADER.FIELDS (Date)] as the date for > messages. when a message has no Date: header, they display the > date as 01/01/1970 10:00:00 because Dovecot returns empty string. > > would it be possible for Dovecot to return INTERNALDATE instead, for > messages that contain no Date: header? I know this is not > *technically* correct, but it's a reasonable best-guess, and better > than returning nothing. perhaps as a client-workaround?Isn't it better to fix the MUA in question? Returning another value than the one present in the header structure would break RFC 3501, IMHO. Anyway, the Date header should be fixed/added by MTA (haven't read RFC2822 but the ENVELOPE desription in 3501 seems to confirm my interpretation). Anyway #2, assuming that the message hasn't arrived via SMTP (as the MTA would fix/add the Date header unless it's broken) and probably also not via COPY or APPEND, I'm not sure how would INTERNALDATE help you - if I'm reading the specification correctly, the behaviour is implementation-defined in other cases :) So in short, is there a report in Thunderbird's bug tracker? Cheers, -jkt -- cd /local/pub && more beer > /dev/mouth -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 258 bytes Desc: OpenPGP digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20060519/d91c5a9f/attachment.bin>
John Peacock
2006-May-19 13:58 UTC
[Dovecot] Thunderbird 1.5 and messages with no Date: header
grant beattie wrote:> these clients use BODY[HEADER.FIELDS (Date)] as the date for > messages. when a message has no Date: header, they display the > date as 01/01/1970 10:00:00 because Dovecot returns empty string.IMNSHO, the appropriate fix is to refuse these messages in the initial SMTP transaction. RFC-2822, section 3.6 clearly states:> The only required header fields are the origination date field and > the originator address field(s). All other header fields are > syntactically optional. More information is contained in the table > following this definition. >Any message without a DATE: and FROM: header is malformed and should be refused. When I turned this on, the only legitimate messages that were bounced were from a stupid print-to-email feature on our HP printer/copiers. I routed those through an MTA that added a DATE: header and all was fine. YMMV John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748