NOTE: 2006-10-25: sendxmpp has a new maintainer, Lubomir Host, and a new
homepage: sendxmpp.platon.sk
Good luck to Lubomir!
sendxmpp
sendxmpp is a perl-script to send xmpp (jabber), similar to what mail(1) does for mail.
sendxmpp was written by me, Dirk-Jan C. Binnema, and is available under the term of the GNU General Public License v2. The hard work is done by Ryan Eatmon's Net::XMPP-modules, and you need have them installed for sendxmpp to work.
Obviously, you also need a jabber account; they are freely available at jabber.org, but you can also run your own server.
sendxmpp is in use on computers around the globe, for example for distributing CVS-commit alerts, sending server warnings and notifying users. If you use sendxmpp in some other creative way, please drop me a mail or IM me at [email protected]. Thanks!
news
- 2005-05-07: sendxmpp version 0.0.8 has been released. This version brings some documentation improvements and also you specify non-default port numbers for jabber servers.
- 2005-05-02: sendxmpp is still alive :-) and there is now version 0.0.7, which brings some fixes to the documentation, and a new --interactive mode, which will read lines from stdin and send them line-by-line (idea from S�n). It's still experimental and I don't think '--interactive' is a good name, but at least you can try now... Please report any problems. UPDATE: fix for typo; version 0.0.7.1 (thanks to Daniel Eckl)
- 2004-12-09: some jabber servers don't work with sendxmpp; it seems there's a problem in one of the underlying libraries (Net::XMPP and XML::Stream), and sendxmpp will end with an error, similar to:
Can't use an undefined value as a HASH reference at /usr/lib/perl5/site_perl/5.8.4/XML/Stream.pm line 1165.
I've notified their author, and he's working on a solution. jabber.org should work though, jabber.xs4all.nl doesn't.
- 2004-12-07: version 0.0.6 is released; there is a small fix for the installation paths. With perl Makefile.PL both manpage and script will be installed under /usr/local, and perl Makefile.PL PREFIX=/usr will install everything under /usr. The should solve the problem of not being able to find the manpage.
- 2004-12-01: version 0.0.5 is released.
- Allow non-\w characters in passwords
- Set the subject for chatroom messages
- Documentation updates (both code and user docs)
- 2004-11-20: version 0.0.4 is released. New stuff:
- 2004-11-17: version 0.0.3 is released. New features are:
- Support for authentication using SSL/TLS;
- Support for sending messages to chatrooms;
- Support for providing login information on the command line;
- Improved error handling;
- NOTE: the .sendxmpprc format has changed.
example
Suppose you have to manage a remote server somewhere, and you have to keep an eye on its cpu load-average. You could write a script to check this, and run it periodically from cron. This script could contain something like:
if test "$cpuload" -gt "$CPULOADMAX"; then
top -b -n 1 | sendxmpp -s "wake up! cpu load $cpuload at `hostname`" [email protected]
fi
And on my client machine, my jabber-client wil pop-up a message, depending on your client. There are many different client, for any platform/OS.
This is just a small example; many more interesting things become really easy now. Use it from your .procmailrc. Or your logwatcher scripts. Or... (Mail is *so* 20th century :-)
more information
Try sendxmpp -h.
download and installation
You can download sendxmpp here: sendxmpp-0.0.7.tar.gz. Installation is simple (for step 4 you may need root-privs):
- unpack the tarball, and enter the new directory
- $ perl Makefile.PL
- $ make
- $ make install
NOTE1: this will install under /usr/local/. If you want to install somewhere else you could do (step 2): perl Makefile.PL PREFIX=/usr.
NOTE2: for older versions, just change the version number in the URL.
contact
You can read my Dutch blog, or my Advogato-blog. You can also send me mail, or IM me ([email protected])
(c) 2001-2004 Dirk-Jan C. Binnema
Last modified: Tue Sep 26 21:46:44 EEST 2006