5

What options are available on Ubuntu 14.04 to send XMPP (Jabber) messages using a command-line client?

Background: I want to configure XMPP notifications for my Icinga server.

blerontin
  • 238
  • 1
  • 6
  • 11

2 Answers2

8

You can use sendxmpp for that, here's a link to the manpage:

http://manpages.ubuntu.com/manpages/trusty/en/man1/sendxmpp.1p.html

Example

echo "hello bob!" | sendxmpp -s hello someone@jabber.org
Jan
  • 12,931
  • 3
  • 34
  • 39
4

Found a somewhat hidden tool that also works for my XMPP server with SSL:

The lm-send-async.c example which comes with libloudmouth1-dev package allows to send XMPP messages. But one has to compile it first:

cp -av /usr/share/doc/libloudmouth1-dev/examples/lm-send-async.c.gz .
gunzip lm-send-async.c.gz
gcc -o lm-send-async lm-send-async.c `pkg-config --cflags --libs loudmouth-1.0`

Send a message:

./lm-send-async --server bar.net --username foo@bar.net --password F00BAR \
 --fingerprint "11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44" \
 --recipient friend@bar.net --message "Hello World!"
blerontin
  • 238
  • 1
  • 6
  • 11