diff options
author | jlam <jlam@pkgsrc.org> | 2006-04-28 18:10:21 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-04-28 18:10:21 +0000 |
commit | 516953cc32ee318a6ddd02fd0105a7ae6515d29a (patch) | |
tree | 1b18b194213f4093a2abb4cf9b9881ccd8a95349 /mail/courier-mta | |
parent | a40ca909adcd14712106ee470973726587aae508 (diff) | |
download | pkgsrc-516953cc32ee318a6ddd02fd0105a7ae6515d29a.tar.gz |
First cut at packaging the MTA and mailing list components of
courier-0.53.1 as mail/courier-mta.
The Courier mail transfer agent (MTA) is a modular multiprotocol mail
server that's designed to strike a balance between reasonable performance,
flexibility and features.
This package differs from traditional courier-mta packages in that
the webmail, imap/pop3, and maildrop components are not included
because they are supplied by the mail/sqwebmail, mail/courier-imap,
and mail/maildrop packages, respectively. When Courier-MTA is installed
together with Courier-IMAP and SqWebMail, they form an integrated
mail/groupware server suite that provides ESMTP, IMAP, POP3, webmail,
and mailing list services within a single, consistent, framework. A
web-based administration and configuration tool is included for
comprehensive configuration of the entire Courier software suite.
Many thanks to Yarema <yds@CoolRat.org> whose Courier port for FreeBSD
was an invaluable reference.
Diffstat (limited to 'mail/courier-mta')
34 files changed, 1669 insertions, 0 deletions
diff --git a/mail/courier-mta/DEINSTALL b/mail/courier-mta/DEINSTALL new file mode 100644 index 00000000000..ecac4e0cffb --- /dev/null +++ b/mail/courier-mta/DEINSTALL @@ -0,0 +1,93 @@ +# $NetBSD: DEINSTALL,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +case ${STAGE} in +DEINSTALL) + # + # Note some additional files that may be created by the sysadmin + # that can probably be removed. + # + if ${TEST} -x ./+FILES; then + for file in \ + ${PKG_SYSCONFDIR}/aliases-esmtp \ + ${PKG_SYSCONFDIR}/aliases-esmtp.dat \ + ${PKG_SYSCONFDIR}/aliases-local \ + ${PKG_SYSCONFDIR}/aliases-local.dat \ + ${PKG_SYSCONFDIR}/aliases-uucp \ + ${PKG_SYSCONFDIR}/aliases-uucp.dat \ + ${PKG_SYSCONFDIR}/aliases.dat \ + ${PKG_SYSCONFDIR}/aliasfilteracct \ + ${PKG_SYSCONFDIR}/backuprelay \ + ${PKG_SYSCONFDIR}/batchsize \ + ${PKG_SYSCONFDIR}/bofh \ + ${PKG_SYSCONFDIR}/dotextension \ + ${PKG_SYSCONFDIR}/dsnfrom \ + ${PKG_SYSCONFDIR}/dsnlimit \ + ${PKG_SYSCONFDIR}/esmtpacceptmailfor \ + ${PKG_SYSCONFDIR}/esmtpacceptmailfor.dat \ + ${PKG_SYSCONFDIR}/esmtpd.pem \ + ${PKG_SYSCONFDIR}/esmtpd.rand \ + ${PKG_SYSCONFDIR}/esmtpdelay \ + ${PKG_SYSCONFDIR}/esmtpgreeting \ + ${PKG_SYSCONFDIR}/esmtphelo \ + ${PKG_SYSCONFDIR}/esmtppercentrelay \ + ${PKG_SYSCONFDIR}/esmtppercentrelay.dat \ + ${PKG_SYSCONFDIR}/esmtproutes \ + ${PKG_SYSCONFDIR}/esmtptimeout \ + ${PKG_SYSCONFDIR}/esmtptimeoutconnect \ + ${PKG_SYSCONFDIR}/esmtptimeoutdata \ + ${PKG_SYSCONFDIR}/esmtptimeouthelo \ + ${PKG_SYSCONFDIR}/esmtptimeoutkeepalive \ + ${PKG_SYSCONFDIR}/esmtptimeoutkeepaliveping \ + ${PKG_SYSCONFDIR}/esmtptimeoutquit \ + ${PKG_SYSCONFDIR}/faxqueuetime \ + ${PKG_SYSCONFDIR}/hosteddomains \ + ${PKG_SYSCONFDIR}/hosteddomains.dat \ + ${PKG_SYSCONFDIR}/locals \ + ${PKG_SYSCONFDIR}/localtimeout \ + ${PKG_SYSCONFDIR}/me \ + ${PKG_SYSCONFDIR}/msgidhost \ + ${PKG_SYSCONFDIR}/nochangingfrom \ + ${PKG_SYSCONFDIR}/queuefill \ + ${PKG_SYSCONFDIR}/queuehi \ + ${PKG_SYSCONFDIR}/queuelo \ + ${PKG_SYSCONFDIR}/queuetime \ + ${PKG_SYSCONFDIR}/retryalpha \ + ${PKG_SYSCONFDIR}/retrybeta \ + ${PKG_SYSCONFDIR}/retrydelta \ + ${PKG_SYSCONFDIR}/retrygamma \ + ${PKG_SYSCONFDIR}/sizelimit \ + ${PKG_SYSCONFDIR}/smtpaccess.dat \ + ${PKG_SYSCONFDIR}/submitdelay \ + ${PKG_SYSCONFDIR}/usexsender \ + ${PKG_SYSCONFDIR}/uucpme \ + ${PKG_SYSCONFDIR}/uucpneighbors \ + ${PKG_SYSCONFDIR}/uucprewriteheaders \ + ${PKG_SYSCONFDIR}/warntime \ + ${PKG_SYSCONFDIR}/webadmin/password + do + ${ECHO} "# FILE: $file . /dev/null" >> ./+FILES + done + fi + + # Unconditionally remove socket files. + for sockfile in \ + @COURIER_STATEDIR@/allfilters/.dupfilter \ + @COURIER_STATEDIR@/allfilters/.perlfilter \ + @COURIER_STATEDIR@/allfilters/dupfilter \ + @COURIER_STATEDIR@/allfilters/perlfilter \ + @COURIER_STATEDIR@/filters/.dupfilter \ + @COURIER_STATEDIR@/filters/.perlfilter \ + @COURIER_STATEDIR@/filters/dupfilter \ + @COURIER_STATEDIR@/filters/perlfilter + do + if ${TEST} -f "$sockfile"; then + ${ECHO} "Removing socket file:" + ${ECHO} " $sockfile" + ${RM} -f $sockfile + fi + done + + # Unconditionally remove temporary files. + ${RM} -rf @COURIER_STATEDIR@/tmp/* + ;; +esac diff --git a/mail/courier-mta/DESCR b/mail/courier-mta/DESCR new file mode 100644 index 00000000000..e4c448e01e0 --- /dev/null +++ b/mail/courier-mta/DESCR @@ -0,0 +1,10 @@ +The Courier mail transfer agent (MTA) is a modular multiprotocol mail +server that's designed to strike a balance between reasonable performance, +flexibility and features. + +When Courier-MTA is installed together with Courier-IMAP and SqWebMail, +they form an integrated mail/groupware server suite that provides +ESMTP, IMAP, POP3, webmail, and mailing list services within a single, +consistent framework. A web-based administration and configuration +tool is included for comprehensive configuration of the entire Courier +software suite. diff --git a/mail/courier-mta/MESSAGE b/mail/courier-mta/MESSAGE new file mode 100644 index 00000000000..f84f4debf14 --- /dev/null +++ b/mail/courier-mta/MESSAGE @@ -0,0 +1,27 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +It is recommended that Courier-MTA be installed together with Courier-IMAP +and SqWebMail -- together, they form an integrated mail/groupware +server suite that provides ESMTP, IMAP, POP3, webmail, and mailing +list services within a single, consistent framework that may be managed +through a web CGI application. + +There are two things which must be done to make the Courier ``webadmin'' +CGI application accessible through your HTTP server: + + (1) Copy the ``courierwebadmin'' CGI binary to the appropriate place in + your HTTP document root, e.g. ${PREFIX}/libexec/cgi-bin, then + Courier webadmin would be accessible through: + + http://your.domain.com/cgi-bin/courierwebadmin + + (2) Install a password to protect the ``webadmin'' CGI application by + creating a one-line file containing the plaintext password at: + + ${PKG_SYSCONFDIR}/webadmin/password + + This file should be owned by ${COURIER_USER}:${COURIER_GROUP} with + read-only permissions restricted to the owner (mode 0400). + +=========================================================================== diff --git a/mail/courier-mta/Makefile b/mail/courier-mta/Makefile new file mode 100644 index 00000000000..cf13851faa8 --- /dev/null +++ b/mail/courier-mta/Makefile @@ -0,0 +1,97 @@ +# $NetBSD: Makefile,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +DISTNAME= courier-${COURIER_VERSION} +CATEGORIES= mail +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= jlam@pkgsrc.org +COMMENT= Courier mail transport agent +HOMEPAGE= http://www.courier-mta.org/ + +DEPENDS+= courier-maildir>=${COURIER_VERSION}:../../mail/courier-maildir +DEPENDS+= maildrop>=2.0.2:../../mail/maildrop + +USE_TOOLS+= gmake perl:run +USE_LANGUAGES= c c++ + +PKGNAME= ${DISTNAME:S/-/-mta-/} +# PKGNAME is a parameter to the following file. +.include "Makefile.common" + +PLIST_SRC+= ${PKGDIR}/PLIST + +.include "pkginstall.mk" +.include "options.mk" + +USERGROUP_PHASE= configure + +CONFIGURE_ENV+= OPENSSL=${SSLBASE:Q}/bin/openssl +CONFIGURE_ENV+= PROCMAIL=${LOCALBASE:Q}/bin/procmail + +CONFIGURE_ARGS+= --datadir=${DATADIR:Q} +CONFIGURE_ARGS+= --with-mailuid=${PKG_UID.${COURIER_USER}} +CONFIGURE_ARGS+= --with-mailgid=${PKG_GID.${COURIER_GROUP}} +CONFIGURE_ARGS+= --with-paranoid-smtpext +CONFIGURE_ARGS+= --with-piddir=${VARBASE:Q}/run +CONFIGURE_ARGS+= --with-transport=${COURIER_TRANSPORTS:M*:Q} +CONFIGURE_ARGS+= --without-certdb + +# This argument is actually here just to make the "webmail" configure +# script work. The value is not actually used since in reality, we are +# using the sqwebmail package to provide the Courier webmail component. +# +CONFIGURE_ARGS+= --enable-mimetypes=/nonexistent + +INSTALL_DIRS= webadmin courier +INSTALL_AM_MAKEFLAGS+= sysconfdir=${EGDIR:Q} +INSTALL_AM_MAKEFLAGS+= htmldocdir=${DOCDIR:Q} +INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} AM_MAKEFLAGS=${INSTALL_AM_MAKEFLAGS:Q} + +SUBST_CLASSES+= courier +SUBST_FILES.courier= courier/doc/mkesmtpdcert.8.in \ + courier/doc/mkesmtpdcert.html.in \ + courier/filters/courierfilter.8.in \ + courier/filters/courierfilter.html.in \ + courier/module.esmtp/esmtpd-msa.dist.in \ + courier/module.esmtp/esmtpd-ssl.dist.in \ + courier/module.esmtp/esmtpd.cnf.in \ + courier/module.esmtp/esmtpd.dist.in \ + courier/module.esmtp/mkesmtpdcert.in +SUBST_SED.courier= -e "s|^ESMTPDSTART=.*|ESMTPDSTART=YES|g" \ + -e "s|^ESMTPDSSLSTART=.*|ESMTPDSSLSTART=YES|g" \ + -e "s|@datadir@/esmtpd.pem|@sysconfdir@/esmtpd.pem|g" \ + -e "s|@datadir@/esmtpd.rand|@sysconfdir@/esmtpd.rand|g" \ + -e "s|@libexecdir@/filters|@libexecdir@/courier/filters|g" +SUBST_STAGE.courier= pre-configure + +SUBST_CLASSES+= perms +SUBST_FILES.perms= courier/perms.sh.in +SUBST_SED.perms+= -e "s,@ROOT_USER@,"${ROOT_USER:Q}",g" \ + -e "s,@ROOT_GROUP@,"${ROOT_GROUP:Q}",g" +SUBST_STAGE.perms= pre-configure + +SUBST_CLASSES+= paths +SUBST_FILES.paths= ${WRKDIR}/mailer.conf +SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' +SUBST_STAGE.paths= post-patch + +.include "../../lang/perl5/buildlink3.mk" +.include "../../security/courier-authlib/buildlink3.mk" +.include "../../security/openssl/buildlink3.mk" + +post-extract: + ${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf + +post-build: + ${CAT} /dev/null > ${WRKDIR}/locallowercase + ${ECHO} ${PREFIX:Q}"/bin/maildrop" > ${WRKDIR}/maildropfilter + +post-install: + cd ${WRKSRC}/courier && \ + ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} install-permissions + ${INSTALL_DATA} ${WRKDIR}/mailer.conf ${EGDIR} + ${INSTALL_DATA} ${WRKDIR}/locallowercase ${EGDIR}/locallowercase + ${INSTALL_DATA} ${WRKDIR}/maildropfilter ${EGDIR}/maildropfilter + +.include "../../mk/bsd.pkg.mk" diff --git a/mail/courier-mta/Makefile.common b/mail/courier-mta/Makefile.common new file mode 100644 index 00000000000..b2edc78b8b1 --- /dev/null +++ b/mail/courier-mta/Makefile.common @@ -0,0 +1,60 @@ +# $NetBSD: Makefile.common,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# +# Package Makefiles should include this file after setting PKGNAME and +# PKG_SUPPORTED_OPTIONS. + +COURIER_VERSION= 0.53.1 + +.if !defined(PKGNAME) +PKG_FAIL_REASON+= "[courier/Makefile.common] PKGNAME must be set." +.endif + +.include "../../mk/bsd.prefs.mk" + +DATADIR= ${PREFIX}/share/courier +DOCDIR= ${PREFIX}/share/doc/courier +EGDIR= ${PREFIX}/share/examples/courier +LIBEXECDIR= ${PREFIX}/libexec/courier +COURIER_STATEDIR= ${VARBASE}/courier + +PKG_SYSCONFSUBDIR= courier +PKG_SYSCONFDIR_PERMS= ${COURIER_USER} ${COURIER_GROUP} 0755 +COURIER_FILE_PERMS= ${COURIER_USER} ${COURIER_GROUP} 0644 +COURIER_DIR_PERMS= ${COURIER_USER} ${COURIER_GROUP} 0755 +COURIER_SCRIPT_PERMS= ${COURIER_USER} ${COURIER_GROUP} 0755 + +FILES_SUBST+= COURIER_STATEDIR=${COURIER_STATEDIR:Q} + +.include "../../security/courier-authlib/Makefile.common" + +USE_LIBTOOL= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --localstatedir=${COURIER_STATEDIR:Q} +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} + +CONFIGURE_ARGS+= --disable-root-check +CONFIGURE_ARGS+= --enable-unicode +CONFIGURE_ARGS+= --enable-utf7-folder-encoding +CONFIGURE_ARGS+= --with-trashquota + +USE_DB185= yes +CONFIGURE_ARGS+= --with-db=db +.include "../../mk/bdb.buildlink3.mk" + +CONFIGURE_ENV+= SYSCONFTOOL_PERL=${PERL5:Q} + +# Note: This expression is the same as ${PKGBASE}, but the latter is +# not defined yet, so we cannot use it here. +PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//} +.include "../../mk/bsd.options.mk" + +# The maildir subdirectory can be built with a "fam" option, but it's only +# useful for the imap server and the webmail client. Handle the option +# here, but the corresponding package Makefiles should note that "fam" is +# a supported option on their own. +# +.if !empty(PKG_OPTIONS:Mfam) +. include "../../mk/fam.buildlink3.mk" +.endif + +.include "../../devel/pcre/buildlink3.mk" diff --git a/mail/courier-mta/PLIST b/mail/courier-mta/PLIST new file mode 100644 index 00000000000..0f6f18b8483 --- /dev/null +++ b/mail/courier-mta/PLIST @@ -0,0 +1,211 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +bin/cancelmsg +bin/courier-config +bin/couriermlm +bin/dotforward +bin/mailq +bin/rmail +bin/sendmail +bin/testmxlookup +libexec/courier/aliascombine +libexec/courier/aliascreate +libexec/courier/aliasexp +libexec/courier/cgi-bin/courierwebadmin +libexec/courier/courierd +libexec/courier/filters/dupfilter +libexec/courier/filters/perlfilter +libexec/courier/submit +libexec/courier/submitmkdir +man/man1/cancelmsg.1 +man/man1/couriermlm.1 +man/man1/dot-forward.1 +man/man1/dotforward.1 +man/man1/mailq.1 +man/man1/preline.1 +man/man1/rmail.1 +man/man1/sendmail.1 +man/man1/testmxlookup.1 +man/man5/dot-courier.5 +man/man7/localmailfilter.7 +man/man8/courier.8 +man/man8/courierfilter.8 +man/man8/courierldapaliasd.8 +man/man8/courierperlfilter.8 +man/man8/dupfilter.8 +man/man8/esmtpd-msa.8 +man/man8/esmtpd.8 +man/man8/makeacceptmailfor.8 +man/man8/makealiases.8 +man/man8/makehosteddomains.8 +man/man8/makepercentrelay.8 +man/man8/makesmtpaccess-msa.8 +man/man8/makesmtpaccess.8 +man/man8/mkesmtpdcert.8 +man/man8/pop3d.8 +man/man8/submit.8 +sbin/courier +sbin/courierfilter +sbin/filterctl +sbin/makealiases +sbin/makehosteddomains +sbin/showconfig +sbin/showmodules +share/courier/courierctl.start +share/courier/couriermlm/adminrequest.tmpl +share/courier/couriermlm/confsubj.tmpl +share/courier/couriermlm/digestsubj.tmpl +share/courier/couriermlm/fetch.tmpl +share/courier/couriermlm/fetchsubj.tmpl +share/courier/couriermlm/help.tmpl +share/courier/couriermlm/idxheader2html.tmpl +share/courier/couriermlm/idxheaderhtml.tmpl +share/courier/couriermlm/idxheadertxt.tmpl +share/courier/couriermlm/idxsubject.tmpl +share/courier/couriermlm/modrejbody.tmpl +share/courier/couriermlm/modreject.tmpl +share/courier/couriermlm/modrejheader.tmpl +share/courier/couriermlm/modsubject.tmpl +share/courier/couriermlm/modtext.tmpl +share/courier/couriermlm/modtext2.tmpl +share/courier/couriermlm/sub.tmpl +share/courier/couriermlm/sub2.tmpl +share/courier/couriermlm/sub3.tmpl +share/courier/couriermlm/sub4.tmpl +share/courier/couriermlm/sub5.tmpl +share/courier/couriermlm/subreportfooter.tmpl +share/courier/couriermlm/subreporthdr.tmpl +share/courier/couriermlm/subreporthdr1.tmpl +share/courier/couriermlm/subreporthdr2.tmpl +share/courier/couriermlm/subreporthdr3.tmpl +share/courier/couriermlm/unsub.tmpl +share/courier/couriermlm/unsub2.tmpl +share/courier/couriermlm/unsub3.tmpl +share/courier/couriermlm/warn1headers.tmpl +share/courier/couriermlm/warn1text.tmpl +share/courier/couriermlm/warn1text2.tmpl +share/courier/couriermlm/warn2msg.tmpl +share/courier/courierwebadmin/admin-00machine.html +share/courier/courierwebadmin/admin-00machine.pl +share/courier/courierwebadmin/admin-05local.html +share/courier/courierwebadmin/admin-05local.pl +share/courier/courierwebadmin/admin-10password.html +share/courier/courierwebadmin/admin-10password.pl +share/courier/courierwebadmin/admin-15ldap.html +share/courier/courierwebadmin/admin-15ldap.pl +share/courier/courierwebadmin/admin-15ldapa.html +share/courier/courierwebadmin/admin-15ldapa.pl +share/courier/courierwebadmin/admin-15mysql.html +share/courier/courierwebadmin/admin-15mysql.pl +share/courier/courierwebadmin/admin-15pgsql.html +share/courier/courierwebadmin/admin-15pgsql.pl +share/courier/courierwebadmin/admin-20aliases.html +share/courier/courierwebadmin/admin-20aliases.pl +share/courier/courierwebadmin/admin-30esmtp.html +share/courier/courierwebadmin/admin-30esmtp.pl +share/courier/courierwebadmin/admin-31esmtp.html +share/courier/courierwebadmin/admin-31esmtp.pl +share/courier/courierwebadmin/admin-30xspf.html +share/courier/courierwebadmin/admin-30xspf.pl +share/courier/courierwebadmin/admin-34fax.html +share/courier/courierwebadmin/admin-34fax.pl +share/courier/courierwebadmin/admin-35fax.html +share/courier/courierwebadmin/admin-35fax.pl +share/courier/courierwebadmin/admin-40imap.html +share/courier/courierwebadmin/admin-40imap.pl +share/courier/courierwebadmin/admin-45pop3.html +share/courier/courierwebadmin/admin-45pop3.pl +share/courier/courierwebadmin/admin-47webmail.html +share/courier/courierwebadmin/admin-47webmail.pl +share/courier/courierwebadmin/admin-50bofh.html +share/courier/courierwebadmin/admin-50bofh.pl +share/courier/courierwebadmin/admin-cancel.pl +share/courier/courierwebadmin/admin-main.html +share/courier/courierwebadmin/admin-main.pl +share/courier/courierwebadmin/admin-save.html +share/courier/courierwebadmin/admin-save.pl +share/courier/courierwebadmin/dumpenv.pl +share/courier/courierwebadmin/login.html +share/courier/courierwebadmin/notsupp.html +share/courier/courierwebadmin/unsecure.html +share/courier/courierwebadmin/webadmin.pl +share/courier/courierwebadmin/webadmin.pm +share/courier/filterctl +share/courier/makealiases +share/courier/makehosteddomains +share/courier/perlfilter-wrapper.pl +share/courier/perlfilter-example.pl +share/doc/courier/FAQ.html +share/doc/courier/aliases.html +share/doc/courier/bg.gif +share/doc/courier/cancelmsg.html +share/doc/courier/changelog.html +share/doc/courier/courier.html +share/doc/courier/courierd.html +share/doc/courier/courierdsn.html +share/doc/courier/courierfilter.html +share/doc/courier/courierldapaliasd.html +share/doc/courier/couriermlm.html +share/doc/courier/courierperlfilter.html +share/doc/courier/cvs.html +share/doc/courier/documentation.html +share/doc/courier/dot-courier.html +share/doc/courier/dot-forward.html +share/doc/courier/download.php +share/doc/courier/draft-varshavchik-exdata-smtpext.txt +share/doc/courier/draft-varshavchik-security-smtpext.txt +share/doc/courier/draft-varshavchik-verp-smtpext.txt +share/doc/courier/dupfilter.html +share/doc/courier/esmtp.html +share/doc/courier/esmtpd.html +share/doc/courier/footer.html +share/doc/courier/frame.js +share/doc/courier/header.html +share/doc/courier/icon.gif +share/doc/courier/index.html +share/doc/courier/install.html +share/doc/courier/intro.html +share/doc/courier/japanese_flag.png +share/doc/courier/layout.html +share/doc/courier/links.html +share/doc/courier/local.html +share/doc/courier/localmailfilter.html +share/doc/courier/mailq.html +share/doc/courier/main.html +share/doc/courier/makeacceptmailfor.html +share/doc/courier/makealiases.html +share/doc/courier/makehosteddomains.html +share/doc/courier/makepercentrelay.html +share/doc/courier/makesmtpaccess.html +share/doc/courier/menu.html +share/doc/courier/mkesmtpdcert.html +share/doc/courier/modules.html +share/doc/courier/pop3d.html +share/doc/courier/preline.html +share/doc/courier/queue.html +share/doc/courier/rpm.html +share/doc/courier/sendmail.html +share/doc/courier/status.html +share/doc/courier/structures.html +share/doc/courier/style.css +share/doc/courier/submit.html +share/doc/courier/testmxlookup.html +share/examples/courier/aliases/system +share/examples/courier/courierd.dist +share/examples/courier/enablefiltering +share/examples/courier/locallowercase +share/examples/courier/maildrop +share/examples/courier/maildropfilter +share/examples/courier/mailer.conf +share/examples/courier/rfcerr2045.txt +share/examples/courier/rfcerr2046.txt +share/examples/courier/rfcerr2047.txt +share/examples/courier/rfcerrheader.txt +share/examples/courier/smtpaccess/default +share/examples/rc.d/courier +share/examples/rc.d/courierd +share/examples/rc.d/courierfilter +@dirrm share/examples/courier/smtpaccess +@dirrm share/examples/courier/aliases +@dirrm share/courier/courierwebadmin +@dirrm share/courier/couriermlm +@dirrm libexec/courier/filters diff --git a/mail/courier-mta/PLIST.dsn b/mail/courier-mta/PLIST.dsn new file mode 100644 index 00000000000..67f3c9478ab --- /dev/null +++ b/mail/courier-mta/PLIST.dsn @@ -0,0 +1,12 @@ +@comment $NetBSD: PLIST.dsn,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +libexec/courier/modules/dsn/courierdsn +share/examples/courier/dsndelayed.txt +share/examples/courier/dsndelivered.txt +share/examples/courier/dsnfailed.txt +share/examples/courier/dsnfooter.txt +share/examples/courier/dsnheader.txt +share/examples/courier/dsnrelayed.txt +share/examples/courier/dsnsubjectnotice.txt +share/examples/courier/dsnsubjectwarn.txt +share/examples/courier/module.dsn +@dirrm libexec/courier/modules/dsn diff --git a/mail/courier-mta/PLIST.esmtp b/mail/courier-mta/PLIST.esmtp new file mode 100644 index 00000000000..aadd7d50877 --- /dev/null +++ b/mail/courier-mta/PLIST.esmtp @@ -0,0 +1,31 @@ +@comment $NetBSD: PLIST.esmtp,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +bin/addcr +libexec/courier/modules/esmtp/addcr +libexec/courier/modules/esmtp/courieresmtp +libexec/courier/modules/esmtp/courieresmtpd +sbin/courieresmtpd +sbin/esmtpd +sbin/esmtpd-ssl +sbin/esmtpd-msa +sbin/makeacceptmailfor +sbin/makepercentrelay +sbin/makesmtpaccess +sbin/makesmtpaccess-msa +sbin/mkesmtpdcert +share/courier/esmtpd +share/courier/esmtpd-ssl +share/courier/makeacceptmailfor +share/courier/makepercentrelay +share/courier/makesmtpaccess +share/courier/mkesmtpdcert +share/examples/courier/esmtp.authpam +share/examples/courier/esmtpauthclient +share/examples/courier/esmtpd-msa.dist +share/examples/courier/esmtpd-ssl.dist +share/examples/courier/esmtpd.cnf +share/examples/courier/esmtpd.dist +share/examples/courier/module.esmtp +share/examples/rc.d/courieresmtp +share/examples/rc.d/courieresmtpmsa +share/examples/rc.d/courieresmtps +@dirrm libexec/courier/modules/esmtp diff --git a/mail/courier-mta/PLIST.fax b/mail/courier-mta/PLIST.fax new file mode 100644 index 00000000000..b00622a2170 --- /dev/null +++ b/mail/courier-mta/PLIST.fax @@ -0,0 +1,19 @@ +@comment $NetBSD: PLIST.fax,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +libexec/courier/modules/fax/courierfax +man/man8/courierfax.8 +share/courier/faxmail/application-pdf.filter +share/courier/faxmail/application-postscript.filter +share/courier/faxmail/coverpage +share/courier/faxmail/image-gif.filter +share/courier/faxmail/image-jpeg.filter +share/courier/faxmail/image-png.filter +share/courier/faxmail/init +share/courier/faxmail/new_fax +share/courier/faxmail/text-plain.filter +share/doc/courier/courierfax.html +share/examples/courier/faxcoverpage.tr.dist +share/examples/courier/faxnotifyrc.dist +share/examples/courier/faxrc.dist +share/examples/courier/module.fax +@dirrm share/courier/faxmail +@dirrm libexec/courier/modules/fax diff --git a/mail/courier-mta/PLIST.ldap b/mail/courier-mta/PLIST.ldap new file mode 100644 index 00000000000..2b48df9ff36 --- /dev/null +++ b/mail/courier-mta/PLIST.ldap @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST.ldap,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +sbin/courierldapaliasd +share/examples/courier/ldapaliasrc.dist +share/examples/rc.d/courierldapaliasd diff --git a/mail/courier-mta/PLIST.local b/mail/courier-mta/PLIST.local new file mode 100644 index 00000000000..df65fd6c048 --- /dev/null +++ b/mail/courier-mta/PLIST.local @@ -0,0 +1,6 @@ +@comment $NetBSD: PLIST.local,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +bin/preline +libexec/courier/modules/local/courierdeliver +libexec/courier/modules/local/courierlocal +share/examples/courier/module.local +@dirrm libexec/courier/modules/local diff --git a/mail/courier-mta/PLIST.uucp b/mail/courier-mta/PLIST.uucp new file mode 100644 index 00000000000..e807c259235 --- /dev/null +++ b/mail/courier-mta/PLIST.uucp @@ -0,0 +1,9 @@ +@comment $NetBSD: PLIST.uucp,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +libexec/courier/modules/uucp/courieruucp +man/man8/courieruucp.8 +man/man8/makeuucpneighbors.8 +sbin/makeuucpneighbors +share/courier/makeuucpneighbors +share/doc/courier/courieruucp.html +share/examples/courier/module.uucp +@dirrm libexec/courier/modules/uucp diff --git a/mail/courier-mta/distinfo b/mail/courier-mta/distinfo new file mode 100644 index 00000000000..1ed1770ae41 --- /dev/null +++ b/mail/courier-mta/distinfo @@ -0,0 +1,16 @@ +$NetBSD: distinfo,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +SHA1 (courier-0.53.1.tar.bz2) = 40c6a732efd9e74b524230ae08ce75166032a8d8 +RMD160 (courier-0.53.1.tar.bz2) = a2f016d67b2e360111d2ebc4811a35c2ed23fb01 +Size (courier-0.53.1.tar.bz2) = 6940783 bytes +SHA1 (patch-aa) = fceb62d41e0f133ad26660e24c7ca254c5f98d0b +SHA1 (patch-ab) = d02d396512cec5be8e3cedceb36da0127461a533 +SHA1 (patch-ac) = a44916aa8e92d9e4cf6e5e969e7bdd928830b2b0 +SHA1 (patch-ad) = b0e88586d90e071ac135443634153131f548e05f +SHA1 (patch-ae) = 5a5d6b6aea3cca9d9f577d8da9ba463dd64e6902 +SHA1 (patch-af) = e17ce772bc92ec45507fed340d33856f71fbe3f6 +SHA1 (patch-ag) = 9044e5f36e9604d4d7b751bcc9042149080d61d2 +SHA1 (patch-ah) = 9f2001e1e309b2557640d8ecc9187ed793d0c5dd +SHA1 (patch-ai) = 5324b99ebc0492c77f67a8c627ceb3c3efa9d852 +SHA1 (patch-aj) = 11f85f5e3a463e5499e687297cd8e9375bbe5525 +SHA1 (patch-ak) = 8ba39a1ef912399e5f5fc224a43d36142780d09c diff --git a/mail/courier-mta/files/courier.sh b/mail/courier-mta/files/courier.sh new file mode 100644 index 00000000000..16a3f3db14c --- /dev/null +++ b/mail/courier-mta/files/courier.sh @@ -0,0 +1,61 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: courier.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# +# KEYWORD: nostart +# +# This script is intended for the end-user. +# It is not started by /etc/rc. +# It manipulates various Courier mail services which are +# controlled via their appropriate rc.conf(5) settings. +# + +. /etc/rc.subr + +rcd_dir=`@DIRNAME@ $0` + +# NOTE: run_rc_command sets $rc_arg +# +forward_commands() +{ + # Backward compat with NetBSD <1.6: + [ -z "$rc_arg" ] && rc_arg=$_arg + + for file in $COMMAND_LIST; do + @TEST@ ! -x "$rcd_dir/$file" || $rcd_dir/$file $rc_arg + done +} + +reverse_commands() +{ + # Backward compat with NetBSD <1.6: + [ -z "$rc_arg" ] && rc_arg=$_arg + + REVCOMMAND_LIST= + for file in $COMMAND_LIST; do + REVCOMMAND_LIST="$file $REVCOMMAND_LIST" + done + for file in $REVCOMMAND_LIST; do + @TEST@ ! -x "$rcd_dir/$file" || $rcd_dir/$file $rc_arg + done +} + +COMMAND_LIST= +COMMAND_LIST="$COMMAND_LIST courierfilter" +COMMAND_LIST="$COMMAND_LIST courierldapaliasd" +COMMAND_LIST="$COMMAND_LIST courierd" +COMMAND_LIST="$COMMAND_LIST courieresmtp" +COMMAND_LIST="$COMMAND_LIST courieresmtpmsa" +COMMAND_LIST="$COMMAND_LIST courieresmtps" +COMMAND_LIST="$COMMAND_LIST courierimap" +COMMAND_LIST="$COMMAND_LIST courierimaps" +COMMAND_LIST="$COMMAND_LIST courierpop" +COMMAND_LIST="$COMMAND_LIST courierpops" +COMMAND_LIST="$COMMAND_LIST sqwebmail" + +name="courier" +start_cmd="forward_commands" +stop_cmd="reverse_commands" +extra_commands="reload status" + +run_rc_command "$1" diff --git a/mail/courier-mta/files/courierd.sh b/mail/courier-mta/files/courierd.sh new file mode 100644 index 00000000000..a2f8ad42f66 --- /dev/null +++ b/mail/courier-mta/files/courierd.sh @@ -0,0 +1,44 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: courierd.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# +# Courier core processes +# +# PROVIDE: courierd +# REQUIRE: courierfilter courierldapaliasd +# KEYWORD: shutdown + +. /etc/rc.subr + +name="courierd" +rcvar=${name} +command="@PREFIX@/sbin/${name}" +ctl_command="@PREFIX@/sbin/courier" + +restart_cmd="courier_doit restart" +start_cmd="courier_doit start" +stop_cmd="courier_doit stop" + +courier_doit() +{ + action=$1 + + case $action in + restart) + @ECHO@ "Restarting ${name}." + ;; + start) + @TEST@ -f @PKG_SYSCONFDIR@/aliases.dat || + @PREFIX@/sbin/makealiases + @ECHO@ "Starting ${name}." + ;; + stop) + @ECHO@ "Stopping ${name}." + ;; + esac + + ${ctl_command} $action +} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/courier-mta/files/courieresmtp.sh b/mail/courier-mta/files/courieresmtp.sh new file mode 100644 index 00000000000..cb7203433e9 --- /dev/null +++ b/mail/courier-mta/files/courieresmtp.sh @@ -0,0 +1,56 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: courieresmtp.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# +# Courier ESMTP services daemon +# +# PROVIDE: courieresmtp +# REQUIRE: authdaemond courierd +# KEYWORD: shutdown + +. /etc/rc.subr + +name="courieresmtp" +rcvar=${name} +command="@PREFIX@/sbin/couriertcpd" +ctl_command="@PREFIX@/sbin/esmtpd" +pidfile="@VARBASE@/run/esmtp.pid" +required_files="@PKG_SYSCONFDIR@/esmtpd @PKG_SYSCONFDIR@/esmtpd-ssl" + +start_cmd="courier_doit start" +stop_cmd="courier_doit stop" + +courier_doit() +{ + action=$1 + case $action in + start) + for f in $required_files; do + if [ ! -r "$f" ]; then + @ECHO@ 1>&2 "$0: WARNING: $f is not readable" + return 1 + fi + done + + . @PKG_SYSCONFDIR@/esmtpd + + case x$ESMTPDSTART in + x[yY]*) + @ECHO@ "Starting ${name}." + @TEST@ -f @PKG_SYSCONFDIR@/esmtpacceptmailfor.dat || + @PREFIX@/sbin/makeacceptmailfor + @TEST@ -f @PKG_SYSCONFDIR@/${ACCESSFILE}.dat || + @PREFIX@/sbin/makesmtpaccess + ${ctl_command} $action + ;; + esac + ;; + stop) + @ECHO@ "Stopping ${name}." + ${ctl_command} $action + ;; + esac +} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/courier-mta/files/courieresmtpmsa.sh b/mail/courier-mta/files/courieresmtpmsa.sh new file mode 100644 index 00000000000..66e391a2076 --- /dev/null +++ b/mail/courier-mta/files/courieresmtpmsa.sh @@ -0,0 +1,57 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: courieresmtpmsa.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# +# Courier ESMTP-MSA (RFC 2476) services daemon +# +# PROVIDE: courieresmtpmsa +# REQUIRE: authdaemond courierd +# KEYWORD: shutdown + +. /etc/rc.subr + +name="courieresmtpmsa" +rcvar=${name} +command="@PREFIX@/sbin/couriertcpd" +ctl_command="@PREFIX@/sbin/esmtpd-msa" +pidfile="@VARBASE@/run/esmtpd-msa.pid" +required_files="@PKG_SYSCONFDIR@/esmtpd @PKG_SYSCONFDIR@/esmtpd-msa" + +start_cmd="courier_doit start" +stop_cmd="courier_doit stop" + +courier_doit() +{ + action=$1 + case ${action} in + start) + for f in $required_files; do + if [ ! -r "$f" ]; then + @ECHO@ 1>&2 "$0: WARNING: $f is not readable" + return 1 + fi + done + + . @PKG_SYSCONFDIR@/esmtpd + . @PKG_SYSCONFDIR@/esmtpd-msa + + case x$ESMTPDSTART in + x[yY]*) + @ECHO@ "Starting ${name}." + @TEST@ -f @PKG_SYSCONFDIR@/esmtpacceptmailfor.dat || + @PREFIX@/sbin/makeacceptmailfor + @TEST@ -f @PKG_SYSCONFDIR@/${ACCESSFILE}.dat || + @PREFIX@/sbin/makesmtpaccess-msa + ${ctl_command} $action + ;; + esac + ;; + stop) + @ECHO@ "Stopping ${name}." + ${ctl_command} $action + ;; + esac +} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/courier-mta/files/courieresmtps.sh b/mail/courier-mta/files/courieresmtps.sh new file mode 100644 index 00000000000..46536085f7d --- /dev/null +++ b/mail/courier-mta/files/courieresmtps.sh @@ -0,0 +1,72 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: courieresmtps.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# +# Courier ESMTP/SSL services daemon +# +# PROVIDE: courieresmtps +# REQUIRE: authdaemond courierd +# KEYWORD: shutdown + +. /etc/rc.subr + +name="courieresmtps" +rcvar=${name} +command="@PREFIX@/sbin/couriertcpd" +ctl_command="@PREFIX@/sbin/esmtpd-ssl" +pidfile="@VARBASE@/run/esmtpd-ssl.pid" +required_files="@PKG_SYSCONFDIR@/esmtpd @PKG_SYSCONFDIR@/esmtpd-ssl" + +start_cmd="courier_doit start" +stop_cmd="courier_doit stop" + +courier_doit() +{ + action=$1 + case $action in + start) + for f in $required_files; do + if [ ! -r "$f" ]; then + @ECHO@ 1>&2 "$0: WARNING: $f is not readable" + return 1 + fi + done + + . @PKG_SYSCONFDIR@/esmtpd + . @PKG_SYSCONFDIR@/esmtpd-ssl + + f="$TLS_CERTFILE" + if [ -z "$f" ]; then + @ECHO@ 1>&2 "$0: WARNING: TLS_CERTFILE is empty" + return 1 + fi + if [ ! -f "$f" ] && + [ "$f" = "@PKG_SYSCONFDIR@/esmtpd.pem ]; then + @ECHO@ "Generating ESMTP SSL certificate in $f." + @PREFIX@/sbin/mkesmtpdcert >/dev/null 2>&1 + fi + if [ ! -r "$f" ]; then + @ECHO@ 1>&2 "$0: WARNING: $f is not readable" + return 1 + fi + + case x$ESMTPDSSLSTART in + x[yY]*) + @ECHO@ "Starting ${name}." + @TEST@ -f @PKG_SYSCONFDIR@/esmtpacceptmailfor.dat || + @PREFIX@/sbin/makeacceptmailfor + @TEST@ -f @PKG_SYSCONFDIR@/${ACCESSFILE}.dat || + @PREFIX@/sbin/makesmtpaccess + ${ctl_command} $action + ;; + esac + ;; + stop) + @ECHO@ "Stopping ${name}." + ${ctl_command} $action + ;; + esac +} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/courier-mta/files/courierfilter.sh b/mail/courier-mta/files/courierfilter.sh new file mode 100644 index 00000000000..03e29abf5ab --- /dev/null +++ b/mail/courier-mta/files/courierfilter.sh @@ -0,0 +1,37 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: courierfilter.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# +# Courier mail filter daemon +# +# PROVIDE: courierfilter +# REQUIRE: DAEMON +# KEYWORD: shutdown + +. /etc/rc.subr + +name="courierfilter" +rcvar=${name} +command="@PREFIX@/sbin/${name}" +pidfile="@VARBASE@/run/${name}.pid" + +restart_cmd="courier_doit restart" +start_precmd="courierfilter_prestart" +start_cmd="courier_doit start" +stop_cmd="courier_doit stop" + +courier_doit() +{ + action=$1 + + case $action in + restart) @ECHO@ "Restarting ${name}." ;; + start) @ECHO@ "Starting ${name}." ;; + stop) @ECHO@ "Stopping ${name}." ;; + esac + + ${command} $action +} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/courier-mta/files/courierldapaliasd.sh b/mail/courier-mta/files/courierldapaliasd.sh new file mode 100644 index 00000000000..eb92eba6e81 --- /dev/null +++ b/mail/courier-mta/files/courierldapaliasd.sh @@ -0,0 +1,49 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: courierldapaliasd.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# +# Courier LDAP mail aliasing daemon +# +# PROVIDE: courierldapaliasd +# REQUIRE: DAEMON +# KEYWORD: shutdown + +. /etc/rc.subr + +name="courierldapaliasd" +rcvar=${name} +command="@PREFIX@/sbin/${name}" +pidfile="@COURIER_STATEDIR@/tmp/ldapaliasd.pid" +required_files="@PKG_SYSCONFDIR@/ldapaliasrc" + +restart_cmd="courier_doit restart" +start_cmd="courier_doit start" +stop_cmd="courier_doit stop" + +courier_doit() +{ + action=$1 + + case $action in + restart|start) + for f in $required_files; do + if [ ! -r "$f" ]; then + @ECHO@ 1>&2 "$0: WARNING: $f is not readable" + return 1 + fi + done + case $action in + restart) @ECHO@ "Restarting ${name}." ;; + start) @ECHO@ "Starting ${name}." ;; + esac + ;; + stop) + @ECHO@ "Stopping ${name}." + ;; + esac + + ${command} $action +} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/courier-mta/files/mailer.conf b/mail/courier-mta/files/mailer.conf new file mode 100644 index 00000000000..3a1b6947c2d --- /dev/null +++ b/mail/courier-mta/files/mailer.conf @@ -0,0 +1,8 @@ +# $NetBSD: mailer.conf,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# +# Use "courier-mta" as replacement for "sendmail". +# +sendmail @PREFIX@/bin/sendmail +send-mail @PREFIX@/bin/sendmail +mailq @PREFIX@/bin/mailq +newaliases @PREFIX@/sbin/makealiases diff --git a/mail/courier-mta/options.mk b/mail/courier-mta/options.mk new file mode 100644 index 00000000000..4a5855b229f --- /dev/null +++ b/mail/courier-mta/options.mk @@ -0,0 +1,129 @@ +# $NetBSD: options.mk,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +# Global and legacy options + +PKG_OPTIONS_VAR= PKG_OPTIONS.courier-mta +PKG_SUPPORTED_OPTIONS= courier-dsn courier-esmtp courier-local \ + courier-uucp ldap +PKG_SUGGESTED_OPTIONS= courier-dsn courier-esmtp courier-local \ + courier-uucp + +.include "../../mk/bsd.options.mk" + +###################################################################### +### +### delivery sender notification mail transport +### +.if !empty(PKG_OPTIONS:Mcourier-dsn) +COURIER_TRANSPORTS+= dsn +PLIST_SRC+= ${PKGDIR}/PLIST.dsn + +. for _file_ in dsndelayed.txt dsndelivered.txt dsnfailed.txt \ + dsnfooter.txt dsnheader.txt dsnrelayed.txt \ + dsnsubjectnotice.txt dsnsubjectwarn.txt module.dsn +CONF_FILES_PERMS+= ${EGDIR}/${_file_} \ + ${PKG_SYSCONFDIR}/${_file_:S/.dist$//} \ + ${COURIER_FILE_PERMS} +. endfor +.endif + +###################################################################### +### +### ESMTP mail transport +### +.if !empty(PKG_OPTIONS:Mcourier-esmtp) +COURIER_TRANSPORTS+= esmtp +PLIST_SRC+= ${PKGDIR}/PLIST.esmtp + +RCD_SCRIPTS+= courieresmtp courieresmtpmsa courieresmtps + +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/esmtpacceptmaildor.dir \ + ${COURIER_DIR_PERMS} +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/esmtppercentrelay.dir \ + ${COURIER_DIR_PERMS} + +. for _file_ in esmtp.authpam esmtpd-msa.dist esmtpd-ssl.dist \ + esmtpd.cnf esmtpd.dist module.esmtp +CONF_FILES_PERMS+= ${EGDIR}/${_file_} \ + ${PKG_SYSCONFDIR}/${_file_:S/.dist$//} \ + ${COURIER_FILE_PERMS} +. endfor +CONF_FILES_PERMS+= ${EGDIR}/esmtpauthclient \ + ${PKG_SYSCONFDIR}/esmtpauthclient \ + ${COURIER_USER} ${COURIER_GROUP} 0600 +.endif + +###################################################################### +### +### fax mail transport +### +### XXX This option should not be enabled until the dependencies for +### XXX generating and receiving faxes have all been sorted out, e.g. +### XXX mgetty+sendfax, netpbm, etc. +### +.if !empty(PKG_OPTIONS:Mcourier-fax) +USE_TOOLS+= gs:run +COURIER_TRANSPORTS+= fax +PLIST_SRC+= ${PKGDIR}/PLIST.fax + +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/faxtmp \ + ${COURIER_USER} ${COURIER_GROUP} 0700 + +. for _file_ in faxcoverpage.tr.dist faxnotifyrc.dist module.fax +CONF_FILES_PERMS+= ${EGDIR}/${_file_} \ + ${PKG_SYSCONFDIR}/${_file_:S/.dist$//} \ + ${COURIER_FILE_PERMS} +. endfor +CONF_FILES_PERMS+= ${EGDIR}/faxrc.dist ${PKG_SYSCONFDIR}/faxrc \ + ${COURIER_USER} ${COURIER_GROUP} 0640 +.endif + +###################################################################### +### +### local mail tranport +### +.if !empty(PKG_OPTIONS:Mcourier-local) +COURIER_TRANSPORTS+= local +PLIST_SRC+= ${PKGDIR}/PLIST.local + +CONF_FILES_PERMS+= ${EGDIR}/module.local \ + ${PKG_SYSCONFDIR}/module.local \ + ${COURIER_FILE_PERMS} +.endif + +###################################################################### +### +### UUCP mail transport +### +.if !empty(PKG_OPTIONS:Mcourier-uucp) +COURIER_TRANSPORTS+= uucp +UUCP_GROUP?= daemon +PKG_GROUPS+= ${UUCP_GROUP} +PKG_USERS+= uucp:${UUCP_GROUP} +PLIST_SRC+= ${PKGDIR}/PLIST.uucp + +CONF_FILES_PERMS+= ${EGDIR}/module.uucp \ + ${PKG_SYSCONFDIR}/module.uucp \ + ${COURIER_FILE_PERMS} +.endif + +.if empty(COURIER_TRANSPORTS) +PKG_FAIL_REASON+= "[courier/options.mk] No mail transports specified." +.endif + +###################################################################### +### +### LDAP alias lookup support +### +.if !empty(PKG_OPTIONS:Mldap) +. include "../../databases/openldap/buildlink3.mk" +CONFIGURE_ARGS+= --with-ldapaliasd +PLIST_SRC+= ${PKGDIR}/PLIST.ldap + +RCD_SCRIPTS+= courierldapaliasd +CONF_FILES_PERMS+= ${EGDIR}/ldapaliasrc.dist \ + ${PKG_SYSCONFDIR}/ldapaliasrc \ + ${COURIER_USER} ${COURIER_GROUP} 0640 +.else +CONFIGURE_ARGS+= --without-ldapaliasd +.endif diff --git a/mail/courier-mta/patches/patch-aa b/mail/courier-mta/patches/patch-aa new file mode 100644 index 00000000000..2b90850127e --- /dev/null +++ b/mail/courier-mta/patches/patch-aa @@ -0,0 +1,98 @@ +$NetBSD: patch-aa,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/Makefile.in.orig 2006-02-25 12:28:53.000000000 -0500 ++++ courier/Makefile.in +@@ -52,16 +52,16 @@ build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ + pkglibexec_PROGRAMS = aliasexp$(EXEEXT) aliascombine$(EXEEXT) \ +- aliascreate$(EXEEXT) sqwebmaild$(EXEEXT) submit$(EXEEXT) \ +- @EXTRAPKGLIB@ $(am__empty) +-webmail_PROGRAMS = webmail$(EXEEXT) ++ aliascreate$(EXEEXT) submit$(EXEEXT) \ ++ $(am__empty) ++webmail_PROGRAMS = + EXTRA_PROGRAMS = courierldapaliasd$(EXEEXT) + bin_PROGRAMS = cancelmsg$(EXEEXT) mailq$(EXEEXT) sendmail$(EXEEXT) \ + testmxlookup$(EXEEXT) dotforward$(EXEEXT) couriermlm$(EXEEXT) \ +- courier-config$(EXEEXT) @couriertls@ @EXTRABIN@ ++ courier-config$(EXEEXT) + sbin_PROGRAMS = courier$(EXEEXT) showconfig$(EXEEXT) \ +- showmodules$(EXEEXT) @COURIERLDAPALIASD@ @EXTRASBIN@ +-cmdlib_PROGRAMS = submitmkdir$(EXEEXT) courierd$(EXEEXT) @EXTRACMDLIB@ ++ showmodules$(EXEEXT) @COURIERLDAPALIASD@ ++cmdlib_PROGRAMS = submitmkdir$(EXEEXT) courierd$(EXEEXT) + DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/courier.h.in $(srcdir)/courierctl.start.in \ +@@ -397,7 +397,7 @@ RFCERRTXTIN = rfcerrheader.txt + RFCERRTXTNOIN = rfcerr2045.txt rfcerr2046.txt rfcerr2047.txt + extrapkglib = makedatprog courierpop3login pcpd + pkglibexecdir = $(libexecdir)/courier +-webmaildir = $(libexecdir)/courier/webmail ++webmaildir = $(pkglibexecdir)/cgi-bin + webmail_SOURCES = + sqwebmaild_SOURCES = + +@@ -408,16 +408,14 @@ extrabin = maildrop lockmail reformail r + + extrasbin = couriertcpd$(EXEEXT) + sbinscripts = sharedindexsplit sharedindexinstall webmaild +-sbin_SCRIPTS = @SBINSCRIPTS@ ++sbin_SCRIPTS = + EXTRA_SCRIPTS = +-sysconf_DATA = pop3d.authpam imapd.authpam webmail.authpam imapd.cnf pop3d.cnf \ ++sysconf_DATA = \ + courierd.dist @LDAPALIASRC@ \ +- imapd.dist imapd-ssl.dist pop3d.dist pop3d-ssl.dist \ +- quotawarnmsg.example $(RFCERRTXTNOIN) $(RFCERRTXTIN) ++ $(RFCERRTXTNOIN) $(RFCERRTXTIN) + + databindir = $(datadir) +-databin_SCRIPTS = courierctl.start makedat makealiases makehosteddomains \ +- pop3d pop3d-ssl mkimapdcert mkpop3dcert ++databin_SCRIPTS = courierctl.start makealiases makehosteddomains + + mlmdatadir = $(datadir)/couriermlm + mlmdata_DATA = adminrequest.tmpl confsubj.tmpl digestsubj.tmpl fetch.tmpl \ +@@ -1657,27 +1655,10 @@ install-exec-hook: + $(localstatedir)/track\ + $(localstatedir)/msgs $(localstatedir)/msgq ; do \ + $(mkinstalldirs) $(DESTDIR)$$d || :; done +- $(INSTALL_SCRIPT) imapd.rc $(DESTDIR)$(datadir)/imapd +- $(INSTALL_SCRIPT) imapd-ssl.rc $(DESTDIR)$(datadir)/imapd-ssl +- rm -f $(DESTDIR)$(sbindir)/imapd +- $(LN_S) $(datadir)/imapd $(DESTDIR)$(sbindir)/imapd +- rm -f $(DESTDIR)$(sbindir)/imapd-ssl +- $(LN_S) $(datadir)/imapd-ssl $(DESTDIR)$(sbindir)/imapd-ssl +- rm -f $(DESTDIR)$(sbindir)/mkimapdcert +- $(LN_S) $(datadir)/mkimapdcert $(DESTDIR)$(sbindir)/mkimapdcert +- rm -f $(DESTDIR)$(sbindir)/mkpop3dcert +- $(LN_S) $(datadir)/mkpop3dcert $(DESTDIR)$(sbindir)/mkpop3dcert +- rm -f $(DESTDIR)$(bindir)/makedat +- $(LN_S) $(datadir)/makedat $(DESTDIR)$(bindir)/makedat +- for f in makealiases makehosteddomains pop3d pop3d-ssl \ ++ for f in makealiases makehosteddomains \ + ; do rm -f $(DESTDIR)$(sbindir)/$$f ; \ + $(LN_S) $(datadir)/$$f $(DESTDIR)$(sbindir)/$$f ; done +- rm -f $(DESTDIR)$(sbindir)/webgpg ; $(LN_S) $(datadir)/sqwebmail/webgpg $(DESTDIR)$(sbindir)/webgpg +- $(INSTALL_PROGRAM) ../webadmin/webadmin $(DESTDIR)$(webmaildir)/webadmin +- mkdir -p $(DESTDIR)$(sysconfdir)/shared +- chmod 755 $(DESTDIR)$(sysconfdir)/shared +- mkdir -p $(DESTDIR)$(sysconfdir)/shared.tmp +- chmod 755 $(DESTDIR)$(sysconfdir)/shared.tmp ++ $(INSTALL_PROGRAM) ../webadmin/webadmin $(DESTDIR)$(webmaildir)/courierwebadmin + + install-data-hook: + -$(mkinstalldirs) $(DESTDIR)$(sysconfdir)/aliases +@@ -1695,10 +1676,6 @@ install-data-hook: + rm -f $(DESTDIR)$(bindir)/rmail + $(LN_S) sendmail $(DESTDIR)$(bindir)/rmail + -$(mkinstalldirs) $(DESTDIR)@mandir@/man8 +- -$(mkinstalldirs) $(DESTDIR)$(webmailimagedir) +- for f in `cat ../webmail/images/filelist` ; do \ +- $(INSTALL_DATA) $(srcdir)/../webmail/images/$$f \ +- $(DESTDIR)$(webmailimagedir) ; done + + install-permissions: perms.sh + @chmod +x perms.sh setperms.sh diff --git a/mail/courier-mta/patches/patch-ab b/mail/courier-mta/patches/patch-ab new file mode 100644 index 00000000000..82e2eb8d810 --- /dev/null +++ b/mail/courier-mta/patches/patch-ab @@ -0,0 +1,17 @@ +$NetBSD: patch-ab,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/configure.orig 2006-02-25 12:28:52.000000000 -0500 ++++ courier/configure +@@ -22684,9 +22684,9 @@ done + + if test "$testmode" = "0" + then +- INSTALL_PROGRAM='${INSTALL} -m 700' +- INSTALL_SCRIPT='${INSTALL} -m 700' +- INSTALL_DATA='${INSTALL} -m 600' ++ INSTALL_PROGRAM='${BSD_INSTALL_PROGRAM}' ++ INSTALL_SCRIPT='${BSD_INSTALL_SCRIPT}' ++ INSTALL_DATA='${BSD_INSTALL_DATA}' + fi + + ac_ext=cc diff --git a/mail/courier-mta/patches/patch-ac b/mail/courier-mta/patches/patch-ac new file mode 100644 index 00000000000..b92e73a5e89 --- /dev/null +++ b/mail/courier-mta/patches/patch-ac @@ -0,0 +1,108 @@ +$NetBSD: patch-ac,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/doc/Makefile.in.orig 2006-01-29 12:33:49.000000000 -0500 ++++ courier/doc/Makefile.in +@@ -141,7 +141,7 @@ target_alias = @target_alias@ + version = @version@ + htmldocdir = @datadir@/htmldoc + CLEANFILES = permissions.dat +-miscfiles = japanese_flag.png bg.gif icon.gif manpage.css \ ++miscfiles = japanese_flag.png bg.gif icon.gif \ + draft-varshavchik-exdata-smtpext.txt \ + draft-varshavchik-verp-smtpext.txt \ + draft-varshavchik-security-smtpext.txt \ +@@ -178,65 +178,37 @@ htmlin = \ + courier.html \ + courierldapaliasd.html \ + couriermlm.html \ +- courierpop3d.html \ +- couriertcpd.html \ +- couriertls.html \ +- deliverquota.html \ + dot-courier.html \ + dot-forward.html \ + esmtpd.html \ +- imapd.html \ + localmailfilter.html \ +- lockmail.html \ +- mailbot.html \ +- maildiracl.html \ +- maildir.html \ +- maildirkw.html \ +- maildirmake.html \ +- maildirquota.html \ +- maildropex.html \ +- maildropfilter.html \ +- maildropgdbm.html \ +- maildrop.html \ +- maildrop.README.html \ +- maildroptips.html \ + mailq.html \ + makeacceptmailfor.html \ + makealiases.html \ +- makedat.html \ + makehosteddomains.html \ +- makemime.html \ + makepercentrelay.html \ + makesmtpaccess.html \ +- mimegpg.html \ + mkesmtpdcert.html \ +- mkimapdcert.html \ +- mkpop3dcert.html \ +- pcp_README.html \ + pop3d.html \ + preline.html \ +- reformail.html \ +- reformime.html \ + sendmail.html \ + submit.html \ + testmxlookup.html + + htmldoc_DATA = $(nohtmlin) $(htmlin) +-man1 = sendmail.1 preline.1 maildirmake.1 cancelmsg.1 lockmail.1 maildrop.1 \ +- mailq.1 mailbot.1 makemime.1 mimegpg.1 maildiracl.1 \ +- makedat.1 reformail.1 reformime.1 couriermlm.1 testmxlookup.1 \ +- dot-forward.1 couriertls.1 couriertcpd.1 maildirkw.1 +- +-man5 = dot-courier.5 maildir.5 +-man7 = localmailfilter.7 maildirquota.7 maildropgdbm.7 maildropfilter.7 \ +- maildropex.7 ++man1 = sendmail.1 preline.1 cancelmsg.1 \ ++ mailq.1 \ ++ couriermlm.1 testmxlookup.1 \ ++ dot-forward.1 + +-man8 = courier.8 courierldapaliasd.8 courierpop3d.8 \ +- deliverquota.8 \ ++man5 = dot-courier.5 ++man7 = localmailfilter.7 ++ ++man8 = courier.8 courierldapaliasd.8 \ + esmtpd.8 makeacceptmailfor.8 makehosteddomains.8\ +- mkesmtpdcert.8 mkimapdcert.8 mkpop3dcert.8 \ ++ mkesmtpdcert.8 \ + makealiases.8 makepercentrelay.8 makesmtpaccess.8 \ +- pop3d.8 submit.8 imapd.8 ++ pop3d.8 submit.8 + + BUILT_SOURCES = \ + cancelmsg.html cancelmsg.1 \ +@@ -261,7 +233,7 @@ BUILT_SOURCES = \ + testmxlookup.html testmxlookup.1 + + EXTRA_DIST = $(nohtmlin) $(BUILT_SOURCES) +-man_LINKS = $(man8dir)/courierpop3login.8 \ ++man_LINKS = \ + $(man1dir)/rmail.1 $(man1dir)/dotforward.1 \ + $(man8dir)/makesmtpaccess-msa.8 \ + $(man8dir)/esmtpd-msa.8 +@@ -1117,8 +1089,7 @@ preline.1: preline.1.in + + install-man-extra: + cd $(DESTDIR)$(man8dir) ; \ +- rm -f courierpop3login.8 makesmtpaccess-msa.8 esmtpd-msa.8; \ +- $(LN_S) courierpop3d.8 courierpop3login.8; \ ++ rm -f makesmtpaccess-msa.8 esmtpd-msa.8; \ + $(LN_S) makesmtpaccess.8 makesmtpaccess-msa.8 ; \ + $(LN_S) esmtpd.8 esmtpd-msa.8 + cd $(DESTDIR)$(man1dir) ; rm -f rmail.1 dotforward.1 \ diff --git a/mail/courier-mta/patches/patch-ad b/mail/courier-mta/patches/patch-ad new file mode 100644 index 00000000000..d8fcaea4963 --- /dev/null +++ b/mail/courier-mta/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/filters/Makefile.in.orig 2006-01-29 12:33:24.000000000 -0500 ++++ courier/filters/Makefile.in +@@ -234,7 +234,7 @@ htmldocdir = @datadir@/htmldoc + htmldoc_DATA = courierfilter.html courierperlfilter.html dupfilter.html + databindir = $(datadir) + databin_SCRIPTS = filterctl +-filterbindir = $(libexecdir)/filters ++filterbindir = $(libexecdir)/courier/filters + filtersocketdir = $(localstatedir)/filters + allfiltersocketdir = $(localstatedir)/allfilters + filterconfdir = $(sysconfdir)/filters diff --git a/mail/courier-mta/patches/patch-ae b/mail/courier-mta/patches/patch-ae new file mode 100644 index 00000000000..ea6fdda4c19 --- /dev/null +++ b/mail/courier-mta/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/filters/filterctl.in.orig 2004-01-31 23:46:27.000000000 -0500 ++++ courier/filters/filterctl.in +@@ -12,7 +12,7 @@ sysconfdir="@sysconfdir@" + localstatedir="@localstatedir@" + piddir="@piddir@" + +-filterbindir="${libexecdir}/filters" ++filterbindir="${libexecdir}/courier/filters" + filteractivedir="${sysconfdir}/filters/active" + pidfile="${piddir}/courierfilter.pid" + diff --git a/mail/courier-mta/patches/patch-af b/mail/courier-mta/patches/patch-af new file mode 100644 index 00000000000..295e5ba4117 --- /dev/null +++ b/mail/courier-mta/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/filters/perlfilter/Makefile.in.orig 2006-02-05 19:35:20.000000000 -0500 ++++ courier/filters/perlfilter/Makefile.in +@@ -206,7 +206,7 @@ target_alias = @target_alias@ + EXTRA_DIST = perlfilter-wrapper.pl perlfilter-example.pl + BUILT_SOURCES = filtersocketdir.h wrapperpl.h xsinit.c + CLEANFILES = $(BUILT_SOURCES) permissions.dat +-filterbindir = $(libexecdir)/filters ++filterbindir = $(libexecdir)/courier/filters + scriptdir = $(datadir) + script_SCRIPTS = perlfilter-wrapper.pl perlfilter-example.pl + filtersocketdir = $(localstatedir)/filters diff --git a/mail/courier-mta/patches/patch-ag b/mail/courier-mta/patches/patch-ag new file mode 100644 index 00000000000..fcd352e70fb --- /dev/null +++ b/mail/courier-mta/patches/patch-ag @@ -0,0 +1,12 @@ +$NetBSD: patch-ag,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/module.esmtp/mkesmtpdcert.in.orig 2000-09-18 13:24:01.000000000 -0400 ++++ courier/module.esmtp/mkesmtpdcert.in +@@ -17,6 +17,7 @@ then + exit 1 + fi + ++umask 077 + cp /dev/null @datadir@/esmtpd.pem + chmod 600 @datadir@/esmtpd.pem + chown @mailuser@ @datadir@/esmtpd.pem diff --git a/mail/courier-mta/patches/patch-ah b/mail/courier-mta/patches/patch-ah new file mode 100644 index 00000000000..3b674239007 --- /dev/null +++ b/mail/courier-mta/patches/patch-ah @@ -0,0 +1,24 @@ +$NetBSD: patch-ah,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/module.local/deliver.c.orig 2005-02-03 21:44:59.000000000 -0500 ++++ courier/module.local/deliver.c +@@ -633,7 +633,7 @@ static int docommand(const char *extensi + const char *defaultmail, + int recursion_level) + { +-char *envs[19]; ++char *envs[20]; + const char *p; + const char *hostp; + pid_t pid; +@@ -725,7 +725,9 @@ const char *shell=getenv("SHELL"); + envs[17]=courier_malloc(strlen(shell) + +sizeof("SHELL=")); + strcat(strcpy(envs[17], "SHELL="), shell); +- envs[18]=0; ++ envs[18]=courier_malloc(sizeof("COURIER_MTA=")); ++ strcpy(envs[18], "COURIER_MTA="); ++ envs[19]=0; + + if (*command == '|') + { diff --git a/mail/courier-mta/patches/patch-ai b/mail/courier-mta/patches/patch-ai new file mode 100644 index 00000000000..d22b37c8744 --- /dev/null +++ b/mail/courier-mta/patches/patch-ai @@ -0,0 +1,13 @@ +$NetBSD: patch-ai,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/module.local/local.c.orig 2004-10-23 22:02:38.000000000 -0400 ++++ courier/module.local/local.c +@@ -731,6 +731,8 @@ const char *quota; + strlen(argv[7])), "SENDER="), + argv[7])); + ++ putenv(strcpy(courier_malloc(sizeof("COURIER_MTA=")), ++ "COURIER_MTA=")); + putenv(strcat(strcpy(courier_malloc(sizeof("HOME=")+ + strlen(homedir)), "HOME="), homedir)); + putenv(strcat(strcpy(courier_malloc(sizeof("DEFAULT=")+ diff --git a/mail/courier-mta/patches/patch-aj b/mail/courier-mta/patches/patch-aj new file mode 100644 index 00000000000..0492f35f867 --- /dev/null +++ b/mail/courier-mta/patches/patch-aj @@ -0,0 +1,169 @@ +$NetBSD: patch-aj,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/perms.sh.in.orig 2005-01-27 21:53:58.000000000 -0500 ++++ courier/perms.sh.in +@@ -10,114 +10,44 @@ prefix="@prefix@" + exec_prefix="@exec_prefix@" + + PERMS=" +-. 755 +- + @localstatedir@ 755 x bin bin + @localstatedir@/tmp 770 + @localstatedir@/msgs 750 + @localstatedir@/msgq 750 + @localstatedir@/track 755 + +-@sysconfdir@ 755 x +-@sysconfdir@/aliasdir 755 +-@sysconfdir@/aliases 750 +-@sysconfdir@/enablefiltering 644 config +-@sysconfdir@/maildrop 644 config +-@sysconfdir@/smtpaccess 755 +-@sysconfdir@/shared 755 +-@sysconfdir@/shared.tmp 755 +-@sysconfdir@/smtpaccess/default 644 config +-@sysconfdir@/courierd.dist 644 config +-@sysconfdir@/aliases/system 640 config +-@sysconfdir@/pop3d.dist 644 config +-@sysconfdir@/pop3d-ssl.dist 644 config +-@sysconfdir@/pop3d.authpam 644 config +-@sysconfdir@/pop3d.cnf 600 config +-@sysconfdir@/imapd.dist 644 config +-@sysconfdir@/imapd-ssl.dist 644 config +-@sysconfdir@/imapd.authpam 644 config +-@sysconfdir@/imapd.cnf 600 config +-@sysconfdir@/sqwebmaild.dist 644 config +-@sysconfdir@/webmail.authpam 644 config +-@sysconfdir@/quotawarnmsg.example 444 +-@sysconfdir@/rfcerrheader.txt 444 config +-@sysconfdir@/rfcerr2045.txt 444 config +-@sysconfdir@/rfcerr2046.txt 444 config +-@sysconfdir@/rfcerr2047.txt 444 config +- +-@libexecdir@ 755 x bin bin + @libexecdir@/courier 755 x bin bin + @libexecdir@/courier/modules 755 x bin bin + @libexecdir@/courier/submitmkdir 4550 + @libexecdir@/courier/courierd 550 +-@libexecdir@/courier/courierpop3d 555 +-@libexecdir@/courier/courierpop3login 555 + @libexecdir@/courier/aliasexp 550 + @libexecdir@/courier/aliascombine 550 + @libexecdir@/courier/aliascreate 550 + @libexecdir@/courier/submit 550 +-@libexecdir@/courier/makedatprog 555 +-@libexecdir@/courier/imaplogin 555 x bin bin +-@libexecdir@/courier/pcpd 555 x bin bin +-@libexecdir@/courier/webmail 700 x root bin +-@libexecdir@/courier/webmail/webmail 555 x root bin +-@libexecdir@/courier/sqwebmaild 555 +-@libexecdir@/courier/sqwebpasswd 2755 +-@libexecdir@/courier/webmail/webadmin 4555 x root bin ++@libexecdir@/courier/cgi-bin 700 x root bin ++@libexecdir@/courier/cgi-bin/courierwebadmin 4555 x root bin + +-@sbindir@ 755 x bin bin + @sbindir@/courier 555 + @sbindir@/showconfig 555 + @sbindir@/showmodules 550 +-@sbindir@/couriertcpd 555 +-@sbindir@/imapd 555 +-@sbindir@/imapd-ssl 555 +-@sbindir@/sharedindexsplit 555 +-@sbindir@/sharedindexinstall 555 +-@sbindir@/webmaild 555 +-@datadir@/imapd 555 x bin bin +-@datadir@/imapd-ssl 555 x bin bin + +-@bindir@ 755 x bin bin + @bindir@/cancelmsg 6555 + @bindir@/courier-config 555 + @bindir@/mailq 2555 +-@bindir@/maildirmake 555 +-@bindir@/maildiracl 555 +-@bindir@/maildirkw 555 + @bindir@/sendmail 4511 x root + @bindir@/rmail 4511 x root +-@bindir@/lockmail 555 +-@bindir@/deliverquota 555 +-@bindir@/mailbot 555 +-@bindir@/makemime 555 +-@bindir@/reformail 555 +-@bindir@/reformime 555 +-@bindir@/mimegpg 555 + @bindir@/couriermlm 555 + @bindir@/dotforward 555 + +-@datadir@/makedat 555 x bin bin +-@bindir@/makedat 555 + @bindir@/testmxlookup 555 +-@bindir@/imapd 555 + @datadir@/makealiases 550 + @sbindir@/makealiases 550 + @datadir@/makehosteddomains 555 + @sbindir@/makehosteddomains 555 +-@datadir@/pop3d 755 +-@sbindir@/pop3d 755 +-@datadir@/pop3d-ssl 755 +-@sbindir@/pop3d-ssl 755 +-@sbindir@/webgpg 555 + + @datadir@ 755 x bin bin + @datadir@/courierctl.start 555 + +-@datadir@/mkimapdcert 755 +-@sbindir@/mkimapdcert 755 +-@datadir@/mkpop3dcert 755 +-@sbindir@/mkpop3dcert 755 + @datadir@/couriermlm 755 + + @datadir@/couriermlm/adminrequest.tmpl 644 +@@ -167,11 +97,20 @@ do + if test "$USER" = "" + then + USER="@mailuser@" ++ elif test "$USER" = "root" ++ then ++ USER="@ROOT_USER@" ++ elif test "$USER" = "bin" ++ then ++ USER="@ROOT_USER@" + fi + + if test "$GROUP" = "" + then + GROUP="@mailgroup@" ++ elif test "$GROUP" = "bin" ++ then ++ GROUP="@ROOT_GROUP@" + fi + + case $FILE in +@@ -192,26 +131,7 @@ do + echo $FILE $MODE $USER $GROUP $SPECIAL + done + +-. ../tcpd/couriertls.config +- +-if test "$couriertls" != "" +-then +- echo @bindir@/couriertls 555 bin bin +-fi +- + if test "@HAVE_LDAP@" != 0 + then +- echo @sysconfdir@/ldapaliasrc.dist 640 @mailuser@ @mailgroup@ config + echo @sbindir@/courierldapaliasd 700 @mailuser@ @mailgroup@ + fi +- +-echo @datadir@/sqwebmail/images 755 @mailuser@ @mailgroup@ +- +-for f in `cat ../webmail/images/filelist 2>/dev/null` +-do +- echo @datadir@/sqwebmail/images/$f 444 @mailuser@ @mailgroup@ +-done +- +-. ../maildrop/uidgid +- +-echo @bindir@/maildrop 4511 $uid @mailgroup@ diff --git a/mail/courier-mta/patches/patch-ak b/mail/courier-mta/patches/patch-ak new file mode 100644 index 00000000000..3d1525e5292 --- /dev/null +++ b/mail/courier-mta/patches/patch-ak @@ -0,0 +1,13 @@ +$NetBSD: patch-ak,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +--- courier/webadmin/admin-47webmail.pl.orig 2005-02-15 21:43:31.000000000 -0500 ++++ courier/webadmin/admin-47webmail.pl +@@ -123,7 +123,7 @@ if ($cgi->param("submit")) + { + DeleteConfigFile("calendarmode"); + } +- changed("test -x ${libexecdir}/courier/pcpd || exit 0; ${sbindir}/webmaild stop; ${sbindir}/webmaild start"); ++ changed("test -x ${libexecdir}/courier/pcpd || exit 0; ${sbindir}/sqwebmaild stop; ${sbindir}/sqwebmaild start"); + $errmsg="\@SAVED\@"; + } + diff --git a/mail/courier-mta/pkginstall.mk b/mail/courier-mta/pkginstall.mk new file mode 100644 index 00000000000..dfc13ea9d15 --- /dev/null +++ b/mail/courier-mta/pkginstall.mk @@ -0,0 +1,68 @@ +# $NetBSD: pkginstall.mk,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ + +# Convenience definition used below for a file or directory owned by the +# courier user and group. +# +COURIER_OWNED= ${COURIER_USER} ${COURIER_GROUP} + +REQD_DIRS+= ${DATADIR} ${DOCDIR} ${EGDIR} \ + ${LIBEXECDIR} ${LIBEXECDIR}/modules +REQD_DIRS_PERMS+= ${LIBEXECDIR}/cgi-bin ${ROOT_USER} ${ROOT_GROUP} 0700 +MAKE_DIRS+= ${VARBASE}/run ${COURIER_STATEDIR} + +### +### Courier filter directories +### +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/filters ${COURIER_OWNED} 0750 +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/filters/active \ + ${COURIER_OWNED} 0750 +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/allfilters ${COURIER_OWNED} 0750 +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/filters ${COURIER_OWNED} 0750 + +### +### Courier mail submission directories +### +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/msgq ${COURIER_OWNED} 0750 +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/msgs ${COURIER_OWNED} 0750 +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/tmp ${COURIER_OWNED} 0770 +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/track ${COURIER_OWNED} 0755 + +### +### Courier webadmin directories +### +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/webadmin ${COURIER_OWNED} 0700 +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/webadmin/added \ + ${COURIER_OWNED} 0700 +OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/webadmin/removed \ + ${COURIER_OWNED} 0700 + +### +### Courier setuid and setgid binaries +### +SPECIAL_PERMS+= bin/cancelmsg ${COURIER_OWNED} 6555 +SPECIAL_PERMS+= bin/mailq ${COURIER_OWNED} 2555 +SPECIAL_PERMS+= bin/sendmail ${SETUID_ROOT_PERMS} +SPECIAL_PERMS+= libexec/cgi-bin/courierwebadmin ${SETUID_ROOT_PERMS} +SPECIAL_PERMS+= libexec/courier/submitmkdir ${COURIER_OWNED} 4550 + +### +### Courier delivery configuration directories +### +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/aliasdir ${COURIER_OWNED} 0755 +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/aliases ${COURIER_OWNED} 0750 +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/smtpaccess ${COURIER_OWNED} 0755 + +.for _file_ in aliases/system +CONF_FILES_PERMS+= ${EGDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} \ + ${COURIER_OWNED} 0640 +.endfor +.for _file_ in courierd.dist enablefiltering locallowercase \ + maildrop maildropfilter rfcerr2045.txt \ + rfcerr2046.txt rfcerr2047.txt rfcerrheader.txt \ + smtpaccess/default +CONF_FILES_PERMS+= ${EGDIR}/${_file_} \ + ${PKG_SYSCONFDIR}/${_file_:S/.dist$//} \ + ${COURIER_FILE_PERMS} +.endfor + +RCD_SCRIPTS+= courier courierd courierfilter |