Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service disruption: Attempts to reply to Discourse by email bounce #44

Closed
ghost opened this issue Apr 8, 2019 · 5 comments · Fixed by FOSSRIT/runbook#37
Closed

Service disruption: Attempts to reply to Discourse by email bounce #44

ghost opened this issue Apr 8, 2019 · 5 comments · Fixed by FOSSRIT/runbook#37
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Apr 8, 2019

Summary

Email replies to Discourse bounce

Expected results

!. Compose email reply to a Discourse topic/thread/whatever-they-are
2. Send
3. Reply is accepted and included in the discussion

Actual results

  1. Compose, as above
  2. Send, as above
  3. Receive SMTP-time bounce message from one's own SMTP service

Priority requested

  • Urgency: [high]
  • Requested deadline: 2019-04-22

Other details

This appears to be what the Discourse SMTP server is sending my mail server:

Content-Description: Notification                                                                                                   
Content-Type: text/plain; charset=us-ascii                                                                                          
                                                                                                                                    
This is the mail system at host eforward3a.registrar-servers.com.                                                                   
                                                                                                                                    
I'm sorry to have to inform you that your message could not                                                                         
be delivered to one or more recipients. It's attached below.                                                                        
                                                                                                                                    
For further assistance, please send mail to postmaster.                                                                             
                                                                                                                                    
If you do so, please include this problem report. You can                                                                           
delete your own text from the attached returned message.                                                                            
                                                                                                                                    
                   The mail system                                                                                                  
                                                                                                                                    
<replies+8e0b252e20e77aa1ded0bb53388f2951@fossrit.community>: unknown user:                                                         
    "replies+8e0b252e20e77aa1ded0bb53388f2951@fossrit.community" 

So, it's clear enough to infer that the bit between the plus symbol and the at symbol is unique to the specific message to which one is trying to reply, and that there would not be a user with the entirety of that local part in any lookup table. Everything to the left of the @ is meant to be handled only by the local mail system. Plus addressing, as I understand it, is meant to be able to accomodate this sort of thing, but it may require some tweaking to the receiving MTA configuration to allow it to pass on through to discourse.

@ghost ghost added the bug Something isn't working label Apr 8, 2019
@ghost ghost assigned jwflory Apr 8, 2019
@jwflory
Copy link
Member

jwflory commented May 14, 2019

I started to look closer at this but didn't get to finish before today's scheduled power outage at RIT. I hope to fix email replies no later than the end of the week.

@jwflory
Copy link
Member

jwflory commented May 16, 2019

I made progress today. This was never working because I misunderstood the Discourse documentation. I never had a mailbox set up to receive the email replies.

I dug deeper and found out Discourse offers a Docker image to handle incoming email replies. I followed the provided instructions for the image but emails are not making it to the container. I need to investigate why since it is not an issue at the DNS level, as far as I can tell.

Some links for me to remember later:

@jwflory
Copy link
Member

jwflory commented Feb 20, 2020

Looking into this again today. Hope to have an update soon.

@jwflory
Copy link
Member

jwflory commented Feb 20, 2020

Still hitting a wall with this. I'm using the official mail-receiver image to set up incoming email, but emails never make it to the Discourse host. There could be a number of things going on here, but here are my notes from today:

My next thing to try is creating a new domain specific for receiving mail instead of using the root domain. Perhaps the SendGrid outgoing mail rules are interfering with incoming mail (which doesn't make sense because MX records only deal with incoming mail). But I'm running out of options… 😐

Shell commands to remember

# keep checking if incoming mail arrives to mail-receiver container
watch -b -c -d -n 5 -p ./launcher logs mail-receiver

# any time I make changes to mail-receiver container env
./launcher rebuild mail-receiver

# mail-receiver container env
vim containers/mail-receiver.yml

@jwflory
Copy link
Member

jwflory commented Feb 21, 2020

Fixed!

Reply-by-email and starting new threads by email is now working. The issue was that DigitalOcean maintains a firewall a level about the Linux Droplet level. When updating ports (such as opening port 25 for incoming email), the firewall needed to be updated from the DigitalOcean admin interface in addition to opening it on the host with ufw.

A Runbook PR is coming soon to add this to the existing Discourse Runbook page. That PR will close this issue. 🎬

jwflory added a commit to FOSSRIT/runbook that referenced this issue Feb 21, 2020
This commit adds documentation for an obscure issue when it comes to
updating any of the DigitalOcean infrastructure associated with the
Discourse forum. More details are explained in the changed lines in the
commit and FOSSRIT/infrastructure#44.

Closes FOSSRIT/infrastructure#44.

Signed-off-by: Justin W. Flory <git@jwf.io>
jwflory added a commit to FOSSRIT/runbook that referenced this issue Feb 24, 2020
This commit adds documentation for an obscure issue when it comes to
updating any of the DigitalOcean infrastructure associated with the
Discourse forum. More details are explained in the changed lines in the
commit and FOSSRIT/infrastructure#44.

Closes FOSSRIT/infrastructure#44.

Signed-off-by: Justin W. Flory <git@jwf.io>
jwflory added a commit to FOSSRIT/runbook that referenced this issue Feb 24, 2020
This commit adds documentation for an obscure issue when it comes to
updating any of the DigitalOcean infrastructure associated with the
Discourse forum. More details are explained in the changed lines in the
commit and FOSSRIT/infrastructure#44.

Closes FOSSRIT/infrastructure#44.

Signed-off-by: Justin W. Flory <git@jwf.io>
jwflory added a commit to FOSSRIT/runbook that referenced this issue Feb 24, 2020
)

This commit adds documentation for an obscure issue when it comes to
updating any of the DigitalOcean infrastructure associated with the
Discourse forum. More details are explained in the changed lines in the
commit and FOSSRIT/infrastructure#44.

Closes FOSSRIT/infrastructure#44.

Signed-off-by: Justin W. Flory <git@jwf.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant