I have set the Postfix and virtual mapping successfully:
virtual_mailbox_domains = test.com test2.com virtual_mailbox_base = /var/mail/virtualhosts virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox virtual_minimum_uid = 500 virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 virtual_alias_maps = hash:/etc/postfix/virtual allow_mail_to_commands = forward
Then in /etc/postfix/virtual, I set the following catch-all rule:
firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com @test.com test_catchall
In /etc/postfix/virtual_mailbox, I set these:
firstname.lastname@example.org test.com_pop1 email@example.com test.com_pop2
By the way, I already created a system user "test_catchall".
Now, the weird thing begins. When I send an email to firstname.lastname@example.org, it's captured by "test_catchall" account. No problem so far. But if I send an email to one of the set system user accounts, it's still being captured by test_catchall instead of the real owner.
Catch-all works properly for virtual aliases however.
What am I doing wrong?