Smtp and mailcow

Hi

I’m trying to install discourse.

I followed already all the steps from Troubleshooting.

The discourse logs seem to be fine. The activation email is sent, but nothing arrived. Even the mailcow server logs don’t receive anything.

I also use Postfix for local server emails. So could it also be related to that? Local MTA on Docker host

When I try to use Telnet on the server, it tries to use an ip6-IP. Outside the server, it reaches the ip4.

What am I missing here? Any ideas?

Thanks
Dan

Is there any reason you aren’t following the recommendations for email?

I use GSuite which I can setup trusted relays to. This what I had to use in the app.yml config in order to get my emails delivered:

  DISCOURSE_SMTP_ADDRESS: smtp-relay.gmail.com  # change this to your relay host
  DISCOURSE_SMTP_AUTHENTICATION: none   # only use this if you're setting up trusted relay host
  DISCOURSE_SMTP_PORT: 25
  DISCOURSE_SMTP_ENABLE_START_TLS: true

And you got that to work? That’s awesome.

Yes, I just had to add the specific host/IP address on GSuite to allow relaying which has it’s own configurations on beefing up security as well.

1 Like

Something important to note from a brief review of the FAQ:

  • The maximum number of unique recipients allowed per user per 24-hour period is approximately 130 times the number of user licenses in your G Suite account.

This likely means you’ll need to scale unassigned licenses as the forum grows.

https://support.google.com/a/answer/2956491?hl=en

2 Likes

True but that’s for unique recipients, not total messages. The per user is 10,000 per day, but other variables apply as well.

Limits per user

  • The maximum number of messages a user can send in a 24-hour period is 10,000. However, this can vary, depending on the number of user licenses in your G Suite account.
  • The maximum number of unique recipients allowed per user per 24-hour period is approximately 130 times the number of user licenses in your G Suite account.

For myself, my setup is starting small, probably be a while before I hit these limits where I have to scale.

Good morning

Thanks for all the information.

I’m using mailjet for now, but I’m not happy so far. All summaries(emails from discourse) are marked as junk (different DKIM sign).

I have another mailcow instance running. Should be able to use this as a relay, I haven’t checked how it works yet. Anyway, the problem would be the same (DKIM/Spam). I’ll check some other solutions to use discourse and mailcow on the same server.

Thanks again for your replies.
Dan

Are you doing the relay thing or authenticating against mailjet (I’m not familiar if they even allow relay hosts, etc)? If doing a relay, make sure you have a SPF TXT record that indicates your Discourse IP and or hostname is a valid mail sender for your domain as well which can cut down on emails landing in junk/spam.

1 Like

Thanks.

I tried a little bit but no email arrived. Not sure how that works with mailcow. I’ll send the solution if I figured out.

Good to know the SPF TEXT record. Didn’t know that. Thanks

I’ve never used mailcow but it looks like it’s just postfix. To setup relay, you can setup trusted networks or IPs in the main.cf file.

Here’s someone that setup to trust an internal network: How configure hosts allowed to relay · Issue #1790 · mailcow/mailcow-dockerized · GitHub

http://www.postfix.org/SMTPD_ACCESS_README.html

Just gotta make sure you don’t accidentally open your mail server to the world.

3 Likes

Thanks

I’m sorry, but it’s working now for some reason. I think I just had a wrong setup/password or something.

Anyway. Everything is fine.
Discourse + MailCow = no problems

Thanks again.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.