On Thu, May 26, 2011 at 1:43 PM, Victor Duchovni
<victor.ducho...@morganstanley.com> wrote:
> On Thu, May 26, 2011 at 01:27:24PM -0700, Stephen Ingram wrote:
>
>> >> I receive an error "User unknown in virtual alias table"
>> >> and the mail is bounced.
>> >
>> > Likely the LDAP table incorrectly returns results that don't depend
>> > on the lookup key, or for additional unintended lookup keys.
>> >
>> >> Since I'm holding everything
>> >> else constant, I'm not sure why hash vs ldap would make any
>> >> difference.
>> >
>> > Because the table contents are not equivalent. Try:
>> >
>> > ? ?postmap -q example.com ldap:/etc/postfix/domains
>> >
>> > if this returns "4test.net", that's your problem.
>>
>> That query returns nothing. Here are the ldap parameters I'm using:
>>
>> query_filter = 
>> (&(objectClass=postfixVirtualDomain)(virtualDomain=%s)(entryActive=TRUE))
>> result_attribute = virtualDomain
>
> In that case you have unintended lookup keys in the table for domains
> whose users are not universally virtual alias users. Remember that all
> addresses in a virtual alias domain MUST rewrite to a *real* domain.

I'm a little confused with what you are saying here. In the hash
lookup table for domains I just have, for example:

4test.net     4test.net

thinking that the right side doesn't matter. Postfix is just looking
for the presence of the domain, no?

For the ldap lookup, postfix is looking for 4test.net for which the
query results in the same 4test.net returned. Isn't that correct?

In both cases, the user, u...@test.net is looked up in the
virtual_aliases_map (ldap) which converts the address to a local user
(user in this example) and the mail is delivered via lmtp to cyrus
(when it works). Also note that the virtual_alias_map is the same ldap
lookup in both cases. The only thing I'm changing is whether the
domain lookup is using a hash table or ldap table.

Steve

Reply via email to