use Digest::MD5;
setlocale(&POSIX::LC_ALL, "C");
+$ENV{"LC_ALL"} = "C";
# ---------------------------------------------------------------------------
# configuration
return;
} ## end if ( $retries > 0 && (...
- if ( $conf::upload_method eq "ftp" ) {
- return if !ftp_open();
- }
+ return if !ftp_open();
# check if the job is already present on target
# (moved to here, to avoid bothering target as long as there are errors in
}
msg("log,mail", "(PGP/GnuPG signature by $signator)\n");
+ return if !ftp_open();
+
# check target
my @filenames = ($commands);
if (my $ls_l = is_on_target($commands, @filenames)) {
my $commands = shift;
my ( @cmds, $cmd, $pgplines, $signator );
local (*COMMANDS);
- my ( @files, $file, @removed, $target_delay );
+ my ($file, @removed, $target_delay );
format_status_str( $main::current_changes, $commands );
$main::dstat = "c";
next if @word < 1;
if ( $word[0] eq "rm" ) {
+ my @files = ();
foreach ( @word[ 1 .. $#word ] ) {
my $origword = $_;
if (m,^DELAYED/([0-9]+)-day/,) {
# open FTP connection to target host if not already open
#
sub ftp_open() {
+ return 1 unless $conf::upload_method eq "ftp";
if ($main::FTP_chan) {
my $package =
keys %main::packages ? join( ' ', keys %main::packages ) : "";
- use Email::Send;
-
- unless ( defined($Email::Send::Sendmail::SENDMAIL) ) {
- $Email::Send::Sendmail::SENDMAIL = $conf::mail;
- }
+ use Email::Sender::Simple;
if ($conf::overridemail) {
$addr = $conf::overridemail;
Date: $date
X-Debian: DAK
X-DAK: DAK
+Precedence: bulk
+Auto-Submitted: auto-generated
__MESSAGE__
if ( length $package ) {
$message .= "\n$text";
$message .= "\nGreetings,\n\n\tYour Debian queue daemon (running on host $main::hostname)\n";
- my $mail = Email::Send->new;
- for (qw[Sendmail SMTP]) {
- $mail->mailer($_) and last if $mail->mailer_available($_);
- }
-
- my $ret = $mail->send($message);
- if ( $ret && $ret !~ /Message sent|success/ ) {
- return 0;
- }
-
- return 1;
+ return Email::Sender::Simple->try_to_send($message);
} ## end sub send_mail($$$)
#