]> git.evergreen-ils.org Git - working/random.git/blob - opensrf/ejabberd-config.yml
Support optional systemd service files
[working/random.git] / opensrf / ejabberd-config.yml
1 ###
2 ###'              ejabberd configuration file
3 ###
4 ###
5
6 ### The parameters used in this configuration file are explained in more detail
7 ### in the ejabberd Installation and Operation Guide.
8 ### Please consult the Guide in case of doubts, it is included with
9 ### your copy of ejabberd, and is also available online at
10 ### http://www.process-one.net/en/ejabberd/docs/
11
12 ### The configuration file is written in YAML.
13 ### Refer to http://en.wikipedia.org/wiki/YAML for the brief description.
14 ### However, ejabberd treats different literals as different types:
15 ###
16 ### - unquoted or single-quoted strings. They are called "atoms".
17 ###   Example: dog, 'Jupiter', '3.14159', YELLOW
18 ###
19 ### - numeric literals. Example: 3, -45.0, .0
20 ###
21 ### - quoted or folded strings.
22 ###   Examples of quoted string: "Lizzard", "orange".
23 ###   Example of folded string:
24 ###   > Art thou not Romeo,
25 ###     and a Montague?
26
27 ###.  =======
28 ###'  LOGGING
29
30 ##
31 ## loglevel: Verbosity of log files generated by ejabberd.
32 ## 0: No ejabberd log at all (not recommended)
33 ## 1: Critical
34 ## 2: Error
35 ## 3: Warning
36 ## 4: Info
37 ## 5: Debug
38 ##
39 loglevel: 4
40
41 ##
42 ## rotation: Disable ejabberd's internal log rotation, as the Debian package
43 ## uses logrotate(8).
44 log_rotate_size: 0
45 log_rotate_date: ""
46
47 ##
48 ## overload protection: If you want to limit the number of messages per second
49 ## allowed from error_logger, which is a good idea if you want to avoid a flood
50 ## of messages when system is overloaded, you can set a limit.
51 ## 100 is ejabberd's default.
52 log_rate_limit: 100
53
54 ##
55 ## watchdog_admins: Only useful for developers: if an ejabberd process
56 ## consumes a lot of memory, send live notifications to these XMPP
57 ## accounts.
58 ##
59 ## watchdog_admins:
60 ##   - "bob@example.com"
61
62 ###.  ===============
63 ###'  NODE PARAMETERS
64
65 ##
66 ## net_ticktime: Specifies net_kernel tick time in seconds. This options must have
67 ## identical value on all nodes, and in most cases shouldn't be changed at all from
68 ## default value.
69 ##
70 ## net_ticktime: 60
71
72 ###.  ================
73 ###'  SERVED HOSTNAMES
74
75 ##
76 ## hosts: Domains served by ejabberd.
77 ## You can define one or several, for example:
78 ## hosts: 
79 ##   - "example.net"
80 ##   - "example.com"
81 ##   - "example.org"
82 ##
83 hosts:
84   - "localhost"
85   - "private.localhost"                                                        
86   - "public.localhost"
87
88 ##
89 ## route_subdomains: Delegate subdomains to other XMPP servers.
90 ## For example, if this ejabberd serves example.org and you want
91 ## to allow communication with an XMPP server called im.example.org.
92 ##
93 ## route_subdomains: s2s
94
95 ###.  ===============
96 ###'  LISTENING PORTS
97
98 ##
99 ## listen: The ports ejabberd will listen on, which service each is handled
100 ## by and what options to start it with.
101 ##
102 listen: 
103   - 
104     port: 5222
105     ip: "::"
106     module: ejabberd_c2s
107     ##
108     ## If TLS is compiled in and you installed a SSL
109     ## certificate, specify the full path to the
110     ## file and uncomment these lines:
111     ##
112     certfile: "/etc/ejabberd/ejabberd.pem"
113     starttls: true
114     ##
115     ## To enforce TLS encryption for client connections,
116     ## use this instead of the "starttls" option:
117     ##
118     ## starttls_required: true
119     ##
120     ## Custom OpenSSL options
121     ##
122     protocol_options:
123       - "no_sslv3"
124     ##   - "no_tlsv1"
125     max_stanza_size: 2000000
126     shaper: c2s_shaper
127     access: c2s
128     zlib: true
129     resend_on_timeout: if_offline
130   - 
131     port: 5269
132     ip: "::"
133     module: ejabberd_s2s_in
134   ##
135   ## ejabberd_service: Interact with external components (transports, ...)
136   ##
137   ## - 
138   ##   port: 8888
139   ##   module: ejabberd_service
140   ##   access: all
141   ##   shaper_rule: fast
142   ##   ip: "127.0.0.1"
143   ##   hosts:
144   ##     "icq.example.org":
145   ##       password: "secret"
146   ##     "sms.example.org":
147   ##       password: "secret"
148
149   ##
150   ## ejabberd_stun: Handles STUN Binding requests
151   ##
152   ## - 
153   ##   port: 3478
154   ##   transport: udp
155   ##   module: ejabberd_stun
156
157   ##
158   ## To handle XML-RPC requests that provide admin credentials:
159   ##
160   ## - 
161   ##   port: 4560
162   ##   module: ejabberd_xmlrpc
163   ##   access_commands: {}
164   - 
165     port: 5280
166     ip: "::"
167     module: ejabberd_http
168     request_handlers:
169       "/websocket": ejabberd_http_ws
170     ##  "/pub/archive": mod_http_fileserver
171     web_admin: true
172     http_bind: true
173     ## register: true
174     captcha: true
175     tls: true
176     certfile: "/etc/ejabberd/ejabberd.pem"
177
178 ## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text
179 ## password storage (see auth_password_format option).
180 disable_sasl_mechanisms: "digest-md5"
181
182 ###.  ==================
183 ###'  S2S GLOBAL OPTIONS
184
185 ##
186 ## s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections.
187 ## Allowed values are: false optional required required_trusted
188 ## You must specify a certificate file.
189 ##
190 s2s_use_starttls: optional
191
192 ##
193 ## s2s_certfile: Specify a certificate file.
194 ##
195 s2s_certfile: "/etc/ejabberd/ejabberd.pem"
196
197 ## Custom OpenSSL options
198 ##
199 s2s_protocol_options:
200   - "no_sslv3"
201 ##   - "no_tlsv1"
202
203 ##
204 ## domain_certfile: Specify a different certificate for each served hostname.
205 ##
206 ## host_config:
207 ##   "example.org":
208 ##     domain_certfile: "/path/to/example_org.pem"
209 ##   "example.com":
210 ##     domain_certfile: "/path/to/example_com.pem"
211
212 ##
213 ## S2S whitelist or blacklist
214 ##
215 ## Default s2s policy for undefined hosts.
216 ##
217 ## s2s_access: s2s
218
219 ##
220 ## Outgoing S2S options
221 ##
222 ## Preferred address families (which to try first) and connect timeout
223 ## in milliseconds.
224 ##
225 ## outgoing_s2s_families:
226 ##   - ipv4
227 ##   - ipv6
228 ## outgoing_s2s_timeout: 10000
229
230 ###.  ==============
231 ###'  AUTHENTICATION
232
233 ##
234 ## auth_method: Method used to authenticate the users.
235 ## The default method is the internal.
236 ## If you want to use a different method,
237 ## comment this line and enable the correct ones.
238 ##
239 auth_method: internal
240
241 ##
242 ## Store the plain passwords or hashed for SCRAM:
243 ## auth_password_format: plain
244 auth_password_format: plain
245 ##
246 ## Define the FQDN if ejabberd doesn't detect it:
247 ## fqdn: "server3.example.com"
248
249 ##
250 ## Authentication using external script
251 ## Make sure the script is executable by ejabberd.
252 ##
253 ## auth_method: external
254 ## extauth_program: "/path/to/authentication/script"
255
256 ##
257 ## Authentication using ODBC
258 ## Remember to setup a database in the next section.
259 ##
260 ## auth_method: odbc
261
262 ##
263 ## Authentication using PAM
264 ##
265 ## auth_method: pam
266 ## pam_service: "pamservicename"
267
268 ##
269 ## Authentication using LDAP
270 ##
271 ## auth_method: ldap
272 ##
273 ## List of LDAP servers:
274 ## ldap_servers:
275 ##   - "localhost"
276 ##
277 ## Encryption of connection to LDAP servers:
278 ## ldap_encrypt: none
279 ## ldap_encrypt: tls
280 ##
281 ## Port to connect to on LDAP servers:
282 ## ldap_port: 389
283 ## ldap_port: 636
284 ##
285 ## LDAP manager:
286 ## ldap_rootdn: "dc=example,dc=com"
287 ##
288 ## Password of LDAP manager:
289 ## ldap_password: "******"
290 ##
291 ## Search base of LDAP directory:
292 ## ldap_base: "dc=example,dc=com"
293 ##
294 ## LDAP attribute that holds user ID:
295 ## ldap_uids:
296 ##   - "mail": "%u@mail.example.org"
297 ##
298 ## LDAP filter:
299 ## ldap_filter: "(objectClass=shadowAccount)"
300
301 ##
302 ## Anonymous login support:
303 ##   auth_method: anonymous
304 ##   anonymous_protocol: sasl_anon | login_anon | both
305 ##   allow_multiple_connections: true | false
306 ##
307 ## host_config:
308 ##   "public.example.org":
309 ##     auth_method: anonymous
310 ##     allow_multiple_connections: false
311 ##     anonymous_protocol: sasl_anon
312 ##
313 ## To use both anonymous and internal authentication:
314 ##
315 ## host_config:
316 ##   "public.example.org":
317 ##     auth_method:
318 ##       - internal
319 ##       - anonymous
320
321 ###.  ==============
322 ###'  DATABASE SETUP
323
324 ## ejabberd by default uses the internal Mnesia database,
325 ## so you do not necessarily need this section.
326 ## This section provides configuration examples in case
327 ## you want to use other database backends.
328 ## Please consult the ejabberd Guide for details on database creation.
329
330 ##
331 ## MySQL server:
332 ##
333 ## odbc_type: mysql
334 ## odbc_server: "server"
335 ## odbc_database: "database"
336 ## odbc_username: "username"
337 ## odbc_password: "password"
338 ##
339 ## If you want to specify the port:
340 ## odbc_port: 1234
341
342 ##
343 ## PostgreSQL server:
344 ##
345 ## odbc_type: pgsql
346 ## odbc_server: "server"
347 ## odbc_database: "database"
348 ## odbc_username: "username"
349 ## odbc_password: "password"
350 ##
351 ## If you want to specify the port:
352 ## odbc_port: 1234
353 ##
354 ## If you use PostgreSQL, have a large database, and need a
355 ## faster but inexact replacement for "select count(*) from users"
356 ##
357 ## pgsql_users_number_estimate: true
358
359 ##
360 ## SQLite:
361 ##
362 ## odbc_type: sqlite
363 ## odbc_database: "/path/to/database.db"
364
365 ##
366 ## ODBC compatible or MSSQL server:
367 ##
368 ## odbc_type: odbc
369 ## odbc_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"
370
371 ##
372 ## Number of connections to open to the database for each virtual host
373 ##
374 ## odbc_pool_size: 10
375
376 ##
377 ## Interval to make a dummy SQL request to keep the connections to the
378 ## database alive. Specify in seconds: for example 28800 means 8 hours
379 ##
380 ## odbc_keepalive_interval: undefined
381
382 ###.  ===============
383 ###'  TRAFFIC SHAPERS
384
385 shaper:
386   ##
387   ## The "normal" shaper limits traffic speed to 1000 B/s
388   ##
389   normal: 500000
390
391   ##
392   ## The "fast" shaper limits traffic speed to 50000 B/s
393   ##
394   fast: 500000
395
396 ##
397 ## This option specifies the maximum number of elements in the queue
398 ## of the FSM. Refer to the documentation for details.
399 ##
400 max_fsm_queue: 1000
401
402 ###.   ====================
403 ###'   ACCESS CONTROL LISTS
404 acl:
405   ##
406   ## The 'admin' ACL grants administrative privileges to XMPP accounts.
407   ## You can put here as many accounts as you want.
408   ##
409   admin:
410      user:
411          - "": "localhost"
412
413   ##
414   ## Blocked users
415   ##
416   ## blocked:
417   ##   user:
418   ##     - "baduser": "example.org"
419   ##     - "test"
420
421   ## Local users: don't modify this.
422   ##
423   local: 
424     user_regexp: ""
425
426   ##
427   ## More examples of ACLs
428   ##
429   ## jabberorg:
430   ##   server:
431   ##     - "jabber.org"
432   ## aleksey:
433   ##   user:
434   ##     - "aleksey": "jabber.ru"
435   ## test:
436   ##   user_regexp: "^test"
437   ##   user_glob: "test*"
438
439   ##
440   ## Loopback network
441   ##
442   loopback:
443     ip:
444       - "127.0.0.0/8"
445
446   ##
447   ## Bad XMPP servers
448   ##
449   ## bad_servers:
450   ##   server:
451   ##     - "xmpp.zombie.org"
452   ##     - "xmpp.spam.com"
453
454 ##
455 ## Define specific ACLs in a virtual host.
456 ##
457 ## host_config:
458 ##   "localhost":
459 ##     acl:
460 ##       admin:
461 ##         user:
462 ##           - "bob-local": "localhost"
463
464 ###.  ============
465 ###'  ACCESS RULES
466 access:
467   ## Maximum number of simultaneous sessions allowed for a single user:
468   max_user_sessions: 
469     all: 10000
470   ## Maximum number of offline messages that users can have:
471   max_user_offline_messages: 
472     admin: 5000
473     all: 100
474   ## This rule allows access only for local users:
475   local: 
476     local: allow
477   ## Only non-blocked users can use c2s connections:
478   c2s: 
479     blocked: deny
480     all: allow
481   ## For C2S connections, all users except admins use the "normal" shaper
482   c2s_shaper: 
483     admin: none
484     all: normal
485   ## All S2S connections use the "fast" shaper
486   s2s_shaper: 
487     all: fast
488   ## Only admins can send announcement messages:
489   announce: 
490     admin: allow
491   ## Only admins can use the configuration interface:
492   configure: 
493     admin: allow
494   ## Admins of this server are also admins of the MUC service:
495   muc_admin: 
496     admin: allow
497   ## Only accounts of the local ejabberd server can create rooms:
498   muc_create: 
499     local: allow
500   ## All users are allowed to use the MUC service:
501   muc: 
502     all: allow
503   ## Only accounts on the local ejabberd server can create Pubsub nodes:
504   pubsub_createnode: 
505     local: allow
506   ## In-band registration allows registration of any possible username.
507   ## To disable in-band registration, replace 'allow' with 'deny'.
508   register: 
509     all: allow
510   ## Only allow to register from localhost
511   trusted_network: 
512     loopback: allow
513   ## Do not establish S2S connections with bad servers
514   ## s2s: 
515   ##   bad_servers: deny
516   ##   all: allow
517
518 ## By default the frequency of account registrations from the same IP
519 ## is limited to 1 account every 10 minutes. To disable, specify: infinity
520 ## registration_timeout: 600
521   
522 ##
523 ## Define specific Access Rules in a virtual host.
524 ##
525 ## host_config:
526 ##   "localhost":
527 ##     access:
528 ##       c2s:
529 ##         admin: allow
530 ##         all: deny
531 ##       register:
532 ##         all: deny
533
534 ###.  ================
535 ###'  DEFAULT LANGUAGE
536
537 ##
538 ## language: Default language used for server messages.
539 ##
540 language: "en"
541
542 ##
543 ## Set a different default language in a virtual host.
544 ##
545 ## host_config:
546 ##   "localhost":
547 ##     language: "ru"
548
549 ###.  =======
550 ###'  CAPTCHA
551
552 ##
553 ## Full path to a script that generates the image.
554 ##
555 ## captcha_cmd: "/usr/share/ejabberd/captcha.sh"
556
557 ##
558 ## Host for the URL and port where ejabberd listens for CAPTCHA requests.
559 ##
560 ## captcha_host: "example.org:5280"
561
562 ##
563 ## Limit CAPTCHA calls per minute for JID/IP to avoid DoS.
564 ##
565 ## captcha_limit: 5
566
567 ###.  =======
568 ###'  MODULES
569
570 ##
571 ## Modules enabled in all ejabberd virtual hosts.
572 ##
573 modules: 
574   mod_adhoc: {}
575   mod_admin_extra: {}
576   mod_announce: # recommends mod_adhoc
577     access: announce
578   mod_blocking: {} # requires mod_privacy
579   mod_caps: {}
580   mod_carboncopy: {}
581   mod_client_state: {}
582   mod_configure: {} # requires mod_adhoc
583   mod_disco: {}
584   mod_echo: {}
585   mod_irc: {}
586   mod_http_bind: {}
587   ## mod_http_fileserver:
588   ##   docroot: "/var/www"
589   ##   accesslog: "/var/log/ejabberd/access.log"
590   mod_last: {}
591   mod_muc: 
592     ## host: "conference.@HOST@"
593     access: muc
594     access_create: muc_create
595     access_persistent: muc_create
596     access_admin: muc_admin
597   ## mod_muc_log: {}
598   mod_muc_admin: {}
599   ## mod_multicast: {}
600   #mod_offline: 
601   #  access_max_user_messages: max_user_offline_messages
602   mod_ping: {}
603   ## mod_pres_counter:
604   ##   count: 5
605   ##   interval: 60
606   mod_privacy: {}
607   mod_private: {}
608   ## mod_proxy65: {}
609   mod_pubsub: 
610     access_createnode: pubsub_createnode
611     ## reduces resource comsumption, but XEP incompliant
612     ignore_pep_from_offline: true
613     ## XEP compliant, but increases resource comsumption
614     ## ignore_pep_from_offline: false
615     last_item_cache: false
616     plugins: 
617       - "flat"
618       - "hometree"
619       - "pep" # pep requires mod_caps
620   mod_register: 
621     ##
622     ## Protect In-Band account registrations with CAPTCHA.
623     ##
624     ## captcha_protected: true
625
626     ##
627     ## Set the minimum informational entropy for passwords.
628     ##
629     ## password_strength: 32
630
631     ##
632     ## After successful registration, the user receives
633     ## a message with this subject and body.
634     ##
635     welcome_message: 
636       subject: "Welcome!"
637       body: |-
638         Hi.
639         Welcome to this XMPP server.
640
641     ##
642     ## When a user registers, send a notification to
643     ## these XMPP accounts.
644     ##
645     ## registration_watchers:
646     ##   - "admin1@example.org"
647
648     ##
649     ## Only clients in the server machine can register accounts
650     ##
651     ip_access: trusted_network
652
653     ##
654     ## Local c2s or remote s2s users cannot register accounts
655     ##
656     ## access_from: deny
657
658     access: register
659   mod_roster: {}
660   mod_shared_roster: {}
661   mod_stats: {}
662   mod_time: {}
663   mod_vcard:
664     search: false
665   mod_version: {}
666
667 ##
668 ## Enable modules with custom options in a specific virtual host
669 ##
670 ## host_config:
671 ##   "localhost":
672 ##     modules:
673 ##       mod_echo:
674 ##         host: "mirror.localhost"
675
676 ##
677 ## Enable modules management via ejabberdctl for installation and
678 ## uninstallation of public/private contributed modules
679 ## (enabled by default)
680 ##
681
682 allow_contrib_modules: true
683
684 ###.
685 ###'
686 ### Local Variables:
687 ### mode: yaml
688 ### End:
689 ### vim: set filetype=yaml tabstop=8 foldmarker=###',###. foldmethod=marker: