diff -Nur netqmail-1.06/FILES netqmail-1.06-period/FILES
--- netqmail-1.06/FILES	Fri Nov 30 21:22:54 2007
+++ netqmail-1.06-period/FILES	Fri Dec 14 22:03:54 2018
@@ -432,3 +432,5 @@
 tcp-environ.5
 constmap.h
 constmap.c
+period.c
+period.1
diff -Nur netqmail-1.06/Makefile netqmail-1.06-period/Makefile
--- netqmail-1.06/Makefile	Fri Nov 30 21:22:54 2007
+++ netqmail-1.06-period/Makefile	Fri Dec 14 21:59:49 2018
@@ -808,7 +808,7 @@
 forward preline condredirect bouncesaying except maildirmake \
 maildir2mbox maildirwatch qail elq pinq idedit install-big install \
 instcheck home home+df proc proc+df binm1 binm1+df binm2 binm2+df \
-binm3 binm3+df
+binm3 binm3+df period
 
 load: \
 make-load warn-auto.sh systype
@@ -935,7 +935,7 @@
 maildir2mbox.0 maildirwatch.0 qmail.0 qmail-limits.0 qmail-log.0 \
 qmail-control.0 qmail-header.0 qmail-users.0 dot-qmail.0 \
 qmail-command.0 tcp-environ.0 maildir.0 mbox.0 addresses.0 \
-envelopes.0 forgeries.0
+envelopes.0 forgeries.0 period.0
 
 mbox.0: \
 mbox.5
@@ -992,6 +992,18 @@
 compile open_write.c open.h
 	./compile open_write.c
 
+period: \
+load period.o strerr.a error.a substdio.a str.a wait.a now.o fs.a
+	./load period strerr.a error.a substdio.a str.a wait.a now.o fs.a
+
+period.0: \
+period.1
+	nroff -man period.1 > period.0
+
+period.o: \
+compile period.c fork.h strerr.h wait.h error.h exit.h now.h scan.h
+	./compile period.c
+
 pinq: \
 warn-auto.sh pinq.sh conf-qmail conf-break conf-split
 	cat warn-auto.sh pinq.sh \
@@ -1827,7 +1839,8 @@
 ipalloc.h ipalloc.c select.h1 select.h2 trysysel.c ndelay.h ndelay.c \
 ndelay_off.c direntry.3 direntry.h1 direntry.h2 trydrent.c prot.h \
 prot.c chkshsgr.c warn-shsgr tryshsgr.c ipme.h ipme.c trysalen.c \
-maildir.5 maildir.h maildir.c tcp-environ.5 constmap.h constmap.c
+maildir.5 maildir.h maildir.c tcp-environ.5 constmap.h constmap.c \
+period.c period.1
 	shar -m `cat FILES` > shar
 	chmod 400 shar
 
diff -Nur netqmail-1.06/TARGETS netqmail-1.06-period/TARGETS
--- netqmail-1.06/TARGETS	Mon Jun 15 12:53:16 1998
+++ netqmail-1.06-period/TARGETS	Fri Dec 14 22:03:54 2018
@@ -385,3 +385,6 @@
 man
 setup
 check
+period
+period.o
+period.0
diff -Nur netqmail-1.06/hier.c netqmail-1.06-period/hier.c
--- netqmail-1.06/hier.c	Mon Jun 15 12:53:16 1998
+++ netqmail-1.06-period/hier.c	Fri Dec 14 22:03:54 2018
@@ -137,6 +137,7 @@
   c(auto_qmail,"bin","condredirect",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","bouncesaying",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","except",auto_uido,auto_gidq,0755);
+  c(auto_qmail,"bin","period",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","maildirmake",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","maildir2mbox",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","maildirwatch",auto_uido,auto_gidq,0755);
@@ -180,6 +181,8 @@
   c(auto_qmail,"man/cat1","bouncesaying.0",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/man1","except.1",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/cat1","except.0",auto_uido,auto_gidq,0644);
+  c(auto_qmail,"man/man1","period.1",auto_uido,auto_gidq,0644);
+  c(auto_qmail,"man/cat1","period.0",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/man1","maildirmake.1",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/cat1","maildirmake.0",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/man1","maildir2mbox.1",auto_uido,auto_gidq,0644);
diff -Nur netqmail-1.06/install-big.c netqmail-1.06-period/install-big.c
--- netqmail-1.06/install-big.c	Mon Jun 15 12:53:16 1998
+++ netqmail-1.06-period/install-big.c	Fri Dec 14 22:03:54 2018
@@ -137,6 +137,7 @@
   c(auto_qmail,"bin","condredirect",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","bouncesaying",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","except",auto_uido,auto_gidq,0755);
+  c(auto_qmail,"bin","period",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","maildirmake",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","maildir2mbox",auto_uido,auto_gidq,0755);
   c(auto_qmail,"bin","maildirwatch",auto_uido,auto_gidq,0755);
@@ -180,6 +181,8 @@
   c(auto_qmail,"man/cat1","bouncesaying.0",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/man1","except.1",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/cat1","except.0",auto_uido,auto_gidq,0644);
+  c(auto_qmail,"man/man1","period.1",auto_uido,auto_gidq,0644);
+  c(auto_qmail,"man/cat1","period.0",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/man1","maildirmake.1",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/cat1","maildirmake.0",auto_uido,auto_gidq,0644);
   c(auto_qmail,"man/man1","maildir2mbox.1",auto_uido,auto_gidq,0644);
diff -Nur netqmail-1.06/period.1 netqmail-1.06-period/period.1
--- netqmail-1.06/period.1	Thu Jan  1 01:00:00 1970
+++ netqmail-1.06-period/period.1	Fri Dec 14 21:55:34 2018
@@ -0,0 +1,22 @@
+.TH except 1
+.SH NAME
+period \- excute program only in a certain time period
+.SH SYNOPSIS
+.B period
+.I from
+.I to
+.I program
+[
+.I arg ...
+]
+.SH DESCRIPTION
+.B period
+runs
+.I program
+with the given arguments if the current
+time lies between from and to, written as
+seconds since Jan 1, 1970.
+
+.SH "SEE ALSO"
+bouncesaying(1),
+condredirect(1)
diff -Nur netqmail-1.06/period.c netqmail-1.06-period/period.c
--- netqmail-1.06/period.c	Thu Jan  1 01:00:00 1970
+++ netqmail-1.06-period/period.c	Fri Dec 14 21:55:34 2018
@@ -0,0 +1,47 @@
+#include "fork.h"
+#include "strerr.h"
+#include "wait.h"
+#include "error.h"
+#include "exit.h"
+#include "now.h"
+#include "scan.h"
+
+#define FATAL "period: fatal: "
+
+int main(argc,argv)
+int argc;
+char **argv;
+{
+  int pid;
+  int wstat;
+  unsigned long time;
+  unsigned long param;
+
+  if (!argv[1] || !argv[2] || !argv[3])
+    strerr_die1x(100,"period: usage: period from to program [ arg ... ]");
+
+  time = now();
+  scan_ulong(argv[1], &param);
+  if (time < param) _exit(0);
+  scan_ulong(argv[2], &param);
+  if (time > param) _exit(0);
+
+  pid = fork();
+  if (pid == -1)
+    strerr_die2sys(111,FATAL,"unable to fork: ");
+  if (pid == 0) {
+    execvp(argv[3],argv + 3);
+    if (error_temp(errno)) _exit(111);
+    _exit(100);
+  }
+
+  if (wait_pid(&wstat,pid) == -1)
+    strerr_die2x(111,FATAL,"wait failed");
+  if (wait_crashed(wstat))
+    strerr_die2x(111,FATAL,"child crashed");
+  switch(wait_exitcode(wstat)) {
+    case 0: break;
+    case 111: strerr_die2x(111,FATAL,"temporary child error");
+    default: _exit(0);
+  }
+}
