Postfix + LDAP and query_filter

Discussion in 'Server Operation' started by somnium, Jan 14, 2014.

  1. somnium

    somnium New Member

    [email protected],

    my ldap-users have two ldap attributes where their mail addresses and alias are stored in ([email protected] and [email protected]).

    unfortunately the domains are mixed between the two attributes:

    User1: [email protected] and [email protected]
    User2: [email protected] and [email protected]

    everything works fine with this query_filter for virtual aliases in postfix:

    query_filter = (&(objectclass=gosaMailAccount)(|(mail=%s)(gosaMailAlternateAddress=%s)))
    result_attribute = uid, memberUid

    now my problem:
    I want to split the two domains to two different mailserver, the old one with the old domain and a new server with So, if a mail arrives at the old server with, it should be relayed to the new server. but the virtual-checks are very early in the postfix-stack, so postfix finds always the domain and handles it as a local domain - even i removed from virtual_alias_domains.

    how can I change the filter not to find any domains?

    i tried it with


    and so on, but it doesn't work. I need something like "grep -v" behind the filter :eek: :D

    any ideas?

Share This Page