X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_sendEmail;h=cf4f62732578836426487533b7180bb4a58a488d;hp=9131081358fefc75f7f331c1a68f1d249ee8c541;hb=375af98436b4cea9b325ce2aa00408737ac76bb0;hpb=74dc9d456332757127d5eda4ce32f29377133fa2 diff --git a/bin/BackupPC_sendEmail b/bin/BackupPC_sendEmail index 9131081..cf4f627 100755 --- a/bin/BackupPC_sendEmail +++ b/bin/BackupPC_sendEmail @@ -1,4 +1,4 @@ -#!/bin/perl -T +#!/bin/perl #============================================================= -*-perl-*- # # BackupPC_sendEmail: send status emails to users and admins @@ -13,7 +13,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001 Craig Barratt +# Copyright (C) 2001-2003 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -31,13 +31,14 @@ # #======================================================================== # -# Version 2.0.0beta3, released 1 Jun 2003. +# Version 2.1.0_CVS, released 8 Feb 2004. # # See http://backuppc.sourceforge.net. # #======================================================================== use strict; +no utf8; use lib "/usr/local/BackupPC/lib"; use BackupPC::Lib; use BackupPC::FileZIO; @@ -168,6 +169,7 @@ foreach my $host ( sort(keys(%Status)) ) { my $user = $Hosts->{$host}{user}; next if ( time - $UserEmailInfo{$user}{lastTime} < $Conf{EMailNotifyMinDays} * 24*3600 ); + next if ($Conf{XferMethod} eq "archive" ); my @Backups = $bpc->BackupInfoRead($host); my $numBackups = @Backups; if ( $numBackups == 0 ) { @@ -214,8 +216,8 @@ foreach my $host ( sort(keys(%Status)) ) { while ( 1 ) { my $s = $fh->readLine(); last if ( $s eq "" ); - if ( $s =~ /^Error reading file.*\.pst : ERRDOS - ERRlock/ - || $s =~ /^Error reading file.*\.pst\. Got 0 bytes/ ) { + if ( $s =~ /^\s*Error reading file.*\.pst : ERRDOS - ERRlock/ + || $s =~ /^\s*Error reading file.*\.pst\. Got 0 bytes/ ) { $badOutlook = 1; last; } @@ -282,6 +284,7 @@ if ( !$opts{t} ) { [\%UserEmailInfo], [qw(*UserEmailInfo)]); if ( open(HOST, ">", "$TopDir/log/UserEmailInfo.pl") ) { + binmode(HOST); print(HOST $dumpStr); close(HOST); }