LDAP + cyrus + postfix (1 seule session puis plus rien) [résolu] - réseaux et sécurité - Linux et OS Alternatifs
Marsh Posté le 06-04-2006 à 11:22:28
Bon après quelque essais supplémentaires, après avoir fermé une session Evolution qui fonctionnait bien, avant de pouvoir en réouvrir une il faut attendre que la connexion IMAP précédente se termine.
Citation : netstat -pan|grep 143 |
Une fois quelle est terminée, lorsque je relance Evolution tout marche bien.
Bref y a t'il un moyen de ne pas garder ces connexions persistantes ? J'ai l'impression qu'un fois loggé, l'utilisateur est bloqué pour les autres requêtes jusqu'à un certain time out.
Je doit permettre ceci, car Open Xchange à un système de webmail via imap en java. Et que le principe du webmail c'est des déconnexions et reconnexions non stop. Elles ne peuvent pas attendre ce time out.
Merci d'avance.
Marsh Posté le 06-04-2006 à 11:46:55
C'est bon j'ai trouvé, suffit de limiter le nombre de requête par processus à 1 pour le service imapd.
Bon à mon avis cela diminue la perfomance du serveur en usage intensif, mais bon on est que 10 à l'utiliser celà ne devrait pas mettre le serveur à genoux.
La solution est donc de modifier dans le fichier /etc/cyrus.conf la ligne concernant l'imapd de ceci :
Citation : imap cmd="imapd -U 30" listen="imap" prefork=0 maxchild=100 |
à ceci
Citation : imap cmd="imapd -U 1" listen="imap" prefork=0 maxchild=100 |
Voilà tout marche nickel, OpenXchange aussi.
On peut fermer.
Marsh Posté le 31-01-2007 à 15:26:30
salut, j'essai d'avoir plus ou moins la même configuration que toi sauf que j'utilise postfix + LDAP + courier-imap/pop + saslauthd, et j'eprouve des problèmes dans la configuration, peux tu me donner la configuration au niveau de /etc/postfix/main.cf
Merci
Marsh Posté le 06-04-2006 à 10:26:53
Bonjour,
voilà j'ai fait un serveur, Samba +LDAP + OpenXchange + Cyrus21-imap + postfix (pour un remplacement Win 2000 server + Exchange 2000)
Je tourne sous Linux Ubuntu 5.10 (Breezy Badger)
Cyrus 2.1.18 patché avec l'autocreate (création automatique de boîte email)
SASL 2.1.19-1.5
Postfix 2.2.4
Tout marche correctement.
Les mails aussi marchent nickel mais ! Une seule fois !
C'est à dire, j'ai utilisé Evolution pour tester l'IMAP. Il fonctionne nickel. Mais une et une seule fois !
C'est à dire, je ferme Evolution, je le relance, et la il me demande en boucle le mot de passe pour l'utilisateur avec le service IMAP.
Unable to authenticate to IMAP server.
IMAP command failed: Login failed: user not found
Please enter the IMAP password for test@localhost
ou parfois :
Unable to authenticate to IMAP server.
(null)
Please enter the IMAP password for test@localhost
Pourtant le saslaulth fonctionne toujours nickel :
# testsaslauthd -u test -p test
0: OK "Success."
le seul moyen pour que ca marche c'est de relancer cyrus :
/etc/init.d/cyrus21 restart
Hop la ça remarche, tant qu'on ferme pas Evolution.
Quelqu'un à une solution ?
voici mes fichiers de config : (les domaines et mots de passes sont changés bien évidement)
/etc/saslauthd.conf
# On indique le nom du serveur (ou son @IP)
LDAP_SERVERS: ldap://localhost
# Ici on définit le domaine du serveur:
LDAP_DEFAULT_DOMAIN: mondom.be
# Ici on indique le temps maxi que devra durer la requète/recherche avant d'abandonner.
# Exprimé en secondes.
LDAP_TIMEOUT: 10
# Ici on indique le temps maxi que peut prendre une recherche.
LDAP_TIME_LIMIT: 10
# Option à utiliser avec prudence (expérimentale)
LDAP_CACHE_TTL: 30
# Ici on spécifie la taille du cache (en octet)
LDAP_CACHE_MEM: 32768
# Ici on indique la version du protocole LDAP à utiliser pour interroger le serveur LDAP.
LDAP_VERSION: 3
# Ici on indique qu'il ne faut pas utiliser le protocole SASL pour la connexion au serveur LDAP
LDAP_USE_SASL: no
# Ici on va indiquer la méthode de vérification du mot de passe.
# ATTENTION: Si cette règle n'est pas initialisée alors le filtre de recherche
# recherchera la valeur de l'attribut "userPassword".
# IMPORTANT: "bind" est la valeur par défaut si et seulement si LDAP_USE_SASL: no
# Valeurs possibles: bind|custom|fastbind
# (custom semble être 2 à 3fois plus rapide que bind)
LDAP_AUTH_METHOD: custom
# Ici on indique le nom de l'utilisateur qui se connecte.
# Si on commente cette règle (ainsi que la suivante) alors la connexion au serveur LDAP
# se fera anonymement.
LDAP_BIND_DN: cn=admin,dc=mondom,dc=be
# Puis on indique le mot de passe de cet utilisateur.
# Attention: le mot de passe transite en clair !!!
LDAP_BIND_PW: xxxmonpassxx
# Ici on indique à partir d'où on commence la recherche
LDAP_SEARCH_BASE: ou=Users,ou=OxObjects,dc=mondom,dc=be
# On indique la profondeur de la recherche (ici on recherche dans les sous-répertoires)
# Valeurs possibles: sub, one, base
LDAP_SCOPE: sub
# IL N'EST PAS OBLIGATOIRE DE DÉFINIR UN FILTRE !!!
# EN EFFET, ET PAR DÉFAUT, UN uid VALANT LE LOGIN DE L'UTILISATEUR AINSI
# QUE LA VALEUR DE L'ATTRIBUT userPassword SONT RECHERCHÉS.
# Le filtre par défaut est donc:
LDAP_FILTER: uid=%u
# Ici on cherche donc une entrée dont le "cn" sera égale au login entré dans le
# client mail (IMP, Thunderbird etc...).
#LDAP_FILTER: cn=%u
#
# et ici on définit le nom de l'attribut qui contient le password tapé par l'utilisateur dans son client mail:
#LDAP_PASSWORD_ATTR: userPassword
/etc/default/saslauthd
# This needs to be uncommented before saslauthd will be run automatically
START=yes
# You must specify the authentication mechanisms you wish to use.
# This defaults to "pam" for PAM support, but may also include
# "shadow" or "sasldb", like this:
# MECHANISMS="pam shadow"
MECHANISMS="ldap"
PARAMS="-O /etc/saslauthd.conf"
/etc/imapd.conf
# Debian Cyrus imapd.conf
# See imapd.conf(5) for more information and more options
# Configuration directory
configdirectory: /var/lib/cyrus
# Which partition to use for default mailboxes
defaultpartition: default
partition-default: /var/spool/cyrus/mail
# News setup
partition-news: /var/spool/cyrus/news
newsspool: /var/spool/news
# Alternate namespace
# If enabled, activate the alternate namespace as documented in
# /usr/share/doc/cyrus21-doc/html/altnamespace.html, where an user's
# subfolders are in the same level as the INBOX
# See also userprefix and sharedprefix on imapd.conf(5)
altnamespace: no
# UNIX Hierarchy Convention
# Set to yes, and cyrus will accept dots in names, and use the forward
# slash "/" to delimit levels of the hierarchy. This is done by converting
# internally all dots to "^", and all "/" to dots. So the "rabbit.holes"
# mailbox of user "helmer.fudd" is stored in "user.elmer^fud.rabbit^holes"
unixhierarchysep: no
# Munging illegal characters in headers
# Headers of RFC2882 messages must not have characters with the 8th bit
# set. However, too many badly-written MUAs generate this, including most
# spamware. Disable this if you want Cyrus to leave the crappage untouched
# and you don't care that IMAP SEARCH won't work right anymore.
#munge8bit: no
# Forcing recipient user to lowercase
# Cyrus 2.1 is case-sensitive. If all your mail users are in lowercase, it is
# probably a very good idea to set lmtp_downcase_rcpt to true. The default is
# to assume the user knows what he is doing, and not downcase anything.
#lmtp_downcase_rcpt: yes
# Uncomment the following and add the space-separated users who
# have admin rights for all services.
#admins: cyrus
# Space-separated list of users that have lmtp "admin" status (i.e. that
# can deliver email through TCP/IP lmtp) in addition to those in the
# admins: entry above
#lmtp_admins: postman
# Space-separated list of users that have mupdate "admin" status, in
# addition to those in the admins: entry above. Note that mupdate slaves and
# backends in a Murder cluster need to autenticate against the mupdate master
# as admin users.
#mupdate_admins: mupdateman
# Space-separated list of users that have imapd "admin" status, in
# addition to those in the admins: entry above
#imap_admins: cyrus
# Space-separated list of users that have sieve "admin" status, in
# addition to those in the admins: entry above
#sieve_admins: cyrus
# List of users and groups that are allowed to proxy for other users,
# seperated by spaces. Any user listed in this will be allowed to login
# for any other user. Like "admins:" above, you can have imap_proxyservers
# and sieve_proxyservers.
#proxyservers: cyrus
# No anonymous logins
allowanonymouslogin: no
# Minimum time between POP mail fetches in minutes
popminpoll: 1
# If nonzero, normal users may create their own IMAP accounts by creating
# the mailbox INBOX. The user's quota is set to the value if it is positive,
# otherwise the user has unlimited quota.
autocreatequota: -1
# the next 3 entries are added by autocreate patch
autocreateinboxfolders: Sent|Drafts|Trash|spam
autosubscribeinboxfolders: Sent|Drafts|Trash|spam
createonpost: yes
# umask used by Cyrus programs
umask: 077
# Sendmail binary location
# DUE TO A BUG, Cyrus sends CRLF EOLs to this program. This breaks Exim 3.
# For now, to work around the bug, set this to a wrapper that calls
# /usr/sbin/sendmail -dropcr instead if you use Exim 3.
#sendmail: /usr/sbin/sendmail
# If enabled, cyrdeliver will look for Sieve scripts in user's home
# directories: ~user/.sieve.
sieveusehomedir: false
# If sieveusehomedir is false, this directory is searched for Sieve scripts.
sievedir: /var/spool/sieve
# notifyd(8) method to use for "MAIL" notifications. If not set, "MAIL"
# notifications are disabled. Valid methods are: null, log, zephyr
#mailnotifier: zephyr
# notifyd(8) method to use for "SIEVE" notifications. If not set, "SIEVE"
# notifications are disabled. This method is only used when no method is
# specified in the script. Valid methods are null, log, zephyr, mailto
#sievenotifier: zephyr
# DRAC (pop-before-smtp, imap-before-smtp) support
# Set dracinterval to the time in minutes to call DRAC while a user is
# connected to the imap/pop services. Set to 0 to disable DRAC (default)
# Set drachost to the host where the rpc drac service is running
#dracinterval: 0
#drachost: localhost
# If enabled, the partitions will also be hashed, in addition to the hashing
# done on configuration directories. This is recommended if one partition has a
# very bushy mailbox tree.
hashimapspool: true
# Allow plaintext logins by default (SASL PLAIN)
allowplaintext: yes
# Force PLAIN/LOGIN authentication only
# (you need to uncomment this if you are not using an auxprop-based SASL
# mechanism. saslauthd users, that means you!). And pay attention to
# sasl_minimum_layer and allowapop below, too.
sasl_mech_list: PLAIN
# Allow use of the POP3 APOP authentication command.
# Note that this command requires that the plaintext passwords are
# available in a SASL auxprop backend (eg. sasldb), and that the system
# can provide enough entropy (eg. from /dev/urandom) to create a challenge
# in the banner.
#allowapop: no
# The minimum SSF that the server will allow a client to negotiate. A
# value of 1 requires integrity protection; any higher value requires some
# amount of encryption.
sasl_minimum_layer: 0
# The maximum SSF that the server will allow a client to negotiate. A
# value of 1 requires integrity protection; any higher value requires some
# amount of encryption.
#sasl_maximum_layer: 256
# List of remote realms whose users may log in using cross-realm
# authentications. Seperate each realm name by a space. A cross-realm
# identity is considered any identity returned by SASL with an "@" in it.
#loginrealms:
#
# SASL library options (these are handled directly by the SASL libraries,
# refer to SASL documentation for an up-to-date list of these)
#
# The mechanism(s) used by the server to verify plaintext passwords. Possible
# values are "saslauthd", "auxprop", "pwcheck" and "alwaystrue". They
# are tried in order, you can specify more than one, separated by spaces.
#
# Do note that, since sasl will be run as user cyrus, you may have a lot of
# trouble to set this up right.
sasl_pwcheck_method: saslauthd
# What auxpropd plugins to load, if using sasl_pwcheck_method: auxprop
# by default, all plugins are tried (which is probably NOT what you want).
#sasl_auxprop_plugin: sasldb
# If enabled, the SASL library will automatically create authentication secrets
# when given a plaintext password. Refer to SASL documentation
sasl_auto_transition: no
#
# SSL/TLS Options
#
# File containing the global certificate used for ALL services (imap, pop3,
# lmtp, sieve)
#tls_cert_file: /etc/ssl/certs/cyrus-global.pem
# File containing the private key belonging to the global server certificate.
#tls_key_file: /etc/ssl/private/cyrus-global.key
# File containing the certificate used for imap. If not specified, the global
# certificate is used. A value of "disabled" will disable SSL/TLS for imap.
#tls_imap_cert_file: /etc/ssl/certs/cyrus-imap.pem
# File containing the private key belonging to the imap-specific server
# certificate. If not specified, the global private key is used. A value of
# "disabled" will disable SSL/TLS for imap.
#tls_imap_key_file: /etc/ssl/private/cyrus-imap.key
# File containing the certificate used for pop3. If not specified, the global
# certificate is used. A value of "disabled" will disable SSL/TLS for pop3.
#tls_pop3_cert_file: /etc/ssl/certs/cyrus-pop3.pem
# File containing the private key belonging to the pop3-specific server
# certificate. If not specified, the global private key is used. A value of
# "disabled" will disable SSL/TLS for pop3.
#tls_pop3_key_file: /etc/ssl/private/cyrus-pop3.key
# File containing the certificate used for lmtp. If not specified, the global
# certificate is used. A value of "disabled" will disable SSL/TLS for lmtp.
#tls_lmtp_cert_file: /etc/ssl/certs/cyrus-lmtp.pem
# File containing the private key belonging to the lmtp-specific server
# certificate. If not specified, the global private key is used. A value of
# "disabled" will disable SSL/TLS for lmtp.
#tls_lmtp_key_file: /etc/ssl/private/cyrus-lmtp.key
# File containing the certificate used for sieve. If not specified, the global
# certificate is used. A value of "disabled" will disable SSL/TLS for sieve.
#tls_sieve_cert_file: /etc/ssl/certs/cyrus-sieve.pem
# File containing the private key belonging to the sieve-specific server
# certificate. If not specified, the global private key is used. A value of
# "disabled" will disable SSL/TLS for sieve.
#tls_sieve_key_file: /etc/ssl/private/cyrus-sieve.key
# File containing one or more Certificate Authority (CA) certificates.
#tls_ca_file: /etc/ssl/certs/cyrus-imapd-ca.pem
# Path to directory with certificates of CAs.
tls_ca_path: /etc/ssl/certs
# The length of time (in minutes) that a TLS session will be cached for later
# reuse. The maximum value is 1440 (24 hours), the default. A value of 0 will
# disable session caching.
tls_session_timeout: 1440
# The list of SSL/TLS ciphers to allow. The format of the string is described
# in ciphers(1). THIS DISABLES THE WEAK 'FOR EXPORT' CRAP!
tls_cipher_list: TLSv1:SSLv3:SSLv2:!NULL:!EXPORT:!DES:!LOW:@STRENGTH
# Require a client certificate for ALL services (imap, pop3, lmtp, sieve).
#tls_require_cert: false
# Require a client certificate for imap ONLY.
#tls_imap_require_cert: false
# Require a client certificate for pop3 ONLY.
#tls_pop3_require_cert: false
# Require a client certificate for lmtp ONLY.
#tls_lmtp_require_cert: false
# Require a client certificate for sieve ONLY.
#tls_sieve_require_cert: false
#
# Cyrus Murder cluster configuration
#
# Set the following options to the values needed for this server to
# autenticate against the mupdate master server:
# mupdate_server
# mupdate_port
# mupdate_username
# mupdate_authname
# mupdate_realm
# mupdate_password
# mupdate_retry_delay
##
## KEEP THESE IN SYNC WITH cyrus.conf
##
# Unix domain socket that lmtpd listens on.
lmtpsocket: /var/run/cyrus/socket/lmtp
# Unix domain socket that idled listens on.
idlesocket: /var/run/cyrus/socket/idle
# Unix domain socket that the new mail notification daemon listens on.
notifysocket: /var/run/cyrus/socket/notify
##
## DEBUGGING
##
# Debugging hook. See /usr/share/doc/cyrus21-common/README.Debian.debug
# Keep the hook disabled when it is not in use
#
# gdb Back-traces
#debug_command: /usr/bin/gdb -batch -cd=/tmp -x /usr/lib/cyrus/get-backtrace.gdb /usr/lib/cyrus/bin/%s %d >/tmp/gdb-backtrace.cyrus.%1$s.%2$d <&- 2>&1 &
#
# system-call traces
#debug_command: /usr/bin/strace -tt -o /tmp/strace.cyrus.%s.%d -p %2$d <&- 2>&1 &
#
# library traces
#debug_command: /usr/bin/ltrace -tt -n 2 -o /tmp/ltrace.cyrus.%s.%d -p %2$d <&- 2>&1 &
Merci d'avance pour votre aide.
Message édité par zyphos le 06-04-2006 à 11:49:02