update to 0.9, drop privileges to user _milter-regex.

note: local socket changed to /var/spool/milter-regex/spool, adjust
sendmail.cf/.mc accordingly when updating:

-`S=unix:/var/spool/milter-regex, T=S:30s;R:2m'
+`S=unix:/var/spool/milter-regex/sock, T=S:30s;R:2m'
This commit is contained in:
dhartmei 2004-01-07 14:57:34 +00:00
parent 999c725fae
commit ad9e816cd5
5 changed files with 87 additions and 6 deletions

View File

@ -1,4 +1,4 @@
$OpenBSD: user.list,v 1.8 2003/12/15 22:33:57 sturm Exp $
$OpenBSD: user.list,v 1.9 2004/01/07 14:57:34 dhartmei Exp $
This file lists all users and groups that are created by ports or that
users are encouraged to create after installing a port (these are marked
@ -35,3 +35,4 @@ id user group port options
524 _mail mail/openwebmail
525 _quagga _quagga net/quagga
526 _tomcat _tomcat www/jakarta-tomcat
527 _milter-regex _milter-regex mail/milter-regex

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.4 2004/01/04 00:30:18 dhartmei Exp $
# $OpenBSD: Makefile,v 1.5 2004/01/07 14:57:34 dhartmei Exp $
.if !exists(/usr/lib/libmilter.a)
IGNORE="Fatal: milter required, see instructions in DESCR"
@ -6,7 +6,7 @@ IGNORE="Fatal: milter required, see instructions in DESCR"
COMMENT= "sendmail milter plugin for regular expression filtering"
DISTNAME= milter-regex-0.8
DISTNAME= milter-regex-0.9
CATEGORIES= mail
MASTER_SITES= http://www.benzedrine.cx/

View File

@ -1,3 +1,3 @@
MD5 (milter-regex-0.8.tar.gz) = 61f69271320e30765c88ca799a9a8751
RMD160 (milter-regex-0.8.tar.gz) = 0499b0316cbaae96901e36e7fbdbbe6751bd9f2d
SHA1 (milter-regex-0.8.tar.gz) = 9036c1a9915607c09470d8b25961e0dd372db631
MD5 (milter-regex-0.9.tar.gz) = 8ad3e931f4b10e1c6adf170984e63ce9
RMD160 (milter-regex-0.9.tar.gz) = 619bb4c17fa5874f184eee4cc730c3ccedc53755
SHA1 (milter-regex-0.9.tar.gz) = 94e4e8f1400b7a01c0c36d40977928787ea509c8

View File

@ -0,0 +1,22 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.1 2004/01/07 14:57:34 dhartmei Exp $
#
# milter-regex de-installation
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DIR=/var/spool/milter-regex
USER=_milter-regex
GROUP=_milter-regex
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to perform"
echo "| these steps as root:"
echo "|"
echo "| userdel $USER"
echo "| groupdel $GROUP"
echo "| rm -rf $DIR"
echo "+---------------"
echo
exit 0

View File

@ -0,0 +1,58 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 2004/01/07 14:57:34 dhartmei Exp $
#
# Pre/post-installation setup of milter-regex
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DIR=/var/spool/milter-regex
USER=_milter-regex
GROUP=_milter-regex
ID=527
do_usergroup_install()
{
# Create milter-regex user and group
groupinfo -e $GROUP
if [ $? -eq 0 ]; then
echo "===> Using $GROUP group for milter-regex"
else
echo "===> Creating $GROUP group for milter-regex"
groupadd -g $ID $GROUP
fi
userinfo -e $USER
if [ $? -eq 0 ]; then
echo "===> Using $USER user for milter-regex"
else
echo "===> Creating $USER user for milter-regex"
useradd -g $GROUP -d /nonexistent -L daemon \
-c 'milter-regex Account' -s /sbin/nologin \
-u $ID $USER 2>&1| grep nonexistant >&2
fi
}
do_install()
{
install -d -o $USER -g $GROUP -m 700 $DIR
}
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
case $2 in
PRE-INSTALL)
do_usergroup_install
if [ ! -d $DIR ]; then
do_install
fi
;;
POST-INSTALL)
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0