[email protected] wrote:
> Am 10.12.2014 um 20:17 schrieb Peter Volkov:
>> We use smtplib in python to send mail through postfix. As I saw from
>> tcpdump smtplib does not set "Date:" field, so I suspect postfix does
>> that. Now, as I see postfix sets date as:
>> Date: Wed, 10 Dec 2014 05:40:50 -0800 (PST)
>>
>> According to rfc 5322 3.6.1. "The Origination Date Field" last part
>> (PST) should not be there and correct Date specification looks like:
>>
>> Date: Wed, 10 Dec 2014 05:40:50 -0800
>>
>> Is there any way to force postfix avoid this (PST) or is there any RFC
>> that this date specification is compliant with? Currently our mail is
>> considered as spam by some strict e-mail systems.
>>
>> Thank in advance for any tips
> 
> i would file a bugreport against "smtplib"

Short:

No need for filing a bug report against Python.
The application developer should just make use of the standard lib.

Long:

Module smtplib in Python's standard lib is pretty low-level and basic.

For constructing the messages sent via smtplib one should use Python module
email (also part of recent Python's standard lib, AFAIK heavily used in
mailman) and the calling application should set the Date header e.g. to what's
generated by email.utils.formatdate().

Ciao, Michael.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to