2013-08-12 14:25:05 +02:00
|
|
|
###
|
2015-05-22 12:42:24 +02:00
|
|
|
###' ejabberd configuration file
|
2013-08-12 14:25:05 +02:00
|
|
|
###
|
|
|
|
###
|
|
|
|
|
|
|
|
### The parameters used in this configuration file are explained in more detail
|
|
|
|
### in the ejabberd Installation and Operation Guide.
|
|
|
|
### Please consult the Guide in case of doubts, it is included with
|
|
|
|
### your copy of ejabberd, and is also available online at
|
|
|
|
### http://www.process-one.net/en/ejabberd/docs/
|
|
|
|
|
|
|
|
### The configuration file is written in YAML.
|
|
|
|
### Refer to http://en.wikipedia.org/wiki/YAML for the brief description.
|
|
|
|
### However, ejabberd treats different literals as different types:
|
|
|
|
###
|
|
|
|
### - unquoted or single-quoted strings. They are called "atoms".
|
|
|
|
### Example: dog, 'Jupiter', '3.14159', YELLOW
|
|
|
|
###
|
|
|
|
### - numeric literals. Example: 3, -45.0, .0
|
|
|
|
###
|
|
|
|
### - quoted or folded strings.
|
|
|
|
### Examples of quoted string: "Lizzard", "orange".
|
|
|
|
### Example of folded string:
|
|
|
|
### > Art thou not Romeo,
|
|
|
|
### and a Montague?
|
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. =======
|
|
|
|
###' LOGGING
|
2013-08-12 14:25:05 +02: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
|
|
|
|
##
|
|
|
|
loglevel: 4
|
|
|
|
|
2014-07-02 10:41:12 +02:00
|
|
|
##
|
|
|
|
## rotation: Describe how to rotate logs. Either size and/or date can trigger
|
|
|
|
## log rotation. Setting count to N keeps N rotated logs. Setting count to 0
|
|
|
|
## does not disable rotation, it instead rotates the file and keeps no previous
|
|
|
|
## versions around. Setting size to X rotate log when it reaches X bytes.
|
|
|
|
## To disable rotation set the size to 0 and the date to ""
|
2014-07-20 07:29:45 +02:00
|
|
|
## Date syntax is taken from the syntax newsyslog uses in newsyslog.conf.
|
2014-07-02 10:41:12 +02:00
|
|
|
## Some examples:
|
|
|
|
## $D0 rotate every night at midnight
|
|
|
|
## $D23 rotate every day at 23:00 hr
|
|
|
|
## $W0D23 rotate every week on Sunday at 23:00 hr
|
|
|
|
## $W5D16 rotate every week on Friday at 16:00 hr
|
|
|
|
## $M1D0 rotate on the first day of every month at midnight
|
|
|
|
## $M5D6 rotate on every 5th day of the month at 6:00 hr
|
|
|
|
##
|
|
|
|
log_rotate_size: 10485760
|
|
|
|
log_rotate_date: ""
|
|
|
|
log_rotate_count: 1
|
|
|
|
|
|
|
|
##
|
|
|
|
## overload protection: If you want to limit the number of messages per second
|
2014-07-20 07:36:24 +02:00
|
|
|
## allowed from error_logger, which is a good idea if you want to avoid a flood
|
2014-07-02 10:41:12 +02:00
|
|
|
## of messages when system is overloaded, you can set a limit.
|
|
|
|
## 100 is ejabberd's default.
|
|
|
|
log_rate_limit: 100
|
|
|
|
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## watchdog_admins: Only useful for developers: if an ejabberd process
|
|
|
|
## consumes a lot of memory, send live notifications to these XMPP
|
|
|
|
## accounts.
|
|
|
|
##
|
|
|
|
## watchdog_admins:
|
|
|
|
## - "bob@example.com"
|
|
|
|
|
2015-06-15 14:57:07 +02:00
|
|
|
###. ===============
|
|
|
|
###' NODE PARAMETERS
|
|
|
|
|
|
|
|
##
|
|
|
|
## net_ticktime: Specifies net_kernel tick time in seconds. This options must have
|
|
|
|
## identical value on all nodes, and in most cases shouldn't be changed at all from
|
|
|
|
## default value.
|
|
|
|
##
|
|
|
|
## net_ticktime: 60
|
2013-08-12 14:25:05 +02:00
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. ================
|
|
|
|
###' SERVED HOSTNAMES
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## hosts: Domains served by ejabberd.
|
|
|
|
## You can define one or several, for example:
|
2017-09-30 11:10:34 +02:00
|
|
|
## hosts:
|
2013-08-12 14:25:05 +02:00
|
|
|
## - "example.net"
|
|
|
|
## - "example.com"
|
|
|
|
## - "example.org"
|
|
|
|
##
|
|
|
|
hosts:
|
|
|
|
- "localhost"
|
|
|
|
|
|
|
|
##
|
|
|
|
## route_subdomains: Delegate subdomains to other XMPP servers.
|
|
|
|
## For example, if this ejabberd serves example.org and you want
|
|
|
|
## to allow communication with an XMPP server called im.example.org.
|
|
|
|
##
|
|
|
|
## route_subdomains: s2s
|
|
|
|
|
2017-11-20 11:34:16 +01:00
|
|
|
###. ============
|
|
|
|
###' Certificates
|
|
|
|
|
|
|
|
## List all available PEM files containing certificates for your domains,
|
|
|
|
## chains of certificates or certificate keys. Full chains will be built
|
|
|
|
## automatically by ejabberd.
|
|
|
|
##
|
|
|
|
## certfiles:
|
|
|
|
## - "/etc/letsencrypt/live/example.org/*.pem"
|
|
|
|
## - "/etc/letsencrypt/live/example.com/*.pem"
|
2017-11-20 13:02:24 +01:00
|
|
|
##
|
|
|
|
## If your system provides only a single CA file (CentOS/FreeBSD):
|
2017-12-07 12:58:58 +01:00
|
|
|
## ca_file: "/etc/ssl/certs/ca-bundle.pem"
|
2017-11-20 11:34:16 +01:00
|
|
|
|
|
|
|
###. =================
|
|
|
|
###' TLS configuration
|
2013-08-12 14:25:05 +02:00
|
|
|
|
2018-01-06 11:46:02 +01:00
|
|
|
## Note that the following configuration is the default
|
|
|
|
## configuration of the TLS driver, so you don't need to
|
|
|
|
## uncomment it.
|
|
|
|
##
|
2017-04-07 11:02:11 +02:00
|
|
|
## define_macro:
|
2017-11-20 11:34:16 +01:00
|
|
|
## 'TLS_CIPHERS': "HIGH:!aNULL:!eNULL:!3DES:@STRENGTH"
|
|
|
|
## 'TLS_OPTIONS':
|
2018-01-10 11:24:09 +01:00
|
|
|
## - "no_sslv3"
|
|
|
|
## - "cipher_server_preference"
|
|
|
|
## - "no_compression"
|
2017-11-24 17:17:48 +01:00
|
|
|
## 'DH_FILE': "/path/to/dhparams.pem" # generated with: openssl dhparam -out dhparams.pem 2048
|
2017-11-20 11:34:16 +01:00
|
|
|
##
|
|
|
|
## c2s_dhfile: 'DH_FILE'
|
|
|
|
## s2s_dhfile: 'DH_FILE'
|
|
|
|
## c2s_ciphers: 'TLS_CIPHERS'
|
|
|
|
## s2s_ciphers: 'TLS_CIPHERS'
|
|
|
|
## c2s_protocol_options: 'TLS_OPTIONS'
|
|
|
|
## s2s_protocol_options: 'TLS_OPTIONS'
|
|
|
|
|
|
|
|
###. ===============
|
|
|
|
###' LISTENING PORTS
|
2017-04-07 11:02:11 +02:00
|
|
|
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## listen: The ports ejabberd will listen on, which service each is handled
|
|
|
|
## by and what options to start it with.
|
|
|
|
##
|
2017-09-30 11:10:34 +02:00
|
|
|
listen:
|
2017-09-30 11:12:20 +02:00
|
|
|
-
|
2013-08-12 14:25:05 +02:00
|
|
|
port: 5222
|
2017-04-07 11:02:11 +02:00
|
|
|
ip: "::"
|
2013-08-12 14:25:05 +02:00
|
|
|
module: ejabberd_c2s
|
|
|
|
##
|
|
|
|
## If TLS is compiled in and you installed a SSL
|
2017-11-20 11:34:16 +01:00
|
|
|
## certificate, uncomment this line:
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## starttls: true
|
2014-04-01 21:57:33 +02:00
|
|
|
##
|
2014-07-27 12:44:34 +02:00
|
|
|
## To enforce TLS encryption for client connections,
|
|
|
|
## use this instead of the "starttls" option:
|
|
|
|
##
|
|
|
|
## starttls_required: true
|
|
|
|
##
|
2017-04-07 11:02:11 +02:00
|
|
|
## Stream compression
|
|
|
|
##
|
|
|
|
## zlib: true
|
2014-04-01 21:57:33 +02:00
|
|
|
##
|
2013-08-12 14:25:05 +02:00
|
|
|
max_stanza_size: 65536
|
|
|
|
shaper: c2s_shaper
|
|
|
|
access: c2s
|
2017-09-30 11:12:20 +02:00
|
|
|
-
|
2013-08-12 14:25:05 +02:00
|
|
|
port: 5269
|
2017-04-07 11:02:11 +02:00
|
|
|
ip: "::"
|
2013-08-12 14:25:05 +02:00
|
|
|
module: ejabberd_s2s_in
|
2017-09-30 11:12:20 +02:00
|
|
|
-
|
2017-04-07 11:02:11 +02:00
|
|
|
port: 5280
|
|
|
|
ip: "::"
|
|
|
|
module: ejabberd_http
|
|
|
|
request_handlers:
|
2017-06-23 16:47:14 +02:00
|
|
|
"/ws": ejabberd_http_ws
|
|
|
|
"/bosh": mod_bosh
|
2017-04-07 11:02:11 +02:00
|
|
|
"/api": mod_http_api
|
|
|
|
## "/pub/archive": mod_http_fileserver
|
|
|
|
web_admin: true
|
|
|
|
## register: true
|
|
|
|
captcha: true
|
2018-01-12 08:27:33 +01:00
|
|
|
##
|
|
|
|
## Direct-TLS for C2S (XEP-0368). A good practice is to forward
|
|
|
|
## traffic from port 443 to this port, possibly multiplexing it
|
|
|
|
## with HTTP using e.g. sslh [https://wiki.xmpp.org/web/Tech_pages/XEP-0368],
|
|
|
|
## so modern clients can bypass restrictive firewalls (in airports, hotels, etc.).
|
|
|
|
##
|
|
|
|
## -
|
|
|
|
## port: 5223
|
|
|
|
## ip: "::"
|
|
|
|
## module: ejabberd_c2s
|
|
|
|
## tls: true
|
|
|
|
## max_stanza_size: 65536
|
|
|
|
## shaper: c2s_shaper
|
|
|
|
## access: c2s
|
|
|
|
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## ejabberd_service: Interact with external components (transports, ...)
|
|
|
|
##
|
2017-09-30 11:12:20 +02:00
|
|
|
## -
|
2013-08-12 14:25:05 +02:00
|
|
|
## port: 8888
|
2017-04-07 11:02:11 +02:00
|
|
|
## ip: "::"
|
2013-08-12 14:25:05 +02:00
|
|
|
## module: ejabberd_service
|
|
|
|
## access: all
|
|
|
|
## shaper_rule: fast
|
|
|
|
## ip: "127.0.0.1"
|
2017-09-30 11:10:34 +02:00
|
|
|
## privilege_access:
|
2016-09-07 14:34:31 +02:00
|
|
|
## roster: "both"
|
|
|
|
## message: "outgoing"
|
|
|
|
## presence: "roster"
|
|
|
|
## delegations:
|
|
|
|
## "urn:xmpp:mam:1":
|
|
|
|
## filtering: ["node"]
|
|
|
|
## "http://jabber.org/protocol/pubsub":
|
|
|
|
## filtering: []
|
2013-08-12 14:25:05 +02:00
|
|
|
## hosts:
|
|
|
|
## "icq.example.org":
|
|
|
|
## password: "secret"
|
|
|
|
## "sms.example.org":
|
|
|
|
## password: "secret"
|
|
|
|
|
|
|
|
##
|
|
|
|
## ejabberd_stun: Handles STUN Binding requests
|
|
|
|
##
|
2017-09-30 11:12:20 +02:00
|
|
|
## -
|
2013-08-12 14:25:05 +02:00
|
|
|
## port: 3478
|
|
|
|
## transport: udp
|
|
|
|
## module: ejabberd_stun
|
|
|
|
|
|
|
|
##
|
|
|
|
## To handle XML-RPC requests that provide admin credentials:
|
|
|
|
##
|
2017-09-30 11:12:20 +02:00
|
|
|
## -
|
2013-08-12 14:25:05 +02:00
|
|
|
## port: 4560
|
2017-04-07 11:02:11 +02:00
|
|
|
## ip: "::"
|
2013-08-12 14:25:05 +02:00
|
|
|
## module: ejabberd_xmlrpc
|
2017-12-11 10:27:48 +01:00
|
|
|
## maxsessions: 10
|
|
|
|
## timeout: 5000
|
|
|
|
## access_commands:
|
|
|
|
## admin:
|
|
|
|
## commands: all
|
|
|
|
## options: []
|
2017-04-07 11:02:11 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## To enable secure http upload
|
|
|
|
##
|
2017-09-30 11:12:20 +02:00
|
|
|
## -
|
2017-04-07 11:02:11 +02:00
|
|
|
## port: 5444
|
|
|
|
## ip: "::"
|
|
|
|
## module: ejabberd_http
|
|
|
|
## request_handlers:
|
|
|
|
## "": mod_http_upload
|
|
|
|
## tls: true
|
2018-01-13 22:38:01 +01:00
|
|
|
## protocol_options: 'TLS_OPTIONS'
|
|
|
|
## dhfile: 'DH_FILE'
|
|
|
|
## ciphers: 'TLS_CIPHERS'
|
2017-04-07 11:02:11 +02:00
|
|
|
|
|
|
|
## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text
|
|
|
|
## password storage (see auth_password_format option).
|
|
|
|
## disable_sasl_mechanisms: "digest-md5"
|
2013-08-12 14:25:05 +02:00
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. ==================
|
|
|
|
###' S2S GLOBAL OPTIONS
|
|
|
|
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
2017-03-20 19:48:31 +01:00
|
|
|
## s2s_use_starttls: Enable STARTTLS for S2S connections.
|
2017-09-02 10:44:11 +02:00
|
|
|
## Allowed values are: false, optional or required
|
2017-10-31 22:20:27 +01:00
|
|
|
## You must specify 'certfiles' option
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
2017-12-11 10:27:48 +01:00
|
|
|
## s2s_use_starttls: optional
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## S2S whitelist or blacklist
|
|
|
|
##
|
|
|
|
## Default s2s policy for undefined hosts.
|
|
|
|
##
|
2014-07-22 15:06:19 +02:00
|
|
|
## s2s_access: s2s
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## Outgoing S2S options
|
|
|
|
##
|
|
|
|
## Preferred address families (which to try first) and connect timeout
|
2017-06-21 16:30:51 +02:00
|
|
|
## in seconds.
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## outgoing_s2s_families:
|
|
|
|
## - ipv4
|
|
|
|
## - ipv6
|
2017-06-21 16:30:51 +02:00
|
|
|
## outgoing_s2s_timeout: 190
|
2013-08-12 14:25:05 +02:00
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. ==============
|
|
|
|
###' AUTHENTICATION
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## auth_method: Method used to authenticate the users.
|
|
|
|
## The default method is the internal.
|
|
|
|
## If you want to use a different method,
|
|
|
|
## comment this line and enable the correct ones.
|
|
|
|
##
|
|
|
|
auth_method: internal
|
|
|
|
|
|
|
|
##
|
|
|
|
## Store the plain passwords or hashed for SCRAM:
|
|
|
|
## auth_password_format: plain
|
|
|
|
## auth_password_format: scram
|
|
|
|
##
|
|
|
|
## Define the FQDN if ejabberd doesn't detect it:
|
|
|
|
## fqdn: "server3.example.com"
|
|
|
|
|
|
|
|
##
|
|
|
|
## Authentication using external script
|
|
|
|
## Make sure the script is executable by ejabberd.
|
|
|
|
##
|
|
|
|
## auth_method: external
|
|
|
|
## extauth_program: "/path/to/authentication/script"
|
|
|
|
|
|
|
|
##
|
2016-04-20 11:27:32 +02:00
|
|
|
## Authentication using SQL
|
2013-08-12 14:25:05 +02:00
|
|
|
## Remember to setup a database in the next section.
|
|
|
|
##
|
2016-04-20 11:27:32 +02:00
|
|
|
## auth_method: sql
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## Authentication using PAM
|
|
|
|
##
|
|
|
|
## auth_method: pam
|
|
|
|
## pam_service: "pamservicename"
|
|
|
|
|
|
|
|
##
|
|
|
|
## Authentication using LDAP
|
|
|
|
##
|
|
|
|
## auth_method: ldap
|
|
|
|
##
|
|
|
|
## List of LDAP servers:
|
|
|
|
## ldap_servers:
|
|
|
|
## - "localhost"
|
|
|
|
##
|
|
|
|
## Encryption of connection to LDAP servers:
|
|
|
|
## ldap_encrypt: none
|
|
|
|
## ldap_encrypt: tls
|
|
|
|
##
|
|
|
|
## Port to connect to on LDAP servers:
|
|
|
|
## ldap_port: 389
|
|
|
|
## ldap_port: 636
|
|
|
|
##
|
|
|
|
## LDAP manager:
|
|
|
|
## ldap_rootdn: "dc=example,dc=com"
|
|
|
|
##
|
|
|
|
## Password of LDAP manager:
|
|
|
|
## ldap_password: "******"
|
|
|
|
##
|
|
|
|
## 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)"
|
|
|
|
|
|
|
|
##
|
|
|
|
## 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
|
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. ==============
|
|
|
|
###' DATABASE SETUP
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
## ejabberd by default uses the internal Mnesia database,
|
|
|
|
## so you do not necessarily need this section.
|
|
|
|
## This section provides configuration examples in case
|
|
|
|
## you want to use other database backends.
|
|
|
|
## Please consult the ejabberd Guide for details on database creation.
|
|
|
|
|
|
|
|
##
|
|
|
|
## MySQL server:
|
|
|
|
##
|
2016-04-20 11:27:32 +02:00
|
|
|
## sql_type: mysql
|
|
|
|
## sql_server: "server"
|
|
|
|
## sql_database: "database"
|
|
|
|
## sql_username: "username"
|
|
|
|
## sql_password: "password"
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## If you want to specify the port:
|
2016-04-20 11:27:32 +02:00
|
|
|
## sql_port: 1234
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## PostgreSQL server:
|
|
|
|
##
|
2016-04-20 11:27:32 +02:00
|
|
|
## sql_type: pgsql
|
|
|
|
## sql_server: "server"
|
|
|
|
## sql_database: "database"
|
|
|
|
## sql_username: "username"
|
|
|
|
## sql_password: "password"
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## If you want to specify the port:
|
2016-04-20 11:27:32 +02:00
|
|
|
## sql_port: 1234
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## 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
|
|
|
|
|
2015-03-16 19:53:19 +01:00
|
|
|
##
|
|
|
|
## SQLite:
|
|
|
|
##
|
2016-04-20 11:27:32 +02:00
|
|
|
## sql_type: sqlite
|
|
|
|
## sql_database: "/path/to/database.db"
|
2015-03-16 19:53:19 +01:00
|
|
|
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## ODBC compatible or MSSQL server:
|
|
|
|
##
|
2016-04-20 11:27:32 +02:00
|
|
|
## sql_type: odbc
|
|
|
|
## sql_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## Number of connections to open to the database for each virtual host
|
|
|
|
##
|
2016-04-20 11:27:32 +02:00
|
|
|
## sql_pool_size: 10
|
2013-08-12 14:25:05 +02: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
|
|
|
|
##
|
2016-04-20 11:27:32 +02:00
|
|
|
## sql_keepalive_interval: undefined
|
2013-08-12 14:25:05 +02:00
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. ===============
|
|
|
|
###' TRAFFIC SHAPERS
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
shaper:
|
|
|
|
##
|
|
|
|
## The "normal" shaper limits traffic speed to 1000 B/s
|
|
|
|
##
|
|
|
|
normal: 1000
|
|
|
|
|
|
|
|
##
|
|
|
|
## The "fast" shaper limits traffic speed to 50000 B/s
|
|
|
|
##
|
|
|
|
fast: 50000
|
|
|
|
|
|
|
|
##
|
|
|
|
## This option specifies the maximum number of elements in the queue
|
|
|
|
## of the FSM. Refer to the documentation for details.
|
|
|
|
##
|
2017-10-03 01:29:52 +02:00
|
|
|
max_fsm_queue: 10000
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
###. ====================
|
|
|
|
###' ACCESS CONTROL LISTS
|
|
|
|
acl:
|
|
|
|
##
|
|
|
|
## The 'admin' ACL grants administrative privileges to XMPP accounts.
|
|
|
|
## You can put here as many accounts as you want.
|
|
|
|
##
|
|
|
|
## admin:
|
|
|
|
## user:
|
2016-06-17 11:58:51 +02:00
|
|
|
## - "aleksey@localhost"
|
|
|
|
## - "ermine@example.org"
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## Blocked users
|
|
|
|
##
|
|
|
|
## blocked:
|
|
|
|
## user:
|
2016-06-17 11:58:51 +02:00
|
|
|
## - "baduser@example.org"
|
2013-08-30 12:42:56 +02:00
|
|
|
## - "test"
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
## Local users: don't modify this.
|
|
|
|
##
|
2017-09-30 11:10:34 +02:00
|
|
|
local:
|
2013-08-30 12:42:56 +02:00
|
|
|
user_regexp: ""
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## More examples of ACLs
|
|
|
|
##
|
|
|
|
## jabberorg:
|
|
|
|
## server:
|
|
|
|
## - "jabber.org"
|
|
|
|
## aleksey:
|
|
|
|
## user:
|
2016-06-17 11:58:51 +02:00
|
|
|
## - "aleksey@jabber.ru"
|
2013-08-12 14:25:05 +02:00
|
|
|
## test:
|
2013-08-30 12:42:56 +02:00
|
|
|
## user_regexp: "^test"
|
|
|
|
## user_glob: "test*"
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## Loopback network
|
|
|
|
##
|
|
|
|
loopback:
|
|
|
|
ip:
|
|
|
|
- "127.0.0.0/8"
|
2017-06-09 13:57:26 +02:00
|
|
|
- "::1/128"
|
2017-06-09 14:38:34 +02:00
|
|
|
- "::FFFF:127.0.0.1/128"
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## Bad XMPP servers
|
|
|
|
##
|
|
|
|
## bad_servers:
|
|
|
|
## server:
|
|
|
|
## - "xmpp.zombie.org"
|
|
|
|
## - "xmpp.spam.com"
|
|
|
|
|
|
|
|
##
|
|
|
|
## Define specific ACLs in a virtual host.
|
|
|
|
##
|
|
|
|
## host_config:
|
|
|
|
## "localhost":
|
|
|
|
## acl:
|
|
|
|
## admin:
|
|
|
|
## user:
|
2016-06-17 11:58:51 +02:00
|
|
|
## - "bob-local@localhost"
|
2013-08-12 14:25:05 +02:00
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. ============
|
2016-05-26 10:37:00 +02:00
|
|
|
###' SHAPER RULES
|
|
|
|
|
|
|
|
shaper_rules:
|
2013-08-12 14:25:05 +02:00
|
|
|
## Maximum number of simultaneous sessions allowed for a single user:
|
2016-06-16 11:13:07 +02:00
|
|
|
max_user_sessions: 10
|
2013-08-12 14:25:05 +02:00
|
|
|
## Maximum number of offline messages that users can have:
|
2016-05-26 10:37:00 +02:00
|
|
|
max_user_offline_messages:
|
2016-06-16 11:13:07 +02:00
|
|
|
- 5000: admin
|
|
|
|
- 100
|
2013-08-12 14:25:05 +02:00
|
|
|
## For C2S connections, all users except admins use the "normal" shaper
|
2016-05-26 10:37:00 +02:00
|
|
|
c2s_shaper:
|
2016-06-16 11:13:07 +02:00
|
|
|
- none: admin
|
|
|
|
- normal
|
2013-08-12 14:25:05 +02:00
|
|
|
## All S2S connections use the "fast" shaper
|
2016-06-16 11:13:07 +02:00
|
|
|
s2s_shaper: fast
|
2016-05-26 10:37:00 +02:00
|
|
|
|
|
|
|
###. ============
|
|
|
|
###' ACCESS RULES
|
|
|
|
access_rules:
|
|
|
|
## This rule allows access only for local users:
|
|
|
|
local:
|
2016-06-16 11:13:07 +02:00
|
|
|
- allow: local
|
2016-05-26 10:37:00 +02:00
|
|
|
## Only non-blocked users can use c2s connections:
|
|
|
|
c2s:
|
2016-06-16 11:13:07 +02:00
|
|
|
- deny: blocked
|
|
|
|
- allow
|
2013-08-12 14:25:05 +02:00
|
|
|
## Only admins can send announcement messages:
|
2016-05-26 10:37:00 +02:00
|
|
|
announce:
|
2016-06-16 11:13:07 +02:00
|
|
|
- allow: admin
|
2013-08-12 14:25:05 +02:00
|
|
|
## Only admins can use the configuration interface:
|
2017-09-30 11:10:34 +02:00
|
|
|
configure:
|
2016-06-16 11:13:07 +02:00
|
|
|
- allow: admin
|
2013-08-12 14:25:05 +02:00
|
|
|
## Only accounts of the local ejabberd server can create rooms:
|
2017-09-30 11:10:34 +02:00
|
|
|
muc_create:
|
2016-06-16 11:13:07 +02:00
|
|
|
- allow: local
|
2013-08-12 14:25:05 +02:00
|
|
|
## Only accounts on the local ejabberd server can create Pubsub nodes:
|
2017-09-30 11:10:34 +02:00
|
|
|
pubsub_createnode:
|
2016-06-16 11:13:07 +02:00
|
|
|
- allow: local
|
2013-08-12 14:25:05 +02:00
|
|
|
## In-band registration allows registration of any possible username.
|
|
|
|
## To disable in-band registration, replace 'allow' with 'deny'.
|
2017-09-30 11:10:34 +02:00
|
|
|
register:
|
2016-06-16 11:13:07 +02:00
|
|
|
- allow
|
2013-08-12 14:25:05 +02:00
|
|
|
## Only allow to register from localhost
|
2017-09-30 11:10:34 +02:00
|
|
|
trusted_network:
|
2016-06-16 11:13:07 +02:00
|
|
|
- allow: loopback
|
2013-08-12 14:25:05 +02:00
|
|
|
## Do not establish S2S connections with bad servers
|
2017-03-11 05:53:01 +01:00
|
|
|
## If you enable this you also have to uncomment "s2s_access: s2s"
|
2017-09-30 11:10:34 +02:00
|
|
|
## s2s:
|
2016-06-16 11:13:07 +02:00
|
|
|
## - deny:
|
|
|
|
## - ip: "XXX.XXX.XXX.XXX/32"
|
|
|
|
## - deny:
|
|
|
|
## - ip: "XXX.XXX.XXX.XXX/32"
|
|
|
|
## - allow
|
2013-08-12 14:25:05 +02:00
|
|
|
|
2017-01-13 16:53:48 +01:00
|
|
|
## ===============
|
|
|
|
## API PERMISSIONS
|
|
|
|
## ===============
|
|
|
|
##
|
|
|
|
## This section allows you to define who and using what method
|
|
|
|
## can execute commands offered by ejabberd.
|
|
|
|
##
|
|
|
|
## By default "console commands" section allow executing all commands
|
|
|
|
## issued using ejabberdctl command, and "admin access" section allows
|
2017-03-22 14:30:04 +01:00
|
|
|
## users in admin acl that connect from 127.0.0.1 to execute all
|
|
|
|
## commands except start and stop with any available access method
|
|
|
|
## (ejabberdctl, http-api, xmlrpc depending what is enabled on server).
|
|
|
|
##
|
|
|
|
## If you remove "console commands" there will be one added by
|
|
|
|
## default allowing executing all commands, but if you just change
|
|
|
|
## permissions in it, version from config file will be used instead
|
|
|
|
## of default one.
|
|
|
|
##
|
|
|
|
api_permissions:
|
|
|
|
"console commands":
|
|
|
|
from:
|
|
|
|
- ejabberd_ctl
|
|
|
|
who: all
|
|
|
|
what: "*"
|
|
|
|
"admin access":
|
|
|
|
who:
|
|
|
|
- access:
|
|
|
|
- allow:
|
2017-06-09 13:57:26 +02:00
|
|
|
- acl: loopback
|
2017-03-22 14:30:04 +01:00
|
|
|
- acl: admin
|
|
|
|
- oauth:
|
|
|
|
- scope: "ejabberd:admin"
|
|
|
|
- access:
|
|
|
|
- allow:
|
2017-06-09 13:57:26 +02:00
|
|
|
- acl: loopback
|
|
|
|
- acl: admin
|
2017-03-22 14:30:04 +01:00
|
|
|
what:
|
|
|
|
- "*"
|
|
|
|
- "!stop"
|
|
|
|
- "!start"
|
|
|
|
"public commands":
|
|
|
|
who:
|
|
|
|
- ip: "127.0.0.1/8"
|
|
|
|
what:
|
|
|
|
- "status"
|
|
|
|
- "connected_users_number"
|
2017-01-13 16:53:48 +01:00
|
|
|
|
2013-08-12 14:25:05 +02:00
|
|
|
## By default the frequency of account registrations from the same IP
|
|
|
|
## is limited to 1 account every 10 minutes. To disable, specify: infinity
|
|
|
|
## registration_timeout: 600
|
|
|
|
|
|
|
|
##
|
|
|
|
## Define specific Access Rules in a virtual host.
|
|
|
|
##
|
|
|
|
## host_config:
|
|
|
|
## "localhost":
|
|
|
|
## access:
|
|
|
|
## c2s:
|
2016-06-16 11:13:07 +02:00
|
|
|
## - allow: admin
|
|
|
|
## - deny
|
2013-08-12 14:25:05 +02:00
|
|
|
## register:
|
2016-06-16 11:13:07 +02:00
|
|
|
## - deny
|
2013-08-12 14:25:05 +02:00
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. ================
|
|
|
|
###' DEFAULT LANGUAGE
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## language: Default language used for server messages.
|
|
|
|
##
|
|
|
|
language: "en"
|
|
|
|
|
|
|
|
##
|
|
|
|
## Set a different default language in a virtual host.
|
|
|
|
##
|
|
|
|
## host_config:
|
|
|
|
## "localhost":
|
|
|
|
## language: "ru"
|
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. =======
|
|
|
|
###' CAPTCHA
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## Full path to a script that generates the image.
|
|
|
|
##
|
|
|
|
## captcha_cmd: "/lib/ejabberd/priv/bin/captcha.sh"
|
|
|
|
|
|
|
|
##
|
|
|
|
## Host for the URL and port where ejabberd listens for CAPTCHA requests.
|
|
|
|
##
|
|
|
|
## captcha_host: "example.org:5280"
|
|
|
|
|
|
|
|
##
|
|
|
|
## Limit CAPTCHA calls per minute for JID/IP to avoid DoS.
|
|
|
|
##
|
|
|
|
## captcha_limit: 5
|
|
|
|
|
2017-07-03 12:37:32 +02:00
|
|
|
###. ====
|
|
|
|
###' ACME
|
2017-11-14 13:12:33 +01:00
|
|
|
##
|
|
|
|
## In order to use the acme certificate acquiring through "Let's Encrypt"
|
|
|
|
## an http listener has to be configured to listen to port 80 so that
|
|
|
|
## the authorization challenges posed by "Let's Encrypt" can be solved.
|
|
|
|
##
|
2017-11-15 10:57:53 +01:00
|
|
|
## A simple way of doing this would be to add the following in the listening
|
|
|
|
## section and to configure port forwarding from 80 to 5280 either via NAT
|
|
|
|
## (for ipv4 only) or using frontends such as haproxy/nginx/sslh/etc.
|
2017-11-14 13:12:33 +01:00
|
|
|
## -
|
2017-11-15 10:57:53 +01:00
|
|
|
## port: 5280
|
2017-11-14 13:12:33 +01:00
|
|
|
## ip: "::"
|
|
|
|
## module: ejabberd_http
|
2017-07-03 12:37:32 +02:00
|
|
|
|
|
|
|
acme:
|
2017-07-12 18:23:52 +02:00
|
|
|
|
2017-11-11 14:38:47 +01:00
|
|
|
## A contact mail that the ACME Certificate Authority can contact in case of
|
|
|
|
## an authorization issue, such as a server-initiated certificate revocation.
|
|
|
|
## It is not mandatory to provide an email address but it is highly suggested.
|
|
|
|
contact: "mailto:example-admin@example.com"
|
|
|
|
|
|
|
|
|
|
|
|
## The ACME Certificate Authority URL.
|
|
|
|
## This could either be:
|
|
|
|
## - https://acme-v01.api.letsencrypt.org - (Default) for the production CA
|
|
|
|
## - https://acme-staging.api.letsencrypt.org - for the staging CA
|
|
|
|
## - http://localhost:4000 - for a local version of the CA
|
|
|
|
ca_url: "https://acme-v01.api.letsencrypt.org"
|
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###. =======
|
|
|
|
###' MODULES
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## Modules enabled in all ejabberd virtual hosts.
|
|
|
|
##
|
2017-09-30 11:10:34 +02:00
|
|
|
modules:
|
2013-08-12 14:25:05 +02:00
|
|
|
mod_adhoc: {}
|
2017-04-07 11:02:11 +02:00
|
|
|
mod_admin_extra: {}
|
2013-08-12 14:25:05 +02:00
|
|
|
mod_announce: # recommends mod_adhoc
|
|
|
|
access: announce
|
|
|
|
mod_blocking: {} # requires mod_privacy
|
|
|
|
mod_caps: {}
|
2014-04-08 23:38:04 +02:00
|
|
|
mod_carboncopy: {}
|
2015-08-05 00:05:11 +02:00
|
|
|
mod_client_state: {}
|
2013-08-12 14:25:05 +02:00
|
|
|
mod_configure: {} # requires mod_adhoc
|
2017-04-07 11:02:11 +02:00
|
|
|
## mod_delegation: {} # for xep0356
|
2013-08-12 14:25:05 +02:00
|
|
|
mod_disco: {}
|
2017-04-07 11:02:11 +02:00
|
|
|
mod_echo: {}
|
2013-08-12 14:25:05 +02:00
|
|
|
mod_irc: {}
|
2017-03-21 11:15:01 +01:00
|
|
|
mod_bosh: {}
|
2013-08-12 14:25:05 +02:00
|
|
|
## mod_http_fileserver:
|
|
|
|
## docroot: "/var/www"
|
|
|
|
## accesslog: "/var/log/ejabberd/access.log"
|
2017-04-07 11:02:11 +02:00
|
|
|
## mod_http_upload:
|
|
|
|
## # docroot: "@HOME@/upload"
|
|
|
|
## put_url: "https://@HOST@:5444"
|
|
|
|
## thumbnail: false # otherwise needs the identify command from ImageMagick installed
|
|
|
|
## mod_http_upload_quota:
|
|
|
|
## max_days: 30
|
2013-08-12 14:25:05 +02:00
|
|
|
mod_last: {}
|
2017-04-07 11:02:11 +02:00
|
|
|
## XEP-0313: Message Archive Management
|
|
|
|
## You might want to setup a SQL backend for MAM because the mnesia database is
|
|
|
|
## limited to 2GB which might be exceeded on large servers
|
|
|
|
## mod_mam: {} # for xep0313, mnesia is limited to 2GB, better use an SQL backend
|
2017-09-30 11:10:34 +02:00
|
|
|
mod_muc:
|
2013-08-12 14:25:05 +02:00
|
|
|
## host: "conference.@HOST@"
|
2016-06-24 15:12:58 +02:00
|
|
|
access:
|
|
|
|
- allow
|
|
|
|
access_admin:
|
|
|
|
- allow: admin
|
2013-08-12 14:25:05 +02:00
|
|
|
access_create: muc_create
|
|
|
|
access_persistent: muc_create
|
2017-04-07 11:02:11 +02:00
|
|
|
mod_muc_admin: {}
|
2013-08-12 14:25:05 +02:00
|
|
|
## mod_muc_log: {}
|
2015-04-08 14:01:16 +02:00
|
|
|
## mod_multicast: {}
|
2017-09-30 11:10:34 +02:00
|
|
|
mod_offline:
|
2013-08-12 14:25:05 +02:00
|
|
|
access_max_user_messages: max_user_offline_messages
|
|
|
|
mod_ping: {}
|
|
|
|
## mod_pres_counter:
|
|
|
|
## count: 5
|
|
|
|
## interval: 60
|
|
|
|
mod_privacy: {}
|
|
|
|
mod_private: {}
|
|
|
|
## mod_proxy65: {}
|
2017-09-30 11:10:34 +02:00
|
|
|
mod_pubsub:
|
2013-08-12 14:25:05 +02:00
|
|
|
access_createnode: pubsub_createnode
|
|
|
|
## reduces resource comsumption, but XEP incompliant
|
|
|
|
ignore_pep_from_offline: true
|
|
|
|
## XEP compliant, but increases resource comsumption
|
|
|
|
## ignore_pep_from_offline: false
|
|
|
|
last_item_cache: false
|
2017-09-30 11:10:34 +02:00
|
|
|
plugins:
|
2013-08-12 14:25:05 +02:00
|
|
|
- "flat"
|
|
|
|
- "hometree"
|
|
|
|
- "pep" # pep requires mod_caps
|
2017-07-20 20:22:50 +02:00
|
|
|
mod_push: {}
|
2017-07-21 01:07:36 +02:00
|
|
|
mod_push_keepalive: {}
|
2016-03-19 17:42:12 +01:00
|
|
|
## mod_register:
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## Protect In-Band account registrations with CAPTCHA.
|
|
|
|
##
|
2016-03-11 12:31:16 +01:00
|
|
|
## captcha_protected: true
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## Set the minimum informational entropy for passwords.
|
|
|
|
##
|
2016-03-11 12:31:16 +01:00
|
|
|
## password_strength: 32
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## After successful registration, the user receives
|
|
|
|
## a message with this subject and body.
|
|
|
|
##
|
2016-03-11 12:31:16 +01:00
|
|
|
## welcome_message:
|
|
|
|
## subject: "Welcome!"
|
|
|
|
## body: |-
|
|
|
|
## Hi.
|
|
|
|
## Welcome to this XMPP server.
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## When a user registers, send a notification to
|
|
|
|
## these XMPP accounts.
|
|
|
|
##
|
2016-03-11 12:31:16 +01:00
|
|
|
## registration_watchers:
|
|
|
|
## - "admin1@example.org"
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## Only clients in the server machine can register accounts
|
|
|
|
##
|
2016-03-11 12:31:16 +01:00
|
|
|
## ip_access: trusted_network
|
2013-08-12 14:25:05 +02:00
|
|
|
##
|
|
|
|
## Local c2s or remote s2s users cannot register accounts
|
|
|
|
##
|
2016-03-11 12:31:16 +01:00
|
|
|
## access_from: deny
|
|
|
|
## access: register
|
2013-08-12 14:25:05 +02:00
|
|
|
mod_roster: {}
|
|
|
|
mod_shared_roster: {}
|
|
|
|
mod_stats: {}
|
|
|
|
mod_time: {}
|
2015-11-13 19:30:11 +01:00
|
|
|
mod_vcard:
|
|
|
|
search: false
|
2017-09-25 15:23:02 +02:00
|
|
|
mod_vcard_xupdate: {}
|
2018-01-15 10:54:57 +01:00
|
|
|
mod_avatar: {}
|
2013-08-12 14:25:05 +02:00
|
|
|
mod_version: {}
|
2017-02-21 07:18:58 +01:00
|
|
|
mod_stream_mgmt: {}
|
2017-02-27 15:20:04 +01:00
|
|
|
## Non-SASL Authentication (XEP-0078) is now disabled by default
|
|
|
|
## because it's obsoleted and is used mostly by abandoned
|
|
|
|
## client software
|
|
|
|
## mod_legacy_auth: {}
|
|
|
|
## The module for S2S dialback (XEP-0220). Please note that you cannot
|
|
|
|
## rely solely on dialback if you want to federate with other servers,
|
|
|
|
## because a lot of servers have dialback disabled and instead rely on
|
|
|
|
## PKIX authentication. Make sure you have proper certificates installed
|
2017-11-20 13:07:06 +01:00
|
|
|
## and check your accessibility at https://check.messaging.one/
|
2017-02-27 15:20:04 +01:00
|
|
|
mod_s2s_dialback: {}
|
2017-03-22 14:30:04 +01:00
|
|
|
mod_http_api: {}
|
2018-03-10 19:41:55 +01:00
|
|
|
mod_fail2ban: {}
|
2013-08-12 14:25:05 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
## Enable modules with custom options in a specific virtual host
|
|
|
|
##
|
2014-10-20 10:59:03 +02:00
|
|
|
## host_config:
|
2013-08-12 14:25:05 +02:00
|
|
|
## "localhost":
|
2014-01-02 15:03:05 +01:00
|
|
|
## modules:
|
|
|
|
## mod_echo:
|
|
|
|
## host: "mirror.localhost"
|
2013-08-12 14:25:05 +02:00
|
|
|
|
2015-03-11 14:14:28 +01:00
|
|
|
##
|
|
|
|
## Enable modules management via ejabberdctl for installation and
|
|
|
|
## uninstallation of public/private contributed modules
|
|
|
|
## (enabled by default)
|
|
|
|
##
|
|
|
|
|
|
|
|
allow_contrib_modules: true
|
|
|
|
|
2015-05-22 12:42:24 +02:00
|
|
|
###.
|
|
|
|
###'
|
2013-08-12 14:25:05 +02:00
|
|
|
### Local Variables:
|
|
|
|
### mode: yaml
|
|
|
|
### End:
|
2015-05-22 12:42:24 +02:00
|
|
|
### vim: set filetype=yaml tabstop=8 foldmarker=###',###. foldmethod=marker:
|