mirror of
https://git.kaidan.im/lnj/ansible-role-ejabberd
synced 2020-03-25 15:46:19 +01:00
362 lines
8 KiB
Django/Jinja
362 lines
8 KiB
Django/Jinja
loglevel: 4
|
|
|
|
# debian package uses logrotate
|
|
log_rotate_size: infinity
|
|
log_rotate_date: ""
|
|
log_rate_limit: 100
|
|
|
|
hosts:
|
|
{% for host in ejabberd_hosts %}
|
|
- "{{ host }}"
|
|
{% endfor %}
|
|
|
|
certfiles:
|
|
- "/etc/letsencrypt/live/{{ ejabberd_letsencrypt_cert }}/privkey.pem"
|
|
- "/etc/letsencrypt/live/{{ ejabberd_letsencrypt_cert }}/fullchain.pem"
|
|
|
|
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': "{{ ejabberd_dh_params_file }}"
|
|
|
|
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'
|
|
|
|
listen:
|
|
-
|
|
port: 5222
|
|
ip: "::"
|
|
module: ejabberd_c2s
|
|
starttls_required: true
|
|
protocol_options: 'TLS_OPTIONS'
|
|
max_stanza_size: 65536
|
|
shaper: c2s_shaper
|
|
access: c2s
|
|
|
|
-
|
|
port: 5223
|
|
ip: "::"
|
|
module: ejabberd_c2s
|
|
tls: true
|
|
max_stanza_size: 65536
|
|
shaper: c2s_shaper
|
|
access: c2s
|
|
-
|
|
port: 5269
|
|
ip: "::"
|
|
module: ejabberd_s2s_in
|
|
-
|
|
port: 5270
|
|
ip: "::"
|
|
module: ejabberd_s2s_in
|
|
tls: true
|
|
-
|
|
port: 5280
|
|
ip: "::"
|
|
module: ejabberd_http
|
|
request_handlers:
|
|
"/ws": ejabberd_http_ws
|
|
"/bosh": mod_bosh
|
|
"/api": mod_http_api
|
|
web_admin: true
|
|
## register: true
|
|
## captcha: true
|
|
tls: true
|
|
protocol_options: 'TLS_OPTIONS'
|
|
-
|
|
port: 3478
|
|
transport: udp
|
|
module: ejabberd_stun
|
|
-
|
|
port: {{ ejabberd_http_upload_port }}
|
|
ip: "127.0.0.1"
|
|
module: ejabberd_http
|
|
request_handlers:
|
|
"": mod_http_upload
|
|
|
|
## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text
|
|
## password storage (see auth_password_format option).
|
|
disable_sasl_mechanisms:
|
|
- "digest-md5"
|
|
- "X-OAUTH2"
|
|
|
|
s2s_use_starttls: required
|
|
|
|
# plain or scram (hashed)
|
|
auth_password_format: scram
|
|
auth_method: sql
|
|
|
|
# database server
|
|
sql_type: {{ ejabberd_db_type }}
|
|
sql_server: "127.0.0.1"
|
|
sql_database: "{{ ejabberd_db_name }}"
|
|
sql_username: "{{ ejabberd_db_user }}"
|
|
sql_password: "{{ ejabberd_db_password }}"
|
|
default_db: sql
|
|
|
|
shaper:
|
|
# Limit to 10.000 B/s
|
|
normal: 10000
|
|
# Limit to 50.000 B/s
|
|
fast: 50000
|
|
max_fsm_queue: 10000
|
|
|
|
acl:
|
|
{% if ejabberd_admin_jids %}
|
|
# admins
|
|
admin:
|
|
user:
|
|
{% for jid in ejabberd_admin_jids %}
|
|
- "{{ jid }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if ejabberd_blocked_jids %}
|
|
# blocked users
|
|
blocked:
|
|
user:
|
|
{% for jid in ejabberd_blocked_jids %}
|
|
- "{{ jid }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
# Local users: don't modify this.
|
|
local:
|
|
user_regexp: ""
|
|
|
|
# Loopback network
|
|
loopback:
|
|
ip:
|
|
- "127.0.0.0/8"
|
|
- "::1/128"
|
|
- "::FFFF:127.0.0.1/128"
|
|
|
|
{% if ejabberd_bad_servers %}
|
|
# bad servers
|
|
bad_servers:
|
|
server:
|
|
{% for server in ejabberd_bad_servers %}
|
|
- "{{ server }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
shaper_rules:
|
|
# Maximum number of simultaneous sessions allowed for a single user:
|
|
max_user_sessions: 10
|
|
# Maximum number of offline messages that users can have:
|
|
max_user_offline_messages:
|
|
- 5000: admin
|
|
- 100
|
|
# For C2S connections, all users except admins use the "normal" shaper
|
|
c2s_shaper:
|
|
- none: admin
|
|
- normal
|
|
# All S2S connections use the "fast" shaper
|
|
s2s_shaper: fast
|
|
|
|
# Access Rules
|
|
access_rules:
|
|
# This rule allows access only for local users:
|
|
local:
|
|
- allow: local
|
|
# Only non-blocked users can use c2s connections:
|
|
c2s:
|
|
- deny: blocked
|
|
- allow
|
|
# Only admins can send announcement messages:
|
|
announce:
|
|
- allow: admin
|
|
# Only admins can use the configuration interface:
|
|
configure:
|
|
- allow: admin
|
|
# Only accounts of the local ejabberd server can create rooms:
|
|
muc_create:
|
|
- allow: local
|
|
# Only accounts on the local ejabberd server can create Pubsub nodes:
|
|
pubsub_createnode:
|
|
- allow: local
|
|
# In-band registration allows registration of any possible username.
|
|
# To disable in-band registration, replace 'allow' with 'deny'.
|
|
register:
|
|
- deny
|
|
# Only allow to register from localhost
|
|
trusted_network:
|
|
- allow: loopback
|
|
# Do not establish S2S connections with bad servers
|
|
# If you enable this you also have to uncomment "s2s_access: s2s"
|
|
# s2s:
|
|
# - deny:
|
|
# - ip: "XXX.XXX.XXX.XXX/32"
|
|
# - deny:
|
|
# - ip: "XXX.XXX.XXX.XXX/32"
|
|
# - 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"
|
|
|
|
# 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
|
|
|
|
# language: Default language used for server messages.
|
|
language: "en"
|
|
|
|
# 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:
|
|
mod_adhoc: {}
|
|
mod_admin_extra: {}
|
|
mod_announce:
|
|
access: announce
|
|
# mod_avatar:
|
|
# convert:
|
|
# webp: jpeg
|
|
mod_blocking: {}
|
|
mod_caps: {}
|
|
mod_carboncopy: {}
|
|
mod_client_state: {}
|
|
mod_configure: {}
|
|
mod_delegation: {}
|
|
mod_disco:
|
|
server_info:
|
|
-
|
|
modules: all
|
|
name: "abuse-addresses"
|
|
urls:
|
|
{% for addr in ejabberd_abuse_addresses %}
|
|
- "{{ addr }}"
|
|
{% endfor %}
|
|
mod_bosh: {}
|
|
mod_http_upload:
|
|
docroot: "@HOME@/upload/@HOST@"
|
|
host: "{{ ejabberd_http_upload_host }}"
|
|
put_url: "https://{{ ejabberd_http_upload_host }}"
|
|
secret_length: {{ ejabberd_http_upload_secrect_length }}
|
|
jid_in_url: node
|
|
max_size: {{ ejabberd_http_upload_max_file_size }}
|
|
rm_on_unregister: true
|
|
mod_http_upload_quota: {}
|
|
# max_days: 30
|
|
mod_last: {}
|
|
mod_mam:
|
|
default: always # always save messages
|
|
mod_muc:
|
|
host: "{{ ejabberd_muc_host }}"
|
|
max_user_conferences: 80
|
|
access:
|
|
- allow
|
|
access_admin:
|
|
- allow: admin
|
|
access_create: muc_create
|
|
access_persistent: muc_create
|
|
default_room_options:
|
|
mam: true
|
|
mod_muc_admin: {}
|
|
# mod_muc_log: {}
|
|
# mod_multicast: {}
|
|
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:
|
|
host: "{{ ejabberd_proxy65_host }}"
|
|
port: 57777
|
|
ip: "{{ ejabberd_proxy65_ip }}"
|
|
mod_pubsub:
|
|
host: "{{ ejabberd_pubsub_host }}"
|
|
access_createnode: pubsub_createnode
|
|
# reduces resource comsumption, but XEP incompliant
|
|
ignore_pep_from_offline: true
|
|
last_item_cache: false
|
|
plugins:
|
|
- "flat"
|
|
- "hometree"
|
|
- "pep" # requires mod_caps
|
|
- "mb"
|
|
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:
|
|
{% if ejabberd_registration_watchers %}
|
|
registration_watchers:
|
|
{% for jid in ejabberd_registration_watchers %}
|
|
- "{{ jid }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
access_from: deny
|
|
access: register
|
|
# mod_register_web: {}
|
|
mod_roster:
|
|
versioning: true
|
|
# mod_service_log: {}
|
|
mod_shared_roster: {}
|
|
# mod_shared_roster_ldap: {}
|
|
mod_sic: {}
|
|
# mod_sip: {}
|
|
mod_stats: {}
|
|
mod_time: {}
|
|
mod_vcard_xupdate: {}
|
|
mod_vcard: {}
|
|
mod_version:
|
|
show_os: true
|
|
mod_stream_mgmt:
|
|
resend_on_timeout: if_offline
|
|
mod_s2s_dialback: {}
|
|
mod_http_api: {}
|
|
|
|
allow_contrib_modules: true
|
|
|
|
### mode: yaml
|
|
### End:
|
|
### vim: set filetype=yaml tabstop=8 foldmarker=###',###. foldmethod=marker:
|