Если вы хотите, чтобы пользователи сами имели возможность регистрироваться на ejabberd сервере, поменяйте пару строк в конфиге сервера ejabberd.cfg.
Параметр который нас интересует находится в разделе «mod_register»
Меняем
{ip_access, [{allow, «127.0.0.0/8»},
{deny, «0.0.0.0/0»}]},
на
{ip_access, [{allow, «0.0.0.0/0»}]},
Если хотите чтобы при вводе на сервер нового пользователя выдавалось приветственное сообщение, то правим строчку:
{welcome_message, {«Welcome!»,
«Hi.\nWelcome to this XMPP server.»}},
Как установите нужные параметры перезапустите Ejabberd
service ejabberd restart
Для наглядности выложу полностью что было
{mod_register, [
%%
%% Protect In-Band account registrations with CAPTCHA.
%%
%%{captcha_protected, true},
%%
%% Set the minimum informational entropy for passwords.
%%
%%{password_strength, 32},
%%
%% After successful registration, the user receives
%% a message with this subject and body.
%%
{welcome_message, {"Welcome!",
"Hi.\nWelcome to this XMPP server."}},
%%
%% When a user registers, send a notification to
%% these XMPP accounts.
%%
%%{registration_watchers, ["admin1@example.org"]},
%%
%% Only clients in the server machine can register accounts
%%
{ip_access, [{allow, "127.0.0.0/8"},
{deny, "0.0.0.0/0"}]},
%%
%% Local c2s or remote s2s users cannot register accounts
%%
%%{access_from, deny},
{access, register}
]},
стало
{mod_register, [
%%
%% Protect In-Band account registrations with CAPTCHA.
%%
%%{captcha_protected, true},
%%
%% Set the minimum informational entropy for passwords.
%%
%%{password_strength, 32},
%%
%% After successful registration, the user receives
%% a message with this subject and body.
%%
{welcome_message, {"Добро пожаловать",
"Добро пожаловать\nВы первый раз зашли на jabber сервер."}},
%%
%% When a user registers, send a notification to
%% these XMPP accounts.
%%
%%{registration_watchers, ["admin1@example.org"]},
%%
%% Only clients in the server machine can register accounts
%%
{ip_access, [{allow, "0.0.0.0/0"}]},
%%
%% Local c2s or remote s2s users cannot register accounts
%%
%%{access_from, deny},
{access, register}
]},

Свежие комментарии