Update of /cvsroot/cvs-syncmail/syncmail
In directory sc8-pr-cvs1:/tmp/cvs-serv22040
Modified Files:
syncmail
Log Message:
Added Date: header to generated emails; not all MTAs will add that.
Index: syncmail
===================================================================
RCS file: /cvsroot/cvs-syncmail/syncmail/syncmail,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- syncmail 18 Mar 2003 15:13:35 -0000 1.29
+++ syncmail 8 Jul 2003 17:57:26 -0000 1.30
@@ -266,12 +266,15 @@
address = '%s@%s' % (user, domain)
s = StringIO()
sys.stdout = s
+ datestamp = time.strftime('%a, %d %b %Y %H:%M:%S +0000',
+ time.gmtime())
try:
vars = {'address' : address,
'name' : quotename(name),
'people' : string.join(people, COMMASPACE),
'subject' : subject,
'version' : __version__,
+ 'date' : datestamp,
}
print '''\
From: %(name)s <%(address)s>
@@ -280,6 +283,7 @@
print 'Reply-To: %s' % replyto
print '''\
Subject: %(subject)s
+Date: %(date)s
X-Mailer: Python syncmail %(version)s <http://sf.net/projects/cvs-syncmail>
''' % vars
s.write(sys.stdin.read())
|