Authentication in LDAP with different UID

From: Jose Morelli Neto (no email)
Date: Mon Jan 08 2007 - 07:06:42 EST

  • Next message: RJ45: "Re: mailboxes.db problem"

    Hello,

    I am updating the mail server at my work and in this process I decided to
    change the Courier-IMAP for the Cyrus-IMAP, however I still came across
    myself with a problem without solution (at least for me). Here, all users
    have an personal ID who is used to effect the authentication in some systems
    (also in the mail). For example, an user with the personal ID 12345 possess
    the mail

    If I create the mailbox in cyrus with the personal ID (cm user.12345), I can
    connect through imap/pop3 and cyrus get access to the mailbox without
    problems (using as user 12345), however when sending a message for this
    user, postfix delivery saw LMTP for cyrus, that does not locate mailbox
    (with the error: lmtpunix [5514]: to verify_user (user.12345) failed:
    Mailbox you donate not exist). Then if I create mailbox with the user's mail
    (cm ), the message is delivery without problems from
    postfix to cyrus (that it finds mailbox), however I can't have access to
    mailbox saw IMAP/POP using as login the person code (12345) and only the
    email ().

    The authentication of cyrus is made by SASL using the mechanism PAM (that it
    validates through LDAP).

    It follows some configurations to facilitate the understanding:
    /etc/imapd.conf --------------------------------------
    configdirectory: /var/lib/imap
    partition-default: /var/spool/imap
    admins: cyrus
    sievedir: /var/lib/imap/sieve
    sendmail: /usr/sbin/sendmail
    hashimapspool: true
    sasl_pwcheck_method: saslauthd
    sasl_mech_list: PLAIN
    tls_cert_file: /usr/share/ssl/certs/cyrus-imapd.pem
    tls_key_file: /usr/share/ssl/certs/cyrus-imapd.pem
    tls_ca_file: /usr/share/ssl/certs/ca-bundle.crt
    virtdomains: userid
    defaultdomain: domain.com
    /etc/imapd.conf --------------------------------------

    /etc/postfix/main.cf --------------------------------
    virtual_transport = lmtp:unix:/var/lib/imap/socket/lmtp
    canonical_maps = proxy:ldap:/etc/postfix/ldap/canonical.cf
    /etc/postfix/main.cf --------------------------------

    usuário.ldif -------------------------
    dn: uid=12345,ou=users,dc=domain,dc=com
    uid: 12345
    cn: Test User
    sn: test
    loginShell: /bin/false
    uidNumber: 90001
    mail:
    quota: 20971520
    gidNumber: 513
    homeDirectory: /home/user
    mailbox: /home/user/Maildir/
    mailHost: siaimail10.domain.com
    description: description
    enableMail: S
    objectClass: top
    objectClass: person
    objectClass: posixAccount
    objectClass: shadowAccount
    objectClass: CourierMailAccount
    objectClass: inetLocalMailRecipient
    usuário.ldif -------------------------

     I tried through postfix, modify/create/use some macro (those used in
    master.cf: ${user} ${extension}) that it passed to cyrus the personal ID (in
    the place of the address) but I did not have success.

     I made with the SASL authenticate in LDAP using the UID, but did not give
    very certain, therefore cyrus uses proper login to locate mailbox, and thus
    I don't deliver the message saw lmtp (therefore mailbox was with the name of
    the user).

     The only thing next than I found of what necessary patch of the Kolab was
    one that allows (theoretically, I did not make tests) to consult the virtual
    domínios through ldap.

    I used canonical_maps in postfix quering ldap for the mail ()
    and returning email (), but for virtual domains I would
    have to add a new attribute in LDAP with the personal ID + the domain.

     Someone has experience in this integration and that it can help me?

     thank's for attention.
    Neto.

    -- 
    José Morelli Neto
    http://josemorelli.net
    
    

    ----
    Cyrus Home Page: http://cyrusimap.web.cmu.edu/
    Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
    List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
    

  • Next message: RJ45: "Re: mailboxes.db problem"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD