Re: Problem with FEATURE(`sts'): bogus "not listed in SANs" rejects

Liste des GroupesRevenir à cm sendmail 
Sujet : Re: Problem with FEATURE(`sts'): bogus "not listed in SANs" rejects
De : bjorn (at) *nospam* mork.no (Bjørn Mork)
Groupes : comp.mail.sendmail
Date : 29. Oct 2024, 12:11:35
Autres entêtes
Organisation : m
Message-ID : <87r07zi2oo.fsf@miraculix.mork.no>
References : 1 2
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
OK, I will not claim to understand any of the sendmail cf language, but
trying to reduce this problem to a test.cf file like this:

C{cert_altnames}*.olc.protection.outlook.com
D{server_name}outlook-com.olc.protection.outlook.com
SSTS_SAN
R$* $: $&{server_name}
R$={cert_altnames} $@ ok
# strip only one level (no recursion!)
R$-.$+ $: $2
R *.$={cert_altnames} $@ ok
R$* $#error $@ 4.7.0 $: 450 $&{server_name} not listed in SANs

and running that through sendmail -bt -Ctest.cf will reproduce the problem:

 > STS_SAN foo
 STS_SAN            input: foo
 STS_SAN          returns: $# error $@ 4 . 7 . 0 $: 450 outlook-com . olc . protection . outlook . com not listed in SANs

What I do not understand is why the rule doesn't simply rewrite
"outlook-com.olc.protection.outlook.com" to
"*.olc.protection.outlook.com" and then repeat the class lookup with
that.  Like this, which seems to work for me:

SSTS_SANFIX
R$* $: $&{server_name}
R$={cert_altnames} $@ ok
# strip only one level (no recursion!)
R$-.$+ $: *.$2
R$={cert_altnames} $@ ok
R$* $#error $@ 4.7.0 $: 450 $&{server_name} not listed in SANs

Running that I get:

 > STS_SANFIX foo
 STS_SANFIX         input: foo
 STS_SANFIX       returns: ok
 > ${server_name}
 outlook-com.olc.protection.outlook.com
 > $={cert_altnames}
 *.olc.protection.outlook.com

And it still seems to work as it should with non-matching names:

 > .D{server_name}example.com
 > STS_SANFIX foo
 STS_SANFIX         input: foo
 STS_SANFIX       returns: $# error $@ 4 . 7 . 0 $: 450 example . com not listed in SANs

Exact matches also continue to work.  Adding example.com to the class
and run again:

 > .C{cert_altnames}example.com
 > $={cert_altnames}
 example.com
 *.olc.protection.outlook.com
 > STS_SANFIX foo
 STS_SANFIX         input: foo
 STS_SANFIX       returns: ok


So, what do you think?  Is that the correct fix or am I missing
something?



Bjørn

Date Sujet#  Auteur
29 Oct 24 * Problem with FEATURE(`sts'): bogus "not listed in SANs" rejects14Bjørn Mork
29 Oct 24 +* Re: Problem with FEATURE(`sts'): bogus "not listed in SANs" rejects10Bjørn Mork
29 Oct 24 i+* Re: Problem with FEATURE('sts'): bogus "not listed in SANs" rejects8HQuest
29 Oct 24 ii`* Re: Problem with FEATURE('sts'): bogus "not listed in SANs" rejects7Bjørn Mork
29 Oct 24 ii `* Re: Problem with FEATURE('sts'): bogus "not listed in SANs" rejects6Claus Aßmann
29 Oct 24 ii  `* Re: Problem with FEATURE('sts'): bogus "not listed in SANs" rejects5Marco Moock
30 Oct 24 ii   `* Re: Problem with FEATURE('sts'): bogus "not listed in SANs" rejects4Claus Aßmann
30 Oct 24 ii    `* Re: Problem with FEATURE('sts'): bogus "not listed in SANs" rejects3HQuest
31 Oct 24 ii     `* Re: Problem with FEATURE('sts'): bogus "not listed in SANs" rejects2Claus Aßmann
11 Nov 24 ii      `- Re: Problem with FEATURE('sts'): bogus "not listed in SANs" rejects1Bjørn Mork
29 Oct 24 i`- Re: Problem with FEATURE(`sts'): bogus "not listed in SANs" rejects1Bjørn Mork
27 Dec 24 `* Re: Problem with FEATURE(`sts'): bogus "not listed in SANs" rejects3Marco Moock
27 Dec 24  `* Re: Problem with FEATURE(`sts'): bogus "not listed in SANs" rejects2Bjørn Mork
27 Dec 24   `- Re: Problem with FEATURE(`sts'): bogus "not listed in SANs" rejects1Marco Moock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal