Hello,
I am creating for every user on my system a new email address with our own domain in mail-in-a-box. I use the curl api of mail-in-a-box for that. I would like to automatically forward the in coming emails for every user to their real original email address. I am aware of the manual approach -> going to roundcube -> settings -> filter -> redirect …
But I want to set it up automatically for every user. Is that possible? Maybe change roundcube database configuration for every user?
Create an alias in the admin panel … (using the API)
But this is not the recommended approach as some providers (looking at you Goofle) do not respect SRS. And many other email providers (such as Yahoo!) do not allow for their emails to be forwarded - meaning that receiving servers bounce them.
Honestly I am not 100% certain, but most likely not. It all depends on how RC handles the forwarded email … I don’t know if it sends the email on as its own or just forwards it. If the former, it may be fine but if the latter the same applies. Honestly, you are much better off using mail fetch or similar if your email provider supports it.
So actually even though the forwarding is configured in Roundcube, the mail rules are actually managed and executed by Dovecot (the IMAP service). Roundcube accesses the rules over the “managesieve” protocol. Other applications can too.
The forwarding that is configured in Roundcube is a proper mail forward equivalent to composing a new message, so it should not fail SPF/DMARC filtering, unlike aliases, which do in this scenario.