Straightforward direct-delivery incoming mail


(Jay Pfaffman) #133

Group… Manage… Interaction… Custom email address

It should be possible to modify the config to add a user and a forward but it’s beyond the scope of free support here.


(Luka Renko) #134

I did not have that option. Then I explored some other e-mail settings and have found out this option:

When I enabled it, I got now Custom email address on the group. Maybe this setting description should be changed to indicate that it is also valid for groups, not just categories.

I understand your comment regarding limited support, will get help with some postfix admin.


(Joshua Joma) #135

Is there a solution for this for this problem?


(Bhanu Sharma) #136

For now, I have set up an alternative reply address which is an actual mailbox with TLS support that is Hacky since I have to manually edit the to field from my TLS enforced mailbox but I’d be more than willing to discontinue this approach as this is not ideal for production use.

I hope this gets better in future.


(Stephen) #137

There are lots of potential enhancements here, but the more that’s done the less straightforward the whole thing is to set up.

The one obstacle I run into regularly with this if support for multiple domains, keyed to different endpoints and API keys.


(Bhanu Sharma) #138

I’ve been able to set up multiple domains but they are all keyed to the same API key and it seems to be working just fine for now. What kind of potential problems are there? Just so that my notes are up to date before opening an issue in future?


(Joshua Joma) #139

I don’t understand. What did you do to allow your Users to send mails from mail providers enforcing TLS?


(Bhanu Sharma) #140

I set up POP3 Polling in addition to manual polling


(Joshua Joma) #141

Okay. Thanks.

But, isn’t there a solution without pop3 polling?


(Bhanu Sharma) #142

At this Point, I can’t think of any but You’re always welcome to fork the current repo and modify it to work with TLS since what I assume is the Postfix running there is standard.


(Jay Pfaffman) #143

I think it should be possible to modify the mail-receiver.yml to use the let’s encrypt certs but I’ve not spent any time figuring it out. If it’s worth money to someone it could happen sooner.


Enable TLS for Straightforward direct-delivery incoming mail
(Joshua Joma) #144

What would be a frame for time and money for this?


(Jay Pfaffman) #145

I honestly don’t know. You can contact support@literatecomputing.com and/or post on #marketplace with your budget.


(TJ Boykin) #146

Hello, I am relatively new to Discourse but working through this setup. Everything SEEMS to be working but for some reason i get this error that the messages are looping back to the same server and the mail is being removed

<22>Mar 15 15:59:49 postfix/smtpd[126]: connect from unknown[172.17.0.1]

<20>Mar 15 15:59:49 postfix/smtp[125]: warning: host community.synerg.naspnd.com[174.138.50.194]:25 replied to HELO/EHLO with my own hostname discourse-mail-receiver.localdomain

<22>Mar 15 15:59:49 postfix/smtp[125]: 42A8A243665: to=<feature_request@mx.community.synerg.naspnd.com>, relay=community.synerg.naspnd.com[174.138.50.194]:25, delay=1.3, delays=1.2/0.01/0.12/0, dsn=5.4.6, status=bounced (mail for mx.community.synerg.naspnd.com loops back to myself)

<22>Mar 15 15:59:49 postfix/smtpd[126]: disconnect from unknown[172.17.0.1] ehlo=1 quit=1 commands=2

<22>Mar 15 15:59:49 postfix/cleanup[124]: 6C89B24366D: message-id=<20190315155949.6C89B24366D@discourse-mail-receiver.localdomain>

<22>Mar 15 15:59:49 postfix/qmgr[79]: 6C89B24366D: from=<>, size=4968, nrcpt=1 (queue active)

<22>Mar 15 15:59:49 postfix/bounce[127]: 42A8A243665: sender non-delivery notification: 6C89B24366D

<22>Mar 15 15:59:49 postfix/qmgr[79]: 42A8A243665: removed

My site name is “community.synerg.naspnd.com”. When i created the MX record i had to use “mx.community.synerg.naspnd.com” because I have a CNAME of community already setup

Any thoughts would be appreciated…thanks in advance!


(Jay Pfaffman) #147

You’ll need to create the MX record for your domain. You can either not use a CNAME for community.synerg.naspnd.com or add an MX record for discourse.naspnd.com. Another more complicated solution would be to use some other domain for the incoming mail receiver; you could configure the mail receiver to use mx.communit.snerg.naspnd.com and configure discourse to send from that address (which would likely require you to reconfigure whatever is sending mail to allow using that domain name).


(Richard - DiscourseHosting.com) #148

You can’t have a CNAME and an MX record at the same time.
You need to read this: https://serverfault.com/a/29323


(TJ Boykin) #149

Thanks for the quick reqly @pfaffman.
I’m attempting to take the less complicated route :slightly_smiling_face:

I added an MX record for discourse.naspnd.com

I now get “Relay Access Denied” so I THINK that’s progress…still googling!


(TJ Boykin) #150

Hey @hexa,
I’m getting the exact same time out error that you posted about…

Were you able to figure out how to fix this?

  Failed to POST the e-mail to https://community.synerg.naspnd.com/admin/email/handle_mail: execution expired (Net::OpenTimeout)`

  /usr/local/lib/ruby/2.3.0/net/http.rb:880:in `open'
  /usr/local/lib/ruby/2.3.0/net/http.rb:880:in `block in connect'
  /usr/local/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
  /usr/local/lib/ruby/2.3.0/net/http.rb:878:in `connect'
  /usr/local/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
  /usr/local/lib/ruby/2.3.0/net/http.rb:852:in `start'
  /usr/local/lib/ruby/2.3.0/net/http.rb:1398:in `request'

(Jay Pfaffman) #151

The IP that it points to needs to be the REAL IP of the server, not some other server that’s ferrying data back to it. If discourse.naspnd.com isn’t really the actual server where the mail receiver that’s the problem.


(TJ Boykin) #152

Thanks…Yes, its pointing to the REAL IP of the server…I’m good there.
But now its timing out execution expired (Net::OpenTimeout), similar to what @hexa posted earlier in the thread…I didn’t see how it was resolved though