diff --git a/ChangeLog b/ChangeLog index 714e71e36..ac18ca157 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-10-06 Badlop + + * doc/guide.html: Regenerated + 2008-10-06 Jerome Sautret * src/ejabberd_rdbms.erl: fix SQL database reconnection diff --git a/doc/guide.html b/doc/guide.html index 648edb5f9..320d0db62 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -272,8 +272,8 @@ Support for virtual hosting.

Chapter 2  Installing ejabberd

2.1  Installing ejabberd with Binary Installer

Probably the easiest way to install an ejabberd instant messaging server -is using the binary installer published by ProcessOne. -The binary installers of released ejabberd versions +is using the binary installer published by ProcessOne. +The binary installers of released ejabberd versions are available in the ProcessOne ejabberd downloads page: http://www.process-one.net/en/ejabberd/downloads

The installer will deploy and configure a full featured ejabberd server and does not require any extra dependencies.

In *nix systems, remember to set executable the binary installer before starting it. For example: @@ -282,13 +282,13 @@ server and does not require any extra dependencies.

In *nix systems, remem

ejabberd can be started manually at any time, or automatically by the operating system at system boot time.

To start and stop ejabberd manually, use the desktop shortcuts created by the installer. -If the machine doesn’t have a graphical system, use the scripts ’start’ +If the machine doesn’t have a graphical system, use the scripts ’start’ and ’stop’ in the ’bin’ directory where ejabberd is installed.

The Windows installer also adds ejabberd as a system service, and a shortcut to a debug console for experienced administrators. -If you want ejabberd to be started automatically at boot time, +If you want ejabberd to be started automatically at boot time, go to the Windows service settings and set ejabberd to be automatically started. -Note that the Windows service is a feature still in development, -and for example it doesn’t read the file ejabberdctl.cfg.

On a *nix system, if you want ejabberd to be started as daemon at boot time, +Note that the Windows service is a feature still in development, +and for example it doesn’t read the file ejabberdctl.cfg.

On a *nix system, if you want ejabberd to be started as daemon at boot time, copy ejabberd.init from the ’bin’ directory to something like /etc/init.d/ejabberd (depending on your distribution) and call /etc/inid.d/ejabberd start to start it.

If ejabberd doesn’t start correctly in Windows, try to start it using the shortcut in desktop or start menu. @@ -305,9 +305,9 @@ This way you see the error message provided by Erlang and can identify what is exactly the problem.

The ejabberdctl administration script is included in the bin directory. Please refer to the section 4.1 for details about ejabberdctl, and configurable options to fine tune the Erlang runtime system.

-

2.2  Installing ejabberd with Operating System specific packages

Some Operating Systems provide a specific ejabberd package adapted to +

2.2  Installing ejabberd with Operating System specific packages

Some Operating Systems provide a specific ejabberd package adapted to the system architecture and libraries. -It usually also checks dependencies +It usually also checks dependencies and performs basic configuration tasks like creating the initial administrator account. Some examples are Debian and Gentoo. Consult the resources provided by your Operating System for more information.

Usually those packages create a script like /etc/init.d/ejabberd @@ -317,12 +317,12 @@ to start and stop ejabberd as a service at boot time.

2.4  Installing ejabberd from Source Code

The canonical form for distribution of ejabberd stable releases is the source code package. -Compiling ejabberd from source code is quite easy in *nix systems, +Compiling ejabberd from source code is quite easy in *nix systems, as long as your system have all the dependencies.

2.4.1  Requirements

To compile ejabberd on a ‘Unix-like’ operating system, you need: @@ -350,10 +350,10 @@ To get the full list run the command:

./configure --help
 

Some options that you may be interested in modifying:

- --prefix=/
+ --prefix=/
Specify the path prefix where the files will be copied when running the make install command.

--enable-user[=USER]
- Allow this normal system user to execute the ejabberdctl script + Allow this normal system user to execute the ejabberdctl script (see section 4.1), read the configuration files, read and write in the spool directory, @@ -361,14 +361,14 @@ To get the full list run the command: The account user and group must exist in the machine before running make install. This account doesn’t need an explicit HOME directory, because - /var/lib/ejabberd/ will be used by default.

--enable-pam
+ /var/lib/ejabberd/ will be used by default.

--enable-pam
Enable the PAM authentication method (see section 3.1.4).

--enable-odbc or --enable-mssql
Required if you want to use an external database. - See section 3.2 for more information.

--enable-full-xml
+ See section 3.2 for more information.

--enable-full-xml
Enable the use of XML based optimisations. - It will for example use CDATA to escape characters in the XMPP stream. + It will for example use CDATA to escape characters in the XMPP stream. Use this option only if you are sure your Jabber clients include a fully compliant XML parser.

--disable-transient-supervisors
- Disable the use of Erlang/OTP supervision for transient processes. + Disable the use of Erlang/OTP supervision for transient processes.

2.4.4  Install

To install ejabberd in the destination directories, run the command: @@ -432,8 +432,8 @@ and configurable options to fine tune the Erlang runtime system.

You need to have GNU install, but it isn’t included in Solaris. It can be easily installed if your Solaris system -is set up for blastwave.org -package repository. +is set up for blastwave.org +package repository. Make sure /opt/csw/bin is in your PATH and run:

pkg-get -i fileutils
 

If that program is called ginstall, @@ -471,8 +471,8 @@ directory, you can add the directories C:\sdk\GnuWin32\bin to the PATH environment variable.

  • Install OpenSSL in C:\sdk\OpenSSL and add C:\sdk\OpenSSL\lib\VC to your path or copy the binaries to your system directory. -
  • Install ZLib in C:\sdk\gnuWin32. Copy -C:\sdk\GnuWin32\bin\zlib1.dll to your system directory. If you change your path it should already be set after libiconv install. +
  • Install ZLib in C:\sdk\gnuWin32. Copy +C:\sdk\GnuWin32\bin\zlib1.dll to your system directory. If you change your path it should already be set after libiconv install.
  • Make sure the you can access Erlang binaries from your path. For example: set PATH=%PATH%;"C:\sdk\erl5.5.5\bin"
  • Depending on how you end up actually installing the library you might need to check and tweak the paths in the file configure.erl.
  • While in the directory ejabberd\src run: @@ -484,7 +484,7 @@ nmake -f Makefile.win32

    2.5  Create a Jabber Account for Administration

    You need a Jabber account and grant him administrative privileges to enter the ejabberd Web Admin:

    1. -Register a Jabber account on your ejabberd server, for example admin1@example.org. +Register a Jabber account on your ejabberd server, for example admin1@example.org. There are two ways to register a Jabber account:
      1. Using ejabberdctl (see section 4.1): @@ -504,7 +504,7 @@ suffix, is because ejabberd’s virtual hosting support.

      2.6  Upgrading ejabberd

      To upgrade an ejabberd installation to a new version, simply uninstall the old version, and then install the new one. -Of course, it is important that the configuration file +Of course, it is important that the configuration file and Mnesia database spool directory are not removed.

      ejabberd automatically updates the Mnesia table definitions at startup when needed. If you also use an external database for storage of some modules, check if the release notes of the new ejabberd version @@ -514,7 +514,7 @@ indicates you need to also update those tables.

      3.1  Basic Configuration

      The configuration file will be loaded the first time you start ejabberd. The content from this file will be parsed and stored in the internal ejabberd database. Subsequently the configuration will be loaded from the database and any commands in the -configuration file are appended to the entries in the database.

      Note that ejabberd never edits the configuration file. +configuration file are appended to the entries in the database.

      Note that ejabberd never edits the configuration file. So, the configuration changes done using the Web Admin are stored in the database, but are not reflected in the configuration file. If you want those changes to be use after ejabberd restart, you can either @@ -625,7 +625,7 @@ Port number.

    2. The available modules, their purpose and the options allowed by each one are:

      -ejabberd_c2s
      +ejabberd_c2s
      Handles c2s connections.
      Options: access, certfile, inet6, ip, max_stanza_size, shaper, @@ -635,7 +635,7 @@ Handles c2s connections.
      Handles incoming s2s connections.
      Options: inet6, ip, max_stanza_size
      ejabberd_service
      -Interacts with an external component +Interacts with an external component (as defined in the Jabber Component Protocol (XEP-0114).
      Options: access, hosts, inet6, ip, shaper, service_check_from @@ -670,7 +670,7 @@ do not allow outgoing sockets on port 5222.

      Remember that you must also instal http://server:port/http-bind/. Be aware that support for HTTP Bind is also needed in the Jabber client. Remark also that HTTP Bind can be interesting to host a web-based Jabber client such as -JWChat +JWChat (check the tutorials to install JWChat with ejabberd and an embedded local web server or Apache). @@ -684,7 +684,7 @@ interesting to host a web-based Jabber client such as JWChat.

      inet6
      Set up the socket for IPv6 instead of IPv4. Note: this option is not required for S2S outgoing connections, -because when ejabberd attempts to establish a S2S outgoing connection +because when ejabberd attempts to establish a S2S outgoing connection it first tries IPv4, and if that fails it attempts with IPv6.
      {ip, IPAddress}
      This option specifies which network interface to listen for. For example {ip, {192, 168, 1, 1}}. @@ -716,7 +716,7 @@ You should also set the certfile option. You can define a certificate file for a specific domain using the global option domain_certfile.
      starttls_required
      This option specifies that STARTTLS encryption is required on connections to the port. -No unencrypted connections will be allowed. +No unencrypted connections will be allowed. You should also set the certfile option. You can define a certificate file for a specific domain using the global option domain_certfile.
      tls
      This option specifies that traffic on @@ -747,7 +747,7 @@ The default policy for incoming and outgoing s2s connections to other Jabber ser The default value is allow.
      {{s2s_host, Host}, allow|deny}
      Defines if incoming and outgoing s2s connections with a specific remote host are allowed or denied. -This allows to restrict ejabberd to only establish s2s connections +This allows to restrict ejabberd to only establish s2s connections with a small list of trusted servers, or to block some specific servers.
      {s2s_max_retry_delay, Seconds}
      The maximum allowed delay for retry to connect after a failed connection attempt. @@ -756,7 +756,7 @@ Specified in seconds. The default value is 300 seconds (5 minutes).

      • There are three domains. The default certificate file is server.pem. However, the c2s and s2s connections to the domain example.com use the file example_com.pem. -
      • Port 5222 listens for c2s connections with STARTTLS, +
      • Port 5222 listens for c2s connections with STARTTLS, and also allows plain connections for old clients.
      • Port 5223 listens for c2s connections with the old SSL.
      • Port 5269 listens for s2s connections with STARTTLS. @@ -767,7 +767,7 @@ section 4.2. {listen, [ {5222, ejabberd_c2s, [ - {access, c2s}, + {access, c2s}, {shaper, c2s_shaper}, starttls, {certfile, "/etc/ejabberd/server.pem"}, {max_stanza_size, 65536} @@ -805,7 +805,7 @@ only two servers can connect: "jabber.example.org" and "example.com".
      • Port 5280 is serving the Web Admin and the HTTP Polling service. Note that it is also possible to serve them on different ports. The second example in section 4.2 shows how exactly this can be done. -
      • All users except for the administrators have a traffic of limit +
      • All users except for the administrators have a traffic of limit 1,000 Bytes/second
      • The AIM transport @@ -1123,7 +1123,7 @@ following syntax:

        {maxrate, <rate>}
         

        where <rate> stands for the maximum allowed incoming rate in bytes per second. -When a connection exceeds this limit, ejabberd stops reading from the socket +When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is again below the allowed maximum.

        Examples:

        • To define a shaper named ‘normal’ with traffic speed limited to @@ -1167,7 +1167,7 @@ The default value is: all If such an option is present, the option will not be accepted. The file is in a subdirectory from where the main configuration file is.

          {include_config_file, "./example.org/additional_not_listen.cfg", [{disallow, [listen]}]}.
          -

          In this example, ejabberd.cfg defines some ACL and Access rules, +

          In this example, ejabberd.cfg defines some ACL and Access rules, and later includes another file with additional rules:

          {acl, admin, {user, "admin", "localhost"}}.
           {access, announce, [{allow, admin}]}.
          @@ -1257,11 +1257,14 @@ you. This file contains the ejabberd schema for MySQL. At the end of th
           you can find information to update your database schema.

          By default ejabberd opens 10 connections to the database for each virtual host. Use this option to modify the value:

          {odbc_pool_size, 10}.
          -

          You can configure an interval to make a dummy SQL request -to keep alive the connections to the database. -The default value is ’undefined’, so no keepalive requests are made. +

          You can configure an interval to make a dummy SQL request +to keep alive the connections to the database. +The default value is ’undefined’, so no keepalive requests are made. Specify in seconds: for example 28800 means 8 hours.

          {odbc_keepalive_interval, undefined}.
          +

          If the connection to the database fails, ejabberd waits 30 seconds before retrying. +You can modify this interval with this option: +

          {odbc_start_interval, 30}.
           

          Driver Compilation

          You can skip this step if you installed ejabberd using a binary installer or @@ -1314,9 +1317,9 @@ you. This file contains the ejabberd schema for Microsoft SQL Server. A of the file you can find information to update your database schema.

          By default ejabberd opens 10 connections to the database for each virtual host. Use this option to modify the value:

          {odbc_pool_size, 10}.
          -

          You can configure an interval to make a dummy SQL request -to keep alive the connections to the database. -The default value is ’undefined’, so no keepalive requests are made. +

          You can configure an interval to make a dummy SQL request +to keep alive the connections to the database. +The default value is ’undefined’, so no keepalive requests are made. Specify in seconds: for example 28800 means 8 hours.

          {odbc_keepalive_interval, undefined}.
           

          @@ -1349,9 +1352,9 @@ This file contains the ejabberd schema for PostgreSQL. At the end of th you can find information to update your database schema.

          By default ejabberd opens 10 connections to the database for each virtual host. Use this option to modify the value:

          {odbc_pool_size, 10}.
          -

          You can configure an interval to make a dummy SQL request -to keep alive the connections to the database. -The default value is ’undefined’, so no keepalive requests are made. +

          You can configure an interval to make a dummy SQL request +to keep alive the connections to the database. +The default value is ’undefined’, so no keepalive requests are made. Specify in seconds: for example 28800 means 8 hours.

          {odbc_keepalive_interval, undefined}.
           

          @@ -1360,7 +1363,7 @@ Specify in seconds: for example 28800 means 8 hours. if the binary packages of ejabberd you are using include support for PostgreSQL.

          1. First, install the Erlang pgsql library from -ejabberd-modules SVN repository. +ejabberd-modules SVN repository. Make sure the compiled files are in your Erlang path; you can put them for example in the same directory as your ejabberd .beam files. @@ -1406,9 +1409,9 @@ contains information about ejabberd’s configuration which is dup this section.

            By default ejabberd opens 10 connections to the database for each virtual host. Use this option to modify the value:

            {odbc_pool_size, 10}.
            -

            You can configure an interval to make a dummy SQL request -to keep alive the connections to the database. -The default value is ’undefined’, so no keepalive requests are made. +

            You can configure an interval to make a dummy SQL request +to keep alive the connections to the database. +The default value is ’undefined’, so no keepalive requests are made. Specify in seconds: for example 28800 means 8 hours.

            {odbc_keepalive_interval, undefined}.
             

            @@ -1445,17 +1448,17 @@ module loaded!

            ejabberd has built-in LDAP support. You can authenticate users against LDAP server and use LDAP directory as vCard storage. Shared rosters are not supported yet.

            Note that ejabberd treats LDAP as a read-only storage: -it is possible to consult data, but not possible to +it is possible to consult data, but not possible to create accounts, change password or edit vCard that is stored in LDAP.

            Connection

            Parameters:

            ldap_servers
            List of IP addresses or DNS names of your LDAP servers. This option is required.
            ldap_port
            Port to connect to your LDAP server. -The initial default value is 389, so it is used when nothing is set into the -configuration file. -If you configure a value, it is stored in ejabberd’s database. -Then, if you remove that value from the configuration file, +The initial default value is 389, so it is used when nothing is set into the +configuration file. +If you configure a value, it is stored in ejabberd’s database. +Then, if you remove that value from the configuration file, the value previously stored in the database will be used instead of the default 389.
            ldap_rootdn
            Bind DN. The default value is "" which means ‘anonymous connection’. @@ -1739,7 +1742,7 @@ number of processes (32000 by default).

            host

            This option defines the Jabber ID of a service provided by an ejabberd module. The keyword "@HOST@" is replaced at start time with the real virtual host string.

            This example configures -the echo module to provide its echoing service +the echo module to provide its echoing service in the Jabber ID mirror.example.org:

            {modules,
              [
            @@ -1758,7 +1761,7 @@ the "@HOST@" keyword must be used:
             

            3.3.3  mod_announce

            This module enables configured users to broadcast announcements and to set -the message of the day (MOTD). +the message of the day (MOTD). Configured users can perform these actions with a Jabber client either using Ad-hoc commands or sending messages to specific JIDs.

            The Ad-hoc commands are listed in the Server Discovery. @@ -1832,7 +1835,7 @@ for the superseded Jabber Browsing (

            -iqdisc
            This specifies +iqdisc
            This specifies the processing discipline for Service Discovery (http://jabber.org/protocol/disco#items and http://jabber.org/protocol/disco#info) IQ queries (see section 3.3.2).
            extra_domains
            With this option, @@ -1948,7 +1951,7 @@ discover when a disconnected user last accessed the server, to know when a connected user was last active on the server, or to query the uptime of the ejabberd server.

            Options:

            -iqdisc
            This specifies +iqdisc
            This specifies the processing discipline for Last activity (jabber:iq:last) IQ queries (see section 3.3.2).

            3.3.8  mod_muc

            @@ -1963,7 +1966,7 @@ Sending public and private messages to room occupants.

          2. Kicking and banning occupants.

        The MUC service allows any Jabber ID to register a nickname, so nobody else can use that nickname in any room in the MUC service. -To register a nickname, open the Service Discovery in your +To register a nickname, open the Service Discovery in your Jabber client and register in the MUC service.

        This module supports clustering and load balancing. One module can be started per cluster node. Rooms are distributed at creation time on all available MUC module @@ -2042,7 +2045,7 @@ interval delay. Intermediate presence packets are silently discarded. A good value for this option is 4 seconds.

      default_room_options
      This module option allows to define the desired default room options. -Note that the creator of a room can modify the options of his room +Note that the creator of a room can modify the options of his room at any time using a Jabber client with MUC capability. The available room options and the default values are:
      @@ -2217,7 +2220,7 @@ directory. The default value is "www/muc". To prevent spam, the spam_prevention option adds a special attribute to links that prevent their indexation by search engines. The default value is true, which mean that nofollow attributes will be added to user -submitted links. +submitted links.
      timezone
      The time zone for the logs is configurable with this option. Allowed values are local and universal. With the first value, the local time, @@ -2313,7 +2316,7 @@ subscription type (or globally). (from http://www.xmpp.org/specs/rfc3921.html#privacy)

      Options:

      -iqdisc
      This specifies +iqdisc
      This specifies the processing discipline for Blocking Communication (jabber:iq:privacy) IQ queries (see section 3.3.2).

      3.3.12  mod_private

      @@ -2325,7 +2328,7 @@ it is valid XML. One typical usage for this namespace is the server-side storage of client-specific preferences; another is Bookmark Storage (XEP-0048).

      Options:

      -iqdisc
      This specifies +iqdisc
      This specifies the processing discipline for Private XML Storage (jabber:iq:private) IQ queries (see section 3.3.2).

      3.3.13  mod_proxy65

      @@ -2402,7 +2405,7 @@ ACL and ACCESS. The default value is pubsub_createnode.

      nodetree
      To specify which nodetree to use. If not defined, the default pubsub nodetree is used. Nodetrees are default and virtual. Only one nodetree can be used -and is shared by all node plugins. +and is shared by all node plugins.

      Example:

      {modules,
        [
      @@ -2428,12 +2431,12 @@ rules to restrict registration. If a rule returns ‘deny’ on the re
       user name, registration for that user name is denied. (there are no
       restrictions by default).
       
      welcome_message
      Set a welcome message that -is sent to each newly registered account. The first string is the subject, and +is sent to each newly registered account. The first string is the subject, and the second string is the message body. In the body you can set a newline with the characters: \n -
      registration_watchers
      This option defines a +
      registration_watchers
      This option defines a list of JIDs which will be notified each time a new account is registered. -
      iqdisc
      This specifies +
      iqdisc
      This specifies the processing discipline for In-Band Registration (jabber:iq:register) IQ queries (see section 3.3.2).

      This module reads also another option defined globably for the server: {registration_timeout, Timeout}. @@ -2490,7 +2493,7 @@ Also define a registration timeout of one hour:

      3.3.16  mod_roster

      This module implements roster management as defined in RFC 3921: XMPP IM.

      Options:

      -iqdisc
      This specifies +iqdisc
      This specifies the processing discipline for Roster Management (jabber:iq:roster) IQ queries (see section 3.3.2).

      3.3.17  mod_service_log

      @@ -2513,7 +2516,7 @@ To log all end user packets to the Bandersnatch service running on ... ]}.

    3. To log all end user packets to the Bandersnatch service running on -bandersnatch.example.com and the backup service on +bandersnatch.example.com and the backup service on bandersnatch.example.org:
      {modules,
        [
      @@ -2528,9 +2531,9 @@ To log all end user packets to the Bandersnatch service running on
       create groups of people that can see members from (other) groups in their
       rosters. The big advantages of this feature are that end users do not need to
       manually add all users to their rosters, and that they cannot permanently delete
      -users from the shared roster groups. 
      +users from the shared roster groups.
       A shared roster group can have members from any Jabber server,
      -but the presence will only be available from and to members 
      +but the presence will only be available from and to members
       of the same virtual host where the group is created.

      Shared roster groups can be edited only via the Web Admin. Each group has a unique identification and the following parameters:

      @@ -2608,7 +2611,7 @@ Total number of registered users on the current virtual host (users/total).
    4. Total number of online users on all virtual hosts (users/all-hosts/online).
    5. Options:

      -iqdisc
      This specifies +iqdisc
      This specifies the processing discipline for Statistics Gathering (http://jabber.org/protocol/stats) IQ queries (see section 3.3.2).

      As there are only a small amount of clients (for example Tkabber) and software libraries with @@ -2634,7 +2637,7 @@ by sending:

      This module features support for Entity Time (XEP-0090). By using this XEP, you are able to discover the time at another entity’s location.

      Options:

      -iqdisc
      This specifies +iqdisc
      This specifies the processing discipline for Entity Time (jabber:iq:time) IQ queries (see section 3.3.2).

      3.3.21  mod_vcard

      @@ -2649,7 +2652,7 @@ service. If the host option is not specified, the Jabber ID will be the hostname of the virtual host with the prefix ‘vjud.’. The keyword "@HOST@" is replaced at start time with the real virtual host name. -

      iqdisc
      This specifies +
      iqdisc
      This specifies the processing discipline for vcard-temp IQ queries (see section 3.3.2).
      search
      This option specifies whether the search functionality is enabled (value: true) or disabled (value: @@ -2696,7 +2699,7 @@ and that all virtual hosts will be searched instead of only the current one:

      ejabberd can map LDAP attributes to vCard fields. This behaviour is implemented in the mod_vcard_ldap module. This module does not depend on the authentication method (see 3.2.5).

      Note that ejabberd treats LDAP as a read-only storage: -it is possible to consult data, but not possible to +it is possible to consult data, but not possible to create accounts, change password or edit vCard that is stored in LDAP.

      The mod_vcard_ldap module has its own optional parameters. The first group of parameters has the same meaning as the top-level LDAP parameters to set the authentication method: @@ -2712,7 +2715,7 @@ service. If the host option is not specified, the Jabber ID will be the hostname of the virtual host with the prefix ‘vjud.’. The keyword "@HOST@" is replaced at start time with the real virtual host name. -

      iqdisc
      This specifies +
      iqdisc
      This specifies the processing discipline for vcard-temp IQ queries (see section 3.3.2).
      search
      This option specifies whether the search functionality is enabled (value: true) or disabled (value: @@ -2874,14 +2877,14 @@ answers ejabberd’s version when queried.

      Options:

      show_os
      Should the operating system be revealed or not. The default value is true. -
      iqdisc
      This specifies +
      iqdisc
      This specifies the processing discipline for Software Version (jabber:iq:version) IQ queries (see section 3.3.2).

      Chapter 4  Managing an ejabberd server

      4.1  ejabberdctl

      -

      4.1.1  Commands

      The ejabberdctl command line administration script allows to start, stop and perform +

      4.1.1  Commands

      The ejabberdctl command line administration script allows to start, stop and perform many other administrative tasks in a local or remote ejabberd server.

      When ejabberdctl is executed without any parameter, -it displays the available options. If there isn’t an ejabberd server running, +it displays the available options. If there isn’t an ejabberd server running, the available parameters are:

      start
      Start ejabberd in background mode. This is the default method. @@ -2896,7 +2899,7 @@ The more interesting ones are:
      reopen-log
      If you use a tool to rotate logs, you have to configure it so that this command is executed after each rotation.
      backup, restore, install-fallback, dump, load
      You can use these -commands to create and restore backups. +commands to create and restore backups.
      import-file, import-dir
      These options can be used to migrate from other Jabber/XMPP servers. There exist tutorials to migrate from other software to ejabberd. @@ -2915,66 +2918,66 @@ for example using: echo $?

      4.1.2  Erlang runtime system

      ejabberd is an Erlang/OTP application that runs inside an Erlang runtime system. This system is configured using environment variables and command line parameters. The ejabberdctl administration script uses many of those possibilities. -You can configure some of them with the file ejabberdctl.cfg, +You can configure some of them with the file ejabberdctl.cfg, which includes detailed description about them. -This section describes for reference purposes +This section describes for reference purposes all the environment variables and command line parameters.

      The environment variables:

      -EJABBERD_CONFIG_PATH
      +EJABBERD_CONFIG_PATH
      Path to the ejabberd configuration file. -
      EJABBERD_MSGS_PATH
      +
      EJABBERD_MSGS_PATH
      Path to the directory with translated strings. -
      EJABBERD_LOG_PATH
      +
      EJABBERD_LOG_PATH
      Path to the ejabberd service log file. -
      EJABBERD_SO_PATH
      +
      EJABBERD_SO_PATH
      Path to the directory with binary system libraries. -
      HOME
      +
      HOME
      Path to the directory that is considered ejabberd’s home. This path is used to read the file .erlang.cookie. -
      ERL_CRASH_DUMP
      +
      ERL_CRASH_DUMP
      Path to the file where crash reports will be dumped. -
      ERL_INETRC
      +
      ERL_INETRC
      Indicates which IP name resolution to use. If using -sname, specify either this option or -kernel inetrc filepath. -
      ERL_MAX_PORTS
      +
      ERL_MAX_PORTS
      Maximum number of simultaneously open Erlang ports. -
      ERL_MAX_ETS_TABLES
      +
      ERL_MAX_ETS_TABLES
      Maximum number of ETS and Mnesia tables.

      The command line parameters:

      --sname ejabberd
      +-sname ejabberd
      The Erlang node will be identified using only the first part of the host name, i. e. other Erlang nodes outside this domain cannot contact this node. This is the preferable option in most cases. -
      -name ejabberd
      +
      -name ejabberd
      The Erlang node will be fully identified. This is only useful if you plan to setup an ejabberd cluster with nodes in different networks. -
      -kernel inetrc "/etc/ejabberd/inetrc"
      - Indicates which IP name resolution to use. +
      -kernel inetrc "/etc/ejabberd/inetrc"
      + Indicates which IP name resolution to use. If using -sname, specify either this option or ERL_INETRC. -
      -kernel inet_dist_listen_min 4200 inet_dist_listen_min 4210
      +
      -kernel inet_dist_listen_min 4200 inet_dist_listen_min 4210
      Define the first and last ports that epmd (section 5.2) can listen to. -
      -detached
      -Starts the Erlang system detached from the system console. - Useful for running daemons and backgrounds processes. -
      -noinput
      +
      -detached
      +Starts the Erlang system detached from the system console. + Useful for running daemons and backgrounds processes. +
      -noinput
      Ensures that the Erlang system never tries to read any input. - Useful for running daemons and backgrounds processes. -
      -pa /var/lib/ejabberd/ebin
      + Useful for running daemons and backgrounds processes. +
      -pa /var/lib/ejabberd/ebin
      Specify the directory where Erlang binary files (*.beam) are located. -
      -s ejabberd
      +
      -s ejabberd
      Tell Erlang runtime system to start the ejabberd application.
      -mnesia dir "/var/lib/ejabberd/"
      Specify the Mnesia database directory.
      -sasl sasl_error_logger {file, "/var/log/ejabberd/sasl.log"}
      Path to the Erlang/OTP system log file. -
      +K [true|false]
      +
      +K [true|false]
      Kernel polling. -
      -smp [auto|enable|disable]
      +
      -smp [auto|enable|disable]
      SMP support. -
      +P 250000
      +
      +P 250000
      Maximum number of Erlang processes. -
      -remsh ejabberd@localhost
      +
      -remsh ejabberd@localhost
      Open an Erlang shell in a remote Erlang node.

      Note that some characters need to be escaped when used in shell scripts, for instance " and {}. @@ -2982,7 +2985,7 @@ You can find other options in the Erlang manual page (erl -man erl).

      4.2  Web Admin

      The ejabberd Web Admin allows to administer most of ejabberd using a web browser.

      This feature is enabled by default: a ejabberd_http listener with the option web_admin (see -section 3.1.3) is included in the listening ports. Then you can open +section 3.1.3) is included in the listening ports. Then you can open http://server:port/admin/ in your favourite web browser. You will be asked to enter the username (the full Jabber ID) and password of an ejabberd user with administrator rights. After authentication @@ -3045,7 +3048,7 @@ with a Jabber client. The client must support Ad-Hoc Commands (XEP-0050), and you must login in the Jabber server with an account with proper privileges.

      -

      4.4  Change Computer Hostname

      ejabberd uses the distributed Mnesia database. +

      4.4  Change Computer Hostname

      ejabberd uses the distributed Mnesia database. Being distributed, Mnesia enforces consistency of its file, so it stores the name of the Erlang node in it (see section 5.4). The name of an Erlang node includes the hostname of the computer. @@ -3055,7 +3058,7 @@ or when you move ejabberd to a different machine.

      So, if you want you must follow these instructions:

      1. In the old server, backup the Mnesia database using the Web Admin or ejabberdctl. - For example: + For example:
        ejabberdctl backup /tmp/ejabberd-oldhost.backup
         
      2. In the new server, restore the backup file using the Web Admin or ejabberdctl. For example: @@ -3074,13 +3077,13 @@ you must follow these instructions:

        5.2  epmd

        epmd (Erlang Port Mapper Daemon) -is a small name server included in Erlang/OTP -and used by Erlang programs when establishing distributed Erlang communications. -ejabberd needs epmd to use ejabberdctl and also when clustering ejabberd nodes. +is a small name server included in Erlang/OTP +and used by Erlang programs when establishing distributed Erlang communications. +ejabberd needs epmd to use ejabberdctl and also when clustering ejabberd nodes. This small program is automatically started by Erlang, and is never stopped. -If ejabberd is stopped, and there aren’t any other Erlang programs -running in the system, you can safely stop epmd if you want.

        ejabberd runs inside an Erlang node. -To communicate with ejabberd, the script ejabberdctl starts a new Erlang node +If ejabberd is stopped, and there aren’t any other Erlang programs +running in the system, you can safely stop epmd if you want.

        ejabberd runs inside an Erlang node. +To communicate with ejabberd, the script ejabberdctl starts a new Erlang node and connects to the Erlang node that holds ejabberd. In order for this communication to work, epmd must be running and listening for name requests in the port 4369. @@ -3093,32 +3096,32 @@ So, if you plan to build a cluster of ejabberd nodes you must open the port 4369 for the machines involved in the cluster. Remember to block the port so Internet doesn’t have access to it.

        Once an Erlang node solved the node name of another Erlang node using EPMD and port 4369, the nodes communicate directly. -The ports used in this case by default are random, +The ports used in this case by default are random, but can be configured in the file ejabberdctl.cfg. The Erlang command-line parameter used internally is, for example:

        erl ... -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375
         

        -

        5.3  Erlang Cookie

        The Erlang cookie is a string with numbers and letters. +

        5.3  Erlang Cookie

        The Erlang cookie is a string with numbers and letters. An Erlang node reads the cookie at startup from the command-line parameter -setcookie. If not indicated, the cookie is read from the cookie file $HOME/.erlang.cookie. If this file does not exist, it is created immediately with a random cookie. Two Erlang nodes communicate only if they have the same cookie. -Setting a cookie on the Erlang node allows you to structure your Erlang network +Setting a cookie on the Erlang node allows you to structure your Erlang network and define which nodes are allowed to connect to which.

        Thanks to Erlang cookies, you can prevent access to the Erlang node by mistake, for example when there are several Erlang nodes running different programs in the same machine.

        Setting a secret cookie is a simple method to difficult unauthorized access to your Erlang node. -However, the cookie system is not ultimately effective +However, the cookie system is not ultimately effective to prevent unauthorized access or intrusion to an Erlang node. The communication between Erlang nodes are not encrypted, so the cookie could be read sniffing the traffic on the network. The recommended way to secure the Erlang node is to block the port 4369.

        5.4  Erlang node name

        An Erlang node may have a node name. -The name can be short (if indicated with the command-line parameter -sname) -or long (if indicated with the parameter -name). -Starting an Erlang node with -sname limits the communication between Erlang nodes to the LAN.

        Using the option -sname instead of -name is a simple method +The name can be short (if indicated with the command-line parameter -sname) +or long (if indicated with the parameter -name). +Starting an Erlang node with -sname limits the communication between Erlang nodes to the LAN.

        Using the option -sname instead of -name is a simple method to difficult unauthorized access to your Erlang node. However, it is not ultimately effective to prevent access to the Erlang node, -because it may be possible to fake the fact that you are on another network +because it may be possible to fake the fact that you are on another network using a modified version of Erlang epmd. The recommended way to secure the Erlang node is to block the port 4369.

        5.5  Securing sensible files

        ejabberd stores sensible data in the file system either in plain text or binary files. @@ -3221,7 +3224,7 @@ domain.

        6.3.1  Components Load-Balancing

        6.3.2  Domain Load-Balancing Algorithm

        -

        ejabberd includes an algorithm to load balance the components that are plugged on an ejabberd cluster. It means that you can plug one or several instances of the same component on each ejabberd cluster and that the traffic will be automatically distributed.

        The default distribution algorithm try to deliver to a local instance of a component. If several local instances are available, one instance is chosen randomly. If no instance is available locally, one instance is chosen randomly among the remote component instances.

        If you need a different behaviour, you can change the load balancing behaviour with the option domain_balancing. The syntax of the option is the following:

        {domain_balancing, "component.example.com", <balancing_criterium>}.                                   
        +

        ejabberd includes an algorithm to load balance the components that are plugged on an ejabberd cluster. It means that you can plug one or several instances of the same component on each ejabberd cluster and that the traffic will be automatically distributed.

        The default distribution algorithm try to deliver to a local instance of a component. If several local instances are available, one instance is chosen randomly. If no instance is available locally, one instance is chosen randomly among the remote component instances.

        If you need a different behaviour, you can change the load balancing behaviour with the option domain_balancing. The syntax of the option is the following:

        {domain_balancing, "component.example.com", <balancing_criterium>}.
         

        Several balancing criteria are available:

        • destination: the full JID of the packet to attribute is used. @@ -3267,12 +3270,12 @@ For example, the default configuration is:

          7.3  Debug Console

          The Debug Console is an Erlang shell attached to an already running ejabberd server. With this Erlang shell, an experienced administrator can perform complex tasks.

          This shell gives complete control over the ejabberd server, so it is important to use it with extremely care. -There are some simple and safe examples in the article +There are some simple and safe examples in the article Interconnecting Erlang Nodes

          To exit the shell, close the window or press the keys: control+c control+c.

          Appendix A  Internationalization and Localization

          The source code of ejabberd supports localization. -The translators can edit the -gettext .po files +The translators can edit the +gettext .po files using any capable program (KBabel, Lokalize, Poedit...) or a simple text editor.

          Then gettext is used to extract, update and export those .po files to the .msg format read by ejabberd. To perform those management tasks, in the src/ directory execute make translations. @@ -3299,7 +3302,7 @@ Figure A.1, for example, shows the reply to the webadmmainru.png -

          Figure A.2: Web Admin showing a virtual host when the web browser provides the +
          Figure A.2: Web Admin showing a virtual host when the web browser provides the HTTP header ‘Accept-Language: ru’