Package: email-reminder
Version: 0.5.6-1
Severity: important
Tags: patch

email-reminder does not create Date: headers in reminders.  As it is the
responsibility of mail-senders to include this header and not the job of the
MTA to add it, this leads to reminders that appear to have been sent in the
year 1969 in cases where the MTA in use does not correct the message.

Under such circumstances, users viewing messages sorted by date may never
see the reminders as they will appear to be the oldest mail in the mailbox.

The following patch corrects this:
# Begin patch
--- /usr/bin/send-reminders.orig        2005-12-11 22:44:05.000000000 -0500
+++ /usr/bin/send-reminders     2006-07-04 04:40:51.000000000 -0400
@@ -89,6 +89,7 @@
 
 use EmailReminder::EventList;
 use EmailReminder::Utils;
+use Date::Manip qw(ParseDate UnixDate);
 
 # Default preferences
 my $PREFERENCE_FILE = '/etc/email-reminder.conf';
@@ -163,6 +164,13 @@
        $smtp->data();
        $smtp->datasend("From: Email-Reminder <" .
                        $preferences{"mail_from"} . ">\n");
+
+       # Create an RFC822 compliant date (current time)
+       my $rfc822_format = "%a, %d %b %Y %H:%M %Z";
+       my $today         = ParseDate("Now");
+       my $rfc822_date = UnixDate($today,$rfc822_format);
+       $smtp->datasend("Date: $rfc822_date\n");
+
        $smtp->datasend("To: $to\n");
        $smtp->datasend("$message");
        $smtp->dataend();
# End patch


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.4.27-2-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ANSI_X3.4-1968) (ignored: LC_ALL 
set to C)
Shell: /bin/sh linked to /bin/bash

Versions of packages email-reminder depends on:
ii  cron                          3.0pl1-100 management of regular background p
ii  libdate-manip-perl            5.44-5     a perl library for manipulating da
ii  libemail-valid-perl           0.179-1    Check validity of Internet email a
ii  libgtk2-perl                  1:1.140-1  Perl interface to the 2.x series o
ii  libxml-dom-perl               1.43-4     Perl module for building DOM Level
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 

Versions of packages email-reminder recommends:
pn  anacron                       <none>     (no description available)

-- debconf-show failed


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to