Virtual Mail And Jabber Server (xmpp) With iRedMail And Ejabberd On Ubuntu 9.10
Virtual Mail And Jabber Server (xmpp) With iRedMail And Ejabberd On Ubuntu 9.10iRedMail is a shell script that lets you quickly deploy a full-featured mail solution in less than 2 minutes. Since iRedMail 0.5, it supports CentOS 5.x, Debian 5.x, Ubuntu 8.04, 9.04 and 9.10 (both i386 and x86_64). iRedMail supports both OpenLDAP and MySQL as backends for storing virtual domains and users. This tutorial shows you how to integrate Ejabberd into iredmail's ldap backend on Ubuntu 9.10, passwords will be stored in ldap and you can change the password through webmail. This tutorial is based on Ubuntu 9.10, so I suggest set up a minimum Ubuntu 9.10 system, install iredmail 0.60 and choose openldap as the backend, as shown in these tutorials:
Thanks to yrjc2004 for sharing and helping.
1 Install EjabberdInstall ejabberd: apt-get install ejabberd
2 Find cn=vmail passwordThe vmail password was randomly created during iredmail install. You can find the password in /etc/postfix/ldap_virtual_mailbox_domains.cf:cat /etc/postfix/ldap_virtual_mailbox_domains.cf
3 Configure ejabberdEjabberd'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. Edit /etc/ejabberd/ejabberd.cfg. Setting admin and domain, now we set www@example.com as admin. %% Admin user
{acl, admin, {user, "www", "example.com"}}.
%% Hostname
{hosts, ["example.com"]}.
Comment the line, Auth not use internal. %%{auth_method, internal}.
Add the below at the bottom. %%% 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, "KxR6AAj2EutXjhcRcK2AHPWCqiA3Ym"}. #cn=vmail password
%%% Enable both normal mail user and mail admin.
{ldap_filter, "(&(objectClass=mailUser)(accountStatus=active)(enabledService=jabber))"}.
{ldap_uids, [{"mail", "%u@%d"}]}.
Start ejabberd and check the status: # /etc/init.d/ejabberd start Starting jabber server: ejabberd. # ejabberdctl status Node ejabberd@u910 is started. Status: started
4 Enable jabber service for mail userUse phpLDAPadmin or other tools to add sample LDAP attributes and values for existing mail users. Log into phpLDAPadmin:cn=manager,dc=example,dc=com Find the existing mail user www@example.com:
Enable the jabber service for the user www@example.com:
5 Configure iptablesStandard ports: 5222 Main client port5223 Obsolete secure jabber port 5269 Server to server port 5280 Web administration vi /etc/default/iptables
Restart the iptables service: /etc/init.d/iptables restart
6 Web Access Admin ConsoleNow you can access http://192.168.1.10:5280/admin/ Log in as the ejabberd web admin; we have set www@example.com as the admin for the ejabberd server:
This is how it looks after the login:
Check the virtual host user:
You cannot create a user in webadmin. If you want to create a user, you first need to add the user in iRedAdmin, then enable the jabber service for the user in phpldapadmin. If you want to add the second virtual domain, you first need to create a new domain in iRedAdmin, then modify /etc/ejabberd/ejabberd.cfg. %% Hostname
{hosts, ["example.com","test.com"]}.
|








Recent comments
1 day 3 hours ago
1 day 12 hours ago
1 day 15 hours ago
1 day 16 hours ago
1 day 17 hours ago
1 day 19 hours ago
1 day 21 hours ago
1 day 22 hours ago
2 days 14 hours ago
2 days 15 hours ago