logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

pleroma-mongooseim.cfg (28852B)


  1. %%%
  2. %%% ejabberd configuration file
  3. %%%
  4. %%%'
  5. %%% The parameters used in this configuration file are explained in more detail
  6. %%% in the ejabberd Installation and Operation Guide.
  7. %%% Please consult the Guide in case of doubts, it is included with
  8. %%% your copy of ejabberd, and is also available online at
  9. %%% http://www.process-one.net/en/ejabberd/docs/
  10. %%% This configuration file contains Erlang terms.
  11. %%% In case you want to understand the syntax, here are the concepts:
  12. %%%
  13. %%% - The character to comment a line is %
  14. %%%
  15. %%% - Each term ends in a dot, for example:
  16. %%% override_global.
  17. %%%
  18. %%% - A tuple has a fixed definition, its elements are
  19. %%% enclosed in {}, and separated with commas:
  20. %%% {loglevel, 4}.
  21. %%%
  22. %%% - A list can have as many elements as you want,
  23. %%% and is enclosed in [], for example:
  24. %%% [http_poll, web_admin, tls]
  25. %%%
  26. %%% Pay attention that list elements are delimited with commas,
  27. %%% but no comma is allowed after the last list element. This will
  28. %%% give a syntax error unlike in more lenient languages (e.g. Python).
  29. %%%
  30. %%% - A keyword of ejabberd is a word in lowercase.
  31. %%% Strings are enclosed in "" and can contain spaces, dots, ...
  32. %%% {language, "en"}.
  33. %%% {ldap_rootdn, "dc=example,dc=com"}.
  34. %%%
  35. %%% - This term includes a tuple, a keyword, a list, and two strings:
  36. %%% {hosts, ["jabber.example.net", "im.example.com"]}.
  37. %%%
  38. %%% - This config is preprocessed during release generation by a tool which
  39. %%% interprets double curly braces as substitution markers, so avoid this
  40. %%% syntax in this file (though it's valid Erlang).
  41. %%%
  42. %%% So this is OK (though arguably looks quite ugly):
  43. %%% { {s2s_addr, "example-host.net"}, {127,0,0,1} }.
  44. %%%
  45. %%% And I can't give an example of what's not OK exactly because
  46. %%% of this rule.
  47. %%%
  48. %%%. =======================
  49. %%%' OVERRIDE STORED OPTIONS
  50. %%
  51. %% Override the old values stored in the database.
  52. %%
  53. %%
  54. %% Override global options (shared by all ejabberd nodes in a cluster).
  55. %%
  56. %%override_global.
  57. %%
  58. %% Override local options (specific for this particular ejabberd node).
  59. %%
  60. %%override_local.
  61. %%
  62. %% Remove the Access Control Lists before new ones are added.
  63. %%
  64. %%override_acls.
  65. %%%. =========
  66. %%%' DEBUGGING
  67. %%
  68. %% loglevel: Verbosity of log files generated by ejabberd.
  69. %% 0: No ejabberd log at all (not recommended)
  70. %% 1: Critical
  71. %% 2: Error
  72. %% 3: Warning
  73. %% 4: Info
  74. %% 5: Debug
  75. %%
  76. {loglevel, 3}.
  77. %%%. ================
  78. %%%' SERVED HOSTNAMES
  79. %%
  80. %% hosts: Domains served by ejabberd.
  81. %% You can define one or several, for example:
  82. %% {hosts, ["example.net", "example.com", "example.org"]}.
  83. %%
  84. {hosts, ["pleroma.soykaf.com"] }.
  85. %%
  86. %% route_subdomains: Delegate subdomains to other XMPP servers.
  87. %% For example, if this ejabberd serves example.org and you want
  88. %% to allow communication with an XMPP server called im.example.org.
  89. %%
  90. %%{route_subdomains, s2s}.
  91. %%%. ===============
  92. %%%' LISTENING PORTS
  93. %%
  94. %% listen: The ports ejabberd will listen on, which service each is handled
  95. %% by and what options to start it with.
  96. %%
  97. {listen,
  98. [
  99. %% BOSH and WS endpoints over HTTP
  100. { 5280, ejabberd_cowboy, [
  101. {num_acceptors, 10},
  102. {transport_options, [{max_connections, 1024}]},
  103. {modules, [
  104. {"_", "/http-bind", mod_bosh},
  105. {"_", "/ws-xmpp", mod_websockets, [{ejabberd_service, [
  106. {access, all},
  107. {shaper_rule, fast},
  108. {ip, {127, 0, 0, 1}},
  109. {password, "secret"}]}
  110. %% Uncomment to enable connection dropping or/and server-side pings
  111. %{timeout, 600000}, {ping_rate, 2000}
  112. ]}
  113. %% Uncomment to serve static files
  114. %{"_", "/static/[...]", cowboy_static,
  115. % {dir, "/var/www", [{mimetypes, cow_mimetypes, all}]}
  116. %},
  117. %% Example usage of mod_revproxy
  118. %% {"_", "/[...]", mod_revproxy, [{timeout, 5000},
  119. %% % time limit for upstream to respond
  120. %% {body_length, 8000000},
  121. %% % maximum body size (may be infinity)
  122. %% {custom_headers, [{<<"header">>,<<"value">>}]}
  123. %% % list of extra headers that are send to upstream
  124. %% ]}
  125. %% Example usage of mod_cowboy
  126. %% {"_", "/[...]", mod_cowboy, [{http, mod_revproxy,
  127. %% [{timeout, 5000},
  128. %% % time limit for upstream to respond
  129. %% {body_length, 8000000},
  130. %% % maximum body size (may be infinity)
  131. %% {custom_headers, [{<<"header">>,<<"value">>}]}
  132. %% % list of extra headers that are send to upstream
  133. %% ]},
  134. %% {ws, xmpp, mod_websockets}
  135. %% ]}
  136. ]}
  137. ]},
  138. %% BOSH and WS endpoints over HTTPS
  139. { 5285, ejabberd_cowboy, [
  140. {num_acceptors, 10},
  141. {transport_options, [{max_connections, 1024}]},
  142. {ssl, [{certfile, "priv/ssl/fullchain.pem"}, {keyfile, "priv/ssl/privkey.pem"}, {password, ""}]},
  143. {modules, [
  144. {"_", "/http-bind", mod_bosh},
  145. {"_", "/ws-xmpp", mod_websockets, [
  146. %% Uncomment to enable connection dropping or/and server-side pings
  147. %{timeout, 600000}, {ping_rate, 60000}
  148. ]}
  149. %% Uncomment to serve static files
  150. %{"_", "/static/[...]", cowboy_static,
  151. % {dir, "/var/www", [{mimetypes, cow_mimetypes, all}]}
  152. %},
  153. ]}
  154. ]},
  155. %% MongooseIM HTTP API it's important to start it on localhost
  156. %% or some private interface only (not accessible from the outside)
  157. %% At least start it on different port which will be hidden behind firewall
  158. { {8088, "127.0.0.1"} , ejabberd_cowboy, [
  159. {num_acceptors, 10},
  160. {transport_options, [{max_connections, 1024}]},
  161. {modules, [
  162. {"localhost", "/api", mongoose_api_admin, []}
  163. ]}
  164. ]},
  165. { 8089 , ejabberd_cowboy, [
  166. {num_acceptors, 10},
  167. {transport_options, [{max_connections, 1024}]},
  168. {protocol_options, [{compress, true}]},
  169. {ssl, [{certfile, "priv/ssl/fullchain.pem"}, {keyfile, "priv/ssl/privkey.pem"}, {password, ""}]},
  170. {modules, [
  171. {"_", "/api/sse", lasse_handler, [mongoose_client_api_sse]},
  172. {"_", "/api/messages/[:with]", mongoose_client_api_messages, []},
  173. {"_", "/api/contacts/[:jid]", mongoose_client_api_contacts, []},
  174. {"_", "/api/rooms/[:id]", mongoose_client_api_rooms, []},
  175. {"_", "/api/rooms/[:id]/config", mongoose_client_api_rooms_config, []},
  176. {"_", "/api/rooms/:id/users/[:user]", mongoose_client_api_rooms_users, []},
  177. {"_", "/api/rooms/[:id]/messages", mongoose_client_api_rooms_messages, []}
  178. ]}
  179. ]},
  180. %% Following HTTP API is deprecated, the new one above should be used instead
  181. { {5288, "127.0.0.1"} , ejabberd_cowboy, [
  182. {num_acceptors, 10},
  183. {transport_options, [{max_connections, 1024}]},
  184. {modules, [
  185. {"localhost", "/api", mongoose_api, [{handlers, [mongoose_api_metrics,
  186. mongoose_api_users]}]}
  187. ]}
  188. ]},
  189. %% If you want dual stack, you have to clone this entire config stanza
  190. %% and change the bind to "::"
  191. { {5222, "0.0.0.0"}, ejabberd_c2s, [
  192. %%
  193. %% If TLS is compiled in and you installed a SSL
  194. %% certificate, specify the full path to the
  195. %% file and uncomment this line:
  196. %%
  197. {certfile, "priv/ssl/both.pem"}, starttls,
  198. %%{zlib, 10000},
  199. %% https://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
  200. %% {ciphers, "DEFAULT:!EXPORT:!LOW:!SSLv2"},
  201. {access, c2s},
  202. {shaper, c2s_shaper},
  203. {max_stanza_size, 65536},
  204. {protocol_options, ["no_sslv3"]}
  205. ]},
  206. %%
  207. %% To enable the old SSL connection method on port 5223:
  208. %%
  209. %%{5223, ejabberd_c2s, [
  210. %% {access, c2s},
  211. %% {shaper, c2s_shaper},
  212. %% {certfile, "/path/to/ssl.pem"}, tls,
  213. %% {max_stanza_size, 65536}
  214. %% ]},
  215. %% If you want dual stack, you have to clone this entire config stanza
  216. %% and change the bind to "::"
  217. { {5269, "0.0.0.0"}, ejabberd_s2s_in, [
  218. {shaper, s2s_shaper},
  219. {max_stanza_size, 131072},
  220. {protocol_options, ["no_sslv3"]}
  221. ]}
  222. %%
  223. %% ejabberd_service: Interact with external components (transports, ...)
  224. %%
  225. ,{8888, ejabberd_service, [
  226. {access, all},
  227. {shaper_rule, fast},
  228. {ip, {127, 0, 0, 1}},
  229. {password, "secret"}
  230. ]}
  231. %%
  232. %% ejabberd_stun: Handles STUN Binding requests
  233. %%
  234. %%{ {3478, udp}, ejabberd_stun, []}
  235. ]}.
  236. %%
  237. %% s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections.
  238. %% Allowed values are: false optional required required_trusted
  239. %% You must specify a certificate file.
  240. %%
  241. {s2s_use_starttls, optional}.
  242. %%
  243. %% s2s_certfile: Specify a certificate file.
  244. %%
  245. {s2s_certfile, "priv/ssl/both.pem"}.
  246. %% https://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
  247. %% {s2s_ciphers, "DEFAULT:!EXPORT:!LOW:!SSLv2"}.
  248. %%
  249. %% domain_certfile: Specify a different certificate for each served hostname.
  250. %%
  251. %%{domain_certfile, "example.org", "/path/to/example_org.pem"}.
  252. %%{domain_certfile, "example.com", "/path/to/example_com.pem"}.
  253. %%
  254. %% S2S whitelist or blacklist
  255. %%
  256. %% Default s2s policy for undefined hosts.
  257. %%
  258. {s2s_default_policy, deny }.
  259. %%
  260. %% Allow or deny communication with specific servers.
  261. %%
  262. %%{ {s2s_host, "goodhost.org"}, allow}.
  263. %%{ {s2s_host, "badhost.org"}, deny}.
  264. {outgoing_s2s_port, 5269 }.
  265. %%
  266. %% IP addresses predefined for specific hosts to skip DNS lookups.
  267. %% Ports defined here take precedence over outgoing_s2s_port.
  268. %% Examples:
  269. %%
  270. %% { {s2s_addr, "example-host.net"}, {127,0,0,1} }.
  271. %% { {s2s_addr, "example-host.net"}, { {127,0,0,1}, 5269 } }.
  272. %% { {s2s_addr, "example-host.net"}, { {127,0,0,1}, 5269 } }.
  273. %%
  274. %% Outgoing S2S options
  275. %%
  276. %% Preferred address families (which to try first) and connect timeout
  277. %% in milliseconds.
  278. %%
  279. %%{outgoing_s2s_options, [ipv4, ipv6], 10000}.
  280. %%
  281. %%%. ==============
  282. %%%' SESSION BACKEND
  283. %%{sm_backend, {mnesia, []}}.
  284. %% Requires {redis, global, default, ..., ...} outgoing pool
  285. %%{sm_backend, {redis, []}}.
  286. {sm_backend, {mnesia, []} }.
  287. %%%. ==============
  288. %%%' AUTHENTICATION
  289. %% Advertised SASL mechanisms
  290. {sasl_mechanisms, [cyrsasl_plain]}.
  291. %%
  292. %% auth_method: Method used to authenticate the users.
  293. %% The default method is the internal.
  294. %% If you want to use a different method,
  295. %% comment this line and enable the correct ones.
  296. %%
  297. %% {auth_method, internal }.
  298. {auth_method, http }.
  299. {auth_opts, [
  300. {http, global, auth, [{workers, 50}], [{server, "https://pleroma.soykaf.com"}]},
  301. {password_format, plain} % default
  302. %% {password_format, scram}
  303. %% {scram_iterations, 4096} % default
  304. %%
  305. %% For auth_http:
  306. %% {basic_auth, "user:password"}
  307. %% {path_prefix, "/"} % default
  308. %% auth_http requires {http, Host | global, auth, ..., ...} outgoing pool.
  309. %%
  310. %% For auth_external
  311. %%{extauth_program, "/path/to/authentication/script"}.
  312. %%
  313. %% For auth_jwt
  314. %% {jwt_secret_source, "/path/to/file"},
  315. %% {jwt_algorithm, "RS256"},
  316. %% {jwt_username_key, user}
  317. %% For cyrsasl_external
  318. %% {authenticate_with_cn, false}
  319. {cyrsasl_external, standard}
  320. ]}.
  321. %%
  322. %% Authentication using external script
  323. %% Make sure the script is executable by ejabberd.
  324. %%
  325. %%{auth_method, external}.
  326. %%
  327. %% Authentication using RDBMS
  328. %% Remember to setup a database in the next section.
  329. %%
  330. %%{auth_method, rdbms}.
  331. %%
  332. %% Authentication using LDAP
  333. %%
  334. %%{auth_method, ldap}.
  335. %%
  336. %% List of LDAP servers:
  337. %%{ldap_servers, ["localhost"]}.
  338. %%
  339. %% Encryption of connection to LDAP servers:
  340. %%{ldap_encrypt, none}.
  341. %%{ldap_encrypt, tls}.
  342. %%
  343. %% Port to connect to on LDAP servers:
  344. %%{ldap_port, 389}.
  345. %%{ldap_port, 636}.
  346. %%
  347. %% LDAP manager:
  348. %%{ldap_rootdn, "dc=example,dc=com"}.
  349. %%
  350. %% Password of LDAP manager:
  351. %%{ldap_password, "******"}.
  352. %%
  353. %% Search base of LDAP directory:
  354. %%{ldap_base, "dc=example,dc=com"}.
  355. %%
  356. %% LDAP attribute that holds user ID:
  357. %%{ldap_uids, [{"mail", "%u@mail.example.org"}]}.
  358. %%
  359. %% LDAP filter:
  360. %%{ldap_filter, "(objectClass=shadowAccount)"}.
  361. %%
  362. %% Anonymous login support:
  363. %% auth_method: anonymous
  364. %% anonymous_protocol: sasl_anon | login_anon | both
  365. %% allow_multiple_connections: true | false
  366. %%
  367. %%{host_config, "public.example.org", [{auth_method, anonymous},
  368. %% {allow_multiple_connections, false},
  369. %% {anonymous_protocol, sasl_anon}]}.
  370. %%
  371. %% To use both anonymous and internal authentication:
  372. %%
  373. %%{host_config, "public.example.org", [{auth_method, [internal, anonymous]}]}.
  374. %%%. ==============
  375. %%%' OUTGOING CONNECTIONS (e.g. DB)
  376. %% Here you may configure all outgoing connections used by MongooseIM,
  377. %% e.g. to RDBMS (such as MySQL), Riak or external HTTP components.
  378. %% Default MongooseIM configuration uses only Mnesia (non-Mnesia extensions are disabled),
  379. %% so no options here are uncommented out of the box.
  380. %% This section includes configuration examples; for comprehensive guide
  381. %% please consult MongooseIM documentation, page "Outgoing connections":
  382. %% - doc/advanced-configuration/outgoing-connections.md
  383. %% - https://mongooseim.readthedocs.io/en/latest/advanced-configuration/outgoing-connections/
  384. {outgoing_pools, [
  385. % {riak, global, default, [{workers, 5}], [{address, "127.0.0.1"}, {port, 8087}]},
  386. % {elastic, global, default, [], [{host, "elastic.host.com"}, {port, 9042}]},
  387. {http, global, auth, [{workers, 50}], [{server, "https://pleroma.soykaf.com"}]}
  388. % {cassandra, global, default, [{workers, 100}], [{servers, [{"server1", 9042}]}, {keyspace, "big_mongooseim"}]},
  389. % {rdbms, global, default, [{workers, 10}], [{server, {mysql, "server", 3306, "database", "username", "password"}}]}
  390. ]}.
  391. %% More examples that may be added to outgoing_pools list:
  392. %%
  393. %% == MySQL ==
  394. %% {rdbms, global, default, [{workers, 10}],
  395. %% [{server, {mysql, "server", 3306, "database", "username", "password"}},
  396. %% {keepalive_interval, 10}]},
  397. %% keepalive_interval is optional
  398. %% == PostgreSQL ==
  399. %% {rdbms, global, default, [{workers, 10}],
  400. %% [{server, {pgsql, "server", "port", "database", "username", "password"}}]},
  401. %% == ODBC (MSSQL) ==
  402. %% {rdbms, global, default, [{workers, 10}],
  403. %% [{server, "DSN=mongooseim;UID=mongooseim;PWD=mongooseim"}]},
  404. %% == Elastic Search ==
  405. %% {elastic, global, default, [], [{host, "elastic.host.com"}, {port, 9042}]},
  406. %% == Riak ==
  407. %% {riak, global, default, [{workers, 20}], [{address, "127.0.0.1"}, {port, 8087}]},
  408. %% == HTTP ==
  409. %% {http, global, conn1, [{workers, 50}], [{server, "http://server:8080"}]},
  410. %% == Cassandra ==
  411. %% {cassandra, global, default, [{workers, 100}],
  412. %% [
  413. %% {servers, [
  414. %% {"cassandra_server1.example.com", 9042},
  415. %% {"cassandra_server2.example.com", 9042},
  416. %% {"cassandra_server3.example.com", 9042},
  417. %% {"cassandra_server4.example.com", 9042}
  418. %% ]},
  419. %% {keyspace, "big_mongooseim"}
  420. %% ]}
  421. %% == Extra options ==
  422. %%
  423. %% If you use PostgreSQL, have a large database, and need a
  424. %% faster but inexact replacement for "select count(*) from users"
  425. %%
  426. %%{pgsql_users_number_estimate, true}.
  427. %%
  428. %% rdbms_server_type specifies what database is used over the RDBMS layer
  429. %% Can take values mssql, pgsql, mysql
  430. %% In some cases (for example for MAM with pgsql) it is required to set proper value.
  431. %%
  432. %% {rdbms_server_type, pgsql}.
  433. %%%. ===============
  434. %%%' TRAFFIC SHAPERS
  435. %%
  436. %% The "normal" shaper limits traffic speed to 1000 B/s
  437. %%
  438. {shaper, normal, {maxrate, 1000}}.
  439. %%
  440. %% The "fast" shaper limits traffic speed to 50000 B/s
  441. %%
  442. {shaper, fast, {maxrate, 50000}}.
  443. %%
  444. %% This option specifies the maximum number of elements in the queue
  445. %% of the FSM. Refer to the documentation for details.
  446. %%
  447. {max_fsm_queue, 1000}.
  448. %%%. ====================
  449. %%%' ACCESS CONTROL LISTS
  450. %%
  451. %% The 'admin' ACL grants administrative privileges to XMPP accounts.
  452. %% You can put here as many accounts as you want.
  453. %%
  454. %{acl, admin, {user, "alice", "localhost"}}.
  455. %{acl, admin, {user, "a", "localhost"}}.
  456. %%
  457. %% Blocked users
  458. %%
  459. %%{acl, blocked, {user, "baduser", "example.org"}}.
  460. %%{acl, blocked, {user, "test"}}.
  461. %%
  462. %% Local users: don't modify this line.
  463. %%
  464. {acl, local, {user_regexp, ""}}.
  465. %%
  466. %% More examples of ACLs
  467. %%
  468. %%{acl, jabberorg, {server, "jabber.org"}}.
  469. %%{acl, aleksey, {user, "aleksey", "jabber.ru"}}.
  470. %%{acl, test, {user_regexp, "^test"}}.
  471. %%{acl, test, {user_glob, "test*"}}.
  472. %%
  473. %% Define specific ACLs in a virtual host.
  474. %%
  475. %%{host_config, "localhost",
  476. %% [
  477. %% {acl, admin, {user, "bob-local", "localhost"}}
  478. %% ]
  479. %%}.
  480. %%%. ============
  481. %%%' ACCESS RULES
  482. %% Maximum number of simultaneous sessions allowed for a single user:
  483. {access, max_user_sessions, [{10, all}]}.
  484. %% Maximum number of offline messages that users can have:
  485. {access, max_user_offline_messages, [{5000, admin}, {100, all}]}.
  486. %% This rule allows access only for local users:
  487. {access, local, [{allow, local}]}.
  488. %% Only non-blocked users can use c2s connections:
  489. {access, c2s, [{deny, blocked},
  490. {allow, all}]}.
  491. %% For C2S connections, all users except admins use the "normal" shaper
  492. {access, c2s_shaper, [{none, admin},
  493. {normal, all}]}.
  494. %% All S2S connections use the "fast" shaper
  495. {access, s2s_shaper, [{fast, all}]}.
  496. %% Admins of this server are also admins of the MUC service:
  497. {access, muc_admin, [{allow, admin}]}.
  498. %% Only accounts of the local ejabberd server can create rooms:
  499. {access, muc_create, [{allow, local}]}.
  500. %% All users are allowed to use the MUC service:
  501. {access, muc, [{allow, all}]}.
  502. %% In-band registration allows registration of any possible username.
  503. %% To disable in-band registration, replace 'allow' with 'deny'.
  504. {access, register, [{allow, all}]}.
  505. %% By default the frequency of account registrations from the same IP
  506. %% is limited to 1 account every 10 minutes. To disable, specify: infinity
  507. {registration_timeout, infinity}.
  508. %% Default settings for MAM.
  509. %% To set non-standard value, replace 'default' with 'allow' or 'deny'.
  510. %% Only user can access his/her archive by default.
  511. %% An online user can read room's archive by default.
  512. %% Only an owner can change settings and purge messages by default.
  513. %% Empty list (i.e. `[]`) means `[{deny, all}]`.
  514. {access, mam_set_prefs, [{default, all}]}.
  515. {access, mam_get_prefs, [{default, all}]}.
  516. {access, mam_lookup_messages, [{default, all}]}.
  517. {access, mam_purge_single_message, [{default, all}]}.
  518. {access, mam_purge_multiple_messages, [{default, all}]}.
  519. %% 1 command of the specified type per second.
  520. {shaper, mam_shaper, {maxrate, 1}}.
  521. %% This shaper is primeraly for Mnesia overload protection during stress testing.
  522. %% The limit is 1000 operations of each type per second.
  523. {shaper, mam_global_shaper, {maxrate, 1000}}.
  524. {access, mam_set_prefs_shaper, [{mam_shaper, all}]}.
  525. {access, mam_get_prefs_shaper, [{mam_shaper, all}]}.
  526. {access, mam_lookup_messages_shaper, [{mam_shaper, all}]}.
  527. {access, mam_purge_single_message_shaper, [{mam_shaper, all}]}.
  528. {access, mam_purge_multiple_messages_shaper, [{mam_shaper, all}]}.
  529. {access, mam_set_prefs_global_shaper, [{mam_global_shaper, all}]}.
  530. {access, mam_get_prefs_global_shaper, [{mam_global_shaper, all}]}.
  531. {access, mam_lookup_messages_global_shaper, [{mam_global_shaper, all}]}.
  532. {access, mam_purge_single_message_global_shaper, [{mam_global_shaper, all}]}.
  533. {access, mam_purge_multiple_messages_global_shaper, [{mam_global_shaper, all}]}.
  534. %%
  535. %% Define specific Access Rules in a virtual host.
  536. %%
  537. %%{host_config, "localhost",
  538. %% [
  539. %% {access, c2s, [{allow, admin}, {deny, all}]},
  540. %% {access, register, [{deny, all}]}
  541. %% ]
  542. %%}.
  543. %%%. ================
  544. %%%' DEFAULT LANGUAGE
  545. %%
  546. %% language: Default language used for server messages.
  547. %%
  548. {language, "en"}.
  549. %%
  550. %% Set a different default language in a virtual host.
  551. %%
  552. %%{host_config, "localhost",
  553. %% [{language, "ru"}]
  554. %%}.
  555. %%%. ================
  556. %%%' MISCELLANEOUS
  557. {all_metrics_are_global, false }.
  558. %%%. ========
  559. %%%' SERVICES
  560. %% Unlike modules, services are started per node and provide either features which are not
  561. %% related to any particular host, or backend stuff which is used by modules.
  562. %% This is handled by `mongoose_service` module.
  563. {services,
  564. [
  565. {service_admin_extra, [{submods, [node, accounts, sessions, vcard,
  566. roster, last, private, stanza, stats]}]}
  567. ]
  568. }.
  569. %%%. =======
  570. %%%' MODULES
  571. %%
  572. %% Modules enabled in all mongooseim virtual hosts.
  573. %% For list of possible modules options, check documentation.
  574. %%
  575. {modules,
  576. [
  577. %% The format for a single route is as follows:
  578. %% {Host, Path, Method, Upstream}
  579. %%
  580. %% "_" can be used as wildcard for Host, Path and Method
  581. %% Upstream can be either host (just http(s)://host:port) or uri
  582. %% The difference is that host upstreams append whole path while
  583. %% uri upstreams append only remainder that follows the matched Path
  584. %% (this behaviour is similar to nginx's proxy_pass rules)
  585. %%
  586. %% Bindings can be used to match certain parts of host or path.
  587. %% They will be later overlaid with parts of the upstream uri.
  588. %%
  589. %% {mod_revproxy,
  590. %% [{routes, [{"www.erlang-solutions.com", "/admin", "_",
  591. %% "https://www.erlang-solutions.com/"},
  592. %% {":var.com", "/:var", "_", "http://localhost:8080/"},
  593. %% {":domain.com", "/", "_", "http://localhost:8080/:domain"}]
  594. %% }]},
  595. % {mod_http_upload, [
  596. %% Set max file size in bytes. Defaults to 10 MB.
  597. %% Disabled if value is `undefined`.
  598. % {max_file_size, 1024},
  599. %% Use S3 storage backend
  600. % {backend, s3},
  601. %% Set options for S3 backend
  602. % {s3, [
  603. % {bucket_url, "http://s3-eu-west-1.amazonaws.com/konbucket2"},
  604. % {region, "eu-west-1"},
  605. % {access_key_id, "AKIAIAOAONIULXQGMOUA"},
  606. % {secret_access_key, "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"}
  607. % ]}
  608. % ]},
  609. {mod_adhoc, []},
  610. {mod_disco, [{users_can_see_hidden_services, false}]},
  611. {mod_commands, []},
  612. {mod_muc_commands, []},
  613. {mod_muc_light_commands, []},
  614. {mod_last, []},
  615. {mod_stream_management, [
  616. % default 100
  617. % size of a buffer of unacked messages
  618. % {buffer_max, 100}
  619. % default 1 - server sends the ack request after each stanza
  620. % {ack_freq, 1}
  621. % default: 600 seconds
  622. % {resume_timeout, 600}
  623. ]},
  624. %% {mod_muc_light, [{host, "muclight.@HOST@"}]},
  625. %% {mod_muc, [{host, "muc.@HOST@"},
  626. %% {access, muc},
  627. %% {access_create, muc_create}
  628. %% ]},
  629. %% {mod_muc_log, [
  630. %% {outdir, "/tmp/muclogs"},
  631. %% {access_log, muc}
  632. %% ]},
  633. {mod_offline, [{access_max_user_messages, max_user_offline_messages}]},
  634. {mod_privacy, []},
  635. {mod_blocking, []},
  636. {mod_private, []},
  637. % {mod_private, [{backend, mnesia}]},
  638. % {mod_private, [{backend, rdbms}]},
  639. % {mod_register, [
  640. % %%
  641. % %% Set the minimum informational entropy for passwords.
  642. % %%
  643. % %%{password_strength, 32},
  644. %
  645. % %%
  646. % %% After successful registration, the user receives
  647. % %% a message with this subject and body.
  648. % %%
  649. % {welcome_message, {""}},
  650. %
  651. % %%
  652. % %% When a user registers, send a notification to
  653. % %% these XMPP accounts.
  654. % %%
  655. %
  656. %
  657. % %%
  658. % %% Only clients in the server machine can register accounts
  659. % %%
  660. % {ip_access, [{allow, "127.0.0.0/8"},
  661. % {deny, "0.0.0.0/0"}]},
  662. %
  663. % %%
  664. % %% Local c2s or remote s2s users cannot register accounts
  665. % %%
  666. % %%{access_from, deny},
  667. %
  668. % {access, register}
  669. % ]},
  670. {mod_roster, []},
  671. {mod_sic, []},
  672. {mod_vcard, [%{matches, 1},
  673. %{search, true},
  674. %{ldap_search_operator, 'or'}, %% either 'or' or 'and'
  675. %{ldap_binary_search_fields, [<<"PHOTO">>]},
  676. %% list of binary search fields (as in vcard after mapping)
  677. {host, "vjud.@HOST@"}
  678. ]},
  679. {mod_bosh, []},
  680. {mod_carboncopy, []}
  681. %%
  682. %% Message Archive Management (MAM, XEP-0313) for registered users and
  683. %% Multi-User chats (MUCs).
  684. %%
  685. % {mod_mam_meta, [
  686. %% Use RDBMS backend (default)
  687. % {backend, rdbms},
  688. %% Do not store user preferences (default)
  689. % {user_prefs_store, false},
  690. %% Store user preferences in RDBMS
  691. % {user_prefs_store, rdbms},
  692. %% Store user preferences in Mnesia (recommended).
  693. %% The preferences store will be called each time, as a message is routed.
  694. %% That is why Mnesia is better suited for this job.
  695. % {user_prefs_store, mnesia},
  696. %% Enables a pool of asynchronous writers. (default)
  697. %% Messages will be grouped together based on archive id.
  698. % {async_writer, true},
  699. %% Cache information about users (default)
  700. % {cache_users, true},
  701. %% Enable archivization for private messages (default)
  702. % {pm, [
  703. %% Top-level options can be overridden here if needed, for example:
  704. % {async_writer, false}
  705. % ]},
  706. %%
  707. %% Message Archive Management (MAM) for multi-user chats (MUC).
  708. %% Enable XEP-0313 for "muc.@HOST@".
  709. %%
  710. % {muc, [
  711. % {host, "muc.@HOST@"}
  712. %% As with pm, top-level options can be overridden for MUC archive
  713. % ]},
  714. %
  715. %% Do not use a <stanza-id/> element (by default stanzaid is used)
  716. % no_stanzaid_element,
  717. % ]},
  718. %%
  719. %% MAM configuration examples
  720. %%
  721. %% Only MUC, no user-defined preferences, good performance.
  722. % {mod_mam_meta, [
  723. % {backend, rdbms},
  724. % {pm, false},
  725. % {muc, [
  726. % {host, "muc.@HOST@"}
  727. % ]}
  728. % ]},
  729. %% Only archives for c2c messages, good performance.
  730. % {mod_mam_meta, [
  731. % {backend, rdbms},
  732. % {pm, [
  733. % {user_prefs_store, mnesia}
  734. % ]}
  735. % ]},
  736. %% Basic configuration for c2c messages, bad performance, easy to debug.
  737. % {mod_mam_meta, [
  738. % {backend, rdbms},
  739. % {async_writer, false},
  740. % {cache_users, false}
  741. % ]},
  742. %% Cassandra archive for c2c and MUC conversations.
  743. %% No custom settings supported (always archive).
  744. % {mod_mam_meta, [
  745. % {backend, cassandra},
  746. % {user_prefs_store, cassandra},
  747. % {muc, [{host, "muc.@HOST@"}]}
  748. % ]}
  749. % {mod_event_pusher, [
  750. % {backends, [
  751. % %%
  752. % %% Configuration for Amazon SNS notifications.
  753. % %%
  754. % {sns, [
  755. % %% AWS credentials, region and host configuration
  756. % {access_key_id, "AKIAJAZYHOIPY6A2PESA"},
  757. % {secret_access_key, "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"},
  758. % {region, "eu-west-1"},
  759. % {account_id, "251423380551"},
  760. % {region, "eu-west-1"},
  761. % {sns_host, "sns.eu-west-1.amazonaws.com"},
  762. %
  763. % %% Messages from this MUC host will be sent to the SNS topic
  764. % {muc_host, "muc.@HOST@"},
  765. %
  766. % %% Plugin module for defining custom message attributes and user identification
  767. % {plugin_module, mod_event_pusher_sns_defaults},
  768. %
  769. % %% Topic name configurations. Removing a topic will disable this specific SNS notification
  770. % {presence_updates_topic, "user_presence_updated-dev-1"}, %% For presence updates
  771. % {pm_messages_topic, "user_message_sent-dev-1"}, %% For private chat messages
  772. % {muc_messages_topic, "user_messagegroup_sent-dev-1"} %% For group chat messages
  773. %
  774. % %% Pool options
  775. % {pool_size, 100}, %% Worker pool size for publishing notifications
  776. % {publish_retry_count, 2}, %% Retry count in case of publish error
  777. % {publish_retry_time_ms, 50} %% Base exponential backoff time (in ms) for publish errors
  778. % ]}
  779. % ]}
  780. ]}.
  781. %%
  782. %% Enable modules with custom options in a specific virtual host
  783. %%
  784. %%{host_config, "localhost",
  785. %% [{ {add, modules},
  786. %% [
  787. %% {mod_some_module, []}
  788. %% ]
  789. %% }
  790. %% ]}.
  791. %%%.
  792. %%%'
  793. %%% $Id$
  794. %%% Local Variables:
  795. %%% mode: erlang
  796. %%% End:
  797. %%% vim: set filetype=erlang tabstop=8 foldmarker=%%%',%%%. foldmethod=marker:
  798. %%%.