Compare commits

...

57 Commits

Author SHA1 Message Date
Christophe Romain 1035e2064d fixing 1324 commit issue on tagged versions
SVN Revision: 1326
2008-05-16 14:23:37 +00:00
Mickaël Rémond 1f91eb0b11 * Adding experimental branch.
SVN Revision: 1324
2008-05-14 17:49:23 +00:00
Mickaël Rémond 2db19b901a Added missing ejabberd-2.0.0 tag.
SVN Revision: 1208
2008-02-25 10:33:47 +00:00
Badlop 0f16fee833 * doc/release_notes_2.0.0.txt: Small fixes and update date
SVN Revision: 1207
2008-02-21 09:54:19 +00:00
Badlop 4af47f5f78 * README: Updated to match the content of the ejabberd Guide
SVN Revision: 1206
2008-02-20 19:07:19 +00:00
Badlop 01ee6284bf * doc/release_notes_2.0.0.txt: Updated version number and date
SVN Revision: 1205
2008-02-20 16:08:13 +00:00
Badlop 7006402cd7 * src/ejabberd.hrl: Updated version number
* doc/dev.html: Likewise
* doc/features.html: Likewise
* doc/guide.html: Likewise
* doc/version.tex: Likewise

* doc/guide.tex: Mentioned the problems about Windows service
* doc/guide.html: Likewise

SVN Revision: 1203
2008-02-20 16:04:36 +00:00
Badlop c496c9aae6 * src/msgs/ru.msg: Updated (thanks to Konstantin Khomoutov)
* src/msgs/zh.msg: Updated (thanks to Mike Wang and Zhan Caibao)

SVN Revision: 1202
2008-02-20 15:48:48 +00:00
Badlop 07cea7431b * src/msgs/ca.msg: Updated (thanks to Vicent Alberola Canet)
* src/msgs/cs.msg: Updated (thanks to Lukas Polivka)
* src/msgs/de.msg: Updated (thanks to Cord Beermann and Nikolaus
Polak)
* src/msgs/eo.msg: Updated (thanks to Andreas van Cranenburgh)
* src/msgs/es.msg: Updated
* src/msgs/fr.msg: Updated (thanks to Christophe Romain)
* src/msgs/gl.msg: Updated (thanks to Carlos E. Lopez)
* src/msgs/nl.msg: Updated (thanks to Andreas van Cranenburgh)
* src/msgs/no.msg: Updated (thanks to Stian B. Barmen)
* src/msgs/pt-br.msg: Updated (thanks to Otavio Fernandes)
* src/msgs/uk.msg: Updated (thanks to Stoune and Ruslan Rakhmanin)

SVN Revision: 1201
2008-02-19 19:15:28 +00:00
Christophe Romain c5d3974796 add pgsql driver monitoring
SVN Revision: 1200
2008-02-19 17:06:49 +00:00
Mickaël Rémond 6737a9ff95 * src/ejabberd_config.erl: dirty_get_registered_users now correctly returns all users for all vhosts no matter which back-end is used (EJAB-527)
* src/ejabberd_auth_odbc.erl: Likewise
* src/ejabberd_auth_internal.erl: Likewise
* src/ejabberd_auth.erl: Likewise
* src/ejabberd_auth_external.erl: Likewise
* src/ejabberd_auth_ldap.erl: Likewise

SVN Revision: 1199
2008-02-19 15:19:10 +00:00
Christophe Romain 327b4406db Bug in get_conn_type since SVN r1194 crashes http-bind and http-poll (thanks to Brian Cully) (EJAB-526)
SVN Revision: 1197
2008-02-18 09:55:06 +00:00
Badlop c72082d798 * src/mod_muc/mod_muc_room.erl: Merge SVN r1164, and fix the merge
of SVN r1179 (EJAB-496)

SVN Revision: 1196
2008-02-16 09:18:19 +00:00
Badlop 9a795401ae * doc/release_notes_2.0.0.txt: Describe in the Release Notes the
upgrade instructions (EJAB-522)

SVN Revision: 1195
2008-02-15 19:18:36 +00:00
Christophe Romain fad12caa5f Retreive connection type in sm_register_connection_hook
SVN Revision: 1194
2008-02-15 16:35:32 +00:00
Jérôme Sautret 86445aff3e * odbc_queries: fix list_users queries with limit/offset.
SVN Revision: 1193
2008-02-15 15:39:30 +00:00
Christophe Romain 746c6b7d24 use ejabberd-2.0.0 tag for contribs
SVN Revision: 1192
2008-02-14 22:50:42 +00:00
Badlop 28ca665ba4 * src/mod_muc/mod_muc_room.erl: Allow unmoderated rooms (EJAB-437)
* src/msgs/*: Recover old translations to several languages from
ejabberd 1.1.4

SVN Revision: 1191
2008-02-14 11:25:39 +00:00
Badlop 206d127af7 * src/web/ejabberd_web_admin.erl: Fixed native support for all the
ACL types (EJAB-253)

SVN Revision: 1186
2008-02-12 01:16:11 +00:00
Badlop 60e1972f61 * src/acl.erl: Normalize ACL before adding to the configuration
tables (EJAB-521)

SVN Revision: 1185
2008-02-12 01:04:47 +00:00
Christophe Romain 7d73151737 use if event instead of x when xmlns is pubsub#event (EJAB-518)
SVN Revision: 1181
2008-02-11 15:21:24 +00:00
Badlop a90606b104 * src/mod_muc/mod_muc_room.erl: Include the error condition in the
presence status when kicking a participant due to an error
stanza (EJAB-496)

SVN Revision: 1179
2008-02-09 10:38:47 +00:00
Badlop 0a6a45bf09 * src/ejabberd.cfg.example: Document options to SQL keep alive
interval and pool size (EJAB-206)
* doc/guide.tex: Likewise
* doc/guide.html: Likewise

SVN Revision: 1178
2008-02-08 18:28:36 +00:00
Mickaël Rémond 1b6a2b3660 * src/mod_pubsub/node_buddy.erl: Fixed typo
* src/mod_pubsub/node_club.erl: Likewise
* src/mod_pubsub/node_dispatch.erl: Likewise
* src/mod_pubsub/node_pep.erl: Likewise
* src/mod_pubsub/node_private.erl: Likewise
* src/mod_pubsub/node_public.erl: Likewise
* src/mod_pubsub/node.template: Likewise

SVN Revision: 1176
2008-02-07 08:05:59 +00:00
Mickaël Rémond 7ca44abb22 * src/mod_pubsub/nodetree_virtual.erl: Fixed error report at startup.
SVN Revision: 1170
2008-02-02 14:27:09 +00:00
Badlop 5e88123ec9 * doc/guide.tex: Removed the option served_hosts in mod_pubsub
because it does not work correctly yet (EJAB-504)
* doc/guide.html: Likewise

SVN Revision: 1167
2008-01-30 17:51:09 +00:00
Badlop ae90a16714 * src/mod_echo.erl: Put in comments the call to the educational
function do_client_version

SVN Revision: 1166
2008-01-30 16:07:59 +00:00
Badlop b29e6ef07f * src/mod_muc/mod_muc_room.erl: MUC kicks a participant if sends a
private message with type=error (EJAB-496)

SVN Revision: 1163
2008-01-29 14:49:08 +00:00
Badlop fbe26a9186 * doc/introduction.tex: Updated list of languages
* doc/release_notes_2.0.0.txt: Likewise

SVN Revision: 1162
2008-01-25 15:28:30 +00:00
Badlop 374e7ca38b * src/msgs/eo.msg: New Esperanto translation (thanks to Andreas
van Cranenburgh)

* src/msgs/no.msg: New Norwegian translation (thanks to Stian
B. Barmen)

* doc/Makefile: Fixed small problem with contributed_modules.tex

SVN Revision: 1161
2008-01-25 11:54:17 +00:00
Christophe Romain 326fc6d331 pubsub dirty_sync typo fix on node configuration transaction
SVN Revision: 1159
2008-01-25 10:17:59 +00:00
Christophe Romain 48e15804e3 pubsub configuration patch (EJAB-508) and (EJAB-509)
SVN Revision: 1158
2008-01-25 09:24:10 +00:00
Badlop 50f0c3a14b * doc/guide.tex: Updated the names of log files.
* doc/guide.html: Likewise

* src/mod_muc/mod_muc_room.erl: Added log messages for room
destroy

* src/mod_caps.erl: Small beautify of log error messages

SVN Revision: 1156
2008-01-16 10:16:14 +00:00
Badlop 21f9c7e2d2 * doc/guide.tex: Improved the documentation of Binary
installer. Updated the requirements, specifically: Erlang R10B-9
is required as minimum, and R12 is not yet supported. Added
section Upgrading ejabberd. Improved documentation about Erlang
runtime system environment variables and command-line parameters.
* doc/guide.html: Likewise

* doc/release_notes_2.0.0.txt: Updated to RC1
* doc/version.tex: Likewise
* src/ejabberd.hrl: Likewise

* doc/introduction.tex: Updated to 22 languages

* doc/Makefile: Ensure that Bash is used

SVN Revision: 1154
2008-01-15 17:53:40 +00:00
Badlop 8e72271730 * doc/guide.tex: Updated copyright dates to 2008
* src/*: Likewise

SVN Revision: 1153
2008-01-15 17:02:57 +00:00
Badlop 561cf36c81 Merge changesets 1150 and 1151 into branch ejabberd-2.0.x:
* src/Makefile.in: Allow compilation with Erlang R12 (EJAB-446)
(thanks to Sergei Golovan and Maxim Treskin). Erlang R12 version is
not supported and not recommended for production servers.
* src/aclocal.m4: Likewise
* src/configure.ac: Likewise
* src/configure: Likewise
* src/ejabberd_s2s_in.erl: Likewise

Small fixes in trunk/ChangeLog.

SVN Revision: 1152
2008-01-15 16:09:07 +00:00
Badlop 228eb9d333 * src/ejabberdctl.template: Instead of using the Erlang kernel
variable 'inetrc', use the ERL_INETRC environment variable that is
available since Erlang/OTP R10B-5.

SVN Revision: 1149
2008-01-13 22:46:00 +00:00
Christophe Romain 73bca8fbc0 set_subscription fix (EJAB-494)
SVN Revision: 1148
2008-01-12 19:47:19 +00:00
Christophe Romain ac31008ee0 don't ask capabilities to MUC room participants
SVN Revision: 1147
2008-01-11 13:57:29 +00:00
Christophe Romain c49a6e7176 EJAB-491 fix
SVN Revision: 1146
2008-01-11 01:39:35 +00:00
Christophe Romain 09fa4a0ca7 Force PEP parent node to be []
SVN Revision: 1144
2008-01-10 17:38:24 +00:00
Christophe Romain 3225edde24 Send last published PEP event now checks the correct peer caps (EJAB-491)
SVN Revision: 1143
2008-01-10 15:02:54 +00:00
Badlop 5868a9d1a5 * src/mod_muc/mod_muc_room.erl: MUC kicks a participant if sends a
private message with type=error (EJAB-496)

SVN Revision: 1142
2008-01-09 16:01:16 +00:00
Badlop bceea5fc73 Merged changesets 1139 and 1140 from trunk:
* doc/Makefile: fix version.tex generation bug

* src/ejabberdctl.template: Removed the option ERL_FULLSWEEP_AFTER
because it is almost useless regarding ejabberd's performance.
* src/ejabberdctl.cfg.example: Likewise

SVN Revision: 1141
2008-01-08 16:21:02 +00:00
Badlop bde4d2e79b * src/web/ejabberd_web_admin.erl: Uniformize the name of
ejabberd's web admin to: 'Web Admin' (EjAB-472)
* doc/guide.tex: Likewise
* doc/introduction.tex: Likewise

* src/web/ejabberd_web_admin.erl: Uniformize ejabberd name in the
text using the Latex command

SVN Revision: 1138
2008-01-01 18:25:00 +00:00
Badlop b8993d82bd * src/mod_muc/mod_muc_room.erl: Resend 'continue' elements in muc
room invitations (EJAB-490)

SVN Revision: 1136
2008-01-01 17:09:22 +00:00
Badlop ee4f623a71 * src/ejabberdctl.template: Create logs_dir if doesn't exist. New
parameters --config, --ctl-config, --logs, --spool. Crash dump
renamed to erl_crash_DATETIME.dump.

* src/ejabberdctl.template: Backport improvements from binary
installer (EJAB-488): options are simple values; enable Kernel
Poll by default, set SMP to auto, set max ports to 32000, max
processes to 250000.
* src/ejabberdctl.cfg.example: Likewise

* src/ejabberd.inetrc: Renamed ejabberd.inetrc to inetrc
* src/inetrc: Likewise
* src/Makefile.in: Likewise
* doc/guide.tex: Likewise

SVN Revision: 1134
2008-01-01 11:03:17 +00:00
Badlop a2a1c916fa * src/msgs/ca.msg: Updated (thanks to Vicent Alberola Canet)
SVN Revision: 1132
2008-01-01 10:41:34 +00:00
Badlop e1928fc84b * src/ejabberd_s2s_out.erl: Fixed behavior when outgoing_s2s_port
option is not defined (EJAB-487)

SVN Revision: 1130
2007-12-29 15:23:53 +00:00
Badlop 98c4c8fc74 * src/mod_vcard_ldap.erl: Fix some field names (EJAB-483)
SVN Revision: 1128
2007-12-27 16:42:39 +00:00
Badlop dea1a4619d * src/web/ejabberd_web_admin.erl: Translate menu items of webadmin
hooks in each module (EJAB-485)
* src/mod_shared_roster.erl: Likewise

SVN Revision: 1126
2007-12-26 14:56:00 +00:00
Badlop 892cec5651 * src/web/ejabberd_web_admin.erl: max_user_sessions access rule
contains an integer, but webadmin always expects atoms (EJAB-482)

SVN Revision: 1124
2007-12-26 12:29:15 +00:00
Badlop 62b1811ed2 * src/mod_configure.erl: Bugfix, update to match changes in
mod_announce SVN r1099

SVN Revision: 1122
2007-12-25 00:38:04 +00:00
Mickaël Rémond d3d9d2b701 * doc/release_notes_2.0.0.txt: minor fix.
SVN Revision: 1120
2007-12-24 15:14:37 +00:00
Mickaël Rémond 1208455db5 * doc/release_notes_2.0.0.txt: Small fix.
SVN Revision: 1119
2007-12-24 15:01:00 +00:00
Mickaël Rémond 7d8de382c8 * Small fixes in release notes
SVN Revision: 1116
2007-12-24 14:11:18 +00:00
Mickaël Rémond e4e57bcf38 * Branch for 2.0.x developments
SVN Revision: 1114
2007-12-24 14:08:59 +00:00
180 changed files with 2958 additions and 1142 deletions
+296 -4
View File
@@ -1,3 +1,295 @@
2008-02-21 Badlop <badlop@process-one.net>
* doc/release_notes_2.0.0.txt: Small fixes and update date
2008-02-20 Badlop <badlop@process-one.net>
* README: Updated to match the content of the ejabberd Guide
* doc/release_notes_2.0.0.txt: Updated version number and date
* src/ejabberd.hrl: Updated version number
* doc/dev.html: Likewise
* doc/features.html: Likewise
* doc/guide.html: Likewise
* doc/version.tex: Likewise
* doc/guide.tex: Mentioned the problems about Windows service
* doc/guide.html: Likewise
* src/msgs/ru.msg: Updated (thanks to Konstantin Khomoutov)
* src/msgs/zh.msg: Updated (thanks to Mike Wang and Zhan Caibao)
2008-02-19 Badlop <badlop@process-one.net>
* src/msgs/ca.msg: Updated (thanks to Vicent Alberola Canet)
* src/msgs/cs.msg: Updated (thanks to Lukas Polivka)
* src/msgs/de.msg: Updated (thanks to Cord Beermann and Nikolaus
Polak)
* src/msgs/eo.msg: Updated (thanks to Andreas van Cranenburgh)
* src/msgs/es.msg: Updated
* src/msgs/fr.msg: Updated (thanks to Christophe Romain)
* src/msgs/gl.msg: Updated (thanks to Carlos E. Lopez)
* src/msgs/nl.msg: Updated (thanks to Andreas van Cranenburgh)
* src/msgs/no.msg: Updated (thanks to Stian B. Barmen)
* src/msgs/pt-br.msg: Updated (thanks to Otavio Fernandes)
* src/msgs/uk.msg: Updated (thanks to Stoune and Ruslan Rakhmanin)
2008-02-19 Christophe Romain <christophe.romain@process-one.net>
* src/odbc/ejabberd_odbc.erl: add pgsql driver monitoring
2008-02-19 Mickael Remond <mremond@process-one.net>
* src/ejabberd_config.erl: dirty_get_registered_users now
correctly returns all users for all vhosts no matter which
back-end is used (EJAB-527)
* src/ejabberd_auth_odbc.erl: Likewise
* src/ejabberd_auth_internal.erl: Likewise
* src/ejabberd_auth.erl: Likewise
* src/ejabberd_auth_external.erl: Likewise
* src/ejabberd_auth_ldap.erl: Likewise
2008-02-18 Christophe Romain <christophe.romain@process-one.net>
* src/ejabberd_c2s.erl: Bug in get_conn_type since SVN r1194 crashes
http-bind and http-poll (thanks to Brian Cully) (EJAB-526)
2008-02-16 Badlop <badlop@process-one.net>
* src/mod_muc/mod_muc_room.erl: Merge SVN r1164, and fix the merge
of SVN r1179 (EJAB-496)
2008-02-15 Badlop <badlop@process-one.net>
* doc/release_notes_2.0.0.txt: Describe in the Release Notes the
upgrade instructions (EJAB-522)
2008-02-15 Christophe Romain <christophe.romain@process-one.net>
* src/ejabberd_sm.erl: Retreive connection type in
sm_register_connection_hook
* src/ejabberd_c2s.erl: Likewise
* src/ejabberd_auth_anonymous.erl: Likewise
2008-02-14 Badlop <badlop@process-one.net>
* src/mod_muc/mod_muc_room.erl: Allow unmoderated rooms (EJAB-437)
* src/msgs/*: Recover old translations to several languages from
ejabberd 1.1.4
2008-02-12 Badlop <badlop@process-one.net>
* src/web/ejabberd_web_admin.erl: Fixed native support for all the
ACL types (EJAB-253)
* src/acl.erl: Normalize ACL before adding to the configuration
tables (EJAB-521)
2008-02-11 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/mod_pubsub.erl: Bugfix: event used in place of x when
xmlns is pubsub#event (EJAB-518)
2008-02-08 Badlop <badlop@process-one.net>
* src/mod_muc/mod_muc_room.erl: Include the error condition in the
presence status when kicking a participant due to an error
stanza (EJAB-496)
* src/ejabberd.cfg.example: Document options to SQL keep alive
interval and pool size (EJAB-206)
* doc/guide.tex: Likewise
* doc/guide.html: Likewise
2008-02-06 Mickael Remond <mremond@process-one.net>
* src/mod_pubsub/node_buddy.erl: Fixed typo
* src/mod_pubsub/node_club.erl: Likewise
* src/mod_pubsub/node_dispatch.erl: Likewise
* src/mod_pubsub/node_pep.erl: Likewise
* src/mod_pubsub/node_private.erl: Likewise
* src/mod_pubsub/node_public.erl: Likewise
* src/mod_pubsub/node.template: Likewise
2008-02-02 Mickael Remond <mremond@process-one.net>
* src/mod_pubsub/nodetree_virtual.erl: Fixed error report at startup.
2008-01-30 Badlop <badlop@process-one.net>
* doc/guide.tex: Removed the option served_hosts in mod_pubsub
because it does not work correctly yet (EJAB-504)
* doc/guide.html: Likewise
* src/mod_echo.erl: Put in comments the call to the educational
function do_client_version
2008-01-29 Badlop <badlop@process-one.net>
* src/mod_muc/mod_muc_room.erl: MUC kicks a participant if sends a
private message with type=error (EJAB-496)
2008-01-25 Badlop <badlop@process-one.net>
* doc/introduction.tex: Updated list of languages
* doc/release_notes_2.0.0.txt: Likewise
* src/msgs/eo.msg: New Esperanto translation (thanks to Andreas
van Cranenburgh)
* src/msgs/no.msg: New Norwegian translation (thanks to Stian
B. Barmen)
* doc/Makefile: Fixed small problem with contributed_modules.tex
2008-01-25 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/mod_pubsub.erl: Setting boolean node configuration
fixed (EJAB-509)
* src/mod_pubsub/node_default.erl: Use roster_groups_allowed instead
of access_roster_groups (EJAB-508)
* src/mod_pubsub/node_pep.erl: Likewise
* src/mod_pubsub/node_buddy.erl: Likewise
* src/mod_pubsub/node_club.erl: Likewise
* src/mod_pubsub/node_dispatch.erl: Likewise
* src/mod_pubsub/node_private.erl: Likewise
* src/mod_pubsub/node_public.erl: Likewise
* src/mod_pubsub/node.template: Likewise
2008-01-16 Badlop <badlop@process-one.net>
* doc/guide.tex: Updated the names of log files.
* doc/guide.html: Likewise
* src/mod_muc/mod_muc_room.erl: Added log messages for room
destroy
* src/mod_caps.erl: Small beautify of log error messages
2008-01-15 Badlop <badlop@process-one.net>
* doc/guide.tex: Improved the documentation of Binary
installer. Updated the requirements, specifically: Erlang R10B-9
is required as minimum, and R12 is not yet supported. Added
section Upgrading ejabberd. Improved documentation about Erlang
runtime system environment variables and command-line parameters.
* doc/guide.html: Likewise
* doc/release_notes_2.0.0.txt: Updated to RC1
* doc/version.tex: Likewise
* src/ejabberd.hrl: Likewise
* doc/introduction.tex: Updated to 22 languages
* doc/Makefile: Ensure that Bash is used
* doc/guide.tex: Updated copyright dates to 2008.
* src/*: Likewise
2008-01-15 Jérôme Sautret <jerome.sautret@process-one.net>
* src/Makefile.in: Allow compilation with Erlang R12 (EJAB-446)
(thanks to Sergei Golovan and Maxim Treskin). Erlang R12 version is
not supported and not recommended for production servers.
* src/aclocal.m4: Likewise
* src/configure.ac: Likewise
* src/configure: Likewise
* src/ejabberd_s2s_in.erl: Likewise
2008-01-13 Badlop <badlop@process-one.net>
* src/ejabberdctl.template: Instead of using the Erlang kernel
variable 'inetrc', use the ERL_INETRC environment variable that is
available since Erlang/OTP R10B-5.
2008-01-12 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/mod_pubsub.erl: set_subscription fix (EJAB-494)
2008-01-11 Christophe Romain <christophe.romain@process-one.net>
* src/mod_caps.erl: don't ask capabilities to MUC room participants
(EJAB-478)
2008-01-10 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/nodetree_default: Force PEP parent node to be []
* src/mod_pubsub/mod_pubsub.erl: Send last published PEP event now checks
the correct peer caps (EJAB-491)
* src/ejabberd_c2s.erl: Likewise
2008-01-09 Badlop <badlop@process-one.net>
* src/mod_muc/mod_muc_room.erl: MUC kicks a participant if sends a
private message with type=error (EJAB-496)
2008-01-08 Badlop <badlop@process-one.net>
* src/ejabberdctl.template: Removed the option ERL_FULLSWEEP_AFTER
because it is almost useless regarding ejabberd's performance.
* src/ejabberdctl.cfg.example: Likewise
2008-01-08 Christophe Romain <christophe.romain@process-one.net>
* doc/Makefile: fix version.tex generation bug
2008-01-01 Badlop <badlop@process-one.net>
* src/web/ejabberd_web_admin.erl: Uniformize the name of
ejabberd's web admin to: 'Web Admin' (EJAB-472)
* doc/guide.tex: Likewise
* doc/introduction.tex: Likewise
* src/web/ejabberd_web_admin.erl: Uniformize ejabberd name in the
text using the Latex command
* src/mod_muc/mod_muc_room.erl: Resend 'continue' elements in muc
room invitations (EJAB-490)
* src/ejabberdctl.template: Create logs_dir if doesn't exist. New
parameters --config, --ctl-config, --logs, --spool. Crash dump
renamed to erl_crash_DATETIME.dump.
* src/ejabberdctl.template: Backport improvements from binary
installer (EJAB-488): options are simple values; enable Kernel
Poll by default, set SMP to auto, set max ports to 32000, max
processes to 250000.
* src/ejabberdctl.cfg.example: Likewise
* src/ejabberd.inetrc: Renamed ejabberd.inetrc to inetrc
* src/inetrc: Likewise
* src/Makefile.in: Likewise
* doc/guide.tex: Likewise
2007-12-31 Badlop <badlop@process-one.net>
* src/msgs/ca.msg: Updated (thanks to Vicent Alberola Canet)
2007-12-29 Alexey Shchepin <alexey@process-one.net>
* src/ejabberd_s2s_out.erl: Fixed behavior when outgoing_s2s_port
option is not defined (EJAB-487)
2007-12-27 Badlop <badlop@process-one.net>
* src/mod_vcard_ldap.erl: Fix some field names (EJAB-483)
2007-12-26 Badlop <badlop@process-one.net>
* src/web/ejabberd_web_admin.erl: Translate menu items of webadmin
hooks in each module (EJAB-485)
* src/mod_shared_roster.erl: Likewise
* src/web/ejabberd_web_admin.erl: max_user_sessions access rule
contains an integer, but webadmin always expects atoms (EJAB-482)
2007-12-25 Badlop <badlop@process-one.net>
* src/mod_configure.erl: Bugfix, update to match changes in
mod_announce SVN r1099
2007-12-24 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/mod_pubsub.erl: remove useless get_roster_info call in
@@ -119,7 +411,7 @@
* src/mod_muc/mod_muc_log.erl: Add handling of kicks 321, 322, 332
* doc/guide.tex: Document mod_privacy_odbc
* doc/Makefile: Support for conditional inclusion of documentation
from contributed modules
* doc/guide.tex: Likewise
@@ -191,7 +483,7 @@
new ones on top. Each string must be in a single line (to
facilitate the automatic removal of unused strings). Last four
lines report file format for Emacs and Vim.
* contrib/extract_translations/prepare-translation.sh: New
features: extract all translations, include explanation for
translators in the file, remove unused strings from file, include
@@ -210,7 +502,7 @@
* src/mod_pubsub/mod_pubsub.erl: presence handler bugfix
* src/mod_pubsub/node_default.erl: Allow send last item on presence
2007-12-12 Badlop <badlop@process-one.net>
* src/msgs/it.msg: Updated (thanks to Luca Brivio)
@@ -255,7 +547,7 @@
* src/msgs/ja.msg: New translation (thanks to Tsukasa Hamano)
* src/msgs/nl.msg: Updated (thanks to Andreas from Unstable.nl)
* src/msgs/nl.msg: Updated (thanks to Andreas van Cranenburgh)
* src/ejabberd_config.erl: Report human-readable message when
Mnesia spool files are not readable.
+33 -22
View File
@@ -2,37 +2,48 @@ ejabberd - High-Performance Enterprise Instant Messaging Server
Quickstart guide
0. Dependancies
To build ejabberd, you need:
0. Requirements
To compile ejabberd you need:
- GNU Make
- GCC
- libexpat 1.95 or higher
- Erlang/OTP R9C-2 or higher
- OpenSSL 0.9.6 or higher (optional)
- Zlib 1.2.3 or higher (optional)
- GNU Iconv 1.8 or higher (optional, not needed on systems with GNU libc)
- Erlang/OTP R10B-9 up to R11B-5. Erlang R12 releases are not yet
officially supported, and are not recommended for production
servers
- OpenSSL 0.9.6 or higher, for STARTTLS, SASL and SSL
encryption. Optional, highly recommended.
- Zlib 1.2.3 or higher, for Stream Compression support
(XEP-0138). Optional.
- GNU Iconv 1.8 or higher, for the IRC Transport
(mod_irc). Optional. Not needed on systems with GNU Libc.
1. Build and install on *nix systems
To build ejabberd, please go into the src directory and type the
following commands:
./configure && make
sudo make install
1. Compile and install on *nix systems
To compile ejabberd, go to the directory src/ and execute the commands:
./configure
make
To install ejabberd, run this command with system administrator rights
(root user):
sudo make install
These commands will:
- install a startup script into the directory /usr/sbin,
- install ejabberd into the directory /var/lib/ejabberd,
- install the configuration file into /etc/ejabberd,
- create a directory called /var/log/ejabberd to store log files.
- Install a startup script: /sbin/ejabberdctl
- Install ejabberd in /var/lib/ejabberd/
- Install the configuration files in /etc/ejabberd/
- Create a directory for log files: /var/log/ejabberd/
Note: "sudo make install" means that the "make install" command should
be run with system administrator rights (root).
2. Run
2. Start ejabberd
To run ejabberd, type the following command:
erl -pa /var/lib/ejabberd/ebin -sname ejabberd -s ejabberd
You can use the ejabberdctl command line administration script to
start and stop ejabberd. For example:
ejabberdctl start
For detailled informations, please refer to:
http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html
For detailed information please refer to the
ejabberd Installation and Operation Guide
+2 -2
View File
@@ -1,5 +1,5 @@
% List of ejabberd-modules to add for ejabberd packaging (source archive and installer)
%
% HTTP-binding:
https://svn.process-one.net/ejabberd-modules/http_bind/tags/ejabberd-2.0.0-beta1
https://svn.process-one.net/ejabberd-modules/mod_http_fileserver/tags/ejabberd-2.0.0-beta1
https://svn.process-one.net/ejabberd-modules/http_bind/tags/ejabberd-2.0.0
https://svn.process-one.net/ejabberd-modules/mod_http_fileserver/tags/ejabberd-2.0.0
+6 -4
View File
@@ -1,11 +1,13 @@
# $Id$
SHELL = /bin/bash
CONTRIBUTED_MODULES = ""
ifeq ($(shell ls mod_http_bind.tex),mod_http_bind.tex)
CONTRIBUTED_MODULES += "\\r\\n\\setboolean{modhttpbind}{true}"
CONTRIBUTED_MODULES += "\\n\\setboolean{modhttpbind}{true}"
endif
ifeq ($(shell ls mod_http_fileserver.tex),mod_http_fileserver.tex)
CONTRIBUTED_MODULES += "\\r\\n\\setboolean{modhttpfileserver}{true}"
CONTRIBUTED_MODULES += "\\n\\setboolean{modhttpfileserver}{true}"
endif
@@ -19,9 +21,9 @@ release:
@echo "Press any key to continue"
@read foo
@echo "% ejabberd version (automatically generated)." > version.tex
@echo "\\\newcommand{\\\version}{"`cat ../src/ejabberd.hrl | grep VERSION | sed s/-define\(VERSION,\ \"//g | sed s/\"\).//g`"}" >> version.tex
@echo "\newcommand{\version}{"`sed '/VERSION/!d;s/\(.*\)"\(.*\)"\(.*\)/\2/' ../src/ejabberd.hrl`"}" >> version.tex
@echo -n "% Contributed modules (automatically generated)." > contributed_modules.tex
@echo "$(CONTRIBUTED_MODULES)" >> contributed_modules.tex
@echo -e "$(CONTRIBUTED_MODULES)" >> contributed_modules.tex
html: guide.html dev.html features.html
+15 -15
View File
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>Ejabberd 2.0.0-beta1 Developers Guide
<TITLE>Ejabberd 2.0.0 Developers Guide
</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
@@ -49,7 +49,7 @@ TD P{margin:0px;}
<!--HEVEA command line is: /usr/bin/hevea -fix -noiso -pedantic dev.tex -->
<!--CUT DEF section 1 --><P><A NAME="titlepage"></A>
</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.0.0-beta1 Developers Guide</H1><H3 CLASS="titlerest">Alexey Shchepin<BR>
</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.0.0 Developers Guide</H1><H3 CLASS="titlerest">Alexey Shchepin<BR>
<A HREF="mailto:alexey@sevcom.net"><TT>mailto:alexey@sevcom.net</TT></A><BR>
<A HREF="xmpp:aleksey@jabber.ru"><TT>xmpp:aleksey@jabber.ru</TT></A></H3></TD></TR>
</TABLE><DIV CLASS="center">
@@ -92,13 +92,13 @@ Kevin Smith, Current maintainer of the Psi project</I></BLOCKQUOTE><!--TOC secti
Cross-platform: <TT>ejabberd</TT> runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.</LI><LI CLASS="li-itemize">Distributed: You can run <TT>ejabberd</TT> on a cluster of machines and all of them will serve the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users.</LI><LI CLASS="li-itemize">Fault-tolerant: You can deploy an <TT>ejabberd</TT> cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes also can be added or replaced &#X2018;on the fly&#X2019;.</LI><LI CLASS="li-itemize">Administrator Friendly: <TT>ejabberd</TT> is built on top of the Open Source Erlang. As a result you do not need to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include:
<UL CLASS="itemize"><LI CLASS="li-itemize">
Comprehensive documentation.
</LI><LI CLASS="li-itemize">Straightforward installers for Linux, Mac OS X, and Windows. </LI><LI CLASS="li-itemize">Web interface for administration tasks.
</LI><LI CLASS="li-itemize">Straightforward installers for Linux, Mac OS X, and Windows. </LI><LI CLASS="li-itemize">Web Administration.
</LI><LI CLASS="li-itemize">Shared Roster Groups.
</LI><LI CLASS="li-itemize">Command line administration tool. </LI><LI CLASS="li-itemize">Can integrate with existing authentication mechanisms.
</LI><LI CLASS="li-itemize">Capability to send announce messages.
</LI></UL></LI><LI CLASS="li-itemize">Internationalized: <TT>ejabberd</TT> leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
<UL CLASS="itemize"><LI CLASS="li-itemize">
Translated in 17 languages. </LI><LI CLASS="li-itemize">Support for <A HREF="http://www.ietf.org/rfc/rfc3490.txt">IDNA</A>.
Translated to 24 languages. </LI><LI CLASS="li-itemize">Support for <A HREF="http://www.ietf.org/rfc/rfc3490.txt">IDNA</A>.
</LI></UL></LI><LI CLASS="li-itemize">Open Standards: <TT>ejabberd</TT> is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
<UL CLASS="itemize"><LI CLASS="li-itemize">
Fully XMPP compliant.
@@ -118,31 +118,31 @@ Load only the modules you want.
<UL CLASS="itemize"><LI CLASS="li-itemize">
SASL and STARTTLS for c2s and s2s connections.
</LI><LI CLASS="li-itemize">STARTTLS and Dialback s2s connections.
</LI><LI CLASS="li-itemize">Web interface accessible via HTTPS secure access.
</LI><LI CLASS="li-itemize">Web Admin accessible via HTTPS secure access.
</LI></UL>
</LI><LI CLASS="li-itemize">Databases
<UL CLASS="itemize"><LI CLASS="li-itemize">
Native MySQL support.
Internal database for fast deployment (Mnesia).
</LI><LI CLASS="li-itemize">Native MySQL support.
</LI><LI CLASS="li-itemize">Native PostgreSQL support.
</LI><LI CLASS="li-itemize">Mnesia.
</LI><LI CLASS="li-itemize">ODBC data storage support.
</LI><LI CLASS="li-itemize">Microsoft SQL Server support. </LI></UL>
</LI><LI CLASS="li-itemize">Authentication
<UL CLASS="itemize"><LI CLASS="li-itemize">
PAM, LDAP and ODBC. </LI><LI CLASS="li-itemize">External Authentication script.
</LI><LI CLASS="li-itemize">Internal Authentication.
Internal Authentication.
</LI><LI CLASS="li-itemize">PAM, LDAP and ODBC. </LI><LI CLASS="li-itemize">External Authentication script.
</LI></UL>
</LI><LI CLASS="li-itemize">Others
<UL CLASS="itemize"><LI CLASS="li-itemize">
Compressing XML streams with Stream Compression (<A HREF="http://www.xmpp.org/extensions/xep-0138.html">XEP-0138</A>).
</LI><LI CLASS="li-itemize">Interface with networks such as AIM, ICQ and MSN.
Support for virtual hosting.
</LI><LI CLASS="li-itemize">Compressing XML streams with Stream Compression (<A HREF="http://www.xmpp.org/extensions/xep-0138.html">XEP-0138</A>).
</LI><LI CLASS="li-itemize">Statistics via Statistics Gathering (<A HREF="http://www.xmpp.org/extensions/xep-0039.html">XEP-0039</A>).
</LI><LI CLASS="li-itemize">IPv6 support both for c2s and s2s connections.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0045.html">Multi-User Chat</A> module with logging. </LI><LI CLASS="li-itemize">Users Directory based on users vCards.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0060.html">Publish-Subscribe</A> component.
</LI><LI CLASS="li-itemize">Support for virtual hosting.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0025.html">HTTP Polling</A> service.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0045.html">Multi-User Chat</A> module with support for clustering and HTML logging. </LI><LI CLASS="li-itemize">Users Directory based on users vCards.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0060.html">Publish-Subscribe</A> component with support for <A HREF="http://www.xmpp.org/extensions/xep-00163.html">Personal Eventing via Pubsub</A>.
</LI><LI CLASS="li-itemize">Support for web clients: <A HREF="http://www.xmpp.org/extensions/xep-0025.html">HTTP Polling</A> and <A HREF="http://www.xmpp.org/extensions/xep-0206.html">HTTP Binding (BOSH)</A> services.
</LI><LI CLASS="li-itemize">IRC transport.
</LI><LI CLASS="li-itemize">Component support: interface with networks such as AIM, ICQ and MSN installing special tranports.
</LI></UL>
</LI></UL><!--TOC section How it Works-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc3">3</A>&#XA0;&#XA0;How it Works</H2><!--SEC END --><P>
+15 -15
View File
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>Ejabberd 2.0.0-beta1 Feature Sheet
<TITLE>Ejabberd 2.0.0 Feature Sheet
</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
@@ -50,7 +50,7 @@ SPAN{width:20%; float:right; text-align:left; margin-left:auto;}
<!--HEVEA command line is: /usr/bin/hevea -fix -noiso -pedantic features.tex -->
<!--CUT DEF section 1 --><P><A NAME="titlepage"></A>
</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.0.0-beta1 Feature Sheet</H1><H3 CLASS="titlerest">Sander Devrieze<BR>
</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.0.0 Feature Sheet</H1><H3 CLASS="titlerest">Sander Devrieze<BR>
<A HREF="mailto:s.devrieze@pandora.be"><TT>mailto:s.devrieze@pandora.be</TT></A><BR>
<A HREF="xmpp:sander@devrieze.dyndns.org"><TT>xmpp:sander@devrieze.dyndns.org</TT></A></H3></TD></TR>
</TABLE><DIV CLASS="center">
@@ -70,13 +70,13 @@ Peter Saint-Andr&#XE9;, Executive Director of the Jabber Software Foundation</I>
<B><FONT SIZE=4><FONT COLOR="#001376">Cross-platform:</FONT></FONT></B> <TT>ejabberd</TT> runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.</LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Distributed:</FONT></FONT></B> You can run <TT>ejabberd</TT> on a cluster of machines and all of them will serve the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users.</LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Fault-tolerant:</FONT></FONT></B> You can deploy an <TT>ejabberd</TT> cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes also can be added or replaced &#X2018;on the fly&#X2019;.</LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Administrator Friendly:</FONT></FONT></B> <TT>ejabberd</TT> is built on top of the Open Source Erlang. As a result you do not need to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include:
<UL CLASS="itemize"><LI CLASS="li-itemize">
Comprehensive documentation.
</LI><LI CLASS="li-itemize">Straightforward installers for Linux, Mac OS X, and Windows. </LI><LI CLASS="li-itemize">Web interface for administration tasks.
</LI><LI CLASS="li-itemize">Straightforward installers for Linux, Mac OS X, and Windows. </LI><LI CLASS="li-itemize">Web Administration.
</LI><LI CLASS="li-itemize">Shared Roster Groups.
</LI><LI CLASS="li-itemize">Command line administration tool. </LI><LI CLASS="li-itemize">Can integrate with existing authentication mechanisms.
</LI><LI CLASS="li-itemize">Capability to send announce messages.
</LI></UL></LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Internationalized:</FONT></FONT></B> <TT>ejabberd</TT> leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
<UL CLASS="itemize"><LI CLASS="li-itemize">
Translated in 17 languages. </LI><LI CLASS="li-itemize">Support for <A HREF="http://www.ietf.org/rfc/rfc3490.txt">IDNA</A>.
Translated to 24 languages. </LI><LI CLASS="li-itemize">Support for <A HREF="http://www.ietf.org/rfc/rfc3490.txt">IDNA</A>.
</LI></UL></LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Open Standards:</FONT></FONT></B> <TT>ejabberd</TT> is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
<UL CLASS="itemize"><LI CLASS="li-itemize">
Fully XMPP compliant.
@@ -97,31 +97,31 @@ Load only the modules you want.
<UL CLASS="itemize"><LI CLASS="li-itemize">
SASL and STARTTLS for c2s and s2s connections.
</LI><LI CLASS="li-itemize">STARTTLS and Dialback s2s connections.
</LI><LI CLASS="li-itemize">Web interface accessible via HTTPS secure access.
</LI><LI CLASS="li-itemize">Web Admin accessible via HTTPS secure access.
</LI></UL>
</LI><LI CLASS="li-itemize">Databases
<UL CLASS="itemize"><LI CLASS="li-itemize">
Native MySQL support.
Internal database for fast deployment (Mnesia).
</LI><LI CLASS="li-itemize">Native MySQL support.
</LI><LI CLASS="li-itemize">Native PostgreSQL support.
</LI><LI CLASS="li-itemize">Mnesia.
</LI><LI CLASS="li-itemize">ODBC data storage support.
</LI><LI CLASS="li-itemize">Microsoft SQL Server support. </LI></UL>
</LI><LI CLASS="li-itemize">Authentication
<UL CLASS="itemize"><LI CLASS="li-itemize">
PAM, LDAP and ODBC. </LI><LI CLASS="li-itemize">External Authentication script.
</LI><LI CLASS="li-itemize">Internal Authentication.
Internal Authentication.
</LI><LI CLASS="li-itemize">PAM, LDAP and ODBC. </LI><LI CLASS="li-itemize">External Authentication script.
</LI></UL>
</LI><LI CLASS="li-itemize">Others
<UL CLASS="itemize"><LI CLASS="li-itemize">
Compressing XML streams with Stream Compression (<A HREF="http://www.xmpp.org/extensions/xep-0138.html">XEP-0138</A>).
</LI><LI CLASS="li-itemize">Interface with networks such as AIM, ICQ and MSN.
Support for virtual hosting.
</LI><LI CLASS="li-itemize">Compressing XML streams with Stream Compression (<A HREF="http://www.xmpp.org/extensions/xep-0138.html">XEP-0138</A>).
</LI><LI CLASS="li-itemize">Statistics via Statistics Gathering (<A HREF="http://www.xmpp.org/extensions/xep-0039.html">XEP-0039</A>).
</LI><LI CLASS="li-itemize">IPv6 support both for c2s and s2s connections.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0045.html">Multi-User Chat</A> module with logging. </LI><LI CLASS="li-itemize">Users Directory based on users vCards.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0060.html">Publish-Subscribe</A> component.
</LI><LI CLASS="li-itemize">Support for virtual hosting.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0025.html">HTTP Polling</A> service.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0045.html">Multi-User Chat</A> module with support for clustering and HTML logging. </LI><LI CLASS="li-itemize">Users Directory based on users vCards.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0060.html">Publish-Subscribe</A> component with support for <A HREF="http://www.xmpp.org/extensions/xep-00163.html">Personal Eventing via Pubsub</A>.
</LI><LI CLASS="li-itemize">Support for web clients: <A HREF="http://www.xmpp.org/extensions/xep-0025.html">HTTP Polling</A> and <A HREF="http://www.xmpp.org/extensions/xep-0206.html">HTTP Binding (BOSH)</A> services.
</LI><LI CLASS="li-itemize">IRC transport.
</LI><LI CLASS="li-itemize">Component support: interface with networks such as AIM, ICQ and MSN installing special tranports.
</LI></UL>
</LI></UL><!--CUT END -->
<!--HTMLFOOT-->
+482 -306
View File
File diff suppressed because it is too large Load Diff
+257 -136
View File
@@ -180,16 +180,17 @@ ejabberd Development Team
% Input introduction.tex
\input{introduction}
\chapter{Installing ejabberd}
\section{Installing ejabberd with Binary Installer}
\chapter{Installing \ejabberd{}}
Probably the easiest way to install an ejabberd Instant Messaging server
\section{Installing \ejabberd{} with Binary Installer}
Probably the easiest way to install an \ejabberd{} instant messaging server
is using the binary installer published by Process-one.
The binary installers of released ejabberd versions
are available in the Process-one ejabberd download page:
The binary installers of released \ejabberd{} versions
are available in the Process-one \ejabberd{} downloads page:
\ahrefurl{http://www.process-one.net/en/ejabberd/downloads}
The installer will deploy and configure a full featured ejabberd
The installer will deploy and configure a full featured \ejabberd{}
server and does not require any extra dependencies.
In *nix systems, remember to set executable the binary installer before starting it. For example:
@@ -198,29 +199,55 @@ In *nix systems, remember to set executable the binary installer before starting
./ejabberd-2.0.0_1-linux-x86-installer.bin
\end{verbatim}
The installer generates desktop shortcuts to start and stop ejabberd.
\section{Installing ejabberd with Operating System specific packages}
The Windows installer also adds ejabberd as a system service,
and a shortcut to a debug console for experienced administrators.
You can start ejabberd using the shortcut or the Windows service.
Note that the Windows service is a feature still in development,
and for example it doesn't keep track of changes made manually in ejabberdctl.cfg.
If you want ejabberd to be started automatically at boot time,
go to the Windows service settings and set ejabberd to be automatic started.
Some Operating Systems provide a specific ejabberd package adapted to
your system architecture and libraries, which also checks dependencies
On a Linux system, if you want ejabberd to start as daemon at boot time,
copy \term{ejabberd.init} from the bin directory to something like \term{/etc/init.d/ejabberd}
(depending on your distribution) and call \term{/etc/inid.d/ejabberd start} to start it.
The \term{ejabberdctl} administration script is included in the \term{bin} directory.
Please refer to the section~\ref{ejabberdctl} for details about \term{ejabberdctl},
and configurable options to fine tune the Erlang runtime system.
\section{Installing \ejabberd{} with Operating System specific packages}
Some Operating Systems provide a specific \ejabberd{} package adapted to
the system architecture and libraries.
It usually also checks dependencies
and performs basic configuration tasks like creating the initial
administrator account. Some examples are Debian and Gentoo. Consult the
resources provided by your Operating System for more information.
\section{Installing ejabberd with CEAN}
Usually those packages create a script like \term{/etc/init.d/ejabberd}
to start and stop \ejabberd{} as a service at boot time.
\section{Installing \ejabberd{} with CEAN}
\footahref{http://cean.process-one.net/}{CEAN}
(Comprehensive Erlang Archive Network) is a repository that hosts binary
packages from many Erlang programs, including ejabberd and all its dependencies.
packages from many Erlang programs, including \ejabberd{} and all its dependencies.
The binaries are available for many different system architectures, so this is an
alternative to the binary installer and Operating System's ejabberd packages.
alternative to the binary installer and Operating System's \ejabberd{} packages.
\section{Installing ejabberd from Source Code}
You will have to create your own \ejabberd{} start
script depending of how you handle your CEAN installation.
The default \term{ejabberdctl} script is located
into \ejabberd{}'s priv directory and can be used as an example.
\section{Installing \ejabberd{} from Source Code}
\label{installation}
\ind{install}
The canonical form for distribution of ejabberd stable releases is the source code package.
Compiling ejabberd from source code is quite easy in *nix systems,
The canonical form for distribution of \ejabberd{} stable releases is the source code package.
Compiling \ejabberd{} from source code is quite easy in *nix systems,
as long as your system have all the dependencies.
\subsection{Requirements}
@@ -231,18 +258,18 @@ To compile \ejabberd{} on a `Unix-like' operating system, you need:
\begin{itemize}
\item GNU Make
\item GCC
\item libexpat 1.95 or higher
\item Erlang/OTP R9C-2 or higher
\item OpenSSL 0.9.6 or higher (optional)
\item Zlib 1.2.3 or higher (optional)
\item GNU Iconv 1.8 or higher (optional, not needed on systems with GNU libc)
\item Libexpat 1.95 or higher
\item Erlang/OTP R10B-9 up to R11B-5. Erlang R12 releases are not yet officially supported, and are not recommended for production servers.
\item OpenSSL 0.9.6 or higher, for STARTTLS, SASL and SSL encryption. Optional, highly recommended.
\item Zlib 1.2.3 or higher, for Stream Compression support (XEP-0138). Optional.
\item GNU Iconv 1.8 or higher, for the IRC Transport (mod\_irc). Optional. Not needed on systems with GNU Libc.
\end{itemize}
\subsection{Download Source Code}
\label{download}
\ind{install!download}
Released versions of \ejabberd{} are available in the Process-one ejabberd download page:
Released versions of \ejabberd{} are available in the Process-one \ejabberd{} downloads page:
\ahrefurl{http://www.process-one.net/en/ejabberd/downloads}
\ind{Subversion repository}
@@ -261,8 +288,6 @@ To compile \ejabberd{} execute the commands:
./configure
make
\end{verbatim}
The compilation process may report several warnings related to unusued variables.
This is common, and is not a problem.
The build configuration script provides several parameters.
To get the full list run the command:
@@ -296,7 +321,7 @@ Some options that you may be interested in modifying:
\label{install}
\ind{install!install}
To install ejabberd in the destination directories, run the command:
To install \ejabberd{} in the destination directories, run the command:
\begin{verbatim}
make install
\end{verbatim}
@@ -307,14 +332,14 @@ The files and directories created are, by default:
\titem{/etc/ejabberd/} Configuration files:
\begin{description}
\titem{ejabberd.cfg} ejabberd configuration file
\titem{ejabberd.inetrc} Network DNS configuration
\titem{ejabberdctl.cfg} Configuration file of the administration script
\titem{inetrc} Network DNS configuration
\end{description}
\titem{/sbin/ejabberdctl} Administration script
\titem{/var/lib/ejabberd/}
\begin{description}
\titem{.erlang.cookie} Erlang cookie file
\titem{db} Database spool files
\titem{db} Mnesia database spool files
\titem{ebin} Binary Erlang files (*.beam)
\titem{priv}
\begin{description}
@@ -322,10 +347,10 @@ The files and directories created are, by default:
\titem{msgs} Translated strings (*.msgs)
\end{description}
\end{description}
\titem{/var/log/ejabberd/} Log files (see section~\ref{logfiles}:
\titem{/var/log/ejabberd/} Log files (see section~\ref{logfiles}):
\begin{description}
\titem{ejabberd.log} Messages reported by ejabberd code
\titem{sasl.log} Messages reported by Erlang/OTP
\titem{ejabberd.log} ejabberd service log
\titem{sasl.log} Erlang/OTP system log
\end{description}
\end{description}
@@ -334,10 +359,7 @@ The files and directories created are, by default:
\label{start}
\ind{install!start}
You can use the \term{ejabberdctl} command line administration script to start and stop ejabberd.
This script is located into tools directory of sources archive. If you installed ejabberd from sources,
\term{ejabberdctl} is located into destination sbin directory (default /usr/local/sbin). If you installed
ejabberd with the installer, \term{ejabberdctl} is located into ejabberd's bin directory.
You can use the \term{ejabberdctl} command line administration script to start and stop \ejabberd{}.
Usage example:
\begin{verbatim}
@@ -352,18 +374,11 @@ $ ejabberdctl stop
Please refer to the section~\ref{ejabberdctl} for details about \term{ejabberdctl},
and configurable options to fine tune the Erlang runtime system.
Note: if you installed ejabberd with your distribution packaging system, \term{ejabberdctl} should be called
by an /etc/init.d/ejabberd script to allow you to start and stop ejabberd as a service at boot time.
If you installed ejabberd using CEAN package, you will have to create your own ejabberd start
script depending of how you handle your CEAN installation. The default \term{ejabberdctl} script is located
into ejabberd's priv directory and can be used as an example.
\subsection{Specific Notes for BSD}
\label{bsd}
\ind{install!bsd}
The command to compile ejabberd in BSD systems is:
The command to compile \ejabberd{} in BSD systems is:
\begin{verbatim}
gmake
\end{verbatim}
@@ -393,7 +408,7 @@ To compile \ejabberd{} on a Microsoft Windows system, you need:
\subsubsection{Compilation}
\label{windowscom}
We assume that we will try to put as much library as possible into \verb|C:\sdk\| to make it easier to track what is install for ejabberd.
We assume that we will try to put as much library as possible into \verb|C:\sdk\| to make it easier to track what is install for \ejabberd{}.
\begin{enumerate}
\item Install Erlang emulator (for example, into \verb|C:\sdk\erl5.5.5|).
@@ -438,7 +453,7 @@ werl -s ejabberd -name ejabberd
\label{initialadmin}
You need a Jabber account and grant him administrative privileges
to enter the ejabberd web interface:
to enter the \ejabberd{} Web Admin:
\begin{enumerate}
\item Register a Jabber account on your \ejabberd{} server, for example \term{admin1@example.org}.
There are two ways to register a Jabber account:
@@ -449,7 +464,7 @@ to enter the ejabberd web interface:
\end{verbatim}
\item Using a Jabber client and In-Band Registration (see section~\ref{modregister}).
\end{enumerate}
\item Edit the ejabberd configuration file to give administration rights to the Jabber account you created:
\item Edit the \ejabberd{} configuration file to give administration rights to the Jabber account you created:
\begin{verbatim}
{acl, admins, {user, "admin1", "example.org"}}.
{access, configure, [{allow, admins}]}.
@@ -457,27 +472,39 @@ to enter the ejabberd web interface:
You can grant administrative privileges to many Jabber accounts,
and also to accounts in other Jabber servers.
\item Restart \ejabberd{} to load the new configuration.
\item Open the web interface (\verb|http://server:port/admin/|) in your
\item Open the Web Admin (\verb|http://server:port/admin/|) in your
favourite browser. Make sure to enter the \emph{full} JID as username (in this
example: \jid{admin1@example.org}. The reason that you also need to enter the
suffix, is because \ejabberd{}'s virtual hosting support.
\end{enumerate}
\section{Upgrading \ejabberd{}}
\chapter{Configuring ejabberd}
To upgrade an ejabberd installation to a new version,
simply uninstall the old version, and then install the new one.
Of course, it is important that the configuration file
and Mnesia database spool directory are not removed.
\ejabberd{} automatically updates the Mnesia table definitions at startup when needed.
If you also use an external database for storage of some modules,
check if the release notes of the new ejabberd version
indicates you need to also update those tables.
\chapter{Configuring \ejabberd{}}
\section{Basic Configuration}
\label{basicconfig}
\ind{configuration file}
The configuration file will be loaded the first time you start \ejabberd{}. The
content from this file will be parsed and stored in the internal ejabberd database. Subsequently the
content from this file will be parsed and stored in the internal \ejabberd{} database. Subsequently the
configuration will be loaded from the database and any commands in the
configuration file are appended to the entries in the database.
Note that ejabberd never edits the configuration file.
So, the configuration changes done using the web interface
Note that \ejabberd{} never edits the configuration file.
So, the configuration changes done using the Web Admin
are stored in the database, but are not reflected in the configuration file.
If you want those changes to be use after ejabberd restart, you can either
If you want those changes to be use after \ejabberd{} restart, you can either
edit the configuration file, or remove all its content.
The configuration file contains a sequence of Erlang terms. Lines beginning with a
@@ -494,8 +521,8 @@ the configuration file:
override_local.
override_acls.
\end{verbatim}
With these lines the old global options (shared between all ejabberd nodes in a
cluster), local options (which are specific for this particular ejabberd node)
With these lines the old global options (shared between all \ejabberd{} nodes in a
cluster), local options (which are specific for this particular \ejabberd{} node)
and ACLs will be removed before new ones are added.
\subsection{Host Names}
@@ -723,8 +750,8 @@ This is a detailed description of each option allowed by the listening modules:
\titem{tls} \ind{options!tls}\ind{TLS}This option specifies that traffic on
the port will be encrypted using SSL immediately after connecting. You
should also set the \option{certfile} option.
\titem{web\_admin} \ind{options!web\_admin}\ind{web interface}This option
enables the web interface for \ejabberd{} administration which is available
\titem{web\_admin} \ind{options!web\_admin}\ind{web admin}This option
enables the Web Admin for \ejabberd{} administration which is available
at \verb|http://server:port/admin/|. Login and password are the username and
password of one of the registered users who are granted access by the
`configure' access rule.
@@ -756,8 +783,8 @@ However, the c2s and s2s connections to the domain \term{example.com} use the fi
\item Port 5223 listens for c2s connections with the old SSL.
\item Port 5269 listens for s2s connections with STARTTLS.
\item Port 5280 listens for HTTP requests, and serves the HTTP Poll service.
\item Port 5281 listens for HTTP requests, and serves the web interface using HTTPS as explained in
section~\ref{webinterface}.
\item Port 5281 listens for HTTP requests, and serves the Web Admin using HTTPS as explained in
section~\ref{webadmin}.
\end{itemize}
\begin{verbatim}
{hosts, ["example.com", "example.org", "example.net"]}.
@@ -799,7 +826,7 @@ In this example, the following configuration defines that:
for the user called `\term{bad}'.
\item s2s connections are listened for on port 5269 with STARTTLS for secured
traffic enabled.
\item Port 5280 is serving the web interface and the HTTP Polling service. Note
\item Port 5280 is serving the Web Admin and the HTTP Polling service. Note
that it is also possible to serve them on different ports. The second
example in section~\ref{webinterface} shows how exactly this can be done.
\item All users except for the administrators have a traffic of limit
@@ -1289,9 +1316,23 @@ Note that the tutorial contains information about \ejabberd{}'s configuration
which is duplicate to this section.
Moreover, the file mysql.sql in the directory src/odbc might be interesting for
you. This file contains the ejabberd schema for MySQL. At the end of the file
you. This file contains the \ejabberd{} schema for MySQL. At the end of the file
you can find information to update your database schema.
By default \ejabberd{} opens 10 connections to the database for each virtual host.
Use this option to modify the value:
\begin{verbatim}
{odbc_pool_size, 10}.
\end{verbatim}
You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is 'undefined', so no keepalive requests are made.
Specify in seconds: for example 28800 means 8 hours.
\begin{verbatim}
{odbc_keepalive_interval, undefined}.
\end{verbatim}
\subsubsection{Driver Compilation}
\label{compilemysql}
\ind{MySQL!Driver Compilation}
@@ -1302,7 +1343,7 @@ if the binary packages of \ejabberd{} you are using include support for MySQL.
\begin{enumerate}
\item First, install the \footahref{http://support.process-one.net/doc/display/CONTRIBS/Yxa}{Erlang
MySQL library}. Make sure the compiled files are in your Erlang path; you can
put them for example in the same directory as your ejabberd .beam files.
put them for example in the same directory as your \ejabberd{} .beam files.
\item Then, configure and install \ejabberd{} with ODBC support enabled (this is
also needed for native MySQL support!). This can be done, by using next
commands:
@@ -1376,9 +1417,23 @@ Note that the tutorial contains information about \ejabberd{}'s configuration
which is duplicate to this section.
Moreover, the file mssql.sql in the directory src/odbc might be interesting for
you. This file contains the ejabberd schema for Microsoft SQL Server. At the end
you. This file contains the \ejabberd{} schema for Microsoft SQL Server. At the end
of the file you can find information to update your database schema.
By default \ejabberd{} opens 10 connections to the database for each virtual host.
Use this option to modify the value:
\begin{verbatim}
{odbc_pool_size, 10}.
\end{verbatim}
You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is 'undefined', so no keepalive requests are made.
Specify in seconds: for example 28800 means 8 hours.
\begin{verbatim}
{odbc_keepalive_interval, undefined}.
\end{verbatim}
\subsubsection{Driver Compilation}
\label{compilemssql}
\ind{Microsoft SQL Server!Driver Compilation}
@@ -1426,9 +1481,23 @@ Note that the tutorial contains information about \ejabberd{}'s configuration
which is duplicate to this section.
Also the file pg.sql in the directory src/odbc might be interesting for you.
This file contains the ejabberd schema for PostgreSQL. At the end of the file
This file contains the \ejabberd{} schema for PostgreSQL. At the end of the file
you can find information to update your database schema.
By default \ejabberd{} opens 10 connections to the database for each virtual host.
Use this option to modify the value:
\begin{verbatim}
{odbc_pool_size, 10}.
\end{verbatim}
You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is 'undefined', so no keepalive requests are made.
Specify in seconds: for example 28800 means 8 hours.
\begin{verbatim}
{odbc_keepalive_interval, undefined}.
\end{verbatim}
\subsubsection{Driver Compilation}
\label{compilepgsql}
\ind{PostgreSQL!Driver Compilation}
@@ -1438,10 +1507,11 @@ if the binary packages of \ejabberd{} you are using include support for
PostgreSQL.
\begin{enumerate}
\item First, install the Erlang PgSQL library from
\footahref{http://jungerl.sourceforge.net/}{Jungerl}. Make sure the compiled
\item First, install the Erlang pgsql library from
\footahref{http://www.ejabberd.im/ejabberd-modules/}{ejabberd-modules SVN repository}.
Make sure the compiled
files are in your Erlang path; you can put them for example in the same
directory as your ejabberd .beam files.
directory as your \ejabberd{} .beam files.
\item Then, configure, compile and install \ejabberd{} with ODBC support enabled
(this is also needed for native PostgreSQL support!). This can be done, by
using next commands:
@@ -1512,7 +1582,21 @@ of your database. Check the documentation of your database. The tutorial \footah
contains information about \ejabberd{}'s configuration which is duplicate to
this section.
\subsubsection{Compilation}
By default \ejabberd{} opens 10 connections to the database for each virtual host.
Use this option to modify the value:
\begin{verbatim}
{odbc_pool_size, 10}.
\end{verbatim}
You can configure an interval to make a dummy SQL request
to keep alive the connections to the database.
The default value is 'undefined', so no keepalive requests are made.
Specify in seconds: for example 28800 means 8 hours.
\begin{verbatim}
{odbc_keepalive_interval, undefined}.
\end{verbatim}
\subsubsection{Driver Compilation}
\label{compileodbc}
You can skip this step if you installed \ejabberd{} using a binary installer or
@@ -1522,7 +1606,7 @@ ODBC.
\begin{enumerate}
\item First, install the \footahref{http://support.process-one.net/doc/display/CONTRIBS/Yxa}{Erlang
MySQL library}. Make sure the compiled files are in your Erlang path; you can
put them for example in the same directory as your ejabberd .beam files.
put them for example in the same directory as your \ejabberd{} .beam files.
\item Then, configure, compile and install \ejabberd{} with ODBC support
enabled. This can be done, by using next commands:
\begin{verbatim}
@@ -1581,7 +1665,7 @@ LDAP server. This option is required.
\titem{ldap\_port} \ind{options!ldap\_port}Port to connect to your LDAP server.
The initial default value is~389, so it is used when nothing is set into the
configuration file.
If you configure a value, it is stored in ejabberd's database.
If you configure a value, it is stored in \ejabberd{}'s database.
Then, if you remove that value from the configuration file,
the value previously stored in the database will be used instead of the default 389.
\titem{ldap\_rootdn} \ind{options!ldap\_rootdn}Bind DN. The default value
@@ -1930,7 +2014,7 @@ Example:
\label{modhostoption}
\ind{options!host}
This option defines the Jabber ID of a service provided by an ejabberd module.
This option defines the Jabber ID of a service provided by an \ejabberd{} module.
The keyword "@HOST@" is replaced at start time with the real virtual host string.
This example configures
@@ -2027,7 +2111,7 @@ Examples:
Note that \modannounce{} can be resource intensive on large
deployments as it can broadcast lot of messages. This module should be
disabled for instances of ejabberd with hundreds of thousands users.
disabled for instances of \ejabberd{} with hundreds of thousands users.
\subsection{\moddisco{}}
\label{moddisco}
@@ -2292,7 +2376,7 @@ Options:
service for users abuses, as fastly changing a user presence will
result in possible large presence packet broadcast. If a user tries
to change its presence more often than the specified interval, the
presence is cached by ejabberd and only the last presence is
presence is cached by \ejabberd{} and only the last presence is
broadcasted to all users in the room after expiration of the
interval delay. Intermediate presence packets are silently
discarded. A good value for this option is 4 seconds.
@@ -2683,8 +2767,8 @@ Options:
\titem{nodetree} To specify which nodetree to use. If not defined, the default pubsub
nodetree is used. Nodetrees are default and virtual. Only one nodetree can be used
and is shared by all node plugins.
\titem{served\_hosts} \ind{options!served\_hosts}
This option allows to create additional pubsub virtual hosts in a single module instance.
%\titem{served\_hosts} \ind{options!served\_hosts}
% This option allows to create additional pubsub virtual hosts in a single module instance.
\end{description}
Example:
@@ -2694,12 +2778,12 @@ Example:
...
{mod_pubsub, [
{access_createnode, pubsub_createnode},
{plugins, ["default", "pep"]},
{served_hosts, ["example.com", "example.org"]}
{plugins, ["default", "pep"]}
]}
...
]}.
\end{verbatim}
% {served_hosts, ["example.com", "example.org"]}
\subsection{\modregister{}}
\label{modregister}
@@ -2842,14 +2926,14 @@ A shared roster group can have members from any Jabber server,
but the presence will only be available from and to members
of the same virtual host where the group is created.
Shared roster groups can be edited \emph{only} via the web interface. Each group
Shared roster groups can be edited \emph{only} via the Web Admin. Each group
has a unique identification and the following parameters:
\begin{description}
\item[Name] The name of the group, which will be displayed in the roster.
\item[Description] The description of the group. This parameter does not affect
anything.
\item[Members] A list of full JIDs of group members, entered one per line in
the web interface.
the Web Admin.
To put as members all the registered users in the virtual hosts,
you can use the special directive: @all@.
Note that this directive is designed for a small server with just a few hundred users.
@@ -3269,7 +3353,7 @@ Options:
\iqdiscitem{Software Version (\ns{jabber:iq:version})}
\end{description}
\chapter{Managing an ejabberd server}
\chapter{Managing an \ejabberd{} server}
\section{\term{ejabberdctl}}
@@ -3279,23 +3363,23 @@ Options:
\label{commands}
The \term{ejabberdctl} command line script allows to start, stop and perform
many other administrative tasks in a local or remote ejabberd server.
many other administrative tasks in a local or remote \ejabberd{} server.
When \term{ejabberdctl} is executed without any parameter,
it displays the available options. If there isn't an ejabberd server running,
it displays the available options. If there isn't an \ejabberd{} server running,
the available parameters are:
\begin{description}
\titem{start} Start ejabberd in background mode. This is the default method.
\titem{debug} Attach an Erlang shell to an already existing ejabberd server. This allows to execute commands interactively in the ejabberd server.
\titem{live} Start ejabberd in live mode: the shell keeps attached to the started server, showing log messages and allowing to execute interactive commands.
\titem{start} Start \ejabberd{} in background mode. This is the default method.
\titem{debug} Attach an Erlang shell to an already existing \ejabberd{} server. This allows to execute commands interactively in the \ejabberd{} server.
\titem{live} Start \ejabberd{} in live mode: the shell keeps attached to the started server, showing log messages and allowing to execute interactive commands.
\end{description}
If there is an ejabberd server running in the system,
If there is an \ejabberd{} server running in the system,
\term{ejabberdctl} shows all the available commands in that server.
The more interesting ones are:
\begin{description}
\titem{status} Check the status of the ejabberd server.
\titem{stop} Stop the ejabberd server which is running in the machine.
\titem{status} Check the status of the \ejabberd{} server.
\titem{stop} Stop the \ejabberd{} server which is running in the machine.
\titem{reopen-log} If you use a tool to rotate logs, you have to configure it
so that this command is executed after each rotation.
\titem {backup, restore, install-fallback, dump, load} You can use these
@@ -3317,10 +3401,41 @@ The \term{ejabberdctl} administration script can be configured in the file ejabb
This file provides detailed information about each configurable option.
\subsection{Erlang configuration}
\subsection{Erlang runtime system}
\label{erlangconfiguration}
The basic parameters used by \term{ejabberdctl} when starting the Erlang node:
\ejabberd{} is an Erlang/OTP application that runs inside an Erlang runtime system.
This system is configured using environment variables and command line parameters.
The \term{ejabberdctl} administration script uses many of those possibilities.
You can configure some of them with the file \term{ejabberdctl.cfg},
which includes detailed description about them.
This section describes for reference purposes
all the environment variables and command line parameters.
The environment variables:
\begin{description}
\titem{EJABBERD\_CONFIG\_PATH}
Path to the ejabberd configuration file.
\titem{EJABBERD\_MSGS\_PATH}
Path to the directory with translated strings.
\titem{EJABBERD\_LOG\_PATH}
Path to the ejabberd service log file.
\titem{EJABBERD\_SO\_PATH}
Path to the directory with binary system libraries.
\titem{HOME}
Path to the directory that is considered \ejabberd{}'s home.
This path is used to read the file \term{.erlang.cookie}.
\titem{ERL\_CRASH\_DUMP}
Path to the file where crash reports will be dumped.
\titem{ERL\_INETRC}
Indicates which IP name resolution to use. It is required if using \term{-sname}.
\titem{ERL\_MAX\_PORTS}
Maximum number of simultaneously open Erlang ports.
\titem{ERL\_MAX\_ETS\_TABLES}
Maximum number of ETS and Mnesia tables.
\end{description}
The command line parameters:
\begin{description}
\titem{-sname ejabberd}
The Erlang node will be identified using only the first part
@@ -3328,8 +3443,8 @@ The basic parameters used by \term{ejabberdctl} when starting the Erlang node:
this node. This is the preferable option in most cases.
\titem{-name ejabberd}
The Erlang node will be fully identified.
This is only useful if you plan to setup an ejabberd cluster with nodes in different networks.
\titem{-kernel inetrc "/etc/ejabberd/ejabberd.inetrc"}
This is only useful if you plan to setup an \ejabberd{} cluster with nodes in different networks.
\titem{-kernel inetrc "/etc/ejabberd/inetrc"}
Indicates which IP name resolution to use. It is required if using \term{-sname}.
\titem{-detached}
Starts the Erlang system detached from the system console.
@@ -3340,27 +3455,33 @@ The basic parameters used by \term{ejabberdctl} when starting the Erlang node:
\titem{-pa /var/lib/ejabberd/ebin}
Specify the directory where Erlang binary files (*.beam) are located.
\titem{-s ejabberd}
Tell Erlang runtime system to start the ejabberd application.
Tell Erlang runtime system to start the \ejabberd{} application.
\titem{-mnesia dir "/var/lib/ejabberd/db/nodename"}
Specify the Mnesia database directory.
\titem{-sasl sasl\_error\_logger \{file, "/var/log/ejabberd/sasl.log"\}}
Specify the directory for the sasl.log file.
Path to the Erlang/OTP system log file.
\titem{+K [true|false]}
Kernel polling.
\titem{-smp [auto|enable|disable]}
SMP support.
\titem{+P 250000}
Maximum number of Erlang processes.
\titem{-remsh ejabberd@localhost}
Open an Erlang shell in a remote Erlang node.
\end{description}
Note that some characters need to be escaped when used in shell scripts, for instance \verb|"| and \verb|{}|.
You can find other options in the Erlang manual page (\shell{erl -man erl}).
In addition, there are several configurable parameters
in the file \term{/etc/ejabberd/ejabberdctl.cfg}
to fine tune the Erlang runtime system.
\section{Web Admin}
\label{webadmin}
\ind{web admin}
\section{Web Interface}
\label{webinterface}
\ind{web interface}
The \ejabberd{} Web Admin allows to administer most of \ejabberd{} using a web browser.
To perform online configuration of \ejabberd{} you need to enable the
\term{ejabberd\_http} listener with the option \term{web\_admin} (see
section~\ref{listened}). Then you can open
This feature is enabled by default:
a \term{ejabberd\_http} listener with the option \term{web\_admin} (see
section~\ref{listened}) is included in the listening ports. Then you can open
\verb|http://server:port/admin/| in your favourite web browser. You
will be asked to enter the username (the \emph{full} \Jabber{} ID) and password
of an \ejabberd{} user with administrator rights. After authentication
@@ -3369,7 +3490,7 @@ you will see a page similar to figure~\ref{fig:webadmmain}.
\begin{figure}[htbp]
\centering
\insimg{webadmmain.png}
\caption{Top page from the web interface}
\caption{Top page from the Web Admin}
\label{fig:webadmmain}
\end{figure}
Here you can edit access restrictions, manage users, create backups,
@@ -3378,12 +3499,12 @@ statistics,\ldots
Examples:
\begin{itemize}
\item You can serve the web interface on the same port as the
\item You can serve the Web Admin on the same port as the
\ind{protocols!XEP-0025: HTTP Polling}HTTP Polling interface. In this example
you should point your web browser to \verb|http://example.org:5280/admin/| to
administer all virtual hosts or to
\verb|http://example.org:5280/admin/server/example.com/| to administer only
the virtual host \jid{example.com}. Before you get access to the web interface
the virtual host \jid{example.com}. Before you get access to the Web Admin
you need to enter as username, the JID and password from a registered user
that is allowed to configure \ejabberd{}. In this example you can enter as
username `\jid{admin@example.net}' to administer all virtual hosts (first
@@ -3405,9 +3526,9 @@ Examples:
]
}.
\end{verbatim}
\item For security reasons, you can serve the web interface on a secured
\item For security reasons, you can serve the Web Admin on a secured
connection, on a port differing from the HTTP Polling interface, and bind it
to the internal LAN IP. The web interface will be accessible by pointing your
to the internal LAN IP. The Web Admin will be accessible by pointing your
web browser to \verb|https://192.168.1.1:5280/admin/|:
\begin{verbatim}
...
@@ -3429,7 +3550,7 @@ Examples:
\label{adhoccommands}
If you enable \modconfigure\ and \modadhoc,
you can perform several administrative tasks in ejabberd
you can perform several administrative tasks in \ejabberd{}
with a Jabber client.
The client must support Ad-Hoc Commands (\xepref{0050}),
and you must login in the Jabber server with
@@ -3439,23 +3560,23 @@ an account with proper privileges.
\section{Change Computer Hostname}
\label{changeerlangnodename}
ejabberd uses the distributed Mnesia database.
\ejabberd{} uses the distributed Mnesia database.
Being distributed, Mnesia enforces consistency of its file,
so it stores the name of the Erlang node in it.
The name of an Erlang node includes the hostname of the computer.
So, the name of the Erlang node changes
if you change the name of the machine in which ejabberd runs,
or when you move ejabberd to a different machine.
if you change the name of the machine in which \ejabberd{} runs,
or when you move \ejabberd{} to a different machine.
So, if you want to change the computer hostname where ejabberd is installed,
So, if you want to change the computer hostname where \ejabberd{} is installed,
you must follow these instructions:
\begin{enumerate}
\item In the old server, backup the Mnesia database using the Web Interface or \term{ejabberdctl}.
\item In the old server, backup the Mnesia database using the Web Admin or \term{ejabberdctl}.
For example:
\begin{verbatim}
ejabberdctl backup /tmp/ejabberd-oldhost.backup
\end{verbatim}
\item In the new server, restore the backup file using the Web Interface or \term{ejabberdctl}.
\item In the new server, restore the backup file using the Web Admin or \term{ejabberdctl}.
For example:
\begin{verbatim}
ejabberdctl restore /tmp/ejabberd-oldhost.backup
@@ -3463,7 +3584,7 @@ ejabberdctl restore /tmp/ejabberd-oldhost.backup
\end{enumerate}
\chapter{Securing ejabberd}
\chapter{Securing \ejabberd{}}
\section{Firewall Settings}
\label{firewall}
\ind{firewall}\ind{ports}\ind{SASL}\ind{TLS}\ind{clustering!ports}
@@ -3488,24 +3609,24 @@ You need to take the following TCP ports in mind when configuring your firewall:
\footahref{http://www.erlang.org/doc/man/epmd.html}{epmd (Erlang Port Mapper Daemon)}
is a small name server included in Erlang/OTP
and used by Erlang programs when establishing distributed Erlang communications.
ejabberd needs \term{epmd} to use \term{ejabberdctl} and also when clustering ejabberd nodes.
\ejabberd{} needs \term{epmd} to use \term{ejabberdctl} and also when clustering \ejabberd{} nodes.
This small program is automatically started by Erlang, and is never stopped.
If ejabberd is stopped, and there aren't any other Erlang programs
If \ejabberd{} is stopped, and there aren't any other Erlang programs
running in the system, you can safely stop \term{epmd} if you want.
ejabberd runs inside an Erlang node.
To communicate with ejabberd, the script \term{ejabberdctl} starts a new Erlang node
and connects to the Erlang node that holds ejabberd.
\ejabberd{} runs inside an Erlang node.
To communicate with \ejabberd{}, the script \term{ejabberdctl} starts a new Erlang node
and connects to the Erlang node that holds \ejabberd{}.
In order for this communication to work,
\term{epmd} must be running and listening for name requests in the port 4369.
You should block the port 4369 in the firewall,
so only the programs in your machine can access it.
If you build a cluster of several ejabberd instances,
each ejabberd instance is called an ejabberd node.
Those ejabberd nodes use a special Erlang communication method to
If you build a cluster of several \ejabberd{} instances,
each \ejabberd{} instance is called an \ejabberd{} node.
Those \ejabberd{} nodes use a special Erlang communication method to
build the cluster, and EPMD is again needed listening in the port 4369.
So, if you plan to build a cluster of ejabberd nodes
So, if you plan to build a cluster of \ejabberd{} nodes
you must open the port 4369 for the machines involved in the cluster.
Remember to block the port so Internet doesn't have access to it.
@@ -3660,7 +3781,7 @@ mnesia:change_table_copy_type(schema, node(), disc_copies).
This will create local disc storage for the database.
(alt) Change storage type of the \term{scheme} table to `RAM and disc
copy' on the second node via the web interface.
copy' on the second node via the Web Admin.
\item Now you can add replicas of various tables to this node with
@@ -3709,7 +3830,7 @@ domain.
\label{domainlb}
\ind{options!domain\_balancing}
\ejabberd{} includes an algorithm to load balance the components that are plugged on an ejabberd cluster. It means that you can plug one or several instances of the same component on each ejabberd cluster and that the traffic will be automatically distributed.
\ejabberd{} includes an algorithm to load balance the components that are plugged on an \ejabberd{} cluster. It means that you can plug one or several instances of the same component on each \ejabberd{} cluster and that the traffic will be automatically distributed.
The default distribution algorithm try to deliver to a local instance of a component. If several local instances are available, one instance is chosen randomly. If no instance is available locally, one instance is chosen randomly among the remote component instances.
@@ -3758,11 +3879,11 @@ The syntax is the following:
\label{watchdog}
\ind{debugging!watchdog}
ejabberd includes a watchdog mechanism.
If a process in the ejabberd server consumes too much memory,
\ejabberd{} includes a watchdog mechanism.
If a process in the \ejabberd{} server consumes too much memory,
a message is sent to the Jabber accounts defined with the option
\term{watchdog\_admins}
\ind{options!watchdog\_admins} in the ejabberd configuration file.
\ind{options!watchdog\_admins} in the \ejabberd{} configuration file.
Example configuration:
\begin{verbatim}
{watchdog_admins, ["admin2@localhost", "admin2@example.org"]}.
@@ -3772,14 +3893,14 @@ Example configuration:
\section{Log Files}
\label{logfiles}
ejabberd writes messages in two log files:
An \ejabberd{} node writes two log files:
\begin{description}
\titem{ejabberd.log} Messages reported by ejabberd code
\titem{sasl.log} Messages reported by Erlang/OTP using SASL (System Architecture Support Libraries)
\titem{ejabberd.log} is the ejabberd service log, with the messages reported by \ejabberd{} code
\titem{sasl.log} is the Erlang/OTP system log, with the messages reported by Erlang/OTP using SASL (System Architecture Support Libraries)
\end{description}
The option \term{loglevel} modifies the verbosity of the file ejabberd.log.
There possible levels are:
The possible levels are:
\begin{description}
\titem{0} No ejabberd log at all (not recommended)
\titem{1} Critical
@@ -3797,10 +3918,10 @@ For example, the default configuration is:
\section{Debug Console}
\label{debugconsole}
The Debug Console is an Erlang shell attached to an already running ejabberd server.
The Debug Console is an Erlang shell attached to an already running \ejabberd{} server.
With this Erlang shell, an experienced administrator can perform complex tasks.
This shell gives complete control over the ejabberd server,
This shell gives complete control over the \ejabberd{} server,
so it is important to use it with extremely care.
There are some simple and safe examples in the article
\footahref{http://www.ejabberd.im/interconnect-erl-nodes}{Interconnecting Erlang Nodes}
@@ -3831,13 +3952,13 @@ Figure~\ref{fig:discorus}, for example, shows the reply to the following query:
\label{fig:discorus}
\end{figure}
The web interface also supports the \verb|Accept-Language| HTTP header (compare
The Web Admin also supports the \verb|Accept-Language| HTTP header (compare
figure~\ref{fig:webadmmainru} with figure~\ref{fig:webadmmain})
\begin{figure}[htbp]
\centering
\insimg{webadmmainru.png}
\caption{Top page from the web interface with HTTP header
\caption{Top page from the Web Admin with HTTP header
`Accept-Language: ru'}
\label{fig:webadmmainru}
\end{figure}
@@ -3873,7 +3994,7 @@ Thanks to all people who contributed to this guide:
\label{copyright}
Ejabberd Installation and Operation Guide.\\
Copyright \copyright{} 2003 --- 2007 Process-one
Copyright \copyright{} 2003 --- 2008 Process-one
This document is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
+3 -3
View File
@@ -59,7 +59,7 @@ Peter Saint-Andr\'e, Executive Director of the Jabber Software Foundation}
\begin{itemize}
\item Comprehensive documentation.
\item Straightforward installers for Linux, Mac OS X, and Windows. %%\improved{}
\item Web interface for administration tasks.
\item Web Administration.
\item Shared Roster Groups.
\item Command line administration tool. %%\improved{}
\item Can integrate with existing authentication mechanisms.
@@ -68,7 +68,7 @@ Peter Saint-Andr\'e, Executive Director of the Jabber Software Foundation}
\item \marking{Internationalized:} \ejabberd{} leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
\begin{itemize}
\item Translated in 17 languages. %%\improved{}
\item Translated to 24 languages. %%\improved{}
\item Support for \footahref{http://www.ietf.org/rfc/rfc3490.txt}{IDNA}.
\end{itemize}
@@ -101,7 +101,7 @@ Moreover, \ejabberd{} comes with a wide range of other state-of-the-art features
\begin{itemize}
\item SASL and STARTTLS for c2s and s2s connections.
\item STARTTLS and Dialback s2s connections.
\item Web interface accessible via HTTPS secure access.
\item Web Admin accessible via HTTPS secure access.
\end{itemize}
\item Databases
\begin{itemize}
+83 -28
View File
@@ -1,17 +1,18 @@
Release Notes
ejabberd 2.0.0 beta 1
24 december 2007
Release Notes
ejabberd 2.0.0
21 February 2008
ejabberd 2.0.0 is a major new version for ejabberd adding plenty of
new features, performance and scalability improvements and
architectural changes.
ejabberd 2.0.0 includes near that 200 improvements over ejabberd
ejabberd 2.0.0 includes more than 200 improvements over ejabberd
1.1.x. A complete list of changes can be retrieved from:
http://redir.process-one.net/ejabberd-2.0.0
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/projects/ejabberd/
The new code can be downloaded from ejabberd downloads page:
http://www.process-one.net/en/ejabberd/
Recent changes include:
@@ -61,21 +62,21 @@
- Support for LDAP servers pool.
- Simplified use of virtual hosting with LDAP with domain substitution
in config.
- Ability to match on several userid attibutes.
- Ability to match on several userid attributes.
* Multi-user chat
* Multi-User Chat
- Clustering and load balancing support.
- Ability to define default room configuration in ejabberd config file.
- Many anti abuse features have been added:
. New ACL to limit the creation of persistent room to autorized users.
. New ACL to limit the creation of persistent room to authorized users.
. Ability to define the maximum number of users per room.
. Limitation of the rate of message and presence packets.
. Limitation of the maximum number of room a user can join at the same time.
* File transfer
* File Transfer
- XEP-0065 - Proxy65 file transfer proxy. The proxy can run in
cluster mode.
@@ -87,14 +88,14 @@
- External Authentication protocol is now fully documented.
* Web client support
* Web Client Support
- XEP-0124 - BOSH support: BOSH (Bidirectional-streams Over
Synchronous HTTP) was formerly known as "HTTP binding". It provides
an efficient alternative to HTTP polling for scalable Web based chat
solutions.
- HTTP module can now serve static documents (with
mod_http_fileserver). It is needed for high-performance Web2.0 chat
mod_http_fileserver). It is needed for high-performance Web 2.0 chat
/ IM application. System administrators can now avoid using a proxy
(like Apache) that handles much less simultaneous than ejabberd HTTP
module.
@@ -102,23 +103,24 @@
(bandwidth, packet size).
* System administration
* System Administration
- XEP-0133 - Service administration support. System administrators can
now performs lot of ejabberd related admin tasks from their XMPP
now perform lot of ejabberd related admin tasks from their XMPP
client, through adhoc commands.
- Dynamic log levels: Improved logging with more log levels. You can
now change the loglevel at run time. No performance penality is
involved when
- Better command-line tool, with more options available.
now change the loglevel at run time. No performance penalty is
involved when less verbose levels are used.
- The ejabberdctl command-line administration script now can start
and stop ejabberd. It also includes other useful options.
* Localization
- ejabberd is now available in 22 languages: Catalan, Chinese, Czech,
Dutch, French, Galicia, German, Italian, Japanese, Polish,
Portuguese, Portuguese (Brazil), Russian, Slovak, Spanish, Swedish,
Thai, Turkish, Ukrainian, Vietnamese, Wallon.
- ejabberd is now translated to 24 languages: Catalan, Chinese, Czech,
Dutch, English, Esperanto, French, Galician, German, Italian, Japanese,
Norwegian, Polish, Portuguese, Portuguese (Brazil), Russian, Slovak,
Spanish, Swedish, Thai, Turkish, Ukrainian, Vietnamese, Walloon.
* Build and Installer
@@ -126,11 +128,11 @@
- Many launch script improvements.
- New translations. The binary installer is now available in Chinese,
Dutch, English, French, German, Spanish, Russian.
- Makefile now implements uninstall command
- Full MacOSX compliance in Makefile
- Makefile now implements uninstall command.
- Full MacOSX compliance in Makefile.
- Configure script is clever at finding libraries in unusual places.
* Development API
- Several hooks have been added for module developers (most notably
@@ -141,13 +143,66 @@
* Bugfixes
- ejabberd 2.0 also fixes numerous small bugs :) Read the full
- ejabberd 2.0.0 also fixes numerous small bugs :) Read the full
changelog for details.
Bugs report
Important Note:
- Since this release, ejabberd requires Erlang R10B-5 or higher.
R11B-5 is the recommended version. R12 is not yet officially
supported, and is not recommended for production servers.
Upgrading From ejabberd 1.x:
- If you upgrade from a version older than 1.1.4, please check the
Release Notes of the intermediate versions for additional
information about database or configuration changes.
- The database schemas didn't change since ejabberd 1.1.4. Of course,
you are encouraged to make a database backup of your SQL database,
or your Mnesia spool directory before upgrading ejabberd.
- The ejabberdctl command line administration script is improved in
ejabberd 2.0.0, and now it can start and stop ejabberd. If you
already wrote your own start script for ejabberd 1.x, you can
continue using it, or try ejabberdctl. For your convenience, the
ejabberd Guide describes all the ejabberd and Erlang options used by
ejabberdctl.
- The example ejabberd.cfg file has been reorganized, but its format
and syntax rules are the same. So, you can continue using your
ejabberd.cfg file from 1.x if you want. The most important changes
are described now.
- The 'ssl' option is no longer available in the listening ports. For
legacy SSL encryption use the option 'tls'. For STARTTLS encryption
as defined in RFC 3920 XMPP-CORE use the option 'starttls'. Check
the ejabberd Guide for more information about configuring listening
ports.
- The options 'welcome_message' and 'registration_watchers' are now
options of the module mod_register. Check in the ejabberd Guide how
to configure that module.
- To enable PEP support in mod_pubsub, you need to enable it in the
mod_pubsub configuration, and also enable the new module
mod_caps. Check the section about mod_pubsub in the ejabberd Guide.
- Other new features and improvements also require changes in the
ejabberd.cfg, like mod_http_bind, mod_http_fileserver, mod_proxy65,
loglevel, pam_service, and watchdog_admins. Search for those words
in the ejabberd Guide and the example ejabberd.cfg.
Bug Reports
You can officially report bugs on Process-one support site:
https://support.process-one.net/
END
END
+1 -1
View File
@@ -1,2 +1,2 @@
% ejabberd version (automatically generated).
\newcommand{\version}{2.0.0-beta1}
\newcommand{\version}{2.0.0}
+4 -3
View File
@@ -12,6 +12,8 @@ ERLANG_CFLAGS= @ERLANG_CFLAGS@
EXPAT_LIBS = @EXPAT_LIBS@
ERLANG_LIBS = @ERLANG_LIBS@
ERLC_FLAGS += @ERLANG_SSL39@
ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj
# make debug=true to compile Erlang module with debug informations.
ifdef debug
@@ -46,7 +48,7 @@ ERLBEHAVS = cyrsasl.erl gen_mod.erl p1_fsm.erl
SOURCES = $(ERLBEHAVS) $(wildcard *.erl)
BEAMS = $(SOURCES:.erl=.beam)
DESTDIR =
DESTDIR =
EJABBERDDIR = $(DESTDIR)@prefix@/var/lib/ejabberd
BEAMDIR = $(EJABBERDDIR)/ebin
@@ -107,7 +109,7 @@ install: all
[ -f $(ETCDIR)/ejabberd.cfg ] && install -b -m 644 ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new || install -b -m 644 ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
sed -e "s*@rootdir@*@prefix@*" ejabberdctl.template > ejabberdctl.example
[ -f $(ETCDIR)/ejabberdctl.cfg ] && install -b -m 644 ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new || install -b -m 644 ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
install -b -m 644 ejabberd.inetrc $(ETCDIR)/ejabberd.inetrc
install -b -m 644 inetrc $(ETCDIR)/inetrc
install -d $(SBINDIR)
install -m 755 ejabberdctl.example $(SBINDIR)/ejabberdctl
install -d $(LOGDIR)
@@ -144,4 +146,3 @@ Makefile: Makefile.in
dialyzer: $(BEAMS)
@dialyzer -c .
+15 -4
View File
@@ -5,7 +5,7 @@
%%% Created : 18 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -48,12 +48,12 @@ start() ->
ok.
to_record(Host, ACLName, ACLSpec) ->
#acl{aclname = {ACLName, Host}, aclspec = ACLSpec}.
#acl{aclname = {ACLName, Host}, aclspec = normalize_spec(ACLSpec)}.
add(Host, ACLName, ACLSpec) ->
F = fun() ->
mnesia:write(#acl{aclname = {ACLName, Host},
aclspec = ACLSpec})
aclspec = normalize_spec(ACLSpec)})
end,
mnesia:transaction(F).
@@ -75,7 +75,7 @@ add_list(Host, ACLs, Clear) ->
aclspec = ACLSpec} ->
mnesia:write(
#acl{aclname = {ACLName, Host},
aclspec = ACLSpec})
aclspec = normalize_spec(ACLSpec)})
end
end, ACLs)
end,
@@ -86,6 +86,17 @@ add_list(Host, ACLs, Clear) ->
false
end.
normalize(A) ->
jlib:nodeprep(A).
normalize_spec({A, B}) ->
{A, normalize(B)};
normalize_spec({A, B, C}) ->
{A, normalize(B), normalize(C)};
normalize_spec(all) ->
all;
normalize_spec(none) ->
none.
match_rule(global, Rule, JID) ->
+26 -16
View File
@@ -8,7 +8,7 @@ AC_DEFUN(AM_WITH_EXPAT,
EXPAT_CFLAGS="-I$with_expat/include"
EXPAT_LIBS="-L$with_expat/lib"
fi
AC_CHECK_LIB(expat, XML_ParserCreate,
[ EXPAT_LIBS="$EXPAT_LIBS -lexpat"
expat_found=yes ],
@@ -42,7 +42,7 @@ AC_DEFUN(AM_WITH_ZLIB,
ZLIB_CFLAGS="-I$with_zlib/include"
ZLIB_LIBS="-L$with_zlib/lib"
fi
AC_CHECK_LIB(z, gzgets,
[ ZLIB_LIBS="$ZLIB_LIBS -lz"
zlib_found=yes ],
@@ -76,7 +76,7 @@ AC_DEFUN(AM_WITH_PAM,
PAM_CFLAGS="-I$with_pam/include"
PAM_LIBS="-L$with_pam/lib"
fi
AC_CHECK_LIB(pam, pam_start,
[ PAM_LIBS="$PAM_LIBS -lpam"
pam_found=yes ],
@@ -106,26 +106,33 @@ AC_DEFUN(AM_WITH_ERLANG,
AC_PATH_TOOL(ERLC, erlc, , $with_erlang:$with_erlang/bin:$PATH)
AC_PATH_TOOL(ERL, erl, , $with_erlang:$with_erlang/bin:$PATH)
if test "z$ERLC" = "z" || test "z$ERL" = "z"; then
AC_MSG_ERROR([erlang not found])
fi
cat >>conftest.erl <<_EOF
-module(conftest).
-author('alexey@sevcom.net').
-export([[start/0]]).
-include_lib("ssl/include/ssl_pkix.hrl").
start() ->
EIDirS = code:lib_dir("erl_interface") ++ "\n",
EILibS = libpath("erl_interface") ++ "\n",
RootDirS = code:root_dir() ++ "\n",
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ RootDirS)),
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ RootDirS)),
halt().
-[ifdef]('id-pkix').
ssldef() -> "-DSSL39\n".
-else.
ssldef() -> "\n".
-endif.
%% return physical architecture based on OS/Processor
archname() ->
ArchStr = erlang:system_info(system_architecture),
@@ -154,33 +161,36 @@ libpath(App) ->
%% ({error, enoent}):
_Error -> code:lib_dir("erl_interface") ++ "/lib"
end.
_EOF
if ! $ERLC conftest.erl; then
AC_MSG_ERROR([could not compile sample program])
fi
if ! $ERL -s conftest -noshell; then
AC_MSG_ERROR([could not run sample program])
fi
if ! test -f conftest.out; then
AC_MSG_ERROR([erlang program was not properly executed, (conftest.out was not produced)])
fi
# First line
ERLANG_EI_DIR=`cat conftest.out | head -n 1`
# Second line
ERLANG_EI_LIB=`cat conftest.out | head -n 2 | tail -n 1`
# Third line
ERLANG_SSL39=`cat conftest.out | head -n 3 | tail -n 1`
# End line
ERLANG_DIR=`cat conftest.out | tail -n 1`
ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include"
ERLANG_LIBS="-L$ERLANG_EI_LIB -lerl_interface -lei"
AC_SUBST(ERLANG_CFLAGS)
AC_SUBST(ERLANG_LIBS)
AC_SUBST(ERLANG_SSL39)
AC_SUBST(ERLC)
AC_SUBST(ERL)
])
@@ -262,7 +272,7 @@ AC_DEFUN([AM_ICONV],
CFLAGS="$am_save_CFLAGS")
LIBS="$am_save_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 31 Oct 2005 by Magnus Henoch <henoch@dtek.chalmers.se>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+23 -2
View File
@@ -663,6 +663,7 @@ ERLC
ERL
ERLANG_CFLAGS
ERLANG_LIBS
ERLANG_SSL39
LIBICONV
CPP
GREP
@@ -2924,14 +2925,21 @@ echo "$as_me: error: erlang not found" >&2;}
-author('alexey@sevcom.net').
-export([start/0]).
-include_lib("ssl/include/ssl_pkix.hrl").
start() ->
EIDirS = code:lib_dir("erl_interface") ++ "\n",
EILibS = libpath("erl_interface") ++ "\n",
RootDirS = code:root_dir() ++ "\n",
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ RootDirS)),
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ RootDirS)),
halt().
-ifdef('id-pkix').
ssldef() -> "-DSSL39\n".
-else.
ssldef() -> "\n".
-endif.
%% return physical architecture based on OS/Processor
archname() ->
ArchStr = erlang:system_info(system_architecture),
@@ -2986,6 +2994,8 @@ echo "$as_me: error: erlang program was not properly executed, (conftest.out was
# Second line
ERLANG_EI_LIB=`cat conftest.out | head -n 2 | tail -n 1`
# Third line
ERLANG_SSL39=`cat conftest.out | head -n 3 | tail -n 1`
# End line
ERLANG_DIR=`cat conftest.out | tail -n 1`
ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include"
@@ -2996,6 +3006,7 @@ echo "$as_me: error: erlang program was not properly executed, (conftest.out was
#locating iconv
@@ -6530,6 +6541,7 @@ ERLC!$ERLC$ac_delim
ERL!$ERL$ac_delim
ERLANG_CFLAGS!$ERLANG_CFLAGS$ac_delim
ERLANG_LIBS!$ERLANG_LIBS$ac_delim
ERLANG_SSL39!$ERLANG_SSL39$ac_delim
LIBICONV!$LIBICONV$ac_delim
CPP!$CPP$ac_delim
GREP!$GREP$ac_delim
@@ -6571,7 +6583,7 @@ SSL_CFLAGS!$SSL_CFLAGS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -6898,3 +6910,12 @@ if test "$no_create" != yes; then
$ac_cs_success || { (exit 1); exit 1; }
fi
if test -n "$ERLANG_SSL39" ; then
echo
echo "**************** WARNING ! ********************"
echo "ejabberd will be compiled with Erlang R12."
echo "This version of Erlang is not supported"
echo "and not recommended for production servers"
echo "***********************************************"
fi
+9
View File
@@ -120,3 +120,12 @@ fi
AC_CHECK_HEADER(krb5.h,,)
AC_OUTPUT
if test -n "$ERLANG_SSL39" ; then
echo
echo "**************** WARNING ! ********************"
echo "ejabberd will be compiled with Erlang R12."
echo "This version of Erlang is not supported"
echo "and not recommended for production servers"
echo "***********************************************"
fi
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 27 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 8 Mar 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -6,7 +6,7 @@
%%% Created : 23 Aug 2005 by Magnus Henoch <henoch@dtek.chalmers.se>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 8 Mar 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+11
View File
@@ -286,6 +286,17 @@
%%
%%{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.
%%
%% Number of connections to open to the database for each virtual host
%%
%%{odbc_pool_size, 10}.
%%
%% Interval to make a dummy SQL request to keep alive the connections
%% to the database. Specify in seconds: for example 28800 means 8 hours
%%
%%{odbc_keepalive_interval, undefined}.
%%% ===============
%%% TRAFFIC SHAPERS
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 16 Nov 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+2 -2
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -22,7 +22,7 @@
%-define(ejabberd_debug, true).
%-define(DBGFSM, true).
-define(VERSION, "2.0.0-beta1").
-define(VERSION, "2.0.0").
%% ---------------------------------
%% Logging mechanism
+1 -1
View File
@@ -9,7 +9,7 @@
%%% Created : 7 May 2006 by Mickael Remond <mremond@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 31 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+12 -3
View File
@@ -5,7 +5,7 @@
%%% Created : 23 Nov 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -116,7 +116,7 @@ dirty_get_registered_users() ->
lists:flatmap(
fun(M) ->
M:dirty_get_registered_users()
end, auth_modules(?MYNAME)).
end, auth_modules()).
%% Registered users list do not include anonymous users logged
get_vh_registered_users(Server) ->
@@ -201,7 +201,6 @@ remove_user(User, Server, Password) ->
M:remove_user(User, Server, Password)
end, auth_modules(Server)).
ctl_process_get_registered(_Val, Host, ["registered-users"]) ->
Users = ejabberd_auth:get_vh_registered_users(Host),
NewLine = io_lib:format("~n", []),
@@ -215,6 +214,16 @@ ctl_process_get_registered(Val, _Host, _Args) ->
%%%----------------------------------------------------------------------
%%% Internal functions
%%%----------------------------------------------------------------------
%% Return the lists of all the auth modules actually used in the
%% configuration
auth_modules() ->
lists:usort(
lists:flatmap(
fun(Server) ->
auth_modules(Server)
end, ?MYHOSTS)).
%% Return the list of authenticated modules for a given host
auth_modules(Server) ->
LServer = jlib:nameprep(Server),
Method = ejabberd_config:get_local_option({auth_method, LServer}),
+5 -5
View File
@@ -5,7 +5,7 @@
%%% Created : 17 Feb 2006 by Mickael Remond <mremond@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -33,8 +33,8 @@
is_login_anonymous_enabled/1,
anonymous_user_exist/2,
allow_multiple_connections/1,
register_connection/2,
unregister_connection/2
register_connection/3,
unregister_connection/3
]).
@@ -141,14 +141,14 @@ remove_connection(SID, LUser, LServer) ->
mnesia:transaction(F).
%% Register connection
register_connection(SID, #jid{luser = LUser, lserver = LServer}) ->
register_connection(SID, #jid{luser = LUser, lserver = LServer}, _) ->
US = {LUser, LServer},
mnesia:sync_dirty(
fun() -> mnesia:write(#anonymous{us = US, sid=SID})
end).
%% Remove an anonymous user from the anonymous users table
unregister_connection(SID, #jid{luser = LUser, lserver = LServer}) ->
unregister_connection(SID, #jid{luser = LUser, lserver = LServer}, _) ->
purge_hook(anonymous_user_exist(LUser, LServer),
LUser, LServer),
remove_connection(SID, LUser, LServer).
+3 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -66,6 +66,8 @@ set_password(User, Server, Password) ->
try_register(_User, _Server, _Password) ->
{error, not_allowed}.
%% TODO
%% Return the list of all users handled by external
dirty_get_registered_users() ->
[].
+2 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -135,6 +135,7 @@ try_register(User, Server, Password) ->
mnesia:transaction(F)
end.
%% Get all registered users in Mnesia
dirty_get_registered_users() ->
mnesia:dirty_all_keys(passwd).
+6 -2
View File
@@ -5,7 +5,7 @@
%%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -159,7 +159,11 @@ try_register(_User, _Server, _Password) ->
{error, not_allowed}.
dirty_get_registered_users() ->
get_vh_registered_users(?MYNAME).
Servers = ejabberd_config:get_vh_by_auth_method(ldap),
lists:flatmap(
fun(Server) ->
get_vh_registered_users(Server)
end, Servers).
get_vh_registered_users(Server) ->
case catch get_vh_registered_users_ldap(Server) of
+6 -2
View File
@@ -5,7 +5,7 @@
%%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -130,7 +130,11 @@ try_register(User, Server, Password) ->
end.
dirty_get_registered_users() ->
get_vh_registered_users(?MYNAME).
Servers = ejabberd_config:get_vh_by_auth_method(odbc),
lists:flatmap(
fun(Server) ->
get_vh_registered_users(Server)
end, Servers).
get_vh_registered_users(Server) ->
LServer = jlib:nameprep(Server),
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 5 Jul 2007 by Evgeniy Khramtsov <xram@jabber.ru>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+25 -8
View File
@@ -5,7 +5,7 @@
%%% Created : 16 Nov 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -85,6 +85,7 @@
pres_timestamp,
pres_invis = false,
privacy_list = none,
conn = unknown,
ip,
lang}).
@@ -437,9 +438,10 @@ wait_for_auth({xmlstreamelement, El}, StateData) ->
[StateData#state.socket,
jlib:jid_to_string(JID)]),
SID = {now(), self()},
IP = StateData#state.ip,
Conn = get_conn_type(StateData),
Info = [{ip, StateData#state.ip}, {conn, Conn}],
ejabberd_sm:open_session(
SID, U, StateData#state.server, R, IP),
SID, U, StateData#state.server, R, Info),
Res1 = jlib:make_result_iq_reply(El),
Res = setelement(4, Res1, []),
send_element(StateData, Res),
@@ -464,6 +466,7 @@ wait_for_auth({xmlstreamelement, El}, StateData) ->
resource = R,
jid = JID,
sid = SID,
conn = Conn,
pres_f = ?SETS:from_list(Fs1),
pres_t = ?SETS:from_list(Ts1),
privacy_list = PrivList});
@@ -785,9 +788,10 @@ wait_for_session({xmlstreamelement, El}, StateData) ->
[StateData#state.socket,
jlib:jid_to_string(JID)]),
SID = {now(), self()},
IP = StateData#state.ip,
Conn = get_conn_type(StateData),
Info = [{ip, StateData#state.ip}, {conn, Conn}],
ejabberd_sm:open_session(
SID, U, StateData#state.server, R, IP),
SID, U, StateData#state.server, R, Info),
Res = jlib:make_result_iq_reply(El),
send_element(StateData, Res),
change_shaper(StateData, JID),
@@ -807,6 +811,7 @@ wait_for_session({xmlstreamelement, El}, StateData) ->
fsm_next_state(session_established,
StateData#state{
sid = SID,
conn = Conn,
pres_f = ?SETS:from_list(Fs1),
pres_t = ?SETS:from_list(Ts1),
privacy_list = PrivList});
@@ -1368,6 +1373,15 @@ get_auth_tags([_ | L], U, P, D, R) ->
get_auth_tags([], U, P, D, R) ->
{U, P, D, R}.
get_conn_type(StateData) ->
case (StateData#state.sockmod):get_sockmod(StateData#state.socket) of
gen_tcp -> c2s;
tls -> c2s_tls;
ejabberd_zlib -> c2s_compressed;
ejabberd_http_poll -> http_poll;
ejabberd_http_bind -> http_bind;
_ -> unknown
end.
process_presence_probe(From, To, StateData) ->
LFrom = jlib:jid_tolower(From),
@@ -1403,7 +1417,8 @@ process_presence_probe(From, To, StateData) ->
deny ->
ok;
allow ->
ejabberd_hooks:run(presence_probe_hook, StateData#state.server, [From, To, Packet]),
Pid=element(2, StateData#state.sid),
ejabberd_hooks:run(presence_probe_hook, StateData#state.server, [From, To, Pid]),
ejabberd_router:route(To, From, Packet)
end;
Cond2 ->
@@ -1426,12 +1441,13 @@ presence_update(From, Packet, StateData) ->
StatusTag ->
xml:get_tag_cdata(StatusTag)
end,
Info = [{ip, StateData#state.ip},{conn, StateData#state.conn}],
ejabberd_sm:unset_presence(StateData#state.sid,
StateData#state.user,
StateData#state.server,
StateData#state.resource,
Status,
StateData#state.ip),
Info),
presence_broadcast(StateData, From, StateData#state.pres_a, Packet),
presence_broadcast(StateData, From, StateData#state.pres_i, Packet),
StateData#state{pres_last = undefined,
@@ -1757,13 +1773,14 @@ roster_change(IJID, ISubscription, StateData) ->
update_priority(Priority, Packet, StateData) ->
Info = [{ip, StateData#state.ip},{conn, StateData#state.conn}],
ejabberd_sm:set_presence(StateData#state.sid,
StateData#state.user,
StateData#state.server,
StateData#state.resource,
Priority,
Packet,
StateData#state.ip).
Info).
get_priority_from_presence(PresencePacket) ->
case xml:get_subtag(PresencePacket, "priority") of
+1 -1
View File
@@ -6,7 +6,7 @@
%%% Created : 2 Nov 2007 by Mickael Remond <mremond@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+7 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 14 Dec 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -30,6 +30,7 @@
-export([start/0, load_file/1,
add_global_option/2, add_local_option/2,
get_global_option/1, get_local_option/1]).
-export([get_vh_by_auth_method/1]).
-include("ejabberd.hrl").
-include("ejabberd_config.hrl").
@@ -303,6 +304,11 @@ get_local_option(Opt) ->
undefined
end.
%% Return the list of hosts handled by a given module
get_vh_by_auth_method(AuthMethod) ->
mnesia:dirty_select(local_config,
[{#local_config{key = {auth_method, '$1'},
value=AuthMethod},[],['$1']}]).
check_odbc_modules(ODBC_server) ->
case catch check_odbc_modules2(ODBC_server) of
+1 -1
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 11 Jan 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 23 Aug 2006 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 8 Aug 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 16 Nov 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 30 Nov 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 23 Oct 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -9,7 +9,7 @@
%%% Created : 29 Nov 2006 by Mickael Remond <mremond@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 1 Nov 2006 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 31 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 10 Nov 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 27 Nov 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 7 Dec 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+5 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 6 Dec 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -48,8 +48,12 @@
-include("ejabberd.hrl").
-include("jlib.hrl").
-ifdef(SSL39).
-include_lib("ssl/include/ssl_pkix.hrl").
-else.
-include_lib("ssl/include/PKIX1Explicit88.hrl").
-include_lib("ssl/include/PKIX1Implicit88.hrl").
-endif.
-include("XmppAddr.hrl").
-define(DICT, dict).
+11 -6
View File
@@ -5,7 +5,7 @@
%%% Created : 6 Dec 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -923,14 +923,13 @@ get_addr_port(Server) ->
case Res of
{error, Reason} ->
?DEBUG("srv lookup of '~s' failed: ~p~n", [Server, Reason]),
[{Server, ejabberd_config:get_local_option(outgoing_s2s_port)}];
[{Server, outgoing_s2s_port()}];
{ok, HEnt} ->
?DEBUG("srv lookup of '~s': ~p~n",
[Server, HEnt#hostent.h_addr_list]),
case HEnt#hostent.h_addr_list of
[] ->
[{Server,
ejabberd_config:get_local_option(outgoing_s2s_port)}];
[{Server, outgoing_s2s_port()}];
AddrList ->
%% Probabilities are not exactly proportional to weights
%% for simplicity (higher weigths are overvalued)
@@ -945,8 +944,7 @@ get_addr_port(Server) ->
{Priority * 65536 - N, Host, Port}
end, AddrList)) of
{'EXIT', _Reasn} ->
[{Server,
ejabberd_config:get_local_option(outgoing_s2s_port)}];
[{Server, outgoing_s2s_port()}];
SortedList ->
List = lists:map(
fun({_, Host, Port}) ->
@@ -970,6 +968,13 @@ test_get_addr_port(Server) ->
end
end, [], lists:seq(1, 100000)).
outgoing_s2s_port() ->
case ejabberd_config:get_local_option(outgoing_s2s_port) of
Port when is_integer(Port) ->
Port;
undefined ->
5269
end.
%% Human readable S2S logging: Log only new outgoing connections as INFO
%% Do not log dialback
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 6 Dec 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+30 -12
View File
@@ -5,7 +5,7 @@
%%% Created : 24 Nov 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -48,6 +48,7 @@
unregister_iq_handler/2,
ctl_process/2,
get_session_pid/3,
get_user_info/3,
get_user_ip/3
]).
@@ -84,21 +85,25 @@ route(From, To, Packet) ->
ok
end.
open_session(SID, User, Server, Resource, IP) ->
set_session(SID, User, Server, Resource, undefined, IP),
open_session(SID, User, Server, Resource, Info) ->
set_session(SID, User, Server, Resource, undefined, Info),
check_for_sessions_to_replace(User, Server, Resource),
JID = jlib:make_jid(User, Server, Resource),
ejabberd_hooks:run(sm_register_connection_hook, JID#jid.lserver,
[SID, JID]).
[SID, JID, Info]).
close_session(SID, User, Server, Resource) ->
Info = case mnesia:dirty_read({session, SID}) of
[] -> [];
[#session{info=I}] -> I
end,
F = fun() ->
mnesia:delete({session, SID})
end,
mnesia:sync_dirty(F),
JID = jlib:make_jid(User, Server, Resource),
ejabberd_hooks:run(sm_remove_connection_hook, JID#jid.lserver,
[SID, JID]).
[SID, JID, Info]).
check_in_subscription(Acc, User, Server, _JID, _Type, _Reason) ->
case ejabberd_auth:is_user_exists(User, Server) of
@@ -143,14 +148,29 @@ get_user_ip(User, Server, Resource) ->
proplists:get_value(ip, Session#session.info)
end.
get_user_info(User, Server, Resource) ->
LUser = jlib:nodeprep(User),
LServer = jlib:nameprep(Server),
LResource = jlib:resourceprep(Resource),
USR = {LUser, LServer, LResource},
case mnesia:dirty_index_read(session, USR, #session.usr) of
[] ->
offline;
Ss ->
Session = lists:max(Ss),
Node = node(element(2, Session#session.sid)),
Conn = proplists:get_value(conn, Session#session.info),
IP = proplists:get_value(ip, Session#session.info),
[{node, Node}, {conn, Conn}, {ip, IP}]
end.
set_presence(SID, User, Server, Resource, Priority, Presence, IP) ->
set_session(SID, User, Server, Resource, Priority, IP),
set_presence(SID, User, Server, Resource, Priority, Presence, Info) ->
set_session(SID, User, Server, Resource, Priority, Info),
ejabberd_hooks:run(set_presence_hook, jlib:nameprep(Server),
[User, Server, Resource, Presence]).
unset_presence(SID, User, Server, Resource, Status, IP) ->
set_session(SID, User, Server, Resource, undefined, IP),
unset_presence(SID, User, Server, Resource, Status, Info) ->
set_session(SID, User, Server, Resource, undefined, Info),
ejabberd_hooks:run(unset_presence_hook, jlib:nameprep(Server),
[User, Server, Resource, Status]).
@@ -318,13 +338,12 @@ code_change(_OldVsn, State, _Extra) ->
%%% Internal functions
%%--------------------------------------------------------------------
set_session(SID, User, Server, Resource, Priority, IP) ->
set_session(SID, User, Server, Resource, Priority, Info) ->
LUser = jlib:nodeprep(User),
LServer = jlib:nameprep(Server),
LResource = jlib:resourceprep(Resource),
US = {LUser, LServer},
USR = {LUser, LServer, LResource},
Info = [{ip, IP}],
F = fun() ->
mnesia:write(#session{sid = SID,
usr = USR,
@@ -349,7 +368,6 @@ clean_table_from_bad_node(Node) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
do_route(From, To, Packet) ->
?DEBUG("session manager~n\tfrom ~p~n\tto ~p~n\tpacket ~P~n",
[From, To, Packet, 8]),
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 23 Aug 2006 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 31 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 21 Mar 2007 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 18 Jul 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 27 Jan 2006 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 19 Jan 2006 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* ejabberd, Copyright (C) 2002-2007 Process-one
* ejabberd, Copyright (C) 2002-2008 Process-one
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
+14 -26
View File
@@ -3,16 +3,16 @@
# to the erlang runtime system when starting ejabberd
#
# POLL: Kernel polling (+K [true|false])
# POLL: Kernel polling ([true|false])
#
# The kernel polling option requires support in the kernel.
# Additionaly, you need to enable this feature while compiling Erlang.
#
# Default: +K false
# Default: true
#
#POLL="+K true"
#POLL=true
# SMP: SMP support (-smp [enable|auto|disable])
# SMP: SMP support ([enable|auto|disable])
#
# Explanation in Erlang/OTP documentation:
# enable: starts the Erlang runtime system with SMP support enabled.
@@ -21,9 +21,9 @@
# is available and more than one logical processor are detected.
# disable: starts a runtime system without SMP support.
#
# Default: -smp disable
# Default: auto
#
#SMP="-smp auto"
#SMP=auto
# ERL_MAX_PORTS: Maximum number of simultaneously open Erlang ports
#
@@ -31,10 +31,10 @@
# from a client or from another Jabber server. So take this into
# account when setting this limit.
#
# Default: 1024
# Default: 32000
# Maximum: 268435456
#
export ERL_MAX_PORTS=32000
#ERL_MAX_PORTS=32000
# PROCESSES: Maximum number of Erlang processes
#
@@ -44,10 +44,10 @@ export ERL_MAX_PORTS=32000
# Erlang, and therefore not related to the operating system processes, you do
# not have to worry about allowing a huge number of them.
#
# Default: 32768
# Default: 250000
# Maximum: 268435456
#
#PROCESSES="+P 32768"
#PROCESSES=250000
# ERL_MAX_ETS_TABLES: Maximum number of ETS and Mnesia tables
#
@@ -59,21 +59,7 @@ export ERL_MAX_PORTS=32000
#
# Default: 1400
#
#ERL_MAX_ETS_TABLES="-env ERL_MAX_ETS_TABLES 1400"
# ERL_FULLSWEEP_AFTER: Maximum number of collections before a forced fullsweep
#
# To reduce memory usage, you can set environment variable ERL_FULLSWEEP_AFTER.
# But in this case ejabberd may work slower.
#
# The ERL_FULLSWEEP_AFTER option shrinks the size of the Erlang process after
# RAM intensive events. Note that this option may downgrade performance. Hence
# this option is only interesting on machines that also host other services
# (webserver, mail) on which ejabberd does not receive constant load.
#
# Default: 65535
#
#export ERL_FULLSWEEP_AFTER=0
#ERL_MAX_ETS_TABLES=1400
# The next variable allows to explicitly specify erlang node for ejabberd
# It can be given in different formats:
@@ -86,4 +72,6 @@ export ERL_MAX_PORTS=32000
# The same as previous, but erlang will use long hostname
# (see erl (1) manual for details)
#
#export ERLANG_NODE=ejabberd
# Default: ejabberd
#
#ERLANG_NODE=ejabberd
+90 -55
View File
@@ -1,62 +1,88 @@
#!/bin/sh
# define default configuration
POLL=true
SMP=auto
ERL_MAX_PORTS=32000
ERL_PROCESSES=250000
ERL_MAX_ETS_TABLES=1400
# define default environment variables
NODE=ejabberd
HOST=localhost
ERLANG_NODE=$NODE@$HOST
# Define ejabberd environment
ROOTDIR=@rootdir@
EJABBERD_CONFIG_PATH=$ROOTDIR/etc/ejabberd/ejabberd.cfg
export EJABBERD_CONFIG_PATH
EJABBERDCTL_CFG=$ROOTDIR/etc/ejabberd/ejabberdctl.cfg
EJABBERD_INETRC=$ROOTDIR/etc/ejabberd/ejabberd.inetrc
EJABBERD_EBIN=$ROOTDIR/var/lib/ejabberd/ebin
LOGS_DIR=$ROOTDIR/var/log/ejabberd/
EJABBERD_DB=$ROOTDIR/var/lib/ejabberd/db/$NODE
# read custom configuration
CONFIG=$ROOTDIR/etc/ejabberd/ejabberdctl.cfg
[ -f "$CONFIG" ] && . "$CONFIG"
# parse command line parameters
ARGS=
while [ $# -ne 0 ] ; do
PARAM=$1
shift
case $PARAM in
--) break ;;
--node) ERLANG_NODE=$1; shift ;;
--config) EJABBERD_CONFIG_PATH=$1 ; shift ;;
--ctl-config) CONFIG=$1 ; shift ;;
--logs) LOGS_DIR=$1 ; shift ;;
--spool) EJABBERD_DB=$1 ; shift ;;
*) ARGS="$ARGS $PARAM" ;;
esac
done
NAME=-name
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && NAME=-sname
ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES"
# define additional environment variables
EJABBERD_EBIN=$ROOTDIR/var/lib/ejabberd/ebin
EJABBERD_MSGS_PATH=$ROOTDIR/var/lib/ejabberd/priv/msgs
EJABBERD_SO_PATH=$ROOTDIR/var/lib/ejabberd/priv/lib
EJABBERD_LOG_PATH=$ROOTDIR/var/log/ejabberd/ejabberd.log
export EJABBERD_LOG_PATH
SASL_LOG_PATH=$ROOTDIR/var/log/ejabberd/sasl.log
EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
SASL_LOG_PATH=$LOGS_DIR/sasl.log
DATETIME=`date "+%Y%m%d-%H%M%S"`
ERL_CRASH_DUMP=$ROOTDIR/var/log/ejabberd/erl_crash.dump.$DATETIME
export ERL_CRASH_DUMP
[ -d $EJABBERD_DB ] || mkdir -p $EJABBERD_DB
[ -f $EJABBERDCTL_CFG ] && . $EJABBERDCTL_CFG
ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
ERL_INETRC=$ROOTDIR/etc/ejabberd/inetrc
HOME=$ROOTDIR/var/lib/ejabberd
# export global variables
export EJABBERD_CONFIG_PATH
export EJABBERD_MSGS_PATH
export EJABBERD_LOG_PATH
export EJABBERD_SO_PATH
export ERL_CRASH_DUMP
export ERL_INETRC
export ERL_MAX_PORTS
export ERL_MAX_ETS_TABLES
export HOME
if [ $# -ne 0 ] ; then
case $1 in
--node) shift ; ERLANG_NODE=$1 ; shift ;;
esac
fi
if [ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] ; then
SNAME=-sname
else
SNAME=-name
fi
[ -d $EJABBERD_DB ] || mkdir -p $EJABBERD_DB
[ -d $LOGS_DIR ] || mkdir -p $LOGS_DIR
# Compatibility in ZSH
#setopt shwordsplit 2>/dev/null
ERLANG_OPTS="$POLL $SMP $PROCESSES $ERL_MAX_ETS_TABLES -kernel inetrc \""$EJABBERD_INETRC"\" "
# start server
start ()
{
erl \
$SNAME $ERLANG_NODE \
$ERLANG_OPTS \
$NAME $ERLANG_NODE \
-noinput -detached \
-pa $EJABBERD_EBIN \
-mnesia dir "\"$EJABBERD_DB\"" \
-s ejabberd \
-sasl sasl_error_logger \{file,\"$SASL_LOG_PATH\"\}
-sasl sasl_error_logger \{file,\"$SASL_LOG_PATH\"\} \
$ERLANG_OPTS $ARGS "$@"
}
# attach to server
debug ()
{
echo "--------------------------------------------------------------------"
@@ -76,10 +102,12 @@ debug ()
read foo
echo ""
erl \
$SNAME debug \
-remsh $ERLANG_NODE
$NAME ${NODE}debug \
-remsh $ERLANG_NODE \
$ERLANG_OPTS $ARGS "$@"
}
# start interactive server
live ()
{
echo "--------------------------------------------------------------------"
@@ -98,45 +126,52 @@ live ()
read foo
echo ""
erl \
$SNAME $ERLANG_NODE \
$NAME $ERLANG_NODE \
$ERLANG_OPTS \
-pa $EJABBERD_EBIN \
-mnesia dir "\"$EJABBERD_DB\"" \
-s ejabberd
-s ejabberd \
$ERLANG_OPTS $ARGS "$@"
}
# common control function
ctl ()
{
erl \
$SNAME ejabberdctl \
$NAME ejabberdctl \
-noinput \
-pa $EJABBERD_EBIN \
-s ejabberd_ctl -extra $ERLANG_NODE $@
case $? in
2) help_start;;
3) help_start;;
result=$?
case $result in
0) :;;
*)
echo ""
echo "Commands to start an ejabberd node:"
echo " start Start an ejabberd node in server mode"
echo " debug Attach an interactive Erlang shell to a running ejabberd node"
echo " live Start an ejabberd node in live (interactive) mode"
echo ""
echo "Optional parameters when starting an ejabberd node:"
echo " --config file Config file of ejabberd: $EJABBERD_CONFIG_PATH"
echo " --ctl-config file Config file of ejabberdctl: $CONFIG"
echo " --logs dir Directory for logs: $LOGS_DIR"
echo " --spool dir Database spool dir: $EJABBERD_DB"
echo "";;
esac
return $result
}
# display ctl usage
usage ()
{
ctl
exit
}
help_start ()
{
echo ""
echo "Commands to start an ejabberd node:"
echo " start Start an ejabberd node in server mode"
echo " debug Attach an interactive Erlang shell to a running ejabberd node"
echo " live Start an ejabberd node in live (interactive) mode"
echo ""
}
case $1 in
start) start;;
debug) debug;;
live) live;;
*) ctl $@;;
case $ARGS in
' start') start;;
' debug') debug;;
' live') live;;
*) ctl $ARGS;;
esac
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 22 Aug 2005 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -6,7 +6,7 @@
%%% Author: Evgeniy Khramtsov <xramtsov@gmail.com>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 12 Nov 2006 by Evgeniy Khramtsov <xram@jabber.ru>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 12 Oct 2006 by Mickael Remond <mremond@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 30 Jul 2004 by Leif Johansson <leifj@it.su.se>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 22 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 24 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 10 Apr 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
View File
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 2 Feb 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 23 Nov 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 15 Nov 2005 by Magnus Henoch <henoch@dtek.chalmers.se>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 11 Aug 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+19 -10
View File
@@ -5,7 +5,7 @@
%%% Created : 7 Oct 2006 by Magnus Henoch <henoch@dtek.chalmers.se>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -64,20 +64,29 @@
%% <presence/> stanza) and returns an opaque value representing the
%% Entity Capabilities contained therein, or the atom nothing if no
%% capabilities are advertised.
read_caps([{xmlelement, "c", Attrs, _Els} | Tail]) ->
read_caps(Els) ->
read_caps(Els, nothing).
read_caps([{xmlelement, "c", Attrs, _Els} | Tail], Result) ->
case xml:get_attr_s("xmlns", Attrs) of
?NS_CAPS ->
Node = xml:get_attr_s("node", Attrs),
Version = xml:get_attr_s("ver", Attrs),
Exts = string:tokens(xml:get_attr_s("ext", Attrs), " "),
#caps{node = Node, version = Version, exts = Exts};
read_caps(Tail, #caps{node = Node, version = Version, exts = Exts});
_ ->
read_caps(Tail)
read_caps(Tail, Result)
end;
read_caps([_ | Tail]) ->
read_caps(Tail);
read_caps([]) ->
nothing.
read_caps([{xmlelement, "x", Attrs, _Els} | Tail], Result) ->
case xml:get_attr_s("xmlns", Attrs) of
?NS_MUC_USER ->
nothing;
_ ->
read_caps(Tail, Result)
end;
read_caps([_ | Tail], Result) ->
read_caps(Tail, Result);
read_caps([], Result) ->
Result.
%% note_caps should be called to make the module request disco
%% information. Host is the host that asks, From is the full JID that
@@ -243,9 +252,9 @@ handle_cast({disco_response, From, _To,
end;
{error, _} ->
gen_server:cast(self(), visit_feature_queries),
?ERROR_MSG("Error IQ reponse IQ from ~s: ~p", [jlib:jid_to_string(From), SubEls]);
?ERROR_MSG("Error IQ reponse IQ from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
{result, _} ->
?ERROR_MSG("Invalid IQ contents from ~s: ~p", [jlib:jid_to_string(From), SubEls]);
?ERROR_MSG("Invalid IQ contents from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
_ ->
%% Can't do anything about errors
ok
+2 -4
View File
@@ -5,7 +5,7 @@
%%% Created : 19 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -1709,9 +1709,7 @@ stop_node(From, Host, ENode, Action, XData) ->
[] -> ok;
SubEls ->
Request = #adhoc_request{
lang = "es",
node = ?NS_ADMINX("announce-online-allhosts"),
sessionid = "2007-08-17T15:28:40.517806Z",
node = ?NS_ADMINX("announce-allhosts"),
action = "complete",
xdata = {xmlelement, "x",
[{"xmlns","jabber:x:data"},{"type","submit"}],
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 26 Oct 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 1 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+6 -3
View File
@@ -5,7 +5,7 @@
%%% Created : 15 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -121,7 +121,7 @@ handle_info({route, From, To, Packet}, State) ->
"" -> jlib:make_error_reply(Packet, ?ERR_BAD_REQUEST);
_ -> Packet
end,
do_client_version(To, From),
%%do_client_version(To, From),
ejabberd_router:route(To, From, Packet2),
{noreply, State};
handle_info(_Info, State) ->
@@ -146,9 +146,12 @@ code_change(_OldVsn, State, _Extra) ->
{ok, State}.
%%--------------------------------------------------------------------
%%% Internal functions
%% Example of routing XMPP packets using Erlang's message passing
%%--------------------------------------------------------------------
%% To enable this educational example, uncomment the call to the
%% function do_client_version in handle_info.
%% ejabberd provides a method to receive XMPP packets using Erlang's
%% message passing mechanism.
%%
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 16 Feb 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* ejabberd, Copyright (C) 2002-2007 Process-one
* ejabberd, Copyright (C) 2002-2008 Process-one
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
+2 -2
View File
@@ -5,7 +5,7 @@
%%% Created : 15 Feb 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -323,7 +323,7 @@ iq_get_vcard(Lang) ->
[{xmlcdata, ?EJABBERD_URI}]},
{xmlelement, "DESC", [],
[{xmlcdata, translate:translate(Lang, "ejabberd IRC module") ++
"\nCopyright (c) 2003-2007 Alexey Shchepin"}]}].
"\nCopyright (c) 2003-2008 Alexey Shchepin"}]}].
process_register(Host, From, To, DefEnc, #iq{} = IQ) ->
case catch process_irc_register(Host, From, To, DefEnc, IQ) of
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 15 Feb 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 24 Oct 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 24 Oct 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+2 -2
View File
@@ -5,7 +5,7 @@
%%% Created : 19 Mar 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -649,7 +649,7 @@ iq_get_vcard(Lang) ->
[{xmlcdata, ?EJABBERD_URI}]},
{xmlelement, "DESC", [],
[{xmlcdata, translate:translate(Lang, "ejabberd MUC module") ++
"\nCopyright (c) 2003-2007 Alexey Shchepin"}]}].
"\nCopyright (c) 2003-2008 Alexey Shchepin"}]}].
broadcast_service_message(Host, Msg) ->
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 12 Mar 2006 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+136 -65
View File
@@ -5,7 +5,7 @@
%%% Created : 19 Mar 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -65,7 +65,7 @@
public = true,
public_list = true,
persistent = false,
moderated = true, % TODO
moderated = true,
members_by_default = true,
members_only = false,
allow_user_invites = false,
@@ -294,15 +294,11 @@ normal_state({route, From, "",
"error" ->
case is_user_online(From, StateData) of
true ->
NewState =
add_user_presence_un(
From,
{xmlelement, "presence",
[{"type", "unavailable"}], []},
StateData),
send_new_presence(From, NewState),
{next_state, normal_state,
remove_online_user(From, NewState)};
ErrorText = "This participant is kicked from the room because "
"he sent an error message",
NewState = expulse_participant(Packet, From, StateData,
translate:translate(Lang, ErrorText)),
{next_state, normal_state, NewState};
_ ->
{next_state, normal_state, StateData}
end;
@@ -365,10 +361,10 @@ normal_state({route, From, "",
"error" ->
ok;
_ ->
ErrText = "Only occupants are allowed to send messages to the conference",
Err = jlib:make_error_reply(
Packet, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)),
ejabberd_router:route(StateData#state.jid, From, Err)
ErrText = "Only occupants are allowed to send messages to the conference",
Err = jlib:make_error_reply(
Packet, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)),
ejabberd_router:route(StateData#state.jid, From, Err)
end,
{next_state, normal_state, StateData}
end;
@@ -465,41 +461,35 @@ normal_state({route, From, Nick,
end;
normal_state({route, From, ToNick,
{xmlelement, "message", Attrs, _Els} = Packet},
{xmlelement, "message", Attrs, _} = Packet},
StateData) ->
Type = xml:get_attr_s("type", Attrs),
Lang = xml:get_attr_s("xml:lang", Attrs),
case Type of
"error" ->
case is_user_online(From, StateData) of
true ->
NewState =
add_user_presence_un(
From,
{xmlelement, "presence",
[{"type", "unavailable"}], []},
StateData),
send_new_presence(From, NewState),
{next_state, normal_state,
remove_online_user(From, NewState)};
_ ->
{next_state, normal_state, StateData}
end;
_ ->
case decide_fate_message(Type, Packet, From, StateData) of
{expulse_sender, Reason} ->
?DEBUG(Reason, []),
ErrorText = "This participant is kicked from the room because "
"he sent an error message to another participant",
NewState = expulse_participant(Packet, From, StateData,
translate:translate(Lang, ErrorText)),
{next_state, normal_state, NewState};
forget_message ->
{next_state, normal_state, StateData};
continue_delivery ->
case (StateData#state.config)#config.allow_private_messages
andalso is_user_online(From, StateData) of
true ->
case Type of
"groupchat" ->
ErrText = "It is not allowed to send private "
"messages of type \"groupchat\"",
"messages of type \"groupchat\"",
Err = jlib:make_error_reply(
Packet, ?ERRT_BAD_REQUEST(Lang, ErrText)),
ejabberd_router:route(
jlib:jid_replace_resource(
StateData#state.jid,
ToNick),
From, Err);
jlib:jid_replace_resource(
StateData#state.jid,
ToNick),
From, Err);
_ ->
case find_jid_by_nick(ToNick, StateData) of
false ->
@@ -507,19 +497,19 @@ normal_state({route, From, ToNick,
Err = jlib:make_error_reply(
Packet, ?ERRT_ITEM_NOT_FOUND(Lang, ErrText)),
ejabberd_router:route(
jlib:jid_replace_resource(
StateData#state.jid,
ToNick),
From, Err);
jlib:jid_replace_resource(
StateData#state.jid,
ToNick),
From, Err);
ToJID ->
{ok, #user{nick = FromNick}} =
?DICT:find(jlib:jid_tolower(From),
StateData#state.users),
StateData#state.users),
ejabberd_router:route(
jlib:jid_replace_resource(
StateData#state.jid,
FromNick),
ToJID, Packet)
jlib:jid_replace_resource(
StateData#state.jid,
FromNick),
ToJID, Packet)
end
end;
_ ->
@@ -527,10 +517,10 @@ normal_state({route, From, ToNick,
Err = jlib:make_error_reply(
Packet, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)),
ejabberd_router:route(
jlib:jid_replace_resource(
StateData#state.jid,
ToNick),
From, Err)
jlib:jid_replace_resource(
StateData#state.jid,
ToNick),
From, Err)
end,
{next_state, normal_state, StateData}
end;
@@ -630,8 +620,12 @@ handle_event({destroy, Reason}, _StateName, StateData) ->
[{xmlelement, "reason",
[], [{xmlcdata, Reason}]}]
end}, StateData),
?INFO_MSG("Destroyed MUC room ~s with reason: ~p",
[jlib:jid_to_string(StateData#state.jid), Reason]),
{stop, normal, StateData};
handle_event(destroy, StateName, StateData) ->
?INFO_MSG("Destroyed MUC room ~s",
[jlib:jid_to_string(StateData#state.jid)]),
handle_event({destroy, none}, StateName, StateData);
handle_event({set_affiliations, Affiliations}, StateName, StateData) ->
@@ -790,7 +784,8 @@ process_groupchat_message(From, {xmlelement, "message", Attrs, _Els} = Packet,
?DICT:find(jlib:jid_tolower(From),
StateData#state.users),
if
(Role == moderator) or (Role == participant) ->
(Role == moderator) or (Role == participant)
or ((StateData#state.config)#config.moderated == false) ->
{NewStateData1, IsAllowed} =
case check_subject(Packet) of
false ->
@@ -895,14 +890,10 @@ process_presence(From, Nick, {xmlelement, "presence", Attrs, _Els} = Packet,
"error" ->
case is_user_online(From, StateData) of
true ->
NewState =
add_user_presence_un(
From,
{xmlelement, "presence",
[{"type", "unavailable"}], []},
StateData),
send_new_presence(From, NewState),
remove_online_user(From, NewState);
ErrorText = "This participant is kicked from the room because "
"he sent an error presence",
expulse_participant(Packet, From, StateData,
translate:translate(Lang, ErrorText));
_ ->
StateData
end;
@@ -956,6 +947,8 @@ process_presence(From, Nick, {xmlelement, "presence", Attrs, _Els} = Packet,
case (not (StateData1#state.config)#config.persistent) andalso
(?DICT:to_list(StateData1#state.users) == []) of
true ->
?INFO_MSG("Destroyed MUC room ~s because it's temporary and empty",
[jlib:jid_to_string(StateData#state.jid)]),
{stop, normal, StateData1};
_ ->
{next_state, normal_state, StateData1}
@@ -999,6 +992,76 @@ list_to_affiliation(Affiliation) ->
"none" -> none
end.
%% Decide the fate of the message and its sender
%% Returns: continue_delivery | forget_message | {expulse_sender, Reason}
decide_fate_message("error", Packet, From, StateData) ->
%% Make a preliminary decision
PD = case check_error_kick(Packet) of
%% If this is an error stanza and its condition matches a criteria
true ->
Reason = io_lib:format("This participant is considered a ghost and is expulsed: ~s",
[jlib:jid_to_string(From)]),
{expulse_sender, Reason};
false ->
continue_delivery
end,
case PD of
{expulse_sender, R} ->
case is_user_online(From, StateData) of
true ->
{expulse_sender, R};
false ->
forget_message
end;
Other ->
Other
end;
decide_fate_message(_, _, _, _) ->
continue_delivery.
%% Check if the elements of this error stanza indicate
%% that the sender is a dead participant.
%% If so, return true to kick the participant.
check_error_kick(Packet) ->
case get_error_condition(Packet) of
"gone" -> true;
"internal-server-error" -> true;
"item-not-found" -> true;
"jid-malformed" -> true;
"recipient-unavailable" -> true;
"redirect" -> true;
"remote-server-not-found" -> true;
"remote-server-timeout" -> true;
"service-unavailable" -> true;
_ -> false
end.
get_error_condition(Packet) ->
case catch get_error_condition2(Packet) of
{condition, ErrorCondition} ->
ErrorCondition;
{'EXIT', _} ->
"badformed error stanza"
end.
get_error_condition2(Packet) ->
{xmlelement, _, _, EEls} = xml:get_subtag(Packet, "error"),
[Condition] = [Name || {xmlelement, Name, [{"xmlns", ?NS_STANZAS}], []} <- EEls],
{condition, Condition}.
expulse_participant(Packet, From, StateData, Reason1) ->
ErrorCondition = get_error_condition(Packet),
Reason2 = io_lib:format(Reason1 ++ ": " ++ "~s", [ErrorCondition]),
NewState = add_user_presence_un(
From,
{xmlelement, "presence",
[{"type", "unavailable"}],
[{xmlelement, "status", [],
[{xmlcdata, Reason2}]
}]},
StateData),
send_new_presence(From, NewState),
remove_online_user(From, NewState).
set_affiliation(JID, Affiliation, StateData) ->
@@ -2414,7 +2477,7 @@ process_iq_owner(From, set, Lang, SubEl, StateData) ->
{error, ?ERR_BAD_REQUEST}
end;
[{xmlelement, "destroy", _Attrs1, _Els1} = SubEl1] ->
?INFO_MSG("Destroyed MUC room ~s by ~s",
?INFO_MSG("Destroyed MUC room ~s by the owner ~s",
[jlib:jid_to_string(StateData#state.jid), jlib:jid_to_string(From)]),
destroy_room(SubEl1, StateData);
Items ->
@@ -2580,9 +2643,9 @@ get_config(Lang, StateData, From) ->
?BOOLXFIELD("Make room members-only",
"muc#roomconfig_membersonly",
Config#config.members_only),
%%?BOOLXFIELD("Make room moderated",
%% "muc#roomconfig_moderatedroom",
%% Config#config.moderated),
?BOOLXFIELD("Make room moderated",
"muc#roomconfig_moderatedroom",
Config#config.moderated),
?BOOLXFIELD("Default users as participants",
"members_by_default",
Config#config.members_by_default),
@@ -2975,12 +3038,19 @@ check_invitation(From, Els, Lang, StateData) ->
xml:get_path_s(
InviteEl,
[{elem, "reason"}, cdata]),
ContinueEl =
case xml:get_path_s(
InviteEl,
[{elem, "continue"}]) of
[] -> [];
Continue1 -> [Continue1]
end,
IEl =
[{xmlelement, "invite",
[{"from",
jlib:jid_to_string(From)}],
[{xmlelement, "reason", [],
[{xmlcdata, Reason}]}]}],
[{xmlcdata, Reason}]}] ++ ContinueEl}],
PasswdEl =
case (StateData#state.config)#config.password_protected of
true ->
@@ -3033,6 +3103,7 @@ check_invitation(From, Els, Lang, StateData) ->
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Logging
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 5 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 5 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 21 Jul 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 5 Oct 2006 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 16 Jan 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
+1 -1
View File
@@ -5,7 +5,7 @@
%%% Created : 5 Oct 2006 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2007 Process-one
%%% ejabberd, Copyright (C) 2002-2008 Process-one
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as

Some files were not shown because too many files have changed in this diff Show More