Improper SMTP EHLO handshake with smtp-relay.gmail.com?

Hi Team,

I am a newish peertube admin and am having trouble with my SMTP config:

smtp:
  transport: smtp
  sendmail: null
  hostname: smtp-relay.gmail.com
  port: 587
  username: 'mastodon@roundpond.net'
  password: [redacted]
  tls: false
  disable_starttls: false
  from_address: 'mastodon@roundpond.net'

A similar config in e.g. Mastodon works, when peertube starts up in the log I see:

Jul 21 17:53:34 peertube peertube[6049]:     "message": "Server terminates connection. response=421 4.7.0 Try again later, closing connection. (EHLO) l18-20020a170902eb1200b001b9dab00a73sm165256plb.71 - gsmtp: 421 4.7.0 Try again later, closing connection. (EHLO) l18-20020a170902eb1200b001b9dab00a73sm165256plb.71 - gsmtp",

In researching it sounds like behavior on the Google mail relay has recently changed and they are much more particular about how the domain name is specified in the SMTP EHLO handshake. For example they no longer accept « localhost » or « 127.0.0.1 ».

Is anyone else having trouble with peertube smtp relaying using Google?
How is the SMTP EHLO handshake formed in peertube code, can you point me?
Is anyone is successfully using Google SMTP relay? Would you consider sharing your config?

I very much appreciate any help,

-Carty

Hi,

We use nodemailer to send emails. See this warning about the use of gmail to send emails: Using Gmail :: Nodemailer