X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tools%2Fdebianqueued-0.9%2Fdebianqueued;h=07f378446d3b998e5fe47455d0f345c51314b1da;hb=ff1ba021edbdd9028e44ae4f853ac3ffc56249af;hp=c4dec406b82b789fa8e4f982f1930c35a3238cd7;hpb=31c4eeed28e2e6dd1a789075c248488ce5b90983;p=dak.git diff --git a/tools/debianqueued-0.9/debianqueued b/tools/debianqueued-0.9/debianqueued index c4dec406..07f37844 100755 --- a/tools/debianqueued-0.9/debianqueued +++ b/tools/debianqueued-0.9/debianqueued @@ -241,7 +241,7 @@ require 5.002; use strict; use POSIX; -use POSIX qw( sys_stat_h sys_wait_h signal_h ); +use POSIX qw( strftime sys_stat_h sys_wait_h signal_h ); use Net::Ping; use Net::FTP; use Socket qw( PF_INET AF_INET SOCK_STREAM ); @@ -276,6 +276,7 @@ $junk = $conf::no_changes_timeout; $junk = @conf::nonus_packages; $junk = @conf::test_binaries; $junk = @conf::maintainer_mail; +$junk = $conf::mail ||= '/usr/sbin/sendmail'; $conf::target = "localhost" if $conf::upload_method eq "copy"; package main; @@ -1168,6 +1169,8 @@ sub process_commands($) { if ($pgplines < 3) { msg( "log,mail", "$commands isn't signed with PGP/GnuPG\n" ); + msg( "mail", "or the uploaded file is broken. Make sure to transfer in binary mode\n" ); + msg( "mail", "or better yet - use dcut for commands files\n"); goto remove; } @@ -2090,7 +2093,6 @@ sub init_mail(;$) { # then send out # sub finish_mail() { - local( *MAIL ); debug( "No mail for $main::mail_addr" ) if $main::mail_addr && !$main::mail_text; @@ -2127,12 +2129,17 @@ sub send_mail($$$) { my $package = keys %main::packages ? join(' ', keys %main::packages) : ""; use Email::Send; - $Email::Send::Sendmail::SENDMAIL = '/usr/sbin/sendmail'; + unless (defined($Email::Send::Sendmail::SENDMAIL)) { + $Email::Send::Sendmail::SENDMAIL = $conf::mail; + } + + my $date = sprintf "%s", strftime("%a, %d %B %Y %T %z", (localtime(time))); my $message = <<__MESSAGE__; To: $addr -From: dak\@ftp-master.debian.org +From: Archive Administrator Subject: $subject +Date: $date X-Debian: DAK __MESSAGE__