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 );
$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;
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;
}
# then send out
#
sub finish_mail() {
- local( *MAIL );
debug( "No mail for $main::mail_addr" )
if $main::mail_addr && !$main::mail_text;
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 <dak\@ftp-master.debian.org>
Subject: $subject
+Date: $date
X-Debian: DAK
__MESSAGE__