- move examples from lib/postfix to share/examples/postfix
- use user/group commands - ${FOO} -> $FOO om INSTALL/DEINSTAL - add HOMEPAGE work by Brad and myself
This commit is contained in:
parent
bc3869cf05
commit
21d743600b
@ -1,13 +1,15 @@
|
||||
# $OpenBSD: Makefile,v 1.25 2000/06/16 23:06:07 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.26 2000/08/15 17:01:22 jakob Exp $
|
||||
|
||||
DISTNAME= postfix-19991231-pl08
|
||||
CATEGORIES= mail
|
||||
NEED_VERSION= 1.241
|
||||
CATEGORIES= mail
|
||||
NEED_VERSION= 1.310
|
||||
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
|
||||
ftp://ftp.sunet.se/pub/unix/mail/postfix/official/ \
|
||||
ftp://ftp.tau.ac.il/pub/unix/mail/postfix/official/ \
|
||||
ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/official/
|
||||
|
||||
HOMEPAGE= http://www.postfix.org/
|
||||
|
||||
MAINTAINER= jakob@openbsd.org
|
||||
|
||||
PERMIT_PACKAGE_CDROM= yes
|
||||
@ -21,19 +23,19 @@ MAKE_FLAGS= CC="${CC}" DEBUG="" OPT="${CFLAGS}" \
|
||||
ALL_TARGET= default
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/lib/postfix
|
||||
${INSTALL_PROGRAM_DIR} ${PREFIX}/libexec/postfix
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/postfix
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/postfix
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${PREFIX}/sbin
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/postfix-enable ${PREFIX}/sbin
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/postfix-disable ${PREFIX}/sbin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/libexec/* ${PREFIX}/libexec/postfix
|
||||
${INSTALL_DATA} ${WRKSRC}/conf/* ${PREFIX}/lib/postfix
|
||||
${INSTALL_DATA} ${WRKSRC}/conf/* ${PREFIX}/share/examples/postfix
|
||||
@(cd ${WRKSRC}/man; \
|
||||
for mandir in man[0-9]; do \
|
||||
${INSTALL_MAN} $$mandir/* ${PREFIX}/man/$$mandir; \
|
||||
done)
|
||||
${INSTALL_DATA} ${WRKSRC}/html/*.html ${PREFIX}/share/doc/postfix
|
||||
${INSTALL_DATA} ${WRKSRC}/html/*.gif ${PREFIX}/share/doc/postfix
|
||||
${INSTALL_DATA} ${WRKSRC}/html/*.gif ${PREFIX}/share/doc/postfix
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: DEINSTALL,v 1.5 1999/10/07 20:58:04 jakob Exp $
|
||||
# $OpenBSD: DEINSTALL,v 1.6 2000/08/15 17:01:23 jakob Exp $
|
||||
#
|
||||
# De-installation setup of postfix
|
||||
|
||||
@ -12,6 +12,10 @@ POSTFIXUID=6
|
||||
POSTFIXGID=6
|
||||
MAILDROPGID=12
|
||||
|
||||
if [ -f /etc/mailer.conf.postfix ]; then
|
||||
rm -f /etc/mailer.conf.postfix
|
||||
fi
|
||||
|
||||
# Function: set up postfix user/group accounts.
|
||||
#
|
||||
do_accts()
|
||||
@ -20,7 +24,8 @@ do_accts()
|
||||
echo "+---------------"
|
||||
echo "| Delete the 'postfix' user account, and 'postfix' and 'maildrop'"
|
||||
echo "| group accounts manually for a full de-installation."
|
||||
echo "| To do this: execute 'rmuser postfix' and 'rmgroup maildrop' as root."
|
||||
echo "| To do this: execute 'user del postfix', 'group del postfix' and"
|
||||
echo "| 'group del maildrop' as root."
|
||||
echo "+---------------"
|
||||
echo ""
|
||||
}
|
||||
@ -44,9 +49,9 @@ do_configs()
|
||||
{
|
||||
echo ""
|
||||
echo "+---------------"
|
||||
echo "| The existing $1 configuration files in ${CONFIG_DIR},"
|
||||
echo "| The existing $1 configuration files in $CONFIG_DIR,"
|
||||
echo "| have NOT been deleted. To do this: execute"
|
||||
echo "| 'rm -rf /etc/postfix' as root."
|
||||
echo "| 'rm -rf $CONFIG_DIR' as root."
|
||||
echo "+---------------"
|
||||
echo ""
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
Postfix Overview - Goals and Features
|
||||
_________________________________________________________________
|
||||
|
||||
@ -75,11 +74,4 @@ Other significant features of interest
|
||||
relatively easy.
|
||||
_________________________________________________________________
|
||||
|
||||
For more information, visit http://www.postfix.org/
|
||||
|
||||
And remember, it's spelled P-o-s-t-f-i-x, but it's pronounced "VMailer."
|
||||
|
||||
-d.
|
||||
|
||||
---
|
||||
http://www.monkey.org/~dugsong/
|
||||
WWW: ${HOMEPAGE}
|
||||
|
@ -1,46 +1,39 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: INSTALL,v 1.6 1999/10/07 20:58:04 jakob Exp $
|
||||
# $OpenBSD: INSTALL,v 1.7 2000/08/15 17:01:23 jakob Exp $
|
||||
#
|
||||
# Pre/post-installation setup of postfix
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
CONFIG_DIR=/etc/postfix
|
||||
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/postfix
|
||||
SPOOL_DIR=/var/spool/postfix
|
||||
|
||||
POSTFIXUID=6
|
||||
POSTFIXGID=6
|
||||
MAILDROPGID=12
|
||||
|
||||
# Function: set up postfix user/group accounts.
|
||||
#
|
||||
do_accts()
|
||||
{
|
||||
# Create postfix user and group.
|
||||
line=`egrep '^postfix:' /etc/group`
|
||||
if [ "$line" != "" ]; then
|
||||
POSTFIXGID=`echo $line | cut -f3 -d:`
|
||||
groupinfo -e maildrop
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "-> Using group 'maildrop' for postdrop"
|
||||
else
|
||||
echo "-> Creating postfix group, gid $POSTFIXGID"
|
||||
echo "postfix:*:${POSTFIXGID}:" >> /etc/group
|
||||
echo "-> Creating maildrop group"
|
||||
groupadd maildrop
|
||||
fi
|
||||
line=`egrep '^postfix:' /etc/passwd`
|
||||
if [ "$line" != "" ]; then
|
||||
POSTFIXUID=`echo $line | cut -f3 -d:`
|
||||
|
||||
userinfo -e postfix
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "-> Using account/group 'postfix' for postfix"
|
||||
else
|
||||
echo "-> Creating postfix user, uid $POSTFIXUID"
|
||||
chpass -l -a "postfix:*:${POSTFIXUID}:${POSTFIXGID}::::Disgruntled Postal Worker:/nonexistent:/sbin/nologin"
|
||||
echo "-> Creating postfix user & group"
|
||||
useradd \
|
||||
-g =uid \
|
||||
-c "Disgruntled Postal Worker" \
|
||||
-d /nonexistent \
|
||||
-s /sbin/nologin \
|
||||
-p \* \
|
||||
postfix
|
||||
fi
|
||||
echo "-> Using account 'postfix' for postfix, uid $POSTFIXUID, gid $POSTFIXGID"
|
||||
# Create Postfix maildrop group.
|
||||
line=`egrep '^maildrop:' /etc/group`
|
||||
if [ "$line" != "" ]; then
|
||||
MAILDROPGID=`echo $line | cut -f3 -d:`
|
||||
else
|
||||
echo "-> Creating maildrop group, gid $MAILDROPGID"
|
||||
echo "maildrop:*:${MAILDROPGID}:" >> /etc/group
|
||||
fi
|
||||
echo "-> Using group 'maildrop' for postdrop, gid $MAILDROPGID"
|
||||
}
|
||||
|
||||
# Function: set up the postfix spool dir / chroot area
|
||||
@ -48,10 +41,10 @@ do_accts()
|
||||
do_spooldir()
|
||||
{
|
||||
echo "-> Creating Postfix spool directory and chroot area under $SPOOL_DIR"
|
||||
[ -d $SPOOL_DIR ] || mkdir -p -m 755 $SPOOL_DIR
|
||||
[ -d ${SPOOL_DIR}/etc ] || mkdir -p -m 755 ${SPOOL_DIR}/etc
|
||||
[ -d $SPOOL_DIR ] || install -d -o root -g wheel -m 755 $SPOOL_DIR
|
||||
[ -d $SPOOL_DIR/etc ] || install -d -o root -g wheel -m 755 $SPOOL_DIR/etc
|
||||
for file in localtime services resolv.conf ; do
|
||||
install -c -m 755 /etc/$file ${SPOOL_DIR}/etc
|
||||
install -o root -g wheel -m 755 /etc/$file $SPOOL_DIR/etc
|
||||
done
|
||||
}
|
||||
|
||||
@ -66,7 +59,7 @@ send-mail y0y0y0/sbin/sendmail
|
||||
mailq y0y0y0/sbin/sendmail
|
||||
newaliases y0y0y0/sbin/sendmail
|
||||
MAILER
|
||||
sed "s@y0y0y0@${PREFIX}@g" /tmp/mailer.conf.$$ >/etc/mailer.conf.postfix
|
||||
sed "s@y0y0y0@$PREFIX@g" /tmp/mailer.conf.$$ >/etc/mailer.conf.postfix
|
||||
rm -f /tmp/mailer.conf.$$
|
||||
chown root:wheel /etc/mailer.conf.postfix
|
||||
chmod 644 /etc/mailer.conf.postfix
|
||||
@ -79,29 +72,29 @@ do_configs()
|
||||
if [ -d $CONFIG_DIR ]; then
|
||||
echo ""
|
||||
echo "+---------------"
|
||||
echo "| The existing $1 configuration files in ${CONFIG_DIR},"
|
||||
echo "| The existing $1 configuration files in $CONFIG_DIR,"
|
||||
echo "| have NOT been changed. You may want to compare them to the"
|
||||
echo "| current sample files, ${PREFIX}/lib/postfix,"
|
||||
echo "| current sample files, $SAMPLE_CONFIG_DIR,"
|
||||
echo "| and update your configuration as needed."
|
||||
echo "|"
|
||||
echo "| Existing ${CONFIG_DIR}/postfix-script, however, will be"
|
||||
echo "| Existing $CONFIG_DIR/postfix-script, however, will be"
|
||||
echo "| updated to the latest version."
|
||||
echo "+---------------"
|
||||
echo ""
|
||||
else
|
||||
# Install config files.
|
||||
mkdir -p -m 755 $CONFIG_DIR
|
||||
install -m 644 -c ${PREFIX}/lib/postfix/* $CONFIG_DIR
|
||||
sed "s@y0y0y0@${PREFIX}@g" ${CONFIG_DIR}/main.cf > ${CONFIG_DIR}/main.cf.$$
|
||||
install -m 644 ${CONFIG_DIR}/main.cf.$$ ${CONFIG_DIR}/main.cf
|
||||
rm -f ${CONFIG_DIR}/main.cf.$$
|
||||
install -d -o root -g wheel -m 755 $CONFIG_DIR
|
||||
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/* $CONFIG_DIR
|
||||
sed "s@y0y0y0@$PREFIX@g" $CONFIG_DIR/main.cf > $CONFIG_DIR/main.cf.$$
|
||||
install -o root -g wheel -m 644 $CONFIG_DIR/main.cf.$$ $CONFIG_DIR/main.cf
|
||||
rm -f $CONFIG_DIR/main.cf.$$
|
||||
|
||||
# The correct postfix-script will be installed later.
|
||||
rm -f ${CONFIG_DIR}/postfix-script*
|
||||
rm -f $CONFIG_DIR/postfix-script*
|
||||
|
||||
echo ""
|
||||
echo "+---------------"
|
||||
echo "| The $1 configuration files in ${CONFIG_DIR},"
|
||||
echo "| The $1 configuration files in $CONFIG_DIR,"
|
||||
echo "| have been installed. Please view these files and change"
|
||||
echo "| the configuration to meet your needs."
|
||||
echo "+---------------"
|
||||
@ -109,9 +102,9 @@ do_configs()
|
||||
fi
|
||||
|
||||
# Configure setgid maildrop
|
||||
install -m 755 -c ${PREFIX}/lib/postfix/postfix-script-sgid ${CONFIG_DIR}/postfix-script
|
||||
chgrp maildrop ${PREFIX}/sbin/postdrop
|
||||
chmod 2755 ${PREFIX}/sbin/postdrop
|
||||
install -o root -g wheel -m 755 $SAMPLE_CONFIG_DIR/postfix-script-sgid $CONFIG_DIR/postfix-script
|
||||
chgrp maildrop $PREFIX/sbin/postdrop
|
||||
chmod 2755 $PREFIX/sbin/postdrop
|
||||
}
|
||||
|
||||
# Function: tell the user what s/he needs to do to use the port just installed
|
||||
|
@ -26,39 +26,6 @@ libexec/postfix/smtp
|
||||
libexec/postfix/smtpd
|
||||
libexec/postfix/trivial-rewrite
|
||||
@dirrm libexec/postfix
|
||||
lib/postfix/LICENSE
|
||||
lib/postfix/access
|
||||
lib/postfix/aliases
|
||||
lib/postfix/canonical
|
||||
lib/postfix/main.cf
|
||||
lib/postfix/main.cf.default
|
||||
lib/postfix/main.cf.orig
|
||||
lib/postfix/master.cf
|
||||
lib/postfix/master.cf.orig
|
||||
lib/postfix/postfix-script
|
||||
lib/postfix/postfix-script-diff
|
||||
lib/postfix/postfix-script-nosgid
|
||||
lib/postfix/postfix-script-sgid
|
||||
lib/postfix/relocated
|
||||
lib/postfix/sample-aliases.cf
|
||||
lib/postfix/sample-canonical.cf
|
||||
lib/postfix/sample-debug.cf
|
||||
lib/postfix/sample-ldap.cf
|
||||
lib/postfix/sample-local.cf
|
||||
lib/postfix/sample-misc.cf
|
||||
lib/postfix/sample-pcre.cf
|
||||
lib/postfix/sample-rate.cf
|
||||
lib/postfix/sample-regexp.cf
|
||||
lib/postfix/sample-relocated.cf
|
||||
lib/postfix/sample-resource.cf
|
||||
lib/postfix/sample-rewrite.cf
|
||||
lib/postfix/sample-smtp.cf
|
||||
lib/postfix/sample-smtpd.cf
|
||||
lib/postfix/sample-transport.cf
|
||||
lib/postfix/sample-virtual.cf
|
||||
lib/postfix/transport
|
||||
lib/postfix/virtual
|
||||
@dirrm lib/postfix
|
||||
man/man1/mailq.1
|
||||
man/man1/newaliases.1
|
||||
man/man1/postalias.1
|
||||
@ -145,4 +112,36 @@ share/doc/postfix/trivial-rewrite.8.html
|
||||
share/doc/postfix/uce.html
|
||||
share/doc/postfix/virtual.5.html
|
||||
@dirrm share/doc/postfix
|
||||
@unexec [ -f /etc/mailer.conf.postfix ] && rm -f /etc/mailer.conf.postfix
|
||||
share/examples/postfix/LICENSE
|
||||
share/examples/postfix/access
|
||||
share/examples/postfix/aliases
|
||||
share/examples/postfix/canonical
|
||||
share/examples/postfix/main.cf
|
||||
share/examples/postfix/main.cf.default
|
||||
share/examples/postfix/main.cf.orig
|
||||
share/examples/postfix/master.cf
|
||||
share/examples/postfix/master.cf.orig
|
||||
share/examples/postfix/postfix-script
|
||||
share/examples/postfix/postfix-script-diff
|
||||
share/examples/postfix/postfix-script-nosgid
|
||||
share/examples/postfix/postfix-script-sgid
|
||||
share/examples/postfix/relocated
|
||||
share/examples/postfix/sample-aliases.cf
|
||||
share/examples/postfix/sample-canonical.cf
|
||||
share/examples/postfix/sample-debug.cf
|
||||
share/examples/postfix/sample-ldap.cf
|
||||
share/examples/postfix/sample-local.cf
|
||||
share/examples/postfix/sample-misc.cf
|
||||
share/examples/postfix/sample-pcre.cf
|
||||
share/examples/postfix/sample-rate.cf
|
||||
share/examples/postfix/sample-regexp.cf
|
||||
share/examples/postfix/sample-relocated.cf
|
||||
share/examples/postfix/sample-resource.cf
|
||||
share/examples/postfix/sample-rewrite.cf
|
||||
share/examples/postfix/sample-smtp.cf
|
||||
share/examples/postfix/sample-smtpd.cf
|
||||
share/examples/postfix/sample-transport.cf
|
||||
share/examples/postfix/sample-virtual.cf
|
||||
share/examples/postfix/transport
|
||||
share/examples/postfix/virtual
|
||||
@dirrm share/examples/postfix
|
||||
|
Loading…
x
Reference in New Issue
Block a user