Verwendung von Postfix mit Discourse

Also, ich habe Postfix auf meinem Server mit Discourse installiert (ich weiß, das wird nicht empfohlen).
Mein Postfix funktioniert einwandfrei und ich kann damit E-Mails versenden.

Das Problem liegt darin, dass Discourse/Docker keine E-Mails versenden möchte (ich kann nicht einmal die Aktivierung für den Administrator erhalten).

Ich habe Folgendes gelesen:

  1. Es ist ein Docker-Problem.
  2. Man sollte Postfix nicht auf demselben Server haben.
  3. Ich werde sehr schnell im Spam-Ordner landen.

Was verwendet ihr als SMTP-Server?

Postfix and Discourse are perfectly compatible so I suggest you change the title of your topic accordingly :wink:
You probably have a configuration issue.

If you configure everything right then you will deliver everything straight into inbox.

2 „Gefällt mir“

I tried every configuration in the book.

For my postfix /etc/postfix/main.cf:

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = discourse-mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = discourse-mydomain, mydomain.com, discourse-mydomain, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128, 140.82.40.82, 172.17.0.2
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = 172.17.0.1
inet_protocols = all
home_mailbox = Maildir/
virtual_alias_maps = hash:/etc/postfix/virtual

I actually even changed the inet_interfaces to match my docket container.

  DISCOURSE_SMTP_ADDRESS: mail.mydomain.com
  #DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME:
  DISCOURSE_SMTP_PASSWORD:
  #DISCOURSE_SMTP_ENABLE_START_TLS: true

Don’t see where the config is wrong. any ideas?

Welcome to the forum, @cmoi! Glad to have you here. :wave:

I find mandrillapp.com and mailgun.com to be pretty solid.

Does anyone know where is my mail logs sent by Discourse?

Maybe you can start by telling us what your actual problem is instead of “does not work”…

  • What are you doing? (please be verbose)
  • What is your expected outcome?
  • What is happening instead?
  • Do you see any error messages?
  • Is there anything else worth telling us?
3 „Gefällt mir“

I actually gave up and took Amazon SES instead.

1 „Gefällt mir“

Hey There,

Running into a similar issue with a Bitnami docker container of Discourse. The emails just aren’t sending.
Here is the error I’m getting:
There was a problem sending the test email. Please double-check your mail settings, verify that your host is not blocking mail connections, and try again.

Here are my SMTP settings:

Delivery Method
address smtp.sengrid.net
port 465
user_name apikey
authentication login
enable_starttls_auto true

Any guidance on where I need to look/troubleshoot next?

Edit: Have tried 587, plain authentication method, different apikey/password. Have setup this on other apps no problem with similar settings.

Expected outcome is for the email to send from Discourse to the inbox of the test account.

Sincerely,
Jared

Yes. Follow the Discourse official Standard Installation and see if the problem persists.

EDIT: it’s also possible that your VM is blocking port 465. You might try 2525 (not sure if sendgrid supports that, but they probably do).

3 „Gefällt mir“