Right now the alias table stores all goto addresses in one string for one destination.
From a database perspective it would be better to change this to have one goto address per row.
This would allow, for example, to deactivate specific forwardings easily (e.g., to intertwine this with the autoresponder), to find forwardings to external domains more easily, and also to find all aliases pointing to a address (#960) more easily.
Furthermore, if a forwarding to a local address was set up (#799), it could be more easily checked that when the destination is about to be deleted that this is prevented if it is the only destination (to prevent email being lost) or to prevent backscatter overall.
On the database level, the query in Postfix can be adjusted (SELECT group_concat(goto SEPARATOR ',') FROM alias WHERE address=...;) or a trigger could be used to merge all goto-addresses as soon as there are changes to the new alias table.
Right now the alias table stores all goto addresses in one string for one destination.
From a database perspective it would be better to change this to have one goto address per row.
This would allow, for example, to deactivate specific forwardings easily (e.g., to intertwine this with the autoresponder), to find forwardings to external domains more easily, and also to find all aliases pointing to a address (#960) more easily.
Furthermore, if a forwarding to a local address was set up (#799), it could be more easily checked that when the destination is about to be deleted that this is prevented if it is the only destination (to prevent email being lost) or to prevent backscatter overall.
On the database level, the query in Postfix can be adjusted (SELECT group_concat(goto SEPARATOR ',') FROM alias WHERE address=...;) or a trigger could be used to merge all goto-addresses as soon as there are changes to the new alias table.