25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

* src/ejabberd_config.erl: Added host_config option

* doc/guide.tex: Updated

* src/ejabberd_auth_ldap.erl: Bugfix

SVN Revision: 386
This commit is contained in:
Alexey Shchepin 2005-07-31 19:51:52 +00:00
parent 84b057c607
commit 081be192d3
5 changed files with 133 additions and 78 deletions

View File

@ -1,5 +1,10 @@
2005-07-31 Alexey Shchepin <alexey@sevcom.net> 2005-07-31 Alexey Shchepin <alexey@sevcom.net>
* src/ejabberd_config.erl: Added host_config option
* doc/guide.tex: Updated
* src/ejabberd_auth_ldap.erl: Bugfix
* src/msgs/ru.msg: Updated (thanks to Sergei Golovan) * src/msgs/ru.msg: Updated (thanks to Sergei Golovan)
* src/msgs/uk.msg: Likewise * src/msgs/uk.msg: Likewise

View File

@ -4,7 +4,7 @@
<HEAD><TITLE>Ejabberd Installation and Operation Guide</TITLE> <HEAD><TITLE>Ejabberd Installation and Operation Guide</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=ISO8859-1"> <META http-equiv="Content-Type" content="text/html; charset=ISO8859-1">
<META name="GENERATOR" content="hevea 1.06"> <META name="GENERATOR" content="hevea 1.07">
</HEAD> </HEAD>
<BODY > <BODY >
<!--HEVEA command line is: /usr/bin/hevea -charset ISO8859-1 guide.tex --> <!--HEVEA command line is: /usr/bin/hevea -charset ISO8859-1 guide.tex -->
@ -21,7 +21,7 @@
<A HREF="mailto:alexey@sevcom.net"><TT>mailto:alexey@sevcom.net</TT></A><BR> <A HREF="mailto:alexey@sevcom.net"><TT>mailto:alexey@sevcom.net</TT></A><BR>
<A HREF="xmpp:aleksey@jabber.ru"><TT>xmpp:aleksey@jabber.ru</TT></A></H3> <A HREF="xmpp:aleksey@jabber.ru"><TT>xmpp:aleksey@jabber.ru</TT></A></H3>
<H3 ALIGN=center>May 23, 2005</H3><DIV ALIGN=center> <H3 ALIGN=center>July 31, 2005</H3><DIV ALIGN=center>
<IMG SRC="logo.png"> <IMG SRC="logo.png">
@ -61,53 +61,54 @@
<LI><A HREF="#htoc16">3.1.4&nbsp;&nbsp;Shapers Configuration</A> <LI><A HREF="#htoc16">3.1.4&nbsp;&nbsp;Shapers Configuration</A>
<LI><A HREF="#htoc17">3.1.5&nbsp;&nbsp;Listened Sockets</A> <LI><A HREF="#htoc17">3.1.5&nbsp;&nbsp;Listened Sockets</A>
<LI><A HREF="#htoc18">3.1.6&nbsp;&nbsp;Modules</A> <LI><A HREF="#htoc18">3.1.6&nbsp;&nbsp;Modules</A>
<LI><A HREF="#htoc19">3.1.7&nbsp;&nbsp;Virtual Host Configuration</A>
</UL> </UL>
<LI><A HREF="#htoc19">3.2&nbsp;&nbsp;Online Configuration and Monitoring</A> <LI><A HREF="#htoc20">3.2&nbsp;&nbsp;Online Configuration and Monitoring</A>
<UL><LI> <UL><LI>
<A HREF="#htoc20">3.2.1&nbsp;&nbsp;Web-based Administration Interface</A> <A HREF="#htoc21">3.2.1&nbsp;&nbsp;Web-based Administration Interface</A>
<LI><A HREF="#htoc21">3.2.2&nbsp;&nbsp;<TT>ejabberdctl</TT> tool</A> <LI><A HREF="#htoc22">3.2.2&nbsp;&nbsp;<TT>ejabberdctl</TT> tool</A>
</UL> </UL>
</UL> </UL>
<LI><A HREF="#htoc22">4&nbsp;&nbsp;Clustering</A> <LI><A HREF="#htoc23">4&nbsp;&nbsp;Clustering</A>
<UL><LI> <UL><LI>
<A HREF="#htoc23">4.1&nbsp;&nbsp;How it works</A> <A HREF="#htoc24">4.1&nbsp;&nbsp;How it works</A>
<UL><LI> <UL><LI>
<A HREF="#htoc24">4.1.1&nbsp;&nbsp;Router</A> <A HREF="#htoc25">4.1.1&nbsp;&nbsp;Router</A>
<LI><A HREF="#htoc25">4.1.2&nbsp;&nbsp;Local Router</A> <LI><A HREF="#htoc26">4.1.2&nbsp;&nbsp;Local Router</A>
<LI><A HREF="#htoc26">4.1.3&nbsp;&nbsp;Session Manager</A> <LI><A HREF="#htoc27">4.1.3&nbsp;&nbsp;Session Manager</A>
<LI><A HREF="#htoc27">4.1.4&nbsp;&nbsp;S2S Manager</A> <LI><A HREF="#htoc28">4.1.4&nbsp;&nbsp;S2S Manager</A>
</UL> </UL>
<LI><A HREF="#htoc28">4.2&nbsp;&nbsp;How to setup ejabberd cluster</A> <LI><A HREF="#htoc29">4.2&nbsp;&nbsp;How to setup ejabberd cluster</A>
</UL> </UL>
<LI><A HREF="#htoc29">A&nbsp;&nbsp;Built-in Modules</A> <LI><A HREF="#htoc30">A&nbsp;&nbsp;Built-in Modules</A>
<UL><LI> <UL><LI>
<A HREF="#htoc30">A.1&nbsp;&nbsp;Common Options</A> <A HREF="#htoc31">A.1&nbsp;&nbsp;Common Options</A>
<UL><LI> <UL><LI>
<A HREF="#htoc31">A.1.1&nbsp;&nbsp;<TT>iqdisc</TT></A> <A HREF="#htoc32">A.1.1&nbsp;&nbsp;<TT>iqdisc</TT></A>
<LI><A HREF="#htoc32">A.1.2&nbsp;&nbsp;<TT>host</TT></A> <LI><A HREF="#htoc33">A.1.2&nbsp;&nbsp;<TT>host</TT></A>
<LI><A HREF="#htoc33">A.1.3&nbsp;&nbsp;<TT>hosts</TT></A> <LI><A HREF="#htoc34">A.1.3&nbsp;&nbsp;<TT>hosts</TT></A>
</UL> </UL>
<LI><A HREF="#htoc34">A.2&nbsp;&nbsp;<TT>mod_announce</TT></A> <LI><A HREF="#htoc35">A.2&nbsp;&nbsp;<TT>mod_announce</TT></A>
<LI><A HREF="#htoc35">A.3&nbsp;&nbsp;<TT>mod_configure</TT></A> <LI><A HREF="#htoc36">A.3&nbsp;&nbsp;<TT>mod_configure</TT></A>
<LI><A HREF="#htoc36">A.4&nbsp;&nbsp;<TT>mod_disco</TT></A> <LI><A HREF="#htoc37">A.4&nbsp;&nbsp;<TT>mod_disco</TT></A>
<LI><A HREF="#htoc37">A.5&nbsp;&nbsp;<TT>mod_echo</TT></A> <LI><A HREF="#htoc38">A.5&nbsp;&nbsp;<TT>mod_echo</TT></A>
<LI><A HREF="#htoc38">A.6&nbsp;&nbsp;<TT>mod_irc</TT></A> <LI><A HREF="#htoc39">A.6&nbsp;&nbsp;<TT>mod_irc</TT></A>
<LI><A HREF="#htoc39">A.7&nbsp;&nbsp;<TT>mod_last</TT></A> <LI><A HREF="#htoc40">A.7&nbsp;&nbsp;<TT>mod_last</TT></A>
<LI><A HREF="#htoc40">A.8&nbsp;&nbsp;<TT>mod_muc</TT></A> <LI><A HREF="#htoc41">A.8&nbsp;&nbsp;<TT>mod_muc</TT></A>
<LI><A HREF="#htoc41">A.9&nbsp;&nbsp;<TT>mod_offline</TT></A> <LI><A HREF="#htoc42">A.9&nbsp;&nbsp;<TT>mod_offline</TT></A>
<LI><A HREF="#htoc42">A.10&nbsp;&nbsp;<TT>mod_privacy</TT></A> <LI><A HREF="#htoc43">A.10&nbsp;&nbsp;<TT>mod_privacy</TT></A>
<LI><A HREF="#htoc43">A.11&nbsp;&nbsp;<TT>mod_private</TT></A> <LI><A HREF="#htoc44">A.11&nbsp;&nbsp;<TT>mod_private</TT></A>
<LI><A HREF="#htoc44">A.12&nbsp;&nbsp;<TT>mod_pubsub</TT></A> <LI><A HREF="#htoc45">A.12&nbsp;&nbsp;<TT>mod_pubsub</TT></A>
<LI><A HREF="#htoc45">A.13&nbsp;&nbsp;<TT>mod_register</TT></A> <LI><A HREF="#htoc46">A.13&nbsp;&nbsp;<TT>mod_register</TT></A>
<LI><A HREF="#htoc46">A.14&nbsp;&nbsp;<TT>mod_roster</TT></A> <LI><A HREF="#htoc47">A.14&nbsp;&nbsp;<TT>mod_roster</TT></A>
<LI><A HREF="#htoc47">A.15&nbsp;&nbsp;<TT>mod_service_log</TT></A> <LI><A HREF="#htoc48">A.15&nbsp;&nbsp;<TT>mod_service_log</TT></A>
<LI><A HREF="#htoc48">A.16&nbsp;&nbsp;<TT>mod_shared_roster</TT></A> <LI><A HREF="#htoc49">A.16&nbsp;&nbsp;<TT>mod_shared_roster</TT></A>
<LI><A HREF="#htoc49">A.17&nbsp;&nbsp;<TT>mod_stats</TT></A> <LI><A HREF="#htoc50">A.17&nbsp;&nbsp;<TT>mod_stats</TT></A>
<LI><A HREF="#htoc50">A.18&nbsp;&nbsp;<TT>mod_time</TT></A> <LI><A HREF="#htoc51">A.18&nbsp;&nbsp;<TT>mod_time</TT></A>
<LI><A HREF="#htoc51">A.19&nbsp;&nbsp;<TT>mod_vcard</TT></A> <LI><A HREF="#htoc52">A.19&nbsp;&nbsp;<TT>mod_vcard</TT></A>
<LI><A HREF="#htoc52">A.20&nbsp;&nbsp;<TT>mod_version</TT></A> <LI><A HREF="#htoc53">A.20&nbsp;&nbsp;<TT>mod_version</TT></A>
</UL> </UL>
<LI><A HREF="#htoc53">B&nbsp;&nbsp;I18n/L10n</A> <LI><A HREF="#htoc54">B&nbsp;&nbsp;I18n/L10n</A>
</UL> </UL>
<!--TOC section Introduction--> <!--TOC section Introduction-->
@ -639,14 +640,35 @@ Example:
{mod_version, []} {mod_version, []}
]}. ]}.
</PRE> </PRE>
<!--TOC subsubsection Virtual Host Configuration-->
<H4><A NAME="htoc19">3.1.7</A>&nbsp;&nbsp;Virtual Host Configuration</H4><!--SEC END -->
<A NAME="sec:configvirtualhost"></A>
Options can be defined separately for different virtual hosts using
<TT>host_config</TT> option. It have the have following syntax:
<PRE>
{host_config, &lt;hostname&gt;, [&lt;option&gt;, &lt;option&gt;, ...]}.
</PRE>
Example:
<PRE>
{host_config, "example.org", [{auth_method, internal}]}.
{host_config, "example.com", [{auth_method, ldap},
{ldap_servers, ["localhost"]},
{ldap_uidattr, "uid"},
{ldap_rootdn, "dc=localdomain"},
{ldap_rootdn, "dc=example,dc=com"},
{ldap_password, ""}]}.
</PRE>
<!--TOC subsection Online Configuration and Monitoring--> <!--TOC subsection Online Configuration and Monitoring-->
<H3><A NAME="htoc19">3.2</A>&nbsp;&nbsp;Online Configuration and Monitoring</H3><!--SEC END --> <H3><A NAME="htoc20">3.2</A>&nbsp;&nbsp;Online Configuration and Monitoring</H3><!--SEC END -->
<A NAME="sec:onlineconfig"></A> <A NAME="sec:onlineconfig"></A>
<!--TOC subsubsection Web-based Administration Interface--> <!--TOC subsubsection Web-based Administration Interface-->
<H4><A NAME="htoc20">3.2.1</A>&nbsp;&nbsp;Web-based Administration Interface</H4><!--SEC END --> <H4><A NAME="htoc21">3.2.1</A>&nbsp;&nbsp;Web-based Administration Interface</H4><!--SEC END -->
<A NAME="sec:webadm"></A> <A NAME="sec:webadm"></A>
To perform online reconfiguration of <TT>ejabberd</TT> you need to enable To perform online reconfiguration of <TT>ejabberd</TT> you need to enable
@ -682,7 +704,7 @@ manage DB, enable/disable listened ports, and view statistics.<BR>
<BR> <BR>
<!--TOC subsubsection <TT>ejabberdctl</TT> tool--> <!--TOC subsubsection <TT>ejabberdctl</TT> tool-->
<H4><A NAME="htoc21">3.2.2</A>&nbsp;&nbsp;<TT>ejabberdctl</TT> tool</H4><!--SEC END --> <H4><A NAME="htoc22">3.2.2</A>&nbsp;&nbsp;<TT>ejabberdctl</TT> tool</H4><!--SEC END -->
<A NAME="sec:ejabberdctl"></A> <A NAME="sec:ejabberdctl"></A>
It is possible to do some administration operations using <TT>ejabberdctl</TT> It is possible to do some administration operations using <TT>ejabberdctl</TT>
@ -710,12 +732,12 @@ Example:
</PRE> </PRE>
<!--TOC section Clustering--> <!--TOC section Clustering-->
<H2><A NAME="htoc22">4</A>&nbsp;&nbsp;Clustering</H2><!--SEC END --> <H2><A NAME="htoc23">4</A>&nbsp;&nbsp;Clustering</H2><!--SEC END -->
<A NAME="sec:clustering"></A> <A NAME="sec:clustering"></A>
<!--TOC subsection How it works--> <!--TOC subsection How it works-->
<H3><A NAME="htoc23">4.1</A>&nbsp;&nbsp;How it works</H3><!--SEC END --> <H3><A NAME="htoc24">4.1</A>&nbsp;&nbsp;How it works</H3><!--SEC END -->
<A NAME="sec:howitworks"></A> <A NAME="sec:howitworks"></A>
A Jabber domain is served by one or more <TT>ejabberd</TT> nodes. These nodes can A Jabber domain is served by one or more <TT>ejabberd</TT> nodes. These nodes can
@ -735,7 +757,7 @@ router;
</UL> </UL>
<!--TOC subsubsection Router--> <!--TOC subsubsection Router-->
<H4><A NAME="htoc24">4.1.1</A>&nbsp;&nbsp;Router</H4><!--SEC END --> <H4><A NAME="htoc25">4.1.1</A>&nbsp;&nbsp;Router</H4><!--SEC END -->
This module is the main router of Jabber packets on each node. It This module is the main router of Jabber packets on each node. It
routes them based on their destinations domains. It uses a global routes them based on their destinations domains. It uses a global
@ -745,7 +767,7 @@ appropriate process. If no, then it is sent to the S2S manager.<BR>
<BR> <BR>
<!--TOC subsubsection Local Router--> <!--TOC subsubsection Local Router-->
<H4><A NAME="htoc25">4.1.2</A>&nbsp;&nbsp;Local Router</H4><!--SEC END --> <H4><A NAME="htoc26">4.1.2</A>&nbsp;&nbsp;Local Router</H4><!--SEC END -->
This module routes packets which have a destination domain equal to This module routes packets which have a destination domain equal to
this server name. If destination JID has a non-empty user part, then this server name. If destination JID has a non-empty user part, then
@ -754,7 +776,7 @@ its content.<BR>
<BR> <BR>
<!--TOC subsubsection Session Manager--> <!--TOC subsubsection Session Manager-->
<H4><A NAME="htoc26">4.1.3</A>&nbsp;&nbsp;Session Manager</H4><!--SEC END --> <H4><A NAME="htoc27">4.1.3</A>&nbsp;&nbsp;Session Manager</H4><!--SEC END -->
This module routes packets to local users. It searches to what user This module routes packets to local users. It searches to what user
resource a packet must be sent via a presence table. Then packet is resource a packet must be sent via a presence table. Then packet is
@ -763,7 +785,7 @@ storage, or bounced back.<BR>
<BR> <BR>
<!--TOC subsubsection S2S Manager--> <!--TOC subsubsection S2S Manager-->
<H4><A NAME="htoc27">4.1.4</A>&nbsp;&nbsp;S2S Manager</H4><!--SEC END --> <H4><A NAME="htoc28">4.1.4</A>&nbsp;&nbsp;S2S Manager</H4><!--SEC END -->
This module routes packets to other Jabber servers. First, it This module routes packets to other Jabber servers. First, it
checks if an opened S2S connection from the domain of the packet checks if an opened S2S connection from the domain of the packet
@ -773,7 +795,7 @@ serving this connection, else a new connection is opened.<BR>
<BR> <BR>
<!--TOC subsection How to setup ejabberd cluster--> <!--TOC subsection How to setup ejabberd cluster-->
<H3><A NAME="htoc28">4.2</A>&nbsp;&nbsp;How to setup ejabberd cluster</H3><!--SEC END --> <H3><A NAME="htoc29">4.2</A>&nbsp;&nbsp;How to setup ejabberd cluster</H3><!--SEC END -->
<A NAME="sec:cluster"></A> <A NAME="sec:cluster"></A>
Suppose you already setuped ejabberd on one of machines (<TT>first</TT>), and Suppose you already setuped ejabberd on one of machines (<TT>first</TT>), and
@ -843,12 +865,12 @@ domain.<BR>
<BR> <BR>
<!--TOC section Built-in Modules--> <!--TOC section Built-in Modules-->
<H2><A NAME="htoc29">A</A>&nbsp;&nbsp;Built-in Modules</H2><!--SEC END --> <H2><A NAME="htoc30">A</A>&nbsp;&nbsp;Built-in Modules</H2><!--SEC END -->
<A NAME="sec:modules"></A> <A NAME="sec:modules"></A>
<!--TOC subsection Common Options--> <!--TOC subsection Common Options-->
<H3><A NAME="htoc30">A.1</A>&nbsp;&nbsp;Common Options</H3><!--SEC END --> <H3><A NAME="htoc31">A.1</A>&nbsp;&nbsp;Common Options</H3><!--SEC END -->
<A NAME="sec:modcommonopts"></A> <A NAME="sec:modcommonopts"></A>
The following options are used by many modules, so they are described in The following options are used by many modules, so they are described in
@ -856,7 +878,7 @@ separate section.<BR>
<BR> <BR>
<!--TOC subsubsection <TT>iqdisc</TT>--> <!--TOC subsubsection <TT>iqdisc</TT>-->
<H4><A NAME="htoc31">A.1.1</A>&nbsp;&nbsp;<TT>iqdisc</TT></H4><!--SEC END --> <H4><A NAME="htoc32">A.1.1</A>&nbsp;&nbsp;<TT>iqdisc</TT></H4><!--SEC END -->
<A NAME="sec:modiqdiscoption"></A> <A NAME="sec:modiqdiscoption"></A>
Many modules define handlers for processing IQ queries of different namespaces Many modules define handlers for processing IQ queries of different namespaces
@ -889,7 +911,7 @@ Example:
</PRE> </PRE>
<!--TOC subsubsection <TT>host</TT>--> <!--TOC subsubsection <TT>host</TT>-->
<H4><A NAME="htoc32">A.1.2</A>&nbsp;&nbsp;<TT>host</TT></H4><!--SEC END --> <H4><A NAME="htoc33">A.1.2</A>&nbsp;&nbsp;<TT>host</TT></H4><!--SEC END -->
<A NAME="sec:modhostoption"></A> <A NAME="sec:modhostoption"></A>
This option explicitly defines hostname for the module which acts as a service.<BR> This option explicitly defines hostname for the module which acts as a service.<BR>
@ -905,7 +927,7 @@ Example:
</PRE> </PRE>
<!--TOC subsubsection <TT>hosts</TT>--> <!--TOC subsubsection <TT>hosts</TT>-->
<H4><A NAME="htoc33">A.1.3</A>&nbsp;&nbsp;<TT>hosts</TT></H4><!--SEC END --> <H4><A NAME="htoc34">A.1.3</A>&nbsp;&nbsp;<TT>hosts</TT></H4><!--SEC END -->
<A NAME="sec:modhostsoption"></A> <A NAME="sec:modhostsoption"></A>
This option explicitly defines a list of hostnames for the module which acts as This option explicitly defines a list of hostnames for the module which acts as
@ -922,7 +944,7 @@ Example:
</PRE> </PRE>
<!--TOC subsection <TT>mod_announce</TT>--> <!--TOC subsection <TT>mod_announce</TT>-->
<H3><A NAME="htoc34">A.2</A>&nbsp;&nbsp;<TT>mod_announce</TT></H3><!--SEC END --> <H3><A NAME="htoc35">A.2</A>&nbsp;&nbsp;<TT>mod_announce</TT></H3><!--SEC END -->
<A NAME="sec:modannounce"></A> <A NAME="sec:modannounce"></A>
This module adds support for broadcast announce messages and MOTD. This module adds support for broadcast announce messages and MOTD.
@ -969,7 +991,7 @@ Example:
</PRE> </PRE>
<!--TOC subsection <TT>mod_configure</TT>--> <!--TOC subsection <TT>mod_configure</TT>-->
<H3><A NAME="htoc35">A.3</A>&nbsp;&nbsp;<TT>mod_configure</TT></H3><!--SEC END --> <H3><A NAME="htoc36">A.3</A>&nbsp;&nbsp;<TT>mod_configure</TT></H3><!--SEC END -->
<A NAME="sec:modconfigure"></A> <A NAME="sec:modconfigure"></A>
Options: Options:
@ -979,7 +1001,7 @@ discipline (see&nbsp;<A HREF="#sec:modiqdiscoption">A.1.1</A>).
</DL> </DL>
<!--TOC subsection <TT>mod_disco</TT>--> <!--TOC subsection <TT>mod_disco</TT>-->
<H3><A NAME="htoc36">A.4</A>&nbsp;&nbsp;<TT>mod_disco</TT></H3><!--SEC END --> <H3><A NAME="htoc37">A.4</A>&nbsp;&nbsp;<TT>mod_disco</TT></H3><!--SEC END -->
<A NAME="sec:moddisco"></A> <A NAME="sec:moddisco"></A>
This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0030.html">JEP-0030</A> (Service Discovery).<BR> This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0030.html">JEP-0030</A> (Service Discovery).<BR>
@ -1004,7 +1026,7 @@ Example:
</PRE> </PRE>
<!--TOC subsection <TT>mod_echo</TT>--> <!--TOC subsection <TT>mod_echo</TT>-->
<H3><A NAME="htoc37">A.5</A>&nbsp;&nbsp;<TT>mod_echo</TT></H3><!--SEC END --> <H3><A NAME="htoc38">A.5</A>&nbsp;&nbsp;<TT>mod_echo</TT></H3><!--SEC END -->
<A NAME="sec:modecho"></A> <A NAME="sec:modecho"></A>
This module acts as a service and simply returns to sender any Jabber This module acts as a service and simply returns to sender any Jabber
@ -1022,7 +1044,7 @@ Options:
</DL> </DL>
<!--TOC subsection <TT>mod_irc</TT>--> <!--TOC subsection <TT>mod_irc</TT>-->
<H3><A NAME="htoc38">A.6</A>&nbsp;&nbsp;<TT>mod_irc</TT></H3><!--SEC END --> <H3><A NAME="htoc39">A.6</A>&nbsp;&nbsp;<TT>mod_irc</TT></H3><!--SEC END -->
<A NAME="sec:modirc"></A> <A NAME="sec:modirc"></A>
This module implements IRC transport.<BR> This module implements IRC transport.<BR>
@ -1049,7 +1071,7 @@ Example:
</PRE> </PRE>
<!--TOC subsection <TT>mod_last</TT>--> <!--TOC subsection <TT>mod_last</TT>-->
<H3><A NAME="htoc39">A.7</A>&nbsp;&nbsp;<TT>mod_last</TT></H3><!--SEC END --> <H3><A NAME="htoc40">A.7</A>&nbsp;&nbsp;<TT>mod_last</TT></H3><!--SEC END -->
<A NAME="sec:modlast"></A> <A NAME="sec:modlast"></A>
This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0012.html">JEP-0012</A> (Last Activity)<BR> This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0012.html">JEP-0012</A> (Last Activity)<BR>
@ -1061,7 +1083,7 @@ discipline (see&nbsp;<A HREF="#sec:modiqdiscoption">A.1.1</A>).
</DL> </DL>
<!--TOC subsection <TT>mod_muc</TT>--> <!--TOC subsection <TT>mod_muc</TT>-->
<H3><A NAME="htoc40">A.8</A>&nbsp;&nbsp;<TT>mod_muc</TT></H3><!--SEC END --> <H3><A NAME="htoc41">A.8</A>&nbsp;&nbsp;<TT>mod_muc</TT></H3><!--SEC END -->
<A NAME="sec:modmuc"></A> <A NAME="sec:modmuc"></A>
This module implements <A HREF="http://www.jabber.org/jeps/jep-0045.html">JEP-0045</A> (Multi-User Chat) service.<BR> This module implements <A HREF="http://www.jabber.org/jeps/jep-0045.html">JEP-0045</A> (Multi-User Chat) service.<BR>
@ -1100,14 +1122,14 @@ Example:
</PRE> </PRE>
<!--TOC subsection <TT>mod_offline</TT>--> <!--TOC subsection <TT>mod_offline</TT>-->
<H3><A NAME="htoc41">A.9</A>&nbsp;&nbsp;<TT>mod_offline</TT></H3><!--SEC END --> <H3><A NAME="htoc42">A.9</A>&nbsp;&nbsp;<TT>mod_offline</TT></H3><!--SEC END -->
<A NAME="sec:modoffline"></A> <A NAME="sec:modoffline"></A>
This module implements offline message storage.<BR> This module implements offline message storage.<BR>
<BR> <BR>
<!--TOC subsection <TT>mod_privacy</TT>--> <!--TOC subsection <TT>mod_privacy</TT>-->
<H3><A NAME="htoc42">A.10</A>&nbsp;&nbsp;<TT>mod_privacy</TT></H3><!--SEC END --> <H3><A NAME="htoc43">A.10</A>&nbsp;&nbsp;<TT>mod_privacy</TT></H3><!--SEC END -->
<A NAME="sec:modprivacy"></A> <A NAME="sec:modprivacy"></A>
This module implements Privacy Rules as defined in XMPP IM This module implements Privacy Rules as defined in XMPP IM
@ -1120,7 +1142,7 @@ discipline (see&nbsp;<A HREF="#sec:modiqdiscoption">A.1.1</A>).
</DL> </DL>
<!--TOC subsection <TT>mod_private</TT>--> <!--TOC subsection <TT>mod_private</TT>-->
<H3><A NAME="htoc43">A.11</A>&nbsp;&nbsp;<TT>mod_private</TT></H3><!--SEC END --> <H3><A NAME="htoc44">A.11</A>&nbsp;&nbsp;<TT>mod_private</TT></H3><!--SEC END -->
<A NAME="sec:modprivate"></A> <A NAME="sec:modprivate"></A>
This module adds support of <A HREF="http://www.jabber.org/jeps/jep-0049.html">JEP-0049</A> (Private XML Storage).<BR> This module adds support of <A HREF="http://www.jabber.org/jeps/jep-0049.html">JEP-0049</A> (Private XML Storage).<BR>
@ -1132,7 +1154,7 @@ discipline (see&nbsp;<A HREF="#sec:modiqdiscoption">A.1.1</A>).
</DL> </DL>
<!--TOC subsection <TT>mod_pubsub</TT>--> <!--TOC subsection <TT>mod_pubsub</TT>-->
<H3><A NAME="htoc44">A.12</A>&nbsp;&nbsp;<TT>mod_pubsub</TT></H3><!--SEC END --> <H3><A NAME="htoc45">A.12</A>&nbsp;&nbsp;<TT>mod_pubsub</TT></H3><!--SEC END -->
<A NAME="sec:modpubsub"></A> <A NAME="sec:modpubsub"></A>
This module implements <A HREF="http://www.jabber.org/jeps/jep-0060.html">JEP-0060</A> (Publish-Subscribe Service).<BR> This module implements <A HREF="http://www.jabber.org/jeps/jep-0060.html">JEP-0060</A> (Publish-Subscribe Service).<BR>
@ -1161,7 +1183,7 @@ Example:
</PRE> </PRE>
<!--TOC subsection <TT>mod_register</TT>--> <!--TOC subsection <TT>mod_register</TT>-->
<H3><A NAME="htoc45">A.13</A>&nbsp;&nbsp;<TT>mod_register</TT></H3><!--SEC END --> <H3><A NAME="htoc46">A.13</A>&nbsp;&nbsp;<TT>mod_register</TT></H3><!--SEC END -->
<A NAME="sec:modregister"></A> <A NAME="sec:modregister"></A>
This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0077.html">JEP-0077</A> (In-Band Registration).<BR> This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0077.html">JEP-0077</A> (In-Band Registration).<BR>
@ -1194,7 +1216,7 @@ Example:
</PRE> </PRE>
<!--TOC subsection <TT>mod_roster</TT>--> <!--TOC subsection <TT>mod_roster</TT>-->
<H3><A NAME="htoc46">A.14</A>&nbsp;&nbsp;<TT>mod_roster</TT></H3><!--SEC END --> <H3><A NAME="htoc47">A.14</A>&nbsp;&nbsp;<TT>mod_roster</TT></H3><!--SEC END -->
<A NAME="sec:modroster"></A> <A NAME="sec:modroster"></A>
This module implements roster management.<BR> This module implements roster management.<BR>
@ -1206,7 +1228,7 @@ discipline (see&nbsp;<A HREF="#sec:modiqdiscoption">A.1.1</A>).
</DL> </DL>
<!--TOC subsection <TT>mod_service_log</TT>--> <!--TOC subsection <TT>mod_service_log</TT>-->
<H3><A NAME="htoc47">A.15</A>&nbsp;&nbsp;<TT>mod_service_log</TT></H3><!--SEC END --> <H3><A NAME="htoc48">A.15</A>&nbsp;&nbsp;<TT>mod_service_log</TT></H3><!--SEC END -->
<A NAME="sec:modservicelog"></A> <A NAME="sec:modservicelog"></A>
This module adds support for logging of user packets via any jabber service. This module adds support for logging of user packets via any jabber service.
@ -1229,7 +1251,7 @@ Example:
</PRE> </PRE>
<!--TOC subsection <TT>mod_shared_roster</TT>--> <!--TOC subsection <TT>mod_shared_roster</TT>-->
<H3><A NAME="htoc48">A.16</A>&nbsp;&nbsp;<TT>mod_shared_roster</TT></H3><!--SEC END --> <H3><A NAME="htoc49">A.16</A>&nbsp;&nbsp;<TT>mod_shared_roster</TT></H3><!--SEC END -->
<A NAME="sec:modsharedroster"></A> <A NAME="sec:modsharedroster"></A>
This module implements shared roster groups support.<BR> This module implements shared roster groups support.<BR>
@ -1340,7 +1362,7 @@ create groups like on table&nbsp;<A HREF="#tab:srge2">2</A>.
<DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE> <DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE>
<!--TOC subsection <TT>mod_stats</TT>--> <!--TOC subsection <TT>mod_stats</TT>-->
<H3><A NAME="htoc49">A.17</A>&nbsp;&nbsp;<TT>mod_stats</TT></H3><!--SEC END --> <H3><A NAME="htoc50">A.17</A>&nbsp;&nbsp;<TT>mod_stats</TT></H3><!--SEC END -->
<A NAME="sec:modstats"></A> <A NAME="sec:modstats"></A>
This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0039.html">JEP-0039</A> (Statistics Gathering).<BR> This module adds support for <A HREF="http://www.jabber.org/jeps/jep-0039.html">JEP-0039</A> (Statistics Gathering).<BR>
@ -1352,7 +1374,7 @@ discipline (see&nbsp;<A HREF="#sec:modiqdiscoption">A.1.1</A>).
</DL> </DL>
<!--TOC subsection <TT>mod_time</TT>--> <!--TOC subsection <TT>mod_time</TT>-->
<H3><A NAME="htoc50">A.18</A>&nbsp;&nbsp;<TT>mod_time</TT></H3><!--SEC END --> <H3><A NAME="htoc51">A.18</A>&nbsp;&nbsp;<TT>mod_time</TT></H3><!--SEC END -->
<A NAME="sec:modtime"></A> <A NAME="sec:modtime"></A>
This module answers UTC time on <TT>jabber:iq:time</TT> queries.<BR> This module answers UTC time on <TT>jabber:iq:time</TT> queries.<BR>
@ -1364,7 +1386,7 @@ discipline (see&nbsp;<A HREF="#sec:modiqdiscoption">A.1.1</A>).
</DL> </DL>
<!--TOC subsection <TT>mod_vcard</TT>--> <!--TOC subsection <TT>mod_vcard</TT>-->
<H3><A NAME="htoc51">A.19</A>&nbsp;&nbsp;<TT>mod_vcard</TT></H3><!--SEC END --> <H3><A NAME="htoc52">A.19</A>&nbsp;&nbsp;<TT>mod_vcard</TT></H3><!--SEC END -->
<A NAME="sec:modvcard"></A> <A NAME="sec:modvcard"></A>
This module implements simple Jabber User Directory (based on user vCards) This module implements simple Jabber User Directory (based on user vCards)
@ -1406,7 +1428,7 @@ Example:
</PRE> </PRE>
<!--TOC subsection <TT>mod_version</TT>--> <!--TOC subsection <TT>mod_version</TT>-->
<H3><A NAME="htoc52">A.20</A>&nbsp;&nbsp;<TT>mod_version</TT></H3><!--SEC END --> <H3><A NAME="htoc53">A.20</A>&nbsp;&nbsp;<TT>mod_version</TT></H3><!--SEC END -->
<A NAME="sec:modversion"></A> <A NAME="sec:modversion"></A>
This module answers <TT>ejabberd</TT> version on <TT>jabber:iq:version</TT> queries.<BR> This module answers <TT>ejabberd</TT> version on <TT>jabber:iq:version</TT> queries.<BR>
@ -1418,7 +1440,7 @@ discipline (see&nbsp;<A HREF="#sec:modiqdiscoption">A.1.1</A>).
</DL> </DL>
<!--TOC section I18n/L10n--> <!--TOC section I18n/L10n-->
<H2><A NAME="htoc53">B</A>&nbsp;&nbsp;I18n/L10n</H2><!--SEC END --> <H2><A NAME="htoc54">B</A>&nbsp;&nbsp;I18n/L10n</H2><!--SEC END -->
<A NAME="sec:i18nl10n"></A> <A NAME="sec:i18nl10n"></A>
All built-in modules support <TT>xml:lang</TT> attribute inside IQ queries. All built-in modules support <TT>xml:lang</TT> attribute inside IQ queries.

View File

@ -82,7 +82,7 @@ discipline (see~\ref{sec:modiqdiscoption}).}
\author{Alexey Shchepin \\ \author{Alexey Shchepin \\
\ahrefurl{mailto:alexey@sevcom.net} \\ \ahrefurl{mailto:alexey@sevcom.net} \\
\ahrefurl{xmpp:aleksey@jabber.ru}} \ahrefurl{xmpp:aleksey@jabber.ru}}
\date{May 23, 2005} \date{July 31, 2005}
\begin{document} \begin{document}
\begin{titlepage} \begin{titlepage}
@ -649,6 +649,29 @@ Example:
\end{verbatim} \end{verbatim}
\subsubsection{Virtual Host Configuration}
\label{sec:configvirtualhost}
Options can be defined separately for different virtual hosts using
\term{host\_config} option. It have the have following syntax:
\begin{verbatim}
{host_config, <hostname>, [<option>, <option>, ...]}.
\end{verbatim}
Example:
\begin{verbatim}
{host_config, "example.org", [{auth_method, internal}]}.
{host_config, "example.com", [{auth_method, ldap},
{ldap_servers, ["localhost"]},
{ldap_uidattr, "uid"},
{ldap_rootdn, "dc=localdomain"},
{ldap_rootdn, "dc=example,dc=com"},
{ldap_password, ""}]}.
\end{verbatim}
\subsection{Online Configuration and Monitoring} \subsection{Online Configuration and Monitoring}
\label{sec:onlineconfig} \label{sec:onlineconfig}

View File

@ -36,9 +36,9 @@ start(Host) ->
LDAPServers = ejabberd_config:get_local_option({ldap_servers, Host}), LDAPServers = ejabberd_config:get_local_option({ldap_servers, Host}),
RootDN = ejabberd_config:get_local_option({ldap_rootdn, Host}), RootDN = ejabberd_config:get_local_option({ldap_rootdn, Host}),
Password = ejabberd_config:get_local_option({ldap_password, Host}), Password = ejabberd_config:get_local_option({ldap_password, Host}),
eldap:start_link(gen_mod:get_module_proc(Host, ejabberd), eldap:start_link(get_eldap_id(Host, ejabberd),
LDAPServers, 389, RootDN, Password), LDAPServers, 389, RootDN, Password),
eldap:start_link(gen_mod:get_module_proc(Host, ejabberd_bind), eldap:start_link(get_eldap_id(Host, ejabberd_bind),
LDAPServers, 389, RootDN, Password), LDAPServers, 389, RootDN, Password),
ok. ok.
@ -51,7 +51,7 @@ check_password(User, Server, Password) ->
false; false;
DN -> DN ->
LServer = jlib:nameprep(Server), LServer = jlib:nameprep(Server),
case eldap:bind(gen_mod:get_module_proc(LServer, ejabberd_bind), case eldap:bind(get_eldap_id(LServer, ejabberd_bind),
DN, Password) of DN, Password) of
ok -> ok ->
true; true;
@ -77,7 +77,7 @@ get_vh_registered_users(Server) ->
Attr = ejabberd_config:get_local_option({ldap_uidattr, LServer}), Attr = ejabberd_config:get_local_option({ldap_uidattr, LServer}),
Filter = eldap:present(Attr), Filter = eldap:present(Attr),
Base = ejabberd_config:get_local_option({ldap_base, LServer}), Base = ejabberd_config:get_local_option({ldap_base, LServer}),
case eldap:search(gen_mod:get_module_proc(LServer, ejabberd), case eldap:search(get_eldap_id(LServer, ejabberd),
[{base, Base}, [{base, Base},
{filter, Filter}, {filter, Filter},
{attributes, [Attr]}]) of {attributes, [Attr]}]) of
@ -130,7 +130,7 @@ find_user_dn(User, Server) ->
Attr = ejabberd_config:get_local_option({ldap_uidattr, LServer}), Attr = ejabberd_config:get_local_option({ldap_uidattr, LServer}),
Filter = eldap:equalityMatch(Attr, User), Filter = eldap:equalityMatch(Attr, User),
Base = ejabberd_config:get_local_option({ldap_base, LServer}), Base = ejabberd_config:get_local_option({ldap_base, LServer}),
case eldap:search(gen_mod:get_module_proc(LServer, ejabberd), case eldap:search(get_eldap_id(LServer, ejabberd),
[{base, Base}, [{base, Base},
{filter, Filter}, {filter, Filter},
{attributes, []}]) of {attributes, []}]) of
@ -140,3 +140,5 @@ find_user_dn(User, Server) ->
false false
end. end.
get_eldap_id(Host, Name) ->
atom_to_list(gen_mod:get_module_proc(Host, Name)).

View File

@ -101,6 +101,9 @@ process_term(Term, State) ->
State; State;
{hosts, Hosts} -> {hosts, Hosts} ->
State; State;
{host_config, Host, Terms} ->
lists:foldl(fun(T, S) -> process_host_term(T, Host, S) end,
State, Terms);
{listen, Val} -> {listen, Val} ->
add_option(listen, Val, State); add_option(listen, Val, State);
{outgoing_s2s_port, Port} -> {outgoing_s2s_port, Port} ->