Advertisement
Guest User

ejabberd.yml

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