sendxmpp - Man Page

send xmpp messages from the commandline.


sendxmpp [options] <recipient1> [<recipient2> ...]

sendxmpp --raw [options]


sendxmpp is a program to send XMPP (Jabber) messages from the commandline, not unlike mail(1). Messages can be sent both to individual recipients and chatrooms.


-f,  --file file

Use file configuration file instead of ~/.sendxmpprc

-u,  --username user

Use user instead of the one in the configuration file

-p,  --password password

Use password instead of the one in the configuration file


Instead of specifying username or password, attempt to use system level SSO (e.g. kerberos) if supported.

-j,  --jserver server

Use jabber server instead of the one in the configuration file.

-o,  --component componentname

Use componentname in connect call. Seems needed for Google talk.

-r,  --resource res

Use resource res for the sender [default: 'sendxmpp']; when sending to a chatroom, this determines the 'alias'

-t,  --tls

Connect securely, using TLS

-e,  --ssl

Connect securely, using SSL

-n,  --no-tls-verify

Deactivate the verification of SSL certificates. Better way is to use parameter --tls-ca-path with the needed path to CA certificates.

-a,  --tls-ca-path

Path to your custom CA certificates, so you can verificate SSL certificates during connecting.


Connect over HTTP, allowing the use of a proxy.

-l,  --headline

Backward compatibility option. You should use --message-type=headline instead. Send a headline type message (not stored in offline messages)


Set type of message. Supported types are: message chat headline. Default message type is message. Headline type message can be set also with --headline option, see --headline

-c,  --chatroom

Send the message to a chatroom

-s,  --subject subject

Set the subject for the message to subject [default: '']; when sending to a chatroom, this will set the subject for the chatroom

-m,  --message message

Read the message from message (a file) instead of stdin

-i,  --interactive

Work in interactive mode, reading lines from stdin and sending the one-at-time

-w,  --raw

Send raw XML message to jabber server

-v,  --verbose

Give verbose output about what is happening

-h,  --help,  --usage

Show a 'Usage' message

-d,  --debug

Show debugging info while running. WARNING: This will include passwords etc. so be careful with the output! Specify multiple times to increase debug level.

Configuration File

You may define a '~/.sendxmpprc' file with the necessary data for your xmpp-account. Since version 1.24 the following format is supported:

    username: <your_username>
    jserver: <jabber_server>
    port: <jabber_port>
    password: <your_jabber_password>
    component: <optional_component_name>

Example for Google Talk servers:

    username: <>
    jserver: <>
    password: <my-secure-password>
    component: <>

With version 1.23 and older only one-line format is supported:

user@server password componentname


    # my account  secret

('#' and newlines are allowed like in shellscripts). You can add a host (or IP address) if it is different from the server part of your JID:

    # account with specific connection host; secret

You can also add a port if it is not the standard XMPP port:

    # account with weird port number secret

Of course, you may also mix the two:

    # account with a specific host and port; secret

NOTE: for your security, sendxmpp demands that the configuration file is owned by you and readable only to you (permissions 600).


   $ echo "hello bob!" | sendxmpp -s hello

     or to send to a chatroom:

   $ echo "Dinner Time" | sendxmpp -r TheCook --chatroom

     or to send your system logs somewhere, as new lines appear:

   $ tail -f /var/log/syslog | sendxmpp -i

     NOTE: be careful not the overload public jabber services

See Also

Documentation for the Net::XMPP module

The jabber homepage: <>

The sendxmpp homepage: <>


sendxmpp has been written by Dirk-Jan C. Binnema <>, and uses the Net::XMPP modules written by Ryan Eatmon. Current maintainer is Lubomir Host <>, <>


2024-01-27 perl v5.38.2 User Contributed Perl Documentation