-- cgit v1.2.3 From 6bdabb0c3ba9b2a2755fffc27ed3795a9968556d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 22 Sep 2006 07:13:42 +0000 Subject: Bugfixes coming from trunk (SVN #599): * src/mod_shared_roster.erl: Bugfix * src/mod_roster_odbc.erl: Bugfix SVN Revision: 609 --- ChangeLog | 6 ++++++ src/mod_roster_odbc.erl | 9 ++++----- src/mod_shared_roster.erl | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 212f96e31..f20eeaef0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-09-05 Alexey Shchepin + + * src/mod_shared_roster.erl: Bugfix + + * src/mod_roster_odbc.erl: Bugfix + 2006-09-03 Mickael Remond * src/odbc/odbc_queries.erl: Support for Microsoft SQL Server as a diff --git a/src/mod_roster_odbc.erl b/src/mod_roster_odbc.erl index cc94d10c6..9509cc68c 100644 --- a/src/mod_roster_odbc.erl +++ b/src/mod_roster_odbc.erl @@ -141,11 +141,10 @@ get_user_roster(Acc, {LUser, LServer}) -> R -> SJID = jlib:jid_to_string(R#roster.jid), Groups = lists:flatmap( - fun({S, G}) -> - case jlib:jid_tolower(S) of - SJID -> [G]; - _ -> [] - end + fun({S, G}) when S == SJID -> + [G]; + (_) -> + [] end, JIDGroups), [R#roster{groups = Groups}] end diff --git a/src/mod_shared_roster.erl b/src/mod_shared_roster.erl index 6a438e673..a0160b959 100644 --- a/src/mod_shared_roster.erl +++ b/src/mod_shared_roster.erl @@ -332,7 +332,8 @@ get_user_displayed_groups(US) -> [Group || Group <- DisplayedGroups1, is_group_enabled(Host, Group)]. is_user_in_group(US, Group, Host) -> - case mnesia:match_object(#sr_user{us=US, group_host={Group, Host}}) of + case catch mnesia:dirty_match_object( + #sr_user{us=US, group_host={Group, Host}}) of [] -> false; _ -> true end. -- cgit v1.2.3 From 42115402722e1eb238a472964851dd60f7b39b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 22 Sep 2006 07:25:18 +0000 Subject: Improvement coming from trunk (SVN #601): * src/mod_muc/mod_muc.erl: It is now possible to configure the MUC room history feature. A new option has been added in ejabberd muc module configuration (history_size) to define the size of the history. 0 is used to disable the feature. * src/mod_muc/mod_muc_room.erl: Likewise. * doc/guide.tex: Likewise. SVN Revision: 610 --- ChangeLog | 9 +++++++++ doc/guide.html | 19 +++++++++++++++---- doc/guide.tex | 17 ++++++++++++++--- src/mod_muc/mod_muc.erl | 26 ++++++++++++++++---------- src/mod_muc/mod_muc_room.erl | 34 ++++++++++++++++++++-------------- 5 files changed, 74 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index f20eeaef0..6ee8c5d9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-09-05 Mickael Remond + + * src/mod_muc/mod_muc.erl: It is now possible to configure the MUC room + history feature. A new option has been added in ejabberd muc module + configuration (history_size) to define the size of the history. 0 is + used to disable the feature. + * src/mod_muc/mod_muc_room.erl: Likewise. + * doc/guide.tex: Likewise. + 2006-09-05 Alexey Shchepin * src/mod_shared_roster.erl: Bugfix diff --git a/doc/guide.html b/doc/guide.html index 554201a54..5c9558f34 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -1980,7 +1980,14 @@ Options: value is none, which means that only the room creator can administer his room). By sending a message to the service JID, administrators can send service messages that will be displayed in every - active room. + active room.
+
+
history_size
a small history of the + current discussion is send to users when they enter the room. This option make + it possible to define the number of history messages to keep and send to the + user joining the room. The value is a integer. Setting the value to 0 + disable the history feature and nothing is kept in memory. The default value + is 20. This value is global and affects all MUC rooms on the server. Examples:
  • @@ -1991,7 +1998,8 @@ In the first example everyone is allowed to use the Multi-User Chat sends a message such as “Tomorrow, the Jabber server will be moved to new hardware. This will involve service breakdowns around 23:00 UMT. We apologise for this inconvenience.” to conference.example.org, - it will be displayed in all active rooms. + it will be displayed in all active rooms. In this example the history + feature is disabled.
       {acl, admins, {user, "admin", "example.org"}}.
       ...
    @@ -2002,7 +2010,8 @@ In the first example everyone is allowed to use the Multi-User Chat
         ...
         {mod_muc, [{access, all},
                    {access_create, all},
    -               {access_admin, muc_admins}]},
    +               {access_admin, muc_admins},
    +               {history_size, 0}]},
         ...
        ]}.
     
  • In the second example the Multi-User Chat service is only accessible by @@ -2012,7 +2021,9 @@ In the first example everyone is allowed to use the Multi-User Chat admin@example.org sends a message such as “Tomorrow, the Jabber server will be moved to new hardware. This will involve service breakdowns around 23:00 UMT. We apologise for this inconvenience.” to - conference.example.org, it will be displayed in all active rooms. + conference.example.org, it will be displayed in all active rooms. No + history_size option is used, this means that the feature is enabled + and the default value of 20 history messages will be send to the users.
       {acl, paying_customers, {user, "customer1", "example.net"}}.
       {acl, paying_customers, {user, "customer2", "example.com"}}.
    diff --git a/doc/guide.tex b/doc/guide.tex
    index 0a757ca58..53a07c585 100644
    --- a/doc/guide.tex
    +++ b/doc/guide.tex
    @@ -1710,6 +1710,13 @@ Options:
       administer his room). By sending a message to the service JID,
       administrators can send service messages that will be displayed in every
       active room.
    +
    +  \titem{history\_size} \ind{options!history\_size}a small history of the
    +  current discussion is send to users when they enter the room. This option make
    +  it possible to define the number of history messages to keep and send to the
    +  user joining the room. The value is a integer. Setting the value to \term{0}
    +  disable the history feature and nothing is kept in memory. The default value
    +  is \term{20}. This value is global and affects all MUC rooms on the server.
     \end{description}
     
     Examples:
    @@ -1721,7 +1728,8 @@ Examples:
       sends a message such as ``Tomorrow, the \Jabber{} server will be moved
       to new hardware. This will involve service breakdowns around 23:00 UMT.
       We apologise for this inconvenience.'' to \jid{conference.example.org},
    -  it will be displayed in all active rooms.
    +  it will be displayed in all active rooms. In this example the history
    +  feature is disabled.
       \begin{verbatim}
       {acl, admins, {user, "admin", "example.org"}}.
       ...
    @@ -1732,7 +1740,8 @@ Examples:
         ...
         {mod_muc, [{access, all},
                    {access_create, all},
    -               {access_admin, muc_admins}]},
    +               {access_admin, muc_admins},
    +               {history_size, 0}]},
         ...
        ]}.
     \end{verbatim}
    @@ -1743,7 +1752,9 @@ Examples:
       \jid{admin@example.org} sends a message such as ``Tomorrow, the \Jabber{}
       server will be moved to new hardware. This will involve service breakdowns
       around 23:00 UMT. We apologise for this inconvenience.'' to
    -  \jid{conference.example.org}, it will be displayed in all active rooms.
    +  \jid{conference.example.org}, it will be displayed in all active rooms. No
    +  \term{history\_size} option is used, this means that the feature is enabled
    +  and the default value of 20 history messages will be send to the users.
       \begin{verbatim}
       {acl, paying_customers, {user, "customer1", "example.net"}}.
       {acl, paying_customers, {user, "customer2", "example.com"}}.
    diff --git a/src/mod_muc/mod_muc.erl b/src/mod_muc/mod_muc.erl
    index 6e40d0bdf..196181f3f 100644
    --- a/src/mod_muc/mod_muc.erl
    +++ b/src/mod_muc/mod_muc.erl
    @@ -36,7 +36,7 @@
     -record(muc_online_room, {name_host, pid}).
     -record(muc_registered, {us_host, nick}).
     
    --record(state, {host, server_host, access}).
    +-record(state, {host, server_host, access, history_size}).
     
     -define(PROCNAME, ejabberd_mod_muc).
     
    @@ -148,14 +148,17 @@ init([Host, Opts]) ->
         Access = gen_mod:get_opt(access, Opts, all),
         AccessCreate = gen_mod:get_opt(access_create, Opts, all),
         AccessAdmin = gen_mod:get_opt(access_admin, Opts, none),
    +    HistorySize = gen_mod:get_opt(history_size, Opts, 20),
         catch ets:new(muc_online_room, [named_table,
     				    public,
     				    {keypos, #muc_online_room.name_host}]),
         ejabberd_router:register_route(MyHost),
    -    load_permanent_rooms(MyHost, Host, {Access, AccessCreate, AccessAdmin}),
    +    load_permanent_rooms(MyHost, Host, {Access, AccessCreate, AccessAdmin},
    +			 HistorySize),
         {ok, #state{host = MyHost,
     		server_host = Host,
    -		access = {Access, AccessCreate, AccessAdmin}}}.
    +		access = {Access, AccessCreate, AccessAdmin},
    +		history_size = HistorySize}}.
     
     %%--------------------------------------------------------------------
     %% Function: %% handle_call(Request, From, State) -> {reply, Reply, State} |
    @@ -187,8 +190,9 @@ handle_cast(_Msg, State) ->
     handle_info({route, From, To, Packet},
     	    #state{host = Host,
     		   server_host = ServerHost,
    -		   access = Access} = State) ->
    -    case catch do_route(Host, ServerHost, Access, From, To, Packet) of
    +		   access = Access,
    +		   history_size = HistorySize} = State) ->
    +    case catch do_route(Host, ServerHost, Access, HistorySize, From, To, Packet) of
     	{'EXIT', Reason} ->
     	    ?ERROR_MSG("~p", [Reason]);
     	_ ->
    @@ -239,11 +243,11 @@ stop_supervisor(Host) ->
         supervisor:terminate_child(ejabberd_sup, Proc),
         supervisor:delete_child(ejabberd_sup, Proc).
     
    -do_route(Host, ServerHost, Access, From, To, Packet) ->
    +do_route(Host, ServerHost, Access, HistorySize, From, To, Packet) ->
         {AccessRoute, _AccessCreate, _AccessAdmin} = Access,
         case acl:match_rule(ServerHost, AccessRoute, From) of
     	allow ->
    -	    do_route1(Host, ServerHost, Access, From, To, Packet);
    +	    do_route1(Host, ServerHost, Access, HistorySize, From, To, Packet);
     	_ ->
     	    {xmlelement, _Name, Attrs, _Els} = Packet,
     	    Lang = xml:get_attr_s("xml:lang", Attrs),
    @@ -254,7 +258,7 @@ do_route(Host, ServerHost, Access, From, To, Packet) ->
         end.
     
     
    -do_route1(Host, ServerHost, Access, From, To, Packet) ->
    +do_route1(Host, ServerHost, Access, HistorySize, From, To, Packet) ->
         {_AccessRoute, AccessCreate, AccessAdmin} = Access,
         {Room, _, Nick} = jlib:jid_tolower(To),
         {xmlelement, Name, Attrs, _Els} = Packet,
    @@ -379,7 +383,8 @@ do_route1(Host, ServerHost, Access, From, To, Packet) ->
     				    ?DEBUG("MUC: open new room '~s'~n", [Room]),
     				    {ok, Pid} = mod_muc_room:start(
     						  Host, ServerHost, Access,
    -						  Room, From, Nick),
    +						  Room, HistorySize, From,
    +						  Nick),
     				    ets:insert(
     				      muc_online_room,
     				      #muc_online_room{name_host = {Room, Host},
    @@ -411,7 +416,7 @@ do_route1(Host, ServerHost, Access, From, To, Packet) ->
     
     
     
    -load_permanent_rooms(Host, ServerHost, Access) ->
    +load_permanent_rooms(Host, ServerHost, Access, HistorySize) ->
         case catch mnesia:dirty_select(
     		 muc_room, [{#muc_room{name_host = {'_', Host}, _ = '_'},
     			     [],
    @@ -427,6 +432,7 @@ load_permanent_rooms(Host, ServerHost, Access) ->
     						ServerHost,
     						Access,
     						Room,
    +						HistorySize,
     						R#muc_room.opts),
     				  ets:insert(
     				    muc_online_room,
    diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl
    index 3ae1934ac..44eceb476 100644
    --- a/src/mod_muc/mod_muc_room.erl
    +++ b/src/mod_muc/mod_muc_room.erl
    @@ -14,10 +14,10 @@
     
     
     %% External exports
    --export([start_link/6,
    -	 start_link/5,
    +-export([start_link/7,
    +	 start_link/6,
    +	 start/7,
     	 start/6,
    -	 start/5,
     	 route/4]).
     
     %% gen_fsm callbacks
    @@ -85,22 +85,22 @@
     %%%----------------------------------------------------------------------
     %%% API
     %%%----------------------------------------------------------------------
    -start(Host, ServerHost, Access, Room, Creator, Nick) ->
    +start(Host, ServerHost, Access, Room, HistorySize, Creator, Nick) ->
         Supervisor = gen_mod:get_module_proc(ServerHost, ejabberd_mod_muc_sup),
         supervisor:start_child(
    -      Supervisor, [Host, ServerHost, Access, Room, Creator, Nick]).
    +      Supervisor, [Host, ServerHost, Access, Room, HistorySize, Creator, Nick]).
     
    -start(Host, ServerHost, Access, Room, Opts) ->
    +start(Host, ServerHost, Access, Room, HistorySize, Opts) ->
         Supervisor = gen_mod:get_module_proc(ServerHost, ejabberd_mod_muc_sup),
         supervisor:start_child(
    -      Supervisor, [Host, ServerHost, Access, Room, Opts]).
    +      Supervisor, [Host, ServerHost, Access, Room, HistorySize, Opts]).
     
    -start_link(Host, ServerHost, Access, Room, Creator, Nick) ->
    -    gen_fsm:start_link(?MODULE, [Host, ServerHost, Access, Room, Creator, Nick],
    +start_link(Host, ServerHost, Access, Room, HistorySize, Creator, Nick) ->
    +    gen_fsm:start_link(?MODULE, [Host, ServerHost, Access, Room, HistorySize, Creator, Nick],
     		       ?FSMOPTS).
     
    -start_link(Host, ServerHost, Access, Room, Opts) ->
    -    gen_fsm:start_link(?MODULE, [Host, ServerHost, Access, Room, Opts],
    +start_link(Host, ServerHost, Access, Room, HistorySize, Opts) ->
    +    gen_fsm:start_link(?MODULE, [Host, ServerHost, Access, Room, HistorySize, Opts],
     		       ?FSMOPTS).
     
     %%%----------------------------------------------------------------------
    @@ -114,20 +114,22 @@ start_link(Host, ServerHost, Access, Room, Opts) ->
     %%          ignore                              |
     %%          {stop, StopReason}                   
     %%----------------------------------------------------------------------
    -init([Host, ServerHost, Access, Room, Creator, _Nick]) ->
    +init([Host, ServerHost, Access, Room, HistorySize, Creator, _Nick]) ->
         State = set_affiliation(Creator, owner,
     			    #state{host = Host,
     				   server_host = ServerHost,
     				   access = Access,
     				   room = Room,
    +				   history = lqueue_new(HistorySize),
     				   jid = jlib:make_jid(Room, Host, ""),
     				   just_created = true}),
         {ok, normal_state, State};
    -init([Host, ServerHost, Access, Room, Opts]) ->
    +init([Host, ServerHost, Access, Room, HistorySize, Opts]) ->
         State = set_opts(Opts, #state{host = Host,
     				  server_host = ServerHost,
     				  access = Access,
     				  room = Room,
    +				  history = lqueue_new(HistorySize),
     				  jid = jlib:make_jid(Room, Host, "")}),
         {ok, normal_state, State}.
     
    @@ -1372,7 +1374,11 @@ lqueue_new(Max) ->
     	    len = 0,
     	    max = Max}.
     
    -lqueue_in(Item, #lqueue{queue = Q1, len = Len, max = Max}) ->
    +%% If the message queue limit is set to 0, do not store messages.
    +lqueue_in(Item, LQ = #lqueue{max = 0}) ->
    +    LQ;
    +%% Otherwise, rotate messages in the queue store.
    +lqueue_in(Item, LQ = #lqueue{queue = Q1, len = Len, max = Max}) ->
         Q2 = queue:in(Item, Q1),
         if
     	Len >= Max ->
    -- 
    cgit v1.2.3
    
    
    From 8c8c7b1e3f7c46369e805796965d5e3b7419fb04 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?=
     
    Date: Fri, 22 Sep 2006 07:35:55 +0000
    Subject: Improvement coming from trunk (SVN #602): *
     src/mod_muc/mod_muc_log.erl: Fixed html special characters escaping, added
     new image buttons, chatroom titles now point to xmpp: URIs (thanks to Badlop)
    
    SVN Revision: 611
    ---
     ChangeLog                    |   6 ++
     src/mod_muc/mod_muc_log.erl  | 215 ++++++++++++++++++++++++++++++++++++++-----
     src/mod_muc/mod_muc_room.erl |   4 +-
     3 files changed, 200 insertions(+), 25 deletions(-)
    
    diff --git a/ChangeLog b/ChangeLog
    index 6ee8c5d9e..eef5e0557 100644
    --- a/ChangeLog
    +++ b/ChangeLog
    @@ -1,3 +1,9 @@
    +2006-09-10  Alexey Shchepin  
    +
    +	* src/mod_muc/mod_muc_log.erl: Fixed html special characters
    +	escaping, added new image buttons, chatroom titles now point to
    +	xmpp: URIs (thanks to Badlop)
    +
     2006-09-05  Mickael Remond  
     
     	* src/mod_muc/mod_muc.erl: It is now possible to configure the MUC room
    diff --git a/src/mod_muc/mod_muc_log.erl b/src/mod_muc/mod_muc_log.erl
    index 1888562fc..15afd6350 100644
    --- a/src/mod_muc/mod_muc_log.erl
    +++ b/src/mod_muc/mod_muc_log.erl
    @@ -179,10 +179,10 @@ add_to_log2(text, {Nick, Packet}, Room, Opts, State) ->
     	{false, false} ->
     	    ok;
     	{false, SubEl} ->
    -	    Message = {body, htmlize(xml:get_tag_cdata(SubEl))},
    +	    Message = {body, xml:get_tag_cdata(SubEl)},
     	    add_message_to_log(Nick, Message, Room, Opts, State);
     	{SubEl, _} ->
    -	    Message = {subject, htmlize(xml:get_tag_cdata(SubEl))},
    +	    Message = {subject, xml:get_tag_cdata(SubEl)},
     	    add_message_to_log(Nick, Message, Room, Opts, State)
         end;
     
    @@ -238,16 +238,24 @@ get_timestamp_daydiff(TimeStamp, Daydiff) ->
         {Date2, HMS}.
     
     % Try to close the previous day log, if it exists
    -close_previous_log(Fn) ->
    +close_previous_log(Fn, Images_dir) ->
         case file:read_file_info(Fn) of
     	{ok, _} ->
     	    {ok, F} = file:open(Fn, [append]),
    -	    fw(F, "
    ejabberd/mod_muc log\"Valid \"Valid
    "), + %fw(F, "
    ejabberd/mod_muc log"), + fw(F, "
    "), + fw(F, " \"Powered", [Images_dir]), + fw(F, " \"Powered", [Images_dir]), + fw(F, ""), + fw(F, " \"Valid", [Images_dir]), + fw(F, " \"Valid", [Images_dir]), + fw(F, "
    "), file:close(F); _ -> ok end. -add_message_to_log(Nick, Message, RoomJID, Opts, State) -> +add_message_to_log(Nick1, Message, RoomJID, Opts, State) -> + Nick = htmlize(Nick1), #state{out_dir = OutDir, dir_type = DirType, css_file = CSSFile, @@ -286,7 +294,14 @@ add_message_to_log(Nick, Message, RoomJID, Opts, State) -> put_header(F, Room, Datestring, CSSFile, Lang, HourOffset, DatePrev, DateNext, TopLink), - close_previous_log(FnYesterday) + Images_dir = filename:join([OutDir, "images"]), + file:make_dir(Images_dir), + create_image_files(Images_dir), + Images_url = case DirType of + subdirs -> "../../../images"; + plain -> "../images" + end, + close_previous_log(FnYesterday, Images_url) end, % Build message @@ -304,33 +319,33 @@ add_message_to_log(Nick, Message, RoomJID, Opts, State) -> [Nick, ?T("leaves the room")]); {leave, Reason} -> io_lib:format("~s ~s: ~s
    ", - [Nick, ?T("leaves the room"), Reason]); + [Nick, ?T("leaves the room"), htmlize(Reason)]); {kickban, "307", ""} -> io_lib:format("~s ~s
    ", [Nick, ?T("has been kicked")]); {kickban, "307", Reason} -> io_lib:format("~s ~s: ~s
    ", - [Nick, ?T("has been kicked"), Reason]); + [Nick, ?T("has been kicked"), htmlize(Reason)]); {kickban, "301", ""} -> io_lib:format("~s ~s
    ", [Nick, ?T("has been banned")]); {kickban, "301", Reason} -> io_lib:format("~s ~s: ~s
    ", - [Nick, ?T("has been banned"), Reason]); + [Nick, ?T("has been banned"), htmlize(Reason)]); {nickchange, OldNick} -> io_lib:format("~s ~s ~s
    ", [OldNick, ?T("is now known as"), Nick]); {subject, T} -> io_lib:format("~s~s~s
    ", - [Nick, ?T(" has set the subject to: "), T]); + [Nick, ?T(" has set the subject to: "), htmlize(T)]); {body, T} -> case regexp:first_match(T, "^/me\s") of {match, _, _} -> io_lib:format("~s ~s
    ", - [Nick, string:substr(T, 5)]); + [Nick, string:substr(htmlize(T), 5)]); nomatch -> io_lib:format("<~s> ~s
    ", - [Nick, T]) + [Nick, htmlize(T)]) end end, {Hour, Minute, Second} = Time, @@ -391,6 +406,160 @@ make_dir_rec(Dir) -> file:make_dir(Dir) end. + +% {ok, F1}=file:open("valid-xhtml10.png", [read]). +% {ok, F1b}=file:read(F1, 1000000). +% c("../../ejabberd/src/jlib.erl"). +% jlib:encode_base64(F1b). + +image_base64("powered-by-erlang.png") -> + "iVBORw0KGgoAAAANSUhEUgAAAGUAAAAfCAYAAAD+xQNoAAADN0lEQVRo3u1a" + "P0waURz+rjGRRQ+nUyRCYmJyDPTapDARaSIbTUjt1gVSh8ZW69aBAR0cWLSx" + "CXWp59LR1jbdqKnGxoQuRZZrSYyHEVM6iZMbHewROA7u3fHvkr5vOn737vcu" + "33ffu9/vcQz+gef5Cij6CkmSGABgFEH29r5SVvqIsTEOHo8HkiQxDBXEOjg9" + "PcHc3BxuUSqsI8jR0REAUFGsCCoKFYWCBAN6AxyO0Z7cyMXFb6oGqSgAsIrJ" + "ut9hMQlvdNbUhKWshLd3HtTF4jihShgVpRaBxKKmIGX5HL920/hz/BM2+zAm" + "pn2YioQaxnECj0BiEYcrG0Tzzc8/rfudSm02jaVSm9Vr1MdG8rSKKXlJ7lHr" + "fjouCut2IrC82BDPbe/gc+xlXez7KxEz63H4lmIN473Rh8Si1BKhRY6aEJI8" + "pLmbjSPN0xOnBBILmg5RC6Lg28preKOzsNmHG8R1Bf0o7GdMucUslDy1pJLG" + "2sndVVG0lq3c9vum4zmBR1kuwiYMN5ybmCYXxQg57ThFOTYznzpPO+IQi+IK" + "+jXjg/YhuIJ+cIIHg+wQJoJ+2N3jYN3Olvk4ge/IU98spne+FfGtlslm16nn" + "a8fduntfDscoVjGJqUgIjz686ViFUdjP4N39x9Xq638viZVtlq2tLXKncLf5" + "ticuZSWU5XOUshJKxxKtfdtdvs4OyNb/68urKvlluYizgwwu5SLK8jllu1t9" + "ihYOlzdwdpBBKSvh+vKKzHkCj1JW3y1m+hSj13WjqOiJKK0qpXKhSFxJAYBv" + "KYaZ9TjWRu4SiWi2LyDtb6wghGmn5HfTml16ILGA/G5al2DW7URYTFYrOU7g" + "icQ020sYqYDM9CbdgqFd4vzHL03JfvLjk6ZgADAVCSEsJvHsdL+utNYrm2uf" + "ZDVZSkzPKaQkW8kthpyS297BvRdRzR6DdTurJbPy9Ov1K6xr3HBPQuIMowR3" + "asegUyDuU9SuUG+dmIGyZ0b7FBN9St3WunyC5yMsrVv7uXzRP58s/qKn6C4q" + "lQoVxVIvd4YBwzBUFKs6ZaD27U9hEdcAN98Sx2IxykafIYrizbfESoB+dd9/" + "KF/d/wX3cJvREzl1vAAAAABJRU5ErkJggg=="; + +image_base64("valid-xhtml10.png") -> + "iVBORw0KGgoAAAANSUhEUgAAAFgAAAAfCAMAAAEjEcpEAAACiFBMVEUAAADe" + "5+fOezmtra3ejEKlhELvvWO9WlrehELOe3vepaWclHvetVLGc3PerVKcCAj3" + "vVqUjHOUe1JjlL0xOUpjjL2UAAC91ueMrc7vrVKlvdbW3u+EpcbO3ufO1ucY" + "WpSMKQi9SiF7e3taWkoQEAiMczkQSoxaUkpzc3O1lEoICACEazEhGAgIAACE" + "YzFra2utjELWcznGnEr/7+9jY2POazHOYzGta2NShLVrlL05OUqctdacCADG" + "a2ucAADGpVqUtc61ORg5OTmlUikYGAiUezl7YzEYEAiUczkxMTG9nEqtIRDe" + "3t4AMXu9lEoQCACMazEAKXspKSmljFrW1ta1jELOzs7n7/fGxsa9pVqEOSkp" + "Y5xznL29tZxahLXOpVr/99ZrY1L/79ZjUiljSikAOYTvxmMAMYScezmchFqU" + "czGtlFp7c2utjFqUlJStxt73///39/9Ce61CSkq9xsZznMbW5+9Cc62MjIxC" + "Qkrv9/fv7/fOzsbnlErWjIz/3mtCORhza1IpIRBzWjH/1mtCMRhzY1L/zmvn" + "vVpSQiHOpVJrUinntVr3zmOEc1L3xmNaWlq1nFo5QkrGWim1lFoISpRSUlK1" + "zt4hWpwASoz///////8xa6WUaykAQoxKe61KSkp7nMbWtWPe5+9jWlL39/f3" + "9/fWrWNCQkLera3nvWPv7+85MRjntWPetVp7c1IxKRCUlHtKORh7a1IxIRCU" + "jHtaSiHWrVIpIQhzWinvvVpaQiH/1mPWpVKMe1L/zmP/xmNrUiGErc4YGBj/" + "73PG1ucQWpT/53O9nFoQUpS1SiEQEBC9zt69vb05c6UISoxSUko5a6UICAhS" + "SkohUpS1tbXetWMAQoSUgD+kAAAA2HRSTlP/////////iP9sSf//dP//////" + "//////////////////////////////////////////8M////////////ef//" + "////////////////////////////////////////////////////////////" + "//////////////////////9d////////////////////////////////////" + "AP//////////////CP//RP//////////////////////////////////////" + "//////////////////////9xPp1gAAAFvUlEQVR42pVWi18URRwfy7vsYUba" + "iqBRBFmICUQGVKcZckQeaRJQUCLeycMSfKGH0uo5NELpIvGQGzokvTTA85VH" + "KTpbRoeJnPno/p1+M7t3txj20e/Nzu7Ofve7v/k9Zg4Vc+wRQMW0eyLx1ZSA" + "NeBDxVmxZZSwEUYkGAewm1eIBOMRvhv1UA+q8KXIVuxGdCelFYwxAnxOrxgb" + "Y8Ti1t4VA0QHYz4x3FnVC8OVLXv9fkKGSWDoW/4lG6VbdtBblesOs+MjmEmz" + "JKNIJWFEfEQTCWNPFKvcKEymjLO1b8bwYQd1hCiiDCl5KsrDCIlhj4fSuvcp" + "fSpgJmyv6dzeZv+nMPx3dhbt94II07/JZliEtm1N2RIYPkTYshwYm245a/zk" + "WjJwcyFh6ZIcYxxmqiaDSYxhOhFUsqngi3Fzcj3ljdYDNE9uzA1YD/5MhnzW" + "1KRqF7mYG8jFYXLcfLpjOe2LA0fuGqQrQHl10sdK0sFcFSOSlzF0BgXQH9h3" + "QZDBI0ccNEhftjXuippBDD2/eMRiETmwwNEYHyqhdDyo22w+3QHuNbdve5a7" + "eOkHmDVJ0ixNmfbz1h0qo/Q6GuSB2wQJQbpOjOQAl7woWSRJ0m2ewhvAOUiY" + "YtZtaZL0CZZmtmVOQttLfr/dbveLZodrfrL7W75wG/JjqkQxoNTtNsTKELQp" + "QL6/D5loaSmyTT8TUhsmi8iFA0hZiyltf7OiNKdarRm5w2So2lTNdPLuIzR+" + "AiLj8VTRJaj0LmX4VhJ27f/VJV/yycilWPOrk8NkXi7Qqmj5bHqVZlJKZIRk" + "1wFzKrt0WUbnXMPJ1fk4TJ5oWBA61p1V76DeIs0MX+s3GxRlA1vtw83KhgNp" + "hc1nyErLO5zcvbOsrq+scbZnpzc6QVFPenLwGxmC+BOfYI+DN55QYddh4Q/N" + "E/yGYYj4TOGNngQavAZnzzTovEA+kcMJ+247uYexNA+4Fsvjmuv662jsWxPZ" + "x2xg890bYMYnTgya7bjmCiEY0qgJ0vMF3c+NoFdPyzxz6V3Uxs3AOWCDchRv" + "OsQtBrbFsrT2fhHEc7ByGzu/dA4IO0A3HdfeP9yMqAwP6NPEb6cbwn0PWVU1" + "7/FDBQh/CPIrbfcg027IZrsAT/Bf3FNWyn9RSR4cvvwn3e4HFmYPDl/thYcR" + "Vi8qPEoXVUWBl6FTBFTtnqmKKg5wnlF4wZ1yeLv7TiwXKektE+iDBNicWEyL" + "pnFhfDkpJc3q2khSPyQBbE0dMJnOoDzTwGsI7cdyMkL5gWqUjCF6Txst/twx" + "Cv1WzzHoy21ZDQ1xnuDzdPDWR4knr14v0tYn3IxaMFFdiMOlEOJHw1jOQ4sW" + "t5rQopRkXZhMEi7pmeDCVWBlfUKwhMZ7rsF6elKsvbwiKxgxIdewa3ErsaYo" + "mCVZFYJb0GUu3JqGUNoplBxYiYby8vLBFWef+Cri4/I1sbQ/1OtYTrNtdXS+" + "rSe7kQ52eSObL99/iErCWUjCy5W4JLygmCouGfG9x9fmx17XhBuDCaOerbt5" + "38erta7TFktLvdHghZcCbcPQO33zIJG9kxF5hoVXnzTzRz0r5js8oTj6uyPk" + "GRf346HOLcasgFexueNUWFPtuFKzjoSFYYedhwVlhsRVYWWJpltv1XPQT1Rl" + "0bjZIBlb1XujVDzY/Kj4k6Ku3+Z0jo1owjVzDpFTXe1juvBSWNFmNWGZy8Lv" + "zUl5PN4JCwyNDzbQ0aAj4Zrjz0FatGJJYhvq4j7mGSpvytGFlZtHf2C4o/28" + "Zu8z7wo7eYPfXysnF0i9NnPh1t1zR7VBb9GqaOXhtTmHQdgMFXE+Z608cnpO" + "DdZdjL+TuDY44Q38kJXHhccWLoOd9uv1AwwvO+48uu+faCSJPJ1bmy6Thyvp" + "ivBmYWgjxPDPAp7JTemY/yGKFEiRt/jG/2P79s8KCwoLCgoLC/khUBA5F0Sf" + "QZ+RYfpNE/4Xosmq7jsZAJsAAAAASUVORK5CYII="; + +image_base64("vcss.png") -> + "iVBORw0KGgoAAAANSUhEUgAAAFgAAAAfCAMAAABUFvrSAAABKVBMVEUAAAAj" + "Ix8MR51ZVUqAdlmdnZ3ejEWLDAuNjY1kiMG0n2d9fX19Ghfrp1FtbW3y39+3" + "Ph6lIRNdXV2qJBFcVUhcVUhPT0/dsmpUfLr57+/u7u4/PDWZAACZAADOp1Gd" + "GxG+SyTgvnNdSySzk16+mkuxw+BOS0BOS0DOzs7MzMy4T09RRDwsJBG+vr73" + "wV6fkG6eCQRFcLSurq6/X1+ht9nXfz5sepHuwV59ZTHetFjQ2+wMCQQ2ZK5t" + "WCsmWajsz8+Sq9NMPh4hVaY8MRj///////////////////////9MTEyOp9Lu" + "8vhXU1A8PDyjOSTBz+YLRJ2rLy8sLCwXTaKujEUcHByDn82dfz7/zGafDw+f" + "Dw+zRSlzlMcMDAyNcji1tbXf5vIcFgvATJOjAAAAY3RSTlP/8///////////" + "//////8A//////P/////ov//8//////////////z///T//////////+i////" + "//////////8w/////6IA/xAgMP//////////8/////////8w0/////////+z" + "ehebAAACkUlEQVR42u2VfVPTQBDG19VqC6LY+lKrRIxFQaFSBPuSvhBPF8SI" + "UZK2J5Yav/+HcO8uZdLqTCsU/nKnyWwvk1/unnt2D9ZmH+8/cMAaTRFy+ng6" + "9/yiwC/+gy8R3McGv5zHvGJEGAdR4eBgi1IbZwevIEZE24pFtBtzG1Q4AoD5" + "zvw5pEDcJvIQV/TE3/l+H9GnNJwcdABS5wAbFQLMqI98/UReoAaOTlaJsp0z" + "aHx7LwZvY0BUR2xpWTzqam0gzY8KGzG4MhBCNGucha4QbpETy+Yk/BP85nt7" + "34AjpQLTsE4ZFpf/dnkUCglXVNYB+OfUZJHvAqAoa45OeuPgm4+Xjtv7xm4N" + "7PMV4C61+Mrz3H2WImm3ATiWrAiwZRWcUA5Ej4dgIEMxDv6yxHHcNuAutnjv" + "2HZ1NeuycoVPh0mwC834zZC9Ao5dkZZKwLVGwT+WdLw0YOZ1saEkUDoT+QGW" + "KZ0E2xpcrPakVW2KXwyUtYEtlEAj3GXD/fYwrryAdeiyGqidQSw1eqtJcA8c" + "Zq4zXqhPuCBYE1fKJjh/5X6MwRm9c2xf7WVdLf5oSdt64esVIwVAKC1HJ2ol" + "i8vj3L0YzC4zjkMagt+arDAs6bApbL1RVlWIqrJbreqKZmh4y6VR7rAJeUYD" + "VRj9VqRXkErpJ9lbEwtE83KlIfeG4p52t7zWIMO1XcaGz54uUyet+hBM7BXX" + "DS8Xc5+8Gmmbu1xwSoGIokA3oTptQecQ4Iimm/Ew7jwbPfMi3TM91T9XVIGo" + "+W9xC8oWpugVCXLuwXijjxJ3r/6PjX7nlFua8QmyM+TO/Gja2TTc2Z95C5ua" + "ewGH6cJi6bJO6Z+TY276eH3tbgy+/3ly3Js+rj66osG/AV5htgaQ9SeRAAAA" + "AElFTkSuQmCC"; + +image_base64("powered-by-ejabberd.png") -> + "iVBORw0KGgoAAAANSUhEUgAAAGUAAAAfCAMAAADJG/NaAAAAw1BMVEUAAAAj" + "BgYtBAM5AwFCAAAYGAJNAABcAABIDQ5qAAAoJRV7AACFAAAoKSdJHByLAAAw" + "Lwk1NQA1MzFJKyo4NxtDQQBEQT5KSCxSTgBSUBlgQ0JYSEpZWQJPUU5hYABb" + "W0ZiYClcW1poaCVwbQRpaDhzYWNsakhuZ2VrbFZ8dwCEgAB3dnd4d2+OjACD" + "hYKcmACJi4iQkpWspgCYmJm5swCmqazEwACwsbS4ub3X0QLExsPLyszW1Nnc" + "3ODm5ugMBwAWAwPHm1IFAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJ" + "cEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfVCRQOBA7VBkCMAAACcElEQVRI" + "x72WjXKiMBSFQalIFbNiy1pdrJZaRVYR5deGwPs/VRNBSBB2OjvQO0oYjPfj" + "5J6bCcdx8i2UldxKcDhk1HbIPwFBF/kHKJfjPSVAyIRHF9rRZ4sUX3EDdWOv" + "1+u2tESaavpnYTbv9zvd0WwDy3/QcGQXlH5uTxB1l07MJlRpsUei0JF6Qi+O" + "HyGK7ijXxPklHe/umIllim3iUBMJDIEULxxPP0TVWhhKJoN9fUpdmQLteV8a" + "DgEAg9gIcTjL4F4L+r4WVKEF+rbJdwYYAoQHY+oQjnGootyKwxapoi73WkyF" + "FySQBv988naEEp4+YMMec5VUCQDJTscEy7Kc0HsLmqNE7rovDjMpIHHGYeid" + "Xn4TQcaxMYqP3RV3C8oCl2WvrlSPaNpGZadRnmPGCk8ylM2okAJ4i9TEe1Ke" + "rsXxSl6jUt5uayiIodirtcKLOaWblj50wiyMv1F9lm9TUDArGAD0FmEpvCUs" + "VoZy6dW81Fg0aDaHogQa36ekAPG5DDGsbdZrGsrzZUnzvBo1I2tLmuL69kSi" + "tAweyHKN9b3leDfQMnu3nIIKWfmXnqGVKedJT6QpICbJvf2f8aOsvn68v+k7" + "/cwUQdPoxaMoRTnKFHNlKsKQphCTOa84u64vpi8bH31CqsbF6lSONRTkTyQG" + "Arq49/fEvjBwz4eDS2/JpaXRNOoXRD/VmOrDVTJJRIZCTLav3VrqbPvP3vdd" + "uGEhQJzilncbpSA4F3vsihErO+dayv/sY5/yRE0GDEXCu2VoNiMlo5i+P2Kl" + "gMEvTNk2eYa5XEyh12Ex17Z8vzQUR3KEPbYd6XG87eC4Ly75RneS5ZYHAAAA" + "AElFTkSuQmCC". + +create_image_files(Images_dir) -> + Filenames = [ + "powered-by-ejabberd.png", + "powered-by-erlang.png", + "valid-xhtml10.png", + "vcss.png" + ], + lists:foreach( + fun(Filename) -> + Filename_full = filename:join([Images_dir, Filename]), + {ok, F} = file:open(Filename_full, [write]), + Image = jlib:decode_base64(image_base64(Filename)), + io:format(F, "~s", [Image]), + file:close(F) + end, + Filenames), + ok. + fw(F, S, O) -> io:format(F, S ++ "~n", O). fw(F, S) -> fw(F, S, []). @@ -399,19 +568,19 @@ put_header(F, Room, Date, CSSFile, Lang, Hour_offset, Date_prev, Date_next, Top_ fw(F, "", [Lang, Lang]), fw(F, ""), fw(F, ""), - fw(F, "~s - ~s", [Room#room.title, Date]), + fw(F, "~s - ~s", [htmlize(Room#room.title), Date]), put_header_css(F, CSSFile), put_header_script(F), fw(F, ""), fw(F, ""), {Top_url, Top_text} = Top_link, fw(F, "", [Top_url, Top_text]), - fw(F, "", [Room#room.jid, Room#room.title]), + fw(F, "
    ~s
    ", [htmlize(Room#room.title)]), fw(F, "~s", [Room#room.jid, Room#room.jid]), fw(F, "
    ~s< ^ >
    ", [Date, Date_prev, Date_next]), - case {Room#room.subject_author, Room#room.subject} of + case {htmlize(Room#room.subject_author), htmlize(Room#room.subject)} of {"", ""} -> ok; - {SuA, Su} -> fw(F, "
    ~s~s~s
    ", [SuA, ?T(" has set the subject to: "), htmlize(Su)]) + {SuA, Su} -> fw(F, "
    ~s~s~s
    ", [SuA, ?T(" has set the subject to: "), Su]) end, RoomConfig = roomconfig_to_string(Room#room.config, Lang), put_room_config(F, RoomConfig, Lang), @@ -436,7 +605,7 @@ put_header_css(F, false) -> fw(F, ".mne {color: #AA0099;}"), fw(F, "a.nav {color: #AAAAAA; font-family: monospace; letter-spacing: 3px; text-decoration: none;}"), fw(F, "div.roomtitle {border-bottom: #224466 solid 3pt; margin-left: 20pt;}"), - fw(F, "a.roomtitle {color: #336699; font-size: 24px; font-weight: bold; font-family: sans-serif; letter-spacing: 3px; text-decoration: none;}"), + fw(F, "div.roomtitle {color: #336699; font-size: 24px; font-weight: bold; font-family: sans-serif; letter-spacing: 3px; text-decoration: none;}"), fw(F, "a.roomjid {color: #336699; font-size: 24px; font-weight: bold; font-family: sans-serif; letter-spacing: 3px; margin-left: 20pt; text-decoration: none;}"), fw(F, "div.logdate {color: #663399; font-size: 20px; font-weight: bold; font-family: sans-serif; letter-spacing: 2px; border-bottom: #224466 solid 1pt; margin-left:80pt; margin-top:20px;}"), fw(F, "div.roomsubject {color: #336699; font-size: 18px; font-family: sans-serif; margin-left: 80pt; margin-bottom: 10px;}"), @@ -485,11 +654,11 @@ htmlize(S1) -> S2_list). htmlize2(S1) -> - S2 = element(2, regexp:gsub(S1, "<", "\\<")), - S3 = element(2, regexp:gsub(S2, ">", "\\>")), - S4 = element(2, regexp:gsub(S3, "(http|ftp)://.[^ ]*", "&")), - %element(2, regexp:gsub(S4, " ", "\\ ")). - S4. + S2 = element(2, regexp:gsub(S1, "\\&", "\\&")), + S3 = element(2, regexp:gsub(S2, "<", "\\<")), + S4 = element(2, regexp:gsub(S3, ">", "\\>")), + S5 = element(2, regexp:gsub(S4, "(http|ftp)://.[^ ]*", "&")), + S6. get_room_info(RoomJID, Opts) -> Title = @@ -544,7 +713,7 @@ roomconfig_to_string(Options, Lang) -> T -> case Opt of password -> "
    " ++ OptText ++ "
    "; - title -> "
    " ++ ?T("Room title") ++ ": \"" ++ T ++ "\"
    "; + title -> "
    " ++ ?T("Room title") ++ ": \"" ++ htmlize(T) ++ "\"
    "; _ -> "\"" ++ T ++ "\"" end end, diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index 44eceb476..6c895d30b 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -1375,10 +1375,10 @@ lqueue_new(Max) -> max = Max}. %% If the message queue limit is set to 0, do not store messages. -lqueue_in(Item, LQ = #lqueue{max = 0}) -> +lqueue_in(_Item, LQ = #lqueue{max = 0}) -> LQ; %% Otherwise, rotate messages in the queue store. -lqueue_in(Item, LQ = #lqueue{queue = Q1, len = Len, max = Max}) -> +lqueue_in(Item, #lqueue{queue = Q1, len = Len, max = Max}) -> Q2 = queue:in(Item, Q1), if Len >= Max -> -- cgit v1.2.3 From 0b660a42f4da3162dff48ff4146fefb519ffbc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 22 Sep 2006 07:58:58 +0000 Subject: Bugfixes coming from trunk (SVN #603): * src/mod_muc/mod_muc_log.erl: bugfix. SVN Revision: 612 --- src/mod_muc/mod_muc_log.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_muc/mod_muc_log.erl b/src/mod_muc/mod_muc_log.erl index 15afd6350..1ba731e7c 100644 --- a/src/mod_muc/mod_muc_log.erl +++ b/src/mod_muc/mod_muc_log.erl @@ -658,7 +658,7 @@ htmlize2(S1) -> S3 = element(2, regexp:gsub(S2, "<", "\\<")), S4 = element(2, regexp:gsub(S3, ">", "\\>")), S5 = element(2, regexp:gsub(S4, "(http|ftp)://.[^ ]*", "&")), - S6. + S5. get_room_info(RoomJID, Opts) -> Title = -- cgit v1.2.3 From ec668cd85a5dbd726aa3d5e4a48fad3d1674f7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 22 Sep 2006 08:05:50 +0000 Subject: Update coming from trunk (SVN #604): * src/ejd2odbc.erl: Updated SVN Revision: 613 --- ChangeLog | 2 ++ src/ejd2odbc.erl | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index eef5e0557..a42f782fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-09-10 Alexey Shchepin + * src/ejd2odbc.erl: Updated + * src/mod_muc/mod_muc_log.erl: Fixed html special characters escaping, added new image buttons, chatroom titles now point to xmpp: URIs (thanks to Badlop) diff --git a/src/ejd2odbc.erl b/src/ejd2odbc.erl index a03af9d33..8a7f6ada0 100644 --- a/src/ejd2odbc.erl +++ b/src/ejd2odbc.erl @@ -74,7 +74,7 @@ export_roster(Server, Output) -> " and jid='", SJID, "';" "insert into rosterusers(" " username, jid, nick, " - " subscription, ask, " + " subscription, ask, askmessage, " " server, subscribe, type) " " values ", ItemVals, ";" "delete from rostergroups " @@ -271,7 +271,8 @@ output(LServer, IO, SQL) -> record_to_string(#roster{usj = {User, Server, JID}, name = Name, subscription = Subscription, - ask = Ask}) -> + ask = Ask, + askmessage = AskMessage}) -> Username = ejabberd_odbc:escape(User), SJID = ejabberd_odbc:escape(jlib:jid_to_string(JID)), Nick = ejabberd_odbc:escape(Name), @@ -295,6 +296,7 @@ record_to_string(#roster{usj = {User, Server, JID}, "'", Nick, "'," "'", SSubscription, "'," "'", SAsk, "'," + "'", AskMessage, "'," "'N', '', 'item')"]. groups_to_string(#roster{usj = {User, Server, JID}, -- cgit v1.2.3 From 677a6004cf5e2dc6f3e73f9cda4a31d890b9b8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 22 Sep 2006 08:08:37 +0000 Subject: Improvement coming from trunk (SVN #605): * src/odbc/mssql.sql: Removed unused fields. SVN Revision: 614 --- ChangeLog | 4 ++++ src/odbc/mssql.sql | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a42f782fe..b1f4326ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-09-11 Mickael Remond + + * src/odbc/mssql.sql: Removed unused fields. + 2006-09-10 Alexey Shchepin * src/ejd2odbc.erl: Updated diff --git a/src/odbc/mssql.sql b/src/odbc/mssql.sql index 6a8a298d9..49fcd218c 100644 --- a/src/odbc/mssql.sql +++ b/src/odbc/mssql.sql @@ -88,7 +88,6 @@ CREATE TABLE [dbo].[last] ( [username] [varchar] (250) NOT NULL , [seconds] [varchar] (50) NOT NULL , [state] [varchar] (100) NULL , - [Modify_Date] [datetime] NULL ) ON [PRIMARY] GO @@ -118,7 +117,6 @@ CREATE TABLE [dbo].[spool] ( [xml] [text] NULL , [notifyprocessed] [bit] NULL , [created] [datetime] NULL , - [MustDelete] [bit] NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO -- cgit v1.2.3 From 23b78b0f0c871183a56f40b05fc25e20b4c75a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 22 Sep 2006 08:36:09 +0000 Subject: Improvement coming from trunk (SVN #606): * doc/guide.tex: Updated (thanks to Evgeniy Khramtsov) * src/ejabberd_auth_ldap.erl: Better LDAP support (thanks to Evgeniy Khramtsov) * src/mod_vcard_ldap.erl: Likewise * src/eldap/eldap_filter.erl: Likewise SVN Revision: 615 --- ChangeLog | 9 + doc/guide.html | 1662 ++++++++++++++++++++++++++------------------ doc/guide.tex | 341 ++++++++- src/ejabberd_auth_ldap.erl | 353 ++++++++-- src/eldap/Makefile.in | 3 +- src/eldap/Makefile.win32 | 3 +- src/mod_vcard_ldap.erl | 877 ++++++++++++++--------- 7 files changed, 2176 insertions(+), 1072 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1f4326ac..2771d1a3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-09-14 Alexey Shchepin + + * doc/guide.tex: Updated (thanks to Evgeniy Khramtsov) + + * src/ejabberd_auth_ldap.erl: Better LDAP support (thanks to + Evgeniy Khramtsov) + * src/mod_vcard_ldap.erl: Likewise + * src/eldap/eldap_filter.erl: Likewise + 2006-09-11 Mickael Remond * src/odbc/mssql.sql: Removed unused fields. diff --git a/doc/guide.html b/doc/guide.html index 5c9558f34..3c8a473e0 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -1,46 +1,29 @@ +Ejabberd 1.1.1 Installation and Operation Guide - - -Ejabberd 1.1.1 Installation and Operation Guide - - - - + + - - + -

    - - -
    -

    Ejabberd 1.1.1 Installation and Operation Guide

    -

    Alexey Shchepin
    + +

    Ejabberd 1.1.1 Installation and Operation Guide

    + +

    Alexey Shchepin
    mailto:alexey@sevcom.net
    -xmpp:aleksey@jabber.ru


    +xmpp:aleksey@jabber.ru
    -
    +
    @@ -49,117 +32,125 @@ BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;}
    -
    I can thoroughly recommend ejabberd for ease of setup – +
    I can thoroughly recommend ejabberd for ease of setup -- Kevin Smith, Current maintainer of the Psi project
    - + -

    Contents

    +

    Table of Contents

    -
    • +
      • 1  Introduction -
        • + -
        • 2  Installation from Source -
          • +
          • 2  Installation from Source +
            • 2.1  Installation Requirements -
              • -2.1.1  “Unix-like” operating systems -
              • 2.1.2  Windows + -
              • 2.2  Obtaining ejabberd -
              • 2.3  Compilation - -
              • 3  Configuration -
                • +
                • 3  Configuration +
                  • 3.1  Initial Configuration -
                    • + -
                    • 3.2  Relational Database Support -
                      • +
                      • 3.2  Relational Database Support + -
                      • 3.3  Creating an Initial Administrator -
                      • 3.4  Online Configuration and Monitoring - -
                      • 4  Firewall Settings -
                      • 5  SRV Records -
                      • 6  Clustering -
                        • +
                        • 4  Firewall Settings +
                        • 5  SRV Records +
                        • 6  Clustering +
                          • 6.1  How it Works - -
                          • A  Built-in Modules -
                            • +
                            • A  Built-in Modules +
                              • A.1  Overview -
                              • A.2  Common Options - -
                              • B  Internationalization and Localization -
                              • C  Release Notes - -

                                1  Introduction

                                +

                                1  Introduction

                                @@ -171,135 +162,135 @@ BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;}
                                -

                                1.1  Key Features

                                +

                                1.1  Key Features

                                ejabberd is: -
                                • +
                                  • Multiplatform: ejabberd runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.

                                    -
                                  • Distributed: You can run ejabberd 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.
                                    +
                                  • Distributed: You can run ejabberd 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.

                                    -
                                  • Fault-tolerant: You can deploy an ejabberd 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 “on the fly”.
                                    +
                                  • Fault-tolerant: You can deploy an ejabberd 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 ``on the fly''.

                                    -
                                  • Administrator Friendly: ejabberd 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: -
                                    • +
                                    • Administrator Friendly: ejabberd 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: +
                                      • Comprehensive documentation. -
                                      • Straightforward installers for Linux, Mac OS X, and Windows. -
                                      • Web interface for administration tasks. -
                                      • Shared Roster Groups. -
                                      • Command line administration tool. -
                                      • Can integrate with existing authentication mechanisms. -
                                      • Capability to send announce messages. +
                                      • Straightforward installers for Linux, Mac OS X, and Windows. +
                                      • Web interface for administration tasks. +
                                      • Shared Roster Groups. +
                                      • Command line administration tool. +
                                      • Can integrate with existing authentication mechanisms. +
                                      • Capability to send announce messages.


                                      -
                                    • Internationalized: ejabberd leads in internationalization. Hence it is very well suited in a globalized world. Related features are: -
                                      • +
                                      • Internationalized: ejabberd leads in internationalization. Hence it is very well suited in a globalized world. Related features are: +
                                        • Translated in 11 languages. -
                                        • Support for IDNA. +
                                        • Support for IDNA.


                                        -
                                      • Open Standards: ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard. -
                                        • +
                                        • Open Standards: ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard. +
                                        -

                                        1.2  Additional Features

                                        +

                                        1.2  Additional Features

                                        Besides common Jabber server features, ejabberd comes with a wide range of other features: -
                                        • +
                                          • Modular -
                                            • +
                                              • Load only the modules you want. -
                                              • Extend ejabberd with your own custom modules. +
                                              • Extend ejabberd with your own custom modules.
                                              -
                                            • Security -
                                              • +
                                              • Security +
                                                • SASL and STARTTLS for c2s and s2s connections. -
                                                • STARTTLS and Dialback s2s connections. -
                                                • Web interface accessible via HTTPS secure access. +
                                                • STARTTLS and Dialback s2s connections. +
                                                • Web interface accessible via HTTPS secure access.
                                                -
                                              • Databases -
                                                • +
                                                • Databases +
                                                  • Native MySQL support. -
                                                  • Native PostgreSQL support. -
                                                  • Mnesia. -
                                                  • ODBC data storage support. -
                                                  • Microsoft SQL Server support (via ODBC). +
                                                  • Native PostgreSQL support. +
                                                  • Mnesia. +
                                                  • ODBC data storage support. +
                                                  • Microsoft SQL Server support (via ODBC).
                                                  -
                                                • Authentication -
                                                  • +
                                                  • Authentication +
                                                    • LDAP and ODBC. -
                                                    • External Authentication script. -
                                                    • Internal Authentication. +
                                                    • External Authentication script. +
                                                    • Internal Authentication.
                                                    -
                                                  • Others -
                                                    • +
                                                    • Others +
                                                      • Compressing XML streams with Stream Compression (JEP-0138). -
                                                      • Interface with networks such as AIM, ICQ and MSN. -
                                                      • Statistics via Statistics Gathering (JEP-0039). -
                                                      • IPv6 support both for c2s and s2s connections. -
                                                      • Multi-User Chat module with logging. -
                                                      • Users Directory based on users vCards. -
                                                      • Publish-Subscribe component. -
                                                      • Support for virtual hosting. -
                                                      • HTTP Polling service. -
                                                      • IRC transport. +
                                                      • Interface with networks such as AIM, ICQ and MSN. +
                                                      • Statistics via Statistics Gathering (JEP-0039). +
                                                      • IPv6 support both for c2s and s2s connections. +
                                                      • Multi-User Chat module with logging. +
                                                      • Users Directory based on users vCards. +
                                                      • Publish-Subscribe component. +
                                                      • Support for virtual hosting. +
                                                      • HTTP Polling service. +
                                                      • IRC transport.
                                                    -

                                                    2  Installation from Source

                                                    +

                                                    2  Installation from Source

                                                    -

                                                    2.1  Installation Requirements

                                                    +

                                                    2.1  Installation Requirements

                                                    - + -

                                                    2.1.1  “Unix-like” operating systems

                                                    +

                                                    2.1.1  ``Unix-like'' operating systems

                                                    -To compile ejabberd on a “Unix-like” operating system, you need: -
                                                    • +To compile ejabberd on a ``Unix-like'' operating system, 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 at all on systems with GNU libc). +
                                                      • 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 at all on systems with GNU libc).
                                                      -

                                                      2.1.2  Windows

                                                      +

                                                      2.1.2  Windows

                                                      To compile ejabberd on a Windows flavour, you need: -
                                                      • + -

                                                        2.2  Obtaining ejabberd

                                                        +

                                                        2.2  Obtaining ejabberd

                                                        @@ -308,49 +299,49 @@ Released versions of ejabberd can be obtained from

                                                        The latest development version can be retrieved from the Subversion repository. -
                                                        +
                                                           svn co http://svn.process-one.net/ejabberd/trunk ejabberd
                                                         
                                                        -

                                                        2.3  Compilation

                                                        +

                                                        2.3  Compilation

                                                        - + -

                                                        2.3.1  “Unix-like” operating systems

                                                        +

                                                        2.3.1  ``Unix-like'' operating systems

                                                        -Compile ejabberd on a “Unix-like” operating system by executing: -
                                                        +Compile ejabberd on a ``Unix-like'' operating system by executing:
                                                        +
                                                           ./configure
                                                           make
                                                           su
                                                           make install
                                                         
                                                        These commands will: -
                                                        • +
                                                          • 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 the configuration file into /etc/ejabberd, +
                                                          • create a directory called /var/log/ejabberd to store log files.
                                                          -

                                                          2.3.2  Windows

                                                          +

                                                          2.3.2  Windows

                                                          -
                                                          • +
                                                            • Install Erlang emulator (for example, into C:\Program Files\erl5.3). -
                                                            • Install Expat library into C:\Program Files\Expat-1.95.7 +
                                                            • Install Expat library into C:\Program Files\Expat-1.95.7 directory.

                                                              Copy file C:\Program Files\Expat-1.95.7\Libs\libexpat.dll to your Windows system directory (for example, C:\WINNT or C:\WINNT\System32) -
                                                            • Build and install the Iconv library into the directory +
                                                            • Build and install the Iconv library into the directory C:\Program Files\iconv-1.9.1.

                                                              Copy file C:\Program Files\iconv-1.9.1\bin\iconv.dll to your @@ -362,25 +353,25 @@ Note: instead of copying libexpat.dll and iconv.dll to the Windows C:\Program Files\Expat-1.95.7\Libs and C:\Program Files\iconv-1.9.1\bin to the PATH environment variable. -
                                                            • While in the directory ejabberd\src run: -
                                                              +
                                                            • While in the directory ejabberd\src run: +
                                                               configure.bat
                                                               nmake -f Makefile.win32
                                                              -
                                                            • Edit the file ejabberd\src\ejabberd.cfg and run -
                                                              +
                                                            • Edit the file ejabberd\src\ejabberd.cfg and run +
                                                               werl -s ejabberd -name ejabberd
                                                               
                                                            -

                                                            2.4  Starting

                                                            +

                                                            2.4  Starting

                                                            Execute the following command to start ejabberd: -
                                                            +
                                                               erl -pa /var/lib/ejabberd/ebin -name ejabberd -s ejabberd
                                                             
                                                            or -
                                                            +
                                                               erl -pa /var/lib/ejabberd/ebin -sname ejabberd -s ejabberd
                                                             
                                                            In the latter case the Erlang node will be identified using only the first part of the host name, i. e. other Erlang nodes outside this domain can't contact @@ -392,7 +383,7 @@ for storing its user database and for logging.

                                                            To specify the path to the configuration file, the log files and the Mnesia database directory, you may use the following command: -
                                                            +
                                                               erl -pa /var/lib/ejabberd/ebin \
                                                                   -sname ejabberd \
                                                                   -s ejabberd \
                                                            @@ -406,25 +397,25 @@ You can find other useful options in the Erlang manual page
                                                             
                                                            To use more than 1024 connections, you should set the environment variable ERL_MAX_PORTS: -
                                                            +
                                                               export ERL_MAX_PORTS=32000
                                                             
                                                            Note that with this value, ejabberd will use more memory (approximately 6 MB more).

                                                            To reduce memory usage, you may set the environment variable ERL_FULLSWEEP_AFTER: -
                                                            +
                                                               export ERL_FULLSWEEP_AFTER=0
                                                             
                                                            But in this case ejabberd can start to work slower.

                                                            -

                                                            3  Configuration

                                                            +

                                                            3  Configuration

                                                            -

                                                            3.1  Initial Configuration

                                                            +

                                                            3.1  Initial Configuration

                                                            @@ -435,12 +426,12 @@ configuration file are appended to the entries in the database. The configuration file contains a sequence of Erlang terms. Lines beginning with a `%' sign are ignored. Each term is a tuple of which the first element is the name of an option, and any further elements are that option's values. If the -configuration file do not contain for instance the “hosts” option, the old +configuration file do not contain for instance the ``hosts'' option, the old host name(s) stored in the database will be used.

                                                            You can override the old values stored in the database by adding next lines to the configuration file: -
                                                            +
                                                               override_global.
                                                               override_local.
                                                               override_acls.
                                                            @@ -449,7 +440,7 @@ before new ones are added.

                                                            -

                                                            3.1.1  Host Names

                                                            +

                                                            3.1.1  Host Names

                                                            @@ -457,23 +448,23 @@ The option hosts defines a list containing one or more domains that ejabberd will serve.

                                                            Examples: -
                                                            • +
                                                              • Serving one domain: -
                                                                • -
                                                                  +
                                                                  • +
                                                                       {hosts, ["example.org"]}.
                                                                    -
                                                                  • Backwards compatibility with older ejabberd versions can be retained +
                                                                • Backwards compatibility with older ejabberd versions can be retained with: -
                                                                  + 
                                                                     {host, "example.org"}.
                                                                   
                                                                -
                                                              • Serving two domains: -
                                                                +
                                                              • Serving two domains: +
                                                                   {hosts, ["example.net", "example.com"]}.
                                                                 
                                                              -

                                                              3.1.2  Default Language

                                                              +

                                                              3.1.2  Default Language

                                                              @@ -484,82 +475,82 @@ option language is "en". In order to take effect there must be translation file <language>.msg in ejabberd's msgs directory.

                                                              Examples: -
                                                              • +
                                                                • To set Russian as default language: -
                                                                  +
                                                                     {language, "ru"}.
                                                                  -
                                                                • To set Spanish as default language: -
                                                                  +
                                                                • To set Spanish as default language: +
                                                                     {language, "es"}.
                                                                   
                                                                -

                                                                3.1.3  Access Rules

                                                                +

                                                                3.1.3  Access Rules

                                                                Access control in ejabberd is performed via Access Control Lists (ACLs). The declarations of ACLs in the configuration file have the following syntax: -
                                                                +
                                                                   {acl, <aclname>, {<acltype>, ...}}.
                                                                 
                                                                <acltype> can be one of the following: -
                                                                -all
                                                                Matches all JIDs. Example: -
                                                                +
                                                                +all
                                                                Matches all JIDs. Example: +
                                                                 {acl, all, all}.
                                                                -
                                                                {user, <username>}
                                                                Matches the user with the name +
                                                                {user, <username>}
                                                                Matches the user with the name <username> at the first virtual host. Example: -
                                                                +
                                                                 {acl, admin, {user, "yozhik"}}.
                                                                -
                                                                {user, <username>, <server>}
                                                                Matches the user with the JID +
                                                                {user, <username>, <server>}
                                                                Matches the user with the JID <username>@<server> and any resource. Example: -
                                                                +
                                                                 {acl, admin, {user, "yozhik", "example.org"}}.
                                                                -
                                                                {server, <server>}
                                                                Matches any JID from server +
                                                                {server, <server>}
                                                                Matches any JID from server <server>. Example: -
                                                                +
                                                                 {acl, exampleorg, {server, "example.org"}}.
                                                                -
                                                                {user_regexp, <regexp>}
                                                                Matches any local user with a name that +
                                                                {user_regexp, <regexp>}
                                                                Matches any local user with a name that matches <regexp> at the first virtual host. Example: -
                                                                +
                                                                 {acl, tests, {user, "^test[0-9]*$"}}.
                                                                -
                                                                {user_regexp, <regexp>, <server>}
                                                                Matches any user with a name +
                                                                {user_regexp, <regexp>, <server>}
                                                                Matches any user with a name that matches <regexp> at server <server>. Example: -
                                                                +
                                                                 {acl, tests, {user, "^test", "example.org"}}.
                                                                -
                                                                {server_regexp, <regexp>}
                                                                Matches any JID from the server that +
                                                                {server_regexp, <regexp>}
                                                                Matches any JID from the server that matches <regexp>. Example: -
                                                                +
                                                                 {acl, icq, {server, "^icq\\."}}.
                                                                -
                                                                {node_regexp, <user_regexp>, <server_regexp>}
                                                                Matches any user +
                                                                {node_regexp, <user_regexp>, <server_regexp>}
                                                                Matches any user with a name that matches <user_regexp> at any server that matches <server_regexp>. Example: -
                                                                +
                                                                 {acl, yohzik, {node_regexp, "^yohzik$", "^example.(com|org)$"}}.
                                                                -
                                                                {user_glob, <glob>}
                                                                -
                                                                {user_glob, <glob>, <server>}
                                                                -
                                                                {server_glob, <glob>}
                                                                -
                                                                {node_glob, <user_glob>, <server_glob>}
                                                                This is the same as +
                                                                {user_glob, <glob>}
                                                                +
                                                                {user_glob, <glob>, <server>}
                                                                +
                                                                {server_glob, <glob>}
                                                                +
                                                                {node_glob, <user_glob>, <server_glob>}
                                                                This is the same as above. However, it uses shell glob patterns instead of regexp. These patterns can have the following special characters: -
                                                                - *
                                                                matches any string including the null string. -
                                                                ?
                                                                matches any single character. -
                                                                [...]
                                                                matches any of the enclosed characters. Character +
                                                                + *
                                                                matches any string including the null string. +
                                                                ?
                                                                matches any single character. +
                                                                [...]
                                                                matches any of the enclosed characters. Character ranges are specified by a pair of characters separated by a `-'. If the first character after `[' is a `!', any character not enclosed is matched.
                                                                The following ACLs are pre-defined: -
                                                                -all
                                                                Matches any JID. -
                                                                none
                                                                Matches no JID. +
                                                                +all
                                                                Matches any JID. +
                                                                none
                                                                Matches no JID.
                                                                An entry allowing or denying access to different services looks similar to this: -
                                                                +
                                                                   {access, <accessname>, [{allow, <aclname>},
                                                                                           {deny, <aclname>},
                                                                                           ...
                                                                @@ -567,57 +558,57 @@ this:
                                                                 
                                                                When a JID is checked to have access to <accessname>, the server sequentially checks if that JID mathes any of the ACLs that are named in the second elements of the tuples in the list. If it matches, the first element of -the first matched tuple is returned, otherwise “deny” is returned.
                                                                +the first matched tuple is returned, otherwise ``deny'' is returned.

                                                                Example: -
                                                                +
                                                                   {access, configure, [{allow, admin}]}.
                                                                   {access, something, [{deny, badmans},
                                                                                        {allow, all}]}.
                                                                 
                                                                The following access rules are pre-defined: -
                                                                -all
                                                                Always returns “allow” -
                                                                none
                                                                Always returns “deny” +
                                                                +all
                                                                Always returns ``allow'' +
                                                                none
                                                                Always returns ``deny''
                                                                -

                                                                3.1.4  Shapers

                                                                +

                                                                3.1.4  Shapers

                                                                Shapers enable you to limit connection traffic. The syntax of shapers is like this: -
                                                                +
                                                                   {shaper, <shapername>, <kind>}.
                                                                 
                                                                Currently only one kind of shaper called maxrate is available. It has the following syntax: -
                                                                +
                                                                   {maxrate, <rate>}
                                                                 
                                                                where <rate> stands for the maximum allowed incomig rate in bytes per second.

                                                                Examples: -
                                                                • -To define a shaper named “normal” with traffic speed limited to +
                                                                  • +To define a shaper named ``normal'' with traffic speed limited to 1,000 bytes/second: -
                                                                    +
                                                                       {shaper, normal, {maxrate, 1000}}.
                                                                    -
                                                                  • To define a shaper named “fast” with traffic speed limited to +
                                                                  • To define a shaper named ``fast'' with traffic speed limited to 50,000 bytes/second: -
                                                                    +
                                                                       {shaper, fast, {maxrate, 50000}}.
                                                                     
                                                                  -

                                                                  3.1.5  Limitation of the number of opened sessions

                                                                  +

                                                                  3.1.5  Limitation of the number of opened sessions

                                                                  This option specifies the maximum number of sessions (authenticated connections) per user. If a user tries to open more than the maximum number of allowed sessions, with different resources, the first opened session will be -disconnected. The error “session replaced” is send to the +disconnected. The error ``session replaced'' is send to the disconnected session. This value is either a number or infinity. For example {max\_user\_sessions, 10}. The default value is 10.

                                                                  @@ -625,21 +616,21 @@ This option can be define per virtual host. See section 3.1.6  Listened Sockets +

                                                                  3.1.6  Listened Sockets

                                                                  The option listen defines for which addresses and ports ejabberd will listen and what services will be run on them. Each element of the list is a tuple with the following elements: -
                                                                  • +
                                                                    • Port number. -
                                                                    • Module that serves this port. -
                                                                    • Options to this module. +
                                                                    • Module that serves this port. +
                                                                    • Options to this module.
                                                                    Currently next modules are implemented: -

                                                                    +

                                                                    @@ -683,18 +674,18 @@ Currently next modules are implemented:
                                                                    ejabberd_c2scertfile, http_poll, inet6, ip, tls, web_admin
                                                                    -

                                                                    +

                                                                    (*) The mechanism for external components is defined in Jabber Component Protocol (JEP-0114).

                                                                    The following options are available: -
                                                                    - {access, <access rule>}
                                                                    This option defines - access to the port. The default value is “all”. -
                                                                    {certfile, Path}
                                                                    Path to a file containing the SSL certificate. -
                                                                    {hosts, [Hostnames], [HostOptions]}
                                                                    This option +
                                                                    + {access, <access rule>}
                                                                    This option defines + access to the port. The default value is ``all''. +
                                                                    {certfile, Path}
                                                                    Path to a file containing the SSL certificate. +
                                                                    {hosts, [Hostnames], [HostOptions]}
                                                                    This option defines one or more hostnames of connected services and enables you to specify additional options including {password, Secret}. -
                                                                    http_poll
                                                                    +
                                                                    http_poll
                                                                    This option enables HTTP Polling (JEP-0025) support. HTTP Polling enables access via HTTP requests to ejabberd from behind firewalls which do not allow outgoing sockets on port 5222.
                                                                    @@ -706,85 +697,85 @@ If HTTP Polling is enabled, it will be available at JWChat (there is a tutorial to install JWChat with instructions for ejabberd). -
                                                                    inet6
                                                                    Set up the socket for IPv6. -
                                                                    {ip, IPAddress}
                                                                    This option specifies which network +
                                                                    inet6
                                                                    Set up the socket for IPv6. +
                                                                    {ip, IPAddress}
                                                                    This option specifies which network interface to listen for. For example {ip, {192, 168, 1, 1}}. -
                                                                    {max_stanza_size, Size}
                                                                    This +
                                                                    {max_stanza_size, Size}
                                                                    This option specifies an approximate maximal size in bytes of XML stanzas. For example {max\_stanza\_size, 65536}. The default value - is “infinity”. -
                                                                    {shaper, <access rule>}
                                                                    This option defines a + is ``infinity''. +
                                                                    {shaper, <access rule>}
                                                                    This option defines a shaper for the port (see section 3.1.4). The default value - is “none”. -
                                                                    ssl
                                                                    This option specifies that traffic on + is ``none''. +
                                                                    ssl
                                                                    This option specifies that traffic on the port will be encrypted using SSL. You should also set the certfile option. It is recommended to use the tls option instead. -
                                                                    starttls
                                                                    This option +
                                                                    starttls
                                                                    This option specifies that STARTTLS encryption is available on connections to the port. You should also set the certfile option. -
                                                                    starttls_required
                                                                    This option +
                                                                    starttls_required
                                                                    This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. You should also set the certfile option. -
                                                                    tls
                                                                    This option specifies that traffic on +
                                                                    tls
                                                                    This option specifies that traffic on the port will be encrypted using SSL immediately after connecting. You should also set the certfile option. -
                                                                    zlib
                                                                    This +
                                                                    zlib
                                                                    This option specifies that Zlib stream compression (as defined in JEP-0138) is available on connections to the port. Client cannot use stream compression and stream encryption simultaneously, so if you specify both tls (or ssl) and zlib the latter option will not affect connection at all. -
                                                                    web_admin
                                                                    This option +
                                                                    web_admin
                                                                    This option enables the web interface for ejabberd administration which is available at 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. + ``configure'' access rule.
                                                                    Also the following global options are available for s2s connections: -
                                                                    - {s2s_use_starttls, true|false}
                                                                    +
                                                                    + {s2s_use_starttls, true|false}
                                                                    This option defines whether to use STARTTLS for s2s connections. -
                                                                    {s2s_certfile, Path}
                                                                    Path to the +
                                                                    {s2s_certfile, Path}
                                                                    Path to the file containing the SSL certificate. -
                                                                    {domain_certfile, Domain, Path}
                                                                    Path +
                                                                    {domain_certfile, Domain, Path}
                                                                    Path to the file containing the SSL certificate for the specified domain.
                                                                    For instance, the following configuration defines that: -
                                                                    • +
                                                                      • c2s connections are listened for on port 5222 and 5223 (SSL) and denied - for the user “bad” -
                                                                      • s2s connections are listened for on port 5269 with STARTTLS for secured + for the user ``bad'' +
                                                                      • s2s connections are listened for on port 5269 with STARTTLS for secured traffic enabled. -
                                                                      • Port 5280 is serving the web interface and the HTTP Polling service. Note +
                                                                      • Port 5280 is serving the web interface and the HTTP Polling service. Note that it is also possible to serve them on different ports. The second example in section 3.4.1 shows how exactly this can be done. -
                                                                      • All users except for the administrators have a traffic of limit +
                                                                      • All users except for the administrators have a traffic of limit 1,000 Bytes/second -
                                                                      • The +
                                                                      • The AIM transport aim.example.org is connected to port 5233 with password - “aimsecret” -
                                                                      • The ICQ transport JIT (icq.example.org and + ``aimsecret'' +
                                                                      • The ICQ transport JIT (icq.example.org and sms.example.org) is connected to port 5234 with password - “jitsecret” -
                                                                      • The + ``jitsecret'' +
                                                                      • The MSN transport msn.example.org is connected to port 5235 with password - “msnsecret” -
                                                                      • The + ``msnsecret'' +
                                                                      • The Yahoo! transport yahoo.example.org is connected to port 5236 with password - “yahoosecret” -
                                                                      • The Gadu-Gadu transport gg.example.org is - connected to port 5237 with password “ggsecret” -
                                                                      • The + ``yahoosecret'' +
                                                                      • The Gadu-Gadu transport gg.example.org is + connected to port 5237 with password ``ggsecret'' +
                                                                      • The Jabber Mail Component jmc.example.org is connected to port 5238 with password - “jmcsecret” + ``jmcsecret''
                                                                      -
                                                                      +
                                                                         {acl, blocked, {user, "bad"}}.
                                                                         {access, c2s, [{deny, blocked},
                                                                                        {allow, all}]}.
                                                                      @@ -815,7 +806,7 @@ c2s connections are listened for on port 5222 and 5223 (SSL) and denied
                                                                         {s2s_certfile, "/path/to/ssl.pem"}.
                                                                       
                                                                      Note, that for jabberd 1.4- or WPJabber-based services you have to make the transports log and do XDB by themselves: -
                                                                      +
                                                                         <!--
                                                                            You have to add elogger and rlogger entries here when using ejabberd.
                                                                            In this case the transport will do the logging.
                                                                      @@ -847,7 +838,7 @@ services you have to make the transports log and do XDB by themselves:
                                                                       
                                                                      -

                                                                      3.1.7  Modules

                                                                      +

                                                                      3.1.7  Modules

                                                                      @@ -857,17 +848,17 @@ element is the name of a module and the second is a list of options for that module. Read section A for detailed information about modules.

                                                                      Examples: -
                                                                      • +
                                                                        • In this simple example, only the module mod_echo is loaded and no options are specified between square brackets: -
                                                                          + 
                                                                             {modules,
                                                                              [{mod_echo,      []}
                                                                              ]}.
                                                                          -
                                                                        • The second example is also simple: the modules mod_echo, mod_time, and +
                                                                        • The second example is also simple: the modules mod_echo, mod_time, and mod_version are loaded without options. Remark that, besides the last entry, all entries end with a comma: -
                                                                          + 
                                                                             {modules,
                                                                              [{mod_echo,      []},
                                                                               {mod_time,      []},
                                                                          @@ -876,22 +867,22 @@ In this simple example, only the module mod_echo is loaded and no
                                                                           
                                                                        -

                                                                        3.1.8  Virtual Hosting

                                                                        +

                                                                        3.1.8  Virtual Hosting

                                                                        Options can be defined separately for every virtual host using the host_config option. It has the following syntax: -
                                                                        +
                                                                           {host_config, <hostname>, [<option>, <option>, ...]}.
                                                                         
                                                                        Examples: -
                                                                        • +
                                                                          • Domain example.net is using the internal authentication method while domain example.com is using the LDAP server running on the domain localhost to perform authentication: -
                                                                            +
                                                                             {host_config, "example.net", [{auth_method, internal}]}.
                                                                             
                                                                             {host_config, "example.com", [{auth_method, ldap},
                                                                            @@ -900,10 +891,10 @@ Domain example.net is using the internal authentication method while
                                                                                                           {ldap_rootdn, "dc=localdomain"},
                                                                                                           {ldap_rootdn, "dc=example,dc=com"},
                                                                                                           {ldap_password, ""}]}.
                                                                            -
                                                                          • Domain example.net is using ODBC to perform authentication +
                                                                          • Domain example.net is using ODBC to perform authentication while domain example.com is using the LDAP servers running on the domains localhost and otherhost: -
                                                                            +
                                                                             {host_config, "example.net", [{auth_method, odbc},
                                                                                                           {odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}]}.
                                                                             
                                                                            @@ -916,24 +907,24 @@ Domain example.net is using the internal authentication method while
                                                                             
                                                                          -

                                                                          3.1.9  SASL anonymous and anonymous login

                                                                          +

                                                                          3.1.9  SASL anonymous and anonymous login

                                                                          The configuration of the anonymous mode can be done with three host_config parameters: -
                                                                          • +
                                                                            • auth_method: This value is used for defining the authentication method: internal, odbc, ldap, external). You now have a special extra option to enable anonymous mode: anonymous.

                                                                              -
                                                                            • allow_multiple_connections: This option can be either true or false and +
                                                                            • allow_multiple_connections: This option can be either true or false and is only used when the anonymous mode is enabled. Setting it to true means that the same username will be able to be taken several time in anonymous login mode if different resource are used to connect. This option is only useful in very special cases. It defaults to false.

                                                                              -
                                                                            • anonymous_protocol: This option can take three values: +
                                                                            • anonymous_protocol: This option can take three values: sasl_anon, login_anon or both. sasl_anon means that SASL anonymous mode is enabled. login_anon means that anonymous login mode is enabled. both means that SASL anonymous and login anonymous are @@ -943,26 +934,26 @@ Those options are defined for each virtual host with the host_config parameter (see section 3.1.8).

                                                                              Examples: -
                                                                              • +
                                                                                • To enable anonymous login on a virtual host: -
                                                                                  +
                                                                                   {host_config, "public.example.org", [{auth_method, anonymous},
                                                                                                                        {anonymous_protocol, login_anon}]}.
                                                                                  -
                                                                                • To enable anonymous login and internal authentication on a virtual host: -
                                                                                  +
                                                                                • To enable anonymous login and internal authentication on a virtual host: +
                                                                                   {host_config, "public.example.org", [{auth_method, [anonymous,internal]},
                                                                                                                        {anonymous_protocol, login_anon}]}.
                                                                                  -
                                                                                • To enable SASL anonymous on a virtual host: -
                                                                                  +
                                                                                • To enable SASL anonymous on a virtual host: +
                                                                                   {host_config, "public.example.org", [{auth_method, [anonymous]},
                                                                                                                        {anonymous_protocol, sasl_anon}]}.
                                                                                  -
                                                                                • To enable SASL anonymous and anonymous login on a virtual host: -
                                                                                  +
                                                                                • To enable SASL anonymous and anonymous login on a virtual host: +
                                                                                   {host_config, "public.example.org", [{auth_method, [anonymous]},
                                                                                                                        {anonymous_protocol, both}]}.
                                                                                  -
                                                                                • To enable SASL anonymous, anonymous login and internal authentication on +
                                                                                • To enable SASL anonymous, anonymous login and internal authentication on a virtual host: -
                                                                                  +
                                                                                   {host_config, "public.example.org", [{auth_method, [anonymous,internal]},
                                                                                                                        {anonymous_protocol, both}]}.
                                                                                   
                                                                                @@ -972,12 +963,12 @@ available from:
                                                                                -

                                                                                3.2  Relational Database Support

                                                                                +

                                                                                3.2  Relational Database Support

                                                                                -

                                                                                3.2.1  Preliminary steps

                                                                                +

                                                                                3.2.1  Preliminary steps

                                                                                If you have installed ejabberd using a binary version, the compilation steps @@ -987,17 +978,17 @@ Otherwise, to be able to use ejabberd with a relational database you need to enable ODBC modules during compilation, even if you want to use ejabberd with MySQL or PostgreSQL in native mode. The following configure command can be used to enable the relational modules: -
                                                                                +
                                                                                 ./configure --enable-odbc
                                                                                 
                                                                                If you are planning to use Microsoft SQL Server with ODBC, you need to specify it from the configure command before compilation: -
                                                                                +
                                                                                 ./configure --enable-odbc --enable-mssql
                                                                                 
                                                                                -

                                                                                3.2.2  Authentication against a relational database

                                                                                +

                                                                                3.2.2  Authentication against a relational database

                                                                                ejabberd use its internal Mnesia database as a default. It is however possible @@ -1010,7 +1001,7 @@ system.
                                                                                The option value name be misleading, as the method name is use both for access to relational database through ODBC or through the native interface. In any case, the first step is to define the odbc auth_method. For example: -
                                                                                +
                                                                                 {host_config, "public.example.org", [{auth_method, [odbc]}]}.
                                                                                 
                                                                                The actual database access is defined in the option odbc_server. Its @@ -1019,16 +1010,16 @@ interface available, PostgreSQL or MySQL.

                                                                                To use a relational database through ODBC, you can pass the ODBC connection string as odbc_server parameter. For example: -
                                                                                +
                                                                                 {odbc_server, "DSN=database;UID=ejabberd;PWD=password"}.
                                                                                 
                                                                                To use the native PostgreSQL interface, you can pass a tuple of the following form as parameter: -
                                                                                +
                                                                                 {pgsql, "Server", "Database", "Username", "Password"}
                                                                                 
                                                                                pgsql is a keyword that should be kept as is. For example: -
                                                                                +
                                                                                 {odbc_server, {pgsql, "localhost", "database", "ejabberd", "password"}}.
                                                                                 
                                                                                Note that you need to install the Erlang PgSQL library first. This library is @@ -1037,11 +1028,11 @@ available from Sourceforge: +
                                                                                 {mysql, "Server", "Database", "Username", "Password"}
                                                                                 
                                                                                mysql is a keyword that should be kept as is. For example: -
                                                                                +
                                                                                 {odbc_server, {mysql, "localhost", "test", "root", "password"}}.
                                                                                 
                                                                                Note that you need to install the Erlang MySQL library first. This library is @@ -1052,61 +1043,61 @@ available from:
                                                                                3.2.3  Relational database for other modules +

                                                                                3.2.3  Relational database for other modules

                                                                                It is possible to use a relational database to store pieces of information. You can do this by changing the module name to a name with an _odbc suffix in ejabberd config file. You can use a relational database for the following data: -
                                                                                • +
                                                                                  • Last connection date and time: Use mod_last_odbc instead of mod_last. -
                                                                                  • Offline messages: Use mod_offline_odbc instead of +
                                                                                  • Offline messages: Use mod_offline_odbc instead of mod_offline. -
                                                                                  • Rosters: Use mod_roster_odbc instead of mod_roster. -
                                                                                  • Users' VCARD: Use mod_vcard_odbc instead of mod_vcard. +
                                                                                  • Rosters: Use mod_roster_odbc instead of mod_roster. +
                                                                                  • Users' VCARD: Use mod_vcard_odbc instead of mod_vcard.
                                                                                  -

                                                                                  3.3  Creating an Initial Administrator

                                                                                  +

                                                                                  3.3  Creating an Initial Administrator

                                                                                  Before the web interface can be entered to perform administration tasks, an account with administrator rights is needed on your ejabberd deployment.

                                                                                  Instructions to create an initial administrator account: -
                                                                                  1. +
                                                                                    1. Register an account on your ejabberd deployment. An account can be created in two ways: -
                                                                                      1. +
                                                                                        1. Using the tool ejabberdctl (see section 3.4.2): -
                                                                                          + 
                                                                                           % ejabberdctl node@host register admin example.org password
                                                                                          -
                                                                                        2. Using In-Band Registration (see section A.14): you can +
                                                                                        3. Using In-Band Registration (see section A.14): you can use a Jabber client to register an account.
                                                                                        -
                                                                                      2. Edit the configuration file to promote the account created in the previous +
                                                                                      3. Edit the configuration file to promote the account created in the previous step to an account with administrator rights. Note that if you want to add more administrators, a seperate acl entry is needed for each administrator. -
                                                                                        + 
                                                                                           {acl, admins, {user, "admin", "example.org"}}.
                                                                                           {access, configure, [{allow, admins}]}.
                                                                                        -
                                                                                      4. Restart ejabberd to load the new configuration. -
                                                                                      5. Open the web interface (http://server:port/admin/) in your +
                                                                                      6. Restart ejabberd to load the new configuration. +
                                                                                      7. Open the web interface (http://server:port/admin/) in your favourite browser. Make sure to enter the full JID as username (in this example: admin@example.org. The reason that you also need to enter the suffix, is because ejabberd's virtual hosting support.
                                                                                      -

                                                                                      3.4  Online Configuration and Monitoring

                                                                                      +

                                                                                      3.4  Online Configuration and Monitoring

                                                                                      -

                                                                                      3.4.1  Web Interface

                                                                                      +

                                                                                      3.4.1  Web Interface

                                                                                      @@ -1117,24 +1108,22 @@ section 3.1.6). Then you can open will be asked to enter the username (the full Jabber ID) and password of an ejabberd user with administrator rights. After authentication you will see a page similar to figure 1. -

                                                                                      +


                                                                                      -
                                                                                      -
                                                                                      Figure 1: Top page from the web interface

                                                                                      -
                                                                                      +
                                                                                      Figure 1: Top page from the web interface

                                                                                      -

                                                                                      +

                                                                                      Here you can edit access restrictions, manage users, create backups, manage the database, enable/disable ports listened for, view server statistics,...

                                                                                      Examples: -
                                                                                      • +
                                                                                        • You can serve the web interface on the same port as the HTTP Polling interface. In this example you should point your web browser to http://example.org:5280/admin/ to @@ -1143,11 +1132,11 @@ You can serve the web interface on the same port as the the virtual host example.com. Before you get access to the web interface 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 “admin@example.net” to administer all virtual hosts (first - URL). If you log in with “admin@example.com” on
                                                                                          + username ``admin@example.net'' to administer all virtual hosts (first + URL). If you log in with ``admin@example.com'' on
                                                                                          http://example.org:5280/admin/server/example.com/ you can only administer the virtual host example.com. -
                                                                                          + 
                                                                                             ...
                                                                                             {acl, admins, {user, "admin", "example.net"}}.
                                                                                             {host_config, "example.com", [{acl, admins, {user, "admin", "example.com"}}]}.
                                                                                          @@ -1161,11 +1150,11 @@ You can serve the web interface on the same port as the
                                                                                               ...
                                                                                              ]
                                                                                             }.
                                                                                          -
                                                                                        • For security reasons, you can serve the web interface on a secured +
                                                                                        • For security reasons, you can serve the web interface 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 web browser to https://192.168.1.1:5280/admin/: -
                                                                                          + 
                                                                                             ...
                                                                                             {hosts, ["example.org"]}.
                                                                                             ...
                                                                                          @@ -1180,13 +1169,13 @@ You can serve the web interface on the same port as the
                                                                                           
                                                                                        -

                                                                                        3.4.2  ejabberdctl

                                                                                        +

                                                                                        3.4.2  ejabberdctl

                                                                                        It is possible to do some administration operations using the command line tool ejabberdctl. You can list all available options by running ejabberdctl without arguments: -
                                                                                        +
                                                                                         % ejabberdctl
                                                                                         Usage: ejabberdctl node command
                                                                                         
                                                                                        @@ -1211,27 +1200,27 @@ Example:
                                                                                           ejabberdctl ejabberd@host restart
                                                                                         
                                                                                        Additional information: -
                                                                                        -reopen-log
                                                                                        If you use a tool to rotate logs, you have to configure it +
                                                                                        +reopen-log
                                                                                        If you use a tool to rotate logs, you have to configure it so that this command is executed after each rotation. -
                                                                                        backup, restore, install-fallback, dump, load
                                                                                        You can use these +
                                                                                        backup, restore, install-fallback, dump, load
                                                                                        You can use these commands to create and restore backups. -
                                                                                        import-file, import-dir
                                                                                        +
                                                                                        import-file, import-dir
                                                                                        These options can be used to migrate from other Jabber/XMPP servers. There exist tutorials to migrate from jabberd 1.4 and to migrate from jabberd2. -
                                                                                        delete-expired-messages
                                                                                        This option can be used to delete old messages +
                                                                                        delete-expired-messages
                                                                                        This option can be used to delete old messages in offline storage. This might be useful when the number of offline messages is very high.
                                                                                        -

                                                                                        4  Firewall Settings

                                                                                        +

                                                                                        4  Firewall Settings

                                                                                        You need to take the following TCP ports in mind when configuring your firewall: -

                                                                                        +

                                                                                        @@ -1252,28 +1241,28 @@ You need to take the following TCP ports in mind when configuring your firewall:
                                                                                        Port DescriptionOnly for clustring (see 6). This range is configurable (see 2.4).
                                                                                        -

                                                                                        +

                                                                                        -

                                                                                        5  SRV Records

                                                                                        +

                                                                                        5  SRV Records

                                                                                        -
                                                                                        • + -

                                                                                          6  Clustering

                                                                                          +

                                                                                          6  Clustering

                                                                                          -

                                                                                          6.1  How it Works

                                                                                          +

                                                                                          6.1  How it Works

                                                                                          @@ -1286,15 +1275,15 @@ needed because all nodes exchange information about connected users, s2s connections, registered services, etc...

                                                                                          Each ejabberd node has the following modules: -
                                                                                          • +
                                                                                            • router, -
                                                                                            • local router, -
                                                                                            • session manager, -
                                                                                            • s2s manager. +
                                                                                            • local router, +
                                                                                            • session manager, +
                                                                                            • s2s manager.
                                                                                            -

                                                                                            6.1.1  Router

                                                                                            +

                                                                                            6.1.1  Router

                                                                                            This module is the main router of Jabber packets on each node. It @@ -1305,7 +1294,7 @@ appropriate process. If not, it is sent to the s2s manager.

                                                                                            -

                                                                                            6.1.2  Local Router

                                                                                            +

                                                                                            6.1.2  Local Router

                                                                                            This module routes packets which have a destination domain equal to @@ -1315,7 +1304,7 @@ on its content.

                                                                                            -

                                                                                            6.1.3  Session Manager

                                                                                            +

                                                                                            6.1.3  Session Manager

                                                                                            This module routes packets to local users. It looks up to which user @@ -1325,7 +1314,7 @@ storage, or bounced back.

                                                                                            -

                                                                                            6.1.4  s2s Manager

                                                                                            +

                                                                                            6.1.4  s2s Manager

                                                                                            This module routes packets to other Jabber servers. First, it @@ -1336,52 +1325,52 @@ serving this connection, otherwise a new connection is opened.

                                                                                            -

                                                                                            6.2  Clustering Setup

                                                                                            +

                                                                                            6.2  Clustering Setup

                                                                                            Suppose you already configured ejabberd on one machine named (first), and you need to setup another one to make an ejabberd cluster. Then do following steps: -
                                                                                            1. +
                                                                                              1. Copy ~ejabberd/.erlang.cookie file from first to second.

                                                                                                -(alt) You can also add “-cookie content_of_.erlang.cookie” - option to all “erl” commands below.
                                                                                                +(alt) You can also add ``-cookie content_of_.erlang.cookie'' + option to all ``erl'' commands below.

                                                                                                -
                                                                                              2. On second run as the `ejabberd' user in the directory +
                                                                                              3. On second run as the `ejabberd' user in the directory where ejabberd will work later the following command: -
                                                                                                +
                                                                                                 erl -sname ejabberd \
                                                                                                     -mnesia extra_db_nodes "['ejabberd@first']" \
                                                                                                     -s mnesia
                                                                                                 
                                                                                                This will start Mnesia serving the same database as ejabberd@first. - You can check this by running the command “mnesia:info().”. You + You can check this by running the command ``mnesia:info().''. You should see a lot of remote tables and a line like the following: -
                                                                                                +
                                                                                                 running db nodes   = [ejabberd@first, ejabberd@second]
                                                                                                 


                                                                                                -
                                                                                              4. Now run the following in the same “erl” session: -
                                                                                                +
                                                                                              5. Now run the following in the same ``erl'' session: +
                                                                                                 mnesia:change_table_copy_type(schema, node(), disc_copies).
                                                                                                 
                                                                                                This will create local disc storage for the database.

                                                                                                -(alt) Change storage type of `scheme' table to “RAM and disc - copy” on the second node via the web interface.
                                                                                                +(alt) Change storage type of `scheme' table to ``RAM and disc + copy'' on the second node via the web interface.

                                                                                                -
                                                                                              6. Now you can add replicas of various tables to this node with - “mnesia:add_table_copy” or - “mnesia:change_table_copy_type” as above (just replace - “schema” with another table name and “disc_copies” - can be replaced with “ram_copies” or - “disc_only_copies”).
                                                                                                +
                                                                                              7. Now you can add replicas of various tables to this node with + ``mnesia:add_table_copy'' or + ``mnesia:change_table_copy_type'' as above (just replace + ``schema'' with another table name and ``disc_copies'' + can be replaced with ``ram_copies'' or + ``disc_only_copies'').

                                                                                                Which tables to replicate is very dependant on your needs, you can get - some hints from the command “mnesia:info().”, by looking at the + some hints from the command ``mnesia:info().'', by looking at the size of tables and the default storage type for each table on 'first'.

                                                                                                Replicating a table makes lookups in this table faster on this node. @@ -1393,13 +1382,13 @@ Also Run “init:stop().” or just “q().” to exit from +
                                                                                              8. Run ``init:stop().'' or just ``q().'' to exit from the Erlang shell. This probably can take some time if Mnesia has not yet transfered and processed all data it needed from first.

                                                                                                -
                                                                                              9. Now run ejabberd on second with almost the same config as - on first (you probably don't need to duplicate “acl” - and “access” options — they will be taken from +
                                                                                              10. Now run ejabberd on second with almost the same config as + on first (you probably don't need to duplicate ``acl'' + and ``access'' options --- they will be taken from first, and mod_muc and mod_irc should be enabled only on one machine in the cluster).
                                                                                              @@ -1409,13 +1398,13 @@ domain.
                                                                                              -

                                                                                              A  Built-in Modules

                                                                                              +

                                                                                              A  Built-in Modules

                                                                                              -

                                                                                              A.1  Overview

                                                                                              +

                                                                                              A.1  Overview

                                                                                              @@ -1427,14 +1416,14 @@ that they can contain severe bugs and security leaks. Therefore, use them at your own risk!

                                                                                              You can see which database backend each module needs by looking at the suffix: -
                                                                                              • -“_ldap”, this means that the module needs an LDAP server as backend. -
                                                                                              • “_odbc”, this means that the module needs an ODBC compatible database, +
                                                                                                • +``_ldap'', this means that the module needs an LDAP server as backend. +
                                                                                                • ``_odbc'', this means that the module needs an ODBC compatible database, a MySQL database, or a PostgreSQL database as backend. -
                                                                                                • Nothing, this means that the modules uses Erlang's built-in database +
                                                                                                • Nothing, this means that the modules uses Erlang's built-in database Mnesia as backend.
                                                                                                -

                                                                                                +

                                                                                                @@ -1621,13 +1610,13 @@ You can see which database backend each module needs by looking at the suffix:
                                                                                                Module Feature  No
                                                                                                -

                                                                                                +

                                                                                                (*) This module or a similar one with another database backend is needed for XMPP compliancy.

                                                                                                -

                                                                                                A.2  Common Options

                                                                                                +

                                                                                                A.2  Common Options

                                                                                                The following options are used by many modules. Therefore, they are described in @@ -1635,7 +1624,7 @@ this separate section.

                                                                                                -

                                                                                                A.2.1  iqdisc

                                                                                                +

                                                                                                A.2.1  iqdisc

                                                                                                @@ -1643,23 +1632,23 @@ Many modules define handlers for processing IQ queries of different namespaces to this server or to a user (e. g. to example.org or to user@example.org). This option defines processing discipline for these queries. Possible values are: -
                                                                                                -no_queue
                                                                                                All queries of a namespace with this processing discipline are +
                                                                                                +no_queue
                                                                                                All queries of a namespace with this processing discipline are processed immediately. This also means that no other packets can be processed until this one has been completely processed. Hence this discipline is not recommended if the processing of a query can take a relatively long time. -
                                                                                                one_queue
                                                                                                In this case a separate queue is created for the processing +
                                                                                                one_queue
                                                                                                In this case a separate queue is created for the processing of IQ queries of a namespace with this discipline. In addition, the processing of this queue is done in parallel with that of other packets. This discipline is most recommended. -
                                                                                                parallel
                                                                                                For every packet with this discipline a separate Erlang process +
                                                                                                parallel
                                                                                                For every packet with this discipline a separate Erlang process is spawned. Consequently, all these packets are processed in parallel. Although spawning of Erlang process has a relatively low cost, this can break the server's normal work, because the Erlang emulator has a limit on the number of processes (32000 by default).
                                                                                                Example: -
                                                                                                +
                                                                                                   {modules,
                                                                                                    [
                                                                                                     ...
                                                                                                @@ -1669,7 +1658,7 @@ Example:
                                                                                                 
                                                                                                -

                                                                                                A.2.2  hosts

                                                                                                +

                                                                                                A.2.2  hosts

                                                                                                @@ -1677,19 +1666,19 @@ A module acting as a service can have one or more hostnames. These hostnames can be defined with the hosts option.

                                                                                                Examples: -
                                                                                                • +
                                                                                                  • Serving the echo module on one domain: -
                                                                                                    • -
                                                                                                      + 
                                                                                                      • +
                                                                                                           {modules,
                                                                                                            [
                                                                                                             ...
                                                                                                             {mod_echo, [{hosts, ["echo.example.org"]}]},
                                                                                                             ...
                                                                                                            ]}.
                                                                                                        -
                                                                                                      • Backwards compatibility with older ejabberd versions can be retained +
                                                                                                    • Backwards compatibility with older ejabberd versions can be retained with: -
                                                                                                      + 
                                                                                                         {modules,
                                                                                                          [
                                                                                                           ...
                                                                                                      @@ -1697,8 +1686,8 @@ Serving the echo module on one domain:
                                                                                                           ...
                                                                                                          ]}.
                                                                                                       
                                                                                                    -
                                                                                                  • Serving the echo module on two domains: -
                                                                                                    + 
                                                                                                  • Serving the echo module on two domains: +
                                                                                                       {modules,
                                                                                                        [
                                                                                                         ...
                                                                                                    @@ -1708,7 +1697,7 @@ Serving the echo module on one domain:
                                                                                                     
                                                                                                  -

                                                                                                  A.3  mod_announce

                                                                                                  +

                                                                                                  A.3  mod_announce

                                                                                                  @@ -1718,36 +1707,36 @@ Jabber client by sending messages to specific JIDs. These JIDs are listed in next paragraph. The first JID in each entry will apply only to the virtual host example.org, while the JID between brackets will apply to all virtual hosts: -
                                                                                                  -example.org/announce/all (example.org/announce/all-hosts/all)
                                                                                                  The +
                                                                                                  +example.org/announce/all (example.org/announce/all-hosts/all)
                                                                                                  The message is sent to all registered users. If the user is online and connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that offline storage (see section A.10) is enabled. -
                                                                                                  example.org/announce/online (example.org/announce/all-hosts/online)
                                                                                                  The +
                                                                                                  example.org/announce/online (example.org/announce/all-hosts/online)
                                                                                                  The message is sent to all connected users. If the user is online and connected to several resources, all resources will receive the message. -
                                                                                                  example.org/announce/motd (example.org/announce/all-hosts/motd)
                                                                                                  The +
                                                                                                  example.org/announce/motd (example.org/announce/all-hosts/motd)
                                                                                                  The message is set as the message of the day (MOTD) and is sent to users when they login. In addition the message is sent to all connected users (similar to announce/online). -
                                                                                                  example.org/announce/motd/update (example.org/announce/all-hosts/motd/update)
                                                                                                  +
                                                                                                  example.org/announce/motd/update (example.org/announce/all-hosts/motd/update)
                                                                                                  The message is set as message of the day (MOTD) and is sent to users when they login. The message is not sent to any currently connected user. -
                                                                                                  example.org/announce/motd/delete (example.org/announce/all-hosts/motd/delete)
                                                                                                  +
                                                                                                  example.org/announce/motd/delete (example.org/announce/all-hosts/motd/delete)
                                                                                                  Any message sent to this JID removes the existing message of the day (MOTD).
                                                                                                  Options: -
                                                                                                  -access
                                                                                                  This option specifies who is allowed to +
                                                                                                  +access
                                                                                                  This option specifies who is allowed to send announcements and to set the message of the day (by default, nobody is able to send such messages).
                                                                                                  Examples: -
                                                                                                  • +
                                                                                                    • Only administrators can send announcements: -
                                                                                                      + 
                                                                                                         {access, announce, [{allow, admins}]}.
                                                                                                       
                                                                                                         {modules,
                                                                                                      @@ -1756,8 +1745,8 @@ Only administrators can send announcements:
                                                                                                           {mod_announce, [{access, announce}]},
                                                                                                           ...
                                                                                                          ]}.
                                                                                                      -
                                                                                                    • Administrators as well as the direction can send announcements: -
                                                                                                      +
                                                                                                    • Administrators as well as the direction can send announcements: +
                                                                                                         {acl, direction, {user, "big_boss", "example.org"}}.
                                                                                                         {acl, direction, {user, "assistant", "example.org"}}.
                                                                                                         {acl, admins, {user, "admin", "example.org"}}.
                                                                                                      @@ -1774,7 +1763,7 @@ Only administrators can send announcements:
                                                                                                       
                                                                                                    -

                                                                                                    A.4  mod_disco

                                                                                                    +

                                                                                                    A.4  mod_disco

                                                                                                    @@ -1787,26 +1776,26 @@ the newer Service Discovery protocol if you want them be able to discover the services you offer.

                                                                                                    Options: -
                                                                                                    -iqdisc
                                                                                                    This specifies +
                                                                                                    +iqdisc
                                                                                                    This specifies the processing discipline for Service Discovery (http://jabber.org/protocol/disco#items and http://jabber.org/protocol/disco#info) IQ queries (see section A.2.1). -
                                                                                                    extra_domains
                                                                                                    With this option, +
                                                                                                    extra_domains
                                                                                                    With this option, extra domains can be added to the Service Discovery item list.
                                                                                                    Examples: -
                                                                                                    • +
                                                                                                      • To serve a link to the Jabber User Directory on jabber.org: -
                                                                                                        + 
                                                                                                           {modules,
                                                                                                            [
                                                                                                             ...
                                                                                                             {mod_disco, [{extra_domains, ["users.jabber.org"]}]},
                                                                                                             ...
                                                                                                            ]}.
                                                                                                        -
                                                                                                      • To serve a link to the transports on another server: -
                                                                                                        +
                                                                                                      • To serve a link to the transports on another server: +
                                                                                                           {modules,
                                                                                                            [
                                                                                                             ...
                                                                                                        @@ -1814,8 +1803,8 @@ To serve a link to the Jabber User Directory on jabber.org:
                                                                                                                                           "msn.example.com"]}]},
                                                                                                             ...
                                                                                                            ]}.
                                                                                                        -
                                                                                                      • To serve a link to a few friendly servers: -
                                                                                                        +
                                                                                                      • To serve a link to a few friendly servers: +
                                                                                                           {modules,
                                                                                                            [
                                                                                                             ...
                                                                                                        @@ -1826,7 +1815,7 @@ To serve a link to the Jabber User Directory on jabber.org:
                                                                                                         
                                                                                                      -

                                                                                                      A.5  mod_echo

                                                                                                      +

                                                                                                      A.5  mod_echo

                                                                                                      @@ -1835,31 +1824,31 @@ packet back to the sender. This mirror can be of interest for ejabberd and Jabber client debugging.

                                                                                                      Options: -
                                                                                                      +
                                                                                                      - hosts
                                                                                                      This option defines the hostnames of the + hosts
                                                                                                      This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “echo.” is added to all + the old host is present, the prefix ``echo.'' is added to all ejabberd hostnames.
                                                                                                      Examples: -
                                                                                                      • +
                                                                                                        • Mirror, mirror, on the wall, who is the most beautiful of them all? -
                                                                                                          + 
                                                                                                             {modules,
                                                                                                              [
                                                                                                               ...
                                                                                                               {mod_echo, [{hosts, ["mirror.example.org"]}]},
                                                                                                               ...
                                                                                                              ]}.
                                                                                                          -
                                                                                                        • If you still do not understand the inner workings of mod_echo, +
                                                                                                        • If you still do not understand the inner workings of mod_echo, you can find a few more examples in section A.2.2.
                                                                                                        -

                                                                                                        A.6  mod_irc

                                                                                                        +

                                                                                                        A.6  mod_irc

                                                                                                        @@ -1868,50 +1857,50 @@ servers.

                                                                                                        End user information: -
                                                                                                        • -A Jabber client with “groupchat 1.0” support or Multi-User +
                                                                                                          • +A Jabber client with ``groupchat 1.0'' support or Multi-User Chat support (JEP-0045) is necessary to join IRC channels. -
                                                                                                          • An IRC channel can be joined in nearly the same way as joining a +
                                                                                                          • An IRC channel can be joined in nearly the same way as joining a Jabber Multi-User Chat room. The difference is that the room name will - be “channel%irc.example.org” in case irc.example.org is - the IRC server hosting “channel”. And of course the host should point + be ``channel%irc.example.org'' in case irc.example.org is + the IRC server hosting ``channel''. And of course the host should point to the IRC transport instead of the Multi-User Chat service. -
                                                                                                          • You can register your nickame by sending “IDENTIFY password” to
                                                                                                            +
                                                                                                          • You can register your nickame by sending ``IDENTIFY password'' to
                                                                                                            nickserver!irc.example.org@irc.jabberserver.org. -
                                                                                                          • Entering your password is possible by sending “LOGIN nick password”
                                                                                                            +
                                                                                                          • Entering your password is possible by sending ``LOGIN nick password''
                                                                                                            to nickserver!irc.example.org@irc.jabberserver.org. -
                                                                                                          • When using a popular Jabber server, it can occur that no +
                                                                                                          • When using a popular Jabber server, it can occur that no connection can be achieved with some IRC servers because they limit the number of conections from one IP.
                                                                                                          Options: -
                                                                                                          +
                                                                                                          - hosts
                                                                                                          This option defines the hostnames of the + hosts
                                                                                                          This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “irc.” is added to all + the old host is present, the prefix ``irc.'' is added to all ejabberd hostnames. -
                                                                                                          access
                                                                                                          This option can be used to specify who +
                                                                                                          access
                                                                                                          This option can be used to specify who may use the IRC transport (default value: all).
                                                                                                          Examples: -
                                                                                                          • +
                                                                                                            • In the first example, the IRC transport is available on (all) your - virtual host(s) with the prefix “irc.”. Furthermore, anyone is + virtual host(s) with the prefix ``irc.''. Furthermore, anyone is able to use the transport. -
                                                                                                              + 
                                                                                                                 {modules,
                                                                                                                  [
                                                                                                                   ...
                                                                                                                   {mod_irc, [{access, all}]},
                                                                                                                   ...
                                                                                                                  ]}.
                                                                                                              -
                                                                                                            • In next example the IRC transport is available on the two virtual hosts +
                                                                                                            • In next example the IRC transport is available on the two virtual hosts example.net and example.com with different prefixes on each host. Moreover, the transport is only accessible by paying customers registered on our domains and on other servers. -
                                                                                                              + 
                                                                                                                 {acl, paying_customers, {user, "customer1", "example.net"}}.
                                                                                                                 {acl, paying_customers, {user, "customer2", "example.com"}}.
                                                                                                                 {acl, paying_customers, {user, "customer3", "example.org"}}.
                                                                                                              @@ -1929,7 +1918,7 @@ In the first example, the IRC transport is available on (all) your
                                                                                                               
                                                                                                            -

                                                                                                            A.7  mod_last

                                                                                                            +

                                                                                                            A.7  mod_last

                                                                                                            @@ -1939,14 +1928,14 @@ connected user was last active on the server, or to query the uptime of the ejabberd server.

                                                                                                            Options: -
                                                                                                            -iqdisc
                                                                                                            This specifies +
                                                                                                            +iqdisc
                                                                                                            This specifies the processing discipline for Last activity (jabber:iq:last) IQ queries (see section A.2.1).
                                                                                                            -

                                                                                                            A.8  mod_muc

                                                                                                            +

                                                                                                            A.8  mod_muc

                                                                                                            @@ -1955,34 +1944,34 @@ With this module enabled, your server will support Multi-User Chat that this module is not (yet) clusterable.

                                                                                                            Some of the features of Multi-User Chat: -
                                                                                                            • +
                                                                                                              • Sending private messages to room participants. -
                                                                                                              • Inviting users. -
                                                                                                              • Setting a conference topic. -
                                                                                                              • Creating password protected rooms. -
                                                                                                              • Kicking and banning participants. +
                                                                                                              • Inviting users. +
                                                                                                              • Setting a conference topic. +
                                                                                                              • Creating password protected rooms. +
                                                                                                              • Kicking and banning participants.
                                                                                                              Options: -
                                                                                                              +
                                                                                                              - hosts
                                                                                                              This option defines the hostnames of the + hosts
                                                                                                              This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “conference.” is added to all + the old host is present, the prefix ``conference.'' is added to all ejabberd hostnames. -
                                                                                                              access
                                                                                                              You can specify who is allowed to use +
                                                                                                              access
                                                                                                              You can specify who is allowed to use the Multi-User Chat service (by default, everyone is allowed to use it). -
                                                                                                              access_create
                                                                                                              To configure who is +
                                                                                                              access_create
                                                                                                              To configure who is allowed to create new rooms at the Multi-User Chat service, this option can be used (by default, everybody is allowed to create rooms). -
                                                                                                              access_admin
                                                                                                              This option specifies +
                                                                                                              access_admin
                                                                                                              This option specifies who is allowed to administrate the Multi-User Chat service (the default value is none, which means that only the room creator can administer his room). By sending a message to the service JID, administrators can send service messages that will be displayed in every active room.

                                                                                                              -
                                                                                                              history_size
                                                                                                              a small history of the +
                                                                                                              history_size
                                                                                                              a small history of the current discussion is send to users when they enter the room. This option make it possible to define the number of history messages to keep and send to the user joining the room. The value is a integer. Setting the value to 0 @@ -1990,17 +1979,17 @@ Options: is 20. This value is global and affects all MUC rooms on the server.
                                                                                                              Examples: -
                                                                                                              • +
                                                                                                                • In the first example everyone is allowed to use the Multi-User Chat service. Everyone will also be able to create new rooms but only the user admin@example.org is allowed to administrate any room. In this example he is also a global administrator. When admin@example.org - sends a message such as “Tomorrow, the Jabber server will be moved + sends a message such as ``Tomorrow, the Jabber server will be moved to new hardware. This will involve service breakdowns around 23:00 UMT. - We apologise for this inconvenience.” to conference.example.org, + We apologise for this inconvenience.'' to conference.example.org, it will be displayed in all active rooms. In this example the history feature is disabled. -
                                                                                                                  + 
                                                                                                                     {acl, admins, {user, "admin", "example.org"}}.
                                                                                                                     ...
                                                                                                                     {access, muc_admins, [{allow, admins}]}.
                                                                                                                  @@ -2014,17 +2003,17 @@ In the first example everyone is allowed to use the Multi-User Chat
                                                                                                                                  {history_size, 0}]},
                                                                                                                       ...
                                                                                                                      ]}.
                                                                                                                  -
                                                                                                                • In the second example the Multi-User Chat service is only accessible by +
                                                                                                                • In the second example the Multi-User Chat service is only accessible by paying customers registered on our domains and on other servers. Of course the administrator is also allowed to access rooms. In addition, he is the only authority able to create and administer rooms. When - admin@example.org sends a message such as “Tomorrow, the Jabber + admin@example.org sends a message such as ``Tomorrow, the Jabber server will be moved to new hardware. This will involve service breakdowns - around 23:00 UMT. We apologise for this inconvenience.” to + around 23:00 UMT. We apologise for this inconvenience.'' to conference.example.org, it will be displayed in all active rooms. No history_size option is used, this means that the feature is enabled and the default value of 20 history messages will be send to the users. -
                                                                                                                  + 
                                                                                                                     {acl, paying_customers, {user, "customer1", "example.net"}}.
                                                                                                                     {acl, paying_customers, {user, "customer2", "example.com"}}.
                                                                                                                     {acl, paying_customers, {user, "customer3", "example.org"}}.
                                                                                                                  @@ -2047,7 +2036,7 @@ In the first example everyone is allowed to use the Multi-User Chat
                                                                                                                   
                                                                                                                -

                                                                                                                A.9  mod_muc_log

                                                                                                                +

                                                                                                                A.9  mod_muc_log

                                                                                                                @@ -2056,53 +2045,53 @@ Once you enable this module, join a chatroom with enought privileges using a MUC request the configuration form and there you will have an option to enable chatroom logging.

                                                                                                                Some of the features of generated logs: -
                                                                                                                • +
                                                                                                                  • A lot of information about chatroom is added on top of the page: Room title, JID, subject author, subject and configuration. -
                                                                                                                  • Room title and JID are links to join the chatroom (using XMPP-IRI). -
                                                                                                                  • Subject and chatroom configuration changes are tracked and displayed. -
                                                                                                                  • Joins, leaves, nick changes, kicks, bans and /me are tracked and displayed, including the reason when available. -
                                                                                                                  • Generated HTML files are XHTML 1.0 Transitional and CSS compliant. -
                                                                                                                  • Timestamps are self-referencing links. -
                                                                                                                  • Links on top for quicker navigation: Previous day, Next day, Up. -
                                                                                                                  • CSS is used for style definition, and a custom CSS file can be used. -
                                                                                                                  • URLs on messages and subjects are converted to hyperlinks. -
                                                                                                                  • Timezone used on timestamps is shown on the log files. -
                                                                                                                  • A custom link can be added on top of page. +
                                                                                                                  • Room title and JID are links to join the chatroom (using XMPP-IRI). +
                                                                                                                  • Subject and chatroom configuration changes are tracked and displayed. +
                                                                                                                  • Joins, leaves, nick changes, kicks, bans and /me are tracked and displayed, including the reason when available. +
                                                                                                                  • Generated HTML files are XHTML 1.0 Transitional and CSS compliant. +
                                                                                                                  • Timestamps are self-referencing links. +
                                                                                                                  • Links on top for quicker navigation: Previous day, Next day, Up. +
                                                                                                                  • CSS is used for style definition, and a custom CSS file can be used. +
                                                                                                                  • URLs on messages and subjects are converted to hyperlinks. +
                                                                                                                  • Timezone used on timestamps is shown on the log files. +
                                                                                                                  • A custom link can be added on top of page.
                                                                                                                  Options: -
                                                                                                                  -access_log
                                                                                                                  +
                                                                                                                  +access_log
                                                                                                                  Restricts which users are allowed to enable or disable chatroom logging using ACL and ACCESS. Default: muc_admin. If you want to allow any chatroom owner put: muc. -
                                                                                                                  cssfile
                                                                                                                  +
                                                                                                                  cssfile
                                                                                                                  If HTMLs will use a custom CSS file or the embedded one. Allowed values: false: HTMLs will include the standard CSS code; "CSS-URL": the URL of the CSS file (for example: "http://example.com/my.css"). Default: false. -
                                                                                                                  dirtype
                                                                                                                  +
                                                                                                                  dirtype
                                                                                                                  Type of directory that will be created. Allowed values: subdirs: creates subdirectories for year and month; plain: the filename contains the full date, no subdirs. Default: subdirs. -
                                                                                                                  outdir
                                                                                                                  +
                                                                                                                  outdir
                                                                                                                  Full path to the directory where html will be generated. Make sure the system user has write access on that directory. Default: "www/muc". -
                                                                                                                  timezone
                                                                                                                  +
                                                                                                                  timezone
                                                                                                                  What timezone should be used. Allowed values: local: use local time, as reported to Erlang by the operating system; universal: use GMT/UTC time. Default: local. -
                                                                                                                  top_link
                                                                                                                  +
                                                                                                                  top_link
                                                                                                                  Customizable link on top right corner. Syntax of this option: {"URL", "Text"}. Default: {"/", "Home"}.
                                                                                                                  Example configuration: -
                                                                                                                  +
                                                                                                                     {modules,
                                                                                                                      [
                                                                                                                       ...
                                                                                                                  @@ -2119,7 +2108,7 @@ Example configuration:
                                                                                                                   
                                                                                                                  -

                                                                                                                  A.10  mod_offline

                                                                                                                  +

                                                                                                                  A.10  mod_offline

                                                                                                                  @@ -2131,78 +2120,78 @@ online again. Thus it is very similar to how email works. Note that
                                                                                                                  -

                                                                                                                  A.11  mod_privacy

                                                                                                                  +

                                                                                                                  A.11  mod_privacy

                                                                                                                  This module implements Blocking Communication (also known as Privacy Rules) as defined in section 10 from XMPP IM. If end users have support for it in their Jabber client, they will be able to: -
                                                                                                                  -
                                                                                                                  • +
                                                                                                                    +
                                                                                                                    • Retrieving one's privacy lists. -
                                                                                                                    • Adding, removing, and editing one's privacy lists. -
                                                                                                                    • Setting, changing, or declining active lists. -
                                                                                                                    • Setting, changing, or declining the default list (i.e., the list that +
                                                                                                                    • Adding, removing, and editing one's privacy lists. +
                                                                                                                    • Setting, changing, or declining active lists. +
                                                                                                                    • Setting, changing, or declining the default list (i.e., the list that is active by default). -
                                                                                                                    • Allowing or blocking messages based on JID, group, or subscription type +
                                                                                                                    • Allowing or blocking messages based on JID, group, or subscription type (or globally). -
                                                                                                                    • Allowing or blocking inbound presence notifications based on JID, group, +
                                                                                                                    • Allowing or blocking inbound presence notifications based on JID, group, or subscription type (or globally). -
                                                                                                                    • Allowing or blocking outbound presence notifications based on JID, group, +
                                                                                                                    • Allowing or blocking outbound presence notifications based on JID, group, or subscription type (or globally). -
                                                                                                                    • Allowing or blocking IQ stanzas based on JID, group, or subscription type +
                                                                                                                    • Allowing or blocking IQ stanzas based on JID, group, or subscription type (or globally). -
                                                                                                                    • Allowing or blocking all communications based on JID, group, or +
                                                                                                                    • Allowing or blocking all communications based on JID, group, or subscription type (or globally).
                                                                                                                    (from http://www.xmpp.org/specs/rfc3921.html#privacy)
                                                                                                                    Options: -
                                                                                                                    -iqdisc
                                                                                                                    This specifies +
                                                                                                                    +iqdisc
                                                                                                                    This specifies the processing discipline for Blocking Communication (jabber:iq:privacy) IQ queries (see section A.2.1).
                                                                                                                    -

                                                                                                                    A.12  mod_private

                                                                                                                    +

                                                                                                                    A.12  mod_private

                                                                                                                    This module adds support for Private XML Storage (JEP-0049): -
                                                                                                                    +
                                                                                                                    Using this method, Jabber entities can store private data on the server and retrieve it whenever necessary. The data stored might be anything, as long as it is valid XML. One typical usage for this namespace is the server-side storage of client-specific preferences; another is Bookmark Storage (JEP-0048).
                                                                                                                    Options: -
                                                                                                                    -iqdisc
                                                                                                                    This specifies +
                                                                                                                    +iqdisc
                                                                                                                    This specifies the processing discipline for Private XML Storage (jabber:iq:private) IQ queries (see section A.2.1).
                                                                                                                    -

                                                                                                                    A.13  mod_pubsub

                                                                                                                    +

                                                                                                                    A.13  mod_pubsub

                                                                                                                    This module offers a Publish-Subscribe Service (JEP-0060). Publish-Subscribe can be used to develop (examples are taken from the JEP): -
                                                                                                                    -
                                                                                                                    • +
                                                                                                                      +
                                                                                                                      • news feeds and content syndacation, -
                                                                                                                      • avatar management, -
                                                                                                                      • shared bookmarks, -
                                                                                                                      • auction and trading systems, -
                                                                                                                      • online catalogs, -
                                                                                                                      • workflow systems, -
                                                                                                                      • network management systems, -
                                                                                                                      • NNTP gateways, -
                                                                                                                      • vCard/profile management, -
                                                                                                                      • and weblogs. +
                                                                                                                      • avatar management, +
                                                                                                                      • shared bookmarks, +
                                                                                                                      • auction and trading systems, +
                                                                                                                      • online catalogs, +
                                                                                                                      • workflow systems, +
                                                                                                                      • network management systems, +
                                                                                                                      • NNTP gateways, +
                                                                                                                      • vCard/profile management, +
                                                                                                                      • and weblogs.
                                                                                                                      @@ -2212,21 +2201,21 @@ known as ESB, the Enterprise Service Bus). The J-EAI project builts upon ejabberd's codebase and has contributed several features to mod_pubsub.

                                                                                                                      Options: -
                                                                                                                      +
                                                                                                                      - hosts
                                                                                                                      This option defines the hostnames of the + hosts
                                                                                                                      This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “pubsub.” is added to all + the old host is present, the prefix ``pubsub.'' is added to all ejabberd hostnames. -
                                                                                                                      served_hosts
                                                                                                                      To specify which hosts needs to +
                                                                                                                      served_hosts
                                                                                                                      To specify which hosts needs to be served, you can use this option. If absent, only the main ejabberd - host is served.
                                                                                                                      access_createnode
                                                                                                                      + host is served.
                                                                                                                      access_createnode
                                                                                                                      Restricts which users are allowed to create pubsub nodes using ACL and ACCESS. Default: pubsub_createnode.
                                                                                                                      Example: -
                                                                                                                      +
                                                                                                                         {modules,
                                                                                                                          [
                                                                                                                           ...
                                                                                                                      @@ -2238,38 +2227,37 @@ Example:
                                                                                                                       
                                                                                                                      -

                                                                                                                      A.14  mod_register

                                                                                                                      +

                                                                                                                      A.14  mod_register

                                                                                                                      This module adds support for In-Band Registration (JEP-0077). This protocol enables end users to use a Jabber client to: -
                                                                                                                      • +
                                                                                                                        • Register a new account on the server. -
                                                                                                                        • Change the password from an existing account on the server. -
                                                                                                                        • Delete an existing account on the server. +
                                                                                                                        • Change the password from an existing account on the server. +
                                                                                                                        • Delete an existing account on the server.
                                                                                                                        Options: -
                                                                                                                        -access
                                                                                                                        This option can be configured to specify - rules to restrict registration. If a rule returns “deny” on the requested +
                                                                                                                        +access
                                                                                                                        This option can be configured to specify + rules to restrict registration. If a rule returns ``deny'' on the requested user name, registration for that user name is dennied. (there are no restrictions by default). -
                                                                                                                        iqdisc
                                                                                                                        This specifies +
                                                                                                                        iqdisc
                                                                                                                        This specifies the processing discipline for In-Band Registration (jabber:iq:register) IQ queries (see section A.2.1).
                                                                                                                        Examples: -
                                                                                                                        • -Next example prohibits the registration of too short account names and of - account names with exotic characters in it: -
                                                                                                                          +
                                                                                                                          • +Next example prohibits the registration of too short account names: +
                                                                                                                               {acl, shortname, {user_glob, "?"}}.
                                                                                                                               {acl, shortname, {user_glob, "??"}}.
                                                                                                                            -  {acl, strangename, {user_regexp, "^..?$"}}.
                                                                                                                            +  % The same using regexp:
                                                                                                                            +  %{acl, shortname, {user_regexp, "^..?$"}}.
                                                                                                                               ...
                                                                                                                               {access, register, [{deny, shortname},
                                                                                                                            -                      {deny, strangename},
                                                                                                                                                   {allow, all}]}.
                                                                                                                               ...
                                                                                                                               {modules,
                                                                                                                            @@ -2278,12 +2266,12 @@ Next example prohibits the registration of too short account names and of
                                                                                                                                 {mod_register, [{access, register}]},
                                                                                                                                 ...
                                                                                                                                ]}.
                                                                                                                            -
                                                                                                                          • The in-band registration of new accounts can be prohibited by changing the +
                                                                                                                        • The in-band registration of new accounts can be prohibited by changing the access option. If you really want to disable all In-Band Registration functionality, that is changing passwords in-band and deleting accounts in-band, you have to remove mod_register from the modules list. In this example all In-Band Registration functionality is disabled: -
                                                                                                                          + 
                                                                                                                             {access, register, [{deny, all}]}.
                                                                                                                           
                                                                                                                             {modules,
                                                                                                                          @@ -2295,21 +2283,21 @@ Next example prohibits the registration of too short account names and of
                                                                                                                           
                                                                                                                        -

                                                                                                                        A.15  mod_roster

                                                                                                                        +

                                                                                                                        A.15  mod_roster

                                                                                                                        This module implements roster management as defined in RFC 3921: XMPP IM.

                                                                                                                        Options: -
                                                                                                                        -iqdisc
                                                                                                                        This specifies +
                                                                                                                        +iqdisc
                                                                                                                        This specifies the processing discipline for Roster Management (jabber:iq:roster) IQ queries (see section A.2.1).
                                                                                                                        -

                                                                                                                        A.16  mod_service_log

                                                                                                                        +

                                                                                                                        A.16  mod_service_log

                                                                                                                        @@ -2320,25 +2308,25 @@ packets are encapsulated in a <route/> element and sent to th service(s).

                                                                                                                        Options: -
                                                                                                                        -loggers
                                                                                                                        With this option a (list of) service(s) +
                                                                                                                        +loggers
                                                                                                                        With this option a (list of) service(s) that will receive the packets can be specified.
                                                                                                                        Examples: -
                                                                                                                        • +
                                                                                                                          • To log all end user packets to the Bandersnatch service running on bandersnatch.example.com: -
                                                                                                                            + 
                                                                                                                               {modules,
                                                                                                                                [
                                                                                                                                 ...
                                                                                                                                 {mod_service_log, [{loggers, ["bandersnatch.example.com"]}]},
                                                                                                                                 ...
                                                                                                                                ]}.
                                                                                                                            -
                                                                                                                          • To log all end user packets to the Bandersnatch service running on +
                                                                                                                          • To log all end user packets to the Bandersnatch service running on bandersnatch.example.com and the backup service on bandersnatch.example.org: -
                                                                                                                            + 
                                                                                                                               {modules,
                                                                                                                                [
                                                                                                                                 ...
                                                                                                                            @@ -2349,7 +2337,7 @@ To log all end user packets to the Bandersnatch service running on
                                                                                                                             
                                                                                                                          -

                                                                                                                          A.17  mod_shared_roster

                                                                                                                          +

                                                                                                                          A.17  mod_shared_roster

                                                                                                                          @@ -2361,21 +2349,21 @@ users from the shared roster groups.

                                                                                                                          Shared roster groups can be edited only via the web interface. Each group has a unique identification and the following parameters: -
                                                                                                                          -Name
                                                                                                                          The name of the group, which will be displayed in the roster. -
                                                                                                                          Description
                                                                                                                          The description of the group. This parameter doesn't affect +
                                                                                                                          +Name
                                                                                                                          The name of the group, which will be displayed in the roster. +
                                                                                                                          Description
                                                                                                                          The description of the group. This parameter doesn't affect anything. -
                                                                                                                          Members
                                                                                                                          A list of full JIDs of group members, entered one per line in +
                                                                                                                          Members
                                                                                                                          A list of full JIDs of group members, entered one per line in the web interface. -
                                                                                                                          Displayed groups
                                                                                                                          A list of groups that will be in the rosters of this +
                                                                                                                          Displayed groups
                                                                                                                          A list of groups that will be in the rosters of this group's members.
                                                                                                                          Examples: -
                                                                                                                          • +
                                                                                                                            • Take the case of a computer club that wants all its members seeing each other in their rosters. To achieve this, they need to create a shared roster group similar to next table: -

                                                                                                                              +

                                                                                                                              @@ -2398,14 +2386,14 @@ Take the case of a computer club that wants all its members seeing each
                                                                                                                              Identification Group `club_members'
                                                                                                                              Displayed groups club_members
                                                                                                                              -

                                                                                                                              -
                                                                                                                            • In another case we have a company which has three divisions: Management, +

                                                                                                                            • +
                                                                                                                            • In another case we have a company which has three divisions: Management, Marketing and Sales. All group members should see all other members in their rosters. Additonally, all managers should have all marketing and sales people in their roster. Simultaneously, all marketeers and the whole sales team should see all managers. This scenario can be achieved by creating shared roster groups as shown in the following table: -

                                                                                                                              +

                                                                                                                              @@ -2472,25 +2460,25 @@ Take the case of a computer club that wants all its members seeing each
                                                                                                                              Identification Group `management'
                                                                                                                              sales
                                                                                                                              -

                                                                                                                              +

                                                                                                                            -

                                                                                                                            A.18  mod_stats

                                                                                                                            +

                                                                                                                            A.18  mod_stats

                                                                                                                            This module adds support for Statistics Gathering (JEP-0039). This protocol allows you to retrieve next statistics from your ejabberd deployment: -
                                                                                                                            • +
                                                                                                                              • Total number of registered users on the current virtual host (users/total). -
                                                                                                                              • Total number of registered users on all virtual hosts (users/all-hosts/total). -
                                                                                                                              • Total number of online users on the current virtual host (users/online). -
                                                                                                                              • Total number of online users on all virtual hosts (users/all-hosts/online). +
                                                                                                                              • Total number of registered users on all virtual hosts (users/all-hosts/total). +
                                                                                                                              • Total number of online users on the current virtual host (users/online). +
                                                                                                                              • Total number of online users on all virtual hosts (users/all-hosts/online).
                                                                                                                              Options: -
                                                                                                                              -iqdisc
                                                                                                                              This specifies +
                                                                                                                              +iqdisc
                                                                                                                              This specifies the processing discipline for Statistics Gathering (http://jabber.org/protocol/stats) IQ queries (see section A.2.1).
                                                                                                                              @@ -2498,18 +2486,18 @@ As there are only a small amount of clients (for example Tkabber) and software libraries with support for this JEP, a few examples are given of the XML you need to send in order to get the statistics. Here they are: -
                                                                                                                              • +
                                                                                                                                • You can request the number of online users on the current virtual host (example.org) by sending: -
                                                                                                                                  + 
                                                                                                                                   <iq to='example.org' type='get'>
                                                                                                                                     <query xmlns='http://jabber.org/protocol/stats'>
                                                                                                                                       <stat name='users/online'/>
                                                                                                                                     </query>
                                                                                                                                   </iq>
                                                                                                                                  -
                                                                                                                                • You can request the total number of registered users on all virtual hosts +
                                                                                                                                • You can request the total number of registered users on all virtual hosts by sending: -
                                                                                                                                  + 
                                                                                                                                   <iq to='example.org' type='get'>
                                                                                                                                     <query xmlns='http://jabber.org/protocol/stats'>
                                                                                                                                       <stat name='users/all-hosts/total'/>
                                                                                                                                  @@ -2518,7 +2506,7 @@ You can request the number of online users on the current virtual host
                                                                                                                                   
                                                                                                                                -

                                                                                                                                A.19  mod_time

                                                                                                                                +

                                                                                                                                A.19  mod_time

                                                                                                                                @@ -2526,14 +2514,14 @@ This module features support for Entity Time (
                                                                                                                                -iqdisc
                                                                                                                                This specifies +
                                                                                                                                +iqdisc
                                                                                                                                This specifies the processing discipline for Entity Time (jabber:iq:time) IQ queries (see section A.2.1).
                                                                                                                                -

                                                                                                                                A.20  mod_vcard

                                                                                                                                +

                                                                                                                                A.20  mod_vcard

                                                                                                                                @@ -2543,39 +2531,39 @@ implements an uncomplicated Jabber User Directory based on the vCards of these users. Moreover, it enables the server to send its vCard when queried.

                                                                                                                                Options: -
                                                                                                                                +
                                                                                                                                - hosts
                                                                                                                                This option defines the hostnames of the + hosts
                                                                                                                                This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “vjud.” is added to all + the old host is present, the prefix ``vjud.'' is added to all ejabberd hostnames. -
                                                                                                                                iqdisc
                                                                                                                                This specifies +
                                                                                                                                iqdisc
                                                                                                                                This specifies the processing discipline for vcard-temp IQ queries (see section A.2.1). -
                                                                                                                                search
                                                                                                                                This option specifies whether the search +
                                                                                                                                search
                                                                                                                                This option specifies whether the search functionality is enabled (value: true) or disabled (value: false). If disabled, the option hosts will be ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is true. -
                                                                                                                                matches
                                                                                                                                With this option, the number of reported +
                                                                                                                                matches
                                                                                                                                With this option, the number of reported search results can be limited. If the option's value is set to infinity, all search results are reported. The default value is 30. -
                                                                                                                                allow_return_all
                                                                                                                                This option enables +
                                                                                                                                allow_return_all
                                                                                                                                This option enables you to specify if search operations with empty input fields should return all users who added some information to their vCard. The default value is false. -
                                                                                                                                search_all_hosts
                                                                                                                                If this option is +
                                                                                                                                search_all_hosts
                                                                                                                                If this option is set to true, search operations will apply to all virtual hosts. Otherwise only the current host will be searched. The default value is true.
                                                                                                                                Examples: -
                                                                                                                                • +
                                                                                                                                  • In this first situation, search results are limited to twenty items, every user who added information to their vCard will be listed when people do an empty search, and only users from the current host will be returned: -
                                                                                                                                    + 
                                                                                                                                       {modules,
                                                                                                                                        [
                                                                                                                                         ...
                                                                                                                                    @@ -2585,9 +2573,9 @@ In this first situation, search results are limited to twenty items,
                                                                                                                                                      {search_all_hosts, false}]},
                                                                                                                                         ...
                                                                                                                                        ]}.
                                                                                                                                    -
                                                                                                                                  • The second situation differs in a way that search results are not limited, +
                                                                                                                                  • The second situation differs in a way that search results are not limited, and that all virtual hosts will be searched instead of only the current one: -
                                                                                                                                    + 
                                                                                                                                       {modules,
                                                                                                                                        [
                                                                                                                                         ...
                                                                                                                                    @@ -2597,9 +2585,338 @@ In this first situation, search results are limited to twenty items,
                                                                                                                                         ...
                                                                                                                                        ]}.
                                                                                                                                     
                                                                                                                                  + + +

                                                                                                                                  A.21  LDAP and mod_vcard_ldap

                                                                                                                                  + + + + + +

                                                                                                                                  A.21.1  Features

                                                                                                                                  + + +ejabberd has built-in LDAP support. You can authenticate users against LDAP +server and use LDAP directory as vCard storage. Shared rosters are not +supported yet.
                                                                                                                                  +
                                                                                                                                  + + +

                                                                                                                                  A.21.2  Connection

                                                                                                                                  + + +Parameters: +
                                                                                                                                  +ldap_server
                                                                                                                                  IP address or dns name of your +LDAP server. This option is required. +
                                                                                                                                  ldap_port
                                                                                                                                  Port to connect to LDAP server. +Default is 389. +
                                                                                                                                  ldap_rootdn
                                                                                                                                  Bind DN. Default is "" +which means anonymous connection. +
                                                                                                                                  ldap_password
                                                                                                                                  Bind password. Default +is "". +
                                                                                                                                  +Example: +
                                                                                                                                  +  {auth_method, ldap}.
                                                                                                                                  +  {ldap_servers, ["ldap.mydomain.org"]}.
                                                                                                                                  +  {ldap_port, 389}.
                                                                                                                                  +  {ldap_rootdn, "cn=Manager,dc=domain,dc=org"}.
                                                                                                                                  +  {ldap_password, "secret"}.
                                                                                                                                  +
                                                                                                                                  +Note that current LDAP implementation doesn't support SSL connection and SASL +authentication.
                                                                                                                                  +
                                                                                                                                  + + +

                                                                                                                                  A.21.3  Authentication

                                                                                                                                  + + +You can authenticate users against LDAP directory. Available parameters are +listed below: +
                                                                                                                                  +ldap_base
                                                                                                                                  LDAP base directory which stores users +accounts. This option is required. +
                                                                                                                                  ldap_uidattr
                                                                                                                                  LDAP attribute which holds +user's part of JID. Default is "uid". +
                                                                                                                                  ldap_uidattr_format
                                                                                                                                  Format of the +ldap_uidattr variable. Format MUST contain one and only one pattern +variable "%u" which will be replaced by user's part of JID. For example, +"%u@mydomain.org". Default value is "%u". +
                                                                                                                                  ldap_filter
                                                                                                                                  RFC 2254 LDAP filter. Default is +none. Example: "(&(objectClass=shadowAccount)(memberOf=Jabber + Users))". Please, don't forget closing brackets and don't use superfluous +whitespaces. Also you MUST NOT use ldap_uidattr attribute in filter +because this attribute will be substituted in LDAP filter automatically. +
                                                                                                                                  + + +

                                                                                                                                  A.21.4  vCards and Search

                                                                                                                                  + + +ejabberd can map LDAP attributes to vCard fields. This behaviour is +implemented in mod_vcard_ldap module. This module doesn't depend on +authentication method. mod_vcard_ldap module has it's own optional +parameters. The first group of parameters has the same meaning as top-level +LDAP parameters: ldap_servers, ldap_port, +ldap_rootdn, ldap_password, ldap_base, +ldap_uidattr, ldap_uidattr_format and +ldap_filter. If one of this option is not set ejabberd will look +for top-level option with the same name. The second group of parameters +consists of the following options: +
                                                                                                                                  + + hosts
                                                                                                                                  This option defines the hostnames of the + service (see section A.2.2). If neither hosts nor + the old host is present, the prefix ``vjud.'' is added to all + ejabberd hostnames. + +
                                                                                                                                  iqdisc
                                                                                                                                  This specifies +the processing discipline for vcard-temp IQ queries +(see section A.2.1). +
                                                                                                                                  search
                                                                                                                                  This option specifies whether the search + functionality is enabled (value: true) or disabled + (value: false). If disabled, the option hosts will be + ignored and the Jabber User Directory service will not appear in the + Service Discovery item list. The default value is true. +
                                                                                                                                  ldap_vcard_map
                                                                                                                                  the table which defines +reflection of LDAP attributes to vCard fields. + Format is: + [Name_of_vcard_field, Pattern, List_of_LDAP_attributes, ...] + where + Name_of_vcard_field is the type name of vCard as defined + in RFC 2426, + Pattern is a string which contains pattern variables "%u", "%d" or "%s", + List_of_LDAP_attributes is the list which contains of LDAP attributes. + Pattern variables "%s" will be sequentially replaced with the values of + LDAP attributes from List_of_LDAP_attributes; "%u" will be replaced with + user's part of JID and "%d" will be replaced with domain part of JID. + Example: +
                                                                                                                                  +  {ldap_vcard_map,
                                                                                                                                  +   [{"NICKNAME", "%u", []},
                                                                                                                                  +    {"FN", "%s", ["displayName"]},
                                                                                                                                  +    {"CTRY", "Russia", []},
                                                                                                                                  +    {"EMAIL", "%u@%d", []},
                                                                                                                                  +    {"DESC", "%s\n%s", ["title", "description"]}
                                                                                                                                  +   ]},
                                                                                                                                  +
                                                                                                                                  +Default is: +
                                                                                                                                  +  [{"NICKNAME", "%u", []},
                                                                                                                                  +   {"FN", "%s", ["displayName"]},
                                                                                                                                  +   {"FAMILY", "%s", ["sn"]},
                                                                                                                                  +   {"GIVEN", "%s", ["givenName"]},
                                                                                                                                  +   {"MIDDLE", "%s", ["initials"]},
                                                                                                                                  +   {"ORGNAME", "%s", ["o"]},
                                                                                                                                  +   {"ORGUNIT", "%s", ["ou"]},
                                                                                                                                  +   {"CTRY", "%s", ["c"]},
                                                                                                                                  +   {"LOCALITY", "%s", ["l"]},
                                                                                                                                  +   {"STREET", "%s", ["street"]},
                                                                                                                                  +   {"REGION", "%s", ["st"]},
                                                                                                                                  +   {"PCODE", "%s", ["postalCode"]},
                                                                                                                                  +   {"TITLE", "%s", ["title"]},
                                                                                                                                  +   {"URL", "%s", ["labeleduri"]},
                                                                                                                                  +   {"DESC", "%s", ["description"]},
                                                                                                                                  +   {"TEL", "%s", ["telephoneNumber"]},
                                                                                                                                  +   {"EMAIL", "%s", ["mail"]},
                                                                                                                                  +   {"BDAY", "%s", ["birthDay"]},
                                                                                                                                  +   {"ROLE", "%s", ["employeeType"]},
                                                                                                                                  +   {"PHOTO", "%s", ["jpegPhoto"]}]
                                                                                                                                  +
                                                                                                                                  ldap_search_fields
                                                                                                                                  This option defines +search form and LDAP attributes to search. + Format: + [Name, Attribute, ...] + where + Name is the name of field in the search form. Will be automatically + translated according to definitions in translation files (see + msgs/*.msg for available words). + Attribute is the LDAP attribute or the pattern "%u" + Example: +
                                                                                                                                  +  {ldap_search_fields,
                                                                                                                                  +   [{"User", "uid"},
                                                                                                                                  +    {"Full Name", "displayName"},
                                                                                                                                  +    {"Email", "mail"}
                                                                                                                                  +   ]},
                                                                                                                                  +
                                                                                                                                  +Default is: +
                                                                                                                                  +  [{"User", "%u"},
                                                                                                                                  +   {"Full Name", "displayName"},
                                                                                                                                  +   {"Given Name", "givenName"},
                                                                                                                                  +   {"Middle Name", "initials"},
                                                                                                                                  +   {"Family Name", "sn"},
                                                                                                                                  +   {"Nickname", "%u"},
                                                                                                                                  +   {"Birthday", "birthDay"},
                                                                                                                                  +   {"Country", "c"},
                                                                                                                                  +   {"City", "l"},
                                                                                                                                  +   {"Email", "mail"},
                                                                                                                                  +   {"Organization Name", "o"},
                                                                                                                                  +   {"Organization Unit", "ou"}]
                                                                                                                                  +
                                                                                                                                  ldap_search_reported
                                                                                                                                  This option defines search fields to be reported. + Format: + [Name, VCard_Name, ...] + where + Name is the name of field in the search form. Will be automatically + translated according to definitions in translation files (see + msgs/*.msg for available words). + VCard_Name is the name of vCard field defined in ldap_vcard_map option. + Example: +
                                                                                                                                  +  {ldap_search_reported,
                                                                                                                                  +   [{"Full Name", "FN"},
                                                                                                                                  +    {"Email", "EMAIL"},
                                                                                                                                  +    {"Birthday", "BDAY"},
                                                                                                                                  +    {"Nickname", "NICKNAME"}
                                                                                                                                  +   ]},
                                                                                                                                  +
                                                                                                                                  +Default is: +
                                                                                                                                  +  [{"Full Name", "FN"},
                                                                                                                                  +   {"Given Name", "GIVEN"},
                                                                                                                                  +   {"Middle Name", "MIDDLE"},
                                                                                                                                  +   {"Family Name", "FAMILY"},
                                                                                                                                  +   {"Nickname", "NICKNAME"},
                                                                                                                                  +   {"Birthday", "BDAY"},
                                                                                                                                  +   {"Country", "CTRY"},
                                                                                                                                  +   {"City", "LOCALITY"},
                                                                                                                                  +   {"Email", "EMAIL"},
                                                                                                                                  +   {"Organization Name", "ORGNAME"},
                                                                                                                                  +   {"Organization Unit", "ORGUNIT"}]
                                                                                                                                  +
                                                                                                                                  + + +

                                                                                                                                  A.21.5  Examples

                                                                                                                                  + + + + +
                                                                                                                                  Common example
                                                                                                                                  + +Let's say ldap.mydomain.org is the name of our LDAP server. We have +users with their passwords in "ou=Users,dc=mydomain,dc=org" directory. +Also we have addressbook, which contains users emails and their additional +infos in "ou=AddressBook,dc=mydomain,dc=org" directory. Corresponding +authentication section should looks like this: +
                                                                                                                                  +  %% authentication method
                                                                                                                                  +  {auth_method, ldap}.
                                                                                                                                  +  %% DNS name of our LDAP server
                                                                                                                                  +  {ldap_servers, ["ldap.mydomain.org"]}.
                                                                                                                                  +  %% Bind to LDAP server as "cn=Manager,dc=mydomain,dc=org" with password "secret"
                                                                                                                                  +  {ldap_rootdn, "cn=Manager,dc=mydomain,dc=org"}.
                                                                                                                                  +  {ldap_password, "secret"}.
                                                                                                                                  +  %% define the user's base
                                                                                                                                  +  {ldap_base, "ou=Users,dc=mydomain,dc=org"}.
                                                                                                                                  +  %% We want to authorize users from 'shadowAccount' object class only
                                                                                                                                  +  {ldap_filter, "(objectClass=shadowAccount)"}.
                                                                                                                                  +
                                                                                                                                  +Now we want to use users LDAP-info as their vCards. We have four attributes +defined in our LDAP schema: "mail" --- email address, "givenName" +--- first name, "sn" --- second name, "birthDay" --- birthday. +Also we want users to search each other. Let's see how we can set it up: +
                                                                                                                                  +  {modules,
                                                                                                                                  +    ...
                                                                                                                                  +    {mod_vcard_ldap,
                                                                                                                                  +     [
                                                                                                                                  +      %% We use the same server and port, but want to bind anonymously because
                                                                                                                                  +      %% our LDAP server accepts anonymous requests to
                                                                                                                                  +      %% "ou=AddressBook,dc=mydomain,dc=org" subtree.
                                                                                                                                  +      {ldap_rootdn, ""},
                                                                                                                                  +      {ldap_password, ""},
                                                                                                                                  +      %% define the addressbook's base
                                                                                                                                  +      {ldap_base, "ou=AddressBook,dc=mydomain,dc=org"},
                                                                                                                                  +      %% user's part of JID is located in the "mail" attribute
                                                                                                                                  +      {ldap_uidattr, "mail"},
                                                                                                                                  +      %% common format for our emails
                                                                                                                                  +      {ldap_uidattr_format, "%u@mail.mydomain.org"},
                                                                                                                                  +      %% We have to define empty filter here, because entries in addressbook doesn't
                                                                                                                                  +      %% belong to shadowAccount object class
                                                                                                                                  +      {ldap_filter, ""},
                                                                                                                                  +      %% Now we want to define vCard pattern
                                                                                                                                  +      {ldap_vcard_map,
                                                                                                                                  +       [{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname
                                                                                                                                  +        {"GIVEN", "%s", ["givenName"]},
                                                                                                                                  +        {"FAMILY", "%s", ["sn"]},
                                                                                                                                  +        {"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John"
                                                                                                                                  +        {"EMAIL", "%s", ["mail"]},
                                                                                                                                  +        {"BDAY", "%s", ["birthDay"]}]},
                                                                                                                                  +      %% Search form
                                                                                                                                  +      {ldap_search_fields,
                                                                                                                                  +       [{"User", "%u"},
                                                                                                                                  +        {"Name", "givenName"},
                                                                                                                                  +        {"Family Name", "sn"},
                                                                                                                                  +        {"Email", "mail"},
                                                                                                                                  +        {"Birthday", "birthDay"}]},
                                                                                                                                  +      %% vCard fields to be reported
                                                                                                                                  +      %% Note that JID is always returned with search results
                                                                                                                                  +      {ldap_search_reported,
                                                                                                                                  +       [{"Full Name", "FN"},
                                                                                                                                  +        {"Nickname", "NICKNAME"},
                                                                                                                                  +        {"Birthday", "BDAY"}]}
                                                                                                                                  +    ]}
                                                                                                                                  +    ...
                                                                                                                                  +  }.
                                                                                                                                  +
                                                                                                                                  +Note that mod_vcard_ldap module checks an existence of the user before +searching his info in LDAP.
                                                                                                                                  +
                                                                                                                                  + + +
                                                                                                                                  Active Directory
                                                                                                                                  + +Active Directory is just an LDAP-server with predefined attributes. Sample +config file is listed below: +
                                                                                                                                  +  {auth_method, ldap}.
                                                                                                                                  +  {ldap_servers, ["office.org"]}.    % List of LDAP servers
                                                                                                                                  +  {ldap_base, "DC=office,DC=org"}. % Search base of LDAP directory
                                                                                                                                  +  {ldap_rootdn, "CN=Administrator,CN=Users,DC=office,DC=org"}. % LDAP manager
                                                                                                                                  +  {ldap_password, "*******"}. % Password to LDAP manager
                                                                                                                                  +  {ldap_uidattr, "sAMAccountName"}.
                                                                                                                                  +  {ldap_filter, "(memberOf=*)"}.
                                                                                                                                  +  
                                                                                                                                  +  {mod_vcard_ldap,
                                                                                                                                  +   [{ldap_vcard_map,
                                                                                                                                  +     [{"NICKNAME", "%u", []},
                                                                                                                                  +      {"GIVEN", "%s", ["givenName"]},
                                                                                                                                  +      {"MIDDLE", "%s", ["initials"]},
                                                                                                                                  +      {"FAMILY", "%s", ["sn"]},
                                                                                                                                  +      {"FN", "%s", ["displayName"]},
                                                                                                                                  +      {"EMAIL", "%s", ["mail"]},
                                                                                                                                  +      {"ORGNAME", "%s", ["company"]},
                                                                                                                                  +      {"ORGUNIT", "%s", ["department"]},
                                                                                                                                  +      {"CTRY", "%s", ["c"]},
                                                                                                                                  +      {"LOCALITY", "%s", ["l"]},
                                                                                                                                  +      {"STREET", "%s", ["streetAddress"]},
                                                                                                                                  +      {"REGION", "%s", ["st"]},
                                                                                                                                  +      {"PCODE", "%s", ["postalCode"]},
                                                                                                                                  +      {"TITLE", "%s", ["title"]},
                                                                                                                                  +      {"URL", "%s", ["wWWHomePage"]},
                                                                                                                                  +      {"DESC", "%s", ["description"]},
                                                                                                                                  +      {"TEL", "%s", ["telephoneNumber"]}]},
                                                                                                                                  +    {ldap_search_fields,
                                                                                                                                  +     [{"User", "%u"},
                                                                                                                                  +      {"Name", "givenName"},
                                                                                                                                  +      {"Family Name", "sn"},
                                                                                                                                  +      {"Email", "mail"},
                                                                                                                                  +      {"Company", "company"},
                                                                                                                                  +      {"Department", "department"},
                                                                                                                                  +      {"Role", "title"},
                                                                                                                                  +      {"Description", "description"},
                                                                                                                                  +      {"Phone", "telephoneNumber"}]},
                                                                                                                                  +    {ldap_search_reported,
                                                                                                                                  +     [{"Full Name", "FN"},
                                                                                                                                  +      {"Nickname", "NICKNAME"},
                                                                                                                                  +      {"Email", "EMAIL"}]}
                                                                                                                                  +   ]
                                                                                                                                  +  }.
                                                                                                                                  +
                                                                                                                                  -

                                                                                                                                  A.21  mod_version

                                                                                                                                  +

                                                                                                                                  A.22  mod_version

                                                                                                                                  @@ -2607,20 +2924,20 @@ This module implements Software Version (
                                                                                                                                  -iqdisc
                                                                                                                                  This specifies +
                                                                                                                                  +iqdisc
                                                                                                                                  This specifies the processing discipline for Software Version (jabber:iq:version) IQ queries (see section A.2.1).
                                                                                                                                  -

                                                                                                                                  B  Internationalization and Localization

                                                                                                                                  +

                                                                                                                                  B  Internationalization and Localization

                                                                                                                                  All built-in modules support the xml:lang attribute inside IQ queries. Figure 2, for example, shows the reply to the following query: -
                                                                                                                                  +
                                                                                                                                     <iq id='5'
                                                                                                                                         to='example.org'
                                                                                                                                         type='get'
                                                                                                                                  @@ -2628,44 +2945,40 @@ Figure 2, for example, shows the reply to the f
                                                                                                                                       <query xmlns='http://jabber.org/protocol/disco#items'/>
                                                                                                                                     </iq>
                                                                                                                                   
                                                                                                                                  -

                                                                                                                                  +


                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  Figure 2: Service Discovery when xml:lang='ru'

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                  Figure 2: Service Discovery when xml:lang='ru'

                                                                                                                                  -

                                                                                                                                  +

                                                                                                                                  The web interface also supports the Accept-Language HTTP header (compare figure 3 with figure 1) -

                                                                                                                                  +


                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  Figure 3: Top page from the web interface with HTTP header - “Accept-Language: ru”

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                  Figure 3: Top page from the web interface with HTTP header + ``Accept-Language: ru''

                                                                                                                                  -

                                                                                                                                  +

                                                                                                                                  -

                                                                                                                                  C  Release Notes

                                                                                                                                  +

                                                                                                                                  C  Release Notes

                                                                                                                                  -

                                                                                                                                  C.1  ejabberd 0.9

                                                                                                                                  +

                                                                                                                                  C.1  ejabberd 0.9

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                          Release notes
                                                                                                                                           ejabberd 0.9
                                                                                                                                   
                                                                                                                                  @@ -2757,9 +3070,9 @@ Bugfixes
                                                                                                                                   
                                                                                                                                  -

                                                                                                                                  C.2  ejabberd 0.9.1

                                                                                                                                  +

                                                                                                                                  C.2  ejabberd 0.9.1

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                          Release notes
                                                                                                                                          ejabberd 0.9.1
                                                                                                                                   
                                                                                                                                  @@ -2825,9 +3138,9 @@ Bugfixes
                                                                                                                                   
                                                                                                                                  -

                                                                                                                                  C.3  ejabberd 0.9.8

                                                                                                                                  +

                                                                                                                                  C.3  ejabberd 0.9.8

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                          Release notes
                                                                                                                                          ejabberd 0.9.8
                                                                                                                                            2005-08-01
                                                                                                                                  @@ -2930,9 +3243,9 @@ END
                                                                                                                                   
                                                                                                                                  -

                                                                                                                                  C.4  ejabberd 1.0.0

                                                                                                                                  +

                                                                                                                                  C.4  ejabberd 1.0.0

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                          Release Notes
                                                                                                                                          ejabberd 1.0.0
                                                                                                                                          14 December 2005
                                                                                                                                  @@ -3056,9 +3369,9 @@ END
                                                                                                                                   
                                                                                                                                  -

                                                                                                                                  C.5  ejabberd 1.1.0

                                                                                                                                  +

                                                                                                                                  C.5  ejabberd 1.1.0

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                       Release Notes
                                                                                                                                       ejabberd 1.1.0
                                                                                                                                       24 April 2006
                                                                                                                                  @@ -3177,9 +3490,9 @@ END
                                                                                                                                   
                                                                                                                                  -

                                                                                                                                  C.6  ejabberd 1.1.1

                                                                                                                                  +

                                                                                                                                  C.6  ejabberd 1.1.1

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                       Release Notes
                                                                                                                                       ejabberd 1.1.1 
                                                                                                                                       28 April 2006
                                                                                                                                  @@ -3302,23 +3615,26 @@ END
                                                                                                                                   
                                                                                                                                  -

                                                                                                                                  D  Acknowledgements

                                                                                                                                  +

                                                                                                                                  D  Acknowledgements

                                                                                                                                  Thanks to all people who contributed to this guide: -
                                                                                                                                  • + -
                                                                                                                                    This document was translated from LATEX by -HEVEA.
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    This document was translated from LATEX by +HEVEA. +
                                                                                                                                    + diff --git a/doc/guide.tex b/doc/guide.tex index 53a07c585..ae37b8d04 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -1985,15 +1985,14 @@ Options: Examples: \begin{itemize} -\item Next example prohibits the registration of too short account names and of - account names with exotic characters in it: - \begin{verbatim} +\item Next example prohibits the registration of too short account names: +\begin{verbatim} {acl, shortname, {user_glob, "?"}}. {acl, shortname, {user_glob, "??"}}. - {acl, strangename, {user_regexp, "^..?$"}}. + % The same using regexp: + %{acl, shortname, {user_regexp, "^..?$"}}. ... {access, register, [{deny, shortname}, - {deny, strangename}, {allow, all}]}. ... {modules, @@ -2292,6 +2291,338 @@ Examples: \end{verbatim} \end{itemize} +\subsection{LDAP and \modvcardldap{}} +\label{sec:ldap} +\ind{modules!\modvcardldap{}}\ind{JUD}\ind{Jabber User Directory}\ind{vCard}\ind{protocols!JEP-0054: vcard-temp} + + +\subsubsection{Features} +\label{sec:ldapfeatures} + +\ejabberd{} has built-in LDAP support. You can authenticate users against LDAP +server and use LDAP directory as vCard storage. Shared rosters are not +supported yet. + + +\subsubsection{Connection} +\label{sec:ldapconnection} + +Parameters: + +\begin{description} +\titem{ldap\_server} \ind{options!ldap_server}IP address or dns name of your +LDAP server. This option is required. +\titem{ldap\_port} \ind{options!ldap_port}Port to connect to LDAP server. +Default is~389. +\titem{ldap\_rootdn} \ind{options!ldap_rootdn}Bind DN. Default is~\term{""} +which means anonymous connection. +\titem{ldap\_password} \ind{options!ldap_password}Bind password. Default +is~\term{""}. +\end{description} + +Example: +\begin{verbatim} + {auth_method, ldap}. + {ldap_servers, ["ldap.mydomain.org"]}. + {ldap_port, 389}. + {ldap_rootdn, "cn=Manager,dc=domain,dc=org"}. + {ldap_password, "secret"}. +\end{verbatim} + +Note that current LDAP implementation doesn't support SSL connection and SASL +authentication. + + +\subsubsection{Authentication} +\label{sec:ldapauthentication} + +You can authenticate users against LDAP directory. Available parameters are +listed below: + +\begin{description} +\titem{ldap\_base} \ind{options!ldap_base}LDAP base directory which stores users +accounts. This option is required. +\titem{ldap\_uidattr} \ind{options!ldap_uidattr}LDAP attribute which holds +user's part of JID. Default is \term{"uid"}. +\titem{ldap\_uidattr\_format} \ind{options!ldap_uidattr_format}Format of the +\term{ldap\_uidattr} variable. Format MUST contain one and only one pattern +variable \term{"\%u"} which will be replaced by user's part of JID. For example, +\term{"\%u@mydomain.org"}. Default value is \term{"\%u"}. +\titem{ldap\_filter} \ind{options!ldap_filter}RFC 2254 LDAP filter. Default is +\term{none}. Example: \term{"(\&(objectClass=shadowAccount)(memberOf=Jabber + Users))"}. Please, don't forget closing brackets and don't use superfluous +whitespaces. Also you MUST NOT use \option{ldap\_uidattr} attribute in filter +because this attribute will be substituted in LDAP filter automatically. +\end{description} + + +\subsubsection{vCards and Search} +\label{sec:modvcardldap} + +\ejabberd{} can map LDAP attributes to vCard fields. This behaviour is +implemented in \modvcardldap{} module. This module doesn't depend on +authentication method. \modvcardldap{} module has it's own optional +parameters. The first group of parameters has the same meaning as top-level +LDAP parameters: \option{ldap\_servers}, \option{ldap\_port}, +\option{ldap\_rootdn}, \option{ldap\_password}, \option{ldap\_base}, +\option{ldap\_uidattr}, \option{ldap\_uidattr\_format} and +\option{ldap\_filter}. If one of this option is not set \ejabberd{} will look +for top-level option with the same name. The second group of parameters +consists of the following options: + +\begin{description} +\hostitem{vjud} +\iqdiscitem{\ns{vcard-temp}} +\titem{search} \ind{options!search}This option specifies whether the search + functionality is enabled (value: \term{true}) or disabled + (value: \term{false}). If disabled, the option \term{hosts} will be + ignored and the \Jabber{} User Directory service will not appear in the + Service Discovery item list. The default value is \term{true}. +\titem{ldap\_vcard\_map} \ind{options!ldap_vcard_map}the table which defines +reflection of LDAP attributes to vCard fields. + Format is: + \term{[{Name\_of\_vcard\_field, Pattern, List\_of\_LDAP\_attributes}, ...]} + where + \term{Name\_of\_vcard\_field} is the type name of vCard as defined + in RFC 2426, + Pattern is a string which contains pattern variables \term{"\%u"}, \term{"\%d"} or \term{"\%s"}, + \term{List\_of\_LDAP\_attributes} is the list which contains of LDAP attributes. + Pattern variables \term{"\%s"} will be sequentially replaced with the values of + LDAP attributes from \term{List\_of\_LDAP\_attributes}; \term{"\%u"} will be replaced with + user's part of JID and \term{"\%d"} will be replaced with domain part of JID. + Example: +\begin{verbatim} + {ldap_vcard_map, + [{"NICKNAME", "%u", []}, + {"FN", "%s", ["displayName"]}, + {"CTRY", "Russia", []}, + {"EMAIL", "%u@%d", []}, + {"DESC", "%s\n%s", ["title", "description"]} + ]}, +\end{verbatim} + +Default is: +\begin{verbatim} + [{"NICKNAME", "%u", []}, + {"FN", "%s", ["displayName"]}, + {"FAMILY", "%s", ["sn"]}, + {"GIVEN", "%s", ["givenName"]}, + {"MIDDLE", "%s", ["initials"]}, + {"ORGNAME", "%s", ["o"]}, + {"ORGUNIT", "%s", ["ou"]}, + {"CTRY", "%s", ["c"]}, + {"LOCALITY", "%s", ["l"]}, + {"STREET", "%s", ["street"]}, + {"REGION", "%s", ["st"]}, + {"PCODE", "%s", ["postalCode"]}, + {"TITLE", "%s", ["title"]}, + {"URL", "%s", ["labeleduri"]}, + {"DESC", "%s", ["description"]}, + {"TEL", "%s", ["telephoneNumber"]}, + {"EMAIL", "%s", ["mail"]}, + {"BDAY", "%s", ["birthDay"]}, + {"ROLE", "%s", ["employeeType"]}, + {"PHOTO", "%s", ["jpegPhoto"]}] +\end{verbatim} +\titem{ldap\_search\_fields} \ind{options!ldap_search_fields}This option defines +search form and LDAP attributes to search. + Format: + \term{[{Name, Attribute}, ...]} + where + \term{Name} is the name of field in the search form. Will be automatically + translated according to definitions in translation files (see + \term{msgs/*.msg} for available words). + Attribute is the LDAP attribute or the pattern \term{"\%u"} + Example: +\begin{verbatim} + {ldap_search_fields, + [{"User", "uid"}, + {"Full Name", "displayName"}, + {"Email", "mail"} + ]}, +\end{verbatim} + +Default is: +\begin{verbatim} + [{"User", "%u"}, + {"Full Name", "displayName"}, + {"Given Name", "givenName"}, + {"Middle Name", "initials"}, + {"Family Name", "sn"}, + {"Nickname", "%u"}, + {"Birthday", "birthDay"}, + {"Country", "c"}, + {"City", "l"}, + {"Email", "mail"}, + {"Organization Name", "o"}, + {"Organization Unit", "ou"}] +\end{verbatim} +\titem{ldap\_search\_reported} \ind{options!ldap_search_reported}This option defines search fields to be reported. + Format: + \term{[{Name, VCard\_Name}, ...]} + where + \term{Name} is the name of field in the search form. Will be automatically + translated according to definitions in translation files (see + \term{msgs/*.msg} for available words). + \term{VCard\_Name} is the name of vCard field defined in \option{ldap\_vcard\_map} option. + Example: +\begin{verbatim} + {ldap_search_reported, + [{"Full Name", "FN"}, + {"Email", "EMAIL"}, + {"Birthday", "BDAY"}, + {"Nickname", "NICKNAME"} + ]}, +\end{verbatim} + +Default is: +\begin{verbatim} + [{"Full Name", "FN"}, + {"Given Name", "GIVEN"}, + {"Middle Name", "MIDDLE"}, + {"Family Name", "FAMILY"}, + {"Nickname", "NICKNAME"}, + {"Birthday", "BDAY"}, + {"Country", "CTRY"}, + {"City", "LOCALITY"}, + {"Email", "EMAIL"}, + {"Organization Name", "ORGNAME"}, + {"Organization Unit", "ORGUNIT"}] +\end{verbatim} +\end{description} + + +\subsubsection{Examples} +\label{sec:ldapexamples} + +\paragraph{Common example} + +Let's say \term{ldap.mydomain.org} is the name of our LDAP server. We have +users with their passwords in \term{"ou=Users,dc=mydomain,dc=org"} directory. +Also we have addressbook, which contains users emails and their additional +infos in \term{"ou=AddressBook,dc=mydomain,dc=org"} directory. Corresponding +authentication section should looks like this: + +\begin{verbatim} + %% authentication method + {auth_method, ldap}. + %% DNS name of our LDAP server + {ldap_servers, ["ldap.mydomain.org"]}. + %% Bind to LDAP server as "cn=Manager,dc=mydomain,dc=org" with password "secret" + {ldap_rootdn, "cn=Manager,dc=mydomain,dc=org"}. + {ldap_password, "secret"}. + %% define the user's base + {ldap_base, "ou=Users,dc=mydomain,dc=org"}. + %% We want to authorize users from 'shadowAccount' object class only + {ldap_filter, "(objectClass=shadowAccount)"}. +\end{verbatim} + +Now we want to use users LDAP-info as their vCards. We have four attributes +defined in our LDAP schema: \term{"mail"} --- email address, \term{"givenName"} +--- first name, \term{"sn"} --- second name, \term{"birthDay"} --- birthday. +Also we want users to search each other. Let's see how we can set it up: + +\begin{verbatim} + {modules, + ... + {mod_vcard_ldap, + [ + %% We use the same server and port, but want to bind anonymously because + %% our LDAP server accepts anonymous requests to + %% "ou=AddressBook,dc=mydomain,dc=org" subtree. + {ldap_rootdn, ""}, + {ldap_password, ""}, + %% define the addressbook's base + {ldap_base, "ou=AddressBook,dc=mydomain,dc=org"}, + %% user's part of JID is located in the "mail" attribute + {ldap_uidattr, "mail"}, + %% common format for our emails + {ldap_uidattr_format, "%u@mail.mydomain.org"}, + %% We have to define empty filter here, because entries in addressbook doesn't + %% belong to shadowAccount object class + {ldap_filter, ""}, + %% Now we want to define vCard pattern + {ldap_vcard_map, + [{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname + {"GIVEN", "%s", ["givenName"]}, + {"FAMILY", "%s", ["sn"]}, + {"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John" + {"EMAIL", "%s", ["mail"]}, + {"BDAY", "%s", ["birthDay"]}]}, + %% Search form + {ldap_search_fields, + [{"User", "%u"}, + {"Name", "givenName"}, + {"Family Name", "sn"}, + {"Email", "mail"}, + {"Birthday", "birthDay"}]}, + %% vCard fields to be reported + %% Note that JID is always returned with search results + {ldap_search_reported, + [{"Full Name", "FN"}, + {"Nickname", "NICKNAME"}, + {"Birthday", "BDAY"}]} + ]} + ... + }. +\end{verbatim} + +Note that \modvcardldap{} module checks an existence of the user before +searching his info in LDAP. + + +\paragraph{Active Directory} + +Active Directory is just an LDAP-server with predefined attributes. Sample +config file is listed below: + +\begin{verbatim} + {auth_method, ldap}. + {ldap_servers, ["office.org"]}. % List of LDAP servers + {ldap_base, "DC=office,DC=org"}. % Search base of LDAP directory + {ldap_rootdn, "CN=Administrator,CN=Users,DC=office,DC=org"}. % LDAP manager + {ldap_password, "*******"}. % Password to LDAP manager + {ldap_uidattr, "sAMAccountName"}. + {ldap_filter, "(memberOf=*)"}. + + {mod_vcard_ldap, + [{ldap_vcard_map, + [{"NICKNAME", "%u", []}, + {"GIVEN", "%s", ["givenName"]}, + {"MIDDLE", "%s", ["initials"]}, + {"FAMILY", "%s", ["sn"]}, + {"FN", "%s", ["displayName"]}, + {"EMAIL", "%s", ["mail"]}, + {"ORGNAME", "%s", ["company"]}, + {"ORGUNIT", "%s", ["department"]}, + {"CTRY", "%s", ["c"]}, + {"LOCALITY", "%s", ["l"]}, + {"STREET", "%s", ["streetAddress"]}, + {"REGION", "%s", ["st"]}, + {"PCODE", "%s", ["postalCode"]}, + {"TITLE", "%s", ["title"]}, + {"URL", "%s", ["wWWHomePage"]}, + {"DESC", "%s", ["description"]}, + {"TEL", "%s", ["telephoneNumber"]}]}, + {ldap_search_fields, + [{"User", "%u"}, + {"Name", "givenName"}, + {"Family Name", "sn"}, + {"Email", "mail"}, + {"Company", "company"}, + {"Department", "department"}, + {"Role", "title"}, + {"Description", "description"}, + {"Phone", "telephoneNumber"}]}, + {ldap_search_reported, + [{"Full Name", "FN"}, + {"Nickname", "NICKNAME"}, + {"Email", "EMAIL"}]} + ] + }. +\end{verbatim} + + \subsection{\modversion{}} \label{sec:modversion} \ind{modules!\modversion{}}\ind{protocols!JEP-0092: Software Version} diff --git a/src/ejabberd_auth_ldap.erl b/src/ejabberd_auth_ldap.erl index 6e454cb80..a1ce74609 100644 --- a/src/ejabberd_auth_ldap.erl +++ b/src/ejabberd_auth_ldap.erl @@ -10,8 +10,21 @@ -author('alexey@sevcom.net'). -vsn('$Revision$ '). +-behaviour(gen_server). + +%% gen_server callbacks +-export([init/1, + handle_info/2, + handle_call/3, + handle_cast/2, + terminate/2, + code_change/3 + ]). + %% External exports -export([start/1, + stop/1, + start_link/1, set_password/3, check_password/3, check_password/5, @@ -29,39 +42,84 @@ -include("ejabberd.hrl"). -include("eldap/eldap.hrl"). +-record(state, {host, + eldap_id, + servers, + port, + dn, + password, + base, + uidattr, + uidattr_format, + ufilter, + sfilter, + dn_filter, + dn_filter_attrs + }). + +%% Unused callbacks. +handle_cast(_Request, State) -> + {noreply, State}. +code_change(_OldVsn, State, _Extra) -> + {ok, State}. +handle_info(_Info, State) -> + {noreply, State}. +%% ----- + %%%---------------------------------------------------------------------- %%% API %%%---------------------------------------------------------------------- + start(Host) -> - LDAPServers = ejabberd_config:get_local_option({ldap_servers, Host}), - RootDN = ejabberd_config:get_local_option({ldap_rootdn, Host}), - Password = ejabberd_config:get_local_option({ldap_password, Host}), - eldap:start_link(get_eldap_id(Host, ejabberd), - LDAPServers, 389, RootDN, Password), - eldap:start_link(get_eldap_id(Host, ejabberd_bind), - LDAPServers, 389, RootDN, Password), + Proc = gen_mod:get_module_proc(Host, ?MODULE), + ChildSpec = { + Proc, {?MODULE, start_link, [Host]}, + permanent, 1000, worker, [?MODULE] + }, + supervisor:start_child(ejabberd_sup, ChildSpec). + +stop(Host) -> + Proc = gen_mod:get_module_proc(Host, ?MODULE), + gen_server:call(Proc, stop), + supervisor:terminate_child(ejabberd_sup, Proc), + supervisor:delete_child(ejabberd_sup, Proc). + +start_link(Host) -> + Proc = gen_mod:get_module_proc(Host, ?MODULE), + gen_server:start_link({local, Proc}, ?MODULE, Host, []). + +terminate(_Reason, State) -> + ejabberd_ctl:unregister_commands( + State#state.host, + [{"registered-users", "list all registered users"}], + ejabberd_auth, ctl_process_get_registered). + +init(Host) -> + State = parse_options(Host), + eldap:start_link(State#state.eldap_id, + State#state.servers, + State#state.port, + State#state.dn, + State#state.password), ejabberd_ctl:register_commands( Host, [{"registered-users", "list all registered users"}], ejabberd_auth, ctl_process_get_registered), - ok. + {ok, State}. + +-define(REPLY_TIMEOUT, 10000). plain_password_required() -> true. check_password(User, Server, Password) -> - case find_user_dn(User, Server) of - false -> + Proc = gen_mod:get_module_proc(Server, ?MODULE), + case catch gen_server:call(Proc, + {check_pass, User, Password}, ?REPLY_TIMEOUT) of + {'EXIT', _} -> false; - DN -> - LServer = jlib:nameprep(Server), - case eldap:bind(get_eldap_id(LServer, ejabberd_bind), - DN, Password) of - ok -> - true; - _ -> - false - end + Result -> + Result end. check_password(User, Server, Password, _StreamID, _Digest) -> @@ -77,31 +135,13 @@ dirty_get_registered_users() -> get_vh_registered_users(?MYNAME). get_vh_registered_users(Server) -> - LServer = jlib:nameprep(Server), - Attr = ejabberd_config:get_local_option({ldap_uidattr, LServer}), - Filter = eldap:present(Attr), - Base = ejabberd_config:get_local_option({ldap_base, LServer}), - case eldap:search(get_eldap_id(LServer, ejabberd), - [{base, Base}, - {filter, Filter}, - {attributes, [Attr]}]) of - #eldap_search_result{entries = Es} -> - lists:flatmap( - fun(E) -> - case lists:keysearch(Attr, 1, E#eldap_entry.attributes) of - {value, {_, [U]}} -> - case jlib:nodeprep(U) of - error -> - []; - LU -> - [{LU, LServer}] - end; - _ -> - [] - end - end, Es); - _ -> - [] + Proc = gen_mod:get_module_proc(Server, ?MODULE), + case catch gen_server:call(Proc, + get_vh_registered_users, ?REPLY_TIMEOUT) of + {'EXIT', _} -> + []; + Result -> + Result end. get_password(_User, _Server) -> @@ -111,11 +151,13 @@ get_password_s(_User, _Server) -> "". is_user_exists(User, Server) -> - case find_user_dn(User, Server) of - false -> + Proc = gen_mod:get_module_proc(Server, ?MODULE), + case catch gen_server:call(Proc, + {is_user_exists, User}, ?REPLY_TIMEOUT) of + {'EXIT', _} -> false; - _DN -> - true + Result -> + Result end. remove_user(_User, _Server) -> @@ -124,25 +166,212 @@ remove_user(_User, _Server) -> remove_user(_User, _Server, _Password) -> not_allowed. - %%%---------------------------------------------------------------------- %%% Internal functions %%%---------------------------------------------------------------------- +handle_call({check_pass, User, Password}, _From, State) -> + Reply = case find_user_dn(User, State) of + false -> + false; + DN -> + case eldap:bind(State#state.eldap_id, DN, Password) of + ok -> true; + _ -> false + end + end, + {reply, Reply, State}; + +handle_call(get_vh_registered_users, _From, State) -> + UA = State#state.uidattr, + UAF = State#state.uidattr_format, + Eldap_ID = State#state.eldap_id, + Server = State#state.host, + SortedDNAttrs = usort_attrs(State#state.dn_filter_attrs), + Reply = case eldap_filter:parse(State#state.sfilter) of + {ok, EldapFilter} -> + case eldap:search(Eldap_ID, [{base, State#state.base}, + {filter, EldapFilter}, + {attributes, SortedDNAttrs}]) of + #eldap_search_result{entries = Entries} -> + lists:flatmap( + fun(#eldap_entry{attributes = Attrs, + object_name = DN}) -> + case is_valid_dn(DN, Attrs, State) of + false -> []; + _ -> + case get_ldap_attr(UA, Attrs) of + "" -> []; + User -> + case get_user_part(User, UAF) of + {ok, U} -> + case jlib:nodeprep(U) of + error -> []; + LU -> [{LU, jlib:nameprep(Server)}] + end; + _ -> [] + end + end + end + end, Entries); + _ -> + [] + end; + _ -> + [] + end, + {reply, Reply, State}; + +handle_call({is_user_exists, User}, _From, State) -> + Reply = case find_user_dn(User, State) of + false -> false; + _DN -> true + end, + {reply, Reply, State}; + +handle_call(stop, _From, State) -> + {stop, normal, ok, State}; -find_user_dn(User, Server) -> - LServer = jlib:nameprep(Server), - Attr = ejabberd_config:get_local_option({ldap_uidattr, LServer}), - Filter = eldap:equalityMatch(Attr, User), - Base = ejabberd_config:get_local_option({ldap_base, LServer}), - case eldap:search(get_eldap_id(LServer, ejabberd), - [{base, Base}, - {filter, Filter}, - {attributes, []}]) of - #eldap_search_result{entries = [E | _]} -> - E#eldap_entry.object_name; +handle_call(_Request, _From, State) -> + {reply, bad_request, State}. + +find_user_dn(User, State) -> + DNAttrs = usort_attrs(State#state.dn_filter_attrs), + case eldap_filter:parse(State#state.ufilter, [{"%u", User}]) of + {ok, Filter} -> + case eldap:search(State#state.eldap_id, [{base, State#state.base}, + {filter, Filter}, + {attributes, DNAttrs}]) of + #eldap_search_result{entries = [#eldap_entry{attributes = Attrs, + object_name = DN} | _]} -> + is_valid_dn(DN, Attrs, State); + _ -> + false + end; _ -> false end. -get_eldap_id(Host, Name) -> - atom_to_list(gen_mod:get_module_proc(Host, Name)). +is_valid_dn(DN, _, #state{dn_filter = undefined}) -> + DN; + +is_valid_dn(DN, Attrs, State) -> + DNAttrs = State#state.dn_filter_attrs, + UA = State#state.uidattr, + UAF = State#state.uidattr_format, + Values = [{"%s", get_ldap_attr(Attr, Attrs), 1} || Attr <- DNAttrs], + SubstValues = case get_ldap_attr(UA, Attrs) of + "" -> Values; + S -> + case get_user_part(S, UAF) of + {ok, U} -> [{"%u", U} | Values]; + _ -> Values + end + end ++ [{"%d", State#state.host}, {"%D", DN}], + case eldap_filter:parse(State#state.dn_filter, SubstValues) of + {ok, EldapFilter} -> + case eldap:search(State#state.eldap_id, [ + {base, State#state.base}, + {filter, EldapFilter}, + {attributes, ["dn"]}]) of + #eldap_search_result{entries = [_|_]} -> + DN; + _ -> + false + end; + _ -> + false + end. + +%%%---------------------------------------------------------------------- +%%% Auxiliary functions +%%%---------------------------------------------------------------------- +get_user_part(String, Pattern) -> + F = fun(S, P) -> + First = string:str(P, "%u"), + TailLength = length(P) - (First+1), + string:sub_string(S, First, length(S) - TailLength) + end, + case catch F(String, Pattern) of + {'EXIT', _} -> + {error, badmatch}; + Result -> + case regexp:sub(Pattern, "%u", Result) of + {ok, String, _} -> {ok, Result}; + _ -> {error, badmatch} + end + end. + +case_insensitive_match(X, Y) -> + X1 = stringprep:tolower(X), + Y1 = stringprep:tolower(Y), + if + X1 == Y1 -> true; + true -> false + end. + +get_ldap_attr(LDAPAttr, Attributes) -> + Res = lists:filter( + fun({Name, _}) -> + case_insensitive_match(Name, LDAPAttr) + end, Attributes), + case Res of + [{_, [Value|_]}] -> Value; + _ -> "" + end. + +usort_attrs(Attrs) when is_list(Attrs) -> + lists:usort(Attrs); + +usort_attrs(_) -> + []. + +parse_options(Host) -> + Eldap_ID = atom_to_list(gen_mod:get_module_proc(Host, ?MODULE)), + LDAPServers = ejabberd_config:get_local_option({ldap_servers, Host}), + LDAPPort = case ejabberd_config:get_local_option({ldap_port, Host}) of + undefined -> 389; + P -> P + end, + RootDN = case ejabberd_config:get_local_option({ldap_rootdn, Host}) of + undefined -> ""; + RDN -> RDN + end, + Password = case ejabberd_config:get_local_option({ldap_password, Host}) of + undefined -> ""; + Pass -> Pass + end, + UIDAttr = case ejabberd_config:get_local_option({ldap_uidattr, Host}) of + undefined -> "uid"; + UA -> UA + end, + UIDAttrFormat = case ejabberd_config:get_local_option({ldap_uidattr_format, Host}) of + undefined -> "%u"; + UAF -> UAF + end, + SubFilter = "(" ++ UIDAttr ++ "=" ++ UIDAttrFormat ++ ")", + UserFilter = case ejabberd_config:get_local_option({ldap_filter, Host}) of + undefined -> SubFilter; + "" -> SubFilter; + F -> "(&" ++ SubFilter ++ F ++ ")" + end, + SearchFilter = eldap_filter:do_sub(UserFilter, [{"%u", "*"}]), + LDAPBase = ejabberd_config:get_local_option({ldap_base, Host}), + {DNFilter, DNFilterAttrs} = + case ejabberd_config:get_local_option({ldap_dn_filter, Host}) of + undefined -> {undefined, undefined}; + {DNF, DNFA} -> {DNF, DNFA} + end, + #state{host = Host, + eldap_id = Eldap_ID, + servers = LDAPServers, + port = LDAPPort, + dn = RootDN, + password = Password, + base = LDAPBase, + uidattr = UIDAttr, + uidattr_format = UIDAttrFormat, + ufilter = UserFilter, + sfilter = SearchFilter, + dn_filter = DNFilter, + dn_filter_attrs = DNFilterAttrs + }. diff --git a/src/eldap/Makefile.in b/src/eldap/Makefile.in index 91384b328..72e7b4632 100644 --- a/src/eldap/Makefile.in +++ b/src/eldap/Makefile.in @@ -12,7 +12,8 @@ OUTDIR = .. EFLAGS = -I .. -pz .. OBJS = \ $(OUTDIR)/eldap.beam \ - $(OUTDIR)/ELDAPv3.beam + $(OUTDIR)/ELDAPv3.beam \ + $(OUTDIR)/eldap_filter.beam all: $(OBJS) diff --git a/src/eldap/Makefile.win32 b/src/eldap/Makefile.win32 index 6feda635c..5d737d05a 100644 --- a/src/eldap/Makefile.win32 +++ b/src/eldap/Makefile.win32 @@ -6,7 +6,8 @@ EFLAGS = -I .. -pz .. OBJS = \ $(OUTDIR)\eldap.beam \ - $(OUTDIR)\ELDAPv3.beam + $(OUTDIR)\ELDAPv3.beam \ + $(OUTDIR)\eldap_filter.beam ALL : $(OBJS) diff --git a/src/mod_vcard_ldap.erl b/src/mod_vcard_ldap.erl index 68e1fc8a2..4389e4bce 100644 --- a/src/mod_vcard_ldap.erl +++ b/src/mod_vcard_ldap.erl @@ -1,8 +1,7 @@ - %%%---------------------------------------------------------------------- %%% File : mod_vcard_ldap.erl %%% Author : Alexey Shchepin -%%% Purpose : +%%% Purpose : Support for VCards from LDAP storage. %%% Created : 2 Jan 2003 by Alexey Shchepin %%% Id : $Id$ %%%---------------------------------------------------------------------- @@ -11,13 +10,26 @@ -author('alexey@sevcom.net'). -vsn('$Revision$ '). +-behaviour(gen_server). -behaviour(gen_mod). --export([start/2, init/3, stop/1, - get_sm_features/5, +%% gen_server callbacks. +-export([init/1, + handle_info/2, + handle_call/3, + handle_cast/2, + terminate/2, + code_change/3 + ]). + +-export([start/2, + start_link/2, + stop/1, + get_sm_features/5, process_local_iq/3, process_sm_iq/3, - remove_user/1]). + remove_user/1 + ]). -include("ejabberd.hrl"). -include("eldap/eldap.hrl"). @@ -25,69 +37,164 @@ -define(PROCNAME, ejabberd_mod_vcard_ldap). +-record(state, {serverhost, + myhost, + eldap_id, + search, + servers, + port, + dn, + base, + password, + uid, + uid_format, + vcard_map, + vcard_map_attrs, + user_filter, + search_filter, + search_fields, + search_reported, + search_reported_attrs + }). + +-define(VCARD_MAP, + [{"NICKNAME", "%u", []}, + {"FN", "%s", ["displayName"]}, + {"FAMILY", "%s", ["sn"]}, + {"GIVEN", "%s", ["givenName"]}, + {"MIDDLE", "%s", ["initials"]}, + {"ORGNAME", "%s", ["o"]}, + {"ORGUNIT", "%s", ["ou"]}, + {"CTRY", "%s", ["c"]}, + {"LOCALITY", "%s", ["l"]}, + {"STREET", "%s", ["street"]}, + {"REGION", "%s", ["st"]}, + {"PCODE", "%s", ["postalCode"]}, + {"TITLE", "%s", ["title"]}, + {"URL", "%s", ["labeleduri"]}, + {"DESC", "%s", ["description"]}, + {"TEL", "%s", ["telephoneNumber"]}, + {"EMAIL", "%s", ["mail"]}, + {"BDAY", "%s", ["birthDay"]}, + {"ROLE", "%s", ["employeeType"]}, + {"PHOTO", "%s", ["jpegPhoto"]} + ]). + +-define(SEARCH_FIELDS, + [{"User", "%u"}, + {"Full Name", "displayName"}, + {"Given Name", "givenName"}, + {"Middle Name", "initials"}, + {"Family Name", "sn"}, + {"Nickname", "%u"}, + {"Birthday", "birthDay"}, + {"Country", "c"}, + {"City", "l"}, + {"Email", "mail"}, + {"Organization Name", "o"}, + {"Organization Unit", "ou"} + ]). + +-define(SEARCH_REPORTED, + [{"Full Name", "FN"}, + {"Given Name", "GIVEN"}, + {"Middle Name", "MIDDLE"}, + {"Family Name", "FAMILY"}, + {"Nickname", "NICKNAME"}, + {"Birthday", "BDAY"}, + {"Country", "CTRY"}, + {"City", "LOCALITY"}, + {"Email", "EMAIL"}, + {"Organization Name", "ORGNAME"}, + {"Organization Unit", "ORGUNIT"} + ]). + +%% Unused callbacks. +handle_cast(_Request, State) -> + {noreply, State}. +code_change(_OldVsn, State, _Extra) -> + {ok, State}. +%% ----- + + start(Host, Opts) -> + Proc = gen_mod:get_module_proc(Host, ?PROCNAME), + ChildSpec = { + Proc, {?MODULE, start_link, [Host, Opts]}, + permanent, 1000, worker, [?MODULE] + }, + supervisor:start_child(ejabberd_sup, ChildSpec). + +stop(Host) -> + Proc = gen_mod:get_module_proc(Host, ?PROCNAME), + gen_server:call(Proc, stop), + supervisor:terminate_child(ejabberd_sup, Proc), + supervisor:delete_child(ejabberd_sup, Proc). + +terminate(_Reason, State) -> + Host = State#state.serverhost, + gen_iq_handler:remove_iq_handler(ejabberd_local, Host, ?NS_VCARD), + gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_VCARD), + ejabberd_hooks:delete(disco_sm_features, Host, ?MODULE, get_sm_features, 50), + case State#state.search of + true -> + ejabberd_router:unregister_route(State#state.myhost); + _ -> + ok + end. + +start_link(Host, Opts) -> + Proc = gen_mod:get_module_proc(Host, ?PROCNAME), + gen_server:start_link({local, Proc}, ?MODULE, [Host, Opts], []). + +init([Host, Opts]) -> + State = parse_options(Host, Opts), IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue), gen_iq_handler:add_iq_handler(ejabberd_local, Host, ?NS_VCARD, ?MODULE, process_local_iq, IQDisc), gen_iq_handler:add_iq_handler(ejabberd_sm, Host, ?NS_VCARD, ?MODULE, process_sm_iq, IQDisc), ejabberd_hooks:add(disco_sm_features, Host, ?MODULE, get_sm_features, 50), - LDAPServers = ejabberd_config:get_local_option({ldap_servers, Host}), - RootDN = ejabberd_config:get_local_option({ldap_rootdn, Host}), - Password = ejabberd_config:get_local_option({ldap_password, Host}), - eldap:start_link("mod_vcard_ldap", LDAPServers, 389, RootDN, Password), - MyHost = gen_mod:get_opt(host, Opts, "vjud." ++ Host), - Search = gen_mod:get_opt(search, Opts, true), - register(gen_mod:get_module_proc(Host, ?PROCNAME), - spawn(?MODULE, init, [MyHost, Host, Search])). - -init(Host, ServerHost, Search) -> - case Search of - false -> - loop(Host, ServerHost); + eldap:start_link(State#state.eldap_id, + State#state.servers, + State#state.port, + State#state.dn, + State#state.password), + case State#state.search of + true -> + ejabberd_router:register_route(State#state.myhost); _ -> - ejabberd_router:register_route(Host), - loop(Host, ServerHost) - end. - -loop(Host, ServerHost) -> - receive - {route, From, To, Packet} -> - case catch do_route(ServerHost, From, To, Packet) of - {'EXIT', Reason} -> - ?ERROR_MSG("~p", [Reason]); - _ -> - ok - end, - loop(Host, ServerHost); - stop -> - ejabberd_router:unregister_route(Host), - ok; + ok + end, + {ok, State}. + +handle_info({route, From, To, Packet}, State) -> + case catch do_route(State, From, To, Packet) of + {'EXIT', Reason} -> + Err = jlib:make_error_reply(Packet, ?ERR_INTERNAL_SERVER_ERROR), + ejabberd_router:route(To, From, Err), + %% Fail-Stop. Let the supervisor restarts us + {stop, Reason, State}; _ -> - loop(Host, ServerHost) - end. + {noreply, State} + end; -stop(Host) -> - gen_iq_handler:remove_iq_handler(ejabberd_local, Host, ?NS_VCARD), - gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_VCARD), - ejabberd_hooks:delete(disco_sm_features, Host, ?MODULE, get_sm_features, 50), - Proc = gen_mod:get_module_proc(Host, ?PROCNAME), - Proc ! stop, - {wait, Proc}. +handle_info(_Info, State) -> + {noreply, State}. get_sm_features({error, _Error} = Acc, _From, _To, _Node, _Lang) -> Acc; get_sm_features(Acc, _From, _To, Node, _Lang) -> case Node of - [] -> - case Acc of - {result, Features} -> - {result, [?NS_VCARD | Features]}; - empty -> - {result, [?NS_VCARD]} - end; - _ -> - Acc + [] -> + case Acc of + {result, Features} -> + {result, [?NS_VCARD | Features]}; + empty -> + {result, [?NS_VCARD]} + end; + _ -> + Acc end. process_local_iq(_From, _To, #iq{type = Type, lang = Lang, sub_el = SubEl} = IQ) -> @@ -102,7 +209,7 @@ process_local_iq(_From, _To, #iq{type = Type, lang = Lang, sub_el = SubEl} = IQ) [{xmlcdata, "ejabberd"}]}, {xmlelement, "URL", [], [{xmlcdata, - "http://ejabberd.jabberstudio.org/"}]}, + "http://ejabberd.jabber.ru/"}]}, {xmlelement, "DESC", [], [{xmlcdata, translate:translate( @@ -114,113 +221,165 @@ process_local_iq(_From, _To, #iq{type = Type, lang = Lang, sub_el = SubEl} = IQ) ]}]} end. -find_ldap_user(Host, User) -> - Attr = ejabberd_config:get_local_option({ldap_uidattr, Host}), - Filter = eldap:equalityMatch(Attr, User), - Base = ejabberd_config:get_local_option({ldap_base, Host}), - case eldap:search("mod_vcard_ldap", [{base, Base}, - {filter, Filter}, - {attributes, []}]) of - #eldap_search_result{entries = [E | _]} -> - E; - _ -> - false +-define(SM_IQ_TIMEOUT, 20000). + +process_sm_iq(From, #jid{lserver=LServer} = To, #iq{sub_el = SubEl} = IQ) -> + Proc = gen_mod:get_module_proc(LServer, ?PROCNAME), + case catch gen_server:call(Proc, + {process_sm_iq, From, To, IQ}, ?SM_IQ_TIMEOUT) of + {'EXIT', Reason} -> + case Reason of + {timeout, _} -> + IQ#iq{type = error, + sub_el = [SubEl, ?ERR_REMOTE_SERVER_TIMEOUT]}; + _ -> + IQ#iq{type = error, + sub_el = [SubEl, ?ERR_INTERNAL_SERVER_ERROR]} + end; + Other -> + Other end. -is_attribute_read_allowed(Name,From,To) -> - true. - -ldap_attribute_to_vcard(Prefix,{Name,Values},From,To) -> - case is_attribute_read_allowed(Name,From,To) of - true -> - ldap_lca_to_vcard(Prefix,stringprep:tolower(Name),Values); +handle_call({process_sm_iq, _From, To, IQ}, _FromPid, State) -> + #iq{type = Type, sub_el = SubEl} = IQ, + Reply = case Type of + set -> + IQ#iq{type = error, sub_el = [SubEl, ?ERR_NOT_ALLOWED]}; + get -> + #jid{luser = LUser} = To, + LServer = State#state.serverhost, + case ejabberd_auth:is_user_exists(LUser, LServer) of + true -> + VCardMap = State#state.vcard_map, + case find_ldap_user(LUser, State) of + #eldap_entry{attributes = Attributes} -> + Vcard = ldap_attributes_to_vcard(Attributes, VCardMap, {LUser, LServer}), + IQ#iq{type = result, sub_el = Vcard}; + _ -> + IQ#iq{type = result, sub_el = []} + end; + _ -> + IQ#iq{type = result, sub_el = []} + end + end, + {reply, Reply, State}; + +handle_call(stop, _From, State) -> + {stop, normal, ok, State}; + +handle_call(_Request, _From, State) -> + {reply, bad_request, State}. + +find_ldap_user(User, State) -> + Base = State#state.base, + RFC2254_Filter = State#state.user_filter, + Eldap_ID = State#state.eldap_id, + VCardAttrs = State#state.vcard_map_attrs, + case eldap_filter:parse(RFC2254_Filter, [{"%u", User}]) of + {ok, EldapFilter} -> + case eldap:search(Eldap_ID, [{base, Base}, + {filter, EldapFilter}, + {attributes, VCardAttrs}]) of + #eldap_search_result{entries = [E | _]} -> + E; + _ -> + false + end; _ -> - none + false end. -ldap_lca_to_vcard(vCard,"displayname",[Value|_]) -> +ldap_attributes_to_vcard(Attributes, VCardMap, UD) -> + Attrs = lists:map( + fun({VCardName, _, _}) -> + {stringprep:tolower(VCardName), + map_vcard_attr(VCardName, Attributes, VCardMap, UD)} + end, VCardMap), + Elts = [ldap_attribute_to_vcard(vCard, Attr) || Attr <- Attrs], + NElts = [ldap_attribute_to_vcard(vCardN, Attr) || Attr <- Attrs], + OElts = [ldap_attribute_to_vcard(vCardO, Attr) || Attr <- Attrs], + AElts = [ldap_attribute_to_vcard(vCardA, Attr) || Attr <- Attrs], + [{xmlelement, "vCard", [{"xmlns", ?NS_VCARD}], + lists:append([X || X <- Elts, X /= none], + [{xmlelement,"N",[], [X || X <- NElts, X /= none]}, + {xmlelement,"ORG",[], [X || X <- OElts, X /= none]}, + {xmlelement,"ADR",[], [X || X <- AElts, X /= none]}]) + }]. + +ldap_attribute_to_vcard(vCard, {"fn", Value}) -> {xmlelement,"FN",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(vCard,"uid",[Value|_]) -> +ldap_attribute_to_vcard(vCard, {"nickname", Value}) -> {xmlelement,"NICKNAME",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(vCard,"title",[Value|_]) -> +ldap_attribute_to_vcard(vCard, {"title", Value}) -> {xmlelement,"TITLE",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(vCard,"labeleduri",[Value|_]) -> +ldap_attribute_to_vcard(vCard, {"bday", Value}) -> + {xmlelement,"BDAY",[],[{xmlcdata,Value}]}; + +ldap_attribute_to_vcard(vCard, {"url", Value}) -> {xmlelement,"URL",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(vCard,"description",[Value|_]) -> +ldap_attribute_to_vcard(vCard, {"desc", Value}) -> {xmlelement,"DESC",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(vCard,"telephonenumber",[Value|_]) -> +ldap_attribute_to_vcard(vCard, {"role", Value}) -> + {xmlelement,"ROLE",[],[{xmlcdata,Value}]}; + +ldap_attribute_to_vcard(vCard, {"tel", Value}) -> {xmlelement,"TEL",[],[{xmlelement,"VOICE",[],[]}, {xmlelement,"WORK",[],[]}, {xmlelement,"NUMBER",[],[{xmlcdata,Value}]}]}; -ldap_lca_to_vcard(vCard,"mail",[Value|_]) -> +ldap_attribute_to_vcard(vCard, {"email", Value}) -> {xmlelement,"EMAIL",[],[{xmlelement,"INTERNET",[],[]}, {xmlelement,"PREF",[],[]}, {xmlelement,"USERID",[],[{xmlcdata,Value}]}]}; -ldap_lca_to_vcard(vCardN,"sn",[Value|_]) -> +ldap_attribute_to_vcard(vCard, {"photo", Value}) -> + {xmlelement,"PHOTO",[],[ + {xmlelement,"BINVAL",[],[{xmlcdata, jlib:encode_base64(Value)}]}]}; + +ldap_attribute_to_vcard(vCardN, {"family", Value}) -> {xmlelement,"FAMILY",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(vCardN,"givenname",[Value|_]) -> +ldap_attribute_to_vcard(vCardN, {"given", Value}) -> {xmlelement,"GIVEN",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(vCardN,"initials",[Value|_]) -> +ldap_attribute_to_vcard(vCardN, {"middle", Value}) -> {xmlelement,"MIDDLE",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(vCardO,"o",[Value|_]) -> +ldap_attribute_to_vcard(vCardO, {"orgname", Value}) -> {xmlelement,"ORGNAME",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(vCardO,"ou",[Value|_]) -> +ldap_attribute_to_vcard(vCardO, {"orgunit", Value}) -> {xmlelement,"ORGUNIT",[],[{xmlcdata,Value}]}; -ldap_lca_to_vcard(_,_,_) -> none. - -ldap_attributes_to_vcard(Attributes,From,To) -> - Elts = lists:map(fun(Attr) -> - ldap_attribute_to_vcard(vCard,Attr,From,To) - end,Attributes), - FElts = [ X || X <- Elts, X /= none ], - NElts = lists:map(fun(Attr) -> - ldap_attribute_to_vcard(vCardN,Attr,From,To) - end,Attributes), - FNElts = [ X || X <- NElts, X /= none ], - OElts = lists:map(fun(Attr) -> - ldap_attribute_to_vcard(vCardO,Attr,From,To) - end,Attributes), - FOElts = [ X || X <- OElts, X /= none ], - [{xmlelement, "vCard", [{"xmlns", ?NS_VCARD}], - lists:append(FElts, - [{xmlelement,"N",[],FNElts}, - {xmlelement,"ORG",[],FOElts}]) - }]. +ldap_attribute_to_vcard(vCardA, {"locality", Value}) -> + {xmlelement,"LOCALITY",[],[{xmlcdata,Value}]}; -process_sm_iq(From, To, #iq{type = Type, sub_el = SubEl} = IQ) -> - case Type of - set -> - IQ#iq{type = error, sub_el = [SubEl, ?ERR_NOT_ALLOWED]}; - get -> - #jid{luser = LUser, lserver = LServer} = To, - case find_ldap_user(LServer, LUser) of - #eldap_entry{attributes = Attributes} -> - Vcard = ldap_attributes_to_vcard(Attributes,From,To), - IQ#iq{type = result, sub_el = Vcard}; - _ -> - IQ#iq{type = result, sub_el = []} - end - end. +ldap_attribute_to_vcard(vCardA, {"street", Value}) -> + {xmlelement,"STREET",[],[{xmlcdata,Value}]}; + +ldap_attribute_to_vcard(vCardA, {"ctry", Value}) -> + {xmlelement,"CTRY",[],[{xmlcdata,Value}]}; + +ldap_attribute_to_vcard(vCardA, {"region", Value}) -> + {xmlelement,"REGION",[],[{xmlcdata,Value}]}; + +ldap_attribute_to_vcard(vCardA, {"pcode", Value}) -> + {xmlelement,"PCODE",[],[{xmlcdata,Value}]}; + +ldap_attribute_to_vcard(_, _) -> + none. -define(TLFIELD(Type, Label, Var), {xmlelement, "field", [{"type", Type}, {"label", translate:translate(Lang, Label)}, {"var", Var}], []}). - --define(FORM(JID), +-define(FORM(JID, SearchFields), [{xmlelement, "instructions", [], [{xmlcdata, translate:translate(Lang, "You need an x:data capable client to search")}]}, {xmlelement, "x", [{"xmlns", ?NS_XDATA}, {"type", "form"}], @@ -229,30 +388,15 @@ process_sm_iq(From, To, #iq{type = Type, sub_el = SubEl} = IQ) -> jlib:jid_to_string(JID)}]}, {xmlelement, "instructions", [], [{xmlcdata, translate:translate(Lang, "Fill in fields to search " - "for any matching Jabber User")}]}, - ?TLFIELD("text-single", "User", "user"), - ?TLFIELD("text-single", "Full Name", "fn"), - ?TLFIELD("text-single", "Given Name", "given"), - ?TLFIELD("text-single", "Middle Name", "middle"), - ?TLFIELD("text-single", "Family Name", "family"), - ?TLFIELD("text-single", "Nickname", "nickname"), - ?TLFIELD("text-single", "Birthday", "bday"), - ?TLFIELD("text-single", "Country", "ctry"), - ?TLFIELD("text-single", "City", "locality"), - ?TLFIELD("text-single", "Email", "email"), - ?TLFIELD("text-single", "Organization Name", "orgname"), - ?TLFIELD("text-single", "Organization Unit", "orgunit") - ]}]). - + "for any matching Jabber User")}]} + ] ++ lists:map(fun({X,Y}) -> ?TLFIELD("text-single", X, Y) end, SearchFields)}]). - - -do_route(ServerHost, From, To, Packet) -> +do_route(State, From, To, Packet) -> #jid{user = User, resource = Resource} = To, if (User /= "") or (Resource /= "") -> Err = jlib:make_error_reply(Packet, ?ERR_SERVICE_UNAVAILABLE), - ejabberd_router ! {route, To, From, Err}; + ejabberd_router:route(To, From, Err); true -> IQ = jlib:iq_query_info(Packet), case IQ of @@ -285,24 +429,25 @@ do_route(ServerHost, From, To, Packet) -> [{xmlelement, "x", [{"xmlns", ?NS_XDATA}, {"type", "result"}], - search_result(Lang, To, ServerHost, XData) + search_result(Lang, To, State, XData) }]}]}, ejabberd_router:route( To, From, jlib:iq_to_xml(ResIQ)) end end; get -> + SearchFields = State#state.search_fields, ResIQ = IQ#iq{type = result, sub_el = [{xmlelement, "query", [{"xmlns", ?NS_SEARCH}], - ?FORM(To) + ?FORM(To, SearchFields) }]}, ejabberd_router:route(To, From, jlib:iq_to_xml(ResIQ)) end; - #iq{type = Type, xmlns = ?NS_DISCO_INFO, sub_el = SubEl} -> + #iq{type = Type, xmlns = ?NS_DISCO_INFO} -> case Type of set -> Err = jlib:make_error_reply( @@ -330,7 +475,7 @@ do_route(ServerHost, From, To, Packet) -> From, jlib:iq_to_xml(ResIQ)) end; - #iq{type = Type, xmlns = ?NS_DISCO_ITEMS, sub_el = SubEl} -> + #iq{type = Type, xmlns = ?NS_DISCO_ITEMS} -> case Type of set -> Err = jlib:make_error_reply( @@ -369,223 +514,295 @@ iq_get_vcard(Lang) -> [{xmlcdata, "ejabberd/mod_vcard"}]}, {xmlelement, "URL", [], [{xmlcdata, - "http://ejabberd.jabberstudio.org/"}]}, + "http://ejabberd.jabber.ru/"}]}, {xmlelement, "DESC", [], [{xmlcdata, translate:translate( Lang, "ejabberd vCard module\n" "Copyright (c) 2003-2006 Alexey Shchepin")}]}]. -find_xdata_el({xmlelement, _Name, _Attrs, SubEls}) -> - find_xdata_el1(SubEls). - -find_xdata_el1([]) -> - false; -find_xdata_el1([{xmlelement, Name, Attrs, SubEls} | Els]) -> - case xml:get_attr_s("xmlns", Attrs) of - ?NS_XDATA -> - {xmlelement, Name, Attrs, SubEls}; - _ -> - find_xdata_el1(Els) - end; -find_xdata_el1([_ | Els]) -> - find_xdata_el1(Els). - -define(LFIELD(Label, Var), {xmlelement, "field", [{"label", translate:translate(Lang, Label)}, {"var", Var}], []}). -search_result(Lang, JID, ServerHost, Data) -> - [{xmlelement, "title", [], - [{xmlcdata, translate:translate(Lang, "Search Results for ") ++ - jlib:jid_to_string(JID)}]}, - {xmlelement, "reported", [], - [?LFIELD("Jabber ID", "jid"), - ?LFIELD("Full Name", "fn"), - ?LFIELD("Given Name", "given"), - ?LFIELD("Middle Name", "middle"), - ?LFIELD("Family Name", "family"), - ?LFIELD("Nickname", "nickname"), - ?LFIELD("Birthday", "bday"), - ?LFIELD("Country", "ctry"), - ?LFIELD("City", "locality"), - ?LFIELD("Email", "email"), - ?LFIELD("Organization Name", "orgname"), - ?LFIELD("Organization Unit", "orgunit") - ]}] ++ lists:map(fun(E) -> - record_to_item(E#eldap_entry.attributes) - end, search(ServerHost, Data)). +search_result(Lang, JID, State, Data) -> + SearchReported = State#state.search_reported, + Header = [{xmlelement, "title", [], + [{xmlcdata, translate:translate(Lang, "Search Results for ") ++ + jlib:jid_to_string(JID)}]}, + {xmlelement, "reported", [], + [?LFIELD("Jabber ID", "jid")] ++ + lists:map( + fun({Name, Value}) -> ?LFIELD(Name, Value) end, + SearchReported) + }], + case search(State, Data) of + error -> + Header; + Result -> + Header ++ Result + end. -define(FIELD(Var, Val), {xmlelement, "field", [{"var", Var}], [{xmlelement, "value", [], [{xmlcdata, Val}]}]}). -case_exact_compare(none,_) -> - false; -case_exact_compare(_,none) -> - false; -case_exact_compare(X,Y) -> - X > Y. - -ldap_sort_entries(L) -> - lists:sort(fun(E1,E2) -> - case_exact_compare(ldap_get_value(E1,"cn"),ldap_get_value(E2,"cn")) - end,L). - -ldap_get_value(E,Attribute) -> - #eldap_entry{attributes = Attributes} = E, - case lists:filter(fun({A,_}) -> - string:equal(A,Attribute) - end,Attributes) of - [{Attr,[Value|_]}] -> - Value; - _ -> - none - end. - - -ldap_attribute_to_item("uid",Value) -> - [ - ?FIELD("jid",Value ++ "@" ++ ?MYNAME), - ?FIELD("uid",Value), - ?FIELD("nickname",Value) - ]; - -ldap_attribute_to_item("displayname",Value) -> - [ - ?FIELD("fn",Value) - ]; - -ldap_attribute_to_item("sn",Value) -> - [ - ?FIELD("family",Value) - ]; - -ldap_attribute_to_item("displayname",Value) -> - [ - ?FIELD("fn",Value) - ]; - -ldap_attribute_to_item("givenname",Value) -> - [ - ?FIELD("given",Value) - ]; - -ldap_attribute_to_item("initials",Value) -> - [ - ?FIELD("middle",Value) - ]; - -ldap_attribute_to_item("mail",Value) -> - [ - ?FIELD("email",Value) - ]; - -ldap_attribute_to_item("o",Value) -> - [ - ?FIELD("orgname",Value) - ]; - -ldap_attribute_to_item("ou",Value) -> - [ - ?FIELD("orgunit",Value) - ]; - -ldap_attribute_to_item(_,_) -> - [none]. - -record_to_item(Attributes) -> - List = lists:append(lists:map(fun({Attr,[Value|_]}) -> - ldap_attribute_to_item(stringprep:tolower(Attr),Value) - end,Attributes)), - FList = [X || X <- List, X /= none], - {xmlelement, "item", [],FList}. - -search(LServer, Data) -> - Filter = make_filter(Data), - Base = ejabberd_config:get_local_option({ldap_base, LServer}), - UIDAttr = ejabberd_config:get_local_option({ldap_uidattr, LServer}), - case eldap:search("mod_vcard_ldap",[{base, Base}, - {filter, Filter}, - {attributes, []}]) of +search(State, Data) -> + Base = State#state.base, + SearchFilter = State#state.search_filter, + Eldap_ID = State#state.eldap_id, + UA = State#state.uid, + UAF = State#state.uid_format, + ReportedAttrs = State#state.search_reported_attrs, + Filter = eldap:'and'([SearchFilter, make_filter(Data, UA, UAF)]), + case eldap:search(Eldap_ID, [{base, Base}, + {filter, Filter}, + {attributes, ReportedAttrs}]) of #eldap_search_result{entries = E} -> - [X || X <- E, - ejabberd_auth:is_user_exists( - ldap_get_value(X, UIDAttr), LServer)]; - Err -> - ?ERROR_MSG("Bad search: ~p", [[LServer, {base, Base}, - {filter, Filter}, - {attributes, []}]]) + search_items(E, State); + _ -> + error end. - -make_filter(Data) -> - Filter = [X || X <- lists:map(fun(R) -> - make_assertion(R) - end, Data), - X /= none ], +search_items(Entries, State) -> + LServer = State#state.serverhost, + SearchReported = State#state.search_reported, + VCardMap = State#state.vcard_map, + UIDAttr = State#state.uid, + UIDAttrFormat = State#state.uid_format, + Attributes = lists:map( + fun(E) -> + #eldap_entry{attributes = Attrs} = E, + Attrs + end, Entries), + lists:flatmap( + fun(Attrs) -> + U = get_ldap_attr(UIDAttr, Attrs), + case get_user_part(U, UIDAttrFormat) of + {ok, Username} -> + case ejabberd_auth:is_user_exists(Username, LServer) of + true -> + RFields = lists:map( + fun({_, VCardName}) -> + {VCardName, + map_vcard_attr( + VCardName, + Attrs, + VCardMap, + {Username, ?MYNAME})} + end, SearchReported), + Result = [?FIELD("jid", Username ++ "@" ++ LServer)] ++ + [?FIELD(Name, Value) || {Name, Value} <- RFields], + [{xmlelement, "item", [], Result}]; + _ -> + [] + end; + _ -> + [] + end + end, Attributes). + +make_filter(Data, UAttr, UAttrFormat) -> + Filter = lists:flatmap( + fun({Name, [Value | _]}) -> + case Name of + "%u" when Value /= "" -> + {ok, UAF, _} = regexp:sub(UAttrFormat, "%u", "*%u*"), + case eldap_filter:parse( + "("++UAttr++"="++UAF++")", [{"%u", Value}]) of + {ok, F} -> [F]; + _ -> [] + end; + _ when Value /= "" -> + [eldap:substrings(Name, [{any, Value}])]; + _ -> + [] + end + end, Data), case Filter of - [F] -> + [F] -> F; _ -> eldap:'and'(Filter) end. +remove_user(_User) -> + true. -make_assertion("givenName",Value) -> - eldap:substrings("givenName",[{any,Value}]); - -make_assertion("cn",Value) -> - eldap:substrings("cn",[{any,Value}]); - -make_assertion("sn",Value) -> - eldap:substrings("sn",[{any,Value}]); - -make_assertion(Attr, Value) -> - eldap:equalityMatch(Attr,Value). - -make_assertion({SVar, [Val]}) -> - LAttr = ldap_attribute(SVar), - case LAttr of - none -> - none; - _ -> - if - is_list(Val) and (Val /= "") -> - make_assertion(LAttr,Val); - true -> - none +%%%----------------------- +%%% Auxiliary functions. +%%%----------------------- + +get_user_part(String, Pattern) -> + F = fun(S, P) -> + First = string:str(P, "%u"), + TailLength = length(P) - (First+1), + string:sub_string(S, First, length(S) - TailLength) + end, + case catch F(String, Pattern) of + {'EXIT', _} -> + {error, badmatch}; + Result -> + case regexp:sub(Pattern, "%u", Result) of + {ok, String, _} -> {ok, Result}; + _ -> {error, badmatch} end end. -ldap_attribute("user") -> - "uid"; - -ldap_attribute("fn") -> - "cn"; - -ldap_attribute("family") -> - "sn"; - -ldap_attribute("given") -> - "givenName"; - -ldap_attribute("middle") -> - "initials"; - -ldap_attribute("email") -> - "mail"; +case_insensitive_match(X, Y) -> + X1 = stringprep:tolower(X), + Y1 = stringprep:tolower(Y), + if + X1 == Y1 -> true; + true -> false + end. -ldap_attribute("orgname") -> - "o"; +map_vcard_attr(VCardName, Attributes, Pattern, UD) -> + Res = lists:filter( + fun({Name, _, _}) -> + case_insensitive_match(Name, VCardName) + end, Pattern), + case Res of + [{_, Str, Attrs}] -> + process_pattern(Str, UD, + [get_ldap_attr(X, Attributes) || X<-Attrs]); + _ -> "" + end. -ldap_attribute("orgunit") -> - "ou"; +process_pattern(Str, {User, Domain}, Attrs) -> + Res = lists:foldl( + fun(X, Acc) -> + {ok, NewStr, _} = regexp:sub(Acc, "%s", X), + NewStr + end, + Str, Attrs), + eldap_filter:do_sub(Res, [{"%u", User},{"%d", Domain}]). + +get_ldap_attr(LDAPAttr, Attributes) -> + Res = lists:filter( + fun({Name, _}) -> + case_insensitive_match(Name, LDAPAttr) + end, Attributes), + case Res of + [{_, [Value|_]}] -> Value; + _ -> "" + end. -ldap_attribute(_) -> - none. +find_xdata_el({xmlelement, _Name, _Attrs, SubEls}) -> + find_xdata_el1(SubEls). -remove_user(User) -> - true. +find_xdata_el1([]) -> + false; +find_xdata_el1([{xmlelement, Name, Attrs, SubEls} | Els]) -> + case xml:get_attr_s("xmlns", Attrs) of + ?NS_XDATA -> + {xmlelement, Name, Attrs, SubEls}; + _ -> + find_xdata_el1(Els) + end; +find_xdata_el1([_ | Els]) -> + find_xdata_el1(Els). +parse_options(Host, Opts) -> + MyHost = gen_mod:get_opt(host, Opts, "vjud." ++ Host), + Search = gen_mod:get_opt(search, Opts, true), + Eldap_ID = atom_to_list(gen_mod:get_module_proc(Host, ?PROCNAME)), + LDAPServers = case gen_mod:get_opt(ldap_servers, Opts, undefined) of + undefined -> + ejabberd_config:get_local_option({ldap_servers, Host}); + S -> S + end, + LDAPPort = case gen_mod:get_opt(ldap_port, Opts, undefined) of + undefined -> + case ejabberd_config:get_local_option({ldap_port, Host}) of + undefined -> 389; + P -> P + end; + P -> P + end, + LDAPBase = case gen_mod:get_opt(ldap_base, Opts, undefined) of + undefined -> + ejabberd_config:get_local_option({ldap_base, Host}); + B -> B + end, + UIDAttr = case gen_mod:get_opt(ldap_uidattr, Opts, undefined) of + undefined -> + case ejabberd_config:get_local_option({ldap_uidattr, Host}) of + undefined -> "uid"; + UA -> UA + end; + UA -> UA + end, + UIDAttrFormat = case gen_mod:get_opt(ldap_uidattr_format, Opts, undefined) of + undefined -> + case ejabberd_config:get_local_option({ldap_uidattr_format, Host}) of + undefined -> "%u"; + UAF -> UAF + end; + UAF -> UAF + end, + RootDN = case gen_mod:get_opt(ldap_rootdn, Opts, undefined) of + undefined -> + case ejabberd_config:get_local_option({ldap_rootdn, Host}) of + undefined -> ""; + RDN -> RDN + end; + RDN -> RDN + end, + Password = case gen_mod:get_opt(ldap_password, Opts, undefined) of + undefined -> + case ejabberd_config:get_local_option({ldap_password, Host}) of + undefined -> ""; + Pass -> Pass + end; + Pass -> Pass + end, + SubFilter = "("++UIDAttr++"="++UIDAttrFormat++")", + UserFilter = case gen_mod:get_opt(ldap_filter, Opts, undefined) of + undefined -> + case ejabberd_config:get_local_option({ldap_filter, Host}) of + undefined -> SubFilter; + "" -> SubFilter; + F -> "(&" ++ SubFilter ++ F ++ ")" + end; + "" -> SubFilter; + F -> "(&" ++ SubFilter ++ F ++ ")" + end, + {ok, SearchFilter} = eldap_filter:parse( + eldap_filter:do_sub(UserFilter, [{"%u","*"}])), + VCardMap = gen_mod:get_opt(ldap_vcard_map, Opts, ?VCARD_MAP), + SearchFields = gen_mod:get_opt(ldap_search_fields, Opts, ?SEARCH_FIELDS), + SearchReported = gen_mod:get_opt(ldap_search_reported, Opts, ?SEARCH_REPORTED), + %% In search requests we need to fetch only attributes defined + %% in vcard-map and search-reported. In some cases, + %% this will essentially reduce network traffic from an LDAP server. + VCardMapAttrs = lists:usort( + lists:append([A || {_, _, A} <- VCardMap]) ++ [UIDAttr]), + SearchReportedAttrs = + lists:usort(lists:flatmap( + fun({_, N}) -> + case lists:keysearch(N, 1, VCardMap) of + {value, {_, _, L}} -> L; + _ -> [] + end + end, SearchReported) ++ [UIDAttr]), + #state{serverhost = Host, + myhost = MyHost, + eldap_id = Eldap_ID, + search = Search, + servers = LDAPServers, + port = LDAPPort, + dn = RootDN, + base = LDAPBase, + password = Password, + uid = UIDAttr, + uid_format = UIDAttrFormat, + vcard_map = VCardMap, + vcard_map_attrs = VCardMapAttrs, + user_filter = UserFilter, + search_filter = SearchFilter, + search_fields = SearchFields, + search_reported = SearchReported, + search_reported_attrs = SearchReportedAttrs + }. -- cgit v1.2.3 From 8583e3f9be0ef2f7b7c66550b3028241a7574670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 22 Sep 2006 08:42:41 +0000 Subject: Bugfixes coming from trunk (SVN #607): * doc/guide.tex: Minor fix on index generation. SVN Revision: 616 --- ChangeLog | 4 + doc/guide.html | 1404 ++++++++++++++++++++++++++++---------------------------- doc/guide.tex | 22 +- 3 files changed, 727 insertions(+), 703 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2771d1a3c..85f31d187 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-09-14 Mickael Remond + + * doc/guide.tex: Minor fix on index generation. + 2006-09-14 Alexey Shchepin * doc/guide.tex: Updated (thanks to Evgeniy Khramtsov) diff --git a/doc/guide.html b/doc/guide.html index 3c8a473e0..cf4f4382f 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -1,29 +1,46 @@ -Ejabberd 1.1.1 Installation and Operation Guide - - + + +Ejabberd 1.1.1 Installation and Operation Guide + + + + + - + +

                                                                                                                                    - -

                                                                                                                                    Ejabberd 1.1.1 Installation and Operation Guide

                                                                                                                                    - -

                                                                                                                                    Alexey Shchepin
                                                                                                                                    + + +
                                                                                                                                    +

                                                                                                                                    Ejabberd 1.1.1 Installation and Operation Guide

                                                                                                                                    +

                                                                                                                                    Alexey Shchepin
                                                                                                                                    mailto:alexey@sevcom.net
                                                                                                                                    -xmpp:aleksey@jabber.ru

                                                                                                                                    +xmpp:aleksey@jabber.ru


                                                                                                                                    -
                                                                                                                                    +
                                                                                                                                    @@ -32,125 +49,125 @@
                                                                                                                                    -
                                                                                                                                    I can thoroughly recommend ejabberd for ease of setup -- +
                                                                                                                                    I can thoroughly recommend ejabberd for ease of setup – Kevin Smith, Current maintainer of the Psi project
                                                                                                                                    - + -

                                                                                                                                    Table of Contents

                                                                                                                                    +

                                                                                                                                    Contents

                                                                                                                                    -
                                                                                                                                    • +
                                                                                                                                      • 1  Introduction -
                                                                                                                                        • + -
                                                                                                                                        • 2  Installation from Source -
                                                                                                                                          • +
                                                                                                                                          • 2  Installation from Source +
                                                                                                                                            • 2.1  Installation Requirements -
                                                                                                                                              • -2.1.1  ``Unix-like'' operating systems -
                                                                                                                                              • 2.1.2  Windows + -
                                                                                                                                              • 2.2  Obtaining ejabberd -
                                                                                                                                              • 2.3  Compilation - -
                                                                                                                                              • 3  Configuration -
                                                                                                                                                • +
                                                                                                                                                • 3  Configuration +
                                                                                                                                                  • 3.1  Initial Configuration -
                                                                                                                                                    • + -
                                                                                                                                                    • 3.2  Relational Database Support -
                                                                                                                                                      • +
                                                                                                                                                      • 3.2  Relational Database Support + -
                                                                                                                                                      • 3.3  Creating an Initial Administrator -
                                                                                                                                                      • 3.4  Online Configuration and Monitoring - -
                                                                                                                                                      • 4  Firewall Settings -
                                                                                                                                                      • 5  SRV Records -
                                                                                                                                                      • 6  Clustering -
                                                                                                                                                        • +
                                                                                                                                                        • 4  Firewall Settings +
                                                                                                                                                        • 5  SRV Records +
                                                                                                                                                        • 6  Clustering +
                                                                                                                                                          • 6.1  How it Works - -
                                                                                                                                                          • A  Built-in Modules -
                                                                                                                                                            • +
                                                                                                                                                            • A  Built-in Modules +
                                                                                                                                                              • A.1  Overview -
                                                                                                                                                              • A.2  Common Options -
                                                                                                                                                                • +
                                                                                                                                                                • A.2  Common Options + -
                                                                                                                                                                • A.3  mod_announce -
                                                                                                                                                                • A.4  mod_disco -
                                                                                                                                                                • A.5  mod_echo -
                                                                                                                                                                • A.6  mod_irc -
                                                                                                                                                                • A.7  mod_last -
                                                                                                                                                                • A.8  mod_muc -
                                                                                                                                                                • A.9  mod_muc_log -
                                                                                                                                                                • A.10  mod_offline -
                                                                                                                                                                • A.11  mod_privacy -
                                                                                                                                                                • A.12  mod_private -
                                                                                                                                                                • A.13  mod_pubsub -
                                                                                                                                                                • A.14  mod_register -
                                                                                                                                                                • A.15  mod_roster -
                                                                                                                                                                • A.16  mod_service_log -
                                                                                                                                                                • A.17  mod_shared_roster -
                                                                                                                                                                • A.18  mod_stats -
                                                                                                                                                                • A.19  mod_time -
                                                                                                                                                                • A.20  mod_vcard -
                                                                                                                                                                • A.21  LDAP and mod_vcard_ldap - -
                                                                                                                                                                • B  Internationalization and Localization -
                                                                                                                                                                • C  Release Notes - -

                                                                                                                                                                  1  Introduction

                                                                                                                                                                  +

                                                                                                                                                                  1  Introduction

                                                                                                                                                                  @@ -162,135 +179,135 @@
                                                                                                                                                                  -

                                                                                                                                                                  1.1  Key Features

                                                                                                                                                                  +

                                                                                                                                                                  1.1  Key Features

                                                                                                                                                                  ejabberd is: -
                                                                                                                                                                  • +
                                                                                                                                                                    • Multiplatform: ejabberd runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.

                                                                                                                                                                      -
                                                                                                                                                                    • Distributed: You can run ejabberd 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.
                                                                                                                                                                      +
                                                                                                                                                                    • Distributed: You can run ejabberd 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.

                                                                                                                                                                      -
                                                                                                                                                                    • Fault-tolerant: You can deploy an ejabberd 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 ``on the fly''.
                                                                                                                                                                      +
                                                                                                                                                                    • Fault-tolerant: You can deploy an ejabberd 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 “on the fly”.

                                                                                                                                                                      -
                                                                                                                                                                    • Administrator Friendly: ejabberd 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: -
                                                                                                                                                                      • +
                                                                                                                                                                      • Administrator Friendly: ejabberd 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: +
                                                                                                                                                                        • Comprehensive documentation. -
                                                                                                                                                                        • Straightforward installers for Linux, Mac OS X, and Windows. -
                                                                                                                                                                        • Web interface for administration tasks. -
                                                                                                                                                                        • Shared Roster Groups. -
                                                                                                                                                                        • Command line administration tool. -
                                                                                                                                                                        • Can integrate with existing authentication mechanisms. -
                                                                                                                                                                        • Capability to send announce messages. +
                                                                                                                                                                        • Straightforward installers for Linux, Mac OS X, and Windows. +
                                                                                                                                                                        • Web interface for administration tasks. +
                                                                                                                                                                        • Shared Roster Groups. +
                                                                                                                                                                        • Command line administration tool. +
                                                                                                                                                                        • Can integrate with existing authentication mechanisms. +
                                                                                                                                                                        • Capability to send announce messages.


                                                                                                                                                                        -
                                                                                                                                                                      • Internationalized: ejabberd leads in internationalization. Hence it is very well suited in a globalized world. Related features are: -
                                                                                                                                                                        • +
                                                                                                                                                                        • Internationalized: ejabberd leads in internationalization. Hence it is very well suited in a globalized world. Related features are: +
                                                                                                                                                                          • Translated in 11 languages. -
                                                                                                                                                                          • Support for IDNA. +
                                                                                                                                                                          • Support for IDNA.


                                                                                                                                                                          -
                                                                                                                                                                        • Open Standards: ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard. -
                                                                                                                                                                          • +
                                                                                                                                                                          • Open Standards: ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard. +
                                                                                                                                                                          -

                                                                                                                                                                          1.2  Additional Features

                                                                                                                                                                          +

                                                                                                                                                                          1.2  Additional Features

                                                                                                                                                                          Besides common Jabber server features, ejabberd comes with a wide range of other features: -
                                                                                                                                                                          • +
                                                                                                                                                                            • Modular -
                                                                                                                                                                              • +
                                                                                                                                                                                • Load only the modules you want. -
                                                                                                                                                                                • Extend ejabberd with your own custom modules. +
                                                                                                                                                                                • Extend ejabberd with your own custom modules.
                                                                                                                                                                                -
                                                                                                                                                                              • Security -
                                                                                                                                                                                • +
                                                                                                                                                                                • Security +
                                                                                                                                                                                  • SASL and STARTTLS for c2s and s2s connections. -
                                                                                                                                                                                  • STARTTLS and Dialback s2s connections. -
                                                                                                                                                                                  • Web interface accessible via HTTPS secure access. +
                                                                                                                                                                                  • STARTTLS and Dialback s2s connections. +
                                                                                                                                                                                  • Web interface accessible via HTTPS secure access.
                                                                                                                                                                                  -
                                                                                                                                                                                • Databases -
                                                                                                                                                                                  • +
                                                                                                                                                                                  • Databases +
                                                                                                                                                                                    • Native MySQL support. -
                                                                                                                                                                                    • Native PostgreSQL support. -
                                                                                                                                                                                    • Mnesia. -
                                                                                                                                                                                    • ODBC data storage support. -
                                                                                                                                                                                    • Microsoft SQL Server support (via ODBC). +
                                                                                                                                                                                    • Native PostgreSQL support. +
                                                                                                                                                                                    • Mnesia. +
                                                                                                                                                                                    • ODBC data storage support. +
                                                                                                                                                                                    • Microsoft SQL Server support (via ODBC).
                                                                                                                                                                                    -
                                                                                                                                                                                  • Authentication -
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Authentication +
                                                                                                                                                                                      • LDAP and ODBC. -
                                                                                                                                                                                      • External Authentication script. -
                                                                                                                                                                                      • Internal Authentication. +
                                                                                                                                                                                      • External Authentication script. +
                                                                                                                                                                                      • Internal Authentication.
                                                                                                                                                                                      -
                                                                                                                                                                                    • Others -
                                                                                                                                                                                      • +
                                                                                                                                                                                      • Others +
                                                                                                                                                                                        • Compressing XML streams with Stream Compression (JEP-0138). -
                                                                                                                                                                                        • Interface with networks such as AIM, ICQ and MSN. -
                                                                                                                                                                                        • Statistics via Statistics Gathering (JEP-0039). -
                                                                                                                                                                                        • IPv6 support both for c2s and s2s connections. -
                                                                                                                                                                                        • Multi-User Chat module with logging. -
                                                                                                                                                                                        • Users Directory based on users vCards. -
                                                                                                                                                                                        • Publish-Subscribe component. -
                                                                                                                                                                                        • Support for virtual hosting. -
                                                                                                                                                                                        • HTTP Polling service. -
                                                                                                                                                                                        • IRC transport. +
                                                                                                                                                                                        • Interface with networks such as AIM, ICQ and MSN. +
                                                                                                                                                                                        • Statistics via Statistics Gathering (JEP-0039). +
                                                                                                                                                                                        • IPv6 support both for c2s and s2s connections. +
                                                                                                                                                                                        • Multi-User Chat module with logging. +
                                                                                                                                                                                        • Users Directory based on users vCards. +
                                                                                                                                                                                        • Publish-Subscribe component. +
                                                                                                                                                                                        • Support for virtual hosting. +
                                                                                                                                                                                        • HTTP Polling service. +
                                                                                                                                                                                        • IRC transport.
                                                                                                                                                                                      -

                                                                                                                                                                                      2  Installation from Source

                                                                                                                                                                                      +

                                                                                                                                                                                      2  Installation from Source

                                                                                                                                                                                      -

                                                                                                                                                                                      2.1  Installation Requirements

                                                                                                                                                                                      +

                                                                                                                                                                                      2.1  Installation Requirements

                                                                                                                                                                                      - + -

                                                                                                                                                                                      2.1.1  ``Unix-like'' operating systems

                                                                                                                                                                                      +

                                                                                                                                                                                      2.1.1  “Unix-like” operating systems

                                                                                                                                                                                      -To compile ejabberd on a ``Unix-like'' operating system, you need: -
                                                                                                                                                                                      • +To compile ejabberd on a “Unix-like” operating system, 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 at all on systems with GNU libc). +
                                                                                                                                                                                        • 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 at all on systems with GNU libc).
                                                                                                                                                                                        -

                                                                                                                                                                                        2.1.2  Windows

                                                                                                                                                                                        +

                                                                                                                                                                                        2.1.2  Windows

                                                                                                                                                                                        To compile ejabberd on a Windows flavour, you need: -
                                                                                                                                                                                        • + -

                                                                                                                                                                                          2.2  Obtaining ejabberd

                                                                                                                                                                                          +

                                                                                                                                                                                          2.2  Obtaining ejabberd

                                                                                                                                                                                          @@ -299,49 +316,49 @@ Released versions of ejabberd can be obtained from

                                                                                                                                                                                          The latest development version can be retrieved from the Subversion repository. -
                                                                                                                                                                                          +
                                                                                                                                                                                             svn co http://svn.process-one.net/ejabberd/trunk ejabberd
                                                                                                                                                                                           
                                                                                                                                                                                          -

                                                                                                                                                                                          2.3  Compilation

                                                                                                                                                                                          +

                                                                                                                                                                                          2.3  Compilation

                                                                                                                                                                                          - + -

                                                                                                                                                                                          2.3.1  ``Unix-like'' operating systems

                                                                                                                                                                                          +

                                                                                                                                                                                          2.3.1  “Unix-like” operating systems

                                                                                                                                                                                          -Compile ejabberd on a ``Unix-like'' operating system by executing: -
                                                                                                                                                                                          +Compile ejabberd on a “Unix-like” operating system by executing:
                                                                                                                                                                                          +
                                                                                                                                                                                             ./configure
                                                                                                                                                                                             make
                                                                                                                                                                                             su
                                                                                                                                                                                             make install
                                                                                                                                                                                           
                                                                                                                                                                                          These commands will: -
                                                                                                                                                                                          • +
                                                                                                                                                                                            • 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 the configuration file into /etc/ejabberd, +
                                                                                                                                                                                            • create a directory called /var/log/ejabberd to store log files.
                                                                                                                                                                                            -

                                                                                                                                                                                            2.3.2  Windows

                                                                                                                                                                                            +

                                                                                                                                                                                            2.3.2  Windows

                                                                                                                                                                                            -
                                                                                                                                                                                            • +
                                                                                                                                                                                              • Install Erlang emulator (for example, into C:\Program Files\erl5.3). -
                                                                                                                                                                                              • Install Expat library into C:\Program Files\Expat-1.95.7 +
                                                                                                                                                                                              • Install Expat library into C:\Program Files\Expat-1.95.7 directory.

                                                                                                                                                                                                Copy file C:\Program Files\Expat-1.95.7\Libs\libexpat.dll to your Windows system directory (for example, C:\WINNT or C:\WINNT\System32) -
                                                                                                                                                                                              • Build and install the Iconv library into the directory +
                                                                                                                                                                                              • Build and install the Iconv library into the directory C:\Program Files\iconv-1.9.1.

                                                                                                                                                                                                Copy file C:\Program Files\iconv-1.9.1\bin\iconv.dll to your @@ -353,25 +370,25 @@ Note: instead of copying libexpat.dll and iconv.dll to the Windows C:\Program Files\Expat-1.95.7\Libs and C:\Program Files\iconv-1.9.1\bin to the PATH environment variable. -
                                                                                                                                                                                              • While in the directory ejabberd\src run: -
                                                                                                                                                                                                +
                                                                                                                                                                                              • While in the directory ejabberd\src run: +
                                                                                                                                                                                                 configure.bat
                                                                                                                                                                                                 nmake -f Makefile.win32
                                                                                                                                                                                                -
                                                                                                                                                                                              • Edit the file ejabberd\src\ejabberd.cfg and run -
                                                                                                                                                                                                +
                                                                                                                                                                                              • Edit the file ejabberd\src\ejabberd.cfg and run +
                                                                                                                                                                                                 werl -s ejabberd -name ejabberd
                                                                                                                                                                                                 
                                                                                                                                                                                              -

                                                                                                                                                                                              2.4  Starting

                                                                                                                                                                                              +

                                                                                                                                                                                              2.4  Starting

                                                                                                                                                                                              Execute the following command to start ejabberd: -
                                                                                                                                                                                              +
                                                                                                                                                                                                 erl -pa /var/lib/ejabberd/ebin -name ejabberd -s ejabberd
                                                                                                                                                                                               
                                                                                                                                                                                              or -
                                                                                                                                                                                              +
                                                                                                                                                                                                 erl -pa /var/lib/ejabberd/ebin -sname ejabberd -s ejabberd
                                                                                                                                                                                               
                                                                                                                                                                                              In the latter case the Erlang node will be identified using only the first part of the host name, i. e. other Erlang nodes outside this domain can't contact @@ -383,7 +400,7 @@ for storing its user database and for logging.

                                                                                                                                                                                              To specify the path to the configuration file, the log files and the Mnesia database directory, you may use the following command: -
                                                                                                                                                                                              +
                                                                                                                                                                                                 erl -pa /var/lib/ejabberd/ebin \
                                                                                                                                                                                                     -sname ejabberd \
                                                                                                                                                                                                     -s ejabberd \
                                                                                                                                                                                              @@ -397,25 +414,25 @@ You can find other useful options in the Erlang manual page
                                                                                                                                                                                               
                                                                                                                                                                                              To use more than 1024 connections, you should set the environment variable ERL_MAX_PORTS: -
                                                                                                                                                                                              +
                                                                                                                                                                                                 export ERL_MAX_PORTS=32000
                                                                                                                                                                                               
                                                                                                                                                                                              Note that with this value, ejabberd will use more memory (approximately 6 MB more).

                                                                                                                                                                                              To reduce memory usage, you may set the environment variable ERL_FULLSWEEP_AFTER: -
                                                                                                                                                                                              +
                                                                                                                                                                                                 export ERL_FULLSWEEP_AFTER=0
                                                                                                                                                                                               
                                                                                                                                                                                              But in this case ejabberd can start to work slower.

                                                                                                                                                                                              -

                                                                                                                                                                                              3  Configuration

                                                                                                                                                                                              +

                                                                                                                                                                                              3  Configuration

                                                                                                                                                                                              -

                                                                                                                                                                                              3.1  Initial Configuration

                                                                                                                                                                                              +

                                                                                                                                                                                              3.1  Initial Configuration

                                                                                                                                                                                              @@ -426,12 +443,12 @@ configuration file are appended to the entries in the database. The configuration file contains a sequence of Erlang terms. Lines beginning with a `%' sign are ignored. Each term is a tuple of which the first element is the name of an option, and any further elements are that option's values. If the -configuration file do not contain for instance the ``hosts'' option, the old +configuration file do not contain for instance the “hosts” option, the old host name(s) stored in the database will be used.

                                                                                                                                                                                              You can override the old values stored in the database by adding next lines to the configuration file: -
                                                                                                                                                                                              +
                                                                                                                                                                                                 override_global.
                                                                                                                                                                                                 override_local.
                                                                                                                                                                                                 override_acls.
                                                                                                                                                                                              @@ -440,7 +457,7 @@ before new ones are added.

                                                                                                                                                                                              -

                                                                                                                                                                                              3.1.1  Host Names

                                                                                                                                                                                              +

                                                                                                                                                                                              3.1.1  Host Names

                                                                                                                                                                                              @@ -448,23 +465,23 @@ The option hosts defines a list containing one or more domains that ejabberd will serve.

                                                                                                                                                                                              Examples: -
                                                                                                                                                                                              • +
                                                                                                                                                                                                • Serving one domain: -
                                                                                                                                                                                                  • -
                                                                                                                                                                                                    +
                                                                                                                                                                                                    • +
                                                                                                                                                                                                         {hosts, ["example.org"]}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • Backwards compatibility with older ejabberd versions can be retained +
                                                                                                                                                                                                  • Backwards compatibility with older ejabberd versions can be retained with: -
                                                                                                                                                                                                    + 
                                                                                                                                                                                                       {host, "example.org"}.
                                                                                                                                                                                                     
                                                                                                                                                                                                  -
                                                                                                                                                                                                • Serving two domains: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                • Serving two domains: +
                                                                                                                                                                                                     {hosts, ["example.net", "example.com"]}.
                                                                                                                                                                                                   
                                                                                                                                                                                                -

                                                                                                                                                                                                3.1.2  Default Language

                                                                                                                                                                                                +

                                                                                                                                                                                                3.1.2  Default Language

                                                                                                                                                                                                @@ -475,82 +492,82 @@ option language is "en". In order to take effect there must be translation file <language>.msg in ejabberd's msgs directory.

                                                                                                                                                                                                Examples: -
                                                                                                                                                                                                • +
                                                                                                                                                                                                  • To set Russian as default language: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       {language, "ru"}.
                                                                                                                                                                                                    -
                                                                                                                                                                                                  • To set Spanish as default language: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • To set Spanish as default language: +
                                                                                                                                                                                                       {language, "es"}.
                                                                                                                                                                                                     
                                                                                                                                                                                                  -

                                                                                                                                                                                                  3.1.3  Access Rules

                                                                                                                                                                                                  +

                                                                                                                                                                                                  3.1.3  Access Rules

                                                                                                                                                                                                  Access control in ejabberd is performed via Access Control Lists (ACLs). The declarations of ACLs in the configuration file have the following syntax: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                     {acl, <aclname>, {<acltype>, ...}}.
                                                                                                                                                                                                   
                                                                                                                                                                                                  <acltype> can be one of the following: -
                                                                                                                                                                                                  -all
                                                                                                                                                                                                  Matches all JIDs. Example: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +all
                                                                                                                                                                                                  Matches all JIDs. Example: +
                                                                                                                                                                                                   {acl, all, all}.
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {user, <username>}
                                                                                                                                                                                                  Matches the user with the name +
                                                                                                                                                                                                  {user, <username>}
                                                                                                                                                                                                  Matches the user with the name <username> at the first virtual host. Example: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                   {acl, admin, {user, "yozhik"}}.
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {user, <username>, <server>}
                                                                                                                                                                                                  Matches the user with the JID +
                                                                                                                                                                                                  {user, <username>, <server>}
                                                                                                                                                                                                  Matches the user with the JID <username>@<server> and any resource. Example: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                   {acl, admin, {user, "yozhik", "example.org"}}.
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {server, <server>}
                                                                                                                                                                                                  Matches any JID from server +
                                                                                                                                                                                                  {server, <server>}
                                                                                                                                                                                                  Matches any JID from server <server>. Example: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                   {acl, exampleorg, {server, "example.org"}}.
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {user_regexp, <regexp>}
                                                                                                                                                                                                  Matches any local user with a name that +
                                                                                                                                                                                                  {user_regexp, <regexp>}
                                                                                                                                                                                                  Matches any local user with a name that matches <regexp> at the first virtual host. Example: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                   {acl, tests, {user, "^test[0-9]*$"}}.
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {user_regexp, <regexp>, <server>}
                                                                                                                                                                                                  Matches any user with a name +
                                                                                                                                                                                                  {user_regexp, <regexp>, <server>}
                                                                                                                                                                                                  Matches any user with a name that matches <regexp> at server <server>. Example: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                   {acl, tests, {user, "^test", "example.org"}}.
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {server_regexp, <regexp>}
                                                                                                                                                                                                  Matches any JID from the server that +
                                                                                                                                                                                                  {server_regexp, <regexp>}
                                                                                                                                                                                                  Matches any JID from the server that matches <regexp>. Example: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                   {acl, icq, {server, "^icq\\."}}.
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {node_regexp, <user_regexp>, <server_regexp>}
                                                                                                                                                                                                  Matches any user +
                                                                                                                                                                                                  {node_regexp, <user_regexp>, <server_regexp>}
                                                                                                                                                                                                  Matches any user with a name that matches <user_regexp> at any server that matches <server_regexp>. Example: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                   {acl, yohzik, {node_regexp, "^yohzik$", "^example.(com|org)$"}}.
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {user_glob, <glob>}
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {user_glob, <glob>, <server>}
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {server_glob, <glob>}
                                                                                                                                                                                                  -
                                                                                                                                                                                                  {node_glob, <user_glob>, <server_glob>}
                                                                                                                                                                                                  This is the same as +
                                                                                                                                                                                                  {user_glob, <glob>}
                                                                                                                                                                                                  +
                                                                                                                                                                                                  {user_glob, <glob>, <server>}
                                                                                                                                                                                                  +
                                                                                                                                                                                                  {server_glob, <glob>}
                                                                                                                                                                                                  +
                                                                                                                                                                                                  {node_glob, <user_glob>, <server_glob>}
                                                                                                                                                                                                  This is the same as above. However, it uses shell glob patterns instead of regexp. These patterns can have the following special characters: -
                                                                                                                                                                                                  - *
                                                                                                                                                                                                  matches any string including the null string. -
                                                                                                                                                                                                  ?
                                                                                                                                                                                                  matches any single character. -
                                                                                                                                                                                                  [...]
                                                                                                                                                                                                  matches any of the enclosed characters. Character +
                                                                                                                                                                                                  + *
                                                                                                                                                                                                  matches any string including the null string. +
                                                                                                                                                                                                  ?
                                                                                                                                                                                                  matches any single character. +
                                                                                                                                                                                                  [...]
                                                                                                                                                                                                  matches any of the enclosed characters. Character ranges are specified by a pair of characters separated by a `-'. If the first character after `[' is a `!', any character not enclosed is matched.
                                                                                                                                                                                                  The following ACLs are pre-defined: -
                                                                                                                                                                                                  -all
                                                                                                                                                                                                  Matches any JID. -
                                                                                                                                                                                                  none
                                                                                                                                                                                                  Matches no JID. +
                                                                                                                                                                                                  +all
                                                                                                                                                                                                  Matches any JID. +
                                                                                                                                                                                                  none
                                                                                                                                                                                                  Matches no JID.
                                                                                                                                                                                                  An entry allowing or denying access to different services looks similar to this: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                     {access, <accessname>, [{allow, <aclname>},
                                                                                                                                                                                                                             {deny, <aclname>},
                                                                                                                                                                                                                             ...
                                                                                                                                                                                                  @@ -558,57 +575,57 @@ this:
                                                                                                                                                                                                   
                                                                                                                                                                                                  When a JID is checked to have access to <accessname>, the server sequentially checks if that JID mathes any of the ACLs that are named in the second elements of the tuples in the list. If it matches, the first element of -the first matched tuple is returned, otherwise ``deny'' is returned.
                                                                                                                                                                                                  +the first matched tuple is returned, otherwise “deny” is returned.

                                                                                                                                                                                                  Example: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                     {access, configure, [{allow, admin}]}.
                                                                                                                                                                                                     {access, something, [{deny, badmans},
                                                                                                                                                                                                                          {allow, all}]}.
                                                                                                                                                                                                   
                                                                                                                                                                                                  The following access rules are pre-defined: -
                                                                                                                                                                                                  -all
                                                                                                                                                                                                  Always returns ``allow'' -
                                                                                                                                                                                                  none
                                                                                                                                                                                                  Always returns ``deny'' +
                                                                                                                                                                                                  +all
                                                                                                                                                                                                  Always returns “allow” +
                                                                                                                                                                                                  none
                                                                                                                                                                                                  Always returns “deny
                                                                                                                                                                                                  -

                                                                                                                                                                                                  3.1.4  Shapers

                                                                                                                                                                                                  +

                                                                                                                                                                                                  3.1.4  Shapers

                                                                                                                                                                                                  Shapers enable you to limit connection traffic. The syntax of shapers is like this: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                     {shaper, <shapername>, <kind>}.
                                                                                                                                                                                                   
                                                                                                                                                                                                  Currently only one kind of shaper called maxrate is available. It has the following syntax: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                     {maxrate, <rate>}
                                                                                                                                                                                                   
                                                                                                                                                                                                  where <rate> stands for the maximum allowed incomig rate in bytes per second.

                                                                                                                                                                                                  Examples: -
                                                                                                                                                                                                  • -To define a shaper named ``normal'' with traffic speed limited to +
                                                                                                                                                                                                    • +To define a shaper named “normal” with traffic speed limited to 1,000 bytes/second: -
                                                                                                                                                                                                      +
                                                                                                                                                                                                         {shaper, normal, {maxrate, 1000}}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • To define a shaper named ``fast'' with traffic speed limited to +
                                                                                                                                                                                                    • To define a shaper named “fast” with traffic speed limited to 50,000 bytes/second: -
                                                                                                                                                                                                      +
                                                                                                                                                                                                         {shaper, fast, {maxrate, 50000}}.
                                                                                                                                                                                                       
                                                                                                                                                                                                    -

                                                                                                                                                                                                    3.1.5  Limitation of the number of opened sessions

                                                                                                                                                                                                    +

                                                                                                                                                                                                    3.1.5  Limitation of the number of opened sessions

                                                                                                                                                                                                    This option specifies the maximum number of sessions (authenticated connections) per user. If a user tries to open more than the maximum number of allowed sessions, with different resources, the first opened session will be -disconnected. The error ``session replaced'' is send to the +disconnected. The error “session replaced” is send to the disconnected session. This value is either a number or infinity. For example {max\_user\_sessions, 10}. The default value is 10.

                                                                                                                                                                                                    @@ -616,21 +633,21 @@ This option can be define per virtual host. See section 3.1.6  Listened Sockets

                                                                                                                                    +

                                                                                                                                    3.1.6  Listened Sockets

                                                                                                                                    The option listen defines for which addresses and ports ejabberd will listen and what services will be run on them. Each element of the list is a tuple with the following elements: -
                                                                                                                                    • +
                                                                                                                                      • Port number. -
                                                                                                                                      • Module that serves this port. -
                                                                                                                                      • Options to this module. +
                                                                                                                                      • Module that serves this port. +
                                                                                                                                      • Options to this module.
                                                                                                                                      Currently next modules are implemented: -

                                                                                                                                      +

                                                                                                                                      @@ -674,18 +691,18 @@ Currently next modules are implemented:
                                                                                                                                      ejabberd_c2scertfile, http_poll, inet6, ip, tls, web_admin
                                                                                                                                      -

                                                                                                                                      +

                                                                                                                                      (*) The mechanism for external components is defined in Jabber Component Protocol (JEP-0114).

                                                                                                                                      The following options are available: -
                                                                                                                                      - {access, <access rule>}
                                                                                                                                      This option defines - access to the port. The default value is ``all''. -
                                                                                                                                      {certfile, Path}
                                                                                                                                      Path to a file containing the SSL certificate. -
                                                                                                                                      {hosts, [Hostnames], [HostOptions]}
                                                                                                                                      This option +
                                                                                                                                      + {access, <access rule>}
                                                                                                                                      This option defines + access to the port. The default value is “all”. +
                                                                                                                                      {certfile, Path}
                                                                                                                                      Path to a file containing the SSL certificate. +
                                                                                                                                      {hosts, [Hostnames], [HostOptions]}
                                                                                                                                      This option defines one or more hostnames of connected services and enables you to specify additional options including {password, Secret}. -
                                                                                                                                      http_poll
                                                                                                                                      +
                                                                                                                                      http_poll
                                                                                                                                      This option enables HTTP Polling (JEP-0025) support. HTTP Polling enables access via HTTP requests to ejabberd from behind firewalls which do not allow outgoing sockets on port 5222.
                                                                                                                                      @@ -697,85 +714,85 @@ If HTTP Polling is enabled, it will be available at JWChat (there is a tutorial to install JWChat with instructions for ejabberd). -
                                                                                                                                      inet6
                                                                                                                                      Set up the socket for IPv6. -
                                                                                                                                      {ip, IPAddress}
                                                                                                                                      This option specifies which network +
                                                                                                                                      inet6
                                                                                                                                      Set up the socket for IPv6. +
                                                                                                                                      {ip, IPAddress}
                                                                                                                                      This option specifies which network interface to listen for. For example {ip, {192, 168, 1, 1}}. -
                                                                                                                                      {max_stanza_size, Size}
                                                                                                                                      This +
                                                                                                                                      {max_stanza_size, Size}
                                                                                                                                      This option specifies an approximate maximal size in bytes of XML stanzas. For example {max\_stanza\_size, 65536}. The default value - is ``infinity''. -
                                                                                                                                      {shaper, <access rule>}
                                                                                                                                      This option defines a + is “infinity”. +
                                                                                                                                      {shaper, <access rule>}
                                                                                                                                      This option defines a shaper for the port (see section 3.1.4). The default value - is ``none''. -
                                                                                                                                      ssl
                                                                                                                                      This option specifies that traffic on + is “none”. +
                                                                                                                                      ssl
                                                                                                                                      This option specifies that traffic on the port will be encrypted using SSL. You should also set the certfile option. It is recommended to use the tls option instead. -
                                                                                                                                      starttls
                                                                                                                                      This option +
                                                                                                                                      starttls
                                                                                                                                      This option specifies that STARTTLS encryption is available on connections to the port. You should also set the certfile option. -
                                                                                                                                      starttls_required
                                                                                                                                      This option +
                                                                                                                                      starttls_required
                                                                                                                                      This option specifies that STARTTLS encryption is required on connections to the port. No unencrypted connections will be allowed. You should also set the certfile option. -
                                                                                                                                      tls
                                                                                                                                      This option specifies that traffic on +
                                                                                                                                      tls
                                                                                                                                      This option specifies that traffic on the port will be encrypted using SSL immediately after connecting. You should also set the certfile option. -
                                                                                                                                      zlib
                                                                                                                                      This +
                                                                                                                                      zlib
                                                                                                                                      This option specifies that Zlib stream compression (as defined in JEP-0138) is available on connections to the port. Client cannot use stream compression and stream encryption simultaneously, so if you specify both tls (or ssl) and zlib the latter option will not affect connection at all. -
                                                                                                                                      web_admin
                                                                                                                                      This option +
                                                                                                                                      web_admin
                                                                                                                                      This option enables the web interface for ejabberd administration which is available at 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. + “configure” access rule.
                                                                                                                                      Also the following global options are available for s2s connections: -
                                                                                                                                      - {s2s_use_starttls, true|false}
                                                                                                                                      +
                                                                                                                                      + {s2s_use_starttls, true|false}
                                                                                                                                      This option defines whether to use STARTTLS for s2s connections. -
                                                                                                                                      {s2s_certfile, Path}
                                                                                                                                      Path to the +
                                                                                                                                      {s2s_certfile, Path}
                                                                                                                                      Path to the file containing the SSL certificate. -
                                                                                                                                      {domain_certfile, Domain, Path}
                                                                                                                                      Path +
                                                                                                                                      {domain_certfile, Domain, Path}
                                                                                                                                      Path to the file containing the SSL certificate for the specified domain.
                                                                                                                                      For instance, the following configuration defines that: -
                                                                                                                                      • +
                                                                                                                                        • c2s connections are listened for on port 5222 and 5223 (SSL) and denied - for the user ``bad'' -
                                                                                                                                        • s2s connections are listened for on port 5269 with STARTTLS for secured + for the user “bad” +
                                                                                                                                        • s2s connections are listened for on port 5269 with STARTTLS for secured traffic enabled. -
                                                                                                                                        • Port 5280 is serving the web interface and the HTTP Polling service. Note +
                                                                                                                                        • Port 5280 is serving the web interface and the HTTP Polling service. Note that it is also possible to serve them on different ports. The second example in section 3.4.1 shows how exactly this can be done. -
                                                                                                                                        • All users except for the administrators have a traffic of limit +
                                                                                                                                        • All users except for the administrators have a traffic of limit 1,000 Bytes/second -
                                                                                                                                        • The +
                                                                                                                                        • The AIM transport aim.example.org is connected to port 5233 with password - ``aimsecret'' -
                                                                                                                                        • The ICQ transport JIT (icq.example.org and + “aimsecret” +
                                                                                                                                        • The ICQ transport JIT (icq.example.org and sms.example.org) is connected to port 5234 with password - ``jitsecret'' -
                                                                                                                                        • The + “jitsecret” +
                                                                                                                                        • The MSN transport msn.example.org is connected to port 5235 with password - ``msnsecret'' -
                                                                                                                                        • The + “msnsecret” +
                                                                                                                                        • The Yahoo! transport yahoo.example.org is connected to port 5236 with password - ``yahoosecret'' -
                                                                                                                                        • The Gadu-Gadu transport gg.example.org is - connected to port 5237 with password ``ggsecret'' -
                                                                                                                                        • The + “yahoosecret” +
                                                                                                                                        • The Gadu-Gadu transport gg.example.org is + connected to port 5237 with password “ggsecret” +
                                                                                                                                        • The Jabber Mail Component jmc.example.org is connected to port 5238 with password - ``jmcsecret'' + “jmcsecret
                                                                                                                                        -
                                                                                                                                        +
                                                                                                                                           {acl, blocked, {user, "bad"}}.
                                                                                                                                           {access, c2s, [{deny, blocked},
                                                                                                                                                          {allow, all}]}.
                                                                                                                                        @@ -806,7 +823,7 @@ c2s connections are listened for on port 5222 and 5223 (SSL) and denied
                                                                                                                                           {s2s_certfile, "/path/to/ssl.pem"}.
                                                                                                                                         
                                                                                                                                        Note, that for jabberd 1.4- or WPJabber-based services you have to make the transports log and do XDB by themselves: -
                                                                                                                                        +
                                                                                                                                           <!--
                                                                                                                                              You have to add elogger and rlogger entries here when using ejabberd.
                                                                                                                                              In this case the transport will do the logging.
                                                                                                                                        @@ -838,7 +855,7 @@ services you have to make the transports log and do XDB by themselves:
                                                                                                                                         
                                                                                                                                        -

                                                                                                                                        3.1.7  Modules

                                                                                                                                        +

                                                                                                                                        3.1.7  Modules

                                                                                                                                        @@ -848,17 +865,17 @@ element is the name of a module and the second is a list of options for that module. Read section A for detailed information about modules.

                                                                                                                                        Examples: -
                                                                                                                                        • +
                                                                                                                                          • In this simple example, only the module mod_echo is loaded and no options are specified between square brackets: -
                                                                                                                                            + 
                                                                                                                                               {modules,
                                                                                                                                                [{mod_echo,      []}
                                                                                                                                                ]}.
                                                                                                                                            -
                                                                                                                                          • The second example is also simple: the modules mod_echo, mod_time, and +
                                                                                                                                          • The second example is also simple: the modules mod_echo, mod_time, and mod_version are loaded without options. Remark that, besides the last entry, all entries end with a comma: -
                                                                                                                                            + 
                                                                                                                                               {modules,
                                                                                                                                                [{mod_echo,      []},
                                                                                                                                                 {mod_time,      []},
                                                                                                                                            @@ -867,22 +884,22 @@ In this simple example, only the module mod_echo is loaded and no
                                                                                                                                             
                                                                                                                                          -

                                                                                                                                          3.1.8  Virtual Hosting

                                                                                                                                          +

                                                                                                                                          3.1.8  Virtual Hosting

                                                                                                                                          Options can be defined separately for every virtual host using the host_config option. It has the following syntax: -
                                                                                                                                          +
                                                                                                                                             {host_config, <hostname>, [<option>, <option>, ...]}.
                                                                                                                                           
                                                                                                                                          Examples: -
                                                                                                                                          • +
                                                                                                                                            • Domain example.net is using the internal authentication method while domain example.com is using the LDAP server running on the domain localhost to perform authentication: -
                                                                                                                                              +
                                                                                                                                               {host_config, "example.net", [{auth_method, internal}]}.
                                                                                                                                               
                                                                                                                                               {host_config, "example.com", [{auth_method, ldap},
                                                                                                                                              @@ -891,10 +908,10 @@ Domain example.net is using the internal authentication method while
                                                                                                                                                                             {ldap_rootdn, "dc=localdomain"},
                                                                                                                                                                             {ldap_rootdn, "dc=example,dc=com"},
                                                                                                                                                                             {ldap_password, ""}]}.
                                                                                                                                              -
                                                                                                                                            • Domain example.net is using ODBC to perform authentication +
                                                                                                                                            • Domain example.net is using ODBC to perform authentication while domain example.com is using the LDAP servers running on the domains localhost and otherhost: -
                                                                                                                                              +
                                                                                                                                               {host_config, "example.net", [{auth_method, odbc},
                                                                                                                                                                             {odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}]}.
                                                                                                                                               
                                                                                                                                              @@ -907,24 +924,24 @@ Domain example.net is using the internal authentication method while
                                                                                                                                               
                                                                                                                                            -

                                                                                                                                            3.1.9  SASL anonymous and anonymous login

                                                                                                                                            +

                                                                                                                                            3.1.9  SASL anonymous and anonymous login

                                                                                                                                            The configuration of the anonymous mode can be done with three host_config parameters: -
                                                                                                                                            • +
                                                                                                                                              • auth_method: This value is used for defining the authentication method: internal, odbc, ldap, external). You now have a special extra option to enable anonymous mode: anonymous.

                                                                                                                                                -
                                                                                                                                              • allow_multiple_connections: This option can be either true or false and +
                                                                                                                                              • allow_multiple_connections: This option can be either true or false and is only used when the anonymous mode is enabled. Setting it to true means that the same username will be able to be taken several time in anonymous login mode if different resource are used to connect. This option is only useful in very special cases. It defaults to false.

                                                                                                                                                -
                                                                                                                                              • anonymous_protocol: This option can take three values: +
                                                                                                                                              • anonymous_protocol: This option can take three values: sasl_anon, login_anon or both. sasl_anon means that SASL anonymous mode is enabled. login_anon means that anonymous login mode is enabled. both means that SASL anonymous and login anonymous are @@ -934,26 +951,26 @@ Those options are defined for each virtual host with the host_config parameter (see section 3.1.8).

                                                                                                                                                Examples: -
                                                                                                                                                • +
                                                                                                                                                  • To enable anonymous login on a virtual host: -
                                                                                                                                                    +
                                                                                                                                                     {host_config, "public.example.org", [{auth_method, anonymous},
                                                                                                                                                                                          {anonymous_protocol, login_anon}]}.
                                                                                                                                                    -
                                                                                                                                                  • To enable anonymous login and internal authentication on a virtual host: -
                                                                                                                                                    +
                                                                                                                                                  • To enable anonymous login and internal authentication on a virtual host: +
                                                                                                                                                     {host_config, "public.example.org", [{auth_method, [anonymous,internal]},
                                                                                                                                                                                          {anonymous_protocol, login_anon}]}.
                                                                                                                                                    -
                                                                                                                                                  • To enable SASL anonymous on a virtual host: -
                                                                                                                                                    +
                                                                                                                                                  • To enable SASL anonymous on a virtual host: +
                                                                                                                                                     {host_config, "public.example.org", [{auth_method, [anonymous]},
                                                                                                                                                                                          {anonymous_protocol, sasl_anon}]}.
                                                                                                                                                    -
                                                                                                                                                  • To enable SASL anonymous and anonymous login on a virtual host: -
                                                                                                                                                    +
                                                                                                                                                  • To enable SASL anonymous and anonymous login on a virtual host: +
                                                                                                                                                     {host_config, "public.example.org", [{auth_method, [anonymous]},
                                                                                                                                                                                          {anonymous_protocol, both}]}.
                                                                                                                                                    -
                                                                                                                                                  • To enable SASL anonymous, anonymous login and internal authentication on +
                                                                                                                                                  • To enable SASL anonymous, anonymous login and internal authentication on a virtual host: -
                                                                                                                                                    +
                                                                                                                                                     {host_config, "public.example.org", [{auth_method, [anonymous,internal]},
                                                                                                                                                                                          {anonymous_protocol, both}]}.
                                                                                                                                                     
                                                                                                                                                  @@ -963,12 +980,12 @@ available from:
                                                                                                                                                  -

                                                                                                                                                  3.2  Relational Database Support

                                                                                                                                                  +

                                                                                                                                                  3.2  Relational Database Support

                                                                                                                                                  -

                                                                                                                                                  3.2.1  Preliminary steps

                                                                                                                                                  +

                                                                                                                                                  3.2.1  Preliminary steps

                                                                                                                                                  If you have installed ejabberd using a binary version, the compilation steps @@ -978,17 +995,17 @@ Otherwise, to be able to use ejabberd with a relational database you need to enable ODBC modules during compilation, even if you want to use ejabberd with MySQL or PostgreSQL in native mode. The following configure command can be used to enable the relational modules: -
                                                                                                                                                  +
                                                                                                                                                   ./configure --enable-odbc
                                                                                                                                                   
                                                                                                                                                  If you are planning to use Microsoft SQL Server with ODBC, you need to specify it from the configure command before compilation: -
                                                                                                                                                  +
                                                                                                                                                   ./configure --enable-odbc --enable-mssql
                                                                                                                                                   
                                                                                                                                                  -

                                                                                                                                                  3.2.2  Authentication against a relational database

                                                                                                                                                  +

                                                                                                                                                  3.2.2  Authentication against a relational database

                                                                                                                                                  ejabberd use its internal Mnesia database as a default. It is however possible @@ -1001,7 +1018,7 @@ system.
                                                                                                                                                  The option value name be misleading, as the method name is use both for access to relational database through ODBC or through the native interface. In any case, the first step is to define the odbc auth_method. For example: -
                                                                                                                                                  +
                                                                                                                                                   {host_config, "public.example.org", [{auth_method, [odbc]}]}.
                                                                                                                                                   
                                                                                                                                                  The actual database access is defined in the option odbc_server. Its @@ -1010,16 +1027,16 @@ interface available, PostgreSQL or MySQL.

                                                                                                                                                  To use a relational database through ODBC, you can pass the ODBC connection string as odbc_server parameter. For example: -
                                                                                                                                                  +
                                                                                                                                                   {odbc_server, "DSN=database;UID=ejabberd;PWD=password"}.
                                                                                                                                                   
                                                                                                                                                  To use the native PostgreSQL interface, you can pass a tuple of the following form as parameter: -
                                                                                                                                                  +
                                                                                                                                                   {pgsql, "Server", "Database", "Username", "Password"}
                                                                                                                                                   
                                                                                                                                                  pgsql is a keyword that should be kept as is. For example: -
                                                                                                                                                  +
                                                                                                                                                   {odbc_server, {pgsql, "localhost", "database", "ejabberd", "password"}}.
                                                                                                                                                   
                                                                                                                                                  Note that you need to install the Erlang PgSQL library first. This library is @@ -1028,11 +1045,11 @@ available from Sourceforge: {mysql, "Server", "Database", "Username", "Password"}
                                                                                                                                                  mysql is a keyword that should be kept as is. For example: -
                                                                                                                                                  +
                                                                                                                                                   {odbc_server, {mysql, "localhost", "test", "root", "password"}}.
                                                                                                                                                   
                                                                                                                                                  Note that you need to install the Erlang MySQL library first. This library is @@ -1043,61 +1060,61 @@ available from:
                                                                                                                                                  3.2.3  Relational database for other modules +

                                                                                                                                                  3.2.3  Relational database for other modules

                                                                                                                                                  It is possible to use a relational database to store pieces of information. You can do this by changing the module name to a name with an _odbc suffix in ejabberd config file. You can use a relational database for the following data: -
                                                                                                                                                  • +
                                                                                                                                                    • Last connection date and time: Use mod_last_odbc instead of mod_last. -
                                                                                                                                                    • Offline messages: Use mod_offline_odbc instead of +
                                                                                                                                                    • Offline messages: Use mod_offline_odbc instead of mod_offline. -
                                                                                                                                                    • Rosters: Use mod_roster_odbc instead of mod_roster. -
                                                                                                                                                    • Users' VCARD: Use mod_vcard_odbc instead of mod_vcard. +
                                                                                                                                                    • Rosters: Use mod_roster_odbc instead of mod_roster. +
                                                                                                                                                    • Users' VCARD: Use mod_vcard_odbc instead of mod_vcard.
                                                                                                                                                    -

                                                                                                                                                    3.3  Creating an Initial Administrator

                                                                                                                                                    +

                                                                                                                                                    3.3  Creating an Initial Administrator

                                                                                                                                                    Before the web interface can be entered to perform administration tasks, an account with administrator rights is needed on your ejabberd deployment.

                                                                                                                                                    Instructions to create an initial administrator account: -
                                                                                                                                                    1. +
                                                                                                                                                      1. Register an account on your ejabberd deployment. An account can be created in two ways: -
                                                                                                                                                        1. +
                                                                                                                                                          1. Using the tool ejabberdctl (see section 3.4.2): -
                                                                                                                                                            + 
                                                                                                                                                             % ejabberdctl node@host register admin example.org password
                                                                                                                                                            -
                                                                                                                                                          2. Using In-Band Registration (see section A.14): you can +
                                                                                                                                                          3. Using In-Band Registration (see section A.14): you can use a Jabber client to register an account.
                                                                                                                                                          -
                                                                                                                                                        2. Edit the configuration file to promote the account created in the previous +
                                                                                                                                                        3. Edit the configuration file to promote the account created in the previous step to an account with administrator rights. Note that if you want to add more administrators, a seperate acl entry is needed for each administrator. -
                                                                                                                                                          + 
                                                                                                                                                             {acl, admins, {user, "admin", "example.org"}}.
                                                                                                                                                             {access, configure, [{allow, admins}]}.
                                                                                                                                                          -
                                                                                                                                                        4. Restart ejabberd to load the new configuration. -
                                                                                                                                                        5. Open the web interface (http://server:port/admin/) in your +
                                                                                                                                                        6. Restart ejabberd to load the new configuration. +
                                                                                                                                                        7. Open the web interface (http://server:port/admin/) in your favourite browser. Make sure to enter the full JID as username (in this example: admin@example.org. The reason that you also need to enter the suffix, is because ejabberd's virtual hosting support.
                                                                                                                                                        -

                                                                                                                                                        3.4  Online Configuration and Monitoring

                                                                                                                                                        +

                                                                                                                                                        3.4  Online Configuration and Monitoring

                                                                                                                                                        -

                                                                                                                                                        3.4.1  Web Interface

                                                                                                                                                        +

                                                                                                                                                        3.4.1  Web Interface

                                                                                                                                                        @@ -1108,22 +1125,24 @@ section 3.1.6). Then you can open will be asked to enter the username (the full Jabber ID) and password of an ejabberd user with administrator rights. After authentication you will see a page similar to figure 1. -

                                                                                                                                                        +


                                                                                                                                                        -
                                                                                                                                                        Figure 1: Top page from the web interface

                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        Figure 1: Top page from the web interface

                                                                                                                                                        +
                                                                                                                                                        -

                                                                                                                                                        +

                                                                                                                                                        Here you can edit access restrictions, manage users, create backups, manage the database, enable/disable ports listened for, view server statistics,...

                                                                                                                                                        Examples: -
                                                                                                                                                        • +
                                                                                                                                                          • You can serve the web interface on the same port as the HTTP Polling interface. In this example you should point your web browser to http://example.org:5280/admin/ to @@ -1132,11 +1151,11 @@ You can serve the web interface on the same port as the the virtual host example.com. Before you get access to the web interface 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 ``admin@example.net'' to administer all virtual hosts (first - URL). If you log in with ``admin@example.com'' on
                                                                                                                                                            + username “admin@example.net” to administer all virtual hosts (first + URL). If you log in with “admin@example.com” on
                                                                                                                                                            http://example.org:5280/admin/server/example.com/ you can only administer the virtual host example.com. -
                                                                                                                                                            + 
                                                                                                                                                               ...
                                                                                                                                                               {acl, admins, {user, "admin", "example.net"}}.
                                                                                                                                                               {host_config, "example.com", [{acl, admins, {user, "admin", "example.com"}}]}.
                                                                                                                                                            @@ -1150,11 +1169,11 @@ You can serve the web interface on the same port as the
                                                                                                                                                                 ...
                                                                                                                                                                ]
                                                                                                                                                               }.
                                                                                                                                                            -
                                                                                                                                                          • For security reasons, you can serve the web interface on a secured +
                                                                                                                                                          • For security reasons, you can serve the web interface 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 web browser to https://192.168.1.1:5280/admin/: -
                                                                                                                                                            + 
                                                                                                                                                               ...
                                                                                                                                                               {hosts, ["example.org"]}.
                                                                                                                                                               ...
                                                                                                                                                            @@ -1169,13 +1188,13 @@ You can serve the web interface on the same port as the
                                                                                                                                                             
                                                                                                                                                          -

                                                                                                                                                          3.4.2  ejabberdctl

                                                                                                                                                          +

                                                                                                                                                          3.4.2  ejabberdctl

                                                                                                                                                          It is possible to do some administration operations using the command line tool ejabberdctl. You can list all available options by running ejabberdctl without arguments: -
                                                                                                                                                          +
                                                                                                                                                           % ejabberdctl
                                                                                                                                                           Usage: ejabberdctl node command
                                                                                                                                                           
                                                                                                                                                          @@ -1200,27 +1219,27 @@ Example:
                                                                                                                                                             ejabberdctl ejabberd@host restart
                                                                                                                                                           
                                                                                                                                                          Additional information: -
                                                                                                                                                          -reopen-log
                                                                                                                                                          If you use a tool to rotate logs, you have to configure it +
                                                                                                                                                          +reopen-log
                                                                                                                                                          If you use a tool to rotate logs, you have to configure it so that this command is executed after each rotation. -
                                                                                                                                                          backup, restore, install-fallback, dump, load
                                                                                                                                                          You can use these +
                                                                                                                                                          backup, restore, install-fallback, dump, load
                                                                                                                                                          You can use these commands to create and restore backups. -
                                                                                                                                                          import-file, import-dir
                                                                                                                                                          +
                                                                                                                                                          import-file, import-dir
                                                                                                                                                          These options can be used to migrate from other Jabber/XMPP servers. There exist tutorials to migrate from jabberd 1.4 and to migrate from jabberd2. -
                                                                                                                                                          delete-expired-messages
                                                                                                                                                          This option can be used to delete old messages +
                                                                                                                                                          delete-expired-messages
                                                                                                                                                          This option can be used to delete old messages in offline storage. This might be useful when the number of offline messages is very high.
                                                                                                                                                          -

                                                                                                                                                          4  Firewall Settings

                                                                                                                                                          +

                                                                                                                                                          4  Firewall Settings

                                                                                                                                                          You need to take the following TCP ports in mind when configuring your firewall: -

                                                                                                                                                          +

                                                                                                                                                          @@ -1241,28 +1260,28 @@ You need to take the following TCP ports in mind when configuring your firewall:
                                                                                                                                                          Port DescriptionOnly for clustring (see 6). This range is configurable (see 2.4).
                                                                                                                                                          -

                                                                                                                                                          +

                                                                                                                                                          -

                                                                                                                                                          5  SRV Records

                                                                                                                                                          +

                                                                                                                                                          5  SRV Records

                                                                                                                                                          -
                                                                                                                                                          • + -

                                                                                                                                                            6  Clustering

                                                                                                                                                            +

                                                                                                                                                            6  Clustering

                                                                                                                                                            -

                                                                                                                                                            6.1  How it Works

                                                                                                                                                            +

                                                                                                                                                            6.1  How it Works

                                                                                                                                                            @@ -1275,15 +1294,15 @@ needed because all nodes exchange information about connected users, s2s connections, registered services, etc...

                                                                                                                                                            Each ejabberd node has the following modules: -
                                                                                                                                                            • +
                                                                                                                                                              • router, -
                                                                                                                                                              • local router, -
                                                                                                                                                              • session manager, -
                                                                                                                                                              • s2s manager. +
                                                                                                                                                              • local router, +
                                                                                                                                                              • session manager, +
                                                                                                                                                              • s2s manager.
                                                                                                                                                              -

                                                                                                                                                              6.1.1  Router

                                                                                                                                                              +

                                                                                                                                                              6.1.1  Router

                                                                                                                                                              This module is the main router of Jabber packets on each node. It @@ -1294,7 +1313,7 @@ appropriate process. If not, it is sent to the s2s manager.

                                                                                                                                                              -

                                                                                                                                                              6.1.2  Local Router

                                                                                                                                                              +

                                                                                                                                                              6.1.2  Local Router

                                                                                                                                                              This module routes packets which have a destination domain equal to @@ -1304,7 +1323,7 @@ on its content.

                                                                                                                                                              -

                                                                                                                                                              6.1.3  Session Manager

                                                                                                                                                              +

                                                                                                                                                              6.1.3  Session Manager

                                                                                                                                                              This module routes packets to local users. It looks up to which user @@ -1314,7 +1333,7 @@ storage, or bounced back.

                                                                                                                                                              -

                                                                                                                                                              6.1.4  s2s Manager

                                                                                                                                                              +

                                                                                                                                                              6.1.4  s2s Manager

                                                                                                                                                              This module routes packets to other Jabber servers. First, it @@ -1325,52 +1344,52 @@ serving this connection, otherwise a new connection is opened.

                                                                                                                                                              -

                                                                                                                                                              6.2  Clustering Setup

                                                                                                                                                              +

                                                                                                                                                              6.2  Clustering Setup

                                                                                                                                                              Suppose you already configured ejabberd on one machine named (first), and you need to setup another one to make an ejabberd cluster. Then do following steps: -
                                                                                                                                                              1. +
                                                                                                                                                                1. Copy ~ejabberd/.erlang.cookie file from first to second.

                                                                                                                                                                  -(alt) You can also add ``-cookie content_of_.erlang.cookie'' - option to all ``erl'' commands below.
                                                                                                                                                                  +(alt) You can also add “-cookie content_of_.erlang.cookie” + option to all “erl” commands below.

                                                                                                                                                                  -
                                                                                                                                                                2. On second run as the `ejabberd' user in the directory +
                                                                                                                                                                3. On second run as the `ejabberd' user in the directory where ejabberd will work later the following command: -
                                                                                                                                                                  +
                                                                                                                                                                   erl -sname ejabberd \
                                                                                                                                                                       -mnesia extra_db_nodes "['ejabberd@first']" \
                                                                                                                                                                       -s mnesia
                                                                                                                                                                   
                                                                                                                                                                  This will start Mnesia serving the same database as ejabberd@first. - You can check this by running the command ``mnesia:info().''. You + You can check this by running the command “mnesia:info().”. You should see a lot of remote tables and a line like the following: -
                                                                                                                                                                  +
                                                                                                                                                                   running db nodes   = [ejabberd@first, ejabberd@second]
                                                                                                                                                                   


                                                                                                                                                                  -
                                                                                                                                                                4. Now run the following in the same ``erl'' session: -
                                                                                                                                                                  +
                                                                                                                                                                5. Now run the following in the same “erl” session: +
                                                                                                                                                                   mnesia:change_table_copy_type(schema, node(), disc_copies).
                                                                                                                                                                   
                                                                                                                                                                  This will create local disc storage for the database.

                                                                                                                                                                  -(alt) Change storage type of `scheme' table to ``RAM and disc - copy'' on the second node via the web interface.
                                                                                                                                                                  +(alt) Change storage type of `scheme' table to “RAM and disc + copy” on the second node via the web interface.

                                                                                                                                                                  -
                                                                                                                                                                6. Now you can add replicas of various tables to this node with - ``mnesia:add_table_copy'' or - ``mnesia:change_table_copy_type'' as above (just replace - ``schema'' with another table name and ``disc_copies'' - can be replaced with ``ram_copies'' or - ``disc_only_copies'').
                                                                                                                                                                  +
                                                                                                                                                                7. Now you can add replicas of various tables to this node with + “mnesia:add_table_copy” or + “mnesia:change_table_copy_type” as above (just replace + “schema” with another table name and “disc_copies” + can be replaced with “ram_copies” or + “disc_only_copies”).

                                                                                                                                                                  Which tables to replicate is very dependant on your needs, you can get - some hints from the command ``mnesia:info().'', by looking at the + some hints from the command “mnesia:info().”, by looking at the size of tables and the default storage type for each table on 'first'.

                                                                                                                                                                  Replicating a table makes lookups in this table faster on this node. @@ -1382,13 +1401,13 @@ Also Run “init:stop().” or just “q().” to exit from the Erlang shell. This probably can take some time if Mnesia has not yet transfered and processed all data it needed from first.

                                                                                                                                                                  -
                                                                                                                                                                8. Now run ejabberd on second with almost the same config as - on first (you probably don't need to duplicate ``acl'' - and ``access'' options --- they will be taken from +
                                                                                                                                                                9. Now run ejabberd on second with almost the same config as + on first (you probably don't need to duplicate “acl” + and “access” options — they will be taken from first, and mod_muc and mod_irc should be enabled only on one machine in the cluster).
                                                                                                                                                                @@ -1398,13 +1417,13 @@ domain.
                                                                                                                                                                -

                                                                                                                                                                A  Built-in Modules

                                                                                                                                                                +

                                                                                                                                                                A  Built-in Modules

                                                                                                                                                                -

                                                                                                                                                                A.1  Overview

                                                                                                                                                                +

                                                                                                                                                                A.1  Overview

                                                                                                                                                                @@ -1416,14 +1435,14 @@ that they can contain severe bugs and security leaks. Therefore, use them at your own risk!

                                                                                                                                                                You can see which database backend each module needs by looking at the suffix: -
                                                                                                                                                                • -``_ldap'', this means that the module needs an LDAP server as backend. -
                                                                                                                                                                • ``_odbc'', this means that the module needs an ODBC compatible database, +
                                                                                                                                                                  • +“_ldap”, this means that the module needs an LDAP server as backend. +
                                                                                                                                                                  • “_odbc”, this means that the module needs an ODBC compatible database, a MySQL database, or a PostgreSQL database as backend. -
                                                                                                                                                                  • Nothing, this means that the modules uses Erlang's built-in database +
                                                                                                                                                                  • Nothing, this means that the modules uses Erlang's built-in database Mnesia as backend.
                                                                                                                                                                  -

                                                                                                                                                                  +

                                                                                                                                                                  @@ -1610,13 +1629,13 @@ You can see which database backend each module needs by looking at the suffix:
                                                                                                                                                                  Module Feature  No
                                                                                                                                                                  -

                                                                                                                                                                  +

                                                                                                                                                                  (*) This module or a similar one with another database backend is needed for XMPP compliancy.

                                                                                                                                                                  -

                                                                                                                                                                  A.2  Common Options

                                                                                                                                                                  +

                                                                                                                                                                  A.2  Common Options

                                                                                                                                                                  The following options are used by many modules. Therefore, they are described in @@ -1624,7 +1643,7 @@ this separate section.

                                                                                                                                                                  -

                                                                                                                                                                  A.2.1  iqdisc

                                                                                                                                                                  +

                                                                                                                                                                  A.2.1  iqdisc

                                                                                                                                                                  @@ -1632,23 +1651,23 @@ Many modules define handlers for processing IQ queries of different namespaces to this server or to a user (e. g. to example.org or to user@example.org). This option defines processing discipline for these queries. Possible values are: -
                                                                                                                                                                  -no_queue
                                                                                                                                                                  All queries of a namespace with this processing discipline are +
                                                                                                                                                                  +no_queue
                                                                                                                                                                  All queries of a namespace with this processing discipline are processed immediately. This also means that no other packets can be processed until this one has been completely processed. Hence this discipline is not recommended if the processing of a query can take a relatively long time. -
                                                                                                                                                                  one_queue
                                                                                                                                                                  In this case a separate queue is created for the processing +
                                                                                                                                                                  one_queue
                                                                                                                                                                  In this case a separate queue is created for the processing of IQ queries of a namespace with this discipline. In addition, the processing of this queue is done in parallel with that of other packets. This discipline is most recommended. -
                                                                                                                                                                  parallel
                                                                                                                                                                  For every packet with this discipline a separate Erlang process +
                                                                                                                                                                  parallel
                                                                                                                                                                  For every packet with this discipline a separate Erlang process is spawned. Consequently, all these packets are processed in parallel. Although spawning of Erlang process has a relatively low cost, this can break the server's normal work, because the Erlang emulator has a limit on the number of processes (32000 by default).
                                                                                                                                                                  Example: -
                                                                                                                                                                  +
                                                                                                                                                                     {modules,
                                                                                                                                                                      [
                                                                                                                                                                       ...
                                                                                                                                                                  @@ -1658,7 +1677,7 @@ Example:
                                                                                                                                                                   
                                                                                                                                                                  -

                                                                                                                                                                  A.2.2  hosts

                                                                                                                                                                  +

                                                                                                                                                                  A.2.2  hosts

                                                                                                                                                                  @@ -1666,19 +1685,19 @@ A module acting as a service can have one or more hostnames. These hostnames can be defined with the hosts option.

                                                                                                                                                                  Examples: -
                                                                                                                                                                  • +
                                                                                                                                                                    • Serving the echo module on one domain: -
                                                                                                                                                                      • -
                                                                                                                                                                        + 
                                                                                                                                                                        • +
                                                                                                                                                                             {modules,
                                                                                                                                                                              [
                                                                                                                                                                               ...
                                                                                                                                                                               {mod_echo, [{hosts, ["echo.example.org"]}]},
                                                                                                                                                                               ...
                                                                                                                                                                              ]}.
                                                                                                                                                                          -
                                                                                                                                                                        • Backwards compatibility with older ejabberd versions can be retained +
                                                                                                                                                                      • Backwards compatibility with older ejabberd versions can be retained with: -
                                                                                                                                                                        + 
                                                                                                                                                                           {modules,
                                                                                                                                                                            [
                                                                                                                                                                             ...
                                                                                                                                                                        @@ -1686,8 +1705,8 @@ Serving the echo module on one domain:
                                                                                                                                                                             ...
                                                                                                                                                                            ]}.
                                                                                                                                                                         
                                                                                                                                                                      -
                                                                                                                                                                    • Serving the echo module on two domains: -
                                                                                                                                                                      + 
                                                                                                                                                                    • Serving the echo module on two domains: +
                                                                                                                                                                         {modules,
                                                                                                                                                                          [
                                                                                                                                                                           ...
                                                                                                                                                                      @@ -1697,7 +1716,7 @@ Serving the echo module on one domain:
                                                                                                                                                                       
                                                                                                                                                                    -

                                                                                                                                                                    A.3  mod_announce

                                                                                                                                                                    +

                                                                                                                                                                    A.3  mod_announce

                                                                                                                                                                    @@ -1707,36 +1726,36 @@ Jabber client by sending messages to specific JIDs. These JIDs are listed in next paragraph. The first JID in each entry will apply only to the virtual host example.org, while the JID between brackets will apply to all virtual hosts: -
                                                                                                                                                                    -example.org/announce/all (example.org/announce/all-hosts/all)
                                                                                                                                                                    The +
                                                                                                                                                                    +example.org/announce/all (example.org/announce/all-hosts/all)
                                                                                                                                                                    The message is sent to all registered users. If the user is online and connected to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that offline storage (see section A.10) is enabled. -
                                                                                                                                                                    example.org/announce/online (example.org/announce/all-hosts/online)
                                                                                                                                                                    The +
                                                                                                                                                                    example.org/announce/online (example.org/announce/all-hosts/online)
                                                                                                                                                                    The message is sent to all connected users. If the user is online and connected to several resources, all resources will receive the message. -
                                                                                                                                                                    example.org/announce/motd (example.org/announce/all-hosts/motd)
                                                                                                                                                                    The +
                                                                                                                                                                    example.org/announce/motd (example.org/announce/all-hosts/motd)
                                                                                                                                                                    The message is set as the message of the day (MOTD) and is sent to users when they login. In addition the message is sent to all connected users (similar to announce/online). -
                                                                                                                                                                    example.org/announce/motd/update (example.org/announce/all-hosts/motd/update)
                                                                                                                                                                    +
                                                                                                                                                                    example.org/announce/motd/update (example.org/announce/all-hosts/motd/update)
                                                                                                                                                                    The message is set as message of the day (MOTD) and is sent to users when they login. The message is not sent to any currently connected user. -
                                                                                                                                                                    example.org/announce/motd/delete (example.org/announce/all-hosts/motd/delete)
                                                                                                                                                                    +
                                                                                                                                                                    example.org/announce/motd/delete (example.org/announce/all-hosts/motd/delete)
                                                                                                                                                                    Any message sent to this JID removes the existing message of the day (MOTD).
                                                                                                                                                                    Options: -
                                                                                                                                                                    -access
                                                                                                                                                                    This option specifies who is allowed to +
                                                                                                                                                                    +access
                                                                                                                                                                    This option specifies who is allowed to send announcements and to set the message of the day (by default, nobody is able to send such messages).
                                                                                                                                                                    Examples: -
                                                                                                                                                                    • +
                                                                                                                                                                      • Only administrators can send announcements: -
                                                                                                                                                                        + 
                                                                                                                                                                           {access, announce, [{allow, admins}]}.
                                                                                                                                                                         
                                                                                                                                                                           {modules,
                                                                                                                                                                        @@ -1745,8 +1764,8 @@ Only administrators can send announcements:
                                                                                                                                                                             {mod_announce, [{access, announce}]},
                                                                                                                                                                             ...
                                                                                                                                                                            ]}.
                                                                                                                                                                        -
                                                                                                                                                                      • Administrators as well as the direction can send announcements: -
                                                                                                                                                                        +
                                                                                                                                                                      • Administrators as well as the direction can send announcements: +
                                                                                                                                                                           {acl, direction, {user, "big_boss", "example.org"}}.
                                                                                                                                                                           {acl, direction, {user, "assistant", "example.org"}}.
                                                                                                                                                                           {acl, admins, {user, "admin", "example.org"}}.
                                                                                                                                                                        @@ -1763,7 +1782,7 @@ Only administrators can send announcements:
                                                                                                                                                                         
                                                                                                                                                                      -

                                                                                                                                                                      A.4  mod_disco

                                                                                                                                                                      +

                                                                                                                                                                      A.4  mod_disco

                                                                                                                                                                      @@ -1776,26 +1795,26 @@ the newer Service Discovery protocol if you want them be able to discover the services you offer.

                                                                                                                                                                      Options: -
                                                                                                                                                                      -iqdisc
                                                                                                                                                                      This specifies +
                                                                                                                                                                      +iqdisc
                                                                                                                                                                      This specifies the processing discipline for Service Discovery (http://jabber.org/protocol/disco#items and http://jabber.org/protocol/disco#info) IQ queries (see section A.2.1). -
                                                                                                                                                                      extra_domains
                                                                                                                                                                      With this option, +
                                                                                                                                                                      extra_domains
                                                                                                                                                                      With this option, extra domains can be added to the Service Discovery item list.
                                                                                                                                                                      Examples: -
                                                                                                                                                                      • +
                                                                                                                                                                        • To serve a link to the Jabber User Directory on jabber.org: -
                                                                                                                                                                          + 
                                                                                                                                                                             {modules,
                                                                                                                                                                              [
                                                                                                                                                                               ...
                                                                                                                                                                               {mod_disco, [{extra_domains, ["users.jabber.org"]}]},
                                                                                                                                                                               ...
                                                                                                                                                                              ]}.
                                                                                                                                                                          -
                                                                                                                                                                        • To serve a link to the transports on another server: -
                                                                                                                                                                          +
                                                                                                                                                                        • To serve a link to the transports on another server: +
                                                                                                                                                                             {modules,
                                                                                                                                                                              [
                                                                                                                                                                               ...
                                                                                                                                                                          @@ -1803,8 +1822,8 @@ To serve a link to the Jabber User Directory on jabber.org:
                                                                                                                                                                                                             "msn.example.com"]}]},
                                                                                                                                                                               ...
                                                                                                                                                                              ]}.
                                                                                                                                                                          -
                                                                                                                                                                        • To serve a link to a few friendly servers: -
                                                                                                                                                                          +
                                                                                                                                                                        • To serve a link to a few friendly servers: +
                                                                                                                                                                             {modules,
                                                                                                                                                                              [
                                                                                                                                                                               ...
                                                                                                                                                                          @@ -1815,7 +1834,7 @@ To serve a link to the Jabber User Directory on jabber.org:
                                                                                                                                                                           
                                                                                                                                                                        -

                                                                                                                                                                        A.5  mod_echo

                                                                                                                                                                        +

                                                                                                                                                                        A.5  mod_echo

                                                                                                                                                                        @@ -1824,31 +1843,31 @@ packet back to the sender. This mirror can be of interest for ejabberd and Jabber client debugging.

                                                                                                                                                                        Options: -
                                                                                                                                                                        +
                                                                                                                                                                        - hosts
                                                                                                                                                                        This option defines the hostnames of the + hosts
                                                                                                                                                                        This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix ``echo.'' is added to all + the old host is present, the prefix “echo.” is added to all ejabberd hostnames.
                                                                                                                                                                        Examples: -
                                                                                                                                                                        • +
                                                                                                                                                                          • Mirror, mirror, on the wall, who is the most beautiful of them all? -
                                                                                                                                                                            + 
                                                                                                                                                                               {modules,
                                                                                                                                                                                [
                                                                                                                                                                                 ...
                                                                                                                                                                                 {mod_echo, [{hosts, ["mirror.example.org"]}]},
                                                                                                                                                                                 ...
                                                                                                                                                                                ]}.
                                                                                                                                                                            -
                                                                                                                                                                          • If you still do not understand the inner workings of mod_echo, +
                                                                                                                                                                          • If you still do not understand the inner workings of mod_echo, you can find a few more examples in section A.2.2.
                                                                                                                                                                          -

                                                                                                                                                                          A.6  mod_irc

                                                                                                                                                                          +

                                                                                                                                                                          A.6  mod_irc

                                                                                                                                                                          @@ -1857,50 +1876,50 @@ servers.

                                                                                                                                                                          End user information: -
                                                                                                                                                                          • -A Jabber client with ``groupchat 1.0'' support or Multi-User +
                                                                                                                                                                            • +A Jabber client with “groupchat 1.0” support or Multi-User Chat support (JEP-0045) is necessary to join IRC channels. -
                                                                                                                                                                            • An IRC channel can be joined in nearly the same way as joining a +
                                                                                                                                                                            • An IRC channel can be joined in nearly the same way as joining a Jabber Multi-User Chat room. The difference is that the room name will - be ``channel%irc.example.org'' in case irc.example.org is - the IRC server hosting ``channel''. And of course the host should point + be “channel%irc.example.org” in case irc.example.org is + the IRC server hosting “channel”. And of course the host should point to the IRC transport instead of the Multi-User Chat service. -
                                                                                                                                                                            • You can register your nickame by sending ``IDENTIFY password'' to
                                                                                                                                                                              +
                                                                                                                                                                            • You can register your nickame by sending “IDENTIFY password” to
                                                                                                                                                                              nickserver!irc.example.org@irc.jabberserver.org. -
                                                                                                                                                                            • Entering your password is possible by sending ``LOGIN nick password''
                                                                                                                                                                              +
                                                                                                                                                                            • Entering your password is possible by sending “LOGIN nick password”
                                                                                                                                                                              to nickserver!irc.example.org@irc.jabberserver.org. -
                                                                                                                                                                            • When using a popular Jabber server, it can occur that no +
                                                                                                                                                                            • When using a popular Jabber server, it can occur that no connection can be achieved with some IRC servers because they limit the number of conections from one IP.
                                                                                                                                                                            Options: -
                                                                                                                                                                            +
                                                                                                                                                                            - hosts
                                                                                                                                                                            This option defines the hostnames of the + hosts
                                                                                                                                                                            This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix ``irc.'' is added to all + the old host is present, the prefix “irc.” is added to all ejabberd hostnames. -
                                                                                                                                                                            access
                                                                                                                                                                            This option can be used to specify who +
                                                                                                                                                                            access
                                                                                                                                                                            This option can be used to specify who may use the IRC transport (default value: all).
                                                                                                                                                                            Examples: -
                                                                                                                                                                            • +
                                                                                                                                                                              • In the first example, the IRC transport is available on (all) your - virtual host(s) with the prefix ``irc.''. Furthermore, anyone is + virtual host(s) with the prefix “irc.”. Furthermore, anyone is able to use the transport. -
                                                                                                                                                                                + 
                                                                                                                                                                                   {modules,
                                                                                                                                                                                    [
                                                                                                                                                                                     ...
                                                                                                                                                                                     {mod_irc, [{access, all}]},
                                                                                                                                                                                     ...
                                                                                                                                                                                    ]}.
                                                                                                                                                                                -
                                                                                                                                                                              • In next example the IRC transport is available on the two virtual hosts +
                                                                                                                                                                              • In next example the IRC transport is available on the two virtual hosts example.net and example.com with different prefixes on each host. Moreover, the transport is only accessible by paying customers registered on our domains and on other servers. -
                                                                                                                                                                                + 
                                                                                                                                                                                   {acl, paying_customers, {user, "customer1", "example.net"}}.
                                                                                                                                                                                   {acl, paying_customers, {user, "customer2", "example.com"}}.
                                                                                                                                                                                   {acl, paying_customers, {user, "customer3", "example.org"}}.
                                                                                                                                                                                @@ -1918,7 +1937,7 @@ In the first example, the IRC transport is available on (all) your
                                                                                                                                                                                 
                                                                                                                                                                              -

                                                                                                                                                                              A.7  mod_last

                                                                                                                                                                              +

                                                                                                                                                                              A.7  mod_last

                                                                                                                                                                              @@ -1928,14 +1947,14 @@ connected user was last active on the server, or to query the uptime of the ejabberd server.

                                                                                                                                                                              Options: -
                                                                                                                                                                              -iqdisc
                                                                                                                                                                              This specifies +
                                                                                                                                                                              +iqdisc
                                                                                                                                                                              This specifies the processing discipline for Last activity (jabber:iq:last) IQ queries (see section A.2.1).
                                                                                                                                                                              -

                                                                                                                                                                              A.8  mod_muc

                                                                                                                                                                              +

                                                                                                                                                                              A.8  mod_muc

                                                                                                                                                                              @@ -1944,34 +1963,34 @@ With this module enabled, your server will support Multi-User Chat that this module is not (yet) clusterable.

                                                                                                                                                                              Some of the features of Multi-User Chat: -
                                                                                                                                                                              • +
                                                                                                                                                                                • Sending private messages to room participants. -
                                                                                                                                                                                • Inviting users. -
                                                                                                                                                                                • Setting a conference topic. -
                                                                                                                                                                                • Creating password protected rooms. -
                                                                                                                                                                                • Kicking and banning participants. +
                                                                                                                                                                                • Inviting users. +
                                                                                                                                                                                • Setting a conference topic. +
                                                                                                                                                                                • Creating password protected rooms. +
                                                                                                                                                                                • Kicking and banning participants.
                                                                                                                                                                                Options: -
                                                                                                                                                                                +
                                                                                                                                                                                - hosts
                                                                                                                                                                                This option defines the hostnames of the + hosts
                                                                                                                                                                                This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix ``conference.'' is added to all + the old host is present, the prefix “conference.” is added to all ejabberd hostnames. -
                                                                                                                                                                                access
                                                                                                                                                                                You can specify who is allowed to use +
                                                                                                                                                                                access
                                                                                                                                                                                You can specify who is allowed to use the Multi-User Chat service (by default, everyone is allowed to use it). -
                                                                                                                                                                                access_create
                                                                                                                                                                                To configure who is +
                                                                                                                                                                                access_create
                                                                                                                                                                                To configure who is allowed to create new rooms at the Multi-User Chat service, this option can be used (by default, everybody is allowed to create rooms). -
                                                                                                                                                                                access_admin
                                                                                                                                                                                This option specifies +
                                                                                                                                                                                access_admin
                                                                                                                                                                                This option specifies who is allowed to administrate the Multi-User Chat service (the default value is none, which means that only the room creator can administer his room). By sending a message to the service JID, administrators can send service messages that will be displayed in every active room.

                                                                                                                                                                                -
                                                                                                                                                                                history_size
                                                                                                                                                                                a small history of the +
                                                                                                                                                                                history_size
                                                                                                                                                                                a small history of the current discussion is send to users when they enter the room. This option make it possible to define the number of history messages to keep and send to the user joining the room. The value is a integer. Setting the value to 0 @@ -1979,17 +1998,17 @@ Options: is 20. This value is global and affects all MUC rooms on the server.
                                                                                                                                                                                Examples: -
                                                                                                                                                                                • +
                                                                                                                                                                                  • In the first example everyone is allowed to use the Multi-User Chat service. Everyone will also be able to create new rooms but only the user admin@example.org is allowed to administrate any room. In this example he is also a global administrator. When admin@example.org - sends a message such as ``Tomorrow, the Jabber server will be moved + sends a message such as “Tomorrow, the Jabber server will be moved to new hardware. This will involve service breakdowns around 23:00 UMT. - We apologise for this inconvenience.'' to conference.example.org, + We apologise for this inconvenience.” to conference.example.org, it will be displayed in all active rooms. In this example the history feature is disabled. -
                                                                                                                                                                                    + 
                                                                                                                                                                                       {acl, admins, {user, "admin", "example.org"}}.
                                                                                                                                                                                       ...
                                                                                                                                                                                       {access, muc_admins, [{allow, admins}]}.
                                                                                                                                                                                    @@ -2003,17 +2022,17 @@ In the first example everyone is allowed to use the Multi-User Chat
                                                                                                                                                                                                    {history_size, 0}]},
                                                                                                                                                                                         ...
                                                                                                                                                                                        ]}.
                                                                                                                                                                                    -
                                                                                                                                                                                  • In the second example the Multi-User Chat service is only accessible by +
                                                                                                                                                                                  • In the second example the Multi-User Chat service is only accessible by paying customers registered on our domains and on other servers. Of course the administrator is also allowed to access rooms. In addition, he is the only authority able to create and administer rooms. When - admin@example.org sends a message such as ``Tomorrow, the Jabber + admin@example.org sends a message such as “Tomorrow, the Jabber server will be moved to new hardware. This will involve service breakdowns - around 23:00 UMT. We apologise for this inconvenience.'' to + around 23:00 UMT. We apologise for this inconvenience.” to conference.example.org, it will be displayed in all active rooms. No history_size option is used, this means that the feature is enabled and the default value of 20 history messages will be send to the users. -
                                                                                                                                                                                    + 
                                                                                                                                                                                       {acl, paying_customers, {user, "customer1", "example.net"}}.
                                                                                                                                                                                       {acl, paying_customers, {user, "customer2", "example.com"}}.
                                                                                                                                                                                       {acl, paying_customers, {user, "customer3", "example.org"}}.
                                                                                                                                                                                    @@ -2036,7 +2055,7 @@ In the first example everyone is allowed to use the Multi-User Chat
                                                                                                                                                                                     
                                                                                                                                                                                  -

                                                                                                                                                                                  A.9  mod_muc_log

                                                                                                                                                                                  +

                                                                                                                                                                                  A.9  mod_muc_log

                                                                                                                                                                                  @@ -2045,53 +2064,53 @@ Once you enable this module, join a chatroom with enought privileges using a MUC request the configuration form and there you will have an option to enable chatroom logging.

                                                                                                                                                                                  Some of the features of generated logs: -
                                                                                                                                                                                  • +
                                                                                                                                                                                    • A lot of information about chatroom is added on top of the page: Room title, JID, subject author, subject and configuration. -
                                                                                                                                                                                    • Room title and JID are links to join the chatroom (using XMPP-IRI). -
                                                                                                                                                                                    • Subject and chatroom configuration changes are tracked and displayed. -
                                                                                                                                                                                    • Joins, leaves, nick changes, kicks, bans and /me are tracked and displayed, including the reason when available. -
                                                                                                                                                                                    • Generated HTML files are XHTML 1.0 Transitional and CSS compliant. -
                                                                                                                                                                                    • Timestamps are self-referencing links. -
                                                                                                                                                                                    • Links on top for quicker navigation: Previous day, Next day, Up. -
                                                                                                                                                                                    • CSS is used for style definition, and a custom CSS file can be used. -
                                                                                                                                                                                    • URLs on messages and subjects are converted to hyperlinks. -
                                                                                                                                                                                    • Timezone used on timestamps is shown on the log files. -
                                                                                                                                                                                    • A custom link can be added on top of page. +
                                                                                                                                                                                    • Room title and JID are links to join the chatroom (using XMPP-IRI). +
                                                                                                                                                                                    • Subject and chatroom configuration changes are tracked and displayed. +
                                                                                                                                                                                    • Joins, leaves, nick changes, kicks, bans and /me are tracked and displayed, including the reason when available. +
                                                                                                                                                                                    • Generated HTML files are XHTML 1.0 Transitional and CSS compliant. +
                                                                                                                                                                                    • Timestamps are self-referencing links. +
                                                                                                                                                                                    • Links on top for quicker navigation: Previous day, Next day, Up. +
                                                                                                                                                                                    • CSS is used for style definition, and a custom CSS file can be used. +
                                                                                                                                                                                    • URLs on messages and subjects are converted to hyperlinks. +
                                                                                                                                                                                    • Timezone used on timestamps is shown on the log files. +
                                                                                                                                                                                    • A custom link can be added on top of page.
                                                                                                                                                                                    Options: -
                                                                                                                                                                                    -access_log
                                                                                                                                                                                    +
                                                                                                                                                                                    +access_log
                                                                                                                                                                                    Restricts which users are allowed to enable or disable chatroom logging using ACL and ACCESS. Default: muc_admin. If you want to allow any chatroom owner put: muc. -
                                                                                                                                                                                    cssfile
                                                                                                                                                                                    +
                                                                                                                                                                                    cssfile
                                                                                                                                                                                    If HTMLs will use a custom CSS file or the embedded one. Allowed values: false: HTMLs will include the standard CSS code; "CSS-URL": the URL of the CSS file (for example: "http://example.com/my.css"). Default: false. -
                                                                                                                                                                                    dirtype
                                                                                                                                                                                    +
                                                                                                                                                                                    dirtype
                                                                                                                                                                                    Type of directory that will be created. Allowed values: subdirs: creates subdirectories for year and month; plain: the filename contains the full date, no subdirs. Default: subdirs. -
                                                                                                                                                                                    outdir
                                                                                                                                                                                    +
                                                                                                                                                                                    outdir
                                                                                                                                                                                    Full path to the directory where html will be generated. Make sure the system user has write access on that directory. Default: "www/muc". -
                                                                                                                                                                                    timezone
                                                                                                                                                                                    +
                                                                                                                                                                                    timezone
                                                                                                                                                                                    What timezone should be used. Allowed values: local: use local time, as reported to Erlang by the operating system; universal: use GMT/UTC time. Default: local. -
                                                                                                                                                                                    top_link
                                                                                                                                                                                    +
                                                                                                                                                                                    top_link
                                                                                                                                                                                    Customizable link on top right corner. Syntax of this option: {"URL", "Text"}. Default: {"/", "Home"}.
                                                                                                                                                                                    Example configuration: -
                                                                                                                                                                                    +
                                                                                                                                                                                       {modules,
                                                                                                                                                                                        [
                                                                                                                                                                                         ...
                                                                                                                                                                                    @@ -2108,7 +2127,7 @@ Example configuration:
                                                                                                                                                                                     
                                                                                                                                                                                    -

                                                                                                                                                                                    A.10  mod_offline

                                                                                                                                                                                    +

                                                                                                                                                                                    A.10  mod_offline

                                                                                                                                                                                    @@ -2120,78 +2139,78 @@ online again. Thus it is very similar to how email works. Note that
                                                                                                                                                                                    -

                                                                                                                                                                                    A.11  mod_privacy

                                                                                                                                                                                    +

                                                                                                                                                                                    A.11  mod_privacy

                                                                                                                                                                                    This module implements Blocking Communication (also known as Privacy Rules) as defined in section 10 from XMPP IM. If end users have support for it in their Jabber client, they will be able to: -
                                                                                                                                                                                    -
                                                                                                                                                                                    • +
                                                                                                                                                                                      +
                                                                                                                                                                                      • Retrieving one's privacy lists. -
                                                                                                                                                                                      • Adding, removing, and editing one's privacy lists. -
                                                                                                                                                                                      • Setting, changing, or declining active lists. -
                                                                                                                                                                                      • Setting, changing, or declining the default list (i.e., the list that +
                                                                                                                                                                                      • Adding, removing, and editing one's privacy lists. +
                                                                                                                                                                                      • Setting, changing, or declining active lists. +
                                                                                                                                                                                      • Setting, changing, or declining the default list (i.e., the list that is active by default). -
                                                                                                                                                                                      • Allowing or blocking messages based on JID, group, or subscription type +
                                                                                                                                                                                      • Allowing or blocking messages based on JID, group, or subscription type (or globally). -
                                                                                                                                                                                      • Allowing or blocking inbound presence notifications based on JID, group, +
                                                                                                                                                                                      • Allowing or blocking inbound presence notifications based on JID, group, or subscription type (or globally). -
                                                                                                                                                                                      • Allowing or blocking outbound presence notifications based on JID, group, +
                                                                                                                                                                                      • Allowing or blocking outbound presence notifications based on JID, group, or subscription type (or globally). -
                                                                                                                                                                                      • Allowing or blocking IQ stanzas based on JID, group, or subscription type +
                                                                                                                                                                                      • Allowing or blocking IQ stanzas based on JID, group, or subscription type (or globally). -
                                                                                                                                                                                      • Allowing or blocking all communications based on JID, group, or +
                                                                                                                                                                                      • Allowing or blocking all communications based on JID, group, or subscription type (or globally).
                                                                                                                                                                                      (from http://www.xmpp.org/specs/rfc3921.html#privacy)
                                                                                                                                                                                      Options: -
                                                                                                                                                                                      -iqdisc
                                                                                                                                                                                      This specifies +
                                                                                                                                                                                      +iqdisc
                                                                                                                                                                                      This specifies the processing discipline for Blocking Communication (jabber:iq:privacy) IQ queries (see section A.2.1).
                                                                                                                                                                                      -

                                                                                                                                                                                      A.12  mod_private

                                                                                                                                                                                      +

                                                                                                                                                                                      A.12  mod_private

                                                                                                                                                                                      This module adds support for Private XML Storage (JEP-0049): -
                                                                                                                                                                                      +
                                                                                                                                                                                      Using this method, Jabber entities can store private data on the server and retrieve it whenever necessary. The data stored might be anything, as long as it is valid XML. One typical usage for this namespace is the server-side storage of client-specific preferences; another is Bookmark Storage (JEP-0048).
                                                                                                                                                                                      Options: -
                                                                                                                                                                                      -iqdisc
                                                                                                                                                                                      This specifies +
                                                                                                                                                                                      +iqdisc
                                                                                                                                                                                      This specifies the processing discipline for Private XML Storage (jabber:iq:private) IQ queries (see section A.2.1).
                                                                                                                                                                                      -

                                                                                                                                                                                      A.13  mod_pubsub

                                                                                                                                                                                      +

                                                                                                                                                                                      A.13  mod_pubsub

                                                                                                                                                                                      This module offers a Publish-Subscribe Service (JEP-0060). Publish-Subscribe can be used to develop (examples are taken from the JEP): -
                                                                                                                                                                                      -
                                                                                                                                                                                      • +
                                                                                                                                                                                        +
                                                                                                                                                                                        • news feeds and content syndacation, -
                                                                                                                                                                                        • avatar management, -
                                                                                                                                                                                        • shared bookmarks, -
                                                                                                                                                                                        • auction and trading systems, -
                                                                                                                                                                                        • online catalogs, -
                                                                                                                                                                                        • workflow systems, -
                                                                                                                                                                                        • network management systems, -
                                                                                                                                                                                        • NNTP gateways, -
                                                                                                                                                                                        • vCard/profile management, -
                                                                                                                                                                                        • and weblogs. +
                                                                                                                                                                                        • avatar management, +
                                                                                                                                                                                        • shared bookmarks, +
                                                                                                                                                                                        • auction and trading systems, +
                                                                                                                                                                                        • online catalogs, +
                                                                                                                                                                                        • workflow systems, +
                                                                                                                                                                                        • network management systems, +
                                                                                                                                                                                        • NNTP gateways, +
                                                                                                                                                                                        • vCard/profile management, +
                                                                                                                                                                                        • and weblogs.
                                                                                                                                                                                        @@ -2201,21 +2220,21 @@ known as ESB, the Enterprise Service Bus). The J-EAI project builts upon ejabberd's codebase and has contributed several features to mod_pubsub.

                                                                                                                                                                                        Options: -
                                                                                                                                                                                        +
                                                                                                                                                                                        - hosts
                                                                                                                                                                                        This option defines the hostnames of the + hosts
                                                                                                                                                                                        This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix ``pubsub.'' is added to all + the old host is present, the prefix “pubsub.” is added to all ejabberd hostnames. -
                                                                                                                                                                                        served_hosts
                                                                                                                                                                                        To specify which hosts needs to +
                                                                                                                                                                                        served_hosts
                                                                                                                                                                                        To specify which hosts needs to be served, you can use this option. If absent, only the main ejabberd - host is served.
                                                                                                                                                                                        access_createnode
                                                                                                                                                                                        + host is served.
                                                                                                                                                                                        access_createnode
                                                                                                                                                                                        Restricts which users are allowed to create pubsub nodes using ACL and ACCESS. Default: pubsub_createnode.
                                                                                                                                                                                        Example: -
                                                                                                                                                                                        +
                                                                                                                                                                                           {modules,
                                                                                                                                                                                            [
                                                                                                                                                                                             ...
                                                                                                                                                                                        @@ -2227,31 +2246,31 @@ Example:
                                                                                                                                                                                         
                                                                                                                                                                                        -

                                                                                                                                                                                        A.14  mod_register

                                                                                                                                                                                        +

                                                                                                                                                                                        A.14  mod_register

                                                                                                                                                                                        This module adds support for In-Band Registration (JEP-0077). This protocol enables end users to use a Jabber client to: -
                                                                                                                                                                                        • +
                                                                                                                                                                                          • Register a new account on the server. -
                                                                                                                                                                                          • Change the password from an existing account on the server. -
                                                                                                                                                                                          • Delete an existing account on the server. +
                                                                                                                                                                                          • Change the password from an existing account on the server. +
                                                                                                                                                                                          • Delete an existing account on the server.
                                                                                                                                                                                          Options: -
                                                                                                                                                                                          -access
                                                                                                                                                                                          This option can be configured to specify - rules to restrict registration. If a rule returns ``deny'' on the requested +
                                                                                                                                                                                          +access
                                                                                                                                                                                          This option can be configured to specify + rules to restrict registration. If a rule returns “deny” on the requested user name, registration for that user name is dennied. (there are no restrictions by default). -
                                                                                                                                                                                          iqdisc
                                                                                                                                                                                          This specifies +
                                                                                                                                                                                          iqdisc
                                                                                                                                                                                          This specifies the processing discipline for In-Band Registration (jabber:iq:register) IQ queries (see section A.2.1).
                                                                                                                                                                                          Examples: -
                                                                                                                                                                                          • +
                                                                                                                                                                                            • Next example prohibits the registration of too short account names: -
                                                                                                                                                                                              +
                                                                                                                                                                                                 {acl, shortname, {user_glob, "?"}}.
                                                                                                                                                                                                 {acl, shortname, {user_glob, "??"}}.
                                                                                                                                                                                                 % The same using regexp:
                                                                                                                                                                                              @@ -2266,12 +2285,12 @@ Next example prohibits the registration of too short account names:
                                                                                                                                                                                                   {mod_register, [{access, register}]},
                                                                                                                                                                                                   ...
                                                                                                                                                                                                  ]}.
                                                                                                                                                                                              -
                                                                                                                                                                                            • The in-band registration of new accounts can be prohibited by changing the +
                                                                                                                                                                                            • The in-band registration of new accounts can be prohibited by changing the access option. If you really want to disable all In-Band Registration functionality, that is changing passwords in-band and deleting accounts in-band, you have to remove mod_register from the modules list. In this example all In-Band Registration functionality is disabled: -
                                                                                                                                                                                              + 
                                                                                                                                                                                                 {access, register, [{deny, all}]}.
                                                                                                                                                                                               
                                                                                                                                                                                                 {modules,
                                                                                                                                                                                              @@ -2283,21 +2302,21 @@ Next example prohibits the registration of too short account names:
                                                                                                                                                                                               
                                                                                                                                                                                            -

                                                                                                                                                                                            A.15  mod_roster

                                                                                                                                                                                            +

                                                                                                                                                                                            A.15  mod_roster

                                                                                                                                                                                            This module implements roster management as defined in RFC 3921: XMPP IM.

                                                                                                                                                                                            Options: -
                                                                                                                                                                                            -iqdisc
                                                                                                                                                                                            This specifies +
                                                                                                                                                                                            +iqdisc
                                                                                                                                                                                            This specifies the processing discipline for Roster Management (jabber:iq:roster) IQ queries (see section A.2.1).
                                                                                                                                                                                            -

                                                                                                                                                                                            A.16  mod_service_log

                                                                                                                                                                                            +

                                                                                                                                                                                            A.16  mod_service_log

                                                                                                                                                                                            @@ -2308,25 +2327,25 @@ packets are encapsulated in a <route/> element and sent to th service(s).

                                                                                                                                                                                            Options: -
                                                                                                                                                                                            -loggers
                                                                                                                                                                                            With this option a (list of) service(s) +
                                                                                                                                                                                            +loggers
                                                                                                                                                                                            With this option a (list of) service(s) that will receive the packets can be specified.
                                                                                                                                                                                            Examples: -
                                                                                                                                                                                            • +
                                                                                                                                                                                              • To log all end user packets to the Bandersnatch service running on bandersnatch.example.com: -
                                                                                                                                                                                                + 
                                                                                                                                                                                                   {modules,
                                                                                                                                                                                                    [
                                                                                                                                                                                                     ...
                                                                                                                                                                                                     {mod_service_log, [{loggers, ["bandersnatch.example.com"]}]},
                                                                                                                                                                                                     ...
                                                                                                                                                                                                    ]}.
                                                                                                                                                                                                -
                                                                                                                                                                                              • To log all end user packets to the Bandersnatch service running on +
                                                                                                                                                                                              • To log all end user packets to the Bandersnatch service running on bandersnatch.example.com and the backup service on bandersnatch.example.org: -
                                                                                                                                                                                                + 
                                                                                                                                                                                                   {modules,
                                                                                                                                                                                                    [
                                                                                                                                                                                                     ...
                                                                                                                                                                                                @@ -2337,7 +2356,7 @@ To log all end user packets to the Bandersnatch service running on
                                                                                                                                                                                                 
                                                                                                                                                                                              -

                                                                                                                                                                                              A.17  mod_shared_roster

                                                                                                                                                                                              +

                                                                                                                                                                                              A.17  mod_shared_roster

                                                                                                                                                                                              @@ -2349,21 +2368,21 @@ users from the shared roster groups.

                                                                                                                                                                                              Shared roster groups can be edited only via the web interface. Each group has a unique identification and the following parameters: -
                                                                                                                                                                                              -Name
                                                                                                                                                                                              The name of the group, which will be displayed in the roster. -
                                                                                                                                                                                              Description
                                                                                                                                                                                              The description of the group. This parameter doesn't affect +
                                                                                                                                                                                              +Name
                                                                                                                                                                                              The name of the group, which will be displayed in the roster. +
                                                                                                                                                                                              Description
                                                                                                                                                                                              The description of the group. This parameter doesn't affect anything. -
                                                                                                                                                                                              Members
                                                                                                                                                                                              A list of full JIDs of group members, entered one per line in +
                                                                                                                                                                                              Members
                                                                                                                                                                                              A list of full JIDs of group members, entered one per line in the web interface. -
                                                                                                                                                                                              Displayed groups
                                                                                                                                                                                              A list of groups that will be in the rosters of this +
                                                                                                                                                                                              Displayed groups
                                                                                                                                                                                              A list of groups that will be in the rosters of this group's members.
                                                                                                                                                                                              Examples: -
                                                                                                                                                                                              • +
                                                                                                                                                                                                • Take the case of a computer club that wants all its members seeing each other in their rosters. To achieve this, they need to create a shared roster group similar to next table: -

                                                                                                                                                                                                  +

                                                                                                                                                                                                  @@ -2386,14 +2405,14 @@ Take the case of a computer club that wants all its members seeing each
                                                                                                                                                                                                  Identification Group `club_members'
                                                                                                                                                                                                  Displayed groups club_members
                                                                                                                                                                                                  -

                                                                                                                                                                                                  -
                                                                                                                                                                                                • In another case we have a company which has three divisions: Management, +

                                                                                                                                                                                                • +
                                                                                                                                                                                                • In another case we have a company which has three divisions: Management, Marketing and Sales. All group members should see all other members in their rosters. Additonally, all managers should have all marketing and sales people in their roster. Simultaneously, all marketeers and the whole sales team should see all managers. This scenario can be achieved by creating shared roster groups as shown in the following table: -

                                                                                                                                                                                                  +

                                                                                                                                                                                                  @@ -2460,25 +2479,25 @@ Take the case of a computer club that wants all its members seeing each
                                                                                                                                                                                                  Identification Group `management'
                                                                                                                                                                                                  sales
                                                                                                                                                                                                  -

                                                                                                                                                                                                  +

                                                                                                                                                                                                -

                                                                                                                                                                                                A.18  mod_stats

                                                                                                                                                                                                +

                                                                                                                                                                                                A.18  mod_stats

                                                                                                                                                                                                This module adds support for Statistics Gathering (JEP-0039). This protocol allows you to retrieve next statistics from your ejabberd deployment: -
                                                                                                                                                                                                • +
                                                                                                                                                                                                  • Total number of registered users on the current virtual host (users/total). -
                                                                                                                                                                                                  • Total number of registered users on all virtual hosts (users/all-hosts/total). -
                                                                                                                                                                                                  • Total number of online users on the current virtual host (users/online). -
                                                                                                                                                                                                  • Total number of online users on all virtual hosts (users/all-hosts/online). +
                                                                                                                                                                                                  • Total number of registered users on all virtual hosts (users/all-hosts/total). +
                                                                                                                                                                                                  • Total number of online users on the current virtual host (users/online). +
                                                                                                                                                                                                  • Total number of online users on all virtual hosts (users/all-hosts/online).
                                                                                                                                                                                                  Options: -
                                                                                                                                                                                                  -iqdisc
                                                                                                                                                                                                  This specifies +
                                                                                                                                                                                                  +iqdisc
                                                                                                                                                                                                  This specifies the processing discipline for Statistics Gathering (http://jabber.org/protocol/stats) IQ queries (see section A.2.1).
                                                                                                                                                                                                  @@ -2486,18 +2505,18 @@ As there are only a small amount of clients (for example Tkabber) and software libraries with support for this JEP, a few examples are given of the XML you need to send in order to get the statistics. Here they are: -
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    • You can request the number of online users on the current virtual host (example.org) by sending: -
                                                                                                                                                                                                      + 
                                                                                                                                                                                                       <iq to='example.org' type='get'>
                                                                                                                                                                                                         <query xmlns='http://jabber.org/protocol/stats'>
                                                                                                                                                                                                           <stat name='users/online'/>
                                                                                                                                                                                                         </query>
                                                                                                                                                                                                       </iq>
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • You can request the total number of registered users on all virtual hosts +
                                                                                                                                                                                                    • You can request the total number of registered users on all virtual hosts by sending: -
                                                                                                                                                                                                      + 
                                                                                                                                                                                                       <iq to='example.org' type='get'>
                                                                                                                                                                                                         <query xmlns='http://jabber.org/protocol/stats'>
                                                                                                                                                                                                           <stat name='users/all-hosts/total'/>
                                                                                                                                                                                                      @@ -2506,7 +2525,7 @@ You can request the number of online users on the current virtual host
                                                                                                                                                                                                       
                                                                                                                                                                                                    -

                                                                                                                                                                                                    A.19  mod_time

                                                                                                                                                                                                    +

                                                                                                                                                                                                    A.19  mod_time

                                                                                                                                                                                                    @@ -2514,14 +2533,14 @@ This module features support for Entity Time (
                                                                                                                                                                                                    +iqdisc
                                                                                                                                                                                                    This specifies the processing discipline for Entity Time (jabber:iq:time) IQ queries (see section A.2.1).
                                                                                                                                                                                                  -

                                                                                                                                                                                                  A.20  mod_vcard

                                                                                                                                                                                                  +

                                                                                                                                                                                                  A.20  mod_vcard

                                                                                                                                                                                                  @@ -2531,39 +2550,39 @@ implements an uncomplicated Jabber User Directory based on the vCards of these users. Moreover, it enables the server to send its vCard when queried.

                                                                                                                                                                                                  Options: -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  - hosts
                                                                                                                                                                                                  This option defines the hostnames of the + hosts
                                                                                                                                                                                                  This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix ``vjud.'' is added to all + the old host is present, the prefix “vjud.” is added to all ejabberd hostnames. -
                                                                                                                                                                                                  iqdisc
                                                                                                                                                                                                  This specifies +
                                                                                                                                                                                                  iqdisc
                                                                                                                                                                                                  This specifies the processing discipline for vcard-temp IQ queries (see section A.2.1). -
                                                                                                                                                                                                  search
                                                                                                                                                                                                  This option specifies whether the search +
                                                                                                                                                                                                  search
                                                                                                                                                                                                  This option specifies whether the search functionality is enabled (value: true) or disabled (value: false). If disabled, the option hosts will be ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is true. -
                                                                                                                                                                                                  matches
                                                                                                                                                                                                  With this option, the number of reported +
                                                                                                                                                                                                  matches
                                                                                                                                                                                                  With this option, the number of reported search results can be limited. If the option's value is set to infinity, all search results are reported. The default value is 30. -
                                                                                                                                                                                                  allow_return_all
                                                                                                                                                                                                  This option enables +
                                                                                                                                                                                                  allow_return_all
                                                                                                                                                                                                  This option enables you to specify if search operations with empty input fields should return all users who added some information to their vCard. The default value is false. -
                                                                                                                                                                                                  search_all_hosts
                                                                                                                                                                                                  If this option is +
                                                                                                                                                                                                  search_all_hosts
                                                                                                                                                                                                  If this option is set to true, search operations will apply to all virtual hosts. Otherwise only the current host will be searched. The default value is true.
                                                                                                                                                                                                  Examples: -
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    • In this first situation, search results are limited to twenty items, every user who added information to their vCard will be listed when people do an empty search, and only users from the current host will be returned: -
                                                                                                                                                                                                      + 
                                                                                                                                                                                                         {modules,
                                                                                                                                                                                                          [
                                                                                                                                                                                                           ...
                                                                                                                                                                                                      @@ -2573,9 +2592,9 @@ In this first situation, search results are limited to twenty items,
                                                                                                                                                                                                                        {search_all_hosts, false}]},
                                                                                                                                                                                                           ...
                                                                                                                                                                                                          ]}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                    • The second situation differs in a way that search results are not limited, +
                                                                                                                                                                                                    • The second situation differs in a way that search results are not limited, and that all virtual hosts will be searched instead of only the current one: -
                                                                                                                                                                                                      + 
                                                                                                                                                                                                         {modules,
                                                                                                                                                                                                          [
                                                                                                                                                                                                           ...
                                                                                                                                                                                                      @@ -2587,13 +2606,13 @@ In this first situation, search results are limited to twenty items,
                                                                                                                                                                                                       
                                                                                                                                                                                                    -

                                                                                                                                                                                                    A.21  LDAP and mod_vcard_ldap

                                                                                                                                                                                                    +

                                                                                                                                                                                                    A.21  LDAP and mod_vcard_ldap

                                                                                                                                                                                                    -

                                                                                                                                                                                                    A.21.1  Features

                                                                                                                                                                                                    +

                                                                                                                                                                                                    A.21.1  Features

                                                                                                                                                                                                    ejabberd has built-in LDAP support. You can authenticate users against LDAP @@ -2602,22 +2621,22 @@ supported yet.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    A.21.2  Connection

                                                                                                                                                                                                    +

                                                                                                                                                                                                    A.21.2  Connection

                                                                                                                                                                                                    Parameters: -
                                                                                                                                                                                                    -ldap_server
                                                                                                                                                                                                    IP address or dns name of your +
                                                                                                                                                                                                    +ldap_server
                                                                                                                                                                                                    IP address or dns name of your LDAP server. This option is required. -
                                                                                                                                                                                                    ldap_port
                                                                                                                                                                                                    Port to connect to LDAP server. +
                                                                                                                                                                                                    ldap_port
                                                                                                                                                                                                    Port to connect to LDAP server. Default is 389. -
                                                                                                                                                                                                    ldap_rootdn
                                                                                                                                                                                                    Bind DN. Default is "" +
                                                                                                                                                                                                    ldap_rootdn
                                                                                                                                                                                                    Bind DN. Default is "" which means anonymous connection. -
                                                                                                                                                                                                    ldap_password
                                                                                                                                                                                                    Bind password. Default +
                                                                                                                                                                                                    ldap_password
                                                                                                                                                                                                    Bind password. Default is "".
                                                                                                                                                                                                    Example: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       {auth_method, ldap}.
                                                                                                                                                                                                       {ldap_servers, ["ldap.mydomain.org"]}.
                                                                                                                                                                                                       {ldap_port, 389}.
                                                                                                                                                                                                    @@ -2629,21 +2648,21 @@ authentication.

                                                                                                                                                                                                    -

                                                                                                                                                                                                    A.21.3  Authentication

                                                                                                                                                                                                    +

                                                                                                                                                                                                    A.21.3  Authentication

                                                                                                                                                                                                    You can authenticate users against LDAP directory. Available parameters are listed below: -
                                                                                                                                                                                                    -ldap_base
                                                                                                                                                                                                    LDAP base directory which stores users +
                                                                                                                                                                                                    +ldap_base
                                                                                                                                                                                                    LDAP base directory which stores users accounts. This option is required. -
                                                                                                                                                                                                    ldap_uidattr
                                                                                                                                                                                                    LDAP attribute which holds +
                                                                                                                                                                                                    ldap_uidattr
                                                                                                                                                                                                    LDAP attribute which holds user's part of JID. Default is "uid". -
                                                                                                                                                                                                    ldap_uidattr_format
                                                                                                                                                                                                    Format of the +
                                                                                                                                                                                                    ldap_uidattr_format
                                                                                                                                                                                                    Format of the ldap_uidattr variable. Format MUST contain one and only one pattern variable "%u" which will be replaced by user's part of JID. For example, "%u@mydomain.org". Default value is "%u". -
                                                                                                                                                                                                    ldap_filter
                                                                                                                                                                                                    RFC 2254 LDAP filter. Default is +
                                                                                                                                                                                                    ldap_filter
                                                                                                                                                                                                    RFC 2254 LDAP filter. Default is none. Example: "(&(objectClass=shadowAccount)(memberOf=Jabber Users))". Please, don't forget closing brackets and don't use superfluous whitespaces. Also you MUST NOT use ldap_uidattr attribute in filter @@ -2651,7 +2670,7 @@ because this attribute will be substituted in LDAP filter automatically.
                                                                                                                                                                                                    -

                                                                                                                                                                                                    A.21.4  vCards and Search

                                                                                                                                                                                                    +

                                                                                                                                                                                                    A.21.4  vCards and Search

                                                                                                                                                                                                    ejabberd can map LDAP attributes to vCard fields. This behaviour is @@ -2664,22 +2683,22 @@ LDAP parameters: ldap_servers, ldap_port, ldap_filter. If one of this option is not set ejabberd will look for top-level option with the same name. The second group of parameters consists of the following options: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                    - hosts
                                                                                                                                                                                                    This option defines the hostnames of the + hosts
                                                                                                                                                                                                    This option defines the hostnames of the service (see section A.2.2). If neither hosts nor - the old host is present, the prefix ``vjud.'' is added to all + the old host is present, the prefix “vjud.” is added to all ejabberd hostnames. -
                                                                                                                                                                                                    iqdisc
                                                                                                                                                                                                    This specifies +
                                                                                                                                                                                                    iqdisc
                                                                                                                                                                                                    This specifies the processing discipline for vcard-temp IQ queries (see section A.2.1). -
                                                                                                                                                                                                    search
                                                                                                                                                                                                    This option specifies whether the search +
                                                                                                                                                                                                    search
                                                                                                                                                                                                    This option specifies whether the search functionality is enabled (value: true) or disabled (value: false). If disabled, the option hosts will be ignored and the Jabber User Directory service will not appear in the Service Discovery item list. The default value is true. -
                                                                                                                                                                                                    ldap_vcard_map
                                                                                                                                                                                                    the table which defines +
                                                                                                                                                                                                    ldap_vcard_map
                                                                                                                                                                                                    the table which defines reflection of LDAP attributes to vCard fields. Format is: [Name_of_vcard_field, Pattern, List_of_LDAP_attributes, ...] @@ -2692,7 +2711,7 @@ reflection of LDAP attributes to vCard fields. LDAP attributes from List_of_LDAP_attributes; "%u" will be replaced with user's part of JID and "%d" will be replaced with domain part of JID. Example: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       {ldap_vcard_map,
                                                                                                                                                                                                        [{"NICKNAME", "%u", []},
                                                                                                                                                                                                         {"FN", "%s", ["displayName"]},
                                                                                                                                                                                                    @@ -2702,7 +2721,7 @@ reflection of LDAP attributes to vCard fields.
                                                                                                                                                                                                        ]},
                                                                                                                                                                                                     
                                                                                                                                                                                                    Default is: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       [{"NICKNAME", "%u", []},
                                                                                                                                                                                                        {"FN", "%s", ["displayName"]},
                                                                                                                                                                                                        {"FAMILY", "%s", ["sn"]},
                                                                                                                                                                                                    @@ -2723,7 +2742,7 @@ Default is:
                                                                                                                                                                                                        {"BDAY", "%s", ["birthDay"]},
                                                                                                                                                                                                        {"ROLE", "%s", ["employeeType"]},
                                                                                                                                                                                                        {"PHOTO", "%s", ["jpegPhoto"]}]
                                                                                                                                                                                                    -
                                                                                                                                                                                                    ldap_search_fields
                                                                                                                                                                                                    This option defines +
                                                                                                                                                                                                    ldap_search_fields
                                                                                                                                                                                                    This option defines search form and LDAP attributes to search. Format: [Name, Attribute, ...] @@ -2733,7 +2752,7 @@ search form and LDAP attributes to search. msgs/*.msg for available words). Attribute is the LDAP attribute or the pattern "%u" Example: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       {ldap_search_fields,
                                                                                                                                                                                                        [{"User", "uid"},
                                                                                                                                                                                                         {"Full Name", "displayName"},
                                                                                                                                                                                                    @@ -2741,7 +2760,7 @@ search form and LDAP attributes to search.
                                                                                                                                                                                                        ]},
                                                                                                                                                                                                     
                                                                                                                                                                                                    Default is: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       [{"User", "%u"},
                                                                                                                                                                                                        {"Full Name", "displayName"},
                                                                                                                                                                                                        {"Given Name", "givenName"},
                                                                                                                                                                                                    @@ -2754,7 +2773,7 @@ Default is:
                                                                                                                                                                                                        {"Email", "mail"},
                                                                                                                                                                                                        {"Organization Name", "o"},
                                                                                                                                                                                                        {"Organization Unit", "ou"}]
                                                                                                                                                                                                    -
                                                                                                                                                                                                    ldap_search_reported
                                                                                                                                                                                                    This option defines search fields to be reported. +
                                                                                                                                                                                                    ldap_search_reported
                                                                                                                                                                                                    This option defines search fields to be reported. Format: [Name, VCard_Name, ...] where @@ -2763,7 +2782,7 @@ Default is: msgs/*.msg for available words). VCard_Name is the name of vCard field defined in ldap_vcard_map option. Example: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       {ldap_search_reported,
                                                                                                                                                                                                        [{"Full Name", "FN"},
                                                                                                                                                                                                         {"Email", "EMAIL"},
                                                                                                                                                                                                    @@ -2772,7 +2791,7 @@ Default is:
                                                                                                                                                                                                        ]},
                                                                                                                                                                                                     
                                                                                                                                                                                                    Default is: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       [{"Full Name", "FN"},
                                                                                                                                                                                                        {"Given Name", "GIVEN"},
                                                                                                                                                                                                        {"Middle Name", "MIDDLE"},
                                                                                                                                                                                                    @@ -2787,19 +2806,19 @@ Default is:
                                                                                                                                                                                                     
                                                                                                                                                                                                    -

                                                                                                                                                                                                    A.21.5  Examples

                                                                                                                                                                                                    +

                                                                                                                                                                                                    A.21.5  Examples

                                                                                                                                                                                                    -
                                                                                                                                                                                                    Common example
                                                                                                                                                                                                    +
                                                                                                                                                                                                    Common example
                                                                                                                                                                                                    Let's say ldap.mydomain.org is the name of our LDAP server. We have users with their passwords in "ou=Users,dc=mydomain,dc=org" directory. Also we have addressbook, which contains users emails and their additional infos in "ou=AddressBook,dc=mydomain,dc=org" directory. Corresponding authentication section should looks like this: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       %% authentication method
                                                                                                                                                                                                       {auth_method, ldap}.
                                                                                                                                                                                                       %% DNS name of our LDAP server
                                                                                                                                                                                                    @@ -2813,10 +2832,10 @@ authentication section should looks like this:
                                                                                                                                                                                                       {ldap_filter, "(objectClass=shadowAccount)"}.
                                                                                                                                                                                                     
                                                                                                                                                                                                    Now we want to use users LDAP-info as their vCards. We have four attributes -defined in our LDAP schema: "mail" --- email address, "givenName" ---- first name, "sn" --- second name, "birthDay" --- birthday. +defined in our LDAP schema: "mail" — email address, "givenName" +— first name, "sn" — second name, "birthDay" — birthday. Also we want users to search each other. Let's see how we can set it up: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       {modules,
                                                                                                                                                                                                         ...
                                                                                                                                                                                                         {mod_vcard_ldap,
                                                                                                                                                                                                    @@ -2865,11 +2884,11 @@ searching his info in LDAP.

                                                                                                                                                                                                    -
                                                                                                                                                                                                    Active Directory
                                                                                                                                                                                                    +
                                                                                                                                                                                                    Active Directory
                                                                                                                                                                                                    Active Directory is just an LDAP-server with predefined attributes. Sample config file is listed below: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       {auth_method, ldap}.
                                                                                                                                                                                                       {ldap_servers, ["office.org"]}.    % List of LDAP servers
                                                                                                                                                                                                       {ldap_base, "DC=office,DC=org"}. % Search base of LDAP directory
                                                                                                                                                                                                    @@ -2916,7 +2935,7 @@ config file is listed below:
                                                                                                                                                                                                     
                                                                                                                                                                                                    -

                                                                                                                                                                                                    A.22  mod_version

                                                                                                                                                                                                    +

                                                                                                                                                                                                    A.22  mod_version

                                                                                                                                                                                                    @@ -2924,20 +2943,20 @@ This module implements Software Version (
                                                                                                                                                                                                    +iqdisc
                                                                                                                                                                                                    This specifies the processing discipline for Software Version (jabber:iq:version) IQ queries (see section A.2.1).
                                                                                                                                                                                                    -

                                                                                                                                                                                                    B  Internationalization and Localization

                                                                                                                                                                                                    +

                                                                                                                                                                                                    B  Internationalization and Localization

                                                                                                                                                                                                    All built-in modules support the xml:lang attribute inside IQ queries. Figure 2, for example, shows the reply to the following query: -
                                                                                                                                                                                                    +
                                                                                                                                                                                                       <iq id='5'
                                                                                                                                                                                                           to='example.org'
                                                                                                                                                                                                           type='get'
                                                                                                                                                                                                    @@ -2945,40 +2964,44 @@ Figure 2, for example, shows the reply to the f
                                                                                                                                                                                                         <query xmlns='http://jabber.org/protocol/disco#items'/>
                                                                                                                                                                                                       </iq>
                                                                                                                                                                                                     
                                                                                                                                                                                                    -

                                                                                                                                                                                                    +


                                                                                                                                                                                                    -
                                                                                                                                                                                                    Figure 2: Service Discovery when xml:lang='ru'

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    Figure 2: Service Discovery when xml:lang='ru'

                                                                                                                                                                                                    +
                                                                                                                                                                                                    -

                                                                                                                                                                                                    +

                                                                                                                                                                                                    The web interface also supports the Accept-Language HTTP header (compare figure 3 with figure 1) -

                                                                                                                                                                                                    +


                                                                                                                                                                                                    -
                                                                                                                                                                                                    Figure 3: Top page from the web interface with HTTP header - ``Accept-Language: ru''

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    Figure 3: Top page from the web interface with HTTP header + “Accept-Language: ru”

                                                                                                                                                                                                    +
                                                                                                                                                                                                    -

                                                                                                                                                                                                    +

                                                                                                                                                                                                    -

                                                                                                                                                                                                    C  Release Notes

                                                                                                                                                                                                    +

                                                                                                                                                                                                    C  Release Notes

                                                                                                                                                                                                    -

                                                                                                                                                                                                    C.1  ejabberd 0.9

                                                                                                                                                                                                    +

                                                                                                                                                                                                    C.1  ejabberd 0.9

                                                                                                                                                                                                    -
                                                                                                                                                                                                    +
                                                                                                                                                                                                            Release notes
                                                                                                                                                                                                             ejabberd 0.9
                                                                                                                                                                                                     
                                                                                                                                                                                                    @@ -3070,9 +3093,9 @@ Bugfixes
                                                                                                                                                                                                     
                                                                                                                                                                                                    -

                                                                                                                                                                                                    C.2  ejabberd 0.9.1

                                                                                                                                                                                                    +

                                                                                                                                                                                                    C.2  ejabberd 0.9.1

                                                                                                                                                                                                    -
                                                                                                                                                                                                    +
                                                                                                                                                                                                            Release notes
                                                                                                                                                                                                            ejabberd 0.9.1
                                                                                                                                                                                                     
                                                                                                                                                                                                    @@ -3138,9 +3161,9 @@ Bugfixes
                                                                                                                                                                                                     
                                                                                                                                                                                                    -

                                                                                                                                                                                                    C.3  ejabberd 0.9.8

                                                                                                                                                                                                    +

                                                                                                                                                                                                    C.3  ejabberd 0.9.8

                                                                                                                                                                                                    -
                                                                                                                                                                                                    +
                                                                                                                                                                                                            Release notes
                                                                                                                                                                                                            ejabberd 0.9.8
                                                                                                                                                                                                              2005-08-01
                                                                                                                                                                                                    @@ -3243,9 +3266,9 @@ END
                                                                                                                                                                                                     
                                                                                                                                                                                                    -

                                                                                                                                                                                                    C.4  ejabberd 1.0.0

                                                                                                                                                                                                    +

                                                                                                                                                                                                    C.4  ejabberd 1.0.0

                                                                                                                                                                                                    -
                                                                                                                                                                                                    +
                                                                                                                                                                                                            Release Notes
                                                                                                                                                                                                            ejabberd 1.0.0
                                                                                                                                                                                                            14 December 2005
                                                                                                                                                                                                    @@ -3369,9 +3392,9 @@ END
                                                                                                                                                                                                     
                                                                                                                                                                                                    -

                                                                                                                                                                                                    C.5  ejabberd 1.1.0

                                                                                                                                                                                                    +

                                                                                                                                                                                                    C.5  ejabberd 1.1.0

                                                                                                                                                                                                    -
                                                                                                                                                                                                    +
                                                                                                                                                                                                         Release Notes
                                                                                                                                                                                                         ejabberd 1.1.0
                                                                                                                                                                                                         24 April 2006
                                                                                                                                                                                                    @@ -3490,9 +3513,9 @@ END
                                                                                                                                                                                                     
                                                                                                                                                                                                    -

                                                                                                                                                                                                    C.6  ejabberd 1.1.1

                                                                                                                                                                                                    +

                                                                                                                                                                                                    C.6  ejabberd 1.1.1

                                                                                                                                                                                                    -
                                                                                                                                                                                                    +
                                                                                                                                                                                                         Release Notes
                                                                                                                                                                                                         ejabberd 1.1.1 
                                                                                                                                                                                                         28 April 2006
                                                                                                                                                                                                    @@ -3615,26 +3638,23 @@ END
                                                                                                                                                                                                     
                                                                                                                                                                                                    -

                                                                                                                                                                                                    D  Acknowledgements

                                                                                                                                                                                                    +

                                                                                                                                                                                                    D  Acknowledgements

                                                                                                                                                                                                    Thanks to all people who contributed to this guide: -
                                                                                                                                                                                                    • + -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      This document was translated from LATEX by -HEVEA. -
                                                                                                                                                                                                      - +
                                                                                                                                                                                                      This document was translated from LATEX by +HEVEA.
                                                                                                                                                                                                      diff --git a/doc/guide.tex b/doc/guide.tex index ae37b8d04..c9443da5c 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -2310,13 +2310,13 @@ supported yet. Parameters: \begin{description} -\titem{ldap\_server} \ind{options!ldap_server}IP address or dns name of your +\titem{ldap\_server} \ind{options!ldap\_server}IP address or dns name of your LDAP server. This option is required. -\titem{ldap\_port} \ind{options!ldap_port}Port to connect to LDAP server. +\titem{ldap\_port} \ind{options!ldap\_port}Port to connect to LDAP server. Default is~389. -\titem{ldap\_rootdn} \ind{options!ldap_rootdn}Bind DN. Default is~\term{""} +\titem{ldap\_rootdn} \ind{options!ldap\_rootdn}Bind DN. Default is~\term{""} which means anonymous connection. -\titem{ldap\_password} \ind{options!ldap_password}Bind password. Default +\titem{ldap\_password} \ind{options!ldap\_password}Bind password. Default is~\term{""}. \end{description} @@ -2340,15 +2340,15 @@ You can authenticate users against LDAP directory. Available parameters are listed below: \begin{description} -\titem{ldap\_base} \ind{options!ldap_base}LDAP base directory which stores users +\titem{ldap\_base} \ind{options!ldap\_base}LDAP base directory which stores users accounts. This option is required. -\titem{ldap\_uidattr} \ind{options!ldap_uidattr}LDAP attribute which holds +\titem{ldap\_uidattr} \ind{options!ldap\_uidattr}LDAP attribute which holds user's part of JID. Default is \term{"uid"}. -\titem{ldap\_uidattr\_format} \ind{options!ldap_uidattr_format}Format of the +\titem{ldap\_uidattr\_format} \ind{options!ldap\_uidattr\_format}Format of the \term{ldap\_uidattr} variable. Format MUST contain one and only one pattern variable \term{"\%u"} which will be replaced by user's part of JID. For example, \term{"\%u@mydomain.org"}. Default value is \term{"\%u"}. -\titem{ldap\_filter} \ind{options!ldap_filter}RFC 2254 LDAP filter. Default is +\titem{ldap\_filter} \ind{options!ldap\_filter}RFC 2254 LDAP filter. Default is \term{none}. Example: \term{"(\&(objectClass=shadowAccount)(memberOf=Jabber Users))"}. Please, don't forget closing brackets and don't use superfluous whitespaces. Also you MUST NOT use \option{ldap\_uidattr} attribute in filter @@ -2378,7 +2378,7 @@ consists of the following options: (value: \term{false}). If disabled, the option \term{hosts} will be ignored and the \Jabber{} User Directory service will not appear in the Service Discovery item list. The default value is \term{true}. -\titem{ldap\_vcard\_map} \ind{options!ldap_vcard_map}the table which defines +\titem{ldap\_vcard\_map} \ind{options!ldap\_vcard\_map}the table which defines reflection of LDAP attributes to vCard fields. Format is: \term{[{Name\_of\_vcard\_field, Pattern, List\_of\_LDAP\_attributes}, ...]} @@ -2424,7 +2424,7 @@ Default is: {"ROLE", "%s", ["employeeType"]}, {"PHOTO", "%s", ["jpegPhoto"]}] \end{verbatim} -\titem{ldap\_search\_fields} \ind{options!ldap_search_fields}This option defines +\titem{ldap\_search\_fields} \ind{options!ldap\_search\_fields}This option defines search form and LDAP attributes to search. Format: \term{[{Name, Attribute}, ...]} @@ -2457,7 +2457,7 @@ Default is: {"Organization Name", "o"}, {"Organization Unit", "ou"}] \end{verbatim} -\titem{ldap\_search\_reported} \ind{options!ldap_search_reported}This option defines search fields to be reported. +\titem{ldap\_search\_reported} \ind{options!ldap\_search\_reported}This option defines search fields to be reported. Format: \term{[{Name, VCard\_Name}, ...]} where -- cgit v1.2.3 From 1632aec61e84630085268d26f5bc39e34c2465fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 22 Sep 2006 09:16:31 +0000 Subject: Improvement coming from trunk (SVN #617): * doc/guide.tex: Large improvements for ejabberd 1.1.2 (thanks to Sander Devrieze) * doc/version.tex: Likewise. * doc/features.tex: Likewise. * doc/Makefile: Likewise. * doc/dev.tex: Likewise. SVN Revision: 618 --- ChangeLog | 9 + doc/Makefile | 11 +- doc/dev.html | 79 +- doc/dev.tex | 25 +- doc/features.tex | 18 +- doc/guide.html | 3116 ++++++++++++++++++++++++++++---------------------- doc/guide.tex | 2622 ++++++++++++++++++++++++------------------ doc/introduction.tex | 75 +- doc/version.tex | 2 +- 9 files changed, 3374 insertions(+), 2583 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85f31d187..077cce022 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-09-22 Mickael Remond + + * doc/guide.tex: Large improvements for ejabberd 1.1.2 (thanks to + Sander Devrieze) + * doc/version.tex: Likewise. + * doc/features.tex: Likewise. + * doc/Makefile: Likewise. + * doc/dev.tex: Likewise. + 2006-09-14 Mickael Remond * doc/guide.tex: Minor fix on index generation. diff --git a/doc/Makefile b/doc/Makefile index cc8b4d1b3..7736855f3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -27,16 +27,13 @@ clean: rm -f *.toc guide.html: guide.tex - hevea guide.tex - hevea guide.tex - + hevea -fix -noiso -pedantic guide.tex + dev.html: dev.tex - hevea dev.tex - hevea dev.tex + hevea -fix -noiso -pedantic dev.tex features.html: features.tex - hevea features.tex - hevea features.tex + hevea -fix -noiso -pedantic features.tex guide.pdf: guide.tex pdflatex guide.tex diff --git a/doc/dev.html b/doc/dev.html index 8681b1521..6cb4d2a46 100644 --- a/doc/dev.html +++ b/doc/dev.html @@ -4,7 +4,7 @@ -Ejabberd 1.1.1 Developers Guide +Ejabberd 1.1.2 Developers Guide @@ -22,7 +22,7 @@ BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;} - + @@ -34,7 +34,7 @@ BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;} @@ -42,7 +42,7 @@ BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;}
                                                                                                                                                                                                      - + logo.png
                                                                                                                                                                                                      @@ -61,49 +61,50 @@ BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;} 1.1  Key Features
                                                                                                                                                                                                    • 1.2  Additional Features -
                                                                                                                                                                                                    • 2  How it works +
                                                                                                                                                                                                    • 2  How it Works -
                                                                                                                                                                                                    • 3  XML representation +
                                                                                                                                                                                                    • 3  XML Representation
                                                                                                                                                                                                    • 4  Module xml
                                                                                                                                                                                                    • 5  Module xml_stream -
                                                                                                                                                                                                    • 6  ejabberd modules +
                                                                                                                                                                                                    • 6  Modules -

                                                                                                                                                                                                      1  Introduction

                                                                                                                                                                                                      +

                                                                                                                                                                                                      1  Introduction

                                                                                                                                                                                                      - + -ejabberd is a free (GPL) distributed fault-tolerant Jabber/XMPP server and is mainly written in Erlang.
                                                                                                                                                                                                      +ejabberd is a free and open source instant messaging server written in Erlang.

                                                                                                                                                                                                      -ejabberd is designed to be a stable, standards compliant, and feature rich Jabber/XMPP server.
                                                                                                                                                                                                      +ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication.

                                                                                                                                                                                                      -ejabberd is suitable for small servers, whether they need to be scalable or not, as well as extremely big servers.
                                                                                                                                                                                                      +ejabberd is designed to be a rock-solid and feature rich XMPP server.
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +ejabberd is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments.

                                                                                                                                                                                                      -

                                                                                                                                                                                                      1.1  Key Features

                                                                                                                                                                                                      +

                                                                                                                                                                                                      1.1  Key Features

                                                                                                                                                                                                      ejabberd is:
                                                                                                                                                                                                      • -Multiplatform: ejabberd runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.
                                                                                                                                                                                                        +Cross-platform: ejabberd runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.

                                                                                                                                                                                                      • Distributed: You can run ejabberd 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.

                                                                                                                                                                                                        -
                                                                                                                                                                                                      • Fault-tolerant: You can deploy an ejabberd 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 “on the fly”.
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • Fault-tolerant: You can deploy an ejabberd 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 `on the fly'.

                                                                                                                                                                                                      • Administrator Friendly: ejabberd 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:
                                                                                                                                                                                                        • @@ -124,17 +125,17 @@ Translated in 11 languages.
                                                                                                                                                                                                        • Open Standards: ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
                                                                                                                                                                                                          • -Fully XMPP compliant -
                                                                                                                                                                                                          • XML-based protocol +Fully XMPP compliant. +
                                                                                                                                                                                                          • XML-based protocol.
                                                                                                                                                                                                          • Many JEPs supported.
                                                                                                                                                                                                        -

                                                                                                                                                                                                        1.2  Additional Features

                                                                                                                                                                                                        +

                                                                                                                                                                                                        1.2  Additional Features

                                                                                                                                                                                                        -Besides common Jabber server features, ejabberd comes with a wide range of other features: +Moreover, ejabberd comes with a wide range of other state-of-the-art features:
                                                                                                                                                                                                        • Modular
                                                                                                                                                                                                          • @@ -152,12 +153,12 @@ SASL and STARTTLS for c2s and s2s connections. Native MySQL support.
                                                                                                                                                                                                          • Native PostgreSQL support.
                                                                                                                                                                                                          • Mnesia. -
                                                                                                                                                                                                          • ODBC data storage support. -
                                                                                                                                                                                                          • Microsoft SQL Server support (via ODBC). +
                                                                                                                                                                                                          • ODBC data storage support. +
                                                                                                                                                                                                          • Microsoft SQL Server support.
                                                                                                                                                                                                        • Authentication
                                                                                                                                                                                                          • -LDAP and ODBC. +LDAP and ODBC.
                                                                                                                                                                                                          • External Authentication script.
                                                                                                                                                                                                          • Internal Authentication.
                                                                                                                                                                                                          @@ -170,14 +171,14 @@ Compressing XML streams with Stream Compression (Multi-User Chat module with logging.
                                                                                                                                                                                                        • Users Directory based on users vCards.
                                                                                                                                                                                                        • Publish-Subscribe component. -
                                                                                                                                                                                                        • Support for virtual hosting. +
                                                                                                                                                                                                        • Support for virtual hosting.
                                                                                                                                                                                                        • HTTP Polling service.
                                                                                                                                                                                                        • IRC transport.
                                                                                                                                                                                                      - + -

                                                                                                                                                                                                      2  How it works

                                                                                                                                                                                                      +

                                                                                                                                                                                                      2  How it Works

                                                                                                                                                                                                      A Jabber domain is served by one or more ejabberd nodes. These nodes can @@ -235,9 +236,9 @@ routes the packet to S2S manager on that node, if it is open on this node, then it is routed to the process that serves this connection, and if a connection does not exist, then it is opened and registered.

                                                                                                                                                                                                      - + -

                                                                                                                                                                                                      3  XML representation

                                                                                                                                                                                                      +

                                                                                                                                                                                                      3  XML Representation

                                                                                                                                                                                                      Each XML stanza is represented as the following tuple: @@ -325,21 +326,14 @@ Err = term() Parses Str using XML parser, returns either parsed element or error tuple. - + -

                                                                                                                                                                                                      6  ejabberd modules

                                                                                                                                                                                                      +

                                                                                                                                                                                                      6  Modules

                                                                                                                                                                                                      - - -

                                                                                                                                                                                                      6.1  gen_mod behaviour

                                                                                                                                                                                                      - - -TBD
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -

                                                                                                                                                                                                      6.2  Module gen_iq_handler

                                                                                                                                                                                                      +

                                                                                                                                                                                                      6.1  Module gen_iq_handler

                                                                                                                                                                                                      The module gen_iq_handler allows to easily write handlers for IQ packets @@ -408,12 +402,9 @@ process_local_iq(From, To, {iq, ID, Type, XMLNS, SubEl}) -> -

                                                                                                                                                                                                      6.3  Services

                                                                                                                                                                                                      +

                                                                                                                                                                                                      6.2  Services

                                                                                                                                                                                                      -TBD
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -TODO: use proc_lib
                                                                                                                                                                                                       -module(mod_echo).
                                                                                                                                                                                                       
                                                                                                                                                                                                      diff --git a/doc/dev.tex b/doc/dev.tex
                                                                                                                                                                                                      index 9aa3b820a..3b0764311 100644
                                                                                                                                                                                                      --- a/doc/dev.tex
                                                                                                                                                                                                      +++ b/doc/dev.tex
                                                                                                                                                                                                      @@ -29,24 +29,31 @@
                                                                                                                                                                                                       
                                                                                                                                                                                                       %% Modules
                                                                                                                                                                                                       \newcommand{\module}[1]{\texttt{#1}}
                                                                                                                                                                                                      +\newcommand{\modadhoc}{\module{mod\_adhoc}}
                                                                                                                                                                                                       \newcommand{\modannounce}{\module{mod\_announce}}
                                                                                                                                                                                                       \newcommand{\modconfigure}{\module{mod\_configure}}
                                                                                                                                                                                                       \newcommand{\moddisco}{\module{mod\_disco}}
                                                                                                                                                                                                      +\newcommand{\modecho}{\module{mod\_echo}}
                                                                                                                                                                                                       \newcommand{\modirc}{\module{mod\_irc}}
                                                                                                                                                                                                       \newcommand{\modlast}{\module{mod\_last}}
                                                                                                                                                                                                      +\newcommand{\modlastodbc}{\module{mod\_last\_odbc}}
                                                                                                                                                                                                       \newcommand{\modmuc}{\module{mod\_muc}}
                                                                                                                                                                                                      -\newcommand{\modecho}{\module{mod\_echo}}
                                                                                                                                                                                                      +\newcommand{\modmuclog}{\module{mod\_muc\_log}}
                                                                                                                                                                                                       \newcommand{\modoffline}{\module{mod\_offline}}
                                                                                                                                                                                                      +\newcommand{\modofflineodbc}{\module{mod\_offline\_odbc}}
                                                                                                                                                                                                       \newcommand{\modprivacy}{\module{mod\_privacy}}
                                                                                                                                                                                                       \newcommand{\modprivate}{\module{mod\_private}}
                                                                                                                                                                                                       \newcommand{\modpubsub}{\module{mod\_pubsub}}
                                                                                                                                                                                                       \newcommand{\modregister}{\module{mod\_register}}
                                                                                                                                                                                                       \newcommand{\modroster}{\module{mod\_roster}}
                                                                                                                                                                                                      +\newcommand{\modrosterodbc}{\module{mod\_roster\_odbc}}
                                                                                                                                                                                                       \newcommand{\modservicelog}{\module{mod\_service\_log}}
                                                                                                                                                                                                       \newcommand{\modsharedroster}{\module{mod\_shared\_roster}}
                                                                                                                                                                                                       \newcommand{\modstats}{\module{mod\_stats}}
                                                                                                                                                                                                       \newcommand{\modtime}{\module{mod\_time}}
                                                                                                                                                                                                       \newcommand{\modvcard}{\module{mod\_vcard}}
                                                                                                                                                                                                      +\newcommand{\modvcardldap}{\module{mod\_vcard\_ldap}}
                                                                                                                                                                                                      +\newcommand{\modvcardodbc}{\module{mod\_vcard\_odbc}}
                                                                                                                                                                                                       \newcommand{\modversion}{\module{mod\_version}}
                                                                                                                                                                                                       
                                                                                                                                                                                                       %% Title page
                                                                                                                                                                                                      @@ -89,7 +96,7 @@
                                                                                                                                                                                                       % Input introduction.tex
                                                                                                                                                                                                       \input{introduction}
                                                                                                                                                                                                       
                                                                                                                                                                                                      -\section{How it works}
                                                                                                                                                                                                      +\section{How it Works}
                                                                                                                                                                                                       \label{sec:howitworks}
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                      @@ -150,7 +157,7 @@ does not exist, then it is opened and registered.
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                      -\section{XML representation}
                                                                                                                                                                                                      +\section{XML Representation}
                                                                                                                                                                                                       \label{sec:xmlrepr}
                                                                                                                                                                                                       
                                                                                                                                                                                                       Each XML stanza is represented as the following tuple:
                                                                                                                                                                                                      @@ -254,14 +261,14 @@ Err = term()
                                                                                                                                                                                                       \end{description}
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                      -\section{\ejabberd{} modules}
                                                                                                                                                                                                      +\section{Modules}
                                                                                                                                                                                                       \label{sec:emods}
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                      -\subsection{gen\_mod behaviour}
                                                                                                                                                                                                      -\label{sec:genmod}
                                                                                                                                                                                                      +%\subsection{gen\_mod behaviour}
                                                                                                                                                                                                      +%\label{sec:genmod}
                                                                                                                                                                                                       
                                                                                                                                                                                                      -TBD
                                                                                                                                                                                                      +%TBD
                                                                                                                                                                                                       
                                                                                                                                                                                                       \subsection{Module gen\_iq\_handler}
                                                                                                                                                                                                       \label{sec:geniqhandl}
                                                                                                                                                                                                      @@ -345,10 +352,10 @@ process_local_iq(From, To, {iq, ID, Type, XMLNS, SubEl}) ->
                                                                                                                                                                                                       \subsection{Services}
                                                                                                                                                                                                       \label{sec:services}
                                                                                                                                                                                                       
                                                                                                                                                                                                      -TBD
                                                                                                                                                                                                      +%TBD
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                      -TODO: use \verb|proc_lib|
                                                                                                                                                                                                      +%TODO: use \verb|proc_lib|
                                                                                                                                                                                                       \begin{verbatim}
                                                                                                                                                                                                       -module(mod_echo).
                                                                                                                                                                                                       
                                                                                                                                                                                                      diff --git a/doc/features.tex b/doc/features.tex
                                                                                                                                                                                                      index d64b0fafb..f5579cf42 100644
                                                                                                                                                                                                      --- a/doc/features.tex
                                                                                                                                                                                                      +++ b/doc/features.tex
                                                                                                                                                                                                      @@ -9,7 +9,7 @@
                                                                                                                                                                                                               Feature\ Sheet,pdfauthor=Sander\
                                                                                                                                                                                                               Devrieze,pdfsubject=ejabberd,pdfkeywords=ejabberd]{hyperref}
                                                                                                                                                                                                       \usepackage{verbatim}
                                                                                                                                                                                                      -\usepackage{xcolor}
                                                                                                                                                                                                      +\usepackage{color}
                                                                                                                                                                                                       
                                                                                                                                                                                                       %% Index
                                                                                                                                                                                                       % Remove the index anchors from the HTML version to save size and bandwith.
                                                                                                                                                                                                      @@ -49,11 +49,14 @@
                                                                                                                                                                                                       % Options
                                                                                                                                                                                                       \newcommand{\marking}[1]{\textbf{\begin{large}\textcolor{ejblue}{#1}\end{large}}} % Marking enabled
                                                                                                                                                                                                       \newcommand{\quoting}[2][yozhik]{\begin{quotation}\textcolor{#1}{\textit{#2}}\end{quotation}} % Quotes enabled
                                                                                                                                                                                                      -\newcommand{\new}{\begin{latexonly}\marginpar{\textcolor{red}{\textsc{new}}}\end{latexonly}} % Highlight new features
                                                                                                                                                                                                      -\newcommand{\improved}{\begin{latexonly}\marginpar{\textcolor{orange}{\textsc{improved}}}\end{latexonly}} % Highlight improved features
                                                                                                                                                                                                      -\newcommand{\moreinfo}[1]{} % Hide details
                                                                                                                                                                                                      +\newcommand{\new}{\marginpar{\textcolor{red}{\textsc{new}}}} % Highlight new features
                                                                                                                                                                                                      +\newcommand{\improved}{\marginpar{\textcolor{orange}{\textsc{improved}}}} % Highlight improved features
                                                                                                                                                                                                       \setcounter{secnumdepth}{-1} % Disable section numbering
                                                                                                                                                                                                       
                                                                                                                                                                                                      +%% To by-pass errors in the HTML version.
                                                                                                                                                                                                      +\newstyle{SPAN}{width:20\%; float:right; text-align:left; margin-left:auto;}
                                                                                                                                                                                                      +\definecolor{orange}       {cmyk}{0.000,0.333,1.000,0.000}
                                                                                                                                                                                                      +
                                                                                                                                                                                                       %% Footnotes
                                                                                                                                                                                                       \begin{latexonly}
                                                                                                                                                                                                       \global\parskip=9pt plus 3pt minus 1pt
                                                                                                                                                                                                      @@ -67,7 +70,7 @@
                                                                                                                                                                                                       %% Fancy header
                                                                                                                                                                                                       \fancyhf{}
                                                                                                                                                                                                       \pagestyle{fancy}
                                                                                                                                                                                                      -\rhead{\textcolor{ejblue}{The expandable Jabber daemon.}}
                                                                                                                                                                                                      +\rhead{\textcolor{ejblue}{The Expandable Jabber Daemon.}}
                                                                                                                                                                                                       \renewcommand{\headrule}{{\color{ejblue}%
                                                                                                                                                                                                       \hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
                                                                                                                                                                                                       \lhead{\setlength{\unitlength}{-6mm}
                                                                                                                                                                                                      @@ -85,7 +88,7 @@
                                                                                                                                                                                                       
                                                                                                                                                                                                       \begin{document}
                                                                                                                                                                                                       
                                                                                                                                                                                                      -\label{sec:titlepage}
                                                                                                                                                                                                      +\label{titlepage}
                                                                                                                                                                                                       \begin{titlepage}
                                                                                                                                                                                                         \maketitle{}
                                                                                                                                                                                                       
                                                                                                                                                                                                      @@ -107,9 +110,8 @@
                                                                                                                                                                                                       % the same identifier".
                                                                                                                                                                                                       \begin{latexonly}
                                                                                                                                                                                                       \setcounter{page}{2}
                                                                                                                                                                                                      -\end{latexonly}
                                                                                                                                                                                                      -
                                                                                                                                                                                                       \pagecolor{ejgreenwhite}
                                                                                                                                                                                                      +\end{latexonly}
                                                                                                                                                                                                       
                                                                                                                                                                                                       % Input introduction.tex
                                                                                                                                                                                                       \input{introduction}
                                                                                                                                                                                                      diff --git a/doc/guide.html b/doc/guide.html
                                                                                                                                                                                                      index cf4f4382f..130a9c128 100644
                                                                                                                                                                                                      --- a/doc/guide.html
                                                                                                                                                                                                      +++ b/doc/guide.html
                                                                                                                                                                                                      @@ -4,7 +4,7 @@
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                      -Ejabberd 1.1.1 Installation and Operation Guide
                                                                                                                                                                                                      +Ejabberd 1.1.2 Installation and Operation Guide
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                      @@ -18,11 +18,12 @@ DIV TABLE{margin-left:inherit;margin-right:inherit;}
                                                                                                                                                                                                       PRE{text-align:left;margin-left:0ex;margin-right:auto;}
                                                                                                                                                                                                       BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;}
                                                                                                                                                                                                       .part{margin:auto;text-align:center}
                                                                                                                                                                                                      +SPAN{width:20%; float:right; text-align:left; margin-left:auto;}
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                      -
                                                                                                                                                                                                      +
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                      @@ -30,11 +31,11 @@ BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;}
                                                                                                                                                                                                       
                                                                                                                                                                                                       

                                                                                                                                                                                                      - +
                                                                                                                                                                                                    • -

                                                                                                                                                                                                      Ejabberd 1.1.1 Developers Guide

                                                                                                                                                                                                      +

                                                                                                                                                                                                      Ejabberd 1.1.2 Developers Guide

                                                                                                                                                                                                      Alexey Shchepin
                                                                                                                                                                                                      mailto:alexey@sevcom.net
                                                                                                                                                                                                      xmpp:aleksey@jabber.ru

                                                                                                                                                                                                      @@ -42,14 +43,14 @@ BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;}
                                                                                                                                                                                                      - + logo.png

                                                                                                                                                                                                      -
                                                                                                                                                                                                      I can thoroughly recommend ejabberd for ease of setup – +
                                                                                                                                                                                                      I can thoroughly recommend ejabberd for ease of setup — Kevin Smith, Current maintainer of the Psi project
                                                                                                                                                                                                      @@ -65,136 +66,159 @@ BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;} -
                                                                                                                                                                                                    • 3  Configuration +
                                                                                                                                                                                                    • 3  Basic Configuration +
                                                                                                                                                                                                    • 4  Database Configuration + -
                                                                                                                                                                                                    • A  Built-in Modules +
                                                                                                                                                                                                    • 5  Modules Configuration +
                                                                                                                                                                                                    • 6  Creating an Initial Administrator +
                                                                                                                                                                                                    • 7  Online Configuration and Monitoring + +
                                                                                                                                                                                                    • 8  Firewall Settings +
                                                                                                                                                                                                    • 9  SRV Records +
                                                                                                                                                                                                    • 10  Clustering + -
                                                                                                                                                                                                    • B  Internationalization and Localization -
                                                                                                                                                                                                    • C  Release Notes +
                                                                                                                                                                                                    • A  Internationalization and Localization +
                                                                                                                                                                                                    • B  Release Notes -
                                                                                                                                                                                                    • D  Acknowledgements +
                                                                                                                                                                                                    • C  Acknowledgements +
                                                                                                                                                                                                    • D  Copyright Information -

                                                                                                                                                                                                      1  Introduction

                                                                                                                                                                                                      +

                                                                                                                                                                                                      1  Introduction

                                                                                                                                                                                                      - + -ejabberd is a free (GPL) distributed fault-tolerant Jabber/XMPP server and is mainly written in Erlang.
                                                                                                                                                                                                      +ejabberd is a free and open source instant messaging server written in Erlang.

                                                                                                                                                                                                      -ejabberd is designed to be a stable, standards compliant, and feature rich Jabber/XMPP server.
                                                                                                                                                                                                      +ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication.

                                                                                                                                                                                                      -ejabberd is suitable for small servers, whether they need to be scalable or not, as well as extremely big servers.
                                                                                                                                                                                                      +ejabberd is designed to be a rock-solid and feature rich XMPP server.
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +ejabberd is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments.

                                                                                                                                                                                                      -

                                                                                                                                                                                                      1.1  Key Features

                                                                                                                                                                                                      +

                                                                                                                                                                                                      1.1  Key Features

                                                                                                                                                                                                      ejabberd is:
                                                                                                                                                                                                      • -Multiplatform: ejabberd runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.
                                                                                                                                                                                                        +Cross-platform: ejabberd runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.

                                                                                                                                                                                                      • Distributed: You can run ejabberd 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.

                                                                                                                                                                                                        -
                                                                                                                                                                                                      • Fault-tolerant: You can deploy an ejabberd 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 “on the fly”.
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • Fault-tolerant: You can deploy an ejabberd 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 `on the fly'.

                                                                                                                                                                                                      • Administrator Friendly: ejabberd 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:
                                                                                                                                                                                                        • Comprehensive documentation. -
                                                                                                                                                                                                        • Straightforward installers for Linux, Mac OS X, and Windows. +
                                                                                                                                                                                                        • Straightforward installers for Linux, Mac OS X, and Windows.improved
                                                                                                                                                                                                        • Web interface for administration tasks.
                                                                                                                                                                                                        • Shared Roster Groups.
                                                                                                                                                                                                        • Command line administration tool. @@ -210,17 +234,17 @@ Translated in 11 languages.
                                                                                                                                                                                                        • Open Standards: ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
                                                                                                                                                                                                          • -Fully XMPP compliant -
                                                                                                                                                                                                          • XML-based protocol +Fully XMPP compliant. +
                                                                                                                                                                                                          • XML-based protocol.
                                                                                                                                                                                                          • Many JEPs supported.
                                                                                                                                                                                                        -

                                                                                                                                                                                                        1.2  Additional Features

                                                                                                                                                                                                        +

                                                                                                                                                                                                        1.2  Additional Features

                                                                                                                                                                                                        -Besides common Jabber server features, ejabberd comes with a wide range of other features: +Moreover, ejabberd comes with a wide range of other state-of-the-art features:
                                                                                                                                                                                                        • Modular
                                                                                                                                                                                                          • @@ -238,12 +262,12 @@ SASL and STARTTLS for c2s and s2s connections. Native MySQL support.
                                                                                                                                                                                                          • Native PostgreSQL support.
                                                                                                                                                                                                          • Mnesia. -
                                                                                                                                                                                                          • ODBC data storage support. -
                                                                                                                                                                                                          • Microsoft SQL Server support (via ODBC). +
                                                                                                                                                                                                          • ODBC data storage support. +
                                                                                                                                                                                                          • Microsoft SQL Server support.new
                                                                                                                                                                                                        • Authentication
                                                                                                                                                                                                          • -LDAP and ODBC. +LDAP and ODBC.
                                                                                                                                                                                                          • External Authentication script.
                                                                                                                                                                                                          • Internal Authentication.
                                                                                                                                                                                                          @@ -253,47 +277,46 @@ Compressing XML streams with Stream Compression (Interface with networks such as AIM, ICQ and MSN.
                                                                                                                                                                                                        • Statistics via Statistics Gathering (JEP-0039).
                                                                                                                                                                                                        • IPv6 support both for c2s and s2s connections. -
                                                                                                                                                                                                        • Multi-User Chat module with logging. +
                                                                                                                                                                                                        • Multi-User Chat module with logging.improved
                                                                                                                                                                                                        • Users Directory based on users vCards.
                                                                                                                                                                                                        • Publish-Subscribe component. -
                                                                                                                                                                                                        • Support for virtual hosting. +
                                                                                                                                                                                                        • Support for virtual hosting.
                                                                                                                                                                                                        • HTTP Polling service.
                                                                                                                                                                                                        • IRC transport.
                                                                                                                                                                                                      -

                                                                                                                                                                                                      2  Installation from Source

                                                                                                                                                                                                      +

                                                                                                                                                                                                      2  Installation from Source

                                                                                                                                                                                                      - + -

                                                                                                                                                                                                      2.1  Installation Requirements

                                                                                                                                                                                                      +

                                                                                                                                                                                                      2.1  Installation Requirements

                                                                                                                                                                                                      - -

                                                                                                                                                                                                      2.1.1  “Unix-like” operating systems

                                                                                                                                                                                                      + - +

                                                                                                                                                                                                      2.1.1  `Unix-like' operating systems

                                                                                                                                                                                                      -To compile ejabberd on a “Unix-like” operating system, you need: + +To compile ejabberd on a `Unix-like' operating system, 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 at all on systems with GNU libc). +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)
                                                                                                                                                                                                      -

                                                                                                                                                                                                      2.1.2  Windows

                                                                                                                                                                                                      +

                                                                                                                                                                                                      2.1.2  Windows

                                                                                                                                                                                                      - To compile ejabberd on a Windows flavour, you need:
                                                                                                                                                                                                      • MS Visual C++ 6.0 Compiler @@ -307,7 +330,7 @@ MS Visual C++ 6.0 Compiler
                                                                                                                                                                                                      -

                                                                                                                                                                                                      2.2  Obtaining ejabberd

                                                                                                                                                                                                      +

                                                                                                                                                                                                      2.2  Obtaining ejabberd

                                                                                                                                                                                                      @@ -321,17 +344,16 @@ The latest development version can be retrieved from the Subversion repository. -

                                                                                                                                                                                                      2.3  Compilation

                                                                                                                                                                                                      +

                                                                                                                                                                                                      2.3  Compilation

                                                                                                                                                                                                      - + - + -

                                                                                                                                                                                                      2.3.1  “Unix-like” operating systems

                                                                                                                                                                                                      +

                                                                                                                                                                                                      2.3.1  `Unix-like' operating systems

                                                                                                                                                                                                      - - -Compile ejabberd on a “Unix-like” operating system by executing: + +Compile ejabberd on a `Unix-like' operating system by executing:
                                                                                                                                                                                                         ./configure
                                                                                                                                                                                                         make
                                                                                                                                                                                                      @@ -344,12 +366,15 @@ 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. +Note: if you want to use an external database, you need to execute the configure +script with the option(s) –enable-odbc or –enable-odbc +–enable-mssql. See section 4 for more information.
                                                                                                                                                                                                      +
                                                                                                                                                                                                      -

                                                                                                                                                                                                      2.3.2  Windows

                                                                                                                                                                                                      - - +

                                                                                                                                                                                                      2.3.2  Windows

                                                                                                                                                                                                      +
                                                                                                                                                                                                      • Install Erlang emulator (for example, into C:\Program Files\erl5.3).
                                                                                                                                                                                                      • Install Expat library into C:\Program Files\Expat-1.95.7 @@ -380,9 +405,10 @@ werl -s ejabberd -name ejabberd
                                                                                                                                                                                                    • -

                                                                                                                                                                                                      2.4  Starting

                                                                                                                                                                                                      +

                                                                                                                                                                                                      2.4  Starting

                                                                                                                                                                                                      + + - Execute the following command to start ejabberd:
                                                                                                                                                                                                      @@ -391,7 +417,7 @@ Execute the following command to start ejabberd:
                                                                                                                                                                                                       
                                                                                                                                                                                                         erl -pa /var/lib/ejabberd/ebin -sname ejabberd -s ejabberd
                                                                                                                                                                                                       
                                                                                                                                                                                                      In the latter case the Erlang node will be identified using only the first part -of the host name, i. e. other Erlang nodes outside this domain can't contact +of the host name, i. e. other Erlang nodes outside this domain cannot contact this node.

                                                                                                                                                                                                      Note that when using the above command, ejabberd will search for the @@ -425,16 +451,11 @@ To reduce memory usage, you may set the environment variable export ERL_FULLSWEEP_AFTER=0
                                                                                                                                                                                                      But in this case ejabberd can start to work slower.

                                                                                                                                                                                                      - + -

                                                                                                                                                                                                      3  Configuration

                                                                                                                                                                                                      +

                                                                                                                                                                                                      3  Basic Configuration

                                                                                                                                                                                                      - - - -

                                                                                                                                                                                                      3.1  Initial Configuration

                                                                                                                                                                                                      - - + The configuration file will be loaded the first time you start ejabberd. The content from this file will be parsed and stored in a database. Subsequently the @@ -443,7 +464,7 @@ configuration file are appended to the entries in the database. The configuration file contains a sequence of Erlang terms. Lines beginning with a `%' sign are ignored. Each term is a tuple of which the first element is the name of an option, and any further elements are that option's values. If the -configuration file do not contain for instance the “hosts” option, the old +configuration file do not contain for instance the `hosts' option, the old host name(s) stored in the database will be used.

                                                                                                                                                                                                      You can override the old values stored in the database by adding next lines to @@ -455,11 +476,11 @@ the configuration file: With these lines the old global options, local options and ACLs will be removed before new ones are added.

                                                                                                                                                                                                      - + -

                                                                                                                                                                                                      3.1.1  Host Names

                                                                                                                                                                                                      +

                                                                                                                                                                                                      3.1  Host Names

                                                                                                                                                                                                      - + The option hosts defines a list containing one or more domains that ejabberd will serve.
                                                                                                                                                                                                      @@ -467,175 +488,61 @@ The option hosts defines a list containing one or more domains that Examples:
                                                                                                                                                                                                      • Serving one domain: -
                                                                                                                                                                                                        • -
                                                                                                                                                                                                          + 
                                                                                                                                                                                                             {hosts, ["example.org"]}.
                                                                                                                                                                                                          -
                                                                                                                                                                                                        • Backwards compatibility with older ejabberd versions can be retained - with: +
                                                                                                                                                                                                        • Serving one domain, and backwards compatible with older ejabberd + versions:
                                                                                                                                                                                                             {host, "example.org"}.
                                                                                                                                                                                                          -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • Serving two domains: +
                                                                                                                                                                                                      • Serving two domains:
                                                                                                                                                                                                           {hosts, ["example.net", "example.com"]}.
                                                                                                                                                                                                         
                                                                                                                                                                                                      - - -

                                                                                                                                                                                                      3.1.2  Default Language

                                                                                                                                                                                                      - - - -The option language defines the default language of server strings that -can be seen by Jabber clients. If a Jabber client do not support -xml:lang, the specified language is used. The default value for the -option language is "en". In order to take effect there must be a -translation file <language>.msg in ejabberd's msgs directory.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -Examples: -
                                                                                                                                                                                                      • -To set Russian as default language: -
                                                                                                                                                                                                        -  {language, "ru"}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • To set Spanish as default language: -
                                                                                                                                                                                                        -  {language, "es"}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                      - + -

                                                                                                                                                                                                      3.1.3  Access Rules

                                                                                                                                                                                                      +

                                                                                                                                                                                                      3.2  Virtual Hosting

                                                                                                                                                                                                      - + -Access control in ejabberd is performed via Access Control Lists (ACLs). The -declarations of ACLs in the configuration file have the following syntax: -
                                                                                                                                                                                                      -  {acl, <aclname>, {<acltype>, ...}}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -<acltype> can be one of the following: -
                                                                                                                                                                                                      -all
                                                                                                                                                                                                      Matches all JIDs. Example: -
                                                                                                                                                                                                      -{acl, all, all}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {user, <username>}
                                                                                                                                                                                                      Matches the user with the name - <username> at the first virtual host. Example: -
                                                                                                                                                                                                      -{acl, admin, {user, "yozhik"}}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {user, <username>, <server>}
                                                                                                                                                                                                      Matches the user with the JID - <username>@<server> and any resource. Example: -
                                                                                                                                                                                                      -{acl, admin, {user, "yozhik", "example.org"}}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {server, <server>}
                                                                                                                                                                                                      Matches any JID from server - <server>. Example: -
                                                                                                                                                                                                      -{acl, exampleorg, {server, "example.org"}}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {user_regexp, <regexp>}
                                                                                                                                                                                                      Matches any local user with a name that - matches <regexp> at the first virtual host. Example: -
                                                                                                                                                                                                      -{acl, tests, {user, "^test[0-9]*$"}}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {user_regexp, <regexp>, <server>}
                                                                                                                                                                                                      Matches any user with a name - that matches <regexp> at server <server>. Example: -
                                                                                                                                                                                                      -{acl, tests, {user, "^test", "example.org"}}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {server_regexp, <regexp>}
                                                                                                                                                                                                      Matches any JID from the server that - matches <regexp>. Example: -
                                                                                                                                                                                                      -{acl, icq, {server, "^icq\\."}}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {node_regexp, <user_regexp>, <server_regexp>}
                                                                                                                                                                                                      Matches any user - with a name that matches <user_regexp> at any server that matches - <server_regexp>. Example: -
                                                                                                                                                                                                      -{acl, yohzik, {node_regexp, "^yohzik$", "^example.(com|org)$"}}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {user_glob, <glob>}
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {user_glob, <glob>, <server>}
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {server_glob, <glob>}
                                                                                                                                                                                                      -
                                                                                                                                                                                                      {node_glob, <user_glob>, <server_glob>}
                                                                                                                                                                                                      This is the same as - above. However, it uses shell glob patterns instead of regexp. These patterns - can have the following special characters: -
                                                                                                                                                                                                      - *
                                                                                                                                                                                                      matches any string including the null string. -
                                                                                                                                                                                                      ?
                                                                                                                                                                                                      matches any single character. -
                                                                                                                                                                                                      [...]
                                                                                                                                                                                                      matches any of the enclosed characters. Character - ranges are specified by a pair of characters separated by a `-'. - If the first character after `[' is a `!', any - character not enclosed is matched. -
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -The following ACLs are pre-defined: -
                                                                                                                                                                                                      -all
                                                                                                                                                                                                      Matches any JID. -
                                                                                                                                                                                                      none
                                                                                                                                                                                                      Matches no JID. -
                                                                                                                                                                                                      -An entry allowing or denying access to different services looks similar to -this: -
                                                                                                                                                                                                      -  {access, <accessname>, [{allow, <aclname>},
                                                                                                                                                                                                      -                          {deny, <aclname>},
                                                                                                                                                                                                      -                          ...
                                                                                                                                                                                                      -                         ]}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      When a JID is checked to have access to <accessname>, the server -sequentially checks if that JID mathes any of the ACLs that are named in the -second elements of the tuples in the list. If it matches, the first element of -the first matched tuple is returned, otherwise “deny” is returned.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -Example: +Options can be defined separately for every virtual host using the +host_config option. It has the following +syntax:
                                                                                                                                                                                                      -  {access, configure, [{allow, admin}]}.
                                                                                                                                                                                                      -  {access, something, [{deny, badmans},
                                                                                                                                                                                                      -                       {allow, all}]}.
                                                                                                                                                                                                      +  {host_config, <hostname>, [<option>, <option>, ...]}.
                                                                                                                                                                                                       
                                                                                                                                                                                                      -The following access rules are pre-defined: -
                                                                                                                                                                                                      -all
                                                                                                                                                                                                      Always returns “allow” -
                                                                                                                                                                                                      none
                                                                                                                                                                                                      Always returns “deny” -
                                                                                                                                                                                                      - - -

                                                                                                                                                                                                      3.1.4  Shapers

                                                                                                                                                                                                      - - - -Shapers enable you to limit connection traffic. The syntax of -shapers is like this: -
                                                                                                                                                                                                      -  {shaper, <shapername>, <kind>}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      Currently only one kind of shaper called maxrate is available. It has the -following syntax: -
                                                                                                                                                                                                      -  {maxrate, <rate>}
                                                                                                                                                                                                      -
                                                                                                                                                                                                      where <rate> stands for the maximum allowed incomig rate in bytes per -second.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      Examples:
                                                                                                                                                                                                      • -To define a shaper named “normal” with traffic speed limited to -1,000 bytes/second: -
                                                                                                                                                                                                        -  {shaper, normal, {maxrate, 1000}}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • To define a shaper named “fast” with traffic speed limited to -50,000 bytes/second: +Domain example.net is using the internal authentication method while + domain example.com is using the LDAP server running on the + domain localhost to perform authentication:
                                                                                                                                                                                                        -  {shaper, fast, {maxrate, 50000}}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                      - - -

                                                                                                                                                                                                      3.1.5  Limitation of the number of opened sessions

                                                                                                                                                                                                      +{host_config, "example.net", [{auth_method, internal}]}. - +{host_config, "example.com", [{auth_method, ldap}, + {ldap_servers, ["localhost"]}, + {ldap_uidattr, "uid"}, + {ldap_rootdn, "dc=localdomain"}, + {ldap_rootdn, "dc=example,dc=com"}, + {ldap_password, ""}]}. +
                                                                                                                                                                                                    • Domain example.net is using ODBC to perform authentication + while domain example.com is using the LDAP servers running on the domains + localhost and otherhost: +
                                                                                                                                                                                                      +{host_config, "example.net", [{auth_method, odbc},
                                                                                                                                                                                                      +                              {odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}]}.
                                                                                                                                                                                                       
                                                                                                                                                                                                      -This option specifies the maximum number of sessions (authenticated
                                                                                                                                                                                                      -connections) per user. If a user tries to open more than the maximum number of
                                                                                                                                                                                                      -allowed sessions, with different resources, the first opened session will be
                                                                                                                                                                                                      -disconnected. The error “session replaced” is send to the
                                                                                                                                                                                                      -disconnected session. This value is either a number or infinity. For
                                                                                                                                                                                                      -example {max\_user\_sessions, 10}. The default value is 10.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -This option can be define per virtual host. See section 3.1.8.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      - +{host_config, "example.com", [{auth_method, ldap}, + {ldap_servers, ["localhost", "otherhost"]}, + {ldap_uidattr, "uid"}, + {ldap_rootdn, "dc=localdomain"}, + {ldap_rootdn, "dc=example,dc=com"}, + {ldap_password, ""}]}. +
                                                                                                                                                                                                      + -

                                                                                                                                                                                                      3.1.6  Listened Sockets

                                                                                                                                                                                                      +

                                                                                                                                                                                                      3.3  Listened Sockets

                                                                                                                                                                                                      - + The option listen defines for which addresses and ports ejabberd will listen and what services will be run on them. Each element of the list is a @@ -697,7 +604,7 @@ Currently next modules are implemented: The following options are available:
                                                                                                                                                                                                      {access, <access rule>}
                                                                                                                                                                                                      This option defines - access to the port. The default value is “all”. + access to the port. The default value is all.
                                                                                                                                                                                                      {certfile, Path}
                                                                                                                                                                                                      Path to a file containing the SSL certificate.
                                                                                                                                                                                                      {hosts, [Hostnames], [HostOptions]}
                                                                                                                                                                                                      This option defines one or more hostnames of connected services and enables you to @@ -718,12 +625,13 @@ If HTTP Polling is enabled, it will be available at
                                                                                                                                                                                                      {ip, IPAddress}
                                                                                                                                                                                                      This option specifies which network interface to listen for. For example {ip, {192, 168, 1, 1}}.
                                                                                                                                                                                                      {max_stanza_size, Size}
                                                                                                                                                                                                      This - option specifies an approximate maximal size in bytes of XML stanzas. - For example {max\_stanza\_size, 65536}. The default value - is “infinity”. + option specifies an approximate maximum size in bytes of XML stanzas. + Approximate, because it is calculated with the precision of one block of + readed data. For example {max\_stanza\_size, 65536}. The default + value is infinity.
                                                                                                                                                                                                      {shaper, <access rule>}
                                                                                                                                                                                                      This option defines a - shaper for the port (see section 3.1.4). The default value - is “none”. + shaper for the port (see section 3.6). The default value + is none.
                                                                                                                                                                                                      ssl
                                                                                                                                                                                                      This option specifies that traffic on the port will be encrypted using SSL. You should also set the certfile option. It is recommended to use the tls option @@ -740,57 +648,58 @@ If HTTP Polling is enabled, it will be available at should also set the certfile option.
                                                                                                                                                                                                      zlib
                                                                                                                                                                                                      This option specifies that Zlib stream compression (as defined in JEP-0138) - is available on connections to the port. Client cannot use stream compression and - stream encryption simultaneously, so if you specify both tls (or ssl) - and zlib the latter option will not affect connection at all. + is available on connections to the port. Client connections cannot use + stream compression and stream encryption simultaneously. Hence, if you + specify both tls (or ssl) and zlib, the latter + option will not affect connections (there will be no stream compression).
                                                                                                                                                                                                      web_admin
                                                                                                                                                                                                      This option enables the web interface for ejabberd administration which is available at 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. + `configure' access rule.
                                                                                                                                                                                                      -Also the following global options are available for s2s connections: +In addition, the following options are available for s2s connections:
                                                                                                                                                                                                      {s2s_use_starttls, true|false}
                                                                                                                                                                                                      - This option defines whether to use STARTTLS - for s2s connections. -
                                                                                                                                                                                                      {s2s_certfile, Path}
                                                                                                                                                                                                      Path to the - file containing the SSL certificate. + This option defines whether to + use STARTTLS for s2s connections. +
                                                                                                                                                                                                      {s2s_certfile, Path}
                                                                                                                                                                                                      Path to a + file containing a SSL certificate.
                                                                                                                                                                                                      {domain_certfile, Domain, Path}
                                                                                                                                                                                                      Path to the file containing the SSL certificate for the specified domain.
                                                                                                                                                                                                      For instance, the following configuration defines that:
                                                                                                                                                                                                      • c2s connections are listened for on port 5222 and 5223 (SSL) and denied - for the user “bad” + for the user called `bad'.
                                                                                                                                                                                                      • s2s connections are listened for on port 5269 with STARTTLS for secured traffic enabled.
                                                                                                                                                                                                      • Port 5280 is serving the web interface and the HTTP Polling service. Note that it is also possible to serve them on different ports. The second - example in section 3.4.1 shows how exactly this can be done. + example in section 7.1 shows how exactly this can be done.
                                                                                                                                                                                                      • All users except for the administrators have a traffic of limit 1,000 Bytes/second
                                                                                                                                                                                                      • The AIM transport aim.example.org is connected to port 5233 with password - “aimsecret” + `aimsecret'.
                                                                                                                                                                                                      • The ICQ transport JIT (icq.example.org and sms.example.org) is connected to port 5234 with password - “jitsecret” + `jitsecret'.
                                                                                                                                                                                                      • The MSN transport msn.example.org is connected to port 5235 with password - “msnsecret” + `msnsecret'.
                                                                                                                                                                                                      • The Yahoo! transport yahoo.example.org is connected to port 5236 with password - “yahoosecret” + `yahoosecret'.
                                                                                                                                                                                                      • The Gadu-Gadu transport gg.example.org is - connected to port 5237 with password “ggsecret” + connected to port 5237 with password `ggsecret'.
                                                                                                                                                                                                      • The Jabber Mail Component jmc.example.org is connected to port 5238 with password - “jmcsecret” + `jmcsecret'.
                                                                                                                                                                                                         {acl, blocked, {user, "bad"}}.
                                                                                                                                                                                                      @@ -853,198 +762,354 @@ services you have to make the transports log and do XDB by themselves:
                                                                                                                                                                                                           </xdb_file>
                                                                                                                                                                                                         </xdb>
                                                                                                                                                                                                       
                                                                                                                                                                                                      - + -

                                                                                                                                                                                                      3.1.7  Modules

                                                                                                                                                                                                      +

                                                                                                                                                                                                      3.4  Authentication

                                                                                                                                                                                                      - + -The option modules defines the list of modules that will be loaded after -ejabberd's startup. Each entry in the list is a tuple in which the first -element is the name of a module and the second is a list of options for that -module. Read section A for detailed information about modules.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      -Examples: +The option auth_method defines the authentication method that is used +for user authentication: +
                                                                                                                                                                                                      +  {auth_method, [<method>]}.
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +The following authentication methods are supported by ejabberd:
                                                                                                                                                                                                      • -In this simple example, only the module mod_echo is loaded and no - options are specified between square brackets: -
                                                                                                                                                                                                        -  {modules,
                                                                                                                                                                                                        -   [{mod_echo,      []}
                                                                                                                                                                                                        -   ]}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • The second example is also simple: the modules mod_echo, mod_time, and - mod_version are loaded without options. Remark that, besides the last entry, - all entries end with a comma: -
                                                                                                                                                                                                        -  {modules,
                                                                                                                                                                                                        -   [{mod_echo,      []},
                                                                                                                                                                                                        -    {mod_time,      []},
                                                                                                                                                                                                        -    {mod_version,   []}
                                                                                                                                                                                                        -   ]}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                      - +internal (default) — See section 3.4.1. +
                                                                                                                                                                                                    • external — There are some + example authentication scripts. +
                                                                                                                                                                                                    • ldap — See section 4.5. +
                                                                                                                                                                                                    • odbc — See section 4.1, 4.3, + 4.2 and 4.4. +
                                                                                                                                                                                                    • anonymous — See section 3.4.2. + + -

                                                                                                                                                                                                      3.1.8  Virtual Hosting

                                                                                                                                                                                                      +

                                                                                                                                                                                                      3.4.1  Internal

                                                                                                                                                                                                      - + -Options can be defined separately for every virtual host using the -host_config option. It has the following -syntax: -
                                                                                                                                                                                                      -  {host_config, <hostname>, [<option>, <option>, ...]}.
                                                                                                                                                                                                      -
                                                                                                                                                                                                      +ejabberd uses its internal Mnesia database as the default authentication method. +
                                                                                                                                                                                                      • +auth_method: The value internal will enable the internal + authentication method. +
                                                                                                                                                                                                      Examples:
                                                                                                                                                                                                      • -Domain example.net is using the internal authentication method while - domain example.com is using the LDAP server running on the domain - localhost to perform authentication: -
                                                                                                                                                                                                        -{host_config, "example.net", [{auth_method, internal}]}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -{host_config, "example.com", [{auth_method, ldap},
                                                                                                                                                                                                        -                              {ldap_servers, ["localhost"]},
                                                                                                                                                                                                        -                              {ldap_uidattr, "uid"},
                                                                                                                                                                                                        -                              {ldap_rootdn, "dc=localdomain"},
                                                                                                                                                                                                        -                              {ldap_rootdn, "dc=example,dc=com"},
                                                                                                                                                                                                        -                              {ldap_password, ""}]}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • Domain example.net is using ODBC to perform authentication - while domain example.com is using the LDAP servers running on the domains - localhost and otherhost: -
                                                                                                                                                                                                        -{host_config, "example.net", [{auth_method, odbc},
                                                                                                                                                                                                        -                              {odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}]}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -{host_config, "example.com", [{auth_method, ldap},
                                                                                                                                                                                                        -                              {ldap_servers, ["localhost", "otherhost"]},
                                                                                                                                                                                                        -                              {ldap_uidattr, "uid"},
                                                                                                                                                                                                        -                              {ldap_rootdn, "dc=localdomain"},
                                                                                                                                                                                                        -                              {ldap_rootdn, "dc=example,dc=com"},
                                                                                                                                                                                                        -                              {ldap_password, ""}]}.
                                                                                                                                                                                                        +To use internal authentication on example.org and LDAP
                                                                                                                                                                                                        + authentication on example.net:
                                                                                                                                                                                                        + 
                                                                                                                                                                                                        +{host_config, "example.org", [{auth_method, [internal]}]}.
                                                                                                                                                                                                        +{host_config, "example.net", [{auth_method, [ldap]}]}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                      • To use internal authentication on all virtual hosts: +
                                                                                                                                                                                                        +{auth_method, internal}.
                                                                                                                                                                                                         
                                                                                                                                                                                                      - + -

                                                                                                                                                                                                      3.1.9  SASL anonymous and anonymous login

                                                                                                                                                                                                      +

                                                                                                                                                                                                      3.4.2  SASL Anonymous and Anonymous Login

                                                                                                                                                                                                      - + -The configuration of the anonymous mode can be done with three -host_config parameters: -
                                                                                                                                                                                                      • -auth_method: This value is used for defining the authentication method: -internal, odbc, ldap, external). You now have a special extra option to enable -anonymous mode: anonymous.
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -
                                                                                                                                                                                                      • allow_multiple_connections: This option can be either true or false and -is only used when the anonymous mode is enabled. Setting it to true means that -the same username will be able to be taken several time in anonymous login -mode if different resource are used to connect. This option is only useful in -very special cases. It defaults to false.
                                                                                                                                                                                                        -
                                                                                                                                                                                                        +The anonymous authentication method can be configured with the following +options. Remember that you can use the host_config option to set virtual +host specific options (see section 3.2). Note that there also +is a detailed tutorial regarding SASL +Anonymous and anonymous login configuration. +
                                                                                                                                                                                                        • +auth_method: The value anonymous will enable the anonymous + authentication method. +
                                                                                                                                                                                                        • allow_multiple_connections: This value for this option can be + either true or false and is only used when the anonymous mode is + enabled. Setting it to true means that the same username can be taken + multiple times in anonymous login mode if different resource are used to + connect. This option is only useful in very special occasions. The default + value is false.
                                                                                                                                                                                                        • anonymous_protocol: This option can take three values: - sasl_anon, login_anon or both. sasl_anon means that - SASL anonymous mode is enabled. login_anon means that anonymous - login mode is enabled. both means that SASL anonymous and login anonymous are - enabled. + sasl_anon, login_anon or both. sasl_anon means + that the SASL Anonymous method will be used. login_anon means that the + anonymous login method will be used. both means that SASL Anonymous and + login anonymous are both enabled.
                                                                                                                                                                                                        Those options are defined for each virtual host with the host_config -parameter (see section 3.1.8).
                                                                                                                                                                                                        +parameter (see section 3.2).

                                                                                                                                                                                                        Examples:
                                                                                                                                                                                                        • -To enable anonymous login on a virtual host: -
                                                                                                                                                                                                          -{host_config, "public.example.org", [{auth_method, anonymous},
                                                                                                                                                                                                          +To enable anonymous login on all virtual hosts:
                                                                                                                                                                                                          + 
                                                                                                                                                                                                          +{auth_method, [anonymous]}.
                                                                                                                                                                                                          +{anonymous_protocol, login_anon}.
                                                                                                                                                                                                          +  
                                                                                                                                                                                                        • Similar as previous example, but limited to public.example.org: +
                                                                                                                                                                                                          +{host_config, "public.example.org", [{auth_method, [anonymous]},
                                                                                                                                                                                                                                                {anonymous_protocol, login_anon}]}.
                                                                                                                                                                                                           
                                                                                                                                                                                                        • To enable anonymous login and internal authentication on a virtual host: -
                                                                                                                                                                                                          + 
                                                                                                                                                                                                           {host_config, "public.example.org", [{auth_method, [anonymous,internal]},
                                                                                                                                                                                                                                                {anonymous_protocol, login_anon}]}.
                                                                                                                                                                                                          -
                                                                                                                                                                                                        • To enable SASL anonymous on a virtual host: -
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • To enable SASL Anonymous on a virtual host: +
                                                                                                                                                                                                           {host_config, "public.example.org", [{auth_method, [anonymous]},
                                                                                                                                                                                                                                                {anonymous_protocol, sasl_anon}]}.
                                                                                                                                                                                                          -
                                                                                                                                                                                                        • To enable SASL anonymous and anonymous login on a virtual host: -
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • To enable SASL Anonymous and anonymous login on a virtual host: +
                                                                                                                                                                                                           {host_config, "public.example.org", [{auth_method, [anonymous]},
                                                                                                                                                                                                                                                {anonymous_protocol, both}]}.
                                                                                                                                                                                                          -
                                                                                                                                                                                                        • To enable SASL anonymous, anonymous login and internal authentication on +
                                                                                                                                                                                                        • To enable SASL Anonymous, anonymous login, and internal authentication on a virtual host: -
                                                                                                                                                                                                          + 
                                                                                                                                                                                                           {host_config, "public.example.org", [{auth_method, [anonymous,internal]},
                                                                                                                                                                                                                                                {anonymous_protocol, both}]}.
                                                                                                                                                                                                           
                                                                                                                                                                                                        -A detailled tutorial on SASL anonymous and anonymous login support is -available from: -http://support.process-one.net/doc/display/MESSENGER/Anonymous+users+support
                                                                                                                                                                                                        -
                                                                                                                                                                                                        - + -

                                                                                                                                                                                                        3.2  Relational Database Support

                                                                                                                                                                                                        +

                                                                                                                                                                                                        3.5  Access Rules

                                                                                                                                                                                                        - - + -

                                                                                                                                                                                                        3.2.1  Preliminary steps

                                                                                                                                                                                                        - - -If you have installed ejabberd using a binary version, the compilation steps -are not needed as they have already been done correctly.
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -Otherwise, to be able to use ejabberd with a relational database you need to -enable ODBC modules during compilation, even if you want to use ejabberd with -MySQL or PostgreSQL in native mode. The following configure command can -be used to enable the relational modules: +Access control in ejabberd is performed via Access Control Lists (ACLs). The +declarations of ACLs in the configuration file have the following syntax:
                                                                                                                                                                                                        -./configure --enable-odbc
                                                                                                                                                                                                        +  {acl, <aclname>, {<acltype>, ...}}.
                                                                                                                                                                                                         
                                                                                                                                                                                                        -If you are planning to use Microsoft SQL Server with ODBC, you need to specify -it from the configure command before compilation: +<acltype> can be one of the following: +
                                                                                                                                                                                                        +all
                                                                                                                                                                                                        Matches all JIDs. Example:
                                                                                                                                                                                                        -./configure --enable-odbc --enable-mssql
                                                                                                                                                                                                        -
                                                                                                                                                                                                        - - -

                                                                                                                                                                                                        3.2.2  Authentication against a relational database

                                                                                                                                                                                                        - - -ejabberd use its internal Mnesia database as a default. It is however possible -to use relational database to store persistant, long-living data. When -switching the auth_method from internal to odbc, you are -telling ejabberd to use a relational database for authentication. Different -auth_method values can be used for different virtual hosts in the -system.
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -The option value name be misleading, as the method name is use both for access -to relational database through ODBC or through the native interface. In any -case, the first step is to define the odbc auth_method. For example: +{acl, all, all}. +
                                                                                                                                                                                                        {user, <username>}
                                                                                                                                                                                                        Matches the user with the name + <username> at the first virtual host. Example:
                                                                                                                                                                                                        -{host_config, "public.example.org", [{auth_method, [odbc]}]}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -The actual database access is defined in the option odbc_server. Its -value is use to defined if we want to use ODBC, or one of the two native -interface available, PostgreSQL or MySQL.
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -To use a relational database through ODBC, you can pass the ODBC connection -string as odbc_server parameter. For example: +{acl, admin, {user, "yozhik"}}. +
                                                                                                                                                                                                        {user, <username>, <server>}
                                                                                                                                                                                                        Matches the user with the JID + <username>@<server> and any resource. Example:
                                                                                                                                                                                                        -{odbc_server, "DSN=database;UID=ejabberd;PWD=password"}.
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -To use the native PostgreSQL interface, you can pass a tuple of the following form as -parameter: +{acl, admin, {user, "yozhik", "example.org"}}. +
                                                                                                                                                                                                        {server, <server>}
                                                                                                                                                                                                        Matches any JID from server + <server>. Example:
                                                                                                                                                                                                        -{pgsql, "Server", "Database", "Username", "Password"}
                                                                                                                                                                                                        +{acl, exampleorg, {server, "example.org"}}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        {user_regexp, <regexp>}
                                                                                                                                                                                                        Matches any local user with a name that + matches <regexp> at the first virtual host. Example: +
                                                                                                                                                                                                        +{acl, tests, {user, "^test[0-9]*$"}}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        {user_regexp, <regexp>, <server>}
                                                                                                                                                                                                        Matches any user with a name + that matches <regexp> at server <server>. Example: +
                                                                                                                                                                                                        +{acl, tests, {user, "^test", "example.org"}}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        {server_regexp, <regexp>}
                                                                                                                                                                                                        Matches any JID from the server that + matches <regexp>. Example: +
                                                                                                                                                                                                        +{acl, icq, {server, "^icq\\."}}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        {node_regexp, <user_regexp>, <server_regexp>}
                                                                                                                                                                                                        Matches any user + with a name that matches <user_regexp> at any server that matches + <server_regexp>. Example: +
                                                                                                                                                                                                        +{acl, yohzik, {node_regexp, "^yohzik$", "^example.(com|org)$"}}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        {user_glob, <glob>}
                                                                                                                                                                                                        +
                                                                                                                                                                                                        {user_glob, <glob>, <server>}
                                                                                                                                                                                                        +
                                                                                                                                                                                                        {server_glob, <glob>}
                                                                                                                                                                                                        +
                                                                                                                                                                                                        {node_glob, <user_glob>, <server_glob>}
                                                                                                                                                                                                        This is the same as + above. However, it uses shell glob patterns instead of regexp. These patterns + can have the following special characters: +
                                                                                                                                                                                                        + *
                                                                                                                                                                                                        matches any string including the null string. +
                                                                                                                                                                                                        ?
                                                                                                                                                                                                        matches any single character. +
                                                                                                                                                                                                        [...]
                                                                                                                                                                                                        matches any of the enclosed characters. Character + ranges are specified by a pair of characters separated by a `-'. + If the first character after `[' is a `!', any + character not enclosed is matched. +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +The following ACLs are pre-defined: +
                                                                                                                                                                                                        +all
                                                                                                                                                                                                        Matches any JID. +
                                                                                                                                                                                                        none
                                                                                                                                                                                                        Matches no JID. +
                                                                                                                                                                                                        +An entry allowing or denying access to different services looks similar to +this: +
                                                                                                                                                                                                        +  {access, <accessname>, [{allow, <aclname>},
                                                                                                                                                                                                        +                          {deny, <aclname>},
                                                                                                                                                                                                        +                          ...
                                                                                                                                                                                                        +                         ]}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        When a JID is checked to have access to <accessname>, the server +sequentially checks if that JID mathes any of the ACLs that are named in the +second elements of the tuples in the list. If it matches, the first element of +the first matched tuple is returned, otherwise the value `deny' is +returned.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +Example: +
                                                                                                                                                                                                        +  {access, configure, [{allow, admin}]}.
                                                                                                                                                                                                        +  {access, something, [{deny, badmans},
                                                                                                                                                                                                        +                       {allow, all}]}.
                                                                                                                                                                                                         
                                                                                                                                                                                                        -pgsql is a keyword that should be kept as is. For example: +The following access rules are pre-defined: +
                                                                                                                                                                                                        +all
                                                                                                                                                                                                        Always returns the value `allow'. +
                                                                                                                                                                                                        none
                                                                                                                                                                                                        Always returns the value `deny'. +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        3.6  Shapers

                                                                                                                                                                                                        + + + +Shapers enable you to limit connection traffic. The syntax of +shapers is like this:
                                                                                                                                                                                                        -{odbc_server, {pgsql, "localhost", "database", "ejabberd", "password"}}.
                                                                                                                                                                                                        +  {shaper, <shapername>, <kind>}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Currently only one kind of shaper called maxrate is available. It has the +following syntax: +
                                                                                                                                                                                                        +  {maxrate, <rate>}
                                                                                                                                                                                                        +
                                                                                                                                                                                                        where <rate> stands for the maximum allowed incomig rate in bytes per +second.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +Examples: +
                                                                                                                                                                                                        • +To define a shaper named `normal' with traffic speed limited to +1,000 bytes/second: +
                                                                                                                                                                                                          +  {shaper, normal, {maxrate, 1000}}.
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • To define a shaper named `fast' with traffic speed limited to +50,000 bytes/second: +
                                                                                                                                                                                                          +  {shaper, fast, {maxrate, 50000}}.
                                                                                                                                                                                                          +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        3.7  Limiting Opened Sessions

                                                                                                                                                                                                        + + + +This option specifies the maximum number of sessions (authenticated +connections) per user. If a user tries to open more sessions by using different +resources, the first opened session will be disconnected. The error +session replaced will be sent to the disconnected session. The value +for this option can be either a number, or infinity. The default +value is 10.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +Examples: +
                                                                                                                                                                                                        • +To limit the number of sessions per user to 10 on all virtual +hosts: +
                                                                                                                                                                                                          +  {max\_user\_sessions, 10}.
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • This option can be defined per virtual host (see +section 3.2). In next example the number of +sessions per user on the first host is six, while there is no limit on the +second host: +
                                                                                                                                                                                                          +  {host_config, "example.net", [{max\_user\_sessions, 6}]}.
                                                                                                                                                                                                          +  {host_config, "example.com", [{max\_user\_sessions, infinity}]}.
                                                                                                                                                                                                          +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        3.8  Default Language

                                                                                                                                                                                                        + + + +The option language defines the default language of server strings that +can be seen by Jabber clients. If a Jabber client do not support +xml:lang, the specified language is used. The default value is +en. In order to take effect there must be a translation file +<language>.msg in ejabberd's msgs directory.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +Examples: +
                                                                                                                                                                                                        • +To set Russian as default language: +
                                                                                                                                                                                                          +  {language, "ru"}.
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • To set Spanish as default language: +
                                                                                                                                                                                                          +  {language, "es"}.
                                                                                                                                                                                                          +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4  Database Configuration

                                                                                                                                                                                                        + + + + +ejabberd uses its internal Mnesia database by default. However, it is +possible to use a relational database or an LDAP server to store persistant, +long-living data. ejabberd is very flexible: you can configure different +authentication methods for different virtual hosts, you can configure different +authentication mechanisms for the same virtual host (fallback), you can set +different storage systems for modules, and so forth.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +The following databases are supported by ejabberd: + +The following LDAP servers are tested with ejabberd: +
                                                                                                                                                                                                        • +Active Directory + (see section 4.5.3) +
                                                                                                                                                                                                        • OpenLDAP +
                                                                                                                                                                                                        • Normally any LDAP compatible server should work; inform us about your + success with a not-listed server so that we can list it here. +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4.1  MySQL

                                                                                                                                                                                                        + + + +Although this section will describe ejabberd's configuration when you want to +use the native MySQL driver, it does not describe MySQL's installation and +database creation. Check the MySQL documentation and the tutorial Using ejabberd with MySQL native driver for information regarding these topics. +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 can find information to update your database schema.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4.1.1  Driver Compilation

                                                                                                                                                                                                        + + + +You can skip this step if you installed ejabberd using a binary installer or +if the binary packages of ejabberd you are using include support for MySQL. +
                                                                                                                                                                                                        1. +First, install the 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. +
                                                                                                                                                                                                        2. 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: +
                                                                                                                                                                                                          +./configure --enable-odbc && make install
                                                                                                                                                                                                          +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4.1.2  Authentication

                                                                                                                                                                                                        + + + +The option value name may be misleading, as the auth_method name is used +for access to a relational database through ODBC, as well as through the native +MySQL interface. Anyway, the first configuration step is to define the odbc +auth_method. For example: +
                                                                                                                                                                                                        +{host_config, "public.example.org", [{auth_method, [odbc]}]}.
                                                                                                                                                                                                         
                                                                                                                                                                                                        -Note that you need to install the Erlang PgSQL library first. This library is -available from Sourceforge: http://cvs.sourceforge.net/viewcvs.py/jungerl/jungerl/lib/pgsql/
                                                                                                                                                                                                        +The actual database access is defined in the option odbc_server. Its +value is used to define if we want to use ODBC, or one of the two native +interface available, PostgreSQL or MySQL.

                                                                                                                                                                                                        -To use the native MySQL interface, the same tuple should be passed, except -that you now have to use the mysql keyword instead of the pgsql -keyword: +To use the native MySQL interface, you can pass a tuple of the following form as +parameter:
                                                                                                                                                                                                         {mysql, "Server", "Database", "Username", "Password"}
                                                                                                                                                                                                         
                                                                                                                                                                                                        @@ -1052,396 +1117,470 @@ keyword:
                                                                                                                                                                                                         {odbc_server, {mysql, "localhost", "test", "root", "password"}}.
                                                                                                                                                                                                         
                                                                                                                                                                                                        -Note that you need to install the Erlang MySQL library first. This library is -directly available from Process-one website: http://support.process-one.net/doc/display/CONTRIBS/Yxa
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4.1.3  Storage

                                                                                                                                                                                                        + + + +MySQL also can be used to store information into from several ejabberd +modules. See section 5.1 to see which modules have a version +with the `_odbc'. This suffix indicates that the module can be used with +relational databases like MySQL. To enable storage to your database, just make +sure that your database is running well (see previous sections), and replace the +suffix-less or ldap module variant with the odbc module variant. Keep in mind +that you cannot have several variants of the same module loaded!
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4.2  Microsoft SQL Server

                                                                                                                                                                                                        + + + +Although this section will describe ejabberd's configuration when you want to +use Microsoft SQL Server, it does not describe Microsoft SQL Server's +installation and database creation. Check the MySQL documentation and the +tutorial Using ejabberd with MySQL native driver for information regarding these topics. +Note that the tutorial contains information about ejabberd's configuration +which is duplicate to this section.

                                                                                                                                                                                                        -A detailled tutorial to set-up ejabberd using the native MySQL interface is -available from: http://support.process-one.net/doc/display/MESSENGER/Using+ejabberd+with+MySQL+native+driver
                                                                                                                                                                                                        +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 +of the file you can find information to update your database schema.

                                                                                                                                                                                                        - + -

                                                                                                                                                                                                        3.2.3  Relational database for other modules

                                                                                                                                                                                                        +

                                                                                                                                                                                                        4.2.1  Driver Compilation

                                                                                                                                                                                                        - -It is possible to use a relational database to store pieces of -information. You can do this by changing the module name to a name with an -_odbc suffix in ejabberd config file. You can use a relational -database for the following data: -
                                                                                                                                                                                                        • -Last connection date and time: Use mod_last_odbc instead of - mod_last. -
                                                                                                                                                                                                        • Offline messages: Use mod_offline_odbc instead of - mod_offline. -
                                                                                                                                                                                                        • Rosters: Use mod_roster_odbc instead of mod_roster. -
                                                                                                                                                                                                        • Users' VCARD: Use mod_vcard_odbc instead of mod_vcard. -
                                                                                                                                                                                                        - + + +You can skip this step if you installed ejabberd using a binary installer or +if the binary packages of ejabberd you are using include support for ODBC.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +If you want to use Microsoft SQL Server with ODBC, you need to configure, +compile and install ejabberd with support for ODBC and Microsoft SQL Server +enabled. This can be done, by using next commands: +
                                                                                                                                                                                                        +./configure --enable-odbc --enable-mssql && make install
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + -

                                                                                                                                                                                                        3.3  Creating an Initial Administrator

                                                                                                                                                                                                        +

                                                                                                                                                                                                        4.2.2  Authentication

                                                                                                                                                                                                        - -Before the web interface can be entered to perform administration tasks, an -account with administrator rights is needed on your ejabberd deployment.
                                                                                                                                                                                                        + + +The configuration of Microsoft SQL Server is the same as the configuration of +ODBC compatible serers (see section 4.4.2).

                                                                                                                                                                                                        -Instructions to create an initial administrator account: + + +

                                                                                                                                                                                                        4.2.3  Storage

                                                                                                                                                                                                        + + + +Microsoft SQL Server also can be used to store information into from several +ejabberd modules. See section 5.1 to see which modules have +a version with the `_odbc'. This suffix indicates that the module can be used +with relational databases like Microsoft SQL Server. To enable storage to your +database, just make sure that your database is running well (see previous +sections), and replace the suffix-less or ldap module variant with the odbc +module variant. Keep in mind that you cannot have several variants of the same +module loaded!
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4.3  PostgreSQL

                                                                                                                                                                                                        + + + +Although this section will describe ejabberd's configuration when you want to +use the native PostgreSQL driver, it does not describe PostgreSQL's installation +and database creation. Check the PostgreSQL documentation and the tutorial Using ejabberd with MySQL native driver for information regarding these topics. +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 +you can find information to update your database schema.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4.3.1  Driver Compilation

                                                                                                                                                                                                        + + + +You can skip this step if you installed ejabberd using a binary installer or +if the binary packages of ejabberd you are using include support for +PostgreSQL.
                                                                                                                                                                                                        1. -Register an account on your ejabberd deployment. An account can be - created in two ways: -
                                                                                                                                                                                                          1. - Using the tool ejabberdctl (see - section 3.4.2): -
                                                                                                                                                                                                            -% ejabberdctl node@host register admin example.org password
                                                                                                                                                                                                            -
                                                                                                                                                                                                          2. Using In-Band Registration (see section A.14): you can - use a Jabber client to register an account. -
                                                                                                                                                                                                          -
                                                                                                                                                                                                        2. Edit the configuration file to promote the account created in the previous - step to an account with administrator rights. Note that if you want to add - more administrators, a seperate acl entry is needed for each administrator. +First, install the Erlang PgSQL library from + Jungerl. 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. +
                                                                                                                                                                                                        3. 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:
                                                                                                                                                                                                          -  {acl, admins, {user, "admin", "example.org"}}.
                                                                                                                                                                                                          -  {access, configure, [{allow, admins}]}.
                                                                                                                                                                                                          -
                                                                                                                                                                                                        4. Restart ejabberd to load the new configuration. -
                                                                                                                                                                                                        5. Open the web interface (http://server:port/admin/) in your - favourite browser. Make sure to enter the full JID as username (in this - example: admin@example.org. The reason that you also need to enter the - suffix, is because ejabberd's virtual hosting support. -
                                                                                                                                                                                                        - +./configure --enable-odbc && make install + + -

                                                                                                                                                                                                        3.4  Online Configuration and Monitoring

                                                                                                                                                                                                        +

                                                                                                                                                                                                        4.3.2  Authentication

                                                                                                                                                                                                        - - + -

                                                                                                                                                                                                        3.4.1  Web Interface

                                                                                                                                                                                                        +The option value name may be misleading, as the auth_method name is used +for access to a relational database through ODBC, as well as through the native +PostgreSQL interface. Anyway, the first configuration step is to define the odbc +auth_method. For example: +
                                                                                                                                                                                                        +{host_config, "public.example.org", [{auth_method, [odbc]}]}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +The actual database access is defined in the option odbc_server. Its +value is used to define if we want to use ODBC, or one of the two native +interface available, PostgreSQL or MySQL.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +To use the native PostgreSQL interface, you can pass a tuple of the following +form as parameter: +
                                                                                                                                                                                                        +{pgsql, "Server", "Database", "Username", "Password"}
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +pgsql is a keyword that should be kept as is. For example: +
                                                                                                                                                                                                        +{odbc_server, {pgsql, "localhost", "database", "ejabberd", "password"}}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + - +

                                                                                                                                                                                                        4.3.3  Storage

                                                                                                                                                                                                        -To perform online configuration of ejabberd you need to enable the -ejabberd_http listener with the option web_admin (see -section 3.1.6). Then you can open -http://server:port/admin/ in your favourite web browser. You -will be asked to enter the username (the full Jabber ID) and password -of an ejabberd user with administrator rights. After authentication -you will see a page similar to figure 1. -

                                                                                                                                                                                                        - - - + -
                                                                                                                                                                                                        +PostgreSQL also can be used to store information into from several ejabberd +modules. See section 5.1 to see which modules have a version +with the `_odbc'. This suffix indicates that the module can be used with +relational databases like PostgreSQL. To enable storage to your database, just +make sure that your database is running well (see previous sections), and +replace the suffix-less or ldap module variant with the odbc module variant. +Keep in mind that you cannot have several variants of the same module loaded!

                                                                                                                                                                                                        -
                                                                                                                                                                                                        Figure 1: Top page from the web interface

                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4.4  ODBC Compatible

                                                                                                                                                                                                        + + + +Although this section will describe ejabberd's configuration when you want to +use the ODBC driver, it does not describe the installation and database creation +of your database. Check the documentation of your database. The tutorial Using ejabberd with MySQL native driver also can help you. Note that the tutorial +contains information about ejabberd's configuration which is duplicate to +this section.

                                                                                                                                                                                                        + - -

                                                                                                                                                                                                        -Here you can edit access restrictions, manage users, create backups, -manage the database, enable/disable ports listened for, view server -statistics,...
                                                                                                                                                                                                        +

                                                                                                                                                                                                        4.4.1  Compilation

                                                                                                                                                                                                        + + +You can skip this step if you installed ejabberd using a binary installer or +if the binary packages of ejabberd you are using include support for +ODBC. +
                                                                                                                                                                                                        1. +First, install the 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. +
                                                                                                                                                                                                        2. Then, configure, compile and install ejabberd with ODBC support + enabled. This can be done, by using next commands: +
                                                                                                                                                                                                          +./configure --enable-odbc && make install
                                                                                                                                                                                                          +
                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        4.4.2  Authentication

                                                                                                                                                                                                        + + + +The first configuration step is to define the odbc auth_method. For +example: +
                                                                                                                                                                                                        +{host_config, "public.example.org", [{auth_method, [odbc]}]}.
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +The actual database access is defined in the option odbc_server. Its +value is used to defined if we want to use ODBC, or one of the two native +interface available, PostgreSQL or MySQL.

                                                                                                                                                                                                        -Examples: -
                                                                                                                                                                                                        • -You can serve the web interface on the same port as the - HTTP Polling interface. In this example - you should point your web browser to http://example.org:5280/admin/ to - administer all virtual hosts or to - http://example.org:5280/admin/server/example.com/ to administer only - the virtual host example.com. Before you get access to the web interface - 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 “admin@example.net” to administer all virtual hosts (first - URL). If you log in with “admin@example.com” on
                                                                                                                                                                                                          -http://example.org:5280/admin/server/example.com/ you can only - administer the virtual host example.com. -
                                                                                                                                                                                                          -  ...
                                                                                                                                                                                                          -  {acl, admins, {user, "admin", "example.net"}}.
                                                                                                                                                                                                          -  {host_config, "example.com", [{acl, admins, {user, "admin", "example.com"}}]}.
                                                                                                                                                                                                          -  {access, configure, [{allow, admins}]}.
                                                                                                                                                                                                          -  ...
                                                                                                                                                                                                          -  {hosts, ["example.org"]}.
                                                                                                                                                                                                          -  ...
                                                                                                                                                                                                          -  {listen,
                                                                                                                                                                                                          -   [...
                                                                                                                                                                                                          -    {5280, ejabberd_http, [http_poll, web_admin]},
                                                                                                                                                                                                          -    ...
                                                                                                                                                                                                          -   ]
                                                                                                                                                                                                          -  }.
                                                                                                                                                                                                          -
                                                                                                                                                                                                        • For security reasons, you can serve the web interface 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 - web browser to https://192.168.1.1:5280/admin/: -
                                                                                                                                                                                                          -  ...
                                                                                                                                                                                                          -  {hosts, ["example.org"]}.
                                                                                                                                                                                                          -  ...
                                                                                                                                                                                                          -  {listen,
                                                                                                                                                                                                          -   [...
                                                                                                                                                                                                          -    {5270, ejabberd_http,    [http_poll]},
                                                                                                                                                                                                          -    {5280, ejabberd_http,    [web_admin, {ip, {192, 168, 1, 1}},
                                                                                                                                                                                                          -                              tls, {certfile, "/usr/local/etc/server.pem"}]},
                                                                                                                                                                                                          -    ...
                                                                                                                                                                                                          -   ]
                                                                                                                                                                                                          -  }.
                                                                                                                                                                                                          -
                                                                                                                                                                                                        - - -

                                                                                                                                                                                                        3.4.2  ejabberdctl

                                                                                                                                                                                                        - - -It is possible to do some administration operations using the command -line tool ejabberdctl. You can list all available options by -running ejabberdctl without arguments: +To use a relational database through ODBC, you can pass the ODBC connection +string as odbc_server parameter. For example:
                                                                                                                                                                                                        -% ejabberdctl
                                                                                                                                                                                                        -Usage: ejabberdctl node command
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -Available commands:
                                                                                                                                                                                                        -  status                        get ejabberd status
                                                                                                                                                                                                        -  stop                          stop ejabberd
                                                                                                                                                                                                        -  restart                       restart ejabberd
                                                                                                                                                                                                        -  reopen-log                    reopen log file
                                                                                                                                                                                                        -  register user server password register a user
                                                                                                                                                                                                        -  unregister user server        unregister a user
                                                                                                                                                                                                        -  backup file                   store a database backup to file
                                                                                                                                                                                                        -  restore file                  restore a database backup from file
                                                                                                                                                                                                        -  install-fallback file         install a database fallback from file
                                                                                                                                                                                                        -  dump file                     dump a database to a text file
                                                                                                                                                                                                        -  load file                     restore a database from a text file
                                                                                                                                                                                                        -  import-file file              import user data from jabberd 1.4 spool file
                                                                                                                                                                                                        -  import-dir dir                import user data from jabberd 1.4 spool directory
                                                                                                                                                                                                        -  registered-users              list all registered users
                                                                                                                                                                                                        -  delete-expired-messages       delete expired offline messages from database
                                                                                                                                                                                                        -
                                                                                                                                                                                                        -Example:
                                                                                                                                                                                                        -  ejabberdctl ejabberd@host restart
                                                                                                                                                                                                        +{odbc_server, "DSN=database;UID=ejabberd;PWD=password"}.
                                                                                                                                                                                                         
                                                                                                                                                                                                        -Additional information: -
                                                                                                                                                                                                        -reopen-log
                                                                                                                                                                                                        If you use a tool to rotate logs, you have to configure it - so that this command is executed after each rotation. -
                                                                                                                                                                                                        backup, restore, install-fallback, dump, load
                                                                                                                                                                                                        You can use these - commands to create and restore backups. -
                                                                                                                                                                                                        import-file, import-dir
                                                                                                                                                                                                        - These options can be used to migrate from other Jabber/XMPP servers. There - exist tutorials to migrate from jabberd 1.4 - and to migrate from jabberd2. -
                                                                                                                                                                                                        delete-expired-messages
                                                                                                                                                                                                        This option can be used to delete old messages - in offline storage. This might be useful when the number of offline messages - is very high. -
                                                                                                                                                                                                        - - -

                                                                                                                                                                                                        4  Firewall Settings

                                                                                                                                                                                                        - - - -You need to take the following TCP ports in mind when configuring your firewall: -

                                                                                                                                                                                                        -
                                                                                                                                                                                                    • -

                                                                                                                                                                                                      Ejabberd 1.1.1 Installation and Operation Guide

                                                                                                                                                                                                      +

                                                                                                                                                                                                      Ejabberd 1.1.2 Installation and Operation Guide

                                                                                                                                                                                                      Alexey Shchepin
                                                                                                                                                                                                      mailto:alexey@sevcom.net
                                                                                                                                                                                                      xmpp:aleksey@jabber.ru

                                                                                                                                                                                                      - - - - - - - - - - - - - - - - - -
                                                                                                                                                                                                      PortDescription
                                                                                                                                                                                                      5222SASL and unencrypted c2s connections.
                                                                                                                                                                                                      5223Obsolete SSL c2s connections.
                                                                                                                                                                                                      5269s2s connections.
                                                                                                                                                                                                      4369Only for clustering (see 6).
                                                                                                                                                                                                      port rangeOnly for clustring (see 6). This range - is configurable (see 2.4).
                                                                                                                                                                                                      -

    - - -

    5  SRV Records

    - - - - - - -

    6  Clustering

    - - + - - -

    6.1  How it Works

    +

    4.4.3  Storage

    - + -A Jabber domain is served by one or more ejabberd nodes. These nodes can -be run on different machines that are connected via a network. They all -must have the ability to connect to port 4369 of all another nodes, and must -have the same magic cookie (see Erlang/OTP documentation, in other words the -file ~ejabberd/.erlang.cookie must be the same on all nodes). This is -needed because all nodes exchange information about connected users, s2s -connections, registered services, etc...
    +An ODBC compatible database also can be used to store information into from +several ejabberd modules. See section 5.1 to see which +modules have a version with the `_odbc'. This suffix indicates that the module +can be used with ODBC compatible relational databases. To enable storage to your +database, just make sure that your database is running well (see previous +sections), and replace the suffix-less or ldap module variant with the odbc +module variant. Keep in mind that you cannot have several variants of the same +module loaded!

    -Each ejabberd node has the following modules: -
    • -router, -
    • local router, -
    • session manager, -
    • s2s manager. -
    - + -

    6.1.1  Router

    +

    4.5  LDAP

    + -This module is the main router of Jabber packets on each node. It -routes them based on their destination's domains. It uses a global -routing table. The domain of the packet's destination is searched in the -routing table, and if it is found, the packet is routed to the -appropriate process. If not, it is sent to the s2s manager.
    +ejabberd has built-in LDAP support. You can authenticate users against LDAP +server and use LDAP directory as vCard storage. Shared rosters are not supported +yet.

    - - -

    6.1.2  Local Router

    + +

    4.5.1  Connection

    -This module routes packets which have a destination domain equal to -one of this server's host names. If the destination JID has a non-empty user -part, it is routed to the session manager, otherwise it is processed depending -on its content.
    + +Parameters: +
    +ldap_server
    IP address or dns name of your +LDAP server. This option is required. +
    ldap_port
    Port to connect to your LDAP server. + The default value is 389. +
    ldap_rootdn
    Bind DN. The default value + is "" which means `anonymous connection'. +
    ldap_password
    Bind password. The default + value is "". +
    +Example: +
    +  {auth_method, ldap}.
    +  {ldap_servers, ["ldap.example.org"]}.
    +  {ldap_port, 389}.
    +  {ldap_rootdn, "cn=Manager,dc=domain,dc=org"}.
    +  {ldap_password, "secret"}.
    +
    +Note that current LDAP implementation does not support SSL secured communication +and SASL authentication.

    - + -

    6.1.3  Session Manager

    +

    4.5.2  Authentication

    + +You can authenticate users against an LDAP directory. Available options are: +
    +ldap_base
    LDAP base directory which stores users + accounts. This option is required. +
    ldap_uidattr
    LDAP attribute which holds + the user's part of a JID. The default value is "uid". +
    ldap_uidattr_format
    Format of the + ldap_uidattr variable. The format must contain one and only one + pattern variable "%u" which will be replaced by the user's part of a + JID. For example, "%u@example.org". The default value is "%u". +
    ldap_filter
    + RFC 2254 LDAP filter. The + default is none. Example: + "(&(objectClass=shadowAccount)(memberOf=Jabber Users))". Please, do + not forget to close brackets and do not use superfluous whitespaces. Also you + must not use ldap_uidattr attribute in filter because this + attribute will be substituted in LDAP filter automatically. +
    + -This module routes packets to local users. It looks up to which user -resource a packet must be sent via a presence table. Then the packet is -either routed to the appropriate c2s process, or stored in offline -storage, or bounced back.
    -
    - +

    4.5.3  Examples

    -

    6.1.4  s2s Manager

    + + +
    Common example
    -This module routes packets to other Jabber servers. First, it -checks if an opened s2s connection from the domain of the packet's -source to the domain of the packet's destination exists. If that is the case, -the s2s manager routes the packet to the process -serving this connection, otherwise a new connection is opened.
    +Let's say ldap.example.org is the name of our LDAP server. We have +users with their passwords in "ou=Users,dc=example,dc=org" directory. +Also we have addressbook, which contains users emails and their additional +infos in "ou=AddressBook,dc=example,dc=org" directory. Corresponding +authentication section should looks like this: +
    +  %% authentication method
    +  {auth_method, ldap}.
    +  %% DNS name of our LDAP server
    +  {ldap_servers, ["ldap.example.org"]}.
    +  %% Bind to LDAP server as "cn=Manager,dc=example,dc=org" with password "secret"
    +  {ldap_rootdn, "cn=Manager,dc=example,dc=org"}.
    +  {ldap_password, "secret"}.
    +  %% define the user's base
    +  {ldap_base, "ou=Users,dc=example,dc=org"}.
    +  %% We want to authorize users from 'shadowAccount' object class only
    +  {ldap_filter, "(objectClass=shadowAccount)"}.
    +
    +Now we want to use users LDAP-info as their vCards. We have four attributes +defined in our LDAP schema: "mail" — email address, "givenName" +— first name, "sn" — second name, "birthDay" — birthday. +Also we want users to search each other. Let's see how we can set it up: +
    +  {modules,
    +    ...
    +    {mod_vcard_ldap,
    +     [
    +      %% We use the same server and port, but want to bind anonymously because
    +      %% our LDAP server accepts anonymous requests to
    +      %% "ou=AddressBook,dc=example,dc=org" subtree.
    +      {ldap_rootdn, ""},
    +      {ldap_password, ""},
    +      %% define the addressbook's base
    +      {ldap_base, "ou=AddressBook,dc=example,dc=org"},
    +      %% user's part of JID is located in the "mail" attribute
    +      {ldap_uidattr, "mail"},
    +      %% common format for our emails
    +      {ldap_uidattr_format, "%u@mail.example.org"},
    +      %% We have to define empty filter here, because entries in addressbook does not
    +      %% belong to shadowAccount object class
    +      {ldap_filter, ""},
    +      %% Now we want to define vCard pattern
    +      {ldap_vcard_map,
    +       [{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname
    +        {"GIVEN", "%s", ["givenName"]},
    +        {"FAMILY", "%s", ["sn"]},
    +        {"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John"
    +        {"EMAIL", "%s", ["mail"]},
    +        {"BDAY", "%s", ["birthDay"]}]},
    +      %% Search form
    +      {ldap_search_fields,
    +       [{"User", "%u"},
    +        {"Name", "givenName"},
    +        {"Family Name", "sn"},
    +        {"Email", "mail"},
    +        {"Birthday", "birthDay"}]},
    +      %% vCard fields to be reported
    +      %% Note that JID is always returned with search results
    +      {ldap_search_reported,
    +       [{"Full Name", "FN"},
    +        {"Nickname", "NICKNAME"},
    +        {"Birthday", "BDAY"}]}
    +    ]}
    +    ...
    +  }.
    +
    +Note that mod_vcard_ldap module checks for the existence of the user before +searching in his information in LDAP.

    - + -

    6.2  Clustering Setup

    +
    Active Directory
    - + -Suppose you already configured ejabberd on one machine named (first), -and you need to setup another one to make an ejabberd cluster. Then do -following steps: -
    1. -Copy ~ejabberd/.erlang.cookie file from first to - second.
      -
      -(alt) You can also add “-cookie content_of_.erlang.cookie” - option to all “erl” commands below.
      -
      -
    2. On second run as the `ejabberd' user in the directory - where ejabberd will work later the following command: +Active Directory is just an LDAP-server with predefined attributes. A sample +configuration is showed below:
      -erl -sname ejabberd \
      -    -mnesia extra_db_nodes "['ejabberd@first']" \
      -    -s mnesia
      -
      - This will start Mnesia serving the same database as ejabberd@first. - You can check this by running the command “mnesia:info().”. You - should see a lot of remote tables and a line like the following: -
      -running db nodes   = [ejabberd@first, ejabberd@second]
      -

      -
      -
    3. Now run the following in the same “erl” session: -
      -mnesia:change_table_copy_type(schema, node(), disc_copies).
      +  {auth_method, ldap}.
      +  {ldap_servers, ["office.org"]}.    % List of LDAP servers
      +  {ldap_base, "DC=office,DC=org"}. % Search base of LDAP directory
      +  {ldap_rootdn, "CN=Administrator,CN=Users,DC=office,DC=org"}. % LDAP manager
      +  {ldap_password, "*******"}. % Password to LDAP manager
      +  {ldap_uidattr, "sAMAccountName"}.
      +  {ldap_filter, "(memberOf=*)"}.
      +  
      +  {mod_vcard_ldap,
      +   [{ldap_vcard_map,
      +     [{"NICKNAME", "%u", []},
      +      {"GIVEN", "%s", ["givenName"]},
      +      {"MIDDLE", "%s", ["initials"]},
      +      {"FAMILY", "%s", ["sn"]},
      +      {"FN", "%s", ["displayName"]},
      +      {"EMAIL", "%s", ["mail"]},
      +      {"ORGNAME", "%s", ["company"]},
      +      {"ORGUNIT", "%s", ["department"]},
      +      {"CTRY", "%s", ["c"]},
      +      {"LOCALITY", "%s", ["l"]},
      +      {"STREET", "%s", ["streetAddress"]},
      +      {"REGION", "%s", ["st"]},
      +      {"PCODE", "%s", ["postalCode"]},
      +      {"TITLE", "%s", ["title"]},
      +      {"URL", "%s", ["wWWHomePage"]},
      +      {"DESC", "%s", ["description"]},
      +      {"TEL", "%s", ["telephoneNumber"]}]},
      +    {ldap_search_fields,
      +     [{"User", "%u"},
      +      {"Name", "givenName"},
      +      {"Family Name", "sn"},
      +      {"Email", "mail"},
      +      {"Company", "company"},
      +      {"Department", "department"},
      +      {"Role", "title"},
      +      {"Description", "description"},
      +      {"Phone", "telephoneNumber"}]},
      +    {ldap_search_reported,
      +     [{"Full Name", "FN"},
      +      {"Nickname", "NICKNAME"},
      +      {"Email", "EMAIL"}]}
      +   ]
      +  }.
       
      - This will create local disc storage for the database.
      -
      -(alt) Change storage type of `scheme' table to “RAM and disc - copy” on the second node via the web interface.
      -
      -
    4. Now you can add replicas of various tables to this node with - “mnesia:add_table_copy” or - “mnesia:change_table_copy_type” as above (just replace - “schema” with another table name and “disc_copies” - can be replaced with “ram_copies” or - “disc_only_copies”).
      -
      -Which tables to replicate is very dependant on your needs, you can get - some hints from the command “mnesia:info().”, by looking at the - size of tables and the default storage type for each table on 'first'.
      -
      -Replicating a table makes lookups in this table faster on this node. - Writing, on the other hand, will be slower. And of course if machine with one - of the replicas is down, other replicas will be used.
      -
      -Also section 5.3 (Table Fragmentation) of Mnesia User's Guide can be helpful. -
      -
      - (alt) Same as in previous item, but for other tables.
      -
      -
    5. Run “init:stop().” or just “q().” to exit from - the Erlang shell. This probably can take some time if Mnesia has not yet - transfered and processed all data it needed from first.
      -
      -
    6. Now run ejabberd on second with almost the same config as - on first (you probably don't need to duplicate “acl” - and “access” options — they will be taken from - first, and mod_muc and mod_irc should be - enabled only on one machine in the cluster). -
    -You can repeat these steps for other machines supposed to serve this -domain.
    -
    - - + -

    A  Built-in Modules

    +

    5  Modules Configuration

    +The option modules defines the list of modules that will be loaded after +ejabberd's startup. Each entry in the list is a tuple in which the first +element is the name of a module and the second is a list of options for that +module.
    +
    +Examples: +
    • +In this example only the module mod_echo is loaded and no module + options are specified between the square brackets: +
      +  {modules,
      +   [{mod_echo,      []}
      +   ]}.
      +
    • In the second example the modules mod_echo, mod_time, and + mod_version are loaded without options. Remark that, besides the last entry, + all entries end with a comma: +
      +  {modules,
      +   [{mod_echo,      []},
      +    {mod_time,      []},
      +    {mod_version,   []}
      +   ]}.
      +
    -

    A.1  Overview

    +

    5.1  Overview

    The following table lists all modules available in the official ejabberd distribution. You can find more contributed modules on the -ejabberd website. Please remember that these contributions might not work or +ejabberd website. Please remember that these contributions might not work or that they can contain severe bugs and security leaks. Therefore, use them at your own risk!

    You can see which database backend each module needs by looking at the suffix:
    • -“_ldap”, this means that the module needs an LDAP server as backend. -
    • “_odbc”, this means that the module needs an ODBC compatible database, - a MySQL database, or a PostgreSQL database as backend. -
    • Nothing, this means that the modules uses Erlang's built-in database +`_ldap', this means that the module needs an LDAP server as backend. +
    • `_odbc', this means that the module needs a supported database + (see 4) as backend. +
    • No suffix, this means that the modules uses Erlang's built-in database Mnesia as backend.
    +If you want to +It is possible to use a relational database to store pieces of +information. You can do this by changing the module name to a name with an +_odbc suffix in ejabberd config file. You can use a relational +database for the following data: +
    • +Last connection date and time: Use mod_last_odbc instead of + mod_last. +
    • Offline messages: Use mod_offline_odbc instead of + mod_offline. +
    • Rosters: Use mod_roster_odbc instead of mod_roster. +
    • Users' VCARD: Use mod_vcard_odbc instead of mod_vcard. +

    @@ -1465,7 +1604,7 @@ You can see which database backend each module needs by looking at the suffix: - + @@ -1491,19 +1630,9 @@ You can see which database backend each module needs by looking at the suffix: - + - - - - - - - - - - @@ -1521,19 +1650,9 @@ You can see which database backend each module needs by looking at the suffix: - + - - - - - - - - - - @@ -1557,22 +1676,12 @@ You can see which database backend each module needs by looking at the suffix: - + - - - - - - - - - - - - + + @@ -1611,39 +1720,31 @@ You can see which database backend each module needs by looking at the suffix: - + - - - - - - - - - -
    ModuleNo
     configuration of ejabberdconfiguration of ejabberd    
    mod_last_odbc Last Activity (JEP-0012)ODBC compatiblesupported database (*) No
      database, MySQL 
      or PostgreSQL 
    mod_muc Multi-User Chat (JEP-0045)  
    mod_offline_odbc Offline message storageODBC compatiblesupported database (*) No
      database, MySQL 
      or PostgreSQL 
    mod_privacy Blocking Communication  
    mod_roster Roster management  Yes (*)Yes (**)
    mod_roster_odbc Roster managementODBC compatibleYes (*)
      database, MySQL 
      or PostgreSQL supported database (*)Yes (**)
    mod_service_log Copy user messages to logger service
    mod_vcard_odbc vcard-temp (JEP-0054)ODBC compatiblesupported database (*) No
      database, MySQL 
      or PostgreSQL 
    mod_version Software Version (JEP-0092)   No

    -(*) This module or a similar one with another database backend is needed for -XMPP compliancy.
    -
    +
    • +(*) For a list of supported databases, see section 4. +
    • (**) This module or a similar one with another database backend is needed for +XMPP compliancy. +
    -

    A.2  Common Options

    +

    5.2  Common Options

    - + The following options are used by many modules. Therefore, they are described in this separate section.

    -

    A.2.1  iqdisc

    +

    5.2.1  iqdisc

    @@ -1677,7 +1778,7 @@ Example:
    -

    A.2.2  hosts

    +

    5.2.2  hosts

    @@ -1695,7 +1796,7 @@ Serving the echo module on one domain: {mod_echo, [{hosts, ["echo.example.org"]}]}, ... ]}. -
  • Backwards compatibility with older ejabberd versions can be retained +
  • Backwards compatibility with older ejabberd versions can be retained with:
       {modules,
    @@ -1716,7 +1817,7 @@ Serving the echo module on one domain:
     
-

A.3  mod_announce

+

5.3  mod_announce

@@ -1732,7 +1833,7 @@ hosts: to several resources, only the resource with the highest priority will receive the message. If the registered user is not connected, the message will be stored offline in assumption that offline storage - (see section A.10) is enabled. + (see section 5.10) is enabled.
example.org/announce/online (example.org/announce/all-hosts/online)
The message is sent to all connected users. If the user is online and connected to several resources, all resources will receive the message. @@ -1782,7 +1883,7 @@ Only administrators can send announcements: -

A.4  mod_disco

+

5.4  mod_disco

@@ -1799,7 +1900,7 @@ Options: iqdisc
This specifies the processing discipline for Service Discovery (http://jabber.org/protocol/disco#items and http://jabber.org/protocol/disco#info) IQ queries -(see section A.2.1). +(see section 5.2.1).
extra_domains
With this option, extra domains can be added to the Service Discovery item list. @@ -1834,7 +1935,7 @@ To serve a link to the Jabber User Directory on jabber.org: -

A.5  mod_echo

+

5.5  mod_echo

@@ -1846,8 +1947,8 @@ Options:
hosts
This option defines the hostnames of the - service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “echo.” is added to all + service (see section 5.2.2). If neither hosts nor + the old host is present, the prefix `echo.' is added to all ejabberd hostnames.
@@ -1863,11 +1964,11 @@ Mirror, mirror, on the wall, who is the most beautiful ... ]}.
  • If you still do not understand the inner workings of mod_echo, - you can find a few more examples in section A.2.2. + you can find a few more examples in section 5.2.2. -

    A.6  mod_irc

    +

    5.6  mod_irc

    @@ -1877,16 +1978,16 @@ servers.
    End user information:
    • -A Jabber client with “groupchat 1.0” support or Multi-User +A Jabber client with `groupchat 1.0' support or Multi-User Chat support (JEP-0045) is necessary to join IRC channels.
    • An IRC channel can be joined in nearly the same way as joining a Jabber Multi-User Chat room. The difference is that the room name will - be “channel%irc.example.org” in case irc.example.org is - the IRC server hosting “channel”. And of course the host should point + be `channel%irc.example.org' in case irc.example.org is + the IRC server hosting `channel'. And of course the host should point to the IRC transport instead of the Multi-User Chat service. -
    • You can register your nickame by sending “IDENTIFY password” to
      +
    • You can register your nickame by sending `IDENTIFY password' to
      nickserver!irc.example.org@irc.jabberserver.org. -
    • Entering your password is possible by sending “LOGIN nick password”
      +
    • Entering your password is possible by sending `LOGIN nick password'
      to nickserver!irc.example.org@irc.jabberserver.org.
    • When using a popular Jabber server, it can occur that no connection can be achieved with some IRC servers because they limit the @@ -1896,8 +1997,8 @@ Options:
      hosts
      This option defines the hostnames of the - service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “irc.” is added to all + service (see section 5.2.2). If neither hosts nor + the old host is present, the prefix `irc.' is added to all ejabberd hostnames.
      access
      This option can be used to specify who @@ -1906,7 +2007,7 @@ Options: Examples:
      • In the first example, the IRC transport is available on (all) your - virtual host(s) with the prefix “irc.”. Furthermore, anyone is + virtual host(s) with the prefix `irc.'. Furthermore, anyone is able to use the transport.
           {modules,
        @@ -1937,7 +2038,7 @@ In the first example, the IRC transport is available on (all) your
         
      -

      A.7  mod_last

      +

      5.7  mod_last

      @@ -1950,11 +2051,11 @@ Options:
      iqdisc
      This specifies the processing discipline for Last activity (jabber:iq:last) IQ queries -(see section A.2.1). +(see section 5.2.1).
      -

      A.8  mod_muc

      +

      5.8  mod_muc

      @@ -1974,8 +2075,8 @@ Options:
      hosts
      This option defines the hostnames of the - service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “conference.” is added to all + service (see section 5.2.2). If neither hosts nor + the old host is present, the prefix `conference.' is added to all ejabberd hostnames.
      access
      You can specify who is allowed to use @@ -1988,14 +2089,14 @@ Options: value is none, which means that only the room creator can administer his room). By sending a message to the service JID, administrators can send service messages that will be displayed in every - active room.
      -
      -
      history_size
      a small history of the - current discussion is send to users when they enter the room. This option make - it possible to define the number of history messages to keep and send to the - user joining the room. The value is a integer. Setting the value to 0 - disable the history feature and nothing is kept in memory. The default value - is 20. This value is global and affects all MUC rooms on the server. + active room. +
      history_size
      A small history of the + current discussion is sent to users when they enter the room. With this option + you can define the number of history messages to keep and send to users + joining the room. The value is an integer. Setting the value to 0 + disables the history feature and, as a result, nothing is kept in memory. The + default value is 20. This value is global and thus affects all rooms on + the server.
      Examples:
      • @@ -2003,9 +2104,9 @@ In the first example everyone is allowed to use the Multi-User Chat service. Everyone will also be able to create new rooms but only the user admin@example.org is allowed to administrate any room. In this example he is also a global administrator. When admin@example.org - sends a message such as “Tomorrow, the Jabber server will be moved + sends a message such as `Tomorrow, the Jabber server will be moved to new hardware. This will involve service breakdowns around 23:00 UMT. - We apologise for this inconvenience.” to conference.example.org, + We apologise for this inconvenience.' to conference.example.org, it will be displayed in all active rooms. In this example the history feature is disabled.
        @@ -2026,9 +2127,9 @@ In the first example everyone is allowed to use the Multi-User Chat
          paying customers registered on our domains and on other servers. Of course
          the administrator is also allowed to access rooms. In addition, he is the
          only authority able to create and administer rooms. When
        - admin@example.org sends a message such as “Tomorrow, the Jabber
        + admin@example.org sends a message such as `Tomorrow, the Jabber
          server will be moved to new hardware. This will involve service breakdowns
        - around 23:00 UMT. We apologise for this inconvenience.” to
        + around 23:00 UMT. We apologise for this inconvenience.' to
          conference.example.org, it will be displayed in all active rooms. No
          history_size option is used, this means that the feature is enabled
          and the default value of 20 history messages will be send to the users.
        @@ -2055,62 +2156,77 @@ In the first example everyone is allowed to use the Multi-User Chat
         
      -

      A.9  mod_muc_log

      +

      5.9  mod_muc_log

      -This module enables optional logging of Multi-User Chat conversations to HTML. -Once you enable this module, join a chatroom with enought privileges using a MUC capable Jabber client, -request the configuration form and there you will have an option to enable chatroom logging.
      +This module enables optional logging of Multi-User Chat (MUC) conversations to +HTML. Once you enable this module, users can join a chatroom using a MUC capable +Jabber client, and if they have enough privileges, they can request the +configuration form in which they can set the option to enable chatroom logging.

      -Some of the features of generated logs: +Features:
      • -A lot of information about chatroom is added on top of the page: Room title, JID, subject author, subject and configuration. -
      • Room title and JID are links to join the chatroom (using XMPP-IRI). +Chatroom details are added on top of each page: room title, JID, + author, subject and configuration. +
      • + Room title and JID are links to join the chatroom (using + XMPP URIs).
      • Subject and chatroom configuration changes are tracked and displayed. -
      • Joins, leaves, nick changes, kicks, bans and /me are tracked and displayed, including the reason when available. +
      • Joins, leaves, nick changes, kicks, bans and `/me' are tracked and + displayed, including the reason if available.
      • Generated HTML files are XHTML 1.0 Transitional and CSS compliant.
      • Timestamps are self-referencing links.
      • Links on top for quicker navigation: Previous day, Next day, Up.
      • CSS is used for style definition, and a custom CSS file can be used.
      • URLs on messages and subjects are converted to hyperlinks.
      • Timezone used on timestamps is shown on the log files. -
      • A custom link can be added on top of page. +
      • A custom link can be added on top of each page.
      Options:
      access_log
      - Restricts which users are allowed to enable or disable chatroom logging using ACL and ACCESS. - Default: muc_admin. - If you want to allow any chatroom owner put: muc. + This option restricts which users are allowed to enable or disable chatroom + logging. The default value is muc_admin. Note for this default setting + you need to have an access rule for muc_admin in order to take effect.
      cssfile
      - If HTMLs will use a custom CSS file or the embedded one. - Allowed values: - false: HTMLs will include the standard CSS code; - "CSS-URL": the URL of the CSS file (for example: "http://example.com/my.css"). - Default: false. + With this option you can set whether the HTML files should have a custom CSS + file or if they need to use the embedded CSS file. Allowed values are + false and an URL to a CSS file. With the first value, HTML files will + include the embedded CSS code. With the latter, you can specify the URL of the + custom CSS file (for example: `http://example.com/my.css'). The default value + is false.
      dirtype
      - Type of directory that will be created. - Allowed values: - subdirs: creates subdirectories for year and month; - plain: the filename contains the full date, no subdirs. - Default: subdirs. + The type of the created directories can be specified with this option. Allowed + values are subdirs and plain. With the first value, + subdirectories are created for each year and month. With the latter, the + names of the log files contain the full date, and there are no subdirectories. + The default value is subdirs.
      outdir
      - Full path to the directory where html will be generated. - Make sure the system user has write access on that directory. - Default: "www/muc". + This option sets the full path to the directory in which the HTML files should + be stored. Make sure the ejabberd daemon user has write access on that + directory. The default value is "www/muc".
      timezone
      - What timezone should be used. - Allowed values: - local: use local time, as reported to Erlang by the operating system; - universal: use GMT/UTC time. - Default: local. + The time zone for the logs is configurable with this option. Allowed values + are local and universal. With the first value, the local time, + as reported to Erlang by the operating system, will be used. With the latter, + GMT/UTC time will be used. The default value is local.
      top_link
      - Customizable link on top right corner. Syntax of this option: {"URL", "Text"}. - Default: {"/", "Home"}. + With this option you can customize the link on the top right corner of each + log file. The syntax of this option is {"URL", "Text"}. The default + value is {"/", "Home"}.
      -Example configuration: -
      +Examples:
      +
      • +In the first example any chatroom owner can enable logging, and a + custom CSS file will be used (http://example.com/my.css). Further, the names + of the log files will contain the full date, and there will be no + subdirectories. The log files will be stored in /var/www/muclogs, and the + time zone will be GMT/UTC. Finally, the top link will be + <a href="http://www.jabber.ru">Jabber.ru</a>. +
        +  {access, muc, [{allow, all}]}.
        +  ...
           {modules,
            [
             ...
        @@ -2124,10 +2240,35 @@ Example configuration:
             ]},
             ...
            ]}.
        -
        +
    • In the second example only admin1@example.org and + admin2@example.net can enable logging, and the embedded CSS file will be + used. Further, the names of the log files will only contain the day (number), + and there will be subdirectories for each year and month. The log files will + be stored in /var/www/muclogs, and the local time will be used. Finally, the + top link will be the default <a href="/">Home</a>. +
      +  {acl, admins, {user, "admin1", "example.org"}}.
      +  {acl, admins, {user, "admin2", "example.net"}}.
      +  ...
      +  {access, muc_log, [{allow, admins},
      +                     {deny, all}]}.
      +  ...
      +  {modules,
      +   [
      +    ...
      +    {mod_muc_log, [
      +               {access_log, muc_log},
      +               {cssfile, false},
      +               {dirtype, subdirs},
      +               {outdir, "/var/www/muclogs"},
      +               {timezone, local}
      +    ]},
      +    ...
      +   ]}.
      +
    -

    A.10  mod_offline

    +

    5.10  mod_offline

    @@ -2135,11 +2276,11 @@ This module implements offline message storage. This means that all messages sent to an offline user will be stored on the server until that user comes online again. Thus it is very similar to how email works. Note that ejabberdctl has a command to delete expired messages -(see section 3.4.2).
    +(see section 7.2).

    -

    A.11  mod_privacy

    +

    5.11  mod_privacy

    @@ -2148,19 +2289,19 @@ as defined in section 10 from XMPP IM. If end users have support for it in their Jabber client, they will be able to:
    • -Retrieving one's privacy lists. -
    • Adding, removing, and editing one's privacy lists. -
    • Setting, changing, or declining active lists. +Retrieving one's privacy lists. +
    • Adding, removing, and editing one's privacy lists. +
    • Setting, changing, or declining active lists.
    • Setting, changing, or declining the default list (i.e., the list that - is active by default). + is active by default).
    • Allowing or blocking messages based on JID, group, or subscription type - (or globally). + (or globally).
    • Allowing or blocking inbound presence notifications based on JID, group, - or subscription type (or globally). + or subscription type (or globally).
    • Allowing or blocking outbound presence notifications based on JID, group, - or subscription type (or globally). + or subscription type (or globally).
    • Allowing or blocking IQ stanzas based on JID, group, or subscription type - (or globally). + (or globally).
    • Allowing or blocking all communications based on JID, group, or subscription type (or globally).
    @@ -2170,11 +2311,11 @@ Options:
    iqdisc
    This specifies the processing discipline for Blocking Communication (jabber:iq:privacy) IQ queries -(see section A.2.1). +(see section 5.2.1).
    -

    A.12  mod_private

    +

    5.12  mod_private

    @@ -2189,11 +2330,11 @@ Options:
    iqdisc
    This specifies the processing discipline for Private XML Storage (jabber:iq:private) IQ queries -(see section A.2.1). +(see section 5.2.1).
    -

    A.13  mod_pubsub

    +

    5.13  mod_pubsub

    @@ -2223,16 +2364,15 @@ Options:
    hosts
    This option defines the hostnames of the - service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “pubsub.” is added to all + service (see section 5.2.2). If neither hosts nor + the old host is present, the prefix `pubsub.' is added to all ejabberd hostnames.
    served_hosts
    To specify which hosts needs to be served, you can use this option. If absent, only the main ejabberd host is served.
    access_createnode
    - Restricts which users are allowed to create pubsub nodes using ACL and ACCESS. - Default: pubsub_createnode. -
    + This option restricts which users are allowed to create pubsub nodes using + ACL and ACCESS. The default value is pubsub_createnode. Example:
       {modules,
    @@ -2246,7 +2386,7 @@ Example:
     
    -

    A.14  mod_register

    +

    5.14  mod_register

    @@ -2260,12 +2400,12 @@ Register a new account on the server. Options:
    access
    This option can be configured to specify - rules to restrict registration. If a rule returns “deny” on the requested + rules to restrict registration. If a rule returns `deny' on the requested user name, registration for that user name is dennied. (there are no restrictions by default).
    iqdisc
    This specifies the processing discipline for In-Band Registration (jabber:iq:register) IQ queries -(see section A.2.1). +(see section 5.2.1).
    Examples:
    • @@ -2302,7 +2442,7 @@ Next example prohibits the registration of too short account names:
    -

    A.15  mod_roster

    +

    5.15  mod_roster

    @@ -2312,11 +2452,11 @@ Options:
    iqdisc
    This specifies the processing discipline for Roster Management (jabber:iq:roster) IQ queries -(see section A.2.1). +(see section 5.2.1).
    -

    A.16  mod_service_log

    +

    5.16  mod_service_log

    @@ -2356,7 +2496,7 @@ To log all end user packets to the Bandersnatch service running on -

    A.17  mod_shared_roster

    +

    5.17  mod_shared_roster

    @@ -2370,7 +2510,7 @@ Shared roster groups can be edited only via the web interface. Each gro has a unique identification and the following parameters:
    Name
    The name of the group, which will be displayed in the roster. -
    Description
    The description of the group. This parameter doesn't affect +
    Description
    The description of the group. This parameter does not affect anything.
    Members
    A list of full JIDs of group members, entered one per line in the web interface. @@ -2483,474 +2623,685 @@ Take the case of a computer club that wants all its members seeing each -

    A.18  mod_stats

    +

    5.18  mod_stats

    + + + +This module adds support for Statistics Gathering (JEP-0039). This protocol +allows you to retrieve next statistics from your ejabberd deployment: +
    • +Total number of registered users on the current virtual host (users/total). +
    • Total number of registered users on all virtual hosts (users/all-hosts/total). +
    • Total number of online users on the current virtual host (users/online). +
    • Total number of online users on all virtual hosts (users/all-hosts/online). +
    +Options: +
    +iqdisc
    This specifies +the processing discipline for Statistics Gathering (http://jabber.org/protocol/stats) IQ queries +(see section 5.2.1). +
    +As there are only a small amount of clients (for example +Tkabber) and software libraries with +support for this JEP, a few examples are given of the XML you need to send +in order to get the statistics. Here they are: +
    • +You can request the number of online users on the current virtual host + (example.org) by sending: +
      +<iq to='example.org' type='get'>
      +  <query xmlns='http://jabber.org/protocol/stats'>
      +    <stat name='users/online'/>
      +  </query>
      +</iq>
      +
    • You can request the total number of registered users on all virtual hosts + by sending: +
      +<iq to='example.org' type='get'>
      +  <query xmlns='http://jabber.org/protocol/stats'>
      +    <stat name='users/all-hosts/total'/>
      +  </query>
      +</iq>
      +
    + + +

    5.19  mod_time

    + + + +This module features support for Entity Time (JEP-0090). By using this JEP, +you are able to discover the time at another entity's location.
    +
    +Options: +
    +iqdisc
    This specifies +the processing discipline for Entity Time (jabber:iq:time) IQ queries +(see section 5.2.1). +
    + + +

    5.20  mod_vcard

    + + + +This module allows end users to store and retrieve their vCard, and to retrieve +other users vCards, as defined in vcard-temp (JEP-0054). The module also +implements an uncomplicated Jabber User Directory based on the vCards of +these users. Moreover, it enables the server to send its vCard when queried.
    +
    +Options: +
    + + hosts
    This option defines the hostnames of the + service (see section 5.2.2). If neither hosts nor + the old host is present, the prefix `vjud.' is added to all + ejabberd hostnames. + +
    iqdisc
    This specifies +the processing discipline for vcard-temp IQ queries +(see section 5.2.1). +
    search
    This option specifies whether the search + functionality is enabled (value: true) or disabled (value: + false). If disabled, the option hosts will be ignored and the + Jabber User Directory service will not appear in the Service Discovery item + list. The default value is true. +
    matches
    With this option, the number of reported + search results can be limited. If the option's value is set to infinity, + all search results are reported. The default value is 30. +
    allow_return_all
    This option enables + you to specify if search operations with empty input fields should return all + users who added some information to their vCard. The default value is + false. +
    search_all_hosts
    If this option is set + to true, search operations will apply to all virtual hosts. Otherwise + only the current host will be searched. The default value is true. +
    +Examples: +
    • +In this first situation, search results are limited to twenty items, + every user who added information to their vCard will be listed when people + do an empty search, and only users from the current host will be returned: +
      +  {modules,
      +   [
      +    ...
      +    {mod_vcard, [{search, true},
      +                 {matches, 20},
      +                 {allow_return_all, true},
      +                 {search_all_hosts, false}]},
      +    ...
      +   ]}.
      +
    • The second situation differs in a way that search results are not limited, + and that all virtual hosts will be searched instead of only the current one: +
      +  {modules,
      +   [
      +    ...
      +    {mod_vcard, [{search, true},
      +                 {matches, infinity},
      +                 {allow_return_all, true}]},
      +    ...
      +   ]}.
      +
    + + +

    5.21  mod_vcard_ldap

    + + + +ejabberd can map LDAP attributes to vCard fields. This behaviour is +implemented in the mod_vcard_ldap module. This module does not depend on the +authentication method (see 4.5.2). The mod_vcard_ldap module +has its own optional parameters. The first group of parameters has the same +meaning as the top-level LDAP parameters to set the authentication method: +ldap_servers, ldap_port, ldap_rootdn, +ldap_password, ldap_base, ldap_uidattr, +ldap_uidattr_format and ldap_filter. See +section 4.5.2 for detailed information about these options. If one +of these options is not set, ejabberd will look for the top-level option with +the same name. The second group of parameters consists of the following +mod_vcard_ldap-specific options: +
    + + hosts
    This option defines the hostnames of the + service (see section 5.2.2). If neither hosts nor + the old host is present, the prefix `vjud.' is added to all + ejabberd hostnames. + +
    iqdisc
    This specifies +the processing discipline for vcard-temp IQ queries +(see section 5.2.1). +
    search
    This option specifies whether the search + functionality is enabled (value: true) or disabled (value: + false). If disabled, the option hosts will be ignored and the + Jabber User Directory service will not appear in the Service Discovery item + list. The default value is true. +
    ldap_vcard_map
    With this option you can + set the table that maps LDAP attributes to vCard fields. The format is: + [Name_of_vCard_field, Pattern, List_of_LDAP_attributes, ...]. + Name_of_vcard_field is the type name of the vCard as defined in + RFC 2426. Pattern is a + string which contains pattern variables "%u", "%d" or + "%s". List_of_LDAP_attributes is the list containing LDAP + attributes. The pattern variables "%s" will be sequentially replaced + with the values of LDAP attributes from List_of_LDAP_attributes, + "%u" will be replaced with the user part of a JID, and "%d" + will be replaced with the domain part of a JID. The default is: +
    +  [{"NICKNAME", "%u", []},
    +   {"FN", "%s", ["displayName"]},
    +   {"FAMILY", "%s", ["sn"]},
    +   {"GIVEN", "%s", ["givenName"]},
    +   {"MIDDLE", "%s", ["initials"]},
    +   {"ORGNAME", "%s", ["o"]},
    +   {"ORGUNIT", "%s", ["ou"]},
    +   {"CTRY", "%s", ["c"]},
    +   {"LOCALITY", "%s", ["l"]},
    +   {"STREET", "%s", ["street"]},
    +   {"REGION", "%s", ["st"]},
    +   {"PCODE", "%s", ["postalCode"]},
    +   {"TITLE", "%s", ["title"]},
    +   {"URL", "%s", ["labeleduri"]},
    +   {"DESC", "%s", ["description"]},
    +   {"TEL", "%s", ["telephoneNumber"]},
    +   {"EMAIL", "%s", ["mail"]},
    +   {"BDAY", "%s", ["birthDay"]},
    +   {"ROLE", "%s", ["employeeType"]},
    +   {"PHOTO", "%s", ["jpegPhoto"]}]
    +
    ldap_search_fields
    This option + defines the search form and the LDAP attributes to search within. The format + is: [Name, Attribute, ...]. Name is the name of a search form + field which will be automatically translated by using the translation + files (see msgs/*.msg for available words). Attribute is the + LDAP attribute or the pattern "%u". The default is: +
    +  [{"User", "%u"},
    +   {"Full Name", "displayName"},
    +   {"Given Name", "givenName"},
    +   {"Middle Name", "initials"},
    +   {"Family Name", "sn"},
    +   {"Nickname", "%u"},
    +   {"Birthday", "birthDay"},
    +   {"Country", "c"},
    +   {"City", "l"},
    +   {"Email", "mail"},
    +   {"Organization Name", "o"},
    +   {"Organization Unit", "ou"}]
    +
    ldap_search_reported
    This option + defines which search fields should be reported. The format is: + [Name, vCard_Name, ...]. Name is the name of a search form + field which will be automatically translated by using the translation + files (see msgs/*.msg for available words). vCard_Name is the + vCard field name defined in the ldap_vcard_map option. The default + is: +
    +  [{"Full Name", "FN"},
    +   {"Given Name", "GIVEN"},
    +   {"Middle Name", "MIDDLE"},
    +   {"Family Name", "FAMILY"},
    +   {"Nickname", "NICKNAME"},
    +   {"Birthday", "BDAY"},
    +   {"Country", "CTRY"},
    +   {"City", "LOCALITY"},
    +   {"Email", "EMAIL"},
    +   {"Organization Name", "ORGNAME"},
    +   {"Organization Unit", "ORGUNIT"}]
    +
    +Examples: +
    • +
      +
      +Let's say ldap.example.org is the name of our LDAP server. We have +users with their passwords in "ou=Users,dc=example,dc=org" directory. +Also we have addressbook, which contains users emails and their additional +infos in "ou=AddressBook,dc=example,dc=org" directory. Corresponding +authentication section should looks like this: +
      +  %% authentication method
      +  {auth_method, ldap}.
      +  %% DNS name of our LDAP server
      +  {ldap_servers, ["ldap.example.org"]}.
      +  %% We want to authorize users from 'shadowAccount' object class only
      +  {ldap_filter, "(objectClass=shadowAccount)"}.
      +
      +Now we want to use users LDAP-info as their vCards. We have four attributes +defined in our LDAP schema: "mail" — email address, "givenName" +— first name, "sn" — second name, "birthDay" — birthday. +Also we want users to search each other. Let's see how we can set it up: +
      +  {modules,
      +    ...
      +    {mod_vcard_ldap,
      +     [
      +      %% We use the same server and port, but want to bind anonymously because
      +      %% our LDAP server accepts anonymous requests to
      +      %% "ou=AddressBook,dc=example,dc=org" subtree.
      +      {ldap_rootdn, ""},
      +      {ldap_password, ""},
      +      %% define the addressbook's base
      +      {ldap_base, "ou=AddressBook,dc=example,dc=org"},
      +      %% user's part of JID is located in the "mail" attribute
      +      {ldap_uidattr, "mail"},
      +      %% common format for our emails
      +      {ldap_uidattr_format, "%u@mail.example.org"},
      +      %% We have to define empty filter here, because entries in addressbook does not
      +      %% belong to shadowAccount object class
      +      {ldap_filter, ""},
      +      %% Now we want to define vCard pattern
      +      {ldap_vcard_map,
      +       [{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname
      +        {"GIVEN", "%s", ["givenName"]},
      +        {"FAMILY", "%s", ["sn"]},
      +        {"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John"
      +        {"EMAIL", "%s", ["mail"]},
      +        {"BDAY", "%s", ["birthDay"]}]},
      +      %% Search form
      +      {ldap_search_fields,
      +       [{"User", "%u"},
      +        {"Name", "givenName"},
      +        {"Family Name", "sn"},
      +        {"Email", "mail"},
      +        {"Birthday", "birthDay"}]},
      +      %% vCard fields to be reported
      +      %% Note that JID is always returned with search results
      +      {ldap_search_reported,
      +       [{"Full Name", "FN"},
      +        {"Nickname", "NICKNAME"},
      +        {"Birthday", "BDAY"}]}
      +    ]}
      +    ...
      +  }.
      +
      +Note that mod_vcard_ldap module checks an existence of the user before +searching his info in LDAP.
      +
      +
    • ldap_vcard_map example: +
      +  {ldap_vcard_map,
      +   [{"NICKNAME", "%u", []},
      +    {"FN", "%s", ["displayName"]},
      +    {"CTRY", "Russia", []},
      +    {"EMAIL", "%u@%d", []},
      +    {"DESC", "%s\n%s", ["title", "description"]}
      +   ]},
      +
    • ldap_search_fields example: +
      +  {ldap_search_fields,
      +   [{"User", "uid"},
      +    {"Full Name", "displayName"},
      +    {"Email", "mail"}
      +   ]},
      +
    • ldap_search_reported example: +
      +  {ldap_search_reported,
      +   [{"Full Name", "FN"},
      +    {"Email", "EMAIL"},
      +    {"Birthday", "BDAY"},
      +    {"Nickname", "NICKNAME"}
      +   ]},
      +
    + + +

    5.22  mod_version

    + + + +This module implements Software Version (JEP-0092). Consequently, it +answers ejabberd's version when queried.
    +
    +Options: +
    +iqdisc
    This specifies +the processing discipline for Software Version (jabber:iq:version) IQ queries +(see section 5.2.1). +
    + + +

    6  Creating an Initial Administrator

    + + +Before the web interface can be entered to perform administration tasks, an +account with administrator rights is needed on your ejabberd deployment.
    +
    +Instructions to create an initial administrator account: +
    1. +Register an account on your ejabberd deployment. An account can be + created in two ways: +
      1. + Using the tool ejabberdctl (see + section 7.2): +
        +% ejabberdctl node@host register admin example.org password
        +
      2. Using In-Band Registration (see section 5.14): you can + use a Jabber client to register an account. +
      +
    2. Edit the configuration file to promote the account created in the previous + step to an account with administrator rights. Note that if you want to add + more administrators, a seperate acl entry is needed for each administrator. +
      +  {acl, admins, {user, "admin", "example.org"}}.
      +  {access, configure, [{allow, admins}]}.
      +
    3. Restart ejabberd to load the new configuration. +
    4. Open the web interface (http://server:port/admin/) in your + favourite browser. Make sure to enter the full JID as username (in this + example: admin@example.org. The reason that you also need to enter the + suffix, is because ejabberd's virtual hosting support. +
    + + +

    7  Online Configuration and Monitoring

    + + + + +

    7.1  Web Interface

    + + + +To perform online configuration of ejabberd you need to enable the +ejabberd_http listener with the option web_admin (see +section 3.3). Then you can open +http://server:port/admin/ in your favourite web browser. You +will be asked to enter the username (the full Jabber ID) and password +of an ejabberd user with administrator rights. After authentication +you will see a page similar to figure 1. +

    + + webadmmain.png + - +
    +
    +
    Figure 1: Top page from the web interface

    +
    -This module adds support for Statistics Gathering (JEP-0039). This protocol -allows you to retrieve next statistics from your ejabberd deployment: -
    • -Total number of registered users on the current virtual host (users/total). -
    • Total number of registered users on all virtual hosts (users/all-hosts/total). -
    • Total number of online users on the current virtual host (users/online). -
    • Total number of online users on all virtual hosts (users/all-hosts/online). -
    -Options: -
    -iqdisc
    This specifies -the processing discipline for Statistics Gathering (http://jabber.org/protocol/stats) IQ queries -(see section A.2.1). -
    -As there are only a small amount of clients (for example -Tkabber) and software libraries with -support for this JEP, a few examples are given of the XML you need to send -in order to get the statistics. Here they are: + +

    +Here you can edit access restrictions, manage users, create backups, +manage the database, enable/disable ports listened for, view server +statistics,...
    +
    +Examples:
    • -You can request the number of online users on the current virtual host - (example.org) by sending: +You can serve the web interface on the same port as the + HTTP Polling interface. In this example + you should point your web browser to http://example.org:5280/admin/ to + administer all virtual hosts or to + http://example.org:5280/admin/server/example.com/ to administer only + the virtual host example.com. Before you get access to the web interface + 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 `admin@example.net' to administer all virtual hosts (first + URL). If you log in with `admin@example.com' on
      +http://example.org:5280/admin/server/example.com/ you can only + administer the virtual host example.com.
      -<iq to='example.org' type='get'>
      -  <query xmlns='http://jabber.org/protocol/stats'>
      -    <stat name='users/online'/>
      -  </query>
      -</iq>
      -
    • You can request the total number of registered users on all virtual hosts - by sending: + ... + {acl, admins, {user, "admin", "example.net"}}. + {host_config, "example.com", [{acl, admins, {user, "admin", "example.com"}}]}. + {access, configure, [{allow, admins}]}. + ... + {hosts, ["example.org"]}. + ... + {listen, + [... + {5280, ejabberd_http, [http_poll, web_admin]}, + ... + ] + }. +
    • For security reasons, you can serve the web interface 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 + web browser to https://192.168.1.1:5280/admin/:
      -<iq to='example.org' type='get'>
      -  <query xmlns='http://jabber.org/protocol/stats'>
      -    <stat name='users/all-hosts/total'/>
      -  </query>
      -</iq>
      +  ...
      +  {hosts, ["example.org"]}.
      +  ...
      +  {listen,
      +   [...
      +    {5270, ejabberd_http,    [http_poll]},
      +    {5280, ejabberd_http,    [web_admin, {ip, {192, 168, 1, 1}},
      +                              tls, {certfile, "/usr/local/etc/server.pem"}]},
      +    ...
      +   ]
      +  }.
       
    - + -

    A.19  mod_time

    +

    7.2  ejabberdctl

    - + -This module features support for Entity Time (JEP-0090). By using this JEP, -you are able to discover the time at another entity's location.
    -
    -Options: +It is possible to do some administration operations using the command +line tool ejabberdctl. You can list all available options by +running ejabberdctl without arguments: +
    +% ejabberdctl
    +Usage: ejabberdctl node command
    +
    +Available commands:
    +  status                        get ejabberd status
    +  stop                          stop ejabberd
    +  restart                       restart ejabberd
    +  reopen-log                    reopen log file
    +  register user server password register a user
    +  unregister user server        unregister a user
    +  backup file                   store a database backup to file
    +  restore file                  restore a database backup from file
    +  install-fallback file         install a database fallback from file
    +  dump file                     dump a database to a text file
    +  load file                     restore a database from a text file
    +  import-file file              import user data from jabberd 1.4 spool file
    +  import-dir dir                import user data from jabberd 1.4 spool directory
    +  registered-users              list all registered users
    +  delete-expired-messages       delete expired offline messages from database
    +
    +Example:
    +  ejabberdctl ejabberd@host restart
    +
    +Additional information:
    -iqdisc
    This specifies -the processing discipline for Entity Time (jabber:iq:time) IQ queries -(see section A.2.1). +reopen-log
    If you use a tool to rotate logs, you have to configure it + so that this command is executed after each rotation. +
    backup, restore, install-fallback, dump, load
    You can use these + commands to create and restore backups. +
    import-file, import-dir
    + These options can be used to migrate from other Jabber/XMPP servers. There + exist tutorials to migrate from other software to ejabberd. +
    delete-expired-messages
    This option can be used to delete old messages + in offline storage. This might be useful when the number of offline messages + is very high.
    - + -

    A.20  mod_vcard

    +

    8  Firewall Settings

    - + -This module allows end users to store and retrieve their vCard, and to retrieve -other users vCards, as defined in vcard-temp (JEP-0054). The module also -implements an uncomplicated Jabber User Directory based on the vCards of -these users. Moreover, it enables the server to send its vCard when queried.
    -
    -Options: -
    +You need to take the following TCP ports in mind when configuring your firewall: +

    + + + + + + + + + + + + + + + + + + +
    PortDescription
    5222SASL and unencrypted c2s connections.
    5223Obsolete SSL c2s connections.
    5269s2s connections.
    4369Only for clustering (see 10).
    port rangeOnly for clustring (see 10). This range + is configurable (see 2.4).
    +

    + - hosts
    This option defines the hostnames of the - service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “vjud.” is added to all - ejabberd hostnames. +

    9  SRV Records

    + + -
    iqdisc
    This specifies -the processing discipline for vcard-temp IQ queries -(see section A.2.1). -
    search
    This option specifies whether the search - functionality is enabled (value: true) or disabled - (value: false). If disabled, the option hosts will be - ignored and the Jabber User Directory service will not appear in the - Service Discovery item list. The default value is true. -
    matches
    With this option, the number of reported - search results can be limited. If the option's value is set to infinity, - all search results are reported. The default value is 30. -
    allow_return_all
    This option enables - you to specify if search operations with empty input fields should return - all users who added some information to their vCard. The default value is - false. -
    search_all_hosts
    If this option is - set to true, search operations will apply to all virtual hosts. - Otherwise only the current host will be searched. The default value is - true. -
    -Examples:
    • -In this first situation, search results are limited to twenty items, - every user who added information to their vCard will be listed when people - do an empty search, and only users from the current host will be returned: -
      -  {modules,
      -   [
      -    ...
      -    {mod_vcard, [{search, true},
      -                 {matches, 20},
      -                 {allow_return_all, true},
      -                 {search_all_hosts, false}]},
      -    ...
      -   ]}.
      -
    • The second situation differs in a way that search results are not limited, - and that all virtual hosts will be searched instead of only the current one: -
      -  {modules,
      -   [
      -    ...
      -    {mod_vcard, [{search, true},
      -                 {matches, infinity},
      -                 {allow_return_all, true}]},
      -    ...
      -   ]}.
      -
    - +General information: + SRV record +
  • Practical information: + Setting DNS SRV Records + + -

    A.21  LDAP and mod_vcard_ldap

    +

    10  Clustering

    - + - + -

    A.21.1  Features

    +

    10.1  How it Works

    - -ejabberd has built-in LDAP support. You can authenticate users against LDAP -server and use LDAP directory as vCard storage. Shared rosters are not -supported yet.
    + + +A Jabber domain is served by one or more ejabberd nodes. These nodes can +be run on different machines that are connected via a network. They all +must have the ability to connect to port 4369 of all another nodes, and must +have the same magic cookie (see Erlang/OTP documentation, in other words the +file ~ejabberd/.erlang.cookie must be the same on all nodes). This is +needed because all nodes exchange information about connected users, s2s +connections, registered services, etc...

    - +Each ejabberd node has the following modules: +
    • +router, +
    • local router, +
    • session manager, +
    • s2s manager. +
    + -

    A.21.2  Connection

    +

    10.1.1  Router

    - -Parameters: -
    -ldap_server
    IP address or dns name of your -LDAP server. This option is required. -
    ldap_port
    Port to connect to LDAP server. -Default is 389. -
    ldap_rootdn
    Bind DN. Default is "" -which means anonymous connection. -
    ldap_password
    Bind password. Default -is "". -
    -Example: -
    -  {auth_method, ldap}.
    -  {ldap_servers, ["ldap.mydomain.org"]}.
    -  {ldap_port, 389}.
    -  {ldap_rootdn, "cn=Manager,dc=domain,dc=org"}.
    -  {ldap_password, "secret"}.
    -
    -Note that current LDAP implementation doesn't support SSL connection and SASL -authentication.
    + + +This module is the main router of Jabber packets on each node. It +routes them based on their destination's domains. It uses a global +routing table. The domain of the packet's destination is searched in the +routing table, and if it is found, the packet is routed to the +appropriate process. If not, it is sent to the s2s manager.

    - + -

    A.21.3  Authentication

    +

    10.1.2  Local Router

    - -You can authenticate users against LDAP directory. Available parameters are -listed below: -
    -ldap_base
    LDAP base directory which stores users -accounts. This option is required. -
    ldap_uidattr
    LDAP attribute which holds -user's part of JID. Default is "uid". -
    ldap_uidattr_format
    Format of the -ldap_uidattr variable. Format MUST contain one and only one pattern -variable "%u" which will be replaced by user's part of JID. For example, -"%u@mydomain.org". Default value is "%u". -
    ldap_filter
    RFC 2254 LDAP filter. Default is -none. Example: "(&(objectClass=shadowAccount)(memberOf=Jabber - Users))". Please, don't forget closing brackets and don't use superfluous -whitespaces. Also you MUST NOT use ldap_uidattr attribute in filter -because this attribute will be substituted in LDAP filter automatically. -
    - + -

    A.21.4  vCards and Search

    +This module routes packets which have a destination domain equal to +one of this server's host names. If the destination JID has a non-empty user +part, it is routed to the session manager, otherwise it is processed depending +on its content.
    +
    + - -ejabberd can map LDAP attributes to vCard fields. This behaviour is -implemented in mod_vcard_ldap module. This module doesn't depend on -authentication method. mod_vcard_ldap module has it's own optional -parameters. The first group of parameters has the same meaning as top-level -LDAP parameters: ldap_servers, ldap_port, -ldap_rootdn, ldap_password, ldap_base, -ldap_uidattr, ldap_uidattr_format and -ldap_filter. If one of this option is not set ejabberd will look -for top-level option with the same name. The second group of parameters -consists of the following options: -
    +

    10.1.3  Session Manager

    - hosts
    This option defines the hostnames of the - service (see section A.2.2). If neither hosts nor - the old host is present, the prefix “vjud.” is added to all - ejabberd hostnames. + -
    iqdisc
    This specifies -the processing discipline for vcard-temp IQ queries -(see section A.2.1). -
    search
    This option specifies whether the search - functionality is enabled (value: true) or disabled - (value: false). If disabled, the option hosts will be - ignored and the Jabber User Directory service will not appear in the - Service Discovery item list. The default value is true. -
    ldap_vcard_map
    the table which defines -reflection of LDAP attributes to vCard fields. - Format is: - [Name_of_vcard_field, Pattern, List_of_LDAP_attributes, ...] - where - Name_of_vcard_field is the type name of vCard as defined - in RFC 2426, - Pattern is a string which contains pattern variables "%u", "%d" or "%s", - List_of_LDAP_attributes is the list which contains of LDAP attributes. - Pattern variables "%s" will be sequentially replaced with the values of - LDAP attributes from List_of_LDAP_attributes; "%u" will be replaced with - user's part of JID and "%d" will be replaced with domain part of JID. - Example: -
    -  {ldap_vcard_map,
    -   [{"NICKNAME", "%u", []},
    -    {"FN", "%s", ["displayName"]},
    -    {"CTRY", "Russia", []},
    -    {"EMAIL", "%u@%d", []},
    -    {"DESC", "%s\n%s", ["title", "description"]}
    -   ]},
    -
    -Default is: -
    -  [{"NICKNAME", "%u", []},
    -   {"FN", "%s", ["displayName"]},
    -   {"FAMILY", "%s", ["sn"]},
    -   {"GIVEN", "%s", ["givenName"]},
    -   {"MIDDLE", "%s", ["initials"]},
    -   {"ORGNAME", "%s", ["o"]},
    -   {"ORGUNIT", "%s", ["ou"]},
    -   {"CTRY", "%s", ["c"]},
    -   {"LOCALITY", "%s", ["l"]},
    -   {"STREET", "%s", ["street"]},
    -   {"REGION", "%s", ["st"]},
    -   {"PCODE", "%s", ["postalCode"]},
    -   {"TITLE", "%s", ["title"]},
    -   {"URL", "%s", ["labeleduri"]},
    -   {"DESC", "%s", ["description"]},
    -   {"TEL", "%s", ["telephoneNumber"]},
    -   {"EMAIL", "%s", ["mail"]},
    -   {"BDAY", "%s", ["birthDay"]},
    -   {"ROLE", "%s", ["employeeType"]},
    -   {"PHOTO", "%s", ["jpegPhoto"]}]
    -
    ldap_search_fields
    This option defines -search form and LDAP attributes to search. - Format: - [Name, Attribute, ...] - where - Name is the name of field in the search form. Will be automatically - translated according to definitions in translation files (see - msgs/*.msg for available words). - Attribute is the LDAP attribute or the pattern "%u" - Example: -
    -  {ldap_search_fields,
    -   [{"User", "uid"},
    -    {"Full Name", "displayName"},
    -    {"Email", "mail"}
    -   ]},
    -
    -Default is: -
    -  [{"User", "%u"},
    -   {"Full Name", "displayName"},
    -   {"Given Name", "givenName"},
    -   {"Middle Name", "initials"},
    -   {"Family Name", "sn"},
    -   {"Nickname", "%u"},
    -   {"Birthday", "birthDay"},
    -   {"Country", "c"},
    -   {"City", "l"},
    -   {"Email", "mail"},
    -   {"Organization Name", "o"},
    -   {"Organization Unit", "ou"}]
    -
    ldap_search_reported
    This option defines search fields to be reported. - Format: - [Name, VCard_Name, ...] - where - Name is the name of field in the search form. Will be automatically - translated according to definitions in translation files (see - msgs/*.msg for available words). - VCard_Name is the name of vCard field defined in ldap_vcard_map option. - Example: -
    -  {ldap_search_reported,
    -   [{"Full Name", "FN"},
    -    {"Email", "EMAIL"},
    -    {"Birthday", "BDAY"},
    -    {"Nickname", "NICKNAME"}
    -   ]},
    -
    -Default is: -
    -  [{"Full Name", "FN"},
    -   {"Given Name", "GIVEN"},
    -   {"Middle Name", "MIDDLE"},
    -   {"Family Name", "FAMILY"},
    -   {"Nickname", "NICKNAME"},
    -   {"Birthday", "BDAY"},
    -   {"Country", "CTRY"},
    -   {"City", "LOCALITY"},
    -   {"Email", "EMAIL"},
    -   {"Organization Name", "ORGNAME"},
    -   {"Organization Unit", "ORGUNIT"}]
    -
    - +This module routes packets to local users. It looks up to which user +resource a packet must be sent via a presence table. Then the packet is +either routed to the appropriate c2s process, or stored in offline +storage, or bounced back.
    +
    + -

    A.21.5  Examples

    +

    10.1.4  s2s Manager

    - - + + +This module routes packets to other Jabber servers. First, it +checks if an opened s2s connection from the domain of the packet's +source to the domain of the packet's destination exists. If that is the case, +the s2s manager routes the packet to the process +serving this connection, otherwise a new connection is opened.
    +
    + -
    Common example
    +

    10.2  Clustering Setup

    -Let's say ldap.mydomain.org is the name of our LDAP server. We have -users with their passwords in "ou=Users,dc=mydomain,dc=org" directory. -Also we have addressbook, which contains users emails and their additional -infos in "ou=AddressBook,dc=mydomain,dc=org" directory. Corresponding -authentication section should looks like this: + + +Suppose you already configured ejabberd on one machine named (first), +and you need to setup another one to make an ejabberd cluster. Then do +following steps: +
    1. +Copy ~ejabberd/.erlang.cookie file from first to + second.
      +
      +(alt) You can also add `-cookie content_of_.erlang.cookie' + option to all `erl' commands below.
      +
      +
    2. On second run the following command as the ejabberd daemon user, + in the working directory of ejabberd:
      -  %% authentication method
      -  {auth_method, ldap}.
      -  %% DNS name of our LDAP server
      -  {ldap_servers, ["ldap.mydomain.org"]}.
      -  %% Bind to LDAP server as "cn=Manager,dc=mydomain,dc=org" with password "secret"
      -  {ldap_rootdn, "cn=Manager,dc=mydomain,dc=org"}.
      -  {ldap_password, "secret"}.
      -  %% define the user's base
      -  {ldap_base, "ou=Users,dc=mydomain,dc=org"}.
      -  %% We want to authorize users from 'shadowAccount' object class only
      -  {ldap_filter, "(objectClass=shadowAccount)"}.
      +erl -sname ejabberd \
      +    -mnesia extra_db_nodes "['ejabberd@first']" \
      +    -s mnesia
       
      -Now we want to use users LDAP-info as their vCards. We have four attributes -defined in our LDAP schema: "mail" — email address, "givenName" -— first name, "sn" — second name, "birthDay" — birthday. -Also we want users to search each other. Let's see how we can set it up: + This will start Mnesia serving the same database as ejabberd@first. + You can check this by running the command `mnesia:info().'. You + should see a lot of remote tables and a line like the following:
      -  {modules,
      -    ...
      -    {mod_vcard_ldap,
      -     [
      -      %% We use the same server and port, but want to bind anonymously because
      -      %% our LDAP server accepts anonymous requests to
      -      %% "ou=AddressBook,dc=mydomain,dc=org" subtree.
      -      {ldap_rootdn, ""},
      -      {ldap_password, ""},
      -      %% define the addressbook's base
      -      {ldap_base, "ou=AddressBook,dc=mydomain,dc=org"},
      -      %% user's part of JID is located in the "mail" attribute
      -      {ldap_uidattr, "mail"},
      -      %% common format for our emails
      -      {ldap_uidattr_format, "%u@mail.mydomain.org"},
      -      %% We have to define empty filter here, because entries in addressbook doesn't
      -      %% belong to shadowAccount object class
      -      {ldap_filter, ""},
      -      %% Now we want to define vCard pattern
      -      {ldap_vcard_map,
      -       [{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname
      -        {"GIVEN", "%s", ["givenName"]},
      -        {"FAMILY", "%s", ["sn"]},
      -        {"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John"
      -        {"EMAIL", "%s", ["mail"]},
      -        {"BDAY", "%s", ["birthDay"]}]},
      -      %% Search form
      -      {ldap_search_fields,
      -       [{"User", "%u"},
      -        {"Name", "givenName"},
      -        {"Family Name", "sn"},
      -        {"Email", "mail"},
      -        {"Birthday", "birthDay"}]},
      -      %% vCard fields to be reported
      -      %% Note that JID is always returned with search results
      -      {ldap_search_reported,
      -       [{"Full Name", "FN"},
      -        {"Nickname", "NICKNAME"},
      -        {"Birthday", "BDAY"}]}
      -    ]}
      -    ...
      -  }.
      -
      -Note that mod_vcard_ldap module checks an existence of the user before -searching his info in LDAP.
      +running db nodes = [ejabberd@first, ejabberd@second] +

      - - -
      Active Directory
      - -Active Directory is just an LDAP-server with predefined attributes. Sample -config file is listed below: +
    3. Now run the following in the same `erl' session:
      -  {auth_method, ldap}.
      -  {ldap_servers, ["office.org"]}.    % List of LDAP servers
      -  {ldap_base, "DC=office,DC=org"}. % Search base of LDAP directory
      -  {ldap_rootdn, "CN=Administrator,CN=Users,DC=office,DC=org"}. % LDAP manager
      -  {ldap_password, "*******"}. % Password to LDAP manager
      -  {ldap_uidattr, "sAMAccountName"}.
      -  {ldap_filter, "(memberOf=*)"}.
      -  
      -  {mod_vcard_ldap,
      -   [{ldap_vcard_map,
      -     [{"NICKNAME", "%u", []},
      -      {"GIVEN", "%s", ["givenName"]},
      -      {"MIDDLE", "%s", ["initials"]},
      -      {"FAMILY", "%s", ["sn"]},
      -      {"FN", "%s", ["displayName"]},
      -      {"EMAIL", "%s", ["mail"]},
      -      {"ORGNAME", "%s", ["company"]},
      -      {"ORGUNIT", "%s", ["department"]},
      -      {"CTRY", "%s", ["c"]},
      -      {"LOCALITY", "%s", ["l"]},
      -      {"STREET", "%s", ["streetAddress"]},
      -      {"REGION", "%s", ["st"]},
      -      {"PCODE", "%s", ["postalCode"]},
      -      {"TITLE", "%s", ["title"]},
      -      {"URL", "%s", ["wWWHomePage"]},
      -      {"DESC", "%s", ["description"]},
      -      {"TEL", "%s", ["telephoneNumber"]}]},
      -    {ldap_search_fields,
      -     [{"User", "%u"},
      -      {"Name", "givenName"},
      -      {"Family Name", "sn"},
      -      {"Email", "mail"},
      -      {"Company", "company"},
      -      {"Department", "department"},
      -      {"Role", "title"},
      -      {"Description", "description"},
      -      {"Phone", "telephoneNumber"}]},
      -    {ldap_search_reported,
      -     [{"Full Name", "FN"},
      -      {"Nickname", "NICKNAME"},
      -      {"Email", "EMAIL"}]}
      -   ]
      -  }.
      +mnesia:change_table_copy_type(schema, node(), disc_copies).
       
      - - -

      A.22  mod_version

      - - - -This module implements Software Version (JEP-0092). Consequently, it -answers ejabberd's version when queried.
      + This will create local disc storage for the database.

      -Options: -
      -iqdisc
      This specifies -the processing discipline for Software Version (jabber:iq:version) IQ queries -(see section A.2.1). -
      +(alt) Change storage type of the scheme table to `RAM and disc + copy' on the second node via the web interface.
      +
      +
    4. Now you can add replicas of various tables to this node with + `mnesia:add_table_copy' or + `mnesia:change_table_copy_type' as above (just replace + `schema' with another table name and `disc_copies' + can be replaced with `ram_copies' or + `disc_only_copies').
      +
      +Which tables to replicate is very dependant on your needs, you can get + some hints from the command `mnesia:info().', by looking at the + size of tables and the default storage type for each table on 'first'.
      +
      +Replicating a table makes lookups in this table faster on this node. + Writing, on the other hand, will be slower. And of course if machine with one + of the replicas is down, other replicas will be used.
      +
      +Also section 5.3 (Table Fragmentation) of Mnesia User's Guide can be helpful. +
      +
      + (alt) Same as in previous item, but for other tables.
      +
      +
    5. Run `init:stop().' or just `q().' to exit from + the Erlang shell. This probably can take some time if Mnesia has not yet + transfered and processed all data it needed from first.
      +
      +
    6. Now run ejabberd on second with almost the same config as + on first (you probably do not need to duplicate `acl' + and `access' options — they will be taken from + first, and mod_muc and mod_irc should be + enabled only on one machine in the cluster). +
    +You can repeat these steps for other machines supposed to serve this +domain.
    +
    + -

    B  Internationalization and Localization

    +

    A  Internationalization and Localization

    @@ -2966,7 +3317,7 @@ Figure 2, for example, shows the reply to the f

    - + discorus.png
    @@ -2980,26 +3331,26 @@ The web interface also supports the Accept-Language HTTP header (co figure 3 with figure 1)

    - + webadmmainru.png

    Figure 3: Top page from the web interface with HTTP header - “Accept-Language: ru”

    + `Accept-Language: ru'



    -

    C  Release Notes

    +

    B  Release Notes

    -

    C.1  ejabberd 0.9

    +

    B.1  ejabberd 0.9

            Release notes
    @@ -3093,7 +3444,7 @@ Bugfixes
     
    -

    C.2  ejabberd 0.9.1

    +

    B.2  ejabberd 0.9.1

            Release notes
    @@ -3161,7 +3512,7 @@ Bugfixes
     
    -

    C.3  ejabberd 0.9.8

    +

    B.3  ejabberd 0.9.8

            Release notes
    @@ -3266,7 +3617,7 @@ END
     
    -

    C.4  ejabberd 1.0.0

    +

    B.4  ejabberd 1.0.0

            Release Notes
    @@ -3392,7 +3743,7 @@ END
     
    -

    C.5  ejabberd 1.1.0

    +

    B.5  ejabberd 1.1.0

         Release Notes
    @@ -3513,7 +3864,7 @@ END
     
    -

    C.6  ejabberd 1.1.1

    +

    B.6  ejabberd 1.1.1

         Release Notes
    @@ -3638,13 +3989,14 @@ END
     
    -

    D  Acknowledgements

    +

    C  Acknowledgements

    - Thanks to all people who contributed to this guide: + + +

    D  Copyright Information

    + + +Ejabberd Installation and Operation Guide.
    +Copyright © January 23, 2003 — Alexey Shchepin
    +
    +This document is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version.
    +
    +This document is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details.
    +
    +You should have received a copy of the GNU General Public License along with +this document; if not, write to the Free Software Foundation, Inc., 51 Franklin +Street, Fifth Floor, Boston, MA 02110-1301, USA.
    +
    diff --git a/doc/guide.tex b/doc/guide.tex index c9443da5c..468f7143d 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -78,10 +78,15 @@ the processing discipline for #1 IQ queries \newcommand{\hostitem}[1]{ \titem{hosts} \ind{options!hosts} This option defines the hostnames of the service (see section~\ref{sec:modhostsoption}). If neither \texttt{hosts} nor - the old \texttt{host} is present, the prefix ``\jid{#1.}'' is added to all + the old \texttt{host} is present, the prefix `\jid{#1.}' is added to all \ejabberd{} hostnames. } +%\newcommand{\quoting}[2][yozhik]{\begin{quotation}\textcolor{#1}{\textit{#2}}\end{quotation}} % Quotes enabled +%\renewcommand{command}[args][default]{def} +%\renewcommand{\headrule}{{\color{ejblue}% +%\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}} + %% Title page \include{version} \title{Ejabberd \version\ Installation and Operation Guide} @@ -92,9 +97,11 @@ the processing discipline for #1 IQ queries %% Options \newcommand{\marking}[1]{#1} % Marking disabled \newcommand{\quoting}[2][yozhik]{} % Quotes disabled -\newcommand{\new}{\begin{latexonly}\marginpar{\textsc{new}}\end{latexonly}} % Highlight new features -\newcommand{\improved}{\begin{latexonly}\marginpar{\textsc{improved}}\end{latexonly}} % Highlight improved features -\newcommand{\moreinfo}[1]{} % Hide details +\newcommand{\new}{\marginpar{\textsc{new}}} % Highlight new features +\newcommand{\improved}{\marginpar{\textsc{improved}}} % Highlight improved features + +%% To by-pass errors in the HTML version. +\newstyle{SPAN}{width:20\%; float:right; text-align:left; margin-left:auto;} %% Footnotes \begin{latexonly} @@ -108,7 +115,7 @@ the processing discipline for #1 IQ queries \begin{document} -\label{sec:titlepage} +\label{titlepage} \begin{titlepage} \maketitle{} @@ -118,7 +125,7 @@ the processing discipline for #1 IQ queries } \end{center} - \begin{quotation}\textit{I can thoroughly recommend ejabberd for ease of setup -- + \begin{quotation}\textit{I can thoroughly recommend ejabberd for ease of setup --- Kevin Smith, Current maintainer of the Psi project}\end{quotation} \end{titlepage} @@ -135,31 +142,30 @@ the processing discipline for #1 IQ queries % Input introduction.tex \input{introduction} -\section{Installation from Source} -\label{sec:installation} +\section{\aname{installsource}{Installation from Source}} +\label{sec:installsource} \ind{installation} -\subsection{Installation Requirements} +\subsection{\aname{installreq}{Installation Requirements}} \label{sec:installreq} +\ind{installation!requirements} -\subsubsection{``Unix-like'' operating systems} +\subsubsection{\aname{installrequnix}{`Unix-like' operating systems}} \label{sec:installrequnix} -\ind{installation!requirements for ``Unix-like'' operating systems} -To compile \ejabberd{} on a ``Unix-like'' operating system, you need: +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 at all on systems with GNU libc). +\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) \end{itemize} -\subsubsection{Windows} +\subsubsection{\aname{installreqwin}{Windows}} \label{sec:installreqwin} -\ind{installation!requirements for Windows} To compile \ejabberd{} on a Windows flavour, you need: \begin{itemize} @@ -174,7 +180,7 @@ To compile \ejabberd{} on a Windows flavour, you need: \item \footahref{http://www.zlib.net/}{Zlib 1.2.3 or higher} \end{itemize} -\subsection{Obtaining \ejabberd{}} +\subsection{\aname{obtaining}{Obtaining \ejabberd{}}} \label{sec:obtaining} \ind{download} @@ -187,15 +193,14 @@ The latest development version can be retrieved from the Subversion repository\@ svn co http://svn.process-one.net/ejabberd/trunk ejabberd \end{verbatim} -\subsection{Compilation} -\label{sec:compilation} -\ind{compilation} +\subsection{\aname{compile}{Compilation}} +\label{sec:compile} +\ind{installation!compilation} -\subsubsection{``Unix-like'' operating systems} -\label{sec:compilationunix} -\ind{compilation!on ``Unix-like'' operating systems} +\subsubsection{\aname{compileunix}{`Unix-like' operating systems}} +\label{sec:compileunix} -Compile \ejabberd{} on a ``Unix-like'' operating system by executing: +Compile \ejabberd{} on a `Unix-like' operating system by executing: \begin{verbatim} ./configure @@ -211,9 +216,12 @@ These commands will: \item create a directory called \verb|/var/log/ejabberd| to store log files. \end{itemize} -\subsubsection{Windows} -\label{sec:compilationwin} -\ind{compilation!on Windows} +Note: if you want to use an external database, you need to execute the configure +script with the option(s) \term{--enable-odbc} or \term{--enable-odbc +--enable-mssql}. See section~\ref{sec:database} for more information. + +\subsubsection{\aname{compilewin}{Windows}} +\label{sec:compilewin} \begin{itemize} \item Install Erlang emulator (for example, into \verb|C:\Program Files\erl5.3|). @@ -246,9 +254,12 @@ werl -s ejabberd -name ejabberd \end{verbatim} \end{itemize} -\subsection{Starting} -\label{sec:starting} +%TODO: how to compile database support on windows? + +\subsection{\aname{start}{Starting}} +\label{sec:start} \ind{starting} +%TODO: update when the ejabberdctl script is made more userfriendly Execute the following command to start \ejabberd{}: \begin{verbatim} @@ -259,7 +270,7 @@ or erl -pa /var/lib/ejabberd/ebin -sname ejabberd -s ejabberd \end{verbatim} In the latter case the Erlang node will be identified using only the first part -of the host name, i.\,e. other Erlang nodes outside this domain can't contact +of the host name, i.\,e. other Erlang nodes outside this domain cannot contact this node. Note that when using the above command, \ejabberd{} will search for the @@ -297,11 +308,8 @@ To reduce memory usage, you may set the environment variable But in this case \ejabberd{} can start to work slower. -\section{Configuration} -\label{sec:configuration} - -\subsection{Initial Configuration} -\label{sec:initconfig} +\section{\aname{basicconfig}{Basic Configuration}} +\label{sec:basicconfig} \ind{configuration file} The configuration file will be loaded the first time you start \ejabberd{}. The @@ -311,7 +319,7 @@ configuration file are appended to the entries in the database. The configuration file contains a sequence of Erlang terms. Lines beginning with a \term{`\%'} sign are ignored. Each term is a tuple of which the first element is the name of an option, and any further elements are that option's values. If the -configuration file do not contain for instance the ``hosts'' option, the old +configuration file do not contain for instance the `hosts' option, the old host name(s) stored in the database will be used. @@ -325,8 +333,8 @@ the configuration file: With these lines the old global options, local options and ACLs will be removed before new ones are added. -\subsubsection{Host Names} -\label{sec:confighostname} +\subsection{\aname{hostnames}{Host Names}} +\label{sec:hostnames} \ind{options!hosts}\ind{host names} The option \option{hosts} defines a list containing one or more domains that @@ -335,191 +343,64 @@ The option \option{hosts} defines a list containing one or more domains that Examples: \begin{itemize} \item Serving one domain: -\begin{itemize} -\item \begin{verbatim} + \begin{verbatim} {hosts, ["example.org"]}. \end{verbatim} -\item Backwards compatibility with older \ejabberd{} versions can be retained - with: +\item Serving one domain, and backwards compatible with older \ejabberd{} + versions: \begin{verbatim} {host, "example.org"}. \end{verbatim} -\end{itemize} \item Serving two domains: \begin{verbatim} {hosts, ["example.net", "example.com"]}. \end{verbatim} \end{itemize} -\subsubsection{Default Language} -\label{sec:configlanguage} -\ind{options!language}\ind{language} - -The option \option{language} defines the default language of server strings that -can be seen by \Jabber{} clients. If a \Jabber{} client do not support -\option{xml:lang}, the specified language is used. The default value for the -option \option{language} is \term{"en"}. In order to take effect there must be a -translation file \term{.msg} in \ejabberd{}'s \term{msgs} directory. - -Examples: -\begin{itemize} -\item To set Russian as default language: -\begin{verbatim} - {language, "ru"}. -\end{verbatim} -\item To set Spanish as default language: -\begin{verbatim} - {language, "es"}. -\end{verbatim} -\end{itemize} - -\subsubsection{Access Rules} -\label{sec:configaccess} -\ind{options!acl}\ind{access rules}\ind{ACL}\ind{Access Control List} - -Access control in \ejabberd{} is performed via Access Control Lists (ACLs). The -declarations of ACLs in the configuration file have the following syntax: -\begin{verbatim} - {acl, , {, ...}}. -\end{verbatim} - -\term{} can be one of the following: -\begin{description} -\titem{all} Matches all JIDs. Example: -\begin{verbatim} -{acl, all, all}. -\end{verbatim} -\titem{\{user, \}} Matches the user with the name - \term{} at the first virtual host. Example: -\begin{verbatim} -{acl, admin, {user, "yozhik"}}. -\end{verbatim} -\titem{\{user, , \}} Matches the user with the JID - \term{@} and any resource. Example: -\begin{verbatim} -{acl, admin, {user, "yozhik", "example.org"}}. -\end{verbatim} -\titem{\{server, \}} Matches any JID from server - \term{}. Example: -\begin{verbatim} -{acl, exampleorg, {server, "example.org"}}. -\end{verbatim} -\titem{\{user\_regexp, \}} Matches any local user with a name that - matches \term{} at the first virtual host. Example: -\begin{verbatim} -{acl, tests, {user, "^test[0-9]*$"}}. -\end{verbatim} -%$ -\titem{\{user\_regexp, , \}} Matches any user with a name - that matches \term{} at server \term{}. Example: -\begin{verbatim} -{acl, tests, {user, "^test", "example.org"}}. -\end{verbatim} -\titem{\{server\_regexp, \}} Matches any JID from the server that - matches \term{}. Example: -\begin{verbatim} -{acl, icq, {server, "^icq\\."}}. -\end{verbatim} -\titem{\{node\_regexp, , \}} Matches any user - with a name that matches \term{} at any server that matches - \term{}. Example: -\begin{verbatim} -{acl, yohzik, {node_regexp, "^yohzik$", "^example.(com|org)$"}}. -\end{verbatim} -\titem{\{user\_glob, \}} -\titem{\{user\_glob, , \}} -\titem{\{server\_glob, \}} -\titem{\{node\_glob, , \}} This is the same as - above. However, it uses shell glob patterns instead of regexp. These patterns - can have the following special characters: - \begin{description} - \titem{*} matches any string including the null string. - \titem{?} matches any single character. - \titem{[...]} matches any of the enclosed characters. Character - ranges are specified by a pair of characters separated by a \term{`-'}. - If the first character after \term{`['} is a \term{`!'}, any - character not enclosed is matched. - \end{description} -\end{description} - -The following ACLs are pre-defined: -\begin{description} -\titem{all} Matches any JID. -\titem{none} Matches no JID. -\end{description} - -An entry allowing or denying access to different services looks similar to -this: -\begin{verbatim} - {access, , [{allow, }, - {deny, }, - ... - ]}. -\end{verbatim} -When a JID is checked to have access to \term{}, the server -sequentially checks if that JID mathes any of the ACLs that are named in the -second elements of the tuples in the list. If it matches, the first element of -the first matched tuple is returned, otherwise ``\term{deny}'' is returned. - -Example: -\begin{verbatim} - {access, configure, [{allow, admin}]}. - {access, something, [{deny, badmans}, - {allow, all}]}. -\end{verbatim} - -The following access rules are pre-defined: -\begin{description} -\titem{all} Always returns ``\term{allow}'' -\titem{none} Always returns ``\term{deny}'' -\end{description} - -\subsubsection{Shapers} -\label{sec:configshaper} -\ind{options!shaper}\ind{options!maxrate}\ind{shapers}\ind{maxrate}\ind{traffic speed} +\subsection{\aname{virtualhost}{Virtual Hosting}} +\label{sec:virtualhost} +\ind{virtual hosting}\ind{virtual hosts}\ind{virtual domains} -Shapers enable you to limit connection traffic. The syntax of -shapers is like this: -\begin{verbatim} - {shaper, , }. -\end{verbatim} -Currently only one kind of shaper called \term{maxrate} is available. It has the -following syntax: +Options can be defined separately for every virtual host using the +\term{host\_config} option.\ind{options!host\_config} It has the following +syntax: \begin{verbatim} - {maxrate, } + {host_config, , [
  • Internationalized: ejabberd leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
    • -Translated in 11 languages. +Translated in 12 languages.improved
    • Support for IDNA.


    @@ -137,7 +137,7 @@ Native MySQL support.
  • Authentication
    • -LDAP and ODBC. +LDAP and ODBC.improved
    • External Authentication script.
    • Internal Authentication.
    diff --git a/doc/guide.html b/doc/guide.html index 214f8ef7f..596a5ec91 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -221,14 +221,14 @@ Comprehensive documentation.
  • Straightforward installers for Linux, Mac OS X, and Windows.improved
  • Web interface for administration tasks.
  • Shared Roster Groups. -
  • Command line administration tool. +
  • Command line administration tool.improved
  • Can integrate with existing authentication mechanisms.
  • Capability to send announce messages.

  • Internationalized: ejabberd leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
    • -Translated in 11 languages. +Translated in 12 languages.improved
    • Support for IDNA.


    @@ -267,7 +267,7 @@ Native MySQL support.
  • Authentication
    • -LDAP and ODBC. +LDAP and ODBC.improved
    • External Authentication script.
    • Internal Authentication.
    diff --git a/doc/introduction.tex b/doc/introduction.tex index 204a51ddb..359f86929 100644 --- a/doc/introduction.tex +++ b/doc/introduction.tex @@ -59,14 +59,14 @@ Peter Saint-Andr\'e, Executive Director of the Jabber Software Foundation} \item Straightforward installers for Linux, Mac OS X, and Windows.\improved{} \item Web interface for administration tasks. \item Shared Roster Groups. -\item Command line administration tool. +\item Command line administration tool.\improved{} \item Can integrate with existing authentication mechanisms. \item Capability to send announce messages. \end{itemize} \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 12 languages. +\item Translated in 12 languages.\improved{} \item Support for \footahref{http://www.ietf.org/rfc/rfc3490.txt}{IDNA}. \end{itemize} @@ -111,7 +111,7 @@ Moreover, \ejabberd{} comes with a wide range of other state-of-the-art features \end{itemize} \item Authentication \begin{itemize} -\item LDAP and ODBC. +\item LDAP and ODBC.\improved{} \item External Authentication script. \item Internal Authentication. \end{itemize} -- cgit v1.2.3 From 5d4093b8ac4efe405ca8ec145468717ce3206ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Mon, 25 Sep 2006 10:47:52 +0000 Subject: * src/msgs/cs.msg: Updated Czech translation and removed unused strings. SVN Revision: 632 --- ChangeLog | 3 ++ src/msgs/cs.msg | 98 ++++++--------------------------------------------------- 2 files changed, 12 insertions(+), 89 deletions(-) diff --git a/ChangeLog b/ChangeLog index c6f54ae51..c8e234484 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-09-25 Mickael Remond + * src/msgs/cs.msg: Updated Czech translation and removed unused + strings. + * doc/introduction.tex: Minor doc updates for release 1.1.2. 2006-09-24 Mickael Remond diff --git a/src/msgs/cs.msg b/src/msgs/cs.msg index 0f3e4d4cf..48eb8c21e 100644 --- a/src/msgs/cs.msg +++ b/src/msgs/cs.msg @@ -46,7 +46,6 @@ {"Configuration", "Konfigurace"}. {"Online Users", "Online uživatelé"}. {"All Users", "Všichni uživatelé"}. -{"Outgoing S2S connections", "Odchozí spojení S2S"}. {"To ~s", "Pre ~s"}. {"From ~s", "Od ~s"}. {"Running Nodes", "Bežící uzly"}. @@ -55,12 +54,10 @@ {"Access Control Lists", "Seznamy přístupových práv (ACL)"}. {"Access Rules", "Pravidla přístupů"}. {"Remove Users", "Odstranit uživatele"}. -{"DB", "DB"}. {"Modules", "Moduly"}. {"Start Modules", "Spustit moduly"}. {"Stop Modules", "Zastavit moduly"}. {"Backup Management", "Správa zálohování"}. -{"Import users from jabberd1.4 spool files", "Importovat uživatele z jabberd1.4 spool souborů"}. {"Backup", "Zálohovat"}. {"Restore", "Obnovit"}. {"Dump to Text File", "Uložit do textového souboru"}. @@ -77,7 +74,6 @@ {"Search users in ", "Hledat uživatele v "}. {"Fill in fields to search for any matching Jabber User", "Vyplňte políčka pro vyhledávání Jabber uživatele"}. -{"Results of search in ", "Výsledky vyhledávání v "}. {"User", "Uživatel: "}. {"Full Name", "Celé jméno: "}. @@ -88,7 +84,6 @@ {"Birthday", "Datum narození: "}. {"Country", "Země: "}. {"City", "Město: "}. -{"email", "E-mail: "}. {"Organization Name", "Název firmy: "}. {"Organization Unit", "Oddělení: "}. @@ -101,7 +96,6 @@ "Pouze správci služby mají povolené odesílání servisních zpráv"}. {"Conference room does not exist", "Konferenční místnost neexistuje"}. {"Access denied by service policy", "Přístup byl zamítnutý nastavením služby"}. -{"You must fill in field \"nick\" in the form", "Musíte vyplnit políčko \"prezdívka\" ve formuláři"}. {"Specified nickname is already registered", "Zadaná prezdívka je již registrována"}. % mod_muc/mod_muc_room.erl @@ -110,22 +104,7 @@ "Ke konfiguraci místnosti potřebujete klienta podporujícího z x:data"}. {"Configuration for ", "Konfigurace pre "}. {"Room title", "Název místnosti"}. -{"Allow users to change subject?", "Povolit uživatelům menit téma?"}. -{"Allow users to query other users?", - "Povolit uživatelům odesílat požadavky (query) ostatním uživatelům?"}. -{"Allow users to send private messages?", - "Povolit uživatelům odesíelat soukromé zprávy?"}. -{"Make room public searchable?", "Nastavit místnost jako veřejně prohledávatelnou?"}. -{"Make participants list public?", "Nastavit seznam účastníků jako veřejný?"}. -{"Make room persistent?", "Nastavit místnost jako trvalou (persistent)?"}. -{"Make room moderated?", "Nastavit místnost jako moderovanou?"}. -{"Default users as members?", "Uživatelé jsou implicitně členy?"}. -{"Make room members only?", "Nastavit místnost jen pro členy?"}. -{"Allow users to send invites?", "Povolit uživatelům odesíelat pozvánky?"}. -{"Make room password protected?", "Chránit místnost heslem?"}. {"Password", "Heslo"}. -{"Make room anonymous?", "Nastavit místnost jako anonymní?"}. -{"Enable logging?", "Zapnout ukládání historie?"}. {"Only moderators and participants are allowed to change subject in this room", "Jen moderátoři a účastníci mají povoleno měnit téma této místnosti"}. {"Only moderators are allowed to change subject in this room", @@ -160,6 +139,9 @@ {"Invalid role: ~s", "Neplatná role: ~s"}. {"Owner privileges required", "Jsou vyžadována práva vlastníka"}. {"private, ", "soukromá, "}. +{"Make real JIDs discovered for", "Zjisti skutečné JIDy pro"}. +{"moderators only", "pouze pro moderátory"}. +{"anyone", "každý"}. % mod_irc/mod_irc.erl {"You need an x:data capable client to configure mod_irc settings", @@ -173,91 +155,57 @@ {"Encodings", "Kódování"}. % web/ejabberd_web_admin.erl -{"ejabberd administration", "Administrace Ejabberd"}. {"Users", "Uživatelé"}. {"Nodes", "Uzly"}. {"Statistics", "Statistiky"}. -{"(raw)", "(zdroj)"}. -{"submitted", "odeslané"}. -{"bad format", "nesprávný formát"}. -{"raw", "zdroj"}. -{"ejabberd access control lists configuration", "Konfigurace seznamu přístupových práv (ACL) Ejabberd"}. +{"Submitted", "Odeslané"}. +{"CPU Time:", "Čas procesoru"}. {"Delete Selected", "Smazat vybrané"}. {"Submit", "Odeslat"}. -{"ejabberd access rules configuration", "Konfigurace pravidel přístupů Ejabberd"}. {"~s access rule configuration", "~s konfigurace pravidla přístupu"}. -{"ejabberd users", "Uživatelé Ejabberd"}. -{"ejabberd stats", "Statistiky Ejabberd"}. {"Node not found", "Uzel nenalezen"}. {"Add New", "Přidat nový"}. -{"Registered users", "Registrovaní uživatelé"}. -{"Online users", "Online uživatelé"}. -{"Outgoing S2S servers", "Servery S2S pro odchozí komunikaci"}. {"Change Password", "Změnit heslo"}. {"Connected Resources:", "Připojené zdroje:"}. {"Password:", "Heslo:"}. {"None", "Nic"}. {"Node ", "Uzel "}. -{"DB Management", "Správa databáze"}. -{"Listened Ports Management", "Správa otevřených portů"}. {"Restart", "Restart"}. {"Stop", "Stop"}. -{"RPC call error", "Chyba RPC volání"}. -{"DB Tables at ", "Databázové tabulky na "}. {"Name", "Jméno"}. {"Storage Type", "Typ úložiště"}. {"Size", "Velikost"}. {"Memory", "Paměť"}. -{"Backup Management at ", "Správa záloh na "}. -{"Store a backup in a file", "Uložit zálohu do souboru "}. {"OK", "OK"}. -{"Restore a backup from a file", "Obnovit zálohu ze souboru"}. -{"Install a database fallback from a file", "Instalovat nouzovou (fallback) databázi ze souboru"}. -{"Dump a database in a text file", "Uložit databázi do textového souboru"}. -{"Restore a database from a text file", "Obnovit databázi z textového souboru"}. {"Listened Ports at ", "Otevřené porty na "}. -{"~p statistics", "~p statistiky"}. -{"Uptime", "Čas běhu"}. -{"CPU Time", "Čas procesoru"}. -{"Transactions commited", "Transakce potvrzena"}. -{"Transactions aborted", "Transakce zrušena"}. -{"Transactions restarted", "Transakce restartována"}. -{"Transactions logged", "Transakce zaznamenána"}. {"Port", "Port"}. {"Module", "Modul"}. {"Options", "Nastavení"}. {"Update", "Aktualizovat"}. {"Delete", "Smazat"}. {"Add User", "Přidat uživatele"}. -{"Offline messages", "Offline zprávy"}. {"Last Activity", "Poslední aktivita"}. {"Never", "Nikdy"}. -{"~s offline messages queue", "~s offline zpráv(y)"}. {"Time", "Čas"}. {"From", "Od"}. {"To", "Pro"}. {"Packet", "Paket"}. -{"Offline messages:", "Offline zprávy:"}. {"Roster", "Seznam kontaktů"}. {"Nickname", "Prezdívka"}. {"Subscription", "Přihlášení"}. {"Pending", "Čekající"}. {"Groups", "Skupiny"}. {"Remove", "Odstranit"}. -{"Add JID", "Přidat JID"}. {"User ", "Uživatel "}. {"Roster of ", "Seznam kontaktů "}. {"Shared Roster", "Sdílený seznam kontaktů"}. {"Online", "Online"}. {"Validate", "Ověřit"}. -{"Not found", "Nenalezeno"}. -{"Shared roster groups", "Skupiny pre sdíelený seznam kontaktů"}. {"Name:", "Jméno:"}. {"Description:", "Popis:"}. {"Members:", "Členové:"}. {"Displayed Groups:", "Zobrazené skupiny:"}. {"Group ", "Skupina "}. -{"Users last activity", "Poslední aktivita uživatele"}. {"Period: ", "Čas:"}. {"Last month", "Poslední měsíc"}. {"Last year", "Poslední rok"}. @@ -265,35 +213,21 @@ {"Show Ordinary Table", "Zobrazit bežnou tabulku"}. {"Show Integral Table", "Zobrazit kompletní tabulku"}. {"Start", "Start"}. -{"Modules Management", "Správa modulů"}. {"Modules at ", "Moduly na "}. -{"No data", "Žádná data"}. {"Virtual Hosts", "Virtuální servery"}. {"ejabberd virtual hosts", "Ejabberd virtuální servery"}. {"Host", "Server"}. {"ejabberd Web Interface", "Ejabberd Web rozhraní"}. % mod_vcard_odbc.erl -{"Erlang Jabber Server\nCopyright (c) 2002-2005 Alexey Shchepin", - "Erlang Jabber Server\nCopyright (c) 2002-2005 Alexey Shchepin"}. {"Fill in the form to search for any matching Jabber User (Add * to the end of field to match substring)", "Pro vyhledání Jabber uživatele vyplňte formulář (přidejte znak * na konec, pro vyhledání podřetězce)"}. -{"ejabberd vCard module\nCopyright (c) 2003-2005 Alexey Shchepin", "Ejabberd vCard modul\nCopyright (c) 2003-2005 Alexey Shchepin"}. -{"JID", "JID"}. % ejabberd_c2s.erl {"Use of STARTTLS required", "Je vyžadováno STARTTLS."}. {"Replaced by new connection", "Nahrazeno novým spojením"}. -% mod_configure.erl -{"DB Tables Configuration at ", "Databázové tabulky s konfigurácí na "}. - -% mod_vcard_ldap.erl -{"Given Name", "Křestní jméno"}. - % mod_pubsub/mod_pubsub.erl -{"ejabberd pub/sub module\nCopyright (c) 2003-2005 Alexey Shchepin", - "Ejabberd pub/sub modul\nCopyright (c) 2003-2005 Alexey Shchepin"}. {[], " "}. {"Node Creator", "Majitel uzlu"}. {"Deliver payloads with event notifications", "Doručovat náklad s upozorněním na událost"}. @@ -310,27 +244,12 @@ {"Only deliver notifications to available users", "Doručovat upozornení jen aktuálně přihlášeným uživatelům"}. {"Specify the current subscription approver", "Zadat současného schvalovatele přihlášení "}. -% web/ejabberd_web_admin.erl -{"ejabberd (c) 2002-2005 Alexey Shchepin, 2004-2005 Process One", - "Ejabberd (c) 2002-2005 Alexey Shchepin, 2004-2005 Process One"}. -{"(raw)", "(zdroj)"}. -{"raw", "zdroj"}. -{"Authenticated users", "Ověření uživatelé"}. - % mod_irc/mod_irc.erl -{"ejabberd IRC module\nCopyright (c) 2003-2005 Alexey Shchepin", - "Ejabberd IRC module\nCopyright (c) 2003-2005 Alexey Shchepin"}. {"If you want to specify different encodings for IRC servers, fill this list with values in format '{\"irc server\", \"encoding\"}'. By default this service use \"~s\" encoding.", "Pokud chcete zadat jiné kódování pro IRC servery, vyplňte seznam s hodnotami ve formátě '{\"irc server\",\"encoding\"}'. Předvolené kódování pro tuto službu je \"~s\"."}. % mod_muc/mod_muc.erl {"Room creation is denied by service policy", "Vytváranie miestnosti nie je povolené"}. -{"ejabberd MUC module\nCopyright (c) 2003-2005 Alexey Shchepin", "Ejabberd MUC modul\nCopyright (c) 2003-2005 Alexey Shchepin"}. - -% Local Variables: -% mode: erlang -% End: - % /usr/home/src/ejabberd/ejabberd/src/mod_vcard_odbc.erl {"Erlang Jabber Server\nCopyright (c) 2002-2006 Alexey Shchepin", @@ -378,7 +297,6 @@ {"ejabberd (c) 2002-2006 Alexey Shchepin, 2004-2006 Process One", "Ejabberd (c) 2002-2006 Alexey Shchepin, 2004-2006 Process One"}. {"(Raw)", "(Zdroj)"}. -{"Submitted", "Odeslané"}. {"Bad format", "Nesprávný formát"}. {"Raw", "Zdroj"}. {"Users Last Activity", "Poslední aktivita uživatele"}. @@ -407,7 +325,6 @@ {"Restore plain text backup immediately:", "Okamžitě obnovit zálohu z textového souboru:"}. {"Statistics of ~p", "Statistiky ~p"}. {"Uptime:", "Čas běhu"}. -{"CPU Time:", "Čas procesoru"}. {"Transactions Commited:", "Transakce potvrzena"}. {"Transactions Aborted:", "Transakce zrušena"}. {"Transactions Restarted:", "Transakce restartována"}. @@ -464,7 +381,6 @@ {"Make room public searchable", "Nastavit místnost jako veřejně prohldávatelnou"}. {"Make participants list public", "Nastavit seznam účastníků jako veřejný"}. {"Make room password protected", "Chránit místnost heslem"}. -{"Make room semianonymous", "Nastavit místnost jako částečně anonymní"}. {"Make room members-only", "Nastavit místnost jen pro členy"}. {"Make room moderated", "Nastavit místnost jako moderovanou"}. {"Default users as participants", "Uživatelé jsou implicitně členy"}. @@ -475,3 +391,7 @@ {"Enable logging", "Zapnout ukládání historie"}. {"Description", "Popis"}. {"Number of occupants", "Počet účastníků"}. + +% Local Variables: +% mode: erlang +% End: -- cgit v1.2.3 From b2acdac5fa9e04556bd8dc8812b17de3f55ed895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Mon, 25 Sep 2006 14:30:44 +0000 Subject: * src/msgs/nl.msg: Updated Dutch translation (thanks to Sander Devrieze). SVN Revision: 634 --- ChangeLog | 5 ++++- src/msgs/nl.msg | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8e234484..29077cd97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,10 @@ 2006-09-25 Mickael Remond + * src/msgs/nl.msg: Updated Dutch translation (thanks to Sander + Devrieze). + * src/msgs/cs.msg: Updated Czech translation and removed unused - strings. + strings. * doc/introduction.tex: Minor doc updates for release 1.1.2. diff --git a/src/msgs/nl.msg b/src/msgs/nl.msg index 7b2025b46..4359313b6 100644 --- a/src/msgs/nl.msg +++ b/src/msgs/nl.msg @@ -7,7 +7,6 @@ {"Fill in fields to search for any matching Jabber User", "Vul de velden in om te zoeken naar Jabber-gebruikers op deze server"}. {"User", "Gebruiker"}. {"Full Name", "Volledige naam"}. -{"Given Name", "Voornaam"}. {"Middle Name", "Tussennaam"}. {"Family Name", "Achternaam"}. {"Nickname", "Bijnaam"}. @@ -168,7 +167,6 @@ {"Make room public searchable", "Chatruimte doorzoekbaar maken"}. {"Make participants list public", "Deelnemerslijst publiek maken"}. {"Make room password protected", "Chatruimte beveiligen met een wachtwoord"}. -{"Make room semianonymous", "Chatruimte gedeeltelijk anoniem maken"}. {"Make room members-only", "Chatruimte enkel toegankelijk maken voor leden"}. {"Make room moderated", "Chatruimte gemodereerd maken"}. {"Default users as participants", "Gebruikers standaard instellen als deelnemers"}. @@ -180,6 +178,9 @@ {"You need an x:data capable client to configure room", "U hebt een client nodig die x:data ondersteunt om deze chatruimte in te stellen"}. {"Description", "Beschrijving"}. {"Number of occupants", "Aantal aanwezigen"}. +{"Make real JIDs discovered for", "Jabber ID's kunnen achterhaald worden door"}. +{"moderators only", "moderators"}. +{"anyone", "iedereen"}. % mod_irc/mod_irc.erl {"ejabberd IRC module\nCopyright (c) 2003-2006 Alexey Shchepin", "ejabberd's IRC-module\nCopyright (c) 2003-2006 Alexey Shchepin"}. -- cgit v1.2.3 From 9d7006dfa24d611315a09de3a94d6b473346b809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Mon, 25 Sep 2006 14:41:33 +0000 Subject: * src/msgs/de.msg: Updated German translation (thanks to Marvin Preuss). SVN Revision: 635 --- ChangeLog | 3 +++ src/msgs/de.msg | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29077cd97..b0e067a5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-09-25 Mickael Remond + * src/msgs/de.msg: Updated German translation (thanks to Marvin + Preuss). + * src/msgs/nl.msg: Updated Dutch translation (thanks to Sander Devrieze). diff --git a/src/msgs/de.msg b/src/msgs/de.msg index 405d54fdc..a482d1fd3 100644 --- a/src/msgs/de.msg +++ b/src/msgs/de.msg @@ -236,9 +236,6 @@ {"Group ", "Gruppe "}. {"ejabberd Web Interface", "ejabberd Web Interface"}. -% mod_vcard_ldap.erl -{"Given Name", "Vorname"}. - % ejabberd_c2s.erl {"Use of STARTTLS required", "Verwendung von STARTTLS erforderlich"}. {"Replaced by new connection", "Durch neue Verbindung ersetzt"}. @@ -352,7 +349,6 @@ {"Make room public searchable", "Raum öffentlich durchsuchbar machen"}. {"Make participants list public", "Teilnehmerliste öffentlich machen"}. {"Make room password protected", "Raum passwortgeschützt machen"}. -{"Make room semianonymous", "Raum semi-anonym machen"}. {"Make room members-only", "Raum members-only machen"}. {"Make room moderated", "Raum modieriert machen"}. {"Default users as participants", "Standartbenutzer als Teilnehmer"}. @@ -363,6 +359,10 @@ {"Enable logging", "Log-Funktion aktivieren"}. {"Description", "Beschreibung"}. {"Number of occupants", "Anzahl der Teilnehmer"}. +{"Make real JIDs discovered for", "Jabber IDs können eingesehen werden +für"}. +{"moderators only", "Nur Moderatoren"}. +{"anyone", "Jeder"}. % Local Variables: % mode: erlang -- cgit v1.2.3 From 37f56859e7e187427fd03d2ca32476d507a102c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Mon, 25 Sep 2006 15:19:09 +0000 Subject: * src/msgs/pl.msg: Updated German translation (thanks to Zbyszek Zolkiewski). SVN Revision: 636 --- ChangeLog | 3 ++ src/msgs/pl.msg | 107 ++++++++++---------------------------------------------- 2 files changed, 21 insertions(+), 89 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0e067a5d..19e30bacd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-09-25 Mickael Remond + * src/msgs/pl.msg: Updated German translation (thanks to Zbyszek + Zolkiewski). + * src/msgs/de.msg: Updated German translation (thanks to Marvin Preuss). diff --git a/src/msgs/pl.msg b/src/msgs/pl.msg index 5dc0e1a1a..e14b53b21 100644 --- a/src/msgs/pl.msg +++ b/src/msgs/pl.msg @@ -43,7 +43,6 @@ {"Configuration", "Konfiguracja"}. {"Online Users", "Użytkownicy zalogowani"}. {"All Users", "Wszyscy użytkownicy"}. -{"Outgoing S2S connections", "Wychodzące połączenia S2S"}. {"To ~s", "Do ~s"}. {"From ~s", "Z ~s"}. {"Running Nodes", "Uruchomione gałęzie"}. @@ -52,12 +51,10 @@ {"Access Control Lists", "Lista dostępowa"}. {"Access Rules", "Zasady dostępu"}. {"Remove Users", "Usuń użytkowników"}. -{"DB", "DB"}. {"Modules", "Moduły"}. {"Start Modules", "Uruchom moduły"}. {"Stop Modules", "Zatrzymaj moduły"}. {"Backup Management", "Zarządzanie kopiami zapasowymi"}. -{"Import users from jabberd1.4 spool files", "Importowanie użytkowników z plikow spoool serwera jabberd1.4"}. {"Backup", "Tworzenie kopii"}. {"Restore", "Odtwarzanie kopii"}. {"Dump to Text File", "Zrzucanie do pliku tekstowego"}. @@ -74,7 +71,6 @@ {"Search users in ", "Wyszukaj użytkowników w "}. {"Fill in fields to search for any matching Jabber User", "Wypełnij pola aby znaleźdź pasujących użytkowników Jabbera"}. -{"Results of search in ", "Wyniki wyszukiwania w "}. {"User", "Użytkownik: "}. {"Full Name", "Pełna nazwa: "}. @@ -85,7 +81,6 @@ {"Birthday", "Data urodzenia: "}. {"Country", "Państwo: "}. {"City", "Miasto: "}. -{"email", "E-Mail: "}. {"Organization Name", "Nazwa organizacji: "}. {"Organization Unit", "Dział: "}. @@ -98,7 +93,6 @@ "Jedynie administrator może wysyłać wiadomości serwisowe"}. {"Conference room does not exist", "Pokój konferencyjny nie istnieje"}. {"Access denied by service policy", "Dostęp zabroniony przez zabezpieczenia serwera"}. -{"You must fill in field \"nick\" in the form", "Musisz wypełnić pole \"nick\" w formularzu"}. {"Specified nickname is already registered", "Podany nick jest już zarejestrowany"}. % mod_muc/mod_muc_room.erl @@ -107,25 +101,7 @@ "Potrzebujesz klienta kompatybilnego z x:data aby skonfigurować pokój"}. {"Configuration for ", "Konfiguracja dla "}. {"Room title", "Tytuł pokoju"}. -{"Allow users to change subject?", "Zezwolić użytkownikom na zmianę tematu?"}. -{"Allow users to query other users?", - "Zezwolić użytkownikom na zapraszanie innych użytkowników?"}. -{"Allow users to send private messages?", - "Zezwolić użytkownikom na wysyłanie prywatnych wiadomości?"}. -{"Make room public searchable?", "Uczynić pokój wyszukiwalnym publicznie?"}. -{"Make participants list public?", "Uczynic obecnych wyszukiwalnymi publicznie?"}. -{"Make room persistent?", "Uczynić pokój trwałym?"}. -{"Make room moderated?", "Uczynić pokój moderowanym?"}. -{"Default users as members?", - "Domyślni użytkownicy jako członkowie?"}. -{"Make room members only?", - "Uczynić pokój tylko dla członków?"}. -{"Allow users to send invites?", - "Pozwolić użytkownikom na wysyłanie zaproszeń?"}. -{"Make room password protected?", "Czy zabezpieczyć pokój hasłem?"}. {"Password", "Hasło"}. -{"Make room anonymous?", "Uczynić pokój anonimowym?"}. -{"Enable logging?", "Włączyć logowanie?"}. {"Only moderators and participants are allowed to change subject in this room", "Tylko moderatorzy i wlasciciele mogą zmienić temat tego pokoju"}. {"Only moderators are allowed to change subject in this room", @@ -160,6 +136,9 @@ {"Invalid role: ~s", "Nieprawidłowa rola: ~s"}. {"Owner privileges required", "Wymagane uprawnienia właściciela "}. {"private, ", "prywatny, "}. +{"Make real JIDs discovered for", "Kto może widzieć prawdziwe JIDy?"}. +{"moderators only", "tylko moderatorzy"}. +{"anyone", "każdy"}. % mod_irc/mod_irc.erl {"You need an x:data capable client to configure mod_irc settings", @@ -173,91 +152,55 @@ {"Encodings", "Kodowania"}. % web/ejabberd_web_admin.erl -{"ejabberd administration", "Administracja serwerem Ejabberd"}. {"Users", "Użytkownicy"}. {"Nodes", "Gałęzie"}. {"Statistics", "Statystyki"}. -{"(raw)", "(raw)"}. -{"submitted", "przesłane"}. -{"bad format", "zły format"}. -{"raw", "raw"}. -{"ejabberd access control lists configuration", "Lista konfiguracyjna dostępu do serwera EJabberd"}. {"Delete Selected", "Usuń zaznaczone"}. {"Submit", "Wprowadź"}. -{"ejabberd access rules configuration", "Konfiguracja zasad dostępu do serwera EJabberd"}. {"~s access rule configuration", "~s konfiguracja zasad dostępu"}. -{"ejabberd users", "Użytkownicy EJabberd"}. -{"ejabberd stats", "Statystyki EJabberd"}. {"Node not found", "Gałąź nie znaleziona"}. {"Add New", "Dodaj nowe"}. -{"Registered users", "Zarejestrowani użytkownicy"}. -{"Online users", "Użytkownicy online"}. -{"Outgoing S2S servers", "Sewery zewnętrzne S2S"}. {"Change Password", "Zmień hasło"}. {"Connected Resources:", "Zasoby podłączone"}. {"Password:", "Hasło:"}. {"None", "Brak"}. {"Node ", "Gałąź "}. -{"DB Management", "Zarządzanie bazą danych"}. -{"Listened Ports Management", "Zarządzanie portami nasłuchującymi"}. {"Restart", "Restart"}. {"Stop", "Stop"}. -{"RPC call error", "Błąd RPC"}. -{"DB Tables at ", "Tabele bazy danych "}. {"Name", "Nazwa"}. {"Storage Type", "Typ bazy"}. {"Size", "Wielkość"}. {"Memory", "Pamięć"}. -{"Backup Management at ", "Zarządzanie kopiami zapasowymi "}. -{"Store a backup in a file", "Zachowaj kopie zapasowa w pliku "}. {"OK", "OK"}. -{"Restore a backup from a file", "Odtwórz kopię zapasową z pliku"}. -{"Install a database fallback from a file", "Przywróć zapisaną kopię z pliku"}. -{"Dump a database in a text file", "Zrzuć bazę danych do pliku tekstowego"}. -{"Restore a database from a text file", "Odtwórz bazę danych z pliku tekstowego"}. {"Listened Ports at ", "Porty nasłuchujące "}. -{"~p statistics", "~p statystyka"}. -{"Uptime", "Uptime"}. -{"CPU Time", "Czas procesora"}. -{"Transactions commited", "Tarnsakcje rozpoczęte"}. -{"Transactions aborted", "Transakcje anulowane"}. -{"Transactions restarted", "Transakcje zrestartowane"}. -{"Transactions logged", "Transakcje logowane"}. {"Port", "Port"}. {"Module", "Moduł"}. {"Options", "Opcje"}. {"Update", "Aktualizacja"}. {"Delete", "Usuń"}. {"Add User", "Dodaj użytkownika"}. -{"Offline messages", "Wiadomości offline"}. {"Last Activity", "Ostatnia aktywność"}. {"Never", "Nigdy"}. -{"~s offline messages queue", "~s wiadomości offline w kolejce"}. {"Time", "Czas"}. {"From", "Od"}. {"To", "Do"}. {"Packet", "Pakiet "}. -{"Offline messages:", "Wiadomości offline: "}. {"Roster", "Roster "}. {"Nickname", "Nick "}. {"Subscription", "Subskrypcja "}. {"Pending", "Oczekiwanie "}. {"Groups", "Grupy "}. {"Remove", "Usuń "}. -{"Add JID", "Dodaj JID "}. {"User ", "Użytkownik "}. {"Roster of ", "Roster "}. {"Shared Roster", "Roster współdzielony"}. {"Online", "Dostępny"}. {"Validate", "Zatwierdź"}. -{"Not found", "Nie znaleziony"}. -{"Shared roster groups", "Grupy rosterów współdzielonych"}. {"Name:", "Nazwa:"}. {"Description:", "Opis:"}. {"Members:", "Członkowie:"}. {"Displayed Groups:", "Wyświetlane grupy:"}. {"Group ", "Grupa "}. -{"Users last activity", "Ostatnia aktywność użytkowników"}. {"Period: ", "Przedział czasu "}. {"Last month", "Ostatni miesiąc"}. {"Last year", "Ostatni rok"}. @@ -265,32 +208,20 @@ {"Show Ordinary Table", "Pokaż zwykłą tabelę"}. {"Show Integral Table", "Pokaż tabelę całkowitą"}. {"Start", "Start"}. -{"Modules Management", "Zarządzanie modułami"}. {"Modules at ", "Moduły na "}. -{"No data", "Brak danych"}. {"Virtual Hosts", "Wirtualne hosty"}. {"ejabberd virtual hosts", "wirtualne hosty ejabberda"}. {"Host", "Host"}. {"ejabberd Web Interface", ""}. % mod_vcard_odbc.erl -{"Erlang Jabber Server\nCopyright (c) 2002-2005 Alexey Shchepin", "Erlang Jabber Server\nCopyright (c) 2002-2005 Alexey Shchepin"}. {"Fill in the form to search for any matching Jabber User (Add * to the end of field to match substring)", "Wypełnij formularz aby wyszukać pasujących użytkowników Jabbera (dodaj * na koniec pola aby dopasować)"}. -{"ejabberd vCard module\nCopyright (c) 2003-2005 Alexey Shchepin", "ejabberd vCard module\nCopyright (c) 2003-2005 Alexey Shchepin"}. -{"JID", "JID"}. % ejabberd_c2s.erl {"Use of STARTTLS required", "Wymagane użycie STARTTLS"}. {"Replaced by new connection", ""}. -% mod_configure.erl -{"DB Tables Configuration at ", "Konfiguracja tabel bazy dla "}. - -% mod_vcard_ldap.erl -{"Given Name", "Nadana nazwa"}. - % mod_pubsub/mod_pubsub.erl -{"ejabberd pub/sub module\nCopyright (c) 2003-2005 Alexey Shchepin", "ejabberd pub/sub module\nCopyright (c) 2003-2005 Alexey Shchepin"}. {[], " "}. {"Node Creator", "Tworzenie gałęzi"}. {"Deliver payloads with event notifications", "Do?cz zawarto? publikowanego przedmiotu podczas wysy?nia powiadomienia o publikacji"}. @@ -307,31 +238,18 @@ {"Only deliver notifications to available users", "Dostarczaj notyfikacje tylko do osiągalnych użytkowników"}. {"Specify the current subscription approver", "Wyznacz aprobującego obecne subskrypcje "}. -% web/ejabberd_web_admin.erl -{"ejabberd (c) 2002-2005 Alexey Shchepin, 2004-2005 Process One", "ejabberd (c) 2002-2005 Alexey Shchepin, 2004-2005 Process One"}. -{"(raw)", "(raw)"}. -{"raw", "raw"}. -{"Authenticated users", "Użytkownicy zautoryzowani"}. - % mod_irc/mod_irc.erl -{"ejabberd IRC module\nCopyright (c) 2003-2005 Alexey Shchepin", "ejabberd IRC module\nCopyright (c) 2003-2005 Alexey Shchepin"}. {"If you want to specify different encodings for IRC servers, fill this list with values in format '{\"irc server\", \"encoding\"}'. By default this service use \"~s\" encoding.", "Jeśli chcesz ustawić inne kodowanie dla serwerów IRC, wypełnij tą listę wartościami w formacie '{\"irc server\",\"encoding\"}'. Jako domyślne ten serwis używa kodowania \"~s\"."}. % mod_muc/mod_muc.erl {"Room creation is denied by service policy", "Tworzenie pokoju jest zabronione przez polisę"}. -{"ejabberd MUC module\nCopyright (c) 2003-2005 Alexey Shchepin", "ejabberd MUC module\nCopyright (c) 2003-2005 Alexey Shchepin"}. - -% Local Variables: -% mode: erlang -% End: - % /usr/home/src/ejabberd/ejabberd/src/mod_vcard_odbc.erl -{"Erlang Jabber Server\nCopyright (c) 2002-2006 Alexey Shchepin", ""}. +{"Erlang Jabber Server\nCopyright (c) 2002-2006 Alexey Shchepin", "Erlang Jabber Server\nCopyright (c) 2002-2006 Alexey Shchepin"}. {"Email", ""}. -{"ejabberd vCard module\nCopyright (c) 2003-2006 Alexey Shchepin", ""}. +{"ejabberd vCard module\nCopyright (c) 2003-2006 Alexey Shchepin", "Erlang Jabber Server\nCopyright (c) 2002-2006 Alexey Shchepin"}. {"Search Results for ", "Wyniki wyszukiwania dla "}. -{"Jabber ID", ""}. +{"Jabber ID", "Jabber ID"}. % /usr/home/src/ejabberd/ejabberd/src/mod_adhoc.erl {"Commands", "Polecenia"}. @@ -450,7 +368,6 @@ {"Make room public searchable", "Pozwól wyszukiwać pokój"}. {"Make participants list public", "Upublicznij listę uczestników"}. {"Make room password protected", "Zabezpiecz pokój hasłem"}. -{"Make room semianonymous", "Utwórz pokój pół-nieznanym"}. {"Make room members-only", "Utwórz pokój tylko dla członków"}. {"Make room moderated", "Moderuj pokój"}. {"Default users as participants", "Domyślni użytkownicy jako uczestnicy"}. @@ -461,3 +378,15 @@ {"Enable logging", "Włącz logowanie"}. {"Description", "Opis"}. {"Number of occupants", "Liczba uczestników"}. + +% mod_vcard_ldap.erl +{"Erlang Jabber Server\nCopyright (c) 2002-2006 Alexey Shchepin", "Erlang Jabber Server\nCopyright (c) 2002-2006 Alexey Shchepin"}. +{"ejabberd vCard module\nCopyright (c) 2003-2006 Alexey Shchepin", "ejabberd vCard module\nCopyright (c) 2003-2006 Alexey Shchepin"}. +{"Jabber ID", "Jabber ID"}. + +% mod_vcard.erl +{"Email", "E-mail"}. + +% Local Variables: +% mode: erlang +% End: -- cgit v1.2.3 From 751fbec0b6ff3f77b5844bbf37cfd7a637f7d114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Mon, 25 Sep 2006 15:36:17 +0000 Subject: ChangeLog typo SVN Revision: 637 --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 19e30bacd..414c1066b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2006-09-25 Mickael Remond - * src/msgs/pl.msg: Updated German translation (thanks to Zbyszek + * src/msgs/pl.msg: Updated Polish translation (thanks to Zbyszek Zolkiewski). * src/msgs/de.msg: Updated German translation (thanks to Marvin -- cgit v1.2.3 From 4646bf818aff80acb3d1c0735fa17c4fa070ea0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Mon, 25 Sep 2006 20:53:55 +0000 Subject: * src/ejabberd.app: Version update for ejabberd 1.1.2. SVN Revision: 638 --- ChangeLog | 2 ++ src/ejabberd.app | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 414c1066b..5dfb4aa7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-09-25 Mickael Remond + * src/ejabberd.app: Version update for ejabberd 1.1.2. + * src/msgs/pl.msg: Updated Polish translation (thanks to Zbyszek Zolkiewski). diff --git a/src/ejabberd.app b/src/ejabberd.app index 234d78819..ea87c9215 100644 --- a/src/ejabberd.app +++ b/src/ejabberd.app @@ -2,7 +2,7 @@ {application, ejabberd, [{description, "ejabberd"}, - {vsn, "1.1.1"}, + {vsn, "1.1.2"}, {modules, [acl, configure, cyrsasl, -- cgit v1.2.3 From 539000bf6248fb3c3591193782755bb218658a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Mon, 25 Sep 2006 22:06:37 +0000 Subject: * src/msgs/de.msg: Updated German translation (thanks to Nikolaus Polak). SVN Revision: 639 --- ChangeLog | 3 +++ src/msgs/de.msg | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5dfb4aa7c..4a7be8bb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-09-25 Mickael Remond + * src/msgs/de.msg: Updated German translation (thanks to Nikolaus + Polak). + * src/ejabberd.app: Version update for ejabberd 1.1.2. * src/msgs/pl.msg: Updated Polish translation (thanks to Zbyszek diff --git a/src/msgs/de.msg b/src/msgs/de.msg index a482d1fd3..16853429a 100644 --- a/src/msgs/de.msg +++ b/src/msgs/de.msg @@ -359,10 +359,9 @@ {"Enable logging", "Log-Funktion aktivieren"}. {"Description", "Beschreibung"}. {"Number of occupants", "Anzahl der Teilnehmer"}. -{"Make real JIDs discovered for", "Jabber IDs können eingesehen werden -für"}. -{"moderators only", "Nur Moderatoren"}. -{"anyone", "Jeder"}. +{"Make real JIDs discovered for", "Echte Jabber IDs anzeigen für"}. +{"moderators only", "nur Moderatoren"}. +{"anyone", "jeden"}. % Local Variables: % mode: erlang -- cgit v1.2.3 From d9487135c05bba0f2c77c7a7585f3c49ee735ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Tue, 26 Sep 2006 10:31:53 +0000 Subject: * src/msgs/pt-br.msg: Updated Brazilian translation (thanks to Renato Botelho) and clean-up. SVN Revision: 640 --- ChangeLog | 5 ++++ src/msgs/pt-br.msg | 73 +++++------------------------------------------------- 2 files changed, 11 insertions(+), 67 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a7be8bb2..d5506215f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-09-26 Mickael Remond + + * src/msgs/pt-br.msg: Updated Brazilian translation (thanks to + Renato Botelho) and clean-up. + 2006-09-25 Mickael Remond * src/msgs/de.msg: Updated German translation (thanks to Nikolaus diff --git a/src/msgs/pt-br.msg b/src/msgs/pt-br.msg index 371911e44..f63d4cdc7 100644 --- a/src/msgs/pt-br.msg +++ b/src/msgs/pt-br.msg @@ -47,15 +47,12 @@ {"Backup", "Salvar cópia de segurança"}. {"Backup Management", "Gestão de copia de segurança"}. {"Configuration", "Configuração"}. -{"DB", "BD"}. {"Dump to Text File", "Exportar para arquivo de texto"}. {"From ~s", "De ~s"}. {"Import Directory", "Importar diretório"}. {"Import File", "Importar arquivo"}. -{"Import users from jabberd1.4 spool files", "Importar usuários a partir de arquivos da spool do jabberd1.4"}. {"Modules", "Módulos"}. {"Online Users", "Usuários conectados"}. -{"Outgoing S2S connections", "Conexões S2S de saída"}. {"Remove Users", "Remover usuários"}. {"Restore", "Restaurar"}. {"Running Nodes", "Nos em execução"}. @@ -74,7 +71,6 @@ {"City", "Cidade"}. {"Country","País"}. {"ejabberd vCard module\nCopyright (c) 2003-2006 Alexey Shchepin", "Módulo vCard para ejabberd\nCopyright (c) 2002-2006 Alexey Shchepin"}. -{"email", "e-mail"}. {"Erlang Jabber Server\nCopyright (c) 2002-2006 Alexey Shchepin", "Servidor Jabber em Erlang\nCopyright (c) 2002-2006 Alexey Shchepin"}. {"Family Name", "Nome de família"}. {"Fill in fields to search for any matching Jabber User", "Preencha os campos para procurar usuários Jabber coincidentes"}. @@ -85,7 +81,6 @@ {"Nickname", "Nick"}. {"Organization Name", "Nome da organização"}. {"Organization Unit", "Unidade da organização"}. -{"Results of search in ", "Resultados da busca em "}. {"Search users in ", "Procurar usuários em "}. {"User", "Usuário"}. {"You need an x:data capable client to search", "Necessitas um cliente com suporte de x:data para poder buscar"}. @@ -110,19 +105,11 @@ {"Whether to allow subscriptions", "Permitir subscrições"}. % mod_muc/mod_muc.erl -{"Allow users to change subject?", "Permitir aos usuários mudar o tópico?"}. -{"Allow users to query other users?", "Permitir aos usuários consultar outros usuários?"}. -{"Allow users to send invites?", "Permitir que os usuários enviem convites?"}. -{"Allow users to send private messages?", "Permitir que os usuários enviem mensagens privadas?"}. -{"Default users as members?", "Os usuários padrão são membros?"}. -{"Enable logging?", "Salvar históricos?"}. {"Access denied by service policy", "Aceso denegado por la política do serviço"}. {"Conference room does not exist", "La sala de conferencias não existe"}. {"ejabberd MUC module\nCopyright (c) 2003-2006 Alexey Shchepin", "Módulo de MUC para ejabbed\nCopyright (c) 2002-2006 Alexey Shchepin"}. {"Enter nickname you want to register", "Introduza o apelido que quer registrar"}. {"Incorrect password", "Senha incorreta"}. -{"Make room anonymous?", "Tornar a sala anônima?"}. -{"Make room password protected?", "Proteger a sala com senha?"}. {"Nickname is already in use by another occupant", "O apelido já está em uso por outro ocupante"}. {"Nickname is registered by another person", "O apelido já está registrado por outra pessoa"}. {"Nickname Registration at ", "Registro do apelido em "}. @@ -131,18 +118,11 @@ {"Password", "Senha"}. {"Room creation is denied by service policy", "Se te a denegado criar la sala por política do serviço"}. {"Specified nickname is already registered", "O apelido especificado já está registrado"}. -{"You must fill in field \"nick\" in the form", "Deve preencher o campo \"apelido\" no formulário"}. {"You need an x:data capable client to register nickname", "Necessitas um cliente com suporte de x:data para poder registrar o nick"}. % mod_muc/mod_muc_room.erl {"Administrator privileges required", "Se necessita privilégios de administrador"}. -{"Allow users to change subject?", "Permitir aos usuários cambiar o assunto"}. -{"Allow users to query other users?", "Permitir aos usuários consultar a outros usuários"}. -{"Allow users to send invites?", "Permitir aos usuários enviar convides"}. -{"Allow users to send private messages?", "Permitir aos usuários enviar mensagens privados"}. {"Configuration for ", "Configuração para "}. -{"Default users as members?", "Os usuários são membros por defeito"}. -{"Enable logging?", "Guardar históricos"}. {" has set the subject to: ", " a posto o assunto: "}. {"Improper message type", "Tipo de mensagem incorreto"}. {"Incorrect password", "Senha incorreta"}. @@ -152,13 +132,6 @@ {"It is not allowed to send private messages of type \"groupchat\"", "No está permitido enviar mensagens privados do tipo \"groupchat\""}. {"It is not allowed to send private messages to the conference", "Impedir o envio de mensagens privados a la sala"}. {"JID ~s is invalid", "O JID ~s não es válido"}. -{"Make participants list public?", "Fazer pública la lista de participantes"}. -{"Make room anonymous?", "Fazer anônima la sala"}. -{"Make room members only?", "Fazer la sala solo para membros"}. -{"Make room moderated?", "Fazer la sala moderada"}. -{"Make room password protected?", "Proteger la sala com senha"}. -{"Make room persistent?", "Fazer la sala permanente"}. -{"Make room public searchable?", "Fazer a sala publicamente visível"}. {"Membership required to enter this room", "Necessitas ser membro de esta sala para poder entrar"}. {"Moderator privileges required", "Se necessita privilégios de moderador"}. {"Nickname is already in use by another occupant", "O nick já está sendo usado por outro ocupante"}. @@ -192,91 +165,57 @@ % web/ejabberd_web_admin.erl -{"Add JID", "Adicionar JID"}. {"Add New", "Adicionar novo"}. {"Add User", "Adicionar usuário"}. {"All activity", "Toda la atividade"}. -{"Backup Management at ", "Gestão de copia de segurança em "}. -{"bad format", "mal formato"}. {"Change Password", "Mudar senha"}. {"Connected Resources:", "Recursos conectados:"}. -{"CPU Time", "Tempo de processador consumido"}. -{"DB Management", "Gestão do BD"}. -{"DB Tables at ", "Tabelas do BD em "}. {"Delete", "Eliminar"}. {"Delete Selected", "Remover os selecionados"}. -{"Dump a database in a text file", "Exportar uma Base de Dados para um arquivo de texto"}. -{"ejabberd access control lists configuration", "Configuração das Listas de Controle de Acesso do ejabberd"}. -{"ejabberd access rules configuration", "Configuração de las Regras de Aceso de ejabberd"}. -{"ejabberd administration", "Administração de ejabberd"}. {"ejabberd (c) 2002-2006 Alexey Shchepin, 2004-2006 Process One", "ejabberd (c) 2002-2006 Alexey Shchepin, 2004-2006 Process One"}. -{"ejabberd stats", "Estatísticas de ejabberd"}. -{"ejabberd users", "Usuários do ejabberd"}. {"ejabberd virtual hosts", "Maquinas virtuais de ejabberd"}. {"From", "De"}. {"Group ", "Grupo "}. {"Groups", "Grupos"}. {"Host", "Máquina"}. -{"Install a database fallback from a file", "Instalar uma recuperação de BD a partir de um arquivo"}. -{"JID", "JID"}. {"Last Activity", "Última atividade"}. {"Last month", "Último mês"}. {"Last year", "Último ano"}. {"Listened Ports at ", "Portas de escuta em "}. -{"Listened Ports Management", "Gestão dos portas de escuta"}. {"Members:", "Miembros:"}. {"Memory", "Memória"}. {"Module", "Módulo"}. {"Modules at ", "Módulos em "}. -{"Modules Management", "Gestão de módulos"}. {"Name:", "Nome:"}. {"Name", "Nome"}. {"Never", "Nunca"}. {"Nickname", "Apelido"}. {"Online", "Conectado"}. -{"Online users", "Usuários conectados"}. {"Options", "Opções"}. -{"Outgoing S2S servers", "Servidores conectados"}. {"Packet", "Pacote"}. {"Password:", "Senha:"}. {"Pending", "Pendente"}. {"Period: ", "Período: "}. {"Port", "Porta"}. -{"~p statistics", "Estatísticas de ~p"}. -{"(raw)", "(cru)"}. -{"raw", "cru"}. -{"Registered users", "Usuários registrados"}. {"Remove", "Borrar"}. {"Restart", "Reiniciar"}. -{"Restore a backup from a file", "Recuperar uma cópia de segurança a partir do arquivo"}. -{"Restore a database from a text file", "Restaurar uma Base de Dados a partir de um arquivo de texto"}. {"Roster", "Lista de contatos"}. {"Roster of ", "Lista de contatos de "}. -{"RPC call error", "Erro em la chamada RPC"}. {"~s access rule configuration", "Configuração da Regra de Acesso ~s"}. -{"Shared roster groups", "Grupos compartilhado"}. {"Shared Roster", "Lista de contatos compartilhada"}. {"Show Integral Table", "Mostrar Tabela Integral"}. {"Show Ordinary Table", "Mostrar Tabela Ordinária"}. {"Size", "Tamanho"}. -{"~s offline messages queue", "~s cola de mensagens diferidos"}. {"Start", "Iniciar"}. {"Statistics", "Estatísticas"}. {"Stop", "Parar"}. {"Storage Type", "Tipo de armazenamento"}. -{"Store a backup in a file", "Armazenar uma cópia de segurança no arquivo"}. {"Submit", "Enviar"}. -{"submitted", "enviado"}. {"Subscription", "Subscrição"}. {"Time", "Fecha"}. {"To", "Para"}. -{"Transactions aborted", "Transações abortadas"}. -{"Transactions commited", "Transações realizadas"}. -{"Transactions logged", "Transações armazenadas"}. -{"Transactions restarted", "Transações reiniciadas"}. + {"Update", "Atualizar"}. -{"Uptime", "Tempo de funcionamento"}. -{"Users last activity", "Última atividades dos usuários"}. {"Users", "Usuários"}. {"User ", "Usuário"}. {"Validate", "Validar"}. @@ -288,8 +227,7 @@ % mod_vcard_ldap.erl {"Fill in fields to search for any matching Jabber User", "Preencha campos para buscar usuários Jabber que concordem"}. -{"Given Name", "Nome dado"}. -{"JID", "JID"}. + % mod_adhoc.erl @@ -384,8 +322,6 @@ {"Description:", "Descrição:"}. {"Displayed Groups:", "Grupos Indicados"}. -% mod_irc/mod_irc.erl - % mod_muc/mod_muc_log.erl {"Chatroom configuration modified", "Configuração da sala de bate-papo modificada"}. {"joins the room", "Entrar na sala"}. @@ -424,7 +360,6 @@ {"Make room public searchable", "Tornar sala pública possível de ser encontrada"}. {"Make participants list public", "Tornar pública a lista de participantes"}. {"Make room password protected", "Tornar protegida a senha da sala"}. -{"Make room semianonymous", "Tornar sala semi-anônima"}. {"Make room members-only", "Tornar sala apenas para membros"}. {"Make room moderated", "Tornar a sala moderada"}. {"Default users as participants", "Usuários padrões como participantes"}. @@ -435,6 +370,10 @@ {"Enable logging", "Permitir criação de logs"}. {"Description", "Descrição"}. {"Number of occupants", "Número de participantes"}. +{"Make real JIDs discovered for", "Tornar o JID real visível por"}. +{"moderators only", "apenas moderadores"}. +{"anyone", "qualquer um"}. +{"is now known as", "é agora conhecido como"}. % Local Variables: % mode: erlang -- cgit v1.2.3 From 2a542e9e098349da5044c6fbaebdc73e9b22701f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Tue, 26 Sep 2006 10:48:05 +0000 Subject: * src/mod_muc/mod_muc_room.erl: Minor english update. * src/msgs/pl.msg: Likewise. * src/msgs/uk.msg: Likewise. * src/msgs/pt-br.msg: Likewise. * src/msgs/cs.msg: Likewise. * src/msgs/ru.msg: Likewise. * src/msgs/es.msg: Likewise. * src/msgs/fr.msg: Likewise. * src/msgs/de.msg: Likewise. * src/msgs/nl.msg: Likewise. SVN Revision: 641 --- ChangeLog | 11 +++++++++++ src/mod_muc/mod_muc_room.erl | 2 +- src/msgs/cs.msg | 2 +- src/msgs/de.msg | 2 +- src/msgs/es.msg | 2 +- src/msgs/fr.msg | 2 +- src/msgs/nl.msg | 2 +- src/msgs/pl.msg | 2 +- src/msgs/pt-br.msg | 2 +- src/msgs/ru.msg | 2 +- src/msgs/uk.msg | 2 +- 11 files changed, 21 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5506215f..dd2b8da7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2006-09-26 Mickael Remond + * src/mod_muc/mod_muc_room.erl: Minor english update. + * src/msgs/pl.msg: Likewise. + * src/msgs/uk.msg: Likewise. + * src/msgs/pt-br.msg: Likewise. + * src/msgs/cs.msg: Likewise. + * src/msgs/ru.msg: Likewise. + * src/msgs/es.msg: Likewise. + * src/msgs/fr.msg: Likewise. + * src/msgs/de.msg: Likewise. + * src/msgs/nl.msg: Likewise. + * src/msgs/pt-br.msg: Updated Brazilian translation (thanks to Renato Botelho) and clean-up. diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index 911175547..6c4352d17 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -2137,7 +2137,7 @@ get_config(Lang, StateData, From) -> end), {xmlelement, "field", [{"type", "list-single"}, - {"label", translate:translate(Lang, "Make real JIDs discovered for")}, + {"label", translate:translate(Lang, "Present real JIDs to")}, {"var", "muc#roomconfig_whois"}], [{xmlelement, "value", [], [{xmlcdata, if Config#config.anonymous -> diff --git a/src/msgs/cs.msg b/src/msgs/cs.msg index 48eb8c21e..ecfbc5c49 100644 --- a/src/msgs/cs.msg +++ b/src/msgs/cs.msg @@ -139,7 +139,7 @@ {"Invalid role: ~s", "Neplatná role: ~s"}. {"Owner privileges required", "Jsou vyžadována práva vlastníka"}. {"private, ", "soukromá, "}. -{"Make real JIDs discovered for", "Zjisti skutečné JIDy pro"}. +{"Present real JIDs to", "Zjisti skutečné JIDy pro"}. {"moderators only", "pouze pro moderátory"}. {"anyone", "každý"}. diff --git a/src/msgs/de.msg b/src/msgs/de.msg index 16853429a..c47821434 100644 --- a/src/msgs/de.msg +++ b/src/msgs/de.msg @@ -359,7 +359,7 @@ {"Enable logging", "Log-Funktion aktivieren"}. {"Description", "Beschreibung"}. {"Number of occupants", "Anzahl der Teilnehmer"}. -{"Make real JIDs discovered for", "Echte Jabber IDs anzeigen für"}. +{"Present real JIDs to", "Echte Jabber IDs anzeigen für"}. {"moderators only", "nur Moderatoren"}. {"anyone", "jeden"}. diff --git a/src/msgs/es.msg b/src/msgs/es.msg index 92bc47caf..7dfe27b48 100644 --- a/src/msgs/es.msg +++ b/src/msgs/es.msg @@ -169,7 +169,7 @@ {"private, ", "privado"}. {"Description", "Descripción"}. {"Number of occupants", "Número de ocupantes"}. -{"Make real JIDs discovered for", "Los JID reales pueden verlos"}. +{"Present real JIDs to", "Los JID reales pueden verlos"}. {"moderators only", "solo moderadores"}. {"anyone", "cualquiera"}. diff --git a/src/msgs/fr.msg b/src/msgs/fr.msg index ab2c51b6a..f84ab1576 100644 --- a/src/msgs/fr.msg +++ b/src/msgs/fr.msg @@ -222,7 +222,7 @@ {"Enable logging", "Activer l'archivage"}. {"Description", "Description"}. {"Number of occupants", "Nombre d'occupants"}. -{"Make real JIDs discovered for", "Rendre le JID réel visible pour"}. +{"Present real JIDs to", "Rendre le JID réel visible pour"}. {"moderators only", "modérateurs seulement"}. {"anyone", "tout le monde"}. diff --git a/src/msgs/nl.msg b/src/msgs/nl.msg index 4359313b6..c6b87a65e 100644 --- a/src/msgs/nl.msg +++ b/src/msgs/nl.msg @@ -178,7 +178,7 @@ {"You need an x:data capable client to configure room", "U hebt een client nodig die x:data ondersteunt om deze chatruimte in te stellen"}. {"Description", "Beschrijving"}. {"Number of occupants", "Aantal aanwezigen"}. -{"Make real JIDs discovered for", "Jabber ID's kunnen achterhaald worden door"}. +{"Present real JIDs to", "Jabber ID's kunnen achterhaald worden door"}. {"moderators only", "moderators"}. {"anyone", "iedereen"}. diff --git a/src/msgs/pl.msg b/src/msgs/pl.msg index e14b53b21..579008090 100644 --- a/src/msgs/pl.msg +++ b/src/msgs/pl.msg @@ -136,7 +136,7 @@ {"Invalid role: ~s", "Nieprawidłowa rola: ~s"}. {"Owner privileges required", "Wymagane uprawnienia właściciela "}. {"private, ", "prywatny, "}. -{"Make real JIDs discovered for", "Kto może widzieć prawdziwe JIDy?"}. +{"Present real JIDs to", "Kto może widzieć prawdziwe JIDy?"}. {"moderators only", "tylko moderatorzy"}. {"anyone", "każdy"}. diff --git a/src/msgs/pt-br.msg b/src/msgs/pt-br.msg index f63d4cdc7..6cc5f4052 100644 --- a/src/msgs/pt-br.msg +++ b/src/msgs/pt-br.msg @@ -370,7 +370,7 @@ {"Enable logging", "Permitir criação de logs"}. {"Description", "Descrição"}. {"Number of occupants", "Número de participantes"}. -{"Make real JIDs discovered for", "Tornar o JID real visível por"}. +{"Present real JIDs to", "Tornar o JID real visível por"}. {"moderators only", "apenas moderadores"}. {"anyone", "qualquer um"}. {"is now known as", "é agora conhecido como"}. diff --git a/src/msgs/ru.msg b/src/msgs/ru.msg index 03e62cce5..d8a877816 100644 --- a/src/msgs/ru.msg +++ b/src/msgs/ru.msg @@ -211,7 +211,7 @@ "Разрешить пользователям посылать приглашения"}. {"Make room password protected", "Сделать комнату защищённой паролем"}. {"Password", "Пароль"}. -{"Make real JIDs discovered for", "Сделать реальные JID участников видимыми"}. +{"Present real JIDs to", "Сделать реальные JID участников видимыми"}. {"moderators only", "только модераторам"}. {"anyone", "всем участникам"}. {"Enable logging", "Включить журналирование"}. diff --git a/src/msgs/uk.msg b/src/msgs/uk.msg index 580720df2..b14ef23e6 100644 --- a/src/msgs/uk.msg +++ b/src/msgs/uk.msg @@ -210,7 +210,7 @@ "Дозволити користувачам надсилати запрошення"}. {"Make room password protected", "Зробити кімнату захищеною паролем"}. {"Password", "Пароль"}. -{"Make real JIDs discovered for", "Зробити реальні JID учасників видимими"}. +{"Present real JIDs to", "Зробити реальні JID учасників видимими"}. {"moderators only", "тільки модераторам"}. {"anyone", "всім учасникам"}. {"Enable logging", "Включити журнал роботи"}. -- cgit v1.2.3 From 54d05f64bad5a8624a9578704a75d18e6cac4de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Tue, 26 Sep 2006 11:12:03 +0000 Subject: Improvement coming from trunk (SVN #633): * src/ejabberd_s2s.erl: Added incoming-s2s-number and outgoing-s2s-number ejabberdctl commands SVN Revision: 643 --- ChangeLog | 3 +++ src/ejabberd_s2s.erl | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dd2b8da7c..e145e25b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-09-26 Mickael Remond + * src/ejabberd_s2s.erl: Added incoming-s2s-number and + outgoing-s2s-number ejabberdctl commands + * src/mod_muc/mod_muc_room.erl: Minor english update. * src/msgs/pl.msg: Likewise. * src/msgs/uk.msg: Likewise. diff --git a/src/ejabberd_s2s.erl b/src/ejabberd_s2s.erl index f5aac6b8a..9b1177292 100644 --- a/src/ejabberd_s2s.erl +++ b/src/ejabberd_s2s.erl @@ -19,7 +19,9 @@ get_key/1, try_register/1, remove_connection/1, - dirty_get_connections/0]). + dirty_get_connections/0, + ctl_process/2 + ]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, @@ -27,6 +29,7 @@ -include("ejabberd.hrl"). -include("jlib.hrl"). +-include("ejabberd_ctl.hrl"). -record(s2s, {fromto, pid, key}). -record(state, {}). @@ -112,6 +115,10 @@ init([]) -> {attributes, record_info(fields, s2s)}]), mnesia:add_table_copy(s2s, node(), ram_copies), mnesia:subscribe(system), + ejabberd_ctl:register_commands( + [{"incoming-s2s-number", "print number of incoming s2s connections on the node"}, + {"outgoing-s2s-number", "print number of outgoing s2s connections on the node"}], + ?MODULE, ctl_process), {ok, #state{}}. %%-------------------------------------------------------------------- @@ -240,6 +247,17 @@ find_connection(From, To) -> send_element(Pid, El) -> Pid ! {send_element, El}. +ctl_process(_Val, ["incoming-s2s-number"]) -> + N = length(supervisor:which_children(ejabberd_s2s_in_sup)), + io:format("~p~n", [N]), + {stop, ?STATUS_SUCCESS}; +ctl_process(_Val, ["outgoing-s2s-number"]) -> + N = length(supervisor:which_children(ejabberd_s2s_out_sup)), + io:format("~p~n", [N]), + {stop, ?STATUS_SUCCESS}; +ctl_process(Val, _Args) -> + Val. + update_tables() -> case catch mnesia:table_info(s2s, attributes) of [fromto, node, key] -> -- cgit v1.2.3 From 16c2d399e969498d80fe68f77f5c7f51b8149030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Tue, 26 Sep 2006 14:07:35 +0000 Subject: * src/msgs/pl.msg: Updated (thanks to Andrzej Smyk). SVN Revision: 644 --- ChangeLog | 2 ++ src/msgs/pl.msg | 53 +++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 45 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index e145e25b7..08ebcf6b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-09-26 Mickael Remond + * src/msgs/pl.msg: Updated (thanks to Andrzej Smyk). + * src/ejabberd_s2s.erl: Added incoming-s2s-number and outgoing-s2s-number ejabberdctl commands diff --git a/src/msgs/pl.msg b/src/msgs/pl.msg index 579008090..05dff9f78 100644 --- a/src/msgs/pl.msg +++ b/src/msgs/pl.msg @@ -136,9 +136,10 @@ {"Invalid role: ~s", "Nieprawidłowa rola: ~s"}. {"Owner privileges required", "Wymagane uprawnienia właściciela "}. {"private, ", "prywatny, "}. -{"Present real JIDs to", "Kto może widzieć prawdziwe JIDy?"}. +{"Present real JIDs to", "Kto może widzieć prawdziwe JID-y?"}. {"moderators only", "tylko moderatorzy"}. -{"anyone", "każdy"}. +{"anyone", "wszyscy"}. + % mod_irc/mod_irc.erl {"You need an x:data capable client to configure mod_irc settings", @@ -224,7 +225,7 @@ % mod_pubsub/mod_pubsub.erl {[], " "}. {"Node Creator", "Tworzenie gałęzi"}. -{"Deliver payloads with event notifications", "Do?cz zawarto? publikowanego przedmiotu podczas wysy?nia powiadomienia o publikacji"}. +{"Deliver payloads with event notifications", "Dołącz zawartość publikowanego przedmiotu podczas wysyłania powiadomienia o publikacji"}. {"Notify subscribers when the node configuration changes", "Informuj subskrybentów gdy konfiguracja gałęzi się zmieni"}. {"Notify subscribers when the node is deleted", "Informuj subskrybentów gdy gałąż zostanie wykasowana"}. {"Notify subscribers when items are removed from the node", "Informuj subskrybentów kiedy zostaną z gałęzi usunięte jakieś elementy"}. @@ -233,7 +234,7 @@ {"Whether to allow subscriptions", "Czy pozwolić na subskrypcje"}. {"Specify the subscriber model", "Oznacz model subskrybenta"}. {"Specify the publisher model", "Oznacz model publikującego"}. -{"Max payload size in bytes", "Maksymalna wielko? powiadomienia w bajtach"}. +{"Max payload size in bytes", "Maksymalna wielkość powiadomienia w bajtach"}. {"Send items to new subscribers", "Wysyłaj rzeczy do nowych subskrybentów"}. {"Only deliver notifications to available users", "Dostarczaj notyfikacje tylko do osiągalnych użytkowników"}. {"Specify the current subscription approver", "Wyznacz aprobującego obecne subskrypcje "}. @@ -368,7 +369,7 @@ {"Make room public searchable", "Pozwól wyszukiwać pokój"}. {"Make participants list public", "Upublicznij listę uczestników"}. {"Make room password protected", "Zabezpiecz pokój hasłem"}. -{"Make room members-only", "Utwórz pokój tylko dla członków"}. +{"Make room members-only", "Utwórz pokój tylko dla uczestnikóww"}. {"Make room moderated", "Moderuj pokój"}. {"Default users as participants", "Domyślni użytkownicy jako uczestnicy"}. {"Allow users to change subject", "Pozwól użytkownikom zmienić tytuł pokoju"}. @@ -384,9 +385,41 @@ {"ejabberd vCard module\nCopyright (c) 2003-2006 Alexey Shchepin", "ejabberd vCard module\nCopyright (c) 2003-2006 Alexey Shchepin"}. {"Jabber ID", "Jabber ID"}. -% mod_vcard.erl -{"Email", "E-mail"}. +% ./mod_presence.erl +{"You need an x:data capable client to register presence", "Potrzebujesz klinta kompatybilnego z x:data aby zarejestrować widoczność "}. +{"Presence registration at ", "Rejestracja widoczności na "}. +{"What presence features do you want to register?", "Jakie usługi widoczności chcesz zarejestrować?"}. +{"Raw XML", ""}. +{"Specified presence is already registered", "Określona widoczność już jest zarejestrowana"}. +{"You must fill in field \"Xml\" in the form", "Musisz wypełnić w formularzu pole \"XML\""}. +{"You must fill in field \"Icon\" in the form", "Musisz wypełnić w formularzu pole \"Icon\""}. +{"ejabberd presence module\nCopyright (c) 2006 Igor Goryachev", ""}. + +% ./mod_presence/mod_presence.erl +{"Raw XML export", "Eksport XML do raw"}. +{"Allow icon export", "Pozwól na eksport ikon"}. + +% ./mod_stats2file.erl +{"CPUtime", "Czas procesora"}. + +% ./mod_vcard_odbc.erl +{"Erlang Jabber Server\nCopyright (c) 2002-2006 Alexey Shchepin", ""}. +{"Email", ""}. +{"ejabberd vCard module\nCopyright (c) 2003-2006 Alexey Shchepin", ""}. +{"Jabber ID", ""}. + +% ./mod_pubsub/mod_pubsub.erl +{"ejabberd pub/sub module\nCopyright (c) 2003-2006 Alexey Shchepin", ""}. + +% ./web/ejabberd_web_admin.erl +{"ejabberd (c) 2002-2006 Alexey Shchepin, 2004-2006 Process One", ""}. +{"(Raw)", ""}. +{"Raw", ""}. +{"Low level update script", "Skrypt aktualizacyjny niskiego poziomu"}. + +% ./mod_irc/mod_irc.erl +{"ejabberd IRC module\nCopyright (c) 2003-2006 Alexey Shchepin", ""}. + +% ./mod_muc/mod_muc.erl +{"ejabberd MUC module\nCopyright (c) 2003-2006 Alexey Shchepin", ""}. -% Local Variables: -% mode: erlang -% End: -- cgit v1.2.3 From 4cb24c3e6af062f1c1da167d19782e2334818125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Tue, 26 Sep 2006 17:17:31 +0000 Subject: * doc/release_notes_1.1.2.txt: Draft release notes. SVN Revision: 645 --- ChangeLog | 2 + doc/release_note_1.1.2.txt | 0 doc/release_notes_1.1.2.txt | 120 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 doc/release_note_1.1.2.txt create mode 100644 doc/release_notes_1.1.2.txt diff --git a/ChangeLog b/ChangeLog index 08ebcf6b6..c6e3e2c32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-09-26 Mickael Remond + * doc/release_notes_1.1.2.txt: Draft release notes. + * src/msgs/pl.msg: Updated (thanks to Andrzej Smyk). * src/ejabberd_s2s.erl: Added incoming-s2s-number and diff --git a/doc/release_note_1.1.2.txt b/doc/release_note_1.1.2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/doc/release_notes_1.1.2.txt b/doc/release_notes_1.1.2.txt new file mode 100644 index 000000000..1f445141f --- /dev/null +++ b/doc/release_notes_1.1.2.txt @@ -0,0 +1,120 @@ + Release Notes + ejabberd 1.1.2 + 27 September 2006 + + This document describes the main changes in ejabberd 1.1.2. + + This version is a major improvement over ejabberd 1.1.1, improving the + overall behaviour of the server in many areas. Users of ejabberd 1.1.1 + should upgrade to this new release. + + ejabberd can be downloaded from the Process-one website: + http://www.process-one.net/en/projects/ejabberd/ + + Detailed information can be found in the ejabberd Feature Sheet and User + Guide which are available on the Process-one website: + http://www.process-one.net/en/projects/ejabberd/docs.html + + A complete list of changes is available from: + https://support.process-one.net/secure/ConfigureReport.jspa?filterid=10110&mapper=components&selectedProjectId=10011&reportKey=com.atlassian.jira.plugin.system.reports%3Asinglelevelgroupby&Next=Next + + + Recent changes include: + +LDAP Support + + - Major improvements have been made on the LDAP module. It is now more + flexible and more robust. + +HTTP Polling fixes + + - The HTTP poll modules have been fixed and improved: The connection are + closed properly and polled messages can no more be lost. + +Roster management improvement + + - Roster management improvements make it more reliable, especially in cases + where users are on different servers. + - Shared rosters are now more reliable. + +Improved Robustness + + - It is now possible to limit the number of opened connections for a single + user. + +Relational database support + + - Database support: Microsoft SQL Server is now officially supported (ODBC + mode). + +Pubsub improvements + + - Nodes creation can now be prevented with a dedicated ACL rule. + +Localization + + - A Czech translation has been added. + - Translations have been updated. + +Binary installer + + - The same completly packaged binary installer is now available on Windows, + Linux and MacOSX PPC. + + +- Anonymous login bugfixes. + +XMPP compliance + + - Some protocol compliance fix have been added, after the Portland XMPP + Interop Meeting in July. + +Various improvements + + - MUC have been improved (logging rendering). + - The command line tool ejabberdctl has been improved. + - The build chain has been improved, including MacOSX support. + - A Czech translation has been added. + +Bugfixes + + - Please refer to the ChangeLog file supplied with this release regarding + all improvements in ejabberd. + + + Installation Notes + +Supported Erlang Version + + - You need at least Erlang/OTP R9C-2 to run ejabberd 1.1.2. + +Installation + + Installers are provided for Microsoft Windows, Linux/x86 and MacOSX/PPC. + Installers can be retrieved from: + http://www.process-one.net/en/projects/ejabberd/download.html + +Migration Notes + + - Before any migration, ejabberd system and database must be properly + backed up. + - The relational database schema has changed between version 1.1.1 and + 1.1.2. A "askmessage" column need to be added in the "rosterusers" table to + perform the migration. + + +References + + Contributed tutorials and documents of interest are: + - Migration from Jabberd1.4, Jabberd2 and WPJabber to ejabberd: + http://ejabberd.jabber.ru/migrate-to-ejabberd + - Transport configuration for connecting to other networks: + http://ejabberd.jabber.ru/tutorials-transports + - Using ejabberd with MySQL native driver: + http://support.process-one.net/doc/display/MESSENGER/Using+ejabberd+with+MySQL+native+driver + - Anonymous User Support: + http://support.process-one.net/doc/display/MESSENGER/Anonymous+users+support + - Frequently Asked Questions: + http://ejabberd.jabber.ru/faq + +END -- cgit v1.2.3 From 7214549508902b5cd4c2e89c608ee09678cbc24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Wed, 27 Sep 2006 13:09:50 +0000 Subject: * doc/guide.tex: Fixed Latexish typos. SVN Revision: 646 --- ChangeLog | 4 ++++ doc/guide.html | 10 +++++----- doc/guide.tex | 8 ++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index c6e3e2c32..16760fdcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-09-27 Mickael Remond + + * doc/guide.tex: Fixed Latexish typos. + 2006-09-26 Mickael Remond * doc/release_notes_1.1.2.txt: Draft release notes. diff --git a/doc/guide.html b/doc/guide.html index 596a5ec91..489f76c02 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -321,7 +321,7 @@ To compile ejabberd on a Windows flavour, you need:
    • MS Visual C++ 6.0 Compiler
    • Erlang/OTP R9C-2 or higher -
    • Expat 1.95.7 or higher +
    • Expat 1.95.7 or higher
    • GNU Iconv 1.9.1 (optional)
    • Shining Light OpenSSL @@ -627,7 +627,7 @@ If HTTP Polling is enabled, it will be available at
      {max_stanza_size, Size}
      This option specifies an approximate maximum size in bytes of XML stanzas. Approximate, because it is calculated with the precision of one block of - readed data. For example {max\_stanza\_size, 65536}. The default + readed data. For example {max_stanza_size, 65536}. The default value is infinity.
      {shaper, <access rule>}
      This option defines a shaper for the port (see section 3.6). The default value @@ -997,14 +997,14 @@ Examples: To limit the number of sessions per user to 10 on all virtual hosts:
      -  {max\_user\_sessions, 10}.
      +  {max_user_sessions, 10}.
       
    • This option can be defined per virtual host (see section 3.2). In next example the number of sessions per user on the first host is six, while there is no limit on the second host:
      -  {host_config, "example.net", [{max\_user\_sessions, 6}]}.
      -  {host_config, "example.com", [{max\_user\_sessions, infinity}]}.
      +  {host_config, "example.net", [{max_user_sessions, 6}]}.
      +  {host_config, "example.com", [{max_user_sessions, infinity}]}.
       
    diff --git a/doc/guide.tex b/doc/guide.tex index 468f7143d..d7262c218 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -467,7 +467,7 @@ The following options are available: \titem{\{max\_stanza\_size, Size\}} \ind{options!max\_stanza\_size}This option specifies an approximate maximum size in bytes of XML stanzas. Approximate, because it is calculated with the precision of one block of - readed data. For example \verb|{max\_stanza\_size, 65536}|. The default + readed data. For example \verb|{max_stanza_size, 65536}|. The default value is \term{infinity}. \titem{\{shaper, \}} \ind{options!shaper}This option defines a shaper for the port (see section~\ref{sec:shapers}). The default value @@ -866,15 +866,15 @@ Examples: \item To limit the number of sessions per user to 10 on all virtual hosts: \begin{verbatim} - {max\_user\_sessions, 10}. + {max_user_sessions, 10}. \end{verbatim} \item This option can be defined per virtual host (see section~\ref{sec:virtualhost}). In next example the number of sessions per user on the first host is six, while there is no limit on the second host: \begin{verbatim} - {host_config, "example.net", [{max\_user\_sessions, 6}]}. - {host_config, "example.com", [{max\_user\_sessions, infinity}]}. + {host_config, "example.net", [{max_user_sessions, 6}]}. + {host_config, "example.com", [{max_user_sessions, infinity}]}. \end{verbatim} \end{itemize} -- cgit v1.2.3 From de306d0364c7e6175bca69135d576f7d6240a763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Wed, 27 Sep 2006 13:34:18 +0000 Subject: * doc/release_notes_1.1.2.txt: Minor fixes. SVN Revision: 647 --- ChangeLog | 2 ++ doc/release_notes_1.1.2.txt | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16760fdcf..17c093ceb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-09-27 Mickael Remond + * doc/release_notes_1.1.2.txt: Minor fixes. + * doc/guide.tex: Fixed Latexish typos. 2006-09-26 Mickael Remond diff --git a/doc/release_notes_1.1.2.txt b/doc/release_notes_1.1.2.txt index 1f445141f..0aa442373 100644 --- a/doc/release_notes_1.1.2.txt +++ b/doc/release_notes_1.1.2.txt @@ -6,7 +6,7 @@ This version is a major improvement over ejabberd 1.1.1, improving the overall behaviour of the server in many areas. Users of ejabberd 1.1.1 - should upgrade to this new release. + should upgrade to this new release for improved robustness and compliance. ejabberd can be downloaded from the Process-one website: http://www.process-one.net/en/projects/ejabberd/ @@ -15,8 +15,9 @@ Guide which are available on the Process-one website: http://www.process-one.net/en/projects/ejabberd/docs.html - A complete list of changes is available from: - https://support.process-one.net/secure/ConfigureReport.jspa?filterid=10110&mapper=components&selectedProjectId=10011&reportKey=com.atlassian.jira.plugin.system.reports%3Asinglelevelgroupby&Next=Next + ejabberd includes 44 improvements. A complete list of changes is available + from: + http://redir.process-one.net/ejabberd-1.1.2 Recent changes include: @@ -67,13 +68,15 @@ Binary installer XMPP compliance - Some protocol compliance fix have been added, after the Portland XMPP - Interop Meeting in July. + Interop Meeting in July. Various improvements - MUC have been improved (logging rendering). - The command line tool ejabberdctl has been improved. - The build chain has been improved, including MacOSX support. + - The documentation has been improved and updated to describe the new + features. - A Czech translation has been added. Bugfixes -- cgit v1.2.3 From 7e948fbbace4b58598ee92d333a574998bf6d4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Wed, 27 Sep 2006 16:22:09 +0000 Subject: * doc/release_notes_1.1.2.txt: Fixed typos and rephrasing. SVN Revision: 648 --- doc/release_notes_1.1.2.txt | 60 ++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/doc/release_notes_1.1.2.txt b/doc/release_notes_1.1.2.txt index 0aa442373..bca68127d 100644 --- a/doc/release_notes_1.1.2.txt +++ b/doc/release_notes_1.1.2.txt @@ -11,73 +11,73 @@ ejabberd can be downloaded from the Process-one website: http://www.process-one.net/en/projects/ejabberd/ - Detailed information can be found in the ejabberd Feature Sheet and User - Guide which are available on the Process-one website: + Detailed information can be found in the Feature Sheet and in the + Installation and Operation Guide which are both available on the + Process-one website: http://www.process-one.net/en/projects/ejabberd/docs.html - ejabberd includes 44 improvements. A complete list of changes is available - from: + ejabberd includes 44 improvements. A complete list of changes can be + retrieved from: http://redir.process-one.net/ejabberd-1.1.2 Recent changes include: -LDAP Support +LDAP Improvements - Major improvements have been made on the LDAP module. It is now more flexible and more robust. -HTTP Polling fixes +HTTP Polling Fixes - - The HTTP poll modules have been fixed and improved: The connection are - closed properly and polled messages can no more be lost. + - The HTTP polling modules have been fixed and improved: the connections are + closed properly and polled messages cannot be lost anymore. -Roster management improvement +Roster Management Improvement - - Roster management improvements make it more reliable, especially in cases - where users are on different servers. - - Shared rosters are now more reliable. + - Roster management improvements increase reliability, especially in cases + where users are on different servers. + - Shared rosters are more reliable. Improved Robustness - It is now possible to limit the number of opened connections for a single user. -Relational database support +Relational databases - - Database support: Microsoft SQL Server is now officially supported (ODBC - mode). + - Database support: Microsoft SQL Server is now officially supported in ODBC + mode. -Pubsub improvements +Publish-Subscribe Improvement - - Nodes creation can now be prevented with a dedicated ACL rule. + - Restricting node creation with a dedicated ACL rule is now possible. Localization - A Czech translation has been added. - Translations have been updated. -Binary installer +Binary Installer - - The same completly packaged binary installer is now available on Windows, - Linux and MacOSX PPC. + - New binary installer for Windows including all requirements. + - Improved installers for Linux and MacOSX (PowerPC) - Anonymous login bugfixes. -XMPP compliance +XMPP Compliancy - Some protocol compliance fix have been added, after the Portland XMPP Interop Meeting in July. -Various improvements +Miscelanous - MUC have been improved (logging rendering). - The command line tool ejabberdctl has been improved. - The build chain has been improved, including MacOSX support. - The documentation has been improved and updated to describe the new features. - - A Czech translation has been added. Bugfixes @@ -90,11 +90,13 @@ Bugfixes Supported Erlang Version - You need at least Erlang/OTP R9C-2 to run ejabberd 1.1.2. + - The recommanded version is Erlang/OTP R10B-10. + - Erlang/OTP R11B has not yet been fully certified for ejabberd. Installation Installers are provided for Microsoft Windows, Linux/x86 and MacOSX/PPC. - Installers can be retrieved from: + They can be retrieved from: http://www.process-one.net/en/projects/ejabberd/download.html Migration Notes @@ -102,21 +104,17 @@ Migration Notes - Before any migration, ejabberd system and database must be properly backed up. - The relational database schema has changed between version 1.1.1 and - 1.1.2. A "askmessage" column need to be added in the "rosterusers" table to - perform the migration. + 1.1.2. An "askmessage" column needs to be added in the "rosterusers" table + to perform the migration. References Contributed tutorials and documents of interest are: - - Migration from Jabberd1.4, Jabberd2 and WPJabber to ejabberd: + - Migration from other XMPP servers to ejabberd: http://ejabberd.jabber.ru/migrate-to-ejabberd - Transport configuration for connecting to other networks: http://ejabberd.jabber.ru/tutorials-transports - - Using ejabberd with MySQL native driver: - http://support.process-one.net/doc/display/MESSENGER/Using+ejabberd+with+MySQL+native+driver - - Anonymous User Support: - http://support.process-one.net/doc/display/MESSENGER/Anonymous+users+support - Frequently Asked Questions: http://ejabberd.jabber.ru/faq -- cgit v1.2.3 From 8515833954418ad0b2594623aa61c8175d286cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Wed, 27 Sep 2006 17:29:45 +0000 Subject: * Added release note to documentation. SVN Revision: 650 --- doc/guide.html | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- doc/guide.tex | 2 + 2 files changed, 134 insertions(+), 4 deletions(-) diff --git a/doc/guide.html b/doc/guide.html index 489f76c02..fd3f0a75a 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -182,9 +182,10 @@ SPAN{width:20%; float:right; text-align:left; margin-left:auto;}
  • B.4  ejabberd 1.0.0
  • B.5  ejabberd 1.1.0
  • B.6  ejabberd 1.1.1 +
  • B.7  ejabberd 1.1.2 -
  • C  Acknowledgements -
  • D  Copyright Information +
  • C  Acknowledgements +
  • D  Copyright Information @@ -3985,11 +3986,138 @@ References - Frequently Asked Questions: http://ejabberd.jabber.ru/faq +END + + + +

    B.7  ejabberd 1.1.2

    + +
    +    Release Notes
    +    ejabberd 1.1.2
    +         27 September 2006
    +
    +   This document describes the main changes in ejabberd 1.1.2.
    +
    +   This version is a major improvement over ejabberd 1.1.1, improving the
    +   overall behaviour of the server in many areas. Users of ejabberd 1.1.1
    +   should upgrade to this new release for improved robustness and compliance.
    +
    +   ejabberd can be downloaded from the Process-one website:
    +   http://www.process-one.net/en/projects/ejabberd/
    +
    +   Detailed information can be found in the Feature Sheet and in the
    +   Installation and Operation Guide which are both available on the
    +   Process-one website:
    +   http://www.process-one.net/en/projects/ejabberd/docs.html
    +
    +   ejabberd includes 44 improvements. A complete list of changes can be
    +   retrieved from:
    +   http://redir.process-one.net/ejabberd-1.1.2
    +
    +
    +   Recent changes include:
    +
    +LDAP Improvements
    +
    +  - Major improvements have been made on the LDAP module. It is now more
    +    flexible and more robust.
    +
    +HTTP Polling Fixes
    +
    +  - The HTTP polling modules have been fixed and improved: the connections are
    +    closed properly and polled messages cannot be lost anymore.
    +
    +Roster Management Improvement
    +
    +  - Roster management improvements increase reliability, especially in cases
    +  where users are on different servers.
    +  - Shared rosters are more reliable.
    +
    +Improved Robustness
    +
    +  - It is now possible to limit the number of opened connections for a single
    +  user.
    +
    +Relational databases
    +
    +  - Database support: Microsoft SQL Server is now officially supported in ODBC
    +  mode.
    +
    +Publish-Subscribe Improvement
    +
    +  - Restricting node creation with a dedicated ACL rule is now possible.
    +
    +Localization
    +
    +  - A Czech translation has been added.
    +  - Translations have been updated.
    +
    +Binary Installer
    +
    +  - New binary installer for Windows including all requirements.
    +  - Improved installers for Linux and MacOSX (PowerPC)
    +
    +
    +- Anonymous login bugfixes.
    +
    +XMPP Compliancy
    +
    +  - Some protocol compliance fix have been added, after the Portland XMPP
    +    Interop Meeting in July.
    +
    +Miscelanous
    +
    +  - MUC have been improved (logging rendering).
    +  - The command line tool ejabberdctl has been improved.
    +  - The build chain has been improved, including MacOSX support.
    +  - The documentation has been improved and updated to describe the new
    +    features.
    +
    +Bugfixes
    +
    +   - Please refer to the ChangeLog file supplied with this release regarding
    +     all improvements in ejabberd.
    +
    +
    +   Installation Notes
    +
    +Supported Erlang Version
    +
    +   - You need at least Erlang/OTP R9C-2 to run ejabberd 1.1.2.
    +   - The recommanded version is Erlang/OTP R10B-10.
    +   - Erlang/OTP R11B has not yet been fully certified for ejabberd.
    +
    +Installation
    +
    +   Installers are provided for Microsoft Windows, Linux/x86 and MacOSX/PPC.
    +   They can be retrieved from:
    +   http://www.process-one.net/en/projects/ejabberd/download.html
    +
    +Migration Notes
    +
    +   - Before any migration, ejabberd system and database must be properly
    +   backed up.
    +   - The relational database schema has changed between version 1.1.1 and
    +   1.1.2. An "askmessage" column needs to be added in the "rosterusers" table
    +   to perform the migration.
    +
    +
    +References
    +
    +   Contributed tutorials and documents of interest are:
    +   - Migration from other XMPP servers to ejabberd:
    +     http://ejabberd.jabber.ru/migrate-to-ejabberd     
    +   - Transport configuration for connecting to other networks:
    +     http://ejabberd.jabber.ru/tutorials-transports
    +   - Frequently Asked Questions:
    +     http://ejabberd.jabber.ru/faq
    +
     END
     
    -

    C  Acknowledgements

    +

    C  Acknowledgements

    Thanks to all people who contributed to this guide: @@ -4006,7 +4134,7 @@ Alexey Shchepin (xmpp:aleksey@jabber.ru -

    D  Copyright Information

    +

    D  Copyright Information

    Ejabberd Installation and Operation Guide.
    diff --git a/doc/guide.tex b/doc/guide.tex index d7262c218..174dc95a6 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -3077,6 +3077,8 @@ figure~\ref{fig:webadmmainru} with figure~\ref{fig:webadmmain}) \subsection{ejabberd 1.1.1} \verbatiminput{release_notes_1.1.1.txt} +\subsection{ejabberd 1.1.2} +\verbatiminput{release_notes_1.1.2.txt} \section{\aname{acknowledgements}{Acknowledgements}} \label{sec:acknowledgements} -- cgit v1.2.3