diff --git a/mail/opensmtpd/Makefile b/mail/opensmtpd/Makefile index 771230a5b80e..4bf5a859e556 100644 --- a/mail/opensmtpd/Makefile +++ b/mail/opensmtpd/Makefile @@ -1,53 +1,53 @@ PORTNAME= opensmtpd PORTVERSION= 7.3.0 -PORTREVISION= 1 +PORTREVISION= 2 DISTVERSIONSUFFIX= p2 PORTEPOCH= 1 CATEGORIES= mail MASTER_SITES= https://www.opensmtpd.org/archives/ MAINTAINER= fluffy@FreeBSD.org COMMENT= Security- and simplicity-focused SMTP server from OpenBSD WWW= https://www.OpenSMTPD.org/ LICENSE= ISCL LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libevent.so:devel/libevent OPTIONS_DEFINE= MAILERCONF PAM TABLE_DB OPTIONS_DEFAULT= PAM TABLE_DB MAILERCONF_DESC= Activate OpenSMTPD in mailer.conf(5) TABLE_DB_DESC= Build table-db plugin (aliases) USES= cpe groff libtool localbase ssl GNU_CONFIGURE= yes CPE_VENDOR= openbsd USE_RC_SUBR= smtpd SUB_FILES= pkg-install pkg-deinstall pkg-message CONFLICTS_INSTALL= postfix sendmail opensmtpd-devel USERS= _smtpd _smtpq GROUPS= _smtpd _smtpq OPTIONS_SUB= yes PAM_CONFIGURE_WITH= auth-pam=smtpd TABLE_DB_CONFIGURE_WITH= table-db CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/mail/ \ --with-libevent=${LOCALBASE} \ --with-path-mbox=/var/mail \ --with-user-smtpd=_smtpd \ --with-user-queue=_smtpq \ --with-group-queue=_smtpq post-install-TABLE_DB-on: @${LN} -sf ${PREFIX}/sbin/smtpctl ${STAGEDIR}${PREFIX}/libexec/opensmtpd/makemap .include diff --git a/mail/opensmtpd/files/patch-mk_smtpd_Makefile.in b/mail/opensmtpd/files/patch-mk_smtpd_Makefile.in index e1597ed92f0e..3604c0868c76 100644 --- a/mail/opensmtpd/files/patch-mk_smtpd_Makefile.in +++ b/mail/opensmtpd/files/patch-mk_smtpd_Makefile.in @@ -1,17 +1,17 @@ ---- mk/smtpd/Makefile.in.orig 2019-10-26 11:56:36 UTC +--- mk/smtpd/Makefile.in.orig 2023-09-16 18:13:47 UTC +++ mk/smtpd/Makefile.in -@@ -1404,13 +1404,7 @@ install-exec-hook: $(CONFIGFILES) $(MANPAGES) - $(MKDIR_P) $(DESTDIR)$(bindir) +@@ -1471,13 +1471,7 @@ install-exec-hook: $(CONFIGFILES) $(MANPAGES) $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5 + $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)7 $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8 - - @if [ ! -f $(DESTDIR)$(sysconfdir)/smtpd.conf ]; then \ - $(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(sysconfdir)/smtpd.conf; \ - else \ - echo "$(DESTDIR)$(sysconfdir)/smtpd.conf already exists, install will not overwrite"; \ - fi - + $(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(sysconfdir)/smtpd.conf.sample $(INSTALL) -m 644 aliases.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/aliases.5 $(INSTALL) -m 644 forward.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/forward.5 $(INSTALL) -m 644 table.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/table.5 diff --git a/mail/opensmtpd/files/patch-openbsd-compat_libtls_tls.c b/mail/opensmtpd/files/patch-openbsd-compat_libtls_tls.c new file mode 100644 index 000000000000..cd033b41dace --- /dev/null +++ b/mail/opensmtpd/files/patch-openbsd-compat_libtls_tls.c @@ -0,0 +1,16 @@ +--- openbsd-compat/libtls/tls.c.orig 2023-09-16 18:11:28 UTC ++++ openbsd-compat/libtls/tls.c +@@ -584,10 +584,10 @@ tls_configure_ssl_verify(struct tls *ctx, SSL_CTX *ssl + + /* If no CA has been specified, attempt to load the default. */ + if (ctx->config->ca_mem == NULL && ctx->config->ca_path == NULL) { +- if (tls_config_load_file(&ctx->error, "CA", tls_default_ca_cert_file(), +- &ca_mem, &ca_len) != 0) ++ if (!SSL_CTX_set_default_verify_paths(ssl_ctx)) { ++ tls_set_error(ctx, "failed to load default trust store"); + goto err; +- ca_free = ca_mem; ++ } + } + + if (ca_mem != NULL) {