Debian Codegraph @

man/go-sendxmpp.1.html

raw
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv='content-type' content='text/html;charset=utf-8'>
5 <meta name='generator' content='Ronn-NG/v0.10.1 (http://github.com/apjanke/ronn-ng/tree/0.10.1)'>
6 <title>go-sendxmpp(1) - A tool to send messages to an XMPP contact or MUC.</title>
7 <style type='text/css' media='all'>
8 /* style: man */
9 body#manpage {margin:0}
10 .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
11 .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
12 .mp h2 {margin:10px 0 0 0}
13 .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
14 .mp h3 {margin:0 0 0 4ex}
15 .mp dt {margin:0;clear:left}
16 .mp dt.flush {float:left;width:8ex}
17 .mp dd {margin:0 0 0 9ex}
18 .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
19 .mp pre {margin-bottom:20px}
20 .mp pre+h2,.mp pre+h3 {margin-top:22px}
21 .mp h2+pre,.mp h3+pre {margin-top:5px}
22 .mp img {display:block;margin:auto}
23 .mp h1.man-title {display:none}
24 .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
25 .mp h2 {font-size:16px;line-height:1.25}
26 .mp h1 {font-size:20px;line-height:2}
27 .mp {text-align:justify;background:#fff}
28 .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
29 .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
30 .mp u {text-decoration:underline}
31 .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
32 .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
33 .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
34 .mp b.man-ref {font-weight:normal;color:#434241}
35 .mp pre {padding:0 4ex}
36 .mp pre code {font-weight:normal;color:#434241}
37 .mp h2+pre,h3+pre {padding-left:0}
38 ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
39 ol.man-decor {width:100%}
40 ol.man-decor li.tl {text-align:left}
41 ol.man-decor li.tc {text-align:center;letter-spacing:4px}
42 ol.man-decor li.tr {text-align:right;float:right}
43 </style>
44 </head>
45 <!--
46 The following styles are deprecated and will be removed at some point:
47 div#man, div#man ol.man, div#man ol.head, div#man ol.man.
48
49 The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
50 .man-navigation should be used instead.
51 -->
52 <body id='manpage'>
53 <div class='mp' id='man'>
54
55 <div class='man-navigation' style='display:none'>
56 <a href="#NAME">NAME</a>
57 <a href="#SYNOPSIS">SYNOPSIS</a>
58 <a href="#DESCRIPTION">DESCRIPTION</a>
59 <a href="#OPTIONS">OPTIONS</a>
60 <a href="#ENVIRONMENT-VARIABLES">ENVIRONMENT VARIABLES</a>
61 <a href="#TIPS">TIPS</a>
62 <a href="#SHELL-COMPLETIONS">SHELL COMPLETIONS</a>
63 <a href="#CHAT">CHAT</a>
64 <a href="#AUTHOR">AUTHOR</a>
65 <a href="#REPORTING-BUGS">REPORTING BUGS</a>
66 <a href="#COPYRIGHT">COPYRIGHT</a>
67 <a href="#SEE-ALSO">SEE ALSO</a>
68 </div>
69
70 <ol class='man-decor man-head man head'>
71 <li class='tl'>go-sendxmpp(1)</li>
72 <li class='tc'></li>
73 <li class='tr'>go-sendxmpp(1)</li>
74 </ol>
75
76
77
78 <h2 id="NAME">NAME</h2>
79 <p class="man-name">
80 <code>go-sendxmpp</code> - <span class="man-whatis">A tool to send messages to an XMPP contact or MUC.</span>
81 </p>
82 <h2 id="SYNOPSIS">SYNOPSIS</h2>
83
84 <p><code>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] [--ox-receive-private-key value] [--ox-transfer-private-key] [-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…]</code></p>
85
86 <h2 id="DESCRIPTION">DESCRIPTION</h2>
87
88 <p>A tool to send messages to an XMPP contact or MUC inspired by <code>sendxmpp</code>. <br>
89 You can either pipe a programs output to <code>go-sendxmpp</code>, write in your terminal (put <code>^D</code> in a new line to
90 finish) or send the input from a file (<code>-m</code> or <code>--message</code>).
91 The account data is expected at <code>~/.config/go-sendxmpp/config</code> (preferred), <code>~/.config/go-sendxmpp/sendxmpprc</code>
92 (deprecated) <code>~/.sendxmpprc</code> (for compatibility with the original perl sendxmpp) if no other configuration
93 file location is specified with <code>-f</code> or <code>--file</code>.</p>
94
95 <h2 id="OPTIONS">OPTIONS</h2>
96
97 <dl>
98 <dt>
99 <code>-a</code>, <code>--alias</code>=[<var>value</var>]</dt>
100 <dd>Set alias/nickname for chatrooms.</dd>
101 <dt><code>--allow-plain</code></dt>
102 <dd>Allow PLAIN authentication. Note that this setting has no effect if there was a successful
103 connection using a SCRAM authentication mechanism before. In that case PLAIN is not allowed
104 to prevent downgrades by a man-in-the-middle attack.</dd>
105 <dt><code>--anonymous</code></dt>
106 <dd>Use anonymous authentication. Specify the the target server by using the flag <code>-u</code> or <code>--username</code>. Username is used to specify the server to be able to override the server by using <code>-j</code> or <code>--jserver</code> 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.</dd>
107 <dt>
108 <code>-c</code>, <code>--chatroom</code>=[<var>value</var>]</dt>
109 <dd>Send message to a chatroom.</dd>
110 <dt>
111 <code>-d</code>, <code>--debug</code>
112 </dt>
113 <dd>Show XMPP stanzas. These can include sensitive data.</dd>
114 <dt><code>--fast-invalidate</code></dt>
115 <dd>Invalidate XEP-0484: Fast Authentication Streamlining Tokens. The current FAST token will be invalidated and a new one will be requested. If used together with <code>--fast-off</code> the FAST token will be invalidated and the stored FAST token deleted.</dd>
116 <dt><code>--fast-off</code></dt>
117 <dd>Disable XEP-0484: Fast Authentication Streamlining Tokens. Deletes the stored FAST token when used together with <code>--fast-invalidate</code>.</dd>
118 <dt>
119 <code>-f</code>, <code>--file</code>=[<var>value</var>]</dt>
120 <dd>Set configuration file. (Default: ~/.config/go-sendxmpp/config)</dd>
121 <dt><code>--headline</code></dt>
122 <dd>Send message as type headline.</dd>
123 <dt><code>--help</code></dt>
124 <dd>Show help.</dd>
125 <dt>
126 <code>-h</code>, <code>--http-upload=</code>[<var>value</var>]</dt>
127 <dd>Send a file via http-upload. Can be invoked several times to upload multiple files.</dd>
128 <dt>
129 <code>-i</code>, <code>--interactive</code>
130 </dt>
131 <dd>Interactive mode (for use with e.g. <code>tail -f</code>).</dd>
132 <dt>
133 <code>-j</code>, <code>--jserver</code>=[<var>value</var>]</dt>
134 <dd>XMPP server address.</dd>
135 <dt><code>--legacy-pgp</code></dt>
136 <dd>"Legacy PGP" encryption using the Ox key infrastructure. This means the recipient must have an Ox key published and use the same key for legacy PGP.
137 This encryption method is deprecated and will be removed in a future version, please consider switching to
138 <em>OpenPGP for XMPP</em> (OX).
139 The use of legacy PGP is actually discouraged and only provided as a workaround for conversations users.
140 If the existing key has no ID in the form of <code>xmpp:[email protected]</code>, it can be added by using the tool <em>sq</em>:
141
142 <pre><code> $ sq key userid add -u xmpp:[email protected] -Bo newkey.asc oldkey.asc`
143 </code></pre>
144
145 <p>This key (<code>newkey.asc</code> in the <em>sq</em> example) can than be imported by using <code>--ox-import-privkey</code>.
146 Please note that this will store the secret key at <code>~/.local/share/go-sendxmpp/user_at_example_org/oxprivkey</code>.
147 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
148 deleting the file.</p>
149 </dd>
150 <dt>
151 <code>-l</code>, <code>--listen</code>
152 </dt>
153 <dd>Listen for messages and print them to stdout. If JIDs are specified only messages from those contacts
154 are shown. If no JIDs are specified or a chat room is joined all received messages will be shown.</dd>
155 <dt>
156 <code>-m</code>, <code>--message</code>=[<var>value</var>]</dt>
157 <dd>Set file including the message.</dd>
158 <dt>
159 <code>--muc-password</code>=[<var>value</var>]</dt>
160 <dd>Password for password protected MUCs.</dd>
161 <dt><code>--no-sasl-upgrade</code></dt>
162 <dd>Disable XEP-0480: SASL Upgrade Tasks.</dd>
163 <dt>
164 <code>-n</code>, <code>--no-tls-verify</code>
165 </dt>
166 <dd>Skip verification of TLS certificates (not recommended).</dd>
167 <dt>
168 <code>--oob-file</code>=[<var>value</var>]</dt>
169 <dd>URL to send a file as out of band data.</dd>
170 <dt><code>--ox</code></dt>
171 <dd>Use "OpenPGP for XMPP" encryption (experimental). <br>
172 There is no check whether the recipients key is trusted as there is no local keyring used.
173 Go-sendxmpp just uses the most recent key that is provided via pubsub and checks that it is not
174 expired. As a user facing client a notification would be shown that a new key is available and
175 ask the user whether to use the new key or stick to the old one. As go-sendxmpp is usually
176 used in scripts it just accepts the new key to prevent the user from missing a new notification
177 due to changed keys.</dd>
178 <dt><code>--ox-delete-nodes</code></dt>
179 <dd>Delete existing OpenPGP nodes (public key and private key backup) on the server.</dd>
180 <dt><code>--ox-genprivkey-rsa</code></dt>
181 <dd>Generate a private OpenPGP key (RSA 4096 bit) for the configured account (via config file or <code>-u</code> and <code>-p</code>)
182 and publish the corresponding public key.
183 Go-sendxmpp will save the key in <code>$XDG_DATA_HOME/go-sendxmpp/oxprivkeys</code> or
184 <code>$HOME/.local/share/go-sendxmpp/oxprivkeys</code>. To protect the key a passphrase might be set
185 using <code>--ox-passphrase</code> while generating the key. <br>
186 If there is an existing private key for "OpenPGP for XMPP" created by another client (e.g. profanity)
187 it might be imported using <code>--ox-import-privkey</code>.</dd>
188 <dt><code>--ox-genprivkey-x25519</code></dt>
189 <dd>Generate a private OpenPGP key (X25519) for the configured account (via config file or <code>-u</code> and <code>-p</code>)
190 and publish the corresponding public key.
191 Go-sendxmpp will save the key in <code>$XDG_DATA_HOME/go-sendxmpp/oxprivkeys</code> or
192 <code>$HOME/.local/share/go-sendxmpp/oxprivkeys</code>. To protect the key a passphrase might be set
193 using <code>--ox-passphrase</code> while generating the key. <br>
194 If there is an existing private key for "OpenPGP for XMPP" created by another client (e.g. profanity)
195 it might be imported using <code>--ox-import-privkey</code>.</dd>
196 <dt>
197 <code>--ox-import-privkey</code>=[<var>value</var>]</dt>
198 <dd>Import an existing private OpenPGP key.</dd>
199 <dt>
200 <code>--ox-passphrase</code>=[<var>value</var>]</dt>
201 <dd>Passphrase for locking and unlocking the private OpenPGP key.</dd>
202 <dt>
203 <code>--ox-receive-private-key</code>=[<var>value</var>]</dt>
204 <dd>Import your encrypted private Ox key from the server. Requires the transfer code.</dd>
205 <dt><code>--ox-transfer-private-key</code></dt>
206 <dd>Upload your encrypted private Ox key to the server for key transfer. The private key will be encrypted
207 by a random generated passphrase. Please make sure to not lose the passphrase as it can not be recovered.</dd>
208 <dt>
209 <code>-p</code>, <code>--password</code>=[<var>value</var>]</dt>
210 <dd>Password for XMPP account.</dd>
211 <dt><code>--raw</code></dt>
212 <dd>Send raw XML. To send raw XML to a contact as normal chat message no contact must be specified.
213 To send raw XML to a MUC you have to specify the MUC via <code>-c</code> and go-sendxmpp will join the MUC.</dd>
214 <dt>
215 <code>-r</code>, <code>--recipients</code>=[<var>value</var>]</dt>
216 <dd>Read recipients from file, one JID per line.</dd>
217 <dt>
218 <code>--retry-connect</code>=[<var>value</var>]</dt>
219 <dd>Specify a connection retry waiting time in seconds. This specifies the waiting time until go-sendxmpp
220 will try to reconnect if connecting fails. This setting only affects the initial connection, it does not
221 reconnect after losing the connection. It is also ignored if the connection fails due to an authentication
222 error as then it does not make sense to try again using the same credentials. Setting a time of 0 seconds
223 disables this functionality.
224 (Default: 0)</dd>
225 <dt>
226 <code>--retry-connect-max</code>=[<var>value</var>]</dt>
227 <dd>Number of maximum retries to perform for '--retry-connect'. A value of 0 means unlimited retries.
228 (Default: 0)</dd>
229 <dt><code>--scram-mech-pinning=[&lt;value&gt;]</code></dt>
230 <dd>Enforce the use of a certain SCRAM authentication mechanism. Currently go-sendxmpp supports
231 <strong>SCRAM-SHA-1</strong>, <strong>SCRAM-SHA-1-PLUS</strong>, <strong>SCRAM-SHA-256</strong>, <strong>SCRAM-SHA-256-PLUS</strong>, <strong>SCRAM-SHA-512</strong>
232 and <strong>SCRAM-SHA-512-PLUS</strong>. You should know what you are doing when using this setting and
233 make sure the chosen mechanism is supported by the server. If not set, go-sendxmpp will use XEP-0474
234 to prevent downgrade attacks (needs server support and requires a SCRAM authentication mechanism).</dd>
235 <dt><code>--ssdp-off</code></dt>
236 <dd>Disable XEP-0474: SASL SCRAM Downgrade Protection.</dd>
237 <dt>
238 <code>-s</code>, <code>--subject</code>=[<var>value</var>]</dt>
239 <dd>Set message subject.</dd>
240 <dt><code>--suppress-root-warning</code></dt>
241 <dd>Suppress warning when run as root.
242 Note that running as root is discouraged although go-sendxmpp tries to drop the root privileges
243 before doing network calls. Be aware that <strong>OX</strong>, <strong>legacy PGP</strong> and the pinning to not use <strong>PLAIN</strong>
244 authentication after a successful <strong>SCRAM</strong> authentication are disabled as those need file system access
245 in the private user scope after dropping the privileges.</dd>
246 <dt>
247 <code>--timeout=</code>[<var>value</var>]</dt>
248 <dd>Connection timeout in seconds. (Default: 10)</dd>
249 <dt>
250 <code>-t</code>, <code>--tls</code>
251 </dt>
252 <dd>Use direct TLS.</dd>
253 <dt>
254 <code>--tls-version</code>=[<var>value</var>]</dt>
255 <dd>Minimal TLS version. 10 (TLSv1.0), 11 (TLSv1.1), 12 (TLSv1.2), 13 (TLSv1.3) (Default: 13)</dd>
256 <dt>
257 <code>-u</code>, <code>--username</code>=[<var>value</var>]</dt>
258 <dd>Username for XMPP account (JID).</dd>
259 <dt>
260 <code>-v</code>, <code>--verbose</code>
261 </dt>
262 <dd>Show debug information. These can include sensitive data.</dd>
263 <dt><code>--version</code></dt>
264 <dd>Show version information.</dd>
265 </dl>
266
267 <h2 id="ENVIRONMENT-VARIABLES">ENVIRONMENT VARIABLES</h2>
268
269 <h3 id="HTTP_PROXY">HTTP_PROXY</h3>
270
271 <p>A SOCKS5 proxy can be used by setting the environment variable <code>HTTP_PROXY</code>. This feature is considered experimental
272 and there is no guarantee that there won't be any connections not using the proxy although it didn't happen during
273 testing.</p>
274
275 <pre><code>HTTP_PROXY="socks5://127.0.0.1:9050" go-sendxmpp --http-upload file.txt [email protected]
276 </code></pre>
277
278 <h2 id="TIPS">TIPS</h2>
279
280 <h3 id="USAGE-BY-ROOT">USAGE BY ROOT</h3>
281
282 <p>In general it's a good advice to only perform commands as root when it is strictly necessary. To be able to send
283 the output from commands, that need to be performed as root, with go-sendxmpp without invoking go-sendxmpp by
284 root sudo can be used.</p>
285
286 <p>In this example there is a user <strong>sendxmpp</strong> with a go-sendxmpp config in its <code>$HOME</code>:</p>
287
288 <pre><code># command-that-requires-root|sudo -H -u sendxmpp go-sendxmpp [email protected]
289 </code></pre>
290
291 <p>If go-sendxmpp is run as root it will drop the root privileges before connecting to the server.
292 This means <strong>FAST</strong> and <strong>OX</strong> will be disabled as go-sendxmpp will not have the necessary rights to store
293 the necessary data (e.g. FAST tokens or OX key material) after dropping the privileges.
294 This is just to avoid network connections as root and doesn't mean that running as root as a supported use case,
295 in fact it is highly recommended to never run go-sendxmpp as root.</p>
296
297 <h2 id="SHELL-COMPLETIONS">SHELL COMPLETIONS</h2>
298
299 <h3 id="ZSH">ZSH</h3>
300
301 <p>There are no shell completions yet (contributions welcome) but for zsh it is
302 possible to automatically create completions from <code>--help</code> which might work
303 good enough.</p>
304
305 <p>Just place the following in your <code>~/.zshrc</code>:</p>
306
307 <pre><code>compdef _gnu_generic go-sendxmpp
308 </code></pre>
309
310 <h3 id="FISH">FISH</h3>
311
312 <p>There are no shell completions yet, but FISH can generate them from the man page with following command:</p>
313
314 <pre><code>fish_update_completions
315 </code></pre>
316
317 <h2 id="CHAT">CHAT</h2>
318
319 <p>Feel free to join <a href="https://join.jabber.network/#[email protected]?join" data-bare-link="true">https://join.jabber.network/#[email protected]?join</a>.</p>
320
321 <h2 id="AUTHOR">AUTHOR</h2>
322
323 <p>Written by Martin Dosch.</p>
324
325 <h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
326
327 <p>Report bugs at <a href="https://salsa.debian.org/mdosch/go-sendxmpp/-/work_items" data-bare-link="true">https://salsa.debian.org/mdosch/go-sendxmpp/-/work_items</a>.</p>
328
329 <h2 id="COPYRIGHT">COPYRIGHT</h2>
330
331 <p>Copyright (c) Martin Dosch
332 License: BSD 2-clause License</p>
333
334 <h2 id="SEE-ALSO">SEE ALSO</h2>
335
336 <p><a class="man-ref" href="go-sendxmpp.5.html">go-sendxmpp<span class="s">(5)</span></a>, <span class="man-ref">xmppc<span class="s">(1)</span></span>, <span class="man-ref">sendxmpp<span class="s">(1)</span></span></p>
337
338 <ol class='man-decor man-foot man foot'>
339 <li class='tl'></li>
340 <li class='tc'>July 2026</li>
341 <li class='tr'>go-sendxmpp(1)</li>
342 </ol>
343
344 </div>
345 </body>
346 </html>