Advertisement
liveaspankaj

ejabberd.cfg

Mar 28th, 2011
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.55 KB | None | 0 0
  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 in
  8. %%% your copy of ejabberd, and is also available online at
  9. %%% http://www.process-one.net/en/ejabberd/docs/
  10.  
  11. %%% This configuration file contains Erlang terms.
  12. %%% In case you want to understand the syntax, here are the concepts:
  13. %%%
  14. %%% - The character to comment a line is %
  15. %%%
  16. %%% - Each term ends in a dot, for example:
  17. %%% override_global.
  18. %%%
  19. %%% - A tuple has a fixed definition, its elements are
  20. %%% enclosed in {}, and separated with commas:
  21. %%% {loglevel, 4}.
  22. %%%
  23. %%% - A list can have as many elements as you want,
  24. %%% and is enclosed in [], for example:
  25. %%% [http_poll, web_admin, tls]
  26. %%%
  27. %%% - A keyword of ejabberd is a word in lowercase.
  28. %%% The strings are enclosed in "" and can have spaces, dots...
  29. %%% {language, "en"}.
  30. %%% {ldap_rootdn, "dc=example,dc=com"}.
  31. %%%
  32. %%% - This term includes a tuple, a keyword, a list and two strings:
  33. %%% {hosts, ["jabber.example.net", "im.example.com"]}.
  34. %%%
  35.  
  36.  
  37. %%% =======================
  38. %%% OVERRIDE STORED OPTIONS
  39.  
  40. %%
  41. %% Override the old values stored in the database.
  42. %%
  43.  
  44. %%
  45. %% Override global options (shared by all ejabberd nodes in a cluster).
  46. %%
  47. %%override_global.
  48.  
  49. %%
  50. %% Override local options (specific for this particular ejabberd node).
  51. %%
  52. %%override_local.
  53.  
  54. %%
  55. %% Remove the Access Control Lists before new ones are added.
  56. %%
  57. %%override_acls.
  58.  
  59.  
  60. %%% =========
  61. %%% DEBUGGING
  62.  
  63. %%
  64. %% loglevel: Verbosity of log files generated by ejabberd.
  65. %% 0: No ejabberd log at all (not recommended)
  66. %% 1: Critical
  67. %% 2: Error
  68. %% 3: Warning
  69. %% 4: Info
  70. %% 5: Debug
  71. %%
  72. {loglevel, 4}.
  73.  
  74. %%
  75. %% watchdog_admins: If an ejabberd process consumes too much memory,
  76. %% send live notifications to those Jabber accounts.
  77. %%
  78. %%{watchdog_admins, ["admin@keptinbondage.com"]}.
  79.  
  80.  
  81. %%% ================
  82. %%% SERVED HOSTNAMES
  83.  
  84. %%
  85. %% hosts: Domains served by ejabberd.
  86. %% You can define one or several, for example:
  87. %% {hosts, ["example.net", "example.com", "example.org"]}.
  88. %%
  89. {hosts, ["keptinbondage.com"]}.
  90.  
  91. %%
  92. %% route_subdomains: Delegate subdomains to other Jabber server.
  93. %% For example, if this ejabberd serves example.org and you want
  94. %% to allow communication with a Jabber server called im.example.org.
  95. %%
  96. %%{route_subdomains, s2s}.
  97.  
  98.  
  99. %%% ===============
  100. %%% LISTENING PORTS
  101.  
  102. %%
  103. %% listen: Which ports will ejabberd listen, which service handles it
  104. %% and what options to start it with.
  105. %%
  106. {listen,
  107. [
  108.  
  109. {5222, ejabberd_c2s, [
  110. {certfile, "/opt/ejabberd-2.1.6/conf/server.pem"}, starttls,
  111. {access, c2s},
  112. {shaper, c2s_shaper},
  113. {max_stanza_size, 65536}
  114. ]},
  115.  
  116. %%
  117. %% To enable the old SSL connection method in port 5223:
  118. %%
  119. %%{5223, ejabberd_c2s, [
  120. %% {certfile, "/opt/ejabberd-2.1.6/conf/server.pem"}, tls,
  121. %% {access, c2s},
  122. %% {shaper, c2s_shaper},
  123. %% {max_stanza_size, 65536}
  124. %% ]},
  125.  
  126. {5269, ejabberd_s2s_in, [
  127. {shaper, s2s_shaper},
  128. {max_stanza_size, 131072}
  129. ]},
  130.  
  131. %%
  132. %% ejabberd_service: Interact with external components (transports...)
  133. %%
  134. %%{8888, ejabberd_service, [
  135. %% {access, all},
  136. %% {shaper_rule, fast},
  137. %% {ip, {127, 0, 0, 1}},
  138. %% {hosts, ["icq.example.org", "sms.example.org"],
  139. %% [{password, "secret"}]
  140. %% }
  141. %% ]},
  142.  
  143. {5280, ejabberd_http, [
  144. %%{request_handlers, [
  145. %% {["web"], mod_http_fileserver}
  146. %%]},
  147. captcha,
  148. http_bind,
  149. http_poll,
  150. web_admin
  151. ]}
  152.  
  153. ]}.
  154.  
  155. %%
  156. %% s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections.
  157. %% Allowed values are: true or false.
  158. %% You must specify a certificate file.
  159. %%
  160. %%{s2s_use_starttls, true}.
  161.  
  162. %%
  163. %% s2s_certfile: Specify a certificate file.
  164. %%
  165. %%{s2s_certfile, "/opt/ejabberd-2.1.6/conf/server.pem"}.
  166.  
  167. %%
  168. %% domain_certfile: Specify a different certificate for each served hostname.
  169. %%
  170. %%{domain_certfile, "example.org", "/opt/ejabberd-2.1.6/conf/example_org.pem"}.
  171. %%{domain_certfile, "example.com", "/opt/ejabberd-2.1.6/conf/example_com.pem"}.
  172.  
  173. %%
  174. %% S2S whitelist or blacklist
  175. %%
  176. %% Default s2s policy for undefined hosts.
  177. %%
  178. %%{s2s_default_policy, allow}.
  179.  
  180. %%
  181. %% Allow or deny communication with specific servers.
  182. %%
  183. %%{{s2s_host, "goodhost.org"}, allow}.
  184. %%{{s2s_host, "badhost.org"}, deny}.
  185.  
  186.  
  187. %%% ==============
  188. %%% AUTHENTICATION
  189.  
  190. %%
  191. % auth_method: Method used to authenticate the users.
  192. %% The default method is the internal.
  193. %% If you want to use a different method,
  194. %% comment this line and enable the correct ones.
  195. %%
  196. %%{auth_method, internal}.
  197.  
  198. %%
  199. %% Authentication using external script
  200. %% Make sure the script is executable by ejabberd.
  201. %%
  202. {auth_method, external}.
  203. {extauth_program, "/opt/ejabberd-2.1.6/auth/eo.php"}.
  204. {extauth_cache, false}.
  205. %%{extauth_cache, 600}.
  206. %%{extauth_instances, 3}.
  207.  
  208. %%
  209. %% Authentication using ODBC
  210. %% Remember to setup a database in the next section.
  211. %%
  212. %%{auth_method, odbc}.
  213.  
  214. %%
  215. %% Authentication using PAM
  216. %%
  217. %%{auth_method, pam}.
  218. %%{pam_service, "pamservicename"}.
  219.  
  220. %%
  221. %% Authentication using LDAP
  222. %%
  223. %%{auth_method, ldap}.
  224. %%
  225. %% List of LDAP servers:
  226. %%{ldap_servers, ["keptinbondage.com"]}.
  227. %%
  228. %% LDAP attribute that holds user ID:
  229. %%{ldap_uids, [{"mail", "%u@mail.example.org"}]}.
  230. %%
  231. %% Search base of LDAP directory:
  232. %%{ldap_base, "dc=example,dc=com"}.
  233. %%
  234. %% LDAP manager:
  235. %%{ldap_rootdn, "dc=example,dc=com"}.
  236. %%
  237. %% Password to LDAP manager:
  238. %%{ldap_password, "******"}.
  239.  
  240. %%
  241. %% Anonymous login support:
  242. %% auth_method: anonymous
  243. %% anonymous_protocol: sasl_anon | login_anon | both
  244. %% allow_multiple_connections: true | false
  245. %%
  246. %%{host_config, "public.example.org", [{auth_method, anonymous},
  247. %% {allow_multiple_connections, false},
  248. %% {anonymous_protocol, sasl_anon}]}.
  249. %%
  250. %% To use both anonymous and internal authentication:
  251. %%
  252. %%{host_config, "public.example.org", [{auth_method, [internal, anonymous]}]}.
  253.  
  254.  
  255. %%% ==============
  256. %%% DATABASE SETUP
  257.  
  258. %% ejabberd uses by default the internal Mnesia database,
  259. %% so you can avoid this section.
  260. %% This section provides configuration examples in case
  261. %% you want to use other database backends.
  262. %% Please consult the ejabberd Guide for details about database creation.
  263.  
  264. %%
  265. %% MySQL server:
  266. %%
  267. {odbc_server, {mysql, "keptinbondage.com", 3306, "ejabberd", "ejabberd", "ejabberd@123!!"}}.
  268. %%
  269. %% If you want to specify the port:
  270. %%{odbc_server, {mysql, "server", 1234, "database", "username", "password"}}.
  271.  
  272. %%
  273. %% PostgreSQL server:
  274. %%
  275. %%{odbc_server, {pgsql, "server", "database", "username", "password"}}.
  276. %%
  277. %% If you want to specify the port:
  278. %%{odbc_server, {pgsql, "server", 1234, "database", "username", "password"}}.
  279. %%
  280. %% If you use PostgreSQL, have a large database, and need a
  281. %% faster but inexact replacement for "select count(*) from users"
  282. %%
  283. %%{pgsql_users_number_estimate, true}.
  284.  
  285. %%
  286. %% ODBC compatible or MSSQL server:
  287. %%
  288. %%{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.
  289.  
  290.  
  291. %%% ===============
  292. %%% TRAFFIC SHAPERS
  293.  
  294. %%
  295. %% The "normal" shaper limits traffic speed to 1.000 B/s
  296. %%
  297. {shaper, normal, {maxrate, 1000}}.
  298.  
  299. %%
  300. %% The "fast" shaper limits traffic speed to 50.000 B/s
  301. %%
  302. {shaper, fast, {maxrate, 50000}}.
  303.  
  304.  
  305. %%% ====================
  306. %%% ACCESS CONTROL LISTS
  307.  
  308. %%
  309. %% The 'admin' ACL grants administrative privileges to Jabber accounts.
  310. %% You can put as many accounts as you want.
  311. %%
  312. {acl, admin, {user, "admin", "keptinbondage.com"}}.
  313.  
  314. %%
  315. %% Blocked users
  316. %%
  317. %%{acl, blocked, {user, "baduser", "example.org"}}.
  318. %%{acl, blocked, {user, "test"}}.
  319.  
  320. %%
  321. %% Local users: don't modify this line.
  322. %%
  323. {acl, local, {user_regexp, ""}}.
  324.  
  325. %%
  326. %% More examples of ACLs
  327. %%
  328. %%{acl, jabberorg, {server, "jabber.org"}}.
  329. %%{acl, aleksey, {user, "aleksey", "jabber.ru"}}.
  330. %%{acl, test, {user_regexp, "^test"}}.
  331. %%{acl, test, {user_glob, "test*"}}.
  332.  
  333.  
  334. %%% ============
  335. %%% ACCESS RULES
  336.  
  337. %% Define the maximum number of time a single user is allowed to connect:
  338. {access, max_user_sessions, [{10, all}]}.
  339.  
  340. %% This rule allows access only for local users:
  341. {access, local, [{allow, local}]}.
  342.  
  343. %% Only non-blocked users can use c2s connections:
  344. {access, c2s, [{deny, blocked},
  345. {allow, all}]}.
  346.  
  347. %% For all users except admins used "normal" shaper
  348. {access, c2s_shaper, [{none, admin},
  349. {normal, all}]}.
  350.  
  351. %% For all S2S connections used "fast" shaper
  352. {access, s2s_shaper, [{fast, all}]}.
  353.  
  354. %% Only admins can send announcement messages:
  355. {access, announce, [{allow, admin}]}.
  356.  
  357. %% Only admins can use configuration interface:
  358. {access, configure, [{allow, admin}]}.
  359.  
  360. %% Admins of this server are also admins of MUC service:
  361. {access, muc_admin, [{allow, admin}]}.
  362.  
  363. %% All users are allowed to use MUC service:
  364. {access, muc, [{allow, all}]}.
  365. {access, muc_create, [{allow, local}]}.
  366.  
  367. %% In-band registration
  368. {access, register, [{allow, all}]}.
  369.  
  370. %% Everybody can create pubsub nodes
  371. {access, pubsub_createnode, [{allow, local}]}.
  372.  
  373.  
  374. %%% ================
  375. %%% DEFAULT LANGUAGE
  376.  
  377. %%
  378. %% language: Default language used for server messages.
  379. %%
  380. {language, "en"}.
  381.  
  382. %%% =======
  383. %%% CAPTCHA
  384.  
  385. %%
  386. %% Full path to a script that generates the image.
  387. %%
  388. %%{captcha_cmd, "/opt/ejabberd-2.1.6/priv/bin/captcha.sh"}.
  389.  
  390. %%
  391. %% Host part of the URL sent to the user.
  392. %%
  393. %%{captcha_host, "example.org:5280"}.
  394.  
  395.  
  396. %%% =======
  397. %%% MODULES
  398.  
  399. %%
  400. %% Modules enabled in all ejabberd virtual hosts.
  401. %%
  402. {modules,
  403. [
  404. {mod_adhoc, []},
  405. {mod_announce, [{access, announce}]}, % requires mod_adhoc
  406. {mod_caps, []},
  407. {mod_configure,[]}, % requires mod_adhoc
  408. {mod_disco, []},
  409. %%{mod_echo, [{host, "echo.keptinbondage.com"}]},
  410. {mod_http_bind,[]},
  411. %%{mod_http_fileserver, [
  412. %% {docroot, "/opt/ejabberd-2.1.6/www"},
  413. %% {accesslog, "/opt/ejabberd-2.1.6/www/webaccess.log"},
  414. %% {content_types, [{".htm", "text/html"}]},
  415. %% {directory_indices, ["index.html", "index.htm"]}
  416. %%]},
  417. {mod_irc, []},
  418. {mod_last, []},
  419. {mod_muc, [
  420. %%{host, "conference.@HOST@"},
  421. {access, muc},
  422. {access_create, muc_create},
  423. {access_persistent, muc_create},
  424. {access_admin, muc_admin}
  425. ]},
  426. %%{mod_muc_log,[]},
  427. {mod_offline, []},
  428. {mod_privacy, []},
  429. {mod_private, []},
  430. %%{mod_proxy65,[]},
  431. {mod_pubsub, [ % requires mod_caps
  432. {access_createnode, pubsub_createnode},
  433. {ignore_pep_from_offline, true},
  434. {last_item_cache, false},
  435. {plugins, ["flat", "hometree", "pep"]}
  436. ]},
  437. {mod_register, [
  438. %%
  439. %% After successful registration, the user receives
  440. %% a message with this subject and body.
  441. %%
  442. {welcome_message, {"Welcome!",
  443. "Welcome to this Jabber server."}},
  444.  
  445. %%
  446. %% When a user registers, send a notification to
  447. %% these Jabber accounts.
  448. %%
  449. %%{registration_watchers, ["admin1@example.org"]},
  450.  
  451. {access, register}
  452. ]},
  453. {mod_roster, []},
  454. %%{mod_service_log,[]},
  455. {mod_shared_roster,[]},
  456. %%{mod_stats, []},
  457. {mod_time, []},
  458. {mod_vcard, []},
  459. {mod_version, []}
  460. ]}.
  461.  
  462.  
  463. %%% $Id: ejabberd.cfg.example 1073 2007-12-17 11:03:22Z badlop $
  464.  
  465. %%% Local Variables:
  466. %%% mode: erlang
  467. %%% End:
  468. %%% vim: set filetype=erlang tabstop=8:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement