summaryrefslogtreecommitdiff
path: root/mail/deliver
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2001-04-27 14:06:05 +0000
committerwiz <wiz@pkgsrc.org>2001-04-27 14:06:05 +0000
commit2705e5091e52029d8e7c6e00e761151a6047b496 (patch)
treedfbb0b62019cc23fccc083471c1b0c6ad9bf6a56 /mail/deliver
parent27dbc84921ea3607a22cab5d18a80f83dc02117a (diff)
downloadpkgsrc-2705e5091e52029d8e7c6e00e761151a6047b496.tar.gz
Initial import of deliver-2.1.14, provided by Jim Bernard in pkg/9317.
Extract from DESCR: Deliver allows any user to write a shell script that processes all incoming mail messages for that user. The system administrator may also install scripts that process all messages. The output of a script is a list of mail addresses, files and programs that should receive the message. It has access to each message as it is processed, so the action can be content dependent. The script may also generate automatic replies, like the "vacation" program, or pass along a modified version of the original message.
Diffstat (limited to 'mail/deliver')
-rw-r--r--mail/deliver/Makefile53
-rw-r--r--mail/deliver/distinfo10
-rw-r--r--mail/deliver/patches/patch-aa40
-rw-r--r--mail/deliver/patches/patch-ab46
-rw-r--r--mail/deliver/patches/patch-ac21
-rw-r--r--mail/deliver/patches/patch-ad52
-rw-r--r--mail/deliver/patches/patch-ae26
-rw-r--r--mail/deliver/patches/patch-af32
-rw-r--r--mail/deliver/patches/patch-ag85
-rw-r--r--mail/deliver/pkg/DESCR20
-rw-r--r--mail/deliver/pkg/PLIST19
11 files changed, 404 insertions, 0 deletions
diff --git a/mail/deliver/Makefile b/mail/deliver/Makefile
new file mode 100644
index 00000000000..0642acf4f36
--- /dev/null
+++ b/mail/deliver/Makefile
@@ -0,0 +1,53 @@
+# $NetBSD: Makefile,v 1.1.1.1 2001/04/27 14:06:05 wiz Exp $
+
+DISTNAME= deliver-2.1.14
+CATEGORIES= mail
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=deliver/}
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://deliver.sourceforge.net/
+COMMENT= Local mail delivery agent with shell-script control
+
+.include "../../mk/bsd.prefs.mk"
+
+# Deliver prefers to be installed suid root, but by default we don't do that.
+DELIVER_SUID?= NO
+
+# Use DELIVER_CONF_PREFIX from /etc/mk.conf, if defined.
+# If this specifies a directory that will contain files other than deliver's
+# delivery files, you may also want to add a suffix like "deliver.", to
+# identify the "sys", "post", and "err" delivery files as owned by deliver.
+DELIVER_CONF_PREFIX?= ${PREFIX}/etc/deliver/
+
+post-patch:
+ cd ${WRKSRC}; \
+ for FILE in config.h deliver.8; do \
+ ${MV} $${FILE} $${FILE}.bak; \
+ ${SED} -e 's#@DELIVER_CONF_PREFIX@#${DELIVER_CONF_PREFIX}#g' \
+ < $${FILE}.bak > $${FILE}; \
+ done; \
+ ${MV} deliver.8 deliver.1
+
+post-install:
+ cd ${WRKSRC}; \
+ for FILE in deliver.1 header.1; do \
+ CATFILE=`${BASENAME} $${FILE} .1`.0; \
+ ${NROFF} -man $${FILE} > $${CATFILE}; \
+ ${INSTALL_MAN} $${FILE} ${PREFIX}/man/man1; \
+ ${INSTALL_MAN} $${CATFILE} ${PREFIX}/man/cat1; \
+ done
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/deliver \
+ ${PREFIX}/share/examples/deliver
+ cd ${WRKSRC}; \
+ ${INSTALL_DATA} INSTALL MMDF README SENDMAIL \
+ ${PREFIX}/share/doc/deliver
+ cd ${WRKSRC}/samples; \
+ ${INSTALL_DATA} README p-aliases s-aliases u-chip u-notify u-vacation \
+ ${PREFIX}/share/examples/deliver
+.if defined(DELIVER_SUID) && ${DELIVER_SUID} == YES
+ ${CHOWN} root ${PREFIX}/bin/deliver
+ ${CHMOD} u+s ${PREFIX}/bin/deliver
+.endif
+
+.include "../../mk/bsd.pkg.mk"
+.include <bsd.man.mk>
diff --git a/mail/deliver/distinfo b/mail/deliver/distinfo
new file mode 100644
index 00000000000..3c1e7271147
--- /dev/null
+++ b/mail/deliver/distinfo
@@ -0,0 +1,10 @@
+
+SHA1 (deliver-2.1.14.tar.gz) = 77d591f29b8829b3c347eb107a427ad826ffca99
+Size (deliver-2.1.14.tar.gz) = 80892 bytes
+SHA1 (patch-aa) = 53e640ea5e5e5c92a29ffa4d49ac9d8c91e60b16
+SHA1 (patch-ab) = 719d400005844fe824bab7106c97f66e4c8867b3
+SHA1 (patch-ac) = 2f47891e3bc46aec12c93a647fbd751397b7d9fe
+SHA1 (patch-ad) = 0404e117fda6f03ddc99c819353925c8714fced2
+SHA1 (patch-ae) = a4e478765a240a2099c101ddd2d6abf3ddcf0ba2
+SHA1 (patch-af) = 88f00520492a1906e81627e4e4cd9ba6c3858eef
+SHA1 (patch-ag) = 1ea8ca73ce2f930444cdcb3a09f49a11926bf3da
diff --git a/mail/deliver/patches/patch-aa b/mail/deliver/patches/patch-aa
new file mode 100644
index 00000000000..70fae8ca7b9
--- /dev/null
+++ b/mail/deliver/patches/patch-aa
@@ -0,0 +1,40 @@
+$NetBSD: patch-aa,v 1.1.1.1 2001/04/27 14:06:05 wiz Exp $
+
+--- Makefile.orig Wed Dec 1 20:53:49 1999
++++ Makefile Sat Jan 29 15:21:49 2000
+@@ -74,13 +74,12 @@
+ #DELHOME = /usr/deliver
+ #HDEFS = -DDELHOME=\"$(DELHOME)\"
+ UDEFS =
+-OSHEADER = os-dummy.h
++OSHEADER = os-netbsd.h
+ DEFS = -Iconf -DOSINCLUDE=\"$(OSHEADER)\" $(HDEFS) $(UDEFS)
+-CFLAGS = -O $(DEFS)
+-LDFLAGS =
++CFLAGS += $(DEFS)
+ LIBS =
+ LINT = lint -x
+-BIN = /usr/bin
++BIN = ${PREFIX}/bin
+ #BIN = $(DELHOME)/bin
+ GROUP = root
+
+@@ -154,16 +153,8 @@
+ chmod 755 $$d ) || exit 1; \
+ done ;; \
+ esac
+- rm -f $(BIN)/deliver.O
+- -mv $(BIN)/deliver $(BIN)/deliver.O
+- $(COPY) deliver $(BIN)/deliver
+- chgrp $(GROUP) $(BIN)/deliver
+- chown root $(BIN)/deliver
+- chmod 4711 $(BIN)/deliver
+- rm -f $(BIN)/header.O
+- -mv $(BIN)/header $(BIN)/header.O
+- $(COPY) header $(BIN)/header
+- chmod 755 $(BIN)/header
++ ${BSD_INSTALL_PROGRAM} -m 0511 deliver ${BIN}
++ ${BSD_INSTALL_PROGRAM} header ${BIN}
+
+ #
+ # How to compile and link the program.
diff --git a/mail/deliver/patches/patch-ab b/mail/deliver/patches/patch-ab
new file mode 100644
index 00000000000..88267a1c3d5
--- /dev/null
+++ b/mail/deliver/patches/patch-ab
@@ -0,0 +1,46 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/04/27 14:06:05 wiz Exp $
+
+--- config.h.orig Wed Dec 1 19:16:21 1999
++++ config.h Sat Jan 29 16:52:37 2000
+@@ -62,7 +62,7 @@
+ * Define it here, or edit Makefile thus: "UDEFS = -DHAS_NFS".
+ */
+
+-/* #define HAS_NFS */
++#define HAS_NFS
+
+ /*----------------------------------------------------------------------
+ * Get operating system configuration.
+@@ -122,7 +122,7 @@
+ #define UUX_ARGCOUNT 16
+ #define UUX_ARGSIZE 512
+ #define UUX_OPTS "-r"
+-#define UUX_DASH_A
++#undef UUX_DASH_A
+
+ /*----------------------------------------------------------------------
+ * Default shell for executing delivery files and pipes.
+@@ -197,9 +197,9 @@
+ #define POST_DELIVER "lib/post"
+ #define ERR_DELIVER "lib/err"
+ #else
+-#define SYS_DELIVER "/usr/local/lib/deliver.sys"
+-#define POST_DELIVER "/usr/local/lib/deliver.post"
+-#define ERR_DELIVER "/usr/local/lib/deliver.err"
++#define SYS_DELIVER "@DELIVER_CONF_PREFIX@sys"
++#define POST_DELIVER "@DELIVER_CONF_PREFIX@post"
++#define ERR_DELIVER "@DELIVER_CONF_PREFIX@err"
+ #endif
+
+ #define USER_DELIVER ".deliver"
+@@ -228,8 +228,8 @@
+ #define LOG "log/logfile"
+ #define ERRLOG "log/errlog"
+ #else
+-#define LOG "/usr/adm/deliver.log"
+-#define ERRLOG "/usr/adm/deliver.errlog"
++#define LOG "/var/log/deliver.log"
++#define ERRLOG "/var/log/deliver.errlog"
+ #endif
+
+ #define LOGLOCK "/tmp/dl.loglock"
diff --git a/mail/deliver/patches/patch-ac b/mail/deliver/patches/patch-ac
new file mode 100644
index 00000000000..87365fc6a27
--- /dev/null
+++ b/mail/deliver/patches/patch-ac
@@ -0,0 +1,21 @@
+$NetBSD: patch-ac,v 1.1.1.1 2001/04/27 14:06:05 wiz Exp $
+
+--- misc.h.orig Wed Dec 1 19:16:21 1999
++++ misc.h Sat Jan 22 14:50:17 2000
+@@ -86,16 +86,6 @@
+ * Declare library functions.
+ */
+
+-extern char *ctime();
+-extern char *asctime();
+-extern char *getenv();
+-extern char *getlogin();
+-extern char *mktemp();
+-extern int putenv();
+-extern long lseek();
+-extern long time();
+-extern void exit();
+-
+ #ifdef DECLARE_SIGNAL
+ extern SIGTYPE(*signal()) ();
+ #endif
diff --git a/mail/deliver/patches/patch-ad b/mail/deliver/patches/patch-ad
new file mode 100644
index 00000000000..64f1f151f19
--- /dev/null
+++ b/mail/deliver/patches/patch-ad
@@ -0,0 +1,52 @@
+$NetBSD: patch-ad,v 1.1.1.1 2001/04/27 14:06:05 wiz Exp $
+
+--- unctime.y.orig Wed Dec 1 19:16:21 1999
++++ unctime.y Sun Jan 30 08:41:53 2000
+@@ -80,6 +80,9 @@
+ # define USE_FTIME
+ # endif
+ #endif
++#ifdef HAS_MKTIME
++# define USE_MKTIME
++#endif
+
+ #ifdef USE_GETTOD
+ # include <sys/time.h>
+@@ -331,6 +334,7 @@
+ /* Is y a leap year? */
+ #define leap(y) (((y) % 4 == 0 && (y) % 100 != 0) || (y) % 400 == 0)
+
++#ifndef USE_MKTIME
+ /* Number of leap years from 1970 to y (not including y itself) */
+ #define nleap(y) (((y) - 1969) / 4 - ((y) - 1901) / 100 + ((y) - 1601) / 400)
+
+@@ -484,6 +488,7 @@
+ }
+
+ #endif /* not USE_GETTOD */
++#endif /* not USE_MKTIME */
+
+ static short monthlens[] =
+ {
+@@ -563,6 +568,15 @@
+ return -1;
+ }
+
++#ifdef USE_MKTIME
++ tm->tm_year = year - 1900;
++ tm->tm_mon = month - 1;
++ tm->tm_mday = day;
++ tm->tm_hour = hour;
++ tm->tm_min = minute;
++ tm->tm_sec = second;
++ return mktime(tm);
++#else /* not USE_MKTIME */
+ /* Mostly for convenience in sunday() macro, we use zero-origin days. */
+ dayofyear = day - 1;
+ if (month > 2 && leap(year))
+@@ -581,4 +595,5 @@
+ - correction()
+ #endif
+ ;
++#endif /* not USE_MKTIME */
+ }
diff --git a/mail/deliver/patches/patch-ae b/mail/deliver/patches/patch-ae
new file mode 100644
index 00000000000..55dd52c18d5
--- /dev/null
+++ b/mail/deliver/patches/patch-ae
@@ -0,0 +1,26 @@
+$NetBSD: patch-ae,v 1.1.1.1 2001/04/27 14:06:05 wiz Exp $
+
+--- conf/finish-os.h.orig Wed Dec 1 19:16:36 1999
++++ conf/finish-os.h Sat Jan 29 20:43:18 2000
+@@ -87,8 +87,8 @@
+ * Validate time configuration.
+ */
+
+-#if !defined(HAS_TIMEZONE) && !defined(HAS_GETTOD) && !defined(HAS_FTIME)
+-ACK! "Define either HAS_TIMEZONE, HAS_GETTOD or HAS_FTIME.";
++#if !defined(HAS_TIMEZONE) && !defined(HAS_GETTOD) && !defined(HAS_MKTIME)
++ACK! "Define one of HAS_TIMEZONE, HAS_GETTOD or HAS_MKTIME.";
+ #endif
+
+ /*----------------------------------------------------------------------
+@@ -328,6 +328,10 @@
+ #define MBX_GROUP "mail"
+ #else
+ /* #define MBX_NAME "mbox" */
++#ifndef MBX_DIR
+ #define MBX_DIR "/usr/spool/mail"
++#endif
++#ifndef MBX_MODE
+ #define MBX_MODE 0600
++#endif
+ #endif
diff --git a/mail/deliver/patches/patch-af b/mail/deliver/patches/patch-af
new file mode 100644
index 00000000000..9b816f4faab
--- /dev/null
+++ b/mail/deliver/patches/patch-af
@@ -0,0 +1,32 @@
+$NetBSD: patch-af,v 1.1.1.1 2001/04/27 14:06:06 wiz Exp $
+
+--- /dev/null Sat Jan 29 20:16:40 2000
++++ conf/os-netbsd.h Sat Jan 29 20:47:21 2000
+@@ -0,0 +1,27 @@
++/*
++ * Deliver configuration for NetBSD.
++ *
++ */
++
++/* Mostly it's POSIX. */
++
++#include <base-posix.h>
++
++/* Then again... */
++
++#undef SAFEPATH
++#define SAFEPATH "/bin:/usr/bin:/usr/pkg/bin" /* Safe dirs for PATH */
++
++#undef SYSV_USRMAIL /* Mailboxes in /usr/mail, as per SysV */
++#define MBX_DIR "/var/mail"
++
++#undef HAS_TIMEZONE /* Has global variable timezone (SVID) */
++#define HAS_MKTIME /* Has mktime() */
++
++#define HAS_BASENAME /* Has basename() */
++#define HAS_LONGNAMES /* Long filenames (>14) supported */
++
++/* Note that we don't define HAS_USLEEP, since deliver wants to use it
++ * for sleeping for more than one second, but the implementation limits
++ * the sleep time to strictly less than one second.
++ */
diff --git a/mail/deliver/patches/patch-ag b/mail/deliver/patches/patch-ag
new file mode 100644
index 00000000000..a106790079d
--- /dev/null
+++ b/mail/deliver/patches/patch-ag
@@ -0,0 +1,85 @@
+$NetBSD: patch-ag,v 1.1.1.1 2001/04/27 14:06:06 wiz Exp $
+
+--- deliver.8.orig Wed Dec 1 20:54:02 1999
++++ deliver.8 Sat Jan 29 16:42:59 2000
+@@ -98,15 +98,15 @@
+ .TP
+ .BI \-s " system delivery file"
+ Specify an alternate system delivery file. The default is
+-.I /usr/local/lib/deliver.sys.
++.I @DELIVER_CONF_PREFIX@sys.
+ .TP
+ .BI \-p " post-user delivery file"
+ Specify an alternate post-user delivery file. The default is
+-.I /usr/local/lib/deliver.post.
++.I @DELIVER_CONF_PREFIX@post.
+ .TP
+ .BI \-e " error delivery file"
+ Specify an alternate error delivery file. The default is
+-.I /usr/local/lib/deliver.err.
++.I @DELIVER_CONF_PREFIX@err.
+ .TP
+ .BI \-u " user delivery file"
+ Specify an alternate user delivery file. The default is
+@@ -229,7 +229,7 @@
+ .TP
+ .I "system delivery file"
+ The system delivery file, if it exists, is created by the postmaster.
+-By default, it is named ``/usr/local/lib/deliver.sys''. It controls
++By default, it is named ``@DELIVER_CONF_PREFIX@sys''. It controls
+ the delivery of all messages on the system where it is installed. It
+ is executed with arguments of the name(s) specified on the
+ .I Deliver
+@@ -245,7 +245,7 @@
+ .TP
+ .I "post-user delivery file"
+ The post-user delivery file, if it exists, is created by the
+-postmaster. By default, it is named ``/usr/local/lib/deliver.post''.
++postmaster. By default, it is named ``@DELIVER_CONF_PREFIX@post''.
+ It is executed after the system and user delivery files, but before
+ any attempt at message delivery. Its arguments are those addresses
+ which are about to receive the message, whether those addresses
+@@ -258,7 +258,7 @@
+ .TP
+ .I "error delivery file"
+ The error delivery file, if it exists, is created by the postmaster.
+-By default, it is named ``/usr/local/lib/deliver.err''. After
++By default, it is named ``@DELIVER_CONF_PREFIX@err''. After
+ .I Deliver
+ has attempted delivery to all requested destinations, and if delivery
+ to one or more of those destinations failed,
+@@ -467,9 +467,9 @@
+ .SH LOGGING
+ .I Deliver
+ records its activity in two files: the ``delivery log'', named
+-.IR /usr/adm/deliver.log,
++.IR /var/log/deliver.log,
+ and the ``error log'', named
+-.IR /usr/adm/deliver.errlog.
++.IR /var/log/deliver.errlog.
+ .PP
+ The deliver log is a record of activity of each
+ .I Deliver
+@@ -534,17 +534,17 @@
+ Neither, one or both of ML_DOTLOCK and ML_DOTMLK may be specified.
+ None or one of ML_LOCKF, ML_FCNTL or ML_LOCKING may be specified.
+ .SH FILES
+-/usr/local/lib/deliver.sys system delivery file
++@DELIVER_CONF_PREFIX@sys system delivery file
+ .br
+-/usr/local/lib/deliver.post post-user delivery file
++@DELIVER_CONF_PREFIX@post post-user delivery file
+ .br
+-/usr/local/lib/deliver.err error delivery file
++@DELIVER_CONF_PREFIX@err error delivery file
+ .br
+ ~user/.deliver user delivery file(s)
+ .br
+-/usr/adm/deliver.log delivery log
++/var/log/deliver.log delivery log
+ .br
+-/usr/adm/deliver.errlog error log
++/var/log/deliver.errlog error log
+ .br
+ /etc/systemid system name (Xenix only)
+ .SH SUPPORT
diff --git a/mail/deliver/pkg/DESCR b/mail/deliver/pkg/DESCR
new file mode 100644
index 00000000000..501ee590224
--- /dev/null
+++ b/mail/deliver/pkg/DESCR
@@ -0,0 +1,20 @@
+Deliver delivers E-Mail on the local system.
+
+Deliver allows any user to write a shell script that processes all
+incoming mail messages for that user. The system administrator may
+also install scripts that process all messages.
+
+The output of a script is a list of mail addresses, files and programs
+that should receive the message. It has access to each message as it
+is processed, so the action can be content dependent. The script may
+also generate automatic replies, like the "vacation" program, or pass
+along a modified version of the original message.
+
+Deliver can be used to construct mail-based services (e.g. automatic
+mailing list maintenance). It can also be used to filter mail
+automatically in prearranged ways (e.g. encryption and decryption,
+tossing junk mail, or vacation notices).
+
+Although deliver works best when installed set-user-id root, it can
+perform many of its functions even when installed in the private bin
+directory of a regular user.
diff --git a/mail/deliver/pkg/PLIST b/mail/deliver/pkg/PLIST
new file mode 100644
index 00000000000..1b1787574d8
--- /dev/null
+++ b/mail/deliver/pkg/PLIST
@@ -0,0 +1,19 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2001/04/27 14:06:06 wiz Exp $
+bin/deliver
+bin/header
+man/cat1/deliver.0
+man/cat1/header.0
+man/man1/deliver.1
+man/man1/header.1
+share/doc/deliver/INSTALL
+share/doc/deliver/MMDF
+share/doc/deliver/README
+share/doc/deliver/SENDMAIL
+share/examples/deliver/README
+share/examples/deliver/p-aliases
+share/examples/deliver/s-aliases
+share/examples/deliver/u-chip
+share/examples/deliver/u-notify
+share/examples/deliver/u-vacation
+@dirrm share/examples/deliver
+@dirrm share/doc/deliver