Re: Problem with postfix and nscd

From: Tony Earnshaw (no email)
Date: Thu Jun 02 2005 - 07:46:12 EDT

  • Next message: Victor Duchovni: "Re: Problem with postfix and nscd"

    tor, 02.06.2005 kl. 12.59 skrev Angel L. Mateo:

    > > It's difficult to comment without knowing what you have in your LDAP
    > > DIT. For example, what does amateo have as mail attribute? what is his
    > > uid? What is your standard domain for LDAP lookups?
    > >
    > the mail attribute is (my real email address) and my uid
    > attribute is amateo, my login id in the mail system (I am a real user on
    > the mail server).

    You instruct Postfix to look up in LDAP as follows:

    users_query_filter = (&(mail=%s)(objectClass=CourierMailAccount))
    aliases_result_attribute = uid

    It will find 'mail=' and it will return amateo, nothing
    else.

    > But I don't know what do you stand for the standard domain for LDAP
    > lookups.

    Heh?

    > I have defined an entry like:
    >
    > dn: dc=es,<root dc for postfix objects>
    > objectClass: dNSDomain
    > objectClass: domainRelatedObject
    > dc: es
    > associatedDomain: um.es
    > associatedDomain: alu.um.es
    >
    > with al my virtual domains.
    >
    > Postfix's main.cf defines its virtual domains with:
    >
    > virtual_alias_domains = ldap:acceptdomains
    > acceptdomains_server_host = <my ldap server>
    > acceptdomains_server_port = 389
    > acceptdomains_bind = yes
    > acceptdomains_bind_dn = <ldap bind dn>
    > acceptdomains_bind_pw = <ldap bind password>
    > acceptdomains_search_base = <root dc for postfix objects>
    > acceptdomains_query_filter = (associatedDomain=%s)
    > acceptdomains_result_attribute = associatedDomain

    If you have left this (or similar) in main.cf, then you have a problem.

    > so it could know that um.es is one of its virtual domains. As
    > mydestination attribute I have $myhostname, in my case,
    > myotis2.telemat.um.es. But I haven't got any user with a
    > <user>@myotis2.telemat.um.es as his mail attribute in the LDAP DIT.

    Then do the following in /etc/postfix, both with and without nscd - it
    should return the same in each case:

    'postmap -q ldap:users', or whatever you've called your
    mumble_recipient_maps lookup bit. Personally I have all these LDAP maps
    as separate files in a subdirectory of /etc/postfix (Postfix 2.1.5 and
    2.2.3).

    > To resolve user in a virtual domain to local users I have:
    >
    > virtual_alias_maps = ldap:users
    > users_server_host = <my ldap server>
    > users_server_port = 389
    > users_bind = yes
    > users_bind_dn = <ldap bind dn>
    > users_bind_pw = <ldap bind password>
    > users_search_base = <root dc for users>
    > users_query_filter = (&(mail=%s)(objectClass=CourierMailAccount))
    > users_result_attribute = uid
    >
    > And the users are defined (in the LDAP) as:
    >
    > dn: uid=amateo,<root dc for users>
    > objectClass: account
    > objectClass: posixAccount
    > objectClass: shadowAccount
    > objectClass: CourierMailAccount
    > uid: amateo
    > uidNumber: <uid number>
    > gidNumber: <gid number>
    > homeDirectory: <homeDirectory>
    > host: correo
    > mailbox: <homeDirectory>/Maildir/
    > mail:
    > loginShell: /bin/bash
    > cn: Angel Luis Mateo Martinez
    > shadowLastChange: 12926
    > userPassword: <the password>

    Looks o.k. But if you've left that other LDAP bit above in main.cf, then
    you've found the cause of your problem.

    --Tonni

    -- 
    mail: 
    http://www.billy.demon.nl
    

  • Next message: Victor Duchovni: "Re: Problem with postfix and nscd"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD