Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

There *__is* no such thing as a civil engineer.


computers / comp.mail.sendmail / Change SSL security level per host/IP when sending email

SubjectAuthor
* Change SSL security level per host/IP when sending emailAMM
`* Re: Change SSL security level per host/IP when sending emailClaus Aßmann
 `* Re: Change SSL security level per host/IP when sending emailAMM
  `* Re: Change SSL security level per host/IP when sending emailClaus Aßmann
   `* Re: Change SSL security level per host/IP when sending emailAMM
    `- Re: Change SSL security level per host/IP when sending emailAMM

1
Change SSL security level per host/IP when sending email

<42a902a9-bf1c-4bcd-8234-c3d889b82cf7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.mail.sendmail
X-Received: by 2002:ac8:534b:0:b0:428:34c3:beb0 with SMTP id d11-20020ac8534b000000b0042834c3beb0mr63222qto.1.1704260620207;
Tue, 02 Jan 2024 21:43:40 -0800 (PST)
X-Received: by 2002:ac8:5c10:0:b0:428:38d5:4a73 with SMTP id
i16-20020ac85c10000000b0042838d54a73mr29687qti.10.1704260619914; Tue, 02 Jan
2024 21:43:39 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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, 2 Jan 2024 21:43:39 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=49.36.123.189; posting-account=GZdWHQoAAAAxLNWSpxhZUxm6mPT5W7_R
NNTP-Posting-Host: 49.36.123.189
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <42a902a9-bf1c-4bcd-8234-c3d889b82cf7n@googlegroups.com>
Subject: Change SSL security level per host/IP when sending email
From: anon.am...@gmail.com (AMM)
Injection-Date: Wed, 03 Jan 2024 05:43:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1865
 by: AMM - Wed, 3 Jan 2024 05:43 UTC

Hello,

Recently I switched to OpenSSL 3.2 which now defaults to security level 2 by default. Which means that it now requires DH key to be atleast 2048 bit long.

For details see:
https://www.openssl.org/docs/man3.2/man3/SSL_CTX_set_security_level.html

Due to this when sendmail sends email to (now broken) server, which still uses 1024 bit DH keys, then email fails with "DH key too small" SSL error.

SMTP reply comes as "454 4.7.0 TLS handshake failed."

Example server: mail.rediffmailpro.com

Is there a way I can ask sendmail to downgrade security level to 1, for that particular server? (say via clt_features?)

Currently I fixed the problem by disabling TLS for that server:
Try_TLS:mail.rediffmailpro.com NO

But I do not want to disable TLS completely. I just want it to switch to security level 1.

Any idea?

Thanks and regards

AMM

Re: Change SSL security level per host/IP when sending email

<un2u6l$d5l$1@news.misty.com>

  copy mid

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

  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: Change SSL security level per host/IP when sending email
Date: Wed, 3 Jan 2024 01:17:57 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <un2u6l$d5l$1@news.misty.com>
References: <42a902a9-bf1c-4bcd-8234-c3d889b82cf7n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 3 Jan 2024 06:17:57 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="13493"; 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 - Wed, 3 Jan 2024 06:17 UTC

AMM wrote:

> Recently I switched to OpenSSL 3.2 which now defaults to security level
> 2 by default. Which means that it now requires DH key to be atleast 2048
> bit long.

BTW: so no DANE support enabled for sendmail?

> Due to this when sendmail sends email to (now broken) server, which
> still uses 1024 bit DH keys, then email fails with "DH key too small"
> SSL error.

Did you try to disable ciphersuites which use DH?

> But I do not want to disable TLS completely. I just want it to switch to
> security level 1.

Can you override it via the OpenSSL config file?
As documented:

Note: OpenSSL 3 loads by default an openssl.cnf file from a location
specified in the library which may cause unwanted behaviour in
sendmail. Hence sendmail sets the environment variable OPENSSL_CONF
to /etc/mail/sendmail.ossl to override the default. The file name
can be changed by defining confOPENSSL_CNF in the mc file; using
an empty value prevents setting OPENSSL_CONF. Note: referring to
a file which does not exist does not cause an an error.

--
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: Change SSL security level per host/IP when sending email

<un3188$34e1a$1@dont-email.me>

  copy mid

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

  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: anon.am...@gmail.com (AMM)
Newsgroups: comp.mail.sendmail
Subject: Re: Change SSL security level per host/IP when sending email
Date: Wed, 3 Jan 2024 12:39:57 +0530
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <un3188$34e1a$1@dont-email.me>
References: <42a902a9-bf1c-4bcd-8234-c3d889b82cf7n@googlegroups.com>
<un2u6l$d5l$1@news.misty.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 3 Jan 2024 07:10:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="617da1af772d77d342987029a0466d8e";
logging-data="3291178"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+15L9Kd5bPxTT4TpVm9v9pIQQCg55RWY0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:wfDxdITQ6Ft082W+TEFOFJaprXs=
In-Reply-To: <un2u6l$d5l$1@news.misty.com>
Content-Language: en-US
 by: AMM - Wed, 3 Jan 2024 07:09 UTC

Hello

Thank you for prompt reply.

On 03/01/24 11:47, Claus Aßmann wrote:
> AMM wrote:
>
>> Recently I switched to OpenSSL 3.2 which now defaults to security level
>> 2 by default. Which means that it now requires DH key to be atleast 2048
>> bit long.
>
> BTW: so no DANE support enabled for sendmail?

I can see -DDANE mentioned in site.config.m4 but I have no clue what it
does.

>> Due to this when sendmail sends email to (now broken) server, which
>> still uses 1024 bit DH keys, then email fails with "DH key too small"
>> SSL error.
>
> Did you try to disable ciphersuites which use DH?

No but I dont intend to do this for all domains but just for certain
domains.

>> But I do not want to disable TLS completely. I just want it to switch to
>> security level 1.
>
> Can you override it via the OpenSSL config file?
> As documented:
>
> Note: OpenSSL 3 loads by default an openssl.cnf file from a location
> specified in the library which may cause unwanted behaviour in
> sendmail. Hence sendmail sets the environment variable OPENSSL_CONF
> to /etc/mail/sendmail.ossl to override the default. The file name
> can be changed by defining confOPENSSL_CNF in the mc file; using
> an empty value prevents setting OPENSSL_CONF. Note: referring to
> a file which does not exist does not cause an an error.

Again this will switch security level to 1 for all emails instead of
only for certain domains.

It would be nice if this feature can be implemented in clt_features,
where it will use security level 1 for certain domains.

Thank you.

AMM

Re: Change SSL security level per host/IP when sending email

<un3d7t$10b$1@news.misty.com>

  copy mid

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

  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: Change SSL security level per host/IP when sending email
Date: Wed, 3 Jan 2024 05:34:37 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <un3d7t$10b$1@news.misty.com>
References: <42a902a9-bf1c-4bcd-8234-c3d889b82cf7n@googlegroups.com> <un2u6l$d5l$1@news.misty.com> <un3188$34e1a$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 3 Jan 2024 10:34:37 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="1035"; 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 - Wed, 3 Jan 2024 10:34 UTC

AMM wrote:

> >> Recently I switched to OpenSSL 3.2 which now defaults to security level

> I can see -DDANE mentioned in site.config.m4 but I have no clue what it

Look for DANE in the fine documentation...
Do you use OpenSSL 3.2.0 and sendmail 8.18?
The former has a bug in its DANE code.

> It would be nice if this feature can be implemented in clt_features,
> where it will use security level 1 for certain domains.

That's not possible - sendmail does not support those openssl
"security level"s.

Do you actually gain anything by using "security level 2"
then using STARTTLS in an MTA?
Just because the OpenSSL people thought it would be a cool
feature doesn't mean it's useful for SMTP (AFAIR postfix
disables that stuff too).

--
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: Change SSL security level per host/IP when sending email

<un56ma$3hekd$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anon.am...@gmail.com (AMM)
Newsgroups: comp.mail.sendmail
Subject: Re: Change SSL security level per host/IP when sending email
Date: Thu, 4 Jan 2024 08:25:03 +0530
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <un56ma$3hekd$1@dont-email.me>
References: <42a902a9-bf1c-4bcd-8234-c3d889b82cf7n@googlegroups.com>
<un2u6l$d5l$1@news.misty.com> <un3188$34e1a$1@dont-email.me>
<un3d7t$10b$1@news.misty.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 4 Jan 2024 02:55:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f1358ff4455866732aa4a1844651c3a";
logging-data="3717773"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9rNrRWGLOWJXf/+eqeEvyoGt05yJepFg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:rRr7y8nMP6ggqj221ev8/7AtQmA=
Content-Language: en-US
In-Reply-To: <un3d7t$10b$1@news.misty.com>
 by: AMM - Thu, 4 Jan 2024 02:55 UTC

On 03/01/24 16:04, Claus Aßmann wrote:
> AMM wrote:
>
>>>> Recently I switched to OpenSSL 3.2 which now defaults to security level
>
>> I can see -DDANE mentioned in site.config.m4 but I have no clue what it
>
> Look for DANE in the fine documentation...
> Do you use OpenSSL 3.2.0 and sendmail 8.18?
> The former has a bug in its DANE code.

Can it create an issue if I dont use DANE? But have -DDANE specified
site.config.m4 when compiling sendmail.

I use OpenSSL 3.2.0 and sendmail 8.17.2 - via Arch Linux repository.

>> It would be nice if this feature can be implemented in clt_features,
>> where it will use security level 1 for certain domains.
>
> That's not possible - sendmail does not support those openssl
> "security level"s.

Then I think it should. Because if you dont use any security level then
default security level is used anyway. (1 for OpenSSL < 3.2.0 and 2 for
OpenSSL >= 3.2.0)

https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html

Sooner or later when people start moving to OpenSSL 3.2.0 there will be
a case that certain X servers will be using OpenSSL >= 3.2.0 and certain
Y servers will be using OpenSSL < 3.2.0 and they wont be able to connect
to each other.

So sendmail will need to provide an option to either decrease security
level to 1 globally OR provide that option in srv/clt_features.

> Do you actually gain anything by using "security level 2"
> then using STARTTLS in an MTA?
> Just because the OpenSSL people thought it would be a cool
> feature doesn't mean it's useful for SMTP (AFAIR postfix
> disables that stuff too).

It does use STARTTLS. Error occurs after STARTTLS.

As per OpenSSL Security Level 1 is now not so secure.

If you Google "Is DH 1024 safe", you will see that most experts mention
it as weak. That is the reason OpenSSL is moving to Security level 2.

If you can guide me then I can create a patch where it downgrades
security level to 1. (for now)

Thank you and regards

AMM.

Re: Change SSL security level per host/IP when sending email

<un5gl5$3ien7$1@dont-email.me>

  copy mid

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

  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: anon.am...@gmail.com (AMM)
Newsgroups: comp.mail.sendmail
Subject: Re: Change SSL security level per host/IP when sending email
Date: Thu, 4 Jan 2024 11:15:06 +0530
Organization: A noiseless patient Spider
Lines: 79
Message-ID: <un5gl5$3ien7$1@dont-email.me>
References: <42a902a9-bf1c-4bcd-8234-c3d889b82cf7n@googlegroups.com>
<un2u6l$d5l$1@news.misty.com> <un3188$34e1a$1@dont-email.me>
<un3d7t$10b$1@news.misty.com> <un56ma$3hekd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 4 Jan 2024 05:45:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f1358ff4455866732aa4a1844651c3a";
logging-data="3750631"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jt/fdmGei+gc8ytp8HD9xKzj0LsqNDbo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Buedz3oixUL3t7K4IIJf1U/pBA0=
In-Reply-To: <un56ma$3hekd$1@dont-email.me>
Content-Language: en-US
 by: AMM - Thu, 4 Jan 2024 05:45 UTC

OK I resolved this by adding this in CipherList in sendmail.cf/.mc.

O CipherList=...:@SECLEVEL=1

This asks OpenSSL to use Security Level as 1 instead of default 2.

If you do not want to do it globally but only for broken server then see
FEATURE(tls_clt_features). I have not tested this but it can be starting
point.

Hope it helps others who have same issue of "DH key too small" when
sending email to some servers.

This way you do not need to disable STARTTLS for that server but still
support servers which still use 1028bit DH key.

Regards,

AMM

On 04/01/24 08:25, AMM wrote:
>
>
> On 03/01/24 16:04, Claus Aßmann wrote:
>> AMM  wrote:
>>
>>>>> Recently I switched to OpenSSL 3.2 which now defaults to security
>>>>> level
>>
>>> I can see -DDANE mentioned in site.config.m4 but I have no clue what it
>>
>> Look for DANE in the fine documentation...
>> Do you use OpenSSL 3.2.0 and sendmail 8.18?
>> The former has a bug in its DANE code.
>
> Can it create an issue if I dont use DANE? But have -DDANE specified
> site.config.m4 when compiling sendmail.
>
> I use OpenSSL 3.2.0 and sendmail 8.17.2 - via Arch Linux repository.
>
>>> It would be nice if this feature can be implemented in clt_features,
>>> where it will use security level 1 for certain domains.
>>
>> That's not possible - sendmail does not support those openssl
>> "security level"s.
>
> Then I think it should. Because if you dont use any security level then
> default security level is used anyway. (1 for OpenSSL < 3.2.0 and 2 for
> OpenSSL >= 3.2.0)
>
> https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html
>
> Sooner or later when people start moving to OpenSSL 3.2.0 there will be
> a case that certain X servers will be using OpenSSL >= 3.2.0 and certain
> Y servers will be using OpenSSL < 3.2.0 and they wont be able to connect
> to each other.
>
> So sendmail will need to provide an option to either decrease security
> level to 1 globally OR provide that option in srv/clt_features.
>
>> Do you actually gain anything by using "security level 2"
>> then using STARTTLS in an MTA?
>> Just because the OpenSSL people thought it would be a cool
>> feature doesn't mean it's useful for SMTP (AFAIR postfix
>> disables that stuff too).
>
> It does use STARTTLS. Error occurs after STARTTLS.
>
> As per OpenSSL Security Level 1 is now not so secure.
>
> If you Google "Is DH 1024 safe", you will see that most experts mention
> it as weak. That is the reason OpenSSL is moving to Security level 2.
>
> If you can guide me then I can create a patch where it downgrades
> security level to 1. (for now)
>
> Thank you and regards
>
> AMM.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor