Compare commits
209 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2feb929c55 | |||
| b193ada44d | |||
| 2cdb70556b | |||
| adaa3ffd2b | |||
| 55b586e51c | |||
| 0b217097dd | |||
| d5df314295 | |||
| 28c34a844a | |||
| 3c88ab49f0 | |||
| b338dd671f | |||
| 2cda62dceb | |||
| 5d6fe1a055 | |||
| 7ecbc0cd89 | |||
| 2f4db862f4 | |||
| 11f68cf7fd | |||
| 5a05eb8d62 | |||
| 79a0a44505 | |||
| 54842e7585 | |||
| 76b19660e3 | |||
| 68ecc1f082 | |||
| 9147a1d2dd | |||
| 469f1c43a6 | |||
| 9dd66c241c | |||
| f5e489c764 | |||
| 31b00c25c8 | |||
| 4f1fe31627 | |||
| d22154a2d4 | |||
| 751a8fbd37 | |||
| 971165cb88 | |||
| 6ea15171f7 | |||
| 782ee63266 | |||
| d9f3c87899 | |||
| 2d5fdbab64 | |||
| f841acb21f | |||
| 71e87aef6e | |||
| df21b2d48c | |||
| 35f520e3d9 | |||
| 318823fe68 | |||
| 102281194f | |||
| 6768a21d36 | |||
| 895e104b6a | |||
| c6090dd8ca | |||
| 293676d2a6 | |||
| 4ebaf3efa0 | |||
| 82e8b16a39 | |||
| fc2ea76a45 | |||
| ae939c5f80 | |||
| 745106c83d | |||
| 546bb02153 | |||
| 663f6f76a7 | |||
| b1ca88a5eb | |||
| cdcc3a2520 | |||
| 3c90d7c2b9 | |||
| bc18e89d61 | |||
| e956ca4fe3 | |||
| 53c994825c | |||
| 085d979037 | |||
| 49b02c0a9f | |||
| d8405b694e | |||
| 95bd9068f7 | |||
| 407d3b77b7 | |||
| 3dfcc4c4d3 | |||
| 1de6329c41 | |||
| 8047ff0617 | |||
| 8032533f26 | |||
| 00c3bc2450 | |||
| c76a009238 | |||
| 8012133539 | |||
| 1e56a614f9 | |||
| 971c9ce5a5 | |||
| 7abfd51534 | |||
| 7e86698606 | |||
| 45ccda9961 | |||
| 2c9d424330 | |||
| 541f381145 | |||
| a7cd412a76 | |||
| ab310255d7 | |||
| d9241c9e75 | |||
| bc8294990a | |||
| 25d8e53735 | |||
| f59c0c9eb2 | |||
| aaae1339e1 | |||
| 38d218c129 | |||
| c67eaeb534 | |||
| 8a140dd509 | |||
| 6924b4c3e8 | |||
| 73f40db258 | |||
| 56740871f1 | |||
| 6c9eb98792 | |||
| 50b133f6a2 | |||
| fef60fe1d3 | |||
| 31940f16c7 | |||
| 45c1bad6d8 | |||
| 6916d7b552 | |||
| 39e93fcbbf | |||
| 7461cb5f72 | |||
| 8e069daa61 | |||
| 8041c033a9 | |||
| ca8c659804 | |||
| a96cf33df3 | |||
| d75577fa34 | |||
| 2f62e78c06 | |||
| fdae05c27d | |||
| 58da3e4e99 | |||
| 2c795957ac | |||
| 6e5aaadf57 | |||
| 0f4244a72c | |||
| e9e52374f8 | |||
| 62ed66e195 | |||
| 2e12fd2b11 | |||
| 8d23ef3ed0 | |||
| bd9d2cb97c | |||
| bb5e7353a4 | |||
| cfeb6f9c2b | |||
| 0623a04666 | |||
| 397fbf5b73 | |||
| 6f205d2d2a | |||
| e8dd27d3fc | |||
| 73f061c02c | |||
| 6f19f7ebbb | |||
| 615dc9ff94 | |||
| cd26cb4ad6 | |||
| 22b66e40e0 | |||
| 3f33ff0adf | |||
| fcb5788568 | |||
| f404bac82a | |||
| 7dcd189e27 | |||
| 9c11783e05 | |||
| c74e7e8a17 | |||
| 635565ecf3 | |||
| c25f960220 | |||
| 6aa2f740f4 | |||
| 20ebe81384 | |||
| 9e60b2b0a6 | |||
| 01b4b77373 | |||
| 6d7b71f13c | |||
| dc37faf587 | |||
| bc2f42132f | |||
| da5f069dd2 | |||
| 1a616a91ef | |||
| c086292651 | |||
| c62a0562a1 | |||
| ffb1f97cf4 | |||
| 17e751521f | |||
| 4be522ed0c | |||
| c4e89879bb | |||
| 1643999c35 | |||
| 5351f56ae1 | |||
| c6f57c13da | |||
| a6e65dd5a9 | |||
| 739a504bd5 | |||
| 45074f5349 | |||
| 4ee0f6a5ee | |||
| 5171a8caec | |||
| 2e8e970395 | |||
| 0f16fee833 | |||
| 4af47f5f78 | |||
| 01ee6284bf | |||
| 7006402cd7 | |||
| c496c9aae6 | |||
| 07cea7431b | |||
| c5d3974796 | |||
| 6737a9ff95 | |||
| 327b4406db | |||
| c72082d798 | |||
| 9a795401ae | |||
| fad12caa5f | |||
| 86445aff3e | |||
| 746c6b7d24 | |||
| 28ca665ba4 | |||
| 206d127af7 | |||
| 60e1972f61 | |||
| 7d73151737 | |||
| a90606b104 | |||
| 0a6a45bf09 | |||
| 1b6a2b3660 | |||
| 7ca44abb22 | |||
| 5e88123ec9 | |||
| ae90a16714 | |||
| b29e6ef07f | |||
| fbe26a9186 | |||
| 374e7ca38b | |||
| 326fc6d331 | |||
| 48e15804e3 | |||
| 50f0c3a14b | |||
| 21f9c7e2d2 | |||
| 8e72271730 | |||
| 561cf36c81 | |||
| 228eb9d333 | |||
| 73bca8fbc0 | |||
| ac31008ee0 | |||
| c49a6e7176 | |||
| 09fa4a0ca7 | |||
| 3225edde24 | |||
| 5868a9d1a5 | |||
| bceea5fc73 | |||
| bde4d2e79b | |||
| b8993d82bd | |||
| ee4f623a71 | |||
| a2a1c916fa | |||
| e1928fc84b | |||
| 98c4c8fc74 | |||
| dea1a4619d | |||
| 892cec5651 | |||
| 62b1811ed2 | |||
| d3d9d2b701 | |||
| 1208455db5 | |||
| 7d8de382c8 | |||
| e4e57bcf38 |
@@ -1 +0,0 @@
|
||||
FROM ghcr.io/processone/devcontainer:latest
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "ejabberd",
|
||||
"build": {"dockerfile": "Dockerfile"},
|
||||
"extensions": ["erlang-ls.erlang-ls"],
|
||||
"postCreateCommand": ".devcontainer/prepare-container.sh",
|
||||
"remoteUser": "vscode"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
echo "export PATH=/workspaces/ejabberd/_build/relive:$PATH" >>$HOME/.bashrc
|
||||
echo "COOKIE" >$HOME/.erlang.cookie
|
||||
chmod 400 $HOME/.erlang.cookie
|
||||
@@ -1,46 +0,0 @@
|
||||
.git
|
||||
.win32
|
||||
.examples
|
||||
*.swp
|
||||
*~
|
||||
\#*#
|
||||
.#*
|
||||
.edts
|
||||
*.dump
|
||||
/Makefile
|
||||
/config.log
|
||||
/config.status
|
||||
/config/releases.exs
|
||||
/configure
|
||||
/aclocal.m4
|
||||
/*.cache
|
||||
/deps/
|
||||
/.deps-update/
|
||||
/ebin/
|
||||
/ejabberd.init
|
||||
/ejabberd.service
|
||||
/ejabberdctl
|
||||
/ejabberdctl.example
|
||||
/rel/ejabberd/
|
||||
/rel/overlays/
|
||||
/src/eldap_filter_yecc.erl
|
||||
/vars.config
|
||||
/dialyzer/
|
||||
/test/*.beam
|
||||
/test/*.ctc
|
||||
/logs/
|
||||
/priv/bin/captcha*sh
|
||||
/priv/sql
|
||||
/rel/ejabberd
|
||||
/_build
|
||||
/database/
|
||||
/.rebar
|
||||
/rebar.lock
|
||||
/log/
|
||||
Mnesia.nonode@nohost/
|
||||
# Binaries created with tools/make-{binaries,installers,packages}:
|
||||
/ejabberd_*.deb
|
||||
/ejabberd-*.rpm
|
||||
/ejabberd-*.run
|
||||
/ejabberd-*.tar.gz
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Before creating a ticket, please consider if this should fit the [discussion forum](https://github.com/processone/ejabberd/discussions) better.
|
||||
|
||||
## Environment
|
||||
|
||||
- ejabberd version: 18.09
|
||||
- Erlang version: `erl +V`
|
||||
- OS: Linux (Debian)
|
||||
- Installed from: source | distro package | official deb/rpm | official binary installer | other
|
||||
|
||||
## Configuration (only if needed): grep -Ev '^$|^\s*#' ejabberd.yml
|
||||
|
||||
```yaml
|
||||
loglevel: 4
|
||||
...
|
||||
```
|
||||
|
||||
## Errors from error.log/crash.log
|
||||
|
||||
No errors
|
||||
|
||||
## Bug description
|
||||
|
||||
Please, give us a precise description (what does not work, what is expected, etc.)
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: Kind:Feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Before creating a ticket, please consider if this should fit the [discussion forum](https://github.com/processone/ejabberd/discussions) better.
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when...
|
||||
|
||||
**Describe the solution you'd like**
|
||||
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -1,20 +0,0 @@
|
||||
We are open to contributions for ejabberd, as GitHub pull requests (PR).
|
||||
Here are a few points to consider before submitting your PR. (You can
|
||||
remove the whole text after reading.)
|
||||
|
||||
1. Does this PR address an issue? Please reference it in the PR
|
||||
description.
|
||||
|
||||
2. Have you properly described the proposed change?
|
||||
|
||||
3. Please make sure the change is atomic and does only touch the needed
|
||||
modules. If you have other changes/fixes to provide, please submit
|
||||
them as separate PRs.
|
||||
|
||||
4. If your change or new feature involves storage backends, did you make
|
||||
sure your change works with all backends?
|
||||
|
||||
5. Do you provide tests? How can we check the behavior of the code?
|
||||
|
||||
6. Did you consider documentation changes in the
|
||||
processone/docs.ejabberd.im repository?
|
||||
@@ -1,174 +0,0 @@
|
||||
#' Define default build variables
|
||||
ARG ALPINE_VSN='3.17'
|
||||
ARG UID='9000'
|
||||
ARG USER='ejabberd'
|
||||
ARG HOME="opt/$USER"
|
||||
ARG METHOD='direct'
|
||||
ARG BUILD_DIR="/$USER"
|
||||
ARG VERSION='master'
|
||||
|
||||
################################################################################
|
||||
#' METHOD='direct' - build and install ejabberd directly from source
|
||||
FROM alpine:${ALPINE_VSN} AS direct
|
||||
|
||||
RUN apk -U add --no-cache \
|
||||
autoconf \
|
||||
automake \
|
||||
bash \
|
||||
build-base \
|
||||
curl \
|
||||
elixir \
|
||||
erlang-odbc \
|
||||
erlang-reltool \
|
||||
expat-dev \
|
||||
file \
|
||||
gd-dev \
|
||||
git \
|
||||
jpeg-dev \
|
||||
libpng-dev \
|
||||
libwebp-dev \
|
||||
linux-pam-dev \
|
||||
openssl-dev \
|
||||
sqlite-dev \
|
||||
yaml-dev \
|
||||
zlib-dev
|
||||
|
||||
RUN mix local.hex --force \
|
||||
&& mix local.rebar --force
|
||||
|
||||
ARG BUILD_DIR
|
||||
COPY / $BUILD_DIR/
|
||||
|
||||
WORKDIR $BUILD_DIR
|
||||
RUN mv .github/container/ejabberdctl.template . \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure --with-rebar=mix --enable-all \
|
||||
&& make deps \
|
||||
&& make rel
|
||||
|
||||
WORKDIR /rootfs
|
||||
ARG VERSION
|
||||
ARG HOME
|
||||
RUN mkdir -p $HOME $HOME-$VERSION \
|
||||
&& cp -r $BUILD_DIR/_build/prod/rel/ejabberd/* $HOME-$VERSION \
|
||||
&& mv $HOME-$VERSION/conf $HOME/conf
|
||||
|
||||
RUN cp -p $BUILD_DIR/tools/captcha*.sh $HOME-$VERSION/lib
|
||||
|
||||
RUN find "$HOME-$VERSION/bin" -name 'ejabberd' -delete \
|
||||
&& find "$HOME-$VERSION/releases" -name 'COOKIE' -delete
|
||||
|
||||
RUN wget -O "$HOME/conf/cacert.pem" 'https://curl.se/ca/cacert.pem' \
|
||||
&& sed -i '/^loglevel:/a \ \
|
||||
\nca_file: /opt/ejabberd/conf/cacert.pem \
|
||||
\ncertfiles: \
|
||||
\n - /opt/ejabberd/conf/server.pem' "$HOME/conf/ejabberd.yml"
|
||||
|
||||
################################################################################
|
||||
#' METHOD='package' - install ejabberd from binary tarball package
|
||||
FROM alpine:${ALPINE_VSN} AS package
|
||||
COPY tarballs/ejabberd-*-linux-musl-*.tar.gz /tmp/
|
||||
WORKDIR /rootfs
|
||||
ARG HOME
|
||||
RUN home_root_dir=$(echo $HOME | sed 's|\(.*\)/.*|\1 |') \
|
||||
&& mkdir -p $home_root_dir \
|
||||
&& ARCH=$(uname -m | sed -e 's/x86_64/x64/;s/aarch64/arm64/') \
|
||||
&& tar -xzf /tmp/ejabberd-*-linux-musl-$ARCH.tar.gz -C $home_root_dir
|
||||
|
||||
################################################################################
|
||||
#' Prepare ejabberd for runtime
|
||||
FROM ${METHOD} AS ejabberd
|
||||
RUN apk -U add --no-cache \
|
||||
git \
|
||||
libcap-utils \
|
||||
openssl
|
||||
|
||||
WORKDIR /rootfs
|
||||
ARG HOME
|
||||
RUN mkdir -p usr/local/bin $HOME/conf $HOME/database $HOME/logs $HOME/upload
|
||||
|
||||
ARG BUILD_DIR
|
||||
RUN if [ ! -d $HOME/.ejabberd-modules ]; \
|
||||
then \
|
||||
if [ -d $BUILD_DIR/.ejabberd-modules ]; \
|
||||
then cp -r $BUILD_DIR/.ejabberd-modules $HOME; \
|
||||
else git clone https://github.com/processone/ejabberd-contrib --depth 1 \
|
||||
$HOME/.ejabberd-modules/sources/ejabberd-contrib; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
RUN export PEM=$HOME/conf/server.pem \
|
||||
&& openssl req -x509 \
|
||||
-batch \
|
||||
-nodes \
|
||||
-newkey rsa:4096 \
|
||||
-keyout $PEM \
|
||||
-out $PEM \
|
||||
-days 3650 \
|
||||
-subj "/CN=localhost"
|
||||
|
||||
RUN home_root_dir=$(echo $HOME | sed 's|\(.*\)/.*|\1 |') \
|
||||
&& setcap 'cap_net_bind_service=+ep' $(find $home_root_dir -name beam.smp) \
|
||||
&& echo -e \
|
||||
"#!/bin/sh \
|
||||
\n[ -z \$ERLANG_NODE_ARG ] && export ERLANG_NODE_ARG=ejabberd@localhost \
|
||||
\nexport CONFIG_DIR=/$HOME/conf \
|
||||
\nexport LOGS_DIR=/$HOME/logs \
|
||||
\nexport SPOOL_DIR=/$HOME/database \
|
||||
\nexec /$(find $home_root_dir -name ejabberdctl) \"\$@\"" \
|
||||
> usr/local/bin/ejabberdctl \
|
||||
&& chmod +x usr/local/bin/* \
|
||||
&& scanelf --needed --nobanner --format '%n#p' --recursive $home_root_dir \
|
||||
| tr ',' '\n' | sort -u | awk 'system("[ -e $home_root_dir" $1 " ]") == 0 { next } \
|
||||
{ print "so:" $1 }' > /tmp/runDeps
|
||||
|
||||
ARG UID
|
||||
RUN chown -R $UID:$UID $HOME
|
||||
|
||||
################################################################################
|
||||
#' METHOD='package' - install runtime dependencies
|
||||
FROM alpine:${ALPINE_VSN} AS runtime-package
|
||||
RUN apk -U upgrade --available --no-cache \
|
||||
&& apk add --no-cache \
|
||||
libcap2 \
|
||||
tini
|
||||
|
||||
################################################################################
|
||||
#' METHOD='direct' - install runtime dependencies
|
||||
FROM runtime-package AS runtime-direct
|
||||
COPY --from=ejabberd /tmp/runDeps /tmp/runDeps
|
||||
RUN apk add --no-cache \
|
||||
$(cat /tmp/runDeps)
|
||||
|
||||
################################################################################
|
||||
#' Finalize runtime environment
|
||||
FROM runtime-${METHOD} AS runtime
|
||||
ARG USER
|
||||
ARG UID
|
||||
ARG HOME
|
||||
RUN addgroup $USER -g $UID \
|
||||
&& adduser -s /sbin/nologin -D -u $UID -h /$HOME -G $USER $USER
|
||||
|
||||
################################################################################
|
||||
#' Build together production image
|
||||
FROM scratch AS prod
|
||||
ARG USER
|
||||
ARG HOME
|
||||
|
||||
COPY --from=runtime / /
|
||||
COPY --from=ejabberd /rootfs /
|
||||
|
||||
HEALTHCHECK \
|
||||
--interval=1m \
|
||||
--timeout=5s \
|
||||
--start-period=5s \
|
||||
--retries=10 \
|
||||
CMD ejabberdctl status
|
||||
|
||||
WORKDIR /$HOME
|
||||
USER $USER
|
||||
VOLUME ["/$HOME"]
|
||||
EXPOSE 1883 4369-4399 5210 5222 5269 5280 5443
|
||||
|
||||
ENTRYPOINT ["/sbin/tini","--","/usr/local/bin/ejabberdctl"]
|
||||
CMD ["foreground"]
|
||||
@@ -1,294 +0,0 @@
|
||||
@echo off
|
||||
|
||||
::
|
||||
:: ejabberd container installer for Windows
|
||||
:: -------------------------------------
|
||||
:: v0.4
|
||||
::
|
||||
:: This batch script downloads an ejabberd container image
|
||||
:: and setups a docker container to run ejabberd.
|
||||
|
||||
::
|
||||
:: 1. Download and install Docker:
|
||||
::
|
||||
:: If you use Windows 10, download Docker Desktop from:
|
||||
:: https://www.docker.com/
|
||||
::
|
||||
:: If you use Windows 7 or 8, download Docker Toolbox from:
|
||||
:: https://github.com/docker/toolbox/releases
|
||||
:: After installation, run Docker Quickstart Installer
|
||||
::
|
||||
|
||||
::
|
||||
:: 2. Edit those options:
|
||||
|
||||
:: Directory where your ejabberd deployment files will be installed
|
||||
:: (configuration, database, logs, ...)
|
||||
::
|
||||
:: In Windows 10 you can configure the path:
|
||||
|
||||
set INSTALL_DIR_WINDOWS10=C:\ejabberd
|
||||
|
||||
:: In older Windows, not configurable, it will be installed in:
|
||||
:: C:\Users\%USERNAME%\ejabberd
|
||||
|
||||
:: Please enter the desired ejabberd domain name.
|
||||
:: The domain is the visible attribute that is added to the username
|
||||
:: to form the Jabber Identifier (for example: user@example.net).
|
||||
:: This computer must be known on the network with this address name.
|
||||
:: You can later add more in conf/ejabberd.yml
|
||||
|
||||
set HOST=localhost
|
||||
|
||||
:: Please enter the administrator username for the current
|
||||
:: ejabberd installation. A Jabber account with this username
|
||||
:: will be created and granted administrative privileges.
|
||||
:: Don't use blankspaces in the username.
|
||||
|
||||
set USER=admin
|
||||
|
||||
:: Please provide a password for that new administrator account
|
||||
|
||||
set PASSWORD=
|
||||
|
||||
:: By default this downloads 'latest' ejabberd version,
|
||||
:: but you can set a specific version, for example '22.05'
|
||||
:: or the bleeding edge 'master'. See available tags in
|
||||
:: https://github.com/processone/ejabberd/pkgs/container/ejabberd
|
||||
|
||||
set VERSION=latest
|
||||
|
||||
:: This tells docker what ports ejabberd will use.
|
||||
:: You can later configure them in conf/ejabberd.yml
|
||||
|
||||
set PORTS=5180 5222 5269 5443
|
||||
|
||||
::
|
||||
:: 3. Now save this script and run it.
|
||||
::
|
||||
|
||||
::
|
||||
:: 4. When installation is completed:
|
||||
::
|
||||
:: If using Windows 10, open Docker Desktop and you can:
|
||||
::
|
||||
:: - (>) START the ejabberd container
|
||||
:: - Enter WebAdmin: click the ([->]) OPEN IN BROWSER button
|
||||
:: - To try ejabberdctl, click the (>_) CLI button, then: ejabberdctl
|
||||
:: - ([]) STOP the ejabberd container
|
||||
::
|
||||
:: If using an old Windows, open Kitematic and you can:
|
||||
::
|
||||
:: - START the ejabberd container
|
||||
:: - Open your configuration, logs, ... in Settings > Volumes
|
||||
:: - Enter WebAdmin in Settings > Hostname/Ports > click on the 5180 port
|
||||
:: - Try ejabberdctl in EXEC, then: ejabberdctl
|
||||
:: - STOP the ejabberd container
|
||||
::
|
||||
:: You can delete the container and create it again running this script,
|
||||
:: the configuration and database are maintained.
|
||||
::
|
||||
|
||||
::===============================================================
|
||||
:: Check Windows version
|
||||
::
|
||||
::===============================================================
|
||||
|
||||
set INSTALL_DIR_DOCKER=c/Users/%USERNAME%/ejabberd
|
||||
|
||||
for /f "tokens=4-5 delims=. " %%i in ('ver') do set WVERSION=%%i.%%j
|
||||
if "%wversion%" == "10.0" (
|
||||
echo === Preparing paths to install in Windows 10...
|
||||
set INSTALL_DIR=%INSTALL_DIR_WINDOWS10%
|
||||
set VC=-v %INSTALL_DIR_WINDOWS10%\conf:/opt/ejabberd/conf
|
||||
set VD=-v %INSTALL_DIR_WINDOWS10%\database:/opt/ejabberd/database
|
||||
set VL=-v %INSTALL_DIR_WINDOWS10%\logs:/opt/ejabberd/logs
|
||||
set VM=-v %INSTALL_DIR_WINDOWS10%\ejabberd-modules:/opt/ejabberd/.ejabberd-modules
|
||||
set DOCKERDOWNLOAD="First download and install Docker Desktop from https://www.docker.com/"
|
||||
) else (
|
||||
echo === Preparing paths to install in Windows older than 10...
|
||||
set INSTALL_DIR=C:\Users\%USERNAME%\ejabberd
|
||||
set VC=-v "/%INSTALL_DIR_DOCKER%/conf:/opt/ejabberd/conf"
|
||||
set VD=-v "/%INSTALL_DIR_DOCKER%/database:/opt/ejabberd/database"
|
||||
set VL=-v "/%INSTALL_DIR_DOCKER%/logs:/opt/ejabberd/logs"
|
||||
set VM=-v "/%INSTALL_DIR_DOCKER%/ejabberd-modules:/opt/ejabberd/.ejabberd-modules"
|
||||
set DOCKERDOWNLOAD="First download and install Docker Toolbox from https://github.com/docker/toolbox/releases"
|
||||
)
|
||||
set VOLUMES=%VC% %VD% %VL% %VM%
|
||||
|
||||
::===============================================================
|
||||
:: Check docker is installed
|
||||
::
|
||||
::===============================================================
|
||||
|
||||
docker version >NUL
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo.
|
||||
echo === ERROR: It seems docker is not installed!!!
|
||||
echo.
|
||||
echo %DOCKERDOWNLOAD%
|
||||
echo === Then try to run this script again.
|
||||
echo.
|
||||
pause
|
||||
exit 1
|
||||
)
|
||||
|
||||
::===============================================================
|
||||
:: Check install options are correctly set
|
||||
::
|
||||
::===============================================================
|
||||
|
||||
if [%PASSWORD%]==[] (
|
||||
echo.
|
||||
echo === ERROR: PASSWORD not set!!!
|
||||
echo.
|
||||
echo === Please edit this script and set the PASSWORD.
|
||||
echo === Then try to run this script again.
|
||||
echo.
|
||||
pause
|
||||
exit 1
|
||||
)
|
||||
|
||||
::===============================================================
|
||||
:: Download Docker image
|
||||
::
|
||||
::===============================================================
|
||||
|
||||
set IMAGE=ghcr.io/processone/ejabberd:%VERSION%
|
||||
|
||||
echo.
|
||||
echo === Checking if the '%IMAGE%' container image was already downloaded...
|
||||
docker image history %IMAGE% >NUL
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo === The '%IMAGE%' container image was not downloaded yet.
|
||||
echo.
|
||||
echo === Downloading the '%IMAGE%' container image, please wait...
|
||||
docker pull %IMAGE%
|
||||
) else (
|
||||
echo === The '%IMAGE%' container image was already downloaded.
|
||||
)
|
||||
|
||||
::===============================================================
|
||||
:: Create preliminary container
|
||||
::
|
||||
::===============================================================
|
||||
|
||||
echo.
|
||||
echo === Checking if the 'ejabberd' container already exists...
|
||||
docker container logs ejabberd
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo.
|
||||
echo === The 'ejabberd' container already exists.
|
||||
echo === Nothing to do, so installation finishes now.
|
||||
echo === You can go to Docker Desktop and start the 'ejabberd' container.
|
||||
echo.
|
||||
pause
|
||||
exit 1
|
||||
) else (
|
||||
echo === The 'ejabberd' container doesn't yet exist,
|
||||
echo === so let's continue the installation process.
|
||||
)
|
||||
|
||||
echo.
|
||||
if exist %INSTALL_DIR% (
|
||||
echo === The INSTALL_DIR %INSTALL_DIR% already exists.
|
||||
echo === No need to create the preliminary 'ejabberd-pre' image.
|
||||
) else (
|
||||
echo === The INSTALL_DIR %INSTALL_DIR% doesn't exist.
|
||||
echo === Let's create the preliminary 'ejabberd-pre' image.
|
||||
CALL :create-ejabberd-pre
|
||||
)
|
||||
|
||||
::===============================================================
|
||||
:: Create final container
|
||||
::
|
||||
::===============================================================
|
||||
|
||||
echo.
|
||||
echo === Creating the final 'ejabberd' container using %IMAGE% image...
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
set PS=
|
||||
for %%a in (%PORTS%) do (
|
||||
set PS=!PS! -p %%a:%%a
|
||||
)
|
||||
|
||||
docker create --name ejabberd --hostname localhost %PS% %VOLUMES% %IMAGE%
|
||||
|
||||
echo.
|
||||
echo === Installation completed.
|
||||
echo.
|
||||
pause
|
||||
|
||||
EXIT /B %ERRORLEVEL%
|
||||
|
||||
::===============================================================
|
||||
:: Function to create preliminary container
|
||||
::
|
||||
::===============================================================
|
||||
|
||||
:create-ejabberd-pre
|
||||
|
||||
echo.
|
||||
echo === Creating a preliminary 'ejabberd-pre' container using %IMAGE% image...
|
||||
docker create --name ejabberd-pre --hostname localhost %IMAGE%
|
||||
|
||||
echo.
|
||||
echo === Now 'ejabberd-pre' will be started.
|
||||
docker container start ejabberd-pre
|
||||
|
||||
echo.
|
||||
echo === Waiting ejabberd to be running...
|
||||
set /A timeout = 10
|
||||
set status=4
|
||||
goto :while
|
||||
|
||||
:statusstart
|
||||
docker exec -it ejabberd-pre ejabberdctl status
|
||||
goto :statusend
|
||||
|
||||
:while
|
||||
if %status% GTR 0 (
|
||||
echo.
|
||||
timeout /t 1 /nobreak >NUL
|
||||
set /A timeout = timeout - 1
|
||||
if %timeout% EQU 0 (
|
||||
set status=-1
|
||||
) else (
|
||||
goto :statusstart
|
||||
:statusend
|
||||
set status=%ERRORLEVEL%
|
||||
)
|
||||
goto :while
|
||||
)
|
||||
|
||||
echo.
|
||||
echo === Setting a few options...
|
||||
docker exec -it ejabberd-pre sed -i "s!- localhost!- %HOST%!g" conf/ejabberd.yml
|
||||
docker exec -it ejabberd-pre sed -i "s!^acl:!acl:\n admin:\n user:\n - \"%USER%@%HOST%\"!g" conf/ejabberd.yml
|
||||
docker exec -it ejabberd-pre sed -i "s!5280!5180!g" conf/ejabberd.yml
|
||||
docker exec -it ejabberd-pre sed -i "s!/admin!/!g" conf/ejabberd.yml
|
||||
docker exec -it ejabberd-pre ejabberdctl reload_config
|
||||
|
||||
echo.
|
||||
echo === Registering the administrator account...
|
||||
docker exec -it ejabberd-pre ejabberdctl register %USER% %HOST% %PASSWORD%
|
||||
docker exec -it ejabberd-pre ejabberdctl stop
|
||||
|
||||
echo.
|
||||
echo === Copying conf, database, logs...
|
||||
mkdir %INSTALL_DIR%
|
||||
mkdir %INSTALL_DIR%\conf
|
||||
mkdir %INSTALL_DIR%\database
|
||||
mkdir %INSTALL_DIR%\logs
|
||||
mkdir %INSTALL_DIR%\ejabberd-modules
|
||||
docker cp ejabberd-pre:/opt/ejabberd/conf/ %INSTALL_DIR%
|
||||
docker cp ejabberd-pre:/opt/ejabberd/database/ %INSTALL_DIR%
|
||||
docker cp ejabberd-pre:/opt/ejabberd/logs/ %INSTALL_DIR%
|
||||
|
||||
echo.
|
||||
echo === Deleting the preliminary 'ejabberd-pre' container...
|
||||
docker stop ejabberd-pre
|
||||
docker rm ejabberd-pre
|
||||
|
||||
EXIT /B 0
|
||||
@@ -1,387 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# define default configuration
|
||||
POLL=true
|
||||
ERL_MAX_PORTS=32000
|
||||
ERL_PROCESSES=250000
|
||||
ERL_MAX_ETS_TABLES=1400
|
||||
FIREWALL_WINDOW=""
|
||||
INET_DIST_INTERFACE=""
|
||||
ERLANG_NODE=ejabberd@localhost
|
||||
|
||||
# define default environment variables
|
||||
[ -z "$SCRIPT" ] && SCRIPT=$0
|
||||
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd -P)"
|
||||
# shellcheck disable=SC2034
|
||||
ERTS_VSN="{{erts_vsn}}"
|
||||
ERL="{{erl}}"
|
||||
IEX="{{bindir}}/iex"
|
||||
EPMD="{{epmd}}"
|
||||
COOKIE_FILE="$HOME"/.erlang.cookie
|
||||
[ -n "$ERLANG_COOKIE" ] && [ ! -f "$COOKIE_FILE" ] && echo "$ERLANG_COOKIE" > "$COOKIE_FILE" && chmod 400 "$COOKIE_FILE"
|
||||
|
||||
# check the proper system user is used
|
||||
case $(id -un) in
|
||||
"$INSTALLUSER")
|
||||
EXEC_CMD="as_current_user"
|
||||
;;
|
||||
root)
|
||||
if [ -n "$INSTALLUSER" ] ; then
|
||||
EXEC_CMD="as_install_user"
|
||||
else
|
||||
EXEC_CMD="as_current_user"
|
||||
echo "WARNING: It is not recommended to run ejabberd as root" >&2
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if [ -n "$INSTALLUSER" ] ; then
|
||||
echo "ERROR: This command can only be run by root or the user $INSTALLUSER" >&2
|
||||
exit 7
|
||||
else
|
||||
EXEC_CMD="as_current_user"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# parse command line parameters
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
-n|--node) ERLANG_NODE_ARG=$2; shift 2;;
|
||||
-s|--spool) SPOOL_DIR=$2; shift 2;;
|
||||
-l|--logs) LOGS_DIR=$2; shift 2;;
|
||||
-f|--config) EJABBERD_CONFIG_PATH=$2; shift 2;;
|
||||
-c|--ctl-config) EJABBERDCTL_CONFIG_PATH=$2; shift 2;;
|
||||
-d|--config-dir) CONFIG_DIR=$2; shift 2;;
|
||||
-t|--no-timeout) NO_TIMEOUT="--no-timeout"; shift;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
# define ejabberd variables if not already defined from the command line
|
||||
: "${CONFIG_DIR:="{{config_dir}}"}"
|
||||
: "${LOGS_DIR:="{{logs_dir}}"}"
|
||||
: "${SPOOL_DIR:="{{spool_dir}}"}"
|
||||
: "${EJABBERD_CONFIG_PATH:="$CONFIG_DIR/ejabberd.yml"}"
|
||||
: "${EJABBERDCTL_CONFIG_PATH:="$CONFIG_DIR/ejabberdctl.cfg"}"
|
||||
# Allows passing extra Erlang command-line arguments in vm.args file
|
||||
: "${VMARGS:="$CONFIG_DIR/vm.args"}"
|
||||
# shellcheck source=ejabberdctl.cfg.example
|
||||
[ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH"
|
||||
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
|
||||
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
|
||||
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
|
||||
|
||||
# define erl parameters
|
||||
ERLANG_OPTS="+K $POLL +P $ERL_PROCESSES $ERL_OPTIONS"
|
||||
if [ -n "$FIREWALL_WINDOW" ] ; then
|
||||
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}"
|
||||
fi
|
||||
if [ -n "$INET_DIST_INTERFACE" ] ; then
|
||||
INET_DIST_INTERFACE2=$("$ERL" -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt)
|
||||
if [ -n "$INET_DIST_INTERFACE2" ] ; then
|
||||
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
|
||||
fi
|
||||
fi
|
||||
[ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -erl_epmd_port $ERL_DIST_PORT -start_epmd false"
|
||||
# if vm.args file exists in config directory, pass it to Erlang VM
|
||||
[ -f "$VMARGS" ] && ERLANG_OPTS="$ERLANG_OPTS -args_file $VMARGS"
|
||||
ERL_LIBS='{{libdir}}'
|
||||
ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
|
||||
ERL_INETRC="$CONFIG_DIR"/inetrc
|
||||
|
||||
# define ejabberd parameters
|
||||
EJABBERD_OPTS="$EJABBERD_OPTS\
|
||||
$(sed '/^log_rotate_size/!d;s/:[ \t]*\([0-9]\{1,\}\).*/ \1/;s/:[ \t]*\(infinity\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")\
|
||||
$(sed '/^log_rotate_count/!d;s/:[ \t]*\([0-9]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")\
|
||||
$(sed '/^log_burst_limit_count/!d;s/:[ \t]*\([0-9]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")\
|
||||
$(sed '/^log_burst_limit_window_time/!d;s/:[ \t]*\([0-9]*[a-z]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")"
|
||||
[ -n "$EJABBERD_OPTS" ] && EJABBERD_OPTS="-ejabberd $EJABBERD_OPTS"
|
||||
EJABBERD_OPTS="-mnesia dir \"$SPOOL_DIR\" $MNESIA_OPTIONS $EJABBERD_OPTS -s ejabberd"
|
||||
|
||||
# export global variables
|
||||
export EJABBERD_CONFIG_PATH
|
||||
export EJABBERD_LOG_PATH
|
||||
export EJABBERD_PID_PATH
|
||||
export ERL_CRASH_DUMP
|
||||
export ERL_EPMD_ADDRESS
|
||||
export ERL_DIST_PORT
|
||||
export ERL_INETRC
|
||||
export ERL_MAX_PORTS
|
||||
export ERL_MAX_ETS_TABLES
|
||||
export CONTRIB_MODULES_PATH
|
||||
export CONTRIB_MODULES_CONF_DIR
|
||||
export ERL_LIBS
|
||||
export SCRIPT_DIR
|
||||
|
||||
set_dist_client()
|
||||
{
|
||||
[ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -dist_listen false"
|
||||
}
|
||||
|
||||
# run command either directly or via su $INSTALLUSER
|
||||
run_cmd()
|
||||
{
|
||||
case $EXEC_CMD in
|
||||
as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
|
||||
as_current_user) "$@" ;;
|
||||
esac
|
||||
}
|
||||
exec_cmd()
|
||||
{
|
||||
case $EXEC_CMD in
|
||||
as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
|
||||
as_current_user) exec "$@" ;;
|
||||
esac
|
||||
}
|
||||
run_erl()
|
||||
{
|
||||
NODE=$1; shift
|
||||
run_cmd "$ERL" ${S:--}name "$NODE" $ERLANG_OPTS "$@"
|
||||
}
|
||||
exec_erl()
|
||||
{
|
||||
NODE=$1; shift
|
||||
exec_cmd "$ERL" ${S:--}name "$NODE" $ERLANG_OPTS "$@"
|
||||
}
|
||||
exec_iex()
|
||||
{
|
||||
NODE=$1; shift
|
||||
exec_cmd "$IEX" -${S:--}name "$NODE" --erl "$ERLANG_OPTS" "$@"
|
||||
}
|
||||
|
||||
# usage
|
||||
debugwarning()
|
||||
{
|
||||
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo ""
|
||||
echo "IMPORTANT: we will attempt to attach an INTERACTIVE shell"
|
||||
echo "to an already running ejabberd node."
|
||||
echo "If an ERROR is printed, it means the connection was not successful."
|
||||
echo "You can interact with the ejabberd node if you know how to use it."
|
||||
echo "Please be extremely cautious with your actions,"
|
||||
echo "and exit immediately if you are not completely sure."
|
||||
echo ""
|
||||
echo "To detach this shell from ejabberd, press:"
|
||||
echo " control+c, control+c"
|
||||
echo ""
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:"
|
||||
echo " EJABBERD_BYPASS_WARNINGS=true"
|
||||
echo "Press return to continue"
|
||||
read -r _
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
livewarning()
|
||||
{
|
||||
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo ""
|
||||
echo "IMPORTANT: ejabberd is going to start in LIVE (interactive) mode."
|
||||
echo "All log messages will be shown in the command shell."
|
||||
echo "You can interact with the ejabberd node if you know how to use it."
|
||||
echo "Please be extremely cautious with your actions,"
|
||||
echo "and exit immediately if you are not completely sure."
|
||||
echo ""
|
||||
echo "To exit this LIVE mode and stop ejabberd, press:"
|
||||
echo " q(). and press the Enter key"
|
||||
echo ""
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:"
|
||||
echo " EJABBERD_BYPASS_WARNINGS=true"
|
||||
echo "Press return to continue"
|
||||
read -r _
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
help()
|
||||
{
|
||||
echo ""
|
||||
echo "Commands to start an ejabberd node:"
|
||||
echo " start Start in server mode"
|
||||
echo " foreground Start in server mode (attached)"
|
||||
echo " foreground-quiet Start in server mode (attached), show only critical messages"
|
||||
echo " live Start in interactive mode, with Erlang shell"
|
||||
echo " iexlive Start in interactive mode, with Elixir shell"
|
||||
echo ""
|
||||
echo "Commands to interact with a running ejabberd node:"
|
||||
echo " debug Attach an interactive Erlang shell to a running node"
|
||||
echo " iexdebug Attach an interactive Elixir shell to a running node"
|
||||
echo " etop Attach to a running node and start Erlang Top"
|
||||
echo " ping Send ping to the node, returns pong or pang"
|
||||
echo " started|stopped Wait for the node to fully start|stop"
|
||||
echo ""
|
||||
echo "Optional parameters when starting an ejabberd node:"
|
||||
echo " --config-dir dir Config ejabberd: $CONFIG_DIR"
|
||||
echo " --config file Config ejabberd: $EJABBERD_CONFIG_PATH"
|
||||
echo " --ctl-config file Config ejabberdctl: $EJABBERDCTL_CONFIG_PATH"
|
||||
echo " --logs dir Directory for logs: $LOGS_DIR"
|
||||
echo " --spool dir Database spool dir: $SPOOL_DIR"
|
||||
echo " --node nodename ejabberd node name: $ERLANG_NODE"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# dynamic node name helper
|
||||
uid()
|
||||
{
|
||||
uuid=$(uuidgen 2>/dev/null)
|
||||
random=$(awk 'BEGIN { srand(); print int(rand()*32768) }' /dev/null)
|
||||
[ -z "$uuid" ] && [ -f /proc/sys/kernel/random/uuid ] && uuid=$(cat /proc/sys/kernel/random/uuid)
|
||||
[ -z "$uuid" ] && uuid=$(printf "%X" "${random:-$$}$(date +%M%S)")
|
||||
uuid=$(printf '%s' $uuid | sed 's/^\(...\).*$/\1/')
|
||||
[ $# -eq 0 ] && echo "${uuid}-${ERLANG_NODE}"
|
||||
[ $# -eq 1 ] && echo "${uuid}-${1}-${ERLANG_NODE}"
|
||||
[ $# -eq 2 ] && echo "${uuid}-${1}@${2}"
|
||||
}
|
||||
|
||||
# stop epmd if there is no other running node
|
||||
stop_epmd()
|
||||
{
|
||||
[ -n "$ERL_DIST_PORT" ] && return
|
||||
"$EPMD" -names 2>/dev/null | grep -q name || "$EPMD" -kill >/dev/null
|
||||
}
|
||||
|
||||
# make sure node not already running and node name unregistered
|
||||
# if all ok, ensure runtime directory exists and make it current directory
|
||||
check_start()
|
||||
{
|
||||
[ -n "$ERL_DIST_PORT" ] && return
|
||||
"$EPMD" -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && {
|
||||
pgrep -f "$ERLANG_NODE" >/dev/null && {
|
||||
echo "ERROR: The ejabberd node '$ERLANG_NODE' is already running."
|
||||
exit 4
|
||||
}
|
||||
pgrep beam >/dev/null && {
|
||||
echo "ERROR: The ejabberd node '$ERLANG_NODE' is registered,"
|
||||
echo " but no related beam process has been found."
|
||||
echo "Shutdown all other erlang nodes, and call 'epmd -kill'."
|
||||
exit 5
|
||||
}
|
||||
"$EPMD" -kill >/dev/null
|
||||
}
|
||||
}
|
||||
|
||||
post_waiter_fork()
|
||||
{
|
||||
(FIRST_RUN=$FIRST_RUN "$0" post_waiter)&
|
||||
}
|
||||
|
||||
post_waiter_waiting()
|
||||
{
|
||||
$0 started
|
||||
[ -n "$FIRST_RUN" ] && [ -n "$CTL_ON_CREATE" ] && (post_waiter_loop $CTL_ON_CREATE)
|
||||
[ -n "$CTL_ON_START" ] && post_waiter_loop $CTL_ON_START
|
||||
}
|
||||
|
||||
post_waiter_loop()
|
||||
{
|
||||
LIST=$@
|
||||
HEAD=${LIST%% ; *}
|
||||
TAIL=${LIST#* ; }
|
||||
echo ":> ejabberdctl $HEAD"
|
||||
$0 $HEAD
|
||||
[ "$HEAD" = "$TAIL" ] || post_waiter_loop $TAIL
|
||||
}
|
||||
|
||||
# allow sync calls
|
||||
wait_status()
|
||||
{
|
||||
# args: status try delay
|
||||
# return: 0 OK, 1 KO
|
||||
timeout="$2"
|
||||
status=4
|
||||
while [ "$status" -ne "$1" ] ; do
|
||||
sleep "$3"
|
||||
timeout=$((timeout - 1))
|
||||
if [ $timeout -eq 0 ] ; then
|
||||
status="$1"
|
||||
else
|
||||
run_erl "$(uid ctl)" -hidden -noinput -s ejabberd_ctl \
|
||||
-extra "$ERLANG_NODE" $NO_TIMEOUT status > /dev/null
|
||||
status="$?"
|
||||
fi
|
||||
done
|
||||
[ $timeout -gt 0 ]
|
||||
}
|
||||
|
||||
# ensure we can change current directory to SPOOL_DIR
|
||||
[ -f "$SPOOL_DIR/schema.DAT" ] || FIRST_RUN=true
|
||||
[ -d "$SPOOL_DIR" ] || run_cmd mkdir -p "$SPOOL_DIR"
|
||||
cd "$SPOOL_DIR" || {
|
||||
echo "ERROR: can not access directory $SPOOL_DIR"
|
||||
exit 6
|
||||
}
|
||||
|
||||
# main
|
||||
case $1 in
|
||||
start)
|
||||
check_start
|
||||
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -detached
|
||||
;;
|
||||
foreground)
|
||||
check_start
|
||||
post_waiter_fork
|
||||
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -noinput
|
||||
;;
|
||||
foreground-quiet)
|
||||
check_start
|
||||
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -noinput -ejabberd quiet true
|
||||
;;
|
||||
live)
|
||||
livewarning
|
||||
check_start
|
||||
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS
|
||||
;;
|
||||
debug)
|
||||
debugwarning
|
||||
set_dist_client
|
||||
exec_erl "$(uid debug)" -hidden -remsh "$ERLANG_NODE"
|
||||
;;
|
||||
etop)
|
||||
set_dist_client
|
||||
exec_erl "$(uid top)" -hidden -node "$ERLANG_NODE" -s etop \
|
||||
-s erlang halt -output text
|
||||
;;
|
||||
iexdebug)
|
||||
debugwarning
|
||||
set_dist_client
|
||||
exec_iex "$(uid debug)" --remsh "$ERLANG_NODE"
|
||||
;;
|
||||
iexlive)
|
||||
livewarning
|
||||
exec_iex "$ERLANG_NODE" --erl "$EJABBERD_OPTS" --app ejabberd
|
||||
;;
|
||||
ping)
|
||||
PEER=${2:-$ERLANG_NODE}
|
||||
[ "$PEER" = "${PEER%.*}" ] && PS="-s"
|
||||
set_dist_client
|
||||
exec_cmd "$ERL" ${PS:--}name "$(uid ping "$(hostname $PS)")" $ERLANG_OPTS \
|
||||
-noinput -hidden -eval 'io:format("~p~n",[net_adm:ping('"'$PEER'"')])' \
|
||||
-s erlang halt -output text
|
||||
;;
|
||||
started)
|
||||
set_dist_client
|
||||
wait_status 0 30 2 # wait 30x2s before timeout
|
||||
;;
|
||||
stopped)
|
||||
set_dist_client
|
||||
wait_status 3 30 2 && stop_epmd # wait 30x2s before timeout
|
||||
;;
|
||||
post_waiter)
|
||||
post_waiter_waiting
|
||||
;;
|
||||
*)
|
||||
set_dist_client
|
||||
run_erl "$(uid ctl)" -hidden -noinput -s ejabberd_ctl \
|
||||
-extra "$ERLANG_NODE" $NO_TIMEOUT "$@"
|
||||
result=$?
|
||||
case $result in
|
||||
2|3) help;;
|
||||
*) :;;
|
||||
esac
|
||||
exit $result
|
||||
;;
|
||||
esac
|
||||
@@ -1,38 +0,0 @@
|
||||
# Configuration for Lock Threads - https://github.com/dessant/lock-threads
|
||||
|
||||
# Number of days of inactivity before a closed issue or pull request is locked
|
||||
daysUntilLock: 365
|
||||
|
||||
# Skip issues and pull requests created before a given timestamp. Timestamp must
|
||||
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
|
||||
skipCreatedBefore: false
|
||||
|
||||
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
|
||||
exemptLabels: []
|
||||
|
||||
# Label to add before locking, such as `outdated`. Set to `false` to disable
|
||||
lockLabel: false
|
||||
|
||||
# Comment to post before locking. Set to `false` to disable
|
||||
lockComment: >
|
||||
This thread has been automatically locked since there has not been
|
||||
any recent activity after it was closed. Please open a new issue for
|
||||
related bugs.
|
||||
|
||||
# Assign `resolved` as the reason for locking. Set to `false` to disable
|
||||
setLockReason: true
|
||||
|
||||
# Limit to only `issues` or `pulls`
|
||||
# only: issues
|
||||
|
||||
# Optionally, specify configuration settings just for `issues` or `pulls`
|
||||
# issues:
|
||||
# exemptLabels:
|
||||
# - help-wanted
|
||||
# lockLabel: outdated
|
||||
|
||||
# pulls:
|
||||
# daysUntilLock: 30
|
||||
|
||||
# Repository to extend settings from
|
||||
# _extends: repo
|
||||
@@ -1,328 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.devcontainer/**'
|
||||
- 'examples/**'
|
||||
- 'lib/**'
|
||||
- 'man/**'
|
||||
- 'priv/**'
|
||||
- '**.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.devcontainer/**'
|
||||
- 'examples/**'
|
||||
- 'lib/**'
|
||||
- 'man/**'
|
||||
- 'priv/**'
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
otp: ['20.0', '25.3', '26.0-rc3']
|
||||
runs-on: ubuntu-20.04
|
||||
services:
|
||||
redis:
|
||||
image: redis
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Test shell scripts
|
||||
if: matrix.otp == '25.3'
|
||||
run: |
|
||||
shellcheck test/ejabberd_SUITE_data/gencerts.sh
|
||||
shellcheck tools/captcha.sh
|
||||
shellcheck ejabberd.init.template
|
||||
shellcheck -x ejabberdctl.template
|
||||
|
||||
- name: Get specific Erlang/OTP
|
||||
if: matrix.otp != '25.3'
|
||||
uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: ${{ matrix.otp }}
|
||||
|
||||
- name: Get a compatible Rebar3
|
||||
if: matrix.otp <= '21.3'
|
||||
run: |
|
||||
rm rebar3
|
||||
wget https://github.com/processone/ejabberd/raw/21.12/rebar3
|
||||
chmod +x rebar3
|
||||
|
||||
- name: Install MS SQL Server
|
||||
run: |
|
||||
docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=ejabberd_Test1" \
|
||||
-v $(pwd)/test/docker/db/mssql/initdb/initdb_mssql.sql:/initdb_mssql.sql:ro \
|
||||
-v $(pwd)/sql/mssql.sql:/mssql.sql:ro \
|
||||
-v $(pwd)/sql/mssql.new.sql:/mssql.new.sql:ro \
|
||||
-p 1433:1433 --name ejabberd-mssql "mcr.microsoft.com/mssql/server:2019-latest"
|
||||
sleep 10
|
||||
|
||||
- name: Prepare databases
|
||||
run: |
|
||||
docker exec ejabberd-mssql /opt/mssql-tools/bin/sqlcmd -U SA -P ejabberd_Test1 -S localhost -i /initdb_mssql.sql
|
||||
docker exec ejabberd-mssql /opt/mssql-tools/bin/sqlcmd -U SA -P ejabberd_Test1 -S localhost -d ejabberd_test -i /mssql.sql
|
||||
sudo systemctl start mysql.service
|
||||
sudo systemctl start postgresql.service
|
||||
mysql -u root -proot -e "CREATE DATABASE ejabberd_test;"
|
||||
mysql -u root -proot -e "CREATE USER 'ejabberd_test'@'localhost'
|
||||
IDENTIFIED BY 'ejabberd_test';"
|
||||
mysql -u root -proot -e "GRANT ALL ON ejabberd_test.*
|
||||
TO 'ejabberd_test'@'localhost';"
|
||||
mysql -u ejabberd_test -pejabberd_test ejabberd_test < sql/mysql.sql
|
||||
pg_isready
|
||||
sudo -u postgres psql -c "CREATE DATABASE ejabberd_test;"
|
||||
sudo -u postgres psql -c "CREATE USER ejabberd_test
|
||||
WITH PASSWORD 'ejabberd_test';"
|
||||
sudo -u postgres psql -c "GRANT ALL PRIVILEGES
|
||||
ON DATABASE ejabberd_test TO ejabberd_test;"
|
||||
PGPASSWORD="ejabberd_test" psql -h localhost -U ejabberd_test ejabberd_test -f sql/pg.sql
|
||||
sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL
|
||||
TABLES IN SCHEMA public
|
||||
TO ejabberd_test;"
|
||||
sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL
|
||||
SEQUENCES IN SCHEMA public
|
||||
TO ejabberd_test;"
|
||||
|
||||
- name: Prepare libraries
|
||||
run: |
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -y purge libgd3 nginx
|
||||
sudo apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
|
||||
libsqlite3-dev libwebp-dev libyaml-dev
|
||||
|
||||
- name: Prepare rebar
|
||||
run: |
|
||||
echo '{xref_ignores, [{eldap_filter_yecc, return_error, 2}
|
||||
]}.' >>rebar.config
|
||||
echo '{xref_checks, [deprecated_function_calls, deprecated_functions,
|
||||
locals_not_used, undefined_function_calls, undefined_functions]}.
|
||||
% Disabled: exports_not_used,' >>rebar.config
|
||||
echo '{dialyzer, [{get_warnings, true}, {plt_extra_apps, [cache_tab,
|
||||
eimp, epam, esip, ezlib, fast_tls, fast_xml, fast_yaml,
|
||||
mqtree, p1_acme, p1_mysql, p1_oauth2, p1_pgsql, p1_utils, pkix,
|
||||
sqlite3, stringprep, stun, xmpp, yconf]} ]}.' >>rebar.config
|
||||
echo "{ct_opts, [{keep_logs, 20}]}." >>rebar.config
|
||||
|
||||
- name: Remove syntax_tools from release
|
||||
run: sed -i 's|, syntax_tools||g' src/ejabberd.app.src.script
|
||||
|
||||
- name: Cache rebar
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/rebar3/
|
||||
key: ${{matrix.otp}}-${{hashFiles('rebar.config')}}
|
||||
|
||||
- name: Download test logs
|
||||
if: matrix.otp == '25.3' && github.repository == 'processone/ejabberd'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
mkdir -p _build/test
|
||||
curl -sSL https://github.com/processone/ecil/tarball/gh-pages |
|
||||
tar -C _build/test --strip-components=1 --wildcards -xzf -
|
||||
rm -rf _build/test/logs/last/
|
||||
|
||||
- name: Compile
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure --with-rebar=./rebar3 \
|
||||
--prefix=/tmp/ejabberd \
|
||||
--enable-all \
|
||||
--disable-elixir \
|
||||
--disable-mssql \
|
||||
--disable-odbc
|
||||
make update
|
||||
make
|
||||
|
||||
- run: make install -s
|
||||
- run: make hooks
|
||||
- run: make options
|
||||
- run: make xref
|
||||
- run: make dialyzer
|
||||
if: matrix.otp != '26.0-rc3'
|
||||
|
||||
- name: Check Production Release
|
||||
run: |
|
||||
make rel
|
||||
RE=_build/prod/rel/ejabberd
|
||||
$RE/bin/ejabberdctl start
|
||||
$RE/bin/ejabberdctl started
|
||||
$RE/bin/ejabberdctl stop
|
||||
$RE/bin/ejabberdctl stopped
|
||||
cat $RE/logs/ejabberd.log
|
||||
grep -q "is stopped in" $RE/logs/ejabberd.log
|
||||
|
||||
- name: Check Development Release
|
||||
run: |
|
||||
make dev
|
||||
RE=_build/dev/rel/ejabberd
|
||||
$RE/bin/ejabberdctl start
|
||||
$RE/bin/ejabberdctl started
|
||||
$RE/bin/ejabberdctl stop
|
||||
$RE/bin/ejabberdctl stopped
|
||||
cat $RE/logs/ejabberd.log
|
||||
grep -q "is stopped in" $RE/logs/ejabberd.log
|
||||
|
||||
- name: Run tests
|
||||
id: ct
|
||||
run: |
|
||||
(cd priv && ln -sf ../sql)
|
||||
sed -i -e 's/ct:pal/ct:log/' test/suite.erl
|
||||
COMMIT=`echo $GITHUB_SHA | cut -c 1-7`
|
||||
DATE=`date +%s`
|
||||
REF_NAME=`echo $GITHUB_REF_NAME | tr "/" "_"`
|
||||
NODENAME=$DATE@$GITHUB_RUN_NUMBER-$GITHUB_ACTOR-$REF_NAME-$COMMIT
|
||||
LABEL=`git show -s --format=%s | cut -c 1-30`
|
||||
./rebar3 ct --name $NODENAME --label "$LABEL"
|
||||
./rebar3 cover
|
||||
|
||||
- name: Check results
|
||||
if: always() && (steps.ct.outcome != 'skipped' || steps.ct2.outcome != 'skipped')
|
||||
id: ctresults
|
||||
run: |
|
||||
[[ -d _build ]] && ln -s _build/test/logs/last/ logs || true
|
||||
ln `find logs/ -name suite.log` logs/suite.log
|
||||
grep 'TEST COMPLETE' logs/suite.log
|
||||
grep -q 'TEST COMPLETE,.* 0 failed' logs/suite.log
|
||||
test $(find logs/ -empty -name error.log)
|
||||
|
||||
- name: View logs failures
|
||||
if: failure() && steps.ctresults.outcome == 'failure'
|
||||
run: |
|
||||
cat logs/suite.log | awk \
|
||||
'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}'
|
||||
find logs/ -name error.log -exec cat '{}' ';'
|
||||
find logs/ -name exunit.log -exec cat '{}' ';'
|
||||
|
||||
- name: Send to coveralls
|
||||
if: matrix.otp == '25.3'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
DIAGNOSTIC=1 ./rebar3 as test coveralls send
|
||||
curl -v -k https://coveralls.io/webhook \
|
||||
--header "Content-Type: application/json" \
|
||||
--data '{"repo_name":"$GITHUB_REPOSITORY",
|
||||
"repo_token":"$GITHUB_TOKEN",
|
||||
"payload":{"build_num":$GITHUB_RUN_ID,
|
||||
"status":"done"}}'
|
||||
|
||||
- name: Upload test logs
|
||||
if: always() && steps.ct.outcome == 'failure' && github.repository == 'processone/ejabberd'
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
publish_dir: _build/test
|
||||
exclude_assets: '.github,lib,plugins'
|
||||
external_repository: processone/ecil
|
||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
keep_files: true
|
||||
|
||||
- name: View ECIL address
|
||||
if: always() && steps.ct.outcome == 'failure' && github.repository == 'processone/ejabberd'
|
||||
run: |
|
||||
CTRUN=`ls -la _build/test/logs/last | sed 's|.*-> ||'`
|
||||
echo "::notice::View CT results: https://processone.github.io/ecil/logs/$CTRUN/"
|
||||
|
||||
- name: Check for changes to trigger schema upgrade test
|
||||
uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
sql:
|
||||
- 'sql/**'
|
||||
- 'src/mod_admin_update_sql.erl'
|
||||
|
||||
- name: Prepare for schema upgrade test
|
||||
id: prepupgradetest
|
||||
if: ${{ steps.filter.outputs.sql == 'true' }}
|
||||
run: |
|
||||
[[ -d logs ]] && rm -rf logs
|
||||
[[ -d _build/test/logs ]] && rm -rf _build/test/logs || true
|
||||
sed -i 's|update_sql, false|update_sql, true|g' test/suite.erl
|
||||
- name: Run DB tests on upgraded schema (mssql, mysql, pgsql)
|
||||
run: CT_BACKENDS=mssql,mysql,pgsql make test
|
||||
if: always() && steps.prepupgradetest.outcome != 'skipped'
|
||||
id: ctupgradedschema
|
||||
- name: Check results
|
||||
if: always() && steps.ctupgradedschema.outcome != 'skipped'
|
||||
run: |
|
||||
[[ -d _build ]] && ln -s _build/test/logs/last/ logs || true
|
||||
ln `find logs/ -name suite.log` logs/suite.log
|
||||
grep 'TEST COMPLETE' logs/suite.log
|
||||
grep -q 'TEST COMPLETE,.* 0 failed' logs/suite.log
|
||||
test $(find logs/ -empty -name error.log)
|
||||
- name: View logs failures
|
||||
if: failure() && steps.ctupgradedschema.outcome != 'skipped'
|
||||
run: |
|
||||
cat logs/suite.log | awk \
|
||||
'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}'
|
||||
find logs/ -name error.log -exec cat '{}' ';'
|
||||
find logs/ -name exunit.log -exec cat '{}' ';'
|
||||
|
||||
- name: Prepare new schema
|
||||
run: |
|
||||
[[ -d logs ]] && rm -rf logs
|
||||
[[ -d _build/test/logs ]] && rm -rf _build/test/logs || true
|
||||
docker exec ejabberd-mssql /opt/mssql-tools/bin/sqlcmd -U SA -P ejabberd_Test1 -S localhost -Q "drop database [ejabberd_test];"
|
||||
docker exec ejabberd-mssql /opt/mssql-tools/bin/sqlcmd -U SA -P ejabberd_Test1 -S localhost -Q "drop login [ejabberd_test];"
|
||||
mysql -u root -proot -e "DROP DATABASE ejabberd_test;"
|
||||
sudo -u postgres psql -c "DROP DATABASE ejabberd_test;"
|
||||
docker exec ejabberd-mssql /opt/mssql-tools/bin/sqlcmd -U SA -P ejabberd_Test1 -S localhost -i /initdb_mssql.sql
|
||||
docker exec ejabberd-mssql /opt/mssql-tools/bin/sqlcmd -U SA -P ejabberd_Test1 -S localhost -d ejabberd_test -i /mssql.new.sql
|
||||
mysql -u root -proot -e "CREATE DATABASE ejabberd_test;"
|
||||
mysql -u root -proot -e "GRANT ALL ON ejabberd_test.*
|
||||
TO 'ejabberd_test'@'localhost';"
|
||||
mysql -u ejabberd_test -pejabberd_test ejabberd_test < sql/mysql.new.sql
|
||||
sudo -u postgres psql -c "CREATE DATABASE ejabberd_test;"
|
||||
sudo -u postgres psql -c "GRANT ALL PRIVILEGES
|
||||
ON DATABASE ejabberd_test TO ejabberd_test;"
|
||||
PGPASSWORD="ejabberd_test" psql -h localhost -U ejabberd_test ejabberd_test -f sql/pg.new.sql
|
||||
sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL
|
||||
TABLES IN SCHEMA public
|
||||
TO ejabberd_test;"
|
||||
sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL
|
||||
SEQUENCES IN SCHEMA public
|
||||
TO ejabberd_test;"
|
||||
sed -i 's|new_schema, false|new_schema, true|g' test/suite.erl
|
||||
- name: Run DB tests on new schema (mssql, mysql, pgsql)
|
||||
run: CT_BACKENDS=mssql,mysql,pgsql make test
|
||||
id: ctnewschema
|
||||
- name: Check results
|
||||
if: always() && steps.ctnewschema.outcome != 'skipped'
|
||||
run: |
|
||||
[[ -d _build ]] && ln -s _build/test/logs/last/ logs || true
|
||||
ln `find logs/ -name suite.log` logs/suite.log
|
||||
grep 'TEST COMPLETE' logs/suite.log
|
||||
grep -q 'TEST COMPLETE,.* 0 failed' logs/suite.log
|
||||
test $(find logs/ -empty -name error.log)
|
||||
- name: View logs failures
|
||||
if: failure() && steps.ctnewschema.outcome != 'skipped'
|
||||
run: |
|
||||
cat logs/suite.log | awk \
|
||||
'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}'
|
||||
find logs/ -name error.log -exec cat '{}' ';'
|
||||
find logs/ -name exunit.log -exec cat '{}' ';'
|
||||
|
||||
- name: Upload CT logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ejabberd-ct-logs-${{matrix.otp}}
|
||||
#
|
||||
# Appending the wildcard character ("*") is a trick to make
|
||||
# "ejabberd-packages" the root directory of the uploaded ZIP file:
|
||||
#
|
||||
# https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions
|
||||
#
|
||||
path: _build/test/logs
|
||||
retention-days: 14
|
||||
@@ -1,123 +0,0 @@
|
||||
name: Container
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '22 2 */6 * *' # every 6 days to avoid gha cache being evicted
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.devcontainer/**'
|
||||
- 'examples/**'
|
||||
- 'lib/**'
|
||||
- 'man/**'
|
||||
- 'priv/**'
|
||||
- '**.md'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
container:
|
||||
name: Container
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache build directory
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/build/
|
||||
key: ${{runner.os}}-ctr-ct-ng-1.25.0
|
||||
|
||||
- name: Get erlang/OTP version for bootstrapping
|
||||
run: |
|
||||
echo "OTP_VSN=$(awk '/^otp_vsn=/ {{gsub(/[^0-9.]/, ""); print}}' tools/make-binaries)" >> $GITHUB_ENV
|
||||
echo "ELIXIR_VSN=$(awk '/^elixir_vsn=/ {{gsub(/[^0-9.]/, ""); print}}' tools/make-binaries)" >> $GITHUB_ENV
|
||||
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -qq install makeself
|
||||
# https://github.com/crosstool-ng/crosstool-ng/blob/master/testing/docker/ubuntu21.10/Dockerfile
|
||||
sudo apt-get -qq install build-essential autoconf bison flex gawk
|
||||
sudo apt-get -qq install help2man libncurses5-dev libtool libtool-bin
|
||||
sudo apt-get -qq install python3-dev texinfo unzip
|
||||
|
||||
- name: Install erlang/OTP
|
||||
uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: ${{ env.OTP_VSN }}
|
||||
elixir-version: ${{ env.ELIXIR_VSN }}
|
||||
version-type: strict
|
||||
|
||||
- name: Remove Elixir Matchers
|
||||
run: |
|
||||
echo "::remove-matcher owner=elixir-mixCompileWarning::"
|
||||
echo "::remove-matcher owner=elixir-credoOutputDefault::"
|
||||
echo "::remove-matcher owner=elixir-mixCompileError::"
|
||||
echo "::remove-matcher owner=elixir-mixTestFailure::"
|
||||
echo "::remove-matcher owner=elixir-dialyzerOutputDefault::"
|
||||
|
||||
- name: Build musl-libc based binary archives
|
||||
run: |
|
||||
sed -i "s|targets='.*'|targets='x86_64-linux-musl aarch64-linux-musl'|" tools/make-binaries
|
||||
mv .github/container/ejabberdctl.template .
|
||||
CHECK_DEPS=false tools/make-binaries
|
||||
|
||||
- name: Collect packages
|
||||
run: |
|
||||
mkdir tarballs
|
||||
mv ejabberd-*.tar.gz tarballs
|
||||
|
||||
- name: Checkout ejabberd-contrib
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: processone/ejabberd-contrib
|
||||
path: .ejabberd-modules/sources/ejabberd-contrib
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get git describe
|
||||
id: gitdescribe
|
||||
run: echo "ver=$(git describe --tags)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
labels: |
|
||||
org.opencontainers.image.revision=${{ steps.gitdescribe.outputs.ver }}
|
||||
org.opencontainers.image.licenses=GPL-2.0
|
||||
org.opencontainers.image.vendor=ProcessOne
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
build-args: |
|
||||
METHOD=package
|
||||
VERSION=${{ steps.gitdescribe.outputs.ver }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
context: .
|
||||
file: .github/container/Dockerfile
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
@@ -1,84 +0,0 @@
|
||||
name: Installers
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.devcontainer/**'
|
||||
- 'examples/**'
|
||||
- 'lib/**'
|
||||
- 'man/**'
|
||||
- 'priv/**'
|
||||
- '**.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.devcontainer/**'
|
||||
- 'examples/**'
|
||||
- 'lib/**'
|
||||
- 'man/**'
|
||||
- 'priv/**'
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
binaries:
|
||||
name: Binaries
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cache build directory
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/build/
|
||||
key: ${{runner.os}}-ct-ng-1.25.0
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -qq install makeself
|
||||
# https://github.com/crosstool-ng/crosstool-ng/blob/master/testing/docker/ubuntu21.10/Dockerfile
|
||||
sudo apt-get -qq install build-essential autoconf bison flex gawk
|
||||
sudo apt-get -qq install help2man libncurses5-dev libtool libtool-bin
|
||||
sudo apt-get -qq install python3-dev texinfo unzip
|
||||
- name: Install FPM
|
||||
run: |
|
||||
gem install --no-document --user-install fpm
|
||||
echo $HOME/.local/share/gem/ruby/*/bin >> $GITHUB_PATH
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build binary archives
|
||||
run: CHECK_DEPS=false tools/make-binaries
|
||||
- name: Build DEB and RPM packages
|
||||
run: tools/make-packages
|
||||
- name: Build installers
|
||||
run: tools/make-installers
|
||||
- name: Collect packages
|
||||
run: |
|
||||
mkdir ejabberd-packages
|
||||
mv ejabberd_*.deb ejabberd-*.rpm ejabberd-*.run ejabberd-packages
|
||||
- name: Upload packages
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ejabberd-packages
|
||||
#
|
||||
# Appending the wildcard character ("*") is a trick to make
|
||||
# "ejabberd-packages" the root directory of the uploaded ZIP file:
|
||||
#
|
||||
# https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions
|
||||
#
|
||||
path: ejabberd-packages*
|
||||
retention-days: 14
|
||||
|
||||
release:
|
||||
name: Release
|
||||
needs: [binaries]
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref_type == 'tag'
|
||||
steps:
|
||||
- name: Download packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ejabberd-packages
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
draft: true
|
||||
files: ejabberd-packages/*
|
||||
@@ -1,209 +0,0 @@
|
||||
name: Runtime
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '*'
|
||||
- '!*.md'
|
||||
- '.github/workflows/runtime.yml'
|
||||
- 'checkouts/**'
|
||||
- 'config/**'
|
||||
- 'lib/**'
|
||||
- 'm4/**'
|
||||
- 'plugins/**'
|
||||
- 'rel/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '*'
|
||||
- '!*.md'
|
||||
- '.github/workflows/runtime.yml'
|
||||
- 'checkouts/**'
|
||||
- 'config/**'
|
||||
- 'lib/**'
|
||||
- 'm4/**'
|
||||
- 'plugins/**'
|
||||
- 'rel/**'
|
||||
|
||||
jobs:
|
||||
|
||||
rebars:
|
||||
name: Rebars
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
otp: ['20.3', '25.3', '26']
|
||||
rebar: ['rebar', 'rebar3']
|
||||
exclude:
|
||||
- otp: '26'
|
||||
rebar: 'rebar'
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: erlang:${{ matrix.otp }}
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare libraries
|
||||
run: |
|
||||
apt-get -qq update
|
||||
apt-get purge -y libgd3
|
||||
apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
|
||||
libsqlite3-dev libwebp-dev libyaml-dev
|
||||
|
||||
- name: Compile
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure --with-rebar=`which ${{ matrix.rebar }}` \
|
||||
--prefix=/tmp/ejabberd \
|
||||
--enable-all \
|
||||
--disable-elixir \
|
||||
--disable-odbc
|
||||
make update
|
||||
make
|
||||
|
||||
- name: Prepare rebar
|
||||
run: |
|
||||
echo '{xref_ignores, [{eldap_filter_yecc, return_error, 2}
|
||||
]}.' >>rebar.config
|
||||
echo '{xref_checks, [deprecated_function_calls, deprecated_functions,
|
||||
locals_not_used, undefined_function_calls, undefined_functions]}.
|
||||
% Disabled: exports_not_used,' >>rebar.config
|
||||
|
||||
- run: make xref
|
||||
|
||||
- name: Test rel (rebar2)
|
||||
if: matrix.rebar == 'rebar'
|
||||
run: |
|
||||
make rel
|
||||
rel/ejabberd/bin/ejabberdctl start \
|
||||
&& rel/ejabberd/bin/ejabberdctl started
|
||||
rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
||||
rel/ejabberd/bin/ejabberdctl registered_users localhost
|
||||
cat rel/ejabberd/logs/*
|
||||
|
||||
- name: Test rel
|
||||
if: matrix.rebar != 'rebar'
|
||||
run: |
|
||||
make rel
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl start \
|
||||
&& _build/prod/rel/ejabberd/bin/ejabberdctl started
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl registered_users localhost
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl stop \
|
||||
&& _build/prod/rel/ejabberd/bin/ejabberdctl stopped
|
||||
cat _build/prod/rel/ejabberd/logs/*
|
||||
|
||||
- name: Test dev
|
||||
if: matrix.rebar != 'rebar'
|
||||
run: |
|
||||
make dev
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl start \
|
||||
&& _build/dev/rel/ejabberd/bin/ejabberdctl started
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl registered_users localhost
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl stop \
|
||||
&& _build/dev/rel/ejabberd/bin/ejabberdctl stopped
|
||||
cat _build/dev/rel/ejabberd/logs/*
|
||||
|
||||
mix:
|
||||
name: Mix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
otp: ['21.3', '22.0', '25.0']
|
||||
elixir: ['1.10.3', '1.11.4', '1.12.3', '1.13.0', '1.14.0']
|
||||
exclude:
|
||||
- otp: '21.3'
|
||||
elixir: '1.12.3'
|
||||
- otp: '21.3'
|
||||
elixir: '1.13.0'
|
||||
- otp: '21.3'
|
||||
elixir: '1.14.0'
|
||||
- otp: '22.0'
|
||||
elixir: '1.14.0'
|
||||
- otp: '25.0'
|
||||
elixir: '1.10.3'
|
||||
- otp: '25.0'
|
||||
elixir: '1.11.4'
|
||||
- otp: '25.0'
|
||||
elixir: '1.12.3'
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Get specific Erlang/OTP
|
||||
uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: ${{matrix.otp}}
|
||||
elixir-version: ${{matrix.elixir}}
|
||||
|
||||
- name: Prepare libraries
|
||||
run: |
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -y purge libgd3 nginx
|
||||
sudo apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
|
||||
libsqlite3-dev libwebp-dev libyaml-dev
|
||||
|
||||
- name: Remove Elixir Matchers
|
||||
run: |
|
||||
echo "::remove-matcher owner=elixir-mixCompileWarning::"
|
||||
echo "::remove-matcher owner=elixir-credoOutputDefault::"
|
||||
echo "::remove-matcher owner=elixir-mixCompileError::"
|
||||
echo "::remove-matcher owner=elixir-mixTestFailure::"
|
||||
echo "::remove-matcher owner=elixir-dialyzerOutputDefault::"
|
||||
|
||||
- name: Compile
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure --with-rebar=mix \
|
||||
--prefix=/tmp/ejabberd \
|
||||
--enable-all \
|
||||
--disable-elixir \
|
||||
--disable-odbc
|
||||
mix deps.get
|
||||
make
|
||||
|
||||
- run: make xref
|
||||
|
||||
- name: Run rel
|
||||
run: |
|
||||
make rel
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl start \
|
||||
&& _build/prod/rel/ejabberd/bin/ejabberdctl started
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl registered_users localhost > registered.log
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl stop \
|
||||
&& _build/prod/rel/ejabberd/bin/ejabberdctl stopped
|
||||
|
||||
- name: Run dev
|
||||
run: |
|
||||
make dev
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl start \
|
||||
&& _build/dev/rel/ejabberd/bin/ejabberdctl started
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl register user2 localhost s0mePass
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl registered_users localhost >> registered.log
|
||||
_build/dev/rel/ejabberd/bin/ejabberdctl stop \
|
||||
&& _build/dev/rel/ejabberd/bin/ejabberdctl stopped
|
||||
|
||||
- name: Check rel
|
||||
if: always()
|
||||
run: |
|
||||
grep -q '^user1$' registered.log
|
||||
grep -q '^user2$' registered.log
|
||||
grep -q 'is started' _build/prod/rel/ejabberd/logs/ejabberd.log
|
||||
grep -q 'is stopped' _build/prod/rel/ejabberd/logs/ejabberd.log
|
||||
test $(find _build/prod/ -empty -name error.log)
|
||||
grep -q 'is started' _build/dev/rel/ejabberd/logs/ejabberd.log
|
||||
grep -q 'is stopped' _build/dev/rel/ejabberd/logs/ejabberd.log
|
||||
test $(find _build/dev/ -empty -name error.log)
|
||||
|
||||
- name: View logs failures
|
||||
if: failure()
|
||||
run: |
|
||||
cat _build/prod/rel/ejabberd/logs/ejabberd.log
|
||||
cat _build/prod/rel/ejabberd/logs/error.log
|
||||
cat _build/dev/rel/ejabberd/logs/ejabberd.log
|
||||
cat _build/dev/rel/ejabberd/logs/error.log
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
#
|
||||
# You can add personal rules in your file .git/info/exclude
|
||||
*.swp
|
||||
*~
|
||||
\#*#
|
||||
.#*
|
||||
.edts
|
||||
*.dump
|
||||
/Makefile
|
||||
/doc
|
||||
/config.log
|
||||
/config.status
|
||||
/config/releases.exs
|
||||
/configure
|
||||
/aclocal.m4
|
||||
/*.cache
|
||||
/deps/
|
||||
/.deps-update/
|
||||
/.ejabberd-modules/
|
||||
/ebin/
|
||||
/ejabberd.init
|
||||
/ejabberd.service
|
||||
/ejabberdctl
|
||||
/ejabberdctl.example
|
||||
/rel/ejabberd/
|
||||
/rel/overlays/
|
||||
/src/eldap_filter_yecc.erl
|
||||
/vars.config
|
||||
/dialyzer/
|
||||
/test/*.beam
|
||||
/test/*.ctc
|
||||
/logs/
|
||||
/priv/bin/captcha*sh
|
||||
/priv/sql
|
||||
/rel/ejabberd
|
||||
/_build
|
||||
/database/
|
||||
/.rebar
|
||||
/rebar.lock
|
||||
/log/
|
||||
Mnesia.nonode@nohost/
|
||||
# Binaries created with tools/make-{binaries,installers,packages}:
|
||||
/ejabberd_*.deb
|
||||
/ejabberd-*.rpm
|
||||
/ejabberd-*.run
|
||||
/ejabberd-*.tar.gz
|
||||
@@ -1,4 +0,0 @@
|
||||
disable=SC2016,SC2086,SC2089,SC2090
|
||||
external-sources=true
|
||||
source=ejabberdctl.cfg.example
|
||||
shell=sh
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"erlang-ls.erlang-ls"
|
||||
]
|
||||
}
|
||||
Vendored
-49
@@ -1,49 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Relive",
|
||||
"type": "erlang",
|
||||
"request": "launch",
|
||||
"runinterminal": [
|
||||
".vscode/relive.sh"
|
||||
],
|
||||
"projectnode": "ejabberd@localhost",
|
||||
"cookie": "COOKIE",
|
||||
"timeout": 300,
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
{
|
||||
"name": "Relive (alternate)",
|
||||
"type": "erlang",
|
||||
"request": "launch",
|
||||
"runinterminal": [
|
||||
"./rebar3", "shell",
|
||||
"--apps", "ejabberd",
|
||||
"--config", "rel/relive.config",
|
||||
"--script", "rel/relive.escript",
|
||||
"--name", "ejabberd@localhost",
|
||||
"--setcookie", "COOKIE"
|
||||
],
|
||||
"projectnode": "ejabberd@localhost",
|
||||
"cookie": "COOKIE",
|
||||
"timeout": 300,
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
{
|
||||
"name": "Attach",
|
||||
"type": "erlang",
|
||||
"request": "attach",
|
||||
"runinterminal": [
|
||||
"./rebar3", "shell",
|
||||
"--sname", "clean@localhost",
|
||||
"--setcookie", "COOKIE",
|
||||
"--start-clean"
|
||||
],
|
||||
"projectnode": "ejabberd@localhost",
|
||||
"cookie": "COOKIE",
|
||||
"timeout": 300,
|
||||
"cwd": "${workspaceRoot}"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
[ ! -f Makefile ] \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure --with-rebar=./rebar3 \
|
||||
&& make deps
|
||||
|
||||
make relive
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"editor.tabSize": 8,
|
||||
"remote.portsAttributes": {
|
||||
"1883": {"label": "MQTT", "onAutoForward": "silent"},
|
||||
"4369": {"label": "EPMD", "onAutoForward": "silent"},
|
||||
"5222": {"label": "XMPP C2S", "onAutoForward": "silent"},
|
||||
"5223": {"label": "XMPP C2S (legacy)", "onAutoForward": "silent"},
|
||||
"5269": {"label": "XMPP S2S", "onAutoForward": "silent"},
|
||||
"5280": {"label": "HTTP", "onAutoForward": "silent"},
|
||||
"5443": {"label": "HTTPS", "onAutoForward": "silent"},
|
||||
"7777": {"label": "XMPP SOCKS5 (proxy65)", "onAutoForward": "silent"}
|
||||
}
|
||||
}
|
||||
-887
@@ -1,887 +0,0 @@
|
||||
# Version 23.04
|
||||
|
||||
General:
|
||||
- New `s2s_out_bounce_packet` hook
|
||||
- Re-allow anonymous connection for connection without client certificates ([#3985](https://github.com/processone/ejabberd/issues/3985))
|
||||
- Stop `ejabberd_system_monitor` before stopping node
|
||||
- `captcha_url` option now accepts `auto` value, and it's the default
|
||||
- `mod_mam`: Add support for XEP-0425: Message Moderation
|
||||
- `mod_mam_sql`: Fix problem with results of mam queries using rsm with max and before
|
||||
- `mod_muc_rtbl`: New module for Real-Time Block List for MUC rooms ([#4017](https://github.com/processone/ejabberd/issues/4017))
|
||||
- `mod_roster`: Set roster name from XEP-0172, or the stored one ([#1611](https://github.com/processone/ejabberd/issues/1611))
|
||||
- `mod_roster`: Preliminary support to store extra elements in subscription request ([#840](https://github.com/processone/ejabberd/issues/840))
|
||||
- `mod_pubsub`: Pubsub xdata fields `max_item/item_expira/children_max` use `max` not `infinity`
|
||||
- `mod_vcard_xupdate`: Invalidate `vcard_xupdate` cache on all nodes when vcard is updated
|
||||
|
||||
Admin:
|
||||
- `ext_mod`: Improve support for loading `*.so` files from `ext_mod` dependencies
|
||||
- Improve output in `gen_html_doc_for_commands` command
|
||||
- Fix ejabberdctl output formatting ([#3979](https://github.com/processone/ejabberd/issues/3979))
|
||||
- Log HTTP handler exceptions
|
||||
|
||||
MUC:
|
||||
- New command `get_room_history`
|
||||
- Persist `none` role for outcasts
|
||||
- Try to populate room history from mam when unhibernating
|
||||
- Make `mod_muc_room:set_opts` process persistent flag first
|
||||
- Allow passing affiliations and subscribers to `create_room_with_opts` command
|
||||
- Store state in db in `mod_muc:create_room()`
|
||||
- Make subscribers members by default
|
||||
|
||||
SQL schemas:
|
||||
- Fix a long standing bug in new schema migration
|
||||
- `update_sql` command: Many improvements in new schema migration
|
||||
- `update_sql` command: Add support to migrate MySQL too
|
||||
- Change PostgreSQL SERIAL to BIGSERIAL columns
|
||||
- Fix minor SQL schema inconsistencies
|
||||
- Remove unnecessary indexes
|
||||
- New SQL schema migrate fix
|
||||
|
||||
MS SQL:
|
||||
- MS SQL schema fixes
|
||||
- Add `new` schema for MS SQL
|
||||
- Add MS SQL support for new schema migration
|
||||
- Minor MS SQL improvements
|
||||
- Fix MS SQL error caused by `ORDER BY` in subquery
|
||||
|
||||
SQL Tests:
|
||||
- Add support for running tests on MS SQL
|
||||
- Add ability to run tests on upgraded DB
|
||||
- Un-deprecate `ejabberd_config:set_option/2`
|
||||
- Use python3 to run `extauth.py` for tests
|
||||
- Correct README for creating test docker MS SQL DB
|
||||
- Fix TSQLlint warnings in MSSQL test script
|
||||
|
||||
Testing:
|
||||
- Fix Shellcheck warnings in shell scripts
|
||||
- Fix Remark-lint warnings
|
||||
- Fix Prospector and Pylint warnings in test `extauth.py`
|
||||
- Stop testing ejabberd with Erlang/OTP 19.3, as Github Actions no longer supports ubuntu-18.04
|
||||
- Test only with oldest OTP supported (20.0), newest stable (25.3) and bleeding edge (26.0-rc2)
|
||||
- Upload Common Test logs as artifact in case of failure
|
||||
|
||||
`ecs` container image:
|
||||
- Update Alpine to 3.17 to get Erlang/OTP 25 and Elixir 1.14
|
||||
- Add `tini` as runtime init
|
||||
- Set `ERLANG_NODE` fixed to `ejabberd@localhost`
|
||||
- Upload images as artifacts to Github Actions
|
||||
- Publish tag images automatically to ghcr.io
|
||||
|
||||
`ejabberd` container image:
|
||||
- Update Alpine to 3.17 to get Erlang/OTP 25 and Elixir 1.14
|
||||
- Add `METHOD` to build container using packages ([#3983](https://github.com/processone/ejabberd/issues/3983))
|
||||
- Add `tini` as runtime init
|
||||
- Detect runtime dependencies automatically
|
||||
- Remove unused Mix stuff: ejabberd script and static COOKIE
|
||||
- Copy captcha scripts to `/opt/ejabberd-*/lib` like the installers
|
||||
- Expose only `HOME` volume, it contains all the required subdirs
|
||||
- ejabberdctl: Don't use `.../releases/COOKIE`, it's no longer included
|
||||
|
||||
Installers:
|
||||
- make-binaries: Bump versions, e.g. erlang/otp to 25.3
|
||||
- make-binaries: Fix building with erlang/otp v25.x
|
||||
- make-packages: Fix for installers workflow, which didn't find lynx
|
||||
|
||||
# Version 23.01
|
||||
|
||||
General:
|
||||
- Add `misc:uri_parse/2` to allow declaring default ports for protocols
|
||||
- CAPTCHA: Add support to define module instead of path to script
|
||||
- Clustering: Handle `mnesia_system_event mnesia_up` when other node joins this ([#3842](https://github.com/processone/ejabberd/issues/3842))
|
||||
- ConverseJS: Don't set i18n option because Converse enforces it instead of browser lang ([#3951](https://github.com/processone/ejabberd/issues/3951))
|
||||
- ConverseJS: Try to redirect access to files `mod_conversejs` to CDN when there is no local copies
|
||||
- ext_mod: compile C files and install them in ejabberd's `priv`
|
||||
- ext_mod: Support to get module status from Elixir modules
|
||||
- make-binaries: reduce log output
|
||||
- make-binaries: Bump zlib version to 1.2.13
|
||||
- MUC: Don't store mucsub presence events in offline storage
|
||||
- MUC: `hibernation_time` is not an option worth storing in room state ([#3946](https://github.com/processone/ejabberd/issues/3946))
|
||||
- Multicast: Jid format when `multicastc` was cached ([#3950](https://github.com/processone/ejabberd/issues/3950))
|
||||
- mysql: Pass `ssl` options to mysql driver
|
||||
- pgsql: Do not set `standard_conforming_strings` to `off` ([#3944](https://github.com/processone/ejabberd/issues/3944))
|
||||
- OAuth: Accept `jid` as a HTTP URL query argument
|
||||
- OAuth: Handle when client is not identified
|
||||
- PubSub: Expose the `pubsub#type` field in `disco#info` query to the node ([#3914](https://github.com/processone/ejabberd/issues/3914))
|
||||
- Translations: Update German translation
|
||||
|
||||
Admin:
|
||||
- `api_permissions`: Fix option crash when doesn't have `who:` section
|
||||
- `log_modules_fully`: New option to list modules that will log everything
|
||||
- `outgoing_s2s_families`: Changed option's default to IPv6, and fall back to IPv4
|
||||
- Fix bash completion when using Relive or other install methods
|
||||
- Fix portability issue with some shells ([#3970](https://github.com/processone/ejabberd/issues/3970))
|
||||
- Allow admin command to subscribe new users to `members_only` rooms
|
||||
- Use alternative `split/2` function that works with Erlang/OTP as old as 19.3
|
||||
- Silent warning in OTP24 about not specified `cacerts` in SQL connections
|
||||
- Fix compilation warnings with Elixir 1.14
|
||||
|
||||
DOAP:
|
||||
- Support extended `-protocol` erlang attribute
|
||||
- Add extended RFCs and XEP details to some protocol attributes
|
||||
- `tools/generate-doap.sh`: New script to generate DOAP file, add `make doap` ([#3915](https://github.com/processone/ejabberd/issues/3915))
|
||||
- `ejabberd.doap`: New DOAP file describing ejabberd supported protocols
|
||||
|
||||
MQTT:
|
||||
- Add MQTT bridge module
|
||||
- Add support for certificate authentication in MQTT bridge
|
||||
- Implement reload in MQTT bridge
|
||||
- Add support for websockets to MQTT bridge
|
||||
- Recognize ws5/wss5 urls in MQTT bridge
|
||||
- `mqtt_publish`: New hook for MQTT publish event
|
||||
- `mqtt_(un)subscribe`: New hooks for MQTT subscribe & unsubscribe events
|
||||
|
||||
VSCode:
|
||||
- Improve `.devcontainer` to use use devcontainer image and `.vscode`
|
||||
- Add `.vscode` files to instruct VSCode how to run ejabberd
|
||||
- Add Erlang LS default configuration
|
||||
- Add Elvis default configuration
|
||||
|
||||
# Version 22.10
|
||||
|
||||
Core:
|
||||
- Add `log_burst_limit_*` options ([#3865](https://github.com/processone/ejabberd/issues/3865))
|
||||
- Support `ERL_DIST_PORT` option to work without epmd
|
||||
- Auth JWT: Catch all errors from `jose_jwt:verify` and log debugging details ([#3890](https://github.com/processone/ejabberd/issues/3890))
|
||||
- CAPTCHA: Support `@VERSION@` and `@SEMVER@` in `captcha_cmd` option ([#3835](https://github.com/processone/ejabberd/issues/3835))
|
||||
- HTTP: Fix unix socket support ([#3894](https://github.com/processone/ejabberd/issues/3894))
|
||||
- HTTP: Handle invalid values in `X-Forwarded-For` header more gracefuly
|
||||
- Listeners: Let module take over socket
|
||||
- Listeners: Don't register listeners that failed to start in config reload
|
||||
- `mod_admin_extra`: Handle empty roster group names
|
||||
- `mod_conversejs`: Fix crash when mod_register not enabled ([#3824](https://github.com/processone/ejabberd/issues/3824))
|
||||
- `mod_host_meta`: Complain at start if listener is not encrypted
|
||||
- `mod_ping`: Fix regression on `stop_ping` in clustering context ([#3817](https://github.com/processone/ejabberd/issues/3817))
|
||||
- `mod_pubsub`: Don't crash on command failures
|
||||
- `mod_shared_roster`: Fix cache invalidation
|
||||
- `mod_shared_roster_ldap`: Update roster_get hook to use `#roster_item{}`
|
||||
- `prosody2ejabberd`: Fix parsing of scram password from prosody
|
||||
|
||||
MIX:
|
||||
- Fix MIX's filter_nodes
|
||||
- Return user jid on join
|
||||
- `mod_mix_pam`: Add new MIX namespaces to disco features
|
||||
- `mod_mix_pam`: Add handling of IQs with newer MIX namespaces
|
||||
- `mod_mix_pam`: Do roster pushes on join/leave
|
||||
- `mod_mix_pam`: Parse sub elements of the mix join remote result
|
||||
- `mod_mix_pam`: Provide MIX channels as roster entries via hook
|
||||
- `mod_mix_pam`: Display joined channels on webadmin page
|
||||
- `mod_mix_pam`: Adapt to renaming of `participant-id` from mix_roster_channel record
|
||||
- `mod_roster`: Change hook type from `#roster{}` to `#roster_item{}`
|
||||
- `mod_roster`: Respect MIX `<annotate/>` setting
|
||||
- `mod_roster`: Adapt to change of mix_annotate type to boolean in roster_query
|
||||
- `mod_shared_roster`: Fix wrong hook type `#roster{}` (now `#roster_item{}`)
|
||||
|
||||
MUC:
|
||||
- Store role, and use it when joining a moderated room ([#3330](https://github.com/processone/ejabberd/issues/3330))
|
||||
- Don't persist `none` role ([#3330](https://github.com/processone/ejabberd/issues/3330))
|
||||
- Allow MUC service admins to bypass max_user_conferences limitation
|
||||
- Show allow_query_users room option in disco info ([#3830](https://github.com/processone/ejabberd/issues/3830))
|
||||
- Don't set affiliation to `none` if it's already `none` in `mod_muc_room:process_item_change/3`
|
||||
- Fix mucsub unsubscribe notification payload to have muc_unsubcribe in it
|
||||
- Allow muc_{un}subscribe hooks to modify sent packets
|
||||
- Pass room state to muc_{un}subscribed hook
|
||||
- The archive_msg export fun requires MUC Service for room archives
|
||||
- Export `mod_muc_admin:get_room_pid/2`
|
||||
- Export function for getting room diagnostics
|
||||
|
||||
SQL:
|
||||
- Handle errors reported from begin/commit inside transaction
|
||||
- Make connection close errors bubble up from inside sql transaction
|
||||
- Make first sql reconnect wait shorter time
|
||||
- React to sql driver process exit earlier
|
||||
- Skip connection exit message when we triggered reconnection
|
||||
- Add syntax_tools to applications, required when using ejabberd_sql_pt ([#3869](https://github.com/processone/ejabberd/issues/3869))
|
||||
- Fix mam delete_old_messages_batch for sql backend
|
||||
- Use `INSERT ... ON DUPLICATE KEY UPDATE` for upsert on mysql
|
||||
- Update mysql library
|
||||
- Catch mysql connection being close earlier
|
||||
|
||||
Build:
|
||||
- `make all`: Generate start scripts here, not in `make install` ([#3821](https://github.com/processone/ejabberd/issues/3821))
|
||||
- `make clean`: Improve this and "distclean"
|
||||
- `make deps`: Ensure deps configuration is ran when getting deps ([#3823](https://github.com/processone/ejabberd/issues/3823))
|
||||
- `make help`: Update with recent changes
|
||||
- `make install`: Don't leak DESTDIR in files copied by 'make install'
|
||||
- `make options`: Fix error reporting on OTP24+
|
||||
- `make update`: configure also in this case, similarly to `make deps`
|
||||
- Add definition to detect OTP older than 25, used by ejabberd_auth_http
|
||||
- Configure eimp with mix to detect image convert properly ([#3823](https://github.com/processone/ejabberd/issues/3823))
|
||||
- Remove unused macro definitions detected by rebar3_hank
|
||||
- Remove unused header files which content is already in xmpp library
|
||||
|
||||
Container:
|
||||
- Get ejabberd-contrib sources to include them
|
||||
- Copy `.ejabberd-modules` directory if available
|
||||
- Do not clone repo inside container build
|
||||
- Use `make deps`, which performs additional steps ([#3823](https://github.com/processone/ejabberd/issues/3823))
|
||||
- Support `ERL_DIST_PORT` option to work without epmd
|
||||
- Copy `ejabberd-docker-install.bat` from docker-ejabberd git and rename it
|
||||
- Set a less frequent healthcheck to reduce CPU usage ([#3826](https://github.com/processone/ejabberd/issues/3826))
|
||||
- Fix build instructions, add more podman examples
|
||||
|
||||
Installers:
|
||||
- make-binaries: Include CAPTCHA script with release
|
||||
- make-binaries: Edit rebar.config more carefully
|
||||
- make-binaries: Fix linking of EIMP dependencies
|
||||
- make-binaries: Fix GitHub release version checks
|
||||
- make-binaries: Adjust Mnesia spool directory path
|
||||
- make-binaries: Bump Erlang/OTP version to 24.3.4.5
|
||||
- make-binaries: Bump Expat and libpng versions
|
||||
- make-packages: Include systemd unit with RPM
|
||||
- make-packages: Fix permissions on RPM systems
|
||||
- make-installers: Support non-root installation
|
||||
- make-installers: Override code on upgrade
|
||||
- make-installers: Apply cosmetic changes
|
||||
|
||||
External modules:
|
||||
- ext_mod: Support managing remote nodes in the cluster
|
||||
- ext_mod: Handle correctly when COMMIT.json not found
|
||||
- Don't bother with COMMIT.json user-friendly feature in automated user case
|
||||
- Handle not found COMMIT.json, for example in GH Actions
|
||||
- Add WebAdmin page for managing external modules
|
||||
|
||||
Workflows Actions:
|
||||
- Update workflows to Erlang 25
|
||||
- Update workflows: Ubuntu 18 is deprecated and 22 is added
|
||||
- CI: Remove syntax_tools from applications, as fast_xml fails Dialyzer
|
||||
- Runtime: Add Xref options to be as strict as CI
|
||||
|
||||
# Version 22.05
|
||||
|
||||
Core
|
||||
- C2S: Don't expect that socket will be available in `c2s_terminated` hook
|
||||
- Event handling process hook tracing
|
||||
- Guard against `erlang:system_info(logical_processors)` not always returning a number
|
||||
- `domain_balancing`: Allow for specifying `type` only, without specifying `component_number`
|
||||
|
||||
MQTT
|
||||
- Add TLS certificate authentication for MQTT connections
|
||||
- Fix login when generating client id, keep connection record (#3593)
|
||||
- Pass property name as expected in mqtt_codec (fixes login using MQTT 5)
|
||||
- Support MQTT subscriptions spread over the cluster (#3750)
|
||||
|
||||
MUC
|
||||
- Attach meta field with real jid to mucsub subscription events
|
||||
- Handle user removal
|
||||
- Stop empty MUC rooms 30 seconds after creation
|
||||
- `default_room_options`: Update options configurable
|
||||
- `subscribe_room_many_max_users`: New option in `mod_muc_admin`
|
||||
|
||||
mod_conversejs
|
||||
- Improved options to support `@HOST@` and `auto` values
|
||||
- Set `auth` and `register` options based on ejabberd configuration
|
||||
- `conversejs_options`: New option
|
||||
- `conversejs_resources`: New option
|
||||
|
||||
PubSub
|
||||
- `mod_pubsub`: Allow for limiting `item_expire` value
|
||||
- `mod_pubsub`: Unsubscribe JID on whitelist removal
|
||||
- `node_pep`: Add config-node and multi-items features (#3714)
|
||||
|
||||
SQL
|
||||
- Improve compatibility with various db engine versions
|
||||
- Sync old-to-new schema script with reality (#3790)
|
||||
- Slight improvement in MSSQL testing support, but not yet complete
|
||||
|
||||
Other Modules
|
||||
- `auth_jwt`: Checking if an user is active in SM for a JWT authenticated user (#3795)
|
||||
- `mod_configure`: Implement Get List of Registered/Online Users from XEP-0133
|
||||
- `mod_host_meta`: New module to serve host-meta files, see XEP-0156
|
||||
- `mod_mam`: Store all mucsub notifications not only message notifications
|
||||
- `mod_ping`: Delete ping timer if resource is gone after the ping has been sent
|
||||
- `mod_ping`: Don't send ping if resource is gone
|
||||
- `mod_push`: Fix notifications for pending sessions (XEP-0198)
|
||||
- `mod_push`: Keep push session ID on session resume
|
||||
- `mod_shared_roster`: Adjust special group cache size
|
||||
- `mod_shared_roster`: Normalize JID on unset_presence (#3752)
|
||||
- `mod_stun_disco`: Fix parsing of IPv6 listeners
|
||||
|
||||
Dependencies
|
||||
- autoconf: Supported from 2.59 to the new 2.71
|
||||
- fast_tls: Update to 1.1.14 to support OpenSSL 3
|
||||
- jiffy: Update to 1.1.1 to support Erlang/OTP 25.0-rc1
|
||||
- luerl: Update to 1.0.0, now available in hex.pm
|
||||
- lager: This dependency is used only when Erlang is older than 22
|
||||
- rebar2: Updated binary to work from Erlang/OTP 22 to 25
|
||||
- rebar3: Updated binary to work from Erlang/OTP 22 to 25
|
||||
- `make update`: Fix when used with rebar 3.18
|
||||
|
||||
Compile
|
||||
- `mix release`: Copy `include/` files for ejabberd, deps and otp, in `mix.exs`
|
||||
- `rebar3 release`: Fix ERTS path in `ejabberdctl`
|
||||
- `configure.ac`: Set default ejabberd version number when not using git
|
||||
- `mix.exs`: Move some dependencies as optional
|
||||
- `mix.exs`: No need to use Distillery, Elixir has built-in support for OTP releases (#3788)
|
||||
- `tools/make-binaries`: New script for building Linux binaries
|
||||
- `tools/make-installers`: New script for building command line installers
|
||||
|
||||
Start
|
||||
- New `make relive` similar to `ejabberdctl live` without installing
|
||||
- `ejabberdctl`: Fix some warnings detected by ShellCheck
|
||||
- `ejabberdctl`: Mention in the help: `etop`, `ping` and `started`/`stopped`
|
||||
- `make rel`: Switch to paths: `conf/`, `database/`, `logs/`
|
||||
- `mix.exs`: Add `-boot` and `-boot_var` in `ejabberdctl` instead of adding `vm.args`
|
||||
- `tools/captcha.sh`: Fix some warnings detected by ShellCheck
|
||||
|
||||
Commands
|
||||
- Accept more types of ejabberdctl commands arguments as JSON-encoded
|
||||
- `delete_old_mam_messages_batch`: New command with rate limit
|
||||
- `delete_old_messages_batch`: New command with rate limit
|
||||
- `get_room_occupants_number`: Don't request the whole MUC room state (#3684, #1964)
|
||||
- `get_vcard`: Add support for MUC room vCard
|
||||
- `oauth_revoke_token`: Add support to work with all backends
|
||||
- `room_unused_*`: Optimize commands in SQL by reusing `created_at`
|
||||
- `rooms_unused_...`: Let `get_all_rooms` handle `global` argument (#3726)
|
||||
- `stop|restart`: Terminate ejabberd_sm before everything else to ensure sessions closing (#3641)
|
||||
- `subscribe_room_many`: New command
|
||||
|
||||
Translations
|
||||
- Updated Catalan
|
||||
- Updated French
|
||||
- Updated German
|
||||
- Updated Portuguese
|
||||
- Updated Portuguese (Brazil)
|
||||
- Updated Spanish
|
||||
|
||||
Workflows
|
||||
- CI: Publish CT logs and Cover on failure to an external GH Pages repo
|
||||
- CI: Test shell scripts using ShellCheck (#3738)
|
||||
- Container: New workflow to build and publish containers
|
||||
- Installers: Add job to create draft release
|
||||
- Installers: New workflow to build binary packages
|
||||
- Runtime: New workflow to test compilation, rel, starting and ejabberdctl
|
||||
|
||||
# Version 21.12
|
||||
|
||||
Commands
|
||||
- `create_room_with_opts`: Fixed when using SQL storage
|
||||
- `change_room_option`: Add missing fields from config inside `mod_muc_admin:change_options`
|
||||
- piefxis: Fixed arguments of all commands
|
||||
|
||||
Modules
|
||||
- mod_caps: Don't forget caps on XEP-0198 resumption
|
||||
- mod_conversejs: New module to serve a simple page for Converse.js
|
||||
- mod_http_upload_quota: Avoid `max_days` race
|
||||
- mod_muc: Support MUC hats (XEP-0317, conversejs/prosody compatible)
|
||||
- mod_muc: Optimize MucSub processing
|
||||
- mod_muc: Fix exception in mucsub {un}subscription events multicast handler
|
||||
- mod_multicast: Improve and optimize multicast routing code
|
||||
- mod_offline: Allow storing non-composing x:events in offline
|
||||
- mod_ping: Send ping from server, not bare user JID
|
||||
- mod_push: Fix handling of MUC/Sub messages
|
||||
- mod_register: New allow_modules option to restrict registration modules
|
||||
- mod_register_web: Handle unknown host gracefully
|
||||
- mod_register_web: Use mod_register configured restrictions
|
||||
|
||||
PubSub
|
||||
- Add `delete_expired_pubsub_items` command
|
||||
- Add `delete_old_pubsub_items` command
|
||||
- Optimize publishing on large nodes (SQL)
|
||||
- Support unlimited number of items
|
||||
- Support `max_items=max` node configuration
|
||||
- Bump default value for `max_items` limit from 10 to 1000
|
||||
- Use configured `max_items` by default
|
||||
- node_flat: Avoid catch-all clauses for RSM
|
||||
- node_flat_sql: Avoid catch-all clauses for RSM
|
||||
|
||||
SQL
|
||||
- Use `INSERT ... ON CONFLICT` in SQL_UPSERT for PostgreSQL >= 9.5
|
||||
- mod_mam export: assign MUC entries to the MUC service
|
||||
- MySQL: Fix typo when creating index
|
||||
- PgSQL: Add SASL auth support, PostgreSQL 14
|
||||
- PgSQL: Add missing SQL migration for table `push_session`
|
||||
- PgSQL: Fix `vcard_search` definition in pgsql new schema
|
||||
|
||||
Other
|
||||
- `captcha-ng.sh`: "sort -R" command not POSIX, added "shuf" and "cat" as fallback
|
||||
- Make s2s connection table cleanup more robust
|
||||
- Update export/import of scram password to XEP-0227 1.1
|
||||
- Update Jose to 1.11.1 (the last in hex.pm correctly versioned)
|
||||
|
||||
# Version 21.07
|
||||
|
||||
Compilation
|
||||
- Add rebar3 3.15.2 binary
|
||||
- Add support for mix to: `./configure --enable-rebar=mix`
|
||||
- Improved `make rel` to work with rebar3 and mix
|
||||
- Add `make dev` to build a development release with rebar3 or mix
|
||||
- Hex: Add `sql/` and `vars.config` to Hex package files
|
||||
- Hex: Update mix applications list to fix error `p1_utils is listed as both...`
|
||||
- There are so many targets in Makefile... add `make help`
|
||||
- Fix extauth.py failure in test suite with Python 3
|
||||
- Added experimental support for GitHub Codespaces
|
||||
- Switch test service from TravisCI to GitHub Actions
|
||||
|
||||
Commands:
|
||||
- Display extended error message in ejabberdctl
|
||||
- Remove SMP option from ejabberdctl.cfg, `-smp` was removed in OTP 21
|
||||
- `create_room`: After creating room, store in DB if it's persistent
|
||||
- `help`: Major changes in its usage and output
|
||||
- `srg_create`: Update to use `label` parameter instead of `name`
|
||||
|
||||
Modules:
|
||||
- ejabberd_listener: New `send_timeout` option
|
||||
- mod_mix: Improvements to update to 0.14.1
|
||||
- mod_muc_room: Don't leak owner JIDs
|
||||
- mod_multicast: Routing for more MUC packets
|
||||
- mod_multicast: Correctly strip only other bcc addresses
|
||||
- mod_mqtt: Allow shared roster group placeholder in mqtt topic
|
||||
- mod_pubsub: Several fixes when using PubSub with RSM
|
||||
- mod_push: Handle MUC/Sub events correctly
|
||||
- mod_shared_roster: Delete cache after performing change to be sure that in cache will be up to date data
|
||||
- mod_shared_roster: Improve database and caching
|
||||
- mod_shared_roster: Reconfigure cache when options change
|
||||
- mod_vcard: Fix invalid_encoding error when using extended plane characters in vcard
|
||||
- mod_vcard: Update econf:vcard() to generate correct vcard_temp record
|
||||
- WebAdmin: New simple pages to view mnesia tables information and content
|
||||
- WebSocket: Fix typos
|
||||
|
||||
SQL:
|
||||
- MySQL Backend Patch for scram-sha512
|
||||
- SQLite: When exporting for SQLite, use its specific escape options
|
||||
- SQLite: Minor fixes for new_sql_schema support
|
||||
- mod_privacy: Cast as boolean when exporting privacy_list_data to PostgreSQL
|
||||
- mod_mqtt: Add mqtt_pub table definition for MSSQL
|
||||
- mod_shared_roster: Add missing indexes to `sr_group` tables in all SQL databases
|
||||
|
||||
# Version 21.04
|
||||
|
||||
API Commands:
|
||||
- `add_rosteritem/...`: Add argument guards to roster commands
|
||||
- `get_user_subscriptions`: New command for MUC/Sub
|
||||
- `remove_mam_for_user_with_peer`: Fix when removing room archive
|
||||
- `send_message`: Fix bug introduced in ejabberd 21.01
|
||||
- `set_vcard`: Return modules errors
|
||||
|
||||
Build and setup:
|
||||
- Allow ejabberd to be compatible as a dependency for an Erlang project using rebar3
|
||||
- CAPTCHA: New question/answer-based CAPTCHA script
|
||||
- `--enable-lua`: new configure option for luerl instead of --enable-tools
|
||||
- Remove support for HiPE, it was experimental and Erlang/OTP 24 removes it
|
||||
- Update `sql_query` record to handle the Erlang/OTP 24 compiler reports
|
||||
- Updated dependencies to fix Dialyzer warnings
|
||||
|
||||
Miscellaneous:
|
||||
- CAPTCHA: Update `FORM_TYPE` from captcha to register
|
||||
- LDAP: fix eldap certificate verification
|
||||
- MySQL: Fix for "specified key was too long"
|
||||
- Translations: updated the Esperanto, Greek, and Japanese translations
|
||||
- Websocket: Fix PONG responses
|
||||
|
||||
Modules:
|
||||
- `mod_block_strangers`: If stanza is type error, allow it passing
|
||||
- `mod_caps`: Don't request roster when not needed
|
||||
- `mod_caps`: Skip reading roster in one more case
|
||||
- `mod_mam`: Remove `queryid` from MAM fin element
|
||||
- `mod_mqtt`: When deregistering XMPP account, close its MQTT sessions
|
||||
- `mod_muc`: Take in account subscriber's affiliation when checking access to moderated room
|
||||
- `mod_muc`: Use monitors to track online and hard-killed rooms
|
||||
- `mod_muc`: When occupant is banned, remove his subscriptions too
|
||||
- `mod_privacy`: Make fetching roster lazy
|
||||
- `mod_pubsub`: Don't fail on PEP unsubscribe
|
||||
- `mod_pubsub`: Fix `gen_pubsub_node:get_state` return value
|
||||
- `mod_vcard`: Obtain and provide photo type in vCard LDAP
|
||||
|
||||
# Version 21.01
|
||||
|
||||
Miscellaneous changes:
|
||||
- `log_rotate_size` option: Fix handling of ‘infinity’ value
|
||||
- `mod_time`: Fix invalid timezone
|
||||
- Auth JWT: New `check_decoded_jwt` hook runs the default JWT verifier
|
||||
- MUC: Allow non-occupant non-subscribed service admin send private MUC message
|
||||
- MUC: New `max_password` and `max_captcha_whitelist` options
|
||||
- OAuth: New `oauth_cache_rest_failure_life_time` option
|
||||
- PEP: Skip reading pep nodes that we know won’t be requested due to caps
|
||||
- SQL: Add sql script to migrate mysql from old schema to new
|
||||
- SQL: Don’t use REPLACE for upsert when there are “-” fields.
|
||||
- Shared Rosters LDAP: Add multi-domain support (and flexibility)
|
||||
- Sqlite3: Fix dependency version
|
||||
- Stun: Block loopback addresses by default
|
||||
- Several documentation fixes and clarifications
|
||||
|
||||
Commands:
|
||||
- `decide_room`: Use better fallback value for room activity time when skipping room
|
||||
- `delete_old_message`: Fix when using sqlite spool table
|
||||
- `module_install`: Make ext_mod compile module with debug_info flags
|
||||
- `room_unused_*`: Don’t fetch subscribers list
|
||||
- `send_message`: Don’t include empty in messages
|
||||
- `set_room_affiliation`: Validate affiliations
|
||||
|
||||
Running:
|
||||
- Docker: New `Dockerfile` and `devcontainer.json`
|
||||
- New `ejabberdctl foreground-quiet`
|
||||
- Systemd: Allow for listening on privileged ports
|
||||
- Systemd: Integrate nicely with systemd
|
||||
|
||||
Translations:
|
||||
- Moved gettext PO files to a new `ejabberd-po` repository
|
||||
- Improved several translations: Catalan, Chinese, German, Greek, Indonesian, Norwegian, Portuguese (Brazil), Spanish.
|
||||
|
||||
# Version 20.12
|
||||
|
||||
- Add support for `SCRAM-SHA-{256,512}-{PLUS}` authentication
|
||||
- Don't use same value in cache for user don't exist and wrong password
|
||||
- `outgoing_s2s_ipv*_address`: New options to set ipv4/ipv6 outbound s2s out interface
|
||||
- s2s_send_packet: this hook now filters outgoing s2s stanzas
|
||||
- start_room: new hook runs when a room process is started
|
||||
- check_decoded_jwt: new hook to check decoded JWT after success authentication
|
||||
|
||||
* Admin
|
||||
- Docker: Fix DB initialization
|
||||
- New sql_odbc_driver option: choose the mssql ODBC driver
|
||||
- Rebar3: Fully supported. Enable with `./configure --with-rebar=/path/to/rebar3`
|
||||
- systemd: start ejabberd in foreground
|
||||
|
||||
* Modules:
|
||||
- MAM: Make sure that jid used as base in mam xml_compress is bare
|
||||
- MAM: Support for MAM Flipped Pages
|
||||
- MUC: Always show MucSub subscribers nicks
|
||||
- MUC: Don't forget not-persistent rooms in load_permanent_rooms
|
||||
- MUC Admin: Better error reporting
|
||||
- MUC Admin: Fix commands with hibernated rooms
|
||||
- MUC Admin: Many improvements in rooms_unused_list/destroy
|
||||
- MUC Admin: create_room_with_opts Store options only if room starts
|
||||
- Pubsub: Remove 'dag' node plugin documentation
|
||||
- Push: Fix API call return type on error
|
||||
- Push: Support cache config changes on reload
|
||||
- Register: Allow for account-removal-only setup again
|
||||
- Roster: Make roster subscriptions work better with invalid roster state in db
|
||||
- Vcard: Fix vCard search by User when using Mnesia
|
||||
- WebAdmin: Allow vhost admins to view WebAdmin menus
|
||||
- WebAdmin: Don't do double utf-8 conversion on translated strings
|
||||
- WebAdmin: Mark dangerous buttons with CSS
|
||||
- WebSocket: Make websocket send put back pressure on c2s process
|
||||
|
||||
# Version 20.07
|
||||
|
||||
* Changes in this version
|
||||
- Add support for using unix sockets in listeners.
|
||||
- Make this version compatible with erlang R23
|
||||
- Make room permissions checks more strict for subscribers
|
||||
- Fix problem with muc rooms crashing when using muc logger
|
||||
with some locales
|
||||
- Limit stat calls that logger module issues
|
||||
- Don't throw errors when using user_regexp acl rule and
|
||||
having non-matching host
|
||||
- Fix problem with leaving old data when updating shared rosters
|
||||
- Fix edge case that caused failure of resuming old sessions with
|
||||
stream management.
|
||||
- Fix crash when room that was started with logging enabled was later
|
||||
changed to logging disabled
|
||||
- Increase default shaper limits (this should help with delays for
|
||||
clients that are using jingle)
|
||||
- Fix couple compatibility problems which prevented working on
|
||||
erlang R19
|
||||
- Fix sending presence unavailable when session terminates for
|
||||
clients that only send directed presences (helps with sometimes
|
||||
not leaving muc rooms on disconnect).
|
||||
- Prevent supervisor errors for sockets that were closed before
|
||||
they were passed to handler modules
|
||||
- Make stun module work better with ipv6 addresses
|
||||
|
||||
# Version 20.03
|
||||
|
||||
* Changes in this version
|
||||
- Add support of ssl connection when connection to mysql
|
||||
database (configured with `sql_ssl: true` option)
|
||||
- Experimental support for cockroachdb when configured
|
||||
with postgres connector
|
||||
- Add cache and optimize queries issued by `mod_shared_roster`,
|
||||
this should greatly improve performance of this module when
|
||||
used with `sql` backend
|
||||
- Fix problem with accessing webadmin
|
||||
- Make webadmin work even when url is missing trailing slash
|
||||
- When compiling external modules with ext_mod, use flags
|
||||
that were detected during compilation of ejabberd
|
||||
- Make config changed to ldap options be updated when issued
|
||||
`reload_config` command
|
||||
- Fix `room_empty_destory` command
|
||||
- Fix reporting errors in `send_stanza` command when xml
|
||||
passed to it couldn't be passed correctly
|
||||
|
||||
# Version 20.02
|
||||
|
||||
* Changes in this version
|
||||
- Fix problems when trying to use string format with unicode
|
||||
values directly in xmpp nodes
|
||||
- Add missing oauth_client table declaration in lite.new.sql
|
||||
- Improve compatibility with CocroachDB
|
||||
- Fix importing of piefxis files that did use scram passwords
|
||||
- Fix importing of piefxis files that had multiple includes
|
||||
in them
|
||||
- Update jiffy dependency
|
||||
- Allow storage of emojis when using mssql database (Thanks
|
||||
to Christoph Scholz)
|
||||
- Make ejabberd_auth_http be able to use auth_opts
|
||||
- Make custom_headers options in http modules correctly
|
||||
override built-in values
|
||||
- Fix return value of reload_config and dump_config commands
|
||||
|
||||
# Version 20.01
|
||||
|
||||
* New features
|
||||
- Implement OAUTH authentication in mqtt
|
||||
- Make logging infrastructure use new logger introduced
|
||||
in Erlang (requires OTP22)
|
||||
- New configuration parser/validator
|
||||
- Initial work on being able to use CockroachDB as database backend
|
||||
- Add gc command
|
||||
- Add option to disable using prepared statements on Postgresql
|
||||
- Implement routine for converting password to SCRAM format
|
||||
for all backends not only SQL
|
||||
- Add infrastructure for having module documentation directly
|
||||
in individual module source code
|
||||
- Generate man page automatically
|
||||
- Implement copy feature in mod_carboncopy
|
||||
|
||||
* Fixes
|
||||
- Make webadmin work with configurable paths
|
||||
- Fix handling of result in xmlrpc module
|
||||
- Make webadmin work even when accessed through not declared domain
|
||||
- Better error reporting in xmlrpc
|
||||
- Limit amount of results returned by disco queries to pubsub nodes
|
||||
- Improve validation of configured JWT keys
|
||||
- Fix race condition in Redis/SQL startup
|
||||
- Fix loading order of third party modules
|
||||
- Fix reloading of ACL rules
|
||||
- Make account removal requests properly route response
|
||||
- Improve handling of malformed inputs in send_message command
|
||||
- Omit push notification if storing message in offline storage
|
||||
failed
|
||||
- Fix crash in stream management when timeout was not set
|
||||
|
||||
# Version 19.09
|
||||
|
||||
* Admin
|
||||
- The minimum required Erlang/OTP version is now 19.3
|
||||
- Fix API call using OAuth (#2982)
|
||||
- Rename MUC command arguments from Host to Service (#2976)
|
||||
|
||||
* Webadmin
|
||||
- Don't treat 'Host' header as a virtual XMPP host (#2989)
|
||||
- Fix some links to Guide in WebAdmin and add new ones (#3003)
|
||||
- Use select fields to input host in WebAdmin Backup (#3000)
|
||||
- Check account auth provided in WebAdmin is a local host (#3000)
|
||||
|
||||
* ACME
|
||||
- Improve ACME implementation
|
||||
- Fix IDA support in ACME requests
|
||||
- Fix unicode formatting in ACME module
|
||||
- Log an error message on IDNA failure
|
||||
- Support IDN hostnames in ACME requests
|
||||
- Don't attempt to create ACME directory on ejabberd startup
|
||||
- Don't allow requesting certificates for localhost or IP-like domains
|
||||
- Don't auto request certificate for localhost and IP-like domains
|
||||
- Add listener for ACME challenge in example config
|
||||
|
||||
* Authentication
|
||||
- JWT-only authentication for some users (#3012)
|
||||
|
||||
* MUC
|
||||
- Apply default role after revoking admin affiliation (#3023)
|
||||
- Custom exit message is not broadcast (#3004)
|
||||
- Revert "Affiliations other than admin and owner cannot invite to members_only rooms" (#2987)
|
||||
- When join new room with password, set pass and password_protected (#2668)
|
||||
- Improve rooms_* commands to accept 'global' as MUC service argument (#2976)
|
||||
- Rename MUC command arguments from Host to Service (#2976)
|
||||
|
||||
* SQL
|
||||
- Fix transactions for Microsoft SQL Server (#2978)
|
||||
- Spawn SQL connections on demand only
|
||||
|
||||
* Misc
|
||||
- Add support for XEP-0328: JID Prep
|
||||
- Added gsfonts for captcha
|
||||
- Log Mnesia table type on creation
|
||||
- Replicate Mnesia 'bosh' table when nodes are joined
|
||||
- Fix certificate selection for s2s (#3015)
|
||||
- Provide meaningful error when adding non-local users to shared roster (#3000)
|
||||
- Websocket: don't treat 'Host' header as a virtual XMPP host (#2989)
|
||||
- Fix sm ack related c2s error (#2984)
|
||||
- Don't hide the reason why c2s connection has failed
|
||||
- Unicode support
|
||||
- Correctly handle unicode in log messages
|
||||
- Fix unicode processing in ejabberd.yml
|
||||
|
||||
# Version 19.08
|
||||
|
||||
* Administration
|
||||
- Improve ejabberd halting procedure
|
||||
- Process unexpected erlang messages uniformly: logging a warning
|
||||
- mod_configure: Remove modules management
|
||||
|
||||
* Configuration
|
||||
- Use new configuration validator
|
||||
- ejabberd_http: Use correct virtual host when consulting trusted_proxies
|
||||
- Fix Elixir modules detection in the configuration file
|
||||
- Make option 'validate_stream' global
|
||||
- Allow multiple definitions of host_config and append_host_config
|
||||
- Introduce option 'captcha_url'
|
||||
- mod_stream_mgmt: Allow flexible timeout format
|
||||
- mod_mqtt: Allow flexible timeout format in session_expiry option
|
||||
|
||||
* Misc
|
||||
- Fix SQL connections leakage
|
||||
- New authentication method using JWT tokens
|
||||
- extauth: Add 'certauth' command
|
||||
- Improve SQL pool logic
|
||||
- Add and improve type specs
|
||||
- Improve extraction of translated strings
|
||||
- Improve error handling/reporting when loading language translations
|
||||
- Improve hooks validator and fix bugs related to hooks registration
|
||||
- Gracefully close inbound s2s connections
|
||||
- mod_mqtt: Fix usage of TLS
|
||||
- mod_offline: Make count_offline_messages cache work when using mam for storage
|
||||
- mod_privacy: Don't attempt to query 'undefined' active list
|
||||
- mod_privacy: Fix race condition
|
||||
|
||||
* MUC
|
||||
- Add code for hibernating inactive muc_room processes
|
||||
- Improve handling of unexpected iq in mod_muc_room
|
||||
- Attach mod_muc_room processes to a supervisor
|
||||
- Restore room when receiving message or generic iq for not started room
|
||||
- Distribute routing of MUC messages across all CPU cores
|
||||
|
||||
* PubSub
|
||||
- Fix pending nodes retrieval for SQL backend
|
||||
- Check access_model when publishing PEP
|
||||
- Remove deprecated pubsub plugins
|
||||
- Expose access_model and publish_model in pubsub#metadata
|
||||
|
||||
# Version 19.05
|
||||
|
||||
* Admin
|
||||
- The minimum required Erlang/OTP version is now 19.1
|
||||
- Provide a suggestion when unknown command, module, option or request handler is detected
|
||||
- Deprecate some listening options: captcha, register, web_admin, http_bind and xmlrpc
|
||||
- Add commands to get Mnesia info: mnesia_info and mnesia_table_info
|
||||
- Fix Register command to respect mod_register's Access option
|
||||
- Fixes in Prosody import: privacy and rooms
|
||||
- Remove TLS options from the example config
|
||||
- Improve request_handlers validator
|
||||
- Fix syntax in example Elixir config file
|
||||
|
||||
* Auth
|
||||
- Correctly support cache tags in ejabberd_auth
|
||||
- Don't process failed EXTERNAL authentication by mod_fail2ban
|
||||
- Don't call to mod_register when it's not loaded
|
||||
- Make anonymous auth don't {de}register user when there are other resources
|
||||
|
||||
* Developer
|
||||
- Rename listening callback from start/2 to start/3
|
||||
- New hook called when room gets destroyed: room_destroyed
|
||||
- New hooks for tracking mucsub subscriptions changes: muc_subscribed, muc_unsubscribed
|
||||
- Make static hooks analyzer working again
|
||||
|
||||
* MUC
|
||||
- Service admins are allowed to recreate room even if archive is nonempty
|
||||
- New option user_mucsub_from_muc_archive
|
||||
- Avoid late arrival of get_disco_item response
|
||||
- Handle get_subscribed_rooms call from mod_muc_room pid
|
||||
- Fix room state cleanup from db on change of persistent option change
|
||||
- Make get_subscribed_rooms work even for non-persistant rooms
|
||||
- Allow non-moderator subscribers to get list of room subscribers
|
||||
|
||||
* Offline
|
||||
- New option bounce_groupchat: make it not bounce mucsub/groupchat messages
|
||||
- New option use_mam_for_storage: fetch data from mam instead of spool table
|
||||
- When applying limit of max msgs in spool check only spool size
|
||||
- Do not store mucsub wrapped messages with no-store hint in offline storage
|
||||
- Always store ActivityMarker messages
|
||||
- Don't issue count/message fetch queries for offline from mam when not needed
|
||||
- Properly handle infinity as max number of message in mam offline storage
|
||||
- Sort messages by stanza_id when using mam storage in mod_offline
|
||||
- Return correct value from count_offline_messages with mam storage option
|
||||
- Make mod_offline put msg ignored by mam in spool when mam storage is on
|
||||
|
||||
* SQL:
|
||||
- Add SQL schemas for MQTT tables
|
||||
- Report better errors on SQL terms decode failure
|
||||
- Fix PostgreSQL compatibility in mod_offline_sql:remove_old_messages
|
||||
- Fix handling of list arguments on pgsql
|
||||
- Preliminary support for SQL in process_rosteritems command
|
||||
|
||||
* Tests
|
||||
- Add tests for user mucsub mam from muc mam
|
||||
- Add tests for offline with mam storage
|
||||
- Add tests for offline use_mam_for_storage
|
||||
- Initial Docker environment to run ejabberd test suite
|
||||
- Test offline:use_mam_for_storage, mam:user_mucsub_from_muc_archive used together
|
||||
|
||||
* Websocket
|
||||
- Add WebSockets support to mod_mqtt
|
||||
- Return "Bad request" error when origin in websocket connection doesn't match
|
||||
- Fix RFC6454 violation on websocket connection when validating Origin header
|
||||
- Origin header validation on websocket connection
|
||||
|
||||
* Other modules
|
||||
- mod_adhoc: Use xml:lang from stanza when it's missing in <command/> element
|
||||
- mod_announce: Add 'sessionid' attribute when required
|
||||
- mod_bosh: Don't put duplicate polling attribute in bosh payload
|
||||
- mod_http_api: Improve argument error messages and log messages
|
||||
- mod_http_upload: Feed whole image to eimp:identify/1
|
||||
- mod_http_upload: Log nicer warning on unknown host
|
||||
- mod_http_upload: Case-insensitive host comparison
|
||||
- mod_mqtt: Support other socket modules
|
||||
- mod_push: Check for payload in encrypted messages
|
||||
|
||||
# Version 19.02
|
||||
|
||||
* Admin
|
||||
- Fix in configure.ac the Erlang/OTP version: from 17.5 to 19.0
|
||||
- reload_config command: Fix crash when sql_pool_size option is used
|
||||
- reload_config command: Fix crash when SQL is not configured
|
||||
- rooms_empty_destroy command: Several fixes to behave more conservative
|
||||
- Fix serverhost->host parameter name for muc_(un)register_nick API
|
||||
|
||||
* Configuration
|
||||
- Allow specifying tag for listener for api_permission purposes
|
||||
- Change default ciphers to intermediate
|
||||
- Define default ciphers/protocol_option in example config
|
||||
- Don't crash on malformed 'modules' section
|
||||
- mod_mam: New option clear_archive_on_room_destroy to prevent archive removal on room destroy
|
||||
- mod_mam: New option access_preferences to restrict who can modify the MAM preferences
|
||||
- mod_muc: New option access_mam to restrict who can modify that room option
|
||||
- mod_offline: New option store_groupchat to allow storing group chat messages
|
||||
|
||||
* Core
|
||||
- Add MQTT protocol support
|
||||
- Fix (un)setting of priority
|
||||
- Use OTP application startup infrastructure for starting dependencies
|
||||
- Improve starting order of several dependencies
|
||||
|
||||
* MAM
|
||||
- mod_mam_mnesia/sql: Improve check for empty archive
|
||||
- disallow room creation if archive not empty and clear_archive_on_room_destroy is false
|
||||
- allow check if archive is empty for or user or room
|
||||
- Additional checks for database failures
|
||||
|
||||
* MUC
|
||||
- Make sure that room_destroyed is called even when some code throws in terminate
|
||||
- Update muc room state after adding extra access field to it
|
||||
- MUC/Sub: Send mucsub subscriber notification events with from set to room jid
|
||||
|
||||
* Shared Roster
|
||||
- Don't perform roster push for non-local contacts
|
||||
- Handle versioning result when shared roster group has remote account
|
||||
- Fix SQL queries
|
||||
|
||||
* Miscelanea
|
||||
- CAPTCHA: Add no-store hint to CAPTCHA challenge stanzas
|
||||
- HTTP: Reject http_api request with malformed Authentication header
|
||||
- mod_carboncopy: Don't lose carbons on presence change or session resumption
|
||||
- mod_mix: Fix submission-id and channel resource
|
||||
- mod_ping: Fix ping IQ reply/timeout processing (17.x regression)
|
||||
- mod_private: Hardcode item ID for PEP bookmarks
|
||||
- mod_push: Improve notification error handling
|
||||
- PIEFXIS: Fix user export when password is scrammed
|
||||
- Prosody: Improve import of roster items, rooms and attributes
|
||||
- Translations: fixed "make translations"
|
||||
- WebAdmin: Fix support to restart module with new options
|
||||
|
||||
# Version 18.12
|
||||
|
||||
* MAM data store compression
|
||||
* Proxy protocol support
|
||||
* MUC Self-Ping optimization (XEP-0410)
|
||||
* Bookmarks conversion (XEP-0411)
|
||||
@@ -1,46 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at the email address: conduct AT process-one.net. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
-126
@@ -1,126 +0,0 @@
|
||||
Compile and Install ejabberd
|
||||
============================
|
||||
|
||||
This document explains how to compile and install ejabberd
|
||||
from source code.
|
||||
|
||||
For a more detailed explanation, please check the
|
||||
ejabberd Docs: [Source Code Installation][docs-source].
|
||||
|
||||
[docs-source]: https://docs.ejabberd.im/admin/installation/#source-code
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
To compile ejabberd you need:
|
||||
|
||||
- GNU Make
|
||||
- GCC
|
||||
- Libexpat ≥ 1.95
|
||||
- Libyaml ≥ 0.1.4
|
||||
- Erlang/OTP ≥ 19.3
|
||||
- OpenSSL ≥ 1.0.0
|
||||
|
||||
Other optional libraries are:
|
||||
|
||||
- Zlib ≥ 1.2.3, for Stream Compression support (XEP-0138)
|
||||
- PAM library, for Pluggable Authentication Modules (PAM)
|
||||
- ImageMagick's Convert program and Ghostscript fonts, for CAPTCHA
|
||||
challenges
|
||||
- Elixir ≥ 1.10.3, to support Elixir, and alternative to rebar/rebar3
|
||||
|
||||
If your system splits packages in libraries and development headers,
|
||||
install the development packages too.
|
||||
|
||||
|
||||
Download Source Code
|
||||
--------------------
|
||||
|
||||
There are several ways to obtain the ejabberd source code:
|
||||
|
||||
- Source code archive from [ProcessOne Downloads][p1dl]
|
||||
- Source code package from [ejabberd GitHub Releases][ghr]
|
||||
- Latest development code from [ejabberd Git repository][gitrepo]
|
||||
|
||||
[p1dl]: https://www.process-one.net/en/ejabberd/downloads/
|
||||
[ghr]: https://github.com/processone/ejabberd/releases
|
||||
[gitrepo]: https://github.com/processone/ejabberd
|
||||
|
||||
|
||||
Compile
|
||||
-------
|
||||
|
||||
The general instructions to compile ejabberd are:
|
||||
|
||||
./configure
|
||||
make
|
||||
|
||||
If the source code doesn't contain a `configure` script,
|
||||
first of all install `autoconf` and run this to generate it:
|
||||
|
||||
./autogen.sh
|
||||
|
||||
To configure the compilation, features, install paths...
|
||||
|
||||
./configure --help
|
||||
|
||||
|
||||
Install in the System
|
||||
---------------------
|
||||
|
||||
To install ejabberd in the system, run this with system administrator rights (root user):
|
||||
|
||||
sudo make install
|
||||
|
||||
This will:
|
||||
|
||||
- Install the configuration files in `/etc/ejabberd/`
|
||||
- Install ejabberd binary, header and runtime files in `/lib/ejabberd/`
|
||||
- Install the administration script: `/sbin/ejabberdctl`
|
||||
- Install ejabberd documentation in `/share/doc/ejabberd/`
|
||||
- Create a spool directory: `/var/lib/ejabberd/`
|
||||
- Create a directory for log files: `/var/log/ejabberd/`
|
||||
|
||||
|
||||
Build an OTP Release
|
||||
--------------------
|
||||
|
||||
Instead of installing ejabberd in the system, you can build an OTP release
|
||||
that includes all necessary to run ejabberd in a subdirectory:
|
||||
|
||||
./configure --with-rebar=rebar3
|
||||
make rel
|
||||
|
||||
Or, if you have Elixir available and plan to develop Elixir code:
|
||||
|
||||
./configure --with-rebar=mix
|
||||
make dev
|
||||
|
||||
Check the full list of targets:
|
||||
|
||||
make help
|
||||
|
||||
|
||||
Start ejabberd
|
||||
--------------
|
||||
|
||||
You can use the `ejabberdctl` command line administration script to
|
||||
start and stop ejabberd. Some examples, depending on your installation method:
|
||||
|
||||
- When installed in the system:
|
||||
```
|
||||
ejabberdctl start
|
||||
/sbin/ejabberdctl start
|
||||
```
|
||||
|
||||
- When built an OTP production release:
|
||||
```
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl start
|
||||
_build/prod/rel/ejabberd/bin/ejabberdctl live
|
||||
```
|
||||
|
||||
- Start interactively without installing or building OTP release:
|
||||
```
|
||||
make relive
|
||||
```
|
||||
-450
@@ -1,450 +0,0 @@
|
||||
|
||||
[](https://github.com/processone/ejabberd/tags)
|
||||
[](https://github.com/processone/ejabberd/pkgs/container/ejabberd)
|
||||
[](https://hub.docker.com/r/ejabberd/ecs/)
|
||||
|
||||
|
||||
ejabberd Container
|
||||
==================
|
||||
|
||||
[ejabberd][home] is an open-source,
|
||||
robust, scalable and extensible realtime platform built using [Erlang/OTP][erlang],
|
||||
that includes [XMPP][xmpp] Server, [MQTT][mqtt] Broker and [SIP][sip] Service.
|
||||
|
||||
[home]: https://ejabberd.im/
|
||||
[erlang]: https://www.erlang.org/
|
||||
[xmpp]: https://xmpp.org/
|
||||
[mqtt]: https://mqtt.org/
|
||||
[sip]: https://en.wikipedia.org/wiki/Session_Initiation_Protocol
|
||||
|
||||
This document explains how to use the `ejabberd` container image available in
|
||||
[ghcr.io/processone/ejabberd](https://github.com/processone/ejabberd/pkgs/container/ejabberd),
|
||||
built using the files in `.github/container/`.
|
||||
|
||||
Alternatively, there is also the `ecs` container image available in
|
||||
[docker.io/ejabberd/ecs](https://hub.docker.com/r/ejabberd/ecs/),
|
||||
built using the
|
||||
[docker-ejabberd/ecs](https://github.com/processone/docker-ejabberd/tree/master/ecs)
|
||||
repository.
|
||||
Check the [differences between `ejabberd` and `ecs` images](https://github.com/processone/docker-ejabberd/blob/master/ecs/HUB-README.md#alternative-image-in-github).
|
||||
|
||||
If you are using a Windows operating system, check the tutorials mentioned in
|
||||
[ejabberd Docs > Docker Image](https://docs.ejabberd.im/admin/installation/#docker-image).
|
||||
|
||||
|
||||
Start ejabberd
|
||||
==============
|
||||
|
||||
## With default configuration
|
||||
|
||||
Start ejabberd in a new container:
|
||||
|
||||
```bash
|
||||
docker run --name ejabberd -d -p 5222:5222 ghcr.io/processone/ejabberd
|
||||
```
|
||||
|
||||
That runs the container as a daemon,
|
||||
using ejabberd default configuration file and XMPP domain "localhost".
|
||||
|
||||
Stop the running container:
|
||||
|
||||
```bash
|
||||
docker stop ejabberd
|
||||
```
|
||||
|
||||
Restart the stopped ejabberd container:
|
||||
|
||||
```bash
|
||||
docker restart ejabberd
|
||||
```
|
||||
|
||||
|
||||
## Start with Erlang console attached
|
||||
|
||||
Start ejabberd with an Erlang console attached using the `live` command:
|
||||
|
||||
```bash
|
||||
docker run --name ejabberd -it -p 5222:5222 ghcr.io/processone/ejabberd live
|
||||
```
|
||||
|
||||
That uses the default configuration file and XMPP domain "localhost".
|
||||
|
||||
|
||||
## Start with your configuration and database
|
||||
|
||||
Pass a configuration file as a volume
|
||||
and share the local directory to store database:
|
||||
|
||||
```bash
|
||||
mkdir database
|
||||
chown ejabberd database
|
||||
|
||||
cp ejabberd.yml.example ejabberd.yml
|
||||
|
||||
docker run --name ejabberd -it \
|
||||
-v $(pwd)/ejabberd.yml:/opt/ejabberd/conf/ejabberd.yml \
|
||||
-v $(pwd)/database:/opt/ejabberd/database \
|
||||
-p 5222:5222 ghcr.io/processone/ejabberd live
|
||||
```
|
||||
|
||||
Notice that ejabberd runs in the container with an account named `ejabberd`,
|
||||
and the volumes you mount must grant proper rights to that account.
|
||||
|
||||
|
||||
Next steps
|
||||
==========
|
||||
|
||||
## Register the administrator account
|
||||
|
||||
The default ejabberd configuration does not grant admin privileges
|
||||
to any account,
|
||||
you may want to register a new account in ejabberd
|
||||
and grant it admin rights.
|
||||
|
||||
Register an account using the `ejabberdctl` script:
|
||||
|
||||
```bash
|
||||
docker exec -it ejabberd ejabberdctl register admin localhost passw0rd
|
||||
```
|
||||
|
||||
Then edit conf/ejabberd.yml and add the ACL as explained in
|
||||
[ejabberd Docs: Administration Account](https://docs.ejabberd.im/admin/installation/#administration-account)
|
||||
|
||||
|
||||
## Check ejabberd log files
|
||||
|
||||
Check the content of the log files inside the container,
|
||||
even if you do not put it on a shared persistent drive:
|
||||
|
||||
```bash
|
||||
docker exec -it ejabberd tail -f logs/ejabberd.log
|
||||
```
|
||||
|
||||
|
||||
## Inspect the container files
|
||||
|
||||
The container uses Alpine Linux. Start a shell inside the container:
|
||||
|
||||
```bash
|
||||
docker exec -it ejabberd sh
|
||||
```
|
||||
|
||||
|
||||
## Open ejabberd debug console
|
||||
|
||||
Open an interactive debug Erlang console attached to a running ejabberd in a running container:
|
||||
|
||||
```bash
|
||||
docker exec -it ejabberd ejabberdctl debug
|
||||
```
|
||||
|
||||
|
||||
## CAPTCHA
|
||||
|
||||
ejabberd includes two example CAPTCHA scripts.
|
||||
If you want to use any of them, first install some additional required libraries:
|
||||
|
||||
```bash
|
||||
docker exec --user root ejabberd apk add imagemagick ghostscript-fonts bash
|
||||
```
|
||||
|
||||
Now update your ejabberd configuration file, for example:
|
||||
```bash
|
||||
docker exec -it ejabberd vi conf/ejabberd.yml
|
||||
```
|
||||
|
||||
and add this option:
|
||||
```yaml
|
||||
captcha_cmd: /opt/ejabberd-22.04/lib/captcha.sh
|
||||
```
|
||||
|
||||
Finally, reload the configuration file or restart the container:
|
||||
```bash
|
||||
docker exec ejabberd ejabberdctl reload_config
|
||||
```
|
||||
|
||||
If the CAPTCHA image is not visible, there may be a problem generating it
|
||||
(the ejabberd log file may show some error message);
|
||||
or the image URL may not be correctly detected by ejabberd,
|
||||
in that case you can set the correct URL manually, for example:
|
||||
```yaml
|
||||
captcha_url: https://localhost:5443/captcha
|
||||
```
|
||||
|
||||
For more details about CAPTCHA options, please check the
|
||||
[CAPTCHA](https://docs.ejabberd.im/admin/configuration/basic/#captcha)
|
||||
documentation section.
|
||||
|
||||
|
||||
Advanced Container Configuration
|
||||
================================
|
||||
|
||||
## Ports
|
||||
|
||||
This container image exposes the ports:
|
||||
|
||||
- `5222`: The default port for XMPP clients.
|
||||
- `5269`: For XMPP federation. Only needed if you want to communicate with users on other servers.
|
||||
- `5280`: For admin interface.
|
||||
- `5443`: With encryption, used for admin interface, API, CAPTCHA, OAuth, Websockets and XMPP BOSH.
|
||||
- `1883`: Used for MQTT
|
||||
- `4369-4399`: EPMD and Erlang connectivity, used for `ejabberdctl` and clustering
|
||||
- `5210`: Erlang connectivity when `ERL_DIST_PORT` is set, alternative to EPMD
|
||||
|
||||
|
||||
## Volumes
|
||||
|
||||
ejabberd produces two types of data: log files and database spool files (Mnesia).
|
||||
This is the kind of data you probably want to store on a persistent or local drive (at least the database).
|
||||
|
||||
The volumes you may want to map:
|
||||
|
||||
- `/opt/ejabberd/conf/`: Directory containing configuration and certificates
|
||||
- `/opt/ejabberd/database/`: Directory containing Mnesia database.
|
||||
You should back up or export the content of the directory to persistent storage
|
||||
(host storage, local storage, any storage plugin)
|
||||
- `/opt/ejabberd/logs/`: Directory containing log files
|
||||
- `/opt/ejabberd/upload/`: Directory containing uploaded files. This should also be backed up.
|
||||
|
||||
All these files are owned by `ejabberd` user inside the container.
|
||||
|
||||
It's possible to install additional ejabberd modules using volumes,
|
||||
[this comment](https://github.com/processone/docker-ejabberd/issues/81#issuecomment-1036115146)
|
||||
explains how to install an additional module using docker-compose.
|
||||
|
||||
|
||||
## Commands on start
|
||||
|
||||
The ejabberdctl script reads the `CTL_ON_CREATE` environment variable
|
||||
the first time the container is started,
|
||||
and reads `CTL_ON_START` every time the container is started.
|
||||
Those variables can contain one ejabberdctl command,
|
||||
or several commands separated with the blankspace and `;` characters.
|
||||
|
||||
Example usage (or check the [full example](#customized-example)):
|
||||
```yaml
|
||||
environment:
|
||||
- CTL_ON_CREATE=register admin localhost asd
|
||||
- CTL_ON_START=stats registeredusers ;
|
||||
check_password admin localhost asd ;
|
||||
status
|
||||
```
|
||||
|
||||
|
||||
## Clustering
|
||||
|
||||
When setting several containers to form a
|
||||
[cluster of ejabberd nodes](https://docs.ejabberd.im/admin/guide/clustering/),
|
||||
each one must have a different
|
||||
[Erlang Node Name](https://docs.ejabberd.im/admin/guide/security/#erlang-node-name)
|
||||
and the same
|
||||
[Erlang Cookie](https://docs.ejabberd.im/admin/guide/security/#erlang-cookie).
|
||||
|
||||
For this you can either:
|
||||
- edit `conf/ejabberdctl.cfg` and set variables `ERLANG_NODE` and `ERLANG_COOKIE`
|
||||
- set the environment variables `ERLANG_NODE_ARG` and `ERLANG_COOKIE`
|
||||
|
||||
Example to connect a local `ejabberdctl` to a containerized ejabberd:
|
||||
1. When creating the container, export port 5210, and set `ERLANG_COOKIE`:
|
||||
```
|
||||
docker run --name ejabberd -it \
|
||||
-e ERLANG_COOKIE=`cat $HOME/.erlang.cookie` \
|
||||
-p 5210:5210 -p 5222:5222 \
|
||||
ghcr.io/processone/ejabberd
|
||||
```
|
||||
2. Set `ERL_DIST_PORT=5210` in ejabberdctl.cfg of container and local ejabberd
|
||||
3. Restart the container
|
||||
4. Now use `ejabberdctl` in your local ejabberd deployment
|
||||
|
||||
To connect using a local `ejabberd` script:
|
||||
```
|
||||
ERL_DIST_PORT=5210 _build/dev/rel/ejabberd/bin/ejabberd ping
|
||||
```
|
||||
|
||||
Example using environment variables (see full example [docker-compose.yml](https://github.com/processone/docker-ejabberd/issues/64#issuecomment-887741332)):
|
||||
```yaml
|
||||
environment:
|
||||
- ERLANG_NODE_ARG=ejabberd@node7
|
||||
- ERLANG_COOKIE=dummycookie123
|
||||
```
|
||||
|
||||
|
||||
Build a Container Image
|
||||
=======================
|
||||
|
||||
This container image includes ejabberd as a standalone OTP release built using Elixir.
|
||||
That OTP release is configured with:
|
||||
|
||||
- `mix.exs`: Customize ejabberd release
|
||||
- `vars.config`: ejabberd compilation configuration options
|
||||
- `config/runtime.exs`: Customize ejabberd paths
|
||||
- `ejabberd.yml.template`: ejabberd default config file
|
||||
|
||||
## Direct build
|
||||
|
||||
Build ejabberd Community Server container image from ejabberd master git repository:
|
||||
|
||||
```bash
|
||||
docker buildx build \
|
||||
-t personal/ejabberd \
|
||||
-f .github/container/Dockerfile \
|
||||
.
|
||||
```
|
||||
|
||||
## Podman build
|
||||
|
||||
It's also possible to use podman instead of docker, just notice:
|
||||
- `EXPOSE 4369-4399` port range is not supported, remove that in Dockerfile
|
||||
- It mentions that `healthcheck` is not supported by the Open Container Initiative image format
|
||||
- If you want to start with command `live`, add environment variable `EJABBERD_BYPASS_WARNINGS=true`
|
||||
```bash
|
||||
podman build \
|
||||
-t ejabberd \
|
||||
-f .github/container/Dockerfile \
|
||||
.
|
||||
|
||||
podman run --name eja1 -d -p 5222:5222 localhost/ejabberd
|
||||
|
||||
podman exec eja1 ejabberdctl status
|
||||
|
||||
podman exec -it eja1 sh
|
||||
|
||||
podman stop eja1
|
||||
```
|
||||
|
||||
## Package build for `arm64`
|
||||
|
||||
By default, `.github/container/Dockerfile` builds this container by directly compiling ejabberd,
|
||||
it is a fast and direct method.
|
||||
However, a problem with QEMU prevents building the container in QEMU using Erlang/OTP 25
|
||||
for the `arm64` architecture.
|
||||
|
||||
Providing `--build-arg METHOD=package` is an alternate method to build the container
|
||||
used by the Github Actions workflow that provides `amd64` and `arm64` container images.
|
||||
It first builds an ejabberd binary package, and later installs it in the image.
|
||||
That method avoids using QEMU, so it can build `arm64` container images, but is extremely
|
||||
slow the first time it's used, and consequently not recommended for general use.
|
||||
|
||||
In this case, to build the ejabberd container image for arm64 architecture:
|
||||
|
||||
```bash
|
||||
docker buildx build \
|
||||
--build-arg METHOD=package \
|
||||
--platform linux/arm64 \
|
||||
-t personal/ejabberd:$VERSION \
|
||||
-f .github/container/Dockerfile \
|
||||
.
|
||||
```
|
||||
|
||||
|
||||
Composer Examples
|
||||
=================
|
||||
|
||||
## Minimal Example
|
||||
|
||||
This is the barely minimal file to get a usable ejabberd.
|
||||
Store it as `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
main:
|
||||
image: ghcr.io/processone/ejabberd
|
||||
container_name: ejabberd
|
||||
ports:
|
||||
- "5222:5222"
|
||||
- "5269:5269"
|
||||
- "5280:5280"
|
||||
- "5443:5443"
|
||||
```
|
||||
|
||||
Create and start the container with the command:
|
||||
```bash
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
## Customized Example
|
||||
|
||||
This example shows the usage of several customizations:
|
||||
it uses a local configuration file,
|
||||
stores the mnesia database in a local path,
|
||||
registers an account when it's created,
|
||||
and checks the number of registered accounts every time it's started.
|
||||
|
||||
Download or copy the ejabberd configuration file:
|
||||
```bash
|
||||
wget https://raw.githubusercontent.com/processone/ejabberd/master/ejabberd.yml.example
|
||||
mv ejabberd.yml.example ejabberd.yml
|
||||
```
|
||||
|
||||
Create the database directory and allow the container access to it:
|
||||
```bash
|
||||
mkdir database
|
||||
sudo chown 9000:9000 database
|
||||
```
|
||||
|
||||
Now write this `docker-compose.yml` file:
|
||||
```yaml
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
|
||||
main:
|
||||
image: ghcr.io/processone/ejabberd
|
||||
container_name: ejabberd
|
||||
environment:
|
||||
- CTL_ON_CREATE=register admin localhost asd
|
||||
- CTL_ON_START=registered_users localhost ;
|
||||
status
|
||||
ports:
|
||||
- "5222:5222"
|
||||
- "5269:5269"
|
||||
- "5280:5280"
|
||||
- "5443:5443"
|
||||
volumes:
|
||||
- ./ejabberd.yml:/opt/ejabberd/conf/ejabberd.yml:ro
|
||||
- ./database:/opt/ejabberd/database
|
||||
```
|
||||
|
||||
## Clustering Example
|
||||
|
||||
In this example, the main container is created first.
|
||||
Once it is fully started and healthy, a second container is created,
|
||||
and once ejabberd is started in it, it joins the first one.
|
||||
|
||||
An account is registered in the first node when created,
|
||||
and it should exist in the second node after join.
|
||||
|
||||
Notice that in this example the main container does not have access
|
||||
to the exterior; the replica exports the ports and can be accessed.
|
||||
|
||||
```yaml
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
|
||||
main:
|
||||
image: ghcr.io/processone/ejabberd
|
||||
container_name: ejabberd
|
||||
environment:
|
||||
- ERLANG_NODE_ARG=ejabberd@main
|
||||
- ERLANG_COOKIE=dummycookie123
|
||||
- CTL_ON_CREATE=register admin localhost asd
|
||||
|
||||
replica:
|
||||
image: ghcr.io/processone/ejabberd
|
||||
container_name: replica
|
||||
depends_on:
|
||||
main:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "5222:5222"
|
||||
- "5269:5269"
|
||||
- "5280:5280"
|
||||
- "5443:5443"
|
||||
environment:
|
||||
- ERLANG_NODE_ARG=ejabberd@replica
|
||||
- ERLANG_COOKIE=dummycookie123
|
||||
- CTL_ON_CREATE=join_cluster ejabberd@main
|
||||
- CTL_ON_START=registered_users localhost ;
|
||||
status
|
||||
```
|
||||
-149
@@ -1,149 +0,0 @@
|
||||
# Contributing to ejabberd
|
||||
|
||||
We'd love for you to contribute to our source code and to make ejabberd even better than it is
|
||||
today! Here are the guidelines we'd like you to follow:
|
||||
|
||||
* [Code of Conduct](#coc)
|
||||
* [Questions and Problems](#question)
|
||||
* [Issues and Bugs](#issue)
|
||||
* [Feature Requests](#feature)
|
||||
* [Issue Submission Guidelines](#submit)
|
||||
* [Pull Request Submission Guidelines](#submit-pr)
|
||||
* [Signing the CLA](#cla)
|
||||
|
||||
## <a name="coc"></a> Code of Conduct
|
||||
|
||||
Help us keep ejabberd community open-minded and inclusive. Please read and follow our [Code of Conduct][coc].
|
||||
|
||||
## <a name="requests"></a> Questions, Bugs, Features
|
||||
|
||||
### <a name="question"></a> Got a Question or Problem?
|
||||
|
||||
Do not open issues for general support questions as we want to keep GitHub issues for bug reports
|
||||
and feature requests. You've got much better chances of getting your question answered on dedicated
|
||||
support platforms, the best being [Stack Overflow][stackoverflow].
|
||||
|
||||
Stack Overflow is a much better place to ask questions since:
|
||||
|
||||
- there are thousands of people willing to help on Stack Overflow
|
||||
- questions and answers stay available for public viewing so your question / answer might help
|
||||
someone else
|
||||
- Stack Overflow's voting system assures that the best answers are prominently visible.
|
||||
|
||||
To save your and our time, we will systematically close all issues that are requests for general
|
||||
support and redirect people to the section you are reading right now.
|
||||
|
||||
Other channels for support are:
|
||||
- ejabberd XMPP room: [ejabberd@conference.process-one.net][muc]
|
||||
- [ejabberd XMPP room logs][logs]
|
||||
- [ejabberd Mailing List][list]
|
||||
|
||||
### <a name="issue"></a> Found an Issue or Bug?
|
||||
|
||||
If you find a bug in the source code, you can help us by submitting an issue to our
|
||||
[GitHub Repository][github]. Even better, you can submit a Pull Request with a fix.
|
||||
|
||||
### <a name="feature"></a> Missing a Feature?
|
||||
|
||||
You can request a new feature by submitting an issue to our [GitHub Repository][github-issues].
|
||||
|
||||
If you would like to implement a new feature then consider what kind of change it is:
|
||||
|
||||
* **Major Changes** that you wish to contribute to the project should be discussed first in an
|
||||
[GitHub issue][github-issues] that clearly outlines the changes and benefits of the feature.
|
||||
* **Small Changes** can directly be crafted and submitted to the [GitHub Repository][github]
|
||||
as a Pull Request. See the section about [Pull Request Submission Guidelines](#submit-pr).
|
||||
|
||||
## <a name="submit"></a> Issue Submission Guidelines
|
||||
|
||||
Before you submit your issue search the archive, maybe your question was already answered.
|
||||
|
||||
If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize
|
||||
the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.
|
||||
|
||||
The "[new issue][github-new-issue]" form contains a number of prompts that you should fill out to
|
||||
make it easier to understand and categorize the issue.
|
||||
|
||||
## <a name="submit-pr"></a> Pull Request Submission Guidelines
|
||||
|
||||
By submitting a pull request for a code or doc contribution, you need to have the right
|
||||
to grant your contribution's copyright license to ProcessOne. Please check [ProcessOne CLA][cla]
|
||||
for details.
|
||||
|
||||
Before you submit your pull request consider the following guidelines:
|
||||
|
||||
* Search [GitHub][github-pr] for an open or closed Pull Request
|
||||
that relates to your submission. You don't want to duplicate effort.
|
||||
* Create the [development environment][developer-setup]
|
||||
* Make your changes in a new git branch:
|
||||
|
||||
```shell
|
||||
git checkout -b my-fix-branch master
|
||||
```
|
||||
* Test your changes and, if relevant, expand the automated test suite.
|
||||
* Create your patch commit, including appropriate test cases.
|
||||
* If the changes affect public APIs, change or add relevant [documentation][doc-repo].
|
||||
* Commit your changes using a descriptive commit message.
|
||||
|
||||
```shell
|
||||
git commit -a
|
||||
```
|
||||
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
|
||||
|
||||
* Push your branch to GitHub:
|
||||
|
||||
```shell
|
||||
git push origin my-fix-branch
|
||||
```
|
||||
|
||||
* In GitHub, send a pull request to `ejabberd:master`. This will trigger the automated testing.
|
||||
We will also notify you if you have not yet signed the [contribution agreement][cla].
|
||||
|
||||
* If you find that the tests have failed, look into the logs to find out
|
||||
if your changes caused test failures, the commit message was malformed etc. If you find that the
|
||||
tests failed or times out for unrelated reasons, you can ping a team member so that the build can be
|
||||
restarted.
|
||||
|
||||
* If we suggest changes, then:
|
||||
|
||||
* Make the required updates.
|
||||
* Test your changes and test cases.
|
||||
* Commit your changes to your branch (e.g. `my-fix-branch`).
|
||||
* Push the changes to your GitHub repository (this will update your Pull Request).
|
||||
|
||||
You can also amend the initial commits and force push them to the branch.
|
||||
|
||||
```shell
|
||||
git rebase master -i
|
||||
git push origin my-fix-branch -f
|
||||
```
|
||||
|
||||
This is generally easier to follow, but separate commits are useful if the Pull Request contains
|
||||
iterations that might be interesting to see side-by-side.
|
||||
|
||||
That's it! Thank you for your contribution!
|
||||
|
||||
## <a name="cla"></a> Signing the Contributor License Agreement (CLA)
|
||||
|
||||
Upon submitting a Pull Request, we will ask you to sign our CLA if you haven't done
|
||||
so before. It's a quick process, we promise, and you will be able to do it all online
|
||||
|
||||
You can read [ProcessOne Contribution License Agreement][cla] in PDF.
|
||||
|
||||
This is part of the legal framework of the open-source ecosystem that adds some red tape,
|
||||
but protects both the contributor and the company / foundation behind the project. It also
|
||||
gives us the option to relicense the code with a more permissive license in the future.
|
||||
|
||||
|
||||
[coc]: https://github.com/processone/ejabberd/blob/master/CODE_OF_CONDUCT.md
|
||||
[stackoverflow]: https://stackoverflow.com/questions/tagged/ejabberd?sort=newest
|
||||
[list]: https://lists.jabber.ru/mailman/listinfo/ejabberd
|
||||
[muc]: xmpp:ejabberd@conference.process-one.net
|
||||
[logs]: https://process-one.net/logs/ejabberd@conference.process-one.net/
|
||||
[github]: https://github.com/processone/ejabberd
|
||||
[github-issues]: https://github.com/processone/ejabberd/issues
|
||||
[github-new-issue]: https://github.com/processone/ejabberd/issues/new
|
||||
[github-pr]: https://github.com/processone/ejabberd/pulls
|
||||
[doc-repo]: https://github.com/processone/docs.ejabberd.im
|
||||
[developer-setup]: https://docs.ejabberd.im/developer/
|
||||
[cla]: https://www.process-one.net/resources/ejabberd-cla.pdf
|
||||
@@ -1,37 +0,0 @@
|
||||
# Contributors
|
||||
|
||||
We would like to thanks official ejabberd source code contributors:
|
||||
|
||||
- Sergey Abramyan
|
||||
- Badlop
|
||||
- Ludovic Bocquet
|
||||
- Emilio Bustos
|
||||
- Thiago Camargo
|
||||
- Juan Pablo Carlino
|
||||
- Paweł Chmielowski
|
||||
- Gabriel Gatu
|
||||
- Tsukasa Hamano
|
||||
- Konstantinos Kallas
|
||||
- Evgeny Khramtsov
|
||||
- Ben Langfeld
|
||||
- Peter Lemenkov
|
||||
- Anna Mukharram
|
||||
- Johan Oudinet
|
||||
- Pablo Polvorin
|
||||
- Mickaël Rémond
|
||||
- Matthias Rieber
|
||||
- Rafael Roemhild
|
||||
- Christophe Romain
|
||||
- Jérôme Sautret
|
||||
- Sonny Scroggin
|
||||
- Alexey Shchepin
|
||||
- Shelley Shyan
|
||||
- Radoslaw Szymczyszyn
|
||||
- Stu Tomlinson
|
||||
- Christian Ulrich
|
||||
- Holger Weiß
|
||||
|
||||
Please, if you think we are missing your contribution, do not hesitate to contact us at ProcessOne.
|
||||
In case you do not want to appear in this list, please, let us know as well.
|
||||
|
||||
Thanks !
|
||||
@@ -4,8 +4,8 @@ with the OpenSSL library and distribute the resulting binary.
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@@ -306,9 +306,9 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
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 program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
-525
@@ -1,525 +0,0 @@
|
||||
REBAR = @ESCRIPT@ @rebar@
|
||||
MIX = @rebar@
|
||||
INSTALL = @INSTALL@
|
||||
SED = @SED@
|
||||
ERL = @ERL@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
DESTDIR =
|
||||
|
||||
# /etc/ejabberd/
|
||||
ETCDIR = @sysconfdir@/ejabberd
|
||||
|
||||
# /bin/
|
||||
BINDIR = @bindir@
|
||||
|
||||
# /sbin/
|
||||
SBINDIR = @sbindir@
|
||||
|
||||
# /lib/
|
||||
LIBDIR = @libdir@
|
||||
|
||||
# /lib/ejabberd/
|
||||
EJABBERDDIR = @libdir@/ejabberd
|
||||
|
||||
# /share/doc/ejabberd
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
datarootdir = @datarootdir@
|
||||
DOCDIR = @docdir@
|
||||
|
||||
# /share/doc/man/man5
|
||||
MANDIR = @mandir@/man5
|
||||
|
||||
# /usr/lib/ejabberd/ebin/
|
||||
BEAMDIR = $(EJABBERDDIR)/ebin
|
||||
|
||||
# /usr/lib/ejabberd/include/
|
||||
INCLUDEDIR = $(EJABBERDDIR)/include
|
||||
|
||||
# /usr/lib/ejabberd/priv/
|
||||
PRIVDIR = $(EJABBERDDIR)/priv
|
||||
|
||||
# /usr/lib/ejabberd/priv/bin
|
||||
PBINDIR = $(PRIVDIR)/bin
|
||||
|
||||
# /usr/lib/ejabberd/priv/lib
|
||||
SODIR = $(PRIVDIR)/lib
|
||||
|
||||
# /usr/lib/ejabberd/priv/msgs
|
||||
MSGSDIR = $(PRIVDIR)/msgs
|
||||
|
||||
# /usr/lib/ejabberd/priv/css
|
||||
CSSDIR = $(PRIVDIR)/css
|
||||
|
||||
# /usr/lib/ejabberd/priv/img
|
||||
IMGDIR = $(PRIVDIR)/img
|
||||
|
||||
# /usr/lib/ejabberd/priv/js
|
||||
JSDIR = $(PRIVDIR)/js
|
||||
|
||||
# /usr/lib/ejabberd/priv/sql
|
||||
SQLDIR = $(PRIVDIR)/sql
|
||||
|
||||
# /usr/lib/ejabberd/priv/lua
|
||||
LUADIR = $(PRIVDIR)/lua
|
||||
|
||||
# /var/lib/ejabberd/
|
||||
SPOOLDIR = @localstatedir@/lib/ejabberd
|
||||
|
||||
# /var/log/ejabberd/
|
||||
LOGDIR = @localstatedir@/log/ejabberd
|
||||
|
||||
INSTALLUSER=@INSTALLUSER@
|
||||
# if no user was enabled, don't set privileges or ownership
|
||||
ifeq ($(INSTALLUSER),)
|
||||
O_USER=
|
||||
G_USER=
|
||||
CHOWN_COMMAND=echo
|
||||
CHOWN_OUTPUT=/dev/null
|
||||
INIT_USER=root
|
||||
else
|
||||
O_USER=-o $(INSTALLUSER)
|
||||
G_USER=-g $(INSTALLUSER)
|
||||
CHOWN_COMMAND=chown
|
||||
CHOWN_OUTPUT=&1
|
||||
INIT_USER=$(INSTALLUSER)
|
||||
endif
|
||||
# if no group was enabled, don't set privileges or ownership
|
||||
INSTALLGROUP=@INSTALLGROUP@
|
||||
ifneq ($(INSTALLGROUP),)
|
||||
G_USER=-g $(INSTALLGROUP)
|
||||
endif
|
||||
|
||||
ifeq "$(MIX)" "mix"
|
||||
REBAR_VER:=6
|
||||
REBAR_VER_318:=0
|
||||
else
|
||||
REBAR_VER:=$(shell $(REBAR) --version | awk -F '[ .]' '/rebar / {print $$2}')
|
||||
REBAR_VER_318:=$(shell $(REBAR) --version | awk -F '[ .]' '/rebar / {print ($$2 == 3 && $$3 >= 18 ? 1 : 0)}')
|
||||
endif
|
||||
|
||||
ifeq "$(REBAR_VER)" "6"
|
||||
REBAR=$(MIX)
|
||||
SKIPDEPS=
|
||||
LISTDEPS=deps.tree
|
||||
UPDATEDEPS=deps.update
|
||||
DEPSPATTERN="s/.*─ \([a-z0-9_]*\) .*/\1/p;"
|
||||
DEPSBASE=_build
|
||||
DEPSDIR=$(DEPSBASE)/dev/lib
|
||||
GET_DEPS= deps.get
|
||||
CONFIGURE_DEPS=(cd deps/eimp; ./configure)
|
||||
EBINDIR=$(DEPSDIR)/ejabberd/ebin
|
||||
XREFOPTIONS=graph
|
||||
CLEANARG=--deps
|
||||
REBARREL=MIX_ENV=prod $(REBAR) release --overwrite
|
||||
REBARDEV=MIX_ENV=dev $(REBAR) release --overwrite
|
||||
RELIVECMD=escript rel/relive.escript && MIX_ENV=dev RELIVE=true iex --name ejabberd@localhost -S mix run
|
||||
else
|
||||
ifeq "$(REBAR_VER)" "3"
|
||||
SKIPDEPS=
|
||||
LISTDEPS=tree
|
||||
ifeq "$(REBAR_VER_318)" "1"
|
||||
UPDATEDEPS=upgrade --all
|
||||
else
|
||||
UPDATEDEPS=upgrade
|
||||
endif
|
||||
DEPSPATTERN="s/ (.*//; /^ / s/.* \([a-z0-9_]*\).*/\1/p;"
|
||||
DEPSBASE=_build
|
||||
DEPSDIR=$(DEPSBASE)/default/lib
|
||||
GET_DEPS= get-deps
|
||||
CONFIGURE_DEPS=$(REBAR) configure-deps
|
||||
EBINDIR=$(DEPSDIR)/ejabberd/ebin
|
||||
XREFOPTIONS=
|
||||
CLEANARG=--all
|
||||
REBARREL=$(REBAR) as prod tar
|
||||
REBARDEV=REBAR_PROFILE=dev $(REBAR) release
|
||||
RELIVECMD=$(REBAR) relive
|
||||
else
|
||||
SKIPDEPS=skip_deps=true
|
||||
LISTDEPS=-q list-deps
|
||||
UPDATEDEPS=update-deps
|
||||
DEPSPATTERN="/ TAG / s/ .*// p; / REV / s/ .*// p; / BRANCH / s/ .*// p;"
|
||||
DEPSBASE=deps
|
||||
DEPSDIR=$(DEPSBASE)
|
||||
GET_DEPS= get-deps
|
||||
CONFIGURE_DEPS=$(REBAR) configure-deps
|
||||
EBINDIR=ebin
|
||||
XREFOPTIONS=
|
||||
CLEANARG=
|
||||
REBARREL=$(REBAR) generate
|
||||
REBARDEV=
|
||||
RELIVECMD=@echo "Rebar2 detected... relive not supported.\
|
||||
\nTry: ./configure --with-rebar=./rebar3 ; make relive"
|
||||
endif
|
||||
endif
|
||||
|
||||
all: scripts deps src
|
||||
|
||||
deps: $(DEPSDIR)/.got
|
||||
|
||||
$(DEPSDIR)/.got:
|
||||
rm -rf $(DEPSDIR)/.got
|
||||
rm -rf $(DEPSDIR)/.built
|
||||
mkdir -p $(DEPSDIR)
|
||||
$(REBAR) $(GET_DEPS) && :> $(DEPSDIR)/.got
|
||||
$(CONFIGURE_DEPS)
|
||||
|
||||
$(DEPSDIR)/.built: $(DEPSDIR)/.got
|
||||
$(REBAR) compile && :> $(DEPSDIR)/.built
|
||||
|
||||
src: $(DEPSDIR)/.built
|
||||
$(REBAR) $(SKIPDEPS) compile
|
||||
|
||||
update:
|
||||
rm -rf $(DEPSDIR)/.got
|
||||
rm -rf $(DEPSDIR)/.built
|
||||
$(REBAR) $(UPDATEDEPS) && :> $(DEPSDIR)/.got
|
||||
$(CONFIGURE_DEPS)
|
||||
|
||||
xref: all
|
||||
$(REBAR) $(SKIPDEPS) xref $(XREFOPTIONS)
|
||||
|
||||
hooks: all
|
||||
tools/hook_deps.sh $(EBINDIR)
|
||||
|
||||
options: all
|
||||
tools/opt_types.sh ejabberd_option $(EBINDIR)
|
||||
|
||||
translations:
|
||||
tools/prepare-tr.sh $(DEPSDIR)
|
||||
|
||||
doap:
|
||||
tools/generate-doap.sh
|
||||
|
||||
edoc:
|
||||
$(ERL) -noinput +B -eval \
|
||||
'case edoc:application(ejabberd, ".", []) of ok -> halt(0); error -> halt(1) end.'
|
||||
|
||||
JOIN_PATHS=$(if $(wordlist 2,1000,$(1)),$(firstword $(1))/$(call JOIN_PATHS,$(wordlist 2,1000,$(1))),$(1))
|
||||
|
||||
VERSIONED_DEP=$(if $(DEP_$(1)_VERSION),$(DEP_$(1)_VERSION),$(1))
|
||||
|
||||
DEPIX:=$(words $(subst /, ,$(DEPSDIR)))
|
||||
LIBIX:=$(shell expr "$(DEPIX)" + 2)
|
||||
|
||||
ELIXIR_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,$(word 2,$(1))) $(wordlist 5,1000,$(1))
|
||||
DEPS_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,$(word 2,$(1))) $(wordlist 3,1000,$(1))
|
||||
MAIN_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,ejabberd) $(1)
|
||||
TO_DEST_SINGLE=$(if $(subst X$(DEPSBASE)X,,X$(word 1,$(1))X),$(call MAIN_TO_DEST,$(1)),$(if $(subst XlibX,,X$(word $(LIBIX),$(1))X),$(call DEPS_TO_DEST,$(wordlist $(DEPIX),1000,$(1))),$(call ELIXIR_TO_DEST,$(wordlist $(DEPIX),1000,$(1)))))
|
||||
TO_DEST=$(foreach path,$(1),$(call JOIN_PATHS,$(DESTDIR)$(call TO_DEST_SINGLE,$(subst /, ,$(path)))))
|
||||
|
||||
FILTER_DIRS=$(foreach path,$(1),$(if $(wildcard $(path)/*),,$(path)))
|
||||
FILES_WILDCARD=$(call FILTER_DIRS,$(foreach w,$(1),$(wildcard $(w))))
|
||||
|
||||
ifeq ($(MAKECMDGOALS),copy-files-sub)
|
||||
|
||||
DEPS:=$(sort $(shell QUIET=1 $(REBAR) $(LISTDEPS) | $(SED) -ne $(DEPSPATTERN) ))
|
||||
|
||||
DEPS_FILES=$(call FILES_WILDCARD,$(foreach DEP,$(DEPS),$(DEPSDIR)/$(DEP)/ebin/*.beam $(DEPSDIR)/$(DEP)/ebin/*.app $(DEPSDIR)/$(DEP)/priv/* $(DEPSDIR)/$(DEP)/priv/lib/* $(DEPSDIR)/$(DEP)/priv/bin/* $(DEPSDIR)/$(DEP)/include/*.hrl $(DEPSDIR)/$(DEP)/COPY* $(DEPSDIR)/$(DEP)/LICENSE* $(DEPSDIR)/$(DEP)/lib/*/ebin/*.beam $(DEPSDIR)/$(DEP)/lib/*/ebin/*.app))
|
||||
|
||||
BINARIES=$(DEPSDIR)/epam/priv/bin/epam $(DEPSDIR)/eimp/priv/bin/eimp $(DEPSDIR)/fs/priv/mac_listener
|
||||
|
||||
DEPS_FILES_FILTERED=$(filter-out $(BINARIES) $(DEPSDIR)/elixir/ebin/elixir.app,$(DEPS_FILES))
|
||||
DEPS_DIRS=$(sort $(DEPSDIR)/ $(foreach DEP,$(DEPS),$(DEPSDIR)/$(DEP)/) $(dir $(DEPS_FILES)))
|
||||
|
||||
MAIN_FILES=$(filter-out %/configure.beam,$(call FILES_WILDCARD,$(EBINDIR)/*.beam $(EBINDIR)/*.app priv/msgs/*.msg priv/css/*.css priv/img/*.png priv/js/*.js priv/lib/* include/*.hrl COPYING))
|
||||
MAIN_DIRS=$(sort $(dir $(MAIN_FILES)) priv/bin priv/sql priv/lua)
|
||||
|
||||
define DEP_VERSION_template
|
||||
DEP_$(1)_VERSION:=$(shell $(SED) -e '/vsn/!d;s/.*, *"/$(1)-/;s/".*//' $(2) 2>/dev/null)
|
||||
endef
|
||||
|
||||
DELETE_TARGET_SO=$(if $(subst X.soX,,X$(suffix $(1))X),,rm -f $(call TO_DEST,$(1));)
|
||||
|
||||
$(foreach DEP,$(DEPS),$(eval $(call DEP_VERSION_template,$(DEP),$(DEPSDIR)/$(DEP)/ebin/$(DEP).app)))
|
||||
$(eval $(call DEP_VERSION_template,ejabberd,$(EBINDIR)/ejabberd.app))
|
||||
|
||||
define COPY_template
|
||||
$(call TO_DEST,$(1)): $(1) $(call TO_DEST,$(dir $(1))) ; $(call DELETE_TARGET_SO, $(1)) $$(INSTALL) -m 644 $(1) $(call TO_DEST,$(1))
|
||||
endef
|
||||
|
||||
define COPY_BINARY_template
|
||||
$(call TO_DEST,$(1)): $(1) $(call TO_DEST,$(dir $(1))) ; rm -f $(call TO_DEST,$(1)); $$(INSTALL) -m 755 $$(O_USER) $(1) $(call TO_DEST,$(1))
|
||||
endef
|
||||
|
||||
$(foreach file,$(DEPS_FILES_FILTERED) $(MAIN_FILES),$(eval $(call COPY_template,$(file))))
|
||||
|
||||
$(foreach file,$(BINARIES),$(eval $(call COPY_BINARY_template,$(file))))
|
||||
|
||||
$(sort $(call TO_DEST,$(MAIN_DIRS) $(DEPS_DIRS))):
|
||||
$(INSTALL) -d $@
|
||||
|
||||
$(call TO_DEST,priv/sql/lite.sql): sql/lite.sql $(call TO_DEST,priv/sql)
|
||||
$(INSTALL) -m 644 $< $@
|
||||
|
||||
$(call TO_DEST,priv/sql/lite.new.sql): sql/lite.new.sql $(call TO_DEST,priv/sql)
|
||||
$(INSTALL) -m 644 $< $@
|
||||
|
||||
$(call TO_DEST,priv/bin/captcha.sh): tools/captcha.sh $(call TO_DEST,priv/bin)
|
||||
$(INSTALL) -m 755 $(O_USER) $< $@
|
||||
|
||||
$(call TO_DEST,priv/lua/redis_sm.lua): priv/lua/redis_sm.lua $(call TO_DEST,priv/lua)
|
||||
$(INSTALL) -m 644 $< $@
|
||||
|
||||
ifeq (@sqlite@,true)
|
||||
SQLITE_FILES = priv/sql/lite.sql priv/sql/lite.new.sql
|
||||
endif
|
||||
|
||||
ifeq (@redis@,true)
|
||||
REDIS_FILES = priv/lua/redis_sm.lua
|
||||
endif
|
||||
|
||||
copy-files-sub2: $(call TO_DEST,$(DEPS_FILES) $(MAIN_FILES) priv/bin/captcha.sh $(SQLITE_FILES) $(REDIS_FILES))
|
||||
|
||||
.PHONY: $(call TO_DEST,$(DEPS_FILES) $(MAIN_DIRS) $(DEPS_DIRS))
|
||||
|
||||
endif
|
||||
|
||||
copy-files:
|
||||
$(MAKE) copy-files-sub
|
||||
|
||||
copy-files-sub: copy-files-sub2
|
||||
|
||||
relive:
|
||||
$(RELIVECMD)
|
||||
|
||||
relivelibdir=$(shell pwd)/$(DEPSDIR)
|
||||
relivedir=$(shell pwd)/_build/relive
|
||||
iexpath=$(shell which iex)
|
||||
CONFIG_DIR = ${relivedir}/conf
|
||||
SPOOL_DIR = ${relivedir}/database
|
||||
LOGS_DIR = ${relivedir}/logs
|
||||
|
||||
ejabberdctl.relive:
|
||||
$(SED) -e "s*{{installuser}}*@INSTALLUSER@*g" \
|
||||
-e "s*{{config_dir}}*${CONFIG_DIR}*g" \
|
||||
-e "s*{{logs_dir}}*${LOGS_DIR}*g" \
|
||||
-e "s*{{spool_dir}}*${SPOOL_DIR}*g" \
|
||||
-e "s*{{bindir}}/iex*$(iexpath)*g" \
|
||||
-e "s*{{bindir}}*@bindir@*g" \
|
||||
-e "s*{{libdir}}*${relivelibdir}*g" \
|
||||
-e "s*{{erl}}*@ERL@*g" \
|
||||
-e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \
|
||||
> ejabberdctl.relive
|
||||
|
||||
ejabberd.init:
|
||||
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
|
||||
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.init.template \
|
||||
> ejabberd.init
|
||||
chmod 755 ejabberd.init
|
||||
|
||||
ejabberd.service:
|
||||
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
|
||||
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.service.template \
|
||||
> ejabberd.service
|
||||
chmod 644 ejabberd.service
|
||||
|
||||
ejabberdctl.example: vars.config
|
||||
$(SED) -e "s*{{installuser}}*@INSTALLUSER@*g" \
|
||||
-e "s*{{config_dir}}*${ETCDIR}*g" \
|
||||
-e "s*{{logs_dir}}*${LOGDIR}*g" \
|
||||
-e "s*{{spool_dir}}*${SPOOLDIR}*g" \
|
||||
-e "s*{{bindir}}*@bindir@*g" \
|
||||
-e "s*{{libdir}}*@libdir@*g" \
|
||||
-e "s*{{erl}}*@ERL@*g" \
|
||||
-e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \
|
||||
> ejabberdctl.example
|
||||
|
||||
scripts: ejabberd.init ejabberd.service ejabberdctl.example
|
||||
|
||||
install: copy-files
|
||||
#
|
||||
# Configuration files
|
||||
$(INSTALL) -d -m 750 $(G_USER) $(DESTDIR)$(ETCDIR)
|
||||
[ -f $(DESTDIR)$(ETCDIR)/ejabberd.yml ] \
|
||||
&& $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(DESTDIR)$(ETCDIR)/ejabberd.yml-new \
|
||||
|| $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(DESTDIR)$(ETCDIR)/ejabberd.yml
|
||||
[ -f $(DESTDIR)$(ETCDIR)/ejabberdctl.cfg ] \
|
||||
&& $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(DESTDIR)$(ETCDIR)/ejabberdctl.cfg-new \
|
||||
|| $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(DESTDIR)$(ETCDIR)/ejabberdctl.cfg
|
||||
$(INSTALL) -b -m 644 $(G_USER) inetrc $(DESTDIR)$(ETCDIR)/inetrc
|
||||
#
|
||||
# Administration script
|
||||
[ -d $(DESTDIR)$(SBINDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(SBINDIR)
|
||||
$(INSTALL) -m 550 $(G_USER) ejabberdctl.example $(DESTDIR)$(SBINDIR)/ejabberdctl
|
||||
# Elixir binaries
|
||||
[ -d $(DESTDIR)$(BINDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)
|
||||
[ -f $(DEPSDIR)/elixir/bin/iex ] && $(INSTALL) -m 550 $(G_USER) $(DEPSDIR)/elixir/bin/iex $(DESTDIR)$(BINDIR)/iex || true
|
||||
[ -f $(DEPSDIR)/elixir/bin/elixir ] && $(INSTALL) -m 550 $(G_USER) $(DEPSDIR)/elixir/bin/elixir $(DESTDIR)$(BINDIR)/elixir || true
|
||||
[ -f $(DEPSDIR)/elixir/bin/mix ] && $(INSTALL) -m 550 $(G_USER) $(DEPSDIR)/elixir/bin/mix $(DESTDIR)$(BINDIR)/mix || true
|
||||
#
|
||||
# Spool directory
|
||||
$(INSTALL) -d -m 750 $(O_USER) $(DESTDIR)$(SPOOLDIR)
|
||||
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(DESTDIR)$(SPOOLDIR) >$(CHOWN_OUTPUT)
|
||||
chmod -R 750 $(DESTDIR)$(SPOOLDIR)
|
||||
#
|
||||
# Log directory
|
||||
$(INSTALL) -d -m 750 $(O_USER) $(DESTDIR)$(LOGDIR)
|
||||
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(DESTDIR)$(LOGDIR) >$(CHOWN_OUTPUT)
|
||||
chmod -R 750 $(DESTDIR)$(LOGDIR)
|
||||
#
|
||||
# Documentation
|
||||
$(INSTALL) -d $(DESTDIR)$(MANDIR)
|
||||
$(INSTALL) -d $(DESTDIR)$(DOCDIR)
|
||||
[ -f man/ejabberd.yml.5 ] \
|
||||
&& $(INSTALL) -m 644 man/ejabberd.yml.5 $(DESTDIR)$(MANDIR) \
|
||||
|| echo "Man page not included in sources"
|
||||
$(INSTALL) -m 644 COPYING $(DESTDIR)$(DOCDIR)
|
||||
|
||||
uninstall: uninstall-binary
|
||||
|
||||
uninstall-binary:
|
||||
rm -f $(DESTDIR)$(SBINDIR)/ejabberdctl
|
||||
rm -f $(DESTDIR)$(BINDIR)/iex
|
||||
rm -f $(DESTDIR)$(BINDIR)/elixir
|
||||
rm -f $(DESTDIR)$(BINDIR)/mix
|
||||
rm -fr $(DESTDIR)$(DOCDIR)
|
||||
rm -f $(DESTDIR)$(BEAMDIR)/*.beam
|
||||
rm -f $(DESTDIR)$(BEAMDIR)/*.app
|
||||
rm -fr $(DESTDIR)$(BEAMDIR)
|
||||
rm -f $(DESTDIR)$(INCLUDEDIR)/*.hrl
|
||||
rm -fr $(DESTDIR)$(INCLUDEDIR)
|
||||
rm -fr $(DESTDIR)$(PBINDIR)
|
||||
rm -f $(DESTDIR)$(SODIR)/*.so
|
||||
rm -fr $(DESTDIR)$(SODIR)
|
||||
rm -f $(DESTDIR)$(MSGSDIR)/*.msg
|
||||
rm -fr $(DESTDIR)$(MSGSDIR)
|
||||
rm -f $(DESTDIR)$(CSSDIR)/*.css
|
||||
rm -fr $(DESTDIR)$(CSSDIR)
|
||||
rm -f $(DESTDIR)$(IMGDIR)/*.png
|
||||
rm -fr $(DESTDIR)$(IMGDIR)
|
||||
rm -f $(DESTDIR)$(JSDIR)/*.js
|
||||
rm -fr $(DESTDIR)$(JSDIR)
|
||||
rm -f $(DESTDIR)$(SQLDIR)/*.sql
|
||||
rm -fr $(DESTDIR)$(SQLDIR)
|
||||
rm -fr $(DESTDIR)$(LUADIR)/*.lua
|
||||
rm -fr $(DESTDIR)$(LUADIR)
|
||||
rm -fr $(DESTDIR)$(PRIVDIR)
|
||||
rm -fr $(DESTDIR)$(EJABBERDDIR)
|
||||
|
||||
uninstall-all: uninstall-binary
|
||||
rm -rf $(DESTDIR)$(ETCDIR)
|
||||
rm -rf $(DESTDIR)$(EJABBERDDIR)
|
||||
rm -rf $(DESTDIR)$(SPOOLDIR)
|
||||
rm -rf $(DESTDIR)$(LOGDIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(DEPSDIR)/.got
|
||||
rm -rf $(DEPSDIR)/.built
|
||||
rm -rf test/*.beam
|
||||
rm -f rebar.lock
|
||||
rm -f ejabberdctl.example ejabberd.init ejabberd.service
|
||||
$(REBAR) clean $(CLEANARG)
|
||||
|
||||
clean-rel:
|
||||
rm -rf rel/ejabberd
|
||||
|
||||
distclean: clean clean-rel
|
||||
rm -f aclocal.m4
|
||||
rm -f config.status
|
||||
rm -f config.log
|
||||
rm -rf autom4te.cache
|
||||
rm -rf $(EBINDIR)
|
||||
rm -rf $(DEPSBASE)
|
||||
rm -rf deps
|
||||
rm -f Makefile
|
||||
rm -f vars.config
|
||||
|
||||
rel:
|
||||
$(REBARREL)
|
||||
|
||||
DEV_CONFIG = _build/dev/rel/ejabberd/conf/ejabberd.yml
|
||||
|
||||
dev $(DEV_CONFIG):
|
||||
$(REBARDEV)
|
||||
|
||||
TAGS:
|
||||
etags *.erl
|
||||
|
||||
Makefile: Makefile.in
|
||||
|
||||
ifeq "$(REBAR_VER)" "3"
|
||||
dialyzer:
|
||||
$(REBAR) dialyzer
|
||||
else
|
||||
deps := $(wildcard $(DEPSDIR)/*/ebin)
|
||||
|
||||
dialyzer/erlang.plt:
|
||||
@mkdir -p dialyzer
|
||||
@dialyzer --build_plt --output_plt dialyzer/erlang.plt \
|
||||
-o dialyzer/erlang.log --apps kernel stdlib sasl crypto \
|
||||
public_key ssl mnesia inets odbc compiler erts \
|
||||
os_mon asn1 syntax_tools; \
|
||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||
|
||||
dialyzer/deps.plt:
|
||||
@mkdir -p dialyzer
|
||||
@dialyzer --build_plt --output_plt dialyzer/deps.plt \
|
||||
-o dialyzer/deps.log $(deps); \
|
||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||
|
||||
dialyzer/ejabberd.plt:
|
||||
@mkdir -p dialyzer
|
||||
@dialyzer --build_plt --output_plt dialyzer/ejabberd.plt \
|
||||
-o dialyzer/ejabberd.log ebin; \
|
||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||
|
||||
erlang_plt: dialyzer/erlang.plt
|
||||
@dialyzer --plt dialyzer/erlang.plt --check_plt -o dialyzer/erlang.log; \
|
||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||
|
||||
deps_plt: dialyzer/deps.plt
|
||||
@dialyzer --plt dialyzer/deps.plt --check_plt -o dialyzer/deps.log; \
|
||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||
|
||||
ejabberd_plt: dialyzer/ejabberd.plt
|
||||
@dialyzer --plt dialyzer/ejabberd.plt --check_plt -o dialyzer/ejabberd.log; \
|
||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||
|
||||
dialyzer: erlang_plt deps_plt ejabberd_plt
|
||||
@dialyzer --plts dialyzer/*.plt --no_check_plt \
|
||||
--get_warnings -o dialyzer/error.log ebin; \
|
||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||
endif
|
||||
|
||||
test:
|
||||
@echo "************************** NOTICE ***************************************"
|
||||
@cat test/README
|
||||
@echo "*************************************************************************"
|
||||
@cd priv && ln -sf ../sql
|
||||
$(REBAR) $(SKIPDEPS) ct
|
||||
|
||||
.PHONY: src edoc dialyzer Makefile TAGS clean clean-rel distclean rel \
|
||||
install uninstall uninstall-binary uninstall-all translations deps test \
|
||||
quicktest erlang_plt deps_plt ejabberd_plt xref hooks options
|
||||
|
||||
help:
|
||||
@echo ""
|
||||
@echo " [all] "
|
||||
@echo " scripts Prepare ejabberd start scripts"
|
||||
@echo " deps Get and configure dependencies"
|
||||
@echo " src Compile dependencies and ejabberd"
|
||||
@echo " update Update dependencies' source code"
|
||||
@echo " clean Clean binary files"
|
||||
@echo " distclean Clean completely the development files"
|
||||
@echo ""
|
||||
@echo " install Install ejabberd to /usr/local"
|
||||
@echo " uninstall Uninstall ejabberd (buggy)"
|
||||
@echo " uninstall-all Uninstall also configuration, logs, mnesia... (buggy)"
|
||||
@echo ""
|
||||
@echo " rel Build a production release"
|
||||
@echo " dev Build a development release"
|
||||
@echo " relive Start a live ejabberd in _build/relive/"
|
||||
@echo ""
|
||||
@echo " doap Generate DOAP file"
|
||||
@echo " edoc Generate edoc documentation (unused)"
|
||||
@echo " options Generate ejabberd_option.erl"
|
||||
@echo " translations Extract translation files (requires --enable-tools)"
|
||||
@echo " tags Generate tags file for text editors"
|
||||
@echo ""
|
||||
@echo " dialyzer Run Dialyzer static analyzer"
|
||||
@echo " hooks Run hooks validator"
|
||||
@echo " test Run Common Tests suite"
|
||||
@echo " xref Run cross reference analysis"
|
||||
@@ -0,0 +1,47 @@
|
||||
ejabberd - High-Performance Enterprise Instant Messaging Server
|
||||
|
||||
Quickstart guide
|
||||
|
||||
|
||||
0. Requirements
|
||||
|
||||
To compile ejabberd you need:
|
||||
- GNU Make
|
||||
- GCC
|
||||
- libexpat 1.95 or higher
|
||||
- Erlang/OTP R10B-9 or newer
|
||||
- OpenSSL 0.9.6 or higher, for STARTTLS, SASL and SSL
|
||||
encryption. Optional, highly recommended.
|
||||
- Zlib 1.2.3 or higher, for Stream Compression support
|
||||
(XEP-0138). Optional.
|
||||
- GNU Iconv 1.8 or higher, for the IRC Transport
|
||||
(mod_irc). Optional. Not needed on systems with GNU Libc.
|
||||
|
||||
|
||||
1. Compile and install on *nix systems
|
||||
|
||||
To compile ejabberd, go to the directory src/ and execute the commands:
|
||||
./configure
|
||||
make
|
||||
|
||||
To install ejabberd, run this command with system administrator rights
|
||||
(root user):
|
||||
|
||||
sudo make install
|
||||
|
||||
These commands will:
|
||||
- Install a startup script: /sbin/ejabberdctl
|
||||
- Install ejabberd in /var/lib/ejabberd/
|
||||
- Install the configuration files in /etc/ejabberd/
|
||||
- Create a directory for log files: /var/log/ejabberd/
|
||||
|
||||
|
||||
2. Start ejabberd
|
||||
|
||||
You can use the ejabberdctl command line administration script to
|
||||
start and stop ejabberd. For example:
|
||||
ejabberdctl start
|
||||
|
||||
|
||||
For detailed information please refer to the
|
||||
ejabberd Installation and Operation Guide
|
||||
@@ -1,127 +0,0 @@
|
||||
|
||||
<p align="center">
|
||||
<img src="https://www.process-one.net/wp-content/uploads/2022/05/ejabberd-logo-rounded-index.png"
|
||||
height="216">
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/processone/ejabberd/tags" alt="GitHub tag (latest SemVer)">
|
||||
<img src="https://img.shields.io/github/v/tag/processone/ejabberd?sort=semver&logo=embarcadero&label=&color=3fb0d2&logoWidth=20" /></a>
|
||||
<a href="https://hex.pm/packages/ejabberd" alt="Hex version">
|
||||
<img src="https://img.shields.io/hexpm/v/ejabberd.svg" /></a>
|
||||
<a href="https://github.com/processone/ejabberd/pkgs/container/ejabberd" alt="GitHub Container">
|
||||
<img src="https://img.shields.io/github/v/tag/processone/ejabberd?label=container&sort=semver" /></a>
|
||||
<a href="https://hub.docker.com/r/ejabberd/ecs/" alt="Docker Image Version (latest semver)">
|
||||
<img src="https://img.shields.io/docker/v/ejabberd/ecs?label=docker" /></a>
|
||||
<a href="https://formulae.brew.sh/formula/ejabberd" alt="homebrew version">
|
||||
<img src="https://img.shields.io/homebrew/v/ejabberd" /></a>
|
||||
<br />
|
||||
<a href="https://github.com/processone/ejabberd/actions/workflows/ci.yml" alt="CI">
|
||||
<img src="https://github.com/processone/ejabberd/actions/workflows/ci.yml/badge.svg" /></a>
|
||||
<a href="https://coveralls.io/github/processone/ejabberd?branch=master" alt="Coverage Status">
|
||||
<img src="https://coveralls.io/repos/github/processone/ejabberd/badge.svg?branch=master "Coverage in coveralls.io"" /></a>
|
||||
<a href="https://hosted.weblate.org/projects/ejabberd/ejabberd-po/" alt="Translation status">
|
||||
<img src="https://hosted.weblate.org/widgets/ejabberd/-/ejabberd-po/svg-badge.svg"" /></a>
|
||||
</p>
|
||||
|
||||
|
||||
[ejabberd][im] is an open-source,
|
||||
robust, scalable and extensible realtime platform built using [Erlang/OTP][erlang],
|
||||
that includes [XMPP][xmpp] Server, [MQTT][mqtt] Broker and [SIP][sip] Service.
|
||||
|
||||
Check the features in [ejabberd.im][im], [ejabberd Docs][features],
|
||||
[ejabberd at ProcessOne][p1home], and the list of [supported protocols in ProcessOne][xeps]
|
||||
and [XMPP.org][xmppej].
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
There are several ways to install ejabberd:
|
||||
|
||||
- Source code: compile yourself, see [COMPILE](COMPILE.md)
|
||||
- Installers from [ProcessOne Download][p1download] or [ejabberd GitHub Releases][releases] (run/deb/rpm for x64 and arm64)
|
||||
- Container image from [ejabberd Docker Hub][hubecs], see [ecs README][docker-ecs-readme] (for x64)
|
||||
- Container image from [ejabberd Github Packages][packages], see [CONTAINER](CONTAINER.md) (for x64 and arm64)
|
||||
- Using your [Operating System package][osp]
|
||||
- Using the [Homebrew][homebrew] package manager
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Please check the [ejabberd Docs][docs] website.
|
||||
|
||||
When compiling from source code, you can get some help with:
|
||||
|
||||
./configure --help
|
||||
make help
|
||||
|
||||
Once ejabberd is installed, try:
|
||||
|
||||
ejabberdctl help
|
||||
man ejabberd.yml
|
||||
|
||||
|
||||
Development
|
||||
-----------
|
||||
|
||||
Bug reports and features are tracked using [GitHub Issues][issues],
|
||||
please check [CONTRIBUTING](CONTRIBUTING.md) for details.
|
||||
|
||||
Translations can be improved online [using Weblate][weblate]
|
||||
or in your local machine as explained in [Localization][localization].
|
||||
|
||||
Documentation for developers is available in [ejabberd docs: Developers][docs-dev].
|
||||
|
||||
Security reports or concerns should preferably be reported privately,
|
||||
please send an email to the address: contact at process-one dot net
|
||||
or some other method from [ProcessOne Contact][p1contact].
|
||||
|
||||
For commercial offering and support, including [ejabberd Business Edition][p1home]
|
||||
and [Fluux (ejabberd in the Cloud)][fluux], please check [ProcessOne ejabberd page][p1home].
|
||||
|
||||
|
||||
Community
|
||||
---------
|
||||
|
||||
There are several places to get in touch with other ejabberd developers and administrators:
|
||||
|
||||
- ejabberd XMPP chatroom: [ejabberd@conference.process-one.net][muc]
|
||||
- [Mailing list][list]
|
||||
- [GitHub Discussions][discussions]
|
||||
- [Stack Overflow][stackoverflow]
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
ejabberd is released under the GNU General Public License v2 (see [COPYING](COPYING.md)),
|
||||
and [ejabberd translations](https://github.com/processone/ejabberd-po/) under MIT License.
|
||||
|
||||
|
||||
[discussions]: https://github.com/processone/ejabberd/discussions
|
||||
[docker-ecs-readme]: https://github.com/processone/docker-ejabberd/tree/master/ecs#readme
|
||||
[docs-dev]: https://docs.ejabberd.im/developer/
|
||||
[docs]: https://docs.ejabberd.im
|
||||
[erlang]: https://www.erlang.org/
|
||||
[features]: https://docs.ejabberd.im/admin/introduction/
|
||||
[fluux]: https://fluux.io/
|
||||
[homebrew]: https://docs.ejabberd.im/admin/installation/#homebrew
|
||||
[hubecs]: https://hub.docker.com/r/ejabberd/ecs/
|
||||
[im]: https://ejabberd.im/
|
||||
[issues]: https://github.com/processone/ejabberd/issues
|
||||
[list]: https://lists.jabber.ru/mailman/listinfo/ejabberd
|
||||
[localization]: https://docs.ejabberd.im/developer/extending-ejabberd/localization/
|
||||
[mqtt]: https://mqtt.org/
|
||||
[muc]: xmpp:ejabberd@conference.process-one.net
|
||||
[osp]: https://docs.ejabberd.im/admin/installation/#operating-system-packages
|
||||
[p1contact]: https://www.process-one.net/en/company/contact/
|
||||
[p1download]: https://www.process-one.net/en/ejabberd/downloads/
|
||||
[p1home]: https://www.process-one.net/en/ejabberd/
|
||||
[packages]: https://github.com/processone/ejabberd/pkgs/container/ejabberd
|
||||
[releases]: https://github.com/processone/ejabberd/releases
|
||||
[sip]: https://en.wikipedia.org/wiki/Session_Initiation_Protocol
|
||||
[stackoverflow]: https://stackoverflow.com/questions/tagged/ejabberd?sort=newest
|
||||
[weblate]: https://hosted.weblate.org/projects/ejabberd/ejabberd-po/
|
||||
[xeps]: https://www.process-one.net/en/ejabberd/protocols/
|
||||
[xmpp]: https://xmpp.org/
|
||||
[xmppej]: https://xmpp.org/software/servers/ejabberd/
|
||||
@@ -1,2 +0,0 @@
|
||||
{erl_opts, [debug_info]}.
|
||||
{deps, []}.
|
||||
@@ -1,9 +0,0 @@
|
||||
{application, configure_deps,
|
||||
[{description, "A rebar3 plugin to explicitly run configure on dependencies"},
|
||||
{vsn, "0.0.1"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib]},
|
||||
{env,[]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
@@ -1,8 +0,0 @@
|
||||
-module(configure_deps).
|
||||
|
||||
-export([init/1]).
|
||||
|
||||
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
|
||||
init(State) ->
|
||||
{ok, State1} = configure_deps_prv:init(State),
|
||||
{ok, State1}.
|
||||
@@ -1,54 +0,0 @@
|
||||
-module(configure_deps_prv).
|
||||
|
||||
-export([init/1, do/1, format_error/1]).
|
||||
|
||||
-define(PROVIDER, 'configure-deps').
|
||||
-define(DEPS, [install_deps]).
|
||||
|
||||
%% ===================================================================
|
||||
%% Public API
|
||||
%% ===================================================================
|
||||
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
|
||||
init(State) ->
|
||||
Provider = providers:create([
|
||||
{namespace, default},
|
||||
{name, ?PROVIDER}, % The 'user friendly' name of the task
|
||||
{module, ?MODULE}, % The module implementation of the task
|
||||
{bare, true}, % The task can be run by the user, always true
|
||||
{deps, ?DEPS}, % The list of dependencies
|
||||
{example, "rebar3 configure-deps"}, % How to use the plugin
|
||||
{opts, []}, % list of options understood by the plugin
|
||||
{short_desc, "Explicitly run ./configure for dependencies"},
|
||||
{desc, "A rebar plugin to allow explicitly running ./configure on dependencies. Useful if dependencies might change prior to compilation when configure is run."}
|
||||
]),
|
||||
{ok, rebar_state:add_provider(State, Provider)}.
|
||||
|
||||
|
||||
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
|
||||
do(State) ->
|
||||
Apps = rebar_state:project_apps(State) ++ lists:usort(rebar_state:all_deps(State)),
|
||||
lists:foreach(fun do_app/1, Apps),
|
||||
{ok, State}.
|
||||
|
||||
exec_configure({'configure-deps', Cmd}, Dir) ->
|
||||
rebar_utils:sh(Cmd, [{cd, Dir}, {use_stdout, true}]);
|
||||
exec_configure(_, Acc) -> Acc.
|
||||
|
||||
parse_pre_hooks({pre_hooks, PreHooks}, Acc) ->
|
||||
lists:foldl(fun exec_configure/2, Acc, PreHooks);
|
||||
parse_pre_hooks(_, Acc) -> Acc.
|
||||
|
||||
parse_additions({add, App, Additions}, {MyApp, Dir}) when App == MyApp ->
|
||||
lists:foldl(fun parse_pre_hooks/2, Dir, Additions),
|
||||
{MyApp, Dir};
|
||||
parse_additions(_, Acc) -> Acc.
|
||||
|
||||
do_app(App) ->
|
||||
Dir = rebar_app_info:dir(App),
|
||||
Opts = rebar_app_info:opts(App),
|
||||
Overrides = rebar_opts:get(Opts, overrides),
|
||||
lists:foldl(fun parse_additions/2, {binary_to_atom(rebar_app_info:name(App), utf8), Dir}, Overrides).
|
||||
|
||||
-spec format_error(any()) -> iolist().
|
||||
format_error(Reason) ->
|
||||
io_lib:format("~p", [Reason]).
|
||||
@@ -1,3 +0,0 @@
|
||||
# generate a new autoconf
|
||||
aclocal -I m4
|
||||
autoconf -f
|
||||
@@ -1,164 +0,0 @@
|
||||
defmodule Ejabberd.ConfigFile do
|
||||
use Ejabberd.Config
|
||||
|
||||
def start do
|
||||
[loglevel: 4,
|
||||
log_rotate_size: 10485760,
|
||||
log_rotate_count: 1,
|
||||
auth_method: :internal,
|
||||
max_fsm_queue: 1000,
|
||||
language: "en",
|
||||
allow_contrib_modules: true,
|
||||
hosts: ["localhost"],
|
||||
shaper: shaper(),
|
||||
acl: acl(),
|
||||
access: access()]
|
||||
end
|
||||
|
||||
defp shaper do
|
||||
[normal: 1000,
|
||||
fast: 50000,
|
||||
max_fsm_queue: 1000]
|
||||
end
|
||||
|
||||
defp acl do
|
||||
[local:
|
||||
[user_regexp: "", loopback: [ip: "127.0.0.0/8"]]]
|
||||
end
|
||||
|
||||
defp access do
|
||||
[max_user_sessions: [all: 10],
|
||||
max_user_offline_messages: [admin: 5000, all: 100],
|
||||
local: [local: :allow],
|
||||
c2s: [blocked: :deny, all: :allow],
|
||||
c2s_shaper: [admin: :none, all: :normal],
|
||||
s2s_shaper: [all: :fast],
|
||||
announce: [admin: :allow],
|
||||
configure: [admin: :allow],
|
||||
muc_admin: [admin: :allow],
|
||||
muc_create: [local: :allow],
|
||||
muc: [all: :allow],
|
||||
pubsub_createnode: [local: :allow],
|
||||
register: [all: :allow],
|
||||
trusted_network: [loopback: :allow]]
|
||||
end
|
||||
|
||||
listen :ejabberd_c2s do
|
||||
@opts [
|
||||
port: 5222,
|
||||
max_stanza_size: 65536,
|
||||
shaper: :c2s_shaper,
|
||||
access: :c2s]
|
||||
end
|
||||
|
||||
listen :ejabberd_s2s_in do
|
||||
@opts [port: 5269]
|
||||
end
|
||||
|
||||
listen :ejabberd_http do
|
||||
@opts [
|
||||
port: 5280,
|
||||
web_admin: true,
|
||||
http_bind: true,
|
||||
captcha: true]
|
||||
end
|
||||
|
||||
module :mod_adhoc do
|
||||
end
|
||||
|
||||
module :mod_announce do
|
||||
@opts [access: :announce]
|
||||
end
|
||||
|
||||
module :mod_blocking do
|
||||
end
|
||||
|
||||
module :mod_caps do
|
||||
end
|
||||
|
||||
module :mod_carboncopy do
|
||||
end
|
||||
|
||||
module :mod_client_state do
|
||||
@opts [
|
||||
queue_chat_states: true,
|
||||
queue_presence: false]
|
||||
end
|
||||
|
||||
module :mod_configure do
|
||||
end
|
||||
|
||||
module :mod_disco do
|
||||
end
|
||||
|
||||
module :mod_http_bind do
|
||||
end
|
||||
|
||||
module :mod_last do
|
||||
end
|
||||
|
||||
module :mod_muc do
|
||||
@opts [
|
||||
access: :muc,
|
||||
access_create: :muc_create,
|
||||
access_persistent: :muc_create,
|
||||
access_admin: :muc_admin]
|
||||
end
|
||||
|
||||
module :mod_offline do
|
||||
@opts [access_max_user_messages: :max_user_offline_messages]
|
||||
end
|
||||
|
||||
module :mod_ping do
|
||||
end
|
||||
|
||||
module :mod_privacy do
|
||||
end
|
||||
|
||||
module :mod_private do
|
||||
end
|
||||
|
||||
module :mod_pubsub do
|
||||
@opts [
|
||||
access_createnode: :pubsub_createnode,
|
||||
ignore_pep_from_offline: true,
|
||||
last_item_cache: true,
|
||||
plugins: ["flat", "hometree", "pep"]]
|
||||
end
|
||||
|
||||
module :mod_register do
|
||||
@opts [welcome_message: [
|
||||
subject: "Welcome!",
|
||||
body: "Hi.\nWelcome to this XMPP server"
|
||||
],
|
||||
ip_access: :trusted_network,
|
||||
access: :register]
|
||||
end
|
||||
|
||||
module :mod_roster do
|
||||
end
|
||||
|
||||
module :mod_shared_roster do
|
||||
end
|
||||
|
||||
module :mod_stats do
|
||||
end
|
||||
|
||||
module :mod_time do
|
||||
end
|
||||
|
||||
module :mod_version do
|
||||
end
|
||||
|
||||
# Example of how to define a hook, called when the event
|
||||
# specified is triggered.
|
||||
#
|
||||
# @event: Name of the event
|
||||
# @opts: Params are optional. Available: :host and :priority.
|
||||
# If missing, defaults are used. (host: :global | priority: 50)
|
||||
# @callback Could be an anonymous function or a callback from a module,
|
||||
# use the &ModuleName.function/arity format for that.
|
||||
hook :register_user, [host: "localhost"], fn(user, server) ->
|
||||
info("User registered: #{user} on #{server}")
|
||||
end
|
||||
end
|
||||
@@ -1,13 +0,0 @@
|
||||
import Config
|
||||
|
||||
rootdefault = case System.get_env("RELIVE", "false") do
|
||||
"true" -> "_build/relive"
|
||||
"false" -> ""
|
||||
end
|
||||
|
||||
rootpath = System.get_env("RELEASE_ROOT", rootdefault)
|
||||
config :ejabberd,
|
||||
file: Path.join(rootpath, "conf/ejabberd.yml"),
|
||||
log_path: Path.join(rootpath, 'logs/ejabberd.log')
|
||||
config :mnesia,
|
||||
dir: Path.join(rootpath, 'database/')
|
||||
-307
@@ -1,307 +0,0 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 23.04` | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd@process-one.net], [ejabberd])
|
||||
REQUIRE_ERLANG_MIN="8.3 (Erlang/OTP 19.3)"
|
||||
REQUIRE_ERLANG_MAX="100.0.0 (No Max)"
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_SED
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
fi
|
||||
|
||||
# Checks Erlang runtime and compiler
|
||||
AC_ARG_WITH(erlang,
|
||||
AS_HELP_STRING([--with-erlang=dir],[search for erlang in dir]),
|
||||
[if test "$withval" = "yes" -o "$withval" = "no" -o "X$with_erlang" = "X"; then
|
||||
extra_erl_path=""
|
||||
else
|
||||
extra_erl_path="$with_erlang:$with_erlang/bin:"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_ARG_WITH(rebar,
|
||||
AS_HELP_STRING([--with-rebar=bin],[use the rebar/rebar3/mix binary specified]),
|
||||
[if test "$withval" = "yes" -o "$withval" = "no" -o "X$with_rebar" = "X"; then
|
||||
rebar="rebar"
|
||||
else
|
||||
rebar="$with_rebar"
|
||||
fi
|
||||
], [rebar="rebar"])
|
||||
|
||||
AC_PATH_TOOL(ERL, erl, , [${extra_erl_path}$PATH])
|
||||
AC_PATH_TOOL(ERLC, erlc, , [${extra_erl_path}$PATH])
|
||||
AC_PATH_TOOL(EPMD, epmd, , [${extra_erl_path}$PATH])
|
||||
|
||||
AC_ERLANG_NEED_ERL
|
||||
AC_ERLANG_NEED_ERLC
|
||||
|
||||
# Checks and sets ERLANG_ROOT_DIR and ERLANG_LIB_DIR variable
|
||||
AC_ERLANG_SUBST_ROOT_DIR
|
||||
# AC_ERLANG_SUBST_LIB_DIR
|
||||
|
||||
#locating escript
|
||||
AC_PATH_PROG([ESCRIPT], [escript], [], [$ERLANG_ROOT_DIR/bin])
|
||||
|
||||
#locating make
|
||||
AC_CHECK_PROG([MAKE], [make], [make], [])
|
||||
|
||||
if test "x$ESCRIPT" = "x"; then
|
||||
AC_MSG_ERROR(['escript' was not found])
|
||||
fi
|
||||
|
||||
if test "x$MAKE" = "x"; then
|
||||
AC_MSG_ERROR(['make' was not found])
|
||||
fi
|
||||
|
||||
# Change default prefix
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
vars.config])
|
||||
|
||||
AC_ARG_ENABLE(all,
|
||||
[AS_HELP_STRING([--enable-all],[same as --enable-odbc --enable-mssql --enable-mysql --enable-pgsql --enable-sqlite --enable-pam --enable-zlib --enable-redis --enable-elixir --enable-stun --enable-sip --enable-debug --enable-lua --enable-tools (useful for Dialyzer checks, default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) odbc=true mssql=true mysql=true pgsql=true sqlite=true pam=true zlib=true redis=true elixir=true stun=true sip=true debug=true lua=true tools=true ;;
|
||||
no) odbc=false mssql=false mysql=false pgsql=false sqlite=false pam=false zlib=false redis=false elixir=false stun=false sip=false debug=false lua=false tools=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-all) ;;
|
||||
esac],[])
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[AS_HELP_STRING([--enable-debug],[enable debug information (default: yes)])],
|
||||
[case "${enableval}" in
|
||||
yes) debug=true ;;
|
||||
no) debug=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
||||
esac],[if test "x$debug" = "x"; then debug=true; fi])
|
||||
|
||||
AC_ARG_ENABLE(elixir,
|
||||
[AS_HELP_STRING([--enable-elixir],[enable Elixir support (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) elixir=true ;;
|
||||
no) elixir=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-elixir) ;;
|
||||
esac],[if test "x$elixir" = "x"; then elixir=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(erlang-version-check,
|
||||
[AS_HELP_STRING([--enable-erlang-version-check],[Check Erlang/OTP version (default: yes)])])
|
||||
case "$enable_erlang_version_check" in
|
||||
yes|'')
|
||||
ERLANG_VERSION_CHECK([$REQUIRE_ERLANG_MIN],[$REQUIRE_ERLANG_MAX])
|
||||
;;
|
||||
no)
|
||||
ERLANG_VERSION_CHECK([$REQUIRE_ERLANG_MIN],[$REQUIRE_ERLANG_MAX],[warn])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(full_xml,
|
||||
[AS_HELP_STRING([--enable-full-xml],[use XML features in XMPP stream (ex: CDATA) (default: no, requires XML compliant clients)])],
|
||||
[case "${enableval}" in
|
||||
yes) full_xml=true ;;
|
||||
no) full_xml=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-full-xml) ;;
|
||||
esac],[full_xml=false])
|
||||
|
||||
ENABLEGROUP=""
|
||||
AC_ARG_ENABLE(group,
|
||||
[AS_HELP_STRING([--enable-group[[[[=GROUP]]]]], [allow this system group to start ejabberd (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) ENABLEGROUP=`groups |head -n 1` ;;
|
||||
no) ENABLEGROUP="" ;;
|
||||
*) ENABLEGROUP=$enableval
|
||||
esac],
|
||||
[])
|
||||
if test "$ENABLEGROUP" != ""; then
|
||||
echo "allow this system group to start ejabberd: $ENABLEGROUP"
|
||||
AC_SUBST([INSTALLGROUP], [$ENABLEGROUP])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(latest_deps,
|
||||
[AS_HELP_STRING([--enable-latest-deps],[makes rebar use latest commits for dependencies instead of tagged versions (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) latest_deps=true ;;
|
||||
no) latest_deps=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-latest-deps) ;;
|
||||
esac],[if test "x$latest_deps" = "x"; then latest_deps=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(lua,
|
||||
[AS_HELP_STRING([--enable-lua],[enable Lua support, to import from Prosody (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) lua=true ;;
|
||||
no) lua=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-lua) ;;
|
||||
esac],[if test "x$lua" = "x"; then lua=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(mssql,
|
||||
[AS_HELP_STRING([--enable-mssql],[use Microsoft SQL Server database (default: no, requires --enable-odbc)])],
|
||||
[case "${enableval}" in
|
||||
yes) mssql=true ;;
|
||||
no) mssql=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mssql) ;;
|
||||
esac],[if test "x$mssql" = "x"; then mssql=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(mysql,
|
||||
[AS_HELP_STRING([--enable-mysql],[enable MySQL support (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) mysql=true ;;
|
||||
no) mysql=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mysql) ;;
|
||||
esac],[if test "x$mysql" = "x"; then mysql=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(new_sql_schema,
|
||||
[AS_HELP_STRING([--enable-new-sql-schema],[use new SQL schema by default (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) new_sql_schema=true ;;
|
||||
no) new_sql_schema=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-new-sql-schema) ;;
|
||||
esac],[new_sql_schema=false])
|
||||
|
||||
AC_ARG_ENABLE(odbc,
|
||||
[AS_HELP_STRING([--enable-odbc],[enable pure ODBC support (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) odbc=true ;;
|
||||
no) odbc=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-odbc) ;;
|
||||
esac],[if test "x$odbc" = "x"; then odbc=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(pam,
|
||||
[AS_HELP_STRING([--enable-pam],[enable PAM support (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) pam=true ;;
|
||||
no) pam=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pam) ;;
|
||||
esac],[if test "x$pam" = "x"; then pam=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(pgsql,
|
||||
[AS_HELP_STRING([--enable-pgsql],[enable PostgreSQL support (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) pgsql=true ;;
|
||||
no) pgsql=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pgsql) ;;
|
||||
esac],[if test "x$pgsql" = "x"; then pgsql=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(redis,
|
||||
[AS_HELP_STRING([--enable-redis],[enable Redis support (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) redis=true ;;
|
||||
no) redis=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-redis) ;;
|
||||
esac],[if test "x$redis" = "x"; then redis=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(roster_gateway_workaround,
|
||||
[AS_HELP_STRING([--enable-roster-gateway-workaround],[turn on workaround for processing gateway subscriptions (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) roster_gateway_workaround=true ;;
|
||||
no) roster_gateway_workaround=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-roster-gateway-workaround) ;;
|
||||
esac],[roster_gateway_workaround=false])
|
||||
|
||||
AC_ARG_ENABLE(sip,
|
||||
[AS_HELP_STRING([--enable-sip],[enable SIP support (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) sip=true ;;
|
||||
no) sip=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-sip) ;;
|
||||
esac],[if test "x$sip" = "x"; then sip=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(sqlite,
|
||||
[AS_HELP_STRING([--enable-sqlite],[enable SQLite support (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) sqlite=true ;;
|
||||
no) sqlite=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-sqlite) ;;
|
||||
esac],[if test "x$sqlite" = "x"; then sqlite=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(stun,
|
||||
[AS_HELP_STRING([--enable-stun],[enable STUN/TURN support (default: yes)])],
|
||||
[case "${enableval}" in
|
||||
yes) stun=true ;;
|
||||
no) stun=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-stun) ;;
|
||||
esac],[if test "x$stun" = "x"; then stun=true; fi])
|
||||
|
||||
AC_ARG_ENABLE(system_deps,
|
||||
[AS_HELP_STRING([--enable-system-deps],[makes rebar use locally installed dependencies instead of downloading them (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) system_deps=true ;;
|
||||
no) system_deps=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-system-deps) ;;
|
||||
esac],[if test "x$system_deps" = "x"; then system_deps=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(tools,
|
||||
[AS_HELP_STRING([--enable-tools],[build development tools (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) tools=true ;;
|
||||
no) tools=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;;
|
||||
esac],[if test "x$tools" = "x"; then tools=false; fi])
|
||||
|
||||
ENABLEUSER=""
|
||||
AC_ARG_ENABLE(user,
|
||||
[AS_HELP_STRING([--enable-user[[[[=USER]]]]], [allow this system user to start ejabberd (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) ENABLEUSER=`whoami` ;;
|
||||
no) ENABLEUSER="" ;;
|
||||
*) ENABLEUSER=$enableval
|
||||
esac],
|
||||
[])
|
||||
if test "$ENABLEUSER" != ""; then
|
||||
echo "allow this system user to start ejabberd: $ENABLEUSER"
|
||||
AC_SUBST([INSTALLUSER], [$ENABLEUSER])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(zlib,
|
||||
[AS_HELP_STRING([--enable-zlib],[enable Stream Compression (XEP-0138) using zlib (default: yes)])],
|
||||
[case "${enableval}" in
|
||||
yes) zlib=true ;;
|
||||
no) zlib=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-zlib) ;;
|
||||
esac],[if test "x$zlib" = "x"; then zlib=true; fi])
|
||||
|
||||
case "`uname`" in
|
||||
"Darwin")
|
||||
# Darwin (macos) erlang-sqlite is built using amalgamated lib, so no external dependency
|
||||
;;
|
||||
*)
|
||||
if test "$sqlite" = "true"; then
|
||||
AX_LIB_SQLITE3([3.6.19])
|
||||
if test "x$SQLITE3_VERSION" = "x"; then
|
||||
AC_MSG_ERROR(SQLite3 library >= 3.6.19 was not found)
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(roster_gateway_workaround)
|
||||
AC_SUBST(new_sql_schema)
|
||||
AC_SUBST(full_xml)
|
||||
AC_SUBST(odbc)
|
||||
AC_SUBST(mssql)
|
||||
AC_SUBST(mysql)
|
||||
AC_SUBST(pgsql)
|
||||
AC_SUBST(sqlite)
|
||||
AC_SUBST(pam)
|
||||
AC_SUBST(zlib)
|
||||
AC_SUBST(rebar)
|
||||
AC_SUBST(redis)
|
||||
AC_SUBST(elixir)
|
||||
AC_SUBST(stun)
|
||||
AC_SUBST(sip)
|
||||
AC_SUBST(debug)
|
||||
AC_SUBST(lua)
|
||||
AC_SUBST(tools)
|
||||
AC_SUBST(latest_deps)
|
||||
AC_SUBST(system_deps)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CPPFLAGS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,5 @@
|
||||
% List of ejabberd-modules to add for ejabberd packaging (source archive and installer)
|
||||
%
|
||||
% HTTP-binding:
|
||||
https://svn.process-one.net/ejabberd-modules/http_bind/trunk
|
||||
https://svn.process-one.net/ejabberd-modules/mod_http_fileserver/trunk
|
||||
@@ -0,0 +1,21 @@
|
||||
extract_translations - auxiliary tool that extracts lines to be translated
|
||||
from ejabberd source tree.
|
||||
|
||||
Building:
|
||||
erlc extract_translations.erl
|
||||
|
||||
Invoking 1:
|
||||
erl -noinput -s extract_translations -extra dirname message_file
|
||||
|
||||
where dirname is the directory "src" in ejabberd's source tree root,
|
||||
message_file is a file with translated messages (src/msgs/*.msg).
|
||||
|
||||
Result is a list of messages from source files which aren't contained in
|
||||
message file.
|
||||
|
||||
Invoking 2:
|
||||
erl -noinput -s extract_translations -extra -unused dirname message_file
|
||||
|
||||
Result is a list of messages from message file which aren't in source
|
||||
files anymore.
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
%%%----------------------------------------------------------------------
|
||||
%%% File : extract_translations.erl
|
||||
%%% Author : Sergei Golovan <sgolovan@nes.ru>
|
||||
%%% Purpose : Auxiliary tool for interface/messages translators
|
||||
%%% Created : 23 Apr 2005 by Sergei Golovan <sgolovan@nes.ru>
|
||||
%%% Id : $Id$
|
||||
%%%----------------------------------------------------------------------
|
||||
|
||||
-module(extract_translations).
|
||||
-author('sgolovan@nes.ru').
|
||||
|
||||
-export([start/0]).
|
||||
|
||||
-define(STATUS_SUCCESS, 0).
|
||||
-define(STATUS_ERROR, 1).
|
||||
-define(STATUS_USAGE, 2).
|
||||
|
||||
-include_lib("kernel/include/file.hrl").
|
||||
|
||||
|
||||
start() ->
|
||||
ets:new(translations, [named_table, public]),
|
||||
ets:new(files, [named_table, public]),
|
||||
ets:new(vars, [named_table, public]),
|
||||
case init:get_plain_arguments() of
|
||||
["-unused", Dir, File] ->
|
||||
Status = process(Dir, File, unused),
|
||||
halt(Status);
|
||||
[Dir, File] ->
|
||||
Status = process(Dir, File, used),
|
||||
halt(Status);
|
||||
_ ->
|
||||
print_usage(),
|
||||
halt(?STATUS_USAGE)
|
||||
end.
|
||||
|
||||
|
||||
process(Dir, File, Used) ->
|
||||
case load_file(File) of
|
||||
{error, Reason} ->
|
||||
io:format("~s: ~s~n", [File, file:format_error(Reason)]),
|
||||
?STATUS_ERROR;
|
||||
_ ->
|
||||
FileList = find_src_files(Dir),
|
||||
lists:foreach(
|
||||
fun(F) ->
|
||||
parse_file(Dir, F, Used)
|
||||
end, FileList),
|
||||
case Used of
|
||||
unused ->
|
||||
ets:foldl(fun({Key, _}, _) ->
|
||||
io:format("~p~n", [Key])
|
||||
end, ok, translations);
|
||||
_ ->
|
||||
ok
|
||||
end,
|
||||
?STATUS_SUCCESS
|
||||
end.
|
||||
|
||||
parse_file(Dir, File, Used) ->
|
||||
ets:delete_all_objects(vars),
|
||||
case epp:parse_file(File, [Dir, filename:dirname(File)], []) of
|
||||
{ok, Forms} ->
|
||||
lists:foreach(
|
||||
fun(F) ->
|
||||
parse_form(Dir, File, F, Used)
|
||||
end, Forms);
|
||||
_ ->
|
||||
ok
|
||||
end.
|
||||
|
||||
parse_form(Dir, File, Form, Used) ->
|
||||
case Form of
|
||||
{call,
|
||||
_,
|
||||
{remote, _, {atom, _, translate}, {atom, _, translate}},
|
||||
[_, {string, _, Str}]
|
||||
} ->
|
||||
process_string(Dir, File, Str, Used);
|
||||
{call,
|
||||
_,
|
||||
{remote, _, {atom, _, translate}, {atom, _, translate}},
|
||||
[_, {var, _, Name}]
|
||||
} ->
|
||||
case ets:lookup(vars, Name) of
|
||||
[{_Name, Value}] ->
|
||||
process_string(Dir, File, Value, Used);
|
||||
_ ->
|
||||
ok
|
||||
end;
|
||||
{match,
|
||||
_,
|
||||
{var, _, Name},
|
||||
{string, _, Value}
|
||||
} ->
|
||||
ets:insert(vars, {Name, Value});
|
||||
L when is_list(L) ->
|
||||
lists:foreach(
|
||||
fun(F) ->
|
||||
parse_form(Dir, File, F, Used)
|
||||
end, L);
|
||||
T when is_tuple(T) ->
|
||||
lists:foreach(
|
||||
fun(F) ->
|
||||
parse_form(Dir, File, F, Used)
|
||||
end, tuple_to_list(T));
|
||||
_ ->
|
||||
ok
|
||||
end.
|
||||
|
||||
process_string(_Dir, File, Str, Used) ->
|
||||
case {ets:lookup(translations, Str), Used} of
|
||||
{[{_Key, _Trans}], unused} ->
|
||||
ets:delete(translations, Str);
|
||||
{[{_Key, _Trans}], used} ->
|
||||
ok;
|
||||
{_, used} ->
|
||||
case ets:lookup(files, File) of
|
||||
[{_}] ->
|
||||
ok;
|
||||
_ ->
|
||||
io:format("~n% ~s~n", [File]),
|
||||
ets:insert(files, {File})
|
||||
end,
|
||||
case Str of
|
||||
[] -> ok;
|
||||
_ -> io:format("{~p, \"\"}.~n", [Str])
|
||||
end,
|
||||
ets:insert(translations, {Str, ""});
|
||||
_ ->
|
||||
ok
|
||||
end.
|
||||
|
||||
load_file(File) ->
|
||||
case file:consult(File) of
|
||||
{ok, Terms} ->
|
||||
lists:foreach(
|
||||
fun({Orig, Trans}) ->
|
||||
case Trans of
|
||||
"" ->
|
||||
ok;
|
||||
_ ->
|
||||
ets:insert(translations, {Orig, Trans})
|
||||
end
|
||||
end, Terms);
|
||||
Err ->
|
||||
Err
|
||||
end.
|
||||
|
||||
find_src_files(Dir) ->
|
||||
case file:list_dir(Dir) of
|
||||
{ok, FileList} ->
|
||||
recurse_filelist(
|
||||
lists:map(
|
||||
fun(F) ->
|
||||
filename:join(Dir, F)
|
||||
end, FileList));
|
||||
_ ->
|
||||
[]
|
||||
end.
|
||||
|
||||
recurse_filelist(FileList) ->
|
||||
recurse_filelist(FileList, []).
|
||||
|
||||
recurse_filelist([], Acc) ->
|
||||
lists:reverse(Acc);
|
||||
|
||||
recurse_filelist([H | T], Acc) ->
|
||||
case file:read_file_info(H) of
|
||||
{ok, #file_info{type = directory}} ->
|
||||
recurse_filelist(T, lists:reverse(find_src_files(H)) ++ Acc);
|
||||
{ok, #file_info{type = regular}} ->
|
||||
case string:substr(H, string:len(H) - 3) of
|
||||
".erl" ->
|
||||
recurse_filelist(T, [H | Acc]);
|
||||
".hrl" ->
|
||||
recurse_filelist(T, [H | Acc]);
|
||||
_ ->
|
||||
recurse_filelist(T, Acc)
|
||||
end;
|
||||
_ ->
|
||||
recurse_filelist(T, Acc)
|
||||
end.
|
||||
|
||||
|
||||
print_usage() ->
|
||||
io:format(
|
||||
"Usage: extract_translations [-unused] dir file~n"
|
||||
"~n"
|
||||
"Example:~n"
|
||||
" extract_translations . ./msgs/ru.msg~n"
|
||||
).
|
||||
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Frontend for ejabberd's extract_translations.erl
|
||||
# by Badlop
|
||||
|
||||
prepare_dirs ()
|
||||
{
|
||||
# Where is Erlang binary
|
||||
ERL=`which erl`
|
||||
|
||||
EJA_DIR=`pwd`/../..
|
||||
EXTRACT_DIR=$EJA_DIR/contrib/extract_translations/
|
||||
EXTRACT_ERL=extract_translations.erl
|
||||
EXTRACT_BEAM=extract_translations.beam
|
||||
SRC_DIR=$EJA_DIR/src
|
||||
MSGS_DIR=$SRC_DIR/msgs
|
||||
|
||||
if !([[ -n $EJA_DIR ]])
|
||||
then
|
||||
echo "ejabberd dir does not exist: $EJA_DIR"
|
||||
fi
|
||||
|
||||
if !([[ -x $EXTRACT_BEAM ]])
|
||||
then
|
||||
echo -n "Compiling extract_translations.erl: "
|
||||
sh -c "cd $EXTRACT_DIR; $ERL -compile $EXTRACT_ERL"
|
||||
echo "ok"
|
||||
fi
|
||||
}
|
||||
|
||||
extract_lang ()
|
||||
{
|
||||
MSGS_FILE=$1
|
||||
MSGS_FILE2=$MSGS_FILE.translate
|
||||
MSGS_PATH=$MSGS_DIR/$MSGS_FILE
|
||||
MSGS_PATH2=$MSGS_DIR/$MSGS_FILE2
|
||||
|
||||
echo -n "Extracting language strings for '$MSGS_FILE':"
|
||||
|
||||
echo -n " new..."
|
||||
cd $SRC_DIR
|
||||
$ERL -pa $EXTRACT_DIR -noinput -noshell -s extract_translations -s init stop -extra . $MSGS_PATH >$MSGS_PATH.new
|
||||
sed -e 's/^% \.\//% /g;' $MSGS_PATH.new > $MSGS_PATH.new2
|
||||
mv $MSGS_PATH.new2 $MSGS_PATH.new
|
||||
|
||||
echo -n " old..."
|
||||
$ERL -pa $EXTRACT_DIR -noinput -noshell -s extract_translations -s init stop -extra -unused . $MSGS_PATH >$MSGS_PATH.unused
|
||||
find_unused_full $MSGS_FILE $MSGS_FILE.unused
|
||||
|
||||
echo "" >$MSGS_PATH2
|
||||
echo " ***** Translation file for ejabberd ***** " >>$MSGS_PATH2
|
||||
echo "" >>$MSGS_PATH2
|
||||
|
||||
echo "" >>$MSGS_PATH2
|
||||
echo " *** New strings: Can you please translate them? *** " >>$MSGS_PATH2
|
||||
cat $MSGS_PATH.new >>$MSGS_PATH2
|
||||
|
||||
echo "" >>$MSGS_PATH2
|
||||
echo "" >>$MSGS_PATH2
|
||||
echo " *** Unused strings: They will be removed automatically *** " >>$MSGS_PATH2
|
||||
cat $MSGS_PATH.unused.full >>$MSGS_PATH2
|
||||
|
||||
echo "" >>$MSGS_PATH2
|
||||
echo "" >>$MSGS_PATH2
|
||||
echo " *** Already translated strings: you can also modify any of them if you want *** " >>$MSGS_PATH2
|
||||
echo "" >>$MSGS_PATH2
|
||||
cat $MSGS_PATH.old_cleaned >>$MSGS_PATH2
|
||||
|
||||
echo " ok"
|
||||
|
||||
rm $MSGS_PATH.new
|
||||
rm $MSGS_PATH.old_cleaned
|
||||
rm $MSGS_PATH.unused.full
|
||||
}
|
||||
|
||||
extract_lang_all ()
|
||||
{
|
||||
cd $MSGS_DIR
|
||||
for i in *.msg; do
|
||||
extract_lang $i;
|
||||
done
|
||||
|
||||
echo -e "File\tMissing\tLanguage\t\tLast translator"
|
||||
echo -e "----\t-------\t--------\t\t---------------"
|
||||
cd $MSGS_DIR
|
||||
for i in *.msg; do
|
||||
MISSING=`cat $i.translate | grep "\", \"\"}." | wc -l`
|
||||
LANGUAGE=`grep "Language:" $i.translate | sed 's/% Language: //g'`
|
||||
LASTAUTH=`grep "Author:" $i.translate | head -n 1 | sed 's/% Author: //g'`
|
||||
echo -e "$i\t$MISSING\t$LANGUAGE\t$LASTAUTH"
|
||||
done
|
||||
|
||||
cd $MSGS_DIR
|
||||
REVISION=`svn info | grep "^Rev" | head -1 | awk '{print $2}'`
|
||||
zip $HOME/ejabberd-langs-$REVISION.zip *.translate;
|
||||
|
||||
rm *.translate
|
||||
}
|
||||
|
||||
find_unused_full ()
|
||||
{
|
||||
DATFILE=$1
|
||||
DATFILEI=$1.old_cleaned
|
||||
DELFILE=$2
|
||||
cd msgs
|
||||
|
||||
DATFILE1=$DATFILE.t1
|
||||
DATFILE2=$DATFILE.t2
|
||||
|
||||
DELFILE1=$DELFILE.t1
|
||||
DELFILE2=$DELFILE.t2
|
||||
DELFILEF=$DATFILE.unused.full
|
||||
echo "" >$DELFILEF
|
||||
|
||||
grep -v "\\\\" $DELFILE >$DELFILE2
|
||||
echo ENDFILEMARK >>$DELFILE2
|
||||
cp $DATFILE $DATFILEI
|
||||
cp $DATFILE $DATFILE2
|
||||
|
||||
cp $DELFILE2 $DELFILE1
|
||||
STRING=`head -1 $DELFILE1`
|
||||
until [[ $STRING == ENDFILEMARK ]]; do
|
||||
cp $DELFILE2 $DELFILE1
|
||||
cp $DATFILE2 $DATFILE1
|
||||
|
||||
STRING=`head -1 $DELFILE1`
|
||||
|
||||
cat $DATFILE1 | grep "$STRING" >>$DELFILEF
|
||||
cat $DATFILE1 | grep -v "$STRING" >$DATFILE2
|
||||
cat $DELFILE1 | grep -v "$STRING" >$DELFILE2
|
||||
done
|
||||
|
||||
mv $DATFILE2 $DATFILEI
|
||||
|
||||
rm -f $MSGS_PATH.t1
|
||||
rm $MSGS_PATH.unused
|
||||
rm -f $MSGS_PATH.unused.t1
|
||||
rm $MSGS_PATH.unused.t2
|
||||
|
||||
cd ..
|
||||
}
|
||||
|
||||
translation_instructions ()
|
||||
{
|
||||
echo ""
|
||||
echo " A new file has been created for you, with the current, the new and the deprecated strings:"
|
||||
echo " $MSGS_PATH2"
|
||||
echo ""
|
||||
echo " At the end of that file you will find the strings you must update:"
|
||||
echo " - Untranslated strings are like this: {"March", ""}."
|
||||
echo " To translate the string, add the text inside the commas. Example:"
|
||||
echo " {"March", "Marzo"}."
|
||||
echo " - Old strings that are not used: "Woowoa""
|
||||
echo " Search the entire file for those strings and remove them"
|
||||
echo ""
|
||||
echo " Once you have translated all the strings and removed all the old ones,"
|
||||
echo " rename the file to overwrite the previous one:"
|
||||
echo " $MSGS_PATH"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
-help)
|
||||
echo "Options:"
|
||||
echo " -langall"
|
||||
echo " -lang LANGUAGE_FILE"
|
||||
echo ""
|
||||
echo "Example:"
|
||||
echo " ./prepare-translation.sh -lang es.msg"
|
||||
exit 0
|
||||
;;
|
||||
-lang)
|
||||
LANGU=$2
|
||||
prepare_dirs
|
||||
extract_lang $LANGU
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-langall)
|
||||
prepare_dirs
|
||||
extract_lang_all
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "unknown option: '$1 $2'"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo "End."
|
||||
@@ -1,5 +0,0 @@
|
||||
{level, details}.
|
||||
{incl_dirs, ["src", "ebin"]}.
|
||||
{excl_mods, [eldap, 'ELDAPv3']}.
|
||||
{export, "logs/all.coverdata"}.
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# $Id$
|
||||
|
||||
SHELL = /bin/bash
|
||||
|
||||
CONTRIBUTED_MODULES = ""
|
||||
ifeq ($(shell ls mod_http_bind.tex),mod_http_bind.tex)
|
||||
CONTRIBUTED_MODULES += "\\n\\setboolean{modhttpbind}{true}"
|
||||
endif
|
||||
ifeq ($(shell ls mod_http_fileserver.tex),mod_http_fileserver.tex)
|
||||
CONTRIBUTED_MODULES += "\\n\\setboolean{modhttpfileserver}{true}"
|
||||
endif
|
||||
|
||||
|
||||
all: release pdf html
|
||||
|
||||
release:
|
||||
@echo "Notes for the releaser:"
|
||||
@echo "* Do not forget to add a link to the release notes in guide.tex"
|
||||
@echo "* Do not forget to update the version number in src/ejabberd.hrl!"
|
||||
@echo "* Do not forget to update the features in introduction.tex (including \new{} and \improved{} tags)."
|
||||
@echo "Press any key to continue"
|
||||
@read foo
|
||||
@echo "% ejabberd version (automatically generated)." > version.tex
|
||||
@echo "\newcommand{\version}{"`sed '/vsn/!d;s/\(.*\)"\(.*\)"\(.*\)/\2/' ../src/ejabberd.app`"}" >> version.tex
|
||||
@echo -n "% Contributed modules (automatically generated)." > contributed_modules.tex
|
||||
@echo -e "$(CONTRIBUTED_MODULES)" >> contributed_modules.tex
|
||||
|
||||
html: guide.html dev.html features.html
|
||||
|
||||
pdf: guide.pdf features.pdf
|
||||
|
||||
clean:
|
||||
rm -f *.aux
|
||||
rm -f *.haux
|
||||
rm -f *.html
|
||||
rm -f *.htoc
|
||||
rm -f *.idx
|
||||
rm -f *.ilg
|
||||
rm -f *.ind
|
||||
rm -f *.log
|
||||
rm -f *.out
|
||||
rm -f *.pdf
|
||||
rm -f *.toc
|
||||
|
||||
guide.html: guide.tex
|
||||
hevea -fix -pedantic guide.tex
|
||||
|
||||
dev.html: dev.tex
|
||||
hevea -fix -pedantic dev.tex
|
||||
|
||||
features.html: features.tex
|
||||
hevea -fix -pedantic features.tex
|
||||
|
||||
guide.pdf: guide.tex
|
||||
pdflatex guide.tex
|
||||
pdflatex guide.tex
|
||||
pdflatex guide.tex
|
||||
makeindex guide.idx
|
||||
pdflatex guide.tex
|
||||
|
||||
features.pdf: features.tex
|
||||
pdflatex features.tex
|
||||
@@ -0,0 +1,17 @@
|
||||
APPNAME = ejabberd
|
||||
VSN = $(shell sed '/vsn/!d;s/\(.*\)"\(.*\)"\(.*\)/\2/' ../../src/ejabberd.app)
|
||||
|
||||
DOCDIR=.
|
||||
SRCDIR=../../src
|
||||
|
||||
.PHONY = all
|
||||
|
||||
all: docs
|
||||
|
||||
clean:
|
||||
rm -f *.html
|
||||
rm edoc-info
|
||||
|
||||
docs:
|
||||
erl -noshell -run edoc_run application \
|
||||
"'$(APPNAME)'" '"$(SRCDIR)"' '[{dir,"$(DOCDIR)"},{packages, false},{todo,true},{private,true},{def,{vsn,"$(VSN)"}},{stylesheet,"process-one.css"},{overview,"$(DOCDIR)/overview.edoc"}]' -s init stop
|
||||
@@ -0,0 +1,10 @@
|
||||
@author Mickael Remond <mickael.remond@process-one.net>
|
||||
[http://www.process-one.net/]
|
||||
@copyright 2007 ProcessOne
|
||||
@version {@vsn}, {@date} {@time}
|
||||
@title ejabberd Development API Documentation
|
||||
|
||||
@doc
|
||||
== Introduction ==
|
||||
|
||||
TODO: Insert content from Jerome documentation.
|
||||
@@ -0,0 +1,80 @@
|
||||
html, body {
|
||||
font-family: Verdana, sans-serif;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #4a5389;
|
||||
border-bottom: solid 1px #000;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
text-align: right;
|
||||
color: #4a5389;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 18px;
|
||||
color: #900;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
a[href] {
|
||||
color: #4a5389;
|
||||
}
|
||||
|
||||
a[href]:hover {
|
||||
background-color: #ecefff;
|
||||
}
|
||||
|
||||
p, li, dd {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-top: 0.3em;
|
||||
}
|
||||
|
||||
li:first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
caption {
|
||||
font-style: italic;
|
||||
color: #009;
|
||||
text-align: left;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
table[border="1"] {
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
table[border="1"] td {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
pre, tt, code {
|
||||
color: #461b7e;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
pre em {
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
}
|
||||
+410
@@ -0,0 +1,410 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Ejabberd 2.0.x Developers Guide
|
||||
</TITLE>
|
||||
|
||||
<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<META name="GENERATOR" content="hevea 1.10">
|
||||
<STYLE type="text/css">
|
||||
.li-itemize{margin:1ex 0ex;}
|
||||
.li-enumerate{margin:1ex 0ex;}
|
||||
.dd-description{margin:0ex 0ex 1ex 4ex;}
|
||||
.dt-description{margin:0ex;}
|
||||
.toc{list-style:none;}
|
||||
.thefootnotes{text-align:left;margin:0ex;}
|
||||
.dt-thefootnotes{margin:0em;}
|
||||
.dd-thefootnotes{margin:0em 0em 0em 2em;}
|
||||
.footnoterule{margin:1em auto 1em 0px;width:50%;}
|
||||
.caption{padding-left:2ex; padding-right:2ex; margin-left:auto; margin-right:auto}
|
||||
.title{margin:2ex auto;text-align:center}
|
||||
.center{text-align:center;margin-left:auto;margin-right:auto;}
|
||||
.flushleft{text-align:left;margin-left:0ex;margin-right:auto;}
|
||||
.flushright{text-align:right;margin-left:auto;margin-right:0ex;}
|
||||
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;}
|
||||
TD P{margin:0px;}
|
||||
.boxed{border:1px solid black}
|
||||
.textboxed{border:1px solid black}
|
||||
.vbar{border:none;width:2px;background-color:black;}
|
||||
.hbar{border:none;height:2px;width:100%;background-color:black;}
|
||||
.hfill{border:none;height:1px;width:200%;background-color:black;}
|
||||
.vdisplay{border-collapse:separate;border-spacing:2px;width:auto; empty-cells:show; border:2px solid red;}
|
||||
.vdcell{white-space:nowrap;padding:0px;width:auto; border:2px solid green;}
|
||||
.display{border-collapse:separate;border-spacing:2px;width:auto; border:none;}
|
||||
.dcell{white-space:nowrap;padding:0px;width:auto; border:none;}
|
||||
.dcenter{margin:0ex auto;}
|
||||
.vdcenter{border:solid #FF8000 2px; margin:0ex auto;}
|
||||
.minipage{text-align:left; margin-left:0em; margin-right:auto;}
|
||||
.marginpar{border:solid thin black; width:20%; text-align:left;}
|
||||
.marginparleft{float:left; margin-left:0ex; margin-right:1ex;}
|
||||
.marginparright{float:right; margin-left:1ex; margin-right:0ex;}
|
||||
.theorem{text-align:left;margin:1ex auto 1ex 0ex;}
|
||||
.part{margin:2ex auto;text-align:center}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY >
|
||||
<!--HEVEA command line is: /usr/bin/hevea -fix -pedantic dev.tex -->
|
||||
<!--CUT DEF section 1 --><P><A NAME="titlepage"></A>
|
||||
|
||||
</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.0.x Developers Guide</H1><H3 CLASS="titlerest">Alexey Shchepin<BR>
|
||||
<A HREF="mailto:alexey@sevcom.net"><TT>mailto:alexey@sevcom.net</TT></A><BR>
|
||||
<A HREF="xmpp:aleksey@jabber.ru"><TT>xmpp:aleksey@jabber.ru</TT></A></H3></TD></TR>
|
||||
</TABLE><DIV CLASS="center">
|
||||
|
||||
<IMG SRC="logo.png" ALT="logo.png">
|
||||
|
||||
|
||||
</DIV><BLOCKQUOTE CLASS="quotation"><I>I can thoroughly recommend ejabberd for ease of setup –
|
||||
Kevin Smith, Current maintainer of the Psi project</I></BLOCKQUOTE><!--TOC section Contents-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR -->Contents</H2><!--SEC END --><UL CLASS="toc"><LI CLASS="li-toc">
|
||||
<A HREF="#htoc1">1  Key Features</A>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc2">2  Additional Features</A>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc3">3  How it Works</A>
|
||||
<UL CLASS="toc"><LI CLASS="li-toc">
|
||||
<A HREF="#htoc4">3.1  Router</A>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc5">3.2  Local Router</A>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc6">3.3  Session Manager</A>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc7">3.4  S2S Manager</A>
|
||||
</LI></UL>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc8">4  Authentication</A>
|
||||
<UL CLASS="toc">
|
||||
<UL CLASS="toc"><LI CLASS="li-toc">
|
||||
<A HREF="#htoc9">4.0.1  External</A>
|
||||
</LI></UL>
|
||||
</UL>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc10">5  XML Representation</A>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc11">6  Module <TT>xml</TT></A>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc12">7  Module <TT>xml_stream</TT></A>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc13">8  Modules</A>
|
||||
<UL CLASS="toc"><LI CLASS="li-toc">
|
||||
<A HREF="#htoc14">8.1  Module gen_iq_handler</A>
|
||||
</LI><LI CLASS="li-toc"><A HREF="#htoc15">8.2  Services</A>
|
||||
</LI></UL>
|
||||
</LI></UL><P>Introduction
|
||||
<A NAME="intro"></A></P><P><TT>ejabberd</TT> is a free and open source instant messaging server written in <A HREF="http://www.erlang.org/">Erlang</A>.</P><P><TT>ejabberd</TT> is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication.</P><P><TT>ejabberd</TT> is designed to be a rock-solid and feature rich XMPP server.</P><P><TT>ejabberd</TT> is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments.</P><!--TOC section Key Features-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc1">1</A>  Key Features</H2><!--SEC END --><P>
|
||||
<A NAME="keyfeatures"></A>
|
||||
</P><P><TT>ejabberd</TT> is:
|
||||
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Cross-platform: <TT>ejabberd</TT> runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.</LI><LI CLASS="li-itemize">Distributed: You can run <TT>ejabberd</TT> on a cluster of machines and all of them will serve the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users.</LI><LI CLASS="li-itemize">Fault-tolerant: You can deploy an <TT>ejabberd</TT> cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes also can be added or replaced ‘on the fly’.</LI><LI CLASS="li-itemize">Administrator Friendly: <TT>ejabberd</TT> is built on top of the Open Source Erlang. As a result you do not need to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include:
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Comprehensive documentation.
|
||||
</LI><LI CLASS="li-itemize">Straightforward installers for Linux, Mac OS X, and Windows. </LI><LI CLASS="li-itemize">Web Administration.
|
||||
</LI><LI CLASS="li-itemize">Shared Roster Groups.
|
||||
</LI><LI CLASS="li-itemize">Command line administration tool. </LI><LI CLASS="li-itemize">Can integrate with existing authentication mechanisms.
|
||||
</LI><LI CLASS="li-itemize">Capability to send announce messages.
|
||||
</LI></UL></LI><LI CLASS="li-itemize">Internationalized: <TT>ejabberd</TT> leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Translated to 24 languages. </LI><LI CLASS="li-itemize">Support for <A HREF="http://www.ietf.org/rfc/rfc3490.txt">IDNA</A>.
|
||||
</LI></UL></LI><LI CLASS="li-itemize">Open Standards: <TT>ejabberd</TT> is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Fully XMPP compliant.
|
||||
</LI><LI CLASS="li-itemize">XML-based protocol.
|
||||
</LI><LI CLASS="li-itemize"><A HREF="http://www.ejabberd.im/protocols">Many protocols supported</A>.
|
||||
</LI></UL></LI></UL><!--TOC section Additional Features-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc2">2</A>  Additional Features</H2><!--SEC END --><P>
|
||||
<A NAME="addfeatures"></A>
|
||||
</P><P>Moreover, <TT>ejabberd</TT> comes with a wide range of other state-of-the-art features:
|
||||
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Modular
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Load only the modules you want.
|
||||
</LI><LI CLASS="li-itemize">Extend <TT>ejabberd</TT> with your own custom modules.
|
||||
</LI></UL>
|
||||
</LI><LI CLASS="li-itemize">Security
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
SASL and STARTTLS for c2s and s2s connections.
|
||||
</LI><LI CLASS="li-itemize">STARTTLS and Dialback s2s connections.
|
||||
</LI><LI CLASS="li-itemize">Web Admin accessible via HTTPS secure access.
|
||||
</LI></UL>
|
||||
</LI><LI CLASS="li-itemize">Databases
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Internal database for fast deployment (Mnesia).
|
||||
</LI><LI CLASS="li-itemize">Native MySQL support.
|
||||
</LI><LI CLASS="li-itemize">Native PostgreSQL support.
|
||||
</LI><LI CLASS="li-itemize">ODBC data storage support.
|
||||
</LI><LI CLASS="li-itemize">Microsoft SQL Server support. </LI></UL>
|
||||
</LI><LI CLASS="li-itemize">Authentication
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Internal Authentication.
|
||||
</LI><LI CLASS="li-itemize">PAM, LDAP and ODBC. </LI><LI CLASS="li-itemize">External Authentication script.
|
||||
</LI></UL>
|
||||
</LI><LI CLASS="li-itemize">Others
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Support for virtual hosting.
|
||||
</LI><LI CLASS="li-itemize">Compressing XML streams with Stream Compression (<A HREF="http://www.xmpp.org/extensions/xep-0138.html">XEP-0138</A>).
|
||||
</LI><LI CLASS="li-itemize">Statistics via Statistics Gathering (<A HREF="http://www.xmpp.org/extensions/xep-0039.html">XEP-0039</A>).
|
||||
</LI><LI CLASS="li-itemize">IPv6 support both for c2s and s2s connections.
|
||||
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0045.html">Multi-User Chat</A> module with support for clustering and HTML logging. </LI><LI CLASS="li-itemize">Users Directory based on users vCards.
|
||||
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0060.html">Publish-Subscribe</A> component with support for <A HREF="http://www.xmpp.org/extensions/xep-0163.html">Personal Eventing via Pubsub</A>.
|
||||
</LI><LI CLASS="li-itemize">Support for web clients: <A HREF="http://www.xmpp.org/extensions/xep-0025.html">HTTP Polling</A> and <A HREF="http://www.xmpp.org/extensions/xep-0206.html">HTTP Binding (BOSH)</A> services.
|
||||
</LI><LI CLASS="li-itemize">IRC transport.
|
||||
</LI><LI CLASS="li-itemize">Component support: interface with networks such as AIM, ICQ and MSN installing special tranports.
|
||||
</LI></UL>
|
||||
</LI></UL><!--TOC section How it Works-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc3">3</A>  How it Works</H2><!--SEC END --><P>
|
||||
<A NAME="howitworks"></A></P><P>A Jabber domain is served by one or more <TT>ejabberd</TT> 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
|
||||
<TT>~ejabberd/.erlang.cookie</TT> must be the same on all nodes). This is
|
||||
needed because all nodes exchange information about connected users, S2S
|
||||
connections, registered services, etc…</P><P>Each <TT>ejabberd</TT> node have following modules:
|
||||
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
router;
|
||||
</LI><LI CLASS="li-itemize">local router.
|
||||
</LI><LI CLASS="li-itemize">session manager;
|
||||
</LI><LI CLASS="li-itemize">S2S manager;
|
||||
</LI></UL><!--TOC subsection Router-->
|
||||
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc4">3.1</A>  Router</H3><!--SEC END --><P>This module is the main router of Jabber packets on each node. It routes
|
||||
them based on their destinations domains. It has two tables: local and global
|
||||
routes. First, domain of packet destination searched in local table, and if it
|
||||
found, then the packet is routed to appropriate process. If no, then it
|
||||
searches in global table, and is routed to the appropriate <TT>ejabberd</TT> node or
|
||||
process. If it does not exists in either tables, then it sent to the S2S
|
||||
manager.</P><!--TOC subsection Local Router-->
|
||||
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc5">3.2</A>  Local Router</H3><!--SEC END --><P>This module routes packets which have a destination domain equal to this server
|
||||
name. If destination JID has a non-empty user part, then it routed to the
|
||||
session manager, else it is processed depending on it’s content.</P><!--TOC subsection Session Manager-->
|
||||
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc6">3.3</A>  Session Manager</H3><!--SEC END --><P>This module routes packets to local users. It searches for what user resource
|
||||
packet must be sended via presence table. If this resource is connected to
|
||||
this node, it is routed to C2S process, if it connected via another node, then
|
||||
the packet is sent to session manager on that node.</P><!--TOC subsection S2S Manager-->
|
||||
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc7">3.4</A>  S2S Manager</H3><!--SEC END --><P>This module routes packets to other Jabber servers. First, it checks if an
|
||||
open S2S connection from the domain of the packet source to the domain of
|
||||
packet destination already exists. If it is open on another node, then it
|
||||
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.</P><!--TOC section Authentication-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc8">4</A>  Authentication</H2><!--SEC END --><!--TOC subsubsection External-->
|
||||
<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc9">4.0.1</A>  External</H4><!--SEC END --><P>
|
||||
<A NAME="externalauth"></A>
|
||||
</P><P>The external authentication script follows
|
||||
<A HREF="http://www.erlang.org/doc/tutorial/c_portdriver.html">the erlang port driver API</A>.</P><P>That script is supposed to do theses actions, in an infinite loop:
|
||||
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
read from stdin: AABBBBBBBBB.....
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
A: 2 bytes of length data (a short in network byte order)
|
||||
</LI><LI CLASS="li-itemize">B: a string of length found in A that contains operation in plain text
|
||||
operation are as follows:
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
auth:User:Server:Password (check if a username/password pair is correct)
|
||||
</LI><LI CLASS="li-itemize">isuser:User:Server (check if it’s a valid user)
|
||||
</LI><LI CLASS="li-itemize">setpass:User:Server:Password (set user’s password)
|
||||
</LI></UL>
|
||||
</LI></UL>
|
||||
</LI><LI CLASS="li-itemize">write to stdout: AABB
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
A: the number 2 (coded as a short, which is bytes length of following result)
|
||||
</LI><LI CLASS="li-itemize">B: the result code (coded as a short), should be 1 for success/valid, or 0 for failure/invalid
|
||||
</LI></UL>
|
||||
</LI></UL><P>Example python script
|
||||
</P><PRE CLASS="verbatim">#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
from struct import *
|
||||
|
||||
def from_ejabberd():
|
||||
input_length = sys.stdin.read(2)
|
||||
(size,) = unpack('>h', input_length)
|
||||
return sys.stdin.read(size).split(':')
|
||||
|
||||
def to_ejabberd(bool):
|
||||
answer = 0
|
||||
if bool:
|
||||
answer = 1
|
||||
token = pack('>hh', 2, answer)
|
||||
sys.stdout.write(token)
|
||||
sys.stdout.flush()
|
||||
|
||||
def auth(username, server, password):
|
||||
return True
|
||||
|
||||
def isuser(username, server):
|
||||
return True
|
||||
|
||||
def setpass(username, server, password):
|
||||
return True
|
||||
|
||||
while True:
|
||||
data = from_ejabberd()
|
||||
success = False
|
||||
if data[0] == "auth":
|
||||
success = auth(data[1], data[2], data[3])
|
||||
elif data[0] == "isuser":
|
||||
success = isuser(data[1], data[2])
|
||||
elif data[0] == "setpass":
|
||||
success = setpass(data[1], data[2], data[3])
|
||||
to_ejabberd(success)
|
||||
</PRE><!--TOC section XML Representation-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc10">5</A>  XML Representation</H2><!--SEC END --><P>
|
||||
<A NAME="xmlrepr"></A></P><P>Each XML stanza is represented as the following tuple:
|
||||
</P><PRE CLASS="verbatim">XMLElement = {xmlelement, Name, Attrs, [ElementOrCDATA]}
|
||||
Name = string()
|
||||
Attrs = [Attr]
|
||||
Attr = {Key, Val}
|
||||
Key = string()
|
||||
Val = string()
|
||||
ElementOrCDATA = XMLElement | CDATA
|
||||
CDATA = {xmlcdata, string()}
|
||||
</PRE><P>E. g. this stanza:
|
||||
</P><PRE CLASS="verbatim"><message to='test@conference.example.org' type='groupchat'>
|
||||
<body>test</body>
|
||||
</message>
|
||||
</PRE><P>is represented as the following structure:
|
||||
</P><PRE CLASS="verbatim">{xmlelement, "message",
|
||||
[{"to", "test@conference.example.org"},
|
||||
{"type", "groupchat"}],
|
||||
[{xmlelement, "body",
|
||||
[],
|
||||
[{xmlcdata, "test"}]}]}}
|
||||
</PRE><!--TOC section Module <TT>xml</TT>-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc11">6</A>  Module <TT>xml</TT></H2><!--SEC END --><P>
|
||||
<A NAME="xmlmod"></A></P><DL CLASS="description"><DT CLASS="dt-description">
|
||||
</DT><DD CLASS="dd-description"><CODE>element_to_string(El) -> string()</CODE>
|
||||
<PRE CLASS="verbatim">El = XMLElement
|
||||
</PRE>Returns string representation of XML stanza <TT>El</TT>.</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>crypt(S) -> string()</CODE>
|
||||
<PRE CLASS="verbatim">S = string()
|
||||
</PRE>Returns string which correspond to <TT>S</TT> with encoded XML special
|
||||
characters.</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>remove_cdata(ECList) -> EList</CODE>
|
||||
<PRE CLASS="verbatim">ECList = [ElementOrCDATA]
|
||||
EList = [XMLElement]
|
||||
</PRE><TT>EList</TT> is a list of all non-CDATA elements of ECList.</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>get_path_s(El, Path) -> Res</CODE>
|
||||
<PRE CLASS="verbatim">El = XMLElement
|
||||
Path = [PathItem]
|
||||
PathItem = PathElem | PathAttr | PathCDATA
|
||||
PathElem = {elem, Name}
|
||||
PathAttr = {attr, Name}
|
||||
PathCDATA = cdata
|
||||
Name = string()
|
||||
Res = string() | XMLElement
|
||||
</PRE>If <TT>Path</TT> is empty, then returns <TT>El</TT>. Else sequentially
|
||||
consider elements of <TT>Path</TT>. Each element is one of:
|
||||
<DL CLASS="description"><DT CLASS="dt-description">
|
||||
</DT><DD CLASS="dd-description"><CODE>{elem, Name}</CODE> <TT>Name</TT> is name of subelement of
|
||||
<TT>El</TT>, if such element exists, then this element considered in
|
||||
following steps, else returns empty string.
|
||||
</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>{attr, Name}</CODE> If <TT>El</TT> have attribute <TT>Name</TT>, then
|
||||
returns value of this attribute, else returns empty string.
|
||||
</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>cdata</CODE> Returns CDATA of <TT>El</TT>.
|
||||
</DD></DL></DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description">TODO:
|
||||
<PRE CLASS="verbatim"> get_cdata/1, get_tag_cdata/1
|
||||
get_attr/2, get_attr_s/2
|
||||
get_tag_attr/2, get_tag_attr_s/2
|
||||
get_subtag/2
|
||||
</PRE></DD></DL><!--TOC section Module <TT>xml_stream</TT>-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc12">7</A>  Module <TT>xml_stream</TT></H2><!--SEC END --><P>
|
||||
<A NAME="xmlstreammod"></A></P><DL CLASS="description"><DT CLASS="dt-description">
|
||||
</DT><DD CLASS="dd-description"><CODE>parse_element(Str) -> XMLElement | {error, Err}</CODE>
|
||||
<PRE CLASS="verbatim">Str = string()
|
||||
Err = term()
|
||||
</PRE>Parses <TT>Str</TT> using XML parser, returns either parsed element or error
|
||||
tuple.
|
||||
</DD></DL><!--TOC section Modules-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc13">8</A>  Modules</H2><!--SEC END --><P>
|
||||
<A NAME="emods"></A></P><!--TOC subsection Module gen_iq_handler-->
|
||||
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc14">8.1</A>  Module gen_iq_handler</H3><!--SEC END --><P>
|
||||
<A NAME="geniqhandl"></A></P><P>The module <CODE>gen_iq_handler</CODE> allows to easily write handlers for IQ packets
|
||||
of particular XML namespaces that addressed to server or to users bare JIDs.</P><P>In this module the following functions are defined:
|
||||
</P><DL CLASS="description"><DT CLASS="dt-description">
|
||||
</DT><DD CLASS="dd-description"><CODE>add_iq_handler(Component, Host, NS, Module, Function, Type)</CODE>
|
||||
<PRE CLASS="verbatim">Component = Module = Function = atom()
|
||||
Host = NS = string()
|
||||
Type = no_queue | one_queue | parallel
|
||||
</PRE>Registers function <CODE>Module:Function</CODE> as handler for IQ packets on
|
||||
virtual host <CODE>Host</CODE> that contain child of namespace <CODE>NS</CODE> in
|
||||
<CODE>Component</CODE>. Queueing discipline is <CODE>Type</CODE>. There are at least
|
||||
two components defined:
|
||||
<DL CLASS="description"><DT CLASS="dt-description">
|
||||
</DT><DD CLASS="dd-description"><CODE>ejabberd_local</CODE> Handles packets that addressed to server JID;
|
||||
</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>ejabberd_sm</CODE> Handles packets that addressed to users bare JIDs.
|
||||
</DD></DL>
|
||||
</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>remove_iq_handler(Component, Host, NS)</CODE>
|
||||
<PRE CLASS="verbatim">Component = atom()
|
||||
Host = NS = string()
|
||||
</PRE>Removes IQ handler on virtual host <CODE>Host</CODE> for namespace <CODE>NS</CODE> from
|
||||
<CODE>Component</CODE>.
|
||||
</DD></DL><P>Handler function must have the following type:
|
||||
</P><DL CLASS="description"><DT CLASS="dt-description">
|
||||
</DT><DD CLASS="dd-description"><CODE>Module:Function(From, To, IQ)</CODE>
|
||||
<PRE CLASS="verbatim">From = To = jid()
|
||||
</PRE></DD></DL><PRE CLASS="verbatim">-module(mod_cputime).
|
||||
|
||||
-behaviour(gen_mod).
|
||||
|
||||
-export([start/2,
|
||||
stop/1,
|
||||
process_local_iq/3]).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
-include("jlib.hrl").
|
||||
|
||||
-define(NS_CPUTIME, "ejabberd:cputime").
|
||||
|
||||
start(Host, Opts) ->
|
||||
IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
|
||||
gen_iq_handler:add_iq_handler(ejabberd_local, Host, ?NS_CPUTIME,
|
||||
?MODULE, process_local_iq, IQDisc).
|
||||
|
||||
stop(Host) ->
|
||||
gen_iq_handler:remove_iq_handler(ejabberd_local, Host, ?NS_CPUTIME).
|
||||
|
||||
process_local_iq(From, To, {iq, ID, Type, XMLNS, SubEl}) ->
|
||||
case Type of
|
||||
set ->
|
||||
{iq, ID, error, XMLNS,
|
||||
[SubEl, ?ERR_NOT_ALLOWED]};
|
||||
get ->
|
||||
CPUTime = element(1, erlang:statistics(runtime))/1000,
|
||||
SCPUTime = lists:flatten(io_lib:format("~.3f", CPUTime)),
|
||||
{iq, ID, result, XMLNS,
|
||||
[{xmlelement, "query",
|
||||
[{"xmlns", ?NS_CPUTIME}],
|
||||
[{xmlelement, "cputime", [], [{xmlcdata, SCPUTime}]}]}]}
|
||||
end.
|
||||
</PRE><!--TOC subsection Services-->
|
||||
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc15">8.2</A>  Services</H3><!--SEC END --><P>
|
||||
<A NAME="services"></A></P><PRE CLASS="verbatim">-module(mod_echo).
|
||||
|
||||
-behaviour(gen_mod).
|
||||
|
||||
-export([start/2, init/1, stop/1]).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
-include("jlib.hrl").
|
||||
|
||||
start(Host, Opts) ->
|
||||
MyHost = gen_mod:get_opt(host, Opts, "echo." ++ Host),
|
||||
register(gen_mod:get_module_proc(Host, ?PROCNAME),
|
||||
spawn(?MODULE, init, [MyHost])).
|
||||
|
||||
init(Host) ->
|
||||
ejabberd_router:register_local_route(Host),
|
||||
loop(Host).
|
||||
|
||||
loop(Host) ->
|
||||
receive
|
||||
{route, From, To, Packet} ->
|
||||
ejabberd_router:route(To, From, Packet),
|
||||
loop(Host);
|
||||
stop ->
|
||||
ejabberd_router:unregister_route(Host),
|
||||
ok;
|
||||
_ ->
|
||||
loop(Host)
|
||||
end.
|
||||
|
||||
stop(Host) ->
|
||||
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
|
||||
Proc ! stop,
|
||||
{wait, Proc}.
|
||||
</PRE><!--CUT END -->
|
||||
<!--HTMLFOOT-->
|
||||
<!--ENDHTML-->
|
||||
<!--FOOTER-->
|
||||
<HR SIZE=2><BLOCKQUOTE CLASS="quote"><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by
|
||||
</EM><A HREF="http://hevea.inria.fr/index.html"><EM>H</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>V</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>A</EM></A><EM>.</EM></BLOCKQUOTE></BODY>
|
||||
</HTML>
|
||||
+466
@@ -0,0 +1,466 @@
|
||||
\documentclass[a4paper,10pt]{article}
|
||||
|
||||
%% Packages
|
||||
\usepackage{graphics}
|
||||
\usepackage{hevea}
|
||||
\usepackage{makeidx}
|
||||
\usepackage{verbatim}
|
||||
|
||||
%% Index
|
||||
\makeindex
|
||||
% Remove the index anchors from the HTML version to save size and bandwith.
|
||||
\newcommand{\ind}[1]{\begin{latexonly}\index{#1}\end{latexonly}}
|
||||
|
||||
%% Images
|
||||
\newcommand{\logoscale}{0.7}
|
||||
\newcommand{\imgscale}{0.58}
|
||||
\newcommand{\insimg}[1]{\insscaleimg{\imgscale}{#1}}
|
||||
\newcommand{\insscaleimg}[2]{
|
||||
\imgsrc{#2}{}
|
||||
\begin{latexonly}
|
||||
\scalebox{#1}{\includegraphics{#2}}
|
||||
\end{latexonly}
|
||||
}
|
||||
|
||||
%% Various
|
||||
\newcommand{\ns}[1]{\texttt{#1}}
|
||||
\newcommand{\ejabberd}{\texttt{ejabberd}}
|
||||
\newcommand{\Jabber}{Jabber}
|
||||
|
||||
%% 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{\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
|
||||
\include{version}
|
||||
\title{Ejabberd \version\ Developers Guide}
|
||||
\author{Alexey Shchepin \\
|
||||
\ahrefurl{mailto:alexey@sevcom.net} \\
|
||||
\ahrefurl{xmpp:aleksey@jabber.ru}}
|
||||
|
||||
%% 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
|
||||
|
||||
%% Footnotes
|
||||
\newcommand{\txepref}[2]{\footahref{http://www.xmpp.org/extensions/xep-#1.html}{#2}}
|
||||
\newcommand{\xepref}[1]{\txepref{#1}{XEP-#1}}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\label{titlepage}
|
||||
\begin{titlepage}
|
||||
\maketitle{}
|
||||
|
||||
\begin{center}
|
||||
{\insscaleimg{\logoscale}{logo.png}
|
||||
\par
|
||||
}
|
||||
\end{center}
|
||||
|
||||
\begin{quotation}\textit{I can thoroughly recommend ejabberd for ease of setup --
|
||||
Kevin Smith, Current maintainer of the Psi project}\end{quotation}
|
||||
|
||||
\end{titlepage}
|
||||
|
||||
\tableofcontents{}
|
||||
|
||||
% Input introduction.tex
|
||||
\input{introduction}
|
||||
|
||||
\section{How it Works}
|
||||
\label{howitworks}
|
||||
|
||||
|
||||
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
|
||||
\texttt{\~{}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\ldots
|
||||
|
||||
|
||||
|
||||
Each \ejabberd{} node have following modules:
|
||||
\begin{itemize}
|
||||
\item router;
|
||||
\item local router.
|
||||
\item session manager;
|
||||
\item S2S manager;
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\subsection{Router}
|
||||
|
||||
This module is the main router of \Jabber{} packets on each node. It routes
|
||||
them based on their destinations domains. It has two tables: local and global
|
||||
routes. First, domain of packet destination searched in local table, and if it
|
||||
found, then the packet is routed to appropriate process. If no, then it
|
||||
searches in global table, and is routed to the appropriate \ejabberd{} node or
|
||||
process. If it does not exists in either tables, then it sent to the S2S
|
||||
manager.
|
||||
|
||||
|
||||
\subsection{Local Router}
|
||||
|
||||
This module routes packets which have a destination domain equal to this server
|
||||
name. If destination JID has a non-empty user part, then it routed to the
|
||||
session manager, else it is processed depending on it's content.
|
||||
|
||||
|
||||
\subsection{Session Manager}
|
||||
|
||||
This module routes packets to local users. It searches for what user resource
|
||||
packet must be sended via presence table. If this resource is connected to
|
||||
this node, it is routed to C2S process, if it connected via another node, then
|
||||
the packet is sent to session manager on that node.
|
||||
|
||||
|
||||
\subsection{S2S Manager}
|
||||
|
||||
This module routes packets to other \Jabber{} servers. First, it checks if an
|
||||
open S2S connection from the domain of the packet source to the domain of
|
||||
packet destination already exists. If it is open on another node, then it
|
||||
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.
|
||||
|
||||
|
||||
\section{Authentication}
|
||||
|
||||
\subsubsection{External}
|
||||
\label{externalauth}
|
||||
\ind{external authentication}
|
||||
|
||||
The external authentication script follows
|
||||
\footahref{http://www.erlang.org/doc/tutorial/c_portdriver.html}{the erlang port driver API}.
|
||||
|
||||
That script is supposed to do theses actions, in an infinite loop:
|
||||
\begin{itemize}
|
||||
\item read from stdin: AABBBBBBBBB.....
|
||||
\begin{itemize}
|
||||
\item A: 2 bytes of length data (a short in network byte order)
|
||||
\item B: a string of length found in A that contains operation in plain text
|
||||
operation are as follows:
|
||||
\begin{itemize}
|
||||
\item auth:User:Server:Password (check if a username/password pair is correct)
|
||||
\item isuser:User:Server (check if it's a valid user)
|
||||
\item setpass:User:Server:Password (set user's password)
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\item write to stdout: AABB
|
||||
\begin{itemize}
|
||||
\item A: the number 2 (coded as a short, which is bytes length of following result)
|
||||
\item B: the result code (coded as a short), should be 1 for success/valid, or 0 for failure/invalid
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
|
||||
Example python script
|
||||
\begin{verbatim}
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
from struct import *
|
||||
|
||||
def from_ejabberd():
|
||||
input_length = sys.stdin.read(2)
|
||||
(size,) = unpack('>h', input_length)
|
||||
return sys.stdin.read(size).split(':')
|
||||
|
||||
def to_ejabberd(bool):
|
||||
answer = 0
|
||||
if bool:
|
||||
answer = 1
|
||||
token = pack('>hh', 2, answer)
|
||||
sys.stdout.write(token)
|
||||
sys.stdout.flush()
|
||||
|
||||
def auth(username, server, password):
|
||||
return True
|
||||
|
||||
def isuser(username, server):
|
||||
return True
|
||||
|
||||
def setpass(username, server, password):
|
||||
return True
|
||||
|
||||
while True:
|
||||
data = from_ejabberd()
|
||||
success = False
|
||||
if data[0] == "auth":
|
||||
success = auth(data[1], data[2], data[3])
|
||||
elif data[0] == "isuser":
|
||||
success = isuser(data[1], data[2])
|
||||
elif data[0] == "setpass":
|
||||
success = setpass(data[1], data[2], data[3])
|
||||
to_ejabberd(success)
|
||||
\end{verbatim}
|
||||
|
||||
\section{XML Representation}
|
||||
\label{xmlrepr}
|
||||
|
||||
Each XML stanza is represented as the following tuple:
|
||||
\begin{verbatim}
|
||||
XMLElement = {xmlelement, Name, Attrs, [ElementOrCDATA]}
|
||||
Name = string()
|
||||
Attrs = [Attr]
|
||||
Attr = {Key, Val}
|
||||
Key = string()
|
||||
Val = string()
|
||||
ElementOrCDATA = XMLElement | CDATA
|
||||
CDATA = {xmlcdata, string()}
|
||||
\end{verbatim}
|
||||
E.\,g. this stanza:
|
||||
\begin{verbatim}
|
||||
<message to='test@conference.example.org' type='groupchat'>
|
||||
<body>test</body>
|
||||
</message>
|
||||
\end{verbatim}
|
||||
is represented as the following structure:
|
||||
\begin{verbatim}
|
||||
{xmlelement, "message",
|
||||
[{"to", "test@conference.example.org"},
|
||||
{"type", "groupchat"}],
|
||||
[{xmlelement, "body",
|
||||
[],
|
||||
[{xmlcdata, "test"}]}]}}
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
|
||||
\section{Module \texttt{xml}}
|
||||
\label{xmlmod}
|
||||
|
||||
\begin{description}
|
||||
\item{\verb|element_to_string(El) -> string()|}
|
||||
\begin{verbatim}
|
||||
El = XMLElement
|
||||
\end{verbatim}
|
||||
Returns string representation of XML stanza \texttt{El}.
|
||||
|
||||
\item{\verb|crypt(S) -> string()|}
|
||||
\begin{verbatim}
|
||||
S = string()
|
||||
\end{verbatim}
|
||||
Returns string which correspond to \texttt{S} with encoded XML special
|
||||
characters.
|
||||
|
||||
\item{\verb|remove_cdata(ECList) -> EList|}
|
||||
\begin{verbatim}
|
||||
ECList = [ElementOrCDATA]
|
||||
EList = [XMLElement]
|
||||
\end{verbatim}
|
||||
\texttt{EList} is a list of all non-CDATA elements of ECList.
|
||||
|
||||
|
||||
|
||||
\item{\verb|get_path_s(El, Path) -> Res|}
|
||||
\begin{verbatim}
|
||||
El = XMLElement
|
||||
Path = [PathItem]
|
||||
PathItem = PathElem | PathAttr | PathCDATA
|
||||
PathElem = {elem, Name}
|
||||
PathAttr = {attr, Name}
|
||||
PathCDATA = cdata
|
||||
Name = string()
|
||||
Res = string() | XMLElement
|
||||
\end{verbatim}
|
||||
If \texttt{Path} is empty, then returns \texttt{El}. Else sequentially
|
||||
consider elements of \texttt{Path}. Each element is one of:
|
||||
\begin{description}
|
||||
\item{\verb|{elem, Name}|} \texttt{Name} is name of subelement of
|
||||
\texttt{El}, if such element exists, then this element considered in
|
||||
following steps, else returns empty string.
|
||||
\item{\verb|{attr, Name}|} If \texttt{El} have attribute \texttt{Name}, then
|
||||
returns value of this attribute, else returns empty string.
|
||||
\item{\verb|cdata|} Returns CDATA of \texttt{El}.
|
||||
\end{description}
|
||||
|
||||
\item{TODO:}
|
||||
\begin{verbatim}
|
||||
get_cdata/1, get_tag_cdata/1
|
||||
get_attr/2, get_attr_s/2
|
||||
get_tag_attr/2, get_tag_attr_s/2
|
||||
get_subtag/2
|
||||
\end{verbatim}
|
||||
\end{description}
|
||||
|
||||
|
||||
\section{Module \texttt{xml\_stream}}
|
||||
\label{xmlstreammod}
|
||||
|
||||
\begin{description}
|
||||
\item{\verb!parse_element(Str) -> XMLElement | {error, Err}!}
|
||||
\begin{verbatim}
|
||||
Str = string()
|
||||
Err = term()
|
||||
\end{verbatim}
|
||||
Parses \texttt{Str} using XML parser, returns either parsed element or error
|
||||
tuple.
|
||||
\end{description}
|
||||
|
||||
|
||||
\section{Modules}
|
||||
\label{emods}
|
||||
|
||||
|
||||
%\subsection{gen\_mod behaviour}
|
||||
%\label{genmod}
|
||||
|
||||
%TBD
|
||||
|
||||
\subsection{Module gen\_iq\_handler}
|
||||
\label{geniqhandl}
|
||||
|
||||
The module \verb|gen_iq_handler| allows to easily write handlers for IQ packets
|
||||
of particular XML namespaces that addressed to server or to users bare JIDs.
|
||||
|
||||
In this module the following functions are defined:
|
||||
\begin{description}
|
||||
\item{\verb|add_iq_handler(Component, Host, NS, Module, Function, Type)|}
|
||||
\begin{verbatim}
|
||||
Component = Module = Function = atom()
|
||||
Host = NS = string()
|
||||
Type = no_queue | one_queue | parallel
|
||||
\end{verbatim}
|
||||
Registers function \verb|Module:Function| as handler for IQ packets on
|
||||
virtual host \verb|Host| that contain child of namespace \verb|NS| in
|
||||
\verb|Component|. Queueing discipline is \verb|Type|. There are at least
|
||||
two components defined:
|
||||
\begin{description}
|
||||
\item{\verb|ejabberd_local|} Handles packets that addressed to server JID;
|
||||
\item{\verb|ejabberd_sm|} Handles packets that addressed to users bare JIDs.
|
||||
\end{description}
|
||||
\item{\verb|remove_iq_handler(Component, Host, NS)|}
|
||||
\begin{verbatim}
|
||||
Component = atom()
|
||||
Host = NS = string()
|
||||
\end{verbatim}
|
||||
Removes IQ handler on virtual host \verb|Host| for namespace \verb|NS| from
|
||||
\verb|Component|.
|
||||
\end{description}
|
||||
|
||||
Handler function must have the following type:
|
||||
\begin{description}
|
||||
\item{\verb|Module:Function(From, To, IQ)|}
|
||||
\begin{verbatim}
|
||||
From = To = jid()
|
||||
\end{verbatim}
|
||||
\end{description}
|
||||
|
||||
|
||||
|
||||
\begin{verbatim}
|
||||
-module(mod_cputime).
|
||||
|
||||
-behaviour(gen_mod).
|
||||
|
||||
-export([start/2,
|
||||
stop/1,
|
||||
process_local_iq/3]).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
-include("jlib.hrl").
|
||||
|
||||
-define(NS_CPUTIME, "ejabberd:cputime").
|
||||
|
||||
start(Host, Opts) ->
|
||||
IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
|
||||
gen_iq_handler:add_iq_handler(ejabberd_local, Host, ?NS_CPUTIME,
|
||||
?MODULE, process_local_iq, IQDisc).
|
||||
|
||||
stop(Host) ->
|
||||
gen_iq_handler:remove_iq_handler(ejabberd_local, Host, ?NS_CPUTIME).
|
||||
|
||||
process_local_iq(From, To, {iq, ID, Type, XMLNS, SubEl}) ->
|
||||
case Type of
|
||||
set ->
|
||||
{iq, ID, error, XMLNS,
|
||||
[SubEl, ?ERR_NOT_ALLOWED]};
|
||||
get ->
|
||||
CPUTime = element(1, erlang:statistics(runtime))/1000,
|
||||
SCPUTime = lists:flatten(io_lib:format("~.3f", CPUTime)),
|
||||
{iq, ID, result, XMLNS,
|
||||
[{xmlelement, "query",
|
||||
[{"xmlns", ?NS_CPUTIME}],
|
||||
[{xmlelement, "cputime", [], [{xmlcdata, SCPUTime}]}]}]}
|
||||
end.
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\subsection{Services}
|
||||
\label{services}
|
||||
|
||||
%TBD
|
||||
|
||||
|
||||
%TODO: use \verb|proc_lib|
|
||||
\begin{verbatim}
|
||||
-module(mod_echo).
|
||||
|
||||
-behaviour(gen_mod).
|
||||
|
||||
-export([start/2, init/1, stop/1]).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
-include("jlib.hrl").
|
||||
|
||||
start(Host, Opts) ->
|
||||
MyHost = gen_mod:get_opt(host, Opts, "echo." ++ Host),
|
||||
register(gen_mod:get_module_proc(Host, ?PROCNAME),
|
||||
spawn(?MODULE, init, [MyHost])).
|
||||
|
||||
init(Host) ->
|
||||
ejabberd_router:register_local_route(Host),
|
||||
loop(Host).
|
||||
|
||||
loop(Host) ->
|
||||
receive
|
||||
{route, From, To, Packet} ->
|
||||
ejabberd_router:route(To, From, Packet),
|
||||
loop(Host);
|
||||
stop ->
|
||||
ejabberd_router:unregister_route(Host),
|
||||
ok;
|
||||
_ ->
|
||||
loop(Host)
|
||||
end.
|
||||
|
||||
stop(Host) ->
|
||||
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
|
||||
Proc ! stop,
|
||||
{wait, Proc}.
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
|
||||
\end{document}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
@@ -0,0 +1,132 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Ejabberd 2.0.x Feature Sheet
|
||||
</TITLE>
|
||||
|
||||
<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<META name="GENERATOR" content="hevea 1.10">
|
||||
<STYLE type="text/css">
|
||||
.li-itemize{margin:1ex 0ex;}
|
||||
.li-enumerate{margin:1ex 0ex;}
|
||||
.dd-description{margin:0ex 0ex 1ex 4ex;}
|
||||
.dt-description{margin:0ex;}
|
||||
.toc{list-style:none;}
|
||||
.thefootnotes{text-align:left;margin:0ex;}
|
||||
.dt-thefootnotes{margin:0em;}
|
||||
.dd-thefootnotes{margin:0em 0em 0em 2em;}
|
||||
.footnoterule{margin:1em auto 1em 0px;width:50%;}
|
||||
.caption{padding-left:2ex; padding-right:2ex; margin-left:auto; margin-right:auto}
|
||||
.title{margin:2ex auto;text-align:center}
|
||||
.center{text-align:center;margin-left:auto;margin-right:auto;}
|
||||
.flushleft{text-align:left;margin-left:0ex;margin-right:auto;}
|
||||
.flushright{text-align:right;margin-left:auto;margin-right:0ex;}
|
||||
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;}
|
||||
TD P{margin:0px;}
|
||||
.boxed{border:1px solid black}
|
||||
.textboxed{border:1px solid black}
|
||||
.vbar{border:none;width:2px;background-color:black;}
|
||||
.hbar{border:none;height:2px;width:100%;background-color:black;}
|
||||
.hfill{border:none;height:1px;width:200%;background-color:black;}
|
||||
.vdisplay{border-collapse:separate;border-spacing:2px;width:auto; empty-cells:show; border:2px solid red;}
|
||||
.vdcell{white-space:nowrap;padding:0px;width:auto; border:2px solid green;}
|
||||
.display{border-collapse:separate;border-spacing:2px;width:auto; border:none;}
|
||||
.dcell{white-space:nowrap;padding:0px;width:auto; border:none;}
|
||||
.dcenter{margin:0ex auto;}
|
||||
.vdcenter{border:solid #FF8000 2px; margin:0ex auto;}
|
||||
.minipage{text-align:left; margin-left:0em; margin-right:auto;}
|
||||
.marginpar{border:solid thin black; width:20%; text-align:left;}
|
||||
.marginparleft{float:left; margin-left:0ex; margin-right:1ex;}
|
||||
.marginparright{float:right; margin-left:1ex; margin-right:0ex;}
|
||||
.theorem{text-align:left;margin:1ex auto 1ex 0ex;}
|
||||
.part{margin:2ex auto;text-align:center}
|
||||
SPAN{width:20%; float:right; text-align:left; margin-left:auto;}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY >
|
||||
<!--HEVEA command line is: /usr/bin/hevea -fix -pedantic features.tex -->
|
||||
<!--CUT DEF section 1 --><P><A NAME="titlepage"></A>
|
||||
|
||||
</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.0.x Feature Sheet</H1><H3 CLASS="titlerest">Sander Devrieze<BR>
|
||||
<A HREF="mailto:s.devrieze@pandora.be"><TT>mailto:s.devrieze@pandora.be</TT></A><BR>
|
||||
<A HREF="xmpp:sander@devrieze.dyndns.org"><TT>xmpp:sander@devrieze.dyndns.org</TT></A></H3></TD></TR>
|
||||
</TABLE><DIV CLASS="center">
|
||||
|
||||
<IMG SRC="logo.png" ALT="logo.png">
|
||||
|
||||
|
||||
</DIV><BLOCKQUOTE CLASS="quotation"><FONT COLOR="#921700"><I>I can thoroughly recommend ejabberd for ease of setup –
|
||||
Kevin Smith, Current maintainer of the Psi project</I></FONT></BLOCKQUOTE><P>Introduction
|
||||
<A NAME="intro"></A></P><BLOCKQUOTE CLASS="quotation"><FONT COLOR="#921700"><I>I just tried out ejabberd and was impressed both by ejabberd itself and the language it is written in, Erlang. —
|
||||
Joeri</I></FONT></BLOCKQUOTE><P><TT>ejabberd</TT> is a <B><FONT SIZE=4><FONT COLOR="#001376">free and open source</FONT></FONT></B> instant messaging server written in <A HREF="http://www.erlang.org/">Erlang</A>.</P><P><TT>ejabberd</TT> is <B><FONT SIZE=4><FONT COLOR="#001376">cross-platform</FONT></FONT></B>, distributed, fault-tolerant, and based on open standards to achieve real-time communication.</P><P><TT>ejabberd</TT> is designed to be a <B><FONT SIZE=4><FONT COLOR="#001376">rock-solid and feature rich</FONT></FONT></B> XMPP server.</P><P><TT>ejabberd</TT> is suitable for small deployments, whether they need to be <B><FONT SIZE=4><FONT COLOR="#001376">scalable</FONT></FONT></B> or not, as well as extremely big deployments.</P><!--TOC section Key Features-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc1"></A>Key Features</H2><!--SEC END --><P>
|
||||
<A NAME="keyfeatures"></A>
|
||||
</P><BLOCKQUOTE CLASS="quotation"><FONT COLOR="#921700"><I>Erlang seems to be tailor-made for writing stable, robust servers. —
|
||||
Peter Saint-André, Executive Director of the Jabber Software Foundation</I></FONT></BLOCKQUOTE><P><TT>ejabberd</TT> is:
|
||||
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
<B><FONT SIZE=4><FONT COLOR="#001376">Cross-platform:</FONT></FONT></B> <TT>ejabberd</TT> runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.</LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Distributed:</FONT></FONT></B> You can run <TT>ejabberd</TT> on a cluster of machines and all of them will serve the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users.</LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Fault-tolerant:</FONT></FONT></B> You can deploy an <TT>ejabberd</TT> cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes also can be added or replaced ‘on the fly’.</LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Administrator Friendly:</FONT></FONT></B> <TT>ejabberd</TT> is built on top of the Open Source Erlang. As a result you do not need to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include:
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Comprehensive documentation.
|
||||
</LI><LI CLASS="li-itemize">Straightforward installers for Linux, Mac OS X, and Windows. </LI><LI CLASS="li-itemize">Web Administration.
|
||||
</LI><LI CLASS="li-itemize">Shared Roster Groups.
|
||||
</LI><LI CLASS="li-itemize">Command line administration tool. </LI><LI CLASS="li-itemize">Can integrate with existing authentication mechanisms.
|
||||
</LI><LI CLASS="li-itemize">Capability to send announce messages.
|
||||
</LI></UL></LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Internationalized:</FONT></FONT></B> <TT>ejabberd</TT> leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Translated to 24 languages. </LI><LI CLASS="li-itemize">Support for <A HREF="http://www.ietf.org/rfc/rfc3490.txt">IDNA</A>.
|
||||
</LI></UL></LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Open Standards:</FONT></FONT></B> <TT>ejabberd</TT> is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Fully XMPP compliant.
|
||||
</LI><LI CLASS="li-itemize">XML-based protocol.
|
||||
</LI><LI CLASS="li-itemize"><A HREF="http://www.ejabberd.im/protocols">Many protocols supported</A>.
|
||||
</LI></UL></LI></UL><!--TOC section Additional Features-->
|
||||
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc2"></A>Additional Features</H2><!--SEC END --><P>
|
||||
<A NAME="addfeatures"></A>
|
||||
</P><BLOCKQUOTE CLASS="quotation"><FONT COLOR="#921700"><I>ejabberd is making inroads to solving the "buggy incomplete server" problem —
|
||||
Justin Karneges, Founder of the Psi and the Delta projects</I></FONT></BLOCKQUOTE><P>Moreover, <TT>ejabberd</TT> comes with a wide range of other state-of-the-art features:
|
||||
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Modular
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Load only the modules you want.
|
||||
</LI><LI CLASS="li-itemize">Extend <TT>ejabberd</TT> with your own custom modules.
|
||||
</LI></UL>
|
||||
</LI><LI CLASS="li-itemize">Security
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
SASL and STARTTLS for c2s and s2s connections.
|
||||
</LI><LI CLASS="li-itemize">STARTTLS and Dialback s2s connections.
|
||||
</LI><LI CLASS="li-itemize">Web Admin accessible via HTTPS secure access.
|
||||
</LI></UL>
|
||||
</LI><LI CLASS="li-itemize">Databases
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Internal database for fast deployment (Mnesia).
|
||||
</LI><LI CLASS="li-itemize">Native MySQL support.
|
||||
</LI><LI CLASS="li-itemize">Native PostgreSQL support.
|
||||
</LI><LI CLASS="li-itemize">ODBC data storage support.
|
||||
</LI><LI CLASS="li-itemize">Microsoft SQL Server support. </LI></UL>
|
||||
</LI><LI CLASS="li-itemize">Authentication
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Internal Authentication.
|
||||
</LI><LI CLASS="li-itemize">PAM, LDAP and ODBC. </LI><LI CLASS="li-itemize">External Authentication script.
|
||||
</LI></UL>
|
||||
</LI><LI CLASS="li-itemize">Others
|
||||
<UL CLASS="itemize"><LI CLASS="li-itemize">
|
||||
Support for virtual hosting.
|
||||
</LI><LI CLASS="li-itemize">Compressing XML streams with Stream Compression (<A HREF="http://www.xmpp.org/extensions/xep-0138.html">XEP-0138</A>).
|
||||
</LI><LI CLASS="li-itemize">Statistics via Statistics Gathering (<A HREF="http://www.xmpp.org/extensions/xep-0039.html">XEP-0039</A>).
|
||||
</LI><LI CLASS="li-itemize">IPv6 support both for c2s and s2s connections.
|
||||
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0045.html">Multi-User Chat</A> module with support for clustering and HTML logging. </LI><LI CLASS="li-itemize">Users Directory based on users vCards.
|
||||
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0060.html">Publish-Subscribe</A> component with support for <A HREF="http://www.xmpp.org/extensions/xep-0163.html">Personal Eventing via Pubsub</A>.
|
||||
</LI><LI CLASS="li-itemize">Support for web clients: <A HREF="http://www.xmpp.org/extensions/xep-0025.html">HTTP Polling</A> and <A HREF="http://www.xmpp.org/extensions/xep-0206.html">HTTP Binding (BOSH)</A> services.
|
||||
</LI><LI CLASS="li-itemize">IRC transport.
|
||||
</LI><LI CLASS="li-itemize">Component support: interface with networks such as AIM, ICQ and MSN installing special tranports.
|
||||
</LI></UL>
|
||||
</LI></UL><!--CUT END -->
|
||||
<!--HTMLFOOT-->
|
||||
<!--ENDHTML-->
|
||||
<!--FOOTER-->
|
||||
<HR SIZE=2><BLOCKQUOTE CLASS="quote"><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by
|
||||
</EM><A HREF="http://hevea.inria.fr/index.html"><EM>H</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>V</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>A</EM></A><EM>.</EM></BLOCKQUOTE></BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,136 @@
|
||||
\documentclass[a4paper,10pt]{article}
|
||||
|
||||
%% Packages
|
||||
\usepackage{epsfig}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{graphics}
|
||||
\usepackage{hevea}
|
||||
\usepackage[pdftex,colorlinks,unicode,urlcolor=blue,linkcolor=blue,pdftitle=Ejabberd\
|
||||
Feature\ Sheet,pdfauthor=Sander\
|
||||
Devrieze,pdfsubject=ejabberd,pdfkeywords=ejabberd]{hyperref}
|
||||
\usepackage{verbatim}
|
||||
\usepackage{color}
|
||||
|
||||
%% Index
|
||||
% Remove the index anchors from the HTML version to save size and bandwith.
|
||||
\newcommand{\ind}[1]{\begin{latexonly}\index{#1}\end{latexonly}}
|
||||
|
||||
%% Images
|
||||
\newcommand{\logoscale}{0.7}
|
||||
\newcommand{\imgscale}{0.58}
|
||||
\newcommand{\insimg}[1]{\insscaleimg{\imgscale}{#1}}
|
||||
\newcommand{\insscaleimg}[2]{
|
||||
\imgsrc{#2}{}
|
||||
\begin{latexonly}
|
||||
\scalebox{#1}{\includegraphics{#2}}
|
||||
\end{latexonly}
|
||||
}
|
||||
|
||||
%% Various
|
||||
\newcommand{\bracehack}{\def\{{\char"7B}\def\}{\char"7D}}
|
||||
\newcommand{\titem}[1]{\item[\bracehack\texttt{#1}]}
|
||||
\newcommand{\ns}[1]{\texttt{#1}}
|
||||
\newcommand{\jid}[1]{\texttt{#1}}
|
||||
\newcommand{\option}[1]{\texttt{#1}}
|
||||
\newcommand{\poption}[1]{{\bracehack\texttt{#1}}}
|
||||
\newcommand{\node}[1]{\texttt{#1}}
|
||||
\newcommand{\term}[1]{\texttt{#1}}
|
||||
\newcommand{\shell}[1]{\texttt{#1}}
|
||||
\newcommand{\ejabberd}{\texttt{ejabberd}}
|
||||
\newcommand{\Jabber}{Jabber}
|
||||
|
||||
%% Title page
|
||||
\include{version}
|
||||
\title{Ejabberd \version\ Feature Sheet}
|
||||
\author{Sander Devrieze \\
|
||||
\ahrefurl{mailto:s.devrieze@pandora.be} \\
|
||||
\ahrefurl{xmpp:sander@devrieze.dyndns.org}}
|
||||
|
||||
% 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}{\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
|
||||
\global\parindent=0pt
|
||||
\gdef\ahrefurl#1{\href{#1}{\texttt{#1}}}
|
||||
\gdef\footahref#1#2{#2\footnote{\href{#1}{\texttt{#1}}}}
|
||||
\end{latexonly}
|
||||
\newcommand{\txepref}[2]{\footahref{http://www.xmpp.org/extensions/xep-#1.html}{#2}}
|
||||
\newcommand{\xepref}[1]{\txepref{#1}{XEP-#1}}
|
||||
|
||||
%% Fancy header
|
||||
\fancyhf{}
|
||||
\pagestyle{fancy}
|
||||
\rhead{\textcolor{ejblue}{The Expandable Jabber Daemon.}}
|
||||
\renewcommand{\headrule}{{\color{ejblue}%
|
||||
\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
|
||||
\lhead{\setlength{\unitlength}{-6mm}
|
||||
\begin{picture}(0,0)
|
||||
\put(5.8,3.25){\includegraphics[width=1.3\textwidth]{yozhikheader.png}}
|
||||
\end{picture}}
|
||||
|
||||
% Official ejabberd colours
|
||||
\definecolor{ejblue} {cmyk}{1.000,0.831,0.000,0.537} %RGB: 0,0,118 HTML: 000076
|
||||
\definecolor{ejgreenyellow}{cmyk}{0.079,0.000,0.275,0.102} %RGB: 209,229,159 HTML: d1e59f
|
||||
\definecolor{ejgreendark} {cmyk}{0.131,0.000,0.146,0.220} %RGB: 166,199,162 HTML: a6c7a2
|
||||
\definecolor{ejgreen} {cmyk}{0.077,0.000,0.081,0.078} %RGB: 216,236,215 HTML: d8ecd7
|
||||
\definecolor{ejgreenwhite} {cmyk}{0.044,0.000,0.048,0.020} %RGB: 239,250,238 HTML: effaee
|
||||
\definecolor{yozhik} {cmyk}{0.000,0.837,1.000,0.424} %RGB: 147,0,0 HTML: 930000
|
||||
|
||||
\begin{document}
|
||||
|
||||
\label{titlepage}
|
||||
\begin{titlepage}
|
||||
\maketitle{}
|
||||
|
||||
\thispagestyle{empty}
|
||||
|
||||
\begin{center}
|
||||
{\insscaleimg{\logoscale}{logo.png}
|
||||
\par
|
||||
}
|
||||
\end{center}
|
||||
\quoting{I can thoroughly recommend ejabberd for ease of setup --
|
||||
Kevin Smith, Current maintainer of the Psi project}
|
||||
|
||||
\end{titlepage}
|
||||
|
||||
\newpage
|
||||
% Set the page counter to 2 so that the titlepage and the second page do not
|
||||
% have the same page number. This fixes the PDFLaTeX warning "destination with
|
||||
% the same identifier".
|
||||
\begin{latexonly}
|
||||
\setcounter{page}{2}
|
||||
\pagecolor{ejgreenwhite}
|
||||
\end{latexonly}
|
||||
|
||||
% Input introduction.tex
|
||||
\input{introduction}
|
||||
|
||||
\end{document}
|
||||
|
||||
%% TODO
|
||||
% * illustrations (e.g. screenshot from web interface)
|
||||
% * commented parts
|
||||
% * slides, guide and html version
|
||||
% * cleaning and improving LaTeX code
|
||||
% * key features: something like this (shorter)? (more focussed on Erlang now): "To reach the goal of high
|
||||
% availability, performance and clustering, ejabberd is written in Erlang, a programming language perfectly
|
||||
% suited for this. Besides that, some parts are written in C to also incude the advantages of this language. In
|
||||
% short, ejabberd is a perfect mix of mainly Erlang code, peppered with some C code to get the final touch!"
|
||||
% <picture of a cocktail>
|
||||
% * key features: saying that ejabberd the only XMPP server is that can do real clustering:
|
||||
% http://www.jivesoftware.org/forums/thread.jspa?threadID=14602
|
||||
% "What I find interesting is that *no* XMPP servers truly provide clustering. This includes all the commercial
|
||||
% servers. The one partial exception appears to be ejabberd, which can cluster certain data such as sessions,
|
||||
% but not all services such as MUC."
|
||||
% * try it today: links to migration tutorials
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
digraph messages {
|
||||
//concentrate=true;
|
||||
subgraph clusterclients {
|
||||
client1 [shape = box];
|
||||
client2 [shape = box];
|
||||
client3 [shape = box];
|
||||
|
||||
style = dashed;
|
||||
label = "Clients";
|
||||
}
|
||||
|
||||
subgraph clusternode1 {
|
||||
subgraph clusterc2s1 {
|
||||
c2s11;
|
||||
c2s12;
|
||||
style = invis;
|
||||
}
|
||||
subgraph clusterservices1 {
|
||||
service11;
|
||||
service12;
|
||||
service13;
|
||||
style = invis;
|
||||
}
|
||||
//subgraph clusters2s1 {
|
||||
//s2s11;
|
||||
//s2s12;
|
||||
//style = invis;
|
||||
//}
|
||||
c2s11 -> auth1;
|
||||
c2s12 -> auth1;
|
||||
auth1 -> c2s11;
|
||||
auth1 -> c2s12;
|
||||
c2s11 -> sm1;
|
||||
c2s11 -> router1;
|
||||
c2s12 -> sm1;
|
||||
c2s12 -> router1;
|
||||
router1 -> local1;
|
||||
router1 -> service11;
|
||||
router1 -> service12;
|
||||
router1 -> service13;
|
||||
router1 -> s2s11;
|
||||
router1 -> s2s12;
|
||||
service11 -> router1;
|
||||
service12 -> router1;
|
||||
service13 -> router1;
|
||||
s2s11 -> router1;
|
||||
s2s12 -> router1;
|
||||
local1 -> sm1;
|
||||
sm1 -> c2s11;
|
||||
sm1 -> c2s12;
|
||||
|
||||
style = dashed;
|
||||
label = "Node1";
|
||||
}
|
||||
|
||||
subgraph clusternode2 {
|
||||
c2s2 -> auth2;
|
||||
auth2 -> c2s2;
|
||||
c2s2 -> sm2;
|
||||
c2s2 -> router2;
|
||||
router2 -> local2;
|
||||
router2 -> service21;
|
||||
router2 -> s2s21;
|
||||
service21 -> router2;
|
||||
s2s21 -> router2;
|
||||
local2 -> sm2;
|
||||
sm2 -> c2s2;
|
||||
|
||||
style = dashed;
|
||||
label = "Node2";
|
||||
}
|
||||
|
||||
|
||||
|
||||
subgraph clusterservers {
|
||||
server1 [shape = box];
|
||||
server2 [shape = box];
|
||||
server3 [shape = box];
|
||||
|
||||
style = dashed;
|
||||
label = "Servers";
|
||||
}
|
||||
|
||||
|
||||
client1 -> c2s11;
|
||||
client2 -> c2s12;
|
||||
client3 -> c2s2;
|
||||
c2s11 -> client1 [constraint=false];
|
||||
c2s12 -> client2 [constraint=false];
|
||||
c2s2 -> client3 [constraint=false];
|
||||
|
||||
s2s11 -> server1 [minlen = 2];
|
||||
s2s12 -> server2 [minlen = 2];
|
||||
s2s21 -> server3 [minlen = 2];
|
||||
server1 -> s2s11 [constraint=false];
|
||||
server2 -> s2s12 [constraint=false];
|
||||
server3 -> s2s21 [constraint=false];
|
||||
|
||||
router1 -> router2;
|
||||
router2 -> router1;
|
||||
sm1 -> sm2;
|
||||
sm2 -> sm1;
|
||||
|
||||
label = "Data Flows";
|
||||
}
|
||||
+3280
File diff suppressed because it is too large
Load Diff
+4207
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,133 @@
|
||||
\chapter{Introduction}
|
||||
\label{intro}
|
||||
|
||||
%% TODO: improve the feature sheet with a nice table to highlight new features.
|
||||
|
||||
\quoting{I just tried out ejabberd and was impressed both by ejabberd itself and the language it is written in, Erlang. ---
|
||||
Joeri}
|
||||
|
||||
%ejabberd is a free and open source instant messaging server written in Erlang. ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication (Jabber/XMPP).
|
||||
|
||||
\ejabberd{} is a \marking{free and open source} instant messaging server written in \footahref{http://www.erlang.org/}{Erlang}.
|
||||
|
||||
\ejabberd{} is \marking{cross-platform}, distributed, fault-tolerant, and based on open standards to achieve real-time communication.
|
||||
|
||||
\ejabberd{} is designed to be a \marking{rock-solid and feature rich} XMPP server.
|
||||
|
||||
\ejabberd{} is suitable for small deployments, whether they need to be \marking{scalable} or not, as well as extremely big deployments.
|
||||
|
||||
%\subsection{Layout with example deployment (title needs a better name)}
|
||||
%\label{layout}
|
||||
|
||||
%In this section there will be a graphical overview like these:\\
|
||||
%\verb|http://www.tipic.com/var/timp/timp_dep.gif| \\
|
||||
%\verb|http://www.jabber.com/images/jabber_Com_Platform.jpg| \\
|
||||
%\verb|http://www.antepo.com/files/OPN45systemdatasheet.pdf| \\
|
||||
|
||||
%A page full with names of Jabber client that are known to work with ejabberd. \begin{tiny}tiny font\end{tiny}
|
||||
|
||||
%\subsection{Try It Today}
|
||||
%\label{trytoday}
|
||||
|
||||
%(Not sure if I will include/finish this section for the next version.)
|
||||
|
||||
%\begin{itemize}
|
||||
%\item Erlang REPOS
|
||||
%\item Packages in distributions
|
||||
%\item Windows binary
|
||||
%\item source tar.gz
|
||||
%\item Migration from Jabberd14 (and so also Jabberd2 because you can migrate from version 2 back to 14) and Jabber Inc. XCP possible.
|
||||
%\end{itemize}
|
||||
|
||||
\newpage
|
||||
\section{Key Features}
|
||||
\label{keyfeatures}
|
||||
\ind{features!key features}
|
||||
|
||||
\quoting{Erlang seems to be tailor-made for writing stable, robust servers. ---
|
||||
Peter Saint-Andr\'e, Executive Director of the Jabber Software Foundation}
|
||||
|
||||
\ejabberd{} is:
|
||||
\begin{itemize}
|
||||
\item \marking{Cross-platform:} \ejabberd{} runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.
|
||||
|
||||
\item \marking{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.
|
||||
|
||||
\item \marking{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'.
|
||||
|
||||
\item \marking{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:
|
||||
\begin{itemize}
|
||||
\item Comprehensive documentation.
|
||||
\item Straightforward installers for Linux, Mac OS X, and Windows. %%\improved{}
|
||||
\item Web Administration.
|
||||
\item Shared Roster Groups.
|
||||
\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 to 24 languages. %%\improved{}
|
||||
\item Support for \footahref{http://www.ietf.org/rfc/rfc3490.txt}{IDNA}.
|
||||
\end{itemize}
|
||||
|
||||
\item \marking{Open Standards:} \ejabberd{} is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
|
||||
\begin{itemize}
|
||||
\item Fully XMPP compliant.
|
||||
\item XML-based protocol.
|
||||
\item \footahref{http://www.ejabberd.im/protocols}{Many protocols supported}.
|
||||
\end{itemize}
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\newpage
|
||||
|
||||
\section{Additional Features}
|
||||
\label{addfeatures}
|
||||
\ind{features!additional features}
|
||||
|
||||
\quoting{ejabberd is making inroads to solving the "buggy incomplete server" problem ---
|
||||
Justin Karneges, Founder of the Psi and the Delta projects}
|
||||
|
||||
Moreover, \ejabberd{} comes with a wide range of other state-of-the-art features:
|
||||
\begin{itemize}
|
||||
\item Modular
|
||||
\begin{itemize}
|
||||
\item Load only the modules you want.
|
||||
\item Extend \ejabberd{} with your own custom modules.
|
||||
\end{itemize}
|
||||
\item Security
|
||||
\begin{itemize}
|
||||
\item SASL and STARTTLS for c2s and s2s connections.
|
||||
\item STARTTLS and Dialback s2s connections.
|
||||
\item Web Admin accessible via HTTPS secure access.
|
||||
\end{itemize}
|
||||
\item Databases
|
||||
\begin{itemize}
|
||||
\item Internal database for fast deployment (Mnesia).
|
||||
\item Native MySQL support.
|
||||
\item Native PostgreSQL support.
|
||||
\item ODBC data storage support.
|
||||
\item Microsoft SQL Server support. %%\new{}
|
||||
\end{itemize}
|
||||
\item Authentication
|
||||
\begin{itemize}
|
||||
\item Internal Authentication.
|
||||
\item PAM, LDAP and ODBC. %%\improved{}
|
||||
\item External Authentication script.
|
||||
\end{itemize}
|
||||
\item Others
|
||||
\begin{itemize}
|
||||
\item Support for virtual hosting.
|
||||
\item Compressing XML streams with Stream Compression (\xepref{0138}).
|
||||
\item Statistics via Statistics Gathering (\xepref{0039}).
|
||||
\item IPv6 support both for c2s and s2s connections.
|
||||
\item \txepref{0045}{Multi-User Chat} module with support for clustering and HTML logging. %%\improved{}
|
||||
\item Users Directory based on users vCards.
|
||||
\item \txepref{0060}{Publish-Subscribe} component with support for \txepref{0163}{Personal Eventing via Pubsub}.
|
||||
\item Support for web clients: \txepref{0025}{HTTP Polling} and \txepref{0206}{HTTP Binding (BOSH)} services.
|
||||
\item IRC transport.
|
||||
\item Component support: interface with networks such as AIM, ICQ and MSN installing special tranports.
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
@@ -0,0 +1,62 @@
|
||||
Release notes
|
||||
ejabberd 0.9.1
|
||||
|
||||
This document describes the main changes from [25]ejabberd 0.9.
|
||||
|
||||
The code can be downloaded from the [26]download page.
|
||||
|
||||
For more detailed information, please refer to ejabberd [27]User Guide.
|
||||
|
||||
|
||||
Groupchat (Multi-user chat and IRC) improvements
|
||||
|
||||
The multi-user chat code has been improved to comply with the latest version
|
||||
of Jabber Enhancement Proposal 0045.
|
||||
|
||||
The IRC (Internet Relay Chat) features now support WHOIS and USERINFO
|
||||
requests.
|
||||
|
||||
|
||||
Web interface
|
||||
|
||||
ejabberd modules management features have been added to the web interface.
|
||||
They now allow to start or stop extension module without restarting the
|
||||
ejabberd server.
|
||||
|
||||
|
||||
Publish and subscribe
|
||||
|
||||
It is now possible to a subscribe node with a JabberID that includes a
|
||||
resource.
|
||||
|
||||
|
||||
Translations
|
||||
|
||||
A new script has been included to help translate ejabberd into new languages
|
||||
and maintain existing translations.
|
||||
|
||||
As a result, ejabberd is now translating into 10 languages:
|
||||
* Dutch
|
||||
* English
|
||||
* French
|
||||
* German
|
||||
* Polish
|
||||
* Portuguese
|
||||
* Russian
|
||||
* Spanish
|
||||
* Swedish
|
||||
* Ukrainian
|
||||
|
||||
|
||||
Migration
|
||||
|
||||
No changes have been made to the database. No particular conversion steps
|
||||
are needed. However, you should backup your database before upgrading to a
|
||||
new ejabberd version.
|
||||
|
||||
|
||||
Bugfixes
|
||||
|
||||
This release contains several bugfixes and architectural changes. Please
|
||||
refer to the Changelog file supplied with this release for details of all
|
||||
improvements in the ejabberd code.
|
||||
@@ -0,0 +1,99 @@
|
||||
Release notes
|
||||
ejabberd 0.9.8
|
||||
2005-08-01
|
||||
|
||||
This document describes the main changes in ejabberd 0.9.8. This
|
||||
version prepares the way for the release of ejabberd 1.0, which
|
||||
is due later this year.
|
||||
|
||||
The code can be downloaded from the Process-one website:
|
||||
http://www.process-one.net/en/projects/ejabberd/
|
||||
|
||||
For more detailed information, please refer to ejabberd User Guide
|
||||
on the Process-one website:
|
||||
http://www.process-one.net/en/projects/ejabberd/docs.html
|
||||
|
||||
|
||||
Recent changes include....
|
||||
|
||||
|
||||
Enhanced virtual hosting
|
||||
|
||||
Virtual hosting applies to many more setting options and
|
||||
features and is transparent. Virtual hosting accepts different
|
||||
parameters for different virtual hosts regarding the following
|
||||
features: authentication method, access control lists and access
|
||||
rules, users management, statistics, and shared roster. The web
|
||||
interface gives access to each virtual host's parameters.
|
||||
|
||||
|
||||
Enhanced Publish-Subscribe module
|
||||
|
||||
ejabberd's Publish-Subscribe module integrates enhancements
|
||||
coming from J-EAI, an XMPP-based integration server built on
|
||||
ejabberd. ejabberd thus supports Publish-Subscribe node
|
||||
configuration. It is possible to define nodes that should be
|
||||
persistent, and the number of items to persist. Besides that, it
|
||||
is also possible to define various notification parameters, such
|
||||
as the delivery of the payload with the notifications, and the
|
||||
notification of subscribers when some changes occur on items.
|
||||
Other examples are: the maximum size of the items payload, the
|
||||
subscription approvers, the limitation of the notification to
|
||||
online users only, etc.
|
||||
|
||||
|
||||
Code reorganisation and update
|
||||
|
||||
- The mod_register module has been cleaned up.
|
||||
- ODBC support has been updated and several bugs have been fixed.
|
||||
|
||||
|
||||
Development API
|
||||
|
||||
To ease the work of Jabber/XMPP developers, a filter_packet hook
|
||||
has been added. As a result it is possible to develop plugins to
|
||||
filter or modify packets flowing through ejabberd.
|
||||
|
||||
|
||||
Translations
|
||||
|
||||
- Translations have been updated to support the new Publish-Subscribe features.
|
||||
- A new Brazilian Portuguese translation has been contributed.
|
||||
|
||||
|
||||
Web interface
|
||||
|
||||
- The CSS stylesheet from the web interface is W3C compliant.
|
||||
|
||||
|
||||
Installers
|
||||
|
||||
Installers are provided for Microsoft Windows and Linux/x86. The
|
||||
Linux installer includes Erlang ASN.1 modules for LDAP
|
||||
authentication support.
|
||||
|
||||
|
||||
Bugfixes
|
||||
|
||||
- This release contains several bugfixes and architectural
|
||||
changes. Among other bugfixes include improvements in LDAP
|
||||
authentication. Please refer to the ChangeLog file supplied
|
||||
with this release regarding all improvements in ejabberd.
|
||||
|
||||
|
||||
References
|
||||
|
||||
The ejabberd feature sheet helps comparing with other Jabber/XMPP
|
||||
servers:
|
||||
http://www.process-one.net/en/projects/ejabberd/docs/features.pdf
|
||||
|
||||
Contributed tutorials of interest are:
|
||||
- Migration from Jabberd1.4 to ejabberd:
|
||||
http://ejabberd.jabber.ru/jabberd1-to-ejabberd
|
||||
- Migration from Jabberd2 to ejabberd:
|
||||
http://ejabberd.jabber.ru/jabberd2-to-ejabberd
|
||||
- Transport configuration for connecting to other networks:
|
||||
http://ejabberd.jabber.ru/tutorials-transports
|
||||
|
||||
END
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
Release notes
|
||||
ejabberd 0.9
|
||||
|
||||
This document describes the major new features of and changes to
|
||||
ejabberd 0.9, compared to latest public release ejabber 0.7.5.
|
||||
|
||||
For more detailed information, please refer to ejabberd User
|
||||
Guide.
|
||||
|
||||
|
||||
Virtual Hosting
|
||||
|
||||
ejabberd now can host several domain on the same instance.
|
||||
This option is enabled by using:
|
||||
|
||||
{hosts, ["erlang-projects.org", "erlang-fr.org"]}.
|
||||
|
||||
instead of the previous host directive.
|
||||
|
||||
Note that you are now using a list of hosts. The main one should
|
||||
be the first listed. See migration section further in this release
|
||||
note for details.
|
||||
|
||||
|
||||
Shared Roster
|
||||
|
||||
Shared roster is a new feature that allow the ejabberd
|
||||
administrator to add jabber user that will be present in the
|
||||
roster of every users on the server.
|
||||
Shared roster are enabled by adding:
|
||||
|
||||
{mod_shared_roster, []}
|
||||
|
||||
at the end of your module list in your ejabberd.cfg file.
|
||||
|
||||
|
||||
PostgreSQL (ODBC) support
|
||||
|
||||
This feature is experimental and not yet properly documented. This
|
||||
feature is released for testing purpose.
|
||||
|
||||
You need to have Erlang/OTP R10 to compile with ODBC on various
|
||||
flavour of *nix. You should use Erlang/OTP R10B-4, as this task
|
||||
has became easier with this release. It comes already build in
|
||||
Erlang/OTP Microsoft Windows binary.
|
||||
|
||||
PostgreSQL support is enabled by using the following module in
|
||||
ejabberd.cfg instead of their standard counterpart:
|
||||
|
||||
mod_last_odbc.erl
|
||||
mod_offline_odbc.erl
|
||||
mod_roster_odbc.erl
|
||||
|
||||
The database schema is located in the src/odbc/pq.sql file.
|
||||
|
||||
Look at the src/ejabberd.cfg.example file for more information on
|
||||
how to configure ejabberd with odbc support. You can get support
|
||||
on how to configure ejabberd with a relational database.
|
||||
|
||||
|
||||
Migration from ejabberd 0.7.5
|
||||
|
||||
Migration is pretty straightforward as Mnesia database schema
|
||||
conversions is handled automatically. Remember however that you
|
||||
must backup your ejabberd database before migration.
|
||||
|
||||
Here are the following steps to proceed:
|
||||
|
||||
1. Stop your instance of ejabberd.
|
||||
|
||||
2. In ejabberd.cfg, define the host lists. Change the host
|
||||
directive to the hosts one:
|
||||
Before:
|
||||
{host, "erlang-projects.org"}.
|
||||
After:
|
||||
{hosts, ["erlang-projects.org", "erlang-fr.org"]}.
|
||||
Note that when you restart the server the existing users will be
|
||||
affected to the first virtual host, so the order is important. You
|
||||
should keep the previous hostname as the first virtual host.
|
||||
|
||||
3. Restart ejabberd.
|
||||
|
||||
|
||||
Bugfixes
|
||||
|
||||
This release contains several bugfixes and architectural changes.
|
||||
Please refer to the Changelog file supplied with this release for
|
||||
details of all improvements in the ejabberd code.
|
||||
@@ -0,0 +1,120 @@
|
||||
Release Notes
|
||||
ejabberd 1.0.0
|
||||
14 December 2005
|
||||
|
||||
This document describes the main changes in ejabberd 1.0.0. Unique in this
|
||||
version is the compliancy with the XMPP (eXtensible Messaging and Presence
|
||||
Protocol) standard. ejabberd is the first Open Source Jabber server claiming
|
||||
to fully comply to the XMPP standard.
|
||||
|
||||
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
|
||||
|
||||
|
||||
Recent changes include:
|
||||
|
||||
|
||||
Server-to-server Encryption for Enhanced Security
|
||||
|
||||
- Support for STARTTLS and SASL EXTERNAL to secure server-to-server traffic
|
||||
has been added.
|
||||
- Also, STARTTLS and Dialback has been implemented for server-to-server (s2s)
|
||||
connections. Detailed information about these new features can be found on
|
||||
http://ejabberd.jabber.ru/s2s-encryption
|
||||
- commonName and dNSName fields matching were introduced to ease the process
|
||||
of retrieving certificates.
|
||||
- Different certificates can be defined for each virtual host.
|
||||
|
||||
ODBC Support
|
||||
|
||||
- ODBC support has been improved to allow production use of ejabberd with
|
||||
relational databases.
|
||||
- Support for vCard storage in ODBC has been added.
|
||||
- ejd2odbc.erl is a tool to convert an installation from Erlang's database
|
||||
Mnesia to an ODBC compatible relational database.
|
||||
|
||||
Native PostgreSQL Support
|
||||
|
||||
- Native PostgreSQL support gives you a better performance when you use
|
||||
PostgreSQL.
|
||||
|
||||
Shared Roster groups
|
||||
|
||||
- Shared Roster groups support has been enhanced. New is the ability to add
|
||||
all registered users to everyone's roster. Detailed information about this
|
||||
new feature can be found on http://ejabberd.jabber.ru/shared-roster-all
|
||||
|
||||
Web Interface
|
||||
|
||||
- The web interface internal code has been modified for better integration
|
||||
and compliancy with J-EAI, an ejabberd-based Enterprise Application
|
||||
Integration platform.
|
||||
- More XHTML 1.0 Transitional compliancy work was done.
|
||||
|
||||
Transports
|
||||
|
||||
- A transport workaround can be enabled during compilation. To do this, you
|
||||
can pass the "--enable-roster-gateway-workaround" option to the configure
|
||||
script. (./configure --enable-roster-gateway-workaround)
|
||||
This option allows transports to add items with subscription "to" in the
|
||||
roster by sending <presence type='subscribed'/> stanza to user. This option
|
||||
is only needed for JIT ICQ transport.
|
||||
Warning: by enabling this option, ejabberd will not be fully XMPP compliant
|
||||
anymore.
|
||||
|
||||
Documentation and Internationalization
|
||||
|
||||
- Documentation has been extended to cover more topics.
|
||||
- Translations have been updated.
|
||||
|
||||
Bugfixes
|
||||
|
||||
- This release contains several bugfixes.
|
||||
- Among other bugfixes include improvements to the client-to-server (c2s)
|
||||
connection management module.
|
||||
- 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 to run ejabberd 1.0.0.
|
||||
|
||||
Installation
|
||||
|
||||
Installers are provided for Microsoft Windows and Linux/x86.
|
||||
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.
|
||||
- When upgrading an ODBC-based installation, you will need to change the
|
||||
relational database schema. The following SQL commands must be run on the
|
||||
database:
|
||||
CREATE SEQUENCE spool_seq_seq;
|
||||
ALTER TABLE spool ADD COLUMN seq integer;
|
||||
ALTER TABLE spool ALTER COLUMN seq SET DEFAULT nextval('spool_seq_seq');
|
||||
UPDATE spool SET seq = DEFAULT;
|
||||
ALTER TABLE spool ALTER COLUMN seq SET NOT NULL;
|
||||
|
||||
References
|
||||
|
||||
Contributed tutorials of interest are:
|
||||
- Migration from Jabberd1.4 to ejabberd:
|
||||
http://ejabberd.jabber.ru/jabberd1-to-ejabberd
|
||||
- Migration from Jabberd2 to ejabberd:
|
||||
http://ejabberd.jabber.ru/jabberd2-to-ejabberd
|
||||
- Transport configuration for connecting to other networks:
|
||||
http://ejabberd.jabber.ru/tutorials-transports
|
||||
|
||||
END
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
Release Notes
|
||||
ejabberd 1.1.0
|
||||
24 April 2006
|
||||
|
||||
This document describes the main changes in ejabberd 1.1.0. This version
|
||||
introduce new features including support for new Jabber Enhancement
|
||||
Proposals and several performance improvements enabling deployments on an
|
||||
even larger scale than already possible.
|
||||
|
||||
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:
|
||||
http://support.process-one.net/secure/ReleaseNote.jspa?projectId=10011&styleName=Html&version=10025
|
||||
|
||||
|
||||
Recent changes include:
|
||||
|
||||
|
||||
New Jabber Enhancement Proposal support:
|
||||
|
||||
- JEP-0050: Ad-Hoc Commands.
|
||||
- JEP-0138: Stream Compression.
|
||||
- JEP-0175: SASL anonymous.
|
||||
|
||||
Anonymous login
|
||||
|
||||
- SASL anonymous.
|
||||
- Anonymous login for clients that do not yet support SASL Anonymous.
|
||||
|
||||
Relational database Support
|
||||
|
||||
- MySQL is now fully supported through ODBC and in native mode.
|
||||
- Various improvements to the native database interfaces.
|
||||
- The migration tool can use relational databases.
|
||||
|
||||
Multi-User Chat improvements
|
||||
|
||||
- Logging of room discussion to text file is now supported.
|
||||
- Better reconfiguration support.
|
||||
- Security oriented fixes.
|
||||
- Several improvements and updates to latest JEP-0045.
|
||||
|
||||
Performance scalability improvements for large clusters
|
||||
|
||||
- Improved session synchronisation management between cluster nodes.
|
||||
- Internal architecture has been reworked to use generalize Erlang/OTP
|
||||
framework usage.
|
||||
- Speed improvement on logger.
|
||||
- TCP/IP packet reception change for better network throttling and
|
||||
regulation.
|
||||
As a result, these improvements will reduce load on large scale deployments.
|
||||
|
||||
XMPP Protocol related improvements
|
||||
|
||||
- XML stanza size can be limited.
|
||||
- Messages are send to all resources with the same highest priority.
|
||||
|
||||
Documentation and Internationalization
|
||||
|
||||
- Documentation has been extended to cover more topics.
|
||||
- Translations have been updated.
|
||||
|
||||
Web interface
|
||||
|
||||
- XHTML 1.0 compliance.
|
||||
|
||||
Bugfixes
|
||||
|
||||
- This release contains many bugfixes on various areas such as Publish-Subscribe, build
|
||||
chain, installers, IRC gateway, ejabberdctl, amongst others.
|
||||
- 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.0.
|
||||
|
||||
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 database schema has not been changed comparing to version 1.0.0 and
|
||||
consequently it does not require any 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
|
||||
@@ -0,0 +1,119 @@
|
||||
Release Notes
|
||||
ejabberd 1.1.1
|
||||
28 April 2006
|
||||
|
||||
This document describes the main changes in ejabberd 1.1.x. This version
|
||||
introduce new features including support for new Jabber Enhancement
|
||||
Proposals and several performance improvements enabling deployments on an
|
||||
even larger scale than already possible.
|
||||
|
||||
This release fix a security issue introduced in ejabberd 1.1.0. In SASL
|
||||
mode, anonymous login was enabled as a default. Upgrading ejabberd 1.1.0 to
|
||||
ejabberd 1.1.1 is highly recommended.
|
||||
|
||||
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:
|
||||
http://support.process-one.net/secure/ReleaseNote.jspa?projectId=10011&styleName=Html&version=10025
|
||||
|
||||
|
||||
Recent changes include:
|
||||
|
||||
|
||||
New Jabber Enhancement Proposal support:
|
||||
|
||||
- JEP-0050: Ad-Hoc Commands.
|
||||
- JEP-0138: Stream Compression.
|
||||
- JEP-0175: SASL anonymous.
|
||||
|
||||
Anonymous login
|
||||
|
||||
- SASL anonymous.
|
||||
- Anonymous login for clients that do not yet support SASL Anonymous.
|
||||
|
||||
Relational database Support
|
||||
|
||||
- MySQL is now fully supported through ODBC and in native mode.
|
||||
- Various improvements to the native database interfaces.
|
||||
- The migration tool can use relational databases.
|
||||
|
||||
Multi-User Chat improvements
|
||||
|
||||
- Logging of room discussion to text file is now supported.
|
||||
- Better reconfiguration support.
|
||||
- Security oriented fixes.
|
||||
- Several improvements and updates to latest JEP-0045.
|
||||
|
||||
Performance scalability improvements for large clusters
|
||||
|
||||
- Improved session synchronisation management between cluster nodes.
|
||||
- Internal architecture has been reworked to use generalize Erlang/OTP
|
||||
framework usage.
|
||||
- Speed improvement on logger.
|
||||
- TCP/IP packet reception change for better network throttling and
|
||||
regulation.
|
||||
As a result, these improvements will reduce load on large scale deployments.
|
||||
|
||||
XMPP Protocol related improvements
|
||||
|
||||
- XML stanza size can be limited.
|
||||
- Messages are send to all resources with the same highest priority.
|
||||
|
||||
Documentation and Internationalization
|
||||
|
||||
- Documentation has been extended to cover more topics.
|
||||
- Translations have been updated.
|
||||
|
||||
Web interface
|
||||
|
||||
- XHTML 1.0 compliance.
|
||||
|
||||
Bugfixes
|
||||
|
||||
- This release contains many bugfixes on various areas such as Publish-Subscribe, build
|
||||
chain, installers, IRC gateway, ejabberdctl, amongst others.
|
||||
- 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.0.
|
||||
|
||||
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 database schema has not been changed comparing to version 1.0.0 and
|
||||
consequently it does not require any 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
|
||||
@@ -0,0 +1,119 @@
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
- Anonymous login 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
|
||||
@@ -0,0 +1,14 @@
|
||||
Release Notes
|
||||
ejabberd 1.1.3
|
||||
2 February 2007
|
||||
|
||||
ejabberd 1.1.3 is a security fix release for ejabberd roster ODBC
|
||||
module.
|
||||
|
||||
The upgrade is only necessary if you are using ejabberd with the
|
||||
mod_roster_odbc.
|
||||
|
||||
The new code can be downloaded from ejabberd download page:
|
||||
http://www.process-one.net/en/projects/ejabberd/
|
||||
|
||||
END
|
||||
@@ -0,0 +1,31 @@
|
||||
Release Notes
|
||||
ejabberd 1.1.4
|
||||
3 september 2007
|
||||
|
||||
ejabberd 1.1.4 is a bugfix release for ejabberd 1.1.x branch.
|
||||
|
||||
ejabberd 1.1.4 includes 10 improvements. A complete list of changes
|
||||
can be retrieved from:
|
||||
http://redir.process-one.net/ejabberd-1.1.4
|
||||
|
||||
The new code can be downloaded from ejabberd download page:
|
||||
http://www.process-one.net/en/projects/ejabberd/
|
||||
|
||||
|
||||
Recent changes include:
|
||||
|
||||
- Better LDAP support.
|
||||
- Support for UTF-8 with MySQL 5.
|
||||
- Roster migration script bugfixes.
|
||||
- Performance improvements on user removal.
|
||||
- Traffic shapers bugfix.
|
||||
- Configuration: host value is now case insensitive.
|
||||
- Build: ejabberd.cfg file is not overwritten with 'make install' command.
|
||||
|
||||
|
||||
Bugs report
|
||||
|
||||
You can officially report bugs on Process-one support site:
|
||||
http://support.process-one.net/
|
||||
|
||||
END
|
||||
@@ -0,0 +1,208 @@
|
||||
|
||||
Release Notes
|
||||
ejabberd 2.0.0
|
||||
21 February 2008
|
||||
|
||||
ejabberd 2.0.0 is a major new version for ejabberd adding plenty of
|
||||
new features, performance and scalability improvements and
|
||||
architectural changes.
|
||||
|
||||
ejabberd 2.0.0 includes more than 200 improvements over ejabberd
|
||||
1.1.x. A complete list of changes can be retrieved from:
|
||||
http://redir.process-one.net/ejabberd-2.0.0
|
||||
|
||||
The new code can be downloaded from ejabberd downloads page:
|
||||
http://www.process-one.net/en/ejabberd/
|
||||
|
||||
|
||||
Recent changes include:
|
||||
|
||||
|
||||
* Clustering and Architecture
|
||||
|
||||
- New front-end and back-end cluster architecture for better
|
||||
scalability and robustness. Back-end nodes are able to run a fully
|
||||
fault-tolerant XMPP router and services, but you can now deploy
|
||||
many front-end nodes to share the load without needing to synchronize
|
||||
any state with the back-ends.
|
||||
- All components now run in cluster mode (For example, Multi-User chat
|
||||
service and file transfer proxy).
|
||||
- New load balancing algorithm to support Multi-User chat and gateways
|
||||
clustering. More generally it supports any external component load
|
||||
balancing.
|
||||
- ejabberd watchdog to receive warning on suspicious resources consumption.
|
||||
- Traffic shapers are now supported on components. This protect
|
||||
ejabberd from components and gateways abuses.
|
||||
|
||||
|
||||
* Publish and Subscribe
|
||||
|
||||
- Complete rewrite of the PubSub module. The new PubSub module is
|
||||
plugin-based, allowing developers to create new nodes type. Any
|
||||
application can be plugged to ejabberd and can provide rich presence
|
||||
as a pubsub plugin.
|
||||
- Personal Eventing via Pubsub support (XEP-0163). This module is
|
||||
implemented as a PubSub service. It supports user mood (XEP-107),
|
||||
User Tune (XEP-118), user location (XEP-0080) or user avatar
|
||||
(XEP-0084) for example.
|
||||
|
||||
|
||||
* Server to Server (s2s)
|
||||
|
||||
- More robust code with connection timeout implementation.
|
||||
- Support for multiple s2s connections per domain.
|
||||
- s2s whitelist and blacklist support.
|
||||
- s2s retrial interval.
|
||||
|
||||
|
||||
* LDAP
|
||||
|
||||
- Many enterprise-class enhancements such as better behaviour under
|
||||
heavy load.
|
||||
- Support for LDAP servers pool.
|
||||
- Simplified use of virtual hosting with LDAP with domain substitution
|
||||
in config.
|
||||
- Ability to match on several userid attributes.
|
||||
|
||||
|
||||
* Multi-User Chat
|
||||
|
||||
- Clustering and load balancing support.
|
||||
- Ability to define default room configuration in ejabberd config file.
|
||||
- Many anti abuse features have been added:
|
||||
. New ACL to limit the creation of persistent room to authorized users.
|
||||
. Ability to define the maximum number of users per room.
|
||||
. Limitation of the rate of message and presence packets.
|
||||
. Limitation of the maximum number of room a user can join at the same time.
|
||||
|
||||
|
||||
* File Transfer
|
||||
|
||||
- XEP-0065 - Proxy65 file transfer proxy. The proxy can run in
|
||||
cluster mode.
|
||||
|
||||
|
||||
* Authentication
|
||||
|
||||
- PAM (Pluggable Authentication Modules) support on *nix systems.
|
||||
- External Authentication protocol is now fully documented.
|
||||
|
||||
|
||||
* Web Client Support
|
||||
|
||||
- XEP-0124 - BOSH support: BOSH (Bidirectional-streams Over
|
||||
Synchronous HTTP) was formerly known as "HTTP binding". It provides
|
||||
an efficient alternative to HTTP polling for scalable Web based chat
|
||||
solutions.
|
||||
- HTTP module can now serve static documents (with
|
||||
mod_http_fileserver). It is needed for high-performance Web 2.0 chat
|
||||
/ IM application. System administrators can now avoid using a proxy
|
||||
(like Apache) that handles much less simultaneous than ejabberd HTTP
|
||||
module.
|
||||
- Added limitations enforcement on HTTP poll and HTTP bind modules
|
||||
(bandwidth, packet size).
|
||||
|
||||
|
||||
* System Administration
|
||||
|
||||
- XEP-0133 - Service administration support. System administrators can
|
||||
now perform lot of ejabberd related admin tasks from their XMPP
|
||||
client, through adhoc commands.
|
||||
- Dynamic log levels: Improved logging with more log levels. You can
|
||||
now change the loglevel at run time. No performance penalty is
|
||||
involved when less verbose levels are used.
|
||||
- The ejabberdctl command-line administration script now can start
|
||||
and stop ejabberd. It also includes other useful options.
|
||||
|
||||
|
||||
* Localization
|
||||
|
||||
- ejabberd is now translated to 24 languages: Catalan, Chinese, Czech,
|
||||
Dutch, English, Esperanto, French, Galician, German, Italian, Japanese,
|
||||
Norwegian, Polish, Portuguese, Portuguese (Brazil), Russian, Slovak,
|
||||
Spanish, Swedish, Thai, Turkish, Ukrainian, Vietnamese, Walloon.
|
||||
|
||||
|
||||
* Build and Installer
|
||||
|
||||
- Many launch script improvements.
|
||||
- New translations. The binary installer is now available in Chinese,
|
||||
Dutch, English, French, German, Spanish, Russian.
|
||||
- Makefile now implements uninstall command.
|
||||
- Full MacOSX compliance in Makefile.
|
||||
- Configure script is clever at finding libraries in unusual places.
|
||||
|
||||
|
||||
* Development API
|
||||
|
||||
- Several hooks have been added for module developers (most notably
|
||||
presence related hooks).
|
||||
- HTTP request handler to write HTTP based plugins.
|
||||
- Manage connections IP address.
|
||||
|
||||
|
||||
* Bugfixes
|
||||
|
||||
- ejabberd 2.0.0 also fixes numerous small bugs :) Read the full
|
||||
changelog for details.
|
||||
|
||||
|
||||
|
||||
Important Note:
|
||||
|
||||
- Since this release, ejabberd requires Erlang R10B-5 or higher.
|
||||
R11B-5 is the recommended version. R12 is not yet officially
|
||||
supported, and is not recommended for production servers.
|
||||
|
||||
|
||||
|
||||
Upgrading From ejabberd 1.x:
|
||||
|
||||
- If you upgrade from a version older than 1.1.4, please check the
|
||||
Release Notes of the intermediate versions for additional
|
||||
information about database or configuration changes.
|
||||
|
||||
- The database schemas didn't change since ejabberd 1.1.4. Of course,
|
||||
you are encouraged to make a database backup of your SQL database,
|
||||
or your Mnesia spool directory before upgrading ejabberd.
|
||||
|
||||
- The ejabberdctl command line administration script is improved in
|
||||
ejabberd 2.0.0, and now it can start and stop ejabberd. If you
|
||||
already wrote your own start script for ejabberd 1.x, you can
|
||||
continue using it, or try ejabberdctl. For your convenience, the
|
||||
ejabberd Guide describes all the ejabberd and Erlang options used by
|
||||
ejabberdctl.
|
||||
|
||||
- The example ejabberd.cfg file has been reorganized, but its format
|
||||
and syntax rules are the same. So, you can continue using your
|
||||
ejabberd.cfg file from 1.x if you want. The most important changes
|
||||
are described now.
|
||||
|
||||
- The 'ssl' option is no longer available in the listening ports. For
|
||||
legacy SSL encryption use the option 'tls'. For STARTTLS encryption
|
||||
as defined in RFC 3920 XMPP-CORE use the option 'starttls'. Check
|
||||
the ejabberd Guide for more information about configuring listening
|
||||
ports.
|
||||
|
||||
- The options 'welcome_message' and 'registration_watchers' are now
|
||||
options of the module mod_register. Check in the ejabberd Guide how
|
||||
to configure that module.
|
||||
|
||||
- To enable PEP support in mod_pubsub, you need to enable it in the
|
||||
mod_pubsub configuration, and also enable the new module
|
||||
mod_caps. Check the section about mod_pubsub in the ejabberd Guide.
|
||||
|
||||
- Other new features and improvements also require changes in the
|
||||
ejabberd.cfg, like mod_http_bind, mod_http_fileserver, mod_proxy65,
|
||||
loglevel, pam_service, and watchdog_admins. Search for those words
|
||||
in the ejabberd Guide and the example ejabberd.cfg.
|
||||
|
||||
|
||||
|
||||
Bug Reports
|
||||
|
||||
You can officially report bugs on Process-one support site:
|
||||
https://support.process-one.net/
|
||||
|
||||
|
||||
END
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
Release Notes
|
||||
ejabberd 2.0.1
|
||||
20 May 2008
|
||||
|
||||
ejabberd 2.0.1 is a bugfix release for ejabberd 2.0.x branch.
|
||||
|
||||
ejabberd 2.0.1 includes 10 improvements and 32 bugfixes.
|
||||
A complete list of changes can be retrieved from:
|
||||
http://redir.process-one.net/ejabberd-2.0.1
|
||||
|
||||
The new code can be downloaded from ejabberd download page:
|
||||
http://www.process-one.net/en/projects/ejabberd/
|
||||
|
||||
|
||||
Recent changes include:
|
||||
|
||||
- Erlang R12 support.
|
||||
- Better LDAP handling.
|
||||
- PubSub bugfixes.
|
||||
- Documentation improvements.
|
||||
- inband registration limitation per IP.
|
||||
- s2s improvements.
|
||||
|
||||
Bugs report
|
||||
|
||||
You can officially report bugs on Process-one support site:
|
||||
http://support.process-one.net/
|
||||
|
||||
END
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
Release Notes
|
||||
ejabberd 2.0.2
|
||||
28 August 2008
|
||||
|
||||
ejabberd 2.0.2 is the second bug fix release for ejabberd 2.0.x branch.
|
||||
|
||||
ejabberd 2.0.2 includes many bugfixes and a few improvements.
|
||||
A complete list of changes can be retrieved from:
|
||||
http://redir.process-one.net/ejabberd-2.0.2
|
||||
|
||||
The new code can be downloaded from ejabberd download page:
|
||||
http://www.process-one.net/en/ejabberd/
|
||||
|
||||
|
||||
Recent changes include:
|
||||
|
||||
- Anti-abuse feature: client blacklist support by IP.
|
||||
- Guide: new section Securing ejabberd; improved usability.
|
||||
- LDAP filter optimisation: ability to filter user in ejabberd and not LDAP.
|
||||
- MUC improvements: room options to restrict visitors; broadcast reasons.
|
||||
- Privacy rules: fix MySQL storage.
|
||||
- Pub/Sub and PEP: many improvements in implementation and protocol compliance.
|
||||
- Proxy65: send valid SOCKS5 reply (removed support for Psi < 0.10).
|
||||
- Web server embedded: better support for HTTPS.
|
||||
- Binary installers: SMP on Windows; don't remove config when uninstalling.
|
||||
|
||||
|
||||
Bug reports
|
||||
|
||||
You can officially report bugs on ProcessOne support site:
|
||||
http://support.process-one.net/
|
||||
|
||||
END
|
||||
@@ -0,0 +1,2 @@
|
||||
% ejabberd version (automatically generated).
|
||||
\newcommand{\version}{2.0.x}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 157 KiB |
-687
@@ -1,687 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://usefulinc.com/ns/doap#"
|
||||
xmlns:xmpp="https://linkmauve.fr/ns/xmpp-doap#"
|
||||
xmlns:schema="https://schema.org/">
|
||||
<Project>
|
||||
<name>ejabberd</name>
|
||||
<shortdesc>XMPP Server with MQTT Broker and SIP Service</shortdesc>
|
||||
<description>Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP Server, MQTT Broker, SIP Service)</description>
|
||||
<created>2002-11-16</created>
|
||||
<os>BSD</os>
|
||||
<os>Linux</os>
|
||||
<os>macOS</os>
|
||||
<os>Windows</os>
|
||||
<programming-langauge>Erlang</programming-langauge>
|
||||
<programming-langauge>C</programming-langauge>
|
||||
<category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-jabber"/>
|
||||
<category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-server"/>
|
||||
<category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-xmpp"/>
|
||||
|
||||
<homepage rdf:resource="https://www.ejabberd.im"/>
|
||||
<download-page rdf:resource="https://www.process-one.net/en/ejabberd/downloads/"/>
|
||||
<download-mirror rdf:resource="https://github.com/processone/ejabberd/tags"/>
|
||||
<license rdf:resource="https://raw.githubusercontent.com/processone/ejabberd/master/COPYING"/>
|
||||
<schema:logo rdf:resource="https://docs.ejabberd.im/static/shared/images/footer_logo_e@2x.png"/>
|
||||
<bug-database rdf:resource="https://github.com/processone/ejabberd/issues"/>
|
||||
<support-forum rdf:resource="xmpp:ejabberd@conference.process-one.net?join"/>
|
||||
<repository>
|
||||
<GitRepository>
|
||||
<location rdf:resource="https://github.com/processone/ejabberd.git"/>
|
||||
<browse rdf:resource="https://github.com/processone/ejabberd"/>
|
||||
</GitRepository>
|
||||
</repository>
|
||||
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc3261"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc3920"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc3921"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc5766"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc5802"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc6120"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc6121"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc6122"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc6455"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc7395"/>
|
||||
<implements rdf:resource="https://www.rfc-editor.org/info/rfc7590"/>
|
||||
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0004.html"/>
|
||||
<xmpp:version>2.9</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0012.html"/>
|
||||
<xmpp:version>2.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_last</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0013.html"/>
|
||||
<xmpp:version>1.2</xmpp:version>
|
||||
<xmpp:since>16.02</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_offline</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0016.html"/>
|
||||
<xmpp:version>1.6</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_privacy</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0022.html"/>
|
||||
<xmpp:version>1.4</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_offline</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0023.html"/>
|
||||
<xmpp:version>1.3</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_offline</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0030.html"/>
|
||||
<xmpp:version>2.4</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_disco</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0033.html"/>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
<xmpp:since>15.04</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_multicast</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0039.html"/>
|
||||
<xmpp:version>0.6.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_stats</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0045.html"/>
|
||||
<xmpp:version>1.25</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_muc</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0049.html"/>
|
||||
<xmpp:version>1.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_private</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0050.html"/>
|
||||
<xmpp:version>1.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_adhoc</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0054.html"/>
|
||||
<xmpp:version>1.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_vcard</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0055.html"/>
|
||||
<xmpp:version>1.3</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_vcard</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0060.html"/>
|
||||
<xmpp:version>1.14</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_pubsub</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0065.html"/>
|
||||
<xmpp:version>1.8</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_proxy65</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0077.html"/>
|
||||
<xmpp:version>2.4</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_register</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0078.html"/>
|
||||
<xmpp:version>2.5</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_legacy_auth</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0085.html"/>
|
||||
<xmpp:version>2.1</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_client_state</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0086.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0092.html"/>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_version</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0106.html"/>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0114.html"/>
|
||||
<xmpp:version>1.6</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>ejabberd_service</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0115.html"/>
|
||||
<xmpp:version>1.5</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_caps</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0124.html"/>
|
||||
<xmpp:version>1.11</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>ejabberd_bosh</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0133.html"/>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_configure</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0153.html"/>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_vcard</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0156.html"/>
|
||||
<xmpp:version>1.4.0</xmpp:version>
|
||||
<xmpp:since>22.05</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_host_meta</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0157.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_disco</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0158.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>ejabberd_captcha</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0160.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_offline</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0163.html"/>
|
||||
<xmpp:version>1.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_pubsub</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0170.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0176.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>ejabberd_stun</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0185.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_s2s_dialback</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0191.html"/>
|
||||
<xmpp:version>1.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_blocking</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0198.html"/>
|
||||
<xmpp:version>1.5.2</xmpp:version>
|
||||
<xmpp:since>14.05</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_stream_mgmt</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0199.html"/>
|
||||
<xmpp:version>2.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_ping</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0202.html"/>
|
||||
<xmpp:version>2.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_time</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0205.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0206.html"/>
|
||||
<xmpp:version>1.4</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>ejabberd_bosh</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0212.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0215.html"/>
|
||||
<xmpp:version>0.7</xmpp:version>
|
||||
<xmpp:since>20.04</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_stun_disco</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0216.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0220.html"/>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>ejabberd_s2s, mod_s2s_dialback</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0227.html"/>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>ejabberd_piefxis</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0237.html"/>
|
||||
<xmpp:version>1.3</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_roster</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0243.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0248.html"/>
|
||||
<xmpp:version>0.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_pubsub</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0249.html"/>
|
||||
<xmpp:version>1.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_muc</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0270.html"/>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0279.html"/>
|
||||
<xmpp:version>0.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_sic</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0280.html"/>
|
||||
<xmpp:version>0.13.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_carboncopy</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0313.html"/>
|
||||
<xmpp:version>0.6.1</xmpp:version>
|
||||
<xmpp:since>15.06</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_mam</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0317.html"/>
|
||||
<xmpp:version>0.1</xmpp:version>
|
||||
<xmpp:since>21.12</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_muc_room, conversejs/prosody compatible</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0328.html"/>
|
||||
<xmpp:version>0.1</xmpp:version>
|
||||
<xmpp:since>19.09</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_jidprep</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0334.html"/>
|
||||
<xmpp:version>0.2</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_mam, mod_muc_log, mod_offline</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0352.html"/>
|
||||
<xmpp:version>0.1</xmpp:version>
|
||||
<xmpp:since>14.12</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_client_state</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0355.html"/>
|
||||
<xmpp:version>0.4.1</xmpp:version>
|
||||
<xmpp:since>16.09</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_delegation</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0356.html"/>
|
||||
<xmpp:version>0.2.1</xmpp:version>
|
||||
<xmpp:since>16.09</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_privilege</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0357.html"/>
|
||||
<xmpp:version>0.2</xmpp:version>
|
||||
<xmpp:since>17.08</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_push</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0359.html"/>
|
||||
<xmpp:version>0.5.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_mam</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0363.html"/>
|
||||
<xmpp:version>0.2</xmpp:version>
|
||||
<xmpp:since>15.10</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_http_upload</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0368.html"/>
|
||||
<xmpp:version>1.1.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note></xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0369.html"/>
|
||||
<xmpp:version>0.14.1</xmpp:version>
|
||||
<xmpp:since>16.03</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_mix</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0398.html"/>
|
||||
<xmpp:version>0.2.00.2.0</xmpp:version>
|
||||
<xmpp:since>17.09</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_avatar, mod_vcard_xupdate</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0405.html"/>
|
||||
<xmpp:version>0.3.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_mix_pam</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0410.html"/>
|
||||
<xmpp:version>1.1.0</xmpp:version>
|
||||
<xmpp:since>18.12</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_muc_room</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0411.html"/>
|
||||
<xmpp:version>0.2.0</xmpp:version>
|
||||
<xmpp:since>18.12</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_private</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0425.html"/>
|
||||
<xmpp:version>0.2.1</xmpp:version>
|
||||
<xmpp:since>23.04</xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_mam</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0441.html"/>
|
||||
<xmpp:version>0.2.0</xmpp:version>
|
||||
<xmpp:since></xmpp:since>
|
||||
<xmpp:status></xmpp:status>
|
||||
<xmpp:note>mod_mam</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
</Project>
|
||||
</rdf:RDF>
|
||||
@@ -1,63 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ejabberd
|
||||
# Required-Start: $remote_fs $network $named $time
|
||||
# Required-Stop: $remote_fs $network $named $time
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Starts ejabberd XMPP server
|
||||
# Description: Starts ejabberd XMPP server, an XMPP
|
||||
# compliant server written in Erlang.
|
||||
### END INIT INFO
|
||||
|
||||
# chkconfig: 2345 90 10
|
||||
# description: ejabberd XMPP server
|
||||
|
||||
set -o errexit
|
||||
|
||||
DIR=@ctlscriptpath@
|
||||
CTL="$DIR"/ejabberdctl
|
||||
USER=@installuser@
|
||||
|
||||
test -x "$CTL" || {
|
||||
echo "ERROR: ejabberd not found: $DIR"
|
||||
exit 1
|
||||
}
|
||||
getent passwd "$USER" >/dev/null || {
|
||||
echo "ERROR: System user not found: $USER"
|
||||
exit 2
|
||||
}
|
||||
|
||||
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
test -x "$CTL" || exit 0
|
||||
echo "Starting ejabberd..."
|
||||
su - $USER -c "$CTL start"
|
||||
su - $USER -c "$CTL started"
|
||||
echo "done."
|
||||
;;
|
||||
stop)
|
||||
test -x "$CTL" || exit 0
|
||||
echo "Stopping ejabberd..."
|
||||
su - $USER -c "$CTL stop"
|
||||
su - $USER -c "$CTL stopped"
|
||||
echo "done."
|
||||
;;
|
||||
status)
|
||||
test -x "$CTL" || exit 0
|
||||
echo "Getting ejabberd status..."
|
||||
su - $USER -c "$CTL status"
|
||||
;;
|
||||
force-reload|restart)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|force-reload|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1,22 +0,0 @@
|
||||
[Unit]
|
||||
Description=XMPP Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
User=@installuser@
|
||||
Group=@installuser@
|
||||
LimitNOFILE=65536
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
WatchdogSec=30
|
||||
ExecStart=@ctlscriptpath@/ejabberdctl foreground
|
||||
ExecStop=/bin/sh -c '@ctlscriptpath@/ejabberdctl stop && @ctlscriptpath@/ejabberdctl stopped'
|
||||
ExecReload=@ctlscriptpath@/ejabberdctl reload_config
|
||||
NotifyAccess=all
|
||||
PrivateDevices=true
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
TimeoutSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,240 +0,0 @@
|
||||
###
|
||||
### ejabberd configuration file
|
||||
###
|
||||
### The parameters used in this configuration file are explained at
|
||||
###
|
||||
### https://docs.ejabberd.im/admin/configuration
|
||||
###
|
||||
### The configuration file is written in YAML.
|
||||
### *******************************************************
|
||||
### ******* !!! WARNING !!! *******
|
||||
### ******* YAML IS INDENTATION SENSITIVE *******
|
||||
### ******* MAKE SURE YOU INDENT SECTIONS CORRECTLY *******
|
||||
### *******************************************************
|
||||
### Refer to http://en.wikipedia.org/wiki/YAML for the brief description.
|
||||
###
|
||||
|
||||
hosts:
|
||||
- localhost
|
||||
|
||||
loglevel: info
|
||||
|
||||
## If you already have certificates, list them here
|
||||
# certfiles:
|
||||
# - /etc/letsencrypt/live/domain.tld/fullchain.pem
|
||||
# - /etc/letsencrypt/live/domain.tld/privkey.pem
|
||||
|
||||
listen:
|
||||
-
|
||||
port: 5222
|
||||
ip: "::"
|
||||
module: ejabberd_c2s
|
||||
max_stanza_size: 262144
|
||||
shaper: c2s_shaper
|
||||
access: c2s
|
||||
starttls_required: true
|
||||
-
|
||||
port: 5223
|
||||
ip: "::"
|
||||
tls: true
|
||||
module: ejabberd_c2s
|
||||
max_stanza_size: 262144
|
||||
shaper: c2s_shaper
|
||||
access: c2s
|
||||
starttls_required: true
|
||||
-
|
||||
port: 5269
|
||||
ip: "::"
|
||||
module: ejabberd_s2s_in
|
||||
max_stanza_size: 524288
|
||||
-
|
||||
port: 5443
|
||||
ip: "::"
|
||||
module: ejabberd_http
|
||||
tls: true
|
||||
request_handlers:
|
||||
/admin: ejabberd_web_admin
|
||||
/api: mod_http_api
|
||||
/bosh: mod_bosh
|
||||
/captcha: ejabberd_captcha
|
||||
/upload: mod_http_upload
|
||||
/ws: ejabberd_http_ws
|
||||
-
|
||||
port: 5280
|
||||
ip: "::"
|
||||
module: ejabberd_http
|
||||
request_handlers:
|
||||
/admin: ejabberd_web_admin
|
||||
/.well-known/acme-challenge: ejabberd_acme
|
||||
-
|
||||
port: 3478
|
||||
ip: "::"
|
||||
transport: udp
|
||||
module: ejabberd_stun
|
||||
use_turn: true
|
||||
## The server's public IPv4 address:
|
||||
# turn_ipv4_address: "203.0.113.3"
|
||||
## The server's public IPv6 address:
|
||||
# turn_ipv6_address: "2001:db8::3"
|
||||
-
|
||||
port: 1883
|
||||
ip: "::"
|
||||
module: mod_mqtt
|
||||
backlog: 1000
|
||||
|
||||
s2s_use_starttls: optional
|
||||
|
||||
acl:
|
||||
local:
|
||||
user_regexp: ""
|
||||
loopback:
|
||||
ip:
|
||||
- 127.0.0.0/8
|
||||
- ::1/128
|
||||
|
||||
access_rules:
|
||||
local:
|
||||
allow: local
|
||||
c2s:
|
||||
deny: blocked
|
||||
allow: all
|
||||
announce:
|
||||
allow: admin
|
||||
configure:
|
||||
allow: admin
|
||||
muc_create:
|
||||
allow: local
|
||||
pubsub_createnode:
|
||||
allow: local
|
||||
trusted_network:
|
||||
allow: loopback
|
||||
|
||||
api_permissions:
|
||||
"console commands":
|
||||
from:
|
||||
- ejabberd_ctl
|
||||
who: all
|
||||
what: "*"
|
||||
"admin access":
|
||||
who:
|
||||
access:
|
||||
allow:
|
||||
- acl: loopback
|
||||
- acl: admin
|
||||
oauth:
|
||||
scope: "ejabberd:admin"
|
||||
access:
|
||||
allow:
|
||||
- acl: loopback
|
||||
- acl: admin
|
||||
what:
|
||||
- "*"
|
||||
- "!stop"
|
||||
- "!start"
|
||||
"public commands":
|
||||
who:
|
||||
ip: 127.0.0.1/8
|
||||
what:
|
||||
- status
|
||||
- connected_users_number
|
||||
|
||||
shaper:
|
||||
normal:
|
||||
rate: 3000
|
||||
burst_size: 20000
|
||||
fast: 100000
|
||||
|
||||
shaper_rules:
|
||||
max_user_sessions: 10
|
||||
max_user_offline_messages:
|
||||
5000: admin
|
||||
100: all
|
||||
c2s_shaper:
|
||||
none: admin
|
||||
normal: all
|
||||
s2s_shaper: fast
|
||||
|
||||
modules:
|
||||
mod_adhoc: {}
|
||||
mod_admin_extra: {}
|
||||
mod_announce:
|
||||
access: announce
|
||||
mod_avatar: {}
|
||||
mod_blocking: {}
|
||||
mod_bosh: {}
|
||||
mod_caps: {}
|
||||
mod_carboncopy: {}
|
||||
mod_client_state: {}
|
||||
mod_configure: {}
|
||||
mod_disco: {}
|
||||
mod_fail2ban: {}
|
||||
mod_http_api: {}
|
||||
mod_http_upload:
|
||||
put_url: https://@HOST@:5443/upload
|
||||
custom_headers:
|
||||
"Access-Control-Allow-Origin": "https://@HOST@"
|
||||
"Access-Control-Allow-Methods": "GET,HEAD,PUT,OPTIONS"
|
||||
"Access-Control-Allow-Headers": "Content-Type"
|
||||
mod_last: {}
|
||||
mod_mam:
|
||||
## Mnesia is limited to 2GB, better to use an SQL backend
|
||||
## For small servers SQLite is a good fit and is very easy
|
||||
## to configure. Uncomment this when you have SQL configured:
|
||||
## db_type: sql
|
||||
assume_mam_usage: true
|
||||
default: always
|
||||
mod_mqtt: {}
|
||||
mod_muc:
|
||||
access:
|
||||
- allow
|
||||
access_admin:
|
||||
- allow: admin
|
||||
access_create: muc_create
|
||||
access_persistent: muc_create
|
||||
access_mam:
|
||||
- allow
|
||||
default_room_options:
|
||||
mam: true
|
||||
mod_muc_admin: {}
|
||||
mod_offline:
|
||||
access_max_user_messages: max_user_offline_messages
|
||||
mod_ping: {}
|
||||
mod_privacy: {}
|
||||
mod_private: {}
|
||||
mod_proxy65:
|
||||
access: local
|
||||
max_connections: 5
|
||||
mod_pubsub:
|
||||
access_createnode: pubsub_createnode
|
||||
plugins:
|
||||
- flat
|
||||
- pep
|
||||
force_node_config:
|
||||
## Avoid buggy clients to make their bookmarks public
|
||||
storage:bookmarks:
|
||||
access_model: whitelist
|
||||
mod_push: {}
|
||||
mod_push_keepalive: {}
|
||||
mod_register:
|
||||
## Only accept registration requests from the "trusted"
|
||||
## network (see access_rules section above).
|
||||
## Think twice before enabling registration from any
|
||||
## address. See the Jabber SPAM Manifesto for details:
|
||||
## https://github.com/ge0rg/jabber-spam-fighting-manifesto
|
||||
ip_access: trusted_network
|
||||
mod_roster:
|
||||
versioning: true
|
||||
mod_s2s_dialback: {}
|
||||
mod_shared_roster: {}
|
||||
mod_stream_mgmt:
|
||||
resend_on_timeout: if_offline
|
||||
mod_stun_disco: {}
|
||||
mod_vcard: {}
|
||||
mod_vcard_xupdate: {}
|
||||
mod_version:
|
||||
show_os: false
|
||||
|
||||
### Local Variables:
|
||||
### mode: yaml
|
||||
### End:
|
||||
### vim: set filetype=yaml tabstop=8
|
||||
@@ -1,188 +0,0 @@
|
||||
#
|
||||
# In this file you can configure options that are passed by ejabberdctl
|
||||
# to the erlang runtime system when starting ejabberd
|
||||
#
|
||||
|
||||
#' POLL: Kernel polling ([true|false])
|
||||
#
|
||||
# The kernel polling option requires support in the kernel.
|
||||
# Additionally, you need to enable this feature while compiling Erlang.
|
||||
#
|
||||
# Default: true
|
||||
#
|
||||
#POLL=true
|
||||
|
||||
#.
|
||||
#' ERL_MAX_PORTS: Maximum number of simultaneously open Erlang ports
|
||||
#
|
||||
# ejabberd consumes two or three ports for every connection, either
|
||||
# from a client or from another XMPP server. So take this into
|
||||
# account when setting this limit.
|
||||
#
|
||||
# Default: 65536 (or 8196 on Windows)
|
||||
# Maximum: 268435456
|
||||
#
|
||||
#ERL_MAX_PORTS=65536
|
||||
|
||||
#.
|
||||
#' FIREWALL_WINDOW: Range of allowed ports to pass through a firewall
|
||||
#
|
||||
# If ejabberd is configured to run in cluster, and a firewall is blocking ports,
|
||||
# it's possible to make Erlang use a defined range of port (instead of dynamic
|
||||
# ports) for node communication.
|
||||
#
|
||||
# Default: not defined
|
||||
# Example: 4200-4210
|
||||
#
|
||||
#FIREWALL_WINDOW=
|
||||
|
||||
#.
|
||||
#' INET_DIST_INTERFACE: IP address where this Erlang node listens other nodes
|
||||
#
|
||||
# This communication is used by ejabberdctl command line tool,
|
||||
# and in a cluster of several ejabberd nodes.
|
||||
#
|
||||
# Default: 0.0.0.0
|
||||
#
|
||||
#INET_DIST_INTERFACE=127.0.0.1
|
||||
|
||||
#.
|
||||
#' ERL_DIST_PORT: Port number for Erlang distribution
|
||||
#
|
||||
# For Erlang distribution, clustering and ejabberdctl usage, the
|
||||
# Erlang VM listens in a random TCP port number, and the Erlang Port
|
||||
# Mapper Daemon (EPMD) is spawned and used to determine this port
|
||||
# number.
|
||||
#
|
||||
# ERL_DIST_PORT can define this port number. In that case, EPMD is
|
||||
# not spawned during ejabberd startup, and ERL_EPMD_ADDRESS is
|
||||
# ignored. ERL_DIST_PORT must be set to the same port number during
|
||||
# ejabberd startup and when calling ejabberdctl. This feature
|
||||
# requires at least Erlang/OTP 23.1.
|
||||
#
|
||||
# Default: not defined
|
||||
#
|
||||
#ERL_DIST_PORT=5210
|
||||
|
||||
#.
|
||||
#' ERL_EPMD_ADDRESS: IP addresses where EPMD listens for connections
|
||||
#
|
||||
# This environment variable may be set to a comma-separated
|
||||
# list of IP addresses, in which case the EPMD daemon
|
||||
# will listen only on the specified address(es) and on the
|
||||
# loopback address (which is implicitly added to the list if it
|
||||
# has not been specified). The default behaviour is to listen on
|
||||
# all available IP addresses.
|
||||
#
|
||||
# Default: 0.0.0.0
|
||||
#
|
||||
#ERL_EPMD_ADDRESS=127.0.0.1
|
||||
|
||||
#.
|
||||
#' ERL_PROCESSES: Maximum number of Erlang processes
|
||||
#
|
||||
# Erlang consumes a lot of lightweight processes. If there is a lot of activity
|
||||
# on ejabberd so that the maximum number of processes is reached, people will
|
||||
# experience greater latency times. As these processes are implemented in
|
||||
# Erlang, and therefore not related to the operating system processes, you do
|
||||
# not have to worry about allowing a huge number of them.
|
||||
#
|
||||
# Default: 262144
|
||||
# Maximum: 268435456
|
||||
#
|
||||
#ERL_PROCESSES=262144
|
||||
|
||||
#.
|
||||
#' ERL_MAX_ETS_TABLES: Maximum number of ETS and Mnesia tables
|
||||
#
|
||||
# The number of concurrent ETS and Mnesia tables is limited. When the limit is
|
||||
# reached, errors will appear in the logs:
|
||||
# ** Too many db tables **
|
||||
# You can safely increase this limit when starting ejabberd. It impacts memory
|
||||
# consumption but the difference will be quite small.
|
||||
#
|
||||
# Default: 2053
|
||||
#
|
||||
#ERL_MAX_ETS_TABLES=2053
|
||||
|
||||
#.
|
||||
#' ERL_OPTIONS: Additional Erlang options
|
||||
#
|
||||
# The next variable allows to specify additional options passed to erlang while
|
||||
# starting ejabberd. Some useful options are -noshell, -detached, -heart. When
|
||||
# ejabberd is started from an init.d script options -noshell and -detached are
|
||||
# added implicitly. See erl(1) for more info.
|
||||
#
|
||||
# It might be useful to add "-pa /usr/local/lib/ejabberd/ebin" if you
|
||||
# want to add local modules in this path.
|
||||
#
|
||||
# Default: ""
|
||||
#
|
||||
#ERL_OPTIONS=""
|
||||
|
||||
#.
|
||||
#' ERLANG_NODE: Erlang node name
|
||||
#
|
||||
# The next variable allows to explicitly specify erlang node for ejabberd
|
||||
# It can be given in different formats:
|
||||
# ERLANG_NODE=ejabberd
|
||||
# Lets erlang add hostname to the node (ejabberd uses short name in this case)
|
||||
# ERLANG_NODE=ejabberd@hostname
|
||||
# Erlang uses node name as is (so make sure that hostname is a real
|
||||
# machine hostname or you'll not be able to control ejabberd)
|
||||
# ERLANG_NODE=ejabberd@hostname.domainname
|
||||
# The same as previous, but erlang will use long hostname
|
||||
# (see erl (1) manual for details)
|
||||
#
|
||||
# Default: ejabberd@localhost
|
||||
#
|
||||
#ERLANG_NODE=ejabberd@localhost
|
||||
|
||||
#.
|
||||
#' EJABBERD_PID_PATH: ejabberd PID file
|
||||
#
|
||||
# Indicate the full path to the ejabberd Process identifier (PID) file.
|
||||
# If this variable is defined, ejabberd writes the PID file when starts,
|
||||
# and deletes it when stops.
|
||||
# Remember to create the directory and grant write permission to ejabberd.
|
||||
#
|
||||
# Default: don't write PID file
|
||||
#
|
||||
#EJABBERD_PID_PATH=/var/run/ejabberd/ejabberd.pid
|
||||
|
||||
#.
|
||||
#' EJABBERD_CONFIG_PATH: ejabberd configuration file
|
||||
#
|
||||
# Specify the full path to the ejabberd configuration file. If the file name has
|
||||
# yml or yaml extension, it is parsed as a YAML file; otherwise, Erlang syntax is
|
||||
# expected.
|
||||
#
|
||||
# Default: $ETC_DIR/ejabberd.yml
|
||||
#
|
||||
#EJABBERD_CONFIG_PATH=/etc/ejabberd/ejabberd.yml
|
||||
|
||||
#.
|
||||
#' CONTRIB_MODULES_PATH: contributed ejabberd modules path
|
||||
#
|
||||
# Specify the full path to the contributed ejabberd modules. If the path is not
|
||||
# defined, ejabberd will use ~/.ejabberd-modules in home of user running ejabberd.
|
||||
#
|
||||
# Default: $HOME/.ejabberd-modules
|
||||
#
|
||||
#CONTRIB_MODULES_PATH=/opt/ejabberd-modules
|
||||
|
||||
#.
|
||||
#' CONTRIB_MODULES_CONF_DIR: configuration directory for contributed modules
|
||||
#
|
||||
# Specify the full path to the configuration directory for contributed ejabberd
|
||||
# modules. In order to configure a module named mod_foo, a mod_foo.yml file can
|
||||
# be created in this directory. This file will then be used instead of the
|
||||
# default configuration file provided with the module.
|
||||
#
|
||||
# Default: $CONTRIB_MODULES_PATH/conf
|
||||
#
|
||||
#CONTRIB_MODULES_CONF_DIR=/etc/ejabberd/modules
|
||||
|
||||
#.
|
||||
#'
|
||||
# vim: foldmarker=#',#. foldmethod=marker:
|
||||
@@ -1,347 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# define default configuration
|
||||
POLL=true
|
||||
ERL_MAX_PORTS=32000
|
||||
ERL_PROCESSES=250000
|
||||
ERL_MAX_ETS_TABLES=1400
|
||||
FIREWALL_WINDOW=""
|
||||
INET_DIST_INTERFACE=""
|
||||
ERLANG_NODE=ejabberd@localhost
|
||||
|
||||
# define default environment variables
|
||||
[ -z "$SCRIPT" ] && SCRIPT=$0
|
||||
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd -P)"
|
||||
# shellcheck disable=SC2034
|
||||
ERTS_VSN="{{erts_vsn}}"
|
||||
ERL="{{erl}}"
|
||||
IEX="{{bindir}}/iex"
|
||||
EPMD="{{epmd}}"
|
||||
INSTALLUSER="{{installuser}}"
|
||||
|
||||
# check the proper system user is used
|
||||
case $(id -un) in
|
||||
"$INSTALLUSER")
|
||||
EXEC_CMD="as_current_user"
|
||||
;;
|
||||
root)
|
||||
if [ -n "$INSTALLUSER" ] ; then
|
||||
EXEC_CMD="as_install_user"
|
||||
else
|
||||
EXEC_CMD="as_current_user"
|
||||
echo "WARNING: It is not recommended to run ejabberd as root" >&2
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if [ -n "$INSTALLUSER" ] ; then
|
||||
echo "ERROR: This command can only be run by root or the user $INSTALLUSER" >&2
|
||||
exit 7
|
||||
else
|
||||
EXEC_CMD="as_current_user"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# parse command line parameters
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
-n|--node) ERLANG_NODE_ARG=$2; shift 2;;
|
||||
-s|--spool) SPOOL_DIR=$2; shift 2;;
|
||||
-l|--logs) LOGS_DIR=$2; shift 2;;
|
||||
-f|--config) EJABBERD_CONFIG_PATH=$2; shift 2;;
|
||||
-c|--ctl-config) EJABBERDCTL_CONFIG_PATH=$2; shift 2;;
|
||||
-d|--config-dir) CONFIG_DIR=$2; shift 2;;
|
||||
-t|--no-timeout) NO_TIMEOUT="--no-timeout"; shift;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
# define ejabberd variables if not already defined from the command line
|
||||
: "${CONFIG_DIR:="{{config_dir}}"}"
|
||||
: "${LOGS_DIR:="{{logs_dir}}"}"
|
||||
: "${EJABBERD_CONFIG_PATH:="$CONFIG_DIR/ejabberd.yml"}"
|
||||
: "${EJABBERDCTL_CONFIG_PATH:="$CONFIG_DIR/ejabberdctl.cfg"}"
|
||||
# Allows passing extra Erlang command-line arguments in vm.args file
|
||||
: "${VMARGS:="$CONFIG_DIR/vm.args"}"
|
||||
# shellcheck source=ejabberdctl.cfg.example
|
||||
[ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH"
|
||||
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
|
||||
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
|
||||
: "${SPOOL_DIR:="{{spool_dir}}"}"
|
||||
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
|
||||
|
||||
# define erl parameters
|
||||
ERLANG_OPTS="+K $POLL +P $ERL_PROCESSES $ERL_OPTIONS"
|
||||
if [ -n "$FIREWALL_WINDOW" ] ; then
|
||||
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}"
|
||||
fi
|
||||
if [ -n "$INET_DIST_INTERFACE" ] ; then
|
||||
INET_DIST_INTERFACE2=$("$ERL" -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt)
|
||||
if [ -n "$INET_DIST_INTERFACE2" ] ; then
|
||||
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
|
||||
fi
|
||||
fi
|
||||
[ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -erl_epmd_port $ERL_DIST_PORT -start_epmd false"
|
||||
# if vm.args file exists in config directory, pass it to Erlang VM
|
||||
[ -f "$VMARGS" ] && ERLANG_OPTS="$ERLANG_OPTS -args_file $VMARGS"
|
||||
ERL_LIBS='{{libdir}}'
|
||||
ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
|
||||
ERL_INETRC="$CONFIG_DIR"/inetrc
|
||||
|
||||
# define ejabberd parameters
|
||||
EJABBERD_OPTS="$EJABBERD_OPTS\
|
||||
$(sed '/^log_rotate_size/!d;s/:[ \t]*\([0-9]\{1,\}\).*/ \1/;s/:[ \t]*\(infinity\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")\
|
||||
$(sed '/^log_rotate_count/!d;s/:[ \t]*\([0-9]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")\
|
||||
$(sed '/^log_burst_limit_count/!d;s/:[ \t]*\([0-9]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")\
|
||||
$(sed '/^log_burst_limit_window_time/!d;s/:[ \t]*\([0-9]*[a-z]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")"
|
||||
[ -n "$EJABBERD_OPTS" ] && EJABBERD_OPTS="-ejabberd $EJABBERD_OPTS"
|
||||
EJABBERD_OPTS="-mnesia dir \"$SPOOL_DIR\" $MNESIA_OPTIONS $EJABBERD_OPTS -s ejabberd"
|
||||
|
||||
# export global variables
|
||||
export EJABBERD_CONFIG_PATH
|
||||
export EJABBERD_LOG_PATH
|
||||
export EJABBERD_PID_PATH
|
||||
export ERL_CRASH_DUMP
|
||||
export ERL_EPMD_ADDRESS
|
||||
export ERL_DIST_PORT
|
||||
export ERL_INETRC
|
||||
export ERL_MAX_PORTS
|
||||
export ERL_MAX_ETS_TABLES
|
||||
export CONTRIB_MODULES_PATH
|
||||
export CONTRIB_MODULES_CONF_DIR
|
||||
export ERL_LIBS
|
||||
export SCRIPT_DIR
|
||||
|
||||
set_dist_client()
|
||||
{
|
||||
[ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -dist_listen false"
|
||||
}
|
||||
|
||||
# run command either directly or via su $INSTALLUSER
|
||||
exec_cmd()
|
||||
{
|
||||
case $EXEC_CMD in
|
||||
as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
|
||||
as_current_user) "$@" ;;
|
||||
esac
|
||||
}
|
||||
exec_erl()
|
||||
{
|
||||
NODE=$1; shift
|
||||
exec_cmd "$ERL" ${S:--}name "$NODE" $ERLANG_OPTS "$@"
|
||||
}
|
||||
exec_iex()
|
||||
{
|
||||
NODE=$1; shift
|
||||
exec_cmd "$IEX" -${S:--}name "$NODE" --erl "$ERLANG_OPTS" "$@"
|
||||
}
|
||||
|
||||
# usage
|
||||
debugwarning()
|
||||
{
|
||||
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo ""
|
||||
echo "IMPORTANT: we will attempt to attach an INTERACTIVE shell"
|
||||
echo "to an already running ejabberd node."
|
||||
echo "If an ERROR is printed, it means the connection was not successful."
|
||||
echo "You can interact with the ejabberd node if you know how to use it."
|
||||
echo "Please be extremely cautious with your actions,"
|
||||
echo "and exit immediately if you are not completely sure."
|
||||
echo ""
|
||||
echo "To detach this shell from ejabberd, press:"
|
||||
echo " control+c, control+c"
|
||||
echo ""
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:"
|
||||
echo " EJABBERD_BYPASS_WARNINGS=true"
|
||||
echo "Press return to continue"
|
||||
read -r _
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
livewarning()
|
||||
{
|
||||
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo ""
|
||||
echo "IMPORTANT: ejabberd is going to start in LIVE (interactive) mode."
|
||||
echo "All log messages will be shown in the command shell."
|
||||
echo "You can interact with the ejabberd node if you know how to use it."
|
||||
echo "Please be extremely cautious with your actions,"
|
||||
echo "and exit immediately if you are not completely sure."
|
||||
echo ""
|
||||
echo "To exit this LIVE mode and stop ejabberd, press:"
|
||||
echo " q(). and press the Enter key"
|
||||
echo ""
|
||||
echo "--------------------------------------------------------------------"
|
||||
echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:"
|
||||
echo " EJABBERD_BYPASS_WARNINGS=true"
|
||||
echo "Press return to continue"
|
||||
read -r _
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
help()
|
||||
{
|
||||
echo ""
|
||||
echo "Commands to start an ejabberd node:"
|
||||
echo " start Start in server mode"
|
||||
echo " foreground Start in server mode (attached)"
|
||||
echo " foreground-quiet Start in server mode (attached), show only critical messages"
|
||||
echo " live Start in interactive mode, with Erlang shell"
|
||||
echo " iexlive Start in interactive mode, with Elixir shell"
|
||||
echo ""
|
||||
echo "Commands to interact with a running ejabberd node:"
|
||||
echo " debug Attach an interactive Erlang shell to a running node"
|
||||
echo " iexdebug Attach an interactive Elixir shell to a running node"
|
||||
echo " etop Attach to a running node and start Erlang Top"
|
||||
echo " ping Send ping to the node, returns pong or pang"
|
||||
echo " started|stopped Wait for the node to fully start|stop"
|
||||
echo ""
|
||||
echo "Optional parameters when starting an ejabberd node:"
|
||||
echo " --config-dir dir Config ejabberd: $CONFIG_DIR"
|
||||
echo " --config file Config ejabberd: $EJABBERD_CONFIG_PATH"
|
||||
echo " --ctl-config file Config ejabberdctl: $EJABBERDCTL_CONFIG_PATH"
|
||||
echo " --logs dir Directory for logs: $LOGS_DIR"
|
||||
echo " --spool dir Database spool dir: $SPOOL_DIR"
|
||||
echo " --node nodename ejabberd node name: $ERLANG_NODE"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# dynamic node name helper
|
||||
uid()
|
||||
{
|
||||
uuid=$(uuidgen 2>/dev/null)
|
||||
random=$(awk 'BEGIN { srand(); print int(rand()*32768) }' /dev/null)
|
||||
[ -z "$uuid" ] && [ -f /proc/sys/kernel/random/uuid ] && uuid=$(cat /proc/sys/kernel/random/uuid)
|
||||
[ -z "$uuid" ] && uuid=$(printf "%X" "${random:-$$}$(date +%M%S)")
|
||||
uuid=$(printf '%s' $uuid | sed 's/^\(...\).*$/\1/')
|
||||
[ $# -eq 0 ] && echo "${uuid}-${ERLANG_NODE}"
|
||||
[ $# -eq 1 ] && echo "${uuid}-${1}-${ERLANG_NODE}"
|
||||
[ $# -eq 2 ] && echo "${uuid}-${1}@${2}"
|
||||
}
|
||||
|
||||
# stop epmd if there is no other running node
|
||||
stop_epmd()
|
||||
{
|
||||
[ -n "$ERL_DIST_PORT" ] && return
|
||||
"$EPMD" -names 2>/dev/null | grep -q name || "$EPMD" -kill >/dev/null
|
||||
}
|
||||
|
||||
# make sure node not already running and node name unregistered
|
||||
# if all ok, ensure runtime directory exists and make it current directory
|
||||
check_start()
|
||||
{
|
||||
[ -n "$ERL_DIST_PORT" ] && return
|
||||
"$EPMD" -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && {
|
||||
pgrep -f "$ERLANG_NODE" >/dev/null && {
|
||||
echo "ERROR: The ejabberd node '$ERLANG_NODE' is already running."
|
||||
exit 4
|
||||
}
|
||||
pgrep beam >/dev/null && {
|
||||
echo "ERROR: The ejabberd node '$ERLANG_NODE' is registered,"
|
||||
echo " but no related beam process has been found."
|
||||
echo "Shutdown all other erlang nodes, and call 'epmd -kill'."
|
||||
exit 5
|
||||
}
|
||||
"$EPMD" -kill >/dev/null
|
||||
}
|
||||
}
|
||||
|
||||
# allow sync calls
|
||||
wait_status()
|
||||
{
|
||||
# args: status try delay
|
||||
# return: 0 OK, 1 KO
|
||||
timeout="$2"
|
||||
status=4
|
||||
while [ "$status" -ne "$1" ] ; do
|
||||
sleep "$3"
|
||||
timeout=$((timeout - 1))
|
||||
if [ $timeout -eq 0 ] ; then
|
||||
status="$1"
|
||||
else
|
||||
exec_erl "$(uid ctl)" -hidden -noinput -s ejabberd_ctl \
|
||||
-extra "$ERLANG_NODE" $NO_TIMEOUT status > /dev/null
|
||||
status="$?"
|
||||
fi
|
||||
done
|
||||
[ $timeout -gt 0 ]
|
||||
}
|
||||
|
||||
# ensure we can change current directory to SPOOL_DIR
|
||||
[ -d "$SPOOL_DIR" ] || exec_cmd mkdir -p "$SPOOL_DIR"
|
||||
cd "$SPOOL_DIR" || {
|
||||
echo "ERROR: can not access directory $SPOOL_DIR"
|
||||
exit 6
|
||||
}
|
||||
|
||||
# main
|
||||
case $1 in
|
||||
start)
|
||||
check_start
|
||||
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -detached
|
||||
;;
|
||||
foreground)
|
||||
check_start
|
||||
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -noinput
|
||||
;;
|
||||
foreground-quiet)
|
||||
check_start
|
||||
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -noinput -ejabberd quiet true
|
||||
;;
|
||||
live)
|
||||
livewarning
|
||||
check_start
|
||||
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS
|
||||
;;
|
||||
debug)
|
||||
debugwarning
|
||||
set_dist_client
|
||||
exec_erl "$(uid debug)" -hidden -remsh "$ERLANG_NODE"
|
||||
;;
|
||||
etop)
|
||||
set_dist_client
|
||||
exec_erl "$(uid top)" -hidden -node "$ERLANG_NODE" -s etop \
|
||||
-s erlang halt -output text
|
||||
;;
|
||||
iexdebug)
|
||||
debugwarning
|
||||
set_dist_client
|
||||
exec_iex "$(uid debug)" --remsh "$ERLANG_NODE"
|
||||
;;
|
||||
iexlive)
|
||||
livewarning
|
||||
exec_iex "$ERLANG_NODE" --erl "$EJABBERD_OPTS" --app ejabberd
|
||||
;;
|
||||
ping)
|
||||
PEER=${2:-$ERLANG_NODE}
|
||||
[ "$PEER" = "${PEER%.*}" ] && PS="-s"
|
||||
set_dist_client
|
||||
exec_cmd "$ERL" ${PS:--}name "$(uid ping "$(hostname $PS)")" $ERLANG_OPTS \
|
||||
-noinput -hidden -eval 'io:format("~p~n",[net_adm:ping('"'$PEER'"')])' \
|
||||
-s erlang halt -output text
|
||||
;;
|
||||
started)
|
||||
set_dist_client
|
||||
wait_status 0 30 2 # wait 30x2s before timeout
|
||||
;;
|
||||
stopped)
|
||||
set_dist_client
|
||||
wait_status 3 30 2 && stop_epmd # wait 30x2s before timeout
|
||||
;;
|
||||
*)
|
||||
set_dist_client
|
||||
exec_erl "$(uid ctl)" -hidden -noinput -s ejabberd_ctl \
|
||||
-extra "$ERLANG_NODE" $NO_TIMEOUT "$@"
|
||||
result=$?
|
||||
case $result in
|
||||
2|3) help;;
|
||||
*) :;;
|
||||
esac
|
||||
exit $result
|
||||
;;
|
||||
esac
|
||||
@@ -1,42 +0,0 @@
|
||||
[
|
||||
{
|
||||
elvis,
|
||||
[
|
||||
{config,
|
||||
[#{dirs => ["src"],
|
||||
filter => "*.erl",
|
||||
ruleset => erl_files,
|
||||
rules => [{elvis_style, line_length, #{limit => 100,
|
||||
skip_comments => false}},
|
||||
{elvis_text_style, no_tabs, disable},
|
||||
{elvis_style, no_debug_call, disable},
|
||||
{elvis_style, operator_spaces, disable},
|
||||
{elvis_style, invalid_dynamic_call, disable},
|
||||
{elvis_style, variable_naming_convention, #{ regex => ".*" }},
|
||||
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}}
|
||||
]
|
||||
},
|
||||
#{dirs => ["."],
|
||||
filter => "Makefile.in",
|
||||
ruleset => makefiles,
|
||||
rules => [{elvis_style, line_length, #{limit => 100,
|
||||
skip_comments => false}},
|
||||
{elvis_style, no_tabs, disable},
|
||||
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}}
|
||||
]
|
||||
},
|
||||
#{dirs => ["."],
|
||||
filter => "rebar.config",
|
||||
ruleset => rebar_config,
|
||||
rules => [{elvis_style, line_length, #{limit => 100,
|
||||
skip_comments => false}},
|
||||
{elvis_style, no_tabs, disable},
|
||||
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
].
|
||||
@@ -1,32 +0,0 @@
|
||||
otp_path: "/usr/lib/erlang"
|
||||
plt_path: "_build/default/rebar3_24.3.3_plt"
|
||||
#code_reload:
|
||||
# node: ejabberd@localhost
|
||||
apps_dirs:
|
||||
- "_build/default/lib/*"
|
||||
deps_dirs:
|
||||
- "_build/default/lib/*"
|
||||
include_dirs:
|
||||
- "_build/default/lib"
|
||||
- "_build/default/lib/*/include"
|
||||
- "include"
|
||||
macros:
|
||||
- name: DEPRECATED_GET_STACKTRACE
|
||||
- name: HAVE_ERL_ERROR
|
||||
- name: HAVE_URI_STRING
|
||||
- name: OTP_BELOW_25
|
||||
- name: SIP
|
||||
- name: STUN
|
||||
diagnostics:
|
||||
# enabled:
|
||||
# - crossref
|
||||
disabled:
|
||||
# - dialyzer
|
||||
- unused_includes # Otherwise it complains about unused logger.hrl
|
||||
lenses:
|
||||
disabled:
|
||||
- ct-run-test
|
||||
- function-references
|
||||
- server-info
|
||||
- show-behaviour-usages
|
||||
- suggest-spec
|
||||
Executable → Regular
-16
@@ -42,22 +42,6 @@ while(1)
|
||||
# password is null. Return 1 if the user $user\@$domain exitst.
|
||||
$result = 1;
|
||||
},last SWITCH;
|
||||
|
||||
$op eq 'tryregister' and do
|
||||
{
|
||||
$result = 1;
|
||||
},last SWITCH;
|
||||
|
||||
$op eq 'removeuser' and do
|
||||
{
|
||||
# password is null. Return 1 if the user $user\@$domain exitst.
|
||||
$result = 1;
|
||||
},last SWITCH;
|
||||
|
||||
$op eq 'removeuser3' and do
|
||||
{
|
||||
$result = 1;
|
||||
},last SWITCH;
|
||||
};
|
||||
my $out = pack "nn",2,$result ? 1 : 0;
|
||||
syswrite STDOUT,$out;
|
||||
|
||||
@@ -70,7 +70,7 @@ done
|
||||
echo '7. compile ejabberd'
|
||||
|
||||
gmake
|
||||
for A in mod_muc mod_pubsub; do
|
||||
for A in mod_irc mod_muc mod_pubsub; do
|
||||
(cd $A; gmake)
|
||||
done
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ override_acls.
|
||||
{mod_offline, []},
|
||||
{mod_echo, [{host, "echo.jabber.dbc.mtview.ca.us"}]},
|
||||
{mod_private, []},
|
||||
% {mod_irc, []},
|
||||
{mod_muc, []},
|
||||
{mod_pubsub, []},
|
||||
{mod_time, []},
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<!-- aim-transport.xml -->
|
||||
|
||||
<jabber>
|
||||
|
||||
<!--
|
||||
You need to add elogger and rlogger entries when using ejabberd.
|
||||
In this case the transport will do the logging.
|
||||
-->
|
||||
|
||||
<log id='elogger'>
|
||||
<host/>
|
||||
<logtype/>
|
||||
<format>%d: [%t] (%h): %s</format>
|
||||
<file>/var/log/jabber/aim-transport-error.log</file>
|
||||
</log>
|
||||
|
||||
<log id='rlogger'>
|
||||
<host/>
|
||||
<logtype>record</logtype>
|
||||
<format>%d %h %s</format>
|
||||
<file>/var/log/jabber/aim-transport-record.log</file>
|
||||
</log>
|
||||
|
||||
<!--
|
||||
ejabberd do not provide XDB services.
|
||||
xdb_file.so is loaded in to handle all XDB requests.
|
||||
-->
|
||||
|
||||
<xdb id="xdb">
|
||||
<host/>
|
||||
<load>
|
||||
<xdb_file>/usr/local/lib/jabber/libjabberdxdbfile.so</xdb_file> <!-- This file is part of jabberd-1.4.x. -->
|
||||
</load>
|
||||
<xdb_file xmlns="jabber:config:xdb_file">
|
||||
<spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
|
||||
</xdb_file>
|
||||
</xdb>
|
||||
|
||||
<!--
|
||||
Make sure that all host names here are resolveable via DNS if you
|
||||
want the transport to be available to the public.
|
||||
-->
|
||||
|
||||
<service id='aim.SERVER.COM'>
|
||||
<!-- aim-transport configuration. -->
|
||||
<aimtrans xmlns='jabber:config:aimtrans'>
|
||||
<vCard>
|
||||
<FN>AIM/ICQ Transport</FN>
|
||||
<DESC>This is the AIM/ICQ Transport.</DESC>
|
||||
<MAIL>EMAIL@ADDRESS.COM</MAIL>
|
||||
<URL>http://aim-transport.jabberstudio.org/</URL>
|
||||
</vCard>
|
||||
<charset>cp1252</charset>
|
||||
</aimtrans>
|
||||
<!-- aim-transport module. -->
|
||||
<load>
|
||||
<aim_transport>/usr/local/lib/jabber/aim-transport.so</aim_transport>
|
||||
</load>
|
||||
</service>
|
||||
|
||||
<!--
|
||||
The settings below have to match the settings you made
|
||||
in your ejabberd.cfg configuration file.
|
||||
-->
|
||||
|
||||
<service id="icq-linker">
|
||||
<uplink/>
|
||||
<connect>
|
||||
<ip>127.0.0.1</ip>
|
||||
<port>5233</port>
|
||||
<secret>SECRET</secret>
|
||||
</connect>
|
||||
</service>
|
||||
|
||||
<pidfile>/var/run/jabber/aim-transport.pid</pidfile>
|
||||
|
||||
</jabber>
|
||||
@@ -0,0 +1,136 @@
|
||||
<!-- ile.xml -->
|
||||
|
||||
<config>
|
||||
<jabber>
|
||||
<server>127.0.0.1</server>
|
||||
<port>5238</port>
|
||||
<secret>SECRET</secret>
|
||||
<service>ile.SERVER.COM</service>
|
||||
<connectsleep>7</connectsleep> <!-- seconds to wait if we get disconnected -->
|
||||
<language>en</language>
|
||||
<vCard>
|
||||
<FN>I Love Email</FN>
|
||||
<DESC>With this service you can receive email notifications.
|
||||
|
||||
Security warning: Be careful when using this. Your password will travel in clear from your client to your jabber server if you don't use SSL and it will probably travel in clear from the jabber server to your email server. Use with care. This shouldn't be an issue in your Intranet, but it is if you use an ILE installed in a foreign jabber server.</DESC>
|
||||
<MAIL>EMAIL@ADDRESS.COM</MAIL>
|
||||
<URL>http://ile.jabberstudio.org/</URL>
|
||||
</vCard>
|
||||
</jabber>
|
||||
|
||||
<debug>
|
||||
<file>/var/log/jabber/ile.log</file>
|
||||
<level>1</level> <!-- man Net::Jabber::Debug -->
|
||||
</debug>
|
||||
|
||||
<mail>
|
||||
<checkinterval>10</checkinterval> <!-- in minutes -->
|
||||
<timeout>20</timeout> <!-- timeout for IMAP/POP connection, in seconds -->
|
||||
</mail>
|
||||
|
||||
<files>
|
||||
<users>/var/spool/jabber/ile.SERVER.COM/users.db</users>
|
||||
<passwords>/var/spool/jabber/ile.SERVER.COM/passwords.db</passwords>
|
||||
<hosts>/var/spool/jabber/ile.SERVER.COM/hosts.db</hosts>
|
||||
<types>/var/spool/jabber/ile.SERVER.COM/types.db</types>
|
||||
<notifyxa>/var/spool/jabber/ile.SERVER.COM/notifyxa.db</notifyxa>
|
||||
<notifydnd>/var/spool/jabber/ile.SERVER.COM/notifydnd.db</notifydnd>
|
||||
<urls>/var/spool/jabber/ile.SERVER.COM/urls.db</urls>
|
||||
</files>
|
||||
|
||||
<form>
|
||||
<en>
|
||||
<instructions>Please fill in the fields,according to your email account settings and notification preferences</instructions>
|
||||
<title>ILE: Email notification service</title>
|
||||
<email_options>Email account settings</email_options>
|
||||
<user>Username</user>
|
||||
<pass>Password</pass>
|
||||
<host>Hostname</host>
|
||||
<type>Type</type>
|
||||
<newmail>You have received NUM email messages since last time I checked, which was CHECKINTERVAL minutes ago.</newmail>
|
||||
<errorcheck>There was an error while trying to check mail for ACCOUNT.</errorcheck>
|
||||
<notify_options>Notification Options</notify_options>
|
||||
<notifyxa>Notify even when Xtended Away (XA)</notifyxa>
|
||||
<notifydnd>Notify even when Do Not Disturb (DND)</notifydnd>
|
||||
<webmail_url>Webmail URL</webmail_url>
|
||||
<webmail_login>Login to ACCOUNT</webmail_login>
|
||||
<iledesc>ILE: an email notifier component: http://ile.jabberstudio.org</iledesc>
|
||||
</en>
|
||||
|
||||
<es>
|
||||
<instructions>Por favor, rellene los campos del formulario.</instructions>
|
||||
<title>ILE: Servicio de notificación de correo</title>
|
||||
<email_options>Configuración de la cuenta de correo</email_options>
|
||||
<user>Usuario</user>
|
||||
<pass>Clave</pass>
|
||||
<host>Host</host>
|
||||
<type>Tipo</type>
|
||||
<newmail>Ha recibido NUM email(s) desde la última comprobación que fue hace CHECKINTERVAL minutos</newmail>
|
||||
<errorcheck>Ha habido un error en la comprobación del correo para la cuenta ACCOUNT.</errorcheck>
|
||||
<notify_options>Opciones de notificación</notify_options>
|
||||
<notifyxa>Notificar incluso si muy ausente (XA)</notifyxa>
|
||||
<notifydnd>Notificar incluso si no molestar (DND)</notifydnd>
|
||||
<webmail_url>Webmail URL</webmail_url>
|
||||
<webmail_login>Leer correo de ACCOUNT</webmail_login>
|
||||
<iledesc>ILE: un notificador de nuevo email - http://ile.jabberstudio.org</iledesc>
|
||||
</es>
|
||||
|
||||
<ca>
|
||||
<instructions>Ompli els camps del formulari.</instructions>
|
||||
<title>ILE: Servei de notificació de nou email</title>
|
||||
<email_options>Dades del compte de mail</email_options>
|
||||
<user>Usuari</user>
|
||||
<pass>Clau</pass>
|
||||
<host>Host</host>
|
||||
<type>Tipus</type>
|
||||
<newmail>Ha rebut NUM email(s) des de la última comprobació que va ser fa CHECKINTERVAL minuts.</newmail>
|
||||
<errorcheck>S'ha produit un error en la comprobació del correu per al compte ACCOUNT.</errorcheck>
|
||||
<notify_options>Opcions de notificació</notify_options>
|
||||
<notifyxa>Notificar si molt absent (XA)</notifyxa>
|
||||
<notifydnd>Notificar si no molestar (DND)</notifydnd>
|
||||
<webmail_url>Webmail URL</webmail_url>
|
||||
<webmail_login>Llegir correu de ACCOUNT</webmail_login>
|
||||
<iledesc>ILE: un notificador de nou email - http://ile.jabberstudio.org</iledesc>
|
||||
</ca>
|
||||
|
||||
<ro>
|
||||
<!-- Contributed by Adrian Rappa -->
|
||||
<instructions>Va rog completati urmatoarele campuri</instructions>
|
||||
<title>I Love Email: new email notification service</title>
|
||||
<email_options>Email account settings</email_options>
|
||||
<user>Nume utilizator</user>
|
||||
<pass>Parola</pass>
|
||||
<host>Nume gazda</host>
|
||||
<type>Tip</type>
|
||||
<newmail>Ati primit NUM mesaj(e) de la ultima verificare, care a fost acum CHECKINTERVAL minute.</newmail>
|
||||
<errorcheck>A fost eroare in timp ce incercam sa verific posta pentru ACCOUNT.</errorcheck>
|
||||
<notify_options>Notification Options</notify_options>
|
||||
<notifyxa>Notify even when Xtended Away (XA)</notifyxa>
|
||||
<notifydnd>Notify even when Do Not Disturb (DND)</notifydnd>
|
||||
<webmail_url>Webmail URL</webmail_url>
|
||||
<webmail_login>Login to ACCOUNT</webmail_login>
|
||||
<iledesc>ILE: an email notifier component: http://ile.jabberstudio.org</iledesc>
|
||||
</ro>
|
||||
|
||||
<nl>
|
||||
<!-- Contributed by Sander Devrieze -->
|
||||
<instructions>Vul volgende velden in.</instructions>
|
||||
<title>ILE: Dienst voor e-mailnotificaties</title>
|
||||
<email_options>Instellingen van e-mailaccount</email_options>
|
||||
<user>Gebruikersnaam</user>
|
||||
<pass>Wachtwoord</pass>
|
||||
<host>Inkomende mailserver</host>
|
||||
<type>Type verbinding</type>
|
||||
<newmail>U hebt NUM berichten ontvangen sinds CHECKINTERVAL minuten geleden.</newmail>
|
||||
<errorcheck>Fout tijdens controle op nieuwe e-mails bij ACCOUNT. ILE zal deze account niet meer opnieuw controleren tot u uw registratiegegevens wijzigt of opnieuw aanmeldt.</errorcheck>
|
||||
<notify_options>Notificatie-instellingen</notify_options>
|
||||
<notifyxa>Notificeer ook in de status Niet Beschikbaar (XA)</notifyxa>
|
||||
<notifydnd>Notificeer ook in de status Niet Storen (DND)</notifydnd>
|
||||
<webmail_url>URL van webmail</webmail_url>
|
||||
<webmail_login>Aanmelden op ACCOUNT</webmail_login>
|
||||
<iledesc>ILE: een dienst om e-mailnotificaties te ontvangen: http://ile.jabberstudio.org</iledesc>
|
||||
</nl>
|
||||
|
||||
</form>
|
||||
|
||||
</config>
|
||||
@@ -0,0 +1,149 @@
|
||||
<jggtrans>
|
||||
|
||||
<service jid="gg.SERVER.COM"/>
|
||||
|
||||
<!-- This connects the jabber-gg-transport process to ejabberd. -->
|
||||
<connect id="gglinker">
|
||||
<ip>127.0.0.1</ip>
|
||||
<port>5237</port>
|
||||
<secret>SECRET</secret>
|
||||
</connect>
|
||||
|
||||
<register>
|
||||
<!-- This tag contains the message displayed to users at registration time.
|
||||
You can use <p/> and/or <br/> to break lines. Multiple spaces and newlines
|
||||
are converted to just one, so formatting of config file doesn't really matter. -->
|
||||
<instructions>
|
||||
Fill in your GG number (after "username")
|
||||
and password to register on the transport.
|
||||
<p/>To change your information in the GaduGadu directory you need to fill in the other fields.
|
||||
<p/>To remove registration you need to leave the form blank.
|
||||
</instructions>
|
||||
</register>
|
||||
|
||||
<search>
|
||||
<!-- This tag contains the message displayed to users at search time. -->
|
||||
<instructions>
|
||||
To search people:<br/>
|
||||
First fill in surname or family name, nickname, city, birthyear or range of birthyears (eg. 1950-1960)
|
||||
and gender (you may fill in more fields at once).<br/>
|
||||
or<br/>
|
||||
Fill in phone number<br/>
|
||||
or<br/>
|
||||
Fill in the GG number of the person you are searching.
|
||||
</instructions>
|
||||
</search>
|
||||
|
||||
<gateway>
|
||||
<!-- This is message, that may be displayed to user when adding gg contact. -->
|
||||
<desc>Please fill in the GaduGadu number of the person you want to add.</desc>
|
||||
<!-- And this is the prompt for GG number. -->
|
||||
<prompt>GG Nummer</prompt>
|
||||
</gateway>
|
||||
|
||||
<vCard>
|
||||
<FN>Gadu-Gadu Transport</FN>
|
||||
<DESC>This is the Gadu-Gadu Transport.</DESC>
|
||||
<EMAIL>EMAIL@ADDRESS.COM</EMAIL>
|
||||
<URL>http://www.jabberstudio.org/projects/jabber-gg-transport/</URL>
|
||||
</vCard>
|
||||
|
||||
<!-- Default user locale (language).
|
||||
Empty means system locale setting,
|
||||
no (or commented-out) <default_locale> tag means no translations. -->
|
||||
<!-- <default_locale>pl_PL</default_locale> -->
|
||||
|
||||
<!-- Logger configuration.
|
||||
You may configure one logger of type "syslog" and/or one of type "file".
|
||||
You may also not configure logging at all. -->
|
||||
<log type="syslog" facility="local0"/>
|
||||
<log type="file">/var/log/jabber/jabber-gg-transport.log</log>
|
||||
|
||||
<!-- Uncomment this, if you want proxy to be used for Gadu-Gadu connection. -->
|
||||
<!--
|
||||
<proxy>
|
||||
<ip>127.0.0.1</ip>
|
||||
<port>8080</port>
|
||||
</proxy>
|
||||
-->
|
||||
|
||||
<!-- You can change these values according to your needs. -->
|
||||
<conn_timeout>60</conn_timeout>
|
||||
<ping_interval>10</ping_interval>
|
||||
|
||||
<!-- Gadu-Gadu server doesn't seem to answer pings anymore :-(
|
||||
So let's give it 10 year :-) -->
|
||||
<pong_timeout>315360000</pong_timeout>
|
||||
|
||||
<!-- This time after disconnection from Gadu-Gadu server the transport
|
||||
will try to connect again. -->
|
||||
<reconnect>300</reconnect>
|
||||
|
||||
<!-- How long to wait before restart, after jabber server connection is broken
|
||||
negative value means, that jggtrans should terminate. -->
|
||||
<restart_timeout>60</restart_timeout>
|
||||
|
||||
<!-- Delay between the unavailable presence is received from user and loggin out
|
||||
from Gadu-Gadu - for nice <presence type="invisible"/> support. -->
|
||||
<disconnect_delay>5</disconnect_delay>
|
||||
|
||||
<!-- list of Gadu-Gadu servers to use.
|
||||
<hub/> means "use GG hub to find server"
|
||||
<server/> tag should contain server address and may contain "port"
|
||||
attribute with port number. When TLS is available (supported by libgadu)
|
||||
it will be used unless "tls" attribute is set to "no". Please notice,
|
||||
that not all servers will accept TLS connections.
|
||||
Servers (including hub) are tried in order as they appear in <servers/>
|
||||
element.
|
||||
A reasonable default server list is hardcoded in jggtrans.
|
||||
-->
|
||||
<!--
|
||||
<servers>
|
||||
<hub/>
|
||||
<server port="443">217.17.41.90</server>
|
||||
<server tls="no">217.17.41.85</server>
|
||||
<server tls="no">217.17.41.88</server>
|
||||
</servers>
|
||||
-->
|
||||
|
||||
<!-- Spool directory. This is the place, where user info will be stored. -->
|
||||
<!-- Be careful about permissions - users' Gadu-Gadu passwords are stored there. -->
|
||||
<spool>/var/spool/jabber/gg.SERVER.COM/</spool>
|
||||
|
||||
<!-- Where to store pid file. This tag is optional. -->
|
||||
<pidfile>/var/run/jabber/jabber-gg-transport.pid</pidfile>
|
||||
|
||||
<!-- jid allowed to do some administrative task (eg. discovering online users).
|
||||
May be used multiple times. -->
|
||||
<admin>GG_TRANSPORT_ADMIN@SERVER.COM</admin>
|
||||
|
||||
<!-- ACL gives detailed access control to the transport. -->
|
||||
<acl>
|
||||
<!-- Example entries: -->
|
||||
|
||||
<allow who="admin@SERVER.COM" what="iq/query?xmlns=http://jabber.org/protocol/stats"/>
|
||||
<!-- will allow statistics gathering to admin@SERVER.COM -->
|
||||
|
||||
<deny who="*" what="iq/query?xmlns=http://jabber.org/protocol/stats"/>
|
||||
<!-- will deny statistics gathering for anybody else -->
|
||||
|
||||
<!-- <allow who="*@SERVER.COM"/> -->
|
||||
<!-- will allow anything else to users from "SERVER.COM" -->
|
||||
|
||||
<!-- <deny what="iq/query?xmlns=jabber:x:register"/> -->
|
||||
<!-- will deny registration for all other users -->
|
||||
|
||||
<!-- <allow what="presence"/> -->
|
||||
<!-- allow presence from anybody -->
|
||||
|
||||
<!-- <allow what="iq"/> -->
|
||||
<!-- allow iq from anybody -->
|
||||
|
||||
<!-- <allow what="message"/> -->
|
||||
<!-- allow message from anybody -->
|
||||
|
||||
<!-- <deny/> -->
|
||||
<!-- will deny anything else -->
|
||||
</acl>
|
||||
|
||||
</jggtrans>
|
||||
@@ -0,0 +1,128 @@
|
||||
<!-- jit.xml -->
|
||||
|
||||
<jabber>
|
||||
|
||||
<!--
|
||||
You need to add elogger and rlogger entries here when using ejabberd.
|
||||
In this case the transport will do the logging.
|
||||
-->
|
||||
|
||||
<log id='elogger'>
|
||||
<host/>
|
||||
<logtype/>
|
||||
<file>/var/log/jabber/jit-error</file> <!-- WPJabber logs with date. -->
|
||||
</log>
|
||||
|
||||
<log id='rlogger'>
|
||||
<host/>
|
||||
<logtype>record</logtype>
|
||||
<file>/var/log/jabber/jit-record</file> <!-- WPJabber logs with date. -->
|
||||
</log>
|
||||
|
||||
<!--
|
||||
ejabberd do not provide XDB services.
|
||||
xdb_file-jit.so (the renamed xdb_file.so from WPJabber) is
|
||||
loaded in to handle all XDB requests.
|
||||
Read also the documentation in xdb_file/README from the JIT package.
|
||||
-->
|
||||
|
||||
<xdb id="xdb">
|
||||
<host/>
|
||||
<load>
|
||||
<xdb_file>/usr/local/lib/jabber/xdb_file.so</xdb_file> <!-- The xdb_file.so from WPJabber/JIT. -->
|
||||
</load>
|
||||
<xdb_file xmlns="jabber:config:xdb_file">
|
||||
<spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
|
||||
</xdb_file>
|
||||
</xdb>
|
||||
|
||||
<!--
|
||||
Make sure that all host names here are resolveable via DNS if you
|
||||
want the transport to be available to the public.
|
||||
-->
|
||||
|
||||
<service id="icq.SERVER.COM">
|
||||
<!--
|
||||
Replace SERVER.COM with the same as above to enable sms.
|
||||
-->
|
||||
<host>sms.icq.SERVER.COM</host>
|
||||
<!-- JIT configuration. -->
|
||||
<icqtrans xmlns="jabber:config:icqtrans">
|
||||
<sms>
|
||||
<host>sms.icq.SERVER.COM</host>
|
||||
<!-- Status of virtual "sms-contacts". -->
|
||||
<show>away</show>
|
||||
<status/>
|
||||
</sms>
|
||||
<instructions>Fill in your UIN and password.</instructions>
|
||||
<search>Search ICQ users.</search>
|
||||
<vCard>
|
||||
<FN>ICQ Transport (JIT)</FN>
|
||||
<DESC>This is the Jabber ICQ Transport.</DESC>
|
||||
<MAIL>EMAIL@ADDRESS.COM</MAIL>
|
||||
<URL>http://jit.jabberstudio.org/</URL>
|
||||
</vCard>
|
||||
<!-- Hashtable for users. -->
|
||||
<prime>3907</prime>
|
||||
<!-- Send messages from ICQ as chat to Jabber clients. -->
|
||||
<chat/>
|
||||
<!-- Enable this for ICQ web presence. -->
|
||||
<web/>
|
||||
<!--
|
||||
If you don't want jabber:x:data forms
|
||||
in reg and search uncomment this tag
|
||||
(Not recomended).
|
||||
-->
|
||||
<no_xdata/>
|
||||
<!--
|
||||
This tag is necessary when using ejabberd.
|
||||
In this way JIT will have its own contact list.
|
||||
-->
|
||||
<own_roster/>
|
||||
<!--
|
||||
When present, this tag will tell JIT not to try to
|
||||
get the user's roster (which will take a bit of time
|
||||
to fail in scenarios described above).
|
||||
-->
|
||||
<no_jabber_roster/>
|
||||
<!-- File with stats. -->
|
||||
<user_count_file>/var/spool/jabber/jit-count</user_count_file>
|
||||
<!--
|
||||
Interval beetween checking sessions: ping, messages, acks.
|
||||
-->
|
||||
<session_check>5</session_check>
|
||||
<!-- Reconnect retries. -->
|
||||
<reconnects>5</reconnects>
|
||||
<!--
|
||||
Time in sec when session can be inactive, 0=disabled.
|
||||
-->
|
||||
<session_timeout>18000</session_timeout>
|
||||
<charset>windows-1252</charset>
|
||||
<server>
|
||||
<host port="5190">login.icq.com</host>
|
||||
</server>
|
||||
</icqtrans>
|
||||
<!-- JIT module. -->
|
||||
<load>
|
||||
<icqtrans>/usr/local/lib/jabber/jit.so</icqtrans>
|
||||
</load>
|
||||
</service>
|
||||
|
||||
<!--
|
||||
The settings below have to match the settings you made
|
||||
in your ejabberd.cfg configuration file.
|
||||
-->
|
||||
|
||||
<service id="icq-linker">
|
||||
<host>SERVER.COM</host>
|
||||
<uplink/>
|
||||
<connect>
|
||||
<ip>127.0.0.1</ip>
|
||||
<port>5234</port>
|
||||
<secret>SECRET</secret>
|
||||
</connect>
|
||||
</service>
|
||||
|
||||
<pidfile>/var/run/jabber/jit.pid</pidfile>
|
||||
|
||||
</jabber>
|
||||
@@ -0,0 +1,118 @@
|
||||
<!-- msn-transport.xml -->
|
||||
|
||||
<jabber>
|
||||
|
||||
<!--
|
||||
You need to add elogger and rlogger entries here when using ejabberd.
|
||||
In this case the transport will do the logging.
|
||||
-->
|
||||
|
||||
<log id='elogger'>
|
||||
<host/>
|
||||
<logtype/>
|
||||
<format>%d: [%t] (%h): %s</format>
|
||||
<file>/var/log/jabber/msn-transport-error.log</file>
|
||||
</log>
|
||||
|
||||
<log id='rlogger'>
|
||||
<host/>
|
||||
<logtype>record</logtype>
|
||||
<format>%d %h %s</format>
|
||||
<file>/var/log/jabber/msn-transport-record.log</file>
|
||||
</log>
|
||||
|
||||
<!--
|
||||
ejabberd do not provide XDB services.
|
||||
xdb_file.so is loaded in to handle all XDB requests.
|
||||
-->
|
||||
|
||||
<xdb id="xdb">
|
||||
<host/>
|
||||
<load>
|
||||
<xdb_file>/usr/local/lib/jabber/libjabberdxdbfile.so</xdb_file>
|
||||
</load>
|
||||
<xdb_file xmlns="jabber:config:xdb_file">
|
||||
<spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
|
||||
</xdb_file>
|
||||
</xdb>
|
||||
|
||||
<!--
|
||||
Make sure that all host names here are resolveable via DNS if you
|
||||
want the transport to be available to the public.
|
||||
-->
|
||||
|
||||
<service id="msn.SERVER.COM">
|
||||
<!-- msn-transport configuration. -->
|
||||
<msntrans xmlns="jabber:config:msntrans">
|
||||
<instructions>Fill in your MSN account and password (eg: user1@hotmail.com). A nickname is optional.</instructions>
|
||||
<vCard>
|
||||
<FN>MSN Transport</FN>
|
||||
<DESC>This is the MSN Transport.</DESC>
|
||||
<EMAIL>EMAIL@ADDRESS.COM</EMAIL>
|
||||
<URL>http://msn-transport.jabberstudio.org/</URL>
|
||||
</vCard>
|
||||
<!--
|
||||
Conference support allows you to create groupchat rooms on the
|
||||
msn-transport and invite MSN users to join.
|
||||
-->
|
||||
<conference id="conference.msn.SERVER.COM">
|
||||
<!--
|
||||
This will make MSN transport invite you to a special groupchat
|
||||
room when more then one user joins a normal one-on-one session.
|
||||
Joining this room will make MSN transport "switch" the session
|
||||
into groupchat mode. If you ignore it, MSN transport will
|
||||
continue to send the messages as one-on-one chats.
|
||||
-->
|
||||
<invite>More than one user entered this chat session. Enter this room to switch to groupchat modus.</invite>
|
||||
<notice>
|
||||
<join> is available</join>
|
||||
<leave> has leaved the room</leave>
|
||||
</notice>
|
||||
</conference>
|
||||
<!-- Enable Hotmail inbox notification. -->
|
||||
<headlines/>
|
||||
<!--
|
||||
Enable fancy friendly names
|
||||
If the user enters a nickname upon registration, and the user has
|
||||
a status message, their MSN friendly name will be "nickname - status message".
|
||||
|
||||
If the user does not enter a nickname on registration, but they do have
|
||||
a status message, their friendly name will just be their status message.
|
||||
|
||||
If the user did enter a nickname on registration, but they have a blank status message,
|
||||
then their friendly name will just be the registered nickname.
|
||||
|
||||
If the user did not enter a nickname on registration, and they have a blank status message,
|
||||
their nickname will just be the username portion of their JID.
|
||||
|
||||
If the above chosen friendly name is too long, then it will be truncated and "..." placed
|
||||
at the end. MSN only supports friendly names of 128 characters, so this is unavoidable.
|
||||
|
||||
If this is disabled, then the registered nick is always sent as the MSN friendly name,
|
||||
or if that is blank, the username portion of their JID is sent instead.
|
||||
-->
|
||||
<fancy_friendly/>
|
||||
</msntrans>
|
||||
<!-- msn-transport module. -->
|
||||
<load>
|
||||
<msntrans>/usr/local/lib/jabber/msn-transport.so</msntrans>
|
||||
</load>
|
||||
</service>
|
||||
|
||||
<!--
|
||||
The settings below have to match the settings you made
|
||||
in your ejabberd.cfg configuration file.
|
||||
-->
|
||||
|
||||
<service id="msn-linker">
|
||||
<uplink/>
|
||||
<connect>
|
||||
<ip>127.0.0.1</ip>
|
||||
<port>5235</port>
|
||||
<secret>SECRET</secret>
|
||||
</connect>
|
||||
</service>
|
||||
|
||||
<pidfile>/var/run/jabber/msn-transport.pid</pidfile>
|
||||
|
||||
</jabber>
|
||||
@@ -0,0 +1,86 @@
|
||||
<!-- yahoo-transport-2.xml -->
|
||||
|
||||
<jabber>
|
||||
|
||||
<!--
|
||||
You need to add the elogger entry here when using ejabberd.
|
||||
In this case the transport will do the logging.
|
||||
-->
|
||||
|
||||
<log id='elogger'>
|
||||
<host/>
|
||||
<logtype/>
|
||||
<format>%d: [%t] (%h): %s</format>
|
||||
<file>/var/log/jabber/yahoo-transport-2-error.log</file>
|
||||
<stderr/>
|
||||
</log>
|
||||
|
||||
<!--
|
||||
ejabberd do not provide XDB services.
|
||||
xdb_file.so is loaded in to handle all XDB requests.
|
||||
-->
|
||||
|
||||
<xdb id="xdb">
|
||||
<host/>
|
||||
<load>
|
||||
<xdb_file>/usr/local/lib/jabber/libjabberdxdbfile.so</xdb_file>
|
||||
</load>
|
||||
<xdb_file xmlns="jabber:config:xdb_file">
|
||||
<spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
|
||||
</xdb_file>
|
||||
</xdb>
|
||||
|
||||
<!--
|
||||
Make sure that all host names here are resolveable via DNS if you
|
||||
want the transport to be available to the public.
|
||||
-->
|
||||
|
||||
<service id="yahoo.SERVER.COM">
|
||||
<!-- yahoo-transport-2 configuration. -->
|
||||
<config xmlns="jabber:config:yahoo">
|
||||
<vCard>
|
||||
<NAME>Yahoo! Transport</NAME>
|
||||
<FN>vCard not implemented in current version</FN>
|
||||
<DESC>This is the Yahoo! transport.</DESC>
|
||||
<MAIL>EMAIL@ADDRESS.COM</MAIL>
|
||||
<URL>http://yahoo-transport-2.jabberstudio.org/</URL>
|
||||
</vCard>
|
||||
<instructions>Fill in your YAHOO! Messenger username and password to register on this transport.</instructions>
|
||||
<server>scs.msg.yahoo.com</server>
|
||||
<port>5050</port>
|
||||
<!--
|
||||
The character map. This provides character set translation from UTF-8
|
||||
to the indicated character map. See the man page for 'iconv' for available
|
||||
character maps on your platform. CP1252 is the standard Windows character
|
||||
set.
|
||||
-->
|
||||
<charmap>CP1252</charmap>
|
||||
<!--
|
||||
When this element exists, the transport will send new mail notifications as
|
||||
well as a count of unread messages when the user initially logs in.
|
||||
-->
|
||||
<newmail/>
|
||||
</config>
|
||||
<!-- yahoo-transport-2 module. -->
|
||||
<load>
|
||||
<yahoo_transport>/usr/local/lib/jabber/yahoo-transport-2.so</yahoo_transport>
|
||||
</load>
|
||||
</service>
|
||||
|
||||
<!--
|
||||
The settings below have to match the settings you made
|
||||
in your ejabberd.cfg configuration file.
|
||||
-->
|
||||
|
||||
<service id="yahoo-linker">
|
||||
<uplink/>
|
||||
<connect>
|
||||
<ip>127.0.0.1</ip>
|
||||
<port>5236</port>
|
||||
<secret>SECRET</secret>
|
||||
</connect>
|
||||
</service>
|
||||
|
||||
<pidfile>/var/run/jabber/yahoo-transport-2.pid</pidfile>
|
||||
|
||||
</jabber>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#########################################################
|
||||
#
|
||||
# aim-transport -- script to start aim-transport.
|
||||
#
|
||||
#########################################################
|
||||
|
||||
DAEMON=/usr/local/sbin/jabberd-aim-transport
|
||||
CONF=/etc/jabber/aim-transport.xml
|
||||
NAME=jabberd-aim-transport
|
||||
HOME=/etc/jabber/
|
||||
USER=ejabberd
|
||||
|
||||
#########################################################
|
||||
|
||||
if [ "`/usr/bin/whoami`" != "$USER" ]; then
|
||||
|
||||
echo "You need to be" $USER "user to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
debug)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME in debugging mode."
|
||||
$DAEMON -D -H $HOME -c $CONF &
|
||||
;;
|
||||
start)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME."
|
||||
$DAEMON -H $HOME -c $CONF &
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $NAME."
|
||||
killall $NAME &
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
sleep 3
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {debug|start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
#########################################################
|
||||
#
|
||||
# ile -- script to start ILE.
|
||||
#
|
||||
#########################################################
|
||||
|
||||
DAEMON=/usr/local/sbin/ile.pl
|
||||
NAME=ile.pl
|
||||
CONF=/etc/jabber/ile.xml
|
||||
USER=ejabberd
|
||||
|
||||
#########################################################
|
||||
|
||||
if [ "`/usr/bin/whoami`" != "$USER" ]; then
|
||||
|
||||
echo "You need to be" $USER "user to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
debug)
|
||||
echo "Not implemented yet. Starting in normal mode"
|
||||
$0 start
|
||||
;;
|
||||
start)
|
||||
test -f $DAEMON || exit 0
|
||||
echo "Starting $NAME."
|
||||
$DAEMON $CONF &
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $NAME."
|
||||
killall $NAME &
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
sleep 3
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {debug|start|stop|status|restart}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
#########################################################
|
||||
#
|
||||
# jabber-gg-transport -- script to start jabber-gg-transport.
|
||||
#
|
||||
#########################################################
|
||||
|
||||
DAEMON=/usr/local/sbin/jggtrans
|
||||
CONF=/etc/jabber/jabber-gg-transport.xml
|
||||
NAME=jggtrans
|
||||
HOME=/etc/jabber/
|
||||
USER=ejabberd
|
||||
|
||||
#########################################################
|
||||
|
||||
if [ "`/usr/bin/whoami`" != "$USER" ]; then
|
||||
|
||||
echo "You need to be" $USER "user to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
debug)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME in debugging mode."
|
||||
$DAEMON -D -H $HOME -c $CONF &
|
||||
;;
|
||||
start)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME."
|
||||
$DAEMON $CONF &
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $NAME."
|
||||
killall $NAME &
|
||||
rm /var/run/jabber/jabber-gg-transport.pid
|
||||
;;
|
||||
|
||||
restart|reload)
|
||||
$0 stop
|
||||
sleep 3
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {debug|start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#########################################################
|
||||
#
|
||||
# jit -- script to start JIT.
|
||||
#
|
||||
#########################################################
|
||||
|
||||
DAEMON=/usr/local/sbin/wpjabber-jit
|
||||
CONF=/etc/jabber/jit.xml
|
||||
NAME=wpjabber-jit
|
||||
HOME=/etc/jabber/
|
||||
USER=ejabberd
|
||||
|
||||
#########################################################
|
||||
|
||||
if [ "`/usr/bin/whoami`" != "$USER" ]; then
|
||||
|
||||
echo "You need to be" $USER "user to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
debug)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME in debugging mode."
|
||||
$DAEMON -D -H $HOME -c $CONF &
|
||||
;;
|
||||
start)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME."
|
||||
$DAEMON -H $HOME -c $CONF &
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $NAME."
|
||||
killall $NAME &
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
sleep 3
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {debug|start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
#########################################################
|
||||
#
|
||||
# msn-transport -- script to start MSN Transport.
|
||||
#
|
||||
#########################################################
|
||||
|
||||
DAEMON=/usr/local/sbin/jabberd-msn-transport
|
||||
CONF=/etc/jabber/msn-transport.xml
|
||||
NAME=jabberd-msn-transport
|
||||
HOME=/etc/jabber/
|
||||
USER=ejabberd
|
||||
|
||||
#########################################################
|
||||
|
||||
if [ "`/usr/bin/whoami`" != "$USER" ]; then
|
||||
|
||||
echo "You need to be" $USER "user to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
strace)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME in strace mode."
|
||||
strace -o /opt/ejabberd/var/log/jabber/strace.log $DAEMON -H $HOME -c $CONF &
|
||||
;;
|
||||
debug)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME in debugging mode."
|
||||
$DAEMON -D -H $HOME -c $CONF &
|
||||
;;
|
||||
start)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME."
|
||||
$DAEMON -H $HOME -c $CONF &
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $NAME."
|
||||
killall $NAME &
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
sleep 3
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {debug|start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
##############################################################
|
||||
#
|
||||
# yahoo-transport-2 -- script to start Yahoo-transport-2.
|
||||
#
|
||||
#############################################################
|
||||
|
||||
DAEMON=/usr/local/sbin/jabberd-yahoo-transport-2
|
||||
CONF=/etc/jabber/yahoo-transport-2.xml
|
||||
NAME=jabberd-yahoo-transport-2
|
||||
HOME=/etc/jabber/
|
||||
USER=ejabberd
|
||||
|
||||
#############################################################
|
||||
|
||||
if [ "`/usr/bin/whoami`" != "$USER" ]; then
|
||||
|
||||
echo "You need to be" $USER "user to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
debug)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME in debugging mode."
|
||||
$DAEMON -D -H $HOME -c $CONF &
|
||||
;;
|
||||
start)
|
||||
test -f $DAEMON -a -f $CONF || exit 0
|
||||
echo "Starting $NAME."
|
||||
$DAEMON -H $HOME -c $CONF &
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $NAME."
|
||||
killall $NAME &
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
sleep 3
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {debug|start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -1,81 +0,0 @@
|
||||
%% Generated by the Erlang ASN.1 compiler version:2.0.1
|
||||
%% Purpose: Erlang record definitions for each named and unnamed
|
||||
%% SEQUENCE and SET, and macro definitions for each value
|
||||
%% definition,in module ELDAPv3
|
||||
|
||||
|
||||
|
||||
-record('LDAPMessage',{
|
||||
messageID, protocolOp, controls = asn1_NOVALUE}).
|
||||
|
||||
-record('AttributeValueAssertion',{
|
||||
attributeDesc, assertionValue}).
|
||||
|
||||
-record('Attribute',{
|
||||
type, vals}).
|
||||
|
||||
-record('LDAPResult',{
|
||||
resultCode, matchedDN, errorMessage, referral = asn1_NOVALUE}).
|
||||
|
||||
-record('Control',{
|
||||
controlType, criticality = asn1_DEFAULT, controlValue = asn1_NOVALUE}).
|
||||
|
||||
-record('BindRequest',{
|
||||
version, name, authentication}).
|
||||
|
||||
-record('SaslCredentials',{
|
||||
mechanism, credentials = asn1_NOVALUE}).
|
||||
|
||||
-record('BindResponse',{
|
||||
resultCode, matchedDN, errorMessage, referral = asn1_NOVALUE, serverSaslCreds = asn1_NOVALUE}).
|
||||
|
||||
-record('SearchRequest',{
|
||||
baseObject, scope, derefAliases, sizeLimit, timeLimit, typesOnly, filter, attributes}).
|
||||
|
||||
-record('SubstringFilter',{
|
||||
type, substrings}).
|
||||
|
||||
-record('MatchingRuleAssertion',{
|
||||
matchingRule = asn1_NOVALUE, type = asn1_NOVALUE, matchValue, dnAttributes = asn1_DEFAULT}).
|
||||
|
||||
-record('SearchResultEntry',{
|
||||
objectName, attributes}).
|
||||
|
||||
-record('PartialAttributeList_SEQOF',{
|
||||
type, vals}).
|
||||
|
||||
-record('ModifyRequest',{
|
||||
object, modification}).
|
||||
|
||||
-record('ModifyRequest_modification_SEQOF',{
|
||||
operation, modification}).
|
||||
|
||||
-record('AttributeTypeAndValues',{
|
||||
type, vals}).
|
||||
|
||||
-record('AddRequest',{
|
||||
entry, attributes}).
|
||||
|
||||
-record('AttributeList_SEQOF',{
|
||||
type, vals}).
|
||||
|
||||
-record('ModifyDNRequest',{
|
||||
entry, newrdn, deleteoldrdn, newSuperior = asn1_NOVALUE}).
|
||||
|
||||
-record('CompareRequest',{
|
||||
entry, ava}).
|
||||
|
||||
-record('ExtendedRequest',{
|
||||
requestName, requestValue = asn1_NOVALUE}).
|
||||
|
||||
-record('ExtendedResponse',{
|
||||
resultCode, matchedDN, errorMessage, referral = asn1_NOVALUE, responseName = asn1_NOVALUE, response = asn1_NOVALUE}).
|
||||
|
||||
-record('PasswdModifyRequestValue',{
|
||||
userIdentity = asn1_NOVALUE, oldPasswd = asn1_NOVALUE, newPasswd = asn1_NOVALUE}).
|
||||
|
||||
-record('PasswdModifyResponseValue',{
|
||||
genPasswd = asn1_NOVALUE}).
|
||||
|
||||
-define('maxInt', 2147483647).
|
||||
-define('passwdModifyOID', [49,46,51,46,54,46,49,46,52,46,49,46,52,50,48,51,46,49,46,49,49,46,49]).
|
||||
@@ -1,51 +0,0 @@
|
||||
%%%----------------------------------------------------------------------
|
||||
%%%
|
||||
%%% ejabberd, Copyright (C) 2002-2023 ProcessOne
|
||||
%%%
|
||||
%%% This program 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 program 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 program; if not, write to the Free Software Foundation, Inc.,
|
||||
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
%%%
|
||||
%%%----------------------------------------------------------------------
|
||||
|
||||
-define(CT_XML,
|
||||
{<<"Content-Type">>, <<"text/xml; charset=utf-8">>}).
|
||||
|
||||
-define(CT_PLAIN,
|
||||
{<<"Content-Type">>, <<"text/plain">>}).
|
||||
|
||||
-define(CT_JSON,
|
||||
{<<"Content-Type">>, <<"application/json">>}).
|
||||
|
||||
-define(AC_ALLOW_ORIGIN,
|
||||
{<<"Access-Control-Allow-Origin">>, <<"*">>}).
|
||||
|
||||
-define(AC_ALLOW_METHODS,
|
||||
{<<"Access-Control-Allow-Methods">>,
|
||||
<<"GET, POST, OPTIONS">>}).
|
||||
|
||||
-define(AC_ALLOW_HEADERS,
|
||||
{<<"Access-Control-Allow-Headers">>,
|
||||
<<"Content-Type">>}).
|
||||
|
||||
-define(AC_MAX_AGE,
|
||||
{<<"Access-Control-Max-Age">>, <<"86400">>}).
|
||||
|
||||
-define(OPTIONS_HEADER,
|
||||
[?CT_PLAIN, ?AC_ALLOW_ORIGIN, ?AC_ALLOW_METHODS,
|
||||
?AC_ALLOW_HEADERS, ?AC_MAX_AGE]).
|
||||
|
||||
-define(HEADER(CType),
|
||||
[CType, ?AC_ALLOW_ORIGIN, ?AC_ALLOW_HEADERS]).
|
||||
|
||||
-define(BOSH_CACHE, bosh_cache).
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user