NetBSD Problem Report #60569

From jgw@sdf.org  Mon Aug 10 17:11:19 2026
Return-Path: <jgw@sdf.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "YR2" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EEFD01A923B
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 10 Aug 2026 17:11:18 +0000 (UTC)
Message-Id: <202608101711.67AHBFXN026889@sdf.org>
Date: Mon, 10 Aug 2026 11:11:15 -0600 (MDT)
From: jgw@sdf.org
Reply-To: jgw@sdf.org
To: gnats-bugs@NetBSD.org
Subject: mail/heirloom-mail patches
X-Send-Pr-Version: 3.95
X-From4GNATS: "jgw@sdf.org via gnats" <gnats-admin@NetBSD.org>

>Number:         60569
>Category:       pkg
>Synopsis:       mail/heirloom-mailx: fix deprecated openssl/timezone methodologies
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bsiegert
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 10 17:15:00 +0000 2026
>Closed-Date:    Fri Oct 16 19:39:14 +0000 2026
>Last-Modified:  Fri Oct 16 19:40:02 +0000 2026
>Originator:     jgw@sdf.org
>Release:        NetBSD 11.0_STABLE
>Organization:
	none
>Environment:


System: NetBSD beastie 11.0_STABLE NetBSD 11.0_STABLE (GENERIC) #0: Sun Aug 2 14:10:41 UTC 2026 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
        Two separate issues:
          1) address depreciated timzone determination method in ../sendout.c
            => was reported to the heirloom-mailx mlist along with a patch;
               ref: https://sourceforge.net/p/nail/mailman/message/59369762 .

          2) address depreciated TLS client method references in ../openssl.c
            => this was noticed during test builds for addressing issue 1) ;
               according to /usr/include/openssl/ssl.h it seems referencing
               specific TLS versions is depreciated.  Tested patch with an
               IMAPS account; seems to work okay.  BTW similar warnings are
               issued when building the mail/s-nail package.

>How-To-Repeat:
	N.A.
>Fix:

--- sendout.c.orig	2011-04-26 15:23:22.000000000 -0600
+++ sendout.c	2026-08-06 10:18:47.395462882 -0600
@@ -51,6 +51,15 @@
 #include <time.h>
 #include "md5.h"

+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+
+#ifdef _PATH_SENDMAIL
+#undef SENDMAIL
+#define SENDMAIL _PATH_SENDMAIL
+#endif
+
 /*
  * Mail -- a mail program
  *
@@ -835,7 +844,7 @@
 #endif	/* HAVE_SOCKETS */

 	if ((smtp = value("smtp")) == NULL) {
-		args = unpack(cat(mailargs, to));
+                args = unpack(mailargs, to);
 		if (debug || value("debug")) {
 			printf(catgets(catd, CATSET, 181,
 					"Sendmail arguments:"));
@@ -1135,13 +1144,11 @@
 	int tzdiff, tzdiff_hour, tzdiff_min;

 	time(&t);
-	tzdiff = t - mktime(gmtime(&t));
+	tmptr = localtime(&t);
+	tzdiff = tmptr->tm_gmtoff;
 	tzdiff_hour = (int)(tzdiff / 60);
 	tzdiff_min = tzdiff_hour % 60;
 	tzdiff_hour /= 60;
-	tmptr = localtime(&t);
-	if (tmptr->tm_isdst > 0)
-		tzdiff_hour++;
 	return fprintf(fo, "%s: %s, %02d %s %04d %02d:%02d:%02d %+05d\n",
 			field,
 			weekday_names[tmptr->tm_wday],


--- openssl.c.orig	2011-04-26 15:23:22.000000000 -0600
+++ openssl.c	2026-08-10 09:49:38.287933686 -0600
@@ -137,11 +137,13 @@

 	if ((cp = value("ssl-rand-egd")) != NULL) {
 		cp = expand(cp);
+#ifndef OPENSSL_NO_EGD
 		if (RAND_egd(cp) == -1) {
 			fprintf(stderr, catgets(catd, CATSET, 245,
 				"entropy daemon at \"%s\" not available\n"),
 					cp);
 		} else
+#endif
 			state = 1;
 	} else if ((cp = value("ssl-rand-file")) != NULL) {
 		cp = expand(cp);
@@ -216,12 +218,15 @@

 	cp = ssl_method_string(uhp);
 	if (cp != NULL) {
-		if (equal(cp, "ssl2"))
-			method = SSLv2_client_method();
-		else if (equal(cp, "ssl3"))
+		#ifndef OPENSSL_NO_SSL3
+		if (equal(cp, "ssl3"))
 			method = SSLv3_client_method();
-		else if (equal(cp, "tls1"))
-			method = TLSv1_client_method();
+		else if (equal(cp, "tls"))
+			method = TLS_client_method();
+		#else
+		if (equal(cp, "tls"))
+			method = TLS_client_method();
+		#endif
 		else {
 			fprintf(stderr, catgets(catd, CATSET, 244,
 					"Invalid SSL method \"%s\"\n"), cp);

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->bsiegert
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sat, 05 Sep 2026 19:36:51 +0000
Responsible-Changed-Why:
take


From: Jonathan Perkin <jperkin@pkgsrc.org>
To: Benny Siegert <bsiegert@netbsd.org>
Cc: gnats-bugs@netbsd.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org
Subject: Re: pkg/60569: mail/heirloom-mail patches
Date: Sat, 5 Sep 2026 20:36:16 +0100

 * On 2026-09-05 at 20:34 BST, Benny Siegert wrote:

 >On Mon, 10 Aug 2026, jgw@sdf.org via gnats wrote:
 >
 >>>Description:
 >>       Two separate issues:
 >>         1) address depreciated timzone determination method in ../sendout.c
 >>           => was reported to the heirloom-mailx mlist along with a patch;
 >>              ref: https://sourceforge.net/p/nail/mailman/message/59369762 .
 >
 >Can you please specify what package you are talking about? Your report 
 >does not mention this important detail.

 It's in the Subject, though typo'd: mail/heirloom-mailx

 -- 
 Jonathan Perkin                    pkgsrc.smartos.org
 Open Source Complete Cloud   www.tritondatacenter.com

From: Benny Siegert <bsiegert@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/60569: mail/heirloom-mail patches
Date: Sat, 5 Sep 2026 19:36:39 +0000 (UTC)

 I take it back. It's in the subject (but not the Synopsis?): 
 mail/heirloom-mail.

From: Benny Siegert <bsiegert@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/60569: mail/heirloom-mail patches
Date: Sat, 5 Sep 2026 19:34:19 +0000 (UTC)

 On Mon, 10 Aug 2026, jgw@sdf.org via gnats wrote:

 >> Description:
 >        Two separate issues:
 >          1) address depreciated timzone determination method in ../sendout.c
 >            => was reported to the heirloom-mailx mlist along with a patch;
 >               ref: https://sourceforge.net/p/nail/mailman/message/59369762 .

 Can you please specify what package you are talking about? Your report 
 does not mention this important detail.

 -- 
 Benny

From: Jeff_W<jgw@sdf.org>
To: pkgsrc-bugs@netbsd.org, gnats-bugs@netbsd.org, gnats-admin@netbsd.org,
        bsiegert@netbsd.org
Cc: 
Subject: Re: pkg/60569: mail/heirloom-mail patches
Date: Sat, 05 Sep 2026 15:46:34 -0600

 "Jonathan Perkin via gnats" <gnats-admin@NetBSD.org> wrote:

 > The following reply was made to PR pkg/60569; it has been noted by GNATS.
 >
 > From: Jonathan Perkin <jperkin@pkgsrc.org>
 > To: Benny Siegert <bsiegert@netbsd.org>
 > Cc: gnats-bugs@netbsd.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
 > 	pkgsrc-bugs@netbsd.org
 > Subject: Re: pkg/60569: mail/heirloom-mail patches
 > Date: Sat, 5 Sep 2026 20:36:16 +0100
 >
 >  * On 2026-09-05 at 20:34 BST, Benny Siegert wrote:
 >  
 >  >On Mon, 10 Aug 2026, jgw@sdf.org via gnats wrote:
 >  >
 >  >>>Description:
 >  >>       Two separate issues:
 >  >>         1) address depreciated timzone determination method in ../sendout.c
 >  >>           => was reported to the heirloom-mailx mlist along with a patch;
 >  >>              ref: https://sourceforge.net/p/nail/mailman/message/59369762 .
 >  >
 >  >Can you please specify what package you are talking about? Your report 
 >  >does not mention this important detail.
 >  
 >  It's in the Subject, though typo'd: mail/heirloom-mailx

 Apologies for the typo..

 $ pkgin se heirloom-mailx
 heirloom-mailx-12.5nb3  BSD mail utility with MIME extensions

 Let me know if you need any additional info.

 -jgw

State-Changed-From-To: open->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Fri, 16 Oct 2026 19:39:14 +0000
State-Changed-Why:
Patch applied, thank you!


From: "Benny Siegert" <bsiegert@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60569 CVS commit: pkgsrc/mail/heirloom-mailx
Date: Fri, 16 Oct 2026 19:38:12 +0000

 Module Name:	pkgsrc
 Committed By:	bsiegert
 Date:		Fri Oct 16 19:38:11 UTC 2026

 Modified Files:
 	pkgsrc/mail/heirloom-mailx: Makefile distinfo
 	pkgsrc/mail/heirloom-mailx/patches: patch-openssl.c patch-sendout.c

 Log Message:
 heirloom-mailx: two bugfixes

 - address deprecated timezone determination
 - address deprecated TLS client method references

 From jgw in PR pkg/60569.


 To generate a diff of this commit:
 cvs rdiff -u -r1.16 -r1.17 pkgsrc/mail/heirloom-mailx/Makefile
 cvs rdiff -u -r1.7 -r1.8 pkgsrc/mail/heirloom-mailx/distinfo
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/heirloom-mailx/patches/patch-openssl.c
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/mail/heirloom-mailx/patches/patch-sendout.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.