Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Unsolved Discourse and incoming email

    Discourse
    discourse
    7
    25
    859
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jenny_molloy
      jenny_molloy last edited by jenny_molloy

      Hi

      I need incoming email to function on Discourse and it seems like there are two options:

      • set up a POP3 inbox, which I can't do on Cloudron
      • add this module for direct delivery of email, which I also can't do on Cloudron

      At the moment I will have setup an external POP3 service and hope for the best. Would you consider including the direct email delivery module in future Discourse setups?

      Any tips in the meantime from people who have got this to work?
      Many thanks!

      Jenny

      1 Reply Last reply Reply Quote 1
      • jimcavoli
        jimcavoli App Dev last edited by

        From a cursory glance, it looks like the latter may be possible, though with some custom records and the like, it would be a somewhat more involved setup. Frankly, the most appropriate way to do that would be for box to have a DNS add-on that could handle things like this...also would help automate install on certain things requiring SRV or TXT records and the like. After that, there's the problem of handling the transport on port 25 which would require another round of changes to the shared mail server (haraka) to answer correctly and pass those emails off to the app...also not impossible, but another thing to do. Turns into a bit of a feat, but it is possible. I see no reason it couldn't be pulled off in a generally-useful way, but it would definitely be a serious set of work and not be done super fast. The ROI for other use cases than just discourse is likely to be a major consideration along the way. The mail server changes are more the issue than the DNS ones, imo. Worth thinking about though.

        1 Reply Last reply Reply Quote 1
        • girish
          girish Staff last edited by

          I cannot think of a good solution immediately. But why exactly does discourse require POP3 over IMAP? Seems so strange, even really old things support IMAP these days, just very surprised.

          jdaviescoates jimcavoli 2 Replies Last reply Reply Quote 0
          • jdaviescoates
            jdaviescoates @girish last edited by

            @girish said in Discourse and incoming email:

            I cannot think of a good solution immediately. But why exactly does discourse require POP3 over IMAP? Seems so strange, even really old things support IMAP these days, just very surprised.

            Good question. And yes, it does seem odd, doesn't it!

            I use Cloudron with Gandi & Hetzner

            1 Reply Last reply Reply Quote 1
            • jimcavoli
              jimcavoli App Dev @girish last edited by

              @girish There is pending IMAP support in https://github.com/discourse/discourse/pull/8301 which has been going through some back-and forth for review since November, but it's looking pretty positive as far as actual merge/release possibility in the next few months. If that happens, it's definitely the easiest option on the board.

              1 Reply Last reply Reply Quote 1
              • jenny_molloy
                jenny_molloy last edited by

                Thanks for the advice! I managed to get inbound mail coming in now by setting up a subdomain and external POP mail box, which fixes an immediate problem regarding how we were planning to use the forum with specific category emails.

                The main outstanding issue now with allowing incoming replies is that Cloudron outbound SMTP won't accept a "reply to" address that is a subdomain with plus addresses/VERPs (I guess both of these are separate issues).

                I am trying Amazon SES as the SMTP server for the whole domain and will see if that solves the issue and report back.

                Jenny

                1 Reply Last reply Reply Quote 0
                • girish
                  girish Staff last edited by girish

                  @jenny_molloy For subdomain emails, simply add the subdomain itself as a domain in Cloudron. Then the mail server will started allowing that subdomain for outbound. You can even setup SES relay in mail -> domain -> SES.

                  1 Reply Last reply Reply Quote 1
                  • jenny_molloy
                    jenny_molloy last edited by

                    Great - adding the subdomain in Cloudron and setting up Amazon SES login for that fixed the issue so I can now both send (via SES) and receive emails (via a Zoho pop mail box), including reply by email mode.
                    Thanks for your advice everyone!

                    1 Reply Last reply Reply Quote 4
                    • bmann
                      bmann last edited by

                      I am in the same boat.

                      Discourse has IMAP support but only for group inboxes, not for "reply by email".

                      Discourse was one of the big apps I want to be running on Cloudron, and having to add an external email provider just for POP3 really sucks.

                      Discourse has their "mail receiver" docker container that runs all of this for you if you self install elsewhere, and works really well.

                      "Don't run Discourse on Cloudron" seems like a bad solution. Is this on a backlog somewhere to solve?

                      jdaviescoates girish 2 Replies Last reply Reply Quote 2
                      • jdaviescoates
                        jdaviescoates @bmann last edited by

                        @bmann I hadn't realised "reply by email" doesn't work on Cloudron, but if that's the case then that is a rather major issue that really ought to have @staff attention imho. It's a core feature of Discourse that many people familiar with Discourse have come to expect.

                        I'm not sure, but I think it's basically the same/ a related issue @jimcavoli has been hitting when trying to package Loomio, see:

                        https://forum.cloudron.io/post/35429

                        I use Cloudron with Gandi & Hetzner

                        1 Reply Last reply Reply Quote 1
                        • robi
                          robi last edited by

                          Does "reply-by-email" work for NodeBB?

                          Life of Gratitude.
                          Life of Advanced Technology

                          1 Reply Last reply Reply Quote 2
                          • girish
                            girish Staff @bmann last edited by

                            @bmann I guess https://github.com/discourse/mail-receiver is the repo? Did I understand correctly that it can be run on a separate server and hooked up to Cloudron+Discourse install? (Of course, ideally, we can have this all part of the Cloudron package itself or maybe a separate Cloudron package)

                            1 Reply Last reply Reply Quote 2
                            • E
                              eddowding last edited by

                              Argh. Just gone through a lengthy process of getting Discourse set up - and it was a big part of choosing Cloudron - only to find this thread.

                              This is challenging, even though there is an answer.

                              1. Any solutions?
                              2. Does NodeBB do inbound? On Cloudron?
                              3. Can this be done with Mailgun instead?
                              girish jdaviescoates 2 Replies Last reply Reply Quote 1
                              • girish
                                girish Staff @eddowding last edited by

                                @eddowding nodebb doesn't do inbound afaik. Incidentally, I was looking into making our recvmail addon work. Let me look into if it's easy to enable POP3 at a mailbox level.

                                E 1 Reply Last reply Reply Quote 2
                                • E
                                  eddowding @girish last edited by

                                  @girish thanks - here's hoping.

                                  Would this be a quick-to-deploy solution?

                                  girish 1 Reply Last reply Reply Quote 0
                                  • jdaviescoates
                                    jdaviescoates @eddowding last edited by

                                    @eddowding said in Discourse and incoming email:

                                    Can this be done with Mailgun instead?

                                    I've not tried it yet, but I think there is a new option when installing apps to not use Cloudron for mail at all and to just configure it all within the app itself. I guess that might work @staff ?

                                    I use Cloudron with Gandi & Hetzner

                                    girish 1 Reply Last reply Reply Quote 1
                                    • girish
                                      girish Staff @jdaviescoates last edited by

                                      @jdaviescoates That feature is for used for configuring apps that send email. @eddowding wants a way for an app to receive email.

                                      jdaviescoates 1 Reply Last reply Reply Quote 1
                                      • girish
                                        girish Staff @eddowding last edited by

                                        @eddowding yes, it will be part of update (if we implement it). Just to double check, this feature only makes sense if your domain's email is also hosted on Cloudron. Is that the case with your setup?

                                        E 1 Reply Last reply Reply Quote 1
                                        • jdaviescoates
                                          jdaviescoates @girish last edited by

                                          @girish said in Discourse and incoming email:

                                          @jdaviescoates That feature is for used for configuring apps that send email. @eddowding wants a way for an app to receive email.

                                          I realised @eddowding wants to receive email (and I think it's really quite bad that Discourse is a Stable App but doesn't have some of it's basic features packaged, nor any warning of those missing features. Indeed when installing that app it says "Use it as a: mailing list" which you can't do if it can't receive mail), I just figured Mailgun details or whatever could be entered somewhere into Discourse settings and that might work. I guess you're saying that wouldn't work but I don't think I really understand why that would be the case 🙂

                                          I use Cloudron with Gandi & Hetzner

                                          girish 1 Reply Last reply Reply Quote 1
                                          • girish
                                            girish Staff @jdaviescoates last edited by girish

                                            @jdaviescoates It's debatable if mailing list is a basic feature for forum software (though it seems the description comes from https://github.com/discourse/discourse#readme and I am reluctant to remove it since this is what the upstream devs think ) 🙂

                                            That said, you can use it as a mailing list, just not if the email domain is hosted on Cloudron since we don't support POP3 yet. I also don't know why they only support POP3 when all other apps support IMAP (gitlab, freescout, espocrm for example). Anyone have any background on this?

                                            E jdaviescoates 2 Replies Last reply Reply Quote 1
                                            • E
                                              eddowding @girish last edited by

                                              @girish Yep email is / can be hosted here too for this domain.

                                              1 Reply Last reply Reply Quote 1
                                              • E
                                                eddowding @girish last edited by

                                                @girish https://meta.discourse.org/t/configuring-reply-via-email/42026

                                                1 Reply Last reply Reply Quote 1
                                                • jdaviescoates
                                                  jdaviescoates @girish last edited by jdaviescoates

                                                  @girish said in Discourse and incoming email:

                                                  I also don't know why they only support POP3

                                                  Yes, it does seem odd.

                                                  Although it sounds like it's not the only way:

                                                  Pushing emails via the Discourse API

                                                  Alternatively, you can push emails to Discourse via the API. For that, you will need

                                                  To check the manual_polling_enabled site setting.
                                                  A master API key 138 or an API key associated to a staff member.
                                                  

                                                  Then, to push an email to Discourse, you need to pass the raw email content as the “email” parameter when POSTing to “/admin/email/handle_mail”. The endpoint accepts application/json (recommended), multipart/form-data, or application/x-www-urlencoded request bodies (with an appropriate request Content-Type header, naturally).

                                                  You’re done

                                                  From the link @eddowding posted above

                                                  Edit: also, this thread should not be marked as solved, as this issue has not yet been solved.

                                                  I use Cloudron with Gandi & Hetzner

                                                  E 1 Reply Last reply Reply Quote 1
                                                  • Referenced by  E eddowding 
                                                  • E
                                                    eddowding @jdaviescoates last edited by eddowding

                                                    I'd love to use the API but it's far from obvious if that's actually possible on Cloudron. @jenny_molloy's opening post suggests it's not.

                                                    https://meta.discourse.org/t/direct-delivery-incoming-email-for-self-hosted-sites/49487

                                                    @jdaviescoates

                                                    1 Reply Last reply Reply Quote 1
                                                    • girish
                                                      girish Staff last edited by

                                                      POP3 is enabled in the next release. Though, I haven't tried if Discourse works well with that.

                                                      1 Reply Last reply Reply Quote 3
                                                      • First post
                                                        Last post
                                                      Powered by NodeBB