Email error: Connection reset by peer

Hello, I set up the email configuration but it isn’t working. I get a general “Connection reset by peer” message, and I’m not able to go on.

This is the output of my discourse-doctor:

root@vmi433455:/var/discourse# ./discourse-doctor
DISCOURSE DOCTOR Sun 29 Nov 2020 09:31:32 AM CET
OS: Linux vmi433455.server.net 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10          00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=talk.mysite.it
SMTP_ADDRESS=mail.privateemail.com
DEVELOPER_EMAILS=noreply@mysite.it
SMTP_PASSWORD=myp4ssw0rd
SMTP_PORT=465
SMTP_USER_NAME=noreply@mysite.it

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 19.03.13, build 4484c46d9d

DOCKER PROCESSES (docker ps -a)

CONTAINER ID        IMAGE                 COMMAND             CREATED                      STATUS              PORTS                                      NAMES
068c7ce44316        local_discourse/app   "/sbin/boot"        16 hours ago                 Up 16 hours         0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   app

068c7ce44316        local_discourse/app   "/sbin/boot"        16 hours ago                 Up 16 hours         0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   app

Discourse container app is running


==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git

No non-official plugins detected.

See https://github.com/discourse/discourse/blob/master/lib/plugin/metadata.rb fo         r the official list.

========================================
Discourse 2.6.0.beta6
Discourse version at talk.mysite.it: Discourse 2.6.0.beta6
Discourse version at localhost: Discourse 2.6.0.beta6


==================== MEMORY INFORMATION ====================
RAM (MB): 8348

              total        used        free      shared  buff/cache   available
Mem:           7961        2163        4995         206         802        5379
Swap:          2047           0        2047

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       195G   18G  168G  10% /

---------- Container Disk Space ----------
Filesystem      Size  Used Avail Use% Mounted on
overlay         195G   18G  168G  10% /
/dev/sda2       195G   18G  168G  10% /shared
/dev/sda2       195G   18G  168G  10% /var/log

==================== DISK INFORMATION ====================
Disk /dev/loop0: 30.96 MiB, 32440320 bytes, 63360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 60.10 MiB, 63942656 bytes, 124888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 30.95 MiB, 32432128 bytes, 63344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 52.39 MiB, 54927360 bytes, 107280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 47.5 MiB, 49799168 bytes, 97264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 200 GiB, 214748364800 bytes, 419430400 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8d027ea0

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1  *       2048   1953791   1951744   953M 83 Linux
/dev/sda2       1953792 419428351 417474560 199.1G 83 Linux

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [noreply@mysite.it]: myaddress@gmail.com
Sending mail to myaddress@gmail.com. . .
Testing sending to myaddress7@gmail.com using mail.privateemail.com:465.
======================================== ERROR ========================================
                                    UNEXPECTED ERROR

Connection reset by peer

====================================== SOLUTION =======================================
This is not a common error. No recommended solution exists!

Please report the exact error message above to https://meta.discourse.org/
(And a solution, if you find one!)
=======================================================================================
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

==================== DONE! ====================
Would you like to serve a publicly available version of this file? (Y/n)Y
The output of this program may be available at http://talk.mysite.it/NzJkN2VmNzBmZWQ48efJGI.txt
You should inspect that file carefully before sharing the URL.

You can examine the output of this script with
LESS=-Ri less /tmp/discourse-debug.txt

BUT FIRST, make sure that you know the first three commands below!!!

Commands to know when viewing the file with the above command (called 'less'):
q              -- quit
/error<ENTER>  -- search for the word 'error'
n              -- search for the next occurrence
g              -- go to the beginning of the file
f              -- go forward a page
b              -- go back a page
G              -- go to the end of the file

I obviously double checked smtp details, username and password, and tested them on my mail client.

Did you follow the Discourse official Standard Installation for your install? If you did, try checking through Troubleshooting email on a new Discourse install to see if the suggestions there help.

1 Like