X-Git-Url: https://dehnerts.com/gitweb/?a=blobdiff_plain;f=ejabberd.cfg;fp=ejabberd.cfg;h=428f95c186e11ad936a0b00e03f4549ff14ffaca;hb=a81a8ca091a215273f5d6c07e053e36c694027b2;hp=71a8322606d4b25a235052c8e220a3c7367a44fa;hpb=4e0f1182968ea90bd7a15bd300bc873cb2d1d381;p=sysconfig%2Fejabberd.git diff --git a/ejabberd.cfg b/ejabberd.cfg index 71a8322..428f95c 100644 --- a/ejabberd.cfg +++ b/ejabberd.cfg @@ -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 @@ -37,31 +62,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% 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 @@ -116,6 +116,7 @@ {access, c2s}, {shaper, c2s_shaper}, {max_stanza_size, 65536}, + %%zlib, starttls, {certfile, "/etc/ejabberd/ejabberd.pem"} ]}, @@ -126,6 +127,7 @@ %% {access, c2s}, %% {shaper, c2s_shaper}, %% {max_stanza_size, 65536}, + %% zlib, %% tls, {certfile, "/etc/ejabberd/ejabberd.pem"} %% ]}, @@ -134,7 +136,7 @@ {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}, @@ -185,6 +187,12 @@ %% ]}, {5280, ejabberd_http, [ + %%{request_handlers, + %% [ + %% {["pub", "archive"], mod_http_fileserver} + %% ]}, + %%captcha, + http_bind, http_poll, web_admin ]} @@ -222,6 +230,28 @@ %%{{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 @@ -262,9 +292,11 @@ %%{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: @@ -306,6 +338,13 @@ %% 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: %% @@ -388,6 +427,15 @@ %%{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 @@ -395,6 +443,9 @@ %% 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}]}. @@ -428,9 +479,23 @@ % 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 @@ -440,6 +505,32 @@ %% {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 @@ -453,10 +544,17 @@ {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@"}, @@ -467,7 +565,7 @@ {max_users, 500} ]}, %%{mod_muc_log,[]}, - {mod_offline, []}, + {mod_offline, [{access_max_user_messages, max_user_offline_messages}]}, {mod_privacy, []}, {mod_private, []}, {mod_proxy65, [ @@ -476,7 +574,10 @@ ]}, {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, [ %% @@ -507,8 +608,19 @@ {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