diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-16 22:52:35 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-16 22:52:35 +0000 |
commit | 4e8271fcafdfb0b15f03dcba0eb4488d4d9e18a7 (patch) | |
tree | c06dc7df9c3273e0b4e557a227b1232e5ac4d689 /mail/courier | |
parent | - Fix dependency list: sulci use mueller dictionary by default (diff) |
- Update to 0.50.1 and unbreak
PR: ports/83548
Submitted by: Yarema <yds@CoolRat.org> (maintainer)
Notes
Notes:
svn path=/head/; revision=139372
Diffstat (limited to 'mail/courier')
-rw-r--r-- | mail/courier/Makefile | 238 | ||||
-rw-r--r-- | mail/courier/Makefile.doc | 33 | ||||
-rw-r--r-- | mail/courier/Makefile.man | 39 | ||||
-rw-r--r-- | mail/courier/Makefile.own | 16 | ||||
-rw-r--r-- | mail/courier/distinfo | 4 | ||||
-rw-r--r-- | mail/courier/files/courier.sh.in (renamed from mail/courier/files/courier.sh) | 92 | ||||
-rw-r--r-- | mail/courier/files/crontab | 3 | ||||
-rw-r--r-- | mail/courier/files/crontab.in | 3 | ||||
-rw-r--r-- | mail/courier/files/patch-courier::configure | 6 | ||||
-rw-r--r-- | mail/courier/files/patch-courier::doc::Makefile.in | 14 | ||||
-rw-r--r-- | mail/courier/files/patch-courier::perms.sh.in | 49 | ||||
-rw-r--r-- | mail/courier/files/patch-courier::submit.C | 54 | ||||
-rw-r--r-- | mail/courier/files/patch-liblock::locktest.c | 81 | ||||
-rw-r--r-- | mail/courier/files/pkg-install.in (renamed from mail/courier/pkg-install) | 37 | ||||
-rw-r--r-- | mail/courier/files/pkg-message.in (renamed from mail/courier/pkg-message) | 19 | ||||
-rw-r--r-- | mail/courier/pkg-deinstall | 28 | ||||
-rw-r--r-- | mail/courier/pkg-plist | 267 | ||||
-rw-r--r-- | mail/courier/scripts/c_rehash | 14 |
18 files changed, 502 insertions, 495 deletions
diff --git a/mail/courier/Makefile b/mail/courier/Makefile index 2f9d56842b2e..a744488adce6 100644 --- a/mail/courier/Makefile +++ b/mail/courier/Makefile @@ -6,7 +6,7 @@ # PORTNAME= courier -PORTVERSION= 0.45.4 +PORTVERSION= 0.50.1 CATEGORIES= mail ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= courier @@ -14,18 +14,19 @@ MASTER_SITE_SUBDIR= courier MAINTAINER= yds@CoolRat.org COMMENT= Courier SMTP IMAP POP3 HTTP mail server suite +BUILD_DEPENDS= courierauthconfig:${PORTSDIR}/security/courier-authlib-base +LIB_DEPENDS= fam.0:${PORTSDIR}/devel/fam +RUN_DEPENDS= courierauthconfig:${PORTSDIR}/security/courier-authlib-base \ + ${LOCALBASE}/share/sysconftool/sysconftool:${PORTSDIR}/devel/sysconftool \ + ${LOCALBASE}/etc/mime.types:${PORTSDIR}/misc/mime-support \ + ${SITE_PERL}/Net/CIDR.pm:${PORTSDIR}/net-mgmt/p5-Net-CIDR + CONFLICTS= exim-4.* courier-imap-2.* maildrop-1.* \ postfix-1.* postfix-2.* \ qmail-1.* qmail-*-1.* \ sendmail-8.* sendmail-*-8.* \ smail-3.* sqwebmail-3.* zmailer-2.* -LIB_DEPENDS= fam.0:${PORTSDIR}/devel/fam -RUN_DEPENDS= ${LOCALBASE}/share/sysconftool/sysconftool:${PORTSDIR}/devel/sysconftool \ - ${SITE_PERL}/Net/CIDR.pm:${PORTSDIR}/net-mgmt/p5-Net-CIDR - -BROKEN= Changes permissions on previously-installed files - .if !defined(BATCH) && !defined(PACKAGE_BUILDING) IS_INTERACTIVE= yes .endif @@ -50,12 +51,12 @@ MAILUID= 465 MAILGID= 465 ETCDIR= ${PREFIX}/etc SYSCONFDIR= ${ETCDIR}/courier -USERDB= ${ETCDIR}/userdb +USERDB?= ${ETCDIR}/userdb LIBEXECDIR= ${PREFIX}/libexec LOCALSTATEDIR= /var/spool/courier CACHEDIR= /var/spool/webmail CALENDIR= /var/spool/calendar -MIMETYPES= ${LOCALBASE}/etc/apache/mime.types:${LOCALBASE}/etc/apache2/mime.types +MIMETYPES= ${LOCALBASE}/etc/mime.types WITH_TRANSPORT= local esmtp dsn USE_BZIP2= yes @@ -63,20 +64,28 @@ USE_SUBMAKE= yes USE_PERL5= yes USE_GMAKE= yes USE_OPENSSL= yes -USE_RC_SUBR= yes USE_REINPLACE= yes USE_LIBTOOL_VER=15 +.if defined(WITH_RCORDER) +USE_RCORDER= courier.sh +.else +USE_RC_SUBR= courier.sh +.endif + CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ENV= REHASH=${SCRIPTDIR}/c_rehash \ CPPFLAGS='${CPPFLAGS}' \ LDFLAGS='${LDFLAGS}' MAKE_ENV:= ${CONFIGURE_ENV} + CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --disable-root-check --with-db=db \ --enable-syslog=1 --enable-use-flock \ --program-transform-name=s,^,, \ + --enable-utf7-folder-encoding \ + --enable-unicode \ --with-mailuser=${MAILOWN} \ --with-mailgroup=${MAILGRP} \ --with-mailuid=${MAILUID} \ @@ -94,24 +103,31 @@ CONFIGURE_ARGS= --disable-root-check --with-db=db \ --with-calendardir=${CALENDIR} \ --with-transport='${WITH_TRANSPORT}' \ --with-default-maildrop=${MAILDROPDEFAULT} \ - --enable-workarounds-for-imap-client-bugs - -PKGMESSAGE= ${WRKDIR}/.PKGMESSAGE + --with-paranoid-smtpext \ + --enable-workarounds-for-imap-client-bugs \ + --cache-file=${WRKDIR}/courier.cache INSTALL_TARGET= install-strip install-perms PLIST_SUB+= BINOWN="${BINOWN}" BINGRP="${BINGRP}" \ MAILOWN="${MAILOWN}" MAILGRP="${MAILGRP}" \ MAILUID="${MAILUID}" MAILGID="${MAILGID}" \ - CACHEOWN="${CACHEOWN}" + CACHEOWN="${CACHEOWN}" CACHEDIR="${CACHEDIR}" \ + CALENDIR="${CALENDIR}" LOCALSTATEDIR="${LOCALSTATEDIR}" +SUB_LIST:= ${PLIST_SUB} +SUB_FILES+= pkg-install pkg-message crontab -OPTIONS+=EXPECT "Expect support for WebMail change passwd" -.if exists(${LOCALBASE}/bin/expect) || defined(WITH_EXPECT) +OPTIONS+=LDAP "LDAP-based mail aliasing support" +.if (exists(${LOCALBASE}/lib/libldap.a) && exists(${LOCALBASE}/lib/liblber.a)) || defined(WITH_LDAP) OPTIONS+=on .else OPTIONS+=off .endif +.if exists(${.CURDIR}/../../security/courier-authlib/Makefile.opt) +.include "${.CURDIR}/../../security/courier-authlib/Makefile.opt" +.endif + OPTIONS+=GNUPG "GNU Privacy Guard support for WebMail" .if exists(${LOCALBASE}/bin/gpg) || defined(WITH_GNUPG) OPTIONS+=on @@ -133,34 +149,6 @@ OPTIONS+=on OPTIONS+=off .endif -OPTIONS+=OPENLDAP "OpenLDAP 2.x authentication support" -.if (exists(${LOCALBASE}/lib/libldap.so.2) && exists(${LOCALBASE}/lib/liblber.so.2)) || defined(WITH_OPENLDAP) -OPTIONS+=on -.else -OPTIONS+=off -.endif - -OPTIONS+=MYSQL "MySQL authentication support" -.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.14) || defined(WITH_MYSQL) -OPTIONS+=on -.else -OPTIONS+=off -.endif - -OPTIONS+=PGSQL "PostgreSQL authentication support" -.if exists(${LOCALBASE}/lib/libpq.so) || defined(WITH_PGSQL) -OPTIONS+=on -.else -OPTIONS+=off -.endif - -OPTIONS+=VCHKPW "VPopMail authentication support" -.if exists(${LOCALBASE}/vpopmail/lib/libvpopmail.a) || defined(WITH_VCHKPW) -OPTIONS+=on -.else -OPTIONS+=off -.endif - OPTIONS+=PROCMAIL "Procmail local delivery support" .if exists(${LOCALBASE}/bin/procmail) || defined(WITH_PROCMAIL) OPTIONS+=on @@ -183,95 +171,62 @@ OPTIONS+=off .endif OPTIONS+=IPV6 "IPv6 support" -.if defined(WITH_IPV6) && !defined(WITHOUT_IPV6) +.if defined(WITH_IPV6) OPTIONS+=on .else OPTIONS+=off .endif -.include "${.CURDIR}/Makefile.man" +.include <bsd.port.pre.mk> .include "${.CURDIR}/Makefile.doc" +.include "${.CURDIR}/Makefile.man" .include "${.CURDIR}/Makefile.own" -.include <bsd.port.pre.mk> -.if defined(WITH_EXPECT) && !defined(WITHOUT_EXPECT) -BUILD_DEPENDS+= expect:${PORTSDIR}/lang/expect -PLIST_SUB+= SUB_EXPECT="" +.if defined(WITH_LDAP) && !defined(WITHOUT_LDAP) +USE_OPENLDAP= yes +WITH_AUTH_LDAP= yes +RUN_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthldap.so:${PORTSDIR}/net/courier-authlib-ldap +CONFIGURE_ARGS+=--with-ldapaliasd +PLIST_SUB+= WITHLDAP="" +SUB_LIST+= WITHLDAP="" .else -CONFIGURE_ARGS+=--disable-changepass -PLIST_SUB+= SUB_EXPECT="@comment " +CONFIGURE_ARGS+=--without-ldapaliasd +PLIST_SUB+= WITHLDAP="@comment " +SUB_LIST+= WITHLDAP="@comment " +.endif + +.if exists(${.CURDIR}/../../security/courier-authlib/Makefile.dep) +.include "${.CURDIR}/../../security/courier-authlib/Makefile.dep" .endif .if defined(WITH_GNUPG) && !defined(WITHOUT_GNUPG) BUILD_DEPENDS+= gpg:${PORTSDIR}/security/gnupg +RUN_DEPENDS+= gpg:${PORTSDIR}/security/gnupg .endif .if defined(WITH_ASPELL) && !defined(WITHOUT_ASPELL) && !defined(WITH_ISPELL) BUILD_DEPENDS+= aspell:${PORTSDIR}/textproc/aspell +RUN_DEPENDS+= aspell:${PORTSDIR}/textproc/aspell CONFIGURE_ARGS+=--with-ispell=${LOCALBASE}/bin/aspell .endif .if defined(WITH_ISPELL) && !defined(WITHOUT_ISPELL) && !defined(WITH_ASPELL) BUILD_DEPENDS+= ispell:${PORTSDIR}/textproc/ispell +RUN_DEPENDS+= ispell:${PORTSDIR}/textproc/ispell CONFIGURE_ARGS+=--with-ispell=${LOCALBASE}/bin/ispell .endif .if defined(WITH_ASPELL) && defined(WITH_ISPELL) -BROKEN= ASpell and ISpell are mutually exclusive. +BROKEN= "ASpell and ISpell are mutually exclusive. Run 'make config' to (re)configure ${PKGNAME}" .endif .if !defined(WITH_ASPELL) && !defined(WITH_ISPELL) CONFIGURE_ARGS+=--without-ispell .endif -.if defined(WITH_OPENLDAP) && !defined(WITHOUT_OPENLDAP) -PKGNAMESUFFIX!= ${ECHO} ${PKGNAMESUFFIX}-ldap -USE_OPENLDAP= yes -CONFIGURE_ARGS+=--with-authldap -PLIST_SUB+= SUB_LDAP="" -.else -CONFIGURE_ARGS+=--without-authldap -PLIST_SUB+= SUB_LDAP="@comment " -.endif - -.if defined(WITH_MYSQL) && !defined(WITHOUT_MYSQL) && !defined(WITH_VCHKPW) -.if exists(${LOCALBASE}/vpopmail/lib/libvpopmail.a) -BROKEN+= VPopMail and MySQL are mutually exclusive.\ - Uninstall VPopMail if you want MySQL authentication. -.endif -PKGNAMESUFFIX!= ${ECHO} ${PKGNAMESUFFIX}-mysql -USE_MYSQL= yes -CONFIGURE_ARGS+=--with-authmysql \ - --with-mysql-libs=${LOCALBASE}/lib/mysql \ - --with-mysql-includes=${LOCALBASE}/include/mysql -PLIST_SUB+= SUB_MYSQL="" -.else -CONFIGURE_ARGS+=--without-authmysql -PLIST_SUB+= SUB_MYSQL="@comment " -.endif - -.if defined(WITH_PGSQL) && !defined(WITHOUT_PGSQL) -PKGNAMESUFFIX!= ${ECHO} ${PKGNAMESUFFIX}-pgsql -USE_PGSQL= yes -CONFIGURE_ARGS+=--with-authpgsql \ - --with-pgsql-libs=${LOCALBASE}/lib \ - --with-pgsql-includes=${LOCALBASE}/include -PLIST_SUB+= SUB_PGSQL="" -.else -CONFIGURE_ARGS+=--without-authpgsql -PLIST_SUB+= SUB_PGSQL="@comment " -.endif - -.if defined(WITH_VCHKPW) && !defined(WITHOUT_VCHKPW) && !defined(WITH_MYSQL) -PKGNAMESUFFIX!= ${ECHO} ${PKGNAMESUFFIX}-vpopmail -BUILD_DEPENDS+= ${LOCALBASE}/vpopmail/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail -CONFIGURE_ARGS+=--with-authvchkpw -.else -CONFIGURE_ARGS+=--without-authvchkpw -.endif - .if defined(WITH_PROCMAIL) && !defined(WITHOUT_PROCMAIL) BUILD_DEPENDS+= procmail:${PORTSDIR}/mail/procmail +RUN_DEPENDS+= procmail:${PORTSDIR}/mail/procmail .endif .if defined(WITH_SENDFAX) && !defined(WITHOUT_SENDFAX) @@ -281,9 +236,11 @@ SENDFAX_DEPENDS=sendfax:${PORTSDIR}/comms/mgetty+sendfax \ BUILD_DEPENDS+= ${SENDFAX_DEPENDS} RUN_DEPENDS+= ${SENDFAX_DEPENDS} WITH_TRANSPORT+=fax -PLIST_SUB+= SUB_FAX="" +PLIST_SUB+= WITHFAX="" +SUB_LIST+= WITHFAX="" .else -PLIST_SUB+= SUB_FAX="@comment " +PLIST_SUB+= WITHFAX="@comment " +SUB_LIST+= WITHFAX="@comment " .endif .if defined(WITH_UUCP) && !defined(WITHOUT_UUCP) @@ -292,53 +249,60 @@ BUILD_DEPENDS+= uux:${PORTSDIR}/net/freebsd-uucp RUN_DEPENDS+= uux:${PORTSDIR}/net/freebsd-uucp .endif WITH_TRANSPORT+=uucp -PLIST_SUB+= SUB_UUCP="" +PLIST_SUB+= WITHUUCP="" .else -PLIST_SUB+= SUB_UUCP="@comment " +PLIST_SUB+= WITHUUCP="@comment " .endif -.if defined(WITHOUT_IPV6) || !defined(WITH_IPV6) -CONFIGURE_ARGS+=--without-ipv6 -.else +.if defined(WITH_IPV6) || !defined(WITHOUT_IPV6) CONFIGURE_ARGS+=--with-ipv6 +.else +CONFIGURE_ARGS+=--without-ipv6 .endif pre-everything:: - @${ECHO_MSG} "===> -------------------------------------------" - @${ECHO_MSG} "===> Run 'make config' to (re)configure the port" - @${ECHO_MSG} "===> -------------------------------------------" + @${ECHO_MSG} "===> --------------------------------------------------------" + @${ECHO_MSG} "===> Run 'make config' to (re)configure ${PKGNAME}" + @${ECHO_MSG} "===> --------------------------------------------------------" post-patch: - @${REINPLACE_CMD} -e 's:@datadir@:@sysconfdir@:g' \ + @${REINPLACE_CMD} -e 's|@datadir@|@sysconfdir@|g' \ ${WRKSRC}/*/mk*cert.* \ ${WRKSRC}/*/*/mk*cert.* - @${REINPLACE_CMD} -e 's:^TLS_CERTFILE=@datadir@:TLS_CERTFILE=@sysconfdir@:g' \ + @${REINPLACE_CMD} -e 's|^\(TLS_CERTFILE=\)@datadir@|\1@sysconfdir@|g' \ ${WRKSRC}/*/*.dist.in \ ${WRKSRC}/*/*/*.dist.in - @${REINPLACE_CMD} -e 's:^RANDFILE = @datadir@[^[:space:]]*:RANDFILE = @sysconfdir@/random.tmp:g' \ + @${REINPLACE_CMD} -e 's|^\(RANDFILE = \)@datadir@[^[:space:]]*|\1@sysconfdir@/random.tmp|g' \ ${WRKSRC}/*/*.cnf.in \ ${WRKSRC}/*/*/*.cnf.in - @${REINPLACE_CMD} -e 's:"\\$${SHELL} \\$$(install_sh) -c -s":"\\$${BSD_INSTALL_PROGRAM}":' \ + @${REINPLACE_CMD} -e 's|$$(INSTALL_DATA) \(.$$$$file.\)|${INSTALL_MAN} \1|' \ + ${WRKSRC}/Makefile.in \ + ${WRKSRC}/*/Makefile.in \ + ${WRKSRC}/*/*/Makefile.in \ + ${WRKSRC}/*/*/*/Makefile.in + @${REINPLACE_CMD} -e 's|^\(INSTALL_STRIP_PROGRAM=\).*$$|\1"${INSTALL_PROGRAM} -s"|' \ + -e 's|; ldapaliasd="yes"||' \ ${WRKSRC}/configure \ ${WRKSRC}/*/configure \ ${WRKSRC}/*/*/configure \ ${WRKSRC}/*/*/*/configure + @${REINPLACE_CMD} -E -e 's/(root|bin)[[:space:]]*bin/root wheel/g' \ + ${WRKSRC}/courier/perms.sh.in pre-configure: - @${SED} -e s:%%RC_SUBR%%:${RC_SUBR}: \ - -e s:%%PREFIX%%:${PREFIX}: ${FILESDIR}/courier.sh > ${WRKDIR}/courier.sh - @${SED} -e s:%%PREFIX%%:${PREFIX}: ${.CURDIR}/pkg-message > ${WRKDIR}/.PKGMESSAGE - @${SED} -e s:%%PREFIX%%:${PREFIX}: ${FILESDIR}/crontab > ${WRKDIR}/crontab + @if [ -f "${WRKDIR}/courier.cache" -a -s "${WRKDIR}/courier.cache" ]; then \ + ${RM} -f "${WRKDIR}/courier.cache"; \ + fi post-build: - @${PERL} -pi -e 's:^(auth)\s+(required).*:$$1\t\t$$2\tpam_unix.so\ttry_first_pass:g;' \ - -e 's:^(account)\s+(required).*:$$1 \t$$2\tpam_unix.so:g;' \ - -e 's:^(session)\s+(required).*:$$1 \t$$2\tpam_permit.so:g;' \ + @${PERL} -pi -e 's|^(auth)\s+(required).*|$$1\t\t$$2\tpam_unix.so\ttry_first_pass|g;' \ + -e 's|^(account)\s+(required).*|$$1 \t$$2\tpam_unix.so|g;' \ + -e 's|^(session)\s+(required).*|$$1 \t$$2\tpam_permit.so|g;' \ ${WRKSRC}/*/*.authpam* \ ${WRKSRC}/*/*/*.authpam* @${LN} -f ${WRKSRC}/gpglib/README.html ${WRKSRC}/gpglib/README.gpglib.html - @${LN} -f ${WRKSRC}/imap/FAQ ${WRKSRC}/imap/FAQ.imap - @${LN} -f ${WRKSRC}/imap/FAQ.html ${WRKSRC}/imap/FAQ.imap.html + @${LN} -f ${WRKSRC}/imap/BUGS ${WRKSRC}/imap/BUGS.imap + @${LN} -f ${WRKSRC}/imap/BUGS.html ${WRKSRC}/imap/BUGS.imap.html @${LN} -f ${WRKSRC}/imap/README ${WRKSRC}/imap/README.imap @${LN} -f ${WRKSRC}/imap/README.html ${WRKSRC}/imap/README.imap.html @${LN} -f ${WRKSRC}/maildrop/README.html ${WRKSRC}/maildrop/README.maildrop.html @@ -348,46 +312,42 @@ post-build: @${LN} -f ${WRKSRC}/webmail/SECURITY ${WRKSRC}/webmail/SECURITY.webmail @${LN} -f ${WRKSRC}/webmail/SECURITY.html ${WRKSRC}/webmail/SECURITY.webmail.html -pre-install: - @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: @${LN} -f ${SYSCONFDIR}/maildrop ${SYSCONFDIR}/maildropfilter @${INSTALL_DATA} /dev/null ${SYSCONFDIR}/locallowercase @${INSTALL_DATA} ${WRKDIR}/crontab ${PREFIX}/etc/courier/ - @${INSTALL_SCRIPT} ${WRKDIR}/courier.sh ${PREFIX}/etc/rc.d/ .for file in ${OWNER0} - @-${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/${file} + @-${CHOWN} -Rh ${BINOWN}:${BINGRP} ${PREFIX}/${file} .endfor @${GREP} '^@exec ' ${TMPPLIST} \ | ${SED} -e 's:^@exec ::' -e 's:%D:${PREFIX}:g' \ > ${WRKDIR}/.PLIST.exec \ && ${SH} ${WRKDIR}/.PLIST.exec .if !defined(NOPORTDOCS) - @${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} ${DOCSDIR}/html - @${INSTALL_DATA} ${DATADIR}/htmldoc/* ${DOCSDIR}/html + @${INSTALL} ${_DOCOWNGRP} -d ${DOCSDIR}/html .for f in ${DOCS} @${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} .endfor +.for f in ${HTMLDOCS} + @${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/html +.endfor + @${INSTALL_DATA} ${DATADIR}/htmldoc/* ${DOCSDIR}/html .endif @${RM} -rf ${DATADIR}/htmldoc - @for F in ${MANPREFIX}/man/man[1-9ln]/*; \ - do ${CHMOD} ${MANMODE} $$F; \ - done - @${CHOWN} -Rh ${MANOWN}:${MANGRP} ${MANPREFIX}/man/man[1-9ln] - @${CHOWN} -Rh ${SHAREOWN}:${SHAREGRP} ${DATADIR} + @-${CHOWN} -Rh ${SHAREOWN}:${SHAREGRP} ${DATADIR} @${CHMOD} -R a+r ${DATADIR}/courierwebadmin - @${CHMOD} -R a-w ${DATADIR} - @${ECHO_MSG} "" + @${CHMOD} -R a-w ${DATADIR} ${LIBEXECDIR}/courier + @${CHMOD} 550 ${LIBEXECDIR}/courier/modules/esmtp/courieresmtp* + @${ECHO_MSG} @${CAT} ${PKGMESSAGE} - @${ECHO_MSG} "" + @${ECHO_MSG} .if defined(BATCH) || defined(PACKAGE_BUILDING) @${ECHO_MSG} " To activate Courier in /etc/mail/mailer.conf or to" @${ECHO_MSG} " replace {sendmail,mailq,newaliases} with Courier" @${ECHO_MSG} " versions execute the following as root user:" - @${ECHO_MSG} "" + @${ECHO_MSG} @${ECHO_MSG} "PKG_PREFIX=\"${PREFIX}\" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL" - @${ECHO_MSG} "" + @${ECHO_MSG} .else @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif diff --git a/mail/courier/Makefile.doc b/mail/courier/Makefile.doc index 4ebec5f7fb16..a0e0cfcc166e 100644 --- a/mail/courier/Makefile.doc +++ b/mail/courier/Makefile.doc @@ -1,20 +1,31 @@ -DOCS= AUTHORS BENCHMARKS INSTALL NEWS README \ - authlib/README.authmysql.html \ - authlib/README.ldap \ - gpglib/README.gpglib.html \ - imap/FAQ.imap \ - imap/FAQ.imap.html \ +DOCS= AUTHORS \ + BENCHMARKS \ + COPYING \ + COPYING.GPL \ + ChangeLog \ + ChangeLog.2001 \ + INSTALL \ + NEWS \ + README \ + TODO \ + imap/BUGS.imap \ imap/README.imap \ + imap/README.proxy \ + maildir/README.maildirquota.txt \ + maildir/README.sharedfolders.txt \ + tcpd/README.couriertls \ + webmail/BUGS.webmail \ + webmail/SECURITY.webmail + +HTMLDOCS=NEWS.html \ + gpglib/README.gpglib.html \ + imap/BUGS.imap.html \ imap/README.imap.html \ + imap/README.proxy.html \ maildir/README.maildirfilter.html \ maildir/README.maildirquota.html \ - maildir/README.maildirquota.txt \ - maildir/README.sharedfolders.txt \ maildir/README.sharedfolders.html \ maildrop/README.maildrop.html \ pcp/README.pcp.html \ - tcpd/README.couriertls \ - webmail/BUGS.webmail \ webmail/BUGS.webmail.html \ - webmail/SECURITY.webmail \ webmail/SECURITY.webmail.html diff --git a/mail/courier/Makefile.man b/mail/courier/Makefile.man index 4e8cb6928244..00a287eea226 100644 --- a/mail/courier/Makefile.man +++ b/mail/courier/Makefile.man @@ -21,14 +21,13 @@ MAN1= \ testmxlookup.1 MAN5= \ dot-courier.5 \ - maildir.5 \ - maildropex.5 \ - maildropfilter.5 \ - maildropgdbm.5 + maildir.5 MAN7= \ - authlib.7 \ localmailfilter.7 \ - maildirquota.7 + maildirquota.7 \ + maildropex.7 \ + maildropfilter.7 \ + maildropgdbm.7 MAN8= \ courier.8 \ courierfilter.8 \ @@ -44,40 +43,28 @@ MAN8= \ makehosteddomains.8 \ makepercentrelay.8 \ makesmtpaccess.8 \ - makeuserdb.8 \ mkesmtpdcert.8 \ mkimapdcert.8 \ mkpop3dcert.8 \ pop3d.8 \ - submit.8 \ - userdb.8 \ - userdbpw.8 + submit.8 MLINKS= dot-forward.1 dotforward.1 \ sendmail.1 rmail.1 \ - authlib.7 authcram.7 \ - authlib.7 authdaemon.7 \ - authlib.7 authdaemond.7 \ - authlib.7 authldap.7 \ - authlib.7 authmysql.7 \ - authlib.7 authpam.7 \ - authlib.7 authpwd.7 \ - authlib.7 authshadow.7 \ - authlib.7 authuserdb.7 \ - authlib.7 authvchkpw.7 \ courierfilter.8 filterctl.8 \ courierpop3d.8 courierpop3login.8 \ esmtpd.8 esmtpd-msa.8 \ - makesmtpaccess.8 makesmtpaccess-msa.8 \ - makeuserdb.8 pw2userdb.8 \ - makeuserdb.8 vchkpw2userdb.8 + makesmtpaccess.8 makesmtpaccess-msa.8 -.if defined(WITH_FAX) && ${WITH_FAX} == yes +.if defined(WITH_LDAP) && !defined(WITHOUT_LDAP) +#MAN8+= courierldapaliasd.8 +.endif + +.if defined(WITH_SENDFAX) && !defined(WITHOUT_SENDFAX) MAN8+= courierfax.8 .endif -.if defined(WITH_UUCP) && ${WITH_UUCP} == yes +.if defined(WITH_UUCP) && !defined(WITHOUT_UUCP) MAN8+= courieruucp.8 MLINKS+=courieruucp.8 makeuucpneighbors.8 .endif - diff --git a/mail/courier/Makefile.own b/mail/courier/Makefile.own index 0c6ee2f623d9..632b6777ff28 100644 --- a/mail/courier/Makefile.own +++ b/mail/courier/Makefile.own @@ -7,6 +7,8 @@ OWNER0= bin/courier-config \ bin/lockmail \ bin/mailbot \ bin/maildirmake \ + bin/maildiracl \ + bin/maildirkw \ bin/makemime \ bin/mimegpg \ bin/preline \ @@ -40,25 +42,19 @@ OWNER0= bin/courier-config \ etc/courier/rfcerrheader.txt \ etc/courier/smtpaccess/default \ etc/courier/webmail.authpam \ - libexec/authlib/authdaemon \ - libexec/authlib/authdaemond \ - libexec/authlib/authdaemond.plain \ - libexec/authlib/changepwd/authdaemon.passwd \ libexec/courier/courierpop3d \ libexec/courier/courierpop3login \ libexec/courier/imaplogin \ libexec/courier/makedatprog \ - libexec/courier/modules/esmtp/authend \ - libexec/courier/modules/local/courierdeliver \ - libexec/courier/modules/local/courierlocal \ - libexec/courier/modules/modules.ctl \ + libexec/courier/modules \ libexec/courier/pcpd \ + libexec/courier/sqwebmaild \ libexec/courier/webmail/webadmin \ libexec/courier/webmail/webmail \ libexec/filters/dupfilter \ libexec/filters/perlfilter \ sbin/courier \ - sbin/courierlogger \ + sbin/courierldapaliasd \ sbin/couriertcpd \ sbin/showconfig \ - sbin/userdbpw + sbin/webmaild diff --git a/mail/courier/distinfo b/mail/courier/distinfo index 1b213e61ec35..7e8b9979f499 100644 --- a/mail/courier/distinfo +++ b/mail/courier/distinfo @@ -1,2 +1,2 @@ -MD5 (courier-0.45.4.tar.bz2) = ab2a668fe590f42c40649b62af704995 -SIZE (courier-0.45.4.tar.bz2) = 4318289 +MD5 (courier-0.50.1.tar.bz2) = 6fb2b188bba8fbf244f2feb80ad99a70 +SIZE (courier-0.50.1.tar.bz2) = 5913551 diff --git a/mail/courier/files/courier.sh b/mail/courier/files/courier.sh.in index e185bae6046c..b69171796ff4 100644 --- a/mail/courier/files/courier.sh +++ b/mail/courier/files/courier.sh.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/courier/files/Attic/courier.sh,v 1.3 2004-01-15 15:12:32 sergei Exp $ +# $FreeBSD$ # # Adapted for FreeBSD from courier.sysvinit # @@ -8,7 +8,7 @@ # "courierd restart" for a kindler, gentler, restart. # # PROVIDE: mail -# REQUIRE: LOGIN +# REQUIRE: LOGIN courier_authdaemond # BEFORE: securelevel # KEYWORD: FreeBSD shutdown # @@ -38,14 +38,39 @@ courier_enable=${courier_enable:-"NO"} # Run Courier-MTA (YES/NO). name="courier" rcvar=`set_rcvar` +start_precmd="${name}_prestart" start_cmd="${name}_start" stop_cmd="${name}_stop" extra_commands="restart" +courier_prestart() +{ # Ensure runtime directories exist with correct permissions + /usr/bin/install -o %%BINOWN%% -g %%BINGRP%% -m 0755 -d %%LOCALSTATEDIR%% + /usr/bin/install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %%LOCALSTATEDIR%%/allfilters + /usr/bin/install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %%LOCALSTATEDIR%%/faxtmp + /usr/bin/install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %%LOCALSTATEDIR%%/filters + /usr/bin/install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %%LOCALSTATEDIR%%/msgq + /usr/bin/install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %%LOCALSTATEDIR%%/msgs + /usr/bin/install -o %%MAILOWN%% -g %%MAILGRP%% -m 0770 -d %%LOCALSTATEDIR%%/tmp + /usr/bin/install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %%LOCALSTATEDIR%%/track + /usr/bin/install -o %%MAILOWN%% -g %%MAILGRP%% -m 0400 -c /dev/null %%LOCALSTATEDIR%%/.noident + + /usr/bin/install -o %%BINOWN%% -g %%BINGRP%% -m 0755 -d %%CALENDIR%% + /usr/bin/install -o %%CACHEOWN%% -g %%MAILGRP%% -m 0700 -d %%CALENDIR%%/localcache + /usr/bin/install -o %%CACHEOWN%% -g %%MAILGRP%% -m 0750 -d %%CALENDIR%%/private + /usr/bin/install -o %%CACHEOWN%% -g %%MAILGRP%% -m 0755 -d %%CALENDIR%%/public + + /usr/bin/install -o %%CACHEOWN%% -g mail -m 0700 -d %%CACHEDIR%% +} + courier_start() { # First time after install create aliases.dat and makesmtpaccess.dat echo -n "Starting" + if [ -f ${sysconfdir}/crontab ]; then + /usr/bin/crontab -u %%CACHEOWN%% ${sysconfdir}/crontab + fi + if [ ! -f ${sysconfdir}/aliases.dat \ -a -x ${sbindir}/makealiases ]; then ${sbindir}/makealiases @@ -56,7 +81,7 @@ courier_start() ESMTPDSTART="" if [ -f ${sysconfdir}/esmtpd ]; then . ${sysconfdir}/esmtpd - case $ESMTPDSTART in + case "$ESMTPDSTART" in [Yy]*) esmtpdcert=1 ;; @@ -74,7 +99,7 @@ courier_start() ESMTPDSTART="" if [ -f ${sysconfdir}/esmtpd-msa ]; then . ${sysconfdir}/esmtpd-msa - case $ESMTPDSTART in + case "$ESMTPDSTART" in [Yy]*) esmtpdcert=1 ;; @@ -90,30 +115,15 @@ courier_start() ${sbindir}/courierfilter start fi - if [ -x ${libexecdir}/authlib/authdaemond ]; then - echo -n " authdaemond" - ${libexecdir}/authlib/authdaemond start - fi - if [ -x ${sbindir}/courierldapaliasd ]; then echo -n " courierldapaliasd" ${sbindir}/courierldapaliasd start fi - case "`cat ${sysconfdir}/calendarmode 2>/dev/null`" in - net) - if [ -x ${libexecdir}/courier/pcpd ]; then - echo -n " pcpd" - ${libexecdir}/courier/pcpd start - fi - ;; - *) - ;; - esac - - if [ -x ${libexecdir}/courier/sqwebmaild ]; then + if [ -x ${libexecdir}/courier/sqwebmaild \ + -a -x ${sbindir}/webmaild ]; then echo -n " webmail" - ${libexecdir}/courier/sqwebmaild start + ${sbindir}/webmaild start fi if [ -x ${sbindir}/courier ]; then @@ -124,7 +134,7 @@ courier_start() if [ "$esmtpdcert" = 1 ]; then # If we do not have a certificate, make one up. if [ ! -f ${sysconfdir}/esmtpd.pem \ - -a -x $COURIERTLS \ + -a -x "$COURIERTLS" \ -a -x ${sbindir}/mkesmtpdcert ]; then echo -n " generating-ESMTP-SSL-certificate..." ${sbindir}/mkesmtpdcert >/dev/null 2>&1 @@ -134,7 +144,7 @@ courier_start() ESMTPDSTART="" if [ -f ${sysconfdir}/esmtpd ]; then . ${sysconfdir}/esmtpd - case $ESMTPDSTART in + case "$ESMTPDSTART" in [Yy]*) if [ -x ${sbindir}/esmtpd ]; then echo -n " esmtpd" @@ -147,7 +157,7 @@ courier_start() ESMTPDSTART="" if [ -f ${sysconfdir}/esmtpd-msa ]; then . ${sysconfdir}/esmtpd-msa - case $ESMTPDSTART in + case "$ESMTPDSTART" in [Yy]*) if [ -x ${sbindir}/esmtpd-msa ]; then echo -n " esmtpd-msa" @@ -160,9 +170,9 @@ courier_start() ESMTPDSSLSTART="" if [ -f ${sysconfdir}/esmtpd-ssl ]; then . ${sysconfdir}/esmtpd-ssl - case $ESMTPDSSLSTART in + case "$ESMTPDSSLSTART" in [Yy]*) - if [ -x $COURIERTLS \ + if [ -x "$COURIERTLS" \ -a -x ${sbindir}/esmtpd-ssl ]; then echo -n " esmtpd-ssl" ${sbindir}/esmtpd-ssl start @@ -174,7 +184,7 @@ courier_start() IMAPDSTART="" if [ -f ${sysconfdir}/imapd ]; then . ${sysconfdir}/imapd - case $IMAPDSTART in + case "$IMAPDSTART" in [Yy]*) if [ -x ${sbindir}/imapd ]; then echo -n " imapd" @@ -187,9 +197,9 @@ courier_start() IMAPDSSLSTART="" if [ -f ${sysconfdir}/imapd-ssl ]; then . ${sysconfdir}/imapd-ssl - case $IMAPDSSLSTART in + case "$IMAPDSSLSTART" in [Yy]*) # If we do not have a certificate, make one up. - if [ -x $COURIERTLS ]; then + if [ -x "$COURIERTLS" ]; then if [ ! -f ${sysconfdir}/imapd.pem \ -a -x ${sbindir}/mkimapdcert ]; then echo -n " generating-IMAP-SSL-certificate..." @@ -207,7 +217,7 @@ courier_start() POP3DSTART="" if [ -f ${sysconfdir}/pop3d ]; then . ${sysconfdir}/pop3d - case $POP3DSTART in + case "$POP3DSTART" in [Yy]*) if [ -x ${sbindir}/pop3d ]; then echo -n " pop3d" @@ -220,9 +230,9 @@ courier_start() POP3DSSLSTART="" if [ -f ${sysconfdir}/pop3d-ssl ]; then . ${sysconfdir}/pop3d-ssl - case $POP3DSSLSTART in + case "$POP3DSSLSTART" in [Yy]*) # If we do not have a certificate, make one up. - if [ -x $COURIERTLS ]; then + if [ -x "$COURIERTLS" ]; then if [ ! -f ${sysconfdir}/pop3d.pem \ -a -x ${sbindir}/mkpop3dcert ]; then echo -n " generating-POP3-SSL-certificate..." @@ -283,14 +293,9 @@ courier_stop() ${sbindir}/courier stop fi - if [ -x ${libexecdir}/courier/sqwebmaild ]; then + if [ -x ${sbindir}/webmaild ]; then echo -n " webmail" - ${libexecdir}/courier/sqwebmaild stop - fi - - if [ -x ${libexecdir}/courier/pcpd ]; then - echo -n " pcpd" - ${libexecdir}/courier/pcpd stop + ${sbindir}/webmaild stop fi if [ -x ${sbindir}/courierldapaliasd ]; then @@ -298,15 +303,12 @@ courier_stop() ${sbindir}/courierldapaliasd stop fi - if [ -x ${libexecdir}/authlib/authdaemond ]; then - echo -n " authdaemond" - ${libexecdir}/authlib/authdaemond stop - fi - if [ -x ${sbindir}/courierfilter ]; then echo -n " courierfilter" ${sbindir}/courierfilter stop fi + + echo y | /usr/bin/crontab -u %%CACHEOWN%% -r || true echo "." } diff --git a/mail/courier/files/crontab b/mail/courier/files/crontab deleted file mode 100644 index faf9caf87a65..000000000000 --- a/mail/courier/files/crontab +++ /dev/null @@ -1,3 +0,0 @@ -# $FreeBSD: /tmp/pcvs/ports/mail/courier/files/Attic/crontab,v 1.1 2002-01-15 06:17:27 dwhite Exp $ -#minute hour mday month wday command -25 * * * * %%PREFIX%%/share/courier/sqwebmail/cleancache.pl diff --git a/mail/courier/files/crontab.in b/mail/courier/files/crontab.in new file mode 100644 index 000000000000..e0ee87c3ff4d --- /dev/null +++ b/mail/courier/files/crontab.in @@ -0,0 +1,3 @@ +# $FreeBSD$ +#minute hour mday month wday command +25 * * * * %%PREFIX%%/share/courier/sqwebmail/cleancache.pl diff --git a/mail/courier/files/patch-courier::configure b/mail/courier/files/patch-courier::configure index c6d32871c221..d56e7d14f2f7 100644 --- a/mail/courier/files/patch-courier::configure +++ b/mail/courier/files/patch-courier::configure @@ -1,6 +1,6 @@ ---- courier/configure.orig Sat Nov 15 15:13:43 2003 -+++ courier/configure Wed Jan 7 03:22:36 2004 -@@ -21208,9 +21208,9 @@ +--- courier/configure.orig Sun Jul 3 00:06:22 2005 ++++ courier/configure Sun Jul 3 00:06:22 2005 +@@ -22109,9 +22109,9 @@ if test "$testmode" = "0" then diff --git a/mail/courier/files/patch-courier::doc::Makefile.in b/mail/courier/files/patch-courier::doc::Makefile.in index 244fdc51a5f9..1d70f7f64cf6 100644 --- a/mail/courier/files/patch-courier::doc::Makefile.in +++ b/mail/courier/files/patch-courier::doc::Makefile.in @@ -1,6 +1,6 @@ ---- courier/doc/Makefile.in.orig Wed Apr 23 01:46:13 2003 -+++ courier/doc/Makefile.in Sat Aug 9 21:59:26 2003 -@@ -985,18 +985,18 @@ +--- courier/doc/Makefile.in.orig Sun Jul 3 00:15:30 2005 ++++ courier/doc/Makefile.in Sun Jul 3 00:15:30 2005 +@@ -1136,18 +1136,18 @@ $(MAKE) do-man-install do-man-install: @@ -26,7 +26,7 @@ status.html: config.status -@@ -1009,24 +1009,24 @@ +@@ -1160,24 +1160,24 @@ @SUBDIRS="$(SUBDIRS)" ; for f in $$SUBDIRS ; do ( cd $$f && $(MAKE) $(AM_MAKEFLAGS) install-perms ) ; cat /dev/null >>$$f/permissions.dat ; cat $$f/permissions.dat >>permissions.dat ; done install-perms-local: @@ -66,6 +66,6 @@ +# @echo $(htmldocdir) 755 bin bin >>permissions.dat +# @for f in $(htmldoc_DATA) ; do \ +# echo $(htmldocdir)/$$f 444 bin bin doc >>permissions.dat ; done - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: + + htmldoc: $(htmldocfiles) + echo '/icon\.gif/a'"\\" >htmldoc.sed diff --git a/mail/courier/files/patch-courier::perms.sh.in b/mail/courier/files/patch-courier::perms.sh.in index fd757b9c8db5..03feaf7a3202 100644 --- a/mail/courier/files/patch-courier::perms.sh.in +++ b/mail/courier/files/patch-courier::perms.sh.in @@ -1,5 +1,5 @@ ---- courier/perms.sh.in.orig Fri Dec 7 08:37:35 2001 -+++ courier/perms.sh.in Sun Jan 27 23:12:48 2002 +--- courier/perms.sh.in.orig Thu Jan 27 21:53:58 2005 ++++ courier/perms.sh.in Thu Jan 27 21:53:58 2005 @@ -10,9 +10,6 @@ exec_prefix="@exec_prefix@" @@ -10,23 +10,32 @@ @localstatedir@/tmp 770 @localstatedir@/msgs 750 @localstatedir@/msgq 750 -@@ -41,7 +38,6 @@ +@@ -45,7 +42,6 @@ @sysconfdir@/rfcerr2046.txt 444 config @sysconfdir@/rfcerr2047.txt 444 config -@libexecdir@ 755 x bin bin - @libexecdir@/authlib 755 x bin bin @libexecdir@/courier 755 x bin bin @libexecdir@/courier/modules 755 x bin bin -@@ -61,7 +57,6 @@ - @libexecdir@/courier/webmail/webmail 4555 x root bin - @libexecdir@/courier/webmail/webadmin 4555 x root bin + @libexecdir@/courier/submitmkdir 4550 +@@ -59,13 +55,12 @@ + @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 500 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/sqwebpasswd 2555 ++@libexecdir@/courier/webmail/webadmin 4511 x root bin -@sbindir@ 755 x bin bin @sbindir@/courier 555 @sbindir@/showconfig 555 @sbindir@/showmodules 550 -@@ -73,7 +68,6 @@ +@@ -78,7 +73,6 @@ @datadir@/imapd 555 x bin bin @datadir@/imapd-ssl 555 x bin bin @@ -34,3 +43,27 @@ @bindir@/cancelmsg 6555 @bindir@/courier-config 555 @bindir@/mailq 2555 +@@ -105,10 +99,10 @@ + @sbindir@/makealiases 550 + @datadir@/makehosteddomains 555 + @sbindir@/makehosteddomains 555 +-@datadir@/pop3d 755 +-@sbindir@/pop3d 755 +-@datadir@/pop3d-ssl 755 +-@sbindir@/pop3d-ssl 755 ++@datadir@/pop3d 555 ++@sbindir@/pop3d 555 ++@datadir@/pop3d-ssl 555 ++@sbindir@/pop3d-ssl 555 + @sbindir@/webgpg 555 + + @datadir@ 755 x bin bin +@@ -202,7 +196,7 @@ + if test "@HAVE_LDAP@" != 0 + then + echo @sysconfdir@/ldapaliasrc.dist 640 @mailuser@ @mailgroup@ config +- echo @sbindir@/courierldapaliasd 700 @mailuser@ @mailgroup@ ++ echo @sbindir@/courierldapaliasd 500 @mailuser@ @mailgroup@ + fi + + echo @datadir@/sqwebmail/images 755 @mailuser@ @mailgroup@ diff --git a/mail/courier/files/patch-courier::submit.C b/mail/courier/files/patch-courier::submit.C new file mode 100644 index 000000000000..ad3ac19f74b0 --- /dev/null +++ b/mail/courier/files/patch-courier::submit.C @@ -0,0 +1,54 @@ +--- courier/submit.C.orig Fri Apr 22 21:38:00 2005 ++++ courier/submit.C Fri Apr 22 21:38:00 2005 +@@ -531,6 +531,7 @@ + (*hdrOut) += str; + (*hdrOut) += " ("; + (*hdrOut) += errmsg_buf; ++/* + (*hdrOut) += ")\n SPF="; + (*hdrOut) += checkname; + (*hdrOut) += ";\n"; +@@ -550,6 +551,43 @@ + (*hdrOut) += v ? v:strerror(errno); + (*hdrOut) += ";\n"; + } ++*/ ++ (*hdrOut) += ")\n "; ++ (*hdrOut) += checkname; ++ { ++ char *v=strdup(values[0] ? values[0] : ""); ++ ++ for (q=v; q && *q; q++) ++ if (*q < ' ' || *q >= 127) ++ *q='?'; ++ else if (*q == ';') ++ *q=' '; ++ (*hdrOut) += " "; ++ (*hdrOut) += v ? v:strerror(errno); ++ } ++ { ++ char *v=strdup(values[2] ? values[2] : ""); ++ ++ for (q=v; q && *q; q++) ++ if (*q < ' ' || *q >= 127) ++ *q='?'; ++ else if (*q == ';') ++ *q=' '; ++ (*hdrOut) += " ("; ++ (*hdrOut) += v ? v:strerror(errno); ++ } ++ { ++ char *v=strdup(values[1] ? values[1] : ""); ++ ++ for (q=v; q && *q; q++) ++ if (*q < ' ' || *q >= 127) ++ *q='?'; ++ else if (*q == ';') ++ *q=' '; ++ (*hdrOut) += " ["; ++ (*hdrOut) += v ? v:strerror(errno); ++ } ++ (*hdrOut) += "]);\n"; + return str; + } + diff --git a/mail/courier/files/patch-liblock::locktest.c b/mail/courier/files/patch-liblock::locktest.c new file mode 100644 index 000000000000..9f701700d7f2 --- /dev/null +++ b/mail/courier/files/patch-liblock::locktest.c @@ -0,0 +1,81 @@ +--- liblock/locktest.c.orig Mon Dec 6 08:18:55 1999 ++++ liblock/locktest.c Mon Dec 6 08:18:55 1999 +@@ -5,6 +5,7 @@ + + /* $Id */ + ++#include <paths.h> + #include "liblock.h" + #if USE_FCNTL + #include "lockfcntl.c" +@@ -20,11 +21,23 @@ + + int main() + { ++#define FILENAME "courier-authlib.locktest.XXXXX" + int fd[2]; + pid_t p; + int s; + int f; + ++ char *name; ++ const char *tmpdir; ++ if ((tmpdir = (char *)getenv("TMPDIR")) == NULL) ++ tmpdir = _PATH_TMP; ++ (void)asprintf(&name, "%s%s%s", tmpdir, ++ (tmpdir[strlen(tmpdir) - 1] == '/') ? "" : "/", FILENAME); ++ if (name == NULL) { ++ perror("get filename"); ++ exit(1); ++ } ++ + signal(SIGCHLD, SIG_DFL); + if (pipe(fd)) + { +@@ -32,6 +45,12 @@ + return (1); + } + ++ if ((f=mkstemp(name)) < 0) ++ { ++ perror("open"); ++ exit(1); ++ } ++ + if ((p=fork()) == (pid_t)-1) + { + perror("fork"); +@@ -46,7 +65,7 @@ + read(fd[0], &c, 1); + close(fd[0]); + +- if ((f=open("conftest.lock", O_RDWR|O_CREAT, 0644)) < 0) ++ if ((f=open(name, O_RDWR)) < 0) + { + perror("open"); + exit(1); +@@ -56,22 +75,18 @@ + if (ll_lockfd(f, ll_writelock, 0, 0)) + { + close(f); ++ unlink(name); + exit(0); + } + close(f); + exit(1); + } +- +- if ((f=open("conftest.lock", O_RDWR|O_CREAT, 0644)) < 0) +- { +- perror("open"); +- exit(1); +- } + + if (ll_lockfd(f, ll_writelock, 0, 0)) + { + perror("lock"); + close(f); ++ unlink(name); + exit(1); + } + close(fd[1]); diff --git a/mail/courier/pkg-install b/mail/courier/files/pkg-install.in index 4592e47f19f0..8a8adec92bf6 100644 --- a/mail/courier/pkg-install +++ b/mail/courier/files/pkg-install.in @@ -1,12 +1,12 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/courier/Attic/pkg-install,v 1.5 2004-01-15 15:12:32 sergei Exp $ +# $FreeBSD$ # PKG_PREFIX=${PKG_PREFIX:=/usr/local} -USER=courier; UID=465 -GROUP=courier; GID=465 +USER=%%MAILOWN%%; UID=%%MAILUID%% +GROUP=%%MAILGRP%%; GID=%%MAILGID%% ask() { local question default answer @@ -51,37 +51,6 @@ replace() { fi } -if [ ":$2" = ":PRE-INSTALL" ]; then - if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if /usr/sbin/pw groupadd ${GROUP} -g ${GID} -h - - then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d /var/spool/courier \ - -s /sbin/nologin \ - -c "Courier Mail System" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi -fi - if [ ":$2" = ":POST-INSTALL" ]; then if [ -x /sbin/sysctl ]; then OSVERSION=`/sbin/sysctl -n kern.osreldate` diff --git a/mail/courier/pkg-message b/mail/courier/files/pkg-message.in index 8f030f05d4ac..48ba798bc30d 100644 --- a/mail/courier/pkg-message +++ b/mail/courier/files/pkg-message.in @@ -3,28 +3,20 @@ Check and/or modify the following configuration files to suit your needs: - %%PREFIX%%/etc/courier/authdaemonrc - %%PREFIX%%/etc/courier/authldaprc - %%PREFIX%%/etc/courier/authmysqlrc - %%PREFIX%%/etc/courier/authpgsqlrc %%PREFIX%%/etc/courier/courierd %%PREFIX%%/etc/courier/esmtpd %%PREFIX%%/etc/courier/esmtpd-msa %%PREFIX%%/etc/courier/esmtpd-ssl - %%PREFIX%%/etc/courier/faxcoverpage.tr - %%PREFIX%%/etc/courier/faxnotifyrc - %%PREFIX%%/etc/courier/faxrc +%%WITHFAX%% %%PREFIX%%/etc/courier/faxcoverpage.tr +%%WITHFAX%% %%PREFIX%%/etc/courier/faxnotifyrc +%%WITHFAX%% %%PREFIX%%/etc/courier/faxrc %%PREFIX%%/etc/courier/imapd %%PREFIX%%/etc/courier/imapd-ssl %%PREFIX%%/etc/courier/ldapaddressbook - %%PREFIX%%/etc/courier/ldapaliasrc +%%WITHLDAP%% %%PREFIX%%/etc/courier/ldapaliasrc %%PREFIX%%/etc/courier/pop3d %%PREFIX%%/etc/courier/pop3d-ssl - Note that some of the configuration files might not exist - depending on which authentication services you chose to - omit. - Do not forget to update /etc/pam.d/ or /etc/pam.conf with the contents of %%PREFIX%%/etc/courier/*.authpam. @@ -44,6 +36,5 @@ daily_submit_queuerun="NO" Documentation (if installed locally) is located in - %%PREFIX%%/share/doc/courier/ otherwise see + %%DOCSDIR%%/ otherwise see http://www.Courier-MTA.org/ - diff --git a/mail/courier/pkg-deinstall b/mail/courier/pkg-deinstall deleted file mode 100644 index 98694542058f..000000000000 --- a/mail/courier/pkg-deinstall +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/mail/courier/Attic/pkg-deinstall,v 1.1 2002-06-08 18:54:01 ijliao Exp $ -# - -PKG_PREFIX=${PKG_PREFIX:=/usr/local} - -USER=courier -GROUP=courier - -if [ ":$2" = ":POST-DEINSTALL" -a -d /var/spool/courier ]; then - if [ -z "${PACKAGE_BUILDING}" ]; then - echo "" - echo "Warning: Removing user courier will also delete any" - echo " undelivered mail in the mail queue directories!!!" - echo " Do *not* do it if you're upgrading and would like" - echo " courier to continue trying to deliver this mail." - echo "" - else - AFFIRM='-y' - fi - if /usr/sbin/chown -Rh ${USER}:${GROUP} /var/spool/courier; then - /usr/sbin/rmuser ${AFFIRM} ${USER} 2> /dev/null - fi - if [ -d /var/spool/courier ]; then - /usr/sbin/chown root:wheel /var/spool/courier - fi -fi diff --git a/mail/courier/pkg-plist b/mail/courier/pkg-plist index 10cbcd48991c..6345eaa2d935 100644 --- a/mail/courier/pkg-plist +++ b/mail/courier/pkg-plist @@ -1,34 +1,39 @@ -@exec pw groupshow %%MAILGRP%% || pw groupadd %%MAILGRP%% -g %%MAILUID%% -h - -@exec pw user show %%MAILOWN%% || pw useradd %%MAILOWN%% -u %%MAILUID%% -g %%MAILGID%% -h - -d /var/spool/courier -s /sbin/nologin -c "Courier Mail System" -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 %D/etc/courier/aliasdir -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 %D/etc/courier/aliases -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 %D/etc/courier/esmtpacceptmailfor.dir -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 %D/etc/courier/esmtppercentrelay.dir -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 %D/etc/courier/filters/active -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 %D/etc/courier/shared -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 %D/etc/courier/shared.tmp -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 %D/etc/courier/smtpaccess -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 %D/etc/courier/webadmin/added -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 %D/etc/courier/webadmin/removed -@unexec %D/etc/rc.d/courier.sh stop 2>/dev/null || true +@unexec [ -x %D/sbin/pop3d-ssl ] && %D/sbin/pop3d-ssl stop || true +@unexec [ -x %D/sbin/pop3d ] && %D/sbin/pop3d stop || true +@unexec [ -x %D/sbin/imapd-ssl ] && %D/sbin/imapd-ssl stop || true +@unexec [ -x %D/sbin/imapd ] && %D/sbin/imapd stop || true +@unexec [ -x %D/sbin/esmtpd-ssl ] && %D/sbin/esmtpd-ssl stop || true +@unexec [ -x %D/sbin/esmtpd-msa ] && %D/sbin/esmtpd-msa stop || true +@unexec [ -x %D/sbin/esmtpd ] && %D/sbin/esmtpd stop || true +@unexec [ -x %D/sbin/courier ] && %D/sbin/courier stop || true +@unexec [ -x %D/sbin/webmaild ] && %D/sbin/webmaild stop || true +@unexec [ -x %D/sbin/courierldapaliasd ] && %D/sbin/courierldapaliasd stop || true +@unexec [ -x %D/sbin/courierfilter ] && %D/sbin/courierfilter stop || true +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/aliasdir +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/aliases +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/esmtpacceptmailfor.dir +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/esmtppercentrelay.dir +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/filters/active +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/shared +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/shared.tmp +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/smtpaccess +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin/added +@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin/removed @unexec rm -f %D/etc/courier/*.dat 2>/dev/null || true -@unexec cmp -s %D/etc/courier/authdaemonrc %D/etc/courier/authdaemonrc.dist && rm -f %D/etc/courier/authdaemonrc 2>/dev/null || true -%%SUB_LDAP%%@unexec cmp -s %D/etc/courier/authldaprc %D/etc/courier/authldaprc.dist && rm -f %D/etc/courier/authldaprc 2>/dev/null || true -%%SUB_MYSQL%%@unexec cmp -s %D/etc/courier/authmysqlrc %D/etc/courier/authmysqlrc.dist && rm -f %D/etc/courier/authmysqlrc 2>/dev/null || true -%%SUB_PGSQL%%@unexec cmp -s %D/etc/courier/authpgsqlrc %D/etc/courier/authpgsqlrc.dist && rm -f %D/etc/courier/authpgsqlrc 2>/dev/null || true @unexec cmp -s %D/etc/courier/courierd %D/etc/courier/courierd.dist && rm -f %D/etc/courier/courierd 2>/dev/null || true @unexec cmp -s %D/etc/courier/esmtpd-msa %D/etc/courier/esmtpd-msa.dist && rm -f %D/etc/courier/esmtpd-msa 2>/dev/null || true @unexec cmp -s %D/etc/courier/esmtpd-ssl %D/etc/courier/esmtpd-ssl.dist && rm -f %D/etc/courier/esmtpd-ssl 2>/dev/null || true @unexec cmp -s %D/etc/courier/esmtpd %D/etc/courier/esmtpd.dist && rm -f %D/etc/courier/esmtpd 2>/dev/null || true -%%SUB_FAX%%@unexec cmp -s %D/etc/courier/faxcoverpage.tr %D/etc/courier/faxcoverpage.tr.dist && rm -f %D/etc/courier/faxcoverpage.tr 2>/dev/null || true -%%SUB_FAX%%@unexec cmp -s %D/etc/courier/faxnotifyrc %D/etc/courier/faxnotifyrc.dist && rm -f %D/etc/courier/faxnotifyrc 2>/dev/null || true -%%SUB_FAX%%@unexec cmp -s %D/etc/courier/faxrc %D/etc/courier/faxrc.dist && rm -f %D/etc/courier/faxrc 2>/dev/null || true +%%WITHFAX%%@unexec cmp -s %D/etc/courier/faxcoverpage.tr %D/etc/courier/faxcoverpage.tr.dist && rm -f %D/etc/courier/faxcoverpage.tr 2>/dev/null || true +%%WITHFAX%%@unexec cmp -s %D/etc/courier/faxnotifyrc %D/etc/courier/faxnotifyrc.dist && rm -f %D/etc/courier/faxnotifyrc 2>/dev/null || true +%%WITHFAX%%@unexec cmp -s %D/etc/courier/faxrc %D/etc/courier/faxrc.dist && rm -f %D/etc/courier/faxrc 2>/dev/null || true @unexec cmp -s %D/etc/courier/imapd-ssl %D/etc/courier/imapd-ssl.dist && rm -f %D/etc/courier/imapd-ssl 2>/dev/null || true @unexec cmp -s %D/etc/courier/imapd %D/etc/courier/imapd.dist && rm -f %D/etc/courier/imapd 2>/dev/null || true @unexec cmp -s %D/etc/courier/ldapaddressbook %D/etc/courier/ldapaddressbook.dist && rm -f %D/etc/courier/ldapaddressbook 2>/dev/null || true -%%SUB_LDAP%%@unexec cmp -s %D/etc/courier/ldapaliasrc %D/etc/courier/ldapaliasrc.dist && rm -f %D/etc/courier/ldapaliasrc 2>/dev/null || true +%%WITHLDAP%%@unexec cmp -s %D/etc/courier/ldapaliasrc %D/etc/courier/ldapaliasrc.dist && rm -f %D/etc/courier/ldapaliasrc 2>/dev/null || true @unexec cmp -s %D/etc/courier/pop3d-ssl %D/etc/courier/pop3d-ssl.dist && rm -f %D/etc/courier/pop3d-ssl 2>/dev/null || true @unexec cmp -s %D/etc/courier/pop3d %D/etc/courier/pop3d.dist && rm -f %D/etc/courier/pop3d 2>/dev/null || true +@unexec cmp -s %D/etc/courier/sqwebmaild %D/etc/courier/sqwebmaild.dist && rm -f %D/etc/courier/sqwebmaild 2>/dev/null || true bin/addcr bin/cancelmsg bin/courier-config @@ -54,11 +59,6 @@ bin/rmail bin/sendmail bin/testmxlookup etc/courier/aliases/system -etc/courier/authdaemonrc.dist -%%SUB_LDAP%%etc/courier/authldaprc.dist -etc/courier/authmodulelist -%%SUB_MYSQL%%etc/courier/authmysqlrc.dist -%%SUB_PGSQL%%etc/courier/authpgsqlrc.dist etc/courier/courierd.dist etc/courier/crontab etc/courier/dsndelayed.txt @@ -76,23 +76,23 @@ etc/courier/esmtpd-msa.dist etc/courier/esmtpd-ssl.dist etc/courier/esmtpd.cnf etc/courier/esmtpd.dist -%%SUB_FAX%%etc/courier/faxcoverpage.tr.dist -%%SUB_FAX%%etc/courier/faxnotifyrc.dist -%%SUB_FAX%%etc/courier/faxrc.dist +%%WITHFAX%%etc/courier/faxcoverpage.tr.dist +%%WITHFAX%%etc/courier/faxnotifyrc.dist +%%WITHFAX%%etc/courier/faxrc.dist etc/courier/imapd-ssl.dist etc/courier/imapd.authpam etc/courier/imapd.cnf etc/courier/imapd.dist etc/courier/ldapaddressbook.dist -%%SUB_LDAP%%etc/courier/ldapaliasrc.dist +%%WITHLDAP%%etc/courier/ldapaliasrc.dist etc/courier/locallowercase etc/courier/maildrop etc/courier/maildropfilter etc/courier/module.dsn etc/courier/module.esmtp -%%SUB_FAX%%etc/courier/module.fax +%%WITHFAX%%etc/courier/module.fax etc/courier/module.local -%%SUB_UUCP%%etc/courier/module.uucp +%%WITHUUCP%%etc/courier/module.uucp etc/courier/pop3d-ssl.dist etc/courier/pop3d.authpam etc/courier/pop3d.cnf @@ -103,25 +103,23 @@ etc/courier/rfcerr2046.txt etc/courier/rfcerr2047.txt etc/courier/rfcerrheader.txt etc/courier/smtpaccess/default +etc/courier/sqwebmaild.dist etc/courier/webmail.authpam @exec [ -e /etc/aliases ] && ln -sf /etc/aliases %D/etc/courier/aliases/system -@exec [ -f %D/etc/courier/authdaemonrc.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/authdaemonrc.dist -%%SUB_LDAP%%@exec [ -f %D/etc/courier/authldaprc.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/authldaprc.dist -%%SUB_MYSQL%%@exec [ -f %D/etc/courier/authmysqlrc.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/authmysqlrc.dist -%%SUB_PGSQL%%@exec [ -f %D/etc/courier/authpgsqlrc.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/authpgsqlrc.dist -@exec [ -f %D/etc/courier/courierd.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/courierd.dist -@exec [ -f %D/etc/courier/esmtpd-msa.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/esmtpd-msa.dist -@exec [ -f %D/etc/courier/esmtpd-ssl.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/esmtpd-ssl.dist -@exec [ -f %D/etc/courier/esmtpd.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/esmtpd.dist -%%SUB_FAX%%@exec [ -f %D/etc/courier/faxcoverpage.tr.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/faxcoverpage.tr.dist -%%SUB_FAX%%@exec [ -f %D/etc/courier/faxnotifyrc.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/faxnotifyrc.dist -%%SUB_FAX%%@exec [ -f %D/etc/courier/faxrc.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/faxrc.dist -@exec [ -f %D/etc/courier/imapd-ssl.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/imapd-ssl.dist -@exec [ -f %D/etc/courier/imapd.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/imapd.dist -@exec [ -f %D/etc/courier/ldapaddressbook.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/ldapaddressbook.dist -%%SUB_LDAP%%@exec [ -f %D/etc/courier/ldapaliasrc.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/ldapaliasrc.dist -@exec [ -f %D/etc/courier/pop3d-ssl.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/pop3d-ssl.dist -@exec [ -f %D/etc/courier/pop3d.dist ] && %D/share/sysconftool/sysconftool %D/etc/courier/pop3d.dist +@exec [ -f %D/etc/courier/courierd.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/courierd.dist +@exec [ -f %D/etc/courier/esmtpd-msa.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/esmtpd-msa.dist +@exec [ -f %D/etc/courier/esmtpd-ssl.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/esmtpd-ssl.dist +@exec [ -f %D/etc/courier/esmtpd.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/esmtpd.dist +%%WITHFAX%%@exec [ -f %D/etc/courier/faxcoverpage.tr.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/faxcoverpage.tr.dist +%%WITHFAX%%@exec [ -f %D/etc/courier/faxnotifyrc.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/faxnotifyrc.dist +%%WITHFAX%%@exec [ -f %D/etc/courier/faxrc.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/faxrc.dist +@exec [ -f %D/etc/courier/imapd-ssl.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/imapd-ssl.dist +@exec [ -f %D/etc/courier/imapd.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/imapd.dist +@exec [ -f %D/etc/courier/ldapaddressbook.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/ldapaddressbook.dist +%%WITHLDAP%%@exec [ -f %D/etc/courier/ldapaliasrc.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/ldapaliasrc.dist +@exec [ -f %D/etc/courier/pop3d-ssl.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/pop3d-ssl.dist +@exec [ -f %D/etc/courier/pop3d.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/pop3d.dist +@exec [ -f %D/etc/courier/sqwebmaild.dist ] && %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/courier/sqwebmaild.dist @unexec rmdir %D/etc/courier/aliasdir 2>/dev/null || true @unexec rmdir %D/etc/courier/aliases 2>/dev/null || true @unexec rmdir %D/etc/courier/esmtpacceptmailfor.dir 2>/dev/null || true @@ -135,15 +133,6 @@ etc/courier/webmail.authpam @unexec rmdir %D/etc/courier/webadmin/removed 2>/dev/null || true @unexec rmdir %D/etc/courier/webadmin 2>/dev/null || true @unexec rmdir %D/etc/courier 2>/dev/null || true -etc/rc.d/courier.sh -libexec/authlib/authdaemon -libexec/authlib/authdaemond -%%SUB_LDAP%%libexec/authlib/authdaemond.ldap -%%SUB_MYSQL%%libexec/authlib/authdaemond.mysql -%%SUB_PGSQL%%libexec/authlib/authdaemond.pgsql -libexec/authlib/authdaemond.plain -%%SUB_EXPECT%%libexec/authlib/changepwd/authdaemon.passwd -libexec/authlib/changepwd/authsystem.passwd libexec/courier/aliascombine libexec/courier/aliascreate libexec/courier/aliasexp @@ -154,40 +143,34 @@ libexec/courier/imaplogin libexec/courier/makedatprog libexec/courier/modules/dsn/courierdsn libexec/courier/modules/esmtp/addcr -libexec/courier/modules/esmtp/authend -libexec/courier/modules/esmtp/authstart libexec/courier/modules/esmtp/courieresmtp libexec/courier/modules/esmtp/courieresmtpd -%%SUB_FAX%%libexec/courier/modules/fax/courierfax +%%WITHFAX%%libexec/courier/modules/fax/courierfax libexec/courier/modules/local/courierdeliver libexec/courier/modules/local/courierlocal -libexec/courier/modules/modules.ctl -%%SUB_UUCP%%libexec/courier/modules/uucp/courieruucp +%%WITHUUCP%%libexec/courier/modules/uucp/courieruucp libexec/courier/pcpd libexec/courier/sqwebmaild +libexec/courier/sqwebpasswd libexec/courier/submit libexec/courier/submitmkdir libexec/courier/webmail/webadmin libexec/courier/webmail/webmail libexec/filters/dupfilter libexec/filters/perlfilter -@dirrm libexec/authlib/changepwd -@dirrm libexec/authlib -%%SUB_UUCP%%@dirrm libexec/courier/modules/uucp +%%WITHUUCP%%@dirrm libexec/courier/modules/uucp @dirrm libexec/courier/modules/local -%%SUB_FAX%%@dirrm libexec/courier/modules/fax +%%WITHFAX%%@dirrm libexec/courier/modules/fax @dirrm libexec/courier/modules/esmtp @dirrm libexec/courier/modules/dsn @dirrm libexec/courier/modules @dirrm libexec/courier/webmail @dirrm libexec/courier @dirrm libexec/filters -sbin/authenumerate sbin/courier sbin/courieresmtpd sbin/courierfilter -%%SUB_LDAP%%sbin/courierldapaliasd -sbin/courierlogger +%%WITHLDAP%%sbin/courierldapaliasd sbin/couriertcpd sbin/esmtpd sbin/esmtpd-msa @@ -201,23 +184,18 @@ sbin/makehosteddomains sbin/makepercentrelay sbin/makesmtpaccess sbin/makesmtpaccess-msa -sbin/makeuserdb -%%SUB_UUCP%%sbin/makeuucpneighbors +%%WITHUUCP%%sbin/makeuucpneighbors sbin/mkesmtpdcert sbin/mkimapdcert sbin/mkpop3dcert sbin/pop3d sbin/pop3d-ssl -sbin/pw2userdb sbin/sharedindexinstall sbin/sharedindexsplit sbin/showconfig sbin/showmodules -sbin/userdb -sbin/userdbpw -sbin/vchkpw2userdb sbin/webgpg -share/courier/authsystem.passwd +sbin/webmaild share/courier/courierctl.start share/courier/couriermlm/adminrequest.tmpl share/courier/couriermlm/confsubj.tmpl @@ -273,6 +251,8 @@ 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 @@ -299,16 +279,16 @@ share/courier/courierwebadmin/webadmin.pm @dirrm share/courier/courierwebadmin share/courier/esmtpd share/courier/esmtpd-ssl -%%SUB_FAX%%share/courier/faxmail/application-pdf.filter -%%SUB_FAX%%share/courier/faxmail/application-postscript.filter -%%SUB_FAX%%share/courier/faxmail/coverpage -%%SUB_FAX%%share/courier/faxmail/image-gif.filter -%%SUB_FAX%%share/courier/faxmail/image-jpeg.filter -%%SUB_FAX%%share/courier/faxmail/image-png.filter -%%SUB_FAX%%share/courier/faxmail/init -%%SUB_FAX%%share/courier/faxmail/new_fax -%%SUB_FAX%%share/courier/faxmail/text-plain.filter -%%SUB_FAX%%@dirrm share/courier/faxmail +%%WITHFAX%%share/courier/faxmail/application-pdf.filter +%%WITHFAX%%share/courier/faxmail/application-postscript.filter +%%WITHFAX%%share/courier/faxmail/coverpage +%%WITHFAX%%share/courier/faxmail/image-gif.filter +%%WITHFAX%%share/courier/faxmail/image-jpeg.filter +%%WITHFAX%%share/courier/faxmail/image-png.filter +%%WITHFAX%%share/courier/faxmail/init +%%WITHFAX%%share/courier/faxmail/new_fax +%%WITHFAX%%share/courier/faxmail/text-plain.filter +%%WITHFAX%%@dirrm share/courier/faxmail share/courier/filterctl share/courier/imapd share/courier/imapd-ssl @@ -318,8 +298,7 @@ share/courier/makedat share/courier/makehosteddomains share/courier/makepercentrelay share/courier/makesmtpaccess -share/courier/makeuserdb -%%SUB_UUCP%%share/courier/makeuucpneighbors +%%WITHUUCP%%share/courier/makeuucpneighbors share/courier/mkesmtpdcert share/courier/mkimapdcert share/courier/mkpop3dcert @@ -327,7 +306,6 @@ share/courier/perlfilter-example.pl share/courier/perlfilter-wrapper.pl share/courier/pop3d share/courier/pop3d-ssl -share/courier/pw2userdb share/courier/rootcerts/052e396b.0 share/courier/rootcerts/0bb21872.0 share/courier/rootcerts/0c364b2d.0 @@ -612,41 +590,46 @@ share/courier/sqwebmail/ldapsearch share/courier/sqwebmail/sendit.sh share/courier/sqwebmail/webgpg @dirrm share/courier/sqwebmail -share/courier/userdb -share/courier/vchkpw2userdb @dirrm share/courier %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/BENCHMARKS +%%PORTDOCS%%%%DOCSDIR%%/BUGS.imap %%PORTDOCS%%%%DOCSDIR%%/BUGS.webmail -%%PORTDOCS%%%%DOCSDIR%%/BUGS.webmail.html -%%PORTDOCS%%%%DOCSDIR%%/FAQ.imap -%%PORTDOCS%%%%DOCSDIR%%/FAQ.imap.html +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/COPYING.GPL +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog.2001 %%PORTDOCS%%%%DOCSDIR%%/INSTALL %%PORTDOCS%%%%DOCSDIR%%/NEWS %%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/README.authmysql.html %%PORTDOCS%%%%DOCSDIR%%/README.couriertls -%%PORTDOCS%%%%DOCSDIR%%/README.gpglib.html %%PORTDOCS%%%%DOCSDIR%%/README.imap -%%PORTDOCS%%%%DOCSDIR%%/README.imap.html -%%PORTDOCS%%%%DOCSDIR%%/README.ldap -%%PORTDOCS%%%%DOCSDIR%%/README.maildirfilter.html -%%PORTDOCS%%%%DOCSDIR%%/README.maildirquota.html %%PORTDOCS%%%%DOCSDIR%%/README.maildirquota.txt -%%PORTDOCS%%%%DOCSDIR%%/README.maildrop.html -%%PORTDOCS%%%%DOCSDIR%%/README.pcp.html -%%PORTDOCS%%%%DOCSDIR%%/README.sharedfolders.html +%%PORTDOCS%%%%DOCSDIR%%/README.proxy %%PORTDOCS%%%%DOCSDIR%%/README.sharedfolders.txt %%PORTDOCS%%%%DOCSDIR%%/SECURITY.webmail -%%PORTDOCS%%%%DOCSDIR%%/SECURITY.webmail.html +%%PORTDOCS%%%%DOCSDIR%%/TODO +%%PORTDOCS%%%%DOCSDIR%%/html/BUGS.imap.html +%%PORTDOCS%%%%DOCSDIR%%/html/BUGS.webmail.html %%PORTDOCS%%%%DOCSDIR%%/html/FAQ.html +%%PORTDOCS%%%%DOCSDIR%%/html/NEWS.html +%%PORTDOCS%%%%DOCSDIR%%/html/README.gpglib.html +%%PORTDOCS%%%%DOCSDIR%%/html/README.imap.html +%%PORTDOCS%%%%DOCSDIR%%/html/README.maildirfilter.html +%%PORTDOCS%%%%DOCSDIR%%/html/README.maildirquota.html +%%PORTDOCS%%%%DOCSDIR%%/html/README.maildrop.html +%%PORTDOCS%%%%DOCSDIR%%/html/README.pcp.html +%%PORTDOCS%%%%DOCSDIR%%/html/README.proxy.html +%%PORTDOCS%%%%DOCSDIR%%/html/README.sharedfolders.html +%%PORTDOCS%%%%DOCSDIR%%/html/SECURITY.webmail.html %%PORTDOCS%%%%DOCSDIR%%/html/aliases.html -%%PORTDOCS%%%%DOCSDIR%%/html/authlib.html +%%PORTDOCS%%%%DOCSDIR%%/html/bg.gif %%PORTDOCS%%%%DOCSDIR%%/html/cancelmsg.html +%%PORTDOCS%%%%DOCSDIR%%/html/changelog.html %%PORTDOCS%%%%DOCSDIR%%/html/courier.html %%PORTDOCS%%%%DOCSDIR%%/html/courierd.html %%PORTDOCS%%%%DOCSDIR%%/html/courierdsn.html -%%SUB_FAX%%%%PORTDOCS%%%%DOCSDIR%%/html/courierfax.html +%%WITHFAX%%%%PORTDOCS%%%%DOCSDIR%%/html/courierfax.html %%PORTDOCS%%%%DOCSDIR%%/html/courierfilter.html %%PORTDOCS%%%%DOCSDIR%%/html/courierldapaliasd.html %%PORTDOCS%%%%DOCSDIR%%/html/couriermlm.html @@ -654,22 +637,28 @@ share/courier/vchkpw2userdb %%PORTDOCS%%%%DOCSDIR%%/html/courierpop3d.html %%PORTDOCS%%%%DOCSDIR%%/html/couriertcpd.html %%PORTDOCS%%%%DOCSDIR%%/html/couriertls.html -%%SUB_UUCP%%%%PORTDOCS%%%%DOCSDIR%%/html/courieruucp.html +%%WITHUUCP%%%%PORTDOCS%%%%DOCSDIR%%/html/courieruucp.html +%%PORTDOCS%%%%DOCSDIR%%/html/cvs.html %%PORTDOCS%%%%DOCSDIR%%/html/deliverquota.html +%%PORTDOCS%%%%DOCSDIR%%/html/documentation.html %%PORTDOCS%%%%DOCSDIR%%/html/dot-courier.html %%PORTDOCS%%%%DOCSDIR%%/html/dot-forward.html +%%PORTDOCS%%%%DOCSDIR%%/html/download.php %%PORTDOCS%%%%DOCSDIR%%/html/draft-varshavchik-exdata-smtpext.txt %%PORTDOCS%%%%DOCSDIR%%/html/draft-varshavchik-security-smtpext.txt %%PORTDOCS%%%%DOCSDIR%%/html/draft-varshavchik-verp-smtpext.txt %%PORTDOCS%%%%DOCSDIR%%/html/dupfilter.html %%PORTDOCS%%%%DOCSDIR%%/html/esmtp.html %%PORTDOCS%%%%DOCSDIR%%/html/esmtpd.html -%%PORTDOCS%%%%DOCSDIR%%/html/history.html +%%PORTDOCS%%%%DOCSDIR%%/html/footer.html +%%PORTDOCS%%%%DOCSDIR%%/html/frame.js +%%PORTDOCS%%%%DOCSDIR%%/html/header.html %%PORTDOCS%%%%DOCSDIR%%/html/icon.gif %%PORTDOCS%%%%DOCSDIR%%/html/imapd.html %%PORTDOCS%%%%DOCSDIR%%/html/index.html %%PORTDOCS%%%%DOCSDIR%%/html/install.html %%PORTDOCS%%%%DOCSDIR%%/html/intro.html +%%PORTDOCS%%%%DOCSDIR%%/html/japanese_flag.png %%PORTDOCS%%%%DOCSDIR%%/html/layout.html %%PORTDOCS%%%%DOCSDIR%%/html/links.html %%PORTDOCS%%%%DOCSDIR%%/html/local.html @@ -688,6 +677,7 @@ share/courier/vchkpw2userdb %%PORTDOCS%%%%DOCSDIR%%/html/maildropgdbm.html %%PORTDOCS%%%%DOCSDIR%%/html/maildroptips.html %%PORTDOCS%%%%DOCSDIR%%/html/mailq.html +%%PORTDOCS%%%%DOCSDIR%%/html/main.html %%PORTDOCS%%%%DOCSDIR%%/html/makeacceptmailfor.html %%PORTDOCS%%%%DOCSDIR%%/html/makealiases.html %%PORTDOCS%%%%DOCSDIR%%/html/makedat.html @@ -695,8 +685,8 @@ share/courier/vchkpw2userdb %%PORTDOCS%%%%DOCSDIR%%/html/makemime.html %%PORTDOCS%%%%DOCSDIR%%/html/makepercentrelay.html %%PORTDOCS%%%%DOCSDIR%%/html/makesmtpaccess.html -%%PORTDOCS%%%%DOCSDIR%%/html/makeuserdb.html %%PORTDOCS%%%%DOCSDIR%%/html/manpage.css +%%PORTDOCS%%%%DOCSDIR%%/html/menu.html %%PORTDOCS%%%%DOCSDIR%%/html/mimegpg.html %%PORTDOCS%%%%DOCSDIR%%/html/mkesmtpdcert.html %%PORTDOCS%%%%DOCSDIR%%/html/mkimapdcert.html @@ -708,13 +698,13 @@ share/courier/vchkpw2userdb %%PORTDOCS%%%%DOCSDIR%%/html/queue.html %%PORTDOCS%%%%DOCSDIR%%/html/reformail.html %%PORTDOCS%%%%DOCSDIR%%/html/reformime.html +%%PORTDOCS%%%%DOCSDIR%%/html/rpm.html %%PORTDOCS%%%%DOCSDIR%%/html/sendmail.html %%PORTDOCS%%%%DOCSDIR%%/html/status.html %%PORTDOCS%%%%DOCSDIR%%/html/structures.html +%%PORTDOCS%%%%DOCSDIR%%/html/style.css %%PORTDOCS%%%%DOCSDIR%%/html/submit.html %%PORTDOCS%%%%DOCSDIR%%/html/testmxlookup.html -%%PORTDOCS%%%%DOCSDIR%%/html/userdb.html -%%PORTDOCS%%%%DOCSDIR%%/html/userdbpw.html %%PORTDOCS%%@dirrm %%DOCSDIR%%/html %%PORTDOCS%%@dirrm %%DOCSDIR%% @exec chown %%MAILOWN%%:%%MAILGRP%% %D/bin/cancelmsg @@ -722,60 +712,17 @@ share/courier/vchkpw2userdb @exec chown %%BINOWN%%:%%MAILGRP%% %D/bin/mailq @exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier @exec chown -Rh %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/aliases -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/authdaemonrc.dist -%%SUB_LDAP%%@exec chown %%BINOWN%%:%%BINGRP%% %D/etc/courier/authldaprc.dist -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/authmodulelist -%%SUB_MYSQL%%@exec chown %%BINOWN%%:%%BINGRP%% %D/etc/courier/authmysqlrc.dist -%%SUB_PGSQL%%@exec chown %%BINOWN%%:%%BINGRP%% %D/etc/courier/authpgsqlrc.dist @exec chown %%BINOWN%%:%%BINGRP%% %D/etc/courier/courierd.dist -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/dsndelayed.txt -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/dsndelivered.txt -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/dsnfailed.txt -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/dsnfooter.txt -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/dsnheader.txt -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/dsnrelayed.txt -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/dsnsubjectnotice.txt -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/dsnsubjectwarn.txt +@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/*.txt @exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/esmtpauthclient -%%SUB_FAX%%@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/faxcoverpage.tr.dist -%%SUB_FAX%%@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/faxnotifyrc.dist -%%SUB_FAX%%@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/faxrc.dist -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/module.dsn -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/module.esmtp -%%SUB_FAX%%@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/module.fax -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/module.local -%%SUB_UUCP%%@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/module.uucp -@exec chown -Rh %%BINOWN%%:%%BINGRP%% %D/libexec/authlib +@exec chown %%MAILOWN%%:%%MAILGRP%% %D/etc/courier/module.* @exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/aliascombine @exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/aliascreate @exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/aliasexp @exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/courierd -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/modules/dsn/courierdsn -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/modules/esmtp/addcr -@exec chown %%BINOWN%%:%%BINGRP%% %D/libexec/courier/modules/esmtp/authend -@exec chown %%BINOWN%%:%%MAILGRP%% %D/libexec/courier/modules/esmtp/authstart -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/modules/esmtp/courieresmtp -@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/modules/esmtp/courieresmtpd -%%SUB_FAX%%@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/modules/fax/courierfax -%%SUB_UUCP%%@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/modules/uucp/courieruucp +@exec chown -Rh %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/modules/* @exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/submit @exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/submitmkdir @exec chown %%MAILOWN%%:%%MAILGRP%% %D/sbin/showmodules -@exec install -d -o %%BINOWN%% -g %%BINGRP%% -m 0755 /var/spool/calendar -@exec install -d -o %%CACHEOWN%% -g %%MAILGRP%% -m 0700 /var/spool/calendar/localcache -@exec install -d -o %%CACHEOWN%% -g %%MAILGRP%% -m 0750 /var/spool/calendar/private -@exec install -d -o %%CACHEOWN%% -g %%MAILGRP%% -m 0755 /var/spool/calendar/public -@exec install -d -o %%BINOWN%% -g %%BINGRP%% -m 0755 /var/spool/courier -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 /var/spool/courier/allfilters -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0770 /var/spool/courier/authdaemon -%%SUB_FAX%%@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 /var/spool/courier/faxtmp -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 /var/spool/courier/filters -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 /var/spool/courier/msgq -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 /var/spool/courier/msgs -@exec install -d -o %%MAILOWN%% -g %%MAILGRP%% -m 0770 /var/spool/courier/tmp -@exec install -c -o %%MAILOWN%% -g %%MAILGRP%% -m 0400 /dev/null /var/spool/courier/.noident -@exec install -d -o %%CACHEOWN%% -g mail -m 0700 /var/spool/webmail -@exec crontab -u %%CACHEOWN%% %D/etc/courier/crontab 2>/dev/null || true -@unexec echo y | crontab -u %%CACHEOWN%% -r || true -@unexec rm -rf /var/spool/calendar 2>/dev/null || true -@unexec rm -rf /var/spool/webmail 2>/dev/null || true +@unexec echo y | crontab -u %%CACHEOWN%% -r 2>/dev/null || true +@unexec rm -rf %%CALENDIR%% %%CACHEDIR%% 2>/dev/null || true diff --git a/mail/courier/scripts/c_rehash b/mail/courier/scripts/c_rehash index 0983a22846f8..e614fb546667 100644 --- a/mail/courier/scripts/c_rehash +++ b/mail/courier/scripts/c_rehash @@ -6,7 +6,7 @@ my $openssl; -my $dir = "/etc/ssl"; +my $dir = "/usr/local/ssl"; if(defined $ENV{OPENSSL}) { $openssl = $ENV{OPENSSL}; @@ -15,10 +15,12 @@ if(defined $ENV{OPENSSL}) { $ENV{OPENSSL} = $openssl; } -if(! -f $openssl) { +$ENV{PATH} .= ":$dir/bin"; + +if(! -x $openssl) { my $found = 0; foreach (split /:/, $ENV{PATH}) { - if(-f "$_/$openssl") { + if(-x "$_/$openssl") { $found = 1; last; } @@ -98,7 +100,8 @@ sub check_file { sub link_hash_cert { my $fname = $_[0]; - my ($hash, $fprint) = `$openssl x509 -hash -fingerprint -noout -in $fname`; + $fname =~ s/'/'\\''/g; + my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`; chomp $hash; chomp $fprint; $fprint =~ s/^.*=//; @@ -128,7 +131,8 @@ sub link_hash_cert { sub link_hash_crl { my $fname = $_[0]; - my ($hash, $fprint) = `$openssl crl -hash -fingerprint -noout -in $fname`; + $fname =~ s/'/'\\''/g; + my ($hash, $fprint) = `"$openssl" crl -hash -fingerprint -noout -in '$fname'`; chomp $hash; chomp $fprint; $fprint =~ s/^.*=//; |