Capisuite assembles the notification mails on its own. in these mails there is no date header. it was discussed on capisuites mailinglist (german). i attached a little patch to fix this behaviour Reproducible: Always Steps to Reproduce: 1. enable notification of fax by mail (MailAndSave) 2. send a fax and/or receive one 3. look at the notification mail. it has no date header so it will be displayed as 1.1.1979 Actual Results: i got an email with bad date header Expected Results: insert actual date in header cs_helpers.pyin is original cs_helpers.py is my patched version --- cs_helpers.pyin 2004-11-28 14:35:23.000000000 +0100 +++ cs_helpers.py 2005-06-19 20:55:49.000000000 +0200 @@ -10,6 +10,7 @@ # (at your option) any later version. import os +import time # the name of the config file read by the scripts; see there for options and # descriptions @@ -170,6 +171,7 @@ msg['Subject']=mail_subject msg['From']=mail_from msg['To']=mail_to + msg['Date']=time.ctime() msg.preamble = 'This is a Multipart-MIME-message. Please use a capable mailer.\n' msg.epilogue = '' # To guarantee the message ends with a newline @@ -267,6 +269,7 @@ msg['Subject'] = mail_subject msg['From'] = mail_from msg['To'] = mail_to + msg['Date']=time.ctime() try: server = smtplib.SMTP('localhost')
A friendly MTA should add the date header for you. But I agree, it's always better to set it directly. This patch should be go to upstream, but unfortunately capisuite has no maintainer right now. :-( So I will add this patch for the time being to our ebuild. Please attach your patch to this bug as a file. Or do you have a link for us to the patch (asuming that you also downloaded it somewhere)? btw: which (ebuild) version do you use?
Stefan, please add net-dialup herd to CC list when you take over bugs regarding this herd.
Created attachment 61559 [details, diff] Patchfile for Dateheader in Nofificationemails btw: I use the capisuite-0.4.5.ebuild
Python 2.4.1 (#1, Jun 17 2005, 13:16:30) [GCC 3.4.4 (Gentoo 3.4.4, ssp-3.4.4-1.0, pie-8.7.8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.ctime() 'Mon Jun 20 13:30:09 2005' it seems, that 'ctime' produces a wrong date format. Here some real world examples (taken from different mails): ;-) Date: Sat, 04 Jun 2005 02:49:19 +0000 Date: Fri, 17 Jun 2005 10:21:37 +0200 Date: Mon, 20 Jun 2005 07:01:48 +0200 I think time.strftime() with a correct format mask would be better.
>>> time.strftime('%a, %d %b %Y %H:%M:%S %z') 'Mon, 20 Jun 2005 13:41:18 +0200' This is the correct format mask for RFC822 conformant dates.
Created attachment 61593 [details, diff] capisuite-0.4.5-date-header.patch corrected patch.
fixed in capisuite-0.4.5-r2 please test it. thanks!
should be available on the mirrors in a few mins/hours. It's in CVS now.