simple jabber client
C Groff Makefile Shell
Latest commit bce33ac Feb 14, 2016 @GReagle GReagle Merge pull request #15 from homeworkprod/patch-1
Improved README.


Simple jabber client based on ideas from "Irc It".

Official website:

Paper of the slcon2:


The XMPP protocol is a monster and totally overengineered. But you have to deal with it because of its widespread use and good features. To beat this monster, this project tries to divide it into smaller parts and to create one program to handle one aspect of XMPP.

The program "sj" just does a few things:

  • opens a connection to an XMPP server
  • do authentication (+binding +session registration)
  • perfoms keep-alive pings to the server
  • segmenting tags and routing them to other daemons:
    • presenced
    • messaged
    • iqd



# set base directory
export SJ_DIR=/home/user/.xmpp

# start daemon
tcpclient 5222 sj -u user -s -r sj &

# set presence to 'online'

# add a contact to your roster
roster -a -n joe

# subscribe his online status
presence -to subscribe

# let him see your online status
presence -to subscribed

# view buddies on your roster
roster                both    joe


  • replace socket-handling with UCSPI
  • add SSL support
  • designing interface for backend programs
  • replace linked list with one of queue.h
  • write front end tools
    • web front end for mobile chatting
  • write manpages for all tools
  • messaged
    • (de)escape messaged xml save
    • detect filesystem changes
  • create of accounts in-band
  • change passwords
  • integrations into a service management solution like svc of djb

  • XEP-0077: In-Band Registration

  • XEP-0030: Service Discovery
  • XEP-0012: Last Activity
  • XEP-0202: Entity Time

tested with

  • OpenBSD
    • gcc 4.2.1
    • gcc 4.8.2
    • clang 3.5
  • MacOSX
  • GNU/Linux
    • gcc (Debian 4.7.2-5)
    • clang (Debian 3.0-6.2)



You should be able to write plugins for this client in any language of your choice. The interface are just plain text files.

front ends

See sj tools for some front ends.

known issues


The following command will produce error "tlsc: invalid option" on systems with GNU getopt()

tcpclient 5222 sj -u user -s -r sj

unless you set the environment variable POSIXLY_CORRECT. See the issue for tlsc for more details. You can also get around this problem by using sj environment variables (e.g. SJ_USER) instead of command line options.


Currently, you need to set the environment variable export TLSC_NO_VERIFICATION=1 in order to avoid "tlsc: tls_error: ssl verify setup failure".