How do i correctly setup an email forwarding for a specific user?

Your question

whats the correct way of doing this?
or does each user has to do this for himself? or can the admin do it?

stalwart 0.16.16

looks like

redirect “mail.example.com”;
keep;

does what i want.

I didn’t find an example in the docs.
I have still the question, can an admin set this for a user?

That’s the right mechanism, just one correction: redirect takes an email address, not a hostname. Your snippet has redirect "mail.example.com";, which won’t forward anywhere useful. It wants:

redirect "[email protected]";
keep;

The keep; is needed and your instinct there was right: redirect cancels the implicit keep, so without it the message is forwarded and not stored locally. Note the default limits on user scripts are maxRedirects 1 and maxOutMessages 3, so a single forward is fine but a script with several needs those raised.

There’s no forwarding field on the account itself, the emails list only routes addresses into the account, so Sieve is the way to do it. And yes, an admin can set it for someone: grant the admin the impersonate permission, then connect to ManageSieve or the account portal as [email protected]%[email protected] with the admin’s own password, and install the script into that user’s store. One thing to watch, app passwords don’t work for impersonation logins. And Settings > Sieve > User Scripts is a global library users can import from, not a per-user store, so it isn’t the right tool for a single user.