From 1649dec58eec1c2d532e86347c75e3adf423ff64 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 2 Apr 2008 16:31:15 +0000 Subject: [PATCH] * src/ejabberd_config.erl: Add support to include additional configuration files. Add support for macro definition and usage. (EJAB-593) * doc/guide.tex: Likewise * doc/guide.html: Likewise SVN Revision: 1273 --- ChangeLog | 8 + doc/guide.html | 329 +++++++++++++++++++++++++--------------- doc/guide.tex | 141 +++++++++++++++++ src/ejabberd_config.erl | 206 +++++++++++++++++++++++-- 4 files changed, 548 insertions(+), 136 deletions(-) diff --git a/ChangeLog b/ChangeLog index 80c785e9d..eaa088613 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-04-02 Badlop + + * src/ejabberd_config.erl: Add support to include additional + configuration files. Add support for macro definition and + usage. (EJAB-593) + * doc/guide.tex: Likewise + * doc/guide.html: Likewise + 2008-04-02 Christophe Romain * src/mod_pubsub/mod_pubsub.erl: add condition inclusion of pep in diff --git a/doc/guide.html b/doc/guide.html index 5119b47f0..24e50c649 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -146,87 +146,89 @@ SPAN{width:20%; float:right; text-align:left; margin-left:auto;}
  • 3.1.5  Access Rules
  • 3.1.6  Shapers
  • 3.1.7  Default Language +
  • 3.1.8  Include Additional Configuration Files +
  • 3.1.9  Option Macros in Configuration File
  • -
  • 3.2  Database and LDAP Configuration +
  • 3.2  Database and LDAP Configuration -
  • 3.3  Modules Configuration +
  • 3.3  Modules Configuration
  • -
  • Chapter 4  Managing an ejabberd server +
  • Chapter 4  Managing an ejabberd server -
  • Chapter 5  Securing ejabberd +
  • Chapter 5  Securing ejabberd -
  • Chapter 6  Clustering +
  • Chapter 6  Clustering -
  • Chapter 7  Debugging +
  • Chapter 7  Debugging -
  • Appendix A  Internationalization and Localization -
  • Appendix B  Release Notes -
  • Appendix C  Acknowledgements -
  • Appendix D  Copyright Information +
  • Appendix A  Internationalization and Localization +
  • Appendix B  Release Notes +
  • Appendix C  Acknowledgements +
  • Appendix D  Copyright Information
  • Chapter 1  Introduction

    ejabberd is a free and open source instant messaging server written in Erlang.

    ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication.

    ejabberd is designed to be a rock-solid and feature rich XMPP server.

    ejabberd is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments.

    @@ -1098,8 +1100,89 @@ To set Russian as default language:
      {language, "ru"}.
     
  • To set Spanish as default language:
      {language, "es"}.
    -
  • -

    3.2  Database and LDAP Configuration

    + +

    3.1.8  Include Additional Configuration Files

    + +

    The option include_config_file in a configuration file instructs ejabberd to include other configuration files immediately.

    The basic usage is: +

      {include_config_file, <filename>}.
    +

    It is also possible to specify suboptions: +

      {include_config_file, <filename>, [<suboption>, <suboption>, ...]}.
    +

    The filename can be indicated either as an absolute path, +or relative to the main ejabberd configuration file. +It isn’t possible to use wildcards. +The file must exist and be readable.

    The allowed suboptions are: +

    +{disallow, [<option>, <option>, ...]}
    Disallows the usage of those options in the included configuration file. +The options that match this criteria are not accepted. +The default value is an empty list: [] +
    {allow_only, [<option>, <option>, ...]}
    Allows only the usage of those options in the included configuration file. +The options that do not match this criteria are not accepted. +The default value is: all +

    This is a basic example: +

      {include_config_file, "/etc/ejabberd/additional.cfg"}.
    +

    In this example, the included file is not allowed to contain a listen option. +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, +and later includes another file with additional rules: +

      {acl, admin, {user, "admin", "localhost"}}.
    +  {access, announce, [{allow, admin}]}.
    +  {include_config_file, "/etc/ejabberd/acl_and_access.cfg", [{allow_only, [acl, access]}]}.
    +

    and content of the file acl_and_access.cfg can be, for example: +

      {acl, admin, {user, "bob", "localhost"}}.
    +  {acl, admin, {user, "jan", "localhost"}}.
    +
    +

    3.1.9  Option Macros in Configuration File

    + +

    In the ejabberd configuration file, +it is possible to define a macro for a value +and later use this macro when defining an option.

    A macro is defined with this syntax: +

      {define_macro, '<MACRO>', <value>}.
    +

    The MACRO must be surrounded by commas, and all in uppercase. +The value can be any valid arbitrary Erlang term.

    The first definition of a macro is preserved, +and additional definitions of the same macro are forgotten.

    Macros are processed after +additional configuration files have been included, +so it is possible to use macros that +are defined in configuration files included before the usage.

    It isn’t possible to use a macro in the definition +of another macro.

    There are two ways to use a macro: +

    ’<MACRO>’
    +You can put this instead of a value in an ejabberd option, +and will be replaced with the value previously defined. +If the macro is not defined previously, +the program will crash and report an error.
    {use_macro, ’<MACRO>’, <defaultvalue>}
    +Use a macro even if it may not be defined. +If the macro is not defined previously, +the provided defaultvalue is used. +This usage behaves as if it were defined and used this way: +
        {define_macro, '<MACRO>', <defaultvalue>}.
    +    '<MACRO>'
    +  

    This example shows the basic usage of a macro: +

      {define_macro, 'LOG_LEVEL_NUMBER', 5}.
    +  {loglevel, 'LOG_LEVEL_NUMBER'}.
    +

    The resulting option interpreted by ejabberd is: {loglevel, 5}.

    This example shows that values can be any arbitrary Erlang term: +

      {define_macro, 'USERBOB', {user, "bob", "localhost"}}.
    +  {acl, admin, 'USERBOB'}.
    +

    The resulting option interpreted by ejabberd is: {acl, admin, {user, "bob", "localhost"}}.

    This complex example: +

    {define_macro, 'NUMBER_PORT_C2S', 5222}.
    +{define_macro, 'PORT_S2S_IN', {5269, ejabberd_s2s_in, []}}.
    +{listen,
    + [
    +  {'NUMBER_PORT_C2S', ejabberd_c2s, []},
    +  'PORT_S2S_IN',
    +  {{use_macro, 'NUMBER_PORT_HTTP', 5280}, ejabberd_http, []}
    + ]
    +}.
    +

    produces this result after being interpreted: +

    {listen,
    + [
    +  {5222, ejabberd_c2s, []},
    +  {5269, ejabberd_s2s_in, []},
    +  {5280, ejabberd_http, []}
    + ]
    +}.
    +
    +

    3.2  Database and LDAP Configuration

    ejabberd uses its internal Mnesia database by default. However, it is @@ -1122,7 +1205,7 @@ different storage systems for modules, and so forth.

    The following databas

  • Normally any LDAP compatible server should work; inform us about your success with a not-listed server so that we can list it here.
  • -

    3.2.1  MySQL

    +

    3.2.1  MySQL

    Although this section will describe ejabberd’s configuration when you want to use the native MySQL driver, it does not describe MySQL’s installation and @@ -1182,7 +1265,7 @@ relational databases like MySQL. To enable storage to your database, just make sure that your database is running well (see previous sections), and replace the suffix-less or ldap module variant with the odbc module variant. Keep in mind that you cannot have several variants of the same module loaded!

    -

    3.2.2  Microsoft SQL Server

    +

    3.2.2  Microsoft SQL Server

    Although this section will describe ejabberd’s configuration when you want to use Microsoft SQL Server, it does not describe Microsoft SQL Server’s @@ -1222,7 +1305,7 @@ database, just make sure that your database is running well (see previous sections), and replace the suffix-less or ldap module variant with the odbc module variant. Keep in mind that you cannot have several variants of the same module loaded!

    -

    3.2.3  PostgreSQL

    +

    3.2.3  PostgreSQL

    Although this section will describe ejabberd’s configuration when you want to use the native PostgreSQL driver, it does not describe PostgreSQL’s installation @@ -1285,7 +1368,7 @@ relational databases like PostgreSQL. To enable storage to your database, just make sure that your database is running well (see previous sections), and replace the suffix-less or ldap module variant with the odbc module variant. Keep in mind that you cannot have several variants of the same module loaded!

    -

    3.2.4  ODBC Compatible

    +

    3.2.4  ODBC Compatible

    Although this section will describe ejabberd’s configuration when you want to use the ODBC driver, it does not describe the installation and database creation @@ -1332,7 +1415,7 @@ database, just make sure that your database is running well (see previous sections), and replace the suffix-less or ldap module variant with the odbc module variant. Keep in mind that you cannot have several variants of the same module loaded!

    -

    3.2.5  LDAP

    +

    3.2.5  LDAP

    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 @@ -1502,7 +1585,7 @@ configuration is shown below:

      {auth_method, ldap}.
         ...
       }.
     
    -

    3.3  Modules Configuration

    +

    3.3  Modules Configuration

    The option modules defines the list of modules that will be loaded after ejabberd’s startup. Each entry in the list is a tuple in which the first @@ -1523,7 +1606,7 @@ all entries end with a comma: {mod_version, []} ]}. -

    3.3.1  Overview

    +

    3.3.1  Overview

    The following table lists all modules included in ejabberd.


    @@ -1588,7 +1671,7 @@ Last connection date and time: Use mod_last_odbc instead of ejabberd website. Please remember that these contributions might not work or that they can contain severe bugs and security leaks. Therefore, use them at your own risk!

    -

    3.3.2  Common Options

    +

    3.3.2  Common Options

    The following options are used by many modules. Therefore, they are described in this separate section.

    iqdisc

    @@ -1640,7 +1723,7 @@ the "@HOST@" keyword must be used: ... ]}. -

    3.3.3  mod_announce

    +

    3.3.3  mod_announce

    This module enables configured users to broadcast announcements and to set the message of the day (MOTD). @@ -1705,7 +1788,7 @@ Only administrators can send announcements:

    Note that mod_announce can be resource intensive on large deployments as it can broadcast lot of messages. This module should be disabled for instances of ejabberd with hundreds of thousands users.

    -

    3.3.4  mod_disco

    +

    3.3.4  mod_disco

    This module adds support for Service Discovery (XEP-0030). With this module enabled, services on your server can be discovered by @@ -1746,7 +1829,7 @@ To serve a link to the Jabber User Directory on jabber.org: ... ]}. -

    3.3.5  mod_echo

    +

    3.3.5  mod_echo

    This module simply echoes any Jabber packet back to the sender. This mirror can be of interest for @@ -1767,7 +1850,7 @@ of them all? ... ]}. -

    3.3.6  mod_irc

    +

    3.3.6  mod_irc

    This module is an IRC transport that can be used to join channels on IRC servers.

    End user information: @@ -1827,7 +1910,7 @@ our domains and on other servers. ... ]}. -

    3.3.7  mod_last

    +

    3.3.7  mod_last

    This module adds support for Last Activity (XEP-0012). It can be used to discover when a disconnected user last accessed the server, to know when a @@ -1837,7 +1920,7 @@ connected user was last active on the server, or to query the uptime of the iqdisc

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

    3.3.8  mod_muc

    +

    3.3.8  mod_muc

    With this module enabled, your server will support Multi-User Chat (XEP-0045). End users will be able to join text conferences.

    Some of the features of Multi-User Chat: @@ -2015,7 +2098,7 @@ newly created chatrooms have by default those options. ... ]}. -

    3.3.9  mod_muc_log

    +

    3.3.9  mod_muc_log

    This module enables optional logging of Multi-User Chat (MUC) conversations to HTML. Once you enable this module, users can join a chatroom using a MUC capable @@ -2123,7 +2206,7 @@ top link will be the default <a href="/">Home</a>. ... ]}. -

    3.3.10  mod_offline

    +

    3.3.10  mod_offline

    This module implements offline message storage. This means that all messages sent to an offline user will be stored on the server until that user comes @@ -2135,7 +2218,7 @@ is use to set a max number of offline messages per user (quota). Its value can be either infinity or a strictly positive integer. The default value is infinity. -

    3.3.11  mod_privacy

    +

    3.3.11  mod_privacy

    This module implements Blocking Communication (also known as Privacy Rules) as defined in section 10 from XMPP IM. If end users have support for it in @@ -2164,7 +2247,7 @@ subscription type (or globally). iqdisc

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

    3.3.12  mod_private

    +

    3.3.12  mod_private

    This module adds support for Private XML Storage (XEP-0049):

    @@ -2177,7 +2260,7 @@ of client-specific preferences; another is Bookmark Storage ( This specifies the processing discipline for Private XML Storage (jabber:iq:private) IQ queries (see section 3.3.2). -

    3.3.13  mod_proxy65

    +

    3.3.13  mod_proxy65

    This module implements SOCKS5 Bytestreams (XEP-0065). It allows ejabberd to act as a file transfer proxy between two @@ -2233,7 +2316,7 @@ The simpliest configuration of the module: ... ]}. -

    3.3.14  mod_pubsub

    +

    3.3.14  mod_pubsub

    This module offers a Publish-Subscribe Service (XEP-0060). The functionality in mod_pubsub can be extended using plugins. @@ -2264,7 +2347,7 @@ and is shared by all node plugins. ... ]}. -

    3.3.15  mod_register

    +

    3.3.15  mod_register

    This module adds support for In-Band Registration (XEP-0077). This protocol enables end users to use a Jabber client to: @@ -2326,14 +2409,14 @@ example all In-Band Registration functionality is disabled: ... ]}. -

    3.3.16  mod_roster

    +

    3.3.16  mod_roster

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

    Options:

    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

    +

    3.3.17  mod_service_log

    This module adds support for logging end user packets via a Jabber message auditing service such as @@ -2364,7 +2447,7 @@ To log all end user packets to the Bandersnatch service running on ... ]}. -

    3.3.18  mod_shared_roster

    +

    3.3.18  mod_shared_roster

    This module enables you to create shared roster groups. This means that you can create groups of people that can see members from (other) groups in their @@ -2440,7 +2523,7 @@ roster groups as shown in the following table:

    ModuleFeatureDependenciesNeeded for XMPP?

    -

    3.3.19  mod_stats

    +

    3.3.19  mod_stats

    This module adds support for Statistics Gathering (XEP-0039). This protocol allows you to retrieve next statistics from your ejabberd deployment: @@ -2473,7 +2556,7 @@ by sending: </query> </iq> -

    3.3.20  mod_time

    +

    3.3.20  mod_time

    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: @@ -2481,7 +2564,7 @@ you are able to discover the time at another entity’s location.

    Opt iqdisc

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

    3.3.21  mod_vcard

    +

    3.3.21  mod_vcard

    This module allows end users to store and retrieve their vCard, and to retrieve other users vCards, as defined in vcard-temp (XEP-0054). The module also @@ -2537,7 +2620,7 @@ and that all virtual hosts will be searched instead of only the current one: ... ]}. -

    3.3.22  mod_vcard_ldap

    +

    3.3.22  mod_vcard_ldap

    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 @@ -2712,7 +2795,7 @@ searching his info in LDAP.

  • ldap_vcard_map
  • -

    3.3.23  mod_version

    +

    3.3.23  mod_version

    This module implements Software Version (XEP-0092). Consequently, it answers ejabberd’s version when queried.

    Options: @@ -2722,10 +2805,10 @@ The default value is true.

    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

    +

    Chapter 4  Managing an ejabberd server

    +

    4.1  ejabberdctl

    -

    4.1.1  Commands

    +

    4.1.1  Commands

    The ejabberdctl command line 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, @@ -2753,7 +2836,7 @@ is very high.

    The ejabberdctl script also allows the argument --node NODENAME. This allows to administer a remote node.

    The ejabberdctl administration script can be configured in the file ejabberdctl.cfg. This file provides detailed information about each configurable option.

    -

    4.1.2  Erlang runtime system

    +

    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. @@ -2821,7 +2904,7 @@ Starts the Erlang system detached from the system console.

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

    -

    4.2  Web Admin

    +

    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 @@ -2883,14 +2966,14 @@ web browser to https://192.168.1.1:5280/admin/: ] }. -

    4.3  Ad-hoc Commands

    +

    4.3  Ad-hoc Commands

    If you enable mod_configure and mod_adhoc, you can perform several administrative tasks in ejabberd 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

    +

    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. @@ -2907,8 +2990,8 @@ you must follow these instructions: For example:

    ejabberdctl restore /tmp/ejabberd-oldhost.backup
     
    -

    Chapter 5  Securing ejabberd

    -

    5.1  Firewall Settings

    +

    Chapter 5  Securing ejabberd

    +

    5.1  Firewall Settings

    You need to take the following TCP ports in mind when configuring your firewall:


    @@ -2920,7 +3003,7 @@ you must follow these instructions: port rangeUsed for connections between Erlang nodes. This range is configurable (see section 5.2).

    -

    5.2  epmd

    +

    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. @@ -2946,7 +3029,7 @@ 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

    +

    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 or from a cookie file. @@ -2960,7 +3043,7 @@ 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

    +

    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). @@ -2970,10 +3053,10 @@ 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 using a modified version of Erlang epmd. The recommended way to secure the Erlang node is to block the port 4369.

    -

    Chapter 6  Clustering

    +

    Chapter 6  Clustering

    -

    6.1  How it Works

    +

    6.1  How it Works

    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 @@ -2988,33 +3071,33 @@ router,

  • session manager,
  • s2s manager.
  • -

    6.1.1  Router

    +

    6.1.1  Router

    This module is the main router of Jabber packets on each node. It routes them based on their destination’s domains. It uses a global routing table. The domain of the packet’s destination is searched in the routing table, and if it is found, the packet is routed to the appropriate process. If not, it is sent to the s2s manager.

    -

    6.1.2  Local Router

    +

    6.1.2  Local Router

    This module routes packets which have a destination domain equal to one of this server’s host names. If the destination JID has a non-empty user part, it is routed to the session manager, otherwise it is processed depending on its content.

    -

    6.1.3  Session Manager

    +

    6.1.3  Session Manager

    This module routes packets to local users. It looks up to which user resource a packet must be sent via a presence table. Then the packet is either routed to the appropriate c2s process, or stored in offline storage, or bounced back.

    -

    6.1.4  s2s Manager

    +

    6.1.4  s2s Manager

    This module routes packets to other Jabber servers. First, it checks if an opened s2s connection from the domain of the packet’s source to the domain of the packet’s destination exists. If that is the case, the s2s manager routes the packet to the process serving this connection, otherwise a new connection is opened.

    -

    6.2  Clustering Setup

    +

    6.2  Clustering Setup

    Suppose you already configured ejabberd on one machine named (first), and you need to setup another one to make an ejabberd cluster. Then do @@ -3049,11 +3132,11 @@ and ‘access’ options — they will be taken from enabled only on one machine in the cluster).

    You can repeat these steps for other machines supposed to serve this domain.

    -

    6.3  Service Load-Balancing

    -

    6.3.1  Components Load-Balancing

    +

    6.3  Service Load-Balancing

    +

    6.3.1  Components Load-Balancing

    -

    6.3.2  Domain Load-Balancing Algorithm

    +

    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>}.                                   
     

    Several balancing criteria are available: @@ -3063,15 +3146,15 @@ domain.

  • bare_destination: the bare JID (without resource) of the packet to attribute is used.
  • bare_source: the bare JID (without resource) of the packet from attribute is used.
  • If the value corresponding to the criteria is the same, the same component instance in the cluster will be used.

    -

    6.3.3  Load-Balancing Buckets

    +

    6.3.3  Load-Balancing Buckets

    When there is a risk of failure for a given component, domain balancing can cause service trouble. If one component is failing the service will not work correctly unless the sessions are rebalanced.

    In this case, it is best to limit the problem to the sessions handled by the failing component. This is what the domain_balancing_component_number option does, making the load balancing algorithm not dynamic, but sticky on a fix number of component instances.

    The syntax is the following:

        {domain_balancing_component_number, "component.example.com", N}
     
    -

    Chapter 7  Debugging

    +

    Chapter 7  Debugging

    -

    7.1  Watchdog Alerts

    +

    7.1  Watchdog Alerts

    ejabberd includes a watchdog mechanism. If a process in the ejabberd server consumes too much memory, @@ -3081,7 +3164,7 @@ a message is sent to the Jabber accounts defined with the option Example configuration:

    {watchdog_admins, ["admin2@localhost", "admin2@example.org"]}.
     
    -

    7.2  Log Files

    +

    7.2  Log Files

    An ejabberd node writes two log files:

    ejabberd.log
    is the ejabberd service log, with the messages reported by ejabberd code @@ -3099,13 +3182,13 @@ The possible levels are: For example, the default configuration is:

    {loglevel, 4}.
     
    -

    7.3  Debug Console

    +

    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 Interconnecting Erlang Nodes

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

    -

    Appendix A  Internationalization and Localization

    +

    Appendix A  Internationalization and Localization

    All built-in modules support the xml:lang attribute inside IQ queries. Figure A.1, for example, shows the reply to the following query: @@ -3133,10 +3216,10 @@ HTTP header ‘Accept-Language: ru’


    -

    Appendix B  Release Notes

    +

    Appendix B  Release Notes

    Release notes are available from ejabberd Home Page

    -

    Appendix C  Acknowledgements

    +

    Appendix C  Acknowledgements

    Thanks to all people who contributed to this guide:

    -

    Appendix D  Copyright Information

    +

    Appendix D  Copyright Information

    Ejabberd Installation and Operation Guide.
    Copyright © 2003 — 2008 Process-one

    This document is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/doc/guide.tex b/doc/guide.tex index 4a365a5e0..bd1447db1 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -1296,6 +1296,147 @@ Examples: \end{verbatim} \end{itemize} +\subsection{Include Additional Configuration Files} +\label{includeconfigfile} +\ind{options!includeconfigfile}\ind{includeconfigfile} + +The option \option{include\_config\_file} in a configuration file instructs \ejabberd{} to include other configuration files immediately. + +The basic usage is: +\begin{verbatim} + {include_config_file, }. +\end{verbatim} +It is also possible to specify suboptions: +\begin{verbatim} + {include_config_file, , [, , ...]}. +\end{verbatim} + +The filename can be indicated either as an absolute path, +or relative to the main \ejabberd{} configuration file. +It isn't possible to use wildcards. +The file must exist and be readable. + +The allowed suboptions are: +\begin{description} + \titem{\{disallow, [