Caution:.......................................
1.vmail id will confict with ldapuser id.
vi /etc/dovecot/conf.d/auth-ldap.conf.ext
commented out userdb
Step:...........................................
# cp extmail.schema /etc/openldap/schema
# cd /etc/openldap
# rm -fr slapd.d
# cp slapd.conf.bak slapd.conf
# chgrp ldap slapd.conf
# cp /usr/share/doc/openldap-servers-2.4.19/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
# chown ldap.ldap /var/lib/ldap/DB_CONFIG
# vi slapd.conf
#include /etc/openldap/schema/misc.schema
include /etc/openldap/schema/extmail.schema
database bdb
suffix "dc=westos.org"
checkpoint 1024 15
rootdn "cn=Manager,dc=westos.org"
rootpw westos
access to *
by dn.exact="cn=Manager,dc=westos.org" read
by * none
# service slapd start
# cd /var/www/extsuite/extman/docs/
# sed -i 's/extmail.org/westos.org/g' init.ldif
# ldapadd -W -x -D "cn=manager,dc=westos.org" -f init.ldif
# cp ldap_virtual_alias_maps.cf ldap_virtual_domains_maps.cf ldap_virtual_mailbox_maps.cf /etc/postfix/
# sed -i 's/extmail.org/westos.org/g' ldap_virtual_alias_maps.cf
# sed -i 's/extmail.org/westos.org/g' ldap_virtual_domains_maps.cf
# sed -i 's/extmail.org/westos.org/g' ldap_virtual_mailbox_maps.cf
# useradd -s /sbin/nologin vmail
# postconf -e inet_interfaces=all
# postconf -e virtual_mailbox_base=/home/vmail/
# postconf -e virtual_uid_maps=static:500
# postconf -e virtual_gid_maps=static:500
# postconf -e virtual_alias_maps=ldap:/etc/postfix/ldap_virtual_alias_maps.cf
# postconf -e virtual_mailbox_domains=ldap:/etc/postfix/ldap_virtual_domains_maps.cf
# postconf -e virtual_mailbox_maps=ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf
# service postfix restart
# echo “hello world” | mail -s test [email protected]
# ll -d /home/domains/westos.org/postmaster/Maildir/
# yum install -y dovecot
# cp /usr/share/doc/dovecot-2.0/example-config/dovecot-ldap.conf.ext /etc/dovecot/
# cd /etc/dovecot/conf.d/
# vi 10-mail.conf
mail_location = maildir:/home/vmail/%d/%n/Maildir
mail_uid = vmail
mail_gid = vmail
first_valid_uid = 500
# vi 10-auth.conf
#!include auth-system.conf.ext
!include auth-ldap.conf.ext
#vi /etc/dovecot/dovecot-ldap.conf.ext
hosts = 127.0.0.1:389
dn = cn=Manager,dc=westos.org
dnpass = westos
auth_bind = yes
base = o=extmailAccount,dc=westos.org
deref = never
scope = subtree
pass_attrs = mail,userPassword
pass_filter = (&(objectClass=extmailUser)(mail=%u)(active=1))
default_pass_scheme = MD5
#vi /etc/dovecot/conf.d/auth-ldap.conf.ext
commented out userdb
# service dovecot start
# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready. <[email protected]>
user [email protected]
+OK
pass extmail
+OK Logged in.
list
+OK 1 message