powered by Jive Software

OT but related: Using smack.jar fails when called from procmail

Back when the server was called jabber, I used the well-known Perl script jabber_alert.pl to write a quick e-mail to jabber gateway. It worked fine until we upgraded. Apparently the authentication changed between the two versions, so my gateway stopped working.

Yesterday I wrote a quick replacement in Java using smack.jar and smackx.jar , with the capability to either send a message to a user from stdin, or from a file. It works great from the command line. It works great from a bash script. It fails miserably when run from the .procmailrc script. In my procmail log, I see the following:

Resource binding not offered by server:

at org.jivesoftware.smack.SASLAuthentication.bindResourceAndEstablishSession(SASLA uthentication.java:289)

at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 210)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:426)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:389)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:370)

at com.valleyrec.smack.SmackAlert.send_msg(Unknown Source)

at com.valleyrec.smack.SmackAlert.main(Unknown Source)

I’‘ve tried piping the message body via stdin to the Java program. I’'ve tried writing the body of the message to a file, then sending from that. Any case produces the exception shown above, which appears to be related to authentication (the bane of my existence).

Can anyone offer any suggestions as to what to try next, short of anything involving black candles and chickens?