Timeout when trying to send email using curl

I am trying to send an email using curl via mail.ecloud.global. The handshake comes as far as verifying the certificate. After that the server stops responding. curl --verbose ... option says:

...
*  SSL certificate verify ok.
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [249 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [249 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
< * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN] Dovecot (Debian) ready.
  0     0    0     0    0     0      0      0 --:--:--  0:02:00 --:--:--     0* server response timeout
  0     0    0     0    0     0      0      0 --:--:--  0:02:01 --:--:--     0
* Closing connection 0
} [5 bytes data]
* TLSv1.3 (OUT), TLS alert, close notify (256):
} [2 bytes data]
curl: (28) server response timeout

Any suggestions would be greatly appreciated.

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

curl is a web (http-s) client.
To send a mail you better use a smtp client, please find some here : 16 Command Examples to Send Email From The Linux Command Line

curl is a swiss army knife of protocols, it really can do smtp too (and imap). OP wants to talk imap to a non imap port? as no capabilities are returned… so a timeout is inevitable. It would be fair though, as some imap servers will send the mail for you if you store the individual mail in an outbox.

@rockford if you want to do it the smtp way, this will work: Sending email - Everything curl

Edit: I think the curl example isn’t fully rfc compliant at Date: - add the timezone drift vs utc at the end +0000 - though not all recipient will insist on this being present, some do (GMX did at least)

2 Likes

Thanks @tcecyk! As it turns out I was actually trying to do smtp on a non smtp port. :man_facepalming: :laughing:

The server address and ports can be found at Email Configuration - e Foundation - deGoogled unGoogled smartphone operating systems and online services - your data is your data. Somehow I just read the wrong bullet point.