Guest User

Untitled

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