[Midnightbsd-cvs] mports: mports/mail: vpopmail depended on qmail

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Oct 31 14:20:29 EDT 2007


Log Message:
-----------

vpopmail depended on qmail

Modified Files:
--------------
    mports/mail:
        Makefile (r1.34 -> r1.35)

Removed Files:
-------------
    mports/mail/vpopmail:
        Makefile
        distinfo
        pkg-descr
        pkg-install
        pkg-plist
    mports/mail/vpopmail/files:
        Makefile.in-noportdocs.patch
        patch-Makefile.in
        patch-README.vpopmaild
        patch-cdb-Makefile
        patch-config.h.in
        patch-configure
        patch-vchangepw.c
        patch-vchkpw.c
        patch-vdeldomain.c
        patch-vdelivermail.c
        patch-vmysql.c
        patch-vpalias.c
        patch-vpgsql.c
        patch-vpopmail.c
        patch-vqmaillocal.c
        sql-remove-deleted.patch
        vchkpw-smtp-auth.patch

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/mail/Makefile,v
retrieving revision 1.34
retrieving revision 1.35
diff -Lmail/Makefile -Lmail/Makefile -u -r1.34 -r1.35
--- mail/Makefile
+++ mail/Makefile
@@ -41,7 +41,6 @@
     SUBDIR += sendmail
     SUBDIR += spamd
     SUBDIR += squirrelmail
-    SUBDIR += vpopmail
     SUBDIR += vrfy
     SUBDIR += wmymail
     SUBDIR += wpop3d
--- mail/vpopmail/pkg-install
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/usr/bin/perl
-#
-
- at groups = ("vchkpw");
-%users = ('vpopmail', "vchkpw");
-# daemon, local, pop, queue, remote, deliver, respectively.
-# alias is a special case above...
-%gids = ("vchkpw", 89);
-%uids = ('vpopmail', 89);
-
-sub checkenv () {
-	my ($u, $g);
-
-	# Users
-	foreach $u (keys %users) {
-		$var = uc($u)."_UID";
-		if (defined($ENV{$var})) {
-			$uids{$u} = $ENV{$var};
-		}
-	}
-
-	# Groups
-	foreach $g (@groups) {
-		$var = uc($g)."_GID";
-		if (defined($ENV{$var})) {
-			$gids{$g} = $ENV{$var};
-		}
-	}
-}
-
-if ($ENV{PACKAGE_BUILDING} || $ARGV[1] eq "PRE-INSTALL") {
-	$doguid=1;  # Make sure we get the assigned guids.
-}
-
-checkenv();
-
-foreach $group (@groups) {
-	if (! getgrnam ($group)) {
-		do checkrpw;  # May exit
-
-		$x = "-g $gids{$group}";
-		$result = system ("/usr/sbin/pw groupadd $group $x");
-		if ($result) {
-			die "Failed to add group $group as gid $gids{$group}\n";
-		}
-	}
-}
-
-if (! getpwnam ("alias")) {
-	do checkrpw;  # May exit
-
-	$x = "-u $uids{'alias'}";
-	$result = system ("/usr/sbin/pw useradd alias -g qnofiles -d \"$ENV{PKG_PREFIX}/vpopmail/alias\" -s /nonexistent $x");
-	if ($result) {
-		die "Failed to add user alias as uid $uids{'alias'}\n";
-	}
-}
-
-foreach $user (keys %users) {
-	if (! getpwnam ($user)) {
-		do checkrpw;  # May exit
-
-		$x = "-u $uids{$user}";
-		$result = system ("/usr/sbin/pw useradd $user -g $users{$user} -d \"$ENV{PKG_PREFIX}/vpopmail\" -s /nonexistent $x");
-		if ($result) {
-			die "Failed to add user $user as uid $uids{$user}\n";
-		}
-	}
-}
-
-# Check that all gids/uids are as they should be...
-# If we are being installed as a package...
-if ($doguid) {
-	foreach $group (@groups) {
-		if (getgrnam($group) != $gids{$group}) {
-			die "Group $group should have gid $gids{$group}\n";
-		}
-	}
-
-	foreach $user (keys %users) {
-		if (getpwnam($user) != $uids{$user}) {
-			die "User $user should have uid $uids{$user}\n";
-		}
-	}
-}
-
-exit 0;
-
-sub checkrpw {
-	if (! -x "/usr/sbin/pw") {
-		print <<'EOM';
-This system looks like a pre-2.2 version of FreeBSD.  We see that it
-is missing the "pw" utility.  We need this utility.  Please get and
-install it, and try again.  You can get the source from:
-
-  ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz
-
-EOM
-		die "No /usr/sbin/pw";
-	}
-
-	if ($> != 0) {
-		print "It is necessary to add missing vpopmail users/groups at";
-		print "this stage.  Please either add them manually or retry";
-		print "as root.";
-		# Let pw(1) signal the failure so the user can see which
-		# group/user is actually missing.
-	}
-}
--- mail/vpopmail/pkg-descr
+++ /dev/null
@@ -1,21 +0,0 @@
-vpopmail provides an easy way to manage virtual domains and virtual
-accounts on a qmail mail server.
-
-Features:
-
-. Automates all qmail file modifications into documented command line
-  programs
-
-. Support for named and IP-based virtual domains
-
-. NFS safe
-
-. dynamic directory creation for scalability using fill-in balanced 3
-  level tree
-
-. understands standard qmail .qmail directives
-
-. interacts well with qmailadmin for web-based administration, courier-imap
-  for IMAP support, and sqwebmail for web-based mail.
-
-WWW:	http://inter7.com/vpopmail/
--- mail/vpopmail/pkg-plist
+++ /dev/null
@@ -1,82 +0,0 @@
-vpopmail/bin/clearopensmtp
-vpopmail/bin/dotqmail2valias
-vpopmail/bin/vaddaliasdomain
-vpopmail/bin/vadddomain
-vpopmail/bin/vadduser
-vpopmail/bin/valias
-vpopmail/bin/vchangepw
-vpopmail/bin/vchkpw
-vpopmail/bin/vconvert
-vpopmail/bin/vdeldomain
-vpopmail/bin/vdelivermail
-vpopmail/bin/vdeloldusers
-vpopmail/bin/vdeluser
-vpopmail/bin/vdominfo
-vpopmail/bin/vipmap
-vpopmail/bin/vkill
-vpopmail/bin/vmkpasswd
-vpopmail/bin/vmoddomlimits
-vpopmail/bin/vmoduser
-vpopmail/bin/vpasswd
-vpopmail/bin/vpopbull
-vpopmail/bin/vpopmaild
-vpopmail/bin/vsetuserquota
-vpopmail/bin/vuserinfo
-%%PORTDOCS%%vpopmail/doc/doc_html/vpopmail.html
-%%PORTDOCS%%vpopmail/doc/doc_html/vpopmail5.abw
-%%PORTDOCS%%vpopmail/doc/doc_html/vpopmailapi.png
-%%PORTDOCS%%vpopmail/doc/man_html/clearopensmtp.html
-%%PORTDOCS%%vpopmail/doc/man_html/index.html
-%%PORTDOCS%%vpopmail/doc/man_html/vaddaliasdomain.html
-%%PORTDOCS%%vpopmail/doc/man_html/vadddomain.html
-%%PORTDOCS%%vpopmail/doc/man_html/vadduser.html
-%%PORTDOCS%%vpopmail/doc/man_html/vchkpw.html
-%%PORTDOCS%%vpopmail/doc/man_html/vconvert.html
-%%PORTDOCS%%vpopmail/doc/man_html/vdeldomain.html
-%%PORTDOCS%%vpopmail/doc/man_html/vdelivermail.html
-%%PORTDOCS%%vpopmail/doc/man_html/vdeluser.html
-%%PORTDOCS%%vpopmail/doc/man_html/vpasswd.html
-%%PORTDOCS%%vpopmail/doc/man_html/vpopbull.html
-%%PORTDOCS%%vpopmail/doc/man_html/vsetuserquota.html
-%%PORTDOCS%%vpopmail/doc/README
-%%PORTDOCS%%vpopmail/doc/README.filelocking
-%%PORTDOCS%%vpopmail/doc/README.ipaliasdomains
-%%PORTDOCS%%vpopmail/doc/README.ldap
-%%PORTDOCS%%vpopmail/doc/README.mysql
-%%PORTDOCS%%vpopmail/doc/README.oracle
-%%PORTDOCS%%vpopmail/doc/README.pgsql
-%%PORTDOCS%%vpopmail/doc/README.quotas
-%%PORTDOCS%%vpopmail/doc/README.roamingusers
-%%PORTDOCS%%vpopmail/doc/README.sybase
-%%PORTDOCS%%vpopmail/doc/README.vlimits
-%%PORTDOCS%%vpopmail/doc/README.vpopmaild
-%%PORTDOCS%%vpopmail/doc/README.vqmaillocal
- at unexec if [ -f %D/vpopmail/etc/defaultdomain ]; then rm -f %D/vpopmail/etc/defaultdomain; fi
-vpopmail/etc/inc_deps
-vpopmail/etc/lib_deps
- at unexec if cmp -s %D/vpopmail/etc/tcp.smtp %D/vpopmail/etc/tcp.smtp-dist; then rm -f %D/vpopmail/etc/tcp.smtp; fi
-vpopmail/etc/tcp.smtp-dist
- at exec if [ ! -f %D/vpopmail/etc/tcp.smtp ] ; then cp -p %D/%F %B/tcp.smtp; fi
- at unexec if cmp -s %D/vpopmail/etc/vlimits.default %D/vpopmail/etc/vlimits.default-dist; then rm -f %D/vpopmail/etc/vlimits.default; fi
-vpopmail/etc/vlimits.default-dist
- at unexec if [ -f %D/vpopmail/etc/vpopmail.mysql ]; then rm -f %D/vpopmail/etc/vpopmail.mysql; fi
-vpopmail/include/config.h
-vpopmail/include/vauth.h
-vpopmail/include/vlimits.h
-vpopmail/include/vpopmail.h
-vpopmail/include/vpopmail_config.h
-vpopmail/lib/libvpopmail.a
-%%LDAP%%vpopmail/ldap/README.ldap
-%%LDAP%%vpopmail/ldap/qmailUser.schema
-%%LDAP%%vpopmail/ldap/slapd.conf
-%%LDAP%%vpopmail/ldap/vpopmail.ldif
-%%LDAP%%@dirrm vpopmail/ldap
- at dirrm vpopmail/lib
- at dirrm vpopmail/include
- at dirrmtry vpopmail/etc
- at dirrmtry vpopmail/domains
-%%PORTDOCS%%@dirrm vpopmail/doc/man_html
-%%PORTDOCS%%@dirrm vpopmail/doc/doc_html
-%%PORTDOCS%%@dirrm vpopmail/doc
- at dirrm vpopmail/bin
- at dirrmtry vpopmail
--- mail/vpopmail/Makefile
+++ /dev/null
@@ -1,395 +0,0 @@
-# New ports collection makefile for: vpopmail
-# Date created:		21 Sep 2000
-# Whom:			Neil Blakey-Milner
-#
-# $FreeBSD: ports/mail/vpopmail/Makefile,v 1.67 2006/10/05 11:49:17 roam Exp $
-# $MidnightBSD: mports/mail/vpopmail/Makefile,v 1.1 2007/02/19 19:46:46 laffer1 Exp $
-#
-
-PORTNAME=	vpopmail
-PORTVERSION=	5.4.17
-CATEGORIES=	mail
-MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR=	${PORTNAME}
-
-MAINTAINER=	ports at MidnightBSD.org
-COMMENT=	Easy virtual domain and authentication package for use with qmail
-
-BUILD_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
-RUN_DEPENDS=	${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp
-
-USE_QMAIL=	yes
-
-CONFLICTS=	vpopmail-devel-5.*
-
-GNU_CONFIGURE=	YES
-USE_GMAKE=	YES
-USE_PERL5=	YES
-
-VCFGDIR?=	${WRKDIR}/vcfg
-VCFGFILES?=	inc_deps lib_deps tcp.smtp
-
-CONFIGURE_ENV+=	VCFGDIR="${VCFGDIR}"
-CONFIGURE_ARGS=	--enable-qmaildir=${QMAIL_PREFIX} \
-		--enable-tcprules-prog=${LOCALBASE}/bin/tcprules \
-		--enable-tcpserver-file=${PREFIX}/vpopmail/etc/tcp.smtp
-CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd6.0
-
-#
-# User-configurable variables
-#
-# Define these to change from the default behaviour
-#
-# WITH_PASSWD   - allow authentication off /etc/passwd
-# WITHOUT_MD5_PASSWORDS - store encrypted passwords in MD5 format
-# WITH_CLEAR_PASSWD - store passwords in plaintext
-# WITH_LEARN_PASSWORDS	- enable learning passwords during pop auth
-# WITH_MYSQL	- allow authentitation via mysql
-# WITH_MYSQL_REPLICATION - enables MySQL database replication
-# WITH_MYSQL_LIMITS - enables the MySQL mailbox limit code
-# WITH_PGSQL	- allow authentication via PostgreSQL
-# WITH_SYBASE   - allow authentication via Sybase (NOT TESTED!)
-# WITH_ORACLE   - allow authentication via Oracle (NOT TESTED!)
-# WITH_LDAP     - allow authentication via LDAP
-# WITH_VALIAS   - enable valias processing
-# WITHOUT_ROAMING - disallow roaming users
-# WITH_IP_ALIAS - enables IP aliasing
-# WITH_QMAIL_EXT - enables qmail-like user-* address extesions processing
-# WITHOUT_FILE_LOCKING - disable file locking
-# WITH_FILE_SYNC - enables immediate synching (may decrease performance)
-# WITHOUT_USERS_BIG_DIR - disables using big directories for users
-# WITHOUT_SEEKABLE - disables vdelivermail's attempt to make its input seekable
-# WITH_SPAMASSASSIN	- enable SpamAssassin checks before Maildir delivery
-# WITH_SUID_VCHKPW	- set the setuid bit on the vchkpw program
-# WITH_SMTP_AUTH_PATCH	- apply an SMTP authentcation fix
-# WITHOUT_FPIC		- do not add -fPIC to the C compiler flags
-#
-# Set these to the values you'd prefer
-#
-# RELAYCLEAR    - time in minutes before clearing relay hole (requires roaming)
-# SPAM_THRESHOLD - minimum score required to delete spam messages (requires spamassassin)
-# DEFAULT_DOMAIN - default domain for non-vhost lookups
-# WITH_SINGLE_DOMAIN - optimize for a site with many users in a single domain
-# LOGLEVEL	- n - no logging, y - log all,
-#                 e - log errors, p - log passwords in errors,
-#		  v - verbose success and errors with passwords
-# WITHOUT_AUTH_LOG - disables authentication logging
-# WITH_MYSQL_LOG - enable auth logging to a MySQL database [deprecateed]
-# WITH_PGSQL_LOG - enable auth logging to a PostgreSQL database [deprecated]
-# WITH_SQL_LOG  - enable auth logging to the selected SQL database
-# WITH_SQL_LOG_REMOVE_DELETED - remove log entries for deleted users/domains
-# QMAIL_PREFIX  - location of qmail directory
-# PREFIX	- installation area for vpopmail (see comment below)
-# VCHKPW_GID	- the group ID of the new vchkpw group (89)
-# VPOPMAIL_UID	- the user ID of the new vpopmail user (89)
-#
-# MySQL database configuration options
-#
-# WITH_MYSQL_SERVER - the hostname of the MySQL server (localhost)
-# WITH_MYSQL_USER - the username for connecting to the MySQL server (root)
-# WITH_MYSQL_PASSWD - the password for connecting to the MySQL server (secret)
-# WITH_MYSQL_DB - the name of the MySQL database to use (vpopmail)
-# The server, user and password variables may be defined separately
-# for read and update access, allowing you to set up a less-priviledged
-# MySQL connection account with read-only access, and another one which
-# is used for administrative purposes:
-# WITH_MYSQL_READ_SERVER, WITH_MYSQL_READ_USER, WITH_MYSQL_READ_PASSWD
-# WITH_MYSQL_UPDATE_SERVER, WITH_MYSQL_UPDATE_USER, WITH_MYSQL_UPDATE_PASSWD
-# Those variables, if defined, override WITH_MYSQL_{SERVER,USER,PASSWD}
-#
-# PostgreSQL database configuration options
-#
-# WITH_PGSQL_USER - the username for connecting to the PostgreSQL server (postgres)
-# WITH_PGSQL_DB - the name of the PostgreSQL database to use (vpopmail)
-#
-# Oracle database configuration options
-#
-# WARNING: This is NOT TESTED, not in the least.
-# Please report any success or failure to the port maintainer,
-# Peter Pentchev <roam at FreeBSD.org>
-#
-# WITH_ORACLE_PROC - the name of the Oracle Pro-C precompiler, default 'proc'
-# WITH_ORACLE_SERVICE - the Oracle service name (jimmy)
-# WITH_ORACLE_USER - the username for connecting to the Oracle server (system)
-# WITH_ORACLE_PASSWD - the password for connecting to the Oracle server (manager)
-# WITH_ORACLE_DB  - the name of the Oracle database to connect to (orcl1)
-# WITH_ORACLE_HOME - the Oracle installation directory (/export/home/oracle)
-#
-# Sybase database configuration options
-#
-# WARNING: This is NOT TESTED, not in the least.
-# Please report any success or failure to the port maintainer,
-# Peter Pentchev <roam at FreeBSD.org>
-#
-# WITH_SYBASE_SERVER - the Sybase server name (empty)
-# WITH_SYBASE_USER - the username for connecting to the Sybase server (sa)
-# WITH_SYBASE_PASSWD - the password for connecting to the Sybase server (empty)
-# WITH_SYBASE_APP - the app for connecting to the Sybase server (vpopmail)
-# WITH_SYBASE_DB  - the name of the Sybase database to connect to (vpopmail)
-#
-
-RELAYCLEAR?=	30
-SPAM_THRESHOLD?=15
-LOGLEVEL?=	y
-
-.if defined(WITH_LDAP)
-USE_OPENLDAP=	yes
-.if defined(WITH_LDAP_SASL)
-WANT_OPENLDAP_SASL=	yes
-.endif
-CONFIGURE_ARGS+=	--enable-auth-module=ldap
-LDAP_FILES=		${WRKSRC}/README.ldap \
-			${WRKSRC}/ldap/qmailUser.schema \
-			${WRKSRC}/ldap/slapd.conf \
-			${WRKSRC}/ldap/vpopmail.ldif
-PLIST_SUB+=	LDAP=""
-.else
-PLIST_SUB+=	LDAP="@comment "
-.endif
-
-.if defined(WITH_MYSQL)
-USE_MYSQL=		yes
-CONFIGURE_ARGS+=	--enable-auth-module=mysql \
-			--enable-incdir=${LOCALBASE}/include/mysql \
-			--enable-libdir=${LOCALBASE}/lib/mysql
-.if defined(WITH_MYSQL_REPLICATION)
-CONFIGURE_ARGS+=	--enable-mysql-replication
-.endif
-.if defined(WITH_MYSQL_LOG)
-WITH_SQL_LOG=		yes
-.endif
-.if defined(WITH_MYSQL_LIMITS)
-CONFIGURE_ARGS+=	--enable-mysql-limits
-.endif
-
-WITH_MYSQL_SERVER?=		localhost
-WITH_MYSQL_READ_SERVER?=	${WITH_MYSQL_SERVER}
-WITH_MYSQL_UPDATE_SERVER?=	${WITH_MYSQL_SERVER}
-WITH_MYSQL_USER?=		vpopmail
-WITH_MYSQL_READ_USER?=		${WITH_MYSQL_USER}
-WITH_MYSQL_UPDATE_USER?=	${WITH_MYSQL_USER}
-WITH_MYSQL_PASSWD?=		secret
-WITH_MYSQL_READ_PASSWD?=	${WITH_MYSQL_PASSWD}
-WITH_MYSQL_UPDATE_PASSWD?=	${WITH_MYSQL_PASSWD}
-WITH_MYSQL_DB?=			vpopmail
-.endif
-
-.if defined(WITH_POSTGRESQL)
-WITH_PGSQL=	yes
-.endif
-
-.if defined(WITH_PGSQL)
-USE_PGSQL=		yes
-CONFIGURE_ARGS+=	--enable-auth-module=pgsql
-
-.if defined(WITH_PGSQL_LOG)
-WITH_SQL_LOG=		yes
-.endif
-.endif
-
-.if defined(WITH_SQL_LOG)
-CONFIGURE_ARGS+=	--enable-sql-logging
-.if defined(WITH_SQL_LOG_REMOVE_DELETED)
-EXTRA_PATCHES+=	${FILESDIR}/sql-remove-deleted.patch
-.endif
-.endif
-
-.if defined(WITH_SMTP_AUTH_PATCH)
-EXTRA_PATCHES+=	${FILESDIR}/vchkpw-smtp-auth.patch
-.endif
-
-.if defined(NOPORTDOCS)
-EXTRA_PATCHES+=	${FILESDIR}/Makefile.in-noportdocs.patch
-.endif
-
-.include <bsd.port.pre.mk>
-
-.if !defined(WITHOUT_FPIC) && ${ARCH} == "amd64"
-CFLAGS+=	-fPIC
-.endif
-
-# Uncomment this, or set PREFIX to /home if you have an existing
-# vpopmail install with the vpopmail users' home directory set to
-# /home/vpopmail - package rules dictate we default to /usr/local/vpopmail
-#
-#PREFIX?=	/home
-
-# End of user-configurable variables
-
-#
-# Some suggestions from Gabriel Ambuehl <gabriel_ambuehl at buz.ch>
-#
-
-CONFIGURE_ARGS+=	--enable-logging=${LOGLEVEL}
-
-.if defined(WITH_PASSWD)
-CONFIGURE_ARGS+=	--enable-passwd
-.endif
-
-.if defined(WITHOUT_MD5_PASSWORDS)
-CONFIGURE_ARGS+=	--disable-md5-passwords
-.endif
-
-.if defined(WITH_APOP)
-BROKEN=		The WITH_APOP option is deprecated; set WITH_CLEAR_PASSWD instead, APOP will just work
-.endif
-
-.if defined(WITH_VALIAS)
-CONFIGURE_ARGS+=	--enable-valias
-.endif
-
-.if !defined(WITHOUT_ROAMING)
-CONFIGURE_ARGS+=	--enable-roaming-users \
-			--enable-relay-clear-minutes=${RELAYCLEAR}
-.endif
-
-.if !defined(WITH_CLEAR_PASSWD)
-CONFIGURE_ARGS+=	--disable-clear-passwd
-.endif
-
-.if defined(WITH_LEARN_PASSWORDS)
-CONFIGURE_ARGS+=	--enable-learn-passwords
-.endif
-
-.if defined(WITH_SYBASE)
-CONFIGURE_ARGS+=	--enable-auth-module=sybase
-.endif
-
-.if defined(WITH_ORACLE)
-WITH_ORACLE_PROC?=	proc
-CONFIGURE_ARGS+=	--enable-auth-module=oracle
-.endif
-
-.if defined(WITH_SINGLE_DOMAIN)
-CONFIGURE_ARGS+=	--disable-many-domains
-.endif
-
-.if defined(WITH_IP_ALIAS)
-CONFIGURE_ARGS+=	--enable-ip-alias-domains
-.endif
-
-.if defined(WITH_QMAIL_EXT)
-CONFIGURE_ARGS+=	--enable-qmail-ext
-.endif
-
-.if defined(WITHOUT_FILE_LOCKING)
-CONFIGURE_ARGS+=	--disable-file-locking
-.endif
-
-.if defined(WITH_FILE_SYNC)
-CONFIGURE_ARGS+=	--enable-file-sync
-.endif
-
-.if defined(WITHOUT_AUTH_LOG)
-CONFIGURE_ARGS+=	--disable-auth-logging
-.endif
-
-.if defined(WITHOUT_USERS_BIG_DIR)
-CONFIGURE_ARGS+=	--disable-users-big-dir
-.endif
-
-.if defined(WITHOUT_SEEKABLE)
-CONFIGURE_ARGS+=	--disable-make-seekable
-.endif
-
-.if defined(WITH_SPAMASSASSIN)
-BUILD_DEPENDS+=		spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin
-CONFIGURE_ARGS+=	--enable-spamassassin=${LOCALBASE}/bin/spamc \
-			--enable-spam-threshold=${SPAM_THRESHOLD}
-.endif
-
-DOCS=		README README.filelocking \
-		README.ipaliasdomains README.ldap README.mysql \
-		README.oracle README.pgsql README.quotas \
-		README.roamingusers README.sybase README.vlimits \
-		README.vpopmaild README.vpopmaild README.vqmaillocal
-
-#
-# This port doesn't honour PREFIX, it honours vpopmail's home directory.
-# Since we create vpopmail if it doesn't exist, we set it so that it
-# does honour PREFIX. -- nbm
-#
-
-pre-configure:
-	@PKG_PREFIX=${PREFIX} ${PERL5} ${PKGINSTALL}
-.if defined(WITH_PGSQL)
-.if defined(WITH_PGSQL_DB)
-	${REINPLACE_CMD} -E -e "s/(#define DB.*)vpopmail(.*)/\1${WITH_PGSQL_DB}\2/" ${WRKSRC}/vpgsql.h
-.endif
-.if defined(WITH_PGSQL_USER)
-	${REINPLACE_CMD} -E -e "s/(#define PG_CONNECT.*)postgres(.*)/\1${WITH_PGSQL_USER}\2/" ${WRKSRC}/vpgsql.h
-.endif
-.endif
-.if defined(WITH_ORACLE)
-.if defined(WITH_ORACLE_SERVICE)
-	${REINPLACE_CMD} -E -e "s/(#define ORACLE_SERVICE.*)jimmy(.*)/\1${WITH_ORACLE_SERVICE}\2/" ${WRKSRC}/voracle.h
-.endif
-.if defined(WITH_ORACLE_USER)
-	${REINPLACE_CMD} -E -e "s/(#define ORACLE_USER.*)system(.*)/\1${WITH_ORACLE_USER}\2/" ${WRKSRC}/voracle.h
-.endif
-.if defined(WITH_ORACLE_PASSWD)
-	${REINPLACE_CMD} -E -e "s/(#define ORACLE_PASSWD.*)manager(.*)/\1${WITH_ORACLE_PASSWD}\2/" ${WRKSRC}/voracle.h
-.endif
-.if defined(WITH_ORACLE_HOME)
-	${REINPLACE_CMD} -E -e "s@(#define ORACLE_HOME.*)/export/home/oracle(.*)@\1${WITH_ORACLE_HOME}\2@" ${WRKSRC}/voracle.h
-.endif
-.if defined(WITH_ORACLE_DB)
-	${REINPLACE_CMD} -E -e "s/(#define ORACLE_DATABASE.*)orcl1(.*)/\1${WITH_ORACLE_DB}\2/" ${WRKSRC}/voracle.h
-.endif
-	cd ${WRKSRC} && ${WITH_ORACLE_PROC} voracle.pc
-.endif
-.if defined(WITH_SYBASE)
-.if defined(WITH_SYBASE_SERVER)
-	${REINPLACE_CMD} -E -e "s/(#define SYBASE_SERVER.*)\"\"(.*)/\1\"${WITH_SYBASE_SERVER}\"\2/" ${WRKSRC}/vsybase.h
-.endif
-.if defined(WITH_SYBASE_USER)
-	${REINPLACE_CMD} -E -e "s/(#define SYBASE_USER.*)sa(.*)/\1${WITH_SYBASE_USER}\2/" ${WRKSRC}/vsybase.h
-.endif
-.if defined(WITH_SYBASE_PASSWD)
-	${REINPLACE_CMD} -E -e "s/(#define SYBASE_PASSWD.*)\"\"(.*)/\1\"${WITH_SYBASE_PASSWD}\"\2/" ${WRKSRC}/vsybase.h
-.endif
-.if defined(WITH_SYBASE_APP)
-	${REINPLACE_CMD} -E -e "s@(#define SYBASE_APP.*)vpopmail(.*)@\1${WITH_SYBASE_APP}\2@" ${WRKSRC}/vsybase.h
-.endif
-.if defined(WITH_SYBASE_DB)
-	${REINPLACE_CMD} -E -e "s/(#define SYBASE_DATABASE.*)vpopmail(.*)/\1${WITH_SYBASE_DB}\2/" ${WRKSRC}/vsybase.h
-.endif
-.endif
-	${MKDIR} ${VCFGDIR}
-
-post-install:
-	${MKDIR} ${PREFIX}/vpopmail/etc
-	if [ -e "${VCFGDIR}/tcp.smtp" ]; then \
-		${INSTALL_DATA} ${VCFGDIR}/tcp.smtp ${PREFIX}/vpopmail/etc/tcp.smtp-dist; \
-	else \
-		${TOUCH} ${PREFIX}/vpopmail/etc/tcp.smtp-dist; \
-	fi;
-.if defined(DEFAULT_DOMAIN)
-	${ECHO_CMD} ${DEFAULT_DOMAIN} > ${PREFIX}/vpopmail/etc/defaultdomain
-.endif
-.if defined(WITH_MYSQL)
-	${ECHO_CMD} "${WITH_MYSQL_READ_SERVER}|0|${WITH_MYSQL_READ_USER}|${WITH_MYSQL_READ_PASSWD}|${WITH_MYSQL_DB}" \
-		>> ${PREFIX}/vpopmail/etc/vpopmail.mysql
-	${ECHO_CMD} "${WITH_MYSQL_UPDATE_SERVER}|0|${WITH_MYSQL_UPDATE_USER}|${WITH_MYSQL_UPDATE_PASSWD}|${WITH_MYSQL_DB}" \
-		>> ${PREFIX}/vpopmail/etc/vpopmail.mysql
-.endif
-	${CHOWN} -R vpopmail:vchkpw ${PREFIX}/vpopmail/bin/ ${PREFIX}/vpopmail/etc/
-.if defined(WITH_SPAMASSASSIN)
-	${ECHO_CMD} "***********************************************************************"
-	${ECHO_CMD} "Now you should add the following options to your spamd.sh startup file:"
-	${ECHO_CMD} "-v -u vpopmail"
-	${ECHO_CMD} "***********************************************************************"
-.endif
-.if defined(WITH_LDAP)
-	${MKDIR} ${PREFIX}/vpopmail/ldap
-	${INSTALL_DATA} ${LDAP_FILES} ${PREFIX}/vpopmail/ldap
-.endif
-.if defined(WITH_SUID_VCHKPW)
-	${CHMOD} ug+s ${PREFIX}/vpopmail/bin/vchkpw
-.endif
-	@${TOUCH} ${QMAIL_PREFIX}/control/locals
-.if !defined(NOPORTDOCS)
-	${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${PREFIX}/vpopmail/doc/
-.endif
-
-.include <bsd.port.post.mk>
--- mail/vpopmail/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 (vpopmail-5.4.17.tar.gz) = 4e4d815109ba7b8c38edad1afc7cc73a
-SHA256 (vpopmail-5.4.17.tar.gz) = 5cb004c9ca911c0e20dac3dfdb9069fa491b617146907e60dc900bd8349ca956
-SIZE (vpopmail-5.4.17.tar.gz) = 454437
--- mail/vpopmail/files/patch-README.vpopmaild
+++ /dev/null
@@ -1,108 +0,0 @@
-diff -urN -x .svn ../../../tags/vpopmail-5.4.14-stock/README.vpopmaild ./README.vpopmaild
---- ../../../tags/vpopmail-5.4.14-stock/README.vpopmaild	Mon Oct  2 13:49:02 2006
-+++ ./README.vpopmaild	Mon Oct  2 16:36:38 2006
-@@ -36,8 +36,8 @@
- 
- Rights required: Must be a valid email address.
- 
--Action: Verify the username and password of the persion desiring to
--        login, and set thier access rights.
-+Action: Verify the username and password of the person desiring to
-+        login, and set their access rights.
- 
- 	If the compact option is given, bitmap values are returned
-         as a single numeric value instead of a line for each bit
-@@ -62,7 +62,7 @@
- Rights required: SA_ADMIN, or QA_ADMIN
- 
- Action:  Delete a mailbox and user from the specified domain.  ONLY SA_ADMIN
--can delete users to domains other than the home domain of the login user.
-+can delete users from domains other than the home domain of the login user.
- 
- 
- --------------------------------------------------------------------
-@@ -170,11 +170,11 @@
- 
- 
- The following values are returned as the character '1' or '0'. '1'
--says the field is active which, for example an active no_password_change
-+says the field is active - for example, an active no_password_change field
- means the user can not change passwords.
- 
- no_password_change, no_pop, no_webmail, no_imap, bounce_mail, no_relay,
--no_dialup, user_flag_0, user_flag_1, user_flag_2, user_flag_3, no_smpt
-+no_dialup, user_flag_0, user_flag_1, user_flag_2, user_flag_3, no_smtp
- 
- 
- The following items confer extra privileges to the user. A '1' says that
-@@ -231,7 +231,7 @@
- Rights required: SA_ADMIN
- 
- Action: return internal information about a domain.  The information
--returned includes: domain directory, userid, groupid, number of users,
-+returned includes: domain directory, userid, groupid, number of users.
- If you ask for an alias domain, you will receive information for the
- parent domain.  Part of that information will include a list of all
- alias names of the parent domain.
-@@ -313,7 +313,7 @@
- Maildir dir
- lastauth file
- 
--The possible type values are: file, dir, chardev, plkdev, fifo, 
-+The possible type values are: file, dir, chardev, blkdev, fifo, 
- link, sock, unknown.
- 
- 
-@@ -381,7 +381,7 @@
- Rights required: SA_ADMIN
- 
- Action:  List all domains on the system, and their parent domain.
--If the optional page is given, lines_per_page must be specified also.
-+If the optional page is given, lines_per_page must also be specified.
- When both are given, the data is broken up into pages with lines_per_page
- lines on each.  The page returned is specified by page.
- 
-@@ -434,7 +434,7 @@
- 
- Rights required: Anyone
- 
--Action: Return the domain assoicated with this IP Address, if any.
-+Action: Return the domain associated with this IP Address, if any.
- 
- 
- --------------------------------------------------------------------
-@@ -476,7 +476,7 @@
- Rights required: Any.  SA_ADMIN can read all domains, all other users
-                  can only read their own domain.
- 
--Action:  Return Limits informaiton for a domain.  If no special limits 
-+Action:  Return Limits information for a domain.  If no special limits 
-          are set, it returns the default limit settings for all domains.
-          Find out where these files are kept, and add it here.
- 
-@@ -550,7 +550,7 @@
- 
- Rights required: SA_ADMIN
- 
--Action:  Delete the limits file for a domin.  This will make the
-+Action:  Delete the limits file for a domain.  This will make the
-          domain revert to the global limits set somewhere. (Find
-          out where, and add it here.)
- 
-@@ -674,14 +674,14 @@
- #define V_USER1       0x100
- #define V_USER2       0x200
- #define V_USER3       0x400
--After adding the NO_DIALUP flag we relalized there may be other
-+After adding the NO_DIALUP flag we realized there may be other
- flags people will want that are not directly used by any email code.
- 
- #define NO_SMTP       0x800
- If set, do not allow smtp connections.
- 
- #define QA_ADMIN     0x1000
--If set, the user is granted admin privilages in qmailadmin
-+If set, the user is granted admin privileges in qmailadmin
- 
- #define V_OVERRIDE   0x2000
- If set, the user is not subject to domain limits. Part of the
--- mail/vpopmail/files/patch-config.h.in
+++ /dev/null
@@ -1,15 +0,0 @@
---- config.h.in.orig	Mon Feb  2 06:24:19 2004
-+++ config.h.in	Mon Feb  2 09:33:51 2004
-@@ -238,6 +238,12 @@
- #undef QMAILDIR
- 
- /* "" */
-+#undef SPAMC
-+
-+/* "" */
-+#undef SPAM_THRESHOLD
-+
-+/* "" */
- #undef QMAILINJECT
- 
- /* "" */
--- mail/vpopmail/files/patch-Makefile.in
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/Makefile.in ./Makefile.in
---- ../../vendor/vpopmail/Makefile.in	Tue Oct  3 17:40:12 2006
-+++ ./Makefile.in	Wed Oct  4 15:48:16 2006
-@@ -97,7 +97,7 @@
- 
- COMMONSOURCES = vpopmail.c md5.c bigdir.c vauth.c file_lock.c vpalias.c seek.c vlimits.c maildirquota.c
- 
--CONFIG_CLEAN_FILES = vauth.c
-+CONFIG_CLEAN_FILES = vauth.c cdb/conf-cc cdb/conf-ld cdb/compile cdb/load
- 
- MYSQLCONF = $(DESTDIR)@vpopmaildir@/etc/vpopmail.mysql
- VLIMITS = $(DESTDIR)@vpopmaildir@/etc/vlimits.default
-@@ -106,7 +106,6 @@
- 
- libvpopmail_a_SOURCES = $(COMMONSOURCES) 
- libvpopmail_a_LIBADD = cdb/*.o
--libvpopmail_a_CFLAGS = -fPIC
- 
- vpopmailbindir = @vpopmaildir@/bin
- vpopmailbin_PROGRAMS = vchkpw vdelivermail clearopensmtp vadddomain \
-@@ -880,6 +879,8 @@
- 	echo "-L at vpopmaildir@/lib -lvpopmail @auth_libs@ @LIBS@" > \
- 	 $(DESTDIR)@vpopmaildir@/etc/lib_deps
- 
-+	$(INSTALL) -o @vpopuser@ -m 0644 -g @vpopgroup@ \
-+	  vlimits.default $(VLIMITS)-dist; \
- 	if test ! -r $(VLIMITS); then \
- 	  $(INSTALL) -o @vpopuser@ -m 0644 -g @vpopgroup@ \
- 	    vlimits.default $(VLIMITS); \
-@@ -897,7 +898,6 @@
- 	    echo "# settings for each line:" >> $(MYSQLCONF); \
- 	    echo "# host|port|user|password|database" >> $(MYSQLCONF); \
- 	    echo "#" >> $(MYSQLCONF); \
--	    echo "localhost|0|root|secret|vpopmail" >> $(MYSQLCONF); \
- 	    echo "#" >> $(MYSQLCONF); \
- 	    echo "# Note:" >> $(MYSQLCONF); \
- 	    echo "#   The value of host may be either a hostname or an IP address." >> $(MYSQLCONF); \
--- mail/vpopmail/files/patch-vqmaillocal.c
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vqmaillocal.c ./vqmaillocal.c
---- ../../vendor/vpopmail/vqmaillocal.c	Mon Oct  2 13:08:46 2006
-+++ ./vqmaillocal.c	Wed Oct  4 15:44:20 2006
-@@ -672,7 +672,7 @@
-      exit(-1);
-   }
- 
--  wait(&wstat);
-+  waitpid(child,&wstat,0);
- 
- }
- 
--- mail/vpopmail/files/patch-vchkpw.c
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vchkpw.c ./vchkpw.c
---- ../../vendor/vpopmail/vchkpw.c	Tue Oct  3 17:40:12 2006
-+++ ./vchkpw.c	Tue Oct  3 17:58:48 2006
-@@ -761,9 +762,6 @@
- 
- int authapop(unsigned char *password, unsigned char *timestamp, unsigned char *clearpass)
- {
--#ifdef USE_ACTIVE_DIR
--  return(-1);
--#else
-   MD5_CTX context;
-   unsigned char digest[16];
-   char encrypted[16*2+1];
-@@ -782,5 +780,4 @@
-   *s = '\0';
-  
-   return strcmp(password,encrypted);
--#endif
- }
--- mail/vpopmail/files/vchkpw-smtp-auth.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vchkpw.c ./vchkpw.c
---- ../../vendor/vpopmail/vchkpw.c	Tue Oct  3 17:40:12 2006
-+++ ./vchkpw.c	Tue Oct  3 17:58:48 2006
-@@ -441,7 +441,8 @@
-     /* Check CRAM-MD5 auth */
-     if(ConnType == SMTP_CONN) {
-       /* printf("vchkpw: smtp auth\n"); */
--      cramaccepted = authcram(ThePass,TheChallenge,vpw->pw_clear_passwd);
-+      /* cramaccepted = authcram(ThePass,TheChallenge,vpw->pw_clear_passwd); */
-+      cramaccepted = authcram(TheChallenge,ThePass,vpw->pw_clear_passwd);
-       if(cramaccepted == 0) strcpy(AuthType, "CRAM-MD5");
-     }
- 
--- mail/vpopmail/files/patch-vchangepw.c
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vchangepw.c ./vchangepw.c
---- ../../vendor/vpopmail/vchangepw.c	Wed Oct  4 13:19:16 2006
-+++ ./vchangepw.c	Wed Oct  4 15:44:20 2006
-@@ -35,7 +35,7 @@
- 
- int main(void)
- {
--	int i;
-+	int i, bad;
- 	struct vqpasswd *vpw = NULL;
- 	char Email[MAX_BUFF];
- 	char User[MAX_BUFF];
-@@ -53,9 +53,15 @@
- 
- 	fputs("Please enter the email address: ", stdout);
- 
--	fgets(Email, sizeof(Email), stdin);
--	i = strlen(Email) - 1;
--	if (Email[i] != '\n') {
-+	bad = 0;
-+	if (fgets(Email, sizeof(Email), stdin) == NULL) {
-+		bad = 1;
-+	} else {
-+		i = strlen(Email) - 1;
-+		if (i < 0 || (Email[i] != '\n' && Email[i] != '\r'))
-+			bad = 1;
-+	}
-+	if (bad) {
- 		puts("Error: email address too long");
- 		return 3;
- 	}
--- mail/vpopmail/files/patch-cdb-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- cdb/Makefile.orig	Thu Jun 15 17:00:43 2006
-+++ cdb/Makefile	Thu Jun 15 17:01:23 2006
-@@ -43,7 +43,7 @@
- compile: \
- warn-auto.sh conf-cc
- 	( cat warn-auto.sh; \
--	echo exec "`head -1 conf-cc`" -fPIC '-c $${1+"$$@"}' \
-+	echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \
- 	) > compile
- 	chmod 755 compile
- 
--- mail/vpopmail/files/patch-vmysql.c
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vmysql.c ./vmysql.c
---- ../../vendor/vpopmail/vmysql.c	Wed Oct  4 13:19:16 2006
-+++ ./vmysql.c	Wed Oct  4 16:08:34 2006
-@@ -579,12 +579,14 @@
- #endif
- 
- #ifdef ENABLE_SQL_LOGGING
-+#ifdef ENABLE_SQL_REMOVE_DELETED
-     qnprintf( SqlBufUpdate, SQL_BUF_SIZE,
-        "delete from vlog where domain = '%s'", domain );
-     if (mysql_query(&mysql_update,SqlBufUpdate)) {
-        return(-1);
-     }
- #endif
-+#endif
- 
-     vdel_limits(domain);
- 
-@@ -628,12 +630,14 @@
- #endif
- 
- #ifdef ENABLE_SQL_LOGGING
-+#ifdef ENABLE_SQL_REMOVE_DELETED
-     qnprintf( SqlBufUpdate, SQL_BUF_SIZE,
-         "delete from vlog where domain = '%s' and user = '%s'", 
-        domain, user );
-     if (mysql_query(&mysql_update,SqlBufUpdate)) {
-         err = -1;
-     }
-+#endif
- #endif
-     return(err);
- }
--- mail/vpopmail/files/Makefile.in-noportdocs.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Index: Makefile.in
-===================================================================
---- Makefile.in	(revision 548)
-+++ Makefile.in	(revision 550)
-@@ -863,7 +863,7 @@
- @SET_MAKE@
- 
- install-exec-am:
--	for d in bin doc etc include lib ; do \
-+	for d in bin etc include lib ; do \
- 	  if test ! -d $(DESTDIR)@vpopmaildir@/$$d; then \
- 	    $(INSTALL) -d -g @vpopgroup@ -m 0755 -o @vpopuser@ \
- 	      $(DESTDIR)@vpopmaildir@/$$d ; \
-@@ -920,14 +920,6 @@
- 		$(DESTDIR)@vpopmaildir@/include/ ; \
- 	done
- 
--	$(INSTALL) -d $(DESTDIR)@vpopmaildir@/doc/man_html
--	$(INSTALL) -d $(DESTDIR)@vpopmaildir@/doc/doc_html
--	$(INSTALL) -o @vpopuser@ -m 0444 -g @vpopgroup@ \
--	  doc/man_html/*.* $(DESTDIR)@vpopmaildir@/doc/man_html/
--
--	$(INSTALL) -o @vpopuser@ -m 0444 -g @vpopgroup@ \
--	  doc/doc_html/*.* $(DESTDIR)@vpopmaildir@/doc/doc_html/
--
- fix-priv:
- 	if test -r $(MYSQLCONF); then \
- 	  chown @vpopuser@  $(MYSQLCONF) ; \
--- mail/vpopmail/files/patch-vpopmail.c
+++ /dev/null
@@ -1,198 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vpopmail.c ./vpopmail.c
---- ../../vendor/vpopmail/vpopmail.c	Wed Oct  4 13:19:16 2006
-+++ ./vpopmail.c	Wed Oct  4 15:44:20 2006
-@@ -560,6 +560,8 @@
-                 if (entry.realdomain == NULL) continue;
- 
-                 /* remove trailing '-' from entry.domain */
-+		if (entry.realdomain <= entry.domain + 2 ||
-+		    *(entry.realdomain-2) != '-') continue;
-                 *(entry.realdomain-2) = '\0';
- 
-                 if ((p = strtok (NULL, ":")) == NULL) continue;
-@@ -1229,6 +1231,7 @@
-     for(i=0;tmpbuf1[i]!=0;++i) {
-       if (tmpbuf1[i]=='\n') {
-         tmpbuf1[i]=0;
-+	break;
-       }
-     }
- 
-@@ -1239,6 +1242,7 @@
-       if( 0 == strcmp(tmpbuf1,aliases[i])) {
-         doit=0;
- //        fprintf( stderr, "      ***  DELETE  ***\n");
-+	break;
-         }
-       }    
-     if( doit ) {
-@@ -1381,7 +1385,7 @@
-     execl(QMAILNEWU,"qmail-newu", NULL);
-     exit(127);
-   } else {
--    wait(&pid);
-+    waitpid(pid,&pid,0);
-   }
-   return(0);
- }
-@@ -1633,7 +1637,8 @@
- 
-   //  If users/assign - need to delete last character
-   if( 1 == file_type ) {
--    domain[--i] = 0;
-+    if (i > 0)
-+      domain[--i] = 0;
-   } else {
-     domain[i] = 0;
-   }
-@@ -1679,9 +1684,7 @@
-     i=i+2;
- 
-     //  Clean out the domain variable
--    for(j=0;j<MAX_BUFF;j++) {
--      domain[j] = 0;
--    }
-+    memset(domain, 0, sizeof(domain));
- 
-     //  Get one last look at the array before assembling it
- //    for(j=0;j<i;j++) {
-@@ -1738,9 +1741,7 @@
-  int i, count=0;
-  char cur_domain[MAX_BUFF];
- 
-- sortrec sortdata[2000];
--
--//  sortdata = malloc(  file_lines * sizeof( sortrec ));
-+ sortrec *sortdata = NULL;
- 
- //  fprintf( stderr, "\n***************************************\n" 
- //                   "sort_file: %s\n", filename );
-@@ -1761,8 +1762,8 @@
- #ifdef FILE_LOCKING
-     unlock_lock(fd3, 0, SEEK_SET, 0);
-     close(fd3);
--    return(VA_COULD_NOT_UPDATE_FILE);
- #endif
-+    return(VA_COULD_NOT_UPDATE_FILE);
-   }
- 
-   snprintf(tmpbuf1, sizeof(tmpbuf1), "%s", filename);
-@@ -1770,19 +1771,31 @@
-     if ( (fs = fopen(tmpbuf1, "w+")) == NULL ) {
-       fclose(fs1);
- #ifdef FILE_LOCKING
--      close(fd3);
-       unlock_lock(fd3, 0, SEEK_SET, 0);
-+      close(fd3);
- #endif
-       return(VA_COULD_NOT_UPDATE_FILE);
-     }
-   }
- 
-+  sortdata = malloc(  file_lines * sizeof( sortrec ));
-+  if (sortdata == NULL) {
-+    fclose(fs);
-+    fclose(fs1);
-+#ifdef FILE_LOCKING
-+    unlock_lock(fd3, 0, SEEK_SET, 0);
-+    close(fd3);
-+#endif
-+    return(VA_MEMORY_ALLOC_ERR);
-+  }
-+
-   while( fgets(tmpbuf1,sizeof(tmpbuf1),fs) != NULL ) {
- 
-     //  Trim \n off end of line.
-     for(i=0;tmpbuf1[i]!=0;++i) {
-       if (tmpbuf1[i]=='\n') {
-         tmpbuf1[i]=0;
-+	break;
-       }
-     }
- 
-@@ -1793,6 +1806,22 @@
- 
- //    fprintf( stderr, "   Entry: %s\n", tmpbuf1 );
- 
-+    // A new entry; is the allocated memory enough?
-+    if (count == file_lines) {
-+      fclose(fs);
-+      fclose(fs1);
-+#ifdef FILE_LOCKING
-+      unlock_lock(fd3, 0, SEEK_SET, 0);
-+      close(fd3);
-+#endif
-+      for (i = 0; i < count; i++) {
-+	free( sortdata[i].key );
-+	free( sortdata[i].value );
-+      }
-+      free( sortdata );
-+      return(VA_MEMORY_ALLOC_ERR);
-+    }
-+
-     extract_domain( cur_domain, tmpbuf1, file_type );
- 
-     sortdata[count].key = strdup( cur_domain );
-@@ -1826,7 +1855,11 @@
-   close(fd3);
- #endif
- 
--//  free( sortrec );
-+  for (i = 0; i < count; i++) {
-+    free( sortdata[i].key );
-+    free( sortdata[i].value );
-+  }
-+  free( sortdata );
- 
-   return(0);
- }
-@@ -1893,6 +1926,7 @@
-     for(i=0;tmpbuf1[i]!=0;++i) {
-       if (tmpbuf1[i]=='\n') {
-         tmpbuf1[i]=0;
-+	break;
-       }
-     }
- 
-@@ -2028,7 +2062,7 @@
-     execl(QMAILNEWMRH,"qmail-newmrh", NULL);
-     exit(127);
-   } else {
--    wait(&pid);
-+    waitpid(pid,&pid,0);
-   }
-   return(0);
- }
-@@ -2406,7 +2440,7 @@
- 
-   while( fgets(tmpbuf,sizeof(tmpbuf),fs) != NULL ) {
-     /* usually any newlines into nulls */
--    for(i=0;tmpbuf[i]!=0;++i) if (tmpbuf[i]=='\n') tmpbuf[i]=0;
-+    for(i=0;tmpbuf[i]!=0;++i) if (tmpbuf[i]=='\n') { tmpbuf[i]=0; break; }
-     /* Michael Bowe 14th August 2003
-      * What happens if domain isnt null terminated?
-      */
-@@ -2899,12 +2933,12 @@
- 
- int result;
- 
--//  NOTE: vopen_smpt_relay returns <0 on error 0 on duplicate 1 added
-+//  NOTE: vopen_smtp_relay returns <0 on error 0 on duplicate 1 added
- //  check for failure.
- 
-   /* store the user's ip address into the sql relay table */
-   if (( result = vopen_smtp_relay()) < 0 ) {   //   database error
--      vsqlerror( stderr, "Error. vopen_smpt_relay failed" );
-+      vsqlerror( stderr, "Error. vopen_smtp_relay failed" );
-       return (verrori);
-   } else if ( result == 1 ) {
-     /* generate a new tcp.smtp.cdb file */
-@@ -3198,7 +3232,7 @@
-   close(tcprules_fdm);  
- 
-   /* wait untill tcprules finishes so we don't have zombies */
--  while(wait(&wstat)!= (int)pid);
-+  waitpid(pid,&wstat,0);
- 
-   /* if tcprules encounters an error, then the tempfile will be
-    * left behind on the disk. We dont want this because we could
--- mail/vpopmail/files/patch-vdelivermail.c
+++ /dev/null
@@ -1,324 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vdelivermail.c ./vdelivermail.c
---- ../../vendor/vpopmail/vdelivermail.c	Wed Oct  4 13:19:16 2006
-+++ ./vdelivermail.c	Wed Oct  4 15:44:20 2006
-@@ -66,6 +66,7 @@
- 
- #define FILE_SIZE 156
- char loop_buf[FILE_SIZE];
-+char spam_buf[FILE_SIZE];
- 
- #define MSG_BUF_SIZE 5000
- char msgbuf[MSG_BUF_SIZE];
-@@ -78,9 +79,6 @@
- #define EXIT_OK 0
- #define EXIT_OVERQUOTA EXIT_BOUNCE
- 
--/* from qmail's wait.h for run_command() */
--#define wait_exitcode(w) ((w) >> 8)
--
- /* Forward declarations */
- int process_valias(void);
- void get_arguments(int argc, char **argv);
-@@ -93,7 +91,10 @@
- void usernotfound(void);
- int is_loop_match( const char *dt, const char *address);
- int deliver_quota_warning(const char *dir, const char *q);
--
-+#ifdef SPAM_THRESHOLD
-+int is_spam(int threshold);
-+int is_spam_match(char *xsl, int threshold);
-+#endif
- 
- /* print an error string and then exit
-  * vexit() never returns, so vexiterr() and vexit() should actually return void
-@@ -201,7 +202,7 @@
-     if ( is_domain_valid(TheDomain) != 0 )
-         vexiterr (EXIT_BOUNCE, "invalid domain name");
- 
--    strncpy(TheUserFull, TheUser, sizeof(TheUserFull));
-+    snprintf (TheUserFull, sizeof(TheUserFull), "%s", TheUser);
- 
- #ifdef QMAIL_EXT
-     /* !! Shouldn't this work its way backwards, and try all possibilities?
-@@ -247,7 +248,7 @@
- 
-     /* check for wildcard if there's no match */
-     if(tmpstr == NULL) {
--        for(i=strlen(TheUser);i >= 0 && j != 1;--i) {
-+        for(i=strlen(TheUser);i > 0 && j != 1;--i) {
-             if(TheUser[i-1]=='-') {
-                 tmpuser[0] = '\0';
-                 strncat(tmpuser,TheUser,i); 
-@@ -410,6 +411,10 @@
-   char local_file_new[FILE_SIZE];
-   size_t headerlen;
-   int write_fd;
-+#ifdef SPAMC
-+  int nread;
-+  int pim[2];
-+#endif
-   char quota[80];
- 
-     headerlen = strlen (extra_headers);
-@@ -435,6 +440,49 @@
-         return(-2);
-     }
- 
-+#ifdef SPAMC
-+    /* fork the SpamAssassin client - patch by Alex Dupre */
-+    if (!pipe(pim)) {
-+        pid = vfork();
-+        switch (pid) {
-+            case -1:
-+                close(pim[0]);
-+                close(pim[1]);
-+                break;
-+            case 0:
-+                close(pim[0]);
-+                dup2(pim[1], 1);
-+                close(pim[1]);
-+                if (execl(SPAMC, SPAMC, "-u", maildir_to_email(maildir), 0) == -1) {
-+                    while ((nread = read(0, msgbuf, MSG_BUF_SIZE)) > 0)
-+                        write(1, msgbuf, nread);
-+                    _exit(0);
-+                }
-+        }
-+        close(pim[1]);
-+        dup2(pim[0], 0);
-+        close(pim[0]);
-+    }
-+#ifdef SPAM_THRESHOLD
-+    /* silently delete message if spam level > SPAM_THRESHOLD */
-+    if (is_spam(SPAM_THRESHOLD) == 1) {
-+        close(write_fd);
-+        unlink(local_file_tmp);
-+        return 0;
-+    }
-+
-+#ifdef MAKE_SEEKABLE
-+    if (!Seekable(0))
-+        MakeSeekable(stdin);
-+#endif
-+
-+    if (lseek(0, 0L, SEEK_SET) < 0) {
-+        printf("lseek errno=%d\n", errno);
-+        return -2;
-+    }
-+#endif
-+#endif
-+
-     if (fdcopy (write_fd, read_fd, extra_headers, headerlen) != 0) {
-         /* Did the write fail because we were over quota? */
-         if ( errno == EDQUOT ) {
-@@ -549,10 +597,10 @@
-             if (user_over_maildirquota(address,format_maildirquota(quota))==1) {
- 
-                 /* check for over quota message in domain */
--                sprintf(tmp_file, "%s/.over-quota.msg",TheDomainDir);
-+                snprintf(tmp_file, sizeof(tmp_file), "%s/.over-quota.msg",TheDomainDir);
-                 if ( (fs=fopen(tmp_file, "r")) == NULL ) {
-                     /* if no domain over quota then check in vpopmail dir */
--                    sprintf(tmp_file, "%s/%s/.over-quota.msg",VPOPMAILDIR,DOMAINS_DIR);
-+                    snprintf(tmp_file, sizeof(tmp_file), "%s/%s/.over-quota.msg",VPOPMAILDIR,DOMAINS_DIR);
-                     fs=fopen(tmp_file, "r");
-                 }
- 
-@@ -579,10 +627,10 @@
-         if (domain_over_maildirquota(address)==1)
-         {
-             /* check for over quota message in domain */
--            sprintf(tmp_file, "%s/.over-quota.msg",TheDomainDir);
-+            snprintf(tmp_file, sizeof(tmp_file), "%s/.over-quota.msg",TheDomainDir);
-             if ( (fs=fopen(tmp_file, "r")) == NULL ) {
-                 /* if no domain over quota then check in vpopmail dir */
--                sprintf(tmp_file, "%s/%s/.over-quota.msg",VPOPMAILDIR,DOMAINS_DIR);
-+                snprintf(tmp_file, sizeof(tmp_file), "%s/%s/.over-quota.msg",VPOPMAILDIR,DOMAINS_DIR);
-                 fs=fopen(tmp_file, "r");
-             }
- 
-@@ -673,9 +721,12 @@
-       }
- 
-       close(fdm);
--      waitpid(inject_pid,&child,0);
--      xcode = wait_exitcode(child);
--      if (xcode == 0) return;
-+      if (waitpid(inject_pid,&child,0) <= 0 || !WIFEXITED(child)) {
-+	      xcode = EXIT_DEFER;
-+      } else {
-+	      xcode = WEXITSTATUS(child);
-+	      if (xcode == 0) return;
-+      }
-       vexiterr (xcode, "system error calling qmail-inject");
-     }
- }
-@@ -775,6 +826,7 @@
-      printf("Unable to fork: %d.", errno); 
-      vexit(EXIT_DEFER);
-    case 0:
-+     setenv("SHELL", "/bin/sh", 1);
-      args[0] = "/bin/sh"; args[1] = "-c"; args[2] = prog; args[3] = 0;
-      sig_catch(SIGPIPE,SIG_DFL);
-      execv(*args,args);
-@@ -782,9 +834,9 @@
-      exit(EXIT_DEFER);    /* the child's exit code will get caught below */
-   }
- 
--  wait(&wstat);
--  waitpid(wstat,&child,0);
--  switch(wait_exitcode(wstat))
-+  if (waitpid(child,&wstat,0) < 0 || !WIFEXITED(wstat))
-+    vexit(EXIT_DEFER);
-+  switch(WEXITSTATUS(wstat))
-    {
-     case 64: case 65: case 70: case 76: case 77: case 78: case 100: case 112: vexit(EXIT_BOUNCE);
-     case 99: vexit(99);	/* not sure about this, when does it exit 99? */
-@@ -830,9 +882,13 @@
- 
-         /* if we find the line, return error (looping) */
-         if (is_loop_match(loop_buf, address)==1 ) {
-+            /* seek to the end of stdin */
-+            fseek(stdin, 0L, SEEK_END);
-             /* return the loop found */
-             return(1);
-         } else if (*loop_buf == '\r' || *loop_buf == '\n') {
-+            /* seek to the end of stdin */
-+            fseek(stdin, 0L, SEEK_END);
-             /* end of headers return not found looping message value */
-             return(0);
-         }
-@@ -949,10 +1005,10 @@
-       FILE *fs;
-       char tmp_file[256];
- 
--        sprintf(tmp_file, "%s/.no-user.msg",TheDomainDir);
-+        snprintf(tmp_file, sizeof(tmp_file), "%s/.no-user.msg",TheDomainDir);
-         if ( (fs=fopen(tmp_file, "r")) == NULL ) {
-             /* if no domain no user then check in vpopmail dir */
--            sprintf(tmp_file, "%s/%s/.no-user.msg",VPOPMAILDIR,DOMAINS_DIR);
-+            snprintf(tmp_file, sizeof(tmp_file), "%s/%s/.no-user.msg",VPOPMAILDIR,DOMAINS_DIR);
-             fs=fopen(tmp_file, "r");
-         }
-         if ( fs == NULL ) {
-@@ -999,7 +1055,7 @@
-  struct stat     sb;
-  char quotawarnmsg[BUFF_SIZE];
- 
--    sprintf (quotawarnmsg, "%s%s", dir, "/quotawarn");
-+    snprintf (quotawarnmsg, sizeof(quotawarnmsg), "%s%s", dir, "/quotawarn");
-     time(&tm);
- 
-     /* Send only one warning every 24 hours */
-@@ -1017,12 +1073,12 @@
-     close(fd);
- 
-     /* Look in the domain for a .quotawarn.msg */
--    sprintf(quotawarnmsg, "%s/.quotawarn.msg", TheDomainDir);
-+    snprintf(quotawarnmsg, sizeof(quotawarnmsg), "%s/.quotawarn.msg", TheDomainDir);
-     if ( ((read_fd = open(quotawarnmsg, O_RDONLY)) < 0) || 
-            (stat(quotawarnmsg, &sb) != 0)) {
- 
-         /* if that fails look in vpopmail dir */
--        sprintf(quotawarnmsg, "%s/%s/.quotawarn.msg", VPOPMAILDIR, DOMAINS_DIR);
-+        snprintf(quotawarnmsg, sizeof(quotawarnmsg), "%s/%s/.quotawarn.msg", VPOPMAILDIR, DOMAINS_DIR);
-         if ( ((read_fd = open(quotawarnmsg, O_RDONLY)) < 0) || 
-               (stat(quotawarnmsg, &sb) != 0)) {
-             return 0;
-@@ -1063,3 +1119,97 @@
- 
-     return (strcasecmp (compare, (dt+14)) == 0);
- }
-+
-+#ifdef SPAM_THRESHOLD
-+/* Check for a spam message
-+ * This is done by checking for a matching line
-+ * in the email headers for X-Spam-Level: which
-+ * we put in each spam email
-+ *
-+ * Return 1 if spam
-+ * Return 0 if not spam
-+ * Return -1 on error
-+ */
-+int is_spam(int threshold)
-+{
-+ int i;
-+ int found;
-+
-+#ifdef MAKE_SEEKABLE
-+    if (!Seekable(0))
-+        MakeSeekable(stdin);
-+#endif
-+
-+    if ( lseek(0, 0L, SEEK_SET) < 0 ) {
-+        printf("lseek errno=%d\n", errno);
-+        return(-1);
-+    }
-+
-+    while (fgets(spam_buf, sizeof(spam_buf), stdin) != NULL){
-+
-+        /* if we find the line, return error (looping) */
-+        if (strncmp(spam_buf, "X-Spam-Level: ", 14) == 0 &&
-+            is_spam_match(spam_buf, threshold) ==1) {
-+
-+            /* seek to the end of stdin */
-+            lseek(0, 0L, SEEK_END);
-+
-+            /* return the spam found */
-+            return(1);
-+
-+            /* check for the start of the body, we only need
-+            * to check the headers.
-+            */
-+        } else {
-+
-+            /* walk through the charaters in the body */
-+            for (i = 0, found = 0; spam_buf[i] != 0 && found == 0; ++i) {
-+                switch(spam_buf[i]) {
-+
-+                    /* skip blank spaces and new lines */
-+                    case ' ':
-+                    case '\n':
-+                    case '\t':
-+                    case '\r':
-+                        break;
-+
-+                    /* found a non blank, so we are still
-+                    * in the headers
-+                    */
-+                    default:
-+
-+                        /* set the found non blank char flag */
-+                        found = 1;
-+                        break;
-+                }
-+            }
-+
-+            /* if the line only had blanks, then it is the
-+             * delimiting line between the headers and the
-+             * body. We don't need to check the body for
-+             * the X-Spam-Level: line. Hence, we
-+             * are done with our search and can return the
-+             * spam not found value
-+            */
-+            if (found == 0) {
-+                /* seek to the end of stdin */
-+                lseek(0, 0L, SEEK_END);
-+                /* return not found spam message value */
-+                return(0);
-+            }
-+        }
-+    }
-+
-+    /* if we get here then there is either no body
-+     * or SpamAssassin drop it, so mark the message
-+     * as spam.
-+     */
-+    return(1);
-+}
-+
-+int is_spam_match(char *xsl, int threshold)
-+{
-+    if (strlen(xsl) - strlen("X-Spam-Level: ") > threshold) return(1);
-+    else return(0);
-+}
-+#endif
--- mail/vpopmail/files/patch-vpalias.c
+++ /dev/null
@@ -1,116 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vpalias.c ./vpalias.c
---- ../../vendor/vpopmail/vpalias.c	Wed Oct  4 13:19:16 2006
-+++ ./vpalias.c	Wed Oct  4 17:14:57 2006
-@@ -160,6 +160,7 @@
- {
-  char *tmpstr;
-  char Dir[156];
-+ char *p;
-  uid_t uid;
-  gid_t gid;
-  int i;
-@@ -174,8 +175,10 @@
- 	return(-1);
-     }
-     strncat(Dir, "/.qmail-", sizeof(Dir)-strlen(Dir)-1);
--    for(i=0;alias[i]!=0;++i) if ( alias[i] == '.' ) alias[i] = ':';
--    strncat(Dir, alias, sizeof(Dir)-strlen(Dir)-1);
-+    i = strlen(Dir);
-+    for (p = alias; (i < (int)sizeof(Dir) - 1) && (*p != '\0'); p++)
-+      Dir[i++] = (*p == '.' ? ':' : *p);
-+    Dir[i] = '\0';
-     return(unlink(Dir));
- }
- 
-@@ -192,8 +195,8 @@
-  gid_t gid;
-  int countit;
-  struct stat mystat;
-- char filename[500];
-- int i, j, len;
-+ char filename[500], **new_names;
-+ int i, j, len, cnt_names;
- 
-     if ( domain == NULL ) { 
-       verrori=VA_NULL_POINTER;
-@@ -226,27 +229,8 @@
-      *  Its only a few bytes...
-      */
- 
--    if (mydir!=NULL) closedir(mydir);
--    if ( (mydir = opendir(Dir)) == NULL ) return(NULL);
--
--    while ((mydirent=readdir(mydir))!=NULL) {
--      if ( strncmp(mydirent->d_name,".qmail-", 7) == 0 &&
--           strcmp(mydirent->d_name, ".qmail-default") != 0 ) {
--        max_names++;
--      }
--    }
--
--    /*  Now we know about how many aliases there may be.
--     *  Allocate a buffer for them
--     */    
--
--    if (mydir!=NULL) {
--	    closedir(mydir);
--		/* this is static and hence must be nulled incase max_names == 0 below */
--	    mydir = NULL;
--    }
--
--    if (max_names == 0) return NULL;
-+    max_names = 100; /* some kind of default... */
-+    num_names = 0;
- 
-     names = malloc( max_names * sizeof(char *));
-     memset(names, 0, max_names * sizeof(char *));
-@@ -258,7 +242,7 @@
-            strcmp(mydirent->d_name, ".qmail-default") != 0 ) {
- 
-         countit=0;
--        sprintf(filename, "%s/%s", Dir, mydirent->d_name);
-+        snprintf(filename, sizeof(filename), "%s/%s", Dir, mydirent->d_name);
-         
-         if(!lstat(filename, &mystat) && S_ISLNK(mystat.st_mode)) {
-           /*  It is a mailing list  */
-@@ -274,18 +258,39 @@
-         }
- 
-         if(countit) {
-+	  if (num_names == max_names) {
-+	    // reallocate the array
-+	    cnt_names = 2 * max_names;
-+	    new_names = realloc( names, cnt_names * sizeof(char *) );
-+	    if (new_names == NULL) {
-+	      for(i = 0; i < num_names; i++)
-+		free(names[i]);
-+	      free(names);
-+	      return(NULL);
-+	    }
-+
-+	    // Okay, looks like we allocated enough memory
-+	    names = new_names;
-+	    max_names = cnt_names;
-+	  }
-           sprintf(filename, "%s", mydirent->d_name );
-           len = strlen( filename ) - 7;
-           names[ num_names ] = malloc( len + 1 );
-           for(i=7,j=0; j<=len; i++,j++) {
--            names[num_names][j] = filename[i];
-             if( ':' == filename[i] ) {
-               names[num_names][j] = '.';
--            }
-+            } else {
-+	      names[num_names][j] = filename[i];
-+	    }
-           }
-           num_names++;          
-         }
-       }
-+    }
-+    if (num_names < max_names) {
-+      new_names = realloc( names, num_names * sizeof(char *) );
-+      if (new_names != NULL)
-+	names = new_names;
-     }
- 
-     if (mydir!=NULL) {
--- mail/vpopmail/files/patch-vpgsql.c
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -urN -x .svn ../../vendor/vpopmail/vpgsql.c ./vpgsql.c
---- ../../vendor/vpopmail/vpgsql.c	Wed Oct  4 13:19:16 2006
-+++ ./vpgsql.c	Sun Oct  8 17:20:54 2006
-@@ -16,6 +16,7 @@
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-  */
-+#include <ctype.h>
- #include <pwd.h>
- #include <unistd.h>
- #include <stdio.h>
-@@ -389,13 +390,15 @@
- #endif
- 
- #ifdef ENABLE_SQL_LOGGING
--    qnprintf( sqlBufUpdate, SQL_BUF_SIZE,
-+#ifdef ENABLE_SQL_REMOVE_DELETED
-+    qnprintf( SqlBufUpdate, SQL_BUF_SIZE,
-        "delete from vlog where domain = '%s'", domain );
-     pgres=PQexec(pgc, SqlBufUpdate);
--    if( !pgres || PGresultStatus(pgres)!=PGRES_COMMAND_OK) {
-+    if( !pgres || PQresultStatus(pgres)!=PGRES_COMMAND_OK) {
-       return(-1);
-     }
- #endif
-+#endif
-     return(0);
- }
- 
-@@ -442,13 +445,15 @@
- #endif
- 
- #ifdef ENABLE_SQL_LOGGING
--    qnprintf( sqlBufUpdate, SQL_BUF_SIZE,
-+#ifdef ENABLE_SQL_REMOVE_DELETED
-+    qnprintf( SqlBufUpdate, SQL_BUF_SIZE,
-         "delete from vlog where domain = '%s' and user='%s'", 
-        domain, user );
-     pgres=PQexec(pgc, SqlBufUpdate);
--    if( !pgres || PGresultStatus(pgres)!=PGRES_COMMAND_OK) {
-+    if( !pgres || PQresultStatus(pgres)!=PGRES_COMMAND_OK) {
-       err = -1;
-     }
-+#endif
- #endif
- 
-   return(err);
--- mail/vpopmail/files/patch-vdeldomain.c
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN -x .svn ../../../tags/vpopmail-5.4.14-stock/vdeldomain.c ./vdeldomain.c
---- ../../../tags/vpopmail-5.4.14-stock/vdeldomain.c	Mon Oct  2 13:49:02 2006
-+++ ./vdeldomain.c	Mon Oct  2 16:36:38 2006
-@@ -67,7 +67,7 @@
- 		if (strcmp(entry->domain, entry->realdomain) != 0) {
- 			aliases[aliascount++] = strdup(entry->domain);
- 		} else {
--			strcpy(parent,entry->domain);
-+			snprintf(parent,sizeof(parent),"%s",entry->domain);
- 		}
- 
- 		entry = get_domain_entries(NULL);
--- mail/vpopmail/files/patch-configure
+++ /dev/null
@@ -1,146 +0,0 @@
---- configure.old	Sun Nov 20 15:09:16 2005
-+++ configure	Sun Nov 20 15:11:01 2005
-@@ -838,6 +838,8 @@
-   --enable-qmail-newu=PATH   Full path to qmail-newu program.
-   --enable-qmail-inject=PATH Full path to qmail-inject program.
-   --enable-qmail-newmrh=PATH Full path to qmail-newmrh program.
-+  --enable-spamassassin=PATH Enable SpamAssassin. Full path to spamc program. default /usr/local/bin/spamc"
-+  --enable-spam-threshold=# or n Automatically delete messages that score more than # spam hits"
-   --enable-vpopuser=USER     User name allocated to vpopmail vpopmail.
-   --enable-vpopgroup=GROUP   Group name allocated to vpopmail vchkpw.
-   --enable-roaming-users     Enable POP-before-SMTP functionality.
-@@ -4693,7 +4695,7 @@
- 
- #----------------------------------------------------------------------
- 
--if test `$idcommand` != "0"
-+if false && test `$idcommand` != "0"
- then
-   { echo "$as_me:$LINENO: WARNING: === vpopmail must be configured as root. ===" >&5
- echo "$as_me: WARNING: === vpopmail must be configured as root. ===" >&2;}
-@@ -4823,6 +4825,46 @@
-     ;;
- esac
- 
-+# Check whether --enable-spamassassin or --disable-spamassassin was given.
-+if test "${enable_spamassassin+set}" = set; then
-+  enableval="$enable_spamassassin"
-+  spamc="$enableval"
-+
-+  case $spamc in
-+  1*|y*|Y*)
-+      spamc="/usr/local/bin/spamc"
-+      ;;
-+  esac
-+
-+  if test ! -f "$spamc"
-+  then
-+      { echo "configure: error: Unable to find your spamc file, specify --enable-spamassassin=/full/path/to/spamc" 1>&2; exit 1; }
-+  fi
-+
-+  cat >> confdefs.h <<EOF
-+#define SPAMC "$spamc"
-+EOF
-+
-+# Check whether --enable-spam-threshold or --disable-spam-threshold was given.
-+if test "${enable_spam_threshold+set}" = set; then
-+  enableval="$enable_spam_threshold"
-+  ENABLE_SPAM_THRESHOLD=$enableval
-+else
-+  ENABLE_SPAM_THRESHOLD=0
-+fi
-+
-+case $ENABLE_SPAM_THRESHOLD in
-+0*|n*|N*)
-+      ;;
-+*)
-+          cat >> confdefs.h <<EOF
-+#define SPAM_THRESHOLD $ENABLE_SPAM_THRESHOLD
-+EOF
-+
-+          ;;
-+esac
-+fi
-+
- #----------------------------------------------------------------------
- 
- echo "$as_me:$LINENO: checking whether we can locate the qmail directory" >&5
-@@ -5201,27 +5243,6 @@
- 
- #----------------------------------------------------------------------
- 
--if test ! -d $vpopmaildir/etc
--then
--  if test ! -d $vpopmaildir
--  then
--    { echo "$as_me:$LINENO: WARNING: creating $vpopmaildir " >&5
--echo "$as_me: WARNING: creating $vpopmaildir " >&2;}
--    mkdir -p $vpopmaildir
--    chown $vpopmailuid $vpopmaildir
--    chgrp $vpopmailgid $vpopmaildir
--    chmod 755 $vpopmaildir
--  fi
--  { echo "$as_me:$LINENO: WARNING: making a vpopmail etc directory " >&5
--echo "$as_me: WARNING: making a vpopmail etc directory " >&2;}
--  mkdir $vpopmaildir/etc
--  chown $vpopmailuid "$vpopmaildir"/etc
--  chgrp $vpopmailgid "$vpopmaildir"/etc
--  chmod 755 "$vpopmaildir"/etc
--fi
--
--#----------------------------------------------------------------------
--
- echo "$as_me:$LINENO: checking whether roaming-users has been enabled" >&5
- echo $ECHO_N "checking whether roaming-users has been enabled... $ECHO_C" >&6
- # Check whether --enable-roaming-users or --disable-roaming-users was given.
-@@ -5309,29 +5330,9 @@
- if test "${enable_tcpserver_file+set}" = set; then
-   enableval="$enable_tcpserver_file"
-   tcpserver_file="$enableval"
--else
--
--            if test "$tcpserver_file" = ""
--            then
--                { echo "$as_me:$LINENO: WARNING: Unable to find your tcpserver relay file." >&5
--echo "$as_me: WARNING: Unable to find your tcpserver relay file." >&2;}
--                { echo "$as_me:$LINENO: WARNING: Creating tcp.smtp in \"$vpopmaildir\"/etc/tcp.smtp." >&5
--echo "$as_me: WARNING: Creating tcp.smtp in \"$vpopmaildir\"/etc/tcp.smtp." >&2;}
--
--                echo "127.:allow,RELAYCLIENT=\"\"" > "$vpopmaildir"/etc/tcp.smtp
--                tcpserver_file="$vpopmaildir"/etc/tcp.smtp
--            fi
--
--
-+  echo "127.:allow,RELAYCLIENT=\"\"" > ${VCFGDIR}/tcp.smtp
- fi;
- 
--    if test ! -f "$tcpserver_file"
--    then
--        { { echo "$as_me:$LINENO: error: Unable to find your tcp.smtp file, specify --enable-tcpserver-path=/full/path/to/tcp.smtp" >&5
--echo "$as_me: error: Unable to find your tcp.smtp file, specify --enable-tcpserver-path=/full/path/to/tcp.smtp" >&2;}
--   { (exit 1); exit 1; }; }
--    fi
--
-     echo "$as_me:$LINENO: result: yes" >&5
- echo "${ECHO_T}yes" >&6
- 
-@@ -5979,7 +5980,7 @@
- #define USE_LDAP $USE_LDAP
- _ACEOF
- 
--    auth_libs="-L/usr/local/lib -lldap -llber -lresolv"
-+    auth_libs="-L/usr/local/lib -lldap -llber"
- 
-     auth_inc="-I/usr/local/include"
- 
-@@ -8296,8 +8297,8 @@
-   fi
- fi
- 
--echo "${CC} -O2" > cdb/conf-cc
--echo "${CC} -s" > cdb/conf-ld
-+echo "${CC} ${CFLAGS}" > cdb/conf-cc
-+echo "${CC} ${STRIP}" > cdb/conf-ld
- 
- echo ""
- echo ""
--- mail/vpopmail/files/sql-remove-deleted.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -urN -x .svn ../../freebsd-port/vpopmail/config.h.in ./config.h.in
---- ../../freebsd-port/vpopmail/config.h.in	Wed Oct  4 15:59:54 2006
-+++ ./config.h.in	Wed Oct  4 16:02:18 2006
-@@ -354,3 +354,5 @@
- 
- /* Define to `int' if <sys/types.h> doesn't define. */
- #undef uid_t
-+
-+#define ENABLE_SQL_REMOVE_DELETED


More information about the Midnightbsd-cvs mailing list