Guest User

ejabberd.yaml

a guest
Sep 25th, 2015
635
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 9.26 KB | None | 0 0
  1. ###
  2. ###               ejabberd configuration file
  3. ###
  4. ###
  5.  
  6. ###   =======
  7. ###   LOGGING
  8.  
  9. ## 0: No ejabberd log at all (not recommended)
  10. ## 1: Critical
  11. ## 2: Error
  12. ## 3: Warning
  13. ## 4: Info
  14. ## 5: Debug
  15. ##
  16. loglevel: 4
  17.  
  18. ##  $D0     rotate every night at midnight
  19. ##  $D23    rotate every day at 23:00 hr
  20. ##  $W0D23  rotate every week on Sunday at 23:00 hr
  21. ##  $W5D16  rotate every week on Friday at 16:00 hr
  22. ##  $M1D0   rotate on the first day of every month at midnight
  23. ##  $M5D6   rotate on every 5th day of the month at 6:00 hr
  24. ##
  25. log_rotate_size: 10485760
  26. log_rotate_date: ""
  27. log_rotate_count: 1
  28.  
  29. log_rate_limit: 100
  30.  
  31. ## watchdog_admins:
  32.  
  33.  
  34. ###   ================
  35. ###   SERVED HOSTNAMES
  36.  
  37. hosts:
  38.  - "example.com"
  39.  
  40. ###   ===============
  41. ###   LISTENING PORTS
  42.  
  43. listen:
  44.   -
  45.     port: 443
  46.     ip: "199.0.0.1"
  47.     module: ejabberd_c2s
  48.     certfile: "/etc/ssl/private/example_com_chain.pem"
  49.     starttls: true
  50.     max_stanza_size: 65536
  51.     shaper: c2s_shaper
  52.     access: c2s
  53.   -
  54.     port: 5222
  55.     ip: "199.0.0.1"
  56.     module: ejabberd_c2s
  57.     certfile: "/etc/ssl/private/example_com_chain.pem"
  58.     starttls: true
  59.     max_stanza_size: 65536
  60.     shaper: c2s_shaper
  61.     access: c2s
  62.   -
  63.     port: 5223
  64.     ip: "199.0.0.1"
  65.     module: ejabberd_c2s
  66.     certfile: "/etc/ssl/private/example_com_chain.pem"
  67.     tls: true
  68.     max_stanza_size: 65536
  69.     shaper: c2s_shaper
  70.     access: c2s
  71.   -
  72.     port: 5269
  73.     ip: "199.0.0.1"
  74.     shaper: s2s_shaper
  75.     module: ejabberd_s2s_in
  76.   -
  77.     port: 5280
  78.     module: ejabberd_http
  79.     ip: "199.0.0.1"
  80.     ##request_handlers:
  81.       ##"archive": mod_archive_webview
  82.     web_admin: true
  83.     http_poll: true
  84.     http_bind: true
  85.     ## register: true
  86.     captcha: true
  87.   -
  88.     port: 5281
  89.     module: ejabberd_http
  90.     ip: "199.0.0.1"
  91.     certfile: "/etc/ssl/private/example_com_chain.pem"
  92.     tls: true
  93.     ##request_handlers:
  94.       ##"archive": mod_archive_webview
  95.     web_admin: true
  96.     http_poll: true
  97.     http_bind: true
  98.     ## register: true
  99.     captcha: true
  100.   -
  101.     port: 5349
  102.     ip: "199.0.0.1"
  103.     module: ejabberd_stun
  104.     certfile: "/etc/ssl/private/example_com_chain.pem"
  105.   -
  106.     port: 3478
  107.     ip: "199.0.0.1"
  108.     module: ejabberd_stun
  109.   -
  110.     port: 3478
  111.     transport: udp
  112.     ip: "199.0.0.1"
  113.     module: ejabberd_stun
  114.  
  115. s2s_use_starttls: optional
  116. s2s_certfile: "/etc/ssl/private/example_com_chain.pem"
  117.  
  118. ## S2S whitelist or blacklist
  119. ##
  120. ## Default s2s policy for undefined hosts.
  121. ##
  122. ## s2s_access: s2s
  123.  
  124. ##
  125. ## Outgoing S2S options
  126. ##
  127. ## Preferred address families (which to try first) and connect timeout
  128. ## in milliseconds.
  129. ##
  130. ## outgoing_s2s_families:
  131. ##   - ipv4
  132. ##   - ipv6
  133. ## outgoing_s2s_timeout: 10000
  134.  
  135. ###   ==============
  136. ###   AUTHENTICATION
  137.  
  138. ##
  139. ## auth_method: Method used to authenticate the users.
  140. ## The default method is the internal.
  141. ## If you want to use a different method,
  142. ## comment this line and enable the correct ones.
  143. ##
  144. auth_method: odbc
  145.  
  146. ##
  147. ## Store the plain passwords or hashed for SCRAM:
  148. ## auth_password_format: plain
  149. ## auth_password_format: scram
  150. ##
  151. ## Define the FQDN if ejabberd doesn't detect it:
  152. fqdn: "xmpp.example.com"
  153.  
  154. ## MySQL server:
  155. ##
  156. odbc_type: mysql
  157. odbc_server: "localhost"
  158. odbc_database: "ejabberd"
  159. odbc_username: "ejabberd"
  160. odbc_password: "guesswhat"
  161. ##
  162. ## If you want to specify the port:
  163. ## odbc_port: 1234
  164.  
  165. odbc_keepalive_interval: 3600
  166.  
  167. ###   ===============
  168. ###   TRAFFIC SHAPERS
  169.  
  170. shaper:
  171.  ##
  172.   ## The "normal" shaper limits traffic speed to 1000 B/s
  173.   ##
  174.   normal: 1000
  175.  
  176.   ##
  177.   ## The "fast" shaper limits traffic speed to 50000 B/s
  178.   ##
  179.   fast: 50000
  180.  
  181. ##
  182. ## This option specifies the maximum number of elements in the queue
  183. ## of the FSM. Refer to the documentation for details.
  184. ##
  185. max_fsm_queue: 1000
  186.  
  187. ###.   ====================
  188. ###'   ACCESS CONTROL LISTS
  189. acl:
  190.  ##
  191.   ## The 'admin' ACL grants administrative privileges to XMPP accounts.
  192.   ## You can put here as many accounts as you want.
  193.   ##
  194.   admin:
  195.     user:
  196.       - "admin": "example.com"
  197.   ##
  198.   ## Blocked users
  199.   ##
  200.   ## blocked:
  201.   ##   user:
  202.   ##     - "baduser": "example.org"
  203.   ##     - "test"
  204.  
  205.   ## Local users: don't modify this.
  206.   ##
  207.   local:
  208.     user_regexp: ""
  209.  
  210.   ##
  211.   ## Loopback network
  212.   ##
  213.   loopback:
  214.     ip:
  215.      - "127.0.0.0/8"
  216.  
  217. ###   ============
  218. ###   ACCESS RULES
  219. access:
  220.  ## Maximum number of simultaneous sessions allowed for a single user:
  221.   max_user_sessions:
  222.     all: 10
  223.   ## Maximum number of offline messages that users can have:
  224.   max_user_offline_messages:
  225.     admin: 5000
  226.     all: 100
  227.   ## This rule allows access only for local users:
  228.   local:
  229.     local: allow
  230.   ## Only non-blocked users can use c2s connections:
  231.   c2s:
  232.     blocked: deny
  233.     all: allow
  234.   ## For C2S connections, all users except admins use the "normal" shaper
  235.   c2s_shaper:
  236.     admin: none
  237.     all: normal
  238.   ## All S2S connections use the "fast" shaper
  239.   s2s_shaper:
  240.     all: fast
  241.   ## Only admins can send announcement messages:
  242.   announce:
  243.     admin: allow
  244.   ## Only admins can use the configuration interface:
  245.   configure:
  246.     admin: allow
  247.   ## Admins of this server are also admins of the MUC service:
  248.   muc_admin:
  249.     admin: allow
  250.   ## Only accounts of the local ejabberd server can create rooms:
  251.   muc_create:
  252.     local: allow
  253.   ## All users are allowed to use the MUC service:
  254.   muc:
  255.     all: allow
  256.   ## Only accounts on the local ejabberd server can create Pubsub nodes:
  257.   pubsub_createnode:
  258.     local: allow
  259.   ## In-band registration allows registration of any possible username.
  260.   ## To disable in-band registration, replace 'allow' with 'deny'.
  261.   register:
  262.     all: allow
  263.   ## Only allow to register from localhost
  264.   trusted_network:
  265.     loopback: allow
  266.   ## Do not establish S2S connections with bad servers
  267.   ## s2s:
  268.   ##   bad_servers: deny
  269.   ##   all: allow
  270.  
  271. ###   ================
  272. ###   DEFAULT LANGUAGE
  273.  
  274. ##
  275. ## language: Default language used for server messages.
  276. ##
  277. language: "en"
  278.  
  279. ###   =======
  280. ###   CAPTCHA
  281.  
  282. ##
  283. ## Full path to a script that generates the image.
  284. ##
  285. captcha_cmd: "/usr/lib64/ejabberd/priv/bin/captcha.sh"
  286.  
  287. ##
  288. ## Host for the URL and port where ejabberd listens for CAPTCHA requests.
  289. ##
  290. captcha_host: "example.com:5280"
  291.  
  292. ##
  293. ## Limit CAPTCHA calls per minute for JID/IP to avoid DoS.
  294. ##
  295. captcha_limit: 5
  296.  
  297. ###   =======
  298. ###   MODULES
  299.  
  300. ##
  301. ## Modules enabled in all ejabberd virtual hosts.
  302. ##
  303. modules:
  304.   mod_adhoc: {}
  305.   mod_announce: # recommends mod_adhoc
  306.     access: announce
  307.     db_type: odbc
  308.   mod_blocking: {} # requires mod_privacy
  309.   mod_caps: {}
  310.   mod_carboncopy: {}
  311.   mod_configure: {} # requires mod_adhoc
  312.   mod_disco: {}
  313.   ## mod_echo: {}
  314.   mod_irc:
  315.     db_type: odbc
  316.   mod_http_bind: {}
  317.   ## mod_http_fileserver:
  318.   ##   docroot: "/var/www"
  319.   ##   accesslog: "/var/log/ejabberd/access.log"
  320.   mod_last:
  321.     db_type: odbc
  322.   mod_mam:
  323.     request_activates_archiving: false
  324.   mod_muc:
  325.     host: "conference.example.com"
  326.     access: muc
  327.     access_create: muc_create
  328.     access_persistent: muc_create
  329.     access_admin: muc_admin
  330.   ## mod_muc_log: {}
  331.   mod_offline:
  332.     db_type: odbc
  333.     access_max_user_messages: max_user_offline_messages
  334.   mod_ping: {}
  335.   ## mod_pres_counter:
  336.   ##   count: 5
  337.   ##   interval: 60
  338.   mod_privacy:
  339.     db_type: odbc
  340.   mod_private:
  341.     db_type: odbc
  342.   mod_proxy65:
  343.     host: "proxy.example.com"
  344.     ip: "199.0.0.1"
  345.     port: 7777
  346.   mod_pubsub_odbc:
  347.     host: "pubsub.example.com"
  348.     access_createnode: pubsub_createnode
  349.     ## reduces resource comsumption, but XEP incompliant
  350.     ## ignore_pep_from_offline: true
  351.     ## XEP compliant, but increases resource comsumption
  352.     ignore_pep_from_offline: false
  353.     last_item_cache: false
  354.     plugins:
  355.       - "flat_odbc"
  356.       - "hometree_odbc"
  357.       - "pep_odbc" # pep requires mod_caps
  358.   mod_register:
  359.     ##
  360.     ## Protect In-Band account registrations with CAPTCHA.
  361.     ##
  362.     captcha_protected: true
  363.  
  364.     ##
  365.     ## Set the minimum informational entropy for passwords.
  366.     ##
  367.     ## password_strength: 32
  368.  
  369.     ##
  370.     ## After successful registration, the user receives
  371.     ## a message with this subject and body.
  372.     ##
  373.     welcome_message:
  374.       subject: "Welcome!"
  375.       body: |-
  376.         Hi.
  377.         Welcome to this XMPP server.
  378.  
  379.     ##
  380.     ## When a user registers, send a notification to
  381.     ## these XMPP accounts.
  382.     ##
  383.     ## registration_watchers:
  384.     ##   - "[email protected]"
  385.  
  386.     ##
  387.     ## Only clients in the server machine can register accounts
  388.     ##
  389.     ip_access: trusted_network
  390.  
  391.     ##
  392.     ## Local c2s or remote s2s users cannot register accounts
  393.     ##
  394.     ## access_from: deny
  395.  
  396.     access: register
  397.   mod_roster:
  398.     db_type: odbc
  399.     versioning: true
  400.     store_current_id: true
  401.   mod_shared_roster:
  402.     db_type: odbc
  403.   mod_stats: {}
  404.   mod_time: {}
  405.   mod_vcard:
  406.     db_type: odbc
  407.   mod_vcard_xupdate:
  408.     db_type: odbc
  409.   mod_version: {}
  410.  
  411. ##
  412. ## Enable modules with custom options in a specific virtual host
  413. ##
  414. ## append_host_config:
  415. ##   "localhost":
  416. ##     modules:
  417. ##       mod_echo:
  418. ##         host: "mirror.localhost"
  419.  
  420. ### Local Variables:
  421. ### mode: yaml
  422. ### End:
  423. ### vim: set filetype=yaml tabstop=8
Advertisement
Add Comment
Please, Sign In to add comment