我是初次装extmail的,
大家帮忙分析一下
#vi /var/www/cgi-bin/extman/webman.cf
#webman.cf的配置文件如下
# sys_config, the config file and webman programe root
SYS_CONFIG = /var/www/cgi-bin/extman/
# sys_langdir, the i18n dir
SYS_LANGDIR = /var/www/cgi-bin/extman/lang
# sys_templdir, the template dir
SYS_TEMPLDIR = /var/www/cgi-bin/extman/html
# maildir_base, the base dir of user maildir, use absolute path
# if not set.
SYS_MAILDIR_BASE = /home/vmail/domains
# sys_warn, show system warning or not, default to yes
SYS_SHOW_WARN = 0
# sys_sess_dir, the session dir
SYS_SESS_DIR = /var/www/cgi-bin/extman/tmp/
# sys_sess_timeout, session timeout in seccond, default 6 hours
SYS_SESS_TIMEOUT = 21600
# sys_user_psize, user default page_size
SYS_PSIZE = 10
# sys_user_lang, user default language
SYS_LANG = en_US
# sys_charset,
SYS_CHARSET = iso-8859-1
# sys_template_name, the template name
SYS_TEMPLATE_NAME = standard
# web management related restritions
# sys_default_expire, valid value: ?y ?m ?d
SYS_DEFAULT_EXPIRE = 1y
# sys_default_services, valid value: smtpauth, webmail, pop3, netdisk
# can concatenate with "," with multiple values, eg: webmail,smtpauth
SYS_DEFAULT_SERVICES = webmail,smtpauth,pop3
# sys_min_uid, the minimal uid
SYS_MIN_UID = 500
# sys_min_gid, the minimal gid
SYS_MIN_GID = 500
# sys_default_uid, if not set, webman will ignore it
SYS_DEFAULT_UID = 500
# sys_default_gid, if not set, webman will ignore it
SYS_DEFAULT_GID = 500
# sys_quota_multiplier, in bytes, default to 1 MB
SYS_QUOTA_MULTIPLIER = 1048576
# sys_quota_type, valid type: vda|courier
SYS_QUOTA_TYPE = courier
# maxquota, alias, users and netdisk quota for domain
SYS_DEFAULT_MAXQUOTA = 10
SYS_DEFAULT_MAXALIAS = 10
SYS_DEFAULT_MAXUSERS = 10
SYS_DEFAULT_MAXNDQUOTA = 10
# sys_backend_type mysql|ldap
SYS_BACKEND_TYPE = ldap
# sys_crypt_type
SYS_CRYPT_TYPE = crypt
# sys_no_utf8, yes|no, default yes
SYS_NO_UTF8 = no
# if mysql, all relate paramters should prefix as SYS_MYSQL
SYS_MYSQL_USER = webman
SYS_MYSQL_PASS = webman
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock
# table name
SYS_MYSQL_TABLE = manager
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_PASSWD = password
# if ldap, all relate paramters should prefix as SYS_LDAP
SYS_LDAP_BASE = dc=haining,dc=com
SYS_LDAP_RDN = cn=Manager,dc=haining,dc=com
SYS_LDAP_PASS = secret
SYS_LDAP_HOST = localhost
# ldif attributes
SYS_LDAP_ATTR_USERNAME = mail
SYS_LDAP_ATTR_PASSWD = userPassword
#vi /etc/openldap/init.ldif
#init.ldif配置文件如下
dn: dc=haining,dc=com
objectClass: organization
objectClass: dcObject
dc: haining
o: haining
# Manager, extmail.org
dn: cn=Manager,dc=haining,dc=com
objectClass: top
objectClass: organizationalRole
cn: Manager
# domains + users: o=extmailAccount, dc=extmail.org
dn: o=extmailAccount,dc=haining,dc=com
objectClass: organization
o: extmailAccount
# aliases: o=extmailAlias, dc=extmail.org
dn: o=extmailAlias,dc=haining,dc=com
objectClass: organization
o: extmailAlias
# manager: o=extmailManager, dc=extmail.org
dn: o=extmailManager,dc=haining,dc=com
objectClass: organization
o: extmailManager
# Manager: mail=root@extmail.org, o=extmailManager, dc=extmail.org
dn: mail=root@haining.com, o=extmailManager, dc=haining,dc=com
cn: Root
uid: root
mail:
root@haining.com
userPassword: {crypt}dua7lTAdGjyfo
managerType: admin
active: 1
createDate: 2005-10-18 18:32:14
expireDate: 2007-08-01 00:00:00
objectclass: top
objectclass: extmailManager
#vi /etc/openldap/slapd.conf
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/extmail.schema
# Allow LDAPv2 client connections. This is NOT the default.
allow bind_v2
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
# Load dynamic backend modules:
# modulepath /usr/sbin/openldap
# moduleload back_bdb.la
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la
# The next three lines allow use of TLS for encrypting connections using a
# dummy test certificate which you can generate by changing to
# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on
# slapd.pem so that the ldap user or group can read it. Your client software
# may balk at self-signed certificates, however.
# TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
# Sample security restrictions
# Require integrity protection (prevent hijacking)
# Require 112-bit (3DES or better) encryption for updates
# Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
#######################################################################
# ldbm and/or bdb database definitions
#######################################################################
database bdb
suffix "dc=haining,dc=com"
rootdn "cn=Manager,dc=haining,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw secret
# rootpw {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/ldap
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 starttls=critical
# bindmethod=sasl saslmech=GSSAPI
# authcId=host/ldap-master.example.com@EXAMPLE.COM
以上是三个配置文件
#service ldap restart ,这是我是可以启动的
就是#ldapadd -x -D 'cn=Manager,dc=haining,dc=com' -w secret -f /etc/openldap/init.ldif这步操作时有如下的错误,大家帮忙看看,谢谢。。
# ldapadd -x -D 'cn=Manager,dc=haining,dc=com' -w secret -f /etc/openldap/init.ldif
ldap_bind: Invalid credentials (49)