create new tag
, view all tags

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.


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

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch mailnotify.patch r1 manage 1.2 K 2002-08-07 - 21:35 MichaelGrubb  
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2002-10-17 - RichardDonkin
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.