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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Discuss
  3. Proxy email via VPS

Proxy email via VPS

Scheduled Pinned Locked Moved Discuss
17 Posts 8 Posters 2.6k Views 10 Watching
  • 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.
    • infogulchI Offline
      infogulchI Offline
      infogulch
      wrote on last edited by
      #1

      I've been running Cloudron on a VPS (Linode) for a while, but recently purchased some hardware and I want to migrate to host apps at my home instead, with one exception: Email. Email is a bit different than web apps in that outbound deliverability relies a lot on IP reputation, which is not possible to maintain on a consumer ISP plan where your IP can change every time the modem reboots, and where whole residential ASNs are often blocked en masse.

      I think I'd like to keep email flowing through the VPS and basically use it as a proxy to send and receive email. This way I can keep my current IP for email for $5/mo (cheaper than any business plan my ISP could offer), and use dynamic DNS to host plain web apps from my home internet.

      1. Opinions on this idea in general? Good idea or no?
      2. What should I run on the VPS system to act as a proxy for email?
      3. Can Cloudron be configured to send/receive email through a remote proxy? If no, what changes would be needed to support this configuration?
      4. Will using dynamic dns for Cloudron apps be a problem?

      This might have come up on the forum before, but I was unable to find anything. Links to prior conversations on this topic would be appreciated.

      robiR girishG N R 4 Replies Last reply
      1
      • infogulchI infogulch

        I've been running Cloudron on a VPS (Linode) for a while, but recently purchased some hardware and I want to migrate to host apps at my home instead, with one exception: Email. Email is a bit different than web apps in that outbound deliverability relies a lot on IP reputation, which is not possible to maintain on a consumer ISP plan where your IP can change every time the modem reboots, and where whole residential ASNs are often blocked en masse.

        I think I'd like to keep email flowing through the VPS and basically use it as a proxy to send and receive email. This way I can keep my current IP for email for $5/mo (cheaper than any business plan my ISP could offer), and use dynamic DNS to host plain web apps from my home internet.

        1. Opinions on this idea in general? Good idea or no?
        2. What should I run on the VPS system to act as a proxy for email?
        3. Can Cloudron be configured to send/receive email through a remote proxy? If no, what changes would be needed to support this configuration?
        4. Will using dynamic dns for Cloudron apps be a problem?

        This might have come up on the forum before, but I was unable to find anything. Links to prior conversations on this topic would be appreciated.

        robiR Offline
        robiR Offline
        robi
        wrote on last edited by
        #2

        @infogulch https://docs.cloudron.io/email/#smtp-server

        Conscious tech

        infogulchI 1 Reply Last reply
        2
        • robiR robi

          @infogulch https://docs.cloudron.io/email/#smtp-server

          infogulchI Offline
          infogulchI Offline
          infogulch
          wrote on last edited by
          #3

          @robi Yes, it looks like outbound would be pretty straightforward to configure -- it's just SMTP. I'm most curious about how inbound forwarding could be achieved, I'm not sure I've ever seen that before, though I don't know why it wouldn't be possible.

          1 Reply Last reply
          0
          • infogulchI infogulch

            I've been running Cloudron on a VPS (Linode) for a while, but recently purchased some hardware and I want to migrate to host apps at my home instead, with one exception: Email. Email is a bit different than web apps in that outbound deliverability relies a lot on IP reputation, which is not possible to maintain on a consumer ISP plan where your IP can change every time the modem reboots, and where whole residential ASNs are often blocked en masse.

            I think I'd like to keep email flowing through the VPS and basically use it as a proxy to send and receive email. This way I can keep my current IP for email for $5/mo (cheaper than any business plan my ISP could offer), and use dynamic DNS to host plain web apps from my home internet.

            1. Opinions on this idea in general? Good idea or no?
            2. What should I run on the VPS system to act as a proxy for email?
            3. Can Cloudron be configured to send/receive email through a remote proxy? If no, what changes would be needed to support this configuration?
            4. Will using dynamic dns for Cloudron apps be a problem?

            This might have come up on the forum before, but I was unable to find anything. Links to prior conversations on this topic would be appreciated.

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by girish
            #4

            @infogulch yes, I have a similar setup.

            • All my apps are at home. The Cloudron domain is my.home.example.com. I add an extra Domain example.com. I installed apps into example.com as app1.example.com, app2.example.com and so on.
            • My email server is on DO. Domain is my.example.com.

            For outbound email:

            • Create a mailbox called homeserver in email server. So, this is homeserver@example.com
            • Enable masquerading in the email server.
            • In my home cloudron, go to Email -> example.com -> Outbound settings. Set the email credentials for homeserver@example.com. This will allow apps to now send email.
            infogulchI 1 Reply Last reply
            3
            • girishG girish

              @infogulch yes, I have a similar setup.

              • All my apps are at home. The Cloudron domain is my.home.example.com. I add an extra Domain example.com. I installed apps into example.com as app1.example.com, app2.example.com and so on.
              • My email server is on DO. Domain is my.example.com.

              For outbound email:

              • Create a mailbox called homeserver in email server. So, this is homeserver@example.com
              • Enable masquerading in the email server.
              • In my home cloudron, go to Email -> example.com -> Outbound settings. Set the email credentials for homeserver@example.com. This will allow apps to now send email.
              infogulchI Offline
              infogulchI Offline
              infogulch
              wrote on last edited by
              #5

              @girish cool thanks for writing up the details.

              How do you manage inbound email? A catch-all would receive it all, but then it still has to be routed to individual users on the home server.

              girishG robiR 2 Replies Last reply
              0
              • infogulchI infogulch

                @girish cool thanks for writing up the details.

                How do you manage inbound email? A catch-all would receive it all, but then it still has to be routed to individual users on the home server.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #6

                @infogulch oh my emails reside entirely on the DO VPS. I have not considered piping incoming mail via the VPS into the home server. I am not sure how this will work because atleast in my ISP incoming mail ports are blocked.

                As an aside, I backup the DO VPS into minio installed on the home server. That way emails are backed up at home for me.

                1 Reply Last reply
                1
                • infogulchI infogulch

                  @girish cool thanks for writing up the details.

                  How do you manage inbound email? A catch-all would receive it all, but then it still has to be routed to individual users on the home server.

                  robiR Offline
                  robiR Offline
                  robi
                  wrote on last edited by robi
                  #7

                  @infogulch You just IMAP to the outbound server mailbox for any inbound mails.

                  Otherwise you'd have to set up some sort of private network or tunnel between your home server and the VPS to have the incoming mail work on the right port at the VPS and pass it through to your home server.

                  Conscious tech

                  infogulchI 1 Reply Last reply
                  1
                  • robiR robi

                    @infogulch You just IMAP to the outbound server mailbox for any inbound mails.

                    Otherwise you'd have to set up some sort of private network or tunnel between your home server and the VPS to have the incoming mail work on the right port at the VPS and pass it through to your home server.

                    infogulchI Offline
                    infogulchI Offline
                    infogulch
                    wrote on last edited by infogulch
                    #8

                    @robi @girish yeah that makes sense, use the VPS server for all email, apps on the home Cloudron that need to send outbound can use the same server with the setup described above.

                    Maybe I'm just being unreasonable, but I'd prefer to have email stored on the home server instead. Partially to shift more compute resources locally (the VPS can be cheaper), and partially for digital sovereignty reasons (e.g. a search warrant would be a knock on my front door, not a silent VM snapshot made by the provider under a gag order).

                    I guess the right term is "inbound email relay", and the more common reasons to use them are to improve uptime and do pre-filtering for spam. I remember setting this up doing local small business IT before everyone just switched to Office 365...

                    nebulonN 1 Reply Last reply
                    2
                    • infogulchI infogulch

                      @robi @girish yeah that makes sense, use the VPS server for all email, apps on the home Cloudron that need to send outbound can use the same server with the setup described above.

                      Maybe I'm just being unreasonable, but I'd prefer to have email stored on the home server instead. Partially to shift more compute resources locally (the VPS can be cheaper), and partially for digital sovereignty reasons (e.g. a search warrant would be a knock on my front door, not a silent VM snapshot made by the provider under a gag order).

                      I guess the right term is "inbound email relay", and the more common reasons to use them are to improve uptime and do pre-filtering for spam. I remember setting this up doing local small business IT before everyone just switched to Office 365...

                      nebulonN Offline
                      nebulonN Offline
                      nebulon
                      Staff
                      wrote on last edited by
                      #9

                      @infogulch if you can find an email relay services to relay outgoing messages, then you can have your email server at home just fine. This is the setup I am using for a long time. In my case I use postmark for the relay to send out emails, but maybe there are more privacy focused relays by now. I haven't thought further about postmark after setup, since it has worked flawlessly since then.

                      1 Reply Last reply
                      1
                      • infogulchI infogulch referenced this topic on
                      • R Offline
                        R Offline
                        racheberry
                        wrote on last edited by
                        #10

                        This is a pretty smart idea! By the way, one of the most common mistakes newbies make when setting up a proxy server on a VPS is to leave it open for anonymous authentication.

                        1 Reply Last reply
                        0
                        • robiR robi referenced this topic on
                        • B Offline
                          B Offline
                          bwag
                          wrote on last edited by bwag
                          #11

                          I need a similar solution to @girish because my ISP apparently blocks incoming port 25 as well. girish's post is very helpful. My main questions about girish's approach are: (1) Does Cloudron try to overwrite the relevant MX, SPF, and DKIM records? (2) Can I still use Cloudron to easily host a webmail client like Roundcube for homeserver@example.com, fetching the emails from the VPS? Or are the email client apps all configured to use local Cloudron-managed mail only?

                          girishG 1 Reply Last reply
                          0
                          • girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #12

                            @bwag if ISP blocks port 25, you have to use a relay - https://docs.cloudron.io/email/#relay-outbound-mails . There is no other way around it.

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              bwag
                              wrote on last edited by
                              #13

                              Thanks @girish . I have actually already set up an SMTP relay on my VPS and it successfully sends mail out. But only then did I realize that my ISP blocks incoming port 25 as well. I can't receive mail on my cloudron at home. So I think I need to give up on the relay idea and just host the entire mail server on my VPS, just like you described above in post #4. My questions are about your solution in post #4, I hope they make sense.

                              1 Reply Last reply
                              0
                              • B bwag

                                I need a similar solution to @girish because my ISP apparently blocks incoming port 25 as well. girish's post is very helpful. My main questions about girish's approach are: (1) Does Cloudron try to overwrite the relevant MX, SPF, and DKIM records? (2) Can I still use Cloudron to easily host a webmail client like Roundcube for homeserver@example.com, fetching the emails from the VPS? Or are the email client apps all configured to use local Cloudron-managed mail only?

                                girishG Offline
                                girishG Offline
                                girish
                                Staff
                                wrote on last edited by
                                #14

                                @bwag said in Proxy email via VPS:

                                (1) Does Cloudron try to overwrite the relevant MX, SPF, and DKIM records?

                                When you use the setup described in step 4, you don't need to adjust any of these records. This is because the Cloudron at home is like a mail client. The DNS records are not used by mail clients but my mail servers. The DNS records will be set to your VPS mail server.

                                (2) Can I still use Cloudron to easily host a webmail client like Roundcube for homeserver@example.com, fetching the emails from the VPS? Or are the email client apps all configured to use local Cloudron-managed mail only?

                                Roundcube has to be installed on the VPS server and not in your home server. You are correct that client apps are all configured to use the local Cloudron mail (which in this is case is in the VPS and not at home).

                                1 Reply Last reply
                                0
                                • B Offline
                                  B Offline
                                  bwag
                                  wrote on last edited by bwag
                                  #15

                                  Thank you! I had forgotten that we can turn the Cloudron incoming mail server off, so it won't try to set DNS records. It's working for me now.

                                  Roundcube has to be installed on the VPS server and not in your home server.

                                  It would be fun to be able to run an email client from Cloudron, e.g. with POP to fetch mail from the VPS. That would help with the data sovereignty point mentioned above. But for now, I'll celebrate getting email working at all.

                                  1 Reply Last reply
                                  0
                                  • infogulchI infogulch

                                    I've been running Cloudron on a VPS (Linode) for a while, but recently purchased some hardware and I want to migrate to host apps at my home instead, with one exception: Email. Email is a bit different than web apps in that outbound deliverability relies a lot on IP reputation, which is not possible to maintain on a consumer ISP plan where your IP can change every time the modem reboots, and where whole residential ASNs are often blocked en masse.

                                    I think I'd like to keep email flowing through the VPS and basically use it as a proxy to send and receive email. This way I can keep my current IP for email for $5/mo (cheaper than any business plan my ISP could offer), and use dynamic DNS to host plain web apps from my home internet.

                                    1. Opinions on this idea in general? Good idea or no?
                                    2. What should I run on the VPS system to act as a proxy for email?
                                    3. Can Cloudron be configured to send/receive email through a remote proxy? If no, what changes would be needed to support this configuration?
                                    4. Will using dynamic dns for Cloudron apps be a problem?

                                    This might have come up on the forum before, but I was unable to find anything. Links to prior conversations on this topic would be appreciated.

                                    N Offline
                                    N Offline
                                    NCKNE
                                    wrote on last edited by
                                    #16

                                    @infogulch If you want to deploy your Cloudron instance on a home internet connection, you might consider running it through a Wireguard tunnel to a VPS with a public IP.

                                    1 Reply Last reply
                                    0
                                    • infogulchI infogulch

                                      I've been running Cloudron on a VPS (Linode) for a while, but recently purchased some hardware and I want to migrate to host apps at my home instead, with one exception: Email. Email is a bit different than web apps in that outbound deliverability relies a lot on IP reputation, which is not possible to maintain on a consumer ISP plan where your IP can change every time the modem reboots, and where whole residential ASNs are often blocked en masse.

                                      I think I'd like to keep email flowing through the VPS and basically use it as a proxy to send and receive email. This way I can keep my current IP for email for $5/mo (cheaper than any business plan my ISP could offer), and use dynamic DNS to host plain web apps from my home internet.

                                      1. Opinions on this idea in general? Good idea or no?
                                      2. What should I run on the VPS system to act as a proxy for email?
                                      3. Can Cloudron be configured to send/receive email through a remote proxy? If no, what changes would be needed to support this configuration?
                                      4. Will using dynamic dns for Cloudron apps be a problem?

                                      This might have come up on the forum before, but I was unable to find anything. Links to prior conversations on this topic would be appreciated.

                                      R Offline
                                      R Offline
                                      Rahul
                                      wrote on last edited by
                                      #17

                                      Your plan to use the VPS for email and home for web apps makes sense. Keeping email on the VPS ensures stable deliverability while hosting apps at home is cost-effective.

                                      It’s a solid plan and can use a Mail Relay setup with Postfix for SMTP and Dovecot for inbound mail. Cloudron doesn’t natively support email proxy, but you can configure it to send via your VPS’s SMTP relay and forward incoming mail via Postfix. It Works for web apps but may cause SSL and DNS propagation issues, so check automation for SSL renewals.
                                      You might want to check Cloudron forums for similar setups!

                                      1 Reply Last reply
                                      1
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Bookmarks
                                        • Search