diff --git a/mail/courier/Makefile b/mail/courier/Makefile index 95c855d8e014..1e41ddcfb362 100644 --- a/mail/courier/Makefile +++ b/mail/courier/Makefile @@ -1,395 +1,308 @@ PORTNAME= courier -PORTVERSION= 1.1.11 -PORTREVISION= 4 +PORTVERSION= 1.5.1 CATEGORIES= mail MASTER_SITES= SF MAINTAINER= bsd@dino.sk COMMENT= Courier SMTP IMAP POP3 HTTP mail server suite WWW= https://www.Courier-MTA.org/ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING.GPL BUILD_DEPENDS= courierauthconfig:security/courier-authlib-base \ + gpg2:security/gnupg \ wget:ftp/wget -LIB_DEPENDS= libidn.so:dns/libidn \ - libpcre.so:devel/pcre \ +LIB_DEPENDS= libcourier-unicode.so:devel/courier-unicode \ libgdbm.so:databases/gdbm \ - libcourier-unicode.so:devel/courier-unicode \ + libidn2.so:dns/libidn2 \ libpcre2-8.so:devel/pcre2 -RUN_DEPENDS= courierauthconfig:security/courier-authlib-base \ +RUN_DEPENDS= ${LOCALBASE}/etc/mime.types:misc/mime-support \ ${LOCALBASE}/share/sysconftool/sysconftool:devel/sysconftool \ - ${LOCALBASE}/etc/mime.types:misc/mime-support \ - p5-Net-CIDR>=0:net-mgmt/p5-Net-CIDR \ ca_root_nss>=3.*:security/ca_root_nss \ - ${LOCALBASE}/bin/wget:ftp/wget -CONFLICTS= courier-imap-2.* couriermlm-0.* \ - exim-4.* maildrop-1.* \ - panda-imap-201* postfix-1.* postfix-2.* \ - qmail-*-1.* qmail-1.* \ - sendmail-*-8.* sendmail-8.* \ - smail-3.* sqwebmail-3.* \ - zmailer-2.* + courierauthconfig:security/courier-authlib-base \ + p5-Net-CIDR>=0:net-mgmt/p5-Net-CIDR \ + wget:ftp/wget # # User-serviceable variables # # [ There's no need to add trailing ``/''s ] # # set IMAGEURL to where on the web server URL the images are found # set CACHEOWN to who you'd like to own the cache files # set MAILDROPDEFAULT to what you'd like the $DEFAULT in maildrop to be # recomended values are: /var/mail, ./Mailbox or ./Maildir # -IMAGEURL?= /webmail -CACHEOWN?= pop -MAILDROPDEFAULT?=./Maildir +IMAGEURL?= /webmail +CACHEOWN?= pop +MAILDROPDEFAULT?= ./Maildir # End of user-serviceable variables MAILOWN?= courier MAILGRP?= courier MAILUID?= 465 MAILGID?= 465 -ETCDIR= ${PREFIX}/etc SYSCONFDIR= ${ETCDIR}/courier LIBEXECDIR= ${PREFIX}/libexec LOCALSTATEDIR= /var/spool/courier CACHEDIR= /var/spool/webmail CALENDIR= /var/spool/calendar MIMETYPES= ${LOCALBASE}/etc/mime.types WITH_TRANSPORT= local esmtp dsn -USES= fam gettext gmake libtool perl5 pkgconfig tar:bzip2 ssl shebangfix -USE_SUBMAKE= yes +USES= fam gettext gmake libtool localbase perl5 pkgconfig shebangfix \ + ssl tar:bzip2 USE_RC_SUBR= courier +USE_SUBMAKE= yes SHEBANG_FILES= courier/filters/perlfilter/perlfilter-ratelimit.pl \ courier/filters/perlfilter/perlfilter-wrapper.pl GNU_CONFIGURE= yes -GNU_CONFIGURE_MANPREFIX=${PREFIX}/share -CONFIGURE_ARGS= --disable-root-check \ - --with-db=gdbm \ - --enable-syslog=1 --enable-use-flock \ - --program-transform-name=s,^,, \ - --enable-utf7-folder-encoding \ +GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share +CONFIGURE_ARGS= --datadir=${DATADIR} \ + --disable-root-check \ + --enable-imageurl=${IMAGEURL} \ + --enable-mimetypes=${MIMETYPES} \ + --enable-syslog=1 \ --enable-unicode \ - --with-mailuser=${MAILOWN} \ - --with-mailgroup=${MAILGRP} \ - --with-mailuid=${MAILUID} \ - --with-mailgid=${MAILGID} \ - --with-etcdir=${ETCDIR} \ - --sysconfdir=${SYSCONFDIR} \ - --datadir=${DATADIR} \ + --enable-use-flock \ + --enable-utf7-folder-encoding \ + --enable-workarounds-for-imap-client-bugs \ --libexecdir=${LIBEXECDIR} \ --localstatedir=${LOCALSTATEDIR} \ - --enable-mimetypes=${MIMETYPES} \ - --enable-imageurl=${IMAGEURL} \ + --program-transform-name=s,^,, \ + --sysconfdir=${SYSCONFDIR} \ --with-cachedir=${CACHEDIR} \ --with-cacheowner=${CACHEOWN} \ --with-calendardir=${CALENDIR} \ - --with-mydatadir=${SYSCONFDIR} \ - --with-transport='${WITH_TRANSPORT}' \ + --with-db=gdbm \ --with-default-maildrop=${MAILDROPDEFAULT} \ + --with-etcdir=${ETCDIR} \ + --with-mailgid=${MAILGID} \ + --with-mailgroup=${MAILGRP} \ + --with-mailuid=${MAILUID} \ + --with-mailuser=${MAILOWN} \ + --with-mydatadir=${SYSCONFDIR} \ + --with-notice=unicode \ --with-paranoid-smtpext \ - --enable-workarounds-for-imap-client-bugs \ - --with-notice=unicode - -CPPFLAGS+= -I${LOCALBASE}/include -LIBS+= -L${LOCALBASE}/lib - + --with-transport='${WITH_TRANSPORT}' INSTALL_TARGET= install-strip install-perms -PLIST_SUB+= BINOWN="${BINOWN}" BINGRP="${BINGRP}" \ - CACHEOWN="${CACHEOWN}" CACHEDIR="${CACHEDIR}" \ - CALENDIR="${CALENDIR}" LOCALSTATEDIR="${LOCALSTATEDIR}" \ - MAILOWN="${MAILOWN}" MAILGRP="${MAILGRP}" \ - MAILUID="${MAILUID}" MAILGID="${MAILGID}" \ - SHAREOWN="${SHAREOWN}" SHAREGRP="${SHAREGRP}" +CONFLICTS= courier-imap-2.* couriermlm-0.* exim-4.* maildrop-1.* \ + panda-imap-201* postfix-1.* postfix-2.* qmail-*-1.* qmail-1.* \ + sendmail-*-8.* sendmail-8.* smail-3.* sqwebmail-3.* zmailer-2.* +ETCDIR= ${PREFIX}/etc +SUB_FILES+= crontab pkg-message sharedindexupdate SUB_LIST:= ${PLIST_SUB} -SUB_FILES+= pkg-message crontab sharedindexupdate -OPTIONS_DEFINE= LDAP PROCMAIL SENDFAX UUCP IPV6 DOCS CERTSDIR -OPTIONS_GROUP= WEBMAIL -OPTIONS_GROUP_WEBMAIL= GNUPG WEBMAILRSENT WEBMAILFLAGS WEBMAILXFACE -OPTIONS_RADIO= ALIASES SPELL -OPTIONS_RADIO_ALIASES= SYSTEMALIASES EMPTYALIASES +PLIST_SUB+= BINGRP="${BINGRP}" \ + BINOWN="${BINOWN}" \ + CACHEDIR="${CACHEDIR}" \ + CACHEOWN="${CACHEOWN}" \ + CALENDIR="${CALENDIR}" \ + LOCALSTATEDIR="${LOCALSTATEDIR}" \ + MAILGID="${MAILGID}" \ + MAILGRP="${MAILGRP}" \ + MAILOWN="${MAILOWN}" \ + MAILUID="${MAILUID}" \ + SHAREGRP="${SHAREGRP}" \ + SHAREOWN="${SHAREOWN}" + +OPTIONS_DEFINE= CERTSDIR DOCS IPV6 LDAP MAILCONF PROCMAIL SENDFAX UUCP +OPTIONS_DEFAULT= SYSTEMALIASES WEBMAILRSENT +OPTIONS_GROUP= WEBMAIL +OPTIONS_GROUP_WEBMAIL= GNUPG WEBMAILFLAGS WEBMAILRSENT WEBMAILXFACE +OPTIONS_RADIO= ALIASES SPELL +OPTIONS_RADIO_ALIASES= EMPTYALIASES SYSTEMALIASES OPTIONS_RADIO_SPELL= ASPELL ISPELL -OPTIONS_DEFAULT=WEBMAILRSENT SYSTEMALIASES - -LDAP_DESC= LDAP-based mail aliasing support -GNUPG_DESC= GNU Privacy Guard support for WebMail -ASPELL_DESC= ASpell support for WebMail -ISPELL_DESC= ISpell support for WebMail -PROCMAIL_DESC= Procmail local delivery support -SENDFAX_DESC= mgetty+sendfax support -UUCP_DESC= UUCP support -CERTSDIR_DESC= separate .pem directory for certificates -WEBMAILRSENT_DESC= enable Autorename Sent folder +OPTIONS_SUB= yes + +ASPELL_DESC= ASpell support for WebMail +ISPELL_DESC= ISpell support for WebMail +CERTSDIR_DESC= separate .pem directory for certificates +EMPTYALIASES_DESC= create empty aliases file +GNUPG_DESC= GNU Privacy Guard support for WebMail +LDAP_DESC= LDAP-based mail aliasing support +MAILCONF_DESC= modify mailer.conf to use courier instead of sendmail +PROCMAIL_DESC= Procmail local delivery support +SENDFAX_DESC= mgetty+sendfax support +SYSTEMALIASES_DESC= symlink system /etc/aliases +UUCP_DESC= UUCP support WEBMAILFLAGS_DESC= webmail show flags patch +WEBMAILRSENT_DESC= enable Autorename Sent folder WEBMAILXFACE_DESC= experimental webmail X-Face patch -SYSTEMALIASES_DESC= symlink system /etc/aliases -EMPTYALIASES_DESC= create empty aliases file -RCCONF_DESC= modify rc.conf to enable courier/disable sendmail -MAILCONF_DESC= modify mailer.conf to use courier instead of sendmail -PERIODIC_DESC= modify/create periodic.conf -.include +ASPELL_BUILD_DEPENDS= aspell:textproc/aspell +ASPELL_RUN_DEPENDS= aspell:textproc/aspell +ASPELL_CONFIGURE_ON= --with-ispell=${LOCALBASE}/bin/aspell -.include "${.CURDIR}/Makefile.doc" +ISPELL_BUILD_DEPENDS= ispell:textproc/aspell-ispell +ISPELL_RUN_DEPENDS= ispell:textproc/aspell-ispell +ISPELL_CONFIGURE_ON= --with-ispell=${LOCALBASE}/bin/ispell -.if ${PORT_OPTIONS:MLDAP} -USES+= ldap -WITH_AUTH_LDAP= yes -RUN_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthldap.so:net/courier-authlib-ldap -CONFIGURE_ARGS+=--with-ldapaliasd -PLIST_SUB+= WITHLDAP="" -SUB_LIST+= WITHLDAP="" -.else -CONFIGURE_ARGS+=--without-ldapaliasd -PLIST_SUB+= WITHLDAP="@comment " -SUB_LIST+= WITHLDAP="@comment " -.endif +CERTSDIR_CONFIGURE_ON= --with-certsdir=${SYSCONFDIR}/.pem +CERTSDIR_CONFIGURE_OFF= --with-certsdir=${SYSCONFDIR} +CERTSDIR_SUB_LIST= CERTSDIRPATH="${SYSCONFDIR}/.pem" +CERTSDIR_SUB_LIST_OFF= CERTSDIRPATH="${SYSCONFDIR}" -.if ${PORT_OPTIONS:MSYSTEMALIASES} -PLIST_SUB+= WITHSYSTEMALIASES="" -SUB_LIST+= WITHSYSTEMALIASES="" -.else -PLIST_SUB+= WITHSYSTEMALIASES="@comment " -SUB_LIST+= WITHSYSTEMALIASES="@comment " -.endif +GNUPG_RUN_DEPENDS= gpg2:security/gnupg +GNUPG_CONFIGURE_ENV= GPG="${LOCALBASE}/bin/gpg2" -.if ${PORT_OPTIONS:MEMPTYALIASES} -PLIST_SUB+= WITHEMPTYALIASES="" -SUB_LIST+= WITHEMPTYALIASES="" -.else -PLIST_SUB+= WITHEMPTYALIASES="@comment " -SUB_LIST+= WITHEMPTYALIASES="@comment " -.endif +IPV6_CONFIGURE_WITH= ipv6 -.if exists(${.CURDIR}/../../security/courier-authlib/Makefile.dep) -.include "${.CURDIR}/../../security/courier-authlib/Makefile.dep" -.endif +LDAP_RUN_DEPENDS= ${LOCALBASE}/lib/courier-authlib/libauthldap.so:net/courier-authlib-ldap +LDAP_USES= ldap +LDAP_CONFIGURE_WITH= ldapaliasd -.if ${PORT_OPTIONS:MGNUPG} -BUILD_DEPENDS+= gpg:security/gnupg -RUN_DEPENDS+= gpg:security/gnupg -.else -# This is a hack! But works well (at least partially) for me... -CONFIGURE_ENV+= GPG="${WRKSRC}/fakegpg" -.endif +MAILCONF_SUB_LIST= MAILCONFACT="y" +MAILCONF_SUB_LIST_OFF= MAILCONFACT="n" -.if ${PORT_OPTIONS:MASPELL} -BUILD_DEPENDS+= aspell:textproc/aspell -RUN_DEPENDS+= aspell:textproc/aspell -CONFIGURE_ARGS+=--with-ispell=${LOCALBASE}/bin/aspell -.elif ${PORT_OPTIONS:MISPELL} -BUILD_DEPENDS+= ispell:textproc/aspell-ispell -RUN_DEPENDS+= ispell:textproc/aspell-ispell -CONFIGURE_ARGS+=--with-ispell=${LOCALBASE}/bin/ispell -.else -CONFIGURE_ARGS+=--without-ispell -.endif +PROCMAIL_BUILD_DEPENDS= procmail:mail/procmail +PROCMAIL_RUN_DEPENDS= procmail:mail/procmail -.if ${PORT_OPTIONS:MPROCMAIL} -BUILD_DEPENDS+= procmail:mail/procmail -RUN_DEPENDS+= procmail:mail/procmail -.endif +SENDFAX_BUILD_DEPENDS= pnmscale:graphics/netpbm \ + sendfax:comms/mgetty+sendfax +SENDFAX_RUN_DEPENDS= pnmscale:graphics/netpbm \ + sendfax:comms/mgetty+sendfax +SENDFAX_USES= ghostscript +SENDFAX_VARS= WITH_TRANSPORT+=fax -.if ${PORT_OPTIONS:MSENDFAX} -USES+= ghostscript -SENDFAX_DEPENDS=sendfax:comms/mgetty+sendfax \ - pnmscale:graphics/netpbm -BUILD_DEPENDS+= ${SENDFAX_DEPENDS} -RUN_DEPENDS+= ${SENDFAX_DEPENDS} -WITH_TRANSPORT+=fax -PLIST_SUB+= WITHFAX="" -SUB_LIST+= WITHFAX="" -.else -PLIST_SUB+= WITHFAX="@comment " -SUB_LIST+= WITHFAX="@comment " -.endif +UUCP_BUILD_DEPENDS= uux:net/freebsd-uucp +UUCP_RUN_DEPENDS= uux:net/freebsd-uucp +UUCP_VARS= WITH_TRANSPORT+=uucp -.if ${PORT_OPTIONS:MUUCP} -.if !exists(/usr/bin/uux) -BUILD_DEPENDS+= uux:net/freebsd-uucp -RUN_DEPENDS+= uux:net/freebsd-uucp -.endif -WITH_TRANSPORT+=uucp -PLIST_SUB+= WITHUUCP="" -.else -PLIST_SUB+= WITHUUCP="@comment " -.endif +WEBMAILFLAGS_EXTRA_PATCHES= ${FILESDIR}/extra-patch-libs__sqwebmail__folder.c \ + ${FILESDIR}/extra-patch-libs__sqwebmail__maildir.c \ + ${FILESDIR}/extra-patch-libs__sqwebmail__maildir.h \ + ${FILESDIR}/extra-patch-libs__sqwebmail__images__sqwebmail.css -.if ${PORT_OPTIONS:MIPV6} -CONFIGURE_ARGS+=--with-ipv6 -.else -CONFIGURE_ARGS+=--without-ipv6 -.endif +WEBMAILRSENT_CONFIGURE_ENABLE= autorenamesent -.if ${PORT_OPTIONS:MWEBMAILXFACE} -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libs__sqwebmail__msg2html.c -.endif +WEBMAILXFACE_EXTRA_PATCHES= ${FILESDIR}/extra-patch-libs__sqwebmail__msg2html.c -.if ${PORT_OPTIONS:MWEBMAILFLAGS} -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libs__sqwebmail__folder.c ${FILESDIR}/extra-patch-libs__sqwebmail__maildir.c -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libs__sqwebmail__maildir.h ${FILESDIR}/extra-patch-libs__sqwebmail__images__sqwebmail.css -.endif - -.if ${PORT_OPTIONS:MWEBMAILRSENT} -CONFIGURE_ARGS+=--enable-autorenamesent -.else -CONFIGURE_ARGS+=--disable-autorenamesent -.endif - -.if ${PORT_OPTIONS:MMAILCONF} -SUB_LIST+= MAILCONF="y" -.else -SUB_LIST+= MAILCONF="n" -.endif +.include -.if ${PORT_OPTIONS:MRCCONF} -SUB_LIST+= RCCONF="y" -.else -SUB_LIST+= RCCONF="n" +.if !${PORT_OPTIONS:MASPELL} && !${PORT_OPTIONS:MISPELL} +CONFIGURE_ARGS+= --without-ispell .endif -.if ${PORT_OPTIONS:MPERIODIC} -SUB_LIST+= PERIODIC="y" -.else -SUB_LIST+= PERIODIC="n" -.endif +.include "${.CURDIR}/Makefile.doc" -.if ${PORT_OPTIONS:MCERTSDIR} -CONFIGURE_ARGS+=--with-certsdir=${SYSCONFDIR}/.pem -PLIST_SUB+= WITHCERTSDIR="" -SUB_LIST+= CERTSDIR="${SYSCONFDIR}/.pem" -.else -CONFIGURE_ARGS+=--with-certsdir=${SYSCONFDIR} -PLIST_SUB+= WITHCERTSDIR="@comment " -SUB_LIST+= CERTSDIR="${SYSCONFDIR}" +.if exists(${.CURDIR}/../../security/courier-authlib/Makefile.dep) +.include "${.CURDIR}/../../security/courier-authlib/Makefile.dep" .endif _CNFFILES= esmtpd.cnf \ imapd.cnf \ pop3d.cnf _DISTEXFILES= courierd.dist \ esmtpd-msa.dist \ esmtpd-ssl.dist \ esmtpd.dist \ faxcoverpage.tr.dist \ faxnotifyrc.dist \ faxrc.dist \ imapd-ssl.dist \ imapd.dist \ ldapaddressbook.dist \ ldapaliasrc.dist \ pop3d-ssl.dist \ pop3d.dist \ sqwebmaild.dist \ webmlmrc.dist -pre-everything:: - @${ECHO_MSG} "===> --------------------------------------------------------" - @${ECHO_MSG} "===> Run 'make config' to (re)configure ${PKGNAME}" - @${ECHO_MSG} "===> --------------------------------------------------------" - pre-patch: ${CP} ${TEMPLATES}/config.guess ${TEMPLATES}/config.sub ${WRKSRC} post-patch: ${REINPLACE_CMD} -i '' -e 's|#! perl|#!${PERL}|g' \ ${WRKSRC}/webadmin/*.pl \ ${WRKSRC}/webadmin/*.pl.in \ ${WRKSRC}/courier/webadmin/*.pl \ ${WRKSRC}/courier/webadmin/*.pl.in ${REINPLACE_CMD} -e 's|^PROG=\./|PROG=exec ./|g' \ ${WRKSRC}/courier/module.*/courier.config ${REINPLACE_CMD} -e 's|@mydatadir@|@sysconfdir@|g' \ ${WRKSRC}/*/*/mk*cert.* ${REINPLACE_CMD} -e 's|^\(TLS_CERTFILE=\)@mydatadir@|\1@sysconfdir@|g' \ ${WRKSRC}/*/*.dist.in \ ${WRKSRC}/*/*/*.dist.in ${REINPLACE_CMD} -e 's|^\(TLS_DHPARAMS=\)@mydatadir@|\1@sysconfdir@|g' \ ${WRKSRC}/*/*.dist.in \ ${WRKSRC}/*/*/*.dist.in ${REINPLACE_CMD} -e 's|^\(RANDFILE[[:space:]]*=[[:space:]]*\)@mydatadir@|\1@sysconfdir@|g' \ ${WRKSRC}/*/*/*.cnf.openssl.in ${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 ${REINPLACE_CMD} '/^courieresmtp_LDADD =/s/$$/ -lcourierauth/' \ ${WRKSRC}/courier/module.esmtp/Makefile.in # Avoid conflict with C++20 by adding .txt suffix ${REINPLACE_CMD} -i .c++20 's/>version$$/&.txt/' ${WRKSRC}/configure ${FIND} ${WRKSRC} -name configure -exec ${REINPLACE_CMD} \ -i .c++20 '/^version.*cat/s,/version,&.txt,' {} + -pre-configure: -# This is a hack! But works well (at least partially) for me... - touch ${WRKSRC}/fakegpg - chmod +x ${WRKSRC}/fakegpg - 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;' \ ${WRKSRC}/*/*.authpam* \ ${WRKSRC}/*/*/*.authpam* ${INSTALL} -lrs ${WRKSRC}/libs/gpglib/README.html ${WRKSRC}/libs/gpglib/README.gpglib.html ${INSTALL} -lrs ${WRKSRC}/libs/imap/BUGS ${WRKSRC}/libs/imap/BUGS.imap ${INSTALL} -lrs ${WRKSRC}/libs/imap/BUGS.html ${WRKSRC}/libs/imap/BUGS.imap.html ${INSTALL} -lrs ${WRKSRC}/libs/imap/README.proxy ${WRKSRC}/libs/imap/README.imap.proxy ${INSTALL} -lrs ${WRKSRC}/libs/imap/README.proxy.html ${WRKSRC}/libs/imap/README.imap.proxy.html ${INSTALL} -lrs ${WRKSRC}/libs/maildrop/README.html ${WRKSRC}/libs/maildrop/README.maildrop.html ${INSTALL} -lrs ${WRKSRC}/libs/pcp/README.html ${WRKSRC}/libs/pcp/README.pcp.html ${INSTALL} -lrs ${WRKSRC}/libs/sqwebmail/BUGS ${WRKSRC}/libs/sqwebmail/BUGS.sqwebmail ${INSTALL} -lrs ${WRKSRC}/libs/sqwebmail/BUGS.html ${WRKSRC}/libs/sqwebmail/BUGS.sqwebmail.html ${INSTALL} -lrs ${WRKSRC}/libs/sqwebmail/SECURITY ${WRKSRC}/libs/sqwebmail/SECURITY.sqwebmail ${INSTALL} -lrs ${WRKSRC}/libs/sqwebmail/SECURITY.html ${WRKSRC}/libs/sqwebmail/SECURITY.sqwebmail.html post-install: .for _cfgfile in ${_CNFFILES} -${MV} ${STAGEDIR}${SYSCONFDIR}/${_cfgfile} ${STAGEDIR}${SYSCONFDIR}/${_cfgfile:S/.cnf/.cnf.sample/g} .endfor .for _cfgfile in ${_DISTEXFILES} -${MV} ${STAGEDIR}${SYSCONFDIR}/${_cfgfile} ${STAGEDIR}${SYSCONFDIR}/${_cfgfile:S/.dist/.sample/g} .endfor ${INSTALL} -lrs ${STAGEDIR}${SYSCONFDIR}/maildrop ${STAGEDIR}${SYSCONFDIR}/maildropfilter ${INSTALL_DATA} /dev/null ${STAGEDIR}${SYSCONFDIR}/locallowercase ${INSTALL_DATA} ${WRKDIR}/crontab ${STAGEDIR}${SYSCONFDIR}/ ${INSTALL_SCRIPT} ${WRKDIR}/sharedindexupdate ${STAGEDIR}${DATADIR}/ .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} ${MKDIR} ${STAGEDIR}${DOCSDIR}/html .for f in ${DOCS} ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} .endfor .for f in ${HTMLDOCS} ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/html .endfor ${INSTALL_DATA} ${STAGEDIR}${DATADIR}/htmldoc/* ${STAGEDIR}${DOCSDIR}/html -.endif -.if ${PORT_OPTIONS:MCERTSDIR} - ${MKDIR} ${STAGEDIR}${SYSCONFDIR}/.pem .endif ${RM} -r ${STAGEDIR}${DATADIR}/htmldoc ${CHMOD} -R a+r ${STAGEDIR}${DATADIR}/courierwebadmin ${CHMOD} -R a-w ${STAGEDIR}${DATADIR} ${STAGEDIR}${LIBEXECDIR}/courier ${CHMOD} 550 ${STAGEDIR}${LIBEXECDIR}/courier/modules/esmtp/courieresmtp* +post-install-CERTSDIR-on: + ${MKDIR} ${STAGEDIR}${SYSCONFDIR}/.pem + .include diff --git a/mail/courier/distinfo b/mail/courier/distinfo index af6d59963b10..68fe9c312e25 100644 --- a/mail/courier/distinfo +++ b/mail/courier/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1686226592 -SHA256 (courier-1.1.11.tar.bz2) = 4fe3b73e7da159351ab973b52044996aa0006076f2effdcc4c004be087c5f777 -SIZE (courier-1.1.11.tar.bz2) = 7895772 +TIMESTAMP = 1761292733 +SHA256 (courier-1.5.1.tar.bz2) = 521d1dcbb5038ff635d8e264eee2c45d4638b05a8551c3107d47b227df41a162 +SIZE (courier-1.5.1.tar.bz2) = 8470196 diff --git a/mail/courier/files/courier.in b/mail/courier/files/courier.in index 45a3e5a54bf5..4de6995efeba 100644 --- a/mail/courier/files/courier.in +++ b/mail/courier/files/courier.in @@ -1,341 +1,341 @@ #!/bin/sh # # Adapted for FreeBSD from courier.sysvinit # # NOTE: The 'restart' here does a "hard" stop, and a start. Be gentle, use # "courierd restart" for a kindler, gentler, restart. # # PROVIDE: mail # REQUIRE: LOGIN courier_authdaemond # BEFORE: securelevel # KEYWORD: shutdown prefix="%%PREFIX%%" exec_prefix="${prefix}" sysconfdir="${prefix}/etc/courier" -certsdir="%%CERTSDIR%%" +certsdir="%%CERTSDIRPATH%%" sbindir="${exec_prefix}/sbin" bindir="${exec_prefix}/bin" libexecdir="${prefix}/libexec" datadir="${prefix}/share/courier" # Define these courier_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/courier # # DO NOT CHANGE THESE DEFAULT VALUES HERE # courier_enable=${courier_enable:-"NO"} # Run Courier-MTA (YES/NO). . /etc/rc.subr name="courier" rcvar=courier_enable 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 fi esmtpdcert=0 ESMTPDSTART="" if [ -f ${sysconfdir}/esmtpd ]; then . ${sysconfdir}/esmtpd case "$ESMTPDSTART" in [Yy]*) esmtpdcert=1 ;; esac if [ ! -f ${sysconfdir}/esmtpacceptmailfor.dat \ -a -x ${sbindir}/makeacceptmailfor ]; then ${sbindir}/makeacceptmailfor fi if [ ! -f ${sysconfdir}/${ACCESSFILE}.dat \ -a -x ${sbindir}/makesmtpaccess ]; then ${sbindir}/makesmtpaccess fi fi ESMTPDSTART="" if [ -f ${sysconfdir}/esmtpd-msa ]; then . ${sysconfdir}/esmtpd-msa case "$ESMTPDSTART" in [Yy]*) esmtpdcert=1 ;; esac if [ ! -f ${sysconfdir}/${ACCESSFILE}.dat \ -a -x ${sbindir}/makesmtpaccess-msa ]; then ${sbindir}/makesmtpaccess-msa fi fi if [ -x ${sbindir}/courierfilter ]; then echo -n " courierfilter" ${sbindir}/courierfilter start fi if [ -x ${sbindir}/courierldapaliasd ]; then echo -n " courierldapaliasd" ${sbindir}/courierldapaliasd start fi if [ -x ${libexecdir}/courier/sqwebmaild \ -a -x ${sbindir}/webmaild ]; then echo -n " webmail" ${sbindir}/webmaild start fi if [ -x ${sbindir}/courier ]; then echo -n " courierd" ${sbindir}/courier start fi if [ "$esmtpdcert" = 1 ]; then # If we do not have a certificate, make one up. if [ ! -f ${certsdir}/esmtpd.pem \ -a -x "$COURIERTLS" \ -a -x ${sbindir}/mkesmtpdcert ]; then echo -n " generating-ESMTP-SSL-certificate..." ${sbindir}/mkesmtpdcert >/dev/null 2>&1 fi fi ESMTPDSTART="" if [ -f ${sysconfdir}/esmtpd ]; then . ${sysconfdir}/esmtpd case "$ESMTPDSTART" in [Yy]*) if [ -x ${sbindir}/esmtpd ]; then echo -n " esmtpd" ${sbindir}/esmtpd start fi ;; esac fi ESMTPDSTART="" if [ -f ${sysconfdir}/esmtpd-msa ]; then . ${sysconfdir}/esmtpd-msa case "$ESMTPDSTART" in [Yy]*) if [ -x ${sbindir}/esmtpd-msa ]; then echo -n " esmtpd-msa" ${sbindir}/esmtpd-msa start fi ;; esac fi ESMTPDSSLSTART="" if [ -f ${sysconfdir}/esmtpd-ssl ]; then . ${sysconfdir}/esmtpd-ssl case "$ESMTPDSSLSTART" in [Yy]*) if [ -x "$COURIERTLS" \ -a -x ${sbindir}/esmtpd-ssl ]; then echo -n " esmtpd-ssl" ${sbindir}/esmtpd-ssl start fi ;; esac fi IMAPDSTART="" if [ -f ${sysconfdir}/imapd ]; then . ${sysconfdir}/imapd case "$IMAPDSTART" in [Yy]*) if [ -x ${sbindir}/imapd ]; then echo -n " imapd" ${sbindir}/imapd start fi ;; esac fi IMAPDSSLSTART="" if [ -f ${sysconfdir}/imapd-ssl ]; then . ${sysconfdir}/imapd-ssl case "$IMAPDSSLSTART" in [Yy]*) # If we do not have a certificate, make one up. if [ -x "$COURIERTLS" ]; then if [ ! -f ${certsdir}/imapd.pem \ -a -x ${sbindir}/mkimapdcert ]; then echo -n " generating-IMAP-SSL-certificate..." ${sbindir}/mkimapdcert >/dev/null 2>&1 # double usage - DH params need to exist esmtpdcert=1 fi if [ -x ${sbindir}/imapd-ssl ]; then echo -n " imapd-ssl" ${sbindir}/imapd-ssl start fi fi ;; esac fi POP3DSTART="" if [ -f ${sysconfdir}/pop3d ]; then . ${sysconfdir}/pop3d case "$POP3DSTART" in [Yy]*) if [ -x ${sbindir}/pop3d ]; then echo -n " pop3d" ${sbindir}/pop3d start fi ;; esac fi POP3DSSLSTART="" if [ -f ${sysconfdir}/pop3d-ssl ]; then . ${sysconfdir}/pop3d-ssl case "$POP3DSSLSTART" in [Yy]*) # If we do not have a certificate, make one up. if [ -x "$COURIERTLS" ]; then if [ ! -f ${certsdir}/pop3d.pem \ -a -x ${sbindir}/mkpop3dcert ]; then echo -n " generating-POP3-SSL-certificate..." ${sbindir}/mkpop3dcert >/dev/null 2>&1 # double usage - DH params need to exist esmtpdcert=1 fi if [ -x ${sbindir}/pop3d-ssl ]; then echo -n " pop3d-ssl" ${sbindir}/pop3d-ssl start fi fi ;; esac fi if [ "$esmtpdcert" = 1 ]; then # If we do not have DH params, make them up. if [ ! -f ${certsdir}/dhparams.pem \ -a -x ${sbindir}/mkdhparams ]; then echo -n " generating-DH-params..." ${sbindir}/mkdhparams >/dev/null 2>&1 fi fi LISTS="" if [ -f ${sysconfdir}/webmlmrc ]; then . ${sysconfdir}/webmlmrc if [ -n "$LISTS" \ -a -x ${bindir}/webmlmd \ -a -x ${bindir}/webmlmd.rc ]; then echo -n " webmlmd" ${bindir}/webmlmd.rc start ${sysconfdir}/webmlmrc fi fi echo "." } courier_stop() { # kill courier services in the reverse order of starting them echo -n "Stopping" if [ -x ${bindir}/webmlmd \ -a -x ${bindir}/webmlmd.rc ]; then echo -n " webmlmd" ${bindir}/webmlmd.rc stop ${sysconfdir}/webmlmrc fi if [ -x ${sbindir}/pop3d-ssl ]; then echo -n " pop3d-ssl" ${sbindir}/pop3d-ssl stop fi if [ -x ${sbindir}/pop3d ]; then echo -n " pop3d" ${sbindir}/pop3d stop fi if [ -x ${sbindir}/imapd-ssl ]; then echo -n " imapd-ssl" ${sbindir}/imapd-ssl stop fi if [ -x ${sbindir}/imapd ]; then echo -n " imapd" ${sbindir}/imapd stop fi if [ -x ${sbindir}/esmtpd-ssl ]; then echo -n " esmtpd-ssl" ${sbindir}/esmtpd-ssl stop fi if [ -x ${sbindir}/esmtpd-msa ]; then echo -n " esmtpd-msa" ${sbindir}/esmtpd-msa stop fi if [ -x ${sbindir}/esmtpd ]; then echo -n " esmtpd" ${sbindir}/esmtpd stop fi if [ -x ${sbindir}/courier ]; then echo -n " courierd" ${sbindir}/courier stop fi if [ -x ${sbindir}/webmaild ]; then echo -n " webmail" ${sbindir}/webmaild stop fi if [ -x ${sbindir}/courierldapaliasd ]; then echo -n " courierldapaliasd" ${sbindir}/courierldapaliasd stop fi if [ -x ${sbindir}/courierfilter ]; then echo -n " courierfilter" ${sbindir}/courierfilter stop fi echo y | /usr/bin/crontab -u %%CACHEOWN%% -r || true echo "." } load_rc_config $name run_rc_command "$1" diff --git a/mail/courier/files/extra-patch-webmail__folder.c b/mail/courier/files/extra-patch-libs__sqwebmail__folder.c similarity index 79% rename from mail/courier/files/extra-patch-webmail__folder.c rename to mail/courier/files/extra-patch-libs__sqwebmail__folder.c index d62fbc5703e3..57e46767947c 100644 --- a/mail/courier/files/extra-patch-webmail__folder.c +++ b/mail/courier/files/extra-patch-libs__sqwebmail__folder.c @@ -1,102 +1,102 @@ ---- libs/sqwebmail/folder.c.orig 2008-07-20 19:00:33.000000000 +0200 -+++ libs/sqwebmail/folder.c 2009-06-04 08:32:54.000000000 +0200 -@@ -331,6 +331,18 @@ - return rc ? "quota":""; +--- libs/sqwebmail/folder.c.orig 2025-05-12 00:23:26 UTC ++++ libs/sqwebmail/folder.c +@@ -251,6 +251,18 @@ static int groupmove(const char *folder, const char *f + return (maildir_msgmovefile(folder, file, cgi("moveto"), pos)); } +static int groupmark(const char *folder, const char *file, size_t pos) +{ + maildir_msgmarkfile(folder, file, pos); + return (0); +} + +static int groupunmark(const char *folder, const char *file, size_t pos) +{ + maildir_msgunmarkfile(folder, file, pos); + return (0); +} + - void folder_delmsgs(const char *dir, size_t pos) + static const char *do_folder_delmsgs(const char *dir, size_t pos) { - const char *status=do_folder_delmsgs(dir, pos); -@@ -392,6 +404,16 @@ - } - fclose(fp); + int rc=0; +@@ -320,6 +332,16 @@ static const char *do_folder_delmsgs(const char *dir, + rc=group_movedel( dir, &groupmove ); + maildir_savefoldermsgs(dir); } + else if (*cgi("cmdmark")) + { + rc=group_movedel( dir, &groupmark ); + maildir_savefoldermsgs(dir); + } + else if (*cgi("cmdunmark")) + { + rc=group_movedel( dir, &groupunmark ); + maildir_savefoldermsgs(dir); -+ } ++ } + + maildir_cleanup(); - fprintf(ofp, "%s\n%s\n", maildir, path); - fclose(ofp); -@@ -510,7 +532,7 @@ +@@ -505,7 +527,7 @@ unsigned long *last_message_searched_ptr=NULL; folder_navigate(dir, pos, highend, morebefore, moreafter, last_message_searched_ptr); - printf("\n", + printf("
%s %s%s%s%s
\n", getarg("NUM"), getarg("DATE"), (strncmp(dir, INBOX "." SENT, sizeof(INBOX)+sizeof(SENT)-1) && -@@ -531,9 +553,9 @@ +@@ -526,9 +548,9 @@ unsigned long *last_message_searched_ptr=NULL; if (found) { - puts(""); - puts(""); - puts(""); + puts(""); + puts("
%s   %s%s%s%s

 "); + puts("

 "); puts("