Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Tell the truth and run." -- Yugoslav proverb


computers / comp.mail.sendmail / Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

SubjectAuthor
* cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certifMichael Grant
+* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceHQuest
|`* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceMichael Grant
| `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceMichael Grant
|  `- Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceClaus Aßmann
`* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceClaus Aßmann
 `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceMichael Grant
  `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceClaus Aßmann
   `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceMichael Grant
    `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceMichael Grant
     +* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceKalevi Kolttonen
     |`- Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceKalevi Kolttonen
     `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceClaus Aßmann
      `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceHQuest
       `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceMichael Grant
        `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceMichael Grant
         `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceHQuest
          `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceMichael Grant
           `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceClaus Aßmann
            `* Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceGrant Taylor
             +- Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceMichael Grant
             `- Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer ceGrant Taylor

1
cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=904&group=comp.mail.sendmail#904

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:ac8:7188:0:b0:428:32df:a666 with SMTP id w8-20020ac87188000000b0042832dfa666mr338611qto.2.1704329286647;
Wed, 03 Jan 2024 16:48:06 -0800 (PST)
X-Received: by 2002:ac8:5385:0:b0:428:3535:1d98 with SMTP id
x5-20020ac85385000000b0042835351d98mr279323qtp.0.1704329286314; Wed, 03 Jan
2024 16:48:06 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Wed, 3 Jan 2024 16:48:05 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=Px5Q5QoAAABUOSovaPyEmLcyKmmtjiOn
NNTP-Posting-Host: 217.35.29.56
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
Subject: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get
issuer certificate
From: michael....@gmail.com (Michael Grant)
Injection-Date: Thu, 04 Jan 2024 00:48:06 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Michael Grant - Thu, 4 Jan 2024 00:48 UTC

When I send mail from one of my servers to the other (both using sendmail 8.17.2), I am seeing this in my mail logs:

STARTTLS=client, cert-subject=/CN=mail.networkguild.org, cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

If I verify the cert by hand using:

openssl s_client -starttls smtp -showcerts -connect mail.networkguild.org:25 -servername mail.networkguild.org

it verifies OK and sees all the certificates in the chain. I am
indeed using the fullchain.pem file in my sendmail config. I've tried using both fullchain.pem and cert.pem as the CAcert file, result is the same.

My 'CN=mail.networkguild.org' depends on the 'CN=R3' cert. The
'CN=R3' cert depends on a cert named 'CN = ISRG Root X1'. I
definitely see that cert both in the chain my mail server presents and
in /etc/ssl.

I'm not sure if this is a debian issue, a sendmail issue, or a cert
issue. The fact that my cert verifies from other sites seems to
indicate it may be a sendmail sending issue, but I'm not sure.

Anyone have any ideas how to get sendmail to say this cert is valid?

Michael Grant

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<59607f3f69948b413660205f48226e28@news.novabbs.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=907&group=comp.mail.sendmail#907

  copy link   Newsgroups: comp.mail.sendmail
Date: Fri, 5 Jan 2024 02:16:44 +0000
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3,
verifymsg=unable to get issuer certificate
From: hqu...@hquest.pro.br (HQuest)
Newsgroups: comp.mail.sendmail
X-Rslight-Site: $2y$10$Y5dUeb7Bs/CLIdI60JeO0ulIXCmEkOFChs84YKVwkZybeDsqfmMPW
X-Rslight-Posting-User: 0a150940d9dd42a0cd99369fff2a0e83cb21abec
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Rocksolid Light
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
Organization: novaBBS
Message-ID: <59607f3f69948b413660205f48226e28@news.novabbs.com>
 by: HQuest - Fri, 5 Jan 2024 02:16 UTC

Claus can probably correct me, but that's what I use for SSL at both server and client settings on my .m4 file:

define(`confCACERT_PATH', `/etc/ssl/certs')
define(`confCACERT', `/etc/ssl/private/chain.pem')
define(`confSERVER_CERT', `/etc/ssl/private/cert.pem')
define(`confSERVER_KEY', `/etc/ssl/private/cert.key')
define(`confCLIENT_CERT', `/etc/ssl/private/cert.pem')
define(`confCLIENT_KEY', `/etc/ssl/private/cert.key')

Replacing paths and cert/key files by your own.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<5657f2c5-5f96-4f72-a69d-c5673c19b704n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=913&group=comp.mail.sendmail#913

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:6214:b68:b0:681:7164:a0fa with SMTP id ey8-20020a0562140b6800b006817164a0famr49716qvb.11.1705385938744;
Mon, 15 Jan 2024 22:18:58 -0800 (PST)
X-Received: by 2002:a05:6214:2482:b0:681:55b6:1e40 with SMTP id
gi2-20020a056214248200b0068155b61e40mr627925qvb.4.1705385938572; Mon, 15 Jan
2024 22:18:58 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Mon, 15 Jan 2024 22:18:58 -0800 (PST)
In-Reply-To: <59607f3f69948b413660205f48226e28@news.novabbs.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=vDcx0QoAAACdyRto6OQuAjET8QWU9Bo1
NNTP-Posting-Host: 217.35.29.56
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <59607f3f69948b413660205f48226e28@news.novabbs.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5657f2c5-5f96-4f72-a69d-c5673c19b704n@googlegroups.com>
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
From: michael....@clinicalandherbal.com (Michael Grant)
Injection-Date: Tue, 16 Jan 2024 06:18:58 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 62
 by: Michael Grant - Tue, 16 Jan 2024 06:18 UTC

On Friday, January 5, 2024 at 2:20:42 AM UTC, HQuest wrote:
> Claus can probably correct me, but that's what I use for SSL at both server and client settings on my .m4 file:
>
> define(`confCACERT_PATH', `/etc/ssl/certs')
> define(`confCACERT', `/etc/ssl/private/chain.pem')
> define(`confSERVER_CERT', `/etc/ssl/private/cert.pem')
> define(`confSERVER_KEY', `/etc/ssl/private/cert.key')
> define(`confCLIENT_CERT', `/etc/ssl/private/cert.pem')
> define(`confCLIENT_KEY', `/etc/ssl/private/cert.key')
>
> Replacing paths and cert/key files by your own.

The errors I am seeing on the CLIENT end, as in, this is what someone running sendmail might see in their logs if they try sending me a message.

This is what I have the server:

define(`confCACERT_PATH', `/etc/ssl/certs')
define(`confCACERT', `/etc/letsencrypt/live/strange.networkguild.org/chain.pem')
define(`confSERVER_CERT', `/etc/letsencrypt/live/strange.networkguild.org/cert.pem')
define(`confSERVER_KEY', `/etc/letsencrypt/live/strange.networkguild.org/privkey.pem')
define(`confCLIENT_CERT', `/etc/letsencrypt/live/strange.networkguild.org/cert.pem')
define(`confCLIENT_KEY', `/etc/letsencrypt/live/strange.networkguild.org/privkey.pem')

This is what I see on the client side (sendmail server delivering a message to this server):

tls_clt_features=(null), relay=strange.networkguild.org [IPv6:2600:3c02:e000:dd:0:0:0:1]
tls_clt_features=empty, stat=0, relay=strange.networkguild.org [IPv6:2600:3c02:e000:dd:0:0:0:1]
STARTTLS=client, relay=strange.networkguild.org., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
STARTTLS=client, cert-subject=/CN=strange.networkguild.org, cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate
AUTH=client, relay=strange.networkguild.org., mech=, bits=0

Running this on the server produces:

# openssl storeutl -r -certs -noout -text /etc/letsencrypt/live/strange.networkguild.org/chain.pem | grep 'Issuer:|Subject:'
Issuer: C=US, O=Internet Security Research Group, CN=ISRG Root X1
Subject: C=US, O=Let's Encrypt, CN=R3
Issuer: O=Digital Signature Trust Co., CN=DST Root CA X3
Subject: C=US, O=Internet Security Research Group, CN=ISRG Root X1

The only thing I can see here is Sendmail is logging the subject with the space replaced with +20. Could this be making it not match? I'm wondering.... is there a bug in sendmail as an STARTTLS client where it's not properly verifying the chain cert with a space in it?

And just for completeness, I tried this in the reverse direction, sending a message in the other direction, and I get the same client unable to get issuer certificate. Again, the SSL client is Sendmail.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<585d6097-57cc-43b0-8938-fde8115268dan@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=914&group=comp.mail.sendmail#914

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:6214:4111:b0:680:75e9:8f63 with SMTP id kc17-20020a056214411100b0068075e98f63mr996670qvb.1.1705390551537;
Mon, 15 Jan 2024 23:35:51 -0800 (PST)
X-Received: by 2002:a05:620a:1367:b0:783:4887:153e with SMTP id
d7-20020a05620a136700b007834887153emr150035qkl.6.1705390551304; Mon, 15 Jan
2024 23:35:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Mon, 15 Jan 2024 23:35:51 -0800 (PST)
In-Reply-To: <5657f2c5-5f96-4f72-a69d-c5673c19b704n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=vDcx0QoAAACdyRto6OQuAjET8QWU9Bo1
NNTP-Posting-Host: 217.35.29.56
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
<59607f3f69948b413660205f48226e28@news.novabbs.com> <5657f2c5-5f96-4f72-a69d-c5673c19b704n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <585d6097-57cc-43b0-8938-fde8115268dan@googlegroups.com>
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
From: michael....@clinicalandherbal.com (Michael Grant)
Injection-Date: Tue, 16 Jan 2024 07:35:51 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2932
 by: Michael Grant - Tue, 16 Jan 2024 07:35 UTC

If I turn logging up to level 15, I see it's also failing for the root X1 cert:

tls_clt_features=(null), relay=strange.networkguild.org [IPv6:2600:3c02:e000:dd:0:0:0:1]
tls_clt_features=empty, stat=0, relay=strange.networkguild.org [IPv6:2600:3c02:e000:dd:0:0:0:1]
STARTTLS=client, start=ok
STARTTLS=client, info: fds=9/3, err=2
STARTTLS=client, info: fds=9/3, err=2
STARTTLS: TLS cert verify: depth=2 /C=US/O=Internet Security Research Group/CN=ISRG Root X1, state=0, reason=unable to get issuer certificate
STARTTLS=client, info: fds=9/3, err=2
STARTTLS=client, get_verify: 2 get_peer: 0x55bbc9147a40
STARTTLS=client, relay=strange.networkguild.org., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
STARTTLS=client, cert-subject=/CN=strange.networkguild.org, cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

The cert chain is:
Issuer: C=US, O=Let's Encrypt, CN=R3
Subject: CN=strange.networkguild.org
Issuer: C=US, O=Internet Security Research Group, CN=ISRG Root X1
Subject: C=US, O=Let's Encrypt, CN=R3
Issuer: O=Digital Signature Trust Co., CN=DST Root CA X3
Subject: C=US, O=Internet Security Research Group, CN=ISRG Root X1

I can't explain where the space character in the Let's Encrypt cert is getting replaced with '+20'. And I can't explain why it's only the intermediate cert and not getting replaced in the X1 root cert as well.

I looked for other clients my sendmail connected to using Let's Encrypt certs and I always see this same error, so it's apparently not me.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<uo5eu3$gq4$1@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=915&group=comp.mail.sendmail#915

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_...@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
Date: Tue, 16 Jan 2024 03:32:03 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <uo5eu3$gq4$1@news.misty.com>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <59607f3f69948b413660205f48226e28@news.novabbs.com> <5657f2c5-5f96-4f72-a69d-c5673c19b704n@googlegroups.com> <585d6097-57cc-43b0-8938-fde8115268dan@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 16 Jan 2024 08:32:03 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="17220"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Tue, 16 Jan 2024 08:32 UTC

Michael Grant wrote:

> I can't explain where the space character in the Let's Encrypt cert is
> getting replaced with '+20'.

Did you check the fine documentation?

6.7. Encoding of STARTTLS and AUTH related Macros

Macros that contain STARTTLS and AUTH related
data which comes from outside sources, e.g., all
macros containing information from certificates, are
encoded to avoid problems with non-printable or spe-
cial characters. The latter are '\', '<', '>', '(',
')', '"', '+', and ' '. All of these characters are
replaced by their value in hexadecimal with a leading
'+'. For example:

/C=US/ST=California/O=endmail.org/OU=private/CN=Darth Mail (Cert)/
Email=darth+cert@endmail.org

is encoded as:

/C=US/ST=California/O=endmail.org/OU=private/
CN=Darth+20Mail+20+28Cert+29/Email=darth+2Bcert@endmail.org

(line breaks have been inserted for readability). The
macros which are subject to this encoding are
{cert_subject}, {cert_issuer}, {cn_subject}, {cn_is-
suer}, as well as {auth_authen} and {auth_author}.

--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<uo5gpi$j1e$1@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=916&group=comp.mail.sendmail#916

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_...@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get
issuer certificate
Date: Tue, 16 Jan 2024 04:03:46 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <uo5gpi$j1e$1@news.misty.com>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 16 Jan 2024 09:03:46 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="19502"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Tue, 16 Jan 2024 09:03 UTC

Michael Grant wrote:

> STARTTLS=client, cert-subject=/CN=mail.networkguild.org,
> cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get
> issuer certificate

> My 'CN=mail.networkguild.org' depends on the 'CN=R3' cert. The
> 'CN=R3' cert depends on a cert named 'CN = ISRG Root X1'. I
> definitely see that cert both in the chain my mail server presents and
> in /etc/ssl.

Did you configure sendmail to use /etc/ssl for CACertPath?

openssl s_client refers to some certs / paths via its
config or builtin defaults.

sendmail does not do that.

--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<d5535d96-e473-4539-8db5-471bd244242cn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=917&group=comp.mail.sendmail#917

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a0c:e6ec:0:b0:681:5588:f337 with SMTP id m12-20020a0ce6ec000000b006815588f337mr613656qvn.8.1705409520206;
Tue, 16 Jan 2024 04:52:00 -0800 (PST)
X-Received: by 2002:a05:620a:8015:b0:783:6924:1f1d with SMTP id
ee21-20020a05620a801500b0078369241f1dmr46710qkb.5.1705409520042; Tue, 16 Jan
2024 04:52:00 -0800 (PST)
Path: i2pn2.org!i2pn.org!news.1d4.us!news.quux.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Tue, 16 Jan 2024 04:51:59 -0800 (PST)
In-Reply-To: <uo5gpi$j1e$1@news.misty.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=vDcx0QoAAACdyRto6OQuAjET8QWU9Bo1
NNTP-Posting-Host: 217.35.29.56
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <uo5gpi$j1e$1@news.misty.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d5535d96-e473-4539-8db5-471bd244242cn@googlegroups.com>
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
From: michael....@clinicalandherbal.com (Michael Grant)
Injection-Date: Tue, 16 Jan 2024 12:52:00 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Michael Grant - Tue, 16 Jan 2024 12:51 UTC

> Did you configure sendmail to use /etc/ssl for CACertPath?

Yes, I have tried both /etc/ssl and /etc/ssl/certs

> openssl s_client refers to some certs / paths via its
> config or builtin defaults.
>
> sendmail does not do that.

I'm not sure what you mean here. Do you think this might be an openssl issue?

I had a look in tls.c in sendmail's source. I have a difficult time following it, I would probably need to pull it into the debugger, but from sendmail's logging and the source, it seems to me that sendmail could be looping over the cert chain.

What I was trying to verify was whether when it did this loop, is it comparing the subject and issuer both with the special characters such as space substituted with the + notation.? (as in, is it comparing "O=Let's Encrypt" in the issuer to "O=Let's+20Encrypt" in the encoded subject)? Could there be a bug here, I wonder? Just a hypothesis.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<uo6be3$hq1$1@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=919&group=comp.mail.sendmail#919

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_...@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
Date: Tue, 16 Jan 2024 11:38:27 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <uo6be3$hq1$1@news.misty.com>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <uo5gpi$j1e$1@news.misty.com> <d5535d96-e473-4539-8db5-471bd244242cn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 16 Jan 2024 16:38:27 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="18241"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Tue, 16 Jan 2024 16:38 UTC

Michael Grant wrote:
> > Did you configure sendmail to use /etc/ssl for CACertPath?

> Yes, I have tried both /etc/ssl and /etc/ssl/certs

Which of the two has the symbolic links for the CAs?
Do you use different openssl versions (library for sendmail
vs. openssl program)?

> > openssl s_client refers to some certs / paths via its
> > config or builtin defaults.

> > sendmail does not do that.

> I'm not sure what you mean here. Do you think this might be an openssl issue?

sendmail does not have any defaults for CAs,
so config must provide the required information.

> "O=Let's Encrypt" in the issuer to "O=Let's+20Encrypt" in the encoded
> subject)? Could there be a bug here, I wonder? Just a hypothesis.

"You can't be serious"...
The encoding is only used for display purposes.

The verification is done inside openssl, sendmail doesn't
"mess" with that - it invokes the proper openssl setup
functions with your CACertPath/CACertFile and leaves the rest
to the openssl code.

Anyway: I just tried it from one of my hosts using sendmail:

STARTTLS=client, relay=strange.networkguild.org., version=TLSv1.3, verify=OK, cipher=TLS_AES_256_GCM_SHA384, bits=256/256

so with the right setup it works fine...

Check the openssl s_client (or verify) options: maybe it can show
which CAs it uses for verification?

--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=920&group=comp.mail.sendmail#920

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:6214:411a:b0:681:5bde:71c2 with SMTP id kc26-20020a056214411a00b006815bde71c2mr619722qvb.1.1705432425803;
Tue, 16 Jan 2024 11:13:45 -0800 (PST)
X-Received: by 2002:a05:6214:dac:b0:67f:864b:d573 with SMTP id
h12-20020a0562140dac00b0067f864bd573mr1190659qvh.6.1705432425622; Tue, 16 Jan
2024 11:13:45 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Tue, 16 Jan 2024 11:13:45 -0800 (PST)
In-Reply-To: <uo6be3$hq1$1@news.misty.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=vDcx0QoAAACdyRto6OQuAjET8QWU9Bo1
NNTP-Posting-Host: 217.35.29.56
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
<uo5gpi$j1e$1@news.misty.com> <d5535d96-e473-4539-8db5-471bd244242cn@googlegroups.com>
<uo6be3$hq1$1@news.misty.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com>
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
From: michael....@clinicalandherbal.com (Michael Grant)
Injection-Date: Tue, 16 Jan 2024 19:13:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3998
 by: Michael Grant - Tue, 16 Jan 2024 19:13 UTC

On Tuesday, January 16, 2024 at 4:38:30 PM UTC, Claus Aßmann wrote:
> Michael Grant wrote:
> > > Did you configure sendmail to use /etc/ssl for CACertPath?
>
> > Yes, I have tried both /etc/ssl and /etc/ssl/certs
> Which of the two has the symbolic links for the CAs?
/etc/ssl/certs on debian and I also verified that the hash of the R3 cert it complained about is properly linked to the correct R3 cert.

> Do you use different openssl versions (library for sendmail
> vs. openssl program)?

No, not as far as I am aware. I did check though.

Both the sendmail executable and the openssl executable depend on libssl3, both use the same file, and this file is in the debian package libssl3- 3.0..11-1~deb12u2.

> sendmail does not have any defaults for CAs,
> so config must provide the required information.

Yup, am aware of this, I believe I have that properly configured.

> > "O=Let's Encrypt" in the issuer to "O=Let's+20Encrypt" in the encoded
> > subject)? Could there be a bug here, I wonder? Just a hypothesis.
> "You can't be serious"...
> The encoding is only used for display purposes.

Great
> Anyway: I just tried it from one of my hosts using sendmail:
>
> STARTTLS=client, relay=strange.networkguild.org., version=TLSv1.3, verify=OK, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
>
> so with the right setup it works fine...

I do see verify=OK for many other certificates for outbound connections, just not for Let's Encrypt.

> Check the openssl s_client (or verify) options: maybe it can show
> which CAs it uses for verification?

Ok, good point. Unfortunately, I didn't see such an option. I tried several, including the -debug option. Though I see the that it prints out the certs. I also think it doesn't really show me if the certs are valid, even though it says OK.

On the server side, I ran this:

$ openssl verify /etc/letsencrypt/live/strange.networkguild.org/fullchain.pem
CN = strange.networkguild.org
error 20 at 0 depth lookup: unable to get local issuer certificate
error /etc/letsencrypt/live/strange.networkguild.org/fullchain.pem: verification failed

And now the plot thickens..... Unless I'm looking at the wrong thing, it looks like the X1 cert that is part of the cert chain for strange.networkguild.org is not the same X1 cert that I see in /etc/ssl/certs, yet, both have the same subject name. Both are valid.

I don't fully understand how this happened.

Thanks, you've pushed me in the right direction to sort this out.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=921&group=comp.mail.sendmail#921

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:6214:2aac:b0:681:77a9:fc27 with SMTP id js12-20020a0562142aac00b0068177a9fc27mr278141qvb.8.1705491490086;
Wed, 17 Jan 2024 03:38:10 -0800 (PST)
X-Received: by 2002:ac8:74d:0:b0:429:fb36:791b with SMTP id
k13-20020ac8074d000000b00429fb36791bmr64814qth.6.1705491489820; Wed, 17 Jan
2024 03:38:09 -0800 (PST)
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Wed, 17 Jan 2024 03:38:09 -0800 (PST)
In-Reply-To: <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=vDcx0QoAAACdyRto6OQuAjET8QWU9Bo1
NNTP-Posting-Host: 217.35.29.56
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
<uo5gpi$j1e$1@news.misty.com> <d5535d96-e473-4539-8db5-471bd244242cn@googlegroups.com>
<uo6be3$hq1$1@news.misty.com> <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com>
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
From: michael....@clinicalandherbal.com (Michael Grant)
Injection-Date: Wed, 17 Jan 2024 11:38:10 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4479
 by: Michael Grant - Wed, 17 Jan 2024 11:38 UTC

Unfortunately, after some research, I still can't resolve this. Here's what I found so far:

All the Let's Encrypt certs signed by "C=US, O=Let's Encrypt, CN=R3" have this same error:

> cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get
> issuer certificate

Digging into these certs...

C=US, O=Let's Encrypt, CN=R3, in turn is signed by:
"C=US, O=Internet Security Research Group, CN=ISRG Root X1"

I have the self-signed ISRG Root X1 cert in /etc/ssl/certs/ on my
debian box which expires Jun 4 11:04:38 2035 GMT.

But the certificate chain that gets presented seems to have a
different ISRG Root X1 cert that's signed by:
"O=Digital Signature Trust Co., CN=DST Root CA X3" which expires
Sep 30 18:14:03 2024 GMT. (This is why I got confused yesterday).

But regardless I do have a valid self-signed ISRG Root X1 cert, so it
shouldn't matter, right? I don't understand why the Let's encrypt
certs are not being trusted.

How can I fix this? How can I accept these seemingly properly signed
Let's Encrypt certs which depend on the X1 cert which I have?

It seems quite normal to me to have a cert that is signed by multiple
different entities, one which I trust and other(s) which I don't.

I didn't use openssl verify correctly yesterday. Here's the proper usage using a chained cert:

$ openssl verify -show_chain -verbose -CApath /etc/ssl/certs/ -untrusted chain.pem cert.pem
cert.pem: OK
Chain:
depth=0: CN = strange.networkguild.org (untrusted)
depth=1: C = US, O = Let's Encrypt, CN = R3 (untrusted)
depth=2: C = US, O = Internet Security Research Group, CN = ISRG Root X1

openssl s_client returns 'Verify: OK'. I have not found a way to get it to show me which files it's using, but it does output the certificates. It outputs the certs that were presented to it in the connection. It, however, does not print out the self-signed ISRG Root X1 cert. It prints out the DST Root CA X3 signed X1 cert. I turned on all the verbose output I could find. However, it still reports Verify OK.

So I don't get it. As far as I can tell, everything is set up properly. Claus, I don't know which OS you are running sendmail on and I don't know if you happen to have this DST Root CA X3 cert which I don't have, but I really don't understand why that would matter. I also don't understand why sendmail doesn't "short-circuit" looking at the chain the way openssl-verify and openssl-s_client seem to do. I believe you when you say sendmail just calls the openssl library (which I only have one installed on my system).

I'm running sendmail 8.17.2 on debian stable. There was also some related discussion about this on the mailop mailing list back in September about the R3 cert, but it was not specific to sendmail and I didn't see any resolution that helped me in this situation.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<uo9186$24bjo$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=925&group=comp.mail.sendmail#925

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate
Date: Wed, 17 Jan 2024 17:03:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Sender: <untosten@0.0.0.0>
Message-ID: <uo9186$24bjo$1@dont-email.me>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <uo5gpi$j1e$1@news.misty.com> <d5535d96-e473-4539-8db5-471bd244242cn@googlegroups.com> <uo6be3$hq1$1@news.misty.com> <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com> <9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com>
Injection-Date: Wed, 17 Jan 2024 17:03:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c2e4e8a96cf022ea24880168e4b2ad29";
logging-data="2240120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+16WWgL4J7D75ZZzEjOG+Q9qHGo4w02s4="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.6.11-200.fc39.x86_64 (x86_64))
Cancel-Lock: sha1:ynOvZkSjh4eTWtR2DMfoTF7Y33E=
 by: Kalevi Kolttonen - Wed, 17 Jan 2024 17:03 UTC

Michael Grant <michael.grant@clinicalandherbal.com> wrote:
> [...]
> openssl s_client returns 'Verify: OK'. I have not found a way
> to get it to show me which files it's using, but it does output
> the certificates.

Unfortunately I cannot help you with your main problem, but you
can easily use Linux system call tracing to see which files
are opened. Just prefix your command with:

strace -o out -e open

br,
KK

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<uo92j1$24h6b$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=926&group=comp.mail.sendmail#926

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate
Date: Wed, 17 Jan 2024 17:25:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Sender: <untosten@0.0.0.0>
Message-ID: <uo92j1$24h6b$1@dont-email.me>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <uo5gpi$j1e$1@news.misty.com> <d5535d96-e473-4539-8db5-471bd244242cn@googlegroups.com> <uo6be3$hq1$1@news.misty.com> <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com> <9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com> <uo9186$24bjo$1@dont-email.me>
Injection-Date: Wed, 17 Jan 2024 17:25:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c2e4e8a96cf022ea24880168e4b2ad29";
logging-data="2245835"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Smadg5IWRTmCAiFMKW8yiGX4/RMZIcw8="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.6.11-200.fc39.x86_64 (x86_64))
Cancel-Lock: sha1:XoITZDUxHioQdb1+sXmdGr/twZ4=
 by: Kalevi Kolttonen - Wed, 17 Jan 2024 17:25 UTC

Kalevi Kolttonen <kalevi@kolttonen.fi> wrote:
> Unfortunately I cannot help you with your main problem, but you
> can easily use Linux system call tracing to see which files
> are opened. Just prefix your command with:
>
> strace -o out -e open

Hmm, that gives no matches, but try this instead:

strace -o out -e openat

br,
KK

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<uog0up$d3e$1@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=930&group=comp.mail.sendmail#930

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_...@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
Date: Sat, 20 Jan 2024 03:40:57 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <uog0up$d3e$1@news.misty.com>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <uo6be3$hq1$1@news.misty.com> <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com> <9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 20 Jan 2024 08:40:57 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="13422"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Sat, 20 Jan 2024 08:40 UTC

Michael Grant wrote:

> openssl s_client returns 'Verify: OK'. I have not found a way to get it
> to show me which files it's using, but it does output the certificates.

Write each of those certs into separate files
and check whether you have them in CACertPath used by sendmail.
Then check that the correct symbolic links exist too.
Also make sure all of the involved certs/links are readable
by everyone.

If that doesn't help:
post the output of openssl s_client,
esp. the certs that are used.

--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<038fa506a2bfe2ad50cbb131e34826af@www.novabbs.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=932&group=comp.mail.sendmail#932

  copy link   Newsgroups: comp.mail.sendmail
Date: Mon, 22 Jan 2024 03:22:50 +0000
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3,
verifymsg=unable to get issuer certificate
From: hqu...@hquest.pro.br (HQuest)
Newsgroups: comp.mail.sendmail
X-Rslight-Site: $2y$10$yWrq90KbLGMTG4eFGo1XGeco8IUkw/KvztBCO5A4KtgIWsNA3ZeUm
X-Rslight-Posting-User: 3d3517e5dd24387fdf8da64199401ea731577ab2
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Rocksolid Light
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <uo6be3$hq1$1@news.misty.com> <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com> <9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com> <uog0up$d3e$1@news.misty.com>
Organization: novaBBS
Message-ID: <038fa506a2bfe2ad50cbb131e34826af@www.novabbs.com>
 by: HQuest - Mon, 22 Jan 2024 03:22 UTC

The DST Root CA X3 certificate is not part of the default ca-certificates package from Mozilla, and likely not found into your certs/ folder - unless you manually added it *and* updated your certificate hooks (via update-ca-cerificate shell script). Alternatively, if you are using certbot to renew your certificates, add flag --preferred-chain "ISRG Root X1", so it uses the self-signed certificate and not the cross-signed ISRG Root Certificate, signed by the DST Root CA.

For more info on the LE certificate chain, see https://letsencrypt.org/certificates/ .

Hope this helps - it works like a champ over here with the self signed cert and the flags I originally sent you above.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<ec5f0861-cb4b-466b-b764-c1ae9e9f7895n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=935&group=comp.mail.sendmail#935

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:620a:468b:b0:783:9d81:6e56 with SMTP id bq11-20020a05620a468b00b007839d816e56mr28996qkb.5.1705930084557;
Mon, 22 Jan 2024 05:28:04 -0800 (PST)
X-Received: by 2002:a05:620a:3ac5:b0:783:8fd1:fc15 with SMTP id
ss5-20020a05620a3ac500b007838fd1fc15mr98147qkn.0.1705930084258; Mon, 22 Jan
2024 05:28:04 -0800 (PST)
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Mon, 22 Jan 2024 05:28:03 -0800 (PST)
In-Reply-To: <9cfbee8c-653d-4e23-bebd-1718de479937n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=Px5Q5QoAAABUOSovaPyEmLcyKmmtjiOn
NNTP-Posting-Host: 217.35.29.56
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
<uo6be3$hq1$1@news.misty.com> <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com>
<9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com> <uog0up$d3e$1@news.misty.com>
<038fa506a2bfe2ad50cbb131e34826af@www.novabbs.com> <9cfbee8c-653d-4e23-bebd-1718de479937n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ec5f0861-cb4b-466b-b764-c1ae9e9f7895n@googlegroups.com>
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
From: michael....@gmail.com (Michael Grant)
Injection-Date: Mon, 22 Jan 2024 13:28:04 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Michael Grant - Mon, 22 Jan 2024 13:28 UTC

I just tried straceing sendmail while I sent some messages.

Here are the cert files that got opened when I sent mail from bottom to strange.networkguild.org:

[bottom /etc/mail #1254] strace -p 3197777 --follow-forks 2>&1 | grep openat
....
[pid 3200438] openat(AT_FDCWD, "/etc/letsencrypt/live/bottom.networkguild.org/privkey.pem", O_RDONLY) = 13
[pid 3200438] openat(AT_FDCWD, "/etc/letsencrypt/live/bottom.networkguild.org/cert.pem", O_RDONLY) = 13
[pid 3200438] openat(AT_FDCWD, "/etc/letsencrypt/live/bottom.networkguild.org/chain.pem", O_RDONLY) = 13

and here are the cert files that got opened when I sent mail to my gmail account:

[pid 3213298] openat(AT_FDCWD, "/etc/letsencrypt/live/bottom.networkguild.org/privkey.pem", O_RDONLY) = 13
[pid 3213298] openat(AT_FDCWD, "/etc/letsencrypt/live/bottom.networkguild.org/cert.pem", O_RDONLY) = 13
[pid 3213298] openat(AT_FDCWD, "/etc/letsencrypt/live/bottom.networkguild.org/chain.pem", O_RDONLY) = 13
....
[pid 3213298] openat(AT_FDCWD, "/etc/ssl/certs/1001acf7.0", O_RDONLY) = 13

ls -l /etc/ssl/certs/1001acf7.0
lrwxrwxrwx 1 root root 15 Jun 17 2020 /etc/ssl/certs/1001acf7.0 -> GTS_Root_R1.pem

It's interesting, it does not look like sendmail even tries to open the X1 cert in /etc/ssl/certs when I send mail from bottom->strange, but when bottom tries to deliver a message to gmail, it does open Google's root cert in /etc/ssl/certs. It's as if sendmail (or libssl in this case) gives up when it sees the cross signed X1 cert signed by the non-existent DST Root CA X3 cert. But the openssl command line tools behave differently.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<21dfa3e4-c25d-44dd-8079-907b82f8f10bn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=936&group=comp.mail.sendmail#936

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:622a:99a:b0:42a:23f8:cfeb with SMTP id bw26-20020a05622a099a00b0042a23f8cfebmr731801qtb.12.1705939180002;
Mon, 22 Jan 2024 07:59:40 -0800 (PST)
X-Received: by 2002:a05:622a:5189:b0:42a:1138:ea92 with SMTP id
ex9-20020a05622a518900b0042a1138ea92mr165396qtb.7.1705939179742; Mon, 22 Jan
2024 07:59:39 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Mon, 22 Jan 2024 07:59:39 -0800 (PST)
In-Reply-To: <ec5f0861-cb4b-466b-b764-c1ae9e9f7895n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=Px5Q5QoAAABUOSovaPyEmLcyKmmtjiOn
NNTP-Posting-Host: 217.35.29.56
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
<uo6be3$hq1$1@news.misty.com> <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com>
<9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com> <uog0up$d3e$1@news.misty.com>
<038fa506a2bfe2ad50cbb131e34826af@www.novabbs.com> <9cfbee8c-653d-4e23-bebd-1718de479937n@googlegroups.com>
<ec5f0861-cb4b-466b-b764-c1ae9e9f7895n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <21dfa3e4-c25d-44dd-8079-907b82f8f10bn@googlegroups.com>
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
From: michael....@gmail.com (Michael Grant)
Injection-Date: Mon, 22 Jan 2024 15:59:39 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2063
 by: Michael Grant - Mon, 22 Jan 2024 15:59 UTC

@HQuest,

I installed the expired DST Root CA X3 cert as you recommended. Here's what Sendmail says now:

STARTTLS=client, relay=strange.networkguild.org., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
STARTTLS=client, cert-subject=/CN=strange.networkguild.org, cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=certificate has expired

Well, it's good news that it does not accept an exipred cert! But it's still not noticing it can use the perfectly valid X1 cert in /etc/ssl/certs.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<8c0aa90233d1536d8931ef8637476d79@www.novabbs.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=937&group=comp.mail.sendmail#937

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!.POSTED!not-for-mail
From: hqu...@hquest.pro.br (HQuest)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3,
verifymsg=unable to get issuer certificate
Date: Mon, 22 Jan 2024 17:00:55 +0000
Organization: novaBBS
Message-ID: <8c0aa90233d1536d8931ef8637476d79@www.novabbs.com>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <uo6be3$hq1$1@news.misty.com> <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com> <9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com> <uog0up$d3e$1@news.misty.com> <038fa506a2bfe2ad50cbb131e34826af@www.novabbs.com> <9cfbee8c-653d-4e23-bebd-1718de479937n@googlegroups.com> <ec5f0861-cb4b-466b-b764-c1ae9e9f7895n@googlegroups.com> <21dfa3e4-c25d-44dd-8079-907b82f8f10bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="188082"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$bqj4T2zCipuOzkMP.ESYQevExHBS63r5wTxJh5BcM1EMtJ9iLVzWq
X-Rslight-Posting-User: 3d3517e5dd24387fdf8da64199401ea731577ab2
X-Spam-Checker-Version: SpamAssassin 4.0.0
 by: HQuest - Mon, 22 Jan 2024 17:00 UTC

Probably because you have both CACERT and CACERT_PATH, it is using the CACERT value first (i.e., your chain.pem certificate that contains the expired certificate) over the CACERT_PATH folder. Why certbot is issuing you a chain with an expired certificate is something you have to check with the Let's Encrypt folks, but you might want to remove the chain.pem off your configuration and use the non-expired certificate under /etc/ssl/certs, then - or, as I suggested, rely on one less certificate in the chain and use a specific root certificate whenever requesting your next certificates. But sure sendmail is not to be blamed here.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<f1e5a4ab-c40c-4fd7-8824-5065ca4c23d1n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=938&group=comp.mail.sendmail#938

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:622a:5a0a:b0:429:f2c3:320e with SMTP id fy10-20020a05622a5a0a00b00429f2c3320emr813992qtb.4.1705948594187;
Mon, 22 Jan 2024 10:36:34 -0800 (PST)
X-Received: by 2002:a05:622a:5908:b0:42a:dc3:3155 with SMTP id
ga8-20020a05622a590800b0042a0dc33155mr738842qtb.11.1705948593877; Mon, 22 Jan
2024 10:36:33 -0800 (PST)
Path: i2pn2.org!i2pn.org!news.niel.me!glou.org!news.glou.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Mon, 22 Jan 2024 10:36:33 -0800 (PST)
In-Reply-To: <8c0aa90233d1536d8931ef8637476d79@www.novabbs.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=Px5Q5QoAAABUOSovaPyEmLcyKmmtjiOn
NNTP-Posting-Host: 217.35.29.56
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
<uo6be3$hq1$1@news.misty.com> <df3c9c5b-dec8-4f94-9566-69a62fc0da17n@googlegroups.com>
<9547caef-1f75-4c9d-b5fd-2795679b3909n@googlegroups.com> <uog0up$d3e$1@news.misty.com>
<038fa506a2bfe2ad50cbb131e34826af@www.novabbs.com> <9cfbee8c-653d-4e23-bebd-1718de479937n@googlegroups.com>
<ec5f0861-cb4b-466b-b764-c1ae9e9f7895n@googlegroups.com> <21dfa3e4-c25d-44dd-8079-907b82f8f10bn@googlegroups.com>
<8c0aa90233d1536d8931ef8637476d79@www.novabbs.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f1e5a4ab-c40c-4fd7-8824-5065ca4c23d1n@googlegroups.com>
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
From: michael....@gmail.com (Michael Grant)
Injection-Date: Mon, 22 Jan 2024 18:36:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Michael Grant - Mon, 22 Jan 2024 18:36 UTC

Ok so I've fixed it. (And there was much rejoicing!) And now I see the confusion.

certbot renew --force-renewal --preferred-chain "ISRG Root X1"

This command fixed things. I ran it on bottom, my outbound mail server. It updated bottom's cert and removed the dependency on the expired X3 cert.

This appears to have 2 effects:
1) when bottom presents its cert, it does not present the X3 chained cert. Totally expected.
2) when bottom receives a cert chain from a remote server, and that cert is a Let's Encrypt cert that also depends on the X3 cert in the chain, bottom now does not have it cached in memory and so does not use it. This was the confusing bit!

Also confusing is that openssl on the command line does not behave this way because it wasn't using the local chain with X3 in it to verify the remote chain. Perhaps there's some option to control that? Regardless, sendmail does not behave in the same way. It's certainly confusing to use the cached cert like this.

To be clear, anyone using sendmail who has an old letsencrypt cert that has an expired X3 in the chain should force renew this cert and prefer it to the X1 root as above. This will fix the verification problem locally when receiving certs other letsencrypt certs, regardless of whether the received cert depends on the expired X3 cert or not. Perhaps a good idea regardless of using sendmail or not.

I would definitely lay some fault on sendmail here. It could have complained about the local cert was depending on an expired cert in its chain and that would have forced me to fix the problem without hours of investigation and this long back and forth exchange. You can argue that sendmail actually didn't depend on the expired X3 cert for it's local cert or that it doesn't actually check such things because it's just sending these things, not verifying them--that's the other end's job. I would argue against that. It should try to validate these things on start and at least log this. I would classify that as validating your config.

Now, let's turn our attention to letsencrypt, or rather certbot. In reading the man page, it appears that certbot, by default, uses the original chain that the certificate was issued with, unless otherwise asked for, for example with the preferred-chain option. Presumably all new certbot certs would not get the old X3 cert? But I did actually try and delete strange's cert (my test client) and completely reissue it and it got the X3 cert in the chain, so I'm not so sure. Maybe letsencrypt cached the chain on their server? I will have to check next time I create a fresh new cert for a new domain if the X3 cert is in the chain. Honestly, it's an accident waiting to happen to automatically keep the expired X3 cert in the chain like that. This feels like a bug to me. I can't see any good reason why it would be good to default to keeping an expired cert in the chain and hope that all the software that used such a chain was smart enough to not use it and look for a better X1 cert.

Thanks everyone for helping sort this mystery out!

Michael Grant

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<uonl8v$m5a$1@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=939&group=comp.mail.sendmail#939

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_...@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
Date: Tue, 23 Jan 2024 01:10:39 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <uonl8v$m5a$1@news.misty.com>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com> <21dfa3e4-c25d-44dd-8079-907b82f8f10bn@googlegroups.com> <8c0aa90233d1536d8931ef8637476d79@www.novabbs.com> <f1e5a4ab-c40c-4fd7-8824-5065ca4c23d1n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 23 Jan 2024 06:10:39 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="22698"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Tue, 23 Jan 2024 06:10 UTC

Michael Grant wrote:

> I would definitely lay some fault on sendmail here. It could have
> complained about the local cert was depending on an expired cert in its
> chain and that would have forced me to fix the problem without hours of

Send a patch for another "DontBlameSendmail" option, including tests
which check the "correctness" of the patch.

--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<uoq15b$2cs$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=940&group=comp.mail.sendmail#940

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.198.18.1.140!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
Date: Tue, 23 Jan 2024 21:45:47 -0600
Organization: TNet Consulting
Message-ID: <uoq15b$2cs$1@tncsrv09.home.tnetconsulting.net>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
<21dfa3e4-c25d-44dd-8079-907b82f8f10bn@googlegroups.com>
<8c0aa90233d1536d8931ef8637476d79@www.novabbs.com>
<f1e5a4ab-c40c-4fd7-8824-5065ca4c23d1n@googlegroups.com>
<uonl8v$m5a$1@news.misty.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Jan 2024 03:45:47 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="198.18.1.140";
logging-data="2460"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <uonl8v$m5a$1@news.misty.com>
 by: Grant Taylor - Wed, 24 Jan 2024 03:45 UTC

I don't see the OP's messages because of all the spam from Google Groups.

Michael Grant wrote:
> I would definitely lay some fault on sendmail here. It could have
> complained about the local cert was depending on an expired cert in its
> chain and that would have forced me to fix the problem without hours of

Sendmail is in good company; Apache HTTP Server, NginX, Postfix, and IIS
will also happily start with expired certs somewhere in the chain.

Most daemons that I use trust that the system administrator knows what
they are doing and as such might have a good reason to start using an
expired cert that is beyond the daemon's understanding.

--
Grant. . . .

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<47901148-e9d5-469e-ae56-e3e2f6429a63n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=941&group=comp.mail.sendmail#941

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:a05:622a:8ca:b0:429:fc23:e1ef with SMTP id i10-20020a05622a08ca00b00429fc23e1efmr1911qte.4.1706145030227;
Wed, 24 Jan 2024 17:10:30 -0800 (PST)
X-Received: by 2002:a05:620a:4551:b0:783:3636:7799 with SMTP id
u17-20020a05620a455100b0078336367799mr33424qkp.15.1706145029914; Wed, 24 Jan
2024 17:10:29 -0800 (PST)
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.sendmail
Date: Wed, 24 Jan 2024 17:10:29 -0800 (PST)
In-Reply-To: <uoq15b$2cs$1@tncsrv09.home.tnetconsulting.net>
Injection-Info: google-groups.googlegroups.com; posting-host=217.35.29.56; posting-account=vDcx0QoAAACdyRto6OQuAjET8QWU9Bo1
NNTP-Posting-Host: 217.35.29.56
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
<21dfa3e4-c25d-44dd-8079-907b82f8f10bn@googlegroups.com> <8c0aa90233d1536d8931ef8637476d79@www.novabbs.com>
<f1e5a4ab-c40c-4fd7-8824-5065ca4c23d1n@googlegroups.com> <uonl8v$m5a$1@news.misty.com>
<uoq15b$2cs$1@tncsrv09.home.tnetconsulting.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <47901148-e9d5-469e-ae56-e3e2f6429a63n@googlegroups.com>
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
From: michael....@clinicalandherbal.com (Michael Grant)
Injection-Date: Thu, 25 Jan 2024 01:10:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5842
 by: Michael Grant - Thu, 25 Jan 2024 01:10 UTC

On Wednesday, January 24, 2024 at 3:45:50 AM UTC, Grant Taylor wrote:
> I don't see the OP's messages because of all the spam from Google Groups.
> Michael Grant wrote:
> > I would definitely lay some fault on sendmail here. It could have
> > complained about the local cert was depending on an expired cert in its
> > chain and that would have forced me to fix the problem without hours of
> Sendmail is in good company; Apache HTTP Server, NginX, Postfix, and IIS
> will also happily start with expired certs somewhere in the chain.
>
> Most daemons that I use trust that the system administrator knows what
> they are doing and as such might have a good reason to start using an
> expired cert that is beyond the daemon's understanding.

Grant, it's not about starting with an expired cert or not, though I do think sendmail should at least log that's what it's doing so the admin has the chance to notice the expired cert in the chain. I have started looking at the source to see if I can do make it do that.

The confusing thing here is that sendmail used the expired root cert of it's own server cert while verifying a remote cert. This definitely seems wrong to me, or at best confusing, especially in light it didn't log that it's own server cert was expired, or rather, one branch of it was.

I don't know if this is clear, let me try to spell this out:

Let's call the local server cert L. The local sendmail is configured with a cert which has a chain like L -> A -> B where B is a root CA cert (L is the cert in the cert file and A and B in the chain file). The L cert is issued by A and A is issued by B. But A has a second issuer called C which is in the local CA store. Hence you could also verify A by either B or C (as in L->A->B or L->A->C might both be valid chains, B in the chain file or C in the store). However, B has expired, but it's ok because C is still valid, so L -> A -> C is a verifiable good chain, you just ignore B in the chain and use C from the local cert store. All good, the server starts without complaint.

Then, at some point, the local server connects outbound to some remote server that just happens to use a cert also issued by A (the same A that issued the local cert L) and the remote proffers up the chain R -> A -> B, but as we noted, B is expired. Instead of looking in the cert store to find C, sendmail gives up and fails to verify R. And you might say, of course it does because the remote server sent the chain R -> A -> B and B has expired, of course it failed!

But wait... here's where it gets interesting! If, instead, when you configured the server's local server cert you configured it L -> A (meaning you put L in the cert file and just A in the chain file), and then when the remote server proffers up the chain R -> A -> B, it verifies good! Even though B is expired! Whoa! Sendmail somehow uses the store's A -> C chain and overlooks the expired B cert!

Therefor the second issue here I am raising--and I will try to fix it in sendmail as well as the first above-- is that when sendmail verifies R -> A -> B chain, it should not depend on the expired B cert it cached from the cert chain of it's own certificate chain. It should not be depending on some cached cert in the chain that it held onto from it's own local server cert chain. It should not co-mingle the verification chains of both the local and remote certificates.

And coming back to the comment about logging the expired cert, if sendmail had in fact logged the that the local cert depended on an expired cert in the chain as configured, that alone probably would have been enough for me to have spotted what was going on rather than depend on trial and error debugging.

Web server daemons don't normally make outbound connections and verify a remote cert, that's what a web browser does. Web browsers don't normally get configured with client certificates. This is why this situation does not arise with things like apache, nginx, and IIS. I do not know about Postfix.. I do not know if it's possible to reproduce this situation with a client and server cert using the command line openssl tools.

Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get issuer certificate

<uosigt$8mi$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=942&group=comp.mail.sendmail#942

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.198.18.1.140!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.mail.sendmail
Subject: Re: cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to
get issuer certificate
Date: Wed, 24 Jan 2024 20:54:21 -0600
Organization: TNet Consulting
Message-ID: <uosigt$8mi$1@tncsrv09.home.tnetconsulting.net>
References: <deabd83a-e81f-41ea-8b45-3da80a692f6cn@googlegroups.com>
<21dfa3e4-c25d-44dd-8079-907b82f8f10bn@googlegroups.com>
<8c0aa90233d1536d8931ef8637476d79@www.novabbs.com>
<f1e5a4ab-c40c-4fd7-8824-5065ca4c23d1n@googlegroups.com>
<uonl8v$m5a$1@news.misty.com> <uoq15b$2cs$1@tncsrv09.home.tnetconsulting.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 25 Jan 2024 02:54:21 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="198.18.1.140";
logging-data="8914"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <uoq15b$2cs$1@tncsrv09.home.tnetconsulting.net>
 by: Grant Taylor - Thu, 25 Jan 2024 02:54 UTC

On 1/23/24 21:45, Grant Taylor wrote:
> I don't see the OP's messages because of all the spam from Google Groups.

Thank you for emailing me directly Michael.

I'm replying here in the hopes that what I write can help multiple people.

On 1/24/24 19:12, Michael Grant wrote:
> When I send mail from one of my servers to the other (both using
> sendmail 8.17.2), I am seeing this in my mail logs:

I believe I ran into a similar issue between some (then) 2-4 year old
Sendmail installs on a pair of my systems a few years ago.

> STARTTLS=client, cert-subject=/CN=mail.networkguild.org,
> cert-issuer=/C=US/O=Let's+20Encrypt/CN=R3, verifymsg=unable to get
> issuer certificate

This looks very familiar to me.

> If I verify the cert by hand using:
>
> openssl s_client -starttls smtp -showcerts -connect
> mail.networkguild.org:25 -servername mail.networkguild.org

Please elaborate on what "verify" means in this context. Are you
checking / comparing things by hand / script (grep, et al.)? Or are you
using the `openssl verify` (sub)command?

% time (openssl s_client -starttls smtp -showcerts -connect
mail.networkguild.org:25 -servername mail.networkguild.org < /dev/null
|& openssl verify)
stdin: OK
( openssl s_client -starttls smtp -showcerts -connect
mail.networkguild.org:2) 0.01s user 0.00s system 0% cpu 13.132 total

Aside: I'm surprised that it's taking 13 seconds to do this. I can
only assume that you have something akin to pre-greeting traffic
filtering. Though I would think that would be after the TCP+TLS
connection establishes and before the SMTP greeting banner.

> it verifies OK and sees all the certificates in the chain.

This seems remarkably similar to an issue I had between the two systems
running Sendmail alluded to above.

From memory, what I found after hours of digging is that one of the
root certificates that was then used to cross sign the Let's Encrypt
certificates had expired.

Like you I was providing the full chain.

But something about the OpenSSL install I was using still wasn't happy.

I don't have notes at hand, but I remember one of the root certificate
files in /etc/ssl/certs contained the current LE root /and/ the expired
cross signing cert (full chain of sorts). This expired cross signing
cert was being found and used by OpenSSL /before/ the current cross
signing cert in the same /etc/ssl/certs directory.

....

Yep, looking back at the script that I'm using to manage certificates
collected by acme.sh (I don't let acme.sh install things for me) I see
that the ca.cer (PEM) file that it downloads contains two certificates:

1st what is probably best described as an intermediate certificate:

subject= /C=US/O=Let's Encrypt/CN=R3
notBefore=Sep 4 00:00:00 2020 GMT
notAfter=Sep 15 16:00:00 2025 GMT
serial=912B084ACF0C18A753F6D62E25A75F5A
issuer= /C=US/O=Internet Security Research Group/CN=ISRG Root X1

2nd what is probably best described as the root certificate:

subject= /C=US/O=Internet Security Research Group/CN=ISRG Root X1
notBefore=Jan 20 19:14:03 2021 GMT
notAfter=Sep 30 18:14:03 2024 GMT
serial=4001772137D4E942B8EE76AA3C640AB7
issuer= /O=Digital Signature Trust Co./CN=DST Root CA X3

The above output came from the following command:

cat ca.cer | awk 'BEGIN{cmd="openssl x509 -noout -subject -dates -serial
-issuer -extensions subjectAltName; echo"}/BEGIN CERTIFICATE/,/END
CERTIFICATE/{print | cmd}/END CERTIFICATE/{close(cmd)}'

So, I'm having openssl read in ca.cer and write out the first
certificate to another file. -- I then use /just/ the one certificate
(currently serial=912B084ACF0C18A753F6D62E25A75F5A) and my certificate
to generate a new chain that doesn't include the other (expired at the
time I worked on this) certs in the chain.

As best as I could tell, this was all about things in the full chain
file from acme.sh (I don't know if it amalgamated it or if it acme.sh
simply downloaded it from somewhere else, maybe Let's Encrypt
themselves) being expired and the expired root cert being used /before/
OpenSSL would use the (then) current / new root cert in /etc/ssl/certs.

Upon spot checking this, I found that there was a smattering of
different numbers of certs in different files in /etc/ssl/certs.

Fortunately for me I was able to work around the problem for Let's
Encrypt which is what I cared about.

> I am indeed using the fullchain.pem file in my sendmail config. I've
> tried using both fullchain.pem and cert.pem as the CAcert file,
> result is the same.

I currently have the following in my sendmail.cf file (set via sendmail.mc):

# CA directory
O CACertPath=/etc/ssl/certs
# CA file
O CACertFile=/etc/mail/tls/letsencrypt-ca.cer

I want to say that the CACertFile wasn't strictly necessary after I
fixed things in the CACertPath.

N.B. the CACertFile is the file I extract just the 1st certificate
(currently serial=912B084ACF0C18A753F6D62E25A75F5A) into.

> My 'CN=mail.networkguild.org' depends on the 'CN=R3' cert. The 'CN=R3'
> cert depends on a cert named 'CN = ISRG Root X1'. I definitely see
> that cert both in the chain my mail server presents and in /etc/ssl.

This seems strikingly familiar.

I suspect that if (when) you dig, you will find that there may be an
expired certificate in another file, possibly the full chain file, that
is interfering with you.

> I'm not sure if this is a debian issue, a sendmail issue, or a cert
> issue. The fact that my cert verifies from other sites seems to
> indicate it may be a sendmail sending issue, but I'm not sure.

The systems that I ran into this issue on was a (now) ~5 year old Ubuntu
install. So it may be an upstream Debian issue that Ubuntu is inheriting.

Or it may have been a bug in the acme.sh client version I was using at
the time.

> Anyone have any ideas how to get sendmail to say this cert is valid?

As you can see above, the system that I'm talking about thinks that your
server's certificate /is/ valid and /does/ verify.

This is a VERY DEEP in the weeds issue. I spent hours over a few days
debugging this.

I spent the time debugging this because my servers are using their
certificate when they are sending / relaying through each other and I'm
allowing relay based on CERTISSUER+CERTSUBJECT in AccessDB:

# Allow <SERVER> to relay based on client TLS certificate.
CERTISSUER:/C=US/O=Let's+20Encrypt/CN=R3 SUBJECT
CERTSUBJECT:/CN=<SERVER1 subject> RELAY
CERTSUBJECT:/CN=<SERVER2 subject> RELAY

Please feel free to email me again if you'd like to discuss any private
command output / investigation.

I hope my write is helpful.

--
Grant. . . .

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor