I have a setup using Postfix with a MySQL database to configure domains, accounts and aliases.
I can set up a catch-all address when using a @example.com mail and forward it to [email protected].
Now I want a more advanced catch-all, like user-%@example.com to forward all to [email protected] and prod-%@example.com forward to [email protected]. % should be any alpha-numeric letter combination like [email protected] or [email protected].
Is this possible or do I need to change my setup?
Seems feasible enough with slight effort; Postfix supports random user-created aliases via the
recipient_delimiterconfiguration directive, so you could setrecipient_delimiter = -and create[email protected]as an alias to[email protected], anduser-%@example.comwould resolve first viarecipient_delimiterto[email protected], and from there via the alias map to[email protected]. (If you already have email addresses containing dashes in your domain, you'll need to choose a different delimiter, or those addresses will stop working.)