Package: changetrack
Version: 4.3-2
Followup-For: Bug #367987

Here's a patch:

*** /usr/bin/changetrack.distrib        Wed Sep 28 04:54:08 2005
--- /usr/bin/changetrack        Thu May 18 23:34:51 2006
***************
*** 18,23 ****
--- 18,24 ----
  use Getopt::Std;
  use File::Path;
  use strict;
+ use FileHandle;
  
  my @temp = split(' ', '$Revision: 4.3 $ ');
  my $version = $temp[1];
***************
*** 427,442 ****
  if($emailaddresses) {
  
      @emails = split(/\s+/,$emailaddresses);
        
      foreach my $email (@emails) {
        if(($email) && ($message = $emessages{$email})) {
!           my %mail = (To => $email,
!                       From => $mailfrom,
!                       Message => "$message",
!                       Subject => "changed files on $hostname: $date"
!                       );
!           
!           sendmail(%mail) or warn $Mail::Sendmail::error;
        }
      }
  }
--- 428,444 ----
  if($emailaddresses) {
  
      @emails = split(/\s+/,$emailaddresses);
+     my ($sendmail) = grep { -x } ('/usr/sbin/sendmail', '/usr/lib/sendmail');
+     $sendmail or die "no sendmail?\n";
        
      foreach my $email (@emails) {
        if(($email) && ($message = $emessages{$email})) {
!             my $pipe = FileHandle->new ("|$sendmail -f $mailfrom -oi -odi 
$email");
!             $pipe or die "$!";
!             local ($, , $\ ) = ('', '');
!             $pipe->printf ("From: %s\nTo: %s\nSubject: %s\n\n%s", $mailfrom, 
$email,
!                            "changed files on $hostname: $date", $message);
!             $pipe->close or warn "$?";
        }
      }
  }


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-8custom1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages changetrack depends on:
ii  libfile-ncopy-perl            0.34-1     file copying like cp for perl
ii  libmail-sendmail-perl         0.79-4     Send email from a perl script
ii  perl                          5.8.8-4    Larry Wall's Practical Extraction 

Versions of packages changetrack recommends:
ii  cron                          3.0pl1-94  management of regular background p
ii  ed                            0.2-20     The classic unix line editor
ii  rcs                           5.7-18     The GNU Revision Control System

-- no debconf information


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

Reply via email to