[ejabberd] ejabberd hacking HOWTO...

Carl Hayter hayter at usc.edu
Wed Nov 29 04:37:28 MSK 2006

On Tue, Nov 28, 2006 at 01:01:13PM +0100, Badlop wrote:
> So that ejabberd auth code (written in Erlang) talks using HTTP with a
> web server.


> Just curiosity: that could be implemented as an extauth script too, right?
> It's a script in your prefered language (Perl, Python, PHP, C...) that
> talks using HTTP with a web server. Then tell ejabberd to authenticate
> against that script.

Yes, but no. :)

I'm hosting my ejabberd server on a *cheap* IRC Server hosting service,
and I'm limited to 2 processes and 50MB. The ejabberd process and the
epmd process use up my long-running-process slots. 

I also had to hack epmd and a couple erts modules to allow epmd to only
bind to a single IP address.  epmd had options to change the binding port,
but not the binding address.  I also had to juggle some ports to comply
with the Hosting Service requirements...

My startup goes something like:


#EJD_SHELL="-noshell -detached"

export EJD_DIST_INTERFACE="{192,168,254,129}"
export ERL_EPMD_DIST_PORT=10009

export ERL_MAX_PORTS=90


erl \
        -pa $EJD_HOME/lib/yaws/ebin \
        -pa $EJD_HOME/var/lib/ejabberd/ebin \
        -name $EJD_NAME \
        -s ejabberd \
        -ejabberd config \"$EJD_HOME/etc/ejabberd/ejabberd.cfg\" \
                log_path \"$EJD_HOME/var/log/ejabberd/ejabberd.log\" \
        -kernel inet_dist_use_interface $EJD_DIST_INTERFACE \
        -kernel inet_dist_listen_min $EJD_MIN \
        -kernel inet_dist_listen_max $EJD_MAX \
        -mnesia dir \"$EJD_HOME/var/spool/ejabberd\" \
        $EJD_SHELL \
        -eval 'application:stop(ssl).' \

Which with my epmd patches seems to keep me within the service providers
restrictions, at least they haven't shut me down for not running an IRC
server like I'm supposed to... 

Some of that particular configuration can probably go away now that I'm
using Yaws as a webserver.  Before I was using the inet package to serve
some Online User and Chatroom Logs pages.

This is just for the www.thejapanesepage.com site.  For the ejabberd that
I setup at my workplace... I can do anything I want.

Carl Hayter
Information Technology Services
University of Southern California
(hacking for www.thejapanesepage.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
Url : http://lists.jabber.ru/pipermail/ejabberd/attachments/20061128/06b690a3/attachment.pgp

More information about the ejabberd mailing list