Thanks that worked, but it seems I was fixing the wrong thing it still says Job exception: Connection Reset by peer
I have no idea where to look to fix it. I’m using digitalocean and sending on port 587. I’ve switched it back to plain auth cause apparently you have to in mailjet. TLS is optional according to them, but I’ve tried with and withouth TLS alas. I really don’t know what to change anymore, I’ve tried with double ticks around the password and withouth. I’ve double checked uname and pwd as well.
DISCOURSE_DEVELOPER_EMAILS: 'user@email.com'
## TODO: The SMTP mail server used to validate new accounts and send notifications
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: in-v3.mailjet.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: uname
DISCOURSE_SMTP_PASSWORD: pwd
DISCOURSE_SMTP_ENABLE_START_TLS: true
DISCOURSE_SMTP_DOMAIN: radstarter.io
DISCOURSE_NOTIFICATION_EMAIL: noreply@radstarter.io
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
LETSENCRYPT_ACCOUNT_EMAIL: me@example.com
You can see if telnet in-v3.mailjet.com 587 connects or times out. If it times out, then you have that outgoing port blocked so you’ll need to use a different port (2525 might work for mailjet, but I don’t know) or you’ll need to get Digital Ocean to stop blocking the port.
If there is a firewall involved, that connected line might be misleading. It could just be reporting that it has successfully connected to something when trying that domain (in-v3. is an alias to in.) but that something is the firewall which is then closing the connection.
Another one you could try is telnet smtp-relay.gmail.com 587. If that fails in the same way, I’d think it’s likely the port is blocked on your Digital Ocean server. This may be a firewall outside of your server or firewall software running on your server.
For the former, you may be able to control this from somewhere in your account’s control panel or you may need to contact them. For the latter it’s probably iptables, you can use the following command to see if that’s the case and list the rules that apply to outbound connections.
If he’s blocked, it’s almost certainly done at the network level outside of the droplet’s OS. (Unless he set up a firewall to block himself without knowing.)
There are a bunch of mailjet topics. Have you looked at those?
-P OUTPUT ACCEPT
-A OUTPUT -j ufw-before-logging-output
-A OUTPUT -j ufw-before-output
-A OUTPUT -j ufw-after-output
-A OUTPUT -j ufw-after-logging-output
-A OUTPUT -j ufw-reject-output
-A OUTPUT -j ufw-track-output