qmail is a secure, reliable, efficient, simple message transfer agent.

It is meant as a replacement for the entire sendmail-binmail system on
typical Internet-connected UNIX hosts.

Submitted by:	Camiel Dobbelaar <cd@sentia.nl>
This commit is contained in:
kevlo 2000-01-28 12:43:40 +00:00
parent 15dc5d01fd
commit fdbf4edf51
7 changed files with 532 additions and 0 deletions

39
mail/qmail/Makefile Normal file
View File

@ -0,0 +1,39 @@
# $OpenBSD: Makefile,v 1.1.1.1 2000/01/28 12:43:40 kevlo Exp $
DISTNAME= qmail-1.03
CATEGORIES= mail
MAINTAINER= cd@sentia.nl
MASTER_SITES= ftp://ftp.net.ohio-state.edu/pub/networking/mail/qmail/ \
ftp://ftp.ntnu.no/pub/unix/mail/qmail/ \
ftp://ftp.mira.net.au/unix/mail/qmail/ \
ftp://ftp.id.wustl.edu/pub/qmail/ \
ftp://mirror.uk.uu.net/pub/qmail/ \
ftp://ftp.jp.qmail.org/qmail/ \
http://ftp.rifkin.technion.ac.il/pub/qmail/ \
http://koobera.math.uic.edu/www/software/ \
http://pobox.com/~djb/software/
PREFIX= /var/qmail
NO_CONFIGURE= yes
ALL_TARGET= default
INSTALL_TARGET= setup check
NO_MTREE= yes
RUN_DEPENDS= tcpserver:${PORTSDIR}/net/ucspi-tcp
SETUPFILES= ${WRKSRC}/config ${WRKSRC}/config-fast \
${WRKSRC}/dnsfq ${WRKSRC}/dnsip \
${WRKSRC}/dnsptr ${WRKSRC}/hostname \
${WRKSRC}/ipmeprint ${WRKSRC}/install
pre-build:
@${ECHO} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
@${ECHO} ${PREFIX} > ${WRKSRC}/conf-qmail
@PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${DISTNAME} PRE-INSTALL
post-install:
@${MKDIR} ${PREFIX}/setup
@${CP} ${SETUPFILES} ${PREFIX}/setup
@PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${DISTNAME} POST-INSTALL
.include <bsd.port.mk>

3
mail/qmail/files/md5 Normal file
View File

@ -0,0 +1,3 @@
MD5 (qmail-1.03.tar.gz) = 622f65f982e380dbe86e6574f3abcb7c
RMD160 (qmail-1.03.tar.gz) = b851f273f1d365d38efd949b1efcf35768ffa30f
SHA1 (qmail-1.03.tar.gz) = 18fb960481291a0503e93a94df3f6094edb7f27a

1
mail/qmail/pkg/COMMENT Normal file
View File

@ -0,0 +1 @@
secure, reliable, efficient, simple MTA

65
mail/qmail/pkg/DEINSTALL Normal file
View File

@ -0,0 +1,65 @@
#!/bin/sh
#
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
QMAILDIR=${PKG_PREFIX:-/var/qmail}
do_accts()
{
echo
echo "- remove qmail users"
echo "rmuser alias"
echo "rmuser qmaild"
echo "rmuser qmaill"
echo "rmuser qmailp"
echo "rmuser qmailq"
echo "rmuser qmailr"
echo "rmuser qmails"
}
do_groups()
{
echo
echo "- remove qmail groups"
echo "rmgroup qmail"
echo "rmgroup nofiles"
}
do_qmaildir()
{
echo
echo "- remove remaining qmail files"
echo "rm -rf $QMAILDIR"
}
do_misc()
{
echo
echo "- check that qmail daemons are no longer started"
echo " (/etc/rc.local, /etc/inetd.conf, /etc/mailer.conf)"
}
if [ $# -ne 2 ]; then
echo "usage: $0 distname { DEINSTALL }" >&2
exit 1
fi
case $2 in
DEINSTALL)
echo "----------------"
echo "To completely remove qmail do the following as root:"
echo "----------------"
do_accts
do_groups
do_qmaildir
do_misc
;;
*)
echo "Usage: `basename $0` distname DEINSTALL" >&2
exit 1
;;
esac
exit 0

43
mail/qmail/pkg/DESCR Normal file
View File

@ -0,0 +1,43 @@
qmail is a secure, reliable, efficient, simple message transfer agent.
It is meant as a replacement for the entire sendmail-binmail system on
typical Internet-connected UNIX hosts.
Secure: Security isn't just a goal, but an absolute requirement. Mail
delivery is critical for users; it cannot be turned off, so it must be
completely secure. (This is why I started writing qmail: I was sick of
the security holes in sendmail and other MTAs.)
Reliable: qmail's straight-paper-path philosophy guarantees that a
message, once accepted into the system, will never be lost. qmail also
supports maildir, a new, super-reliable user mailbox format. Maildirs,
unlike mbox files and mh folders, won't be corrupted if the system
crashes during delivery. Even better, not only can a user safely read
his mail over NFS, but any number of NFS clients can deliver mail to him
at the same time.
Efficient: On a Pentium under BSD/OS, qmail can easily sustain 200000
local messages per day---that's separate messages injected and delivered
to mailboxes in a real test! Although remote deliveries are inherently
limited by the slowness of DNS and SMTP, qmail overlaps 20 simultaneous
deliveries by default, so it zooms quickly through mailing lists. (This
is why I finished qmail: I had to get a big mailing list set up.)
Simple: qmail is vastly smaller than any other Internet MTA. Some
reasons why: (1) Other MTAs have separate forwarding, aliasing, and
mailing list mechanisms. qmail has one simple forwarding mechanism that
lets users handle their own mailing lists. (2) Other MTAs offer a
spectrum of delivery modes, from fast+unsafe to slow+queued. qmail-send
is instantly triggered by new items in the queue, so the qmail system
has just one delivery mode: fast+queued. (3) Other MTAs include, in
effect, a specialized version of inetd that watches the load average.
qmail's design inherently limits the machine load, so qmail-smtpd can
safely run from your system's inetd.
Replacement for sendmail: qmail supports host and user masquerading,
full host hiding, virtual domains, null clients, list-owner rewriting,
relay control, double-bounce recording, arbitrary RFC 822 address lists,
cross-host mailing list loop detection, per-recipient checkpointing,
downed host backoffs, independent message retry schedules, etc. In
short, it's up to speed on modern MTA features. qmail also includes a
drop-in ``sendmail'' wrapper so that it will be used transparently by
your current UAs.

178
mail/qmail/pkg/INSTALL Normal file
View File

@ -0,0 +1,178 @@
#!/bin/sh
#
# Inspired by INSTALL from postfix port by dugsong@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
QMAILDIR=${PREFIX:-$PKG_PREFIX}
# Unlikely, but not impossible: these UIDs may clash
# with already installed UIDs.
# Workaround: make these users and groups yourself
# before installing the port or package.
ALIASUID=2750
QMAILDUID=2850
QMAILLUID=2851
QMAILPUID=2852
QMAILQUID=2853
QMAILRUID=2854
QMAILSUID=2855
QMAILGID=2850
NOFILESGID=32750
# set up qmail user/group accounts.
#
do_accts()
{
# Create qmail and nofiles group.
# qmail
line=`egrep '^qmail:' /etc/group`
if [ "$line" != "" ]; then
echo -n "-> Using "
QMAILGID=`echo $line | cut -f3 -d:`
else
echo -n "-> Creating "
echo "qmail:*:${QMAILGID}:" >> /etc/group
fi
echo "group 'qmail', gid $QMAILGID"
# nofiles
line=`egrep '^nofiles:' /etc/group`
if [ "$line" != "" ]; then
echo -n "-> Using "
NOFILESGID=`echo $line | cut -f3 -d:`
else
echo -n "-> Creating "
echo "nofiles:*:${NOFILESGID}:" >> /etc/group
fi
echo "group 'nofiles', gid $NOFILESGID"
# Create users alias, qmaild, qmaill, qmailp, qmailq, qmailr, qmails
# alias
line=`egrep '^alias:' /etc/passwd`
if [ "$line" != "" ]; then
echo -n "-> Using "
ALIASUID=`echo $line | cut -f3 -d:`
else
echo -n "-> Creating "
chpass -l -a "alias:*:${ALIASUID}:${NOFILESGID}::::QMAIL:${QMAILDIR}/alias:/sbin/nologin"
fi
echo "account 'alias', uid $ALIASUID, gid $NOFILESGID"
# qmaild
line=`egrep '^qmaild:' /etc/passwd`
if [ "$line" != "" ]; then
echo -n "-> Using "
QMAILDUID=`echo $line | cut -f3 -d:`
else
echo -n "-> Creating "
chpass -l -a "qmaild:*:${QMAILDUID}:${NOFILESGID}::::QMAIL:${QMAILDIR}:/sbin/nologin"
fi
echo "account 'qmaild', uid $QMAILDUID, gid $NOFILESGID"
# qmaill
line=`egrep '^qmaill:' /etc/passwd`
if [ "$line" != "" ]; then
echo -n "-> Using "
QMAILLUID=`echo $line | cut -f3 -d:`
else
echo -n "-> Creating "
chpass -l -a "qmaill:*:${QMAILLUID}:${NOFILESGID}::::QMAIL:${QMAILDIR}:/sbin/nologin"
fi
echo "account 'qmaill', uid $QMAILLUID, gid $NOFILESGID"
# qmailp
line=`egrep '^qmailp:' /etc/passwd`
if [ "$line" != "" ]; then
echo -n "-> Using "
QMAILPUID=`echo $line | cut -f3 -d:`
else
echo -n "-> Creating "
chpass -l -a "qmailp:*:${QMAILPUID}:${NOFILESGID}::::QMAIL:${QMAILDIR}:/sbin/nologin"
fi
echo "account 'qmailp', uid $QMAILPUID, gid $NOFILESGID"
# qmailq
line=`egrep '^qmailq:' /etc/passwd`
if [ "$line" != "" ]; then
echo -n "-> Using "
QMAILQUID=`echo $line | cut -f3 -d:`
else
echo -n "-> Creating "
chpass -l -a "qmailq:*:${QMAILQUID}:${QMAILGID}::::QMAIL:${QMAILDIR}:/sbin/nologin"
fi
echo "account 'qmailq', uid $QMAILQUID, gid $QMAILGID"
# qmailr
line=`egrep '^qmailr:' /etc/passwd`
if [ "$line" != "" ]; then
echo -n "-> Using "
QMAILRUID=`echo $line | cut -f3 -d:`
else
echo -n "-> Creating "
chpass -l -a "qmailr:*:${QMAILRUID}:${QMAILGID}::::QMAIL:${QMAILDIR}:/sbin/nologin"
fi
echo "account 'qmailr', uid $QMAILRUID, gid $QMAILGID"
# qmails
line=`egrep '^qmails:' /etc/passwd`
if [ "$line" != "" ]; then
QMAILSUID=`echo $line | cut -f3 -d:`
echo -n "-> Using "
else
echo -n "-> Creating "
chpass -l -a "qmails:*:${QMAILSUID}:${QMAILGID}::::QMAIL:${PREFIX}:/sbin/nologin"
fi
echo "account 'qmails', uid $QMAILSUID, gid $QMAILGID"
}
do_advice()
{
echo "----------------"
echo "qmail is installed"
echo "----------------"
echo
echo "To activate qmail, please read $QMAILDIR/doc/INSTALL"
echo "Steps 1, 2, 3 and 5 have been done by this port/package."
echo "The config command from step 4 can be found in $QMAILDIR/setup"
echo
echo "It is recommended to use tcpserver instead of inetd for qmail-smtpd"
echo "and/or qmail-pop3d. It is installed as a dependency."
echo
echo "If you want to replace Sendmail on your system, be sure to look"
echo "at mailwrapper(8)."
echo "Here's a sample /etc/mailer.conf:"
echo
echo "sendmail $QMAILDIR/bin/sendmail"
echo "send-mail $QMAILDIR/bin/sendmail"
echo "mailq $QMAILDIR/bin/qmail-qread"
echo " # you will need fastforward for newaliases to work"
echo "newaliases $QMAILDIR/bin/newaliases"
echo " # not sure about these, mail corrections to this port's maintainer"
echo "hoststat /usr/bin/true"
echo "purgestat /usr/bin/true"
echo
echo "Enjoy qmail!"
}
do_aliases()
{
touch ${QMAILDIR}/alias/.qmail-postmaster \
${QMAILDIR}/alias/.qmail-mailer-daemon \
${QMAILDIR}/alias/.qmail-root
chmod 644 ${QMAILDIR}/alias/.qmail-postmaster \
${QMAILDIR}/alias/.qmail-mailer-daemon \
${QMAILDIR}/alias/.qmail-root
}
case $2 in
PRE-INSTALL)
do_accts
;;
POST-INSTALL)
# Install will abort because it cannot install all files.
# It will make qmail/queue though, which is what we want.
sh -c "${QMAILDIR}/setup/install >/dev/null 2>&1"
do_aliases
do_advice
;;
*)
echo "Usage: `basename $0` distname <PRE-INSTALL|POST-INSTALL>" >&2
exit 1
;;
esac
exit 0

203
mail/qmail/pkg/PLIST Normal file
View File

@ -0,0 +1,203 @@
@group qmail
@comment qmailq:qmail 04711
@owner qmailq
@mode 04711
bin/qmail-queue
@comment root:qmail 0700
@owner root
@mode 0700
bin/qmail-newmrh
bin/qmail-newu
bin/qmail-start
bin/qmail-lspawn
@comment root:qmail 0711
@mode 0711
bin/qmail-clean
bin/qmail-getpw
bin/qmail-local
bin/qmail-popup
bin/qmail-pw2u
bin/qmail-remote
bin/qmail-rspawn
bin/qmail-send
bin/splogger
@comment root:qmail 0755
@mode 0755
bin/bouncesaying
bin/condredirect
bin/datemail
bin/elq
bin/except
bin/forward
bin/maildir2mbox
bin/maildirmake
bin/maildirwatch
bin/mailsubj
bin/pinq
bin/predate
bin/preline
bin/qail
bin/qbiff
bin/qmail-inject
bin/qmail-pop3d
bin/qmail-qmqpc
bin/qmail-qmqpd
bin/qmail-qmtpd
bin/qmail-qread
bin/qmail-qstat
bin/qmail-showctl
bin/qmail-smtpd
bin/qmail-tcpok
bin/qmail-tcpto
bin/qreceipt
bin/qsmhook
bin/sendmail
bin/tcp-env
@mode
boot/binm1
boot/binm1+df
boot/binm2
boot/binm2+df
boot/binm3
boot/binm3+df
boot/home
boot/home+df
boot/proc
boot/proc+df
doc/FAQ
doc/INSTALL
doc/INSTALL.alias
doc/INSTALL.ctl
doc/INSTALL.ids
doc/INSTALL.maildir
doc/INSTALL.mbox
doc/INSTALL.vsm
doc/PIC.local2alias
doc/PIC.local2ext
doc/PIC.local2local
doc/PIC.local2rem
doc/PIC.local2virt
doc/PIC.nullclient
doc/PIC.relaybad
doc/PIC.relaygood
doc/PIC.rem2local
doc/REMOVE.binmail
doc/REMOVE.sendmail
doc/SENDMAIL
doc/TEST.deliver
doc/TEST.receive
doc/UPGRADE
man/cat1/bouncesaying.0
man/cat1/condredirect.0
man/cat1/except.0
man/cat1/forward.0
man/cat1/maildir2mbox.0
man/cat1/maildirmake.0
man/cat1/maildirwatch.0
man/cat1/mailsubj.0
man/cat1/preline.0
man/cat1/qbiff.0
man/cat1/qreceipt.0
man/cat1/tcp-env.0
man/cat5/addresses.0
man/cat5/dot-qmail.0
man/cat5/envelopes.0
man/cat5/maildir.0
man/cat5/mbox.0
man/cat5/qmail-control.0
man/cat5/qmail-header.0
man/cat5/qmail-log.0
man/cat5/qmail-users.0
man/cat5/tcp-environ.0
man/cat7/forgeries.0
man/cat7/qmail-limits.0
man/cat7/qmail.0
man/cat8/qmail-clean.0
man/cat8/qmail-command.0
man/cat8/qmail-getpw.0
man/cat8/qmail-inject.0
man/cat8/qmail-local.0
man/cat8/qmail-lspawn.0
man/cat8/qmail-newmrh.0
man/cat8/qmail-newu.0
man/cat8/qmail-pop3d.0
man/cat8/qmail-popup.0
man/cat8/qmail-pw2u.0
man/cat8/qmail-qmqpc.0
man/cat8/qmail-qmqpd.0
man/cat8/qmail-qmtpd.0
man/cat8/qmail-qread.0
man/cat8/qmail-qstat.0
man/cat8/qmail-queue.0
man/cat8/qmail-remote.0
man/cat8/qmail-rspawn.0
man/cat8/qmail-send.0
man/cat8/qmail-showctl.0
man/cat8/qmail-smtpd.0
man/cat8/qmail-start.0
man/cat8/qmail-tcpok.0
man/cat8/qmail-tcpto.0
man/cat8/splogger.0
man/man1/bouncesaying.1
man/man1/condredirect.1
man/man1/except.1
man/man1/forward.1
man/man1/maildir2mbox.1
man/man1/maildirmake.1
man/man1/maildirwatch.1
man/man1/mailsubj.1
man/man1/preline.1
man/man1/qbiff.1
man/man1/qreceipt.1
man/man1/tcp-env.1
man/man5/addresses.5
man/man5/dot-qmail.5
man/man5/envelopes.5
man/man5/maildir.5
man/man5/mbox.5
man/man5/qmail-control.5
man/man5/qmail-header.5
man/man5/qmail-log.5
man/man5/qmail-users.5
man/man5/tcp-environ.5
man/man7/forgeries.7
man/man7/qmail-limits.7
man/man7/qmail.7
man/man8/qmail-clean.8
man/man8/qmail-command.8
man/man8/qmail-getpw.8
man/man8/qmail-inject.8
man/man8/qmail-local.8
man/man8/qmail-lspawn.8
man/man8/qmail-newmrh.8
man/man8/qmail-newu.8
man/man8/qmail-pop3d.8
man/man8/qmail-popup.8
man/man8/qmail-pw2u.8
man/man8/qmail-qmqpc.8
man/man8/qmail-qmqpd.8
man/man8/qmail-qmtpd.8
man/man8/qmail-qread.8
man/man8/qmail-qstat.8
man/man8/qmail-queue.8
man/man8/qmail-remote.8
man/man8/qmail-rspawn.8
man/man8/qmail-send.8
man/man8/qmail-showctl.8
man/man8/qmail-smtpd.8
man/man8/qmail-start.8
man/man8/qmail-tcpok.8
man/man8/qmail-tcpto.8
man/man8/splogger.8
setup/config
setup/config-fast
setup/dnsfq
setup/dnsip
setup/dnsptr
setup/hostname
setup/ipmeprint
setup/install
@dirrm bin
@dirrm boot
@dirrm doc
@dirrm setup