--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Net::Jabber;
+use POSIX qw(strftime);
+
+my $recip = shift @ARGV;
+my $mensaje = join ("\n",@ARGV);
+my $room = "";
+
+if ($recip=~m/\@conference/)
+{
+($room)=$recip=~m/(.*)\@conference/;
+}
+
+my $jserver="chat.uio.no";
+my $jport="5222";
+my $domain="chat.uio.no.";
+
+my $user="zabbix-prod"; # gtalk user authentication
+my $pass="x/bVBC*A";
+
+my $nick="Zabbix-prod";
+my $component="chat.uio.no";
+
+my $con = new Net::Jabber::Client();
+
+sub Msg($) {
+ chomp($_[0]);
+if ($room)
+{
+ $con->MessageSend(to=>$recip, type=>"groupchat", body=>$_[0]);
+} else {
+ $con->MessageSend(to=>$recip, type=>"chat", body=>$_[0]);
+}
+}
+
+
+$con->Connect(hostname=>$jserver,port=>$jport,connectiontype=>'tcpip', tls=>'1',componentname=>$component) or die "can't connect ($!)";
+my @result = $con->AuthSend(username=>$user, password=>$pass, domain=>$domain, resource=>"$0-$$");
+
+if ($result[0] ne "ok") {
+ die "Ident/Auth with server failed: $result[0] - $result[1]\n";
+}
+
+$con->RosterGet(); # tell server to send presence info
+$con->PresenceSend(); # tell world that we are logged in
+
+if ($room)
+{
+ $con->MUCJoin(room=>$room, server=>"conference.$jserver", nick=>($nick||$user));
+}
+
+Msg($mensaje);
+sleep 1;
+
+$con->Disconnect();