mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-08 16:52:59 +01:00
* doc/guide.tex: Updated
* src/msgs/fr.msg: Updated (thanks to Sergei Golovan) * src/mod_irc/mod_irc.erl: Added handler for disco items requests (thanks to Sergei Golovan) * src/mod_vcard.erl: Added option for JUD disabling (thanks to Sergei Golovan) * src/mod_configure2.erl: Fixed module stopping (thanks to Sergei Golovan) * src/mod_last.erl: Likewise * src/mod_privacy.erl: Likewise * src/mod_register.erl: Likewise * src/mod_roster.erl: Likewise * src/mod_vcard.erl: Likewise * src/jd2ejd.erl: Added emergency catches (thanks to Sergei Golovan) * src/mod_last.erl: Likewise * src/ejabberd_sm.erl: Removed needless call to mod_disco:unregister_feature (thanks to Sergei Golovan) * src/ejabberd_local.erl: Better support for mod_disco (thanks to Sergei Golovan) * src/mod_disco.erl: Likewise * src/translate.erl: Suport for "default language" option (thanks to Sergei Golovan) * src/ejabberd_config.erl: Likewise * src/ejabberd_c2s.erl: Likewise * src/ejabberd.hrl: Added 'MYLANG' macros * src/ejabberd.cfg.example: Updated (thanks to Sergei Golovan) * doc/guide.tex: Updated (thanks to Sergei Golovan) * src/win32/ejabberd.cfg: Updated (thanks to Sergei Golovan) SVN Revision: 241
This commit is contained in:
parent
b88da95b51
commit
d2eab0d535
45
ChangeLog
45
ChangeLog
@ -1,3 +1,48 @@
|
||||
2004-07-10 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* doc/guide.tex: Updated
|
||||
|
||||
* src/msgs/fr.msg: Updated (thanks to Sergei Golovan)
|
||||
|
||||
* src/mod_irc/mod_irc.erl: Added handler for disco items requests
|
||||
(thanks to Sergei Golovan)
|
||||
|
||||
* src/mod_vcard.erl: Added option for JUD disabling (thanks to
|
||||
Sergei Golovan)
|
||||
|
||||
* src/mod_configure2.erl: Fixed module stopping (thanks to Sergei
|
||||
Golovan)
|
||||
* src/mod_last.erl: Likewise
|
||||
* src/mod_privacy.erl: Likewise
|
||||
* src/mod_register.erl: Likewise
|
||||
* src/mod_roster.erl: Likewise
|
||||
* src/mod_vcard.erl: Likewise
|
||||
|
||||
* src/jd2ejd.erl: Added emergency catches (thanks to Sergei
|
||||
Golovan)
|
||||
* src/mod_last.erl: Likewise
|
||||
|
||||
* src/ejabberd_sm.erl: Removed needless call to
|
||||
mod_disco:unregister_feature (thanks to Sergei Golovan)
|
||||
|
||||
* src/ejabberd_local.erl: Better support for mod_disco (thanks to
|
||||
Sergei Golovan)
|
||||
* src/mod_disco.erl: Likewise
|
||||
|
||||
* src/translate.erl: Suport for "default language" option (thanks
|
||||
to Sergei Golovan)
|
||||
* src/ejabberd_config.erl: Likewise
|
||||
* src/ejabberd_c2s.erl: Likewise
|
||||
* src/ejabberd.hrl: Added 'MYLANG' macros
|
||||
|
||||
* src/ejabberd.cfg.example: Updated (thanks to Sergei Golovan)
|
||||
|
||||
* doc/guide.tex: Updated (thanks to Sergei Golovan)
|
||||
|
||||
2004-07-09 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/win32/ejabberd.cfg: Updated (thanks to Sergei Golovan)
|
||||
|
||||
2004-07-07 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/Makefile.win32: Updated (thanks to Sergei Golovan)
|
||||
|
349
doc/guide.html
349
doc/guide.html
@ -56,56 +56,49 @@
|
||||
<A HREF="#htoc12">3.1 Initial Configuration</A>
|
||||
<UL><LI>
|
||||
<A HREF="#htoc13">3.1.1 Host Name</A>
|
||||
<LI><A HREF="#htoc14">3.1.2 Access Rules</A>
|
||||
<LI><A HREF="#htoc15">3.1.3 Shapers Configuration</A>
|
||||
<LI><A HREF="#htoc16">3.1.4 Listened Sockets</A>
|
||||
<LI><A HREF="#htoc17">3.1.5 Modules</A>
|
||||
<LI><A HREF="#htoc14">3.1.2 Default Language</A>
|
||||
<LI><A HREF="#htoc15">3.1.3 Access Rules</A>
|
||||
<LI><A HREF="#htoc16">3.1.4 Shapers Configuration</A>
|
||||
<LI><A HREF="#htoc17">3.1.5 Listened Sockets</A>
|
||||
<LI><A HREF="#htoc18">3.1.6 Modules</A>
|
||||
</UL>
|
||||
<LI><A HREF="#htoc18">3.2 Online Configuration and Monitoring</A>
|
||||
<LI><A HREF="#htoc19">3.2 Online Configuration and Monitoring</A>
|
||||
</UL>
|
||||
<LI><A HREF="#htoc20">4 Distribution</A>
|
||||
<UL><LI>
|
||||
<A HREF="#htoc19">3.2.1 Node <TT>config</TT>: Global Configuration</A>
|
||||
<LI><A HREF="#htoc20">3.2.2 Node <TT>online users</TT>: List of Online Users</A>
|
||||
<LI><A HREF="#htoc21">3.2.3 Node <TT>all users</TT>: List of Registered Users</A>
|
||||
<LI><A HREF="#htoc22">3.2.4 Node <TT>outgoing s2s</TT>: List of Outgoing S2S connections</A>
|
||||
<LI><A HREF="#htoc23">3.2.5 Node <TT>running nodes</TT>: List of Running <TT>ejabberd</TT> Nodes</A>
|
||||
<LI><A HREF="#htoc24">3.2.6 Node <TT>stopped nodes</TT>: List of Stopped Nodes</A>
|
||||
</UL>
|
||||
</UL>
|
||||
<LI><A HREF="#htoc25">4 Distribution</A>
|
||||
<A HREF="#htoc21">4.1 How it works</A>
|
||||
<UL><LI>
|
||||
<A HREF="#htoc26">4.1 How it works</A>
|
||||
<A HREF="#htoc22">4.1.1 Router</A>
|
||||
<LI><A HREF="#htoc23">4.1.2 Local Router</A>
|
||||
<LI><A HREF="#htoc24">4.1.3 Session Manager</A>
|
||||
<LI><A HREF="#htoc25">4.1.4 S2S Manager</A>
|
||||
</UL>
|
||||
</UL>
|
||||
<LI><A HREF="#htoc26">A Built-in Modules</A>
|
||||
<UL><LI>
|
||||
<A HREF="#htoc27">4.1.1 Router</A>
|
||||
<LI><A HREF="#htoc28">4.1.2 Local Router</A>
|
||||
<LI><A HREF="#htoc29">4.1.3 Session Manager</A>
|
||||
<LI><A HREF="#htoc30">4.1.4 S2S Manager</A>
|
||||
</UL>
|
||||
</UL>
|
||||
<LI><A HREF="#htoc31">A Built-in Modules</A>
|
||||
<A HREF="#htoc27">A.1 Common Options</A>
|
||||
<UL><LI>
|
||||
<A HREF="#htoc32">A.1 Common Options</A>
|
||||
<UL><LI>
|
||||
<A HREF="#htoc33">A.1.1 Option <TT>iqdisc</TT></A>
|
||||
<LI><A HREF="#htoc34">A.1.2 Option <TT>host</TT></A>
|
||||
<A HREF="#htoc28">A.1.1 Option <TT>iqdisc</TT></A>
|
||||
<LI><A HREF="#htoc29">A.1.2 Option <TT>host</TT></A>
|
||||
</UL>
|
||||
<LI><A HREF="#htoc35">A.2 <TT>mod_configure</TT></A>
|
||||
<LI><A HREF="#htoc36">A.3 <TT>mod_disco</TT></A>
|
||||
<LI><A HREF="#htoc37">A.4 <TT>mod_echo</TT></A>
|
||||
<LI><A HREF="#htoc38">A.5 <TT>mod_irc</TT></A>
|
||||
<LI><A HREF="#htoc39">A.6 <TT>mod_last</TT></A>
|
||||
<LI><A HREF="#htoc40">A.7 <TT>mod_muc</TT></A>
|
||||
<LI><A HREF="#htoc41">A.8 <TT>mod_offline</TT></A>
|
||||
<LI><A HREF="#htoc42">A.9 <TT>mod_privacy</TT></A>
|
||||
<LI><A HREF="#htoc43">A.10 <TT>mod_private</TT></A>
|
||||
<LI><A HREF="#htoc44">A.11 <TT>mod_pubsub</TT></A>
|
||||
<LI><A HREF="#htoc45">A.12 <TT>mod_register</TT></A>
|
||||
<LI><A HREF="#htoc46">A.13 <TT>mod_roster</TT></A>
|
||||
<LI><A HREF="#htoc47">A.14 <TT>mod_stats</TT></A>
|
||||
<LI><A HREF="#htoc48">A.15 <TT>mod_time</TT></A>
|
||||
<LI><A HREF="#htoc49">A.16 <TT>mod_vcard</TT></A>
|
||||
<LI><A HREF="#htoc50">A.17 <TT>mod_version</TT></A>
|
||||
<LI><A HREF="#htoc30">A.2 <TT>mod_configure</TT></A>
|
||||
<LI><A HREF="#htoc31">A.3 <TT>mod_disco</TT></A>
|
||||
<LI><A HREF="#htoc32">A.4 <TT>mod_echo</TT></A>
|
||||
<LI><A HREF="#htoc33">A.5 <TT>mod_irc</TT></A>
|
||||
<LI><A HREF="#htoc34">A.6 <TT>mod_last</TT></A>
|
||||
<LI><A HREF="#htoc35">A.7 <TT>mod_muc</TT></A>
|
||||
<LI><A HREF="#htoc36">A.8 <TT>mod_offline</TT></A>
|
||||
<LI><A HREF="#htoc37">A.9 <TT>mod_privacy</TT></A>
|
||||
<LI><A HREF="#htoc38">A.10 <TT>mod_private</TT></A>
|
||||
<LI><A HREF="#htoc39">A.11 <TT>mod_pubsub</TT></A>
|
||||
<LI><A HREF="#htoc40">A.12 <TT>mod_register</TT></A>
|
||||
<LI><A HREF="#htoc41">A.13 <TT>mod_roster</TT></A>
|
||||
<LI><A HREF="#htoc42">A.14 <TT>mod_stats</TT></A>
|
||||
<LI><A HREF="#htoc43">A.15 <TT>mod_time</TT></A>
|
||||
<LI><A HREF="#htoc44">A.16 <TT>mod_vcard</TT></A>
|
||||
<LI><A HREF="#htoc45">A.17 <TT>mod_version</TT></A>
|
||||
</UL>
|
||||
<LI><A HREF="#htoc51">B I18n/L10n</A>
|
||||
<LI><A HREF="#htoc46">B I18n/L10n</A>
|
||||
</UL>
|
||||
|
||||
<!--TOC section Introduction-->
|
||||
@ -131,6 +124,7 @@ Works on most of popular platforms: *nix (tested on Linux, FreeBSD and
|
||||
<LI>Built-in IRC transport
|
||||
<LI>Built-in <A HREF="http://www.jabber.org/jeps/jep-0060.html">Publish-Subscribe</A> service
|
||||
<LI>Built-in Jabber Users Directory service based on users vCards
|
||||
<LI>Built-in web-based administration interface
|
||||
<LI>Built-in <A HREF="http://www.jabber.org/jeps/jep-0025.html">HTTP Polling</A> service
|
||||
<LI>SSL support
|
||||
<LI>Support for LDAP authentification
|
||||
@ -328,13 +322,25 @@ adding new ones.<BR>
|
||||
|
||||
<A NAME="sec:confighostname"></A>
|
||||
Option <TT>hostname</TT> defines name of Jabber domain that <TT>ejabberd</TT>
|
||||
serves. E. g. to use <TT>jabber.org</TT> domain add following line in config:
|
||||
serves. E. g. to use <TT>jabber.org</TT> domain add the following line in the config:
|
||||
<PRE>
|
||||
{host, "jabber.org"}.
|
||||
</PRE>
|
||||
<!--TOC subsubsection Default Language-->
|
||||
|
||||
<H4><A NAME="htoc14">3.1.2</A> Default Language</H4><!--SEC END -->
|
||||
|
||||
<A NAME="sec:configlanguage"></A>
|
||||
Option <TT>language</TT> defines default language of <TT>ejabberd</TT> messages, sent
|
||||
to users. Default value is <TT>"en"</TT>. In order to take effect there must be a
|
||||
translation file <TT><language>.msg</TT> in <TT>ejabberd</TT> <TT>msgs</TT> directory.
|
||||
E. g. to use Russian as default language add the following line in the config:
|
||||
<PRE>
|
||||
{language, "ru"}.
|
||||
</PRE>
|
||||
<!--TOC subsubsection Access Rules-->
|
||||
|
||||
<H4><A NAME="htoc14">3.1.2</A> Access Rules</H4><!--SEC END -->
|
||||
<H4><A NAME="htoc15">3.1.3</A> Access Rules</H4><!--SEC END -->
|
||||
|
||||
<A NAME="sec:configaccess"></A>
|
||||
Access control in <TT>ejabberd</TT> is performed via Access Control Lists (ACL). The
|
||||
@ -420,7 +426,7 @@ Following access rules pre-defined:
|
||||
</DL>
|
||||
<!--TOC subsubsection Shapers Configuration-->
|
||||
|
||||
<H4><A NAME="htoc15">3.1.3</A> Shapers Configuration</H4><!--SEC END -->
|
||||
<H4><A NAME="htoc16">3.1.4</A> Shapers Configuration</H4><!--SEC END -->
|
||||
|
||||
<A NAME="sec:configshaper"></A>
|
||||
With shapers is possible to bound connection traffic. The declarations of
|
||||
@ -439,7 +445,7 @@ E. g. to define shaper with name ``<TT>normal</TT>'' and maximum allowed ra
|
||||
</PRE>
|
||||
<!--TOC subsubsection Listened Sockets-->
|
||||
|
||||
<H4><A NAME="htoc16">3.1.4</A> Listened Sockets</H4><!--SEC END -->
|
||||
<H4><A NAME="htoc17">3.1.5</A> Listened Sockets</H4><!--SEC END -->
|
||||
|
||||
<A NAME="sec:configlistened"></A>
|
||||
Option <TT>listen</TT> defines list of listened sockets and what services
|
||||
@ -499,19 +505,23 @@ For example, the following configuration defines that:
|
||||
C2S connections are listened on port 5222 and 5223 (SSL) and denied for
|
||||
user ``<TT>bad</TT>''
|
||||
<LI>S2S connections are listened on port 5269
|
||||
<LI>HTTP connections are listened on port 5280 and administration interface
|
||||
and HTTP Polling support are enabled
|
||||
<LI>All users except admins have traffic limit 1000 B/s
|
||||
<LI>AIM service <TT>aim.example.org</TT> is connected to port 5233 with
|
||||
<LI>AIM transport <TT>aim.example.org</TT> is connected to port 5233 with
|
||||
password ``<TT>aimsecret</TT>''
|
||||
<LI>JIT services <TT>icq.example.org</TT> and <TT>sms.example.org</TT> are
|
||||
<LI>JIT transports <TT>icq.example.org</TT> and <TT>sms.example.org</TT> are
|
||||
connected to port 5234 with password ``<TT>jitsecret</TT>''
|
||||
<LI>MSN service <TT>msn.example.org</TT> is connected to port 5235 with
|
||||
<LI>MSN transport <TT>msn.example.org</TT> is connected to port 5235 with
|
||||
password ``<TT>msnsecret</TT>''
|
||||
<LI>Yahoo! service <TT>yahoo.example.org</TT> is connected to port 5236 with
|
||||
<LI>Yahoo! transport <TT>yahoo.example.org</TT> is connected to port 5236 with
|
||||
password ``<TT>yahoosecret</TT>''
|
||||
<LI>ILE service <TT>ile.example.org</TT> is connected to port 5237 with
|
||||
<LI>Gadu-Gadu transport <TT>gg.example.org</TT> is connected to port 5237 with
|
||||
password ``<TT>ggsecret</TT>''
|
||||
<LI>ILE service <TT>ile.example.org</TT> is connected to port 5238 with
|
||||
password ``<TT>ilesecret</TT>''
|
||||
</UL>
|
||||
<PRE>
|
||||
<PRE>
|
||||
{acl, blocked, {user, "bad"}}.
|
||||
{access, c2s, [{deny, blocked},
|
||||
{allow, all}]}.
|
||||
@ -523,6 +533,7 @@ C2S connections are listened on port 5222 and 5223 (SSL) and denied for
|
||||
{5223, ejabberd_c2s, [{access, c2s},
|
||||
ssl, {certfile, "/path/to/ssl.pem"}]},
|
||||
{5269, ejabberd_s2s_in, []},
|
||||
{5280, ejabberd_http, [http_poll, web_admin]},
|
||||
{5233, ejabberd_service, [{host, "aim.example.org",
|
||||
[{password, "aimsecret"}]}]},
|
||||
{5234, ejabberd_service, [{hosts, ["icq.example.org", "sms.example.org"],
|
||||
@ -571,7 +582,7 @@ transports log and do XDB by themselves:
|
||||
</PRE>
|
||||
<!--TOC subsubsection Modules-->
|
||||
|
||||
<H4><A NAME="htoc17">3.1.5</A> Modules</H4><!--SEC END -->
|
||||
<H4><A NAME="htoc18">3.1.6</A> Modules</H4><!--SEC END -->
|
||||
|
||||
<A NAME="sec:configmodules"></A>
|
||||
Option <TT>modules</TT> defines the list of modules that will be loaded after
|
||||
@ -602,146 +613,54 @@ Example:
|
||||
</PRE>
|
||||
<!--TOC subsection Online Configuration and Monitoring-->
|
||||
|
||||
<H3><A NAME="htoc18">3.2</A> Online Configuration and Monitoring</H3><!--SEC END -->
|
||||
<H3><A NAME="htoc19">3.2</A> Online Configuration and Monitoring</H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:onlineconfig"></A>
|
||||
To perform online reconfiguration of <TT>ejabberd</TT> you will need to have
|
||||
<TT>mod_configure</TT> loaded (see section <A HREF="#sec:modconfigure">A.2</A>). It is also highly
|
||||
recommended to load <TT>mod_disco</TT> as well (see section <A HREF="#sec:moddisco">A.3</A>),
|
||||
because <TT>mod_configure</TT> is highly integrated with it. Additionally it is
|
||||
recommended to use a disco- and xdata-capable client such as
|
||||
<A HREF="http://tkabber.jabber.ru/">Tkabber</A>
|
||||
(which was developed synchronously with <TT>ejabberd</TT>, its CVS version
|
||||
supports most of <TT>ejabberd</TT> features).<BR>
|
||||
<BR>
|
||||
On disco query <TT>ejabberd</TT> returns following items (see figure <A HREF="#fig:disco">1</A>):
|
||||
<UL><LI>
|
||||
Identity of server.
|
||||
<LI>List of features, including defined namespaces.
|
||||
<LI>List of JIDs from route table.
|
||||
<LI>List of disco-nodes described in following subsections.
|
||||
</UL>
|
||||
To perform online reconfiguration of <TT>ejabberd</TT> you need to enable
|
||||
<TT>ejabberd_http</TT> listener with option <TT>web_admin</TT> (see
|
||||
section <A HREF="#sec:configlistened">3.1.5</A>). After that you can open URL
|
||||
<CODE>http://server:port/admin/</CODE> with you favorite web-browser and enter
|
||||
username and password of <TT>ejabberd</TT> administrator. E. g. with such config:
|
||||
<PRE>
|
||||
...
|
||||
{host, "example.org"}.
|
||||
...
|
||||
{listen,
|
||||
[...
|
||||
{5280, ejabberd_http, [web_admin]},
|
||||
...
|
||||
]
|
||||
}.
|
||||
</PRE>you should enter URL <CODE>http://example.org:5280/admin/</CODE>. After
|
||||
authentification you should see something like in figure <A HREF="#fig:webadmmain">1</A>.
|
||||
<BLOCKQUOTE><DIV ALIGN=center><DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV>
|
||||
|
||||
<IMG SRC="disco.png">
|
||||
<IMG SRC="webadmmain.png">
|
||||
|
||||
|
||||
<BR>
|
||||
<DIV ALIGN=center>Figure 1: Tkabber Discovery window</DIV><BR>
|
||||
<DIV ALIGN=center>Figure 1: Web-administration top page</DIV><BR>
|
||||
|
||||
<A NAME="fig:disco"></A>
|
||||
<A NAME="fig:webadmmain"></A>
|
||||
<DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE>
|
||||
<!--TOC subsubsection Node <TT>config</TT>: Global Configuration-->
|
||||
|
||||
<H4><A NAME="htoc19">3.2.1</A> Node <TT>config</TT>: Global Configuration</H4><!--SEC END -->
|
||||
|
||||
Under this node the following nodes exist:<BR>
|
||||
<BR>
|
||||
<!--TOC paragraph Node <TT>config/hostname</TT>-->
|
||||
|
||||
<H5>Node <TT>config/hostname</TT></H5><!--SEC END -->
|
||||
|
||||
Via <TT>ejabberd:config</TT> queries to this node possible to change host name of
|
||||
this <TT>ejabberd</TT> server. (See figure <A HREF="#fig:hostname">2</A>) (Currently this works
|
||||
correctly only after a restart)
|
||||
<BLOCKQUOTE><DIV ALIGN=center><DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV>
|
||||
|
||||
<IMG SRC="confhostname.png">
|
||||
|
||||
|
||||
<BR>
|
||||
<DIV ALIGN=center>Figure 2: Editing of hostname</DIV><BR>
|
||||
|
||||
<A NAME="fig:hostname"></A>
|
||||
<DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE>
|
||||
<!--TOC paragraph Node <TT>config/acls</TT>-->
|
||||
|
||||
<H5>Node <TT>config/acls</TT></H5><!--SEC END -->
|
||||
|
||||
Via <TT>ejabberd:config</TT> queries to this node it is possible to edit ACLs list.
|
||||
(See figure <A HREF="#fig:acls">3</A>)
|
||||
<BLOCKQUOTE><DIV ALIGN=center><DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV>
|
||||
|
||||
<IMG SRC="confacls.png">
|
||||
|
||||
|
||||
<BR>
|
||||
<DIV ALIGN=center>Figure 3: Editing of ACLs</DIV><BR>
|
||||
|
||||
<A NAME="fig:acls"></A>
|
||||
<DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE>
|
||||
<!--TOC paragraph Node <TT>config/access</TT>-->
|
||||
|
||||
<H5>Node <TT>config/access</TT></H5><!--SEC END -->
|
||||
|
||||
Via <TT>ejabberd:config</TT> queries to this node it is possible to edit access
|
||||
rules.<BR>
|
||||
<BR>
|
||||
<!--TOC paragraph Node <TT>config/remusers</TT>-->
|
||||
|
||||
<H5>Node <TT>config/remusers</TT></H5><!--SEC END -->
|
||||
|
||||
Via <TT>ejabberd:config</TT> queries to this node it is possible to remove users. If
|
||||
removed user is online, then he will be disconnected. Also user-related data
|
||||
(e.g. his roster) is removed (but appropriate module must be loaded).<BR>
|
||||
<BR>
|
||||
<!--TOC subsubsection Node <TT>online users</TT>: List of Online Users-->
|
||||
|
||||
<H4><A NAME="htoc20">3.2.2</A> Node <TT>online users</TT>: List of Online Users</H4><!--SEC END -->
|
||||
|
||||
<!--TOC subsubsection Node <TT>all users</TT>: List of Registered Users-->
|
||||
|
||||
<H4><A NAME="htoc21">3.2.3</A> Node <TT>all users</TT>: List of Registered Users</H4><!--SEC END -->
|
||||
|
||||
<BLOCKQUOTE><DIV ALIGN=center><DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV>
|
||||
|
||||
<IMG SRC="discoallusers.png">
|
||||
|
||||
|
||||
<BR>
|
||||
<DIV ALIGN=center>Figure 4: Discovery all users</DIV><BR>
|
||||
|
||||
<A NAME="fig:discoallusers"></A>
|
||||
<DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE>
|
||||
<!--TOC subsubsection Node <TT>outgoing s2s</TT>: List of Outgoing S2S connections-->
|
||||
|
||||
<H4><A NAME="htoc22">3.2.4</A> Node <TT>outgoing s2s</TT>: List of Outgoing S2S connections</H4><!--SEC END -->
|
||||
|
||||
<!--TOC subsubsection Node <TT>running nodes</TT>: List of Running <TT>ejabberd</TT> Nodes-->
|
||||
|
||||
<H4><A NAME="htoc23">3.2.5</A> Node <TT>running nodes</TT>: List of Running <TT>ejabberd</TT> Nodes</H4><!--SEC END -->
|
||||
|
||||
<BLOCKQUOTE><DIV ALIGN=center><DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV>
|
||||
|
||||
<IMG SRC="discorunnodes.png">
|
||||
|
||||
|
||||
<BR>
|
||||
<DIV ALIGN=center>Figure 5: Discovery running nodes</DIV><BR>
|
||||
|
||||
<A NAME="fig:discorunnodes"></A>
|
||||
<DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE>
|
||||
<!--TOC subsubsection Node <TT>stopped nodes</TT>: List of Stopped Nodes-->
|
||||
|
||||
<H4><A NAME="htoc24">3.2.6</A> Node <TT>stopped nodes</TT>: List of Stopped Nodes</H4><!--SEC END -->
|
||||
|
||||
TBD<BR>
|
||||
Here you can edit access restrictions, manage users, create backup files,
|
||||
manage DB, enable/disable listened ports, and view statistics.<BR>
|
||||
<BR>
|
||||
<!--TOC section Distribution-->
|
||||
|
||||
<H2><A NAME="htoc25">4</A> Distribution</H2><!--SEC END -->
|
||||
<H2><A NAME="htoc20">4</A> Distribution</H2><!--SEC END -->
|
||||
|
||||
<A NAME="sec:distribution"></A>
|
||||
<!--TOC subsection How it works-->
|
||||
|
||||
<H3><A NAME="htoc26">4.1</A> How it works</H3><!--SEC END -->
|
||||
<H3><A NAME="htoc21">4.1</A> How it works</H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:howitworks"></A>
|
||||
A Jabber domain is served by one or more <TT>ejabberd</TT> nodes. These nodes can
|
||||
be run on different machines that are connected via a network. They all must
|
||||
have the ability to connect to port 4369 of all another nodes, and must have
|
||||
the same magic cookie (see Erlang/OTP documentation, in other words the file
|
||||
<TT>~ejabberd/.erlang.cookie</TT> must be the same on all nodes). This is
|
||||
be runned on different machines that are connected via a network. They all
|
||||
must have the ability to connect to port 4369 of all another nodes, and must
|
||||
have the same magic cookie (see Erlang/OTP documentation, in other words the
|
||||
file <TT>~ejabberd/.erlang.cookie</TT> must be the same on all nodes). This is
|
||||
needed because all nodes exchange information about connected users, S2S
|
||||
connections, registered services, etc...<BR>
|
||||
<BR>
|
||||
@ -754,7 +673,7 @@ router;
|
||||
</UL>
|
||||
<!--TOC subsubsection Router-->
|
||||
|
||||
<H4><A NAME="htoc27">4.1.1</A> Router</H4><!--SEC END -->
|
||||
<H4><A NAME="htoc22">4.1.1</A> Router</H4><!--SEC END -->
|
||||
|
||||
This module is the main router of Jabber packets on each node. It routes
|
||||
them based on their destinations domains. It has two tables: local and global
|
||||
@ -766,7 +685,7 @@ manager.<BR>
|
||||
<BR>
|
||||
<!--TOC subsubsection Local Router-->
|
||||
|
||||
<H4><A NAME="htoc28">4.1.2</A> Local Router</H4><!--SEC END -->
|
||||
<H4><A NAME="htoc23">4.1.2</A> Local Router</H4><!--SEC END -->
|
||||
|
||||
This module routes packets which have a destination domain equal to this server
|
||||
name. If destination JID has a non-empty user part, then it routed to the
|
||||
@ -774,7 +693,7 @@ session manager, else it is processed depending on it's content.<BR>
|
||||
<BR>
|
||||
<!--TOC subsubsection Session Manager-->
|
||||
|
||||
<H4><A NAME="htoc29">4.1.3</A> Session Manager</H4><!--SEC END -->
|
||||
<H4><A NAME="htoc24">4.1.3</A> Session Manager</H4><!--SEC END -->
|
||||
|
||||
This module routes packets to local users. It searches for what user resource
|
||||
packet must be sended via presence table. If this resource is connected to
|
||||
@ -783,7 +702,7 @@ the packet is sent to session manager on that node.<BR>
|
||||
<BR>
|
||||
<!--TOC subsubsection S2S Manager-->
|
||||
|
||||
<H4><A NAME="htoc30">4.1.4</A> S2S Manager</H4><!--SEC END -->
|
||||
<H4><A NAME="htoc25">4.1.4</A> S2S Manager</H4><!--SEC END -->
|
||||
|
||||
This module routes packets to other Jabber servers. First, it checks if an
|
||||
open S2S connection from the domain of the packet source to the domain of
|
||||
@ -794,12 +713,12 @@ does not exist, then it is opened and registered.<BR>
|
||||
<BR>
|
||||
<!--TOC section Built-in Modules-->
|
||||
|
||||
<H2><A NAME="htoc31">A</A> Built-in Modules</H2><!--SEC END -->
|
||||
<H2><A NAME="htoc26">A</A> Built-in Modules</H2><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modules"></A>
|
||||
<!--TOC subsection Common Options-->
|
||||
|
||||
<H3><A NAME="htoc32">A.1</A> Common Options</H3><!--SEC END -->
|
||||
<H3><A NAME="htoc27">A.1</A> Common Options</H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modcommonopts"></A>
|
||||
The following options are used by many modules, so they are described in
|
||||
@ -807,7 +726,7 @@ separate section.<BR>
|
||||
<BR>
|
||||
<!--TOC subsubsection Option <TT>iqdisc</TT>-->
|
||||
|
||||
<H4><A NAME="htoc33">A.1.1</A> Option <TT>iqdisc</TT></H4><!--SEC END -->
|
||||
<H4><A NAME="htoc28">A.1.1</A> Option <TT>iqdisc</TT></H4><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modiqdiscoption"></A>
|
||||
Many modules define handlers for processing IQ queries of different namespaces
|
||||
@ -840,7 +759,7 @@ Example:
|
||||
</PRE>
|
||||
<!--TOC subsubsection Option <TT>host</TT>-->
|
||||
|
||||
<H4><A NAME="htoc34">A.1.2</A> Option <TT>host</TT></H4><!--SEC END -->
|
||||
<H4><A NAME="htoc29">A.1.2</A> Option <TT>host</TT></H4><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modhostoption"></A>
|
||||
This option explicitly defines hostname for the module which acts as a service.<BR>
|
||||
@ -856,7 +775,7 @@ Example:
|
||||
</PRE>
|
||||
<!--TOC subsection <TT>mod_configure</TT>-->
|
||||
|
||||
<H3><A NAME="htoc35">A.2</A> <TT>mod_configure</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc30">A.2</A> <TT>mod_configure</TT></H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modconfigure"></A>
|
||||
Options:
|
||||
@ -866,7 +785,7 @@ discipline (see <A HREF="#sec:modiqdiscoption">A.1.1</A>).
|
||||
</DL>
|
||||
<!--TOC subsection <TT>mod_disco</TT>-->
|
||||
|
||||
<H3><A NAME="htoc36">A.3</A> <TT>mod_disco</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc31">A.3</A> <TT>mod_disco</TT></H3><!--SEC END -->
|
||||
|
||||
<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>
|
||||
@ -891,7 +810,7 @@ Example:
|
||||
</PRE>
|
||||
<!--TOC subsection <TT>mod_echo</TT>-->
|
||||
|
||||
<H3><A NAME="htoc37">A.4</A> <TT>mod_echo</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc32">A.4</A> <TT>mod_echo</TT></H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modecho"></A>
|
||||
This module acts as a service and simply returns to sender any Jabber packet. Module may be
|
||||
@ -905,7 +824,7 @@ then prefix <TT>echo.</TT> is added to main <TT>ejabberd</TT> hostname.
|
||||
</DL>
|
||||
<!--TOC subsection <TT>mod_irc</TT>-->
|
||||
|
||||
<H3><A NAME="htoc38">A.5</A> <TT>mod_irc</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc33">A.5</A> <TT>mod_irc</TT></H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modirc"></A>
|
||||
This module implements IRC transport.<BR>
|
||||
@ -918,7 +837,7 @@ then prefix <TT>irc.</TT> is added to main <TT>ejabberd</TT> hostname.
|
||||
</DL>
|
||||
<!--TOC subsection <TT>mod_last</TT>-->
|
||||
|
||||
<H3><A NAME="htoc39">A.6</A> <TT>mod_last</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc34">A.6</A> <TT>mod_last</TT></H3><!--SEC END -->
|
||||
|
||||
<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>
|
||||
@ -930,7 +849,7 @@ discipline (see <A HREF="#sec:modiqdiscoption">A.1.1</A>).
|
||||
</DL>
|
||||
<!--TOC subsection <TT>mod_muc</TT>-->
|
||||
|
||||
<H3><A NAME="htoc40">A.7</A> <TT>mod_muc</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc35">A.7</A> <TT>mod_muc</TT></H3><!--SEC END -->
|
||||
|
||||
<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>
|
||||
@ -965,14 +884,14 @@ Example:
|
||||
</PRE>
|
||||
<!--TOC subsection <TT>mod_offline</TT>-->
|
||||
|
||||
<H3><A NAME="htoc41">A.8</A> <TT>mod_offline</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc36">A.8</A> <TT>mod_offline</TT></H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modoffline"></A>
|
||||
This module implements offline message storage.<BR>
|
||||
<BR>
|
||||
<!--TOC subsection <TT>mod_privacy</TT>-->
|
||||
|
||||
<H3><A NAME="htoc42">A.9</A> <TT>mod_privacy</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc37">A.9</A> <TT>mod_privacy</TT></H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modprivacy"></A>
|
||||
This module implements Privacy Rules as defined in XMPP IM
|
||||
@ -985,7 +904,7 @@ discipline (see <A HREF="#sec:modiqdiscoption">A.1.1</A>).
|
||||
</DL>
|
||||
<!--TOC subsection <TT>mod_private</TT>-->
|
||||
|
||||
<H3><A NAME="htoc43">A.10</A> <TT>mod_private</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc38">A.10</A> <TT>mod_private</TT></H3><!--SEC END -->
|
||||
|
||||
<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>
|
||||
@ -997,7 +916,7 @@ discipline (see <A HREF="#sec:modiqdiscoption">A.1.1</A>).
|
||||
</DL>
|
||||
<!--TOC subsection <TT>mod_pubsub</TT>-->
|
||||
|
||||
<H3><A NAME="htoc44">A.11</A> <TT>mod_pubsub</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc39">A.11</A> <TT>mod_pubsub</TT></H3><!--SEC END -->
|
||||
|
||||
<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>
|
||||
@ -1022,7 +941,7 @@ Example:
|
||||
</PRE>
|
||||
<!--TOC subsection <TT>mod_register</TT>-->
|
||||
|
||||
<H3><A NAME="htoc45">A.12</A> <TT>mod_register</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc40">A.12</A> <TT>mod_register</TT></H3><!--SEC END -->
|
||||
|
||||
<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).
|
||||
@ -1054,7 +973,7 @@ Example:
|
||||
</PRE>
|
||||
<!--TOC subsection <TT>mod_roster</TT>-->
|
||||
|
||||
<H3><A NAME="htoc46">A.13</A> <TT>mod_roster</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc41">A.13</A> <TT>mod_roster</TT></H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modroster"></A>
|
||||
This module implements roster management.<BR>
|
||||
@ -1066,7 +985,7 @@ discipline (see <A HREF="#sec:modiqdiscoption">A.1.1</A>).
|
||||
</DL>
|
||||
<!--TOC subsection <TT>mod_stats</TT>-->
|
||||
|
||||
<H3><A NAME="htoc47">A.14</A> <TT>mod_stats</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc42">A.14</A> <TT>mod_stats</TT></H3><!--SEC END -->
|
||||
|
||||
<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>
|
||||
@ -1080,7 +999,7 @@ TBD about access.<BR>
|
||||
<BR>
|
||||
<!--TOC subsection <TT>mod_time</TT>-->
|
||||
|
||||
<H3><A NAME="htoc48">A.15</A> <TT>mod_time</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc43">A.15</A> <TT>mod_time</TT></H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modtime"></A>
|
||||
This module answers UTC time on <TT>jabber:iq:time</TT> queries.<BR>
|
||||
@ -1092,7 +1011,7 @@ discipline (see <A HREF="#sec:modiqdiscoption">A.1.1</A>).
|
||||
</DL>
|
||||
<!--TOC subsection <TT>mod_vcard</TT>-->
|
||||
|
||||
<H3><A NAME="htoc49">A.16</A> <TT>mod_vcard</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc44">A.16</A> <TT>mod_vcard</TT></H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modvcard"></A>
|
||||
This module implements simple Jabber User Directory (based on user vCards)
|
||||
@ -1105,10 +1024,22 @@ Options:
|
||||
then prefix <TT>vjud.</TT> is added to main <TT>ejabberd</TT> hostname.
|
||||
<DT><B><TT>iqdisc</TT></B><DD> <TT>vcard-temp</TT> IQ queries processing
|
||||
discipline (see <A HREF="#sec:modiqdiscoption">A.1.1</A>).
|
||||
<DT><B><TT>search</TT></B><DD> Specifies wheather search is enabled (value is <TT>true</TT>, default) or
|
||||
disabled (value is <TT>false</TT>) by the service. If <TT>search</TT> is set to <TT>false</TT>,
|
||||
option <TT>host</TT> is ignored and service does not appear in Jabber Discovery items.
|
||||
</DL>
|
||||
Example:
|
||||
<PRE>
|
||||
{modules,
|
||||
[
|
||||
...
|
||||
{mod_vcard, [{search, false}]}
|
||||
...
|
||||
]}.
|
||||
</PRE>
|
||||
<!--TOC subsection <TT>mod_version</TT>-->
|
||||
|
||||
<H3><A NAME="htoc50">A.17</A> <TT>mod_version</TT></H3><!--SEC END -->
|
||||
<H3><A NAME="htoc45">A.17</A> <TT>mod_version</TT></H3><!--SEC END -->
|
||||
|
||||
<A NAME="sec:modversion"></A>
|
||||
This module answers <TT>ejabberd</TT> version on <TT>jabber:iq:version</TT> queries.<BR>
|
||||
@ -1120,12 +1051,11 @@ discipline (see <A HREF="#sec:modiqdiscoption">A.1.1</A>).
|
||||
</DL>
|
||||
<!--TOC section I18n/L10n-->
|
||||
|
||||
<H2><A NAME="htoc51">B</A> I18n/L10n</H2><!--SEC END -->
|
||||
<H2><A NAME="htoc46">B</A> I18n/L10n</H2><!--SEC END -->
|
||||
|
||||
<A NAME="sec:i18nl10n"></A>
|
||||
All built-in modules support <TT>xml:lang</TT> attribute inside IQ queries.
|
||||
E. g. on figure <A HREF="#fig:discorus">6</A> (compare it with figure <A HREF="#fig:disco">1</A>)
|
||||
showed reply on following query:
|
||||
E. g. on figure <A HREF="#fig:discorus">2</A> showed the reply on the following query:
|
||||
<PRE>
|
||||
<iq id='5'
|
||||
to='e.localhost'
|
||||
@ -1140,10 +1070,23 @@ showed reply on following query:
|
||||
|
||||
|
||||
<BR>
|
||||
<DIV ALIGN=center>Figure 6: Discovery result when <TT>xml:lang='ru'</TT></DIV><BR>
|
||||
<DIV ALIGN=center>Figure 2: Discovery result when <TT>xml:lang='ru'</TT></DIV><BR>
|
||||
|
||||
<A NAME="fig:discorus"></A>
|
||||
<DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE>
|
||||
Also web-interface supports <CODE>Accept-Language</CODE> HTTP header (see
|
||||
figure <A HREF="#fig:webadmmainru">3</A>, compare it with figure <A HREF="#fig:webadmmain">1</A>)
|
||||
<BLOCKQUOTE><DIV ALIGN=center><DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV>
|
||||
|
||||
<IMG SRC="webadmmainru.png">
|
||||
|
||||
|
||||
<BR>
|
||||
<DIV ALIGN=center>Figure 3: Web-administration top page with HTTP header
|
||||
``<CODE>Accept-Language: ru</CODE>''</DIV><BR>
|
||||
|
||||
<A NAME="fig:webadmmainru"></A>
|
||||
<DIV ALIGN=center><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE>
|
||||
<!--HTMLFOOT-->
|
||||
<!--ENDHTML-->
|
||||
<!--FOOTER-->
|
||||
|
177
doc/guide.tex
177
doc/guide.tex
@ -111,6 +111,7 @@ The main features of \ejabberd{} are:
|
||||
\item Built-in IRC transport
|
||||
\item Built-in \tjepref{0060}{Publish-Subscribe} service
|
||||
\item Built-in Jabber Users Directory service based on users vCards
|
||||
\item Built-in web-based administration interface
|
||||
\item Built-in \tjepref{0025}{HTTP Polling} service
|
||||
\item SSL support
|
||||
\item Support for LDAP authentification
|
||||
@ -311,13 +312,24 @@ adding new ones.
|
||||
\label{sec:confighostname}
|
||||
|
||||
Option \option{hostname} defines name of \Jabber{} domain that \ejabberd{}
|
||||
serves. E.\,g.\ to use \jid{jabber.org} domain add following line in config:
|
||||
serves. E.\,g.\ to use \jid{jabber.org} domain add the following line in the config:
|
||||
\begin{verbatim}
|
||||
{host, "jabber.org"}.
|
||||
\end{verbatim}
|
||||
|
||||
%This option is mandatory.
|
||||
|
||||
\subsubsection{Default Language}
|
||||
\label{sec:configlanguage}
|
||||
|
||||
Option \option{language} defines default language of \ejabberd{} messages, sent
|
||||
to users. Default value is \term{"en"}. In order to take effect there must be a
|
||||
translation file \term{<language>.msg} in \ejabberd{} \term{msgs} directory.
|
||||
E.\,g.\ to use Russian as default language add the following line in the config:
|
||||
\begin{verbatim}
|
||||
{language, "ru"}.
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\subsubsection{Access Rules}
|
||||
\label{sec:configaccess}
|
||||
@ -505,18 +517,20 @@ For example, the following configuration defines that:
|
||||
\item HTTP connections are listened on port 5280 and administration interface
|
||||
and HTTP Polling support are enabled
|
||||
\item All users except admins have traffic limit 1000\,B/s
|
||||
\item AIM service \jid{aim.example.org} is connected to port 5233 with
|
||||
\item AIM transport \jid{aim.example.org} is connected to port 5233 with
|
||||
password ``\term{aimsecret}''
|
||||
\item JIT services \jid{icq.example.org} and \jid{sms.example.org} are
|
||||
\item JIT transports \jid{icq.example.org} and \jid{sms.example.org} are
|
||||
connected to port 5234 with password ``\term{jitsecret}''
|
||||
\item MSN service \jid{msn.example.org} is connected to port 5235 with
|
||||
\item MSN transport \jid{msn.example.org} is connected to port 5235 with
|
||||
password ``\term{msnsecret}''
|
||||
\item Yahoo! service \jid{yahoo.example.org} is connected to port 5236 with
|
||||
\item Yahoo! transport \jid{yahoo.example.org} is connected to port 5236 with
|
||||
password ``\term{yahoosecret}''
|
||||
\item ILE service \jid{ile.example.org} is connected to port 5237 with
|
||||
\item Gadu-Gadu transport \jid{gg.example.org} is connected to port 5237 with
|
||||
password ``\term{ggsecret}''
|
||||
\item ILE service \jid{ile.example.org} is connected to port 5238 with
|
||||
password ``\term{ilesecret}''
|
||||
\end{itemize}
|
||||
\begin{verbatim}
|
||||
\begin{verbatim}
|
||||
{acl, blocked, {user, "bad"}}.
|
||||
{access, c2s, [{deny, blocked},
|
||||
{allow, all}]}.
|
||||
@ -612,102 +626,34 @@ Example:
|
||||
\subsection{Online Configuration and Monitoring}
|
||||
\label{sec:onlineconfig}
|
||||
|
||||
To perform online reconfiguration of \ejabberd{} you will need to have
|
||||
\modconfigure{} loaded (see section~\ref{sec:modconfigure}). It is also highly
|
||||
recommended to load \moddisco{} as well (see section~\ref{sec:moddisco}),
|
||||
because \modconfigure{} is highly integrated with it. Additionally it is
|
||||
recommended to use a disco- and xdata-capable client such as
|
||||
\footahref{http://tkabber.jabber.ru/}{Tkabber}
|
||||
(which was developed synchronously with \ejabberd{}, its CVS version
|
||||
supports most of \ejabberd{} features).
|
||||
|
||||
|
||||
On disco query \ejabberd{} returns following items (see figure~\ref{fig:disco}):
|
||||
\begin{itemize}
|
||||
\item Identity of server.
|
||||
\item List of features, including defined namespaces.
|
||||
\item List of JIDs from route table.
|
||||
\item List of disco-nodes described in following subsections.
|
||||
\end{itemize}
|
||||
To perform online reconfiguration of \ejabberd{} you need to enable
|
||||
\term{ejabberd\_http} listener with option \term{web\_admin} (see
|
||||
section~\ref{sec:configlistened}). After that you can open URL
|
||||
\verb|http://server:port/admin/| with you favorite web-browser and enter
|
||||
username and password of \ejabberd{} administrator. E.\,g. with such config:
|
||||
\begin{verbatim}
|
||||
...
|
||||
{host, "example.org"}.
|
||||
...
|
||||
{listen,
|
||||
[...
|
||||
{5280, ejabberd_http, [web_admin]},
|
||||
...
|
||||
]
|
||||
}.
|
||||
\end{verbatim}
|
||||
you should enter URL \verb|http://example.org:5280/admin/|. After
|
||||
authentification you should see something like in figure~\ref{fig:webadmmain}.
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\insimg{disco.png}
|
||||
\caption{Tkabber Discovery window}
|
||||
\label{fig:disco}
|
||||
\end{figure}
|
||||
|
||||
\subsubsection{Node \node{config}: Global Configuration}
|
||||
|
||||
Under this node the following nodes exist:
|
||||
|
||||
\paragraph{Node \node{config/hostname}}
|
||||
|
||||
Via \ns{ejabberd:config} queries to this node possible to change host name of
|
||||
this \ejabberd{} server. (See figure~\ref{fig:hostname}) (Currently this works
|
||||
correctly only after a restart)
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\insimg{confhostname.png}
|
||||
\caption{Editing of hostname}
|
||||
\label{fig:hostname}
|
||||
\end{figure}
|
||||
|
||||
\paragraph{Node \node{config/acls}}
|
||||
|
||||
Via \ns{ejabberd:config} queries to this node it is possible to edit ACLs list.
|
||||
(See figure~\ref{fig:acls})
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\insimg{confacls.png}
|
||||
\caption{Editing of ACLs}
|
||||
\label{fig:acls}
|
||||
\insimg{webadmmain.png}
|
||||
\caption{Web-administration top page}
|
||||
\label{fig:webadmmain}
|
||||
\end{figure}
|
||||
Here you can edit access restrictions, manage users, create backup files,
|
||||
manage DB, enable/disable listened ports, and view statistics.
|
||||
|
||||
|
||||
\paragraph{Node \node{config/access}}
|
||||
|
||||
Via \ns{ejabberd:config} queries to this node it is possible to edit access
|
||||
rules.
|
||||
|
||||
|
||||
\paragraph{Node \node{config/remusers}}
|
||||
|
||||
Via \ns{ejabberd:config} queries to this node it is possible to remove users. If
|
||||
removed user is online, then he will be disconnected. Also user-related data
|
||||
(e.g. his roster) is removed (but appropriate module must be loaded).
|
||||
|
||||
\subsubsection{Node \node{online users}: List of Online Users}
|
||||
|
||||
\subsubsection{Node \node{all users}: List of Registered Users}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\insimg{discoallusers.png}
|
||||
\caption{Discovery all users}
|
||||
\label{fig:discoallusers}
|
||||
\end{figure}
|
||||
|
||||
|
||||
\subsubsection{Node \node{outgoing s2s}: List of Outgoing S2S connections}
|
||||
|
||||
\subsubsection{Node \node{running nodes}: List of Running \ejabberd{} Nodes}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\insimg{discorunnodes.png}
|
||||
\caption{Discovery running nodes}
|
||||
\label{fig:discorunnodes}
|
||||
\end{figure}
|
||||
|
||||
\subsubsection{Node \node{stopped nodes}: List of Stopped Nodes}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TBD
|
||||
|
||||
\section{Distribution}
|
||||
\label{sec:distribution}
|
||||
@ -717,10 +663,10 @@ TBD
|
||||
\label{sec:howitworks}
|
||||
|
||||
A \Jabber{} domain is served by one or more \ejabberd{} nodes. These nodes can
|
||||
be run on different machines that are connected via a network. They all must
|
||||
have the ability to connect to port 4369 of all another nodes, and must have
|
||||
the same magic cookie (see Erlang/OTP documentation, in other words the file
|
||||
\term{\~{}ejabberd/.erlang.cookie} must be the same on all nodes). This is
|
||||
be runned on different machines that are connected via a network. They all
|
||||
must have the ability to connect to port 4369 of all another nodes, and must
|
||||
have the same magic cookie (see Erlang/OTP documentation, in other words the
|
||||
file \term{\~{}ejabberd/.erlang.cookie} must be the same on all nodes). This is
|
||||
needed because all nodes exchange information about connected users, S2S
|
||||
connections, registered services, etc\ldots
|
||||
|
||||
@ -1061,8 +1007,21 @@ Options:
|
||||
\begin{description}
|
||||
\hostitem{vjud}
|
||||
\iqdiscitem{\ns{vcard-temp}}
|
||||
\titem{search} Specifies wheather search is enabled (value is \term{true}, default) or
|
||||
disabled (value is \term{false}) by the service. If \term{search} is set to \term{false},
|
||||
option \term{host} is ignored and service does not appear in Jabber Discovery items.
|
||||
\end{description}
|
||||
|
||||
Example:
|
||||
\begin{verbatim}
|
||||
{modules,
|
||||
[
|
||||
...
|
||||
{mod_vcard, [{search, false}]}
|
||||
...
|
||||
]}.
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\subsection{\modversion{}}
|
||||
\label{sec:modversion}
|
||||
@ -1079,8 +1038,7 @@ Options:
|
||||
\label{sec:i18nl10n}
|
||||
|
||||
All built-in modules support \texttt{xml:lang} attribute inside IQ queries.
|
||||
E.\,g.\ on figure~\ref{fig:discorus} (compare it with figure~\ref{fig:disco})
|
||||
showed reply on following query:
|
||||
E.\,g.\ on figure~\ref{fig:discorus} showed the reply on the following query:
|
||||
\begin{verbatim}
|
||||
<iq id='5'
|
||||
to='e.localhost'
|
||||
@ -1097,5 +1055,16 @@ showed reply on following query:
|
||||
\label{fig:discorus}
|
||||
\end{figure}
|
||||
|
||||
Also web-interface supports \verb|Accept-Language| HTTP header (see
|
||||
figure~\ref{fig:webadmmainru}, compare it with figure~\ref{fig:webadmmain})
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\insimg{webadmmainru.png}
|
||||
\caption{Web-administration top page with HTTP header
|
||||
``\verb|Accept-Language: ru|''}
|
||||
\label{fig:webadmmainru}
|
||||
\end{figure}
|
||||
|
||||
|
||||
\end{document}
|
||||
|
BIN
doc/webadmmain.png
Normal file
BIN
doc/webadmmain.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
BIN
doc/webadmmainru.png
Normal file
BIN
doc/webadmmainru.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@ -86,6 +86,9 @@
|
||||
{host, "localhost"}.
|
||||
|
||||
|
||||
% Default language for server messages
|
||||
{language, "en"}.
|
||||
|
||||
% Listened ports:
|
||||
{listen,
|
||||
[{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper}]},
|
||||
|
@ -31,6 +31,7 @@
|
||||
-define(MYNAME, ejabberd_config:get_global_option(host)).
|
||||
-define(S2STIMEOUT, 600000).
|
||||
%-define(S2STIMEOUT, 6000).
|
||||
-define(MYLANG, ejabberd_config:get_global_option(language)).
|
||||
|
||||
-define(MSGS_DIR, "msgs").
|
||||
-define(CONFIG_PATH, "ejabberd.cfg").
|
||||
|
@ -70,7 +70,7 @@
|
||||
"<?xml version='1.0'?>"
|
||||
"<stream:stream xmlns='jabber:client' "
|
||||
"xmlns:stream='http://etherx.jabber.org/streams' "
|
||||
"id='~s' from='~s'~s>"
|
||||
"id='~s' from='~s'~s~s>"
|
||||
).
|
||||
|
||||
-define(STREAM_TRAILER, "</stream:stream>").
|
||||
@ -131,6 +131,12 @@ init([{SockMod, Socket}, Opts]) ->
|
||||
%%----------------------------------------------------------------------
|
||||
|
||||
wait_for_stream({xmlstreamstart, _Name, Attrs}, StateData) ->
|
||||
DefaultLang = case ?MYLANG of
|
||||
undefined ->
|
||||
" xml:lang='en'";
|
||||
DL ->
|
||||
" xml:lang='" ++ DL ++ "'"
|
||||
end,
|
||||
case xml:get_attr_s("xmlns:stream", Attrs) of
|
||||
?NS_STREAM ->
|
||||
Lang = xml:get_attr_s("xml:lang", Attrs),
|
||||
@ -139,7 +145,8 @@ wait_for_stream({xmlstreamstart, _Name, Attrs}, StateData) ->
|
||||
Header = io_lib:format(?STREAM_HEADER,
|
||||
[StateData#state.streamid,
|
||||
?MYNAME,
|
||||
" version='1.0'"]),
|
||||
" version='1.0'",
|
||||
DefaultLang]),
|
||||
send_text(StateData, Header),
|
||||
case StateData#state.authentificated of
|
||||
false ->
|
||||
@ -181,14 +188,14 @@ wait_for_stream({xmlstreamstart, _Name, Attrs}, StateData) ->
|
||||
_ ->
|
||||
Header = io_lib:format(
|
||||
?STREAM_HEADER,
|
||||
[StateData#state.streamid, ?MYNAME, ""]),
|
||||
[StateData#state.streamid, ?MYNAME, "", DefaultLang]),
|
||||
send_text(StateData, Header),
|
||||
{next_state, wait_for_auth, StateData#state{lang = Lang}}
|
||||
end;
|
||||
_ ->
|
||||
Header = io_lib:format(
|
||||
?STREAM_HEADER,
|
||||
[StateData#state.streamid, ?MYNAME, ""]),
|
||||
[StateData#state.streamid, ?MYNAME, "", ""]),
|
||||
send_text(StateData,
|
||||
Header ++ ?INVALID_NS_ERR ++ ?STREAM_TRAILER),
|
||||
{stop, normal, StateData}
|
||||
@ -196,7 +203,7 @@ wait_for_stream({xmlstreamstart, _Name, Attrs}, StateData) ->
|
||||
|
||||
wait_for_stream({xmlstreamerror, _}, StateData) ->
|
||||
Header = io_lib:format(?STREAM_HEADER,
|
||||
["none", ?MYNAME, " version='1.0'"]),
|
||||
["none", ?MYNAME, " version='1.0'", ""]),
|
||||
send_text(StateData,
|
||||
Header ++ ?INVALID_XML_ERR ++ ?STREAM_TRAILER),
|
||||
{stop, normal, StateData};
|
||||
|
@ -78,6 +78,8 @@ add_option(Opt, Val, State) ->
|
||||
Table = case Opt of
|
||||
host ->
|
||||
config;
|
||||
language ->
|
||||
config;
|
||||
_ ->
|
||||
local_config
|
||||
end,
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
-export([register_iq_handler/3,
|
||||
register_iq_handler/4,
|
||||
unregister_iq_handler/1
|
||||
unregister_iq_handler/1,
|
||||
refresh_iq_handlers/0
|
||||
]).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
@ -47,11 +48,11 @@ loop(State) ->
|
||||
loop(State);
|
||||
{register_iq_handler, XMLNS, Module, Function} ->
|
||||
ets:insert(State#state.iqtable, {XMLNS, Module, Function}),
|
||||
mod_disco:register_feature(XMLNS),
|
||||
catch mod_disco:register_feature(XMLNS),
|
||||
loop(State);
|
||||
{register_iq_handler, XMLNS, Module, Function, Opts} ->
|
||||
ets:insert(State#state.iqtable, {XMLNS, Module, Function, Opts}),
|
||||
mod_disco:register_feature(XMLNS),
|
||||
catch mod_disco:register_feature(XMLNS),
|
||||
loop(State);
|
||||
{unregister_iq_handler, XMLNS} ->
|
||||
case ets:lookup(State#state.iqtable, XMLNS) of
|
||||
@ -61,7 +62,20 @@ loop(State) ->
|
||||
ok
|
||||
end,
|
||||
ets:delete(State#state.iqtable, XMLNS),
|
||||
mod_disco:unregister_feature(XMLNS),
|
||||
catch mod_disco:unregister_feature(XMLNS),
|
||||
loop(State);
|
||||
refresh_iq_handlers ->
|
||||
lists:map(
|
||||
fun(T) ->
|
||||
case T of
|
||||
{XMLNS, _Module, _Function, _Opts} ->
|
||||
catch mod_disco:register_feature(XMLNS);
|
||||
{XMLNS, _Module, _Function} ->
|
||||
catch mod_disco:register_feature(XMLNS);
|
||||
_ ->
|
||||
ok
|
||||
end
|
||||
end, ets:tab2list(State#state.iqtable)),
|
||||
loop(State);
|
||||
_ ->
|
||||
loop(State)
|
||||
@ -142,6 +156,8 @@ register_iq_handler(XMLNS, Module, Fun, Opts) ->
|
||||
unregister_iq_handler(XMLNS) ->
|
||||
ejabberd_local ! {unregister_iq_handler, XMLNS}.
|
||||
|
||||
refresh_iq_handlers() ->
|
||||
ejabberd_local ! refresh_iq_handlers.
|
||||
|
||||
announce_online(From, To, Packet) ->
|
||||
case acl:match_rule(announce, From) of
|
||||
|
@ -80,7 +80,6 @@ loop() ->
|
||||
ok
|
||||
end,
|
||||
ets:delete(sm_iqtable, XMLNS),
|
||||
mod_disco:unregister_feature(XMLNS),
|
||||
loop();
|
||||
_ ->
|
||||
loop()
|
||||
|
@ -105,38 +105,39 @@ xdb_data({xmlstreamelement, El}, StateData) ->
|
||||
ejabberd_auth:set_password(StateData#state.user, Password),
|
||||
StateData;
|
||||
?NS_ROSTER ->
|
||||
%mod_roster:process_iq(From,
|
||||
% {"", ?MYNAME, ""},
|
||||
% #iq{type = set, xmlns = ?NS_ROSTER, sub_el = El}),
|
||||
mod_roster:set_items(StateData#state.user, El),
|
||||
%catch mod_roster:process_iq(
|
||||
% From,
|
||||
% {"", ?MYNAME, ""},
|
||||
% #iq{type = set, xmlns = ?NS_ROSTER, sub_el = El}),
|
||||
catch mod_roster:set_items(StateData#state.user, El),
|
||||
StateData;
|
||||
?NS_VCARD ->
|
||||
mod_vcard:process_sm_iq(
|
||||
From,
|
||||
jlib:make_jid("", ?MYNAME, ""),
|
||||
#iq{type = set, xmlns = ?NS_VCARD, sub_el = El}),
|
||||
catch mod_vcard:process_sm_iq(
|
||||
From,
|
||||
jlib:make_jid("", ?MYNAME, ""),
|
||||
#iq{type = set, xmlns = ?NS_VCARD, sub_el = El}),
|
||||
StateData;
|
||||
"jabber:x:offline" ->
|
||||
process_offline(From, El),
|
||||
StateData;
|
||||
%?NS_REGISTER ->
|
||||
% mod_register:process_iq(
|
||||
% {"", "", ""}, {"", ?MYNAME, ""},
|
||||
% #iq{type =set, xmlns = ?NS_REGISTER, xub_el = El}),
|
||||
% catch mod_register:process_iq(
|
||||
% {"", "", ""}, {"", ?MYNAME, ""},
|
||||
% #iq{type =set, xmlns = ?NS_REGISTER, xub_el = El}),
|
||||
% User = xml:get_path_s(El, [{elem, "username"}, cdata]),
|
||||
% io:format("user ~s~n", [User]),
|
||||
% StateData;
|
||||
XMLNS ->
|
||||
case xml:get_attr_s("j_private_flag", Attrs) of
|
||||
"1" ->
|
||||
mod_private:process_local_iq(
|
||||
From,
|
||||
jlib:make_jid("", ?MYNAME, ""),
|
||||
#iq{type = set, xmlns = ?NS_PRIVATE,
|
||||
sub_el = {xmlelement, "query", [],
|
||||
[jlib:remove_attr(
|
||||
"j_private_flag",
|
||||
jlib:remove_attr("xdbns", El))]}}),
|
||||
catch mod_private:process_local_iq(
|
||||
From,
|
||||
jlib:make_jid("", ?MYNAME, ""),
|
||||
#iq{type = set, xmlns = ?NS_PRIVATE,
|
||||
sub_el = {xmlelement, "query", [],
|
||||
[jlib:remove_attr(
|
||||
"j_private_flag",
|
||||
jlib:remove_attr("xdbns", El))]}}),
|
||||
StateData;
|
||||
_ ->
|
||||
io:format("jd2ejd: Unknown namespace \"~s\"~n",
|
||||
@ -232,7 +233,7 @@ process_offline(To, {xmlelement, _, _, Els}) ->
|
||||
error ->
|
||||
ok;
|
||||
_ ->
|
||||
mod_offline:store_packet(From, To, El)
|
||||
catch mod_offline:store_packet(From, To, El)
|
||||
end
|
||||
end, Els).
|
||||
|
||||
|
@ -28,8 +28,7 @@ start(Opts) ->
|
||||
ok.
|
||||
|
||||
stop() ->
|
||||
gen_iq_handler:remove_iq_handler(ejabberd_local, ?NS_IQDATA),
|
||||
gen_iq_handler:remove_iq_handler(ejabberd_sm, ?NS_IQDATA).
|
||||
gen_iq_handler:remove_iq_handler(ejabberd_local, ?NS_ECONFIGURE).
|
||||
|
||||
|
||||
process_local_iq(From, _To, #iq{type = Type, lang = Lang, sub_el = SubEl} = IQ) ->
|
||||
|
@ -33,6 +33,8 @@
|
||||
{"node", SNode}], []}]}).
|
||||
|
||||
start(Opts) ->
|
||||
ejabberd_local:refresh_iq_handlers(),
|
||||
|
||||
IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
|
||||
gen_iq_handler:add_iq_handler(ejabberd_local, ?NS_DISCO_ITEMS,
|
||||
?MODULE, process_local_iq_items, IQDisc),
|
||||
@ -42,9 +44,12 @@ start(Opts) ->
|
||||
?MODULE, process_sm_iq_items, IQDisc),
|
||||
gen_iq_handler:add_iq_handler(ejabberd_sm, ?NS_DISCO_INFO,
|
||||
?MODULE, process_sm_iq_info, IQDisc),
|
||||
|
||||
catch ets:new(disco_features, [named_table, ordered_set, public]),
|
||||
register_feature("iq") |