last if m/^$/;
if (m/^(yes|no|force)$/) { m/^./; $mode= $&; $domail=''; }
elsif (m/^nothing$/) { $mode= 'x'; $domail=''; }
- elsif (m/^mail\-(first|middle|final)/) { $mode='n'; $domail=$1; }
+ elsif (m/^mail\-(first|middle|final|final-test)/) {
+ $mode='n';
+ $domail=$1;
+ }
elsif (m/^all$/) { $doall=1; }
elsif (m/^config$/) { $etcfile= loarg(); $where= '--config option'; }
elsif (m/^glueless$/) { $needglue=0; }
close $progress_fh or die "$quis: close ${m_base}_history: $!\n";
$progress_fh= $warn_fh= 'STDERR';
- if ($domail eq 'final') {
+ if ($domail =~ m/^final/) {
if (100*@m_fail <= $$cfg{'mailmwarn'}*(@m_fail + @m_ok)) {
printf " %-40s ok\n" or die "$quis: mail ok report: $!\n";
} elsif (zone_style('@',0)) {
}
@m_fail= @m_ok= ('','')
- if $domail eq 'final';
+ if $domail =~ m/^final/;
printf $m_info "%s %s %s %s \n",
$m_time, $m_lastok, join(':',@m_ok), join(':',@m_fail)
END
;
pmail("To: ");
- pmail("SOA MNAME for $zone <$zone_to>\nCC: ")
- if length($zone_to);
+ pmail("(testing!) ") if $domail ne 'final';
+ pmail("SOA MNAME for $zone <$zone_to>\nCC: ") if length($zone_to);
pmail($$cfg{'admin'}."\n\n");
pmail <<END
You are receiving this mail because your email address is listed
defined($c= fork) or die "$quis: fork for mail: $!\n";
if (!$c) {
open STDIN, "<& ${m_m}" or die "$quis - sendmail: dup for stdin: $!\n";
- exec '/usr/sbin/sendmail','-odq','-oee','-oi',
- 'ijackson@chiark.greenend.org.uk'; # should be -t
+ exec (qw(/usr/sbin/sendmail -odq -oee -oi),
+ ($domail eq 'final' ? '-t' : $$cfg{'admin'}));
die "$quis - sendmail: exec: $!\n";
}
$m_m->close;
SOA MNAME or local administrator, if too many of the calls had errors
or warnings (calls before the most recent \-\-mail\-first being
ignored).
+.TP
+.B \-mail\-final\-test
+just like \-\-mail\-final except that it always sends mail to the
+local server admin and never to remote zone contacts, adding
+.B (testing!)
+to the start of the To: field.
.LP
Alternatively, one or more zone names may be supplied as arguments, in
which case their delegations will be checked, and compared with the