Email doesn't work on Virtual Server

I use a virtual server from the German Provider Hosteurope. I have no MTA Postfix on the virtual server. The installation was very simple. After ./launcher bootstrap app and ./launcher start app the app starts.

I start the ./discourse-doctor and I get the following message:

Email address for mail test? (‘n’ to skip) [test@example.com]:
Sending mail to test@example.com. . .
Testing sending to test@example.com using wpxxx.mailout.server-he.de:25.
SMTP server connection successful.
Sending to test@example.com. . .
Mail accepted by SMTP server.

If you do not receive the message, check your SPAM folder
or test again using a service like http://www.mail-tester.com/.

If the message is not delivered it is not a problem with Discourse.

Check the SMTP server logs to see why it failed to deliver the message.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD

Here is a part of the app.yml

  DISCOURSE_SMTP_ADDRESS: wpxxx.mailout.server-he.de
  DISCOURSE_SMTP_PORT: 25
  #DISCOURSE_SMTP_USER_NAME:
  #DISCOURSE_SMTP_PASSWORD:
  #DISCOURSE_SMTP_ENABLE_START_TLS: true  # (optional, default true)
  #DISCOURSE_SMTP_AUTHENTICATION: login

Did you check your spam folder?

Did you try sending to mail-tester?

1 Like

Yes, I send the Email to mail-tester. It seems that the SMTP server accepted the email but not deliver to the receiver?

==================== 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) []: test-2v7z63ww6@srv1.mail-tester.com
Sending mail to test-2v7z63ww6@srv1.mail-tester.com. . . 
Testing sending to test-2v7z63ww6@srv1.mail-tester.com using wp10750459.mailout.server-he.de:25.
SMTP server connection successful.
Sending to test-2v7z63ww6@srv1.mail-tester.com. . . 
Mail accepted by SMTP server.

If you do not receive the message, check your SPAM folder
or test again using a service like http://www.mail-tester.com/.

If the message is not delivered it is not a problem with Discourse.

Check the SMTP server logs to see why it failed to deliver the message.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

==================== DONE! ====================

That’s how it seems. You’ll need to look at the mail server logs. On the mail server they accepted bit did not deliver the messages.

1 Like

The question is, do I need to install a mail server on the virtual server? think I don’t need a Mail server on the virtual server. I want to use the smtp server from the provider. The ports are closed. Witch Mail server should I install?

telnet 178.77.102.5 25
Trying 178.77.102.5...
telnet: Unable to connect to remote host: Connection refused

nmap -PN -p 25,110,143,465,587,993,995 178.77.102.5

Starting Nmap 7.01 ( https://nmap.org  ) at 2021-01-07 16:45 CET
Nmap scan report for lvps178-77-102-5.dedicated.hosteurope.de (178.77.102.5)
Host is up (0.0058s latency).
PORT      STATE   SERVICE
25/tcp   closed smtp
110/tcp closed pop3
143/tcp closed imap
465/tcp closed smtps
587/tcp closed submission
993/tcp closed imaps
995/tcp closed pop3s

Nmap done: 1 IP address (1 host up) scanned in 0.23 seconds

[root@lvps178-77-102-5 ~]# yum list installed | grep mail
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
fetchmail.x86_64                               6.3.24-7.el7                     installed
mailcap.noarch                                  2.1.41-2.el7                     installed
mailx.x86_64                                     12.5-19.el7                      installed
procmail.x86_64                                 3.22-36.el7_4.1                installed
sendmail.x86_64                                 8.14.7-6.el7                     installed
sendmail-cf.noarch                            8.14.7-6.el7                     installed
sendmail-doc.noarch                           8.14.7-6.el7                     installed
[root@lvps178-77-102-5 ~]#
[root@lvps178-77-102-5 ~]# ss -tanup
Netid State         Recv-Q Send-Q                                              Local Address:Port                                                                     Peer Address:Port
tcp    LISTEN       0         128                                                                     *:22                                                                                        *:*                            users:(("sshd",pid=396,fd=3))
tcp    LISTEN       0         128                                                                     *:3000                                                                                     *:*                            users:(("docker-proxy",pid=841,fd=4))
tcp    LISTEN       0         128                                                                     *:443                                                                                       *:*                            users:(("docker-proxy",pid=783,fd=4))
tcp    LISTEN       0         128                                                                     *:2045                                                                                     *:*                            users:(("docker-proxy",pid=3321,fd=4))
tcp    LISTEN       0         128                                                                     *:80                                                                                        *:*                            users:(("docker-proxy",pid=851,fd=4))
tcp    LISTEN       0         128                                                                     *:81                                                                                        *:*                            users:(("docker-proxy",pid=829,fd=4))
tcp    ESTAB         0         0                                                       178.77.102.5:22                                                                     185.243.70.181:39124                      users:(("sshd",pid=16868,fd=3))
tcp    LISTEN       0         128                                                                [::]:22                                                                                    [::]:*                            users:(("sshd",pid=396,fd=4))

If you want to install and run a mail server you’ll need to look elsewhere for how to do that. It’s beyond the scope of what’s supported here.

It looks like you’re using wp10750459.mailout.server-he.de as your mail server? So that’s what is accepting your mail and not delivering it. You’ll need to look at the logs there to find out why.

The easy solution is Mailgun or something like it.

1 Like