Date: 16 Nov 1998 21:35:27 -0000 From: Tom Hukins <tom@eborcom.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/8713: New Port: maildrop Message-ID: <19981116213527.267.qmail@eborcom.com>
next in thread | raw e-mail | index | archive | help
>Number: 8713 >Category: ports >Synopsis: New Port: maildrop >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Nov 16 13:50:01 PST 1998 >Last-Modified: >Originator: Tom Hukins >Organization: eBORcOM >Release: FreeBSD 2.2.7-STABLE i386 >Environment: >Description: This is a new port of maildrop, a replacement local mail delivery agent. Maildrop is similar to procmail but features many improvements. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # maildrop # maildrop/Makefile # maildrop/files # maildrop/files/md5 # maildrop/pkg # maildrop/pkg/COMMENT # maildrop/pkg/DESCR # maildrop/pkg/PLIST # maildrop/pkg/PLIST.nodocs # maildrop/patches # maildrop/patches/patch-aa # maildrop/patches/patch-ab # maildrop/scripts # maildrop/scripts/post-patch # echo c - maildrop mkdir -p maildrop > /dev/null 2>&1 echo x - maildrop/Makefile sed 's/^X//' >maildrop/Makefile << 'END-of-maildrop/Makefile' X# New ports collection makefile for: maildrop X# Version required: 0.55c X# Date created: 16 November 1998 X# Whom: Tom Hukins <tom@eborcom.com> X# X# $Id$ X# X XDISTNAME= maildrop-0.55c XCATEGORIES= mail XMASTER_SITES= http://www.geocities.com/SiliconValley/Peaks/5799/ X XMAINTAINER= tom@eborcom.com X XALL_TARGET= autoconf.h config.h all X X# Maildrop will be installed with suid permissions for MAILDROP_SUID, X# and sgid permissions for MAILDROP_SGID. If undefined, these values X# default to "root" and "mail" respectively, which should be suitable X# for most systems. X# X.if !defined(MAILDROP_SUID) XMAILDROP_SUID= root X.endif X.if !defined(MAILDROP_SGID) XMAILDROP_SGID= mail X.endif X XCONFIGURE_ARGS= --enable-syslog=1 \ X --enable-maildrop-uid="${MAILDROP_SUID}" \ X --enable-maildrop-gid="${MAILDROP_SGID}" XCONFIGURE_ENV+= CXX="${CXX}" \ X CXXFLAGS="${CXXFLAGS}" XGNU_CONFIGURE= yes X X.if defined(NOPORTDOCS) XPLIST= ${PKGDIR}/PLIST.nodocs XINSTALL_TARGET= install-exec all X.else XMAN1= dotlock.1 maildrop.1 reformail.1 XMAN5= maildropex.5 maildropfilter.5 XMANCOMPRESSED= yes X.endif X X.include <bsd.port.mk> END-of-maildrop/Makefile echo c - maildrop/files mkdir -p maildrop/files > /dev/null 2>&1 echo x - maildrop/files/md5 sed 's/^X//' >maildrop/files/md5 << 'END-of-maildrop/files/md5' XMD5 (maildrop-0.55c.tar.gz) = 4cde4a505ca9d9a5c00b29219d764e65 END-of-maildrop/files/md5 echo c - maildrop/pkg mkdir -p maildrop/pkg > /dev/null 2>&1 echo x - maildrop/pkg/COMMENT sed 's/^X//' >maildrop/pkg/COMMENT << 'END-of-maildrop/pkg/COMMENT' XReplacement local mail delivery agent, similar to procmail. END-of-maildrop/pkg/COMMENT echo x - maildrop/pkg/DESCR sed 's/^X//' >maildrop/pkg/DESCR << 'END-of-maildrop/pkg/DESCR' Xmaildrop is a replacement for your local mail delivery agent. maildrop Xreads a mail message from standard input, then delivers the message to Xyour mailbox. maildrop knows how to deliver mail to mbox-style Xmailboxes, and maildirs. "maildir" is a mailbox format used by the Qmail XMTA. X Xmaildrop can optionally read instructions from a file on how to filter Xincoming mail, and, based upon the instructions, deliver mail to Xalternate mailboxes, or forward it to somewhere else, like procmail. XUnlike procmail, maildrop uses a structured filtering language that's a Xbit easier on the eyes. X Xmaildrop is written in C++, and is significantly larger than procmail, Xin compiled form. However, it uses resources much more efficiently. XUnlike procmail, maildrop will not read a 10 megabyte mail message into Xmemory. Large messages are saved in a temporary file, and are filtered Xfrom that file. Files are saved in the user's home directory. If the Xstandard input to maildrop is a file, not a pipe, no temporary file will Xbe necessary. X Xmaildrop can be used with sendmail, Qmail, and other MTAs. X X Xhttp://www.geocities.com/SiliconValley/Peaks/5799/maildrop.README.html END-of-maildrop/pkg/DESCR echo x - maildrop/pkg/PLIST sed 's/^X//' >maildrop/pkg/PLIST << 'END-of-maildrop/pkg/PLIST' Xshare/doc/maildrop/reformail.html Xshare/doc/maildrop/maildropfilter.html Xshare/doc/maildrop/maildropex.html Xshare/doc/maildrop/maildrop.html Xshare/doc/maildrop/dotlock.html Xshare/doc/maildrop/README.html Xbin/reformail Xbin/maildrop.maildirmake Xbin/maildrop Xbin/maildirmake Xbin/dotlock X@dirrm share/doc/maildrop END-of-maildrop/pkg/PLIST echo x - maildrop/pkg/PLIST.nodocs sed 's/^X//' >maildrop/pkg/PLIST.nodocs << 'END-of-maildrop/pkg/PLIST.nodocs' Xbin/reformail Xbin/maildrop.maildirmake Xbin/maildrop Xbin/maildirmake Xbin/dotlock END-of-maildrop/pkg/PLIST.nodocs echo c - maildrop/patches mkdir -p maildrop/patches > /dev/null 2>&1 echo x - maildrop/patches/patch-aa sed 's/^X//' >maildrop/patches/patch-aa << 'END-of-maildrop/patches/patch-aa' X--- README.html.orig Fri Oct 30 05:15:08 1998 X+++ README.html Fri Nov 13 13:46:45 1998 X@@ -93,7 +93,7 @@ X of procmail. Here is the suggested entry for sendmail.cf, courtesy of Eric X J. Schwertfeger <ejs<TT>@</TT>bfd.com>: X <PRE> X-Mlocal, P=/usr/local/bin/maildrop, F=lsAw5:/|@SPfhn, S=10/30, R=20/40, X+Mlocal, P=!!PREFIX!!/bin/maildrop, F=lsAw5:/|@SPfhn, S=10/30, R=20/40, X T=DNS/RFC822/X-Unix, X A=maildrop -d $u</PRE> X You may also consider including the D, F, and M flags as well. X@@ -132,7 +132,7 @@ X <BR> X <LI> X V0.55 - added <TT>HOSTNAME</TT> and <TT>FROM</TT> environment variables. X-Added -f option. Added support for <TT>/etc/maildroprcs</TT> - see <TT>maildrop(1)</TT>. X+Added -f option. Added support for <TT>!!PREFIX!!/etc/maildroprcs</TT> - see <TT>maildrop(1)</TT>. X Fixed obscure bug that can trash a file descriptor.</LI> X X <BR> X--- maildrop.1.orig Fri Oct 30 05:15:08 1998 X+++ maildrop.1 Fri Nov 13 13:29:13 1998 X@@ -257,12 +257,12 @@ X If $HOME/.mailfilter does not exist, \fImaildrop\fP will simply X deliver the message to the user's mailbox. X .PP X-If the file /etc/maildroprc exists, \fImaildrop\fP will first read X+If the file !!PREFIX!!/etc/maildroprc exists, \fImaildrop\fP will first read X filtering instructions from this file, before reading $HOME/.mailfilter. X This allows the system administrator to provide global filtering instructions X for all users. X .PP X-NOTE - /etc/maildroprc is read only in delivery mode. X+NOTE - !!PREFIX!!/etc/maildroprc is read only in delivery mode. X .PP X .br X .br X@@ -300,21 +300,21 @@ X statement, and the \fIEXITCODE\fP environment variable. X .br X .br X-.SH "/ETC/MAILDROPRCS IN EMBEDDED MODE X+.SH "MAILDROPRCS IN EMBEDDED MODE X This is a new feature to version 0.55. If while running in embedded mode X \fImaildrop\fP encounters an include X-statement where the filename begins with /etc/maildroprcs/, the X+statement where the filename begins with !!PREFIX!!/etc/maildroprcs/, the X above restrictions for the embedded mode are suspended for the filter file X-in the /etc/maildroprcs directory, and any additional filter files X+in the !!PREFIX!!/etc/maildroprcs directory, and any additional filter files X that are included from there. The restrictions are reenabled once the \fImaildrop\fP X-finishes executing the filter file from /etc/maildroprcs. X+finishes executing the filter file from !!PREFIX!!/etc/maildroprcs. X .PP X This is primarily intended so that the system administrator to have X a controlled environment for running external commands (via the backticks, X or the xfilter command). X .PP X The name of the file may not contain any periods (so that a creative X-individual can't write include "/etc/maildroprcs/../../home/user/recipe"). X+individual can't write include "!!PREFIX!!/etc/maildroprcs/../../home/user/recipe"). X .PP X Before running the recipe, \fImaildrop\fP will automatically reset the following X variables to their initial values: DEFAULT, HOME, LOCKEXT, X@@ -323,7 +323,7 @@ X PATH, X SENDMAIL, and SHELL. Please note that the previous values X of these variables (if they were changed) will NOT be restored once \fImaildrop\fP X-finishes executing the recipe in /etc/maildroprcs. X+finishes executing the recipe in !!PREFIX!!/etc/maildroprcs. X .br X .br X .SH "WATCHDOG TIMER X@@ -339,7 +339,7 @@ X to set user's home directory, and related variables. X If NIS/YP is install, that will be used as well. X .TP 14 X-.B "/etc/maildroprc X+.B "!!PREFIX!!/etc/maildroprc X global filtering instructions for delivery mode. X .TP 14 X .B "/var/spool/mail X--- maildrop.html.orig Fri Oct 30 05:15:08 1998 X+++ maildrop.html Fri Nov 13 13:31:00 1998 X@@ -241,11 +241,11 @@ X if it does). X <P>If <TT>$HOME/.mailfilter</TT> does not exist, <I>maildrop</I> will simply X deliver the message to the user's mailbox. X-<P>If the file <TT>/etc/maildroprc</TT> exists, <I>maildrop</I> will first read X+<P>If the file <TT>!!PREFIX!!/etc/maildroprc</TT> exists, <I>maildrop</I> will first read X filtering instructions from this file, before reading <TT>$HOME/.mailfilter</TT>. X This allows the system administrator to provide global filtering instructions X for all users. X-<P>NOTE - <TT>/etc/maildroprc</TT> is read only in delivery mode. X+<P>NOTE - <TT>!!PREFIX!!/etc/maildroprc</TT> is read only in delivery mode. X <P><A NAME="embedded"></A> X <BR><BR> X <H2> X@@ -290,19 +290,19 @@ X statement, and the <I>EXITCODE</I> environment variable. X <BR><BR> X <H2> X-<TT>/ETC/MAILDROPRCS</TT> IN EMBEDDED MODE</H2> X+<TT>MAILDROPRCS</TT> IN EMBEDDED MODE</H2> X This is a new feature to version 0.55. If while running in embedded mode X <I>maildrop</I> encounters an <A HREF="maildropfilter.html#include">include</A> X-statement where the filename begins with <TT>/etc/maildroprcs/</TT>, the X+statement where the filename begins with <TT>!!PREFIX!!/etc/maildroprcs/</TT>, the X above restrictions for the embedded mode are suspended for the filter file X-in the <TT>/etc/maildroprcs</TT> directory, and any additional filter files X+in the <TT>!!PREFIX!!/etc/maildroprcs</TT> directory, and any additional filter files X that are included from there. The restrictions are reenabled once the <I>maildrop</I> X-finishes executing the filter file from <TT>/etc/maildroprcs</TT>. X+finishes executing the filter file from <TT>!!PREFIX!!/etc/maildroprcs</TT>. X <P>This is primarily intended so that the system administrator to have X a controlled environment for running external commands (via the backticks, X or the <A HREF="maildropfilter.html#xfilter">xfilter</A> command). X <P>The name of the file may not contain any periods (so that a creative X-individual can't write <TT>include "/etc/maildroprcs/../../home/user/recipe"</TT>). X+individual can't write <TT>include "!!PREFIX!!/etc/maildroprcs/../../home/user/recipe"</TT>). X <P>Before running the recipe, <I>maildrop</I> will automatically reset the following X variables to their initial values: <TT>DEFAULT</TT>, <TT>HOME</TT>, <TT>LOCKEXT</TT>, X <TT>LOCKSLEEP</TT>, X@@ -310,7 +310,7 @@ X <TT>PATH</TT>, X <TT>SENDMAIL</TT>, and <TT>SHELL</TT>. Please note that the previous values X of these variables (if they were changed) will NOT be restored once <I>maildrop</I> X-finishes executing the recipe in <TT>/etc/maildroprcs</TT>. X+finishes executing the recipe in <TT>!!PREFIX!!/etc/maildroprcs</TT>. X <BR><BR> X <H2> X WATCHDOG TIMER</H2> X@@ -328,7 +328,7 @@ X If NIS/YP is install, that will be used as well.</LI> X X <LI> X-<TT>/etc/maildroprc</TT> - global filtering instructions for delivery mode.</LI> X+<TT>!!PREFIX!!/etc/maildroprc</TT> - global filtering instructions for delivery mode.</LI> X X <LI> X <TT>/var/spool/mail</TT> - system mailbox (actual directory defined by X--- maildropfilter.5.orig Fri Oct 30 05:15:08 1998 X+++ maildropfilter.5 Fri Nov 13 13:32:08 1998 X@@ -14,7 +14,7 @@ X .br X .br X .SH "SYNOPSIS X-/etc/maildroprc, $HOME/.mailfilter, $HOME/.mailfilters/*, and friends... X+!!PREFIX!!/etc/maildroprc, $HOME/.mailfilter, $HOME/.mailfilters/*, and friends... X .br X .br X .SH "DESCRIPTION X--- maildropfilter.html.orig Fri Oct 30 05:15:08 1998 X+++ maildropfilter.html Fri Nov 13 13:39:31 1998 X@@ -24,7 +24,7 @@ X <BR><BR> X <H2> X SYNOPSIS</H2> X-<TT>/etc/maildroprc, $HOME/.mailfilter, $HOME/.mailfilters/*, and friends...</TT> X+<TT>!!PREFIX!!/etc/maildroprc, $HOME/.mailfilter, $HOME/.mailfilters/*, and friends...</TT> X <BR><BR> X <H2> X DESCRIPTION</H2> X--- main.C.orig Fri Oct 30 05:15:05 1998 X+++ main.C Fri Nov 13 13:40:54 1998 X@@ -404,11 +404,11 @@ X Recipe r; X Lexer in; X X- fd=in.Open("/etc/maildroprc"); X+ fd=in.Open("!!PREFIX!!/etc/maildroprc"); X if (fd < 0) X { X if (errno != ENOENT) X- throw "Error opening /etc/maildroprc."; X+ throw "Error opening !!PREFIX!!/etc/maildroprc."; X } X else X { X--- recipenode.C.orig Fri Oct 30 05:15:06 1998 X+++ recipenode.C Fri Nov 13 13:41:48 1998 X@@ -38,7 +38,7 @@ X // Utility class to save and restore the status of the embedded_mode flag. X // X // Embedded mode can be temporarily disabled by including something from X-// /etc/maildroprcs. X+// !!PREFIX!!/etc/maildroprcs. X // X X class MaildropSaveEM { X@@ -783,7 +783,7 @@ X Recipe r; X Lexer in; X MaildropSaveEM save_embedded_mode; X- static const char embedded_mode_directory[]="/etc/maildroprcs/"; X+ static const char embedded_mode_directory[]="!!PREFIX!!/etc/maildroprcs/"; X X if (strncmp( (const char *)b, embedded_mode_directory, X sizeof(embedded_mode_directory)-1) == 0 && END-of-maildrop/patches/patch-aa echo x - maildrop/patches/patch-ab sed 's/^X//' >maildrop/patches/patch-ab << 'END-of-maildrop/patches/patch-ab' X--- Makefile.in.orig Fri Oct 30 05:15:10 1998 X+++ Makefile.in Fri Nov 13 15:46:32 1998 X@@ -120,7 +120,7 @@ X X man_MANS = dotlock.1 maildrop.1 maildropex.5 maildropfilter.5 reformail.1 X X-htmldir = $(prefix)/doc/$(distdir) X+htmldir = $(prefix)/share/doc/maildrop X html_DATA = README.html dotlock.html maildrop.html maildropex.html \ X maildropfilter.html reformail.html X END-of-maildrop/patches/patch-ab echo c - maildrop/scripts mkdir -p maildrop/scripts > /dev/null 2>&1 echo x - maildrop/scripts/post-patch sed 's/^X//' >maildrop/scripts/post-patch << 'END-of-maildrop/scripts/post-patch' X#!/bin/sh X# X# Convert !!PREFIX!! to ${PREFIX} in patched files X# X XFILES="README.html maildrop.1 maildrop.html maildropfilter.5 \ X maildropfilter.html main.C recipenode.C" X Xcd ${WRKSRC} X Xfor f in $FILES; do X mv $f $f.bak && X sed <$f.bak >$f s+!!PREFIX!!+$PREFIX+g Xdone END-of-maildrop/scripts/post-patch exit >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981116213527.267.qmail>