Bug: mailnotify script does not set the Date: header for messages.
The mailnotify script is not setting the
RFC 2822
Date: header for outgoing messages. This causes some MUAs(Mail User Agents) to show the date as
unknown, which is a great annoyance when sorting by date.
I have attached a patch to the mailnotify script and the mailnotify.tmpl template, which adds this header.
In detail it requires the POSIX perl module for the strftime function, and then uses this function to format the current localtime into the proper format for the header. In the template parsing code it adds a new token
%SENTDATE%. In the template itself
Date: %SENTDATE% is added.
Test case
Mail notifications sent before the patch is applied, are recieved with the
Date: header
missing. Upon application of the patch, the
Date: header is present and formatted properly.
Environment
| TWiki version: |
Dec 01, 2001 |
| TWiki plugins: |
none |
| Server OS: |
linux |
| Web server: |
Apache |
| Perl version: |
5.6.1 |
| Client OS: |
Linux |
| Web Browser: |
Mozilla |
--
MichaelGrubb - 07 Aug 2002
Follow up
Fix record
Thanks for the patch, but this is already fixed in the
TWikiAlphaRelease in
CVS:lib/TWiki/Net.pm
, where it says 'mainly for Qmail'. Upgrade to the
TWikiBetaRelease to get a reasonably stable version that has this fix.
--
RichardDonkin - 17 Oct 2002