What you are looking for is a virtual alias table and can be done using the following...
First you need to edit, or create if it doesn't already exist, the /etc/postfix/virtual file.
example.com whatever
@example.com [email protected]
After this has been saved you will need to run postmap /etc/postfix/virtual
in order to generate the indexed /etc/postfix/virtual.db Postfix will read.
You will then need to edit the /etc/postfix/main.cf and be sure that you have the following line uncommented:
virtual_alias_maps = hash:/etc/postfix/virtual
This will actually let postfix know about the virtual alias table and use it.
The problem with using the luser_relay
option as others have mentioned is that this is treated as the user of last resorts for unknown addresses by the local delivery agent. If postfix is only handling mail for one domain this can be utilized for this but it can mask other configuration errors and will likely cause unexpected results if more than one domain is being handled.
The one caveat I feel obligated to mention is that by creating a wildcard alias of this nature you are opening up your mail system to accept messages for addresses that will not exist and run the risk of having the mailbox filled quickly with spam for non-existent mailboxes.