it is not accepted.
I also had a look at the scripts in /etc/univention/templates/files/etc/postfix/ to find out, what a valid entry may be, but could find a hint.
Does anyone know how to add valid entries to the virtual file via the web interface?
The file /etc/postfix/virtual is not managed by UCR; you can edit its content with any regular editor. You must call sudo postmap /etc/postfix/virtual afterwards to re-generate the database for Postfix.
The file is used as default_virtual_alias_maps, which also uses other databases:
we tested it and have to admit, that is does not solve our problem: Your solution will only work, if the the alternative address is within the same domain as the first one. If e.g. we like to send a copy of every email to this account to an GMX account, the web interface refuses to the save the entry because gmx.de is not one of the configured mail domain.
And as far as I understand the documentation, a configured domain will be regarded as a local domain.
First of all notice the loop from user1@domain.de to itself: this is a no-no!
Historically you would have used a ~/.forward file to configure the forwarding to an (additional) external address, but with delivery to IMAP that no longer works. (it is implemented by the local delivery agent of Postfix, but the lmtp delivery agent gets used to forward the email to the IMAP server.)
You can use recipient_bcc_maps instead, which should to the trick for you. But currently UCS does not provide a mechanism to set this (or any other used useful setting) - there is Bug #44473 which requests adding a local.conf file, which would allow you to add this.
As an alternative you can use the redirect :copy feature from SIEVE, so Dovecot as you IMAP server will do the forwarding on a user basis. (I did not check this myself if Dovecot implements that :copy extension)
Since UCS 4.2 errata36 you can configure external email aliases for user accounts in the “Advanced Settings” tab → Mail → Mail forwarding.
You can configure multiple addresses to which every email received by the primary email address will be forwarded to. You can choose there if you want to “Redirect all e-mails to forward addresses” or “Keep e-mails and forward a copy”.