Mail error 'Greeting never received'

I’m getting this error with nodemailer:


error[1/7/2024, 6:51:58 PM] Greeting never received

{
  "component": "smtp-connection",
  "sid": "ToPWQeoSx08"
}

error[1/7/2024, 6:51:58 PM] Send Error: Greeting never received

{
  "component": "mail",
  "err": {
    "stack": "Error: Greeting never received\n    at SMTPConnection._formatError (/home/peertube/versions/peertube-v6.0.2/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)\n    at SMTPConnection._onError (/home/peertube/versions/peertube-v6.0.2/node_modules/nodemailer/lib/smtp-connection/index.js:776:20)\n    at Timeout.<anonymous> (/home/peertube/versions/peertube-v6.0.2/node_modules/nodemailer/lib/smtp-connection/index.js:710:22)\n    at listOnTimeout (node:internal/timers:569:17)\n    at process.processTimers (node:internal/timers:512:7)",
    "message": "Greeting never received",
    "code": "ETIMEDOUT",
    "command": "CONN"
  },
  "tnx": "transport",
  "action": "send"
}

error[1/7/2024, 6:51:58 PM] Error in email sender.

{
  "err": {
    "stack": "Error: Greeting never received\n    at SMTPConnection._formatError (/home/peertube/versions/peertube-v6.0.2/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)\n    at SMTPConnection._onError (/home/peertube/versions/peertube-v6.0.2/node_modules/nodemailer/lib/smtp-connection/index.js:776:20)\n    at Timeout.<anonymous> (/home/peertube/versions/peertube-v6.0.2/node_modules/nodemailer/lib/smtp-connection/index.js:710:22)\n    at listOnTimeout (node:internal/timers:569:17)\n    at process.processTimers (node:internal/timers:512:7)",
    "message": "Greeting never received",
    "code": "ETIMEDOUT",
    "command": "CONN"
  }
}

config part:

smtp:
  # smtp or sendmail
  transport: smtp
  # Path to sendmail command. Required if you use sendmail transport
  sendmail: null
  hostname: 'mx.host'
  port: 587 # If you use StartTLS: 587
  username: 'me@host'
  password: 'pass'
  tls: false # If you use StartTLS: false
  disable_starttls: false
  ca_file: null # Used for self signed certificates
  from_address: 'alsome@host'

edit:
P.S. on my maild it looks like the client is connecting and disconnecting again.

You configured the TLS ports whilst you do not use it. Might this be the reason why the connection failed ?

starttls is configured on p587, tls is set to false as the same line’s comment suggests

Oh, OK, gotcha ! Sorry for my misunderstanding :grin:

Same host for mail and peertube ? What’s is the mail server solution (i.e. PostFix, other…) ?

Increase mail server log output, maybe ? (Set to warning or debug instead of info)