Advertisement
Guest User

Untitled

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