2007-11-26 15:35:53 +01:00
|
|
|
%%%
|
|
|
|
%%% ejabberd configuration file
|
|
|
|
%%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%'
|
2007-11-26 15:35:53 +01:00
|
|
|
|
|
|
|
%%% The parameters used in this configuration file are explained in more detail
|
|
|
|
%%% in the ejabberd Installation and Operation Guide.
|
2010-02-22 13:39:59 +01:00
|
|
|
%%% Please consult the Guide in case of doubts, it is included with
|
2007-11-26 15:35:53 +01:00
|
|
|
%%% your copy of ejabberd, and is also available online at
|
|
|
|
%%% http://www.process-one.net/en/ejabberd/docs/
|
|
|
|
|
|
|
|
%%% 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.
|
|
|
|
%%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%%% - A tuple has a fixed definition, its elements are
|
2007-11-26 15:35:53 +01:00
|
|
|
%%% enclosed in {}, and separated with commas:
|
|
|
|
%%% {loglevel, 4}.
|
|
|
|
%%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%%% - A list can have as many elements as you want,
|
2007-11-26 15:35:53 +01:00
|
|
|
%%% and is enclosed in [], for example:
|
|
|
|
%%% [http_poll, web_admin, tls]
|
|
|
|
%%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%%% - A keyword of ejabberd is a word in lowercase.
|
2010-02-22 13:39:59 +01:00
|
|
|
%%% Strings are enclosed in "" and can contain spaces, dots, ...
|
2007-11-26 15:35:53 +01:00
|
|
|
%%% {language, "en"}.
|
2009-04-22 15:45:57 +02:00
|
|
|
%%% {ldap_rootdn, "dc=example,dc=com"}.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%%% - This term includes a tuple, a keyword, a list, and two strings:
|
2007-11-26 15:35:53 +01:00
|
|
|
%%% {hosts, ["jabber.example.net", "im.example.com"]}.
|
|
|
|
%%%
|
|
|
|
|
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. =======================
|
|
|
|
%%%' OVERRIDE STORED OPTIONS
|
2007-11-26 15:35:53 +01:00
|
|
|
|
|
|
|
%%
|
|
|
|
%% Override the old values stored in the database.
|
|
|
|
%%
|
|
|
|
|
|
|
|
%%
|
|
|
|
%% Override global options (shared by all ejabberd nodes in a cluster).
|
|
|
|
%%
|
|
|
|
%%override_global.
|
|
|
|
|
|
|
|
%%
|
|
|
|
%% Override local options (specific for this particular ejabberd node).
|
|
|
|
%%
|
|
|
|
%%override_local.
|
|
|
|
|
|
|
|
%%
|
|
|
|
%% Remove the Access Control Lists before new ones are added.
|
|
|
|
%%
|
|
|
|
%%override_acls.
|
|
|
|
|
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. =========
|
|
|
|
%%%' DEBUGGING
|
2007-11-26 15:35:53 +01:00
|
|
|
|
|
|
|
%%
|
|
|
|
%% loglevel: Verbosity of log files generated by ejabberd.
|
|
|
|
%% 0: No ejabberd log at all (not recommended)
|
|
|
|
%% 1: Critical
|
|
|
|
%% 2: Error
|
|
|
|
%% 3: Warning
|
|
|
|
%% 4: Info
|
|
|
|
%% 5: Debug
|
|
|
|
%%
|
2006-12-14 19:54:50 +01:00
|
|
|
{loglevel, 4}.
|
2003-01-19 21:17:56 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2008-12-16 18:36:34 +01:00
|
|
|
%% watchdog_admins: Only useful for developers: if an ejabberd process
|
2010-02-22 13:39:59 +01:00
|
|
|
%% consumes a lot of memory, send live notifications to these XMPP
|
2008-12-16 18:36:34 +01:00
|
|
|
%% accounts.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%%{watchdog_admins, ["bob@example.com"]}.
|
2003-02-01 21:21:28 +01:00
|
|
|
|
2003-01-18 20:42:48 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. ================
|
|
|
|
%%%' SERVED HOSTNAMES
|
2004-01-11 21:42:57 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%% hosts: Domains served by ejabberd.
|
|
|
|
%% You can define one or several, for example:
|
|
|
|
%% {hosts, ["example.net", "example.com", "example.org"]}.
|
|
|
|
%%
|
|
|
|
{hosts, ["localhost"]}.
|
2003-01-29 21:21:14 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% route_subdomains: Delegate subdomains to other XMPP servers.
|
2007-11-26 15:35:53 +01:00
|
|
|
%% For example, if this ejabberd serves example.org and you want
|
2010-02-22 13:39:59 +01:00
|
|
|
%% to allow communication with an XMPP server called im.example.org.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%%{route_subdomains, s2s}.
|
2003-01-29 21:21:14 +01:00
|
|
|
|
2003-02-09 20:17:23 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. ===============
|
|
|
|
%%%' LISTENING PORTS
|
2003-02-09 20:17:23 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% listen: The ports ejabberd will listen on, which service each is handled
|
|
|
|
%% by and what options to start it with.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
{listen,
|
|
|
|
[
|
2007-06-25 09:15:30 +02:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
{5222, ejabberd_c2s, [
|
|
|
|
|
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% If TLS is compiled in and you installed a SSL
|
|
|
|
%% certificate, specify the full path to the
|
2007-11-26 15:35:53 +01:00
|
|
|
%% file and uncomment this line:
|
|
|
|
%%
|
|
|
|
%%{certfile, "/path/to/ssl.pem"}, starttls,
|
|
|
|
|
|
|
|
{access, c2s},
|
|
|
|
{shaper, c2s_shaper},
|
|
|
|
{max_stanza_size, 65536}
|
|
|
|
]},
|
|
|
|
|
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% To enable the old SSL connection method on port 5223:
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%%{5223, ejabberd_c2s, [
|
|
|
|
%% {access, c2s},
|
|
|
|
%% {shaper, c2s_shaper},
|
2007-12-17 12:03:22 +01:00
|
|
|
%% {certfile, "/path/to/ssl.pem"}, tls,
|
2007-11-26 15:35:53 +01:00
|
|
|
%% {max_stanza_size, 65536}
|
|
|
|
%% ]},
|
|
|
|
|
|
|
|
{5269, ejabberd_s2s_in, [
|
|
|
|
{shaper, s2s_shaper},
|
|
|
|
{max_stanza_size, 131072}
|
|
|
|
]},
|
|
|
|
|
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% ejabberd_service: Interact with external components (transports, ...)
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%%{8888, ejabberd_service, [
|
2009-04-22 15:45:57 +02:00
|
|
|
%% {access, all},
|
2007-11-26 15:35:53 +01:00
|
|
|
%% {shaper_rule, fast},
|
|
|
|
%% {ip, {127, 0, 0, 1}},
|
|
|
|
%% {hosts, ["icq.example.org", "sms.example.org"],
|
|
|
|
%% [{password, "secret"}]
|
|
|
|
%% }
|
|
|
|
%% ]},
|
|
|
|
|
2009-08-11 13:22:57 +02:00
|
|
|
%%
|
|
|
|
%% ejabberd_stun: Handles STUN Binding requests
|
|
|
|
%%
|
|
|
|
%%{{3478, udp}, ejabberd_stun, []},
|
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
{5280, ejabberd_http, [
|
2009-06-16 15:46:03 +02:00
|
|
|
%%{request_handlers,
|
|
|
|
%% [
|
2009-07-21 21:17:32 +02:00
|
|
|
%% {["pub", "archive"], mod_http_fileserver}
|
2009-06-16 15:46:03 +02:00
|
|
|
%% ]},
|
2009-04-22 15:45:57 +02:00
|
|
|
captcha,
|
2009-06-16 19:48:38 +02:00
|
|
|
http_bind,
|
2009-04-22 15:45:57 +02:00
|
|
|
http_poll,
|
2010-11-05 19:32:52 +01:00
|
|
|
%%register,
|
2007-11-26 15:35:53 +01:00
|
|
|
web_admin
|
|
|
|
]}
|
2003-10-19 18:19:55 +02:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
]}.
|
2003-01-19 21:17:56 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%% s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections.
|
2010-12-08 20:02:31 +01:00
|
|
|
%% Allowed values are: false optional required
|
2007-11-26 15:35:53 +01:00
|
|
|
%% You must specify a certificate file.
|
|
|
|
%%
|
2010-12-08 20:02:31 +01:00
|
|
|
%%{s2s_use_starttls, optional}.
|
2007-11-26 15:35:53 +01:00
|
|
|
|
|
|
|
%%
|
|
|
|
%% s2s_certfile: Specify a certificate file.
|
|
|
|
%%
|
|
|
|
%%{s2s_certfile, "/path/to/ssl.pem"}.
|
|
|
|
|
|
|
|
%%
|
|
|
|
%% domain_certfile: Specify a different certificate for each served hostname.
|
|
|
|
%%
|
|
|
|
%%{domain_certfile, "example.org", "/path/to/example_org.pem"}.
|
|
|
|
%%{domain_certfile, "example.com", "/path/to/example_com.pem"}.
|
|
|
|
|
|
|
|
%%
|
|
|
|
%% S2S whitelist or blacklist
|
|
|
|
%%
|
|
|
|
%% Default s2s policy for undefined hosts.
|
|
|
|
%%
|
|
|
|
%%{s2s_default_policy, allow}.
|
|
|
|
|
|
|
|
%%
|
|
|
|
%% Allow or deny communication with specific servers.
|
|
|
|
%%
|
|
|
|
%%{{s2s_host, "goodhost.org"}, allow}.
|
|
|
|
%%{{s2s_host, "badhost.org"}, deny}.
|
|
|
|
|
2008-12-26 12:45:08 +01:00
|
|
|
%%
|
|
|
|
%% Outgoing S2S options
|
|
|
|
%%
|
|
|
|
%% Preferred address families (which to try first) and connect timeout
|
|
|
|
%% in milliseconds.
|
|
|
|
%%
|
|
|
|
%%{outgoing_s2s_options, [ipv4, ipv6], 10000}.
|
2007-11-26 15:35:53 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
|
|
|
|
%%%. ==============
|
|
|
|
%%%' AUTHENTICATION
|
2007-11-26 15:35:53 +01:00
|
|
|
|
|
|
|
%%
|
|
|
|
%% auth_method: Method used to authenticate the users.
|
|
|
|
%% The default method is the internal.
|
2009-04-22 15:45:57 +02:00
|
|
|
%% If you want to use a different method,
|
2007-11-26 15:35:53 +01:00
|
|
|
%% comment this line and enable the correct ones.
|
|
|
|
%%
|
|
|
|
{auth_method, internal}.
|
2003-02-01 21:21:28 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%% Authentication using external script
|
|
|
|
%% Make sure the script is executable by ejabberd.
|
|
|
|
%%
|
|
|
|
%%{auth_method, external}.
|
|
|
|
%%{extauth_program, "/path/to/authentication/script"}.
|
|
|
|
|
2007-11-26 22:29:14 +01:00
|
|
|
%%
|
|
|
|
%% Authentication using ODBC
|
|
|
|
%% Remember to setup a database in the next section.
|
|
|
|
%%
|
|
|
|
%%{auth_method, odbc}.
|
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%% Authentication using PAM
|
|
|
|
%%
|
|
|
|
%%{auth_method, pam}.
|
|
|
|
%%{pam_service, "pamservicename"}.
|
|
|
|
|
|
|
|
%%
|
|
|
|
%% Authentication using LDAP
|
|
|
|
%%
|
|
|
|
%%{auth_method, ldap}.
|
|
|
|
%%
|
|
|
|
%% List of LDAP servers:
|
2009-04-22 15:45:57 +02:00
|
|
|
%%{ldap_servers, ["localhost"]}.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2009-05-25 19:15:48 +02:00
|
|
|
%% Encryption of connection to LDAP servers:
|
|
|
|
%%{ldap_encrypt, none}.
|
|
|
|
%%{ldap_encrypt, tls}.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% Port to connect to on LDAP servers:
|
2009-05-25 19:15:48 +02:00
|
|
|
%%{ldap_port, 389}.
|
|
|
|
%%{ldap_port, 636}.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%% LDAP manager:
|
2009-04-22 15:45:57 +02:00
|
|
|
%%{ldap_rootdn, "dc=example,dc=com"}.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% Password of LDAP manager:
|
2009-04-22 15:45:57 +02:00
|
|
|
%%{ldap_password, "******"}.
|
2009-05-25 19:15:48 +02:00
|
|
|
%%
|
|
|
|
%% Search base of LDAP directory:
|
|
|
|
%%{ldap_base, "dc=example,dc=com"}.
|
|
|
|
%%
|
|
|
|
%% LDAP attribute that holds user ID:
|
|
|
|
%%{ldap_uids, [{"mail", "%u@mail.example.org"}]}.
|
|
|
|
%%
|
|
|
|
%% LDAP filter:
|
|
|
|
%%{ldap_filter, "(objectClass=shadowAccount)"}.
|
2007-11-26 15:35:53 +01:00
|
|
|
|
|
|
|
%%
|
|
|
|
%% Anonymous login support:
|
|
|
|
%% auth_method: anonymous
|
|
|
|
%% anonymous_protocol: sasl_anon | login_anon | both
|
|
|
|
%% allow_multiple_connections: true | false
|
|
|
|
%%
|
|
|
|
%%{host_config, "public.example.org", [{auth_method, anonymous},
|
|
|
|
%% {allow_multiple_connections, false},
|
|
|
|
%% {anonymous_protocol, sasl_anon}]}.
|
|
|
|
%%
|
|
|
|
%% To use both anonymous and internal authentication:
|
|
|
|
%%
|
|
|
|
%%{host_config, "public.example.org", [{auth_method, [internal, anonymous]}]}.
|
2003-02-09 20:17:23 +01:00
|
|
|
|
2003-11-10 22:25:36 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. ==============
|
|
|
|
%%%' DATABASE SETUP
|
2007-11-26 22:29:14 +01:00
|
|
|
|
2010-02-22 13:39:59 +01:00
|
|
|
%% ejabberd by default uses the internal Mnesia database,
|
|
|
|
%% so you do not necessarily need this section.
|
2007-11-26 22:29:14 +01:00
|
|
|
%% This section provides configuration examples in case
|
|
|
|
%% you want to use other database backends.
|
2010-02-22 13:39:59 +01:00
|
|
|
%% Please consult the ejabberd Guide for details on database creation.
|
2007-11-26 22:29:14 +01:00
|
|
|
|
|
|
|
%%
|
|
|
|
%% MySQL server:
|
|
|
|
%%
|
|
|
|
%%{odbc_server, {mysql, "server", "database", "username", "password"}}.
|
|
|
|
%%
|
|
|
|
%% If you want to specify the port:
|
|
|
|
%%{odbc_server, {mysql, "server", 1234, "database", "username", "password"}}.
|
|
|
|
|
|
|
|
%%
|
|
|
|
%% PostgreSQL server:
|
|
|
|
%%
|
|
|
|
%%{odbc_server, {pgsql, "server", "database", "username", "password"}}.
|
|
|
|
%%
|
|
|
|
%% If you want to specify the port:
|
|
|
|
%%{odbc_server, {pgsql, "server", 1234, "database", "username", "password"}}.
|
|
|
|
%%
|
|
|
|
%% If you use PostgreSQL, have a large database, and need a
|
|
|
|
%% faster but inexact replacement for "select count(*) from users"
|
|
|
|
%%
|
|
|
|
%%{pgsql_users_number_estimate, true}.
|
2003-02-09 20:17:23 +01:00
|
|
|
|
2007-11-26 22:29:14 +01:00
|
|
|
%%
|
|
|
|
%% ODBC compatible or MSSQL server:
|
|
|
|
%%
|
|
|
|
%%{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.
|
2003-11-10 22:25:36 +01:00
|
|
|
|
2008-02-08 19:28:36 +01:00
|
|
|
%%
|
|
|
|
%% Number of connections to open to the database for each virtual host
|
|
|
|
%%
|
|
|
|
%%{odbc_pool_size, 10}.
|
|
|
|
|
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% Interval to make a dummy SQL request to keep the connections to the
|
|
|
|
%% database alive. Specify in seconds: for example 28800 means 8 hours
|
2008-02-08 19:28:36 +01:00
|
|
|
%%
|
|
|
|
%%{odbc_keepalive_interval, undefined}.
|
|
|
|
|
2003-03-27 21:55:09 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. ===============
|
|
|
|
%%%' TRAFFIC SHAPERS
|
2004-05-17 22:36:41 +02:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% The "normal" shaper limits traffic speed to 1000 B/s
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
{shaper, normal, {maxrate, 1000}}.
|
2004-01-11 21:42:57 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% The "fast" shaper limits traffic speed to 50000 B/s
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
{shaper, fast, {maxrate, 50000}}.
|
2003-11-23 21:11:21 +01:00
|
|
|
|
2010-02-18 07:48:11 +01:00
|
|
|
%%
|
|
|
|
%% This option specifies the maximum number of elements in the queue
|
2010-02-22 13:39:59 +01:00
|
|
|
%% of the FSM. Refer to the documentation for details.
|
2010-02-18 07:48:11 +01:00
|
|
|
%%
|
|
|
|
{max_fsm_queue, 1000}.
|
|
|
|
|
2003-11-23 21:11:21 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. ====================
|
|
|
|
%%%' ACCESS CONTROL LISTS
|
2003-11-23 21:11:21 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2009-09-23 14:37:58 +02:00
|
|
|
%% The 'admin' ACL grants administrative privileges to XMPP accounts.
|
2010-02-22 13:39:59 +01:00
|
|
|
%% You can put here as many accounts as you want.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%%{acl, admin, {user, "aleksey", "localhost"}}.
|
|
|
|
%%{acl, admin, {user, "ermine", "example.org"}}.
|
2004-10-08 22:40:29 +02:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%% Blocked users
|
|
|
|
%%
|
|
|
|
%%{acl, blocked, {user, "baduser", "example.org"}}.
|
|
|
|
%%{acl, blocked, {user, "test"}}.
|
2007-10-01 12:33:03 +02:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%% Local users: don't modify this line.
|
|
|
|
%%
|
|
|
|
{acl, local, {user_regexp, ""}}.
|
2005-04-18 20:41:57 +02:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%% More examples of ACLs
|
|
|
|
%%
|
|
|
|
%%{acl, jabberorg, {server, "jabber.org"}}.
|
|
|
|
%%{acl, aleksey, {user, "aleksey", "jabber.ru"}}.
|
|
|
|
%%{acl, test, {user_regexp, "^test"}}.
|
|
|
|
%%{acl, test, {user_glob, "test*"}}.
|
2007-05-12 20:09:38 +02:00
|
|
|
|
2008-03-04 11:36:57 +01:00
|
|
|
%%
|
|
|
|
%% Define specific ACLs in a virtual host.
|
|
|
|
%%
|
|
|
|
%%{host_config, "localhost",
|
|
|
|
%% [
|
|
|
|
%% {acl, admin, {user, "bob-local", "localhost"}}
|
|
|
|
%% ]
|
|
|
|
%%}.
|
|
|
|
|
2003-11-23 21:11:21 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. ============
|
|
|
|
%%%' ACCESS RULES
|
2003-02-09 20:17:23 +01:00
|
|
|
|
2008-04-29 18:44:12 +02:00
|
|
|
%% Maximum number of simultaneous sessions allowed for a single user:
|
2006-11-23 07:34:05 +01:00
|
|
|
{access, max_user_sessions, [{10, all}]}.
|
2006-05-22 12:17:22 +02:00
|
|
|
|
2009-06-15 19:43:18 +02:00
|
|
|
%% Maximum number of offline messages that users can have:
|
2010-02-22 13:39:59 +01:00
|
|
|
{access, max_user_offline_messages, [{5000, admin}, {100, all}]}.
|
2009-06-15 19:43:18 +02:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%% This rule allows access only for local users:
|
|
|
|
{access, local, [{allow, local}]}.
|
2006-04-07 02:39:24 +02:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%% Only non-blocked users can use c2s connections:
|
|
|
|
{access, c2s, [{deny, blocked},
|
|
|
|
{allow, all}]}.
|
2004-07-10 00:34:26 +02:00
|
|
|
|
2010-02-22 13:39:59 +01:00
|
|
|
%% For C2S connections, all users except admins use the "normal" shaper
|
2007-11-26 15:35:53 +01:00
|
|
|
{access, c2s_shaper, [{none, admin},
|
|
|
|
{normal, all}]}.
|
|
|
|
|
2010-02-22 13:39:59 +01:00
|
|
|
%% All S2S connections use the "fast" shaper
|
2007-11-26 15:35:53 +01:00
|
|
|
{access, s2s_shaper, [{fast, all}]}.
|
|
|
|
|
|
|
|
%% Only admins can send announcement messages:
|
|
|
|
{access, announce, [{allow, admin}]}.
|
2003-01-07 20:10:35 +01:00
|
|
|
|
2010-02-22 13:39:59 +01:00
|
|
|
%% Only admins can use the configuration interface:
|
2007-11-26 15:35:53 +01:00
|
|
|
{access, configure, [{allow, admin}]}.
|
2005-10-25 03:08:37 +02:00
|
|
|
|
2010-02-22 13:39:59 +01:00
|
|
|
%% Admins of this server are also admins of the MUC service:
|
2007-11-26 15:35:53 +01:00
|
|
|
{access, muc_admin, [{allow, admin}]}.
|
2005-10-25 03:08:37 +02:00
|
|
|
|
2009-10-19 19:02:37 +02:00
|
|
|
%% Only accounts of the local ejabberd server can create rooms:
|
|
|
|
{access, muc_create, [{allow, local}]}.
|
|
|
|
|
2010-02-22 13:39:59 +01:00
|
|
|
%% All users are allowed to use the MUC service:
|
2007-11-26 15:35:53 +01:00
|
|
|
{access, muc, [{allow, all}]}.
|
2007-07-18 19:42:53 +02:00
|
|
|
|
2010-02-22 13:39:59 +01:00
|
|
|
%% Only accounts on the local ejabberd server can create Pubsub nodes:
|
2009-10-19 19:02:37 +02:00
|
|
|
{access, pubsub_createnode, [{allow, local}]}.
|
2008-06-13 19:51:01 +02:00
|
|
|
|
2008-04-29 18:44:12 +02:00
|
|
|
%% In-band registration allows registration of any possible username.
|
2007-11-26 15:35:53 +01:00
|
|
|
%% To disable in-band registration, replace 'allow' with 'deny'.
|
|
|
|
{access, register, [{allow, all}]}.
|
2003-10-11 19:39:36 +02:00
|
|
|
|
2010-02-22 13:39:59 +01:00
|
|
|
%% By default the frequency of account registrations from the same IP
|
|
|
|
%% is limited to 1 account every 10 minutes. To disable, specify: infinity
|
2008-06-13 19:51:01 +02:00
|
|
|
%%{registration_timeout, 600}.
|
2003-01-29 18:12:23 +01:00
|
|
|
|
2008-03-04 11:36:57 +01:00
|
|
|
%%
|
2010-02-22 13:39:59 +01:00
|
|
|
%% Define specific Access Rules in a virtual host.
|
2008-03-04 11:36:57 +01:00
|
|
|
%%
|
|
|
|
%%{host_config, "localhost",
|
|
|
|
%% [
|
|
|
|
%% {access, c2s, [{allow, admin}, {deny, all}]},
|
|
|
|
%% {access, register, [{deny, all}]}
|
|
|
|
%% ]
|
|
|
|
%%}.
|
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. ================
|
|
|
|
%%%' DEFAULT LANGUAGE
|
2009-04-22 12:21:55 +02:00
|
|
|
|
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%% language: Default language used for server messages.
|
2009-04-22 12:21:55 +02:00
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
{language, "en"}.
|
2009-04-22 12:21:55 +02:00
|
|
|
|
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%% Set a different default language in a virtual host.
|
2009-04-22 12:21:55 +02:00
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%%{host_config, "localhost",
|
|
|
|
%% [{language, "ru"}]
|
|
|
|
%%}.
|
2009-04-22 12:21:55 +02:00
|
|
|
|
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. =======
|
|
|
|
%%%' CAPTCHA
|
2007-11-26 15:35:53 +01:00
|
|
|
|
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%% Full path to a script that generates the image.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%%{captcha_cmd, "/lib/ejabberd/priv/bin/captcha.sh"}.
|
2007-11-26 15:35:53 +01:00
|
|
|
|
2008-03-04 11:36:57 +01:00
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%% Host part of the URL sent to the user.
|
2008-03-04 11:36:57 +01:00
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%%{captcha_host, "example.org:5280"}.
|
2008-03-04 11:36:57 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%. =======
|
|
|
|
%%%' MODULES
|
2007-11-26 15:35:53 +01:00
|
|
|
|
|
|
|
%%
|
|
|
|
%% Modules enabled in all ejabberd virtual hosts.
|
|
|
|
%%
|
2004-05-17 22:36:41 +02:00
|
|
|
{modules,
|
|
|
|
[
|
2007-11-26 15:35:53 +01:00
|
|
|
{mod_adhoc, []},
|
2008-03-04 10:07:43 +01:00
|
|
|
{mod_announce, [{access, announce}]}, % recommends mod_adhoc
|
2009-04-22 15:45:57 +02:00
|
|
|
{mod_caps, []},
|
2007-11-26 15:35:53 +01:00
|
|
|
{mod_configure,[]}, % requires mod_adhoc
|
|
|
|
{mod_disco, []},
|
|
|
|
%%{mod_echo, [{host, "echo.localhost"}]},
|
|
|
|
{mod_irc, []},
|
2009-06-16 19:48:38 +02:00
|
|
|
{mod_http_bind, []},
|
2009-06-16 15:46:03 +02:00
|
|
|
%%{mod_http_fileserver, [
|
2010-02-22 13:39:59 +01:00
|
|
|
%% {docroot, "/var/www"},
|
2009-06-16 15:46:03 +02:00
|
|
|
%% {accesslog, "/var/log/ejabberd/access.log"}
|
|
|
|
%% ]},
|
2007-11-26 15:35:53 +01:00
|
|
|
{mod_last, []},
|
|
|
|
{mod_muc, [
|
|
|
|
%%{host, "conference.@HOST@"},
|
|
|
|
{access, muc},
|
2009-10-19 19:02:37 +02:00
|
|
|
{access_create, muc_create},
|
|
|
|
{access_persistent, muc_create},
|
2007-11-26 15:35:53 +01:00
|
|
|
{access_admin, muc_admin}
|
|
|
|
]},
|
|
|
|
%%{mod_muc_log,[]},
|
2009-06-15 19:43:18 +02:00
|
|
|
{mod_offline, [{access_max_user_messages, max_user_offline_messages}]},
|
2009-07-30 13:45:54 +02:00
|
|
|
{mod_ping, []},
|
2007-11-26 15:35:53 +01:00
|
|
|
{mod_privacy, []},
|
|
|
|
{mod_private, []},
|
|
|
|
%%{mod_proxy65,[]},
|
2009-05-29 00:30:43 +02:00
|
|
|
{mod_pubsub, [
|
2007-12-06 12:13:29 +01:00
|
|
|
{access_createnode, pubsub_createnode},
|
2010-02-22 13:39:59 +01:00
|
|
|
{ignore_pep_from_offline, true}, % reduces resource comsumption, but XEP incompliant
|
2010-01-04 12:49:00 +01:00
|
|
|
%%{ignore_pep_from_offline, false}, % XEP compliant, but increases resource comsumption
|
2009-05-29 00:30:43 +02:00
|
|
|
{last_item_cache, false},
|
2009-08-17 22:27:28 +02:00
|
|
|
{plugins, ["flat", "hometree", "pep"]} % pep requires mod_caps
|
2007-12-06 12:13:29 +01:00
|
|
|
]},
|
2007-11-26 15:35:53 +01:00
|
|
|
{mod_register, [
|
2010-10-25 18:57:39 +02:00
|
|
|
%%
|
|
|
|
%% Protect In-Band account registrations with CAPTCHA.
|
|
|
|
%%
|
2010-11-12 21:24:01 +01:00
|
|
|
%%{captcha_protected, true},
|
2010-10-25 18:57:39 +02:00
|
|
|
|
|
|
|
%%
|
|
|
|
%% Set the minimum informational entropy for passwords.
|
|
|
|
%%
|
2010-11-12 21:24:01 +01:00
|
|
|
%%{password_strength, 32},
|
2010-10-25 18:57:39 +02:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%% After successful registration, the user receives
|
2007-11-26 15:35:53 +01:00
|
|
|
%% a message with this subject and body.
|
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
{welcome_message, {"Welcome!",
|
2009-09-23 14:37:58 +02:00
|
|
|
"Hi.\nWelcome to this XMPP server."}},
|
2007-11-26 15:35:53 +01:00
|
|
|
|
|
|
|
%%
|
2009-04-22 15:45:57 +02:00
|
|
|
%% When a user registers, send a notification to
|
2009-09-23 14:37:58 +02:00
|
|
|
%% these XMPP accounts.
|
2007-11-26 15:35:53 +01:00
|
|
|
%%
|
|
|
|
%%{registration_watchers, ["admin1@example.org"]},
|
|
|
|
|
2010-11-05 19:00:16 +01:00
|
|
|
{ip_access, [{allow, "127.0.0.0/8"},
|
|
|
|
{deny, "0.0.0.0/0"}]},
|
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
{access, register}
|
|
|
|
]},
|
2010-11-05 19:32:52 +01:00
|
|
|
%%{mod_register_web, [
|
2010-11-04 22:34:18 +01:00
|
|
|
%%
|
|
|
|
%% When a user registers, send a notification to
|
|
|
|
%% these XMPP accounts.
|
|
|
|
%%
|
|
|
|
%%{registration_watchers, ["admin1@example.org"]}
|
2010-11-05 19:32:52 +01:00
|
|
|
%% ]},
|
2007-11-26 15:35:53 +01:00
|
|
|
{mod_roster, []},
|
|
|
|
%%{mod_service_log,[]},
|
|
|
|
{mod_shared_roster,[]},
|
|
|
|
{mod_stats, []},
|
|
|
|
{mod_time, []},
|
|
|
|
{mod_vcard, []},
|
|
|
|
{mod_version, []}
|
2004-05-17 22:36:41 +02:00
|
|
|
]}.
|
2003-01-07 20:10:35 +01:00
|
|
|
|
2008-03-04 11:36:57 +01:00
|
|
|
%%
|
|
|
|
%% Enable modules with custom options in a specific virtual host
|
|
|
|
%%
|
|
|
|
%%{host_config, "localhost",
|
|
|
|
%% [{{add, modules},
|
|
|
|
%% [
|
|
|
|
%% {mod_echo, [{host, "mirror.localhost"}]}
|
|
|
|
%% ]
|
|
|
|
%% }
|
|
|
|
%% ]}.
|
|
|
|
|
2003-01-07 20:10:35 +01:00
|
|
|
|
2009-04-22 15:45:57 +02:00
|
|
|
%%%.
|
|
|
|
%%%'
|
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%% $Id$
|
2003-01-07 20:10:35 +01:00
|
|
|
|
2007-11-26 15:35:53 +01:00
|
|
|
%%% Local Variables:
|
|
|
|
%%% mode: erlang
|
|
|
|
%%% End:
|
2009-04-22 15:45:57 +02:00
|
|
|
%%% vim: set filetype=erlang tabstop=8 foldmarker=%%%',%%%. foldmethod=marker:
|