A user is experiencing an error when trying to implement SMTP for groups in Discourse, receiving a “ssl wrong version number error.” gde is using the same SMTP server and credentials as the instance, but still encounters the issue.
supermathie suspects that Discourse is attempting to connect to the SMTP server with TLS instead of STARTTLS. gde provides screenshots of the configuration, showing that the usual 587 port and STARTTLS are being used.
Further investigation with tcpdump reveals three different behaviors:
Normal usage: correct sequence with STARTTLS
Discourse-doctor and rake: error with 503 5.5.1 Invalid command: Command not supported
Group SMTP: incorrect sequence with a “DATA fragment” packet
supermathie suggests unchecking “Use SSL for SMTP” to allow STARTTLS, but gde reports that this does not resolve the issue, with the error message changing to 500 5.5.1 Invalid command: commande not supported.
Another user, galligan, reports experiencing the same issue with an ImprovMX email address, and seeks guidance from supermathie.
I’m trying to implement SMTP for groups but I keep getting the following error message.
Yet I’m using the same smtp server the instance uses and I get the same error message even if I use the same credentials specified in my app.yml file… I don’t understand why it’s behaving differently : emails are sent perfectly with the default credentials.
In the logs of my SMTP server I see a connection coming from Discourse server, then I have the following message
smtp bad-input result=“500 5.5.1 Invalid command: Pipelining not supported”
smtp disconnected reason=“io-error: Connection reset by peer”
Users creates topics, responds, etc. other users receive email notifications as expected
Also, using the test send email through the administration interface : no problem it’s well sent and well received
with tcpdump we can see there is a correct sequence, connecting through STARTTLS, etc.
Discourse-doctor and rake
using discourse-doctor or rake emails:test
Email is not sent and I have an error : 503 5.5.1 Invalid command: Command not supported
group smtp
When testing the group smtp, I see a “DATA fragment” packet coming from Discourse immediatly after the tcp handshake, to which the smtp server responds with 220 xxxxxxx ESMTP OpenSMTPD followed by a 500 5.5.1 Invalid command: Pipelining not supported message
Unfortunately, no it doesn’t work.
unchecking “Use SSL for SMTP” gives me the following error message :
Which is strange because I know my credentials are correct.
Looking with tcpdump, it behaves like I’ve explain for the “Discourse-doctor and rake” case.
The exchanges between Discourse and the smtp server looks like the following