OnpenLDAP et Dovecot

Fermé
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012 - 26 févr. 2010 à 13:08
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012 - 18 mars 2010 à 13:40
Bonjour,
Bonjour a tous: Je dois mettre en place un service de mail avec: Postfix Dovecot Ldap Pour le moment Ldap et dovecot sont installés. Le but étant de se connecter sur le serveur dovecot a passant par un utilisateur enregistré dans LDAP. Lors du test en telenet:

Flo-Debian:/home/florian# telnet 127.0.0.1 143
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
* OK Dovecot ready.
. login test@flo-debian.gescom test
. NO Temporary authentication failure.

fichier mail.err:
Feb 25 14:39:32 Flo-Debian dovecot: auth(default): ldap(test@flo-debian.gescom,127.0.0.1): ldap_search((&(objectClass=mailAccount)(mailenable=OK))) failed: No such object

Comment puis-je réussir mon authentification au pres de openLDAP ? l'utilisateur test a été crée et est visible depuis phpadminldap. Je travaille sous une Debian Lenny
Fichier de config: slapd.conf:

# Features to permit
#allow bind_v2

# Schema and objectClass definitions
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/mmc.schema
include /etc/ldap/schema/mail.schema


# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile /var/run/slapd/slapd.pid
# List of arguments that were passed to the server
argsfile /var/run/slapd/slapd.args

# Read slapd.conf(5) for possible values
loglevel 256

# Where the dynamically loaded modules are stored
modulepath /usr/lib/ldap
moduleload back_bdb

# The maximum number of entries that is returned for a search operation
sizelimit 500

# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1

#######################################################################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend bdb

#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend

#######################################################################
# Specific Directives for database #1, of type bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database bdb

# The base of your directory in database #1
suffix "dc=flo-debian,dc=gescom"

# rootdn directive for specifying a superuser on the database. This is needed
# for syncrepl.
rootdn "cn=admin,dc=flo-debian,dc=gescom"
rootpw gescom
# Where the database file are physically stored for database #1
directory "/var/lib/ldap"

# The dbconfig settings are used to generate a DB_CONFIG file the first
# time slapd starts. They do NOT override existing an existing DB_CONFIG
# file. You should therefore change these settings in DB_CONFIG directly
# or remove DB_CONFIG and restart slapd for changes to take effect.

# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 2097152 0

# Sven Hartge reported that he had to set this value incredibly high
# to get slapd running at all. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=303057 for more
# information.

# Number of objects that can be locked at the same time.
dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
dbconfig set_lk_max_locks 1500
# Number of lockers
dbconfig set_lk_max_lockers 1500

# Indexing options for database #1
index objectClass eq
index cn,sn pres,eq,sub,subany

# Save the time that the entry gets modified, for database #1
lastmod on

# Checkpoint the BerkeleyDB database periodically in case of system
# failure and to speed slapd shutdown.
checkpoint 512 30

# Where to store the replica logs for database #1
# replogfile /var/lib/ldap/replog

# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only
access to attrs=userPassword,shadowLastChange
by dn="cn=admin,dc=flo-debian,dc=gescom" write
by anonymous auth
by self write
by * none

# Ensure read access to the base for things like
# supportedSASLMechanisms. Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work
# happily.
access to dn.base="" by * read

# The admin dn has full write access, everyone else
# can read everything.
access to *
by dn="cn=admin,dc=flo-debian,dc=gescom" write
by * none
by * read

# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
#access to dn=".*,ou=Roaming,o=morsnet"
# by dn="cn=admin,dc=flo-debian,dc=gescom" write
# by dnattr=owner write

#######################################################################
# Specific Directives for database #2, of type 'other' (can be bdb too):
# Database specific directives apply to this databasse until another
# 'database' directive occurs
#database

# The base of your directory for database #2
#suffix "dc=debian,dc=org"

- ldap.conf:

# LDAP Defaults

# See ldap.conf(5) for details
# This file should be world readable but not world writable.
host localhost
base dc=flo-debian,dc=gescom
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never

- dovecot.conf:

protocols = imap
auth default {
# Space separated list of wanted authentication mechanisms:
# plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi
# NOTE: See also disable_plaintext_auth setting.
mechanisms = plain login

# LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
passdb ldap {
# Path for LDAP configuration file
args = /etc/dovecot/dovecot-ldap.conf
}

userdb ldap {
# Path for LDAP configuration file
args = /etc/dovecot/dovecot-ldap.conf
}

user = root

master {
# Master socket provides access to userdb information. It's typically
# used to give Dovecot's local delivery agent access to userdb so it
# can find mailbox locations.
path = /var/run/dovecot/auth-master
#mode = 0600
# Default user/group is the one who started dovecot-auth (root)
user = vmail
group = mail
}

dovecot-ldap.conf:

#
# NOTE: If you're not using authentication binds, you'll need to give
# dovecot-auth read access to userPassword field in the LDAP server.
# With OpenLDAP this is done by modifying /etc/ldap/slapd.conf. There should
# already be something like this:

# access to attribute=userPassword
# by dn="<dovecot's dn>" read # add this
# by anonymous auth
# by self write
# by * none

# Space separated list of LDAP hosts to use. host:port is allowed too.
hosts = flo-debian.gescom

# LDAP URIs to use. You can use this instead of hosts list. Note that this
# setting isn't supported by all LDAP libraries.
#uris =

# Distinguished Name - the username used to login to the LDAP server
#dn = cn=test,ou=Users,dc=flo-debian,dc=gescom

# Password for LDAP server
#dnpass = test

# Use SASL binding instead of the simple binding. Note that this changes
# ldap_version automatically to be 3 if it's lower. Also note that SASL binds
# and auth_bind=yes don't work together.
#sasl_bind = no
# SASL mechanism name to use.
#sasl_mech =
# SASL realm to use.
#sasl_realm =
# SASL authorization ID, ie. the dnpass is for this "master user", but the
# dn is still the logged in user. Normally you want to keep this empty.
#sasl_authz_id =

# Use TLS to connect to the LDAP server.
#tls = no

# Use authentication binding for verifying password's validity. This works by
# logging into LDAP server using the username and password given by client.
# The pass_filter is used to find the DN for the user. Note that the pass_attrs
# is still used, only the password field is ignored in it. Before doing any
# search, the binding is switched back to the default DN.
auth_bind = yes
#
# If you use this setting, it's a good idea to use a different
# dovecot-ldap.conf for userdb (it can even be a symlink, just as long as the
# filename is different in userdb's args). That way one connection is used only
# for LDAP binds and another connection is used for user lookups. Otherwise
# the binding is changed to the default DN before each user lookup.
#
# For example:
# auth_bind_userdn = cn=%u,ou=people,o=org
#
#auth_bind_userdn =

# LDAP protocol version to use. Likely 2 or 3.
ldap_version = 3

# LDAP base. %variables can be used here.
base = dc=flo-debian, dc=gescom

# Dereference: never, searching, finding, always
deref = never

# Search scope: base, onelevel, subtree
scope = subtree

# User attributes are given in LDAP-name=dovecot-internal-name list. The
# internal names are:
# uid - System UID
# gid - System GID
# home - Home directory
# mail - Mail location
#
# There are also other special fields which can be returned, see
# https://wiki.dovecot.org/UserDatabase/ExtraFields
user_attrs = mailbox=home

# Filter for user lookup. Some variables can be used (see
# https://wiki.dovecot.org/Variables for full list):
# %u - username
# %n - user part in user@domain, same as %u if there's no domain
# %d - domain part in user@domain, empty if user there's no domain
user_filter = (&(objectClass=mailAccount)(mail=%u)(mailenable=OK))


# Password checking attributes:
# user: Virtual user name (user@domain), if you wish to change the
# user-given username to something else
# password: Password, may optionally start with {type}, eg. {crypt}
# There are also other special fields which can be returned, see
# https://wiki.dovecot.org/PasswordDatabase/ExtraFields
pass_attrs = mail=user,userPassword=password

# If you wish to avoid two LDAP lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb ldap in dovecot.conf. In that case you'll
# also have to include user_attrs in pass_attrs field prefixed with "userdb_"
# string. For example:
#pass_attrs = uid=user,userPassword=password,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid

# Filter for password lookups
pass_filter = (&(objectClass=mailAccount)(mail=%u)(mailenable=OK))

# Default password scheme. "{scheme}" before password overrides this.
# List of supported schemes is in: https://wiki.dovecot.org/Authentication
#default_pass_scheme = CRYPT

# You can use same UID and GID for all user accounts if you really want to.
# If the UID/GID is still found from LDAP reply, it overrides these values.
user_global_uid = vmail
user_global_gid = mail






Merci a tous

21 réponses

bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
26 févr. 2010 à 22:04
Bonjour, pour ca t'as un excellent tuto que je recommande sans hésiter.
http://www.vogelweith.com/debian_server/07_postfix.php#x1-50002
En passant laisser un petit merci à l'éditeur ca lui ferra plaisir surement :-).
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
8 mars 2010 à 11:09
Ok merci pour ta réponse mais c'est deja le tuto que j'ai utilisé ...

Sinon mon prob dovecot et fini j'ai réussi a m identifié... le filtre dans mon fichier ldap-dovecot n'etait pas correcte.

Maintenant j'ai un problème pour authentifier avec postifx sur ldap, je suis toujours le meme tuto mais je n'arrive pas au résultat :s
0
bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
8 mars 2010 à 11:16
bonjour,
t'as quoi comme message d'erreur?
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
8 mars 2010 à 11:53
Bonjour,
Voici une partie des fichier log et si tu veux voir un peu quoi a ressemble mon fichier postfix.conf tu peux toujours regarder sur : https://linuxfr.org/forums/linux-debian-ubuntu/posts/postifx-sender-non-delivery

===mail.info===

Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Search found 1 match(es)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Leaving dict_ldap_get_values
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Search returned nothing
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: maps_find: virtual_alias_maps: flo@flo-debian.gescom: not found
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: In dict_ldap_lookup
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Using existing connection for LDAP source /etc/postfix/ldap-aliases.cf
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: /etc/postfix/ldap-aliases.cf: Searching with filter (&(objectClass=mailAccount)(mailalias=flo)(mailenable=OK))
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Search found 0 match(es)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Leaving dict_ldap_get_values
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Search returned nothing
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: In dict_ldap_lookup
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Using existing connection for LDAP source /etc/postfix/ldap-maildrop.cf
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: /etc/postfix/ldap-maildrop.cf: Searching with filter (&(objectClass=mailAccount)(mailenable=OK)(mail=flo))
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Search found 0 match(es)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Leaving dict_ldap_get_values
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Search returned nothing
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: maps_find: virtual_alias_maps: flo: not found
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: In dict_ldap_lookup
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Using existing connection for LDAP source /etc/postfix/ldap-aliases.cf
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: /etc/postfix/ldap-aliases.cf: Searching with filter (&(objectClass=mailAccount)(mailalias=@flo-debian.gescom)(mailenable=OK))
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Search found 0 match(es)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Leaving dict_ldap_get_values
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Search returned nothing
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: In dict_ldap_lookup
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Using existing connection for LDAP source /etc/postfix/ldap-maildrop.cf
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: /etc/postfix/ldap-maildrop.cf: Searching with filter (&(objectClass=mailAccount)(mailenable=OK)(mail=@flo-debian.gescom))
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Search found 0 match(es)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Leaving dict_ldap_get_values
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Search returned nothing
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: maps_find: virtual_alias_maps: @flo-debian.gescom: not found
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: mail_addr_find: flo@flo-debian.gescom -> (not found)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: In dict_ldap_lookup
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: No existing connection for LDAP source /etc/postfix/local_recipients, reopening
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_connect: Connecting to server ldap://localhost:389
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_connect: Actual Protocol version used is 2.
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_connect: Binding to server ldap://localhost:389 as dn
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_connect: Successful bind to server ldap://localhost:389 as
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_connect: Cached connection handle for LDAP source /etc/postfix/local_recipients
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: /etc/postfix/local_recipients: Searching with filter (mail=flo@flo-debian.gescom)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Search found 1 match(es)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: search returned 1 value(s) for requested result attribute mail
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_get_values[1]: Leaving dict_ldap_get_values
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: dict_ldap_lookup: Search returned flo@flo-debian.gescom
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: maps_find: local_recipient_maps: ldap:/etc/postfix/local_recipients(0,lock|fold_fix): flo@flo-debian.gescom = flo@flo-debian.gescom
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: mail_addr_find: flo@flo-debian.gescom -> flo@flo-debian.gescom
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: smtpd_check_rewrite: trying: permit_inet_interfaces
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: permit_inet_interfaces: localhost 127.0.0.1
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: before input_transp_cleanup: cleanup flags = enable_header_body_filter enable_automatic_bcc enable_address_mapping enable_milters
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: after input_transp_cleanup: cleanup flags = enable_header_body_filter enable_automatic_bcc enable_address_mapping
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: connect to subsystem public/cleanup
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: public/cleanup socket: wanted attribute: queue_id
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: input attribute name: queue_id
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: input attribute value: 63AEC54365
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: public/cleanup socket: wanted attribute: (list terminator)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: input attribute name: (end)
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: send attr flags = 178
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: 63AEC54365: client=localhost[127.0.0.1]
Mar 8 11:48:03 flo-Debian postfix/smtpd[3689]: > localhost[127.0.0.1]: 250 2.1.5 Ok
Mar 8 11:48:06 flo-Debian postfix/smtpd[3689]: < localhost[127.0.0.1]: data
Mar 8 11:48:06 flo-Debian postfix/smtpd[3689]: > localhost[127.0.0.1]: 354 End data with <CR><LF>.<CR><LF>
Mar 8 11:48:10 flo-Debian postfix/cleanup[3695]: 63AEC54365: message-id=<20100308104803.63AEC54365@flo-Debian.gescom>
Mar 8 11:48:10 flo-Debian postfix/smtpd[3689]: public/cleanup socket: wanted attribute: status
Mar 8 11:48:10 flo-Debian postfix/smtpd[3689]: input attribute name: status
Mar 8 11:48:10 flo-Debian postfix/smtpd[3689]: input attribute value: 0
Mar 8 11:48:10 flo-Debian postfix/smtpd[3689]: public/cleanup socket: wanted attribute: reason
Mar 8 11:48:10 flo-Debian postfix/smtpd[3689]: input attribute name: reason
Mar 8 11:48:10 flo-Debian postfix/smtpd[3689]: input attribute value: (end)
Mar 8 11:48:10 flo-Debian postfix/smtpd[3689]: public/cleanup socket: wanted attribute: (list terminator)
Mar 8 11:48:10 flo-Debian postfix/smtpd[3689]: input attribute name: (end)
Mar 8 11:48:10 flo-Debian postfix/smtpd[3689]: > localhost[127.0.0.1]: 250 2.0.0 Ok: queued as 63AEC54365
Mar 8 11:48:10 flo-Debian postfix/qmgr[3672]: 63AEC54365: from=<flo@Flo-Debian.gescom>, size=345, nrcpt=1 (queue active)
Mar 8 11:48:10 flo-Debian postfix/local[3698]: 63AEC54365: to=<flo@Flo-Debian.gescom>, orig_to=<flo>, relay=local, delay=14, delays=14/0.09/0/0.06, dsn=5.1.1, status=bounced (unknown user: "flo")
Mar 8 11:48:10 flo-Debian postfix/cleanup[3695]: BBD3D54367: message-id=<20100308104810.BBD3D54367@flo-Debian.gescom>
Mar 8 11:48:10 flo-Debian postfix/bounce[3699]: 63AEC54365: sender non-delivery notification: BBD3D54367
Mar 8 11:48:10 flo-Debian postfix/qmgr[3672]: 63AEC54365: removed
Mar 8 11:48:10 flo-Debian postfix/qmgr[3672]: BBD3D54367: from=<>, size=2099, nrcpt=1 (queue active)
Mar 8 11:48:10 flo-Debian postfix/local[3698]: BBD3D54367: to=<flo@Flo-Debian.gescom>, relay=local, delay=0.15, delays=0.11/0.01/0/0.03, dsn=5.1.1, status=bounced (unknown user: "flo")
Mar 8 11:48:10 flo-Debian postfix/qmgr[3672]: BBD3D54367: removed
Mar 8 11:48:12 flo-Debian postfix/smtpd[3689]: < localhost[127.0.0.1]: QUIT
Mar 8 11:48:12 flo-Debian postfix/smtpd[3689]: > localhost[127.0.0.1]: 221 2.0.0 Bye
Mar 8 11:48:12 flo-Debian postfix/smtpd[3689]: match_hostname: localhost ~? 127.0.0.0/8
Mar 8 11:48:12 flo-Debian postfix/smtpd[3689]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Mar 8 11:48:12 flo-Debian postfix/smtpd[3689]: disconnect from localhost[127.0.0.1]
Mar 8 11:48:12 flo-Debian postfix/smtpd[3689]: master_notify: status 1
Mar 8 11:48:12 flo-Debian postfix/smtpd[3689]: connection closed
Mar 8 11:48:12 flo-Debian postfix/smtpd[3689]: auto_clnt_close: disconnect private/tlsmgr stream
Mar 8 11:48:12 flo-Debian postfix/smtpd[3689]: rewrite stream disconnect
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
8 mars 2010 à 20:15
Bonjour, le tuto que je t'ai donner c'est pour utiliser des domaines virtuels.
est tu créer ton domaines virtuel flo-debian.gescom ?
c'est devecot qui s'occupe de la distribution des emails?
sinon envoi moi ton repertoir /etc/postfix puis le fichier de config dovecot.
une connexion en telnet 127.0.0.1 25 donne quoi par exemple
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
9 mars 2010 à 10:48
Alors euh pour le domaine virtuel je sais pas trop, flo-debian c'est le nom de la machine et gescom j'ai ajouté ca dans l'annuaire ldap
Pour la distribution oui c'est dovecot qui prend le prend en charge

Une connection telnet:
Connection closed by foreign host.
florian@Flo-Debian:~$ telnet 192.168.2.46 25
Trying 192.168.2.46...
Connected to 192.168.2.46.
Escape character is '^]'.
mail from:<test@gescom.be>

Et la j'ai un curseur et peut importe ce que je tape ca ne réagit plus

Message d'erreur
postfix/smtpd[5343]: fatal: no SASL authentication mechanisms

Sinon je peux t'envoyer les dossier comment ?
0
bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
9 mars 2010 à 13:43
t'as sans doute zapé une étape du tuto.
revérifie ton installation.
point 4.2 du tuto.
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
9 mars 2010 à 14:44
Ok vérification terminer et je n'ai plus le message d"erreur mais avec tout cette ******* en voila des autre :):

mail.log:

Mar 9 14:40:26 Flo-Debian postfix/master[5318]: daemon started -- version 2.5.5, configuration /etc/postfix
Mar 9 14:40:29 Flo-Debian postfix/pickup[5319]: 27D545429F: uid=0 from=<root>
Mar 9 14:40:29 Flo-Debian postfix/cleanup[5331]: 27D545429F: message-id=<20100309134029.27D545429F@flo-debian.gescom>
Mar 9 14:40:29 Flo-Debian postfix/qmgr[5321]: 27D545429F: from=<root@flo-debian.gescom>, size=323, nrcpt=1 (queue active)
Mar 9 14:40:29 Flo-Debian postfix/local[5333]: 27D545429F: to=<flo@flo-debian.gescom>, relay=local, delay=0.2, delays=0.15/0.02/0/0.02, dsn=5.1.1, status=bounced (unknown user: "flo")
Mar 9 14:40:29 Flo-Debian postfix/cleanup[5331]: 46711542A0: message-id=<20100309134029.46711542A0@flo-debian.gescom>
Mar 9 14:40:29 Flo-Debian postfix/qmgr[5321]: 46711542A0: from=<>, size=2073, nrcpt=1 (queue active)
Mar 9 14:40:29 Flo-Debian postfix/bounce[5335]: 27D545429F: sender non-delivery notification: 46711542A0
Mar 9 14:40:29 Flo-Debian postfix/qmgr[5321]: 27D545429F: removed
Mar 9 14:40:29 Flo-Debian postfix/local[5333]: 46711542A0: to=<florian@flo-debian.gescom>, orig_to=<root@flo-debian.gescom>, relay=local, delay=0.04, delays=0.02/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 9 14:40:29 Flo-Debian postfix/qmgr[5321]: 46711542A0: removed

syslog:

Mar 9 14:40:29 Flo-Debian slapd[1707]: conn=327 op=12 SRCH attr=maildrop
Mar 9 14:40:29 Flo-Debian slapd[1707]: <= bdb_equality_candidates: (mailenable) not indexed
Mar 9 14:40:29 Flo-Debian slapd[1707]: <= bdb_equality_candidates: (mail) not indexed
Mar 9 14:40:29 Flo-Debian slapd[1707]: conn=327 op=12 SEARCH RESULT tag=101 err=0 nentries=0 text=
Mar 9 14:40:29 Flo-Debian postfix/cleanup[5331]: 46711542A0: message-id=<20100309134029.46711542A0@flo-debian.gescom>
Mar 9 14:40:29 Flo-Debian postfix/qmgr[5321]: 46711542A0: from=<>, size=2073, nrcpt=1 (queue active)
Mar 9 14:40:29 Flo-Debian slapd[1707]: conn=328 op=2 SRCH base="ou=mailDomains,dc=gescom,dc=be" scope=2 deref=0 filter="(&(objectClass=mailDomain)(virtualdomain=flo-debian.gescom))"
Mar 9 14:40:29 Flo-Debian slapd[1707]: conn=328 op=2 SRCH attr=virtualdomain
Mar 9 14:40:29 Flo-Debian slapd[1707]: <= bdb_equality_candidates: (virtualdomain) not indexed
Mar 9 14:40:29 Flo-Debian slapd[1707]: conn=328 op=2 SEARCH RESULT tag=101 err=0 nentries=0 text=
Mar 9 14:40:29 Flo-Debian slapd[1707]: conn=328 op=3 SRCH base="ou=mailDomains,dc=gescom,dc=be" scope=2 deref=0 filter="(&(objectClass=mailDomain)(virtualdomain=flo-debian.gescom))"
Mar 9 14:40:29 Flo-Debian slapd[1707]: conn=328 op=3 SRCH attr=virtualdomain
Mar 9 14:40:29 Flo-Debian slapd[1707]: <= bdb_equality_candidates: (virtualdomain) not indexed
Mar 9 14:40:29 Flo-Debian slapd[1707]: conn=328 op=3 SEARCH RESULT tag=101 err=0 nentries=0 text=
Mar 9 14:40:29 Flo-Debian postfix/bounce[5335]: 27D545429F: sender non-delivery notification: 46711542A0
Mar 9 14:40:29 Flo-Debian postfix/qmgr[5321]: 27D545429F: removed
Mar 9 14:40:29 Flo-Debian postfix/local[5333]: 46711542A0: to=<florian@flo-debian.gescom>, orig_to=<root@flo-debian.gescom>, relay=local, delay=0.04, delays=0.02/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 9 14:40:29 Flo-Debian postfix/qmgr[5321]: 46711542A0: removed
Mar 9 14:40:35 Flo-Debian slapd[1707]: conn=328 fd=18 closed (connection lost)
Mar 9 14:42:09 Flo-Debian slapd[1707]: conn=327 fd=17 closed (connection lost)

Le dernier log est plus grand je ne sais pas si ca sera nécessaires...

flo etant mon compte ldap et florian le unix
0
bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
9 mars 2010 à 17:22
pour l'indexation essaye d'ajouter ca dans le fichier slapd.conf

index objectClass eq
index uid eq
index uidNumber eq
index gidNumber eq
index memberUid eq
index cn eq
index mail eq
index mailenable eq
index virtualdomain eq

vérifie ce que t'as comme droit sur les maildir des utilisateurs et qui est le owner.
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
10 mars 2010 à 09:48
Merci pour les index, sinon le problème sur l'envoie de mail est que j'avais mal compris la configuration des mail avec MMC et LDAP. J'ai crée un virtualDomain grace a MMC et j'ai réussi a me conncter sur mon serveur smtp avec le relay dovecot...

Pour l'instant je met en place la securite ssl toujours en suivant le même tuto mais j'ai l"erreur suivante qui apprait:

mail.log :
Mar 10 09:44:15 Flo-Debian postfix/master[4302]: terminating on signal 15
Mar 10 09:44:16 Flo-Debian postfix/master[4597]: daemon started -- version 2.5.5, configuration /etc/postfix
Mar 10 09:44:20 Flo-Debian postfix/smtpd[4607]: connect from localhost[127.0.0.1]
Mar 10 09:44:20 Flo-Debian postfix/smtpd[4607]: lost connection after UNKNOWN from localhost[127.0.0.1]
Mar 10 09:44:20 Flo-Debian postfix/smtpd[4607]: disconnect from localhost[127.0.0.1]

:s
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
10 mars 2010 à 10:00
Problème résolu, j'avais oublier de dé-commenter la ligne dans master.cf:
-o smtpd_tls_wrappermode=yes

Sinon pour la suite des log maintenant que le ssl fonctionne :

Mar 10 09:55:47 Flo-Debian postfix/smtpd[4870]: connect from localhost[127.0.0.1]
Mar 10 09:55:47 Flo-Debian postfix/smtpd[4870]: setting up TLS connection from localhost[127.0.0.1]
Mar 10 09:55:48 Flo-Debian postfix/smtpd[4870]: Anonymous TLS connection established from localhost[127.0.0.1]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Mar 10 09:56:25 Flo-Debian postfix/smtpd[4870]: 8BBA1542E2: client=localhost[127.0.0.1]
Mar 10 09:56:51 Flo-Debian postfix/cleanup[4876]: 8BBA1542E2: message-id=<20100310085625.8BBA1542E2@flo-debian.gescom>
Mar 10 09:56:51 Flo-Debian postfix/qmgr[4862]: 8BBA1542E2: from=<nico@flo-debian.gescom>, size=363, nrcpt=1 (queue active)
Mar 10 09:56:51 Flo-Debian postfix/smtp[4878]: 8BBA1542E2: to=<nico@gescom.be>, relay=gescom.be[192.168.2.110]:25, delay=44, delays=43/0.07/0.02/0.1, dsn=5.7.1, status=bounced (host gescom.be[192.168.2.110] said: 550 5.7.1 Unable to relay for nico@gescom.be (in reply to RCPT TO command))
Mar 10 09:56:51 Flo-Debian postfix/cleanup[4876]: 9C835542E4: message-id=<20100310085651.9C835542E4@flo-debian.gescom>
Mar 10 09:56:51 Flo-Debian postfix/qmgr[4862]: 9C835542E4: from=<>, size=2274, nrcpt=1 (queue active)
Mar 10 09:56:51 Flo-Debian postfix/bounce[4879]: 8BBA1542E2: sender non-delivery notification: 9C835542E4
Mar 10 09:56:51 Flo-Debian postfix/qmgr[4862]: 8BBA1542E2: removed
Mar 10 09:56:51 Flo-Debian postfix/local[4881]: 9C835542E4: to=<nico@flo-debian.gescom>, relay=local, delay=0.1, delays=0.03/0.05/0/0.02, dsn=5.1.1, status=bounced (unknown user: "nico")
Mar 10 09:56:51 Flo-Debian postfix/qmgr[4862]: 9C835542E4: removed
Mar 10 09:56:53 Flo-Debian postfix/smtpd[4870]: disconnect from localhost[127.0.0.1]

Ces log apparaissent apres un telenet localhost:465. Le nom nico@gescom.be est dans l'annuaire ldap et on peut se connecter sur le serveur imap telenet localhost:993
0
bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
10 mars 2010 à 10:06
il y'as 2 trucs que je comprend pas :
nico@flo-debian.gescom
puis
nico@gescom.be

c'est quoi ton virtueldomain puis t'as mis quoi comme domaine et c'est quoi le nom de ta base ldap
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
10 mars 2010 à 10:58
Alors pour le problème ca vient des index que j'ai ajoute dans mon slapd.conf:
index uid eq
index uidNumber eq
index gidNumber eq
index memberUid eq
index cn eq
index mail eq
index mailenable eq
index virtualdomain eq

Sinon la base de ldap ==> dc=gescom, dc=be
nico ==> ou=Users

flo-debian.gescom c'est le domaine par défaut je suppose que je peux utiliser avec mon compte unix et pourquoi il essaye d'envoyer les mail sur nico@flo-debian.gescom je sais pas trop le domain est mis automatiquement lorsque le mail est non delivery...
teminal:
Flo-Debian:/home/florian/Desktop# hostname
Flo-Debian

J'avoue que je suis un peu perdu dans les domain, domain virtuel ....

postfix main.cf:
myhostname = flo-debian.gescom
mydomain = flo-debian.gescom

Sinon pour arrive a authentifier avec le smtp j'ai utlisé un plugin MMC qui me créer un maildomain, groups, users, system dans mon LDAP. Pour que l'authentifiaction fonctionne j'ai du créer un user (nico) dans ou=USER et ensuite j'ai créer un virtualDomain (gescom.be) dans ou=mailDomain tout ca avec l'interface MMC. Avant je n'avais pas ajouter de virtualDomain et je n'arrivais pas a me loger sur le smtp ...

Une petite config de LDAP:
dn uid=nico,ou=Users,dc=gescom,dc=be
User Name nico
cn nico nico
mail nico@gescom.be
sn nico

dn: virtualdomain=gescom.be,ou=mailDomains,dc=gescom,dc=be
virtualdomain: gescom.be
objectClass: mailDomain
objectClass: top
virtualdomaindescription: Domain GESCOM
mailuserquota: 0

Il existe plus attributs pour le user mais je pense pas que ce soit utile
0
bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
10 mars 2010 à 16:04
généralement quand je configure un serveur LDAP je choisi le domaine du serveur au debut pour faire en sorte que ca soit le même, mais bon a chaque un ca façon de faire.
quand tu envoi un email a nico par exemple, dovecot devrai créer le Maildir, donc test d'envoyer un email a nico et regarde si dovecot lui a créer sont Maildir ou pas, si oui regarde le owner et le group.
s'il a pas créer c'est qu'il te manque une ligne dans le fichier de conf master.cf de postfix. :

c'est de cette ligne que je parle :

dovecot unix - n n - - pipe
flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -d ${recipient}

un ls -l sur le maildir du nico par exemple devrait te donné :(j'ai enlever les infos qui sont pas utiles)
drwx------ vmail mail nico
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
12 mars 2010 à 13:54
Dsl pour la réponse tardive mais pas mal de boulot :s

Sinon j'ai réussi a configurer le LDAP, postfix et dovecot pour envoyer et recevoir des mail en local et le tout stocker en maildir dans le dossier /home/vmail/%user.

Pour une question de sécurité je dois maintenant séparer les services, c-a-d mettre chaque service sur un serveur (machine virtuelle) différents:
OpenLDAP - serveur-ldap (nom de la machine)
Postfix - serveur-smpt
Dovecot - serveur-imap.

j'ai deja installer LDAP et Dovecot et configurer pour ce loger en telnet avec un user Ldap sans trop de problème.

Avec Postfix j'ai un souci, de nouveau pour le maildir, la ligne qu'il faut ajouter fonctionne bien en local

master.cf
dovecot unix - n n - - pipe
flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -d ${recipient}

Mais maintenant que j'ai un service par serveur comment je peux renseigner le chemin d'accès au fichier de dovecot ?
0
bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
12 mars 2010 à 19:52
bonjour, mettre postfix et dovecot sur deux serveur différents j'ai jamais essayer donc je sais pas comment faire, sinon un montage NFS ferra pas l'affaire? (juste une piste en cas ou)
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
15 mars 2010 à 12:19
ok pour le partage nfs c'est justement ce que je pensais faire.
Et maintenant que mes accès sont bon j'a un message de postfix ...

to=<davb@network.local>, relay=dovecot, delay=574, delays=574/0.12/0/0.15, dsn=4.3.0, status=deferred (temporary failure)
:s
0
bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
16 mars 2010 à 10:35
vérifie les autorisation sur les Maildir après montage.
0
xillion Messages postés 32 Date d'inscription jeudi 25 février 2010 Statut Membre Dernière intervention 12 octobre 2012
17 mars 2010 à 08:29
Bonjour:
Voila les droit que j'ai accordé sur mon dossier vmail de mon serveur SMTP (fichier /etc/export):
/home/vmail/ 192.168.2.44(rw,sync,no_root_squash)

Pour la mise en place du NFS :
http://www.lininfo.org/spip.php?article13

Et lors de la création d'un user ldap le dossier /vmail/user est bien créé et visible sur les deux serveurs (smtp et imap)

Et sur le serveur Postfix j'ai un fichier dovecot.log:
deliver(toto@network.local): 2010-03-17 08:46:40 Error: Can't connect to auth server at /var/run/dovecot/auth-master: Connection refused

et pour tant dans le fichier export de doveceot:
/etc/dovecot 192.168.2.38(rw)
/usr/lib/dovecot 192.168.2.38(rw)
/var/run/dovecot 192.168.2.38(rw)

Je sais que ce n'est pas très bon de mettre tout en accès RW mais je réduirai les accès une fois que j'arriverai a envoyer un mail
0
bini75 Messages postés 382 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 20 avril 2010 55
17 mars 2010 à 18:15
Bonjour,
Je pense que t'as méthode est pas bonne (je me trompe peu être) peu tu me rafraichir la mémoire on me disant ce que tu veux exactement faire (notant que dans l'état t'as un serveur mail opérationnel).
Merci
0