Upstream changes (I think)
[sysconfig/ejabberd.git] / ejabberd.cfg
index 71a8322606d4b25a235052c8e220a3c7367a44fa..428f95c186e11ad936a0b00e03f4549ff14ffaca 100644 (file)
@@ -7,6 +7,31 @@
 %%% Please consult the Guide in case of doubts, it is available at
 %%% /usr/share/doc/ejabberd/guide.html
 
+%%% This configuration file contains Erlang terms.
+%%% In case you want to understand the syntax, here are the concepts:
+%%%
+%%%  - The character to comment a line is %
+%%%
+%%%  - Each term ends in a dot, for example:
+%%%      override_global.
+%%%
+%%%  - A tuple has a fixed definition, its elements are
+%%%    enclosed in {}, and separated with commas:
+%%%      {loglevel, 4}.
+%%%
+%%%  - A list can have as many elements as you want,
+%%%    and is enclosed in [], for example:
+%%%      [http_poll, web_admin, tls]
+%%%
+%%%  - A keyword of ejabberd is a word in lowercase.
+%%%    The strings are enclosed in "" and can have spaces, dots...
+%%%      {language, "en"}.
+%%%      {ldap_rootdn, "dc=example,dc=com"}.
+%%%
+%%%  - This term includes a tuple, a keyword, a list and two strings:
+%%%      {hosts, ["jabber.example.net", "im.example.com"]}.
+%%%
+
 %%%   ===================================
 %%%   OVERRIDE OPTIONS STORED IN DATABASE
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-%%% This configuration file contains Erlang terms.
-%%% In case you want to understand the syntax, here are the concepts:
-%%%
-%%%  - The character to comment a line is %
-%%%
-%%%  - Each term ends in a dot, for example:
-%%%      override_global.
-%%%
-%%%  - A tuple has a fixed definition, its elements are
-%%%    enclosed in {}, and separated with commas:
-%%%      {loglevel, 4}.
-%%%
-%%%  - A list can have as many elements as you want,
-%%%    and is enclosed in [], for example:
-%%%      [http_poll, web_admin, tls]
-%%%
-%%%  - A keyword of ejabberd is a word in lowercase.
-%%%    The strings are enclosed in "" and can have spaces, dots...
-%%%      {language, "en"}.
-%%%      {ldap_rootdn, "dc=example,dc=com"}.
-%%%
-%%%  - This term includes a tuple, a keyword, a list and two strings:
-%%%      {hosts, ["jabber.example.net", "im.example.com"]}.
-%%%
-
 
 %%%   =========
 %%%   DEBUGGING
                        {access, c2s},
                        {shaper, c2s_shaper},
                        {max_stanza_size, 65536},
+                        %%zlib,
                        starttls, {certfile, "/etc/ejabberd/ejabberd.pem"}
                       ]},
 
   %%                   {access, c2s},
   %%                   {shaper, c2s_shaper},
   %%                   {max_stanza_size, 65536},
+  %%                    zlib,
   %%                   tls, {certfile, "/etc/ejabberd/ejabberd.pem"}
   %%                  ]},
 
                           {max_stanza_size, 131072}
                          ]},
 
-  %% External MUC jabber-muc (but internal mod_muc is better :))
+  %% External MUC jabber-muc
   %%{5554, ejabberd_service, [
   %%                       {ip, {127, 0, 0, 1}},
   %%                       {access, all},
   %%                       ]},
 
   {5280, ejabberd_http, [
+                        %%{request_handlers,
+                        %% [
+                        %%  {["pub", "archive"], mod_http_fileserver}
+                        %% ]},
+                        %%captcha,
+                        http_bind,
                         http_poll,
                         web_admin
                        ]}
 %%{{s2s_host, "goodhost.org"}, allow}.
 %%{{s2s_host, "badhost.org"}, deny}.
 
+%%
+%% The maximum allowed delay for retry to connect
+%% after a failed connection attempt to a remote server, in seconds.
+%% The default value is 300 seconds (5 minutes). 
+%%
+%% The reconnection algorythm works like this: if connection fails,
+%% ejabberd makes an initial random delay between 1 and 15 seconds,
+%% then retries, and if this attempt fails, makes another delay,
+%% twice as long as previous. These attempts are performed either
+%% until a successful connection is made or until the next calculated
+%% delay is greated or equal than the value of s2s_max_retry_delay.
+%%
+%%{s2s_max_retry_delay, 300}.
+
+%%
+%% Outgoing S2S options
+%%
+%% Preferred address families (which to try first) and connect timeout
+%% in milliseconds.
+%%
+%%{outgoing_s2s_options, [ipv4, ipv6], 10000}.
+
 
 %%%   ==============
 %%%   AUTHENTICATION
 %%{ldap_servers, ["localhost"]}.
 %%
 %% Encryption of connection to LDAP servers (LDAPS):
+%%{ldap_encrypt, none}.
 %%{ldap_encrypt, tls}.
 %%
 %% Port connect to LDAP server:
+%%{ldap_port, 389}.
 %%{ldap_port, 636}.
 %%
 %% LDAP manager:
 %% you want to use other database backends.
 %% Please consult the ejabberd Guide for details about database creation.
 
+%% NOTE that ejabberd in Debian supports "out of the box"
+%% only mnesia (default) and ODBC storage backends.
+%% Working with MySQL and PostgreSQL DB backends requires
+%% building and installation of the corresponding Erlang modules,
+%% not distributed as a part of ejabberd.
+%% Refer to /usr/share/doc/ejabberd/README.Debian for details.
+
 %%
 %% MySQL server:
 %%
 %%{acl, test, {user_regexp, "^test"}}.
 %%{acl, test, {user_glob, "test*"}}.
 
+%%
+%% Define specific ACLs in a virtual host.
+%%
+%%{host_config, "localhost",
+%% [
+%%  {acl, admin, {user, "bob-local", "localhost"}}
+%% ]
+%%}.
+
 
 %%%   ============
 %%%   ACCESS RULES
 %% Define the maximum number of time a single user is allowed to connect:
 {access, max_user_sessions, [{10, all}]}.
 
+%% Maximum number of offline messages that users can have:
+{access, max_user_offline_messages, [{5000, admin}, {100, all}]}. 
+
 %% This rule allows access only for local users:
 {access, local, [{allow, local}]}.
 
 % This setting is default because it's more safe.
 {access, register, [{deny, all}]}.
 
+%% By default frequency of account registrations from the same IP
+%% is limited to 1 account every 10 minutes. To disable put: infinity
+%%{registration_timeout, 600}.
+
 %% Everybody can create pubsub nodes
 {access, pubsub_createnode, [{allow, all}]}.
 
+%%
+%% Define specific Access rules in a virtual host.
+%%
+%%{host_config, "localhost",
+%% [
+%%  {access, c2s, [{allow, admin}, {deny, all}]},
+%%  {access, register, [{deny, all}]}
+%% ]
+%%}.
+
 
 %%%   ================
 %%%   DEFAULT LANGUAGE
 %%
 {language, "en"}.
 
+%%
+%% Set a different default language in a virtual host.
+%%
+%%{host_config, "localhost",
+%% [{language, "ru"}]
+%%}.
+
+
+%%%   =======
+%%%   CAPTCHA
+
+%%
+%% Full path to a script that generates the image.
+%% Note that this script must be made executable
+%% for the user ejabberd:ejabberd.
+%%
+%%{captcha_cmd, "/usr/lib/ejabberd/priv/bin/captcha.sh"}.
+
+%%
+%% Host part of the URL sent to the user.
+%% The port specified must be configured as the "ejabberd_http"
+%% listener which must have the "captcha" directive included
+%% in its configuration (see the "LISTENING PORTS" section above).
+%%
+%%{captcha_host, "localhost:5280"}.
+
 
 %%%   =======
 %%%   MODULES
   {mod_announce, [{access, announce}]}, % requires mod_adhoc
   {mod_caps,     []},
   {mod_configure,[]}, % requires mod_adhoc
-  {mod_ctlextra, []},
+  {mod_admin_extra, []},
   {mod_disco,    []},
   %%{mod_echo,   [{host, "echo.localhost"}]},
   {mod_irc,      []},
+  %% NOTE that mod_http_fileserver must also be enabled in the
+  %% "request_handlers" clause of the "ejabberd_http" listener
+  %% configuration (see the "LISTENING PORTS" section above).
+  %%{mod_http_fileserver, [
+  %%                       {docroot, "/var/www"}, 
+  %%                       {accesslog, "/var/log/ejabberd/access.log"}
+  %%                      ]},
   {mod_last,     []},
   {mod_muc,      [
                  %%{host, "conference.@HOST@"},
                  {max_users, 500}
                 ]},
   %%{mod_muc_log,[]},
-  {mod_offline,  []},
+  {mod_offline,  [{access_max_user_messages, max_user_offline_messages}]},
   {mod_privacy,  []},
   {mod_private,  []},
   {mod_proxy65,  [
                 ]},
   {mod_pubsub,   [ % requires mod_caps
                  {access_createnode, pubsub_createnode},
-                 {plugins, ["default", "pep"]}
+                 {pep_sendlast_offline, false},
+                 {last_item_cache, false},
+                 %%{plugins, ["default", "pep"]}
+                 {plugins, ["flat", "hometree", "pep"]}  % pep requires mod_caps
                 ]},
   {mod_register, [
                  %%
   {mod_version,  []}
  ]}.
 
+%%
+%% Enable modules with custom options in a specific virtual host
+%%
+%%{host_config, "localhost",
+%% [{{add, modules},
+%%   [
+%%    {mod_echo, [{host, "mirror.localhost"}]}
+%%   ]
+%%  }
+%% ]}.
+
 
-%%% $Id: ejabberd.cfg.example 1178 2008-02-08 18:28:36Z badlop $
+%%% $Id: ejabberd.cfg.example 2497 2009-08-17 20:27:28Z cromain $
 
 %%% Local Variables:
 %%% mode: erlang