diff --git a/mail/p5-qpsmtpd/Makefile b/mail/p5-qpsmtpd/Makefile index 03f21f0a10ee..69fd6b7d3006 100644 --- a/mail/p5-qpsmtpd/Makefile +++ b/mail/p5-qpsmtpd/Makefile @@ -1,77 +1,77 @@ # New ports collection makefile for: qpsmtpd # Date created: 1 January 2007 # Whom: Zane C. Bowers # # $FreeBSD$ # PORTNAME= qpsmtpd PORTVERSION= 0.40 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= mail MASTER_SITES= http://smtpd.develooper.com/files/ PKGNAMEPREFIX= p5- DISTNAME= qpsmtpd-${PORTVERSION} MAINTAINER= vvelox@vvelox.net COMMENT= A flexible SMTP daemon written in Perl and featuring a plugin API RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Net/DNS.pm:${PORTSDIR}/dns/p5-Net-DNS \ ${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \ ${SITE_PERL}/Mail/Header.pm:${PORTSDIR}/mail/p5-Mail-Tools \ ${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL \ spamd:${PORTSDIR}/mail/p5-Mail-SpamAssassin \ ${SITE_PERL}/${PERL_ARCH}/Net/DNS/Resolver.pm:${PORTSDIR}/dns/p5-Net-DNS \ ${SITE_PERL}/Date/Parse.pm:${PORTSDIR}/devel/p5-TimeDate \ ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp \ ${SITE_PERL}/${PERL_ARCH}/Geo/IP.pm:${PORTSDIR}/net/p5-Geo-IP \ ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap \ ${SITE_PERL}/Digest/HMAC_MD5.pm:${PORTSDIR}/security/p5-Digest-HMAC \ clamd:${PORTSDIR}/security/clamav WRKSRC= ${WRKDIR}/${DISTNAME} PERL_CONFIGURE= yes MAN3= Qpsmtpd::Command.3 \ Qpsmtpd::Constants.3 \ Qpsmtpd::DSN.3 \ Qpsmtpd::ConfigServer.3 \ Qpsmtpd::Transaction.3 \ Qpsmtpd::Address.3 \ Qpsmtpd.3 \ Qpsmtpd::Connection.3 \ Qpsmtpd::Postfix.3 \ Apache::Qpsmtpd.3 USE_RC_SUBR= qpsmtpd.sh pre-configure: @${RM} ${WRKSRC}/plugins/milter post-install: @${MKDIR} ${EXAMPLESDIR} @${MKDIR} ${DATADIR} @${MKDIR} ${DATADIR}/plugins @(cd ${WRKSRC}/plugins/ && ${COPYTREE_SHARE} \* ${DATADIR}/plugins/) @(cd ${WRKSRC}/config.sample/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/) .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/README* ${DOCSDIR}/ .endif @${ECHO_MSG} @${ECHO_MSG} @${ECHO_MSG} '*****************************************************************' @${ECHO_MSG} @${ECHO_MSG} "Please read http://wiki.qpsmtpd.org/ for more info about" @${ECHO_MSG} "installation." @${ECHO_MSG} @${ECHO_MSG} "The example config can be found in "${PREFIX}"/share/examples/"${PORTNAME}"/" @${ECHO_MSG} @${ECHO_MSG} "The plugins can be found in "${PREFIX}"/share/"${PORTNAME}"/plugins/" @${ECHO_MSG} @${ECHO_MSG} "This port does also not make any assumptions about what user you" @${ECHO_MSG} "wish to use or install location." @${ECHO_MSG} @${ECHO_MSG} '*****************************************************************' .include diff --git a/mail/p5-qpsmtpd/files/qpsmtpd.sh.in b/mail/p5-qpsmtpd/files/qpsmtpd.sh.in index 52124aada89a..7ec7533403b6 100644 --- a/mail/p5-qpsmtpd/files/qpsmtpd.sh.in +++ b/mail/p5-qpsmtpd/files/qpsmtpd.sh.in @@ -1,78 +1,79 @@ #!/bin/sh # PROVIDE: qpsmtpd # REQUIRE: NETWORKING SERVERS # BEFORE: securelevel #variables #qpsmtpd_user = the user to run qpsmtpd-forkserver under #qpsmtpd_group = the group the pid dir will be chowned to #qpsmtpd_port = the port it should listen on #qpsmtpd_max_per_ip = max connections per IP #qpsmtpd_max_connections = maximum total connections #qpsmtpd_listen_on = IP to listen on . "/etc/rc.subr" name="qpsmtpd" rcvar=`set_rcvar` +load_rc_config $name command="%%PREFIX%%/bin/qpsmtpd-forkserver" pidfile="/var/run/qpsmtpd/qpsmtpd.pid" start_precmd="start_precmd" start_cmd="start_cmd" stop_cmd="stop_cmd" start_precmd() { #exits if no user is specified if [ -z $qpsmtpd_user ]; then echo "qpsmtpd_user not set" exit 1 fi #exits if no group is specified if [ -z $qpsmtpd_group ]; then echo "qpsmtpd_group not set" exit 1 fi #sets it to the default if the port is not specified if [ -z $qpsmtpd_port ]; then qpsmtpd_port="2525" fi #set it to the default max per ip if [ -z $qpsmtpd_max_per_ip ]; then qpsmtpd_max_per_ip="5" fi #set it do the max number of connections total if [ -z $qpsmtpd_max_connections ]; then qpsmtpd_max_connections="15" fi #set the default listen on to everything if [ -z $qpsmtpd_listen_on ]; then qpsmtpd_listen_on="0.0.0.0" fi if [ ! -d /var/run/qpsmtpd/ ] ; then mkdir /var/run/qpsmtpd fi chown $qpsmtpd_user:$qpsmtpd_group /var/run/qpsmtpd } start_cmd() { eval $command -p $qpsmtpd_port -c $qpsmtpd_max_connections -u $qpsmtpd_users -m $qpsmtpd_max_per_ip -l $qpsmtpd_listen_on --pid-file $pidfile } stop_cmd() { kill `cat $pidfile` } run_rc_command "$1"