1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00
freebsd-ports/mail/avenger/pkg-install
Jean-Yves Lefort 88edf9ec08 Mail Avenger is a highly-configurable, MTA-independent SMTP server
daemon. It lets users run messages through filters like ClamAV and
SpamAssassin during SMTP transactions, so the server can reject mail
before assuming responsibility for its delivery. Other unique features
include TCP SYN fingerprint and network route recording, verification
of sender addresses through SMTP callbacks, SPF (sender policy
framework) as a general policy language, qmail-style control over both
SMTP-level behavior and local delivery of extension addresses,
mail-bomb protection, integration with kernel firewalls, and more.

WWW: http://www.mailavenger.org/

PR:		ports/80800
Submitted by:	David Mazieres <dm+bugs+avenger@mailavenger.org>
2005-05-09 23:19:58 +00:00

62 lines
1.0 KiB
Bash

#!/bin/sh
if [ -n "${PACKAGE_BUILDING}" ]; then
exit 0
fi
USER=avenger
GROUP=avenger
UID=172
GID=172
AVDIR=/var/spool/avenger
AVETC=${PKG_PREFIX}/etc/avenger
PW=/usr/sbin/pw
if [ "$2" = "PRE-INSTALL" ]; then
echo -n "Checking for group '$GROUP'... "
if ! ${PW} groupshow $GROUP >/dev/null 2>&1; then
echo -n "doesn't exist, adding... "
if ${PW} groupadd $GROUP -g ${GID}; then
echo "success."
else
echo "FAILED!"
exit 1
fi
else
echo "exists."
fi
echo -n "Checking for user '$USER'... "
if ! ${PW} usershow $USER >/dev/null 2>&1; then
echo -n "doesn't exist, adding... "
if ${PW} useradd $USER -u ${UID} -c 'Mail Avenger' -d "$AVDIR" -g $GROUP -s /sbin/nologin -h -; then
echo "success."
else
echo "FAILED!"
exit 1
fi
else
echo "exists."
fi
elif [ "$2" = "POST-INSTALL" ]; then
echo -n "Checking for config directory ($AVETC)... "
if [ -d "$AVETC" ]; then
echo "already exists."
else
echo -n "creating... "
if mkdir $AVETC; then
echo "success."
else
echo "FAILED!"
exit 1
fi
fi
fi
exit 0