Integration/Ejabberd.iRedMail.with.OpenLDAP/Ubuntu
From iRedMail
Revision as of 07:49, 18 April 2010 by Shake.chen (Talk | contribs)
Contents |
Install Ejabberd
| Terminal: |
apt-get install ejabberd |
Configure ejabberd
Find cn=vmail password
vmail password was random create duiring iredmail install.you can find the password in /etc/postfix/ldap_virtual_mailbox_domains.cf
- Open /etc/postfix/ldap_virtual_mailbox_domains.cf and check values:
| File: /etc/postfix/ldap_virtual_mailbox_domains.cf |
bind_dn = cn=vmail,dc=example,dc=com bind_pw = InYTi8qGjamTb6Me2ESwbb6rxQUs5y #cn=vmail password |
Setting Ejabberd
Ejabberd's configuration files are written in Erlang syntax, which might be difficult to comprehend. Thankfully, the modifications we need to make are relatively minor and straightforward. The main ejabberd configuration file is located at /etc/ejabberd/ejabberd.cfg. We'll cover each relevant option in turn.
In Erlang, comments begin with the % sign.
- Open /etc/ejabberd/ejabberd.cfg and set correct values:
| File: /etc/ejabberd/ejabberd.cfg |
[...]
%% Admin user
{acl, admin, {user, "www", "example.com"}}.
%% Hostname
{hosts, ["example.com"]}.
[...]
%%{auth_method, internal}.
[...] Add below at the botton.
%%% Authenticate against LDAP.
{auth_method, ldap}.
{ldap_servers, ["127.0.0.1"]}.
%%% {ldap_encrypt, tls}.
{ldap_port, 389}.
{ldap_base, "o=domains,dc=example,dc=com"}.
{ldap_rootdn, "cn=vmail,dc=example,dc=com"}.
{ldap_password, "InYTi8qGjamTb6Me2ESwbb6rxQUs5y"}. #cn=vmail password
%%% Enable both normal mail user and mail admin.
{ldap_filter, "(&(objectClass=mailUser)(accountStatus=active)(enabledService=jabber))"}.
{ldap_uids, [{"mail", "%u@%d"}]}.
|
