On 12/28/2024 5:57 PM, Paul McKinley via Cygwin wrote:

I'm trying to set up cygwin /usr/bin/email to send the output of various cron jobs to email.

I previously had this set up and working on Windows 10, and with another hosting provider (WHM/Cpanel on CentOS with exim).  Now I am running Windows 11 (24H2), with a fresh Cygwin install CYGWIN_NT-10.0-26100 3.5.5-1.x86_64.  The SMTP server is with a new hosting provider - InMotion Hosting, a vps running AlmaLinux v8.10.0 STANDARD virtuozzo cpanel/whm 124.0.21 with exim email server.

I'm getting a timeout connecting to the smtp server using a test command-line call to /usr/bin/email (names have been changed to protect the guilty):

[snip]
USE_TLS = 'true'
SMTP_AUTH = 'LOGIN'
SMTP_AUTH_USER = 'myu...@mydomain.com'
SMTP_AUTH_PASS = 'mypassword'

I've also tried using port 465, get

Init connection...
email: FATAL: Smtp error: Timeout(10) while trying to read from SMTP server

The notes on /usr/bin/email mention the TLS is somewhat primitive, I'm wondering if there's an issue with connecting to the later version of exim?  Or maybe I'm missing - or messing - something in the configuration either cygwin or server side?

Perhaps this is relevant (from Microsoft):

"Starting in Windows 11 Insider Preview builds for September 2023 and continuing in future Windows OS releases, TLS 1.0 and 1.1 will be disabled by default. This change increases the security posture of Windows customers and encourages modern protocol adoption. For organizations that need to use these versions, there's an option to re-enable TLS 1.0 or TLS 1.1. For more information, see Resources for deprecated features."

and:

"If there are no alternatives available and TLS 1.0 or TLS 1.1 is needed, the protocol versions can be re-enabled with a system registry setting. To override a system default and set a (D)TLS or SSL protocol version to the Enabled state:
...
TLS 1.1:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
      "Enabled" = dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
      "Enabled" = dword:00000001
... (disclaimer)
"

The other option is to change eMail to use a newer version (I vaguely recall helping with this on the git issues page, but I might be mistaken. It was a trivial change in the code, can't remember if it was accepted and its already there with version:

$ email --version
email - By Dean Jones; Version 3.2.3-git

Anyway it is in my local install (I build it myself before it was a Cygwin package), and I'm pretty sure it doesn't work anymore, so more code changes are needed.

Hope this helps!
--
R.B.


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to