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.

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
| improve this answer | |
  • 1
    I'm accepting the answer because in theory it should work. Unfortunately my XMPP server uses SSL and sendxmpp --ssl -n fails with some "Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/XML/Stream.pm line 763" error. – blerontin Oct 8 '14 at 9:08
  • 1
    I'm finding sendxmpp really unreliable. It's also complicated too - as I'm having to use odd combinations of flags just to get it to work! – starbeamrainbowlabs Dec 21 '18 at 14:04
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!"
| improve this answer | |
  • I get an error when attempting to install that package :-/ – starbeamrainbowlabs Dec 21 '18 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.