OVH Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVH Community members.

Curl (exit code 0) mail doesn't arrive


#1

Hi,
i am trying to send mails via SMTP using my my email server rented at ovh. I entered the SMTP information into my nextcloud and gitlab - and mails arrive just fine. But i can’t get it to work with curl even though curl doesn’t give me any error. Ideas?

echo "hello,
this is my new message

" | curl -v --ssl-reqd "smtps://ssl0.ovh.net:465" --mail-from "noreply@REDACTED.de" --mail-rcpt "REDACTED@REDACTED.de" --upload-file -
 --user "REDACTED@REDACTED.de:REDACTED" --insecure
* Rebuilt URL to: smtps://ssl0.ovh.net:465/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 193.70.18.144...
* Connected to ssl0.ovh.net (193.70.18.144) port 465 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 594 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_CBC_SHA1
*        server certificate verification SKIPPED
*        server certificate status verification SKIPPED
*        common name: ns0.ovh.net (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: RSA
*        certificate version: #3
*        subject: OU=Domain Control Validated,OU=PositiveSSL Multi-Domain,CN=ns0.ovh.net
*        start date: Thu, 12 Sep 2019 00:00:00 GMT
*        expire date: Sat, 11 Sep 2021 23:59:59 GMT
*        issuer: C=GB,ST=Greater Manchester,L=Salford,O=Sectigo Limited,CN=Sectigo RSA Domain Validation Secure Server CA
*        compression: NULL
* ALPN, server did not agree to a protocol
< 220 GARM-104R005 Monday, April 27, 2020
> EHLO AS-2018
< 250-OVH SMTP PROXY Hello
< 250-SIZE 104857600
< 250-ENHANCEDSTATUSCODES
< 250-AUTH LOGIN PLAIN
< 250-AUTH=LOGIN PLAIN
< 250-STARTTLS
< 250 8BITMIME
> AUTH LOGIN
< 334 REDACTED
> REDACTED
< 334 REDACTED
> REDACTED
< 235 2.7.0 Authentication successful
> MAIL FROM:<REDACTED@REDACTED.de>
< 250 2.1.0 Ok
> RCPT TO:<REDACTED@REDACTED.de>
< 250 2.1.5 Ok
> DATA
< 354 End data with <CR><LF>.<CR><LF>
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0} [32 bytes data]
< 250 2.0.0 Ok: queued as 8B10711B2B2AF
100    32    0     0    0    32      0     35 --:--:-- --:--:-- --:--:--    35
* Connection #0 to host ssl0.ovh.net left intact