go-sendxmpp
- A tool to send messages to an XMPP contact or MUC.
go-sendxmpp [-cdilntv] [-a value] [--allow-plain] [--anonymous] [--fast-invalidate] [--fast-off] [-f value] [--headline] [--help] [-h value] [-j value] [--legacy-pgp] [-m value] [--muc-password value] [--no-sasl-upgrade] [--oob-file value] [--ox] [--ox-delete-nodes] [--ox-genprivkey-rsa] [--ox-genprivkey-x25519] [--ox-import-privkey value] [--ox-passphrase value] [-p value] [--raw] [-r value] [--retry-connect value] [--retry-connect-max value] [--scram-mech-pinning value] [--ssdp-off] [-s value] [--suppress-root-warning] [--timeout value] [--tls-version value] [-u value] [--version] [recipients…]
A tool to send messages to an XMPP contact or MUC inspired by sendxmpp
.
You can either pipe a programs output to go-sendxmpp
, write in your terminal (put ^D
in a new line to
finish) or send the input from a file (-m
or --message
).
The account data is expected at ~/.config/go-sendxmpp/config
(preferred), ~/.config/go-sendxmpp/sendxmpprc
(deprecated) ~/.sendxmpprc
(for compatibility with the original perl sendxmpp) if no other configuration
file location is specified with -f
or --file
.
-a
, --alias
=[value]--allow-plain
--anonymous
-u
or --username
. Username is used to specify the server to be able to override the server by using -j
or --jserver
in cases where the service (e.g. anon.example.org) is served by another server (e.g. xmpp.example.org) but no SRV records are set up.-c
, --chatroom
=[value]-d
, --debug
--fast-invalidate
--fast-off
the FAST token will be invalidated and the stored FAST token deleted.--fast-off
--fast-invalidate
.-f
, --file
=[value]--headline
--help
-h
, --http-upload=
[value]-i
, --interactive
tail -f
).-j
, --jserver
=[value]--legacy-pgp
xmpp:user@example.org
, it can be added by using the tool sq:
$ sq key userid add -u xmpp:user@example.org -Bo newkey.asc oldkey.asc`
This key (newkey.asc
in the sq example) can than be imported by using --ox-import-privkey
.
Please note that this will store the secret key at ~/.local/share/go-sendxmpp/user_at_example_org/oxprivkey
.
If you don't want to use that account with go-sendxmpp and only imported the key to upload the public key to pubsub you might consider
deleting the file.
-l
, --listen
-m
, --message
=[value]--muc-password
=[value]--no-sasl-upgrade
-n
, --no-tls-verify
--oob-file
=[value]--ox
--ox-delete-nodes
--ox-genprivkey-rsa
-u
and -p
)
and publish the corresponding public key.
Go-sendxmpp will save the key in $XDG_DATA_HOME/go-sendxmpp/oxprivkeys
or
$HOME/.local/share/go-sendxmpp/oxprivkeys
. To protect the key a passphrase might be set
using --ox-passphrase
while generating the key. --ox-import-privkey
.--ox-genprivkey-x25519
-u
and -p
)
and publish the corresponding public key.
Go-sendxmpp will save the key in $XDG_DATA_HOME/go-sendxmpp/oxprivkeys
or
$HOME/.local/share/go-sendxmpp/oxprivkeys
. To protect the key a passphrase might be set
using --ox-passphrase
while generating the key. --ox-import-privkey
.--ox-import-privkey
=[value]--ox-passphrase
=[value]-p
, --password
=[value]--raw
-c
and go-sendxmpp will join the MUC.-r
, --recipients
=[value]--retry-connect
=[value]--retry-connect-max
=[value]--scram-mech-pinning=[<value>]
--ssdp-off
-s
, --subject
=[value]--suppress-root-warning
--timeout=
[value]-t
, --tls
--tls-version
=[value]-u
, --username
=[value]-v
, --verbose
--version
A SOCKS5 proxy can be used by setting the environment variable HTTP_PROXY
. This feature is considered experimental
and there is no guarantee that there won't be any connections not using the proxy although it didn't happen during
testing.
HTTP_PROXY="socks5://127.0.0.1:9050" go-sendxmpp --http-upload file.txt user@example.org
In general it's a good advice to only perform commands as root when it is strictly necessary. To be able to send the output from commands, that need to be performed as root, with go-sendxmpp without invoking go-sendxmpp by root sudo can be used.
In this example there is a user sendxmpp with a go-sendxmpp config in its $HOME
:
# command-that-requires-root|sudo -H -u sendxmpp go-sendxmpp me@example.org
There are no shell completions yet (contributions welcome) but for zsh it is
possible to automatically create completions from --help
which might work
good enough.
Just place the following in your ~/.zshrc
:
compdef _gnu_generic go-sendxmpp
There are no shell completions yet, but FISH can generate them from the man page with following command:
fish_update_completions
Feel free to join https://join.jabber.network/#go-sendxmpp@chat.mdosch.de?join.
Written by Martin Dosch.
Report bugs at https://salsa.debian.org/mdosch/go-sendxmpp/issues.
Copyright (c) Martin Dosch License: BSD 2-clause License
go-sendxmpp(5), xmppc(1), sendxmpp(1)