URL: https://linuxfr.org/forums/linux-debian-ubuntu/posts/postfix-dovecot-et-openldap-je-men-sors-pas Title: Postfix, Dovecot, et OpenLDAP: je m'en sors pas. Authors: Graveen Date: 2011年04月06日T19:43:06+02:00 Tags: debian Score: 1 Bonjour, Je ne m'en sors pas entre postfix, dovecot et ldap. Je suis sous debian lenny. Je souhaite tout simplement faire un serveur de mail, basé sur un webmail, avec des utilisateurs virtuels. Et là, c'est le drame. Invariablement, je tombe sur 'user unknown' lors de la distribution locale. utilisateur vmail(1000) et groupe mail(8) propriétaires des boites virtuelles machine: mymachine domaine: myhost.mydomain utilisateurs virtuels: user1, user2 suivant schema inetOrgPerson: sn: user1 cn: mon user1 uid: user1 mail: user1@myhost.mydomain userPasswd: pass1 ldap en bind avec admin: dn= cn=admin,dc=myhost,dc=mydomain J'ai donc: *config LDAP : uniquement des inetOrgPerson, avec un 2 utilisateurs, filtrés par leur uid. ldapsearch et testsaslauthd me semblent correct (ils renvoient bien les infos attendues). Même si je ne pense pas utiliser sasl dans postfix pour debugguer mon souci *configuration de Dovecot: je me connecte bien en telnet localhost 143, - login user1 pass1 me renvoie OK. Du coup, j'ai accès via ma webmail aux dossiers IMAPs, qui sont crée lors du premier accès avec un utilisateur virtuel via ma webmail *configuration de postfix: j'ai défini Dovecot en LDA, postmap -q user1@myhost.mydomain ldap:/etc/postfix/ldap.cf me renvoit bien user1@myhost.mydomain Si vous aviez des points me permettant de tester précisement soit dovecot soit ldap, soit postfix, merci à vous, j'ai passé bcp de temps là dessus sans entrevoir une solution, malgré les innombrables tutos sur le net. J'ai un tiret dans le nom de mon hôte, du coup avec une méthode de test précise ca m'aiderait peut-être à séparer ce qui marche de ce qui ne marche pas :( Merci ! le log système: --------------- `Apr 6 21:15:37 mymachine postfix/smtpd[8857]: connect from localhost.localdomain[127.0.0.1] Apr 6 21:15:37 mymachine postfix/smtpd[8857]: C703941C20C: client=localhost.localdomain[127.0.0.1] Apr 6 21:15:37 mymachine postfix/cleanup[8860]: C703941C20C: message-id=<1f9c-4d9cbc00-13-3dbe5fc0@212200418> Apr 6 21:15:37 mymachine postfix/smtpd[8857]: disconnect from localhost.localdomain[127.0.0.1] Apr 6 21:15:37 mymachine postfix/qmgr[8526]: C703941C20C: from=, size=561, nrcpt=1 (queue active) Apr 6 21:15:37 mymachine postfix/pipe[8861]: C703941C20C: to=, relay=dovecot, delay=0.17, delays=0.15/0.01/0/0.02, dsn=5.1.1, status=bounced (user unknown) Apr 6 21:15:37 mymachine postfix/cleanup[8860]: E360C41C20D: message-id=<20110406191537.e360c41c20d@mymachine.myhost.mydomain> Apr 6 21:15:37 mymachine postfix/bounce[8863]: C703941C20C: sender non-delivery notification: E360C41C20D Apr 6 21:15:37 mymachine postfix/qmgr[8526]: E360C41C20D: from=, size=2404, nrcpt=1 (queue active) Apr 6 21:15:37 mymachine slapd[8535]: <= bdb_equality_candidates: (uid) not indexed Apr 6 21:15:37 mymachine postfix/qmgr[8526]: C703941C20C: removed Apr 6 21:15:37 mymachine postfix/pipe[8861]: E360C41C20D: to=, relay=dovecot, delay=0.06, delays=0.03/0/0/0.03, dsn=5.1.1, status=bounced (user unknown) Apr 6 21:15:38 mymachine postfix/qmgr[8526]: E360C41C20D: removed` mon main.cf: ------------ `myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache myhostname = mymachine.myhost.mydomain mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf alias_maps = ldap:/etc/postfix/ldap-aliases.cf mydestination = myhost.mydomain, mymachine.myhost.mydomain, localhost.localdomain, localhost relayhost = mynetworks = 127.0.0.0/8 local_transport = dovecot mailbox_size_limit = 51200000 recipient_delimiter = + inet_interfaces = all inet_protocols = ipv4` mon master.cf, d'origine avec ajouté: ------------------------------------- `dovecot unix - n n - - pipe flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -d $recipient` ldap-accounts.cf: ----------------- `server_host = localhost server_port = 389 search_base = dc=myhost,dc=mydomain query_filter = (&(objectClass=inetOrgPerson)(mail=%s)) result_attribute = uid bind = yes bind_dn = cn=admin,dc=myhost,dc=mydomain bind_pw = adminpassword version = 3` ldap-aliases.cf: ---------------- `server_host = localhost server_port = 389 search_base = dc=myhost,dc=mydomain query_filter = (&(objectClass=inetOrgPerson)(mail=%s)) result_attribute = mail bind = yes bind_dn = cn=admin,dc=myhost,dc=mydomain bind_pw = adminpassword version = 3` dovecot.conf: ------------- `protocols = imap imaps pop3s mail_location = maildir:/var/mail/%n mail_uid = 1000 mail_gid = 8 protocol lda { postmaster_address = postmaster auth_socket_path = /var/run/dovecot/auth-master } protocol imap { imap_client_workarounds = outlook-idle } protocol pop3 { pop3_uidl_format = %08Xu%08Xv } auth default { mechanisms = plain passdb ldap { args = /etc/dovecot/dovecot-ldap.conf } userdb ldap { args = /etc/dovecot/dovecot-ldap.conf } socket listen { master { path = /var/run/dovecot/auth-master mode = 0600 user = vmail group = mail } } }` dovecot-ldap.conf: ------------------ `hosts = localhost dn = cn=admin,dc=myhost,dc=mydomain dnpass = adminpassword auth_bind = yes ldap_version = 3 base = dc=myhost,dc=mydomain scope = subtree user_filter = (&(objectClass=inetOrgPerson)(uid=%u)) pass_attrs = uid=user,userPassword=password pass_filter = (&(objectClass=inetOrgPerson)(uid=%u)) default_pass_scheme = CRYPT`

AltStyle によって変換されたページ (->オリジナル) /