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:

test@test.com test@gmail.com
test2@test.com test2@gmail.com
@test.com test_catchall

In /etc/postfix/virtual_mailbox, I set these:

pop1@test.com test.com_pop1
pop2@test.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 bounce@test.com, 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?



If my memory serves me right, in the past I had to use virtual_maps instead of virtual_alias_maps.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.