I'll try to ask for help in the more frequented French area, excuse my poor English (I'm actually Italian)
I get problems sending e-mails from the command line, both Windows and Nix
Basically, for an unknown reason, ssl0.ovh.net does not always "route" traffic to the SMTP server (!)
Perhaps it is better to give an example (smtp-cli, nix)
We need to enforce -ssl, port 465, and plain auth
smtp-cli -verbose --auth-plain -ssl -server=ssl0.ovh.net --port 465 -4 -user=log@francocorbelli.it -pass=mygoodpassword -from=log@francocorbelli.it -to dottcorbelli@gmail.com -subject "prova OVH"
The result
Connection from 192.168.1.254:34707 to 193.70.18.144:465
Starting SMTP/SSL…
Using cipher: ECDHE-RSA-AES256-GCM-SHA384
Subject Name: /CN=ns0.ovh.net
Issuer Name: /C=GB/ST=Greater Manchester/L=Salford/O=Sectigo Limited/CN=Sectigo RSA Domain Validation Secure Server CA
[220] 'GARM-110S004 Thursday, May 4, 2023'
> HELO localhost
[250] 'OVH Mail Proxy'
> MAIL FROM:
[530] '5.7.1 Client was not authenticated'
MAIL FROM failed: '530 5.7.1 Client was not authenticated'
Please look at the answer: it is [250] 'OVH Mail Proxy
OK, let's try with curl a quick-and-dirty.
This WORKS
curl -v --ssl-reqd "smtps://ssl0.ovh.net:465" --mail-from log@francocorbelli.it --mail-rcpt log@francocorbelli.it --user 'log@francocorbelli.it:mypassword' --insecure --upload-file mail.txt
root@aserver:~/script # curl -v --ssl-reqd "smtps://ssl0.ovh.net:465" --mail-from log@francocorbelli.it --mail-rcpt log@francocorbelli.it --user 'log@francocorbelli.it:LaMiaBellaPassword23' --insecure --upload-file mail.txt
(…) Connected to ssl0.ovh.net (193.70.18.144) port 465 (#0)
Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /usr/local/share/certs/ca-root-nss.crt
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
} [5 bytes data]
(…)* SSL certificate verify ok.
{ [5 bytes data]
< 220 GARM-99G003 Thursday, May 4, 2023
} [5 bytes data]
> EHLO mail.txt
{ [5 bytes data]
< 250-OVH SMTP PROXY Hello
*************************************
{ [5 bytes data]
< 250-SIZE 104857600
{ [5 bytes data]
< 250-ENHANCEDSTATUSCODES
{ [5 bytes data]
< 250-AUTH LOGIN PLAIN
{ [5 bytes data]
< 250-AUTH=LOGIN PLAIN
{ [5 bytes data]
< 250 8BITMIME
} [5 bytes data]
> AUTH PLAIN
{ [5 bytes data]
< 334
} [5 bytes data]
(…)
In this successfully test we get a 250-OVH SMTP PROXY Hello
Same thing logging Thunderbird (ak: OK, we get the SMTP server)
(…)
mailnews.smtp: Sending message SmtpService.jsm:85:18
mailnews.smtp: Connecting to smtp://ssl0.ovh.net:465 SmtpClient.jsm:119:17
mailnews.smtp: Connected SmtpClient.jsm:387:17
mailnews.smtp: S: 220 GARM-97G002 Thursday, May 4, 2023
SmtpClient.jsm:413:17
mailnews.smtp: C: EHLO [192.168.11.83] SmtpClient.jsm:590:19
mailnews.smtp: S: 250-OVH SMTP PROXY Hello
(…)
BUT problem on Windows, using another client (no SMTP server)
Connecting to SMTP server: ssl0.ovh.net at Port: 465
Connection timeout: 5 secs
Forcing to use IPv4 address of SMTP server
> libmsock: using getaddrinfo
> AF_INET IPv4
_ IP address: 193.70.18.144:465_
> EINPROGRESS=10036,EWOULDBLOCK=10035
> connect(): socket=432,rc=-1, errno=10035
> Try socket 432
Cipher: ECDHE-RSA-AES256-SHA384
Certificate information:
Subject: /CN=ns0.ovh.net
Issuer: /C=GB/ST=Greater Manchester/L=Salford/O=Sectigo Limited/CN=Sectigo RSA Domain Validation Secure Server CA
[S] 220 GARM-101G004 Thursday, May 4, 2023
[C] HELO localhost
_[S] 250 OVH Mail Proxy
[C] QUIT_
[S] 221 Service closing transmission channel
C:\stor\bin>
I think the key is here: 250-OVH SMTP PROXY Hello (good) vs [250] 'OVH Mail Proxy' (bad)
I believe it is the OVH server that decides whether it is an SMTP session or not.
But …how?
Thanks to all answers