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. Support
  3. not working email forward when email relay ?

not working email forward when email relay ?

Scheduled Pinned Locked Moved Solved Support
emailrelayforwarding
20 Posts 4 Posters 2.8k Views 4 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.
  • F Offline
    F Offline
    freetommy
    wrote on last edited by
    #11

    @girish Thank you.

    My test,
    Even if outbound email is set to SES or Gmail,
    The raindrop app's automatic forwarding emails (based on filter settings) do not use SES or Gmail, but use port 25.

    girishG 1 Reply Last reply
    0
    • F freetommy

      @girish Thank you.

      My test,
      Even if outbound email is set to SES or Gmail,
      The raindrop app's automatic forwarding emails (based on filter settings) do not use SES or Gmail, but use port 25.

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

      @freetommy If I understand you correctly, what you are saying is that when email forwarding is enabled in rainloop, then the forwarding is done directly to the destination domain via port 25 instead of using Cloudron's email relay. Did I get that right?

      M 1 Reply Last reply
      0
      • girishG girish

        @freetommy If I understand you correctly, what you are saying is that when email forwarding is enabled in rainloop, then the forwarding is done directly to the destination domain via port 25 instead of using Cloudron's email relay. Did I get that right?

        M Offline
        M Offline
        msbt
        App Dev
        wrote on last edited by
        #13

        @girish Sorry to hijack this topic, but this could be related to my issue as well. I was already talking to @nebulon on the chat but I couldn't get this to work even with the latest version of Cloudron (6.3.2).

        What I'm trying to do (and please, tell me if there's another way to solve this): I'm hosting a website where different cities/locations get email addresses like location@example.com. Those that are new to the project don't get to use the address to send emails, they should only be on the receiving end, so they give me their address and I'll add a forwarding rule in Rainloop.

        So a mail to location1@example.com should be delivered to non-cloudron-email@somehoster.com. I've added a filter in Rainloop and use Postmark as an email relay. The mails to location1@example.com (obviously) arrive with no problems, but the forwarding does not work due to a SMTP API Error on Postmark:

        The 'From' address you supplied ("Name" mytest@email.com) is not a Sender Signature on your account. Please add and confirm this address in order to be able to use it in the 'From' field of your messages.

        I can't add that address to the sender signatures, because this could be any email address out there. This also includes mailinglists, so every forward to a non-Cloudron address is being blocked.

        So the important question is (and it's a rather urgent one, because I was hoping the last update fixed this): How can I forward mails to non-Cloudron addresses, any ideas?

        girishG 1 Reply Last reply
        0
        • M msbt

          @girish Sorry to hijack this topic, but this could be related to my issue as well. I was already talking to @nebulon on the chat but I couldn't get this to work even with the latest version of Cloudron (6.3.2).

          What I'm trying to do (and please, tell me if there's another way to solve this): I'm hosting a website where different cities/locations get email addresses like location@example.com. Those that are new to the project don't get to use the address to send emails, they should only be on the receiving end, so they give me their address and I'll add a forwarding rule in Rainloop.

          So a mail to location1@example.com should be delivered to non-cloudron-email@somehoster.com. I've added a filter in Rainloop and use Postmark as an email relay. The mails to location1@example.com (obviously) arrive with no problems, but the forwarding does not work due to a SMTP API Error on Postmark:

          The 'From' address you supplied ("Name" mytest@email.com) is not a Sender Signature on your account. Please add and confirm this address in order to be able to use it in the 'From' field of your messages.

          I can't add that address to the sender signatures, because this could be any email address out there. This also includes mailinglists, so every forward to a non-Cloudron address is being blocked.

          So the important question is (and it's a rather urgent one, because I was hoping the last update fixed this): How can I forward mails to non-Cloudron addresses, any ideas?

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

          @msbt I fixed email forwarding 6.3 but let me test with a relay.

          M 1 Reply Last reply
          0
          • girishG girish

            @msbt I fixed email forwarding 6.3 but let me test with a relay.

            M Offline
            M Offline
            msbt
            App Dev
            wrote on last edited by
            #15

            @girish thanks, lmk if you need testing, I tried some things with @nebulon already

            girishG 2 Replies Last reply
            0
            • M msbt

              @girish thanks, lmk if you need testing, I tried some things with @nebulon already

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

              @msbt Just tested this now via postmark and forwarding via sieve and mailing list works for me.

              I can't add that address to the sender signatures, because this could be any email address out there. This also includes mailinglists, so every forward to a non-Cloudron address is being blocked.

              You only have to add the sender signature for the domain for which postmark is relaying. For example, cloudron.space is my domain and I am relaying it via postmark. Like this:

              bbd57c10-687b-40bd-9181-6b600048080e-image.png

              My roundcube filter looks like this:

              26852fb9-40d8-4d08-b579-c10cdff11158-image.png

              1 Reply Last reply
              0
              • M msbt

                @girish thanks, lmk if you need testing, I tried some things with @nebulon already

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

                @msbt Also tested using rainloop filter now:

                2b9d77c1-ee37-4682-a7ad-a5bfab7e9da7-image.png

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

                  OK, @msbt helped me figure this one out. The issue comes when using forwarding feature with relays like postmark. Such relays do not allow Envelope From to be different than Header From . We found a workaround for the moment by using a sieve script but I will look into how this can be incorporated into the mail server itself.

                  The sieve script we used is something like below. This requires the editheader extension which is now enabled by default in 6.3.3.

                  require "editheader";
                  require "variables";
                  require "envelope";
                  
                  # ... Any other rules
                  
                  # Obtain the user's full email address somehow
                  # It can be obtained from the recipient address (without full name)
                  # An alternative is to put the primary address into the script as a literal.
                  if envelope :matches "to" "*" { set "user_email" "${1}"; }
                  if envelope :matches "from" "*" { set "real_from" "${1}"; }
                  
                  # This part of the script MUST be the final rule, otherwise other rules are
                  # affected since the message is modified.
                  
                  # Drop the original "From:" header
                  deleteheader "from";
                  deleteheader "to";
                  
                  # Add a new "From:" header
                  addheader "From" "${user_email}";
                  addheader "Reply-To" "${real_from}";
                  addheader "To" "test@cloudron.io";
                  
                  redirect "test@cloudron.io";
                  
                  M 1 Reply Last reply
                  2
                  • girishG girish

                    OK, @msbt helped me figure this one out. The issue comes when using forwarding feature with relays like postmark. Such relays do not allow Envelope From to be different than Header From . We found a workaround for the moment by using a sieve script but I will look into how this can be incorporated into the mail server itself.

                    The sieve script we used is something like below. This requires the editheader extension which is now enabled by default in 6.3.3.

                    require "editheader";
                    require "variables";
                    require "envelope";
                    
                    # ... Any other rules
                    
                    # Obtain the user's full email address somehow
                    # It can be obtained from the recipient address (without full name)
                    # An alternative is to put the primary address into the script as a literal.
                    if envelope :matches "to" "*" { set "user_email" "${1}"; }
                    if envelope :matches "from" "*" { set "real_from" "${1}"; }
                    
                    # This part of the script MUST be the final rule, otherwise other rules are
                    # affected since the message is modified.
                    
                    # Drop the original "From:" header
                    deleteheader "from";
                    deleteheader "to";
                    
                    # Add a new "From:" header
                    addheader "From" "${user_email}";
                    addheader "Reply-To" "${real_from}";
                    addheader "To" "test@cloudron.io";
                    
                    redirect "test@cloudron.io";
                    
                    M Offline
                    M Offline
                    msbt
                    App Dev
                    wrote on last edited by
                    #19

                    @girish thanks for that, I added one line to it, so the mails stay in the inbox in addition to the redirect, else they would not be saved:

                    require "editheader";
                    require "variables";
                    require "envelope";
                    require "fileinto";
                    
                    # ... Any other rules
                    fileinto "INBOX";
                    
                    # Obtain the user's full email address somehow
                    # It can be obtained from the recipient address (without full name)
                    # An alternative is to put the primary address into the script as a literal.
                    if envelope :matches "to" "*" { set "user_email" "${1}"; }
                    if envelope :matches "from" "*" { set "real_from" "${1}"; }
                    
                    # This part of the script MUST be the final rule, otherwise other rules are
                    # affected since the message is modified.
                    
                    # Drop the original "From:" header
                    deleteheader "from";
                    deleteheader "to";
                    
                    # Add a new "From:" header
                    addheader "From" "${user_email}";
                    addheader "Reply-To" "${real_from}";
                    addheader "To" "test@cloudron.io";
                    
                    redirect "test@cloudron.io";
                    

                    where test@cloudron.io is the address that the emails should be forwarded to.

                    To activate this you have to edit the file /home/yellowtent/boxdata/mail/vmail/address_to_be_forwarded@example.com/sieve/rainloop.user.sieve and paste it inside the filter block.

                    girishG 1 Reply Last reply
                    2
                    • M msbt

                      @girish thanks for that, I added one line to it, so the mails stay in the inbox in addition to the redirect, else they would not be saved:

                      require "editheader";
                      require "variables";
                      require "envelope";
                      require "fileinto";
                      
                      # ... Any other rules
                      fileinto "INBOX";
                      
                      # Obtain the user's full email address somehow
                      # It can be obtained from the recipient address (without full name)
                      # An alternative is to put the primary address into the script as a literal.
                      if envelope :matches "to" "*" { set "user_email" "${1}"; }
                      if envelope :matches "from" "*" { set "real_from" "${1}"; }
                      
                      # This part of the script MUST be the final rule, otherwise other rules are
                      # affected since the message is modified.
                      
                      # Drop the original "From:" header
                      deleteheader "from";
                      deleteheader "to";
                      
                      # Add a new "From:" header
                      addheader "From" "${user_email}";
                      addheader "Reply-To" "${real_from}";
                      addheader "To" "test@cloudron.io";
                      
                      redirect "test@cloudron.io";
                      

                      where test@cloudron.io is the address that the emails should be forwarded to.

                      To activate this you have to edit the file /home/yellowtent/boxdata/mail/vmail/address_to_be_forwarded@example.com/sieve/rainloop.user.sieve and paste it inside the filter block.

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

                      @msbt thanks! I will try to see if I can make this just "work" in the next release.

                      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