SMTP

Markus Schaber markus at schabi.de
Mon Aug 20 13:48:18 CEST 2001


Hi,

Richard van de Stadt <stadt at cs.utwente.nl> schrub:

>> You have to append an appropriate Date: Header.
>> 
>> See the Mail RFCs which headers have to be there, and which one can
>> leave out.
> 
> 'Have to' doesn't apply to most mail systems. I've been running a
> system that collects submissions for conferences, which has been
> sending out feedback messages to many addresses using smtplib ever
> since it was introduced in 1.5.2, and this is the first time I meet a
> mail system that bouces because it wants a 'Date:' in the header.

That's why I mentioned the RFCs. There are lots of MTAs that accept 
incorrect messages and correct them (i. E. they add a Date-Header).

But when the RFC says a certain header should be there, then every MTA 
which bounces the message is correct. When the RFC says the header is 
optional then the server is buggy, and one should tell the programmer 
of the server.

Servers that accept incorrect messages are user-friendly, but shouldn't 
be used as reference.
 
> Anyway, I plan to use this:
> 
> from time import time, ctime, tzname, daylight
> date = 'Date: ' + ctime(time()) + ' ' + tzname[daylight] + '\n'
> 
> and put date between the 'Subject:' and the 'From:' lines

As far as I can see this, it should do.

markus
-- 
1) Customers cause problems.
2) Marketing is trying to create more customers.
Therefore:
3) Marketing is evil.  (Grand Edwards in comp.lang.python)



More information about the Python-list mailing list