postfix half-virtual domains
I'm trying to configure postfix-dovecot-fetchmail (to maildir) on my home server, and I'm facing some difficulties with postfix virtual mailbox configuration.
What I want is... my virtual domain is mydomain.com. Mail for email@example.com, where firstname.lastname@example.org is in virtual_mailbox_maps, should be delivered locally with virtual transport, according to virtual_mailbox_maps.
Mail for email@example.com, where everything_else is *not* listed in virtual_mailbox_maps (and I'm not fetching it with fetchmail), should be delivered thru my isp smtp relay.
The typical case is... I want to fetch mail for firstname.lastname@example.org, but I want to be able to write to email@example.com, address that I DON'T manage on my server....
Now.. if I PUT mydomain.com in virtual_mailbox_domains, I can receive (with fetchmail) messages for firstname.lastname@example.org. Fetchmail sends them to postfix smtp and postfix uses virtual transport to put them in maildir folder. If I write something to email@example.com, messages are delivered correctly directly to maildir folder.
BUT... I can't write messages to firstname.lastname@example.org because, being not listed in virtual_mailbox_maps, they are rejected.
If I DON'T put mydomain.com in virtual_mailbox_domains, I can send messages to email@example.com, but I can't receive for/send to firstname.lastname@example.org, because postfix relays to my isp smtp (looping forever).
What a mess! :)