Advertisement
Guest User

Untitled

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