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


Navigation

    Cloudron Forum

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

    smtp_forward for Haraka?

    Discuss
    3
    11
    1262
    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.
    • girish
      girish Staff last edited by

      @fbartels Did I understand correctly that you are trying import mailboxes from an existing mail server to Cloudron? If so, we have a script based on imapsync that does this. I will post in this forum shortly.

      fbartels 2 Replies Last reply Reply Quote 0
      • fbartels
        fbartels App Dev @girish last edited by

        @girish said in smtp_forward for Haraka?:

        Did I understand correctly that you are trying import mailboxes from an existing mail server to Cloudron

        Kind of, but continuously. Imapsync is great for migrating single or multiple mailboxes. What I am trying to achieve is fetching mails from another inbox on a regular interval. E.g. get mails from a Hotmail mailbox every fifteen minutes.

        But that was the other post I've made, here it's more about Haraka. I want to SMTP forward mails for a given user to another system. In postfix this would be a transport.

        1 Reply Last reply Reply Quote 0
        • Hillside502
          Hillside502 last edited by

          How about creating a filter in Roundcube? You could then redirect incoming mail.

          fbartels 1 Reply Last reply Reply Quote 0
          • fbartels
            fbartels App Dev @Hillside502 last edited by

            @hillside502 said in smtp_forward for Haraka?:

            How about creating a filter in Roundcube?

            That would as far as I know only work with a new forwarding address and therefore only with domains with a mx record. To make it a bit less abstract imagine the following scenario:

            • you have a domain example.com
            • on this domain you have three users: joe@example.com, jane@example.com and boss@example.com
            • you point your mx record to your cloudron. all three accounts will now be delivered here.
            • boss now wants to have work with his mail in e.g. office 365

            With a transport/smtp_forward you can now only let mails to boss@example.com be forwarded/delivered to office 365. and you could still use the same mail archiver/anti-spam solution for this address like your whole other domain.

            Hillside502 1 Reply Last reply Reply Quote 0
            • Hillside502
              Hillside502 @fbartels last edited by

              @fbartels
              You can filter to redirect any combination of TO etc addresses.

              KISS principle - Wikipedia
              https://en.wikipedia.org/wiki/KISS_principle

              fbartels 1 Reply Last reply Reply Quote 0
              • fbartels
                fbartels App Dev @Hillside502 last edited by

                @hillside502 I'm not talking about the "to" or on what to filter. The "redirect" action in sieve only allows to forward to other email addresses, not other servers.

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

                  @girish any further thoughts in the use of smtp_forward with Haraka on Cloudron?

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

                    @fbartels mm, I think this is a possibly a feature that we need to add to Cloudron where some mailboxes are specifically forwarded to another host.

                    I can suggest a few hacks, let me know if any of these work or not:

                    • Capture all the mails in Cloudron. Then make your other host pull email periodically from Cloudron via IMAP. Basically, instead of push it becomes pull.
                    • If you have many mailboxes to forward, first create a mailbox named "catchall". Then forward all emails on Cloudron to this "catchall" mailbox. You can then again, pull images from another host via IMAP and distribute it as needed.
                    • Another option is also to make the catchall address to be the address on a Cloudron app. On Cloudron, each app gets a unique mailbox but this can actually be renamed. This way you can have all your emails delivered to the app instead. The app can then take these emails (via IMAP/recvmail addon) and push them out. This is a bit complex since it might require some changes in the code/database to allow this setup.

                    I understand it's not easy as the smtp_forward mechanism but I think to implement that will require lot more thought to see how it fits into existing Cloudron features.

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

                      Looking a bit closer https://haraka.github.io/manual/plugins/queue/smtp_forward.html will only work at the domain level (and not mailbox level). @fbartels so, I am not sure if smtp_forward will work for your use case.

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

                        @girish said in smtp_forward for Haraka?:

                        I am not sure if smtp_forward will work for your use case.

                        oh, that is indeed true. I stumbled upon something that suggested that this could be achieved with smtp_forward, but reading the page closer this indeed would not work as desired for me.

                        I'd rather want to avoid fetching mails from cloudron the the extra server. I'll have to think about some alternative approaches (maybe stick with my current relay setup and just make cloudron one of the relay targets).

                        Thanks for looking into this!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post