git: cbe669b1f9b1 - main - mail/sendmail: Fix MTA-STS support, to local-deliverable with MTA-STS enabled

From: Dirk Meyer <dinoex_at_FreeBSD.org>
Date: Fri, 29 Dec 2023 22:28:47 UTC
The branch main has been updated by dinoex:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cbe669b1f9b1c617680b20b7a3ecb1d853b75982

commit cbe669b1f9b1c617680b20b7a3ecb1d853b75982
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2023-12-29 22:28:22 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2023-12-29 22:28:22 +0000

    mail/sendmail: Fix MTA-STS support, to local-deliverable with MTA-STS enabled
    
    PR: 275996
    Submitted by: Hiroki Sato
    Submitted by: Norikatsu Shigemura
---
 mail/sendmail/Makefile               |  2 +-
 mail/sendmail/files/patch-cfproto.m4 | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/mail/sendmail/Makefile b/mail/sendmail/Makefile
index a07b2f6c3654..aa413a611cae 100644
--- a/mail/sendmail/Makefile
+++ b/mail/sendmail/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	sendmail
 PORTVERSION=	8.17.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	ftp://ftp.sendmail.org/pub/sendmail/
 DISTNAME=	${PORTNAME}.${PORTVERSION}
diff --git a/mail/sendmail/files/patch-cfproto.m4 b/mail/sendmail/files/patch-cfproto.m4
new file mode 100644
index 000000000000..7ee522401c00
--- /dev/null
+++ b/mail/sendmail/files/patch-cfproto.m4
@@ -0,0 +1,24 @@
+--- cf/m4/proto.m4.orig	2023-02-09 18:24:38 UTC
++++ cf/m4/proto.m4
+@@ -2888,10 +2888,6 @@ R$*		$: $(macro {saved_verify} $@ $1 $) $1')
+ R$* $| $*		$: $1', `dnl')
+ ifdef(`_TLS_FAILURES_',`dnl
+ R$*		$: $(macro {saved_verify} $@ $1 $) $1')
+-ifdef(`_MTA_STS_', `dnl
+-R$*			$: $1 $| $>"STS_secure" $1
+-R$* $| $#$*		$#$2
+-R$* $| $*		$: $1', `dnl')
+ ifdef(`_ACCESS_TABLE_', `dnl
+ dnl store name of other side
+ R$*		$: $(macro {TLS_Name} $@ $&{server_name} $) $1
+@@ -2899,6 +2895,10 @@ R$* $| <?>$*	$: $1 $| <$(access TLS_SRV_TAG`'_TAG_DELI
+ R$* $| <?>$*	$: $1 $| $>A <$&{server_addr}> <?> <! TLS_SRV_TAG> <>
+ dnl do a default lookup: just TLS_SRV_TAG
+ R$* $| <?>$*	$: $1 $| <$(access TLS_SRV_TAG`'_TAG_DELIM_ $: ? $)>
++ifdef(`_MTA_STS_', `dnl
++R$*			$: $1 $| $>"STS_secure" $1
++R$* $| $#$*		$#$2
++R$* $| $*		$: $1', `dnl')
+ ifdef(`_ATMPF_', `dnl tempfail?
+ R$* $| <$* _ATMPF_>	$#error $@ 4.3.0 $: _TMPFMSG_(`TS')', `dnl')
+ R$*		$@ $>"TLS_connection" $1', `dnl