Advertisement
Guest User

ejabberd.yaml

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