smtp_forward for Haraka?
I'm thinking about moving some mailboxes I currently have running on iRedmail to my Cloudron instance (for this I have also created https://forum.cloudron.io/topic/1326/fetchmail-fetch-external-mailboxes-to-cloudron, since I would still need a way to fetch some external mailboxes).
For this to work I would also need to relay some mailboxes to a different host. From what I could find Haraka generally supports this through https://haraka.github.io/manual/plugins/queue/smtp_forward.html. Are there plans to expose this functionality in Cloudron? Is there an update safe way to configure this manually?
@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
imapsyncthat does this. I will post in this forum shortly.
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.
Hillside502 last edited by
How about creating a filter in Roundcube? You could then redirect incoming mail.
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: firstname.lastname@example.org, email@example.com and firstname.lastname@example.org
- 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 email@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 last edited by
You can filter to redirect any combination of TO etc addresses.
KISS principle - Wikipedia
@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.
@girish any further thoughts in the use of smtp_forward with Haraka on Cloudron?
@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_forwardmechanism but I think to implement that will require lot more thought to see how it fits into existing Cloudron features.
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.
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!