From 57feb4541b46272529218b39260014914a41119b Mon Sep 17 00:00:00 2001 From: avsm Date: Mon, 9 Oct 2000 22:29:05 +0000 Subject: [PATCH] import maildrop-1.2 This one has been pending for around two months because it installs root suid files. The port strips these out by default, and pkg/SECURITY has details on if they need to be reenabled. qmail at least doesnt need it, others can probably be configured to not. (naddy@ and avsm@ discussed this) -- maildrop is a replacement for your local mail delivery agent. It reads a mail message from standard input, then delivers the message to your mailbox. maildrop knows how to deliver mail to mbox-style mailboxes, and maildirs. maildrop will optionally read instructions from a file, which describes how to filter incoming mail. Instructions can be provided having mail delivered to alternate mailboxes, or forwarded somewhere else. Unlike procmail, maildrop uses a structured filtering language. maildrop is written in C++, and is significantly larger than procmail in compiled form. However, it uses resources much more efficiently. Unlike procmail, maildrop will not read a 10 megabyte mail message into memory. Large messages are saved in a temporary file, and are filtered from the temporary file. --- mail/maildrop/Makefile | 34 ++++++++++++++++++++++++++++++++++ mail/maildrop/files/md5 | 3 +++ mail/maildrop/pkg/COMMENT | 1 + mail/maildrop/pkg/DESCR | 15 +++++++++++++++ mail/maildrop/pkg/MESSAGE | 15 +++++++++++++++ mail/maildrop/pkg/PLIST | 35 +++++++++++++++++++++++++++++++++++ mail/maildrop/pkg/SECURITY | 27 +++++++++++++++++++++++++++ 7 files changed, 130 insertions(+) create mode 100644 mail/maildrop/Makefile create mode 100644 mail/maildrop/files/md5 create mode 100644 mail/maildrop/pkg/COMMENT create mode 100644 mail/maildrop/pkg/DESCR create mode 100644 mail/maildrop/pkg/MESSAGE create mode 100644 mail/maildrop/pkg/PLIST create mode 100644 mail/maildrop/pkg/SECURITY diff --git a/mail/maildrop/Makefile b/mail/maildrop/Makefile new file mode 100644 index 00000000000..314cd3448d3 --- /dev/null +++ b/mail/maildrop/Makefile @@ -0,0 +1,34 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2000/10/09 22:29:05 avsm Exp $ + +DISTNAME= maildrop-1.2 +CATEGORIES= mail +NEED_VERSION= 1.338 + +HOMEPAGE= http://www.flounder.net/~mrsam/maildrop/ +MAINTAINER= Anil Madhavapeddy + +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= courier + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +SEPARATE_BUILD= concurrent +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS= --datadir=${PREFIX}/share/doc \ + --enable-sendmail=/usr/sbin/sendmail \ + --enable-maildrop-gid=bin \ + --disable-tempdir --enable-restricted-trusted=1 + +DOCFILES= README INSTALL UPGRADE README.postfix + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/maildrop +.for i in ${DOCFILES} + ${INSTALL_DATA} ${WRKSRC}/$i ${PREFIX}/share/doc/maildrop +.endfor + +.include diff --git a/mail/maildrop/files/md5 b/mail/maildrop/files/md5 new file mode 100644 index 00000000000..bc02c7f3ea2 --- /dev/null +++ b/mail/maildrop/files/md5 @@ -0,0 +1,3 @@ +MD5 (maildrop-1.2.tar.gz) = 17bad84195f8544da2b41f9a8d537e76 +RMD160 (maildrop-1.2.tar.gz) = 58f2452a7148ef1de3c868f1b0ffb6913568d5a3 +SHA1 (maildrop-1.2.tar.gz) = 9372dab47c7ad67e92bead63d3388e19ab00b040 diff --git a/mail/maildrop/pkg/COMMENT b/mail/maildrop/pkg/COMMENT new file mode 100644 index 00000000000..4c6b1a7e114 --- /dev/null +++ b/mail/maildrop/pkg/COMMENT @@ -0,0 +1 @@ +local mail delivery agent with filtering abilities diff --git a/mail/maildrop/pkg/DESCR b/mail/maildrop/pkg/DESCR new file mode 100644 index 00000000000..88c60ba08e9 --- /dev/null +++ b/mail/maildrop/pkg/DESCR @@ -0,0 +1,15 @@ +maildrop is a replacement for your local mail delivery agent. It +reads a mail message from standard input, then delivers the message +to your mailbox. maildrop knows how to deliver mail to mbox-style +mailboxes, and maildirs. + +maildrop will optionally read instructions from a file, which +describes how to filter incoming mail. Instructions can be provided +having mail delivered to alternate mailboxes, or forwarded somewhere +else. Unlike procmail, maildrop uses a structured filtering language. + +maildrop is written in C++, and is significantly larger than procmail +in compiled form. However, it uses resources much more efficiently. +Unlike procmail, maildrop will not read a 10 megabyte mail message +into memory. Large messages are saved in a temporary file, and are +filtered from the temporary file. diff --git a/mail/maildrop/pkg/MESSAGE b/mail/maildrop/pkg/MESSAGE new file mode 100644 index 00000000000..bd995cbb280 --- /dev/null +++ b/mail/maildrop/pkg/MESSAGE @@ -0,0 +1,15 @@ + +============================================================== +The documentation for maildrop has been installed in +${PREFIX}/share/doc/maildrop. + +You should also read the pkg/SECURITY file now, as it has +some important information regarding the setuid/setgid +bits that some of the binaries that have been installed +may need for correct operation. + +There are currently NO setuid/gid bits enabled, but if you +use maildrop in certain capacities, these will need to be +set to allow maildrop to function correctly. +============================================================== + diff --git a/mail/maildrop/pkg/PLIST b/mail/maildrop/pkg/PLIST new file mode 100644 index 00000000000..5614c44771b --- /dev/null +++ b/mail/maildrop/pkg/PLIST @@ -0,0 +1,35 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2000/10/09 22:29:05 avsm Exp $ +@mode 0555 +bin/dotlock +bin/maildirmake +bin/maildrop +bin/makemime +bin/reformail +bin/reformime +@mode +man/man1/dotlock.1 +man/man1/maildrop.1 +man/man1/makemime.1 +man/man1/reformail.1 +man/man1/reformime.1 +man/man5/maildropex.5 +man/man5/maildropfilter.5 +man/man5/maildropgdbm.5 +man/man8/maildirquota.8 +share/doc/maildrop/INSTALL +share/doc/maildrop/README +share/doc/maildrop/README.postfix +share/doc/maildrop/UPGRADE +share/doc/maildrop/html/dotlock.html +share/doc/maildrop/html/maildirmake.html +share/doc/maildrop/html/maildrop.html +share/doc/maildrop/html/maildropex.html +share/doc/maildrop/html/maildropfilter.html +share/doc/maildrop/html/maildropgdbm.html +share/doc/maildrop/html/makemime.html +share/doc/maildrop/html/reformail.html +share/doc/maildrop/html/reformime.html +share/doc/maildrop/html/rfc2045.html +share/doc/maildrop/html/rfc822.html +@dirrm share/doc/maildrop/html +@dirrm share/doc/maildrop diff --git a/mail/maildrop/pkg/SECURITY b/mail/maildrop/pkg/SECURITY new file mode 100644 index 00000000000..f1bf7f9ae43 --- /dev/null +++ b/mail/maildrop/pkg/SECURITY @@ -0,0 +1,27 @@ +Maildrop must be run as the uid/gid of the user whose mailbox it +is delivering to. + +Therefore, if the MTA does not spawn it with the correct uid/gid, +it needs to be suid root to perform the operation itself. + +The port is installed with the suid bit stripped by default. This +works out-of-the-box with MTAs like qmail, which spawn maildrop +with the correct uid/gid it needs to perform the delivery. + +For more information, please read the documentation in +${PREFIX}/share/doc/maildrop/INSTALL. It should be safe to enable +the suid bits, but scan over the code first and satisfy yourself +that there are no security holes. + +If you perform a full audit, please inform and +the suid bit may then be enabled by default. Note that there have +been no security advisories about this package in the past. + +The following files will need suid re-enabled if you so choose: + +${PREFIX}/bin/maildrop +${PREFIX}/bin/dotlock +${PREFIX}/bin/reformail + +Anil Madhavapeddy, +$OpenBSD: SECURITY,v 1.1.1.1 2000/10/09 22:29:05 avsm Exp $