On Tue, Aug 31, 2010 at 04:05:57PM +0200, Marco Rebsamen wrote: > Ok I removed that * now from the request an used "mail" as > result_attribute. This works now for the local domain ...
Good. > I added all the non-local domains to the parameter virtual_alias_domains > and set virtual_alias_maps to ldap:/etc/postfix/virtual.cf Do you understand what virtua alias domains are for? > I tested it with postmap -q and it worked. What does "worked" mean? > But if I send a message to that domain I get the message back: > User unknown in virtual alias table That means that the recipient address did NOT get rewritten into a real (not virtual alias) domain. > message_size_limit = 0 Generally unwise. > mydestination = $myhostname, localhost, $mydomain > myhostname = mx-rel.unimatrix0.ch > relay_domains = $mydestination, hash:/etc/postfix/relay > relayhost = smtp.hispeed.ch > sender_canonical_maps = hash:/etc/postfix/sender_canonical Generally unwise to use sender_canonical_maps. Use smtp_generic_maps instead to rewrite outbound email. > smtp_enforce_tls = no Obsolete. > smtp_use_tls = yes > smtpd_use_tls = no Obsolete, use smtp_tls_security_level = may smtpd_tls_security_level = none > transport_maps = hash:/etc/postfix/transport > virtual_alias_domains = sinus-elektro.ch spinsch.ch > virtual_alias_maps = ldap:/etc/postfix/virtual.cf These domains can't host real recipients, all recipients must be rewritten to a real domain. > And the content of virtual.cf > > search_base = DC=hive, DC=loc > query_filter = proxyAddresses=smtp:%s > result_attribute = mail Probably "mail" is the original address in most cases. Where is such mail routed? If to another server, these are "relay" domains, not virtual alias domains, unless you rewrite the address in transit... -- Viktor.