postfix-users April 2012 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: Postfix and LDAP lookups

Re: Postfix and LDAP lookups

From: /dev/rob0 <rob0_at_nospam>
Date: Tue Apr 10 2012 - 13:42:22 GMT
To: postfix-users@postfix.org

On Tue, Apr 10, 2012 at 03:20:23PM +0200, Igmar Palsenberg wrote:
>
> >> alias_maps = ldap:/etc/postfix/ldap-aliases.cf
> >> virtual_alias_maps = ldap:/etc/postfix/ldap-virtual.cf
> >> virtual_alias_domains = $virtual_alias_maps
>
> The virtual_alias_domains probably does a lookup in 'jdi.nl'. That
> isn't directly in the map. Crap.
>
> > Looks like you are using virtual alias domains
> > (http://www.postfix.org/ADDRESS_CLASS_README.html). You should
> > check if the intended domain (jdi.nl) is found with querying
> > virtual_alias_domains with something "like postmap -q jdi.nl
> > ldap:/etc/postfix/ldap-virtual.cf".
>
> Is there a way to let postfix actually log the map lookups it does
> ? I've got debug_peer_level = 10 and a debug_peer_list set to the
> testmachine, but that gave me little to go on.

You only need the normal logging. You have a misconfiguration, not
software bugs. This would be trivial to figure out if you had shown
us your non-verbose logs of one attempt. You probably have your
domain in the wrong address class.

> Logging the actual map lookups would be a very good starting
> point to debug this setup.

Not necessary, but as per the DEBUG_README to which you were
referred, it can be done.

> I can post the actual logging if someone's interested.

Verbose logs: no. Non-verbose logs: sure.

> I probably need to do a lookup on the domain part, and return that
> in the virtual_alias_domains map. Hints welcome, but I've got
> something to go on for now.

You probably need to have the domain listed in the proper address
class definition. I don't think we have enough information here yet
to be able to give any specific advice.
-- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: