I configured a catch-all address in Postfix. It is showing the catch-all address in the headers instead of the recipient address. How can I get the actual recipient address to show instead of the catch-all address?
Here is a proper way to set up a catch-all address so that the actual recipient address shows in the email headers:
Catch-alls are usually defined like this in the virtual_mailbox_maps:
me@example.com virtualdomain.com/me
@example.com virtualdomain.com/me
The virtualdomain.com is defined in virtual_mailbox_domains.
This setup doesn't create a forward, but it just drops it in the same place.
Here is a example of a proper virtual configuration:
virtual_mailbox_domains = /etc/postfix/virtual_domains
virtual_mailbox_base = /var/mail/vhosts
virtual_alias_maps = hash:/etc/postfix/virtual_aliases
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 7
virtual_uid_maps = static:8
virtual_gid_maps = static:8
The virtualdomain.com would then expand to /var/mail/vhosts/virtualdomain.com
Don't forget to run postmap on the files referenced with hash, to create a .db file.