Script to send message


can anyone share a working linux script to send message through openfire? I tried sendxmpp and it isn’t working for me even with workarounds.

Im so interesting in this feature too,

Try with sendxmpp and Openfire 3.8.1 but allways return Error ‘AuthSend’: error: not-authorized[?], I try with a account and have sucess no problem.

Read another post like say that solution:


to get this to work by commenting out this line in /usr/lib/perl5/vendor_perl/5.8.8/Net/XMPP/

return $self->AuthSASL(%args);


but this way no error is returned but message is not send.

Some ideas?? I try with (phyton script) with the same not-authorized result


test with ruby on rails and

same result with openfire: `auth’: not-authorized (Jabber::ClientAuthenticationFailure)

and success in


#!/usr/bin/env ruby

$:.unshift “#{File.dirname(FILE)}/…/lib”

require ‘test/unit’

require ‘timeout’

require ‘/usr/lib/ruby/gems/1.8/gems/xmpp4r-simple-0.8.8/lib/xmpp4r-simple.rb’

jabber =‘test1@ip_openfireserver’, ‘password’)

jabber.deliver(“test2@ip_openfireserver”, “Message Testttt”)



I continued investigating,could be a certificate problem?


OK i found my error, in my case the domain IP and the public IP that my server respond is different so the user@internal_ip dont match with the

<?xml version='1.0'?>

<stream:stream xmlns=“jabber:client” to=“public_IP” version=“1.0” xmlns:stream=“” >

that the server respond.

change the registry in xmpp plugin to user to user@public_IP and go ok…

so… with spark and others xmpp desktop clients I can connect to user@internal_ip without problems…

Can you help me ?

When I try to send message from server with xmpp library (perl), in spark, I get “user” went offline at xx:xx am/pm but any message, do you know this issue ?