# $Id: Portfile 56675 2009-09-01 00:20:53Z toby@macports.org $

PortSystem 1.0

name			maildrop
version	 		2.2.0
revision		2
categories		mail
maintainers		tnpi.biz:matt
description		Mail delivery agent (MDA) with filtering abilities
long_description	${description}
homepage		http://www.courier-mta.org/maildrop/
platforms		darwin
master_sites		sourceforge:courier
use_bzip2		yes
checksums		md5 1fd5293c73adb64a01cb3d3e59e54618 \
			sha1 a6af98724fda72c4d1ebfd6e6f5fc5f38caf9e38 \
			rmd160 8c715af18693c375ca197450cdb57e39813ea8cd
configure.args		--mandir=${prefix}/share/man \
			--with-etcdir=${prefix}/etc \
			--enable-syslog=1
depends_lib     	port:pcre port:gdbm

variant vpopmail description {For use with vpopmail} {
	configure.args-append	--enable-maildrop-gid=vchkpw
}

variant qmail description {For use with qmail-spamcontrol} {
	depends_lib-append	port:qmail-spamcontrol
	configure.args-append	--enable-sendmail=${prefix}/var/qmail/bin/sendmail
}

pre-configure {
	if {[variant_isset vpopmail]} {
		addgroup vchkpw gid=2109
	}
}

post-install {
	ui_msg "\n
Please note the default maildrop mailfilter is in the
${prefix}/etc directory.
\n"
}
