### ### ejabberd configuration file ### ### ### 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? ### ======= ### LOGGING ## ## 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: 3 ## ## rotation: Disable ejabberd's internal log rotation, as the Debian package ## uses logrotate(8). ## ## overload protection: If you want to limit the number of messages per second ## allowed from error_logger, which is a good idea if you want to avoid a flood ## of messages when system is overloaded, you can set a limit. ## 100 is ejabberd's default. ## ## 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" define_macro: 'TLS_CIPHERS': "HIGH:!aNULL:!eNULL:!3DES:@STRENGTH" 'TLS_OPTIONS': - "no_sslv3" - "no_tlsv1" - "no_tlsv1_1" - "cipher_server_preference" - "no_compression" 'DH_FILE': "/etc/ejabberd/dh.pem" c2s_ciphers: 'TLS_CIPHERS' s2s_ciphers: 'TLS_CIPHERS' c2s_protocol_options: 'TLS_OPTIONS' s2s_protocol_options: 'TLS_OPTIONS' c2s_dhfile: 'DH_FILE' s2s_dhfile: 'DH_FILE' ### ================ ### SERVED HOSTNAMES ## ## hosts: Domains served by ejabberd. ## You can define one or several, for example: ## hosts: ## - "example.net" ## - "example.com" ## - "example.org" ## hosts: - "bitcheese.net" ## ## 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 ### =============== ### LISTENING PORTS ## ## listen: The ports ejabberd will listen on, which service each is handled ## by and what options to start it with. ## certfiles: - "/var/certs/static.bitcheese.net.crt" - "/var/certs/static.bitcheese.net.key" listen: - port: 5222 ip: "::" module: ejabberd_c2s max_stanza_size: 262144 shaper: c2s_shaper access: c2s starttls_required: true protocol_options: 'TLS_OPTIONS' - port: 5223 ip: "::" module: ejabberd_c2s max_stanza_size: 262144 shaper: c2s_shaper access: c2s tls: true protocol_options: 'TLS_OPTIONS' - port: 5269 ip: "::" module: ejabberd_s2s_in max_stanza_size: 524288 #- #port: 5443 #ip: "::" #module: ejabberd_http #tls: true #protocol_options: 'TLS_OPTIONS' #request_handlers: #"/api": mod_http_api #"/bosh": mod_bosh ### "/captcha": ejabberd_captcha ### "/upload": mod_http_upload #"/ws": ejabberd_http_ws #- #port: 5280 #ip: "::" #module: ejabberd_http #tls: true #protocol_options: 'TLS_OPTIONS' #request_handlers: #"/admin": ejabberd_web_admin #- #port: 1883 #ip: "::" #module: mod_mqtt #backlog: 1000 ## ## s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections. ## Allowed values are: false optional required required_trusted ## You must specify a certificate file. ## s2s_use_starttls: required ## Custom OpenSSL options ## ## - "no_tlsv1" ## ## domain_certfile: Specify a different certificate for each served hostname. ## ## host_config: ## "example.org": ## domain_certfile: "/path/to/example_org.pem" ## "example.com": ## domain_certfile: "/path/to/example_com.pem" ## ## S2S whitelist or blacklist ## ## Default s2s policy for undefined hosts. ## s2s_access: s2s ## ## Outgoing S2S options ## ## Preferred address families (which to try first) and connect timeout ## in milliseconds. ## ## outgoing_s2s_families: ## - ipv4 ## - ipv6 ## outgoing_s2s_timeout: 10000 ### ============== ### AUTHENTICATION ## ## 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: odbc ## ## 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" ## ## Authentication using ODBC ## Remember to setup a database in the next section. ## ## auth_method: odbc ## ## 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 ### ============== ### DATABASE SETUP ## 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: ## ## odbc_type: mysql ## odbc_server: "server" ## odbc_database: "database" ## odbc_username: "username" ## odbc_password: "password" ## ## If you want to specify the port: ## odbc_port: 1234 ## ## PostgreSQL server: ## new_sql_schema: true sm_db_type: sql sql_type: pgsql sql_server: "localhost" sql_database: "ejabberd" sql_username: "ejabberd" sql_password: "t32qqqqXZ" default_db: sql #odbc_password: "" ## ## If you want to specify the port: ## odbc_port: 1234 ## ## 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 ## ## ODBC compatible or MSSQL server: ## ## odbc_type: odbc ## odbc_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd" ## ## Number of connections to open to the database for each virtual host ## ## odbc_pool_size: 10 ## ## Interval to make a dummy SQL request to keep the connections to the ## database alive. Specify in seconds: for example 28800 means 8 hours ## ## odbc_keepalive_interval: undefined ## ## This option specifies the maximum number of elements in the queue ## of the FSM. Refer to the documentation for details. ## max_fsm_queue: 3000 #max_ack_queue: 9000 ###. ==================== ###' 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: - "": "localhost" # - "voker57": "bitcheese.net" ## ## Blocked users ## ## blocked: ## user: ## - "baduser": "example.org" ## - "test" ## Local users: don't modify this. ## local: user_regexp: "" ## ## More examples of ACLs ## ## jabberorg: ## server: ## - "jabber.org" ## aleksey: ## user: ## - "aleksey": "jabber.ru" ## test: ## user_regexp: "^test" ## user_glob: "test*" ## ## Loopback network ## loopback: ip: - "127.0.0.0/8" - ::1/128 ## ## Bad XMPP servers ## good_servers: server: - "ipv3.network" - "jabber.ru" - "xabber.de" - "jabber.eu.org" bad_servers: server: - "linux.hotfuck.org" ## - "xmpp.zombie.org" ## - "xmpp.spam.com" ## ## Define specific ACLs in a virtual host. ## ## host_config: ## "localhost": ## acl: ## admin: ## user: ## - "bob-local": "localhost" ### ============ ### ACCESS RULES access_rules: local: allow: local s2s: deny: bad_servers allow: all ## allow: good_servers c2s: deny: blocked allow: all announce: allow: admin configure: allow: admin muc_create: allow: local pubsub_createnode: allow: local trusted_network: allow: loopback register: - allow api_permissions: "console commands": from: - ejabberd_ctl who: all what: "*" "admin access": who: access: allow: acl: loopback acl: admin oauth: scope: "ejabberd:admin" access: allow: acl: loopback acl: admin what: - "*" - "!stop" - "!start" "public commands": who: ip: 127.0.0.1/8 what: - status - connected_users_number shaper: normal: 10000 fast: 50000 shaper_rules: max_user_sessions: 10 max_user_offline_messages: 5000: admin 100: all c2s_shaper: none: admin normal: all s2s_shaper: fast ## 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: ## admin: allow ## all: deny ## register: ## all: deny ### ================ ### DEFAULT LANGUAGE ## ## language: Default language used for server messages. ## 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. ## #captcha_cmd: "/usr/share/ejabberd/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 ### ======= ### MODULES ## ## Modules enabled in all ejabberd virtual hosts. ## modules: mod_adhoc: {} mod_admin_extra: {} mod_announce: access: announce mod_avatar: {} mod_blocking: {} mod_bosh: {} mod_caps: {} mod_carboncopy: {} mod_client_state: {} mod_configure: {} ## mod_delegation: {} # for xep0356 mod_disco: server_info: - modules: all name: "abuse-addresses" urls: ["voker57@gmail.com"] mod_echo: {} mod_fail2ban: {} mod_http_api: {} ## mod_http_upload: ## put_url: https://@HOST@:5443/upload mod_last: {} # mod_mam: ## ## Mnesia is limited to 2GB, better to use an SQL backend ## ## For small servers SQLite is a good fit and is very easy ## ## to configure. Uncomment this when you have SQL configured: ## ## db_type: sql # assume_mam_usage: true # default: always mod_mqtt: {} mod_muc: access: - allow access_admin: - allow: admin access_create: muc_create access_persistent: muc_create access_mam: - allow # default_room_options: # mam: true history_size: 100 mod_muc_admin: {} mod_offline: access_max_user_messages: max_user_offline_messages mod_ping: {} mod_pres_counter: count: 5 interval: 60 mod_privacy: {} mod_private: {} ## mod_proxy65: ## access: local ## max_connections: 5 mod_pubsub: access_createnode: pubsub_createnode plugins: - flat - pep force_node_config: "eu.siacs.conversations.axolotl.*": access_model: open ## Avoid buggy clients to make their bookmarks public storage:bookmarks: access_model: whitelist mod_push: {} mod_push_keepalive: {} # mod_register: # access_from: allow # access: register # captcha_protected: true ## ## Only accept registration requests from the "trusted" ## ## network (see access_rules section above). ## ## Think twice before enabling registration from any ## ## address. See the Jabber SPAM Manifesto for details: ## ## https://github.com/ge0rg/jabber-spam-fighting-manifesto ## ip_access: trusted_network mod_roster: versioning: true mod_s2s_dialback: {} mod_shared_roster: {} mod_sic: {} mod_stream_mgmt: resend_on_timeout: true mod_vcard: search: false mod_vcard_xupdate: {} mod_version: {} mod_muc_log: outdir: "/var/www/muclogs" dirtype: plain file_format: plaintext ## ## Enable modules with custom options in a specific virtual host ## ## append_host_config: ## "localhost": ## modules: ## mod_echo: ## host: "mirror.localhost" ### Local Variables: ### mode: yaml ### End: ### vim: set filetype=yaml tabstop=8