Just for the record I found a workaround that makes not mandatory
specifying the remote users. It's a kind of a mixture local/virtual:
mydomain = example.com
mydestination = $myhostname localhost.$mydomain localhost $mydomain
transport_maps = hash:/etc/postfix/transport
local_recipient_maps = $transport_maps, $virtual_mailbox_maps,
$alias_maps, $alias_database
virtual_mailbox_base = /usr/local/vdomains/
home_mailbox = Maildir/
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_uid_maps = static:1000
virtual_gid_maps = static:501
virtual_transport = maildrop
fallback_transport = virtual

/etc/postfix/transport:
    foo...@example.com smtp:172.16.34.34

foobar doesn't exist in the ldap directory but the email is redirected
to 172.16.34.34 acording to the transport configuration.

The rewriting solution is much-much simpler and clearer, but I'd like
to know if this configuration is a kind of aberration created by a
sick mind.

Reply via email to