1 .\"@ nail.1 - S-nail(1) reference manual.
3 .\" Copyright (c) 2000-2008 Gunnar Ritter, Freiburg i. Br., Germany.
4 .\" Copyright (c) 2012 - 2018 Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
6 .\" Copyright (c) 1980, 1990, 1993
7 .\" The Regents of the University of California. All rights reserved.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
17 .\" 3. Neither the name of the University nor the names of its contributors
18 .\" may be used to endorse or promote products derived from this software
19 .\" without specific prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .\"@ S-nail v14.9.9 / 2018-03-06
46 .ds OU [no v15-compat]
47 .ds ID [v15 behaviour may differ]
48 .ds NQ [Only new quoting rules]
53 .\" Uncomment for mandoc(1) compat.:
54 .\".ds mx-toc-name TABLE OF CONTENTS
55 .Mx -enable -preprocessed
56 .Mx -anchor-spass Sh "NAME" 1
57 .Mx -anchor-spass Sh "SYNOPSIS" 2
58 .Mx -anchor-spass Sh "\*[mx-toc-name]" 3
59 .Mx -anchor-spass Sh "DESCRIPTION" 4
60 .Mx -anchor-spass Ss "Options" 4
61 .Mx -anchor-spass Ss "A starter" 4
62 .Mx -anchor-spass Ss "On sending mail, and non-interactive mode" 4
63 .Mx -anchor-spass Ss "On reading mail, and interactive mode" 4
64 .Mx -anchor-spass Ss "HTML mail and MIME attachments" 4
65 .Mx -anchor-spass Ss "Mailing lists" 4
66 .Mx -anchor-spass Ss "Signed and encrypted messages with S/MIME" 4
67 .Mx -anchor-spass Ss "On URL syntax and credential lookup" 4
68 .Mx -anchor-spass Ss "Encrypted network communication" 4
69 .Mx -anchor-spass Ss "Character sets" 4
70 .Mx -anchor-spass Ss "Message states" 4
71 .Mx -anchor-spass Ss "Specifying messages" 4
72 .Mx -anchor-spass Ss "On terminal control and line editor" 4
73 .Mx -anchor-spass Ss "Coloured display" 4
74 .Mx -anchor-spass Ss "Handling spam" 4
75 .Mx -anchor-spass Sh "COMMANDS" 5
76 .Mx -anchor-spass Ss "Command modifiers" 5
77 .Mx -anchor-spass Ss "Message list arguments" 5
78 .Mx -anchor-spass Ss "Old-style argument quoting" 5
79 .Mx -anchor-spass Ss "Shell-style argument quoting" 5
80 .Mx -anchor-spass Ss "Raw data arguments for codec commands" 5
81 .Mx -anchor-spass Ss "Filename transformations" 5
82 .Mx -anchor-spass Ss "Commands" 5
83 .Mx -anchor-spass Sh "COMMAND ESCAPES" 6
84 .Mx -anchor-spass Sh "INTERNAL VARIABLES" 7
85 .Mx -anchor-spass Ss "Initial settings" 7
86 .Mx -anchor-spass Ss "Variables" 7
87 .Mx -anchor-spass Sh "ENVIRONMENT" 8
88 .Mx -anchor-spass Sh "FILES" 9
89 .Mx -anchor-spass Ss "Resource files" 9
90 .Mx -anchor-spass Ss "The mime.types files" 9
91 .Mx -anchor-spass Ss "The Mailcap files" 9
92 .Mx -anchor-spass Ss "The .netrc file" 9
93 .Mx -anchor-spass Sh "EXAMPLES" 10
94 .Mx -anchor-spass Ss "An example configuration" 10
95 .Mx -anchor-spass Ss "S/MIME step by step" 10
96 .Mx -anchor-spass Ss "Using CRLs with S/MIME or SSL/TLS" 10
97 .Mx -anchor-spass Sh "FAQ" 11
98 .Mx -anchor-spass Ss "\*(UA shortly hangs on startup" 11
99 .Mx -anchor-spass Ss "I cannot login to Google mail aka GMail" 11
100 .Mx -anchor-spass Ss "Not \(dqdefunctional\(dq, but the editor key does not work" 11
101 .Mx -anchor-spass Ss "Can \*(UA git-send-email?" 11
102 .Mx -anchor-spass Sh "IMAP CLIENT" 12
103 .Mx -anchor-spass Sh "SEE ALSO" 13
104 .Mx -anchor-spass Sh "HISTORY" 14
105 .Mx -anchor-spass Sh "AUTHORS" 15
106 .Mx -anchor-spass Sh "CAVEATS" 16
107 .Mx -anchor-spass Sh "BUGS" 17
108 .Mx -anchor-spass Fl ":"
109 .Mx -anchor-spass Fl "A"
110 .Mx -anchor-spass Fl "a"
111 .Mx -anchor-spass ixsx "character set specification"
112 .Mx -anchor-spass Fl "b"
113 .Mx -anchor-spass Fl "C"
114 .Mx -anchor-spass Fl "c"
115 .Mx -anchor-spass Fl "d"
116 .Mx -anchor-spass Fl "E"
117 .Mx -anchor-spass Fl "e"
118 .Mx -anchor-spass Fl "F"
119 .Mx -anchor-spass Fl "f"
120 .Mx -anchor-spass Fl "H"
121 .Mx -anchor-spass Fl "h"
122 .Mx -anchor-spass Fl "i"
123 .Mx -anchor-spass Fl "L"
124 .Mx -anchor-spass Fl "M"
125 .Mx -anchor-spass Fl "m"
126 .Mx -anchor-spass Fl "N"
127 .Mx -anchor-spass Fl "n"
128 .Mx -anchor-spass Fl "q"
129 .Mx -anchor-spass Fl "R"
130 .Mx -anchor-spass Fl "r"
131 .Mx -anchor-spass Fl "S"
132 .Mx -anchor-spass Fl "s"
133 .Mx -anchor-spass Fl "t"
134 .Mx -anchor-spass Fl "u"
135 .Mx -anchor-spass Fl "V"
136 .Mx -anchor-spass Fl "v"
137 .Mx -anchor-spass Fl "X"
138 .Mx -anchor-spass Fl "~"
139 .Mx -anchor-spass Fl "#"
140 .Mx -anchor-spass Fl "."
141 .Mx -anchor-spass Cd "mle-go-home"
142 .Mx -anchor-spass Cd "mle-go-bwd"
143 .Mx -anchor-spass Cd "mle-del-fwd"
144 .Mx -anchor-spass Cd "mle-go-end"
145 .Mx -anchor-spass Cd "mle-go-fwd"
146 .Mx -anchor-spass Cd "mle-reset"
147 .Mx -anchor-spass Cd "mle-del-bwd"
148 .Mx -anchor-spass Cd "mle-complete"
149 .Mx -anchor-spass Cd "mle-commit"
150 .Mx -anchor-spass Cd "mle-snarf-end"
151 .Mx -anchor-spass Cd "mle-repaint"
152 .Mx -anchor-spass Cd "mle-hist-fwd"
153 .Mx -anchor-spass Cd "mle-hist-bwd"
154 .Mx -anchor-spass Cd "mle-quote-rndtrip"
155 .Mx -anchor-spass Cd "mle-hist-srch-bwd"
156 .Mx -anchor-spass Cd "mle-hist-srch-fwd"
157 .Mx -anchor-spass Cd "mle-paste"
158 .Mx -anchor-spass Cd "mle-snarf-line"
159 .Mx -anchor-spass Cd "mle-prompt-char"
160 .Mx -anchor-spass Cd "mle-snarf-word-bwd"
161 .Mx -anchor-spass Cd "mle-go-word-fwd"
162 .Mx -anchor-spass Cd "mle-go-word-bwd"
163 .Mx -anchor-spass Cd "mle-cancel"
164 .Mx -anchor-spass Cd "mle-snarf-word-fwd"
165 .Mx -anchor-spass Cd "mle-fullreset"
166 .Mx -anchor-spass Cd "mle-bell"
167 .Mx -anchor-spass Cm "\e"
168 .Mx -anchor-spass Cm "ignerr"
169 .Mx -anchor-spass Cm "local"
170 .Mx -anchor-spass Cm "scope"
171 .Mx -anchor-spass Cm "u"
172 .Mx -anchor-spass Cm "vput"
173 .Mx -anchor-spass Cm "wysh"
174 .Mx -anchor-spass ixsx "primary system mailbox"
175 .Mx -anchor-spass ixsx "secondary mailbox"
176 .Mx -anchor-spass Ic "!"
177 .Mx -anchor-spass Ic "#"
178 .Mx -anchor-spass Ic "+"
179 .Mx -anchor-spass Ic "-"
180 .Mx -anchor-spass Ic "="
181 .Mx -anchor-spass Ic "?"
182 .Mx -anchor-spass Ic "|"
183 .Mx -anchor-spass Ic "account"
184 .Mx -anchor-spass Ic "unaccount"
185 .Mx -anchor-spass Ic "addrcodec"
186 .Mx -anchor-spass Ic "alias"
187 .Mx -anchor-spass Ic "unalias"
188 .Mx -anchor-spass Ic "alternates"
189 .Mx -anchor-spass Ic "unalternates"
190 .Mx -anchor-spass Ic "answered"
191 .Mx -anchor-spass Ic "unanswered"
192 .Mx -anchor-spass Ic "bind"
193 .Mx -anchor-spass Ic "unbind"
194 .Mx -anchor-spass Ic "call"
195 .Mx -anchor-spass Ic "call_if"
196 .Mx -anchor-spass Ic "cd"
197 .Mx -anchor-spass Ic "certsave"
198 .Mx -anchor-spass Ic "charsetalias"
199 .Mx -anchor-spass Ic "uncharsetalias"
200 .Mx -anchor-spass Ic "chdir"
201 .Mx -anchor-spass Ic "collapse"
202 .Mx -anchor-spass Ic "uncollapse"
203 .Mx -anchor-spass Ic "colour"
204 .Mx -anchor-spass Ic "uncolour"
205 .Mx -anchor-spass Ic "commandalias"
206 .Mx -anchor-spass Ic "uncommandalias"
207 .Mx -anchor-spass Ic "Copy"
208 .Mx -anchor-spass Ic "copy"
209 .Mx -anchor-spass Ic "cwd"
210 .Mx -anchor-spass Ic "Decrypt"
211 .Mx -anchor-spass Ic "decrypt"
212 .Mx -anchor-spass Ic "define"
213 .Mx -anchor-spass Ic "undefine"
214 .Mx -anchor-spass Ic "delete"
215 .Mx -anchor-spass Ic "undelete"
216 .Mx -anchor-spass Ic "discard"
217 .Mx -anchor-spass Ic "dp"
218 .Mx -anchor-spass Ic "dt"
219 .Mx -anchor-spass Ic "dotmove"
220 .Mx -anchor-spass Ic "draft"
221 .Mx -anchor-spass Ic "undraft"
222 .Mx -anchor-spass Ic "echo"
223 .Mx -anchor-spass Ic "echoerr"
224 .Mx -anchor-spass Ic "echon"
225 .Mx -anchor-spass Ic "echoerrn"
226 .Mx -anchor-spass Ic "edit"
227 .Mx -anchor-spass Ic "elif"
228 .Mx -anchor-spass Ic "else"
229 .Mx -anchor-spass Ic "endif"
230 .Mx -anchor-spass Ic "environ"
231 .Mx -anchor-spass Ic "errors"
232 .Mx -anchor-spass Ic "eval"
233 .Mx -anchor-spass Ic "exit"
234 .Mx -anchor-spass Ic "File"
235 .Mx -anchor-spass Ic "file"
236 .Mx -anchor-spass Ic "filetype"
237 .Mx -anchor-spass Ic "unfiletype"
238 .Mx -anchor-spass Ic "flag"
239 .Mx -anchor-spass Ic "unflag"
240 .Mx -anchor-spass Ic "folder"
241 .Mx -anchor-spass Ic "folders"
242 .Mx -anchor-spass Ic "Followup"
243 .Mx -anchor-spass Ic "followup"
244 .Mx -anchor-spass Ic "followupall"
245 .Mx -anchor-spass Ic "followupsender"
246 .Mx -anchor-spass Ic "Forward"
247 .Mx -anchor-spass Ic "forward"
248 .Mx -anchor-spass Ic "from"
249 .Mx -anchor-spass Ic "headerpick"
250 .Mx -anchor-spass Ic "unheaderpick"
251 .Mx -anchor-spass Ic "headers"
252 .Mx -anchor-spass Ic "help"
253 .Mx -anchor-spass Ic "history"
254 .Mx -anchor-spass Ic "hold"
255 .Mx -anchor-spass Ic "if"
256 .Mx -anchor-spass Ic "ignore"
257 .Mx -anchor-spass Ic "list"
258 .Mx -anchor-spass Ic "localopts"
259 .Mx -anchor-spass Ic "Lreply"
260 .Mx -anchor-spass Ic "Mail"
261 .Mx -anchor-spass Ic "mail"
262 .Mx -anchor-spass Ic "mbox"
263 .Mx -anchor-spass Ic "mimetype"
264 .Mx -anchor-spass Ic "unmimetype"
265 .Mx -anchor-spass Ic "mlist"
266 .Mx -anchor-spass Ic "unmlist"
267 .Mx -anchor-spass Ic "mimeview"
268 .Mx -anchor-spass Ic "mlsubscribe"
269 .Mx -anchor-spass Ic "unmlsubscribe"
270 .Mx -anchor-spass Ic "Move"
271 .Mx -anchor-spass Ic "move"
272 .Mx -anchor-spass Ic "More"
273 .Mx -anchor-spass Ic "more"
274 .Mx -anchor-spass Ic "netrc"
275 .Mx -anchor-spass Ic "newmail"
276 .Mx -anchor-spass Ic "next"
277 .Mx -anchor-spass Ic "New"
278 .Mx -anchor-spass Ic "new"
279 .Mx -anchor-spass Ic "noop"
280 .Mx -anchor-spass Ic "Page"
281 .Mx -anchor-spass Ic "page"
282 .Mx -anchor-spass Ic "Pipe"
283 .Mx -anchor-spass Ic "pipe"
284 .Mx -anchor-spass Ic "preserve"
285 .Mx -anchor-spass Ic "Print"
286 .Mx -anchor-spass Ic "print"
287 .Mx -anchor-spass Ic "quit"
288 .Mx -anchor-spass Ic "read"
289 .Mx -anchor-spass Ic "readall"
290 .Mx -anchor-spass Ic "readctl"
291 .Mx -anchor-spass Ic "remove"
292 .Mx -anchor-spass Ic "rename"
293 .Mx -anchor-spass Ic "Reply"
294 .Mx -anchor-spass Ic "reply"
295 .Mx -anchor-spass Ic "replyall"
296 .Mx -anchor-spass Ic "replysender"
297 .Mx -anchor-spass Ic "Resend"
298 .Mx -anchor-spass Ic "resend"
299 .Mx -anchor-spass Ic "Respond"
300 .Mx -anchor-spass Ic "respond"
301 .Mx -anchor-spass Ic "respondall"
302 .Mx -anchor-spass Ic "respondsender"
303 .Mx -anchor-spass Ic "retain"
304 .Mx -anchor-spass Ic "return"
305 .Mx -anchor-spass Ic "Save"
306 .Mx -anchor-spass Ic "save"
307 .Mx -anchor-spass Ic "search"
308 .Mx -anchor-spass Ic "seen"
309 .Mx -anchor-spass Ic "set"
310 .Mx -anchor-spass Ic "unset"
311 .Mx -anchor-spass Ic "shcodec"
312 .Mx -anchor-spass Ic "shell"
313 .Mx -anchor-spass Ic "shortcut"
314 .Mx -anchor-spass Ic "unshortcut"
315 .Mx -anchor-spass Ic "shift"
316 .Mx -anchor-spass Ic "show"
317 .Mx -anchor-spass Ic "size"
318 .Mx -anchor-spass Ic "sleep"
319 .Mx -anchor-spass Ic "sort"
320 .Mx -anchor-spass Ic "unsort"
321 .Mx -anchor-spass Ic "source"
322 .Mx -anchor-spass Ic "source_if"
323 .Mx -anchor-spass Ic "spamclear"
324 .Mx -anchor-spass Ic "spamforget"
325 .Mx -anchor-spass Ic "spamham"
326 .Mx -anchor-spass Ic "spamrate"
327 .Mx -anchor-spass Ic "spamset"
328 .Mx -anchor-spass Ic "spamspam"
329 .Mx -anchor-spass Ic "Top"
330 .Mx -anchor-spass Ic "top"
331 .Mx -anchor-spass Ic "touch"
332 .Mx -anchor-spass Ic "Type"
333 .Mx -anchor-spass Ic "type"
334 .Mx -anchor-spass Ic "unignore"
335 .Mx -anchor-spass Ic "Unread"
336 .Mx -anchor-spass Ic "unread"
337 .Mx -anchor-spass Ic "unretain"
338 .Mx -anchor-spass Ic "urlcodec"
339 .Mx -anchor-spass Ic "varedit"
340 .Mx -anchor-spass Ic "varshow"
341 .Mx -anchor-spass Ic "verify"
342 .Mx -anchor-spass Ic "version"
343 .Mx -anchor-spass Ic "vexpr"
344 .Mx -anchor-spass Ic "vpospar"
345 .Mx -anchor-spass Ic "visual"
346 .Mx -anchor-spass Ic "write"
347 .Mx -anchor-spass Ic "xcall"
348 .Mx -anchor-spass Ic "xit"
349 .Mx -anchor-spass Ic "z"
350 .Mx -anchor-spass Ic "Z"
351 .Mx -anchor-spass Ic "~~"
352 .Mx -anchor-spass Ic "~!"
353 .Mx -anchor-spass Ic "~."
354 .Mx -anchor-spass Ic "~:"
355 .Mx -anchor-spass Ic "~<"
356 .Mx -anchor-spass Ic "~<!"
357 .Mx -anchor-spass Ic "~?"
358 .Mx -anchor-spass Ic "~@"
359 .Mx -anchor-spass Ic "~|"
360 .Mx -anchor-spass Ic "~^"
361 .Mx -anchor-spass Ic "~A"
362 .Mx -anchor-spass Ic "~a"
363 .Mx -anchor-spass Ic "~b"
364 .Mx -anchor-spass Ic "~c"
365 .Mx -anchor-spass Ic "~d"
366 .Mx -anchor-spass Ic "~e"
367 .Mx -anchor-spass Ic "~F"
368 .Mx -anchor-spass Ic "~f"
369 .Mx -anchor-spass Ic "~H"
370 .Mx -anchor-spass Ic "~h"
371 .Mx -anchor-spass Ic "~I"
372 .Mx -anchor-spass Ic "~i"
373 .Mx -anchor-spass Ic "~M"
374 .Mx -anchor-spass Ic "~m"
375 .Mx -anchor-spass Ic "~p"
376 .Mx -anchor-spass Ic "~q"
377 .Mx -anchor-spass Ic "~R"
378 .Mx -anchor-spass Ic "~r"
379 .Mx -anchor-spass Ic "~s"
380 .Mx -anchor-spass Ic "~t"
381 .Mx -anchor-spass Ic "~U"
382 .Mx -anchor-spass Ic "~u"
383 .Mx -anchor-spass Ic "~v"
384 .Mx -anchor-spass Ic "~w"
385 .Mx -anchor-spass Ic "~x"
386 .Mx -anchor-spass Va "?"
387 .Mx -anchor-spass Va "!"
388 .Mx -anchor-spass Va "^"
389 .Mx -anchor-spass Va "^ERR"
390 .Mx -anchor-spass Va "^ERRDOC"
391 .Mx -anchor-spass Va "^ERRNAME"
392 .Mx -anchor-spass Va "*"
393 .Mx -anchor-spass Va "@"
394 .Mx -anchor-spass Va "#"
395 .Mx -anchor-spass Va "0"
396 .Mx -anchor-spass Va "1"
397 .Mx -anchor-spass Va "account"
398 .Mx -anchor-spass Va "add-file-recipients"
399 .Mx -anchor-spass Va "allnet"
400 .Mx -anchor-spass Va "append"
401 .Mx -anchor-spass Va "askatend"
402 .Mx -anchor-spass Va "askattach"
403 .Mx -anchor-spass Va "askcc"
404 .Mx -anchor-spass Va "askbcc"
405 .Mx -anchor-spass Va "asksend"
406 .Mx -anchor-spass Va "asksign"
407 .Mx -anchor-spass Va "asksub"
408 .Mx -anchor-spass Va "attrlist"
409 .Mx -anchor-spass Va "autobcc"
410 .Mx -anchor-spass Va "autocc"
411 .Mx -anchor-spass Va "autocollapse"
412 .Mx -anchor-spass Va "autoprint"
413 .Mx -anchor-spass Va "autosort"
414 .Mx -anchor-spass Va "bang"
415 .Mx -anchor-spass Va "bind-timeout"
416 .Mx -anchor-spass Va "bsdcompat"
417 .Mx -anchor-spass Va "bsdflags"
418 .Mx -anchor-spass Va "bsdheadline"
419 .Mx -anchor-spass Va "bsdmsgs"
420 .Mx -anchor-spass Va "bsdorder"
421 .Mx -anchor-spass Va "build-os"
422 .Mx -anchor-spass Va "build-osenv"
423 .Mx -anchor-spass Va "charset-7bit"
424 .Mx -anchor-spass Va "charset-8bit"
425 .Mx -anchor-spass Va "charset-unknown-8bit"
426 .Mx -anchor-spass Va "cmd"
427 .Mx -anchor-spass Va "colour-disable"
428 .Mx -anchor-spass Va "colour-pager"
429 .Mx -anchor-spass Va "contact-mail"
430 .Mx -anchor-spass Va "contact-web"
431 .Mx -anchor-spass Va "crt"
432 .Mx -anchor-spass Va "customhdr"
433 .Mx -anchor-spass Va "datefield"
434 .Mx -anchor-spass Va "datefield-markout-older"
435 .Mx -anchor-spass Va "debug"
436 .Mx -anchor-spass Va "disposition-notification-send"
437 .Mx -anchor-spass Va "dot"
438 .Mx -anchor-spass Va "dotlock-ignore-error"
439 .Mx -anchor-spass Va "editalong"
440 .Mx -anchor-spass Va "editheaders"
441 .Mx -anchor-spass Va "emptystart"
442 .Mx -anchor-spass Va "errexit"
443 .Mx -anchor-spass Va "escape"
444 .Mx -anchor-spass Va "expandaddr"
445 .Mx -anchor-spass Va "expandargv"
446 .Mx -anchor-spass Va "features"
447 .Mx -anchor-spass Va "flipr"
448 .Mx -anchor-spass Va "folder"
449 .Mx -anchor-spass Va "folder-hook"
450 .Mx -anchor-spass Va "folder-resolved"
451 .Mx -anchor-spass Va "followup-to"
452 .Mx -anchor-spass Va "followup-to-honour"
453 .Mx -anchor-spass Va "forward-as-attachment"
454 .Mx -anchor-spass Va "forward-inject-head"
455 .Mx -anchor-spass Va "from"
456 .Mx -anchor-spass Va "fullnames"
457 .Mx -anchor-spass Va "header"
458 .Mx -anchor-spass Va "headline"
459 .Mx -anchor-spass Va "headline-bidi"
460 .Mx -anchor-spass Va "headline-plain"
461 .Mx -anchor-spass Va "history-file"
462 .Mx -anchor-spass Va "history-gabby"
463 .Mx -anchor-spass Va "history-gabby-persist"
464 .Mx -anchor-spass Va "history-size"
465 .Mx -anchor-spass Va "hold"
466 .Mx -anchor-spass Va "hostname"
467 .Mx -anchor-spass Va "idna-disable"
468 .Mx -anchor-spass Va "ifs"
469 .Mx -anchor-spass Va "ifs-ws"
470 .Mx -anchor-spass Va "ignore"
471 .Mx -anchor-spass Va "ignoreeof"
472 .Mx -anchor-spass Va "inbox"
473 .Mx -anchor-spass Va "indentprefix"
474 .Mx -anchor-spass Va "keep"
475 .Mx -anchor-spass Va "keep-content-length"
476 .Mx -anchor-spass Va "keepsave"
477 .Mx -anchor-spass Va "line-editor-disable"
478 .Mx -anchor-spass Va "line-editor-no-defaults"
479 .Mx -anchor-spass Va "log-prefix"
480 .Mx -anchor-spass Va "mailbox-display"
481 .Mx -anchor-spass Va "mailbox-resolved"
482 .Mx -anchor-spass Va "mailx-extra-rc"
483 .Mx -anchor-spass Va "markanswered"
484 .Mx -anchor-spass Va "mbox-rfc4155"
485 .Mx -anchor-spass Va "memdebug"
486 .Mx -anchor-spass Va "message-id-disable"
487 .Mx -anchor-spass Va "message-inject-head"
488 .Mx -anchor-spass Va "message-inject-tail"
489 .Mx -anchor-spass Va "metoo"
490 .Mx -anchor-spass Va "mime-allow-text-controls"
491 .Mx -anchor-spass Va "mime-alternative-favour-rich"
492 .Mx -anchor-spass Va "mime-counter-evidence"
493 .Mx -anchor-spass Va "mime-encoding"
494 .Mx -anchor-spass Va "mimetypes-load-control"
495 .Mx -anchor-spass Va "mta"
496 .Mx -anchor-spass Va "mta-arguments"
497 .Mx -anchor-spass Va "mta-no-default-arguments"
498 .Mx -anchor-spass Va "mta-no-receiver-arguments"
499 .Mx -anchor-spass Va "mta-argv0"
500 .Mx -anchor-spass Va "netrc-lookup"
501 .Mx -anchor-spass Va "netrc-pipe"
502 .Mx -anchor-spass Va "newfolders"
503 .Mx -anchor-spass Va "newmail"
504 .Mx -anchor-spass Va "outfolder"
505 .Mx -anchor-spass Va "on-account-cleanup"
506 .Mx -anchor-spass Va "on-compose-cleanup"
507 .Mx -anchor-spass Va "on-compose-enter"
508 .Mx -anchor-spass Va "on-compose-leave"
509 .Mx -anchor-spass Va "on-compose-splice"
510 .Mx -anchor-spass Va "on-compose-splice-shell"
511 .Mx -anchor-spass Va "on-resend-cleanup"
512 .Mx -anchor-spass Va "on-resend-enter"
513 .Mx -anchor-spass Va "page"
514 .Mx -anchor-spass Va "password"
515 .Mx -anchor-spass Va "piperaw"
516 .Mx -anchor-spass Va "pipe-TYPE/SUBTYPE"
517 .Mx -anchor-spass Ev "MAILX_CONTENT"
518 .Mx -anchor-spass Ev "MAILX_CONTENT_EVIDENCE"
519 .Mx -anchor-spass Ev "MAILX_EXTERNAL_BODY_URL"
520 .Mx -anchor-spass Ev "MAILX_FILENAME"
521 .Mx -anchor-spass Ev "MAILX_FILENAME_GENERATED"
522 .Mx -anchor-spass Ev "MAILX_FILENAME_TEMPORARY"
523 .Mx -anchor-spass Va "pipe-EXTENSION"
524 .Mx -anchor-spass Va "pop3-auth"
525 .Mx -anchor-spass Va "pop3-bulk-load"
526 .Mx -anchor-spass Va "pop3-keepalive"
527 .Mx -anchor-spass Va "pop3-no-apop"
528 .Mx -anchor-spass Va "pop3-use-starttls"
529 .Mx -anchor-spass Va "posix"
530 .Mx -anchor-spass Va "print-alternatives"
531 .Mx -anchor-spass Va "prompt"
532 .Mx -anchor-spass Va "prompt2"
533 .Mx -anchor-spass Va "quiet"
534 .Mx -anchor-spass Va "quote"
535 .Mx -anchor-spass Va "quote-as-attachment"
536 .Mx -anchor-spass Va "quote-chars"
537 .Mx -anchor-spass Va "quote-fold"
538 .Mx -anchor-spass Va "r-option-implicit"
539 .Mx -anchor-spass Va "recipients-in-cc"
540 .Mx -anchor-spass Va "record"
541 .Mx -anchor-spass Va "record-files"
542 .Mx -anchor-spass Va "record-resent"
543 .Mx -anchor-spass Va "reply-in-same-charset"
544 .Mx -anchor-spass Va "reply-strings"
545 .Mx -anchor-spass Va "reply-to"
546 .Mx -anchor-spass Va "reply-to-honour"
547 .Mx -anchor-spass Va "rfc822-body-from_"
548 .Mx -anchor-spass Va "save"
549 .Mx -anchor-spass Va "screen"
550 .Mx -anchor-spass Va "searchheaders"
551 .Mx -anchor-spass Va "sendcharsets"
552 .Mx -anchor-spass Va "sendcharsets-else-ttycharset"
553 .Mx -anchor-spass Va "sender"
554 .Mx -anchor-spass Va "sendwait"
555 .Mx -anchor-spass Va "showlast"
556 .Mx -anchor-spass Va "showname"
557 .Mx -anchor-spass Va "showto"
558 .Mx -anchor-spass Va "Sign"
559 .Mx -anchor-spass Va "sign"
560 .Mx -anchor-spass Va "signature"
561 .Mx -anchor-spass Va "skipemptybody"
562 .Mx -anchor-spass Va "smime-ca-dir"
563 .Mx -anchor-spass Va "smime-ca-file"
564 .Mx -anchor-spass Va "smime-ca-flags"
565 .Mx -anchor-spass Va "smime-ca-no-defaults"
566 .Mx -anchor-spass Va "smime-cipher"
567 .Mx -anchor-spass Va "smime-crl-dir"
568 .Mx -anchor-spass Va "smime-crl-file"
569 .Mx -anchor-spass Va "smime-encrypt-USER@HOST"
570 .Mx -anchor-spass Va "smime-force-encryption"
571 .Mx -anchor-spass Va "smime-sign"
572 .Mx -anchor-spass Va "smime-sign-cert"
573 .Mx -anchor-spass Va "smime-sign-include-certs"
574 .Mx -anchor-spass Va "smime-sign-message-digest"
575 .Mx -anchor-spass Va "smtp-auth"
576 .Mx -anchor-spass Va "smtp-hostname"
577 .Mx -anchor-spass Va "smtp-use-starttls"
578 .Mx -anchor-spass Va "socks-proxy"
579 .Mx -anchor-spass Va "spam-interface"
580 .Mx -anchor-spass Va "spam-maxsize"
581 .Mx -anchor-spass Va "spamc-command"
582 .Mx -anchor-spass Va "spamc-arguments"
583 .Mx -anchor-spass Va "spamc-user"
584 .Mx -anchor-spass Va "spamfilter-ham"
585 .Mx -anchor-spass Va "spamfilter-noham"
586 .Mx -anchor-spass Va "spamfilter-nospam"
587 .Mx -anchor-spass Va "spamfilter-rate"
588 .Mx -anchor-spass Va "spamfilter-spam"
589 .Mx -anchor-spass Va "spamfilter-rate-scanscore"
590 .Mx -anchor-spass Va "ssl-ca-file"
591 .Mx -anchor-spass Va "ssl-ca-flags"
592 .Mx -anchor-spass Va "ssl-ca-no-defaults"
593 .Mx -anchor-spass Va "ssl-cert"
594 .Mx -anchor-spass Va "ssl-cipher-list"
595 .Mx -anchor-spass Va "ssl-config-file"
596 .Mx -anchor-spass Va "ssl-config-module"
597 .Mx -anchor-spass Va "ssl-config-pairs"
598 .Mx -anchor-spass Va "ssl-crl-dir"
599 .Mx -anchor-spass Va "ssl-crl-file"
600 .Mx -anchor-spass Va "ssl-curves"
601 .Mx -anchor-spass Va "ssl-features"
602 .Mx -anchor-spass Va "ssl-key"
603 .Mx -anchor-spass Va "ssl-protocol"
604 .Mx -anchor-spass Va "ssl-rand-egd"
605 .Mx -anchor-spass Va "ssl-rand-file"
606 .Mx -anchor-spass Va "ssl-verify"
607 .Mx -anchor-spass Va "ssl-ca-dir"
608 .Mx -anchor-spass Va "stealthmua"
609 .Mx -anchor-spass Va "termcap"
610 .Mx -anchor-spass Va "termcap-ca-mode"
611 .Mx -anchor-spass Va "termcap-disable"
612 .Mx -anchor-spass Va "toplines"
613 .Mx -anchor-spass Va "topsqueeze"
614 .Mx -anchor-spass Va "ttycharset"
615 .Mx -anchor-spass Va "typescript-mode"
616 .Mx -anchor-spass Va "umask"
617 .Mx -anchor-spass Va "user"
618 .Mx -anchor-spass Va "v15-compat"
619 .Mx -anchor-spass Va "verbose"
620 .Mx -anchor-spass Va "version"
621 .Mx -anchor-spass Va "version-date"
622 .Mx -anchor-spass Va "version-hexnum"
623 .Mx -anchor-spass Va "version-major"
624 .Mx -anchor-spass Va "version-minor"
625 .Mx -anchor-spass Va "writebackedited"
626 .Mx -anchor-spass Ev "COLUMNS"
627 .Mx -anchor-spass Ev "DEAD"
628 .Mx -anchor-spass Ev "EDITOR"
629 .Mx -anchor-spass Ev "HOME"
630 .Mx -anchor-spass Ev "LC_ALL"
631 .Mx -anchor-spass Ev "LC_CTYPE"
632 .Mx -anchor-spass Ev "LANG"
633 .Mx -anchor-spass Ev "LINES"
634 .Mx -anchor-spass Ev "LISTER"
635 .Mx -anchor-spass Ev "LOGNAME"
636 .Mx -anchor-spass Ev "MAIL"
637 .Mx -anchor-spass Ev "MAILCAPS"
638 .Mx -anchor-spass Ev "MAILRC"
639 .Mx -anchor-spass Ev "MAILX_NO_SYSTEM_RC"
640 .Mx -anchor-spass Ev "MBOX"
641 .Mx -anchor-spass Ev "NETRC"
642 .Mx -anchor-spass Ev "PAGER"
643 .Mx -anchor-spass Ev "PATH"
644 .Mx -anchor-spass Ev "POSIXLY_CORRECT"
645 .Mx -anchor-spass Ev "SHELL"
646 .Mx -anchor-spass Ev "SOURCE_DATE_EPOCH"
647 .Mx -anchor-spass Ev "TERM"
648 .Mx -anchor-spass Ev "TMPDIR"
649 .Mx -anchor-spass Ev "USER"
650 .Mx -anchor-spass Ev "VISUAL"
651 .Mx -anchor-spass Pa "~/.mailcap"
652 .Mx -anchor-spass Pa "/etc/mailcap"
653 .Mx -anchor-spass Pa "~/mbox"
654 .Mx -anchor-spass Pa "~/.mime.types"
655 .Mx -anchor-spass Pa "/etc/mime.types"
656 .Mx -anchor-spass Pa "~/.netrc"
657 .Mx -anchor-spass Pa "/dev/null"
658 .Mx -anchor-spass Pa "\*(UR"
659 .Mx -anchor-spass Pa "\*(ur"
660 .Mx -anchor-spass Cd "needsterminal"
661 .Mx -anchor-spass Cd "copiousoutput"
662 .Mx -anchor-spass Cd "x-mailx-even-if-not-interactive"
663 .Mx -anchor-spass Cd "x-mailx-noquote"
664 .Mx -anchor-spass Cd "x-mailx-async"
665 .Mx -anchor-spass Cd "x-mailx-test-once"
666 .Mx -anchor-spass Cd "x-mailx-tmpfile"
667 .Mx -anchor-spass Cd "x-mailx-tmpfile-fill"
668 .Mx -anchor-spass Cd "x-mailx-tmpfile-unlink"
669 .Mx -anchor-spass Cd "x-mailx-tmpfile-keep"
670 .Mx -anchor-spass Ic "cache"
671 .Mx -anchor-spass Ic "connect"
672 .Mx -anchor-spass Ic "disconnect"
673 .Mx -anchor-spass Ic "imap"
674 .Mx -anchor-spass Ic "imapcodec"
675 .Mx -anchor-spass Va "disconnected"
676 .Mx -anchor-spass Va "imap-auth"
677 .Mx -anchor-spass Va "imap-cache"
678 .Mx -anchor-spass Va "imap-delim"
679 .Mx -anchor-spass Va "imap-keepalive"
680 .Mx -anchor-spass Va "imap-list-depth"
681 .Mx -anchor-spass Va "imap-use-starttls"
684 .Nd send and receive Internet mail
694 .Op : Ns Fl a Ar attachment Ns \&:
695 .Op : Ns Fl b Ar bcc-addr Ns \&:
696 .Op : Ns Fl C Ar """custom:\0header""" Ns \&:
697 .Op : Ns Fl c Ar cc-addr Ns \&:
698 .Op Fl M Ar type | Fl m Ar file | Fl q Ar file | Fl t
699 .Op Fl r Ar from-addr
701 .Fl S Ar var Ns Op Ns = Ns Ar value Ns
704 .Op : Ns Fl X Ar cmd Ns \&:
706 .Pf : Ar to-addr Ns \&:
707 .Op Fl Fl \~ Ns : Ns Ar mta-option Ns \&:
715 .Op : Ns Fl C Ar """custom:\0header""" Ns \&:
717 .Op Fl r Ar from-addr
719 .Fl S Ar var Ns Op Ns = Ns Ar value Ns
722 .Op : Ns Fl X Ar cmd Ns \&:
723 .Op Fl Fl \~ Ns : Ns Ar mta-option Ns \&:
730 .Op : Ns Fl C Ar """custom:\0header""" Ns \&:
733 .Op Fl r Ar from-addr
735 .Fl S Ar var Ns Op Ns = Ns Ar value Ns
737 .Op : Ns Fl X Ar cmd Ns \&:
739 .Op Fl Fl \~ Ns : Ns Ar mta-option Ns \&:
741 .Mx -toc -tree html pdf ps xhtml
743 .Bd -filled -compact -offset indent
744 .Sy Compatibility note:
745 S-nail (\*(UA) will wrap up into \%S-mailx in v15.0 (circa 2020).
746 Backward incompatibility has to be expected \(en
749 .Sx "Shell-style argument quoting"
750 rules, for example, and shell metacharacters will become meaningful.
751 New and old behaviour is flagged \*(IN and \*(OU, and setting
754 .Sx "INTERNAL VARIABLES" ,
755 will choose new behaviour when applicable.
756 \*(OB flags what will vanish, and enabling
760 enables obsoletion warnings.
763 \*(UA provides a simple and friendly environment for sending and
765 It is intended to provide the functionality of the POSIX
767 command, but is MIME capable and optionally offers extensions for
768 line editing, S/MIME, SMTP and POP3, among others.
769 \*(UA divides incoming mail into its constituent messages and allows
770 the user to deal with them in any order.
774 .Sx "INTERNAL VARIABLES"
775 for manipulating messages and sending mail.
776 It provides the user simple editing capabilities to ease the composition
777 of outgoing messages, and increasingly powerful and reliable
778 non-interactive scripting capabilities.
780 .Bl -tag -width ".It Fl BaNg"
783 Explicitly control which of the
787 d (loaded): if the letter
789 is (case-insensitively) part of the
793 is sourced, likewise the letter
795 controls sourcing of the user's personal
797 file, whereas the letters
801 explicitly forbid sourcing of any resource files.
802 Scripts should use this option: to avoid environmental noise they should
804 from any configuration and create a script-specific environment, setting
806 .Sx "INTERNAL VARIABLES"
809 and running configurating commands via
811 This option overrides
817 command for the given user email
819 after program startup is complete (all resource files are loaded, any
821 setting is being established; only
823 commands have not been evaluated yet).
824 Being a special incarnation of
826 macros for the purpose of bundling longer-lived
828 tings, activating such an email account also switches to the accounts
830 .Sx "primary system mailbox"
834 .It Fl a Ar file Ns Op Ar =input-charset Ns Op Ar #output-charset
837 to the message (for compose mode opportunities refer to
841 .Sx "Filename transformations"
844 will be performed, except that shell variables are not expanded.
847 not be accessible but contain a
849 character, then anything before the
851 will be used as the filename, anything thereafter as a character set
854 If an input character set is specified,
855 .Mx -ix "character set specification"
856 but no output character set, then the given input character set is fixed
857 as-is, and no conversion will be applied;
858 giving the empty string or the special string hyphen-minus
860 will be treated as if
862 has been specified (the default).
864 If an output character set has also been given then the conversion will
865 be performed exactly as specified and on-the-fly, not considering the
866 file's type and content.
867 As an exception, if the output character set is specified as the empty
868 string or hyphen-minus
870 then the default conversion algorithm (see
871 .Sx "Character sets" )
872 is applied (therefore no conversion is performed on-the-fly,
874 will be MIME-classified and its contents will be inspected first) \(em
875 without support for character set conversions
877 does not include the term
879 only this argument is supported.
881 (\*(OB: \*(UA will always use line-buffered output, to gain
882 line-buffered input even in batch mode enable batch mode via
886 Send a blind carbon copy to
893 .Sx "INTERNAL VARIABLES" ,
895 The option may be used multiple times.
897 .Sx "On sending mail, and non-interactive mode" .
899 .It Fl C Ar """field: body"""
900 Create a custom header which persists for an entire session.
901 A custom header consists of the field name followed by a colon
903 and the field content body, e.g.,
904 .Ql -C """Blah: Neminem laede; imo omnes, quantum potes, juva""" Ns .
905 Standard header field names cannot be overwritten by a custom header.
906 A changeable way to create custom headers is available via the variable
911 .Sx "COMMAND ESCAPES" ,
912 offers the most flexible and powerful possibility of managing headers.
913 This option may be used multiple times.
916 Send carbon copies to the given receiver, if so allowed by
918 May be used multiple times.
922 the internal variable
924 which enables debug messages and disables message delivery,
925 among others; effectively turns almost any operation into a dry-run.
930 and thus discard messages with an empty message part body.
931 This command line option is \*(OB.
934 Just check if mail is present (in the system
936 or the one specified via
938 if yes, return an exit status of zero, a non-zero value otherwise.
939 To restrict the set of mails to consider in this evaluation a message
940 specification can be added with the option
944 Save the message to send in a file named after the local part of the
945 first recipient's address (instead of in
949 Read in the contents of the user's
951 .Sx "secondary mailbox"
953 (or the specified file) for processing;
954 when \*(UA is quit, it writes undeleted messages back to this file
960 argument will undergo some special
961 .Sx "Filename transformations"
966 is not an argument to the flag
968 but is instead taken from the command line after option processing has
972 that starts with a hyphen-minus, prefix with a relative path, as in
973 .Ql ./-hyphenbox.mbox .
978 and exit; a configurable summary view is available via the
983 Show a short usage summary.
988 to ignore tty interrupt signals.
993 of all messages that match the given
997 .Sx "Specifying messages"
1002 option has been given in addition no header summary is produced,
1003 but \*(UA will instead indicate via its exit status whether
1005 matched any messages
1009 note that any verbose output is suppressed in this mode and must instead
1010 be enabled explicitly (e.g., by using the option
1014 Special send mode that will flag standard input with the MIME
1018 and use it as the main message body.
1019 \*(ID Using this option will bypass processing of
1020 .Va message-inject-head
1022 .Va message-inject-tail .
1027 Special send mode that will MIME classify the specified
1029 and use it as the main message body.
1030 \*(ID Using this option will bypass processing of
1031 .Va message-inject-head
1033 .Va message-inject-tail .
1038 inhibit the initial display of message headers when reading mail or
1043 for the internal variable
1047 Standard flag that inhibits reading the system wide
1052 allows more control over the startup sequence; also see
1053 .Sx "Resource files" .
1056 Special send mode that will initialize the message body with the
1057 contents of the specified
1059 which may be standard input
1061 only in non-interactive context.
1068 opened will be in read-only mode.
1070 .It Fl r Ar from-addr
1071 Whereas the source address that appears in the
1073 header of a message (or in the
1075 header if the former contains multiple addresses) is honoured by the
1076 builtin SMTP transport, it is not used by a file-based
1078 (Mail-Transfer-Agent) for the RFC 5321 reverse-path used for relaying
1079 and delegating a message to its destination(s), for delivery errors
1080 etc., but it instead uses the local identity of the initiating user.
1082 When this command line option is used the given
1084 will be assigned to the internal variable
1086 but in addition the command line option
1087 .Fl \&\&f Ar from-addr
1088 will be passed to a file-based
1090 whenever a message is sent.
1093 include a user name the address components will be separated and
1094 the name part will be passed to a file-based
1099 If an empty string is passed as
1101 then the content of the variable
1103 (or, if that contains multiple addresses,
1105 will be evaluated and used for this purpose whenever the file-based
1114 command line options are used when contacting a file-based MTA, unless
1115 this automatic deduction is enforced by
1117 ing the internal variable
1118 .Va r-option-implicit .
1120 Remarks: many default installations and sites disallow overriding the
1121 local user identity like this unless either the MTA has been configured
1122 accordingly or the user is member of a group with special privileges.
1123 Passing an invalid address will cause an error.
1125 .It Fl S Ar var Ns Op = Ns value
1127 (or, with a prefix string
1130 .Sx "INTERNAL VARIABLES" ,
1133 iable and optionally assign
1135 if supported; \*(ID the entire expression is evaluated as if specified
1136 within dollar-single-quotes (see
1137 .Sx "Shell-style argument quoting" )
1138 if the internal variable
1141 If the operation fails the program will exit if any of
1146 Settings established via
1148 cannot be changed from within
1149 .Sx "Resource files"
1150 or an account switch initiated by
1152 They will become mutable again before commands registered via
1157 Specify the subject of the message to be sent.
1158 Newline (NL) and carriage-return (CR) bytes are invalid and will be
1159 normalized to space (SP) characters.
1162 The message given (on standard input) is expected to contain, separated
1163 from the message body by an empty line, a message header with
1168 fields giving its recipients, which will be added to any recipients
1169 specified on the command line.
1170 If a message subject is specified via
1172 then it will be used in favour of one given on the command line.
1176 (possibly overriding
1188 .Ql Mail-Followup-To: ,
1189 by default created automatically dependent on message context, will
1190 be used if specified (a special address massage will however still occur
1192 Any other custom header field (also see
1197 is passed through entirely
1198 unchanged, and in conjunction with the options
1202 it is possible to embed
1203 .Sx "COMMAND ESCAPES" .
1210 .Sx "primary system mailbox"
1213 appropriate privileges presumed; effectively identical to
1214 .Ql Fl \&\&f Ns \0%user .
1222 will also show the list of
1224 .Ql $ \*(uA -Xversion -Xx .
1228 ting the internal variable
1230 enables display of some informational context messages.
1231 Using it twice increases the level of verbosity.
1234 Add the given (or multiple for a multiline argument)
1236 to the list of commands to be executed,
1237 as a last step of program startup, before normal operation starts.
1238 This is the only possibility to execute commands in non-interactive mode
1239 when reading startup files is actively prohibited.
1240 The commands will be evaluated as a unit, just as via
1249 .Sx "COMMAND ESCAPES"
1250 in compose mode even in non-interactive use cases.
1251 This can be used to, e.g., automatically format the composed message
1252 text before sending the message:
1253 .Bd -literal -offset indent
1254 $ ( echo 'line one. Word. Word2.';\e
1255 echo '~| /usr/bin/fmt -tuw66' ) |\e
1256 LC_ALL=C \*(uA -d~:/ -Sttycharset=utf-8 bob@exam.ple
1260 Enables batch mode: standard input is made line buffered, the complete
1261 set of (interactive) commands is available, processing of
1262 .Sx "COMMAND ESCAPES"
1263 is enabled in compose mode, and diverse
1264 .Sx "INTERNAL VARIABLES"
1265 are adjusted for batch necessities, exactly as if done via
1279 (the latter three to
1281 The following prepares an email message in a batched dry run:
1282 .Bd -literal -offset indent
1283 $ LC_ALL=C printf 'm bob\en~s ubject\enText\en~.\enx\en' |\e
1284 LC_ALL=C \*(uA -d#:/ -X'alias bob bob@exam.ple'
1288 This flag forces termination of option processing in order to prevent
1289 .Dq option injection
1291 It also forcefully puts \*(UA into send mode, see
1292 .Sx "On sending mail, and non-interactive mode" .
1297 arguments and all receivers established via
1301 are subject to the checks established by
1304 .Sx "INTERNAL VARIABLES" .
1307 allows their recognition all
1309 arguments given at the end of the command line after a
1311 separator will be passed through to a file-based
1313 (Mail-Transfer-Agent) and persist for the entire session.
1315 constraints do not apply to the content of
1318 \*(UA is a direct descendant of
1320 Mail, itself a successor of the Research
1323 .Dq was there from the start
1326 It thus represents the user side of the
1328 mail system, whereas the system side (Mail-Transfer-Agent, MTA) was
1329 traditionally taken by
1331 and most MTAs provide a binary of this name for compatibility purposes.
1336 of \*(UA then the system side is not a mandatory precondition for mail
1339 Because \*(UA strives for compliance with POSIX
1341 it is likely that some configuration settings have to be adjusted before
1342 using it is a smooth experience.
1343 (Rather complete configuration examples can be found in the section
1348 .Sx "Resource files" ,
1349 bends those standard imposed settings of the
1350 .Sx "INTERNAL VARIABLES"
1351 a bit towards more user friendliness and safety already.
1358 in order to suppress the automatic moving of messages to the
1360 .Sx "secondary mailbox"
1362 that would otherwise occur (see
1363 .Sx "Message states" ) ,
1366 to not remove empty system MBOX mailbox files in order not to mangle
1367 file permissions when files eventually get recreated (all empty (MBOX)
1368 mailbox files will be removed unless this variable is set whenever
1370 .Pf a.k.a.\0 Ev POSIXLY_CORRECT
1371 mode has been enabled).
1375 in order to synchronize \*(UA with the exit status report of the used
1382 to enter interactive startup even if the initial mailbox is empty,
1384 to allow editing of headers as well as
1386 to not strip down addresses in compose mode, and
1388 to include the message that is being responded to when
1390 ing, which is indented by an
1392 that also deviates from standard imposed settings.
1393 .Va mime-counter-evidence
1394 is fully enabled, too.
1396 Some random remarks.
1397 The file mode creation mask can be managed explicitly via the variable
1399 Sufficient system support provided symbolic links will not be followed
1400 when files are opened for writing.
1401 Files and shell pipe output can be
1403 d for evaluation, also during startup from within the
1404 .Sx "Resource files" .
1405 .Ss "On sending mail, and non-interactive mode"
1406 To send a message to one or more people, using a local or built-in
1408 (Mail-Transfer-Agent) transport to actually deliver the generated mail
1409 message, \*(UA can be invoked with arguments which are the names of
1410 people to whom the mail will be sent, and the command line options
1414 can be used to add (blind) carbon copy receivers:
1415 .Bd -literal -offset indent
1417 $ \*(uA -s ubject -a ttach.txt bill@exam.ple
1419 # But... try it in an isolated dry-run mode (-d) first
1420 $ LC_ALL=C \*(uA -d -:/ -Ssendwait -Sttycharset=utf8 \e
1421 -b bcc@exam.ple -c cc@exam.ple \e
1423 '(Lovely) Bob <bob@exam.ple>' eric@exam.ple
1426 $ LC_ALL=C \*(uA -d -:/ -Sv15-compat -Ssendwait -Sttycharset=utf8 \e
1427 -S mta=smtps://mylogin@exam.ple:465 -Ssmtp-auth=none \e
1428 -S from=scriptreply@exam.ple \e
1433 If standard input is a terminal rather than the message to be sent,
1434 the user is expected to type in the message contents.
1435 In this compose mode \*(UA treats lines beginning with the character
1437 special \(en these are so-called
1438 .Sx "COMMAND ESCAPES" ,
1439 which can be used to read in files, process shell commands, add and edit
1440 attachments and more; e.g., the command escape
1442 will start the text editor to revise the message in its current state,
1444 allows editing of the most important message headers, with
1446 custom headers can be created (more specifically than with
1451 gives an overview of most other available command escapes.
1454 will leave compose mode and send the message once it is completed.
1455 Alternatively typing
1458 at the beginning of an empty line has the same effect, whereas typing
1461 twice will abort the current letter (saving its contents in the file
1471 .Sx "INTERNAL VARIABLES"
1472 can be used to alter default behavior.
1473 E.g., messages are sent asynchronously, without supervision, unless the
1476 is set, therefore send errors will not be recognizable until then.
1481 will automatically startup a text editor when compose mode is entered,
1483 allows editing of headers additionally to plain body content,
1487 will cause the user to be prompted actively for (blind) carbon-copy
1488 recipients, respectively, and (the default)
1490 will request confirmation whether the message shall be sent.
1492 The envelope sender address is defined by
1494 explicitly defining an originating
1496 may be desirable, especially with the builtin SMTP Mail-Transfer-Agent
1498 .Sx "Character sets"
1499 for outgoing message and MIME part content are configurable via
1501 whereas input data is assumed to be in
1503 Message data will be passed over the wire in a
1505 MIME parts a.k.a. attachments need to be assigned a
1507 usually taken out of
1508 .Sx "The mime.types files" .
1509 Saving a copy of sent messages in a
1511 mailbox may be desirable \(en as for most mailbox
1513 targets the value will undergo
1514 .Sx "Filename transformations" .
1519 sandbox dry-run tests will prove correctness.
1521 Message recipients (as specified on the command line or defined in
1526 may not only be email addressees but can also be names of mailboxes and
1527 even complete shell command pipe specifications.
1530 is not set then only network addresses (see
1532 for a description of mail addresses) and plain user names (including MTA
1533 aliases) may be used, other types will be filtered out, giving a warning
1535 A network address that contains no domain-, but only a valid local user
1537 in angle brackets will be automatically expanded to a valid address when
1539 is set to a non-empty value; setting it to the empty value instructs
1542 will perform the necessary expansion.
1545 can be used to generate standard compliant network addresses.
1549 is set then extended recipient addresses will optionally be accepted:
1550 Any name which starts with a vertical bar
1552 character specifies a command pipe \(en the command string following the
1554 is executed and the message is sent to its standard input;
1555 Likewise, any name that starts with the character solidus
1557 or the character sequence dot solidus
1559 is treated as a file, regardless of the remaining content;
1560 likewise a name that solely consists of a hyphen-minus
1562 Any other name which contains a commercial at
1564 character is treated as a network address;
1565 Any other name which starts with a plus sign
1567 character specifies a mailbox name;
1568 Any other name which contains a solidus
1570 character but no exclamation mark
1574 character before also specifies a mailbox name;
1575 What remains is treated as a network address.
1576 .Bd -literal -offset indent
1577 $ echo bla | \*(uA -Sexpandaddr -s test ./mbox.mbox
1578 $ echo bla | \*(uA -Sexpandaddr -s test '|cat >> ./mbox.mbox'
1579 $ echo safe | LC_ALL=C \e
1580 \*(uA -:/ -Sv15-compat -Ssendwait -Sttycharset=utf8 \e
1581 -Sexpandaddr=fail,-all,+addr,failinvaddr -s test \e
1585 It is possible to create personal distribution lists via the
1587 command, so that, for instance, the user can send mail to
1589 and have it go to a group of people.
1590 These aliases have nothing in common with the system wide aliases that
1591 may be used by the MTA, which are subject to the
1595 and are often tracked in a file
1601 Personal aliases will be expanded by \*(UA before the message is sent,
1602 and are thus a convenient alternative to specifying each addressee by
1603 itself; they correlate with the active set of
1609 .Dl alias cohorts bill jkf mark kridle@ucbcory ~/mail/cohorts.mbox
1611 .Va on-compose-enter , on-compose-leave
1613 .Va on-compose-cleanup
1614 hook variables may be set to
1616 d macros to automatically adjust some settings dependent
1617 on receiver, sender or subject contexts, and via the
1618 .Va on-compose-splice
1620 .Va on-compose-splice-shell
1621 variables, the former also to be set to a
1623 d macro, increasingly powerful mechanisms to perform automated message
1624 adjustments, including signature creation, are available.
1625 (\*(ID These hooks work for commands which newly create messages, namely
1626 .Ic forward , mail , reply
1631 for now provide only the hooks
1634 .Va on-resend-cleanup . )
1636 For the purpose of arranging a complete environment of settings that can
1637 be switched to with a single command or command line option there are
1639 Alternatively it is also possible to use a flat configuration, making use
1640 of so-called variable chains which automatically pick
1644 context-dependent variable variants: for example addressing
1645 .Ql Ic File Ns \& pop3://yaa@exam.ple
1647 .Va \&\&pop3-no-apop-yaa@exam.ple ,
1648 .Va \&\&pop3-no-apop-exam.ple
1653 .Sx "On URL syntax and credential lookup"
1655 .Sx "INTERNAL VARIABLES" .
1657 To avoid environmental noise scripts should
1659 \*(UA from any configuration files and create a script-local
1660 environment, ideally with the command line options
1662 to disable any configuration file in conjunction with repetitions of
1664 to specify variables:
1665 .Bd -literal -offset indent
1666 $ env LC_ALL=C \*(uA -:/ \e
1667 -Sv15-compat -Ssendwait -Sttycharset=utf-8 \e
1668 -Sexpandaddr=fail,-all,failinvaddr \e
1669 -S mta=smtps://mylogin@exam.ple:465 -Ssmtp-auth=login \e
1670 -S from=scriptreply@exam.ple \e
1671 -s 'Subject to go' -a attachment_file \e
1673 'Recipient 1 <rec1@exam.ple>' rec2@exam.ple \e
1677 As shown, scripts can
1679 a locale environment, the above specifies the all-compatible 7-bit clean
1682 but will nonetheless take and send UTF-8 in the message text by using
1684 In interactive mode, which is introduced in the next section, messages
1685 can be sent by calling the
1687 command with a list of recipient addresses:
1688 .Bd -literal -offset indent
1689 $ \*(uA -d -Squiet -Semptystart
1690 "/var/spool/mail/user": 0 messages
1691 ? mail "Recipient 1 <rec1@exam.ple>", rec2@exam.ple
1693 ? # Will do the right thing (tm)
1694 ? m rec1@exam.ple rec2@exam.ple
1696 .Ss "On reading mail, and interactive mode"
1697 When invoked without addressees \*(UA enters interactive mode in which
1699 When used like that the user's system
1701 (for more on mailbox types please see the command
1703 is read in and a one line header of each message therein is displayed if
1707 The visual style of this summary of
1709 can be adjusted through the variable
1711 and the possible sorting criterion via
1717 can be performed with the command
1719 If the initially opened mailbox is empty \*(UA will instead exit
1720 immediately (after displaying a message) unless the variable
1728 will give a listing of all available commands and
1730 will give a summary of some common ones.
1731 If the \*(OPal documentation strings are available (see
1736 and see the actual expansion of
1738 and what its purpose is, i.e., commands can be abbreviated
1739 (note that POSIX defines some abbreviations, so that the alphabetical
1740 order of commands does not necessarily relate to the abbreviations; it is
1741 however possible to define overwrites with
1742 .Ic commandalias ) .
1743 These commands can also produce a more
1747 Messages are given numbers (starting at 1) which uniquely identify
1748 messages; the current message \(en the
1750 \(en will either be the first new message, or the first unread message,
1751 or the first message of the mailbox; the internal variable
1753 will instead cause usage of the last message for this purpose.
1758 ful of header summaries containing the
1762 will display only the summaries of the given messages, defaulting to the
1765 Message content can be displayed with the command
1772 controls whether and when \*(UA will use the configured
1774 for display instead of directly writing to the user terminal
1776 the sole difference to the command
1778 which will always use the
1782 will instead only show the first
1784 of a message (maybe even compressed if
1787 Message display experience may improve by setting and adjusting
1788 .Va mime-counter-evidence ,
1790 .Sx "HTML mail and MIME attachments" .
1792 By default the current message
1794 is displayed, but like with many other commands it is possible to give
1795 a fancy message specification (see
1796 .Sx "Specifying messages" ) ,
1799 will display all unread messages,
1804 will type the messages 1 and 5,
1806 will type the messages 1 through 5, and
1810 will display the last and the next message, respectively.
1813 (a more substantial alias for
1815 will display a header summary of the given message specification list
1816 instead of their content, e.g., the following will search for subjects:
1818 .Dl ? from "'@Some subject to search for'"
1820 In the default setup all header fields of a message will be
1822 d, but fields can be white- or blacklisted for a variety of
1823 applications by using the command
1825 e.g., to restrict their display to a very restricted set for
1827 .Ql Ic \:headerpick Cd \:type retain Ar \:from to cc subject .
1828 In order to display all header fields of a message regardless of
1829 currently active ignore or retain lists, use the commands
1834 will show the raw message content.
1835 Note that historically the global
1837 not only adjusts the list of displayed headers, but also sets
1840 Dependent upon the configuration a line editor (see the section
1841 .Sx "On terminal control and line editor" )
1842 aims at making the user experience with the many
1845 When reading the system
1851 specified a mailbox explicitly prefixed with the special
1853 modifier (propagating the mailbox to a
1855 .Sx "primary system mailbox" ) ,
1856 then messages which have been read will be automatically moved to a
1858 .Sx "secondary mailbox" ,
1861 file, when the mailbox is left, either by changing the
1862 active mailbox or by quitting \*(UA (also see
1863 .Sx "Message states" )
1864 \(en this automatic moving from a system or primary to the secondary
1865 mailbox is not performed when the variable
1868 Messages can also be explicitly
1870 d to other mailboxes, whereas
1872 keeps the original message.
1874 can be used to write out data content of specific parts of messages.
1876 After examining a message the user can
1878 to the sender and all recipients (which will also be placed in
1881 .Va recipients-in-cc
1884 exclusively to the sender(s).
1886 ing a message will allow editing the new message: the original message
1887 will be contained in the message body, adjusted according to
1893 messages: the former will add a series of
1895 headers, whereas the latter will not; different to newly created
1896 messages editing is not possible and no copy will be saved even with
1898 unless the additional variable
1901 When sending, replying or forwarding messages comments and full names
1902 will be stripped from recipient addresses unless the internal variable
1905 Of course messages can be
1907 and they can spring into existence again via
1909 or when the \*(UA session is ended via the
1913 To end a mail processing session one may either issue
1915 to cause a full program exit, which possibly includes
1916 automatic moving of read messages to the
1918 .Sx "secondary mailbox"
1920 as well as updating the \*(OPal (see
1926 instead in order to prevent any of these actions.
1927 .Ss "HTML mail and MIME attachments"
1928 Messages which are HTML-only become more and more common and of course
1929 many messages come bundled with a bouquet of MIME (Multipurpose Internet
1930 Mail Extensions) parts for, e.g., attachments.
1931 To get a notion of MIME types, \*(UA will first read
1932 .Sx "The mime.types files"
1933 (as configured and allowed by
1934 .Va mimetypes-load-control ) ,
1935 and then add onto that types registered directly with
1937 It (normally) has a default set of types built-in, too.
1938 To improve interaction with faulty MIME part declarations which are
1939 often seen in real-life messages, setting
1940 .Va mime-counter-evidence
1941 will allow \*(UA to verify the given assertion and possibly provide
1942 an alternative MIME type.
1944 Whereas \*(UA \*(OPally supports a simple HTML-to-text converter for
1945 HTML messages, it cannot handle MIME types other than plain text itself.
1946 Instead programs need to become registered to deal with specific MIME
1947 types or file extensions.
1948 These programs may either prepare plain text versions of their input in
1949 order to enable \*(UA to integrate their output neatlessly in its own
1950 message visualization (a mode which is called
1951 .Cd copiousoutput ) ,
1952 or display the content themselves, for example in an external graphical
1953 window: such handlers will only be considered by and for the command
1956 To install a handler program for a specific MIME type an according
1957 .Va pipe-TYPE/SUBTYPE
1958 variable needs to be set; to instead define a handler for a specific
1959 file extension the respective
1961 variable can be used \(en these handlers take precedence.
1962 \*(OPally \*(UA supports mail user agent configuration as defined in
1963 RFC 1524; this mechanism (see
1964 .Sx "The Mailcap files" )
1965 will be queried for display or quote handlers if none of the former two
1966 did; it will be the sole source for handlers of other purpose.
1967 A last source for handlers is the MIME type definition itself, when
1968 a (\*(UA specific) type-marker was registered with the command
1970 (which many built-in MIME types do).
1972 E.g., to display a HTML message inline (that is, converted to a more
1973 fancy plain text representation than the built-in converter is capable to
1974 produce) with either of the text-mode browsers
1978 teach \*(UA about MathML documents and make it display them as plain
1979 text, and to open PDF attachments in an external PDF viewer,
1980 asynchronously and with some other magic attached:
1981 .Bd -literal -offset indent
1982 ? if [ "$features" !% +filter-html-tagsoup ]
1983 ? #set pipe-text/html='@* elinks -force-html -dump 1'
1984 ? set pipe-text/html='@* lynx -stdin -dump -force_html'
1985 ? # Display HTML as plain text instead
1986 ? #set pipe-text/html=@
1988 ? mimetype @ application/mathml+xml mathml
1989 ? wysh set pipe-application/pdf='@&=@ \e
1990 trap "rm -f \e"${MAILX_FILENAME_TEMPORARY}\e"" EXIT;\e
1991 trap "trap \e"\e" INT QUIT TERM; exit 1" INT QUIT TERM;\e
1992 mupdf "${MAILX_FILENAME_TEMPORARY}"'
1995 \*(UA offers some support to ease handling of mailing lists.
1998 promotes all given arguments to known mailing lists, and
2000 sets their subscription attribute, creating them first as necessary.
2005 automatically, but only resets the subscription attribute.)
2006 Using the commands without arguments will show (a subset of) all
2007 currently defined mailing lists.
2012 can be used to mark out messages with configured list addresses
2013 in the header display.
2015 If the \*(OPal regular expression support is available a mailing list
2016 specification that contains any of the
2018 regular expression characters
2022 will be interpreted as one, which allows matching of many addresses with
2023 a single expression.
2024 However, all fully qualified list addresses are matched via a fast
2025 dictionary, whereas expressions are placed in (a) list(s) which is
2026 (are) matched sequentially.
2027 .Bd -literal -offset indent
2028 ? set followup-to followup-to-honour=ask-yes \e
2029 reply-to-honour=ask-yes
2030 ? wysh mlist a1@b1.c1 a2@b2.c2 '.*@lists\e.c3$'
2031 ? mlsubscribe a4@b4.c4 exact@lists.c3
2035 .Va followup-to-honour
2037 .Ql Mail-\:Followup-\:To:
2038 header is honoured when the message is being replied to (via
2044 controls whether this header is created when sending mails; it will be
2045 created automatically for a couple of reasons, too, like when the
2047 .Dq mailing list specific
2052 is used to respond to a message with its
2053 .Ql Mail-Followup-To:
2056 A difference in between the handling of known and subscribed lists is
2057 that the address of the sender is usually not part of a generated
2058 .Ql Mail-Followup-To:
2059 when addressing the latter, whereas it is for the former kind of lists.
2060 Usually because there are exceptions: say, if multiple lists are
2061 addressed and not all of them are subscribed lists.
2063 For convenience \*(UA will, temporarily, automatically add a list
2064 address that is presented in the
2066 header of a message that is being responded to to the list of known
2068 Shall that header have existed \*(UA will instead, dependent on the
2070 .Va reply-to-honour ,
2073 for this purpose in order to accept a list administrators' wish that
2074 is supposed to have been manifested like that (but only if it provides
2075 a single address which resides on the same domain as what is stated in
2077 .Ss "Signed and encrypted messages with S/MIME"
2078 \*(OP S/MIME provides two central mechanisms:
2079 message signing and message encryption.
2080 A signed message contains some data in addition to the regular text.
2081 The data can be used to verify that the message was sent using a valid
2082 certificate, that the sender's address in the message header matches
2083 that in the certificate, and that the message text has not been altered.
2084 Signing a message does not change its regular text;
2085 it can be read regardless of whether the recipient's software is able to
2087 It is thus usually possible to sign all outgoing messages if so desired.
2089 Encryption, in contrast, makes the message text invisible for all people
2090 except those who have access to the secret decryption key.
2091 To encrypt a message, the specific recipient's public encryption key
2093 It is therefore not possible to send encrypted mail to people unless their
2094 key has been retrieved from either previous communication or public key
2096 A message should always be signed before it is encrypted.
2097 Otherwise, it is still possible that the encrypted message text is
2100 A central concept to S/MIME is that of the certification authority (CA).
2101 A CA is a trusted institution that issues certificates.
2102 For each of these certificates it can be verified that it really
2103 originates from the CA, provided that the CA's own certificate is
2105 A set of CA certificates is usually delivered with OpenSSL and installed
2107 If you trust the source of your OpenSSL software installation,
2108 this offers reasonable security for S/MIME on the Internet.
2110 .Va smime-ca-no-defaults
2111 to avoid using the default certificates and point
2115 to a trusted pool of certificates.
2116 In general, a certificate cannot be more secure than the method its CA
2117 certificate has been retrieved with.
2119 This trusted pool of certificates is used by the command
2121 to ensure that the given S/MIME messages can be trusted.
2122 If so, verified sender certificates that were embedded in signed
2123 messages can be saved locally with the command
2125 and used by \*(UA to encrypt further communication with these senders:
2126 .Bd -literal -offset indent
2128 ? set smime-encrypt-USER@HOST=FILENAME \e
2129 smime-cipher-USER@HOST=AES256
2132 To sign outgoing messages in order to allow receivers to verify the
2133 origin of these messages a personal S/MIME certificate is required.
2134 \*(UA supports password-protected personal certificates (and keys),
2135 for more on this, and its automatization, please see the section
2136 .Sx "On URL syntax and credential lookup" .
2138 .Sx "S/MIME step by step"
2139 shows examplarily how such a private certificate can be obtained.
2140 In general, if such a private key plus certificate
2142 is available, all that needs to be done is to set some variables:
2143 .Bd -literal -offset indent
2144 ? set smime-sign-cert=ME@HERE.com.paired \e
2145 smime-sign-message-digest=SHA256 \e
2149 Variables of interest for S/MIME in general are
2152 .Va smime-ca-flags ,
2153 .Va smime-ca-no-defaults ,
2155 .Va smime-crl-file .
2156 For S/MIME signing of interest are
2158 .Va smime-sign-cert ,
2159 .Va smime-sign-include-certs
2161 .Va smime-sign-message-digest .
2162 Additional variables of interest for S/MIME en- and decryption:
2165 .Va smime-encrypt-USER@HOST .
2167 \*(ID Note that neither S/MIME signing nor encryption applies to
2168 message subjects or other header fields yet.
2169 Thus they may not contain sensitive information for encrypted messages,
2170 and cannot be trusted even if the message content has been verified.
2171 When sending signed messages,
2172 it is recommended to repeat any important header information in the
2174 .Ss "On URL syntax and credential lookup"
2175 \*(IN For accessing protocol-specific resources usage of Uniform
2176 Resource Locators (URL, RFC 1738) has become omnipresent.
2177 \*(UA expects and understands URLs in the following form;
2180 denote optional parts, optional either because there also exist other
2181 ways to define the information in question or because support of the
2182 part is protocol-specific (e.g.,
2184 is used by the local maildir and the IMAP protocol, but not by POP3);
2189 are specified they must be given in URL percent encoded form (RFC 3986;
2194 .Dl PROTOCOL://[USER[:PASSWORD]@]server[:port][/path]
2196 Note that these \*(UA URLs most often do not conform to any real
2197 standard, but instead represent a normalized variant of RFC 1738 \(en
2198 they are not used in data exchange but only meant as a compact,
2199 easy-to-use way of defining and representing information in
2200 a well-known notation.
2202 Many internal variables of \*(UA exist in multiple versions, called
2203 variable chains for the rest of this document: the plain
2208 .Ql variable-USER@HOST .
2215 had been specified in the respective URL, otherwise it refers to the plain
2221 that had been found when doing the user chain lookup as is described
2224 will never be in URL percent encoded form, whether it came from an URL
2225 or not; i.e., variable chain name extensions of
2226 .Sx "INTERNAL VARIABLES"
2227 must not be URL percent encoded.
2229 For example, whether an hypothetical URL
2230 .Ql smtp://hey%3Ayou@our.house
2231 had been given that includes a user, or whether the URL was
2232 .Ql smtp://our.house
2233 and the user had been found differently, to lookup the variable chain
2234 .Va smtp-use-starttls
2235 \*(UA first looks for whether
2236 .Ql smtp-\:use-\:starttls-\:hey:you@our.house
2237 is defined, then whether
2238 .Ql smtp-\:use-\:starttls-\:our.house
2239 exists before finally ending up looking at the plain variable itself.
2241 \*(UA obeys the following logic scheme when dealing with the
2242 necessary credential information of an account:
2247 has been given in the URL the variables
2251 are looked up; if no such variable(s) can be found then \*(UA will,
2252 when enforced by the \*(OPal variables
2253 .Va netrc-lookup-HOST
2260 specific entry which provides a
2262 name: this lookup will only succeed if unambiguous (one possible matching
2265 It is possible to load encrypted
2270 If there is still no
2272 then \*(UA will fall back to the user who is supposed to run \*(UA,
2273 the identity of which has been fixated during \*(UA startup and is
2274 known to be a valid user on the current host.
2276 Authentication: unless otherwise noted this will lookup the
2277 .Va PROTOCOL-auth-USER@HOST , PROTOCOL-auth-HOST , PROTOCOL-auth
2278 variable chain, falling back to a protocol-specific default should this
2283 has been given in the URL, then if the
2285 has been found through the \*(OPal
2287 that may have already provided the password, too.
2288 Otherwise the variable chain
2289 .Va password-USER@HOST , password-HOST , password
2290 is looked up and used if existent.
2292 Afterwards the complete \*(OPal variable chain
2293 .Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup
2297 cache is searched for a password only (multiple user accounts for
2298 a single machine may exist as well as a fallback entry without user
2299 but with a password).
2301 If at that point there is still no password available, but the
2302 (protocols') chosen authentication type requires a password, then in
2303 interactive mode the user will be prompted on the terminal.
2307 S/MIME verification works relative to the values found in the
2311 header field(s), which means that the values of
2312 .Va smime-sign , smime-sign-cert , smime-sign-include-certs
2314 .Va smime-sign-message-digest
2315 will not be looked up using the
2319 chains from above but instead use the corresponding values from the
2320 message that is being worked on.
2321 In unusual cases multiple and different
2325 combinations may therefore be involved \(en on the other hand those
2326 unusual cases become possible.
2327 The usual case is as short as:
2328 .Bd -literal -offset indent
2329 set mta=smtp://USER:PASS@HOST smtp-use-starttls \e
2330 smime-sign smime-sign-cert=+smime.pair
2335 contains complete example configurations.
2336 .Ss "Encrypted network communication"
2337 SSL (Secure Sockets Layer) a.k.a. its successor TLS (Transport Layer
2338 Security) are protocols which aid in securing communication by providing
2339 a safely initiated and encrypted network connection.
2340 A central concept of SSL/TLS is that of certificates: as part of each
2341 network connection setup a (set of) certificates will be exchanged, and
2342 by using those the identity of the network peer can be cryptographically
2344 SSL/TLS works by using a locally installed pool of trusted certificates,
2345 and verifying the connection peer succeeds if that provides
2346 a certificate which has been issued or is trusted by any certificate in
2347 the trusted local pool.
2349 The local pool of trusted so-called CA (Certification Authority)
2350 certificates is usually delivered with the used SSL/TLS library, and
2351 will be selected automatically, but it is also possible to create and
2352 use an own pool of trusted certificates.
2353 If this is desired, set
2354 .Va ssl-ca-no-defaults
2355 to avoid using the default certificate pool, and point
2359 to a trusted pool of certificates.
2360 A certificate cannot be more secure than the method its CA certificate
2361 has been retrieved with.
2363 It depends on the used protocol whether encrypted communication is
2364 possible, and which configuration steps have to be taken to enable it.
2365 Some protocols, e.g., POP3S, are implicitly encrypted, others, like
2366 POP3, can upgrade a plain text connection if so requested: POP3 offers
2368 which will be used if the variable (chain)
2369 .Va pop3-use-starttls
2371 .Bd -literal -offset indent
2372 shortcut encpop1 pop3s://pop1.exam.ple
2374 shortcut encpop2 pop3://pop2.exam.ple
2375 set pop3-use-starttls-pop2.exam.ple
2377 set mta=smtps://smtp.exam.ple:465
2378 set mta=smtp://smtp.exam.ple smtp-use-starttls
2381 Normally that is all there is to do, given that SSL/TLS libraries try to
2382 provide safe defaults, plenty of knobs however exist to adjust settings.
2383 For example certificate verification settings can be fine-tuned via
2385 and the SSL/TLS configuration basics are accessible via
2386 .Va ssl-config-pairs ,
2387 e.g., to specify the allowed protocols or cipher lists that
2388 a communication channel may use.
2389 In the past hints of how to restrict the set of protocols to highly
2390 secure ones were indicated, as of the time of this writing the allowed
2391 protocols or cipher list may need to become relaxed in order to be able
2392 to connect to some servers; the following example allows connecting to a
2394 that uses OpenSSL 0.9.8za from June 2014 (refer to
2395 .Sx "INTERNAL VARIABLES"
2396 for more on variable chains):
2397 .Bd -literal -offset indent
2398 wysh set ssl-config-pairs-lion@exam.ple='MinProtocol=TLSv1.1,\e
2399 CipherList=TLSv1.2:!aNULL:!eNULL:\e
2400 ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:\e
2401 DHE-RSA-AES256-SHA:@STRENGTH'
2406 can be used and should be referred to when creating a custom cipher list.
2407 Variables of interest for SSL/TLS in general are
2411 .Va ssl-ca-no-defaults ,
2412 .Va ssl-config-file ,
2413 .Va ssl-config-module ,
2414 .Va ssl-config-pairs ,
2420 .Ss "Character sets"
2421 \*(OP \*(UA detects the character set of the terminal by using
2422 mechanisms that are controlled by the
2424 environment variable
2429 in that order, see there).
2430 The internal variable
2432 will be set to the detected terminal character set accordingly,
2433 and will thus show up in the output of commands like, e.g.,
2438 However, the user may give a value for
2440 during startup, so that it is possible to send mail in a completely
2442 locale environment, an option which can be used to generate and send,
2443 e.g., 8-bit UTF-8 input data in a pure 7-bit US-ASCII
2445 environment (an example of this can be found in the section
2446 .Sx "On sending mail, and non-interactive mode" ) .
2447 Changing the value does not mean much beside that, because several
2448 aspects of the real character set are implied by the locale environment
2449 of the system, which stays unaffected by
2452 Messages and attachments which consist of 7-bit clean data will be
2453 classified as consisting of
2456 This is a problem if the
2458 character set is a multibyte character set that is also 7-bit clean.
2459 For example, the Japanese character set ISO-2022-JP is 7-bit clean but
2460 capable to encode the rich set of Japanese Kanji, Hiragana and Katakana
2461 characters: in order to notify receivers of this character set the mail
2462 message must be MIME encoded so that the character set ISO-2022-JP can
2464 To achieve this, the variable
2466 must be set to ISO-2022-JP.
2467 (Today a better approach regarding email is the usage of UTF-8, which
2468 uses 8-bit bytes for non-US-ASCII data.)
2470 If the \*(OPal character set conversion capabilities are not available
2472 does not include the term
2476 will be the only supported character set,
2477 it is simply assumed that it can be used to exchange 8-bit messages
2478 (over the wire an intermediate, configurable
2481 and the rest of this section does not apply;
2482 it may however still be necessary to explicitly set it if automatic
2483 detection fails, since in that case it defaults to
2484 LATIN1 a.k.a. ISO-8859-1.
2486 \*(OP When reading messages, their text is converted into
2488 as necessary in order to display them on the users terminal.
2489 Unprintable characters and invalid byte sequences are detected
2490 and replaced by proper substitution characters.
2491 Character set mappings for source character sets can be established with
2494 which may be handy to work around faulty character set catalogues (e.g.,
2495 to add a missing LATIN1 to ISO-8859-1 mapping), or to enforce treatment
2496 of one character set as another one (e.g., to interpret LATIN1 as CP1252).
2498 .Va charset-unknown-8bit
2499 to deal with another hairy aspect of message interpretation.
2501 When sending messages all their parts and attachments are classified.
2502 Whereas no character set conversion is performed on those parts which
2503 appear to be binary data,
2504 the character set being used must be declared within the MIME header of
2505 an outgoing text part if it contains characters that do not conform to
2506 the set of characters that are allowed by the email standards.
2507 Permissible values for character sets used in outgoing messages can be
2512 which defines a catch-all last-resort fallback character set that is
2513 implicitly appended to the list of character sets in
2516 When replying to a message and the variable
2517 .Va reply-in-same-charset
2518 is set, then the character set of the message being replied to
2519 is tried first (still being a subject of
2520 .Ic charsetalias ) .
2521 And it is also possible to make \*(UA work even more closely related to
2522 the current locale setting automatically by using the variable
2523 .Va sendcharsets-else-ttycharset ,
2524 please see there for more information.
2526 All the specified character sets are tried in order unless the
2527 conversion of the part or attachment succeeds.
2528 If none of the tried (8-bit) character sets is capable to represent the
2529 content of the part or attachment,
2530 then the message will not be sent and its text will optionally be
2534 In general, if a message saying
2535 .Dq cannot convert from a to b
2536 appears, either some characters are not appropriate for the currently
2537 selected (terminal) character set,
2538 or the needed conversion is not supported by the system.
2539 In the first case, it is necessary to set an appropriate
2541 locale and/or the variable
2544 The best results are usually achieved when \*(UA is run in a UTF-8
2545 locale on an UTF-8 capable terminal, in which case the full Unicode
2546 spectrum of characters is available.
2547 In this setup characters from various countries can be displayed,
2548 while it is still possible to use more simple character sets for sending
2549 to retain maximum compatibility with older mail clients.
2551 On the other hand the POSIX standard defines a locale-independent 7-bit
2552 .Dq portable character set
2553 that should be used when overall portability is an issue, the even more
2554 restricted subset named
2555 .Dq portable filename character set
2556 consists of A-Z, a-z, 0-9, period
2562 .Ss "Message states"
2563 \*(UA differentiates in between several different message states;
2564 the current state will be reflected in header summary displays if
2566 is configured to do so (via the internal variable
2568 and messages can also be selected and be acted upon depending on their
2570 .Sx "Specifying messages" ) .
2571 When operating on the system
2575 .Sx "primary system mailbox" ,
2576 special actions, like the automatic moving of messages to the
2578 .Sx "secondary mailbox"
2580 may be applied when the mailbox is left (also implicitly via
2581 a successful exit of \*(UA, but not if the special command
2583 is used) \(en however, because this may be irritating to users which
2586 mail-user-agents, the default global
2592 variables in order to suppress this behaviour.
2593 .Bl -hang -width ".It Ql new"
2595 Message has neither been viewed nor moved to any other state.
2596 Such messages are retained even in the
2598 .Sx "primary system mailbox" .
2600 Message has neither been viewed nor moved to any other state, but the
2601 message was present already when the mailbox has been opened last:
2602 Such messages are retained even in the
2604 .Sx "primary system mailbox" .
2606 The message has been processed by one of the following commands:
2625 will always try to automatically
2631 logical message, and may thus mark multiple messages as read, the
2633 command will do so if the internal variable
2638 command is used, messages that are in a
2640 .Sx "primary system mailbox"
2643 state when the mailbox is left will be saved in the
2645 .Sx "secondary mailbox"
2647 unless the internal variable
2651 The message has been processed by one of the following commands:
2657 can be used to access such messages.
2659 The message has been processed by a
2661 command and it will be retained in its current location.
2663 The message has been processed by one of the following commands:
2669 command is used, messages that are in a
2671 .Sx "primary system mailbox"
2674 state when the mailbox is left will be deleted; they will be saved in the
2676 .Sx "secondary mailbox"
2678 when the internal variable
2683 In addition to these message states, flags which otherwise have no
2684 technical meaning in the mail system except allowing special ways of
2685 addressing them when
2686 .Sx "Specifying messages"
2687 can be set on messages.
2688 These flags are saved with messages and are thus persistent, and are
2689 portable between a set of widely used MUAs.
2690 .Bl -hang -width ".It Ic answered"
2692 Mark messages as having been answered.
2694 Mark messages as being a draft.
2696 Mark messages which need special attention.
2698 .Ss "Specifying messages"
2700 .Sx "Message list arguments" ,
2708 can be given a list of message numbers as arguments to apply to a number
2709 of messages at once.
2712 deletes messages 1 and 2,
2715 will delete the messages 1 through 5.
2716 In sorted or threaded mode (see the
2720 will delete the messages that are located between (and including)
2721 messages 1 through 5 in the sorted/threaded order, as shown in the
2724 The following special message names exist:
2725 .Bl -tag -width ".It Ar BaNg"
2727 The current message, the so-called
2730 The message that was previously the current message.
2732 The parent message of the current message,
2733 that is the message with the Message-ID given in the
2735 field or the last entry of the
2737 field of the current message.
2739 The next previous undeleted message,
2740 or the next previous deleted message for the
2743 In sorted/threaded mode,
2744 the next previous such message in the sorted/threaded order.
2746 The next undeleted message,
2747 or the next deleted message for the
2750 In sorted/threaded mode,
2751 the next such message in the sorted/threaded order.
2753 The first undeleted message,
2754 or the first deleted message for the
2757 In sorted/threaded mode,
2758 the first such message in the sorted/threaded order.
2761 In sorted/threaded mode,
2762 the last message in the sorted/threaded order.
2765 selects the message addressed with
2769 is any other message specification,
2770 and all messages from the thread that begins at it.
2771 Otherwise it is identical to
2776 the thread beginning with the current message is selected.
2780 All messages that were included in the
2781 .Sx "Message list arguments"
2782 of the previous command.
2784 An inclusive range of message numbers.
2785 Selectors that may also be used as endpoints include any of
2789 .Dq any substring matches
2792 header, which will match addresses (too) even if
2794 is set (and POSIX says
2795 .Dq any address as shown in a header summary shall be matchable in this form ) ;
2798 variable is set, only the local part of the address is evaluated
2799 for the comparison, not ignoring case, and the setting of
2801 is completely ignored.
2802 For finer control and match boundaries use the
2805 .It Ar / Ns Ar string
2806 All messages that contain
2808 in the subject field (case ignored according to locale).
2815 the string from the previous specification of that type is used again.
2816 .It Xo Op Ar @ Ns Ar name-list Ns
2819 All messages that contain the given case-insensitive search
2821 ession; If the \*(OPal regular expression support is available
2823 will be interpreted as (an extended) one if any of the
2825 regular expression characters
2830 .Ar @ Ns Ar name-list
2831 part is missing the search is restricted to the subject field body,
2834 specifies a comma-separated list of header fields to search, e.g.,
2836 .Dl '@to,from,cc@Someone i ought to know'
2838 In order to search for a string that includes a
2840 (commercial at) character the
2842 is effectively non-optional, but may be given as the empty string.
2843 Also, specifying an empty search
2845 ession will effectively test for existence of the given header fields.
2846 Some special header fields may be abbreviated:
2860 respectively and case-insensitively.
2861 \*(OPally, and just like
2864 will be interpreted as (an extended) regular expression if any of the
2866 regular expression characters is seen.
2872 can be used to search in (all of) the header(s) of the message, and the
2881 will perform full text searches \(en whereas the former searches only
2882 the body, the latter also searches the message header (\*(ID this mode
2883 yet brute force searches over the entire decoded content of messages,
2884 including administrativa strings).
2886 This specification performs full text comparison, but even with
2887 regular expression support it is almost impossible to write a search
2888 expression that safely matches only a specific address domain.
2889 To request that the body content of the header is treated as a list of
2890 addresses, and to strip those down to the plain email address which the
2891 search expression is to be matched against, prefix the effective
2896 .Dl @~f@@a\e.safe\e.domain\e.match$
2898 All messages of state or with matching condition
2902 is one or multiple of the following colon modifiers:
2904 .Bl -tag -compact -width ".It Ar :M"
2907 messages (cf. the variable
2908 .Va markanswered ) .
2920 Messages with receivers that match
2924 Messages with receivers that match
2931 Old messages (any not in state
2939 \*(OP Messages with unsure spam classification (see
2940 .Sx "Handling spam" ) .
2942 \*(OP Messages classified as spam.
2952 \*(OP IMAP-style SEARCH expressions may also be used.
2953 This addressing mode is available with all types of mailbox
2955 s; \*(UA will perform the search locally as necessary.
2956 Strings must be enclosed by double quotes
2958 in their entirety if they contain whitespace or parentheses;
2959 within the quotes, only reverse solidus
2961 is recognized as an escape character.
2962 All string searches are case-insensitive.
2963 When the description indicates that the
2965 representation of an address field is used,
2966 this means that the search string is checked against both a list
2968 .Bd -literal -offset indent
2969 (\*qname\*q \*qsource\*q \*qlocal-part\*q \*qdomain-part\*q)
2973 and the addresses without real names from the respective header field.
2974 These search expressions can be nested using parentheses, see below for
2977 .Bl -tag -compact -width ".It Ar _n_u"
2978 .It Ar ( criterion )
2979 All messages that satisfy the given
2981 .It Ar ( criterion1 criterion2 ... criterionN )
2982 All messages that satisfy all of the given criteria.
2983 .It Ar ( or criterion1 criterion2 )
2984 All messages that satisfy either
2989 To connect more than two criteria using
2991 specifications have to be nested using additional parentheses,
2993 .Ql (or a (or b c)) ,
2997 .Ql ((a or b) and c) .
3000 operation of independent criteria on the lowest nesting level,
3001 it is possible to achieve similar effects by using three separate
3004 .It Ar ( not criterion )
3005 All messages that do not satisfy
3007 .It Ar ( bcc \*q Ns Ar string Ns Ar \*q )
3008 All messages that contain
3010 in the envelope representation of the
3013 .It Ar ( cc \*q Ns Ar string Ns Ar \*q )
3014 All messages that contain
3016 in the envelope representation of the
3019 .It Ar ( from \*q Ns Ar string Ns Ar \*q )
3020 All messages that contain
3022 in the envelope representation of the
3025 .It Ar ( subject \*q Ns Ar string Ns Ar \*q )
3026 All messages that contain
3031 .It Ar ( to \*q Ns Ar string Ns Ar \*q )
3032 All messages that contain
3034 in the envelope representation of the
3037 .It Ar ( header name \*q Ns Ar string Ns Ar \*q )
3038 All messages that contain
3043 .It Ar ( body \*q Ns Ar string Ns Ar \*q )
3044 All messages that contain
3047 .It Ar ( text \*q Ns Ar string Ns Ar \*q )
3048 All messages that contain
3050 in their header or body.
3051 .It Ar ( larger size )
3052 All messages that are larger than
3055 .It Ar ( smaller size )
3056 All messages that are smaller than
3059 .It Ar ( before date )
3060 All messages that were received before
3062 which must be in the form
3066 denotes the day of the month as one or two digits,
3068 is the name of the month \(en one of
3069 .Ql Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ,
3072 is the year as four digits, e.g.,
3075 All messages that were received on the specified date.
3076 .It Ar ( since date )
3077 All messages that were received since the specified date.
3078 .It Ar ( sentbefore date )
3079 All messages that were sent on the specified date.
3080 .It Ar ( senton date )
3081 All messages that were sent on the specified date.
3082 .It Ar ( sentsince date )
3083 All messages that were sent since the specified date.
3085 The same criterion as for the previous search.
3086 This specification cannot be used as part of another criterion.
3087 If the previous command line contained more than one independent
3088 criterion then the last of those criteria is used.
3090 .Ss "On terminal control and line editor"
3091 \*(OP Terminal control will be realized through one of the standard
3093 libraries, either the
3095 or, alternatively, the
3097 both of which will be initialized to work with the environment variable
3099 Terminal control will enhance or enable interactive usage aspects, e.g.,
3100 .Sx "Coloured display" ,
3101 and extend behaviour of the Mailx-Line-Editor (MLE), which may learn the
3102 byte-sequences of keys like the cursor and function keys.
3104 The internal variable
3106 can be used to overwrite settings or to learn (correct(ed)) keycodes.
3107 \*(UA may also become a fullscreen application by entering the
3108 so-called ca-mode and switching to an alternative exclusive screen
3109 (content) shall the terminal support it and the internal variable
3111 has been set explicitly.
3112 Actual interaction with the chosen library can be disabled completely by
3113 setting the internal variable
3114 .Va termcap-disable ;
3116 will be queried regardless, which is true even if the \*(OPal library
3117 support has not been enabled at configuration time as long as some other
3118 \*(OP which (may) query terminal control sequences has been enabled.
3120 \*(OP The built-in Mailx-Line-Editor (MLE) should work in all
3121 environments which comply to the ISO C standard
3123 and will support wide glyphs if possible (the necessary functionality
3124 had been removed from ISO C, but was included in
3126 Prevent usage of a line editor in interactive mode by setting the
3128 .Va line-editor-disable .
3129 Especially if the \*(OPal terminal control support is missing setting
3130 entries in the internal variable
3132 will help shall the MLE misbehave, see there for more.
3133 The MLE can support a little bit of
3138 feature is available then input from line editor prompts will be saved
3139 in a history list that can be searched in and be expanded from.
3140 Such saving can be prevented by prefixing input with any amount of
3142 Aspects of history, like allowed content and maximum size, as well as
3143 whether history shall be saved persistently, can be configured with the
3147 .Va history-gabby-persist
3151 The MLE supports a set of editing and control commands.
3152 By default (as) many (as possible) of these will be assigned to a set of
3153 single-letter control codes, which should work on any terminal (and can
3154 be generated by holding the
3156 key while pressing the key of desire, e.g.,
3160 command is available then the MLE commands can also be accessed freely
3161 by assigning the command name, which is shown in parenthesis in the list
3162 below, to any desired key-sequence, and the MLE will instead and also use
3164 to establish its built-in key bindings
3165 (more of them if the \*(OPal terminal control is available),
3166 an action which can then be suppressed completely by setting
3167 .Va line-editor-no-defaults .
3168 .Sx "Shell-style argument quoting"
3169 notation is used in the following;
3170 combinations not mentioned either cause job control signals or do not
3171 generate a (unique) keycode:
3173 .Bl -tag -compact -width ".It Ql \eBa"
3175 Go to the start of the line
3177 .Pf ( Cd mle-go-home ) .
3179 Move the cursor backward one character
3181 .Pf ( Cd mle-go-bwd ) .
3183 Forward delete the character under the cursor;
3184 quits \*(UA if used on the empty line unless the internal variable
3188 .Pf ( Cd mle-del-fwd ) .
3190 Go to the end of the line
3192 .Pf ( Cd mle-go-end ) .
3194 Move the cursor forward one character
3196 .Pf ( Cd mle-go-fwd ) .
3198 Cancel current operation, full reset.
3199 If there is an active history search or tabulator expansion then this
3200 command will first reset that, reverting to the former line content;
3201 thus a second reset is needed for a full reset in this case
3203 .Pf ( Cd mle-reset ) .
3205 Backspace: backward delete one character
3207 .Pf ( Cd mle-del-bwd ) .
3210 Horizontal tabulator:
3211 try to expand the word before the cursor, supporting the usual
3212 .Sx "Filename transformations"
3214 .Pf ( Cd mle-complete ;
3216 .Cd mle-quote-rndtrip ) .
3219 commit the current line
3221 .Pf ( Cd mle-commit ) .
3223 Cut all characters from the cursor to the end of the line
3225 .Pf ( Cd mle-snarf-end ) .
3229 .Pf ( Cd mle-repaint ) .
3231 \*(OP Go to the next history entry
3233 .Pf ( Cd mle-hist-fwd ) .
3235 (\*(OPally context-dependent) Invokes the command
3238 \*(OP Go to the previous history entry
3240 .Pf ( Cd mle-hist-bwd ) .
3242 Toggle roundtrip mode shell quotes, where produced,
3245 .Pf ( Cd mle-quote-rndtrip ) .
3246 This setting is temporary, and will be forgotten once the command line
3247 is committed; also see
3250 \*(OP Complete the current line from (the remaining) older history entries
3252 .Pf ( Cd mle-hist-srch-bwd ) .
3254 \*(OP Complete the current line from (the remaining) newer history entries
3256 .Pf ( Cd mle-hist-srch-fwd ) .
3258 Paste the snarf buffer
3260 .Pf ( Cd mle-paste ) .
3267 .Pf ( Cd mle-snarf-line ) .
3269 Prompts for a Unicode character (hexadecimal number without prefix, see
3273 .Pf ( Cd mle-prompt-char ) .
3274 Note this command needs to be assigned to a single-letter control code
3275 in order to become recognized and executed during input of
3276 a key-sequence (only three single-letter control codes can be used for
3277 that shortcut purpose); this control code is special-treated and cannot
3278 be part of any other sequence, because any occurrence will perform the
3280 function immediately.
3282 Cut the characters from the one preceding the cursor to the preceding
3285 .Pf ( Cd mle-snarf-word-bwd ) .
3287 Move the cursor forward one word boundary
3289 .Pf ( Cd mle-go-word-fwd ) .
3291 Move the cursor backward one word boundary
3293 .Pf ( Cd mle-go-word-bwd ) .
3295 Escape: reset a possibly used multibyte character input state machine
3296 and \*(OPally a lingering, incomplete key binding
3298 .Pf ( Cd mle-cancel ) .
3299 This command needs to be assigned to a single-letter control code in
3300 order to become recognized and executed during input of a key-sequence
3301 (only three single-letter control codes can be used for that shortcut
3303 This control code may also be part of a multi-byte sequence, but if
3304 a sequence is active and the very control code is currently also an
3305 expected input, then it will first be consumed by the active sequence.
3307 (\*(OPally context-dependent) Invokes the command
3310 (\*(OPally context-dependent) Invokes the command
3313 (\*(OPally context-dependent) Invokes the command
3316 Cut the characters from the one after the cursor to the succeeding word
3319 .Pf ( Cd mle-snarf-word-fwd ) .
3328 this will immediately reset a possibly active search etc.
3332 ring the audible bell.
3334 .Ss "Coloured display"
3335 \*(OP \*(UA can be configured to support a coloured display and font
3336 attributes by emitting ANSI a.k.a. ISO 6429 SGR (select graphic
3337 rendition) escape sequences.
3338 Usage of colours and font attributes solely depends upon the
3339 capability of the detected terminal type that is defined by the
3340 environment variable
3342 and which can be fine-tuned by the user via the internal variable
3345 On top of what \*(UA knows about the terminal the boolean variable
3347 defines whether the actually applicable colour and font attribute
3348 sequences should also be generated when output is going to be paged
3349 through the external program defined by the environment variable
3354 This is not enabled by default because different pager programs need
3355 different command line switches or other configuration in order to
3356 support those sequences.
3357 \*(UA however knows about some widely used pagers and in a clean
3358 environment it is often enough to simply set
3360 please refer to that variable for more on this topic.
3364 is set then any active usage of colour and font attribute sequences
3365 is suppressed, but without affecting possibly established
3369 To define and control colours and font attributes a single multiplexer
3370 command family exists:
3372 shows or defines colour mappings for the given colour type (e.g.,
3375 can be used to remove mappings of a given colour type.
3376 Since colours are only available in interactive mode, it may make
3377 sense to conditionalize the colour setup by encapsulating it with
3379 .Bd -literal -offset indent
3380 if terminal && [ "$features" =% +colour ]
3381 colour iso view-msginfo ft=bold,fg=green
3382 colour iso view-header ft=bold,fg=red from,subject
3383 colour iso view-header fg=red
3385 uncolour iso view-header from,subject
3386 colour iso view-header ft=bold,fg=magenta,bg=cyan
3387 colour 256 view-header ft=bold,fg=208,bg=230 "subject,from"
3388 colour mono view-header ft=bold
3389 colour mono view-header ft=bold,ft=reverse subject,from
3393 \*(OP \*(UA can make use of several spam interfaces for the purpose of
3394 identification of, and, in general, dealing with spam messages.
3395 A precondition of most commands in order to function is that the
3397 variable is set to one of the supported interfaces.
3398 Once messages have been identified as spam their (volatile)
3400 state can be prompted: the
3404 message specifications will address respective messages and their
3406 entries will be used when displaying the
3408 in the header display.
3412 rates the given messages and sets their
3415 If the spam interface offers spam scores those can also be displayed in
3416 the header display by including the
3426 will interact with the Bayesian filter of the chosen interface and learn
3427 the given messages as
3431 respectively; the last command can be used to cause
3433 of messages; it adheres to their current
3435 state and thus reverts previous teachings.
3440 will simply set and clear, respectively, the mentioned volatile
3442 message flag, without any interface interaction.
3450 requires a running instance of the
3452 server in order to function, started with the option
3454 shall Bayesian filter learning be possible.
3455 .Bd -literal -offset indent
3456 $ spamd -i localhost:2142 -i /tmp/.spamsock -d [-L] [-l]
3457 $ spamd --listen=localhost:2142 --listen=/tmp/.spamsock \e
3458 --daemonize [--local] [--allow-tell]
3461 Thereafter \*(UA can make use of these interfaces:
3462 .Bd -literal -offset indent
3463 $ \*(uA -Sspam-interface=spamc -Sspam-maxsize=500000 \e
3464 -Sspamc-command=/usr/local/bin/spamc \e
3465 -Sspamc-arguments="-U /tmp/.spamsock" -Sspamc-user=
3467 $ \*(uA -Sspam-interface=spamc -Sspam-maxsize=500000 \e
3468 -Sspamc-command=/usr/local/bin/spamc \e
3469 -Sspamc-arguments="-d localhost -p 2142" -Sspamc-user=
3472 Using the generic filter approach allows usage of programs like
3474 Here is an example, requiring it to be accessible via
3476 .Bd -literal -offset indent
3477 $ \*(uA -Sspam-interface=filter -Sspam-maxsize=500000 \e
3478 -Sspamfilter-ham="bogofilter -n" \e
3479 -Sspamfilter-noham="bogofilter -N" \e
3480 -Sspamfilter-nospam="bogofilter -S" \e
3481 -Sspamfilter-rate="bogofilter -TTu 2>/dev/null" \e
3482 -Sspamfilter-spam="bogofilter -s" \e
3483 -Sspamfilter-rate-scanscore="1;^(.+)$"
3486 Because messages must exist on local storage in order to be scored (or
3487 used for Bayesian filter training), it is possibly a good idea to
3488 perform the local spam check last.
3489 Spam can be checked automatically when opening specific folders by
3490 setting a specialized form of the internal variable
3492 .Bd -literal -offset indent
3493 define spamdelhook {
3495 spamset (header x-dcc-brand-metrics "bulk")
3496 # Server-side spamassassin(1)
3497 spamset (header x-spam-flag "YES")
3498 del :s # TODO we HAVE to be able to do `spamrate :u ! :sS'
3504 set folder-hook-SOMEFOLDER=spamdelhook
3507 See also the documentation for the variables
3508 .Va spam-interface , spam-maxsize ,
3509 .Va spamc-command , spamc-arguments , spamc-user ,
3510 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
3513 .Va spamfilter-rate-scanscore .
3515 \*(UA reads input in lines.
3516 An unquoted reverse solidus
3518 at the end of a command line
3520 the newline character: it is discarded and the next line of input is
3521 used as a follow-up line, with all leading whitespace removed;
3522 once an entire line is completed, the whitespace characters
3523 .Cm space , tabulator , newline
3524 as well as those defined by the variable
3526 are removed from the beginning and end.
3527 Placing any whitespace characters at the beginning of a line will
3528 prevent a possible addition of the command line to the \*(OPal
3531 The beginning of such input lines is then scanned for the name of
3532 a known command: command names may be abbreviated, in which case the
3533 first command that matches the given prefix will be used.
3534 .Sx "Command modifiers"
3535 may prefix a command in order to modify its behaviour.
3536 A name may also be a
3538 which will become expanded until no more expansion is possible.
3539 Once the command that shall be executed is known, the remains of the
3540 input line will be interpreted according to command-specific rules,
3541 documented in the following.
3543 This behaviour is different to the
3545 ell, which is a programming language with syntactic elements of clearly
3546 defined semantics, and therefore capable to sequentially expand and
3547 evaluate individual elements of a line.
3548 \*(UA will never be able to handle
3549 .Ql ? set one=value two=$one
3550 in a single statement, because the variable assignment is performed by
3557 can be used to show the list of all commands, either alphabetically
3558 sorted or in prefix search order (these do not match, also because the
3559 POSIX standard prescribes a set of abbreviations).
3560 \*(OPally the command
3564 when given an argument, will show a documentation string for the
3565 command matching the expanded argument, as in
3567 which should be a shorthand of
3569 with these documentation strings both commands support a more
3571 listing mode which includes the argument type of the command and other
3572 information which applies; a handy suggestion might thus be:
3573 .Bd -literal -offset indent
3575 # Before v15: need to enable sh(1)ell-style on _entire_ line!
3576 localopts 1;wysh set verbose;ignerr eval "${@}";return ${?}
3578 ? commandalias xv '\ecall __xv'
3581 .Ss "Command modifiers"
3582 Commands may be prefixed by one or multiple command modifiers.
3583 Some command modifiers can be used with a restricted set of commands
3588 will (\*(OPally) show which modifiers apply.
3591 The modifier reverse solidus
3594 to be placed first, prevents
3596 expansions on the remains of the line, e.g.,
3598 will always evaluate the command
3600 even if an (command)alias of the same name exists.
3602 content may itself contain further command modifiers, including
3603 an initial reverse solidus to prevent further expansions.
3608 indicates that any error generated by the following command should be
3609 ignored by the state machine and not cause a program exit with enabled
3611 or for the standardized exit cases in
3616 .Sx "INTERNAL VARIABLES" ,
3617 will be set to the real exit status of the command regardless.
3621 will alter the called command to apply changes only temporarily,
3622 local to block-scope, and can thus only be used inside of a
3627 Specifying it implies the modifier
3629 Block-scope settings will not be inherited by macros deeper in the
3631 chain, and will be garbage collected once the current block is left.
3632 To record and unroll changes in the global scope use the command
3637 does yet not implement any functionality.
3641 does yet not implement any functionality.
3643 Some commands support the
3646 modifier: if used, they expect the name of a variable, which can itself
3647 be a variable, i.e., shell expansion is applied, as their first
3648 argument, and will place their computation result in it instead of the
3649 default location (it is usually written to standard output).
3651 The given name will be tested for being a valid
3653 variable name, and may therefore only consist of upper- and lowercase
3654 characters, digits, and the underscore; the hyphen-minus may be used as
3655 a non-portable extension; digits may not be used as first, hyphen-minus
3656 may not be used as last characters.
3657 In addition the name may either not be one of the known
3658 .Sx "INTERNAL VARIABLES" ,
3659 or must otherwise refer to a writable (non-boolean) value variable.
3660 The actual put operation may fail nonetheless, e.g., if the variable
3661 expects a number argument only a number will be accepted.
3662 Any error during these operations causes the command as such to fail,
3663 and the error number
3666 .Va ^ERR Ns -NOTSUP ,
3671 but some commands deviate from the latter, which is documented.
3673 Last, but not least, the modifier
3676 can be used for some old and established commands to choose the new
3677 .Sx "Shell-style argument quoting"
3678 rules over the traditional
3679 .Sx "Old-style argument quoting" .
3681 .Ss "Message list arguments"
3682 Some commands expect arguments that represent messages (actually
3683 their symbolic message numbers), as has been documented above under
3684 .Sx "Specifying messages"
3686 If no explicit message list has been specified, the next message
3687 forward that satisfies the command's requirements will be used,
3688 and if there are no messages forward of the current message,
3689 the search proceeds backwards;
3690 if there are no good messages at all to be found, an error message is
3691 shown and the command is aborted.
3692 .Ss "Old-style argument quoting"
3693 \*(ID This section documents the old, traditional style of quoting
3694 non-message-list arguments to commands which expect this type of
3695 arguments: whereas still used by the majority of such commands, the new
3696 .Sx "Shell-style argument quoting"
3697 may be available even for those via
3700 .Sx "Command modifiers" .
3701 Nonetheless care must be taken, because only new commands have been
3702 designed with all the capabilities of the new quoting rules in mind,
3703 which can, e.g., generate control characters.
3704 .Bl -bullet -offset indent
3706 An argument can be enclosed between paired double-quotes
3711 any whitespace, shell word expansion, or reverse solidus characters
3712 (except as described next) within the quotes are treated literally as
3713 part of the argument.
3714 A double-quote will be treated literally within single-quotes and vice
3716 Inside such a quoted string the actually used quote character can be
3717 used nonetheless by escaping it with a reverse solidus
3722 An argument that is not enclosed in quotes, as above, can usually still
3723 contain space characters if those spaces are reverse solidus escaped, as in
3726 A reverse solidus outside of the enclosing quotes is discarded
3727 and the following character is treated literally as part of the argument.
3729 .Ss "Shell-style argument quoting"
3730 Commands which don't expect message-list arguments use
3732 ell-style, and therefore POSIX standardized, argument parsing and
3734 \*(ID Most new commands only support these new rules and are flagged
3735 \*(NQ, some elder ones can use them with the command modifier
3737 in the future only this type of argument quoting will remain.
3739 A command line is parsed from left to right and an input token is
3740 completed whenever an unquoted, otherwise ignored, metacharacter is seen.
3741 Metacharacters are vertical bar
3747 as well as all characters from the variable
3750 .Cm space , tabulator , newline .
3751 The additional metacharacters left and right parenthesis
3753 and less-than and greater-than signs
3757 supports are not used, and are treated as ordinary characters: for one
3758 these characters are a vivid part of email addresses, and it seems
3759 highly unlikely that their function will become meaningful to \*(UA.
3760 .Bd -filled -offset indent
3761 .Sy Compatibility note:
3762 \*(ID Please note that even many new-style commands do not yet honour
3764 to parse their arguments: whereas the
3766 ell is a language with syntactic elements of clearly defined semantics,
3767 \*(UA parses entire input lines and decides on a per-command base what
3768 to do with the rest of the line.
3769 This also means that whenever an unknown command is seen all that \*(UA
3770 can do is cancellation of the processing of the remains of the line.
3772 It also often depends on an actual subcommand of a multiplexer command
3773 how the rest of the line should be treated, and until v15 we are not
3774 capable to perform this deep inspection of arguments.
3775 Nonetheless, at least the following commands which work with positional
3776 parameters fully support
3778 for an almost shell-compatible field splitting:
3779 .Ic call , call_if , read , vpospar , xcall .
3782 Any unquoted number sign
3784 at the beginning of a new token starts a comment that extends to the end
3785 of the line, and therefore ends argument processing.
3786 An unquoted dollar sign
3788 will cause variable expansion of the given name, which must be a valid
3790 ell-style variable name (see
3792 .Sx "INTERNAL VARIABLES"
3795 (shell) variables can be accessed through this mechanism, brace
3796 enclosing the name is supported (i.e., to subdivide a token).
3798 Whereas the metacharacters
3799 .Cm space , tabulator , newline
3800 only complete an input token, vertical bar
3806 also act as control operators and perform control functions.
3807 For now supported is semicolon
3809 which terminates a single command, therefore sequencing the command line
3810 and making the remainder of the line a subject to reevaluation.
3811 With sequencing, multiple command argument types and quoting rules may
3812 therefore apply to a single line, which can become problematic before
3813 v15: e.g., the first of the following will cause surprising results.
3815 .Dl ? echo one; set verbose; echo verbose=$verbose.
3816 .Dl ? echo one; wysh set verbose; echo verbose=$verbose.
3818 Quoting is a mechanism that will remove the special meaning of
3819 metacharacters and reserved words, and will prevent expansion.
3820 There are four quoting mechanisms: the escape character, single-quotes,
3821 double-quotes and dollar-single-quotes:
3822 .Bl -bullet -offset indent
3824 The literal value of any character can be preserved by preceding it
3825 with the escape character reverse solidus
3828 Arguments which are enclosed in
3829 .Ql 'single-\:quotes'
3830 retain their literal value.
3831 A single-quote cannot occur within single-quotes.
3833 The literal value of all characters enclosed in
3834 .Ql \(dqdouble-\:quotes\(dq
3835 is retained, with the exception of dollar sign
3837 which will cause variable expansion, as above, backquote (grave accent)
3839 (which not yet means anything special), reverse solidus
3841 which will escape any of the characters dollar sign
3843 (to prevent variable expansion), backquote (grave accent)
3847 (to prevent ending the quote) and reverse solidus
3849 (to prevent escaping, i.e., to embed a reverse solidus character as-is),
3850 but has no special meaning otherwise.
3852 Arguments enclosed in
3853 .Ql $'dollar-\:single-\:quotes'
3854 extend normal single quotes in that reverse solidus escape sequences are
3855 expanded as follows:
3857 .Bl -tag -compact -width ".Ql \eNNN"
3859 bell control character (ASCII and ISO-10646 BEL).
3861 backspace control character (ASCII and ISO-10646 BS).
3863 escape control character (ASCII and ISO-10646 ESC).
3867 form feed control character (ASCII and ISO-10646 FF).
3869 line feed control character (ASCII and ISO-10646 LF).
3871 carriage return control character (ASCII and ISO-10646 CR).
3873 horizontal tabulator control character (ASCII and ISO-10646 HT).
3875 vertical tabulator control character (ASCII and ISO-10646 VT).
3877 emits a reverse solidus character.
3881 double quote (escaping is optional).
3883 eight-bit byte with the octal value
3885 (one to three octal digits), optionally prefixed by an additional
3887 A 0 byte will suppress further output for the quoted argument.
3889 eight-bit byte with the hexadecimal value
3891 (one or two hexadecimal characters, no prefix, see
3893 A 0 byte will suppress further output for the quoted argument.
3895 the Unicode / ISO-10646 character with the hexadecimal codepoint value
3897 (one to eight hexadecimal characters) \(em note that Unicode defines the
3898 maximum codepoint ever to be supported as
3903 This escape is only supported in locales that support Unicode (see
3904 .Sx "Character sets" ) ,
3905 in other cases the sequence will remain unexpanded unless the given code
3906 point is ASCII compatible or (if the \*(OPal character set conversion is
3907 available) can be represented in the current locale.
3908 The character NUL will suppress further output for the quoted argument.
3912 except it takes only one to four hexadecimal characters.
3914 Emits the non-printable (ASCII and compatible) C0 control codes
3915 0 (NUL) to 31 (US), and 127 (DEL).
3916 Printable representations of ASCII control codes can be created by
3917 mapping them to a different part of the ASCII character set, which is
3918 possible by adding the number 64 for the codes 0 to 31, e.g., 7 (BEL) is
3919 .Ql 7 + 64 = 71 = G .
3920 The real operation is a bitwise logical XOR with 64 (bit 7 set, see
3922 thus also covering code 127 (DEL), which is mapped to 63 (question mark):
3923 .Ql ? vexpr ^ 127 64 .
3925 Whereas historically circumflex notation has often been used for
3926 visualization purposes of control codes, e.g.,
3928 the reverse solidus notation has been standardized:
3930 Some control codes also have standardized (ISO-10646, ISO C) aliases,
3931 as shown above (e.g.,
3935 whenever such an alias exists it will be used for display purposes.
3936 The control code NUL
3938 a non-standard extension) will suppress further output for the remains
3939 of the token (which may extend beyond the current quote), or, depending
3940 on the context, the remains of all arguments for the current command.
3942 Non-standard extension: expand the given variable name, as above.
3943 Brace enclosing the name is supported.
3945 Not yet supported, just to raise awareness: Non-standard extension.
3950 .Bd -literal -offset indent
3951 ? echo 'Quotes '${HOME}' and 'tokens" differ!"# no comment
3952 ? echo Quotes ${HOME} and tokens differ! # comment
3953 ? echo Don"'"t you worry$'\ex21' The sun shines on us. $'\eu263A'
3955 .Ss "Raw data arguments for codec commands"
3956 A special set of commands, which all have the string
3958 in their name, e.g.,
3962 take raw string data as input, which means that the content of the
3963 command input line is passed completely unexpanded and otherwise
3964 unchanged: like this the effect of the actual codec is visible without
3965 any noise of possible shell quoting rules etc., i.e., the user can input
3966 one-to-one the desired or questionable data.
3967 To gain a level of expansion, the entire command line can be
3970 .Bd -literal -offset indent
3971 ? vput shcodec res encode /usr/Sch\[:o]nes Wetter/heute.txt
3973 $'/usr/Sch\eu00F6nes Wetter/heute.txt'
3975 $'/usr/Sch\eu00F6nes Wetter/heute.txt'
3976 ? eval shcodec d $res
3977 /usr/Sch\[:o]nes Wetter/heute.txt
3979 .Ss "Filename transformations"
3980 Filenames, where expected, and unless documented otherwise, are
3981 subsequently subject to the following filename transformations, in
3983 .Bl -bullet -offset indent
3985 If the given name is a registered
3987 it will be replaced with the expanded shortcut.
3989 The filename is matched against the following patterns or strings:
3991 .Bl -hang -compact -width ".Ar %user"
3993 (Number sign) is expanded to the previous file.
3995 (Percent sign) is replaced by the invoking
3996 .Mx -ix "primary system mailbox"
3997 user's primary system mailbox, which either is the (itself expandable)
3999 if that is set, the standardized absolute pathname indicated by
4001 if that is set, or a built-in compile-time default otherwise.
4003 Expands to the primary system mailbox of
4005 (and never the value of
4007 regardless of its actual setting).
4009 (Ampersand) is replaced with the invoking users
4010 .Mx -ix "secondary mailbox"
4011 secondary mailbox, the
4018 directory (if that variable is set).
4020 Expands to the same value as
4022 but has special meaning when used with, e.g., the command
4024 the file will be treated as a primary system mailbox by, e.g., the
4028 commands, meaning that messages that have been read in the current
4029 session will be moved to the
4031 mailbox instead of simply being flagged as read.
4034 Meta expansions may be applied to the resulting filename, as allowed by
4035 the operation and applicable to the resulting access protocol (also see
4036 .Sx "On URL syntax and credential lookup" ) .
4037 For the file-protocol, a leading tilde
4039 character will be replaced by the expansion of
4041 except when followed by a valid user name, in which case the home
4042 directory of the given user is used instead.
4044 A shell expansion as if specified in double-quotes (see
4045 .Sx "Shell-style argument quoting" )
4046 may be applied, so that any occurrence of
4050 will be replaced by the expansion of the variable, if possible;
4051 .Sx "INTERNAL VARIABLES"
4054 (shell) variables can be accessed through this mechanism.
4056 Shell pathname wildcard pattern expansions
4058 may be applied as documented.
4059 If the fully expanded filename results in multiple pathnames and the
4060 command is expecting only one file, an error results.
4062 In interactive context, in order to allow simple value acceptance (via
4064 arguments will usually be displayed in a properly quoted form, e.g., a file
4065 .Ql diet\e is \ecurd.txt
4067 .Ql 'diet\e is \ecurd.txt' .
4070 The following commands are available:
4071 .Bl -tag -width ".It Ic BaNg"
4076 command which follows, replacing unescaped exclamation marks with the
4077 previously executed command if the internal variable
4080 This command supports
4083 .Sx "Command modifiers" ,
4084 and manages the error number
4086 A 0 or positive exit status
4088 reflects the exit status of the command, negative ones that
4089 an error happened before the command was executed, or that the program
4090 did not exit cleanly, but, e.g., due to a signal: the error number is
4091 .Va ^ERR Ns -CHILD ,
4094 In conjunction with the
4096 modifier the following special cases exist:
4097 a negative exit status occurs if the collected data could not be stored
4098 in the given variable, which is a
4100 error that should otherwise not occur.
4101 .Va ^ERR Ns -CANCELED
4102 indicates that no temporary file could be created to collect the command
4103 output at first glance.
4104 In case of catchable out-of-memory situations
4106 will occur and \*(UA will try to store the empty string, just like with
4107 all other detected error conditions.
4110 The comment-command causes the entire line to be ignored.
4112 this really is a normal command which' purpose is to discard its
4115 indicating special character, which means that, e.g., trailing comments
4116 on a line are not possible.
4119 Goes to the next message in sequence and types it
4124 Display the preceding message, or the n'th previous message if given
4125 a numeric argument n.
4128 Show the current message number (the
4132 Show a brief summary of commands.
4133 \*(OP Given an argument a synopsis for the command in question is
4134 shown instead; commands can be abbreviated in general and this command
4135 can be used to see the full expansion of an abbreviation including the
4136 synopsis, try, e.g.,
4141 and see how the output changes.
4142 This mode also supports a more
4144 output, which will provide the information documented for
4153 .It Ic account , unaccount
4154 (ac, una) Creates, selects or lists (an) account(s).
4155 Accounts are special incarnations of
4157 macros and group commands and variable settings which together usually
4158 arrange the environment for the purpose of creating an email account.
4159 Different to normal macros settings which are covered by
4161 \(en here by default enabled! \(en will not be reverted before the
4166 (case-insensitive) always exists, and all but it can be deleted by the
4167 latter command, and in one operation with the special name
4169 Also for all but it a possibly set
4170 .Va on-account-cleanup
4171 hook is called once they are left.
4173 Without arguments a listing of all defined accounts is shown.
4174 With one argument the given account is activated: the system
4176 of that account will be activated (as via
4178 a possibly installed
4180 will be run, and the internal variable
4183 The two argument form is identical to defining a macro as via
4185 .Bd -literal -offset indent
4187 set folder=~/mail inbox=+syste.mbox record=+sent.mbox
4188 set from='(My Name) myname@myisp.example'
4189 set mta=smtp://mylogin@smtp.myisp.example
4194 Perform email address codec transformations on raw-data argument, rather
4195 according to email standards (RFC 5322; \*(ID will furtherly improve).
4199 .Sx "Command modifiers" ) ,
4200 and manages the error number
4202 The first argument must be either
4203 .Ar [+[+[+]]]e[ncode] ,
4208 and specifies the operation to perform on the rest of the line.
4210 Decoding will show how a standard-compliant MUA will display the given
4211 argument, which should be an email address.
4212 Please be aware that most MUAs have difficulties with the address
4213 standards, and vary wildly when (comments) in parenthesis,
4215 strings, or quoted-pairs, as below, become involved.
4216 \*(ID \*(UA currently does not perform decoding when displaying addresses.
4218 Skinning is identical to decoding but only outputs the plain address,
4219 without any string, comment etc. components.
4220 Another difference is that it may fail with the error number
4224 if decoding fails to find a(n) (valid) email address, in which case the
4225 unmodified input will be output again.
4228 first performs a skin operation, and thereafter checks a valid
4229 address for whether it is a registered mailing-list (see
4233 eventually reporting that state in the error number
4236 .Va ^ERR Ns -EXIST .
4237 (This state could later become overwritten by an I/O error, though.)
4239 Encoding supports four different modes, lesser automated versions can be
4240 chosen by prefixing one, two or three plus signs: the standard imposes
4241 a special meaning on some characters, which thus have to be transformed
4242 to so-called quoted-pairs by pairing them with a reverse solidus
4244 in order to remove the special meaning; this might change interpretation
4245 of the entire argument from what has been desired, however!
4246 Specify one plus sign to remark that parenthesis shall be left alone,
4247 two for not turning double quotation marks into quoted-pairs, and three
4248 for also leaving any user-specified reverse solidus alone.
4249 The result will always be valid, if a successful exit status is reported
4250 (\*(ID the current parser fails this assertion for some constructs).
4251 \*(ID Addresses need to be specified in between angle brackets
4254 if the construct becomes more difficult, otherwise the current parser
4255 will fail; it is not smart enough to guess right.
4256 .Bd -literal -offset indent
4257 ? addrc enc "Hey, you",<diet@exam.ple>\e out\e there
4258 "\e"Hey, you\e", \e\e out\e\e there" <diet@exam.ple>
4259 ? addrc d "\e"Hey, you\e", \e\e out\e\e there" <diet@exam.ple>
4260 "Hey, you", \e out\e there <diet@exam.ple>
4261 ? addrc s "\e"Hey, you\e", \e\e out\e\e there" <diet@exam.ple>
4266 .It Ic alias , unalias
4267 (a, una) Aliases are a method of creating personal distribution lists
4268 that map a single alias name to none to multiple real receivers;
4269 these aliases become expanded after message composing is completed.
4270 The latter command removes the given list of aliases, the special name
4272 will discard all existing aliases.
4274 The former command shows all currently defined aliases when used without
4275 arguments, and with one argument the expansion of the given alias.
4276 With more than one argument, creates or appends to the alias name given
4277 as the first argument the remaining arguments.
4278 Alias names adhere to the Postfix MTA
4280 rules and are thus restricted to alphabetic characters, digits, the
4281 underscore, hyphen-minus, the number sign, colon and commercial at,
4282 the last character can also be the dollar sign; the regular expression:
4283 .Ql [[:alnum:]_#:@-]+$? .
4284 \*(ID Unfortunately the colon is currently not supported, as it
4285 interferes with normal address parsing rules.
4286 As extensions the exclamation mark
4291 .Dq any character that has the high bit set
4293 \*(ID Such high bit characters will likely cause warnings at the moment
4294 for the same reasons why colon is unsupported.
4297 .It Ic alternates , unalternates
4298 \*(NQ (alt) Manage a list of alternate addresses or names of the active user,
4299 members of which will be removed from recipient lists.
4300 The latter command removes the given list of alternates, the special name
4302 will discard all existing aliases.
4303 The former command manages the error number
4305 and shows the current set of alternates when used without arguments; in
4306 this mode it supports
4309 .Sx "Command modifiers" ) .
4310 Otherwise the given arguments (after being checked for validity) are
4311 appended to the list of alternate names; in
4313 mode they replace that list instead.
4314 There is a set of implicit alternates which is formed of the values of
4322 .It Ic answered , unanswered
4323 Take a message lists and mark each message as having been answered,
4324 having not been answered, respectively.
4325 Messages will be marked answered when being
4327 to automatically if the
4331 .Sx "Message states" .
4334 .It Ic bind , unbind
4335 \*(OP\*(NQ The bind command extends the MLE (see
4336 .Sx "On terminal control and line editor" )
4337 with freely configurable key bindings.
4338 The latter command removes from the given context the given key binding,
4339 both of which may be specified as a wildcard
4343 will remove all bindings of all contexts.
4344 Due to initialization order unbinding will not work for built-in key
4345 bindings upon program startup, however: please use
4346 .Va line-editor-no-defaults
4347 for this purpose instead.
4349 With one argument the former command shows all key bindings for the
4350 given context, specifying an asterisk
4352 will show the bindings of all contexts; a more verbose listing will be
4353 produced if either of
4358 With two or more arguments a binding is (re)established:
4359 the first argument is the context to which the binding shall apply,
4360 the second argument is a comma-separated list of the
4362 which form the binding, and any remaining arguments form the expansion.
4363 To indicate that a binding shall not be auto-committed, but that the
4364 expansion shall instead be furtherly editable by the user, a commercial at
4366 (that will be removed) can be placed last in the expansion, from which
4367 leading and trailing whitespace will finally be removed.
4368 Reverse solidus cannot be used as the last character of expansion.
4370 Contexts define when a binding applies, i.e., a binding will not be seen
4371 unless the context for which it is defined for is currently active.
4372 This is not true for the shared binding
4374 which is the foundation for all other bindings and as such always
4375 applies, its bindings, however, only apply secondarily.
4376 The available contexts are the shared
4380 context which is used in all not otherwise documented situations, and
4382 which applies to compose mode only.
4385 which form the binding are specified as a comma-separated list of
4386 byte-sequences, where each list entry corresponds to one key(press).
4387 A list entry may, indicated by a leading colon character
4389 also refer to the name of a terminal capability; several dozen names
4390 will be compiled in and may be specified either by their
4392 or, if existing, by their
4394 name, regardless of the actually used \*(OPal terminal control library.
4395 It is possible to use any capability, as long as the name is resolvable
4396 by the \*(OPal control library or was defined via the internal variable
4398 Input sequences are not case-normalized, so that an exact match is
4399 required to update or remove a binding.
4401 .Bd -literal -offset indent
4402 ? bind base $'\eE',d mle-snarf-word-fwd # Esc(ape)
4403 ? bind base $'\eE',$'\ec?' mle-snarf-word-bwd # Esc, Delete
4404 ? bind default $'\ecA',:khome,w 'echo An editable binding@'
4405 ? bind default a,b,c rm -irf / @ # Another editable binding
4406 ? bind default :kf1 File %
4407 ? bind compose :kf1 ~e
4410 Note that the entire comma-separated list is first parsed (over) as a
4411 shell-token with whitespace as the field separator, before being parsed
4412 and expanded for real with comma as the field separator, therefore
4413 whitespace needs to be properly quoted, see
4414 .Sx "Shell-style argument quoting" .
4415 Using Unicode reverse solidus escape sequences renders a binding
4416 defunctional if the locale does not support Unicode (see
4417 .Sx "Character sets" ) ,
4418 and using terminal capabilities does so if no (corresponding) terminal
4419 control support is (currently) available.
4421 The following terminal capability names are built-in and can be used in
4423 or (if available) the two-letter
4426 See the respective manual for a list of capabilities.
4429 can be used to show all the capabilities of
4431 or the given terminal type;
4434 flag will also show supported (non-standard) extensions.
4436 .Bl -tag -compact -width kcuuf_or_kcuuf
4437 .It Cd kbs Ns \0or Cd kb
4439 .It Cd kdch1 Ns \0or Cd kD
4441 .It Cd kDC Ns \0or Cd *4
4442 \(em shifted variant.
4443 .It Cd kel Ns \0or Cd kE
4444 Clear to end of line.
4445 .It Cd kext Ns \0or Cd @9
4447 .It Cd kich1 Ns \0or Cd kI
4449 .It Cd kIC Ns \0or Cd #3
4450 \(em shifted variant.
4451 .It Cd khome Ns \0or Cd kh
4453 .It Cd kHOM Ns \0or Cd #2
4454 \(em shifted variant.
4455 .It Cd kend Ns \0or Cd @7
4457 .It Cd knp Ns \0or Cd kN
4459 .It Cd kpp Ns \0or Cd kP
4461 .It Cd kcub1 Ns \0or Cd kl
4462 Left cursor (with more modifiers: see below).
4463 .It Cd kLFT Ns \0or Cd #4
4464 \(em shifted variant.
4465 .It Cd kcuf1 Ns \0or Cd kr
4466 Right cursor (ditto).
4467 .It Cd kRIT Ns \0or Cd %i
4468 \(em shifted variant.
4469 .It Cd kcud1 Ns \0or Cd kd
4470 Down cursor (ditto).
4472 \(em shifted variant (only terminfo).
4473 .It Cd kcuu1 Ns \0or Cd ku
4476 \(em shifted variant (only terminfo).
4477 .It Cd kf0 Ns \0or Cd k0
4479 Add one for each function key up to
4484 .It Cd kf10 Ns \0or Cd k;
4486 .It Cd kf11 Ns \0or Cd F1
4488 Add one for each function key up to
4495 Some terminals support key-modifier combination extensions, e.g.,
4497 For example, the delete key,
4499 in its shifted variant, the name is mutated to
4501 then a number is appended for the states
4513 .Ql Shift+Alt+Control
4515 The same for the left cursor key,
4517 .Cd KLFT , KLFT3 , KLFT4 , KLFT5 , KLFT6 , KLFT7 , KLFT8 .
4519 It is advisable to use an initial escape or other control character (e.g.,
4521 for bindings which describe user key combinations (as opposed to purely
4522 terminal capability based ones), in order to avoid ambiguities whether
4523 input belongs to key sequences or not; it also reduces search time.
4526 may help shall keys and sequences be falsely recognized.
4529 \*(NQ Calls the given macro, which must have been created via
4534 Calling macros recursively will at some time excess the stack size
4535 limit, causing a hard program abortion; if recursively calling a macro
4536 is the last command of the current macro, consider to use the command
4538 which will first release all resources of the current macro before
4539 replacing the current macro with the called one.
4540 Numeric and string operations can be performed via
4544 may be helpful to recreate argument lists.
4549 if the given macro has been created via
4551 but doesn't fail nor warn if the macro doesn't exist.
4554 (ch) Change the working directory to
4556 or the given argument.
4561 \*(OP Only applicable to S/MIME signed messages.
4562 Takes a message list and a filename and saves the certificates
4563 contained within the message signatures to the named file in both
4564 human-readable and PEM format.
4565 The certificates can later be used to send encrypted messages to the
4566 respective message senders by setting
4567 .Va smime-encrypt-USER@HOST
4571 .It Ic charsetalias , uncharsetalias
4572 \*(NQ Manage (character set conversion) character set alias mappings,
4573 as documented in the section
4574 .Sx "Character sets" .
4575 Character set aliases are expanded recursively, but no expansion is
4576 performed on values of the user-settable variables, e.g.,
4578 These are effectively no-operations if character set conversion
4579 is not available (i.e., no
4583 Without arguments the list of all currently defined aliases is shown,
4584 with one argument the expansion of the given alias.
4585 Otherwise all given arguments are treated as pairs of character sets and
4586 their desired target alias name, creating new or changing already
4587 existing aliases, as necessary.
4589 The latter deletes all aliases given as arguments, the special argument
4591 will remove all aliases.
4594 (ch) Change the working directory to
4596 or the given argument.
4601 .It Ic collapse , uncollapse
4602 Only applicable to threaded mode.
4603 Takes a message list and makes all replies to these messages invisible
4604 in header summaries, except for
4608 Also when a message with collapsed replies is displayed,
4609 all of these are automatically uncollapsed.
4610 The latter command undoes collapsing.
4613 .It Ic colour , uncolour
4614 \*(OP\*(NQ Manage colour mappings of and for a
4615 .Sx "Coloured display" .
4616 The type of colour is given as the (case-insensitive) first argument,
4617 which must be one of
4619 for 256-colour terminals,
4624 for the standard 8-colour ANSI / ISO 6429 color palette and
4628 for monochrome terminals.
4629 Monochrome terminals cannot deal with colours, but only (some) font
4632 Without further arguments the list of all currently defined mappings
4633 for the given colour type is shown (as a special case giving
4637 will show the mappings of all types).
4638 Otherwise the second argument defines the mappable slot, and the third
4639 argument a (comma-separated list of) colour and font attribute
4640 specification(s), and the optional fourth argument can be used to
4641 specify a precondition: if conditioned mappings exist they are tested in
4642 (creation) order unless a (case-insensitive) match has been found, and
4643 the default mapping (if any has been established) will only be chosen as
4645 The types of precondition available depend on the mappable slot (see
4646 .Sx "Coloured display"
4647 for some examples), the following of which exist:
4649 Mappings prefixed with
4651 are used for the \*(OPal built-in Mailx-Line-Editor (MLE, see
4652 .Sx "On terminal control and line editor" )
4653 and do not support preconditions.
4655 .Bl -tag -compact -width view-partinfo
4657 This mapping is used for the position indicator that is visible when
4658 a line cannot be fully displayed on the screen.
4664 Mappings prefixed with
4666 are used in header summaries, and they all understand the preconditions
4668 (the current message) and
4670 for elder messages (only honoured in conjunction with
4671 .Va datefield-markout-older ) .
4673 .Bl -tag -compact -width view-partinfo
4675 This mapping is used for the
4677 that can be created with the
4681 formats of the variable
4684 For the complete header summary line except the
4686 and the thread structure.
4688 For the thread structure which can be created with the
4690 format of the variable
4694 Mappings prefixed with
4696 are used when displaying messages.
4698 .Bl -tag -compact -width view-partinfo
4700 This mapping is used for so-called
4702 lines, which are MBOX file format specific header lines.
4705 A comma-separated list of headers to which the mapping applies may be
4706 given as a precondition; if the \*(OPal regular expression support is
4707 available then if any of the
4709 (extended) regular expression characters is seen the precondition will
4710 be evaluated as (an extended) one.
4712 For the introductional message info line.
4713 .It Ar view-partinfo
4714 For MIME part info lines.
4717 The following (case-insensitive) colour definitions and font attributes
4718 are understood, multiple of which can be specified in a comma-separated
4727 It is possible (and often applicable) to specify multiple font
4728 attributes for a single mapping.
4730 foreground colour attribute:
4740 To specify a 256-color mode a decimal number colour specification in
4741 the range 0 to 255, inclusive, is supported, and interpreted as follows:
4743 .Bl -tag -compact -width "999 - 999"
4745 the standard ISO 6429 colors, as above.
4747 high intensity variants of the standard colors.
4749 216 colors in tuples of 6.
4751 grayscale from black to white in 24 steps.
4753 .Bd -literal -offset indent
4755 fg() { printf "\e033[38;5;${1}m($1)"; }
4756 bg() { printf "\e033[48;5;${1}m($1)"; }
4758 while [ $i -lt 256 ]; do fg $i; i=$(($i + 1)); done
4759 printf "\e033[0m\en"
4761 while [ $i -lt 256 ]; do bg $i; i=$(($i + 1)); done
4762 printf "\e033[0m\en"
4765 background colour attribute (see
4767 for possible values).
4772 will remove for the given colour type (the special type
4774 selects all) the given mapping; if the optional precondition argument is
4775 given only the exact tuple of mapping and precondition is removed.
4778 will remove all mappings (no precondition allowed), thus
4780 will remove all established mappings.
4783 .It Ic commandalias , uncommandalias
4784 \*(NQ Define or list, and remove, respectively, command aliases.
4785 An (command)alias can be used everywhere a normal command can be used,
4786 but always takes precedence: any arguments that are given to the command
4787 alias are joined onto the alias expansion, and the resulting string
4788 forms the command line that is, in effect, executed.
4789 The latter command removes all given aliases, the special name
4791 will remove all existing aliases.
4792 When used without arguments the former shows a list of all currently
4793 known aliases, with one argument only the expansion of the given one.
4795 With two or more arguments a command alias is defined or updated: the
4796 first argument is the name under which the remaining command line should
4797 be accessible, the content of which can be just about anything.
4798 An alias may itself expand to another alias, but to avoid expansion loops
4799 further expansion will be prevented if an alias refers to itself or if
4800 an expansion depth limit is reached.
4801 Explicit expansion prevention is available via reverse solidus
4804 .Sx "Command modifiers" .
4805 .Bd -literal -offset indent
4807 \*(uA: `commandalias': no such alias: xx
4808 ? commandalias xx echo hello,
4810 commandalias xx 'echo hello,'
4818 (C) Copy messages to files whose names are derived from the author of
4819 the respective message and do not mark them as being saved;
4820 otherwise identical to
4824 (c) Copy messages to the named file and do not mark them as being saved;
4825 otherwise identical to
4829 Show the name of the current working directory, as reported by
4834 .Sx "Command modifiers" ) .
4835 The return status is tracked via
4839 \*(OP For unencrypted messages this command is identical to
4841 Encrypted messages are first decrypted, if possible, and then copied.
4844 \*(OP For unencrypted messages this command is identical to
4846 Encrypted messages are first decrypted, if possible, and then copied.
4849 .It Ic define , undefine
4850 The latter command deletes the given macro, the special name
4852 will discard all existing macros.
4853 Deletion of (a) macro(s) can be performed from within running (a)
4854 macro(s), including self-deletion.
4855 Without arguments the former command prints the current list of macros,
4856 including their content, otherwise it it defines a macro, replacing an
4857 existing one of the same name as applicable.
4859 A defined macro can be invoked explicitly by using the
4864 commands, or implicitly if a macro hook is triggered, e.g., a
4866 Execution of a macro body can be stopped from within by calling
4869 Temporary macro block-scope variables can be created or deleted with the
4871 command modifier in conjunction with the commands
4876 To enforce unrolling of changes made to (global)
4877 .Sx "INTERNAL VARIABLES"
4880 can be used instead; its covered scope depends on how (i.e.,
4882 normal macro, folder hook, hook,
4884 switch) the macro is invoked.
4888 ed macro, the given positional parameters are implicitly local
4889 to the macro's scope, and may be accessed via the variables
4895 and any other positive unsigned decimal number less than or equal to
4897 Positional parameters can be
4899 ed, or become completely replaced, removed etc. via
4901 .Bd -literal -offset indent
4911 echo Parameter 1 of ${#} is ${1}, all: ${*} / ${@}
4914 call exmac Hello macro exmac!
4915 echo ${?}/${!}/${^ERRNAME}
4919 .It Ic delete , undelete
4920 (d, u) Marks the given message list as being or not being
4922 respectively; if no argument has been specified then the usual search
4923 for a visible message is performed, as documented for
4924 .Sx "Message list arguments" ,
4925 showing only the next input prompt if the search fails.
4926 Deleted messages will neither be saved in the
4928 .Sx "secondary mailbox"
4930 nor will they be available for most other commands.
4933 variable is set, the new
4935 or the last message restored, respectively, is automatically
4944 Superseded by the multiplexer
4949 Delete the given messages and automatically
4953 if one exists, regardless of the setting of
4959 up or down by one message when given
4963 argument, respectively.
4966 .It Ic draft , undraft
4967 Take message lists and mark each given message as being draft, or not
4968 being draft, respectively, as documented in the section
4969 .Sx "Message states" .
4972 \*(NQ (ec) Echoes arguments to standard output and writes a trailing
4973 newline, whereas the otherwise identical
4976 .Sx "Shell-style argument quoting"
4978 .Sx "Filename transformations"
4979 are applied to the expanded arguments.
4980 This command also supports
4983 .Sx "Command modifiers" ,
4984 and manages the error number
4986 if data is stored in a variable then the return value reflects the
4987 length of the result string in case of success and is
4994 except that is echoes to standard error.
4997 In interactive sessions the \*(OPal message ring queue for
4999 will be used instead, if available and
5006 but does not write or store a trailing newline.
5011 but does not write or store a trailing newline.
5014 (e) Point the text editor (as defined in
5016 at each message from the given list in turn.
5017 Modified contents are discarded unless the
5019 variable is set, and are not used unless the mailbox can be written to
5020 and the editor returns a successful exit status.
5024 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
5025 conditional \(em if the condition of a preceding
5027 was false, check the following condition and execute the following block
5028 if it evaluates true.
5032 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
5033 conditional \(em if none of the conditions of the preceding
5037 commands was true, the
5042 (en) Marks the end of an
5043 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
5044 conditional execution block.
5047 \*(NQ \*(UA has a strict notion about which variables are
5048 .Sx "INTERNAL VARIABLES"
5049 and which are managed in the program
5051 Since some of the latter are a vivid part of \*(UAs functioning,
5052 however, they are transparently integrated into the normal handling of
5053 internal variables via
5057 To integrate other environment variables of choice into this
5058 transparent handling, and also to export internal variables into the
5059 process environment where they normally are not, a
5061 needs to become established with this command, as in, e.g.,
5063 .Dl environ link PERL5LIB TZ
5065 Afterwards changing such variables with
5067 will cause automatic updates of the program environment, and therefore
5068 be inherited by newly created child processes.
5069 Sufficient system support provided (it was in BSD as early as 1987, and
5070 is standardized since Y2K) removing such variables with
5072 will remove them also from the program environment, but in any way
5073 the knowledge they ever have been
5076 Note that this implies that
5078 may cause loss of such links.
5082 will remove an existing link, but leaves the variables as such intact.
5083 Additionally the subcommands
5087 are provided, which work exactly the same as the documented commands
5091 but (additionally un)link the variable(s) with the program environment
5092 and thus immediately export them to, or remove them from (if possible),
5093 respectively, the program environment.
5096 \*(OP Since \*(UA uses the console as a user interface it can happen
5097 that messages scroll by too fast to become recognized.
5098 An error message ring queue is available which stores duplicates of any
5099 error message and notifies the user in interactive sessions whenever
5100 a new error has occurred.
5101 The queue is finite: if its maximum size is reached any new message
5102 replaces the eldest.
5105 can be used to manage this message queue: if given
5107 or no argument the queue will be displayed and cleared,
5109 will only clear all messages from the queue.
5112 \*(NQ Construct a command by concatenating the arguments, separated with
5113 a single space character, and then evaluate the result.
5114 This command passes through the exit status
5118 of the evaluated command; also see
5120 .Bd -literal -offset indent
5131 call yyy '\ecall xxx' "b\e$'\et'u ' "
5138 (ex or x) Exit from \*(UA without changing the active mailbox and skip
5139 any saving of messages in the
5141 .Sx "secondary mailbox"
5143 as well as a possibly tracked line editor
5145 The optional status number argument will be passed through to
5147 \*(ID For now it can happen that the given status will be overwritten,
5148 later this will only occur if a later error needs to be reported onto an
5149 otherwise success indicating status.
5154 but open the mailbox read-only.
5157 (fi) The file command switches to a new mailbox.
5158 Without arguments it shows status information of the current mailbox.
5159 If an argument is given, it will write out changes (such as deletions)
5160 the user has made, open a new mailbox, update the internal variables
5161 .Va mailbox-resolved
5163 .Va mailbox-display ,
5164 and optionally display a summary of
5170 .Sx "Filename transformations"
5171 will be applied to the
5175 prefixes are, i.e., URL syntax is understood, e.g.,
5176 .Ql maildir:///tmp/mdirbox :
5177 if a protocol prefix is used the mailbox type is fixated and neither
5178 the auto-detection (read on) nor the
5181 \*(OPally URLs can also be used to access network resources, which may
5182 be accessed securely via
5183 .Sx "Encrypted network communication"
5184 if so supported, and it is possible to proxy all network traffic over
5185 a SOCKS5 server given via
5188 .Dl \*(IN protocol://[user[:password]@]host[:port][/path]
5189 .Dl \*(OU protocol://[user@]host[:port][/path]
5191 \*(OPally supported network protocols are
5195 (POP3 with SSL/TLS encrypted transport),
5201 part is valid only for IMAP; there it defaults to
5203 Network URLs require a special encoding as documented in the section
5204 .Sx "On URL syntax and credential lookup" .
5206 If the resulting file protocol (MBOX database)
5208 is located on a local filesystem then the list of all registered
5210 s is traversed in order to see whether a transparent intermediate
5211 conversion step is necessary to handle the given mailbox, in which case
5212 \*(UA will use the found hook to load and save data into and from
5213 a temporary file, respectively.
5214 Changing hooks will not affect already opened mailboxes.
5215 For example, the following creates hooks for the
5217 compression tool and a combined compressed and encrypted format:
5218 .Bd -literal -offset indent
5220 gzip 'gzip -dc' 'gzip -c' \e
5221 zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
5224 MBOX database files are generally locked during file operations in order
5225 to avoid inconsistencies due to concurrent modifications.
5226 \*(OPal Mailbox files which \*(UA treats as the system
5231 .Sx "primary system mailbox" Ns
5232 es in general will also be protected by so-called dotlock files, the
5233 traditional way of mail spool file locking: for any file
5237 will be created for the duration of the synchronization \(em
5238 as necessary a privilege-separated dotlock child process will be used
5239 to accommodate for necessary privilege adjustments in order to create
5240 the dotlock file in the same directory
5241 and with the same user and group identities as the file of interest.
5242 Possible dotlock creation errors can be catched by setting
5243 .Va dotlock-ignore-error .
5245 \*(UA by default uses tolerant POSIX rules when reading MBOX database
5246 files, but it will detect invalid message boundaries in this mode and
5247 complain (even more with
5249 if any is seen: in this case
5251 can be used to create a valid MBOX database from the invalid input.
5253 If no protocol has been fixated, and
5255 refers to a directory with the subdirectories
5260 then it is treated as a folder in
5263 The maildir format stores each message in its own file, and has been
5264 designed so that file locking is not necessary when reading or writing
5267 \*(ID If no protocol has been fixated and no existing file has
5268 been found, the variable
5270 controls the format of mailboxes yet to be created.
5273 .It Ic filetype , unfiletype
5274 \*(NQ Define or list, and remove, respectively, file handler hooks,
5275 which provide (shell) commands that enable \*(UA to load and save MBOX
5276 files from and to files with the registered file extensions;
5277 it will use an intermediate temporary file to store the plain data.
5278 The latter command removes the hooks for all given extensions,
5280 will remove all existing handlers.
5282 When used without arguments the former shows a list of all currently
5283 defined file hooks, with one argument the expansion of the given alias.
5284 Otherwise three arguments are expected, the first specifying the file
5285 extension for which the hook is meant, and the second and third defining
5286 the load- and save commands, respectively, to deal with the file type,
5287 both of which must read from standard input and write to standard
5289 Changing hooks will not affect already opened mailboxes (\*(ID except below).
5290 \*(ID For now too much work is done, and files are oftened read in twice
5291 where once would be sufficient: this can cause problems if a filetype is
5292 changed while such a file is opened; this was already so with the
5293 built-in support of .gz etc. in Heirloom, and will vanish in v15.
5294 \*(ID For now all handler strings are passed to the
5295 .Ev SHELL for evaluation purposes; in the future a
5297 prefix to load and save commands may mean to bypass this shell instance:
5298 placing a leading space will avoid any possible misinterpretations.
5299 .Bd -literal -offset indent
5300 ? filetype bz2 'bzip2 -dc' 'bzip2 -zc' \e
5301 gz 'gzip -dc' 'gzip -c' xz 'xz -dc' 'xz -zc' \e
5302 zst 'zstd -dc' 'zstd -19 -zc' \e
5303 zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
5304 ? set record=+sent.zst.pgp
5308 .It Ic flag , unflag
5309 Take message lists and mark the messages as being flagged, or not being
5310 flagged, respectively, for urgent/special attention.
5312 .Sx "Message states" .
5319 With no arguments, list the names of the folders in the folder directory.
5320 With an existing folder as an argument,
5321 lists the names of folders below the named folder.
5326 but saves the message in a file named after the local part of the first
5327 recipient's address (instead of in
5333 but saves the message in a file named after the local part of the first
5334 recipient's address (instead of in
5340 but responds to all recipients regardless of the
5344 .It Ic followupsender
5347 but responds to the sender only regardless of the
5354 but saves the message in a file named after the local part of the
5355 recipient's address (instead of in
5359 Takes a message and the address of a recipient
5360 and forwards the message to him.
5361 The text of the original message is included in the new one,
5362 with the value of the
5363 .Va forward-inject-head
5364 variable preceding it.
5365 To filter the included header fields to the desired subset use the
5367 slot of the white- and blacklisting command
5369 Only the first part of a multipart message is included unless
5370 .Va forward-as-attachment ,
5371 and recipient addresses will be stripped from comments, names
5372 etc. unless the internal variable
5376 This may generate the errors
5377 .Va ^ERR Ns -DESTADDRREQ
5378 if no receiver has been specified,
5380 if some addressees where rejected by
5383 if no applicable messages have been given,
5385 if multiple messages have been specified,
5387 if an I/O error occurs,
5389 if a necessary character set conversion fails, and
5394 (f) Takes a list of message specifications and displays a summary of
5395 their message headers, exactly as via
5397 making the first message of the result the new
5399 (the last message if
5402 An alias of this command is
5405 .Sx "Specifying messages" .
5413 \*(OB Superseded by the multiplexer
5416 \*(OB Superseded by the multiplexer
5418 .It Ic ghost , unghost
5421 .Ic uncommandalias .
5424 .It Ic headerpick , unheaderpick
5425 \*(NQ Multiplexer command to manage white- and blacklisting
5426 selections of header fields for a variety of applications.
5427 Without arguments the set of contexts that have settings is displayed.
5428 When given arguments, the first argument is the context to which the
5429 command applies, one of (case-insensitive)
5431 for display purposes (via, e.g.,
5434 for selecting which headers shall be stored persistently when
5440 ing messages (note that MIME related etc. header fields should not be
5441 ignored in order to not destroy usability of the message in this case),
5443 for stripping down messages when
5445 ing message (has no effect if
5446 .Va forward-as-attachment
5449 for defining user-defined set of fields for the command
5452 The current settings of the given context are displayed if it is the
5454 A second argument denotes the type of restriction that is to be chosen,
5455 it may be (a case-insensitive prefix of)
5459 for white- and blacklisting purposes, respectively.
5460 Establishing a whitelist suppresses inspection of the corresponding
5463 If no further argument is given the current settings of the given type
5464 will be displayed, otherwise the remaining arguments specify header
5465 fields, which \*(OPally may be given as regular expressions, to be added
5467 The special wildcard field (asterisk,
5469 will establish a (fast) shorthand setting which covers all fields.
5471 The latter command always takes three or more arguments and can be used
5472 to remove selections, i.e., from the given context, the given type of
5473 list, all the given headers will be removed, the special argument
5475 will remove all headers.
5478 (h) Show the current group of headers, the size of which depends on
5481 and the style of which can be adjusted with the variable
5483 If a message-specification is given the group of headers containing the
5484 first message therein is shown and the message at the top of the screen
5487 the last message is targeted if
5496 \*(OP Without arguments or when given
5498 all history entries are shown (this mode also supports a more
5502 will replace the list of entries with the content of
5506 will dump the current list to said file, replacing former content.
5508 will delete all history entries.
5509 The argument can also be a signed decimal
5511 which will select and evaluate the respective history entry, and move it
5512 to the top of the history; a negative number is used as an offset to the
5513 current command, e.g.,
5515 will select the last command, the history top.
5517 .Sx "On terminal control and line editor"
5518 for more on this topic.
5523 Takes a message list and marks each message therein to be saved in the
5528 .Sx "secondary mailbox"
5530 Does not override the
5533 \*(UA deviates from the POSIX standard with this command, because a
5535 command issued after
5537 will display the following message, not the current one.
5540 (i) Part of the nestable
5541 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
5542 conditional execution construct \(em if the given condition is true then
5543 the encapsulated block is executed.
5544 The POSIX standards supports the (case-insensitive) conditions
5549 end, all remaining conditions are non-portable extensions.
5550 \*(ID These commands do not yet use
5551 .Sx "Shell-style argument quoting"
5552 and therefore do not know about input tokens, so that syntax
5553 elements have to be surrounded by whitespace; in v15 \*(UA will inspect
5554 all conditions bracket group wise and consider the tokens, representing
5555 values and operators, therein, which also means that variables will
5556 already have been expanded at that time (just like in the shell).
5557 .Bd -literal -offset indent
5565 The (case-insensitive) condition
5567 erminal will evaluate to true if the standard input is a terminal, i.e.,
5568 in interactive sessions.
5569 Another condition can be any boolean value (see the section
5570 .Sx "INTERNAL VARIABLES"
5571 for textual boolean representations) to mark an enwrapped block as
5574 .Dq always execute .
5575 (It shall be remarked that a faulty condition skips all branches until
5579 .Sx "Shell-style argument quoting"
5580 will be used, and this command will simply interpret expanded tokens.)
5581 It is possible to check
5582 .Sx "INTERNAL VARIABLES"
5585 variables for existence or compare their expansion against a user given
5586 value or another variable by using the
5588 .Pf ( Dq variable next )
5589 conditional trigger character;
5590 a variable on the right hand side may be signalled using the same
5592 Variable names may be enclosed in a pair of matching braces.
5593 When this mode has been triggered, several operators are available:
5595 Integer operators treat the arguments on the left and right hand side of
5596 the operator as integral numbers and compare them arithmetically.
5597 It is an error if any of the operands is not a valid integer, an empty
5598 argument (which implies it had been quoted) is treated as if it were 0.
5599 Available operators are
5603 (less than or equal to),
5609 (greater than or equal to), and
5613 String data operators compare the left and right hand side according to
5614 their textual content.
5615 Unset variables are treated as the empty string.
5616 The behaviour of string operators can be adjusted by prefixing the
5617 operator with the modifier trigger commercial at
5619 followed by none to multiple modifiers: for now supported is
5621 which turns the comparison into a case-insensitive one: this is
5622 implied if no modifier follows the trigger.
5624 Available string operators are
5628 (less than or equal to),
5634 (greater than or equal to),
5638 (is substring of) and
5640 (is not substring of).
5641 By default these operators work on bytes and (therefore) do not take
5642 into account character set specifics.
5643 If the case-insensitivity modifier has been used, case is ignored
5644 according to the rules of the US-ASCII encoding, i.e., bytes are
5647 When the \*(OPal regular expression support is available, the additional
5653 They treat the right hand side as an extended regular expression that is
5654 matched according to the active locale (see
5655 .Sx "Character sets" ) ,
5656 i.e., character sets should be honoured correctly.
5658 Conditions can be joined via AND-OR lists (where the AND operator is
5660 and the OR operator is
5662 which have equal precedence and will be evaluated with left
5663 associativity, thus using the same syntax that is known for the
5665 It is also possible to form groups of conditions and lists by enclosing
5666 them in pairs of brackets
5667 .Ql [\ \&.\&.\&.\ ] ,
5668 which may be interlocked within each other, and also be joined via
5671 The results of individual conditions and entire groups may be modified
5672 via unary operators: the unary operator
5674 will reverse the result.
5675 .Bd -literal -offset indent
5676 # (This not in v15, there [ -n "$debug"]!)
5680 if [ "$ttycharset" == UTF-8 ] || \e
5681 [ "$ttycharset" @i== UTF8 ]
5682 echo *ttycharset* is UTF-8, the former case-sensitive!
5685 if [ "${t1}" == "${t2}" ]
5686 echo These two variables are equal
5688 if [ "$features" =% +regex ] && \e
5689 [ "$TERM" @i=~ "^xterm\&.*" ]
5690 echo ..in an X terminal
5692 if [ [ true ] && [ [ "${debug}" != '' ] || \e
5693 [ "$verbose" != '' ] ] ]
5696 if true && [ "$debug" != '' ] || [ "${verbose}" != '' ]
5697 echo Left associativity, as is known from the shell
5704 Superseded by the multiplexer
5708 Shows the names of all available commands, alphabetically sorted.
5709 If given any non-whitespace argument the list will be shown in the order
5710 in which command prefixes are searched.
5711 \*(OP In conjunction with a set variable
5713 additional information will be provided for each command: the argument
5714 type will be indicated, the documentation string will be shown,
5715 and the set of command flags will show up:
5717 .Bl -tag -compact -width ".It Ql NEEDS_BOX"
5719 command supports the command modifier
5722 command supports the command modifier
5725 the error number is tracked in
5728 commands needs an active mailbox, a
5730 .It Ql "ok: batch/interactive"
5731 command may only be used in interactive or
5734 .It Ql "ok: send mode"
5735 command can be used in send mode.
5736 .It Ql "not ok: compose mode"
5737 command is not available when in compose mode.
5738 .It Ql "not ok: startup"
5739 command cannot be used during program startup, e.g., while loading
5740 .Sx "Resource files" .
5741 .It Ql "ok: subprocess"
5742 command is allowed to be used when running in a subprocess instance,
5743 e.g., from within a macro that is called via
5744 .Va on-compose-splice .
5746 The command produces
5753 This command can be used to localize changes to (linked)
5756 .Sx "INTERNAL VARIABLES" ,
5757 meaning that their state will be reverted to the former one once the
5760 Just like the command modifier
5762 which provides block-scope localization for some commands (instead),
5763 it can only be used inside of macro definition blocks introduced by
5767 The covered scope of an
5769 is left once a different account is activated, and some macros, notably
5770 .Va folder-hook Ns s ,
5771 use their own specific notion of covered scope, here it will be extended
5772 until the folder is left again.
5774 This setting stacks up: i.e., if
5776 enables change localization and calls
5778 which explicitly resets localization, then any value changes within
5780 will still be reverted when the scope of
5783 (Caveats: if in this example
5785 changes to a different
5787 which sets some variables that are already covered by localizations,
5788 their scope will be extended, and in fact leaving the
5790 will (thus) restore settings in (likely) global scope which actually
5791 were defined in a local, macro private context!)
5793 This command takes one or two arguments, the optional first one
5794 specifies an attribute that may be one of
5796 which refers to the current scope and is thus the default,
5798 which causes any macro that is being
5800 ed to be started with localization enabled by default, as well as
5802 which (if enabled) disallows any called macro to turn off localization:
5803 like this it can be ensured that once the current scope regains control,
5804 any changes made in deeper levels have been reverted.
5805 The latter two are mutually exclusive, and neither affects
5807 The (second) argument is interpreted as a boolean (string, see
5808 .Sx "INTERNAL VARIABLES" )
5809 and states whether the given attribute shall be turned on or off.
5810 .Bd -literal -offset indent
5811 define temporary_settings {
5812 set possibly_global_option1
5814 set localized_option1
5815 set localized_option2
5817 set possibly_global_option2
5822 Reply to messages that come in via known
5825 .Pf ( Ic mlsubscribe )
5826 mailing lists, or pretend to do so (see
5827 .Sx "Mailing lists" ) :
5830 functionality this will actively resort and even remove message
5831 recipients in order to generate a message that is supposed to be sent to
5833 For example it will also implicitly generate a
5834 .Ql Mail-Followup-To:
5835 header if that seems useful, regardless of the setting of the variable
5837 For more documentation please refer to
5838 .Sx "On sending mail, and non-interactive mode" .
5840 This may generate the errors
5841 .Va ^ERR Ns -DESTADDRREQ
5842 if no receiver has been specified,
5844 if some addressees where rejected by
5847 if no applicable messages have been given,
5849 if an I/O error occurs,
5851 if a necessary character set conversion fails, and
5854 Any error stops processing of further messages.
5859 but saves the message in a file named after the local part of the first
5860 recipient's address (instead of in
5864 (m) Takes a (list of) recipient address(es) as (an) argument(s),
5865 or asks on standard input if none were given;
5866 then collects the remaining mail content and sends it out.
5867 Unless the internal variable
5869 is set recipient addresses will be stripped from comments, names etc.
5870 For more documentation please refer to
5871 .Sx "On sending mail, and non-interactive mode" .
5873 This may generate the errors
5874 .Va ^ERR Ns -DESTADDRREQ
5875 if no receiver has been specified,
5877 if some addressees where rejected by
5880 if no applicable messages have been given,
5882 if multiple messages have been specified,
5884 if an I/O error occurs,
5886 if a necessary character set conversion fails, and
5891 (mb) The given message list is to be sent to the
5893 .Sx "secondary mailbox"
5895 when \*(UA is quit; this is the default action unless the variable
5898 \*(ID This command can only be used in a
5900 .Sx "primary system mailbox" .
5903 .It Ic mimetype , unmimetype
5904 Without arguments the content of the MIME type cache will displayed;
5905 a more verbose listing will be produced if either of
5910 When given arguments they will be joined, interpreted as shown in
5911 .Sx "The mime.types files"
5913 .Sx "HTML mail and MIME attachments" ) ,
5914 and the resulting entry will be added (prepended) to the cache.
5915 In any event MIME type sources are loaded first as necessary \(en
5916 .Va mimetypes-load-control
5917 can be used to fine-tune which sources are actually loaded.
5919 The latter command deletes all specifications of the given MIME type, thus
5920 .Ql ? unmimetype text/plain
5921 will remove all registered specifications for the MIME type
5925 will discard all existing MIME types, just as will
5927 but which also reenables cache initialization via
5928 .Va mimetypes-load-control .
5931 .It Ic mlist , unmlist
5932 The latter command removes all given mailing-lists, the special name
5934 can be used to remove all registered lists.
5935 The former will list all currently defined mailing lists (and their
5936 attributes, if any) when used without arguments; a more verbose listing
5937 will be produced if either of
5942 Otherwise all given arguments will be added and henceforth be recognized
5944 If the \*(OPal regular expression support is available then any argument
5945 which contains any of the
5947 regular expression characters
5951 will be interpreted as one, which allows matching of many addresses with
5952 a single expression.
5955 pair of commands manages subscription attributes of mailing-lists.
5958 \*(ID Only available in interactive mode, this command allows one to
5959 display MIME parts which require external MIME handler programs to run
5960 which do not integrate in \*(UAs normal
5963 .Sx "HTML mail and MIME attachments" ) .
5964 (\*(ID No syntax to directly address parts, this restriction may vanish.)
5965 The user will be asked for each non-text part of the given message in
5966 turn whether the registered handler shall be used to display the part.
5969 .It Ic mlsubscribe , unmlsubscribe
5970 The latter command removes the subscription attribute from all given
5971 mailing-lists, the special name
5973 can be used to do so for any registered list.
5974 The former will list all currently defined mailing lists which have
5975 a subscription attribute when used without arguments; a more verbose
5976 listing will be produced if either of
5981 Otherwise this attribute will be set for all given mailing lists,
5982 newly creating them as necessary (as via
5990 but moves the messages to a file named after the local part of the
5991 sender address of the first message (instead of in
5997 but marks the messages for deletion if they were transferred
6003 but also displays header fields which would not pass the
6005 selection, and all MIME parts.
6012 on the given messages, even in non-interactive mode and as long as the
6013 standard output is a terminal.
6018 \*(OP When used without arguments or if
6020 has been given the content of the
6022 cache is shown, loading it first as necessary.
6025 then the cache will only be initialized and
6027 will remove its contents.
6028 Note that \*(UA will try to load the file only once, use
6029 .Ql Ic \&\&netrc Ns \:\0\:clear
6030 to unlock further attempts.
6035 .Sx "On URL syntax and credential lookup" ;
6037 .Sx "The .netrc file"
6038 documents the file format in detail.
6041 Checks for new mail in the current folder without committing any changes
6043 If new mail is present, a message is shown.
6047 the headers of each new message are also shown.
6048 This command is not available for all mailbox types.
6055 Goes to the next message in sequence and types it.
6056 With an argument list, types the next matching message.
6067 If the current folder is accessed via a network connection, a
6069 command is sent, otherwise no operation is performed.
6074 but also displays header fields which would not pass the
6076 selection, and all MIME parts.
6083 on the given messages, even in non-interactive mode and as long as the
6084 standard output is a terminal.
6091 but also pipes header fields which would not pass the
6093 selection, and all parts of MIME
6094 .Ql multipart/alternative
6098 (pi) Takes a message list and a shell command
6099 and pipes the messages through the command.
6100 Without an argument the current message is piped through the command
6107 every message is followed by a formfeed character.
6124 (q) Terminates the session, saving all undeleted, unsaved messages in
6127 .Sx "secondary mailbox"
6129 preserving all messages marked with
6133 or never referenced in the system
6135 and removing all other messages from the
6137 .Sx "primary system mailbox" .
6138 If new mail has arrived during the session,
6140 .Dq You have new mail
6142 If given while editing a mailbox file with the command line option
6144 then the edit file is rewritten.
6145 A return to the shell is effected,
6146 unless the rewrite of edit file fails,
6147 in which case the user can escape with the exit command.
6148 The optional status number argument will be passed through to
6150 \*(ID For now it can happen that the given status will be overwritten,
6151 later this will only occur if a later error needs to be reported onto an
6152 otherwise success indicating status.
6155 \*(NQ Read a line from standard input, or the channel set active via
6157 and assign the data, which will be split as indicated by
6159 to the given variables.
6160 The variable names are checked by the same rules as documented for
6162 and the same error codes will be seen in
6166 indicates the number of bytes read, it will be
6168 with the error number
6172 in case of I/O errors, or
6175 If there are more fields than variables, assigns successive fields to the
6176 last given variable.
6177 If there are less fields than variables, assigns the empty string to the
6179 .Bd -literal -offset indent
6182 ? echo "<$a> <$b> <$c>"
6184 ? wysh set ifs=:; read a b c;unset ifs
6185 hey2.0,:"'you ",:world!:mars.:
6186 ? echo $?/$^ERRNAME / <$a><$b><$c>
6187 0/NONE / <hey2.0,><"'you ",><world!:mars.:><><>
6191 \*(NQ Read anything from standard input, or the channel set active via
6193 and assign the data to the given variable.
6194 The variable name is checked by the same rules as documented for
6196 and the same error codes will be seen in
6200 indicates the number of bytes read, it will be
6202 with the error number
6206 in case of I/O errors, or
6209 \*(ID The input data length is restricted to 31-bits.
6212 \*(NQ Manages input channels for
6216 to be used to avoid complicated or impracticable code, like calling
6218 from within a macro in non-interactive mode.
6219 Without arguments, or when the first argument is
6221 a listing of all known channels is printed.
6222 Channels can otherwise be
6224 d, and existing channels can be
6228 d by giving the string used for creation.
6230 The channel name is expected to be a file descriptor number, or,
6231 if parsing the numeric fails, an input file name that undergoes
6232 .Sx "Filename transformations" .
6233 E.g. (this example requires a modern shell):
6234 .Bd -literal -offset indent
6235 $ LC_ALL=C printf 'echon "hey, "\enread a\enyou\enecho $a' |\e
6238 $ LC_ALL=C printf 'echon "hey, "\enread a\enecho $a' |\e
6239 LC_ALL=C 6<<< 'you' \*(uA -R#X'readctl create 6'
6250 Removes the named files or directories.
6251 .Sx "Filename transformations"
6252 including shell pathname wildcard pattern expansions
6254 are performed on the arguments.
6255 If a name refer to a mailbox, e.g., a Maildir mailbox, then a mailbox
6256 type specific removal will be performed, deleting the complete mailbox.
6257 The user is asked for confirmation in interactive mode.
6260 Takes the name of an existing folder
6261 and the name for the new folder
6262 and renames the first to the second one.
6263 .Sx "Filename transformations"
6264 including shell pathname wildcard pattern expansions
6266 are performed on both arguments.
6267 Both folders must be of the same type.
6270 (R) Replies to only the sender of each message of the given message
6271 list, by using the first message as the template to quote, for the
6275 will exchange this command with
6277 Unless the internal variable
6279 is set the recipient address will be stripped from comments, names etc.
6281 headers will be inspected if
6285 This may generate the errors
6286 .Va ^ERR Ns -DESTADDRREQ
6287 if no receiver has been specified,
6289 if some addressees where rejected by
6292 if no applicable messages have been given,
6294 if an I/O error occurs,
6296 if a necessary character set conversion fails, and
6301 (r) Take a message and group-responds to it by addressing the sender
6302 and all recipients, subject to
6306 .Va followup-to-honour ,
6309 .Va recipients-in-cc
6310 influence response behaviour.
6311 Unless the internal variable
6313 is set recipient addresses will be stripped from comments, names etc.
6323 offers special support for replying to mailing lists.
6324 For more documentation please refer to
6325 .Sx "On sending mail, and non-interactive mode" .
6327 This may generate the errors
6328 .Va ^ERR Ns -DESTADDRREQ
6329 if no receiver has been specified,
6331 if some addressees where rejected by
6334 if no applicable messages have been given,
6336 if an I/O error occurs,
6338 if a necessary character set conversion fails, and
6341 Any error stops processing of further messages.
6346 but initiates a group-reply regardless of the value of
6352 but responds to the sender only regardless of the value of
6358 but does not add any header lines.
6359 This is not a way to hide the sender's identity,
6360 but useful for sending a message again to the same recipients.
6363 Takes a list of messages and a user name
6364 and sends each message to the named user.
6366 and related header fields are prepended to the new copy of the message.
6369 is only performed if
6373 This may generate the errors
6374 .Va ^ERR Ns -DESTADDRREQ
6375 if no receiver has been specified,
6377 if some addressees where rejected by
6380 if no applicable messages have been given,
6382 if an I/O error occurs,
6384 if a necessary character set conversion fails, and
6387 Any error stops processing of further messages.
6401 .It Ic respondsender
6406 (ret) Superseded by the multiplexer
6410 Only available inside the scope of a
6414 this will stop evaluation of any further macro content, and return
6415 execution control to the caller.
6416 The two optional parameters must be specified as positive decimal
6417 numbers and default to the value 0:
6418 the first argument specifies the signed 32-bit return value (stored in
6420 \*(ID and later extended to signed 64-bit),
6421 the second the signed 32-bit error number (stored in
6425 a non-0 exit status may cause the program to exit.
6430 but saves the messages in a file named after the local part of the
6431 sender of the first message instead of (in
6433 and) taking a filename argument; the variable
6435 is inspected to decide on the actual storage location.
6438 (s) Takes a message list and a filename and appends each message in turn
6439 to the end of the file.
6440 .Sx "Filename transformations"
6441 including shell pathname wildcard pattern expansions
6443 is performed on the filename.
6444 If no filename is given, the
6446 .Sx "secondary mailbox"
6449 The filename in quotes, followed by the generated character count
6450 is echoed on the user's terminal.
6453 .Sx "primary system mailbox"
6454 the messages are marked for deletion.
6455 .Sx "Filename transformations"
6457 To filter the saved header fields to the desired subset use the
6459 slot of the white- and blacklisting command
6462 \*(OB Superseded by the multiplexer
6465 \*(OB Superseded by the multiplexer
6468 \*(OB Superseded by the multiplexer
6472 Takes a message specification (list) and displays a header summary of
6473 all matching messages, as via
6475 This command is an alias of
6478 .Sx "Specifying messages" .
6481 Takes a message list and marks all messages as having been read.
6485 (se, \*(NQ uns) The latter command will delete all given global
6486 variables, or only block-scope local ones if the
6488 command modifier has been used.
6489 The former, when used without arguments, will show all
6490 currently known variables, being more verbose if either of
6495 Remarks: this list mode will not automatically link-in known
6497 variables, but only explicit addressing will, e.g., via
6499 using a variable in an
6501 condition or a string passed to
6505 ting, as well as some program-internal use cases.
6507 Otherwise the given variables (and arguments) are set or adjusted.
6508 Arguments are of the form
6510 (no space before or after
6514 if there is no value, i.e., a boolean variable.
6515 If a name begins with
6519 the effect is the same as invoking the
6521 command with the remaining part of the variable
6522 .Pf ( Ql unset save ) .
6523 \*(ID In conjunction with the
6525 .Pf (or\0 Cm local )
6527 .Sx "Shell-style argument quoting"
6528 can be used to quote arguments as necessary.
6529 \*(ID Otherwise quotation marks may be placed around any part of the
6530 assignment statement to quote blanks or tabs.
6532 When operating in global scope any
6534 that is known to map to an environment variable will automatically cause
6535 updates in the program environment (unsetting a variable in the
6536 environment requires corresponding system support) \(em use the command
6538 for further environmental control.
6539 If the command modifier
6541 has been used to alter the command to work in block-scope all variables
6542 have values (may they be empty), and creation of names which shadow
6543 .Sx "INTERNAL VARIABLES"
6544 is actively prevented (\*(ID shadowing of linked
6546 variables and free-form versions of variable chains is not yet detected).
6551 .Sx "INTERNAL VARIABLES"
6554 .Bd -literal -offset indent
6555 ? wysh set indentprefix=' -> '
6556 ? wysh set atab=$'\t' aspace=' ' zero=0
6560 Apply shell quoting rules to the given raw-data arguments.
6564 .Sx "Command modifiers" ) .
6565 The first argument specifies the operation:
6569 cause shell quoting to be applied to the remains of the line, and
6570 expanded away thereof, respectively.
6571 If the former is prefixed with a plus-sign, the quoted result will not
6572 be roundtrip enabled, and thus can be decoded only in the very same
6573 environment that was used to perform the encode; also see
6574 .Cd mle-quote-rndtrip .
6575 If the coding operation fails the error number
6578 .Va ^ERR Ns -CANCELED ,
6579 and the unmodified input is used as the result; the error number may
6580 change again due to output or result storage errors.
6583 \*(NQ (sh) Invokes an interactive version of the shell,
6584 and returns its exit status.
6587 .It Ic shortcut , unshortcut
6588 Without arguments the list of all currently defined shortcuts is
6589 shown, with one argument the expansion of the given shortcut.
6590 Otherwise all given arguments are treated as pairs of shortcuts and
6591 their expansions, creating new or changing already existing shortcuts,
6593 The latter command will remove all given shortcuts, the special name
6595 will remove all registered shortcuts.
6598 \*(NQ Shift the positional parameter stack (starting at
6600 by the given number (which must be a positive decimal),
6601 or 1 if no argument has been given.
6602 It is an error if the value exceeds the number of positional parameters.
6603 If the given number is 0, no action is performed, successfully.
6604 The stack as such can be managed via
6606 Note this command will fail in
6608 and hook macros unless the positional parameter stack has been
6609 explicitly created in the current context via
6615 but performs neither MIME decoding nor decryption, so that the raw
6616 message text is shown.
6619 (si) Shows the size in characters of each message of the given
6623 \*(NQ Sleep for the specified number of seconds (and optionally
6624 milliseconds), by default interruptably.
6625 If a third argument is given the sleep will be uninterruptible,
6626 otherwise the error number
6630 if the sleep has been interrupted.
6631 The command will fail and the error number will be
6632 .Va ^ERR Ns -OVERFLOW
6633 if the given duration(s) overflow the time datatype, and
6635 if the given durations are no valid integers.
6638 .It Ic sort , unsort
6639 The latter command disables sorted or threaded mode, returns to normal
6640 message order and, if the
6643 displays a header summary.
6644 The former command shows the current sorting criterion when used without
6645 an argument, but creates a sorted representation of the current folder
6646 otherwise, and changes the
6648 command and the addressing modes such that they refer to messages in
6650 Message numbers are the same as in regular mode.
6654 a header summary in the new order is also displayed.
6655 Automatic folder sorting can be enabled by setting the
6657 variable, as in, e.g.,
6658 .Ql set autosort=thread .
6659 Possible sorting criterions are:
6661 .Bl -tag -compact -width "subject"
6663 Sort the messages by their
6665 field, that is by the time they were sent.
6667 Sort messages by the value of their
6669 field, that is by the address of the sender.
6672 variable is set, the sender's real name (if any) is used.
6674 Sort the messages by their size.
6676 \*(OP Sort the message by their spam score, as has been classified by
6679 Sort the messages by their message status.
6681 Sort the messages by their subject.
6683 Create a threaded display.
6685 Sort messages by the value of their
6687 field, that is by the address of the recipient.
6690 variable is set, the recipient's real name (if any) is used.
6694 \*(NQ (so) The source command reads commands from the given file.
6695 .Sx "Filename transformations"
6697 If the given expanded argument ends with a vertical bar
6699 then the argument will instead be interpreted as a shell command and
6700 \*(UA will read the output generated by it.
6701 Dependent on the settings of
6705 and also dependent on whether the command modifier
6707 had been used, encountering errors will stop sourcing of the given input.
6710 cannot be used from within macros that execute as
6711 .Va folder-hook Ns s
6714 i.e., it can only be called from macros that were
6718 \*(NQ The difference to
6720 (beside not supporting pipe syntax aka shell command input) is that
6721 this command will not generate an error nor warn if the given file
6722 argument cannot be opened successfully.
6725 \*(OP Takes a list of messages and clears their
6730 \*(OP Takes a list of messages and causes the
6732 to forget it has ever used them to train its Bayesian filter.
6733 Unless otherwise noted the
6735 flag of the message is inspected to chose whether a message shall be
6742 \*(OP Takes a list of messages and informs the Bayesian filter of the
6746 This also clears the
6748 flag of the messages in question.
6751 \*(OP Takes a list of messages and rates them using the configured
6752 .Va spam-interface ,
6753 without modifying the messages, but setting their
6755 flag as appropriate; because the spam rating headers are lost the rate
6756 will be forgotten once the mailbox is left.
6757 Refer to the manual section
6759 for the complete picture of spam handling in \*(UA.
6762 \*(OP Takes a list of messages and sets their
6767 \*(OP Takes a list of messages and informs the Bayesian filter of the
6773 flag of the messages in question.
6787 slot for white- and blacklisting header fields.
6790 (to) Takes a message list and types out the first
6792 lines of each message on the users' terminal.
6793 Unless a special selection has been established for the
6797 command, the only header fields that are displayed are
6808 It is possible to apply compression to what is displayed by setting
6810 Messages are decrypted and converted to the terminal character set
6814 (tou) Takes a message list and marks the messages for saving in the
6816 .Sx "secondary mailbox"
6818 \*(UA deviates from the POSIX standard with this command,
6821 command will display the following message instead of the current one.
6826 but also displays header fields which would not pass the
6828 selection, and all visualizable parts of MIME
6829 .Ql multipart/alternative
6833 (t) Takes a message list and types out each message on the users terminal.
6834 The display of message headers is selectable via
6836 For MIME multipart messages, all parts with a content type of
6838 all parts which have a registered MIME type handler (see
6839 .Sx "HTML mail and MIME attachments" )
6840 which produces plain text output, and all
6842 parts are shown, others are hidden except for their headers.
6843 Messages are decrypted and converted to the terminal character set
6847 can be used to display parts which are not displayable as plain text.
6879 \*(OB Superseded by the multiplexer
6882 \*(OB Superseded by the multiplexer
6886 Superseded by the multiplexer
6894 .It Ic unmlsubscribe
6903 Takes a message list and marks each message as not having been read.
6906 Superseded by the multiplexer
6909 \*(OB Superseded by the multiplexer
6912 \*(OB Superseded by the multiplexer
6929 Perform URL percent codec operations on the raw-data argument, rather
6930 according to RFC 3986.
6934 .Sx "Command modifiers" ) ,
6935 and manages the error number
6937 This is a character set agnostic and thus locale dependent operation,
6938 and it may decode bytes which are invalid in the current
6940 \*(ID This command does not know about URLs beside that.
6942 The first argument specifies the operation:
6946 perform plain URL percent en- and decoding, respectively.
6950 perform a slightly modified operation which should be better for
6951 pathnames: it does not allow a tilde
6953 and will neither accept hyphen-minus
6957 as an initial character.
6958 The remains of the line form the URL data which is to be converted.
6959 If the coding operation fails the error number
6962 .Va ^ERR Ns -CANCELED ,
6963 and the unmodified input is used as the result; the error number may
6964 change again due to output or result storage errors.
6967 \*(NQ Edit the values of or create the given variable(s) in the
6969 Boolean variables cannot be edited, and variables can also not be
6974 \*(NQ This command produces the same output as the listing mode of
6978 ity adjustments, but only for the given variables.
6981 \*(OP Takes a message list and verifies each message.
6982 If a message is not a S/MIME signed message,
6983 verification will fail for it.
6984 The verification process checks if the message was signed using a valid
6986 if the message sender's email address matches one of those contained
6987 within the certificate,
6988 and if the message content has been altered.
6995 of \*(UA, as well as the build and running system environment.
6999 .Sx "Command modifiers" ) .
7002 \*(NQ Evaluate arguments according to a given operator.
7003 This is a multiplexer command which can be used to perform signed 64-bit
7004 numeric calculations as well as byte string and string operations.
7005 It uses polish notation, i.e., the operator is the first argument and
7006 defines the number and type, and the meaning of the remaining arguments.
7007 An empty argument is replaced with a 0 if a number is expected.
7011 .Sx "Command modifiers" ) .
7013 The result that is shown in case of errors is always
7015 for usage errors and numeric operations, and the empty string for byte
7016 string and string operations;
7017 if the latter two fail to provide result data for
7019 errors, e.g., when a search operation failed, they also set the
7022 .Va ^ERR Ns -NODATA .
7023 Except when otherwise noted numeric arguments are parsed as signed 64-bit
7024 numbers, and errors will be reported in the error number
7026 as the numeric error
7027 .Va ^ERR Ns -RANGE .
7029 Numeric operations work on one or two signed 64-bit integers.
7030 Numbers prefixed with
7034 are interpreted as hexadecimal (base 16) numbers, whereas
7036 indicates octal (base 8), and
7040 denote binary (base 2) numbers.
7041 It is possible to use any base in between 2 and 36, inclusive, with the
7043 notation, where the base is given as an unsigned decimal number, e.g.,
7045 is a different way of specifying a hexadecimal number.
7046 Unsigned interpretation of a number can be enforced by prefixing a
7048 (case-insensitively), e.g.,
7050 this is not necessary for power-of-two bases (2, 4, 8, 16 and 32),
7051 which will be interpreted as unsigned by default, but it still makes
7052 a difference regarding overflow detection and overflow constant.
7053 It is possible to enforce signed interpretation by (instead) prefixing a
7055 (case-insensitively).
7057 One integer is expected by assignment (equals sign
7059 which does nothing but parsing the argument, thus detecting validity and
7060 possible overflow conditions, and unary not (tilde
7062 which creates the bitwise complement.
7063 Two integers are used by addition (plus sign
7065 subtraction (hyphen-minus
7067 multiplication (asterisk
7071 and modulo (percent sign
7073 as well as for the bitwise operators logical or (vertical bar
7076 bitwise and (ampersand
7079 bitwise xor (circumflex
7081 the bitwise signed left- and right shifts
7084 as well as for the unsigned right shift
7087 Another numeric operation is
7089 which takes a number base in between 2 and 36, inclusive, and will act
7090 on the second number given just the same as what equals sign
7092 does, but the number result will be formatted in the base given.
7094 All numeric operators can be prefixed with a commercial at
7098 this will turn the operation into a saturated one, which means that
7099 overflow errors and division and modulo by zero are no longer reported
7100 via the exit status, but the result will linger at the minimum or
7101 maximum possible value, instead of overflowing (or trapping).
7102 This is true also for the argument parse step.
7103 For the bitwise shifts, the saturated maximum is 63.
7104 Any caught overflow will be reported via the error number
7107 .Va ^ERR Ns -OVERFLOW .
7108 .Bd -literal -offset indent
7109 ? vexpr @- +1 -9223372036854775808
7110 ? echo $?/$!/$^ERRNAME
7113 Character set agnostic string functions have no notion of locale
7114 settings and character sets.
7115 .Bl -hang -width ".It Cm random"
7118 .Sx "Filename transformations"
7121 Generates a random string of the given length, or of
7123 bytes (a constant from
7125 if the value 0 is given; the random string will be base64url encoded
7126 according to RFC 4648, and thus be usable as a (portable) filename.
7129 Byte string operations work on 8-bit bytes and have no notion of locale
7130 settings and character sets, effectively assuming ASCII data.
7131 .Bl -hang -width ".It Cm length"
7133 Queries the length of the given argument.
7135 Calculates the Chris Torek hash of the given argument.
7137 Byte-searches in the first for the second argument.
7138 Shows the resulting 0-based offset shall it have been found.
7142 but works case-insensitively according to the rules of the ASCII
7145 Creates a substring of its first argument.
7146 The second argument is the 0-based starting offset, a negative one
7147 counts from the end;
7148 the optional third argument specifies the length of the desired result,
7149 a negative length leaves off the given number of bytes at the end of the
7150 original string, by default the entire string is used;
7151 this operation tries to work around faulty arguments (set
7153 for error logs), but reports them via the error number
7156 .Va ^ERR Ns -OVERFLOW .
7158 Trim away whitespace characters from both ends of the argument.
7160 Trim away whitespace characters from the begin of the argument.
7162 Trim away whitespace characters from the end of the argument.
7165 String operations work, sufficient support provided, according to the
7166 active user's locale encoding and character set (see
7167 .Sx "Character sets" ) .
7168 .Bl -hang -width ".It Cm regex"
7170 (One-way) Converts the argument to something safely printable on the
7173 \*(OP A string operation that will try to match the first argument with
7174 the regular expression given as the second argument.
7175 If the optional third argument has been given then instead of showing
7176 the match offset a replacement operation is performed: the third
7177 argument is treated as if specified within dollar-single-quote (see
7178 .Sx "Shell-style argument quoting" ) ,
7179 and any occurrence of a positional parameter, e.g.,
7181 is replaced by the corresponding match group of the regular expression:
7182 .Bd -literal -offset indent
7183 ? vput vexpr res regex bananarama \e
7184 (.*)NanA(.*) '\e${1}au\e$2'
7185 ? echo $?/$!/$^ERRNAME: $res
7188 On otherwise identical case-insensitive equivalent to
7190 .Bd -literal -offset indent
7191 ? vput vexpr res ire bananarama \e
7192 (.*)NanA(.*) '\e${1}au\e$2'
7193 ? echo $?/$!/$^ERRNAME: $res
7198 \*(NQ Manage the positional parameter stack (see
7202 If the first argument is
7204 then the positional parameter stack of the current context, or the
7205 global one, if there is none, is cleared.
7208 then the remaining arguments will be used to (re)create the stack,
7209 if the parameter stack size limit is excessed an
7210 .Va ^ERR Ns -OVERFLOW
7213 If the first argument is
7215 a round-trip capable representation of the stack contents is created,
7216 with each quoted parameter separated from each other with the first
7219 and followed by the first character of
7221 if that is not empty and not identical to the first.
7222 If that results in no separation at all a
7228 .Sx "Command modifiers" ) .
7229 I.e., the subcommands
7233 can be used (in conjunction with
7235 to (re)create an argument stack from and to a single variable losslessly.
7236 .Bd -literal -offset indent
7237 ? vpospar set hey, "'you ", world!
7238 ? echo $#: <${1}><${2}><${3}>
7239 ? vput vpospar x quote
7241 ? echo $#: <${1}><${2}><${3}>
7242 ? eval vpospar set ${x}
7243 ? echo $#: <${1}><${2}><${3}>
7247 (v) Takes a message list and invokes the display editor on each message.
7248 Modified contents are discarded unless the
7250 variable is set, and are not used unless the mailbox can be written to
7251 and the editor returns a successful exit status.
7254 (w) For conventional messages the body without all headers is written.
7255 The original message is never marked for deletion in the originating
7257 The output is decrypted and converted to its native format as necessary.
7258 If the output file exists, the text is appended.
7259 If a message is in MIME multipart format its first part is written to
7260 the specified file as for conventional messages, handling of the remains
7261 depends on the execution mode.
7262 No special handling of compressed files is performed.
7264 In interactive mode the user is consecutively asked for the filenames of
7265 the processed parts.
7266 For convience saving of each part may be skipped by giving an empty
7267 value, the same result as writing it to
7269 Shell piping the part content by specifying a leading vertical bar
7271 character for the filename is supported.
7272 Other user input undergoes the usual
7273 .Sx "Filename transformations" ,
7274 including shell pathname wildcard pattern expansions
7276 and shell variable expansion for the message as such, not the individual
7277 parts, and contents of the destination file are overwritten if the file
7280 \*(ID In non-interactive mode any part which does not specify a filename
7281 is ignored, and suspicious parts of filenames of the remaining parts are
7282 URL percent encoded (as via
7284 to prevent injection of malicious character sequences, resulting in
7285 a filename that will be written into the current directory.
7286 Existing files will not be overwritten, instead the part number or
7287 a dot are appended after a number sign
7289 to the name until file creation succeeds (or fails due to other
7293 \*(NQ The sole difference to
7295 is that the new macro is executed in place of the current one, which
7296 will not regain control: all resources of the current macro will be
7298 This implies that any setting covered by
7300 will be forgotten and covered variables will become cleaned up.
7301 If this command is not used from within a
7303 ed macro it will silently be (a more expensive variant of)
7311 \*(NQ \*(UA presents message headers in
7313 fuls as described under the
7316 Without arguments this command scrolls to the next window of messages,
7317 likewise if the argument is
7321 scrolls to the last,
7323 scrolls to the first, and
7328 A number argument prefixed by
7332 indicates that the window is calculated in relation to the current
7333 position, and a number without a prefix specifies an absolute position.
7338 but scrolls to the next or previous window that contains at least one
7344 .Sh "COMMAND ESCAPES"
7345 Here is a summary of the command escapes available in compose mode,
7346 which are used to perform special functions when composing messages.
7347 Command escapes are only recognized at the beginning of lines, and
7348 consist of a trigger (escape) and a command character.
7349 The actual escape character can be set via the internal variable
7351 it defaults to the tilde
7353 Otherwise ignored whitespace characters following the escape character
7354 will prevent a possible addition of the command line to the \*(OPal
7357 Unless otherwise noted all compose mode command escapes ensure proper
7358 updates of the variables which represent the error number
7364 is set they will, unless stated otherwise, error out message compose
7365 mode and cause a progam exit if an operation fails.
7366 It is however possible to place the character hyphen-minus
7368 after (possible whitespace following) the escape character, which has an
7369 effect equivalent to the command modifier
7371 If the \*(OPal key bindings are available it is possible to create
7373 ings specifically for the compose mode.
7374 .Bl -tag -width ".It Ic BaNg"
7377 Insert the string of text in the message prefaced by a single
7379 (If the escape character has been changed,
7380 that character must be doubled instead.)
7382 .It Ic ~! Ar command
7383 Execute the indicated shell
7385 which follows, replacing unescaped exclamation marks with the previously
7386 executed command if the internal variable
7388 is set, then return to the message.
7391 End compose mode and send the message.
7393 .Va on-compose-splice-shell
7395 .Va on-compose-splice ,
7396 in order, will be called when set, after which
7398 will be checked, a set
7399 .Va on-compose-leave
7400 hook will be called,
7404 will be joined in if set,
7406 will be honoured in interactive mode, finally a given
7407 .Va message-inject-tail
7408 will be incorporated, after which the compose mode is left.
7410 .It Ic ~: Ar \*(UA-command Ns \0or Ic ~_ Ar \*(UA-command
7411 Execute the given \*(UA command.
7412 Not all commands, however, are allowed.
7414 .It Ic ~< Ar filename
7418 .It Ic ~<! Ar command
7420 is executed using the shell.
7421 Its standard output is inserted into the message.
7424 Write a summary of command escapes.
7426 .It Ic ~@ Op Ar filename...
7427 Append or edit the list of attachments.
7428 Does not manage the error number
7434 instead if this is a concern).
7437 arguments is expected as shell tokens (see
7438 .Sx "Shell-style argument quoting" ;
7439 token-separating commas are ignored, too), to be
7440 interpreted as documented for the command line option
7442 with the message number exception as below.
7446 arguments the attachment list is edited, entry by entry;
7447 if a filename is left empty, that attachment is deleted from the list;
7448 once the end of the list is reached either new attachments may be
7449 entered or the session can be quit by committing an empty
7452 In non-interactive mode or in batch mode
7454 the list of attachments is effectively not edited but instead recreated;
7455 again, an empty input ends list creation.
7457 For all modes, if a given filename solely consists of the number sign
7459 followed by a valid message number of the currently active mailbox, then
7460 the given message is attached as a
7463 The number sign must be quoted to avoid misinterpretation with the shell
7466 .It Ic ~| Ar command
7467 Pipe the message through the specified filter command.
7468 If the command gives no output or terminates abnormally,
7469 retain the original text of the message.
7472 is often used as a rejustifying filter.
7474 .It Ic ~^ Ar cmd Op Ar subcmd Op Ar arg3 Op Ar arg4
7475 Low-level command meant for scripted message access, i.e., for
7476 .Va on-compose-splice
7478 .Va on-compose-splice-shell .
7479 The used protocol is likely subject to changes, and therefore the
7480 mentioned hooks receive the used protocol version as an initial line.
7481 In general the first field of a response line represents a status code
7482 which specifies whether a command was successful or not, whether result
7483 data is to be expected, and if, the format of the result data.
7484 Does not manage the error number
7488 because errors are reported via the protocol
7489 (hard errors like I/O failures cannot be handled).
7490 This command has read-only access to several virtual pseudo headers in
7491 the \*(UA private namespace, which may not exist (except for the first):
7493 .Bl -tag -compact -width ".It Va BaNg"
7494 .It Ql Mailx-Command:
7495 The name of the command that generates the message, one of
7502 .It Ql Mailx-Raw-To:
7503 .It Ql Mailx-Raw-Cc:
7504 .It Ql Mailx-Raw-Bcc:
7505 Represent the frozen initial state of these headers before any
7506 transformation (e.g.,
7509 .Va recipients-in-cc
7511 .It Ql Mailx-Orig-From:
7512 .It Ql Mailx-Orig-To:
7513 .It Ql Mailx-Orig-Cc:
7514 .It Ql Mailx-Orig-Bcc:
7515 The values of said headers of the original message which has been
7517 .Ic reply , forward , resend .
7520 The status codes are:
7522 .Bl -tag -compact -width ".It Ql 210"
7524 Status ok; the remains of the line are the result.
7526 Status ok; the rest of the line is optionally used for more status.
7527 What follows are lines of result addresses, terminated by an empty line.
7528 The address lines consist of two fields, the first of which is the
7529 plain address, e.g.,
7531 separated by a single ASCII SP space from the second which contains the
7532 unstripped address, even if that is identical to the first field, e.g.,
7533 .Ql (Lovely) Bob <bob@exam.ple> .
7534 All the input, including the empty line, must be consumed before further
7535 commands can be issued.
7537 Status ok; the rest of the line is optionally used for more status.
7538 What follows are lines of furtherly unspecified string content,
7539 terminated by an empty line.
7540 All the input, including the empty line, must be consumed before further
7541 commands can be issued.
7543 Syntax error; invalid command.
7545 Syntax error in parameters or arguments.
7547 Error: an argument fails verification.
7548 For example an invalid address has been specified, or an attempt was
7549 made to modify anything in \*(UA's own namespace.
7551 Error: an otherwise valid argument is rendered invalid due to context.
7552 For example, a second address is added to a header which may consist of
7553 a single address only.
7556 If a command indicates failure then the message will have remained
7558 Most commands can fail with
7560 if required arguments are missing (false command usage).
7561 The following (case-insensitive) commands are supported:
7562 .Bl -hang -width ".It Cm header"
7564 This command allows listing, inspection, and editing of message headers.
7565 Header name case is not normalized, and case-insensitive comparison
7566 should be used when matching names.
7567 The second argument specifies the subcommand to apply, one of:
7568 .Bl -hang -width ".It Cm remove"
7570 Without a third argument a list of all yet existing headers is given via
7572 this command is the default command of
7574 if no second argument has been given.
7575 A third argument restricts output to the given header only, which may
7578 if no such field is defined.
7580 Shows the content of the header given as the third argument.
7581 Dependent on the header type this may respond with
7585 any failure results in
7588 This will remove all instances of the header given as the third
7593 if no such header can be found, and
7595 on \*(UA namespace violations.
7597 This will remove from the header given as the third argument the
7598 instance at the list position (counting from one!) given with the fourth
7603 if the list position argument is not a number or on \*(UA namespace
7606 if no such header instance exists.
7608 Create a new or an additional instance of the header given in the third
7609 argument, with the header body content as given in the fourth argument
7610 (the remains of the line).
7613 if the third argument specifies a free-form header field name that is
7614 invalid, or if body content extraction fails to succeed,
7616 if any extracted address does not pass syntax and/or security checks or
7617 on \*(UA namespace violations, and
7619 to indicate prevention of excessing a single-instance header \(em note that
7621 can be appended to (a space separator will be added automatically first).
7624 is returned upon success, followed by the name of the header and the list
7625 position of the newly inserted instance.
7626 The list position is always 1 for single-instance header fields.
7627 All free-form header fields are managed in a single list.
7630 This command allows listing, removal and addition of message attachments.
7631 The second argument specifies the subcommand to apply, one of:
7632 .Bl -hang -width ".It Cm remove"
7634 List all attachments via
7638 if no attachments exist.
7639 This command is the default command of
7641 if no second argument has been given.
7643 This will remove the attachment given as the third argument, and report
7647 if no such attachment can be found.
7648 If there exists any path component in the given argument, then an exact
7649 match of the path which has been used to create the attachment is used
7650 directly, but if only the basename of that path matches then all
7651 attachments are traversed to find an exact match first, and the removal
7652 occurs afterwards; if multiple basenames match, a
7655 Message attachments are treated as absolute pathnames.
7657 If no path component exists in the given argument, then all attachments
7658 will be searched for
7660 parameter matches as well as for matches of the basename of the path
7661 which has been used when the attachment has been created; multiple
7665 This will interpret the third argument as a number and remove the
7666 attachment at that list position (counting from one!), reporting
7670 if the argument is not a number or
7672 if no such attachment exists.
7674 Adds the attachment given as the third argument, specified exactly as
7675 documented for the command line option
7677 and supporting the message number extension as documented for
7681 upon success, with the index of the new attachment following,
7683 if the given file cannot be opened,
7685 if an on-the-fly performed character set conversion fails, otherwise
7687 is reported; this is also reported if character set conversion is
7688 requested but not available.
7690 This uses the same search mechanism as described for
7692 and prints any known attributes of the first found attachment via
7696 if no such attachment can be found.
7697 The attributes are written as lines of keyword and value tuples, the
7698 keyword being separated from the rest of the line with an ASCII SP space
7701 This uses the same search mechanism as described for
7703 and is otherwise identical to
7705 .It Cm attribute-set
7706 This uses the same search mechanism as described for
7708 and will assign the attribute given as the fourth argument, which is
7709 expected to be a value tuple of keyword and other data, separated by
7710 a ASCII SP space or TAB tabulator character.
7711 If the value part is empty, then the given attribute is removed, or
7712 reset to a default value if existence of the attribute is crucial.
7716 upon success, with the index of the found attachment following,
7718 for message attachments or if the given keyword is invalid, and
7720 if no such attachment can be found.
7721 The following keywords may be used (case-insensitively):
7723 .Bl -hang -compact -width ".It Ql filename"
7725 Sets the filename of the MIME part, i.e., the name that is used for
7726 display and when (suggesting a name for) saving (purposes).
7727 .It Ql content-description
7728 Associate some descriptive information to the attachment's content, used
7729 in favour of the plain filename by some MUAs.
7731 May be used for uniquely identifying MIME entities in several contexts;
7732 this expects a special reference address format as defined in RFC 2045
7735 upon address content verification failure.
7737 Defines the media type/subtype of the part, which is managed
7738 automatically, but can be overwritten.
7739 .It Ql content-disposition
7740 Automatically set to the string
7743 .It Cm attribute-set-at
7744 This uses the same search mechanism as described for
7746 and is otherwise identical to
7753 .Ql Ic ~i Ns \| Va Sign .
7757 .Ql Ic ~i Ns \| Va sign .
7759 .It Ic ~b Ar name ...
7760 Add the given names to the list of blind carbon copy recipients.
7762 .It Ic ~c Ar name ...
7763 Add the given names to the list of carbon copy recipients.
7766 Read the file specified by the
7768 variable into the message.
7771 Invoke the text editor on the message collected so far.
7772 After the editing session is finished,
7773 the user may continue appending text to the message.
7775 .It Ic ~F Ar messages
7776 Read the named messages into the message being sent, including all
7777 message headers and MIME parts.
7778 If no messages are specified, read in the current message, the
7781 .It Ic ~f Ar messages
7782 Read the named messages into the message being sent.
7783 If no messages are specified, read in the current message, the
7785 Strips down the list of header fields according to the
7787 white- and blacklist selection of
7789 For MIME multipart messages,
7790 only the first displayable part is included.
7793 Edit the message header fields
7798 by typing each one in turn and allowing the user to edit the field.
7799 The default values for these fields originate from the
7806 Edit the message header fields
7812 by typing each one in turn and allowing the user to edit the field.
7814 .It Ic ~I Ar variable
7815 Insert the value of the specified variable into the message.
7816 The message remains unaltered if the variable is unset or empty.
7817 Any embedded character sequences
7819 horizontal tabulator and
7821 line feed are expanded in
7823 mode; otherwise the expansion should occur at
7825 time by using the command modifier
7828 .It Ic ~i Ar variable
7829 Insert the value of the specified variable followed by a newline
7830 character into the message.
7831 The message remains unaltered if the variable is unset or empty.
7832 Any embedded character sequences
7834 horizontal tabulator and
7836 line feed are expanded in
7838 mode; otherwise the expansion should occur at
7840 time by using the command modifier
7843 .It Ic ~M Ar messages
7844 Read the named messages into the message being sent,
7847 If no messages are specified, read the current message, the
7850 .It Ic ~m Ar messages
7851 Read the named messages into the message being sent,
7854 If no messages are specified, read the current message, the
7856 Strips down the list of header fields according to the
7858 white- and blacklist selection of
7860 For MIME multipart messages,
7861 only the first displayable part is included.
7864 Display the message collected so far,
7865 prefaced by the message header fields
7866 and followed by the attachment list, if any.
7869 Abort the message being sent,
7870 copying it to the file specified by the
7876 .It Ic ~R Ar filename
7879 but indent each line that has been read by
7882 .It Ic ~r Ar filename Op Ar HERE-delimiter
7883 Read the named file, object to the usual
7884 .Sx "Filename transformations" ,
7885 into the message; if (the expanded)
7889 then standard input is used, e.g., for pasting purposes.
7890 Only in this latter mode
7892 may be given: if it is data will be read in until the given
7894 is seen on a line by itself, and encountering EOF is an error; the
7896 is a required argument in non-interactive mode; if it is single-quote
7897 quoted then the pasted content will not be expanded, \*(ID otherwise
7898 a future version of \*(UA may perform shell-style expansion on the content.
7901 Cause the named string to become the current subject field.
7902 Newline (NL) and carriage-return (CR) bytes are invalid and will be
7903 normalized to space (SP) characters.
7905 .It Ic ~t Ar name ...
7906 Add the given name(s) to the direct recipient list.
7908 .It Ic ~U Ar messages
7909 Read in the given / current message(s) excluding all headers, indented by
7912 .It Ic ~u Ar messages
7913 Read in the given / current message(s), excluding all headers.
7916 Invoke an alternate editor (defined by the
7918 environment variable) on the message collected so far.
7919 Usually, the alternate editor will be a screen editor.
7920 After the editor is quit,
7921 the user may resume appending text to the end of the message.
7923 .It Ic ~w Ar filename
7924 Write the message onto the named file, which is object to the usual
7925 .Sx "Filename transformations" .
7927 the message is appended to it.
7932 except that the message is not saved at all.
7934 .Sh "INTERNAL VARIABLES"
7935 Internal \*(UA variables are controlled via the
7939 commands; prefixing a variable name with the string
7943 has the same effect as using
7949 Creation or editing of variables can be performed in the
7954 will give more insight on the given variable(s), and
7956 when called without arguments, will show a listing of all variables.
7957 Both commands support a more
7960 Some well-known variables will also become inherited from the
7963 implicitly, others can be imported explicitly with the command
7965 and henceforth share said properties.
7967 Two different kinds of internal variables exist, and both of which can
7969 There are boolean variables, which can only be in one of the two states
7973 and value variables with a(n optional) string value.
7974 For the latter proper quoting is necessary upon assignment time, the
7975 introduction of the section
7977 documents the supported quoting rules.
7978 .Bd -literal -offset indent
7979 ? wysh set one=val\e 1 two="val 2" \e
7980 three='val "3"' four=$'val \e'4\e''; \e
7981 varshow one two three four; \e
7982 unset one two three four
7985 Dependent upon the actual option string values may become interpreted as
7986 colour names, command specifications, normal text, etc.
7987 They may be treated as numbers, in which case decimal values are
7988 expected if so documented, but otherwise any numeric format and
7989 base that is valid and understood by the
7991 command may be used, too.
7993 There also exists a special kind of string value, the
7994 .Dq boolean string ,
7995 which must either be a decimal integer (in which case
7999 and any other value is true) or any of the (case-insensitive) strings
8005 for a false boolean and
8011 for a true boolean; a special kind of boolean string is the
8013 which is a boolean string that can optionally be prefixed with the
8014 (case-insensitive) term
8018 which causes prompting of the user in interactive mode, with the given
8019 boolean as the default value.
8021 Variable chains extend a plain
8026 .Ql variable-USER@HOST
8034 had been specified in the contextual Uniform Resource Locator URL, see
8035 .Sx "On URL syntax and credential lookup" .
8036 Even though this mechanism is based on URLs no URL percent encoding may
8037 be applied to neither of
8041 variable chains need to be specified using raw data;
8042 the mentioned section contains examples.
8043 Variables which support chains are explicitly documented as such, and
8044 \*(UA treats the base name of any such variable special, meaning that
8045 users should not create custom names like
8047 in order to avoid false classifications and treatment of such variables.
8048 .Ss "Initial settings"
8049 The standard POSIX 2008/Cor 2-2016 mandates the following initial
8055 .Pf no Va autoprint ,
8069 .Pf no Va ignoreeof ,
8071 .Pf no Va keepsave ,
8073 .Pf no Va outfolder ,
8081 .Pf no Va sendwait ,
8089 Notes: \*(UA does not support the
8091 variable \(en use command line options or
8093 to pass options through to a
8095 And the default global
8097 file, which is loaded unless the
8099 (with according argument) or
8101 command line options have been used, or the
8102 .Ev MAILX_NO_SYSTEM_RC
8103 environment variable is set (see
8104 .Sx "Resource files" )
8105 bends those initial settings a bit, e.g., it sets the variables
8110 to name a few, establishes a default
8112 selection etc., and should thus be taken into account.
8114 .Bl -tag -width ".It Va BaNg"
8117 \*(RO The exit status of the last command, or the
8122 This status has a meaning in the state machine: in conjunction with
8124 any non-0 exit status will cause a program exit, and in
8126 mode any error while loading (any of the) resource files will have the
8130 .Sx "Command modifiers" ,
8131 can be used to instruct the state machine to ignore errors.
8134 \*(RO The current error number
8135 .Pf ( Xr errno 3 ) ,
8136 which is set after an error occurred; it is also available via
8138 and the error name and documentation string can be queried via
8142 \*(ID This machinery is new and the error number is only really usable
8143 if a command explicitly states that it manages the variable
8145 for others errno will be used in case of errors, or
8147 if that is 0: it thus may or may not reflect the real error.
8148 The error number may be set with the command
8152 \*(RO This is a multiplexer variable which performs dynamic expansion of
8153 the requested state or condition, of which there are:
8155 .Bl -tag -compact -width ".It Va BaNg"
8159 .It Va ^ERR , ^ERRDOC , ^ERRNAME
8160 The number, documentation, and name of the current
8162 respectively, which is usually set after an error occurred.
8163 \*(ID This machinery is new and is usually reliable only if a command
8164 explicitly states that it manages the variable
8166 which is effectively identical to
8168 Each of those variables can be suffixed with a hyphen minus followed by
8169 a name or number, in which case the expansion refers to the given error.
8170 Note this is a direct mapping of (a subset of) the system error values:
8171 .Bd -literal -offset indent
8173 eval echo \e$1: \e$^ERR-$1:\e
8174 \e$^ERRNAME-$1: \e$^ERRDOC-$1
8175 vput vexpr i + "$1" 1
8185 \*(RO Expands all positional parameters (see
8187 separated by the first character of the value of
8189 \*(ID The special semantics of the equally named special parameter of the
8191 are not yet supported.
8194 \*(RO Expands all positional parameters (see
8196 separated by a space character.
8197 If placed in double quotation marks, each positional parameter is
8198 properly quoted to expand to a single parameter again.
8201 \*(RO Expands to the number of positional parameters, i.e., the size of
8202 the positional parameter stack in decimal.
8205 \*(RO Inside the scope of a
8209 ed macro this expands to the name of the calling macro, or to the empty
8210 string if the macro is running from top-level.
8211 For the \*(OPal regular expression search and replace operator of
8213 this expands to the entire matching expression.
8214 It represents the program name in global context.
8217 \*(RO Access of the positional parameter stack.
8218 All further parameters can be accessed with this syntax, too, e.g.,
8221 etc.; positional parameters can be shifted off the stack by calling
8223 The parameter stack contains, e.g., the arguments of a
8227 d macro, the matching groups of the \*(OPal regular expression search
8228 and replace expression of
8230 and can be explicitly created or overwritten with the command
8234 \*(RO Is set to the active
8237 .It Va add-file-recipients
8238 \*(BO When file or pipe recipients have been specified,
8239 mention them in the corresponding address fields of the message instead
8240 of silently stripping them from their recipient list.
8241 By default such addressees are not mentioned.
8244 \*(BO Causes only the local part to be evaluated
8245 when comparing addresses.
8248 \*(BO Causes messages saved in the
8250 .Sx "secondary mailbox"
8252 to be appended to the end rather than prepended.
8253 This should always be set.
8256 \*(BO Causes the prompts for
8260 lists to appear after the message has been edited.
8263 \*(BO If set, \*(UA asks for files to attach at the end of each message.
8264 An empty line finalizes the list.
8267 \*(BO Causes the user to be prompted for carbon copy recipients
8268 (at the end of each message if
8275 \*(BO Causes the user to be prompted for blind carbon copy
8276 recipients (at the end of each message if
8283 \*(BO Causes the user to be prompted for confirmation to send the
8284 message or reenter compose mode after having been shown an envelope
8286 This is by default enabled.
8289 \*(BO\*(OP Causes the user to be prompted if the message is to be
8290 signed at the end of each message.
8293 variable is ignored when this variable is set.
8296 \*(BO Causes \*(UA to prompt for the subject upon entering compose mode
8297 unless a subject already exists.
8300 A sequence of characters to display in the
8304 as shown in the display of
8306 each for one type of messages (see
8307 .Sx "Message states" ) ,
8308 with the default being
8311 .Ql NU\ \ *HMFAT+\-$~
8314 variable is set, in the following order:
8316 .Bl -tag -compact -width ".It Ql _"
8338 start of a collapsed thread.
8340 an uncollapsed thread (TODO ignored for now).
8344 classified as possible spam.
8348 Specifies a list of recipients to which a blind carbon copy of each
8349 outgoing message will be sent automatically.
8352 Specifies a list of recipients to which a carbon copy of each outgoing
8353 message will be sent automatically.
8356 \*(BO Causes threads to be collapsed automatically when threaded mode
8362 \*(BO Enable automatic
8364 ing of a(n existing)
8370 commands, e.g., the message that becomes the new
8372 is shown automatically, as via
8378 Causes sorted mode (see the
8380 command) to be entered automatically with the value of this variable as
8381 sorting method when a folder is opened, e.g.,
8382 .Ql set autosort=thread .
8385 \*(BO Enables the substitution of all not (reverse-solidus) escaped
8388 characters by the contents of the last executed command for the
8390 shell escape command and
8392 one of the compose mode
8393 .Sx "COMMAND ESCAPES" .
8394 If this variable is not set no reverse solidus stripping is performed.
8397 \*(OP Terminals generate multi-byte sequences for certain forms of
8398 input, for example for function and other special keys.
8399 Some terminals however do not write these multi-byte sequences as
8400 a whole, but byte-by-byte, and the latter is what \*(UA actually reads.
8401 This variable specifies the timeout in milliseconds that the MLE (see
8402 .Sx "On terminal control and line editor" )
8403 waits for more bytes to arrive unless it considers a sequence
8408 \*(BO Sets some cosmetical features to traditional BSD style;
8409 has the same affect as setting
8411 and all other variables prefixed with
8413 it also changes the behaviour of
8415 (which does not exist in BSD).
8418 \*(BO Changes the letters shown in the first column of a header
8419 summary to traditional BSD style.
8422 \*(BO Changes the display of columns in a header summary to traditional
8426 \*(BO Changes some informational messages to traditional BSD style.
8431 field to appear immediately after the
8433 field in message headers and with the
8435 .Sx "COMMAND ESCAPES" .
8438 .It Va build-os , build-osenv
8439 \*(RO The operating system \*(UA has been build for, usually taken from
8445 respectively, the former being lowercased.
8448 The value that should appear in the
8452 MIME header fields when no character set conversion of the message data
8454 This defaults to US-ASCII, and the chosen character set should be
8455 US-ASCII compatible.
8458 \*(OP The default 8-bit character set that is used as an implicit last
8459 member of the variable
8461 This defaults to UTF-8 if character set conversion capabilities are
8462 available, and to ISO-8859-1 otherwise, in which case the only supported
8465 and this variable is effectively ignored.
8466 Refer to the section
8467 .Sx "Character sets"
8468 for the complete picture of character set conversion in \*(UA.
8470 .It Va charset-unknown-8bit
8471 \*(OP RFC 1428 specifies conditions when internet mail gateways shall
8473 the content of a mail message by using a character set with the name
8475 Because of the unclassified nature of this character set \*(UA will not
8476 be capable to convert this character set to any other character set.
8477 If this variable is set any message part which uses the character set
8479 is assumed to really be in the character set given in the value,
8480 otherwise the (final) value of
8482 is used for this purpose.
8484 This variable will also be taken into account if a MIME type (see
8485 .Sx "The mime.types files" )
8486 of a MIME message part that uses the
8488 character set is forcefully treated as text.
8491 The default value for the
8495 .It Va colour-disable
8496 \*(BO\*(OP Forcefully disable usage of colours.
8497 Also see the section
8498 .Sx "Coloured display" .
8501 \*(BO\*(OP Whether colour shall be used for output that is paged through
8503 Note that pagers may need special command line options, e.g.,
8511 in order to support colours.
8512 Often doing manual adjustments is unnecessary since \*(UA may perform
8513 adjustments dependent on the value of the environment variable
8515 (see there for more).
8518 .It Va contact-mail , contact-web
8519 \*(RO Addresses for contact per email and web, respectively, e.g., for
8520 bug reports, suggestions, or help regarding \*(UA.
8521 The former can be used directly:
8522 .Ql ? Ns \| Ic eval Ns \| Ic mail Ns \| $contact-mail .
8525 In a(n interactive) terminal session, then if this valued variable is
8526 set it will be used as a threshold to determine how many lines the given
8527 output has to span before it will be displayed via the configured
8531 can be forced by setting this to the value
8533 setting it without a value will deduce the current height of the
8534 terminal screen to compute the threshold (see
8539 \*(ID At the moment this uses the count of lines of the message in wire
8540 format, which, dependent on the
8542 of the message, is unrelated to the number of display lines.
8543 (The software is old and historically the relation was a given thing.)
8546 Define a set of custom headers to be injected into newly composed or
8548 A custom header consists of the field name followed by a colon
8550 and the field content body.
8551 Standard header field names cannot be overwritten by a custom header.
8552 Different to the command line option
8554 the variable value is interpreted as a comma-separated list of custom
8555 headers: to include commas in header bodies they need to become escaped
8556 with reverse solidus
8558 Headers can be managed more freely in compose mode via
8561 .Dl ? set customhdr='Hdr1: Body1-1\e, Body1-2, Hdr2: Body2'
8564 Controls the appearance of the
8566 date and time format specification of the
8568 variable, that is used, for example, when viewing the summary of
8570 If unset, then the local receiving date is used and displayed
8571 unformatted, otherwise the message sending
8573 It is possible to assign a
8575 format string and control formatting, but embedding newlines via the
8577 format is not supported, and will result in display errors.
8579 .Ql %Y-%m-%d %H:%M ,
8581 .Va datefield-markout-older .
8583 .It Va datefield-markout-older
8584 Only used in conjunction with
8586 Can be used to create a visible distinction of messages dated more than
8587 a day in the future, or older than six months, a concept comparable to the
8589 option of the POSIX utility
8591 If set to the empty string, then the plain month, day and year of the
8593 will be displayed, but a
8595 format string to control formatting can be assigned.
8600 \*(BO Enables debug messages and obsoletion warnings, disables the
8601 actual delivery of messages and also implies
8606 .It Va disposition-notification-send
8608 .Ql Disposition-Notification-To:
8609 header (RFC 3798) with the message.
8615 \*(BO When dot is set, a period
8617 on a line by itself during message input in (interactive or batch
8619 compose mode will be treated as end-of-message (in addition to the
8620 normal end-of-file condition).
8621 This behaviour is implied in
8626 .It Va dotlock-ignore-error
8627 \*(BO\*(OP Synchronization of mailboxes which \*(UA treats as
8629 .Sx "primary system mailbox" Ns
8630 es (see, e.g., the notes on
8631 .Sx "Filename transformations" ,
8632 as well as the documentation of
8634 will be protected with so-called dotlock files\(emthe traditional mail
8635 spool file locking method\(emin addition to system file locking.
8636 Because \*(UA ships with a privilege-separated dotlock creation program
8637 that should always be able to create such a dotlock file there is no
8638 good reason to ignore dotlock file creation errors, and thus these are
8639 fatal unless this variable is set.
8642 \*(BO If this variable is set then the editor is started automatically
8643 when a message is composed in interactive mode, as if the
8645 .Sx "COMMAND ESCAPES"
8649 variable is implied for this automatically spawned editor session.
8652 \*(BO When a message is edited while being composed,
8653 its header is included in the editable text.
8656 \*(BO When entering interactive mode \*(UA normally writes
8657 .Dq \&No mail for user
8658 and exits immediately if a mailbox is empty or does not exist.
8659 If this variable is set \*(UA starts even with an empty or non-existent
8660 mailbox (the latter behaviour furtherly depends upon
8665 \*(BO Let each command with a non-0 exit status, including every
8669 s a non-0 status, cause a program exit unless prefixed by
8672 .Sx "Command modifiers" ) .
8674 .Sx "COMMAND ESCAPES" ,
8675 but which use a different modifier for ignoring the error.
8676 Please refer to the variable
8678 for more on this topic.
8681 The first character of this value defines the escape character for
8682 .Sx "COMMAND ESCAPES"
8684 The default value is the character tilde
8686 If set to the empty string, command escapes are disabled.
8689 If not set then file and command pipeline targets are not allowed,
8690 and any such address will be filtered out, giving a warning message.
8691 If set without a value then all possible recipient address
8692 specifications will be accepted \(en see the section
8693 .Sx "On sending mail, and non-interactive mode"
8695 To accept them, but only in interactive mode, or when tilde commands
8696 were enabled explicitly by using one of the command line options
8700 set this to the (case-insensitive) value
8702 (it actually acts like
8703 .Ql restrict,-all,+name,+addr ,
8704 so that care for ordering issues must be taken) .
8706 In fact the value is interpreted as a comma-separated list of values.
8709 then the existence of disallowed specifications is treated as a hard
8710 send error instead of only filtering them out.
8711 The remaining values specify whether a specific type of recipient
8712 address specification is allowed (optionally indicated by a plus sign
8714 prefix) or disallowed (prefixed with a hyphen-minus
8718 addresses all possible address specifications,
8722 command pipeline targets,
8724 plain user names and (MTA) aliases and
8727 These kind of values are interpreted in the given order, so that
8728 .Ql restrict,\:fail,\:+file,\:-all,\:+addr
8729 will cause hard errors for any non-network address recipient address
8730 unless \*(UA is in interactive mode or has been started with the
8734 command line option; in the latter case(s) any address may be used, then.
8736 Historically invalid network addressees are silently stripped off.
8737 To change this so that any encountered invalid email address causes
8738 a hard error it must be ensured that
8740 is an entry in the above list.
8741 Setting this automatically enables network addressees
8742 (it actually acts like
8743 .Ql failinvaddr,+addr ,
8744 so that care for ordering issues must be taken) .
8747 Unless this variable is set additional
8749 (Mail-Transfer-Agent)
8750 arguments from the command line, as can be given after a
8752 separator, results in a program termination with failure status.
8753 The same can be accomplished by using the special (case-insensitive) value
8755 A lesser strict variant is the otherwise identical
8757 which does accept such arguments in interactive mode, or if tilde
8758 commands were enabled explicitly by using one of the command line options
8762 The empty value will allow unconditional usage.
8765 \*(RO String giving a list of optional features.
8766 Features are preceded with a plus sign
8768 if they are available, with a hyphen-minus
8771 The output of the command
8773 will include this information in a more pleasant output.
8776 \*(BO This setting reverses the meanings of a set of reply commands,
8777 turning the lowercase variants, which by default address all recipients
8778 included in the header of a message
8779 .Pf ( Ic reply , respond , followup )
8780 into the uppercase variants, which by default address the sender only
8781 .Pf ( Ic Reply , Respond , Followup )
8784 .Ic replysender , respondsender , followupsender
8786 .Ic replyall , respondall , followupall
8787 are not affected by the current setting of
8791 The default path under which mailboxes are to be saved:
8792 filenames that begin with the plus sign
8794 will have the plus sign replaced with the value of this variable if set,
8795 otherwise the plus sign will remain unchanged when doing
8796 .Sx "Filename transformations" ;
8799 for more on this topic.
8800 The value supports a subset of transformations itself, and if the
8801 non-empty value does not start with a solidus
8805 will be prefixed automatically.
8806 Once the actual value is evaluated first, the internal variable
8808 will be updated for caching purposes.
8810 .It Va folder-hook-FOLDER , Va folder-hook
8813 macro which will be called whenever a
8816 The macro will also be invoked when new mail arrives,
8817 but message lists for commands executed from the macro
8818 only include newly arrived messages then.
8820 are activated by default in a folder hook, causing the covered settings
8821 to be reverted once the folder is left again.
8823 The specialized form will override the generic one if
8825 matches the file that is opened.
8826 Unlike other folder specifications, the fully expanded name of a folder,
8827 without metacharacters, is used to avoid ambiguities.
8828 However, if the mailbox resides under
8832 specification is tried in addition, e.g., if
8836 (and thus relative to the user's home directory) then
8837 .Pa /home/usr1/mail/sent
8839 .Ql folder-hook-/home/usr1/mail/sent
8840 first, but then followed by
8841 .Ql folder-hook-+sent .
8843 .It Va folder-resolved
8844 \*(RO Set to the fully resolved path of
8846 once that evaluation has occurred; rather internal.
8849 \*(BO Controls whether a
8850 .Ql Mail-Followup-To:
8851 header is generated when sending messages to known mailing lists.
8853 .Va followup-to-honour
8855 .Ic mlist , mlsubscribe , reply
8859 .It Va followup-to-honour
8861 .Ql Mail-Followup-To:
8862 header is honoured when group-replying to a message via
8866 This is a quadoption; if set without a value it defaults to
8875 .It Va forward-as-attachment
8876 \*(BO Original messages are normally sent as inline text with the
8879 and only the first part of a multipart message is included.
8880 With this setting enabled messages are sent as unmodified MIME
8882 attachments with all of their parts included.
8884 .It Va forward-inject-head
8885 The string to put before the text of a message with the
8887 command instead of the default
8888 .Dq -------- Original Message -------- .
8889 No heading is put if it is set to the empty string.
8890 This variable is ignored if the
8891 .Va forward-as-attachment
8895 The address (or a list of addresses) to put into the
8897 field of the message header, quoting RFC 5322:
8898 the author(s) of the message, that is, the mailbox(es) of the person(s)
8899 or system(s) responsible for the writing of the message.
8900 According to that RFC setting the
8902 variable is required if
8904 contains more than one address.
8907 ing to messages these addresses are handled as if they were in the
8911 If a file-based MTA is used, then
8913 (or, if that contains multiple addresses,
8915 can nonetheless be enforced to appear as the envelope sender address at
8916 the MTA protocol level (the RFC 5321 reverse-path), either by using the
8918 command line option (with an empty argument; see there for the complete
8919 picture on this topic), or by setting the internal variable
8920 .Va r-option-implicit .
8922 If the machine's hostname is not valid at the Internet (for example at
8923 a dialup machine) then either this variable or
8927 adds even more fine-tuning capabilities with
8928 .Va smtp-hostname ) ,
8929 have to be set; if so the message and MIME part related unique ID fields
8933 will be created (except when disallowed by
8934 .Va message-id-disable
8939 \*(BO Due to historical reasons comments and name parts of email
8940 addresses are removed by default when sending mail, replying to or
8941 forwarding a message.
8942 If this variable is set such stripping is not performed.
8944 \*(OB Predecessor of
8945 .Va forward-inject-head .
8948 \*(BO Causes the header summary to be written at startup and after
8949 commands that affect the number of messages or the order of messages in
8954 mode a header summary will also be displayed on folder changes.
8955 The command line option
8961 A format string to use for the summary of
8963 similar to the ones used for
8966 Format specifiers in the given string start with a percent sign
8968 and may be followed by an optional decimal number indicating the field
8969 width \(em if that is negative, the field is to be left-aligned.
8970 Valid format specifiers are:
8972 .Bl -tag -compact -width ".It Ql _%%_"
8974 A plain percent sign.
8977 a space character but for the current message
8979 for which it expands to
8982 .Va headline-plain ) .
8985 a space character but for the current message
8987 for which it expands to
8990 .Va headline-plain ) .
8992 \*(OP The spam score of the message, as has been classified via the
8995 Shows only a replacement character if there is no spam support.
8997 Message attribute character (status flag); the actual content can be
9001 The date found in the
9003 header of the message when
9005 is set (the default), otherwise the date when the message was received.
9006 Formatting can be controlled by assigning a
9011 The indenting level in threaded mode.
9013 The address of the message sender.
9015 The message thread tree structure.
9016 (Note that this format does not support a field width, and honours
9017 .Va headline-plain . )
9019 The number of lines of the message, if available.
9023 The number of octets (bytes) in the message, if available.
9025 Message subject (if any).
9027 Message subject (if any) in double quotes.
9029 Message recipient flags: is the addressee of the message a known or
9030 subscribed mailing list \(en see
9035 The position in threaded/sorted order.
9039 .Ql %>\&%a\&%m\ %-18f\ %16d\ %4l/%\-5o\ %i%-s ,
9041 .Ql %>\&%a\&%m\ %20-f\ \ %16d\ %3l/%\-5o\ %i%-S
9051 .It Va headline-bidi
9052 Bidirectional text requires special treatment when displaying headers,
9053 because numbers (in dates or for file sizes etc.) will not affect the
9054 current text direction, in effect resulting in ugly line layouts when
9055 arabic or other right-to-left text is to be displayed.
9056 On the other hand only a minority of terminals is capable to correctly
9057 handle direction changes, so that user interaction is necessary for
9059 Note that extended host system support is required nonetheless, e.g.,
9060 detection of the terminal character set is one precondition;
9061 and this feature only works in an Unicode (i.e., UTF-8) locale.
9063 In general setting this variable will cause \*(UA to encapsulate text
9064 fields that may occur when displaying
9066 (and some other fields, like dynamic expansions in
9068 with special Unicode control sequences;
9069 it is possible to fine-tune the terminal support level by assigning
9071 no value (or any value other than
9076 will make \*(UA assume that the terminal is capable to properly deal
9077 with Unicode version 6.3, in which case text is embedded in a pair of
9078 U+2068 (FIRST STRONG ISOLATE) and U+2069 (POP DIRECTIONAL ISOLATE)
9080 In addition no space on the line is reserved for these characters.
9082 Weaker support is chosen by using the value
9084 (Unicode 6.3, but reserve the room of two spaces for writing the control
9085 sequences onto the line).
9090 select Unicode 1.1 support (U+200E, LEFT-TO-RIGHT MARK); the latter
9091 again reserves room for two spaces in addition.
9093 .It Va headline-plain
9094 \*(BO On Unicode (UTF-8) aware terminals enhanced graphical symbols are
9095 used by default for certain entries of
9097 If this variable is set only basic US-ASCII symbols will be used.
9100 \*(OP If a line editor is available then this can be set to
9101 name the (expandable) path of the location of a permanent
9106 .It Va history-gabby
9107 \*(BO\*(OP Add more entries to the
9109 as is normally done.
9111 .It Va history-gabby-persist
9112 \*(BO\*(OP \*(UA's own MLE will not save the additional
9114 entries in persistent storage unless this variable is set.
9115 On the other hand it will not loose the knowledge of whether
9116 a persistent entry was gabby or not.
9121 \*(OP Setting this variable imposes a limit on the number of concurrent
9124 If set to the value 0 then no further history entries will be added,
9125 and loading and incorporation of the
9127 upon program startup can also be suppressed by doing this.
9128 Runtime changes will not be reflected, but will affect the number of
9129 entries saved to permanent storage.
9132 \*(BO This setting controls whether messages are held in the system
9134 and it is set by default.
9137 Used instead of the value obtained from
9141 as the hostname when expanding local addresses, e.g., in
9144 .Sx "On sending mail, and non-interactive mode" ) .
9147 or this variable Is set the message and MIME part related unique ID fields
9151 will be created (except when disallowed by
9152 .Va message-id-disable
9155 If the \*(OPal IDNA support is available (see
9157 variable assignment is aborted when a necessary conversion fails.
9159 Setting it to the empty string will cause the normal hostname to be
9160 used, but nonetheless enables creation of said ID fields.
9161 \*(IN in conjunction with the built-in SMTP
9164 also influences the results:
9165 one should produce some test messages with the desired combination of
9173 \*(BO\*(OP Can be used to turn off the automatic conversion of domain
9174 names according to the rules of IDNA (internationalized domain names
9176 Since the IDNA code assumes that domain names are specified with the
9178 character set, an UTF-8 locale charset is required to represent all
9179 possible international domain names (before conversion, that is).
9182 The input field separator that is used (\*(ID by some functions) to
9183 determine where to split input data.
9185 .Bl -tag -compact -width ".It MMM"
9187 Unsetting is treated as assigning the default value,
9190 If set to the empty value, no field splitting will be performed.
9192 If set to a non-empty value, all whitespace characters are extracted
9193 and assigned to the variable
9197 .Bl -tag -compact -width ".It MMM"
9200 will be ignored at the beginning and end of input.
9201 Diverging from POSIX shells default whitespace is removed in addition,
9202 which is owed to the entirely different line content extraction rules.
9204 Each occurrence of a character of
9206 will cause field-splitting, any adjacent
9208 characters will be skipped.
9212 \*(RO Automatically deduced from the whitespace characters in
9216 \*(BO Ignore interrupt signals from the terminal while entering
9217 messages; instead echo them as
9219 characters and discard the current line.
9222 \*(BO Ignore end-of-file conditions
9223 .Pf ( Ql control-D )
9224 in compose mode on message input and in interactive command input.
9225 If set an interactive command input session can only be left by
9226 explicitly using one of the commands
9230 and message input in compose mode can only be terminated by entering
9233 on a line by itself or by using the
9235 .Sx "COMMAND ESCAPES" ;
9236 Setting this implies the behaviour that
9243 If this is set to a non-empty string it will specify the users
9245 .Sx "primary system mailbox" ,
9248 and the system-dependent default, and (thus) be used to replace
9251 .Sx "Filename transformations" ;
9254 for more on this topic.
9255 The value supports a subset of transformations itself.
9262 .Sx "COMMAND ESCAPES"
9265 option for indenting messages,
9266 in place of the POSIX mandated default tabulator character
9272 \*(BO If set, an empty
9274 .Sx "primary system mailbox"
9275 file is not removed.
9276 Note that, in conjunction with
9278 mode any empty file will be removed unless this variable is set.
9279 This may improve the interoperability with other mail user agents
9280 when using a common folder directory, and prevents malicious users
9281 from creating fake mailboxes in a world-writable spool directory.
9282 \*(ID Only local regular (MBOX) files are covered, Maildir or other
9283 mailbox types will never be removed, even if empty.
9285 .It Va keep-content-length
9286 \*(BO When (editing messages and) writing MBOX mailbox files \*(UA can
9291 header fields that some MUAs generate by setting this variable.
9292 Since \*(UA does neither use nor update these non-standardized header
9293 fields (which in itself shows one of their conceptual problems),
9294 stripping them should increase interoperability in between MUAs that
9295 work with with same mailbox files.
9296 Note that, if this is not set but
9297 .Va writebackedited ,
9298 as below, is, a possibly performed automatic stripping of these header
9299 fields already marks the message as being modified.
9300 \*(ID At some future time \*(UA will be capable to rewrite and apply an
9302 to modified messages, and then those fields will be stripped silently.
9305 \*(BO When a message is saved it is usually discarded from the
9306 originating folder when \*(UA is quit.
9307 This setting causes all saved message to be retained.
9309 .It Va line-editor-disable
9310 \*(BO Turn off any enhanced line editing capabilities (see
9311 .Sx "On terminal control and line editor"
9314 .It Va line-editor-no-defaults
9315 \*(BO\*(OP Do not establish any default key binding.
9318 Error log message prefix string
9319 .Pf ( Ql "\*(uA: " ) .
9321 .It Va mailbox-display
9322 \*(RO The name of the current mailbox
9324 possibly abbreviated for display purposes.
9326 .It Va mailbox-resolved
9327 \*(RO The fully resolved path of the current mailbox.
9329 .It Va mailx-extra-rc
9330 An additional startup file that is loaded as the last of the
9331 .Sx "Resource files" .
9332 Use this file for commands that are not understood by other POSIX
9334 implementations, i.e., mostly anything which is not covered by
9335 .Sx "Initial settings" .
9338 \*(BO When a message is replied to and this variable is set,
9339 it is marked as having been
9342 .Sx "Message states" .
9345 \*(BO When opening MBOX mailbox databases \*(UA by default uses tolerant
9346 POSIX rules for detecting message boundaries (so-called
9348 lines) due to compatibility reasons, instead of the stricter rules that
9349 have been standardized in RFC 4155.
9350 This behaviour can be switched to the stricter RFC 4155 rules by
9351 setting this variable.
9352 (This is never necessary for any message newly generated by \*(UA,
9353 it only applies to messages generated by buggy or malicious MUAs, or may
9354 occur in old MBOX databases: \*(UA itself will choose a proper
9356 to avoid false interpretation of
9358 content lines in the MBOX database.)
9360 This may temporarily be handy when \*(UA complains about invalid
9362 lines when opening a MBOX: in this case setting this variable and
9363 re-opening the mailbox in question may correct the result.
9364 If so, copying the entire mailbox to some other file, as in
9365 .Ql copy * SOME-FILE ,
9366 will perform proper, all-compatible
9368 quoting for all detected messages, resulting in a valid MBOX mailbox.
9369 Finally the variable can be unset again:
9370 .Bd -literal -offset indent
9372 localopts yes; wysh set mbox-rfc4155;\e
9373 wysh File "${1}"; eval copy * "${2}"
9375 call mboxfix /tmp/bad.mbox /tmp/good.mbox
9379 \*(BO Internal development variable.
9381 .It Va message-id-disable
9382 \*(BO By setting this variable the generation of
9386 message and MIME part headers can be completely suppressed, effectively
9387 leaving this task up to the
9389 (Mail-Transfer-Agent) or the SMTP server.
9390 Note that according to RFC 5321 a SMTP server is not required to add this
9391 field by itself, so it should be ensured that it accepts messages without
9394 .It Va message-inject-head
9395 A string to put at the beginning of each new message, followed by a newline.
9396 \*(OB The escape sequences tabulator
9400 are understood (use the
9404 ting the variable(s) instead).
9406 .It Va message-inject-tail
9407 A string to put at the end of each new message, followed by a newline.
9408 \*(OB The escape sequences tabulator
9412 are understood (use the
9416 ting the variable(s) instead).
9419 \*(BO Usually, when an
9421 expansion contains the sender, the sender is removed from the expansion.
9422 Setting this option suppresses these removals.
9427 option to be passed through to the
9429 (Mail-Transfer-Agent); though most of the modern MTAs no longer document
9430 this flag, no MTA is known which does not support it (for historical
9433 .It Va mime-allow-text-controls
9434 \*(BO When sending messages, each part of the message is MIME-inspected
9435 in order to classify the
9438 .Ql Content-Transfer-Encoding:
9441 that is required to send this part over mail transport, i.e.,
9442 a computation rather similar to what the
9444 command produces when used with the
9448 This classification however treats text files which are encoded in
9449 UTF-16 (seen for HTML files) and similar character sets as binary
9450 octet-streams, forcefully changing any
9455 .Ql application/octet-stream :
9456 If that actually happens a yet unset charset MIME parameter is set to
9458 effectively making it impossible for the receiving MUA to automatically
9459 interpret the contents of the part.
9461 If this variable is set, and the data was unambiguously identified as
9462 text data at first glance (by a
9466 file extension), then the original
9468 will not be overwritten.
9470 .It Va mime-alternative-favour-rich
9471 \*(BO If this variable is set then rich MIME alternative parts (e.g.,
9472 HTML) will be preferred in favour of included plain text versions when
9473 displaying messages, provided that a handler exists which produces
9474 output that can be (re)integrated into \*(UA's normal visual display.
9475 (E.g., at the time of this writing some newsletters ship their full
9476 content only in the rich HTML part, whereas the plain text part only
9477 contains topic subjects.)
9479 .It Va mime-counter-evidence
9482 field is used to decide how to handle MIME parts.
9483 Some MUAs, however, do not use
9484 .Sx "The mime.types files"
9486 .Sx "HTML mail and MIME attachments" )
9487 or a similar mechanism to correctly classify content, but specify an
9488 unspecific MIME type
9489 .Pf ( Ql application/octet-stream )
9490 even for plain text attachments.
9491 If this variable is set then \*(UA will try to re-classify such MIME
9492 message parts, if possible, for example via a possibly existing
9493 attachment filename.
9494 A non-empty value may also be given, in which case a number is expected,
9495 actually a carrier of bits, best specified as a binary value, e.g.,
9498 .Bl -bullet -compact
9500 If bit two is set (counting from 1, decimal 2) then the detected
9502 will be carried along with the message and be used for deciding which
9503 MIME handler is to be used, for example;
9504 when displaying such a MIME part the part-info will indicate the
9505 overridden content-type by showing a plus sign
9508 If bit three is set (decimal 4) then the counter-evidence is always
9509 produced and a positive result will be used as the MIME type, even
9510 forcefully overriding the parts given MIME type.
9512 If bit four is set (decimal 8) as a last resort the actual content of
9513 .Ql application/octet-stream
9514 parts will be inspected, so that data which looks like plain text can be
9516 This mode is even more relaxed when data is to be displayed to the user
9517 or used as a message quote (data consumers which mangle data for display
9518 purposes, which includes masking of control characters, for example).
9521 .It Va mime-encoding
9523 .Ql Content-Transfer-Encoding
9524 to use in outgoing text messages and message parts, where applicable.
9525 (7-bit clean text messages are sent as-is, without a transfer encoding.)
9528 .Bl -tag -compact -width ".It Ql _%%_"
9531 8-bit transport effectively causes the raw data be passed through
9532 unchanged, but may cause problems when transferring mail messages over
9533 channels that are not ESMTP (RFC 1869) compliant.
9534 Also, several input data constructs are not allowed by the
9535 specifications and may cause a different transfer-encoding to be used.
9536 .It Ql quoted-printable
9538 Quoted-printable encoding is 7-bit clean and has the property that ASCII
9539 characters are passed through unchanged, so that an english message can
9540 be read as-is; it is also acceptable for other single-byte locales that
9541 share many characters with ASCII, like, e.g., ISO-8859-1.
9542 The encoding will cause a large overhead for messages in other character
9543 sets: e.g., it will require up to twelve (12) bytes to encode a single
9544 UTF-8 character of four (4) bytes.
9545 It is the default encoding.
9547 .Pf (Or\0 Ql b64 . )
9548 This encoding is 7-bit clean and will always be used for binary data.
9549 This encoding has a constant input:output ratio of 3:4, regardless of
9550 the character set of the input data it will encode three bytes of input
9551 to four bytes of output.
9552 This transfer-encoding is not human readable without performing
9556 .It Va mimetypes-load-control
9557 Can be used to control which of
9558 .Sx "The mime.types files"
9559 are loaded: if the letter
9561 is part of the option value, then the user's personal
9563 file will be loaded (if it exists); likewise the letter
9565 controls loading of the system wide
9566 .Pa /etc/mime.types ;
9567 directives found in the user file take precedence, letter matching is
9569 If this variable is not set \*(UA will try to load both files.
9570 Incorporation of the \*(UA-built-in MIME types cannot be suppressed,
9571 but they will be matched last (the order can be listed via
9574 More sources can be specified by using a different syntax: if the
9575 value string contains an equals sign
9577 then it is instead parsed as a comma-separated list of the described
9580 pairs; the given filenames will be expanded and loaded, and their
9581 content may use the extended syntax that is described in the section
9582 .Sx "The mime.types files" .
9583 Directives found in such files always take precedence (are prepended to
9584 the MIME type cache).
9587 To choose an alternate Mail-Transfer-Agent, set this option to either
9588 the full pathname of an executable (optionally prefixed with the protocol
9590 or \*(OPally a SMTP a.k.a. SUBMISSION protocol URL, e.g., \*(IN
9592 .Dl smtps?://[user[:password]@]server[:port]
9595 .Ql [smtp://]server[:port] . )
9596 The default has been chosen at compile time.
9597 All supported data transfers are executed in child processes, which
9598 run asynchronously and without supervision unless either the
9603 If such a child receives a TERM signal, it will abort and
9609 For a file-based MTA it may be necessary to set
9611 in in order to choose the right target of a modern
9614 It will be passed command line arguments from several possible sources:
9617 if set, from the command line if given and the variable
9620 Argument processing of the MTA will be terminated with a
9624 The otherwise occurring implicit usage of the following MTA command
9625 line arguments can be disabled by setting the boolean variable
9626 .Va mta-no-default-arguments
9627 (which will also disable passing
9631 (for not treating a line with only a dot
9633 character as the end of input),
9641 variable is set); in conjunction with the
9643 command line option \*(UA will also (not) pass
9648 \*(OPally \*(UA can send mail over SMTP a.k.a. SUBMISSION network
9649 connections to a single defined smart host by setting this variable to
9650 a SMTP or SUBMISSION URL (see
9651 .Sx "On URL syntax and credential lookup" ) .
9652 An authentication scheme can be specified via the variable chain
9654 Encrypted network connections are \*(OPally available, the section
9655 .Sx "Encrypted network communication"
9656 should give an overview and provide links to more information on this.
9657 Note that with some mail providers it may be necessary to set the
9659 variable in order to use a specific combination of
9664 \*(UA also supports forwarding of all network traffic over a specified
9666 The following SMTP variants may be used:
9669 The plain SMTP protocol (RFC 5321) that normally lives on the
9670 server port 25 and requires setting the
9671 .Va smtp-use-starttls
9672 variable to enter a SSL/TLS encrypted session state.
9673 Assign a value like \*(IN
9674 .Ql smtp://[user[:password]@]server[:port]
9676 .Ql smtp://server[:port] )
9677 to choose this protocol.
9679 The so-called SMTPS which is supposed to live on server port 465
9680 and is automatically SSL/TLS secured.
9681 Unfortunately it never became a standardized protocol and may thus not
9682 be supported by your hosts network service database
9683 \(en in fact the port number has already been reassigned to other
9686 SMTPS is nonetheless a commonly offered protocol and thus can be
9687 chosen by assigning a value like \*(IN
9688 .Ql smtps://[user[:password]@]server[:port]
9690 .Ql smtps://server[:port] ) ;
9691 due to the mentioned problems it is usually necessary to explicitly
9696 The SUBMISSION protocol (RFC 6409) lives on server port 587 and
9697 is identically to the SMTP protocol from \*(UA's point of view;
9699 .Va smtp-use-starttls
9700 to enter a SSL/TLS secured session state; e.g., \*(IN
9701 .Ql submission://[user[:password]@]server[:port] .
9703 The SUBMISSIONS protocol (RFC 8314) that lives on server port 465 and is
9704 SSL/TLS secured by default.
9705 It can be chosen by assigning a value like \*(IN
9706 .Ql submissions://[user[:password]@]server[:port] .
9707 Due to the problems mentioned for SMTPS above and the fact that
9708 SUBMISSIONS is new and a successor that lives on the same port as the
9709 historical engineering mismanagement named SMTPS, it is usually
9710 necessary to explicitly specify the port as
9714 .It Va mta-arguments
9715 Arguments to pass through to a file-based
9717 can be given via this variable, which is parsed according to
9718 .Sx "Shell-style argument quoting"
9719 into an array of arguments, and which will be joined onto MTA options
9720 from other sources, and then passed individually to the MTA:
9721 .Ql ? wysh set mta-arguments='-t -X \&"/tmp/my log\&"' .
9723 .It Va mta-no-default-arguments
9724 \*(BO Unless this variable is set \*(UA will pass some well known
9725 standard command line options to a file-based
9727 (Mail-Transfer-Agent), see there for more.
9729 .It Va mta-no-receiver-arguments
9730 \*(BO By default a file-based
9732 will be passed all receiver addresses on the command line.
9733 This variable can be set to suppress any such argument.
9736 Many systems use a so-called
9738 environment to ensure compatibility with
9740 This works by inspecting the name that was used to invoke the mail
9742 If this variable is set then the mailwrapper (the program that is
9743 actually executed when calling the file-based
9745 will treat its contents as that name.
9747 .It Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup
9748 \*(BO\*(IN\*(OP Used to control usage of the users
9750 file for lookup of account credentials, as documented in the section
9751 .Sx "On URL syntax and credential lookup"
9755 .Sx "The .netrc file"
9756 documents the file format.
9767 then \*(UA will read the output of a shell pipe instead of the users
9769 file if this variable is set (to the desired shell command).
9770 This can be used to, e.g., store
9773 .Ql ? set netrc-pipe='gpg -qd ~/.netrc.pgp' .
9776 If this variable has the value
9778 newly created local folders will be in Maildir instead of MBOX format.
9781 Checks for new mail in the current folder each time the prompt is shown.
9782 A Maildir folder must be re-scanned to determine if new mail has arrived.
9783 If this variable is set to the special value
9785 then a Maildir folder will not be rescanned completely, but only
9786 timestamp changes are detected.
9789 \*(BO Causes the filename given in the
9792 and the sender-based filenames for the
9796 commands to be interpreted relative to the directory given in the
9798 variable rather than to the current directory,
9799 unless it is set to an absolute pathname.
9800 .Mx Va on-account-cleanup
9801 .It Va on-account-cleanup-ACCOUNT , Va on-account-cleanup
9802 Macro hook which will be called once an
9804 is left, as the very last step before unrolling per-account
9806 This hook is run even in case of fatal errors, and it is advisable to
9807 perform only absolutely necessary actions, like cleaning up
9810 The specialized form is used in favour of the generic one if found.
9812 .It Va on-compose-cleanup
9813 Macro hook which will be called after the message has been sent (or not,
9814 in case of failures), as the very last step before unrolling compose mode
9816 This hook is run even in case of fatal errors, and it is advisable to
9817 perform only absolutely necessary actions, like cleaning up
9821 For compose mode hooks that may affect the message content please see
9822 .Va on-compose-enter , on-compose-leave , on-compose-splice .
9823 \*(ID This hook exists because
9824 .Ic alias , alternates , commandalias , shortcut ,
9825 to name a few, are not covered by
9827 changes applied in compose mode will continue to be in effect thereafter.
9830 .It Va on-compose-enter , on-compose-leave
9831 Macro hooks which will be called once compose mode is entered,
9832 and after composing has been finished, but before a set
9833 .Va message-inject-tail
9834 has been injected etc., respectively.
9836 are enabled for these hooks, and changes on variables will be forgotten
9837 after the message has been sent.
9838 .Va on-compose-cleanup
9839 can be used to perform other necessary cleanup steps.
9841 The following (read-only) variables will be set temporarily during
9842 execution of the macros to represent respective message headers, to
9843 the empty string otherwise; most of them correspond to according virtual
9844 message headers that can be accessed via
9847 .Sx "COMMAND ESCAPES"
9849 .Va on-compose-splice
9852 .Bl -tag -compact -width ".It Va mailx_subject"
9853 .It Va mailx-command
9854 The command that generates the message.
9855 .It Va mailx-subject
9861 .It Va mailx-to , mailx-cc , mailx-bcc
9862 The list of receiver addresses as a space-separated list.
9863 .It Va mailx-raw-to , mailx-raw-cc , mailx-raw-bcc
9864 The list of receiver addresses before any mangling (due to, e.g.,
9867 .Va recipients-in-cc )
9868 as a space-separated list.
9869 .It Va mailx-orig-from
9870 When replying, forwarding or resending, this will be set to the
9872 of the given message.
9873 .It Va mailx-orig-to , mailx-orig-cc , mailx-orig-bcc
9874 When replying, forwarding or resending, this will be set to the
9875 receivers of the given message.
9878 Here is am example that injects a signature via
9879 .Va message-inject-tail ;
9881 .Va on-compose-splice
9882 to simply inject the file of desire via
9886 may be a better approach.
9887 .Bd -literal -offset indent
9889 vput ! i cat ~/.mysig
9891 vput vexpr message-inject-tail trim-end $i
9895 readctl create ~/.mysig
9899 vput vexpr message-inject-tail trim-end $i
9901 readctl remove ~/.mysig
9904 set on-compose-leave=t_ocl
9908 .It Va on-compose-splice , on-compose-splice-shell
9909 These hooks run once the normal compose mode is finished, but before the
9910 .Va on-compose-leave
9911 macro hook is called, the
9912 .Va message-inject-tail
9914 Both hooks will be executed in a subprocess, with their input and output
9915 connected to \*(UA such that they can act as if they would be an
9917 The difference in between them is that the latter is a
9919 command, whereas the former is a normal \*(UA macro, but which is
9920 restricted to a small set of commands (the
9924 will indicate said capability).
9926 are enabled for these hooks (in the parent process), causing any setting
9927 to be forgotten after the message has been sent;
9928 .Va on-compose-cleanup
9929 can be used to perform other cleanup as necessary.
9931 During execution of these hooks \*(UA will temporarily forget whether it
9932 has been started in interactive mode, (a restricted set of)
9933 .Sx "COMMAND ESCAPES"
9934 will always be available, and for guaranteed reproducibilities sake
9938 will be set to their defaults.
9939 The compose mode command
9941 has been especially designed for scriptability (via these hooks).
9942 The first line the hook will read on its standard input is the protocol
9943 version of said command escape, currently
9945 backward incompatible protocol changes have to be expected.
9947 Care must be taken to avoid deadlocks and other false control flow:
9948 if both involved processes wait for more input to happen at the
9949 same time, or one does not expect more input but the other is stuck
9950 waiting for consumption of its output, etc.
9951 There is no automatic synchronization of the hook: it will not be
9952 stopped automatically just because it, e.g., emits
9954 The hooks will however receive a termination signal if the parent enters
9956 \*(ID Protection against and interaction with signals is not yet given;
9957 it is likely that in the future these scripts will be placed in an
9958 isolated session, which is signalled in its entirety as necessary.
9959 .Bd -literal -offset indent
9960 define ocs_signature {
9962 echo '~< ~/.mysig' # '~<! fortune pathtofortunefile'
9964 set on-compose-splice=ocs_signature
9966 wysh set on-compose-splice-shell=$'\e
9968 printf "hello $version! Headers: ";\e
9969 echo \e'~^header list\e';\e
9970 read status result;\e
9971 echo "status=$status result=$result";\e
9976 echo Splice protocol version is $version
9977 echo '~^h l'; read hl; vput vexpr es substring "${hl}" 0 1
9979 echoerr 'Cannot read header list'; echo '~x'; xit
9981 if [ "$hl" @i!% ' cc' ]
9982 echo '~^h i cc Diet is your <mirr.or>'; read es;\e
9983 vput vexpr es substring "${es}" 0 1
9985 echoerr 'Cannot insert Cc: header'; echo '~x'
9986 # (no xit, macro finishs anyway)
9990 set on-compose-splice=ocsm
9993 .It Va on-resend-cleanup
9995 .Va on-compose-cleanup ,
9996 but is only triggered by
9999 .It Va on-resend-enter
10001 .Va on-compose-enter ,
10002 but is only triggered by
10006 \*(BO If set, each message feed through the command given for
10008 is followed by a formfeed character
10011 .It Va password-USER@HOST , password-HOST , password
10012 \*(IN Variable chain that sets a password, which is used in case none has
10013 been given in the protocol and account-specific URL;
10014 as a last resort \*(UA will ask for a password on the user's terminal if
10015 the authentication method requires a password.
10016 Specifying passwords in a startup file is generally a security risk;
10017 the file should be readable by the invoking user only.
10018 .It Va password-USER@HOST
10019 \*(OU (see the chain above for \*(IN)
10020 Set the password for
10024 If no such variable is defined for a host,
10025 the user will be asked for a password on standard input.
10026 Specifying passwords in a startup file is generally a security risk;
10027 the file should be readable by the invoking user only.
10030 \*(BO Send messages to the
10032 command without performing MIME and character set conversions.
10034 .It Va pipe-TYPE/SUBTYPE
10035 When a MIME message part of type
10037 (case-insensitive) is displayed or quoted,
10038 its text is filtered through the value of this variable interpreted as
10040 Note that only parts which can be displayed inline as plain text (see
10041 .Cd copiousoutput )
10042 are displayed unless otherwise noted, other MIME parts will only be
10043 considered by and for the command
10046 The special value commercial at
10048 forces interpretation of the message part as plain text, e.g.,
10049 .Ql set pipe-application/xml=@
10050 will henceforth display XML
10052 (The same could also be achieved by adding a MIME type marker with the
10055 And \*(OPally MIME type handlers may be defined via
10056 .Sx "The Mailcap files"
10057 \(em these directives,
10059 has already been used, should be referred to for further documentation.
10063 can in fact be used as a trigger character to adjust usage and behaviour
10064 of a following shell command specification more thoroughly by appending
10065 more special characters which refer to further mailcap directives, e.g.,
10066 the following hypothetical command specification could be used:
10067 .Bd -literal -offset indent
10068 ? set pipe-X/Y='@!++=@vim ${MAILX_FILENAME_TEMPORARY}'
10071 .Bl -tag -compact -width ".It Ql __"
10073 The command produces plain text to be integrated in \*(UAs output:
10074 .Cd copiousoutput .
10076 If set the handler will not be invoked when a message is to be quoted,
10077 but only when it will be displayed:
10078 .Cd x-mailx-noquote .
10080 Run the command asynchronously, i.e., without blocking \*(UA:
10081 .Cd x-mailx-async .
10083 The command must be run on an interactive terminal, \*(UA will
10084 temporarily release the terminal to it:
10085 .Cd needsterminal .
10087 Request creation of a zero-sized temporary file, the absolute pathname
10088 of which will be made accessible via the environment variable
10089 .Ev MAILX_FILENAME_TEMPORARY :
10090 .Cd x-mailx-tmpfile .
10091 If given twice then the file will be unlinked automatically by \*(UA
10092 when the command loop is entered again at latest:
10093 .Cd x-mailx-tmpfile-unlink .
10095 Normally the MIME part content is passed to the handler via standard
10096 input; if this flag is set then the data will instead be written into
10097 .Ev MAILX_FILENAME_TEMPORARY
10098 .Pf ( Cd x-mailx-tmpfile-fill ) ,
10099 the creation of which is implied; note however that in order to cause
10100 deletion of the temporary file you still have to use two plus signs
10104 To avoid ambiguities with normal shell command content you can use
10105 another commercial at to forcefully terminate interpretation of
10106 remaining characters.
10107 (Any character not in this list will have the same effect.)
10110 Some information about the MIME part to be displayed is embedded into
10111 the environment of the shell command:
10113 .Bl -tag -compact -width ".It Ev _AIL__ILENAME__ENERATED"
10115 .It Ev MAILX_CONTENT
10116 The MIME content-type of the part, if known, the empty string otherwise.
10118 .It Ev MAILX_CONTENT_EVIDENCE
10120 .Va mime-counter-evidence
10121 includes the carry-around-bit (2), then this will be set to the detected
10122 MIME content-type; not only then identical to
10123 .Ev \&\&MAILX_CONTENT
10126 .It Ev MAILX_EXTERNAL_BODY_URL
10128 .Ql message/external-body access-type=url
10129 will store the access URL in this variable, it is empty otherwise.
10131 .It Ev MAILX_FILENAME
10132 The filename, if any is set, the empty string otherwise.
10134 .It Ev MAILX_FILENAME_GENERATED
10137 .It Ev MAILX_FILENAME_TEMPORARY
10138 If temporary file creation has been requested through the command prefix
10139 this variable will be set and contain the absolute pathname of the
10143 .It Va pipe-EXTENSION
10144 This is identical to
10145 .Va pipe-TYPE/SUBTYPE
10148 (normalized to lowercase using character mappings of the ASCII charset)
10149 names a file extension, e.g.,
10151 Handlers registered using this method take precedence.
10153 .It Va pop3-auth-USER@HOST , pop3-auth-HOST , pop3-auth
10154 \*(OP\*(IN Variable chain that sets the POP3 authentication method.
10155 The only possible value as of now is
10157 which is thus the default.
10158 .Mx Va pop3-bulk-load
10159 .It Va pop3-bulk-load-USER@HOST , pop3-bulk-load-HOST , pop3-bulk-load
10160 \*(BO\*(OP When accessing a POP3 server \*(UA loads the headers of
10161 the messages, and only requests the message bodies on user request.
10162 For the POP3 protocol this means that the message headers will be
10164 If this variable is set then \*(UA will download only complete messages
10165 from the given POP3 server(s) instead.
10166 .Mx Va pop3-keepalive
10167 .It Va pop3-keepalive-USER@HOST , pop3-keepalive-HOST , pop3-keepalive
10168 \*(OP POP3 servers close the connection after a period of inactivity;
10169 the standard requires this to be at least 10 minutes,
10170 but practical experience may vary.
10171 Setting this variable to a numeric value greater than
10175 command to be sent each value seconds if no other operation is performed.
10176 .Mx Va pop3-no-apop
10177 .It Va pop3-no-apop-USER@HOST , pop3-no-apop-HOST , pop3-no-apop
10178 \*(BO\*(OP Unless this variable is set the
10180 authentication method will be used when connecting to a POP3 server that
10181 advertises support.
10184 is that the password is not sent in clear text over the wire and that
10185 only a single packet is sent for the user/password tuple.
10187 .Va pop3-no-apop-HOST
10189 .Mx Va pop3-use-starttls
10190 .It Va pop3-use-starttls-USER@HOST , pop3-use-starttls-HOST , pop3-use-starttls
10191 \*(BO\*(OP Causes \*(UA to issue a
10193 command to make an unencrypted POP3 session SSL/TLS encrypted.
10194 This functionality is not supported by all servers,
10195 and is not used if the session is already encrypted by the POP3S method.
10197 .Va pop3-use-starttls-HOST
10201 \*(BO This flag enables POSIX mode, which changes behaviour of \*(UA
10202 where that deviates from standardized behaviour.
10203 It will be set implicitly before the
10204 .Sx "Resource files"
10205 are loaded if the environment variable
10206 .Ev POSIXLY_CORRECT
10207 is set, and adjusting any of those two will be reflected by the other
10209 The following behaviour is covered and enforced by this mechanism:
10211 .Bl -bullet -compact
10213 In non-interactive mode, any error encountered while loading resource
10214 files during program startup will cause a program exit, whereas in
10215 interactive mode such errors will stop loading of the currently loaded
10216 (stack of) file(s, i.e., recursively).
10217 These exits can be circumvented on a per-command base by using
10220 .Sx "Command modifiers" ,
10221 for each command which shall be allowed to fail.
10224 will replace the list of alternate addresses instead of appending to it.
10226 The variable inserting
10227 .Sx "COMMAND ESCAPES"
10233 will expand embedded character sequences
10235 horizontal tabulator and
10238 \*(ID For compatibility reasons this step will always be performed.
10240 Upon changing the active
10244 will be displayed even if
10250 implies the behaviour described by
10255 is extended to cover any empty mailbox, not only empty
10257 .Sx "primary system mailbox" Ns
10258 es: they will be removed when they are left in empty state otherwise.
10261 .It Va print-alternatives
10262 \*(BO When a MIME message part of type
10263 .Ql multipart/alternative
10264 is displayed and it contains a subpart of type
10266 other parts are normally discarded.
10267 Setting this variable causes all subparts to be displayed,
10268 just as if the surrounding part was of type
10269 .Ql multipart/mixed .
10272 The string used as a prompt in interactive mode.
10273 Whenever the variable is evaluated the value is treated as if specified
10274 within dollar-single-quotes (see
10275 .Sx "Shell-style argument quoting" ) .
10276 This (post-assignment, i.e., second) expansion can be used to embed
10277 status information, for example
10282 .Va mailbox-display .
10284 In order to embed characters which should not be counted when
10285 calculating the visual width of the resulting string, enclose the
10286 characters of interest in a pair of reverse solidus escaped brackets:
10288 a slot for coloured prompts is also available with the \*(OPal command
10290 Prompting may be prevented by setting this to the null string
10292 .Ql set noprompt ) .
10295 This string is used for secondary prompts, but is otherwise identical to
10301 \*(BO Suppresses the printing of the version when first invoked.
10304 If set, \*(UA starts a replying message with the original message
10305 prefixed by the value of the variable
10307 Normally, a heading consisting of
10308 .Dq Fromheaderfield wrote:
10309 is put before the quotation.
10314 variable, this heading is omitted.
10317 is assigned, only the headers selected by the
10320 selection are put above the message body,
10323 acts like an automatic
10325 .Sx "COMMAND ESCAPES"
10329 is assigned, all headers are put above the message body and all MIME
10330 parts are included, making
10332 act like an automatic
10335 .Va quote-as-attachment .
10337 .It Va quote-as-attachment
10338 \*(BO Add the original message in its entirety as a
10340 MIME attachment when replying to a message.
10341 Note this works regardless of the setting of
10345 Can be set to a string consisting of non-whitespace ASCII characters
10346 which shall be treated as quotation leaders, the default being
10350 \*(OP Can be set in addition to
10352 Setting this turns on a more fancy quotation algorithm in that leading
10353 quotation characters
10354 .Pf ( Va quote-chars )
10355 are compressed and overlong lines are folded.
10357 can be set to either one or two (space separated) numeric values,
10358 which are interpreted as the maximum (goal) and the minimum line length,
10359 respectively, in a spirit rather equal to the
10361 program, but line-, not paragraph-based.
10362 If not set explicitly the minimum will reflect the goal algorithmically.
10363 The goal cannot be smaller than the length of
10365 plus some additional pad.
10366 Necessary adjustments take place silently.
10368 .It Va r-option-implicit
10369 \*(BO Setting this option evaluates the contents of
10371 (or, if that contains multiple addresses,
10373 and passes the results onto the used (file-based) MTA as described for the
10375 option (empty argument case).
10377 .It Va recipients-in-cc
10384 are by default merged into the new
10386 If this variable is set, only the original
10390 the rest is merged into
10394 Unless this variable is defined, no copies of outgoing mail will be saved.
10395 If defined it gives the pathname, subject to the usual
10396 .Sx "Filename transformations" ,
10397 of a folder where all new, replied-to or forwarded messages are saved:
10398 when saving to this folder fails the message is not sent, but instead
10402 The standard defines that relative (fully expanded) paths are to be
10403 interpreted relative to the current directory
10405 to force interpretation relative to
10408 needs to be set in addition.
10410 .It Va record-files
10411 \*(BO If this variable is set the meaning of
10413 will be extended to cover messages which target only file and pipe
10416 These address types will not appear in recipient lists unless
10417 .Va add-file-recipients
10420 .It Va record-resent
10421 \*(BO If this variable is set the meaning of
10423 will be extended to also cover the
10429 .It Va reply-in-same-charset
10430 \*(BO If this variable is set \*(UA first tries to use the same
10431 character set of the original message for replies.
10432 If this fails, the mechanism described in
10433 .Sx "Character sets"
10434 is evaluated as usual.
10436 .It Va reply-strings
10437 Can be set to a comma-separated list of (case-insensitive according to
10438 ASCII rules) strings which shall be recognized in addition to the
10439 built-in strings as
10441 reply message indicators \(en built-in are
10443 which is mandated by RFC 5322, as well as the german
10448 which often has been seen in the wild;
10449 I.e., the separating colon has to be specified explicitly.
10452 A list of addresses to put into the
10454 field of the message header.
10455 Members of this list are handled as if they were in the
10462 .It Va reply-to-honour
10465 header is honoured when replying to a message via
10469 This is a quadoption; if set without a value it defaults to
10472 .It Va rfc822-body-from_
10473 \*(BO This variable can be used to force displaying a so-called
10475 line for messages that are embedded into an envelope mail via the
10477 MIME mechanism, for more visual convenience.
10480 \*(BO Enable saving of (partial) messages in
10482 upon interrupt or delivery error.
10485 The number of lines that represents a
10494 line display and scrolling via
10496 If this variable is not set \*(UA falls back to a calculation based upon
10497 the detected terminal window size and the baud rate: the faster the
10498 terminal, the more will be shown.
10499 Overall screen dimensions and pager usage is influenced by the
10500 environment variables
10507 .It Va searchheaders
10508 \*(BO Expand message-list specifiers in the form
10510 to all messages containing the substring
10512 in the header field
10514 The string search is case insensitive.
10516 .It Va sendcharsets
10517 \*(OP A comma-separated list of character set names that can be used in
10518 outgoing internet mail.
10519 The value of the variable
10521 is automatically appended to this list of character sets.
10522 If no character set conversion capabilities are compiled into \*(UA then
10523 the only supported charset is
10526 .Va sendcharsets-else-ttycharset
10527 and refer to the section
10528 .Sx "Character sets"
10529 for the complete picture of character set conversion in \*(UA.
10531 .It Va sendcharsets-else-ttycharset
10532 \*(BO\*(OP If this variable is set, but
10534 is not, then \*(UA acts as if
10536 had been set to the value of the variable
10538 In effect this combination passes through the message data in the
10539 character set of the current locale encoding:
10540 therefore mail message text will be (assumed to be) in ISO-8859-1
10541 encoding when send from within a ISO-8859-1 locale, and in UTF-8
10542 encoding when send from within an UTF-8 locale.
10546 never comes into play as
10548 is implicitly assumed to be 8-bit and capable to represent all files the
10549 user may specify (as is the case when no character set conversion
10550 support is available in \*(UA and the only supported character set is
10552 .Sx "Character sets" ) .
10553 This might be a problem for scripts which use the suggested
10555 setting, since in this case the character set is US-ASCII by definition,
10556 so that it is better to also override
10561 An address that is put into the
10563 field of outgoing messages, quoting RFC 5322: the mailbox of the agent
10564 responsible for the actual transmission of the message.
10565 This field should normally not be used unless the
10567 field contains more than one address, on which case it is required.
10570 address is handled as if it were in the
10574 .Va r-option-implicit .
10576 \*(OB Predecessor of
10578 .It Va sendmail-arguments
10579 \*(OB Predecessor of
10580 .Va mta-arguments .
10581 .It Va sendmail-no-default-arguments
10582 \*(OB\*(BO Predecessor of
10583 .Va mta-no-default-arguments .
10584 .It Va sendmail-progname
10585 \*(OB Predecessor of
10589 \*(BO When sending a message wait until the
10591 (including the built-in SMTP one) exits before accepting further commands.
10593 with this variable set errors reported by the MTA will be recognizable!
10594 If the MTA returns a non-zero exit status,
10595 the exit status of \*(UA will also be non-zero.
10598 \*(BO This setting causes \*(UA to start at the last message
10599 instead of the first one when opening a mail folder, as well as with
10605 \*(BO Causes \*(UA to use the sender's real name instead of the plain
10606 address in the header field summary and in message specifications.
10609 \*(BO Causes the recipient of the message to be shown in the header
10610 summary if the message was sent by the user.
10616 .Sx "COMMAND ESCAPES" .
10618 .Va message-inject-tail ,
10619 .Va on-compose-leave
10621 .Va on-compose-splice .
10627 .Sx "COMMAND ESCAPES" .
10629 .Va message-inject-tail ,
10630 .Va on-compose-leave
10632 .Va on-compose-splice .
10636 .Va on-compose-splice
10638 .Va on-compose-splice-shell
10640 .Va on-compose-leave
10642 .Va message-inject-tail
10645 .It Va skipemptybody
10646 \*(BO If an outgoing message does not contain any text in its first or
10647 only message part, do not send it but discard it silently (see also the
10648 command line option
10652 .It Va smime-ca-dir , smime-ca-file
10653 \*(OP Specify the location of trusted CA certificates in PEM (Privacy
10654 Enhanced Mail) format as a directory and a file, respectively, for the
10655 purpose of verification of S/MIME signed messages.
10656 It is possible to set both, the file will be loaded immediately, the
10657 directory will be searched whenever no match has yet been found.
10658 The set of CA certificates which are built into the SSL/TLS library can
10659 be explicitly turned off by setting
10660 .Va smime-ca-no-defaults ,
10661 and further fine-tuning is possible via
10662 .Va smime-ca-flags .
10664 .It Va smime-ca-flags
10665 \*(OP Can be used to fine-tune behaviour of the X509 CA certificate
10666 storage, and the certificate verification that is used.
10667 The actual values and their meanings are documented for
10670 .It Va smime-ca-no-defaults
10671 \*(BO\*(OP Do not load the default CA locations that are built into the
10672 used to SSL/TLS library to verify S/MIME signed messages.
10673 .Mx Va smime-cipher
10674 .It Va smime-cipher-USER@HOST , smime-cipher
10675 \*(OP Specifies the cipher to use when generating S/MIME encrypted
10676 messages (for the specified account).
10677 RFC 5751 mandates a default of
10680 Possible values are (case-insensitive and) in decreasing cipher strength:
10688 (DES EDE3 CBC, 168 bits; default if
10690 is not available) and
10692 (DES CBC, 56 bits).
10694 The actually available cipher algorithms depend on the cryptographic
10695 library that \*(UA uses.
10696 \*(OP Support for more cipher algorithms may be available through
10697 dynamic loading via, e.g.,
10698 .Xr EVP_get_cipherbyname 3
10699 (OpenSSL) if \*(UA has been compiled to support this.
10701 .It Va smime-crl-dir
10702 \*(OP Specifies a directory that contains files with CRLs in PEM format
10703 to use when verifying S/MIME messages.
10705 .It Va smime-crl-file
10706 \*(OP Specifies a file that contains a CRL in PEM format to use when
10707 verifying S/MIME messages.
10709 .It Va smime-encrypt-USER@HOST
10710 \*(OP If this variable is set, messages send to the given receiver are
10711 encrypted before sending.
10712 The value of the variable must be set to the name of a file that
10713 contains a certificate in PEM format.
10715 If a message is sent to multiple recipients,
10716 each of them for whom a corresponding variable is set will receive an
10717 individually encrypted message;
10718 other recipients will continue to receive the message in plain text
10720 .Va smime-force-encryption
10722 It is recommended to sign encrypted messages, i.e., to also set the
10726 .It Va smime-force-encryption
10727 \*(BO\*(OP Causes \*(UA to refuse sending unencrypted messages.
10730 \*(BO\*(OP S/MIME sign outgoing messages with the user's private key
10731 and include the user's certificate as a MIME attachment.
10732 Signing a message enables a recipient to verify that the sender used
10733 a valid certificate,
10734 that the email addresses in the certificate match those in the message
10735 header and that the message content has not been altered.
10736 It does not change the message text,
10737 and people will be able to read the message as usual.
10739 .Va smime-sign-cert , smime-sign-include-certs
10741 .Va smime-sign-message-digest .
10742 .Mx Va smime-sign-cert
10743 .It Va smime-sign-cert-USER@HOST , smime-sign-cert
10744 \*(OP Points to a file in PEM format.
10745 For the purpose of signing and decryption this file needs to contain the
10746 user's private key, followed by his certificate.
10748 For message signing
10750 is always derived from the value of
10752 (or, if that contains multiple addresses,
10754 For the purpose of encryption the recipient's public encryption key
10755 (certificate) is expected; the command
10757 can be used to save certificates of signed messages (the section
10758 .Sx "Signed and encrypted messages with S/MIME"
10759 gives some details).
10760 This mode of operation is usually driven by the specialized form.
10762 When decrypting messages the account is derived from the recipient
10767 of the message, which are searched for addresses for which such
10769 \*(UA always uses the first address that matches,
10770 so if the same message is sent to more than one of the user's addresses
10771 using different encryption keys, decryption might fail.
10773 For signing and decryption purposes it is possible to use encrypted
10774 keys, and the pseudo-host(s)
10775 .Ql USER@HOST.smime-cert-key
10776 for the private key
10778 .Ql USER@HOST.smime-cert-cert
10779 for the certificate stored in the same file)
10780 will be used for performing any necessary password lookup,
10781 therefore the lookup can be automated via the mechanisms described in
10782 .Sx "On URL syntax and credential lookup" .
10783 For example, the hypothetical address
10785 could be driven with a private key / certificate pair path defined in
10786 .Va \&\&smime-sign-cert-bob@exam.ple ,
10787 and needed passwords would then be looked up via the pseudo hosts
10788 .Ql bob@exam.ple.smime-cert-key
10790 .Ql bob@exam.ple.smime-cert-cert ) .
10791 To include intermediate certificates, use
10792 .Va smime-sign-include-certs .
10793 .Mx Va smime-sign-include-certs
10794 .It Va smime-sign-include-certs-USER@HOST , smime-sign-include-certs
10795 \*(OP If used, this is supposed to a consist of a comma-separated list
10796 of files, each of which containing a single certificate in PEM format to
10797 be included in the S/MIME message in addition to the
10798 .Va smime-sign-cert
10800 This can be used to include intermediate certificates of the certificate
10801 authority, in order to allow the receiver's S/MIME implementation to
10802 perform a verification of the entire certificate chain, starting from
10803 a local root certificate, over the intermediate certificates, down to the
10804 .Va smime-sign-cert .
10805 Even though top level certificates may also be included in the chain,
10806 they won't be used for the verification on the receiver's side.
10808 For the purpose of the mechanisms involved here,
10810 refers to the content of the internal variable
10812 (or, if that contains multiple addresses,
10815 .Ql USER@HOST.smime-include-certs
10816 will be used for performing password lookups for these certificates,
10817 shall they have been given one, therefore the lookup can be automated
10818 via the mechanisms described in
10819 .Sx "On URL syntax and credential lookup" .
10820 .Mx Va smime-sign-message-digest
10821 .It Va smime-sign-message-digest-USER@HOST , smime-sign-message-digest
10822 \*(OP Specifies the message digest to use when signing S/MIME messages.
10823 RFC 5751 mandates a default of
10825 Possible values are (case-insensitive and) in decreasing cipher strength:
10833 The actually available message digest algorithms depend on the
10834 cryptographic library that \*(UA uses.
10835 \*(OP Support for more message digest algorithms may be available
10836 through dynamic loading via, e.g.,
10837 .Xr EVP_get_digestbyname 3
10838 (OpenSSL) if \*(UA has been compiled to support this.
10839 Remember that for this
10841 refers to the variable
10843 (or, if that contains multiple addresses,
10846 \*(OB\*(OP To use the built-in SMTP transport, specify a SMTP URL in
10848 \*(ID For compatibility reasons a set
10850 is used in preference of
10853 .It Va smtp-auth-USER@HOST , smtp-auth-HOST , smtp-auth
10854 \*(OP Variable chain that controls the SMTP
10856 authentication method, possible values are
10862 as well as the \*(OPal methods
10868 method does not need any user credentials,
10870 requires a user name and all other methods require a user name and
10878 .Va smtp-auth-password
10880 .Va smtp-auth-user ) .
10885 .Va smtp-auth-USER@HOST :
10886 may override dependent on sender address in the variable
10888 .It Va smtp-auth-password
10889 \*(OP\*(OU Sets the global fallback password for SMTP authentication.
10890 If the authentication method requires a password, but neither
10891 .Va smtp-auth-password
10893 .Va smtp-auth-password-USER@HOST
10895 \*(UA will ask for a password on the user's terminal.
10896 .It Va smtp-auth-password-USER@HOST
10898 .Va smtp-auth-password
10899 for specific values of sender addresses, dependent upon the variable
10901 .It Va smtp-auth-user
10902 \*(OP\*(OU Sets the global fallback user name for SMTP authentication.
10903 If the authentication method requires a user name, but neither
10906 .Va smtp-auth-user-USER@HOST
10908 \*(UA will ask for a user name on the user's terminal.
10909 .It Va smtp-auth-user-USER@HOST
10912 for specific values of sender addresses, dependent upon the variable
10915 .It Va smtp-hostname
10916 \*(OP\*(IN Normally \*(UA uses the variable
10918 to derive the necessary
10920 information in order to issue a
10927 can be used to use the
10929 from the SMTP account
10936 from the content of this variable (or, if that is the empty string,
10938 or the local hostname as a last resort).
10939 This often allows using an address that is itself valid but hosted by
10940 a provider other than which (in
10942 is about to send the message.
10943 Setting this variable also influences generated
10948 If the \*(OPal IDNA support is available (see
10950 variable assignment is aborted when a necessary conversion fails.
10951 .Mx Va smtp-use-starttls
10952 .It Va smtp-use-starttls-USER@HOST , smtp-use-starttls-HOST , smtp-use-starttls
10953 \*(BO\*(OP Causes \*(UA to issue a
10955 command to make an SMTP
10957 session SSL/TLS encrypted, i.e., to enable transport layer security.
10959 .It Va socks-proxy-USER@HOST , socks-proxy-HOST , socks-proxy
10960 \*(OP If this is set to the hostname (SOCKS URL) of a SOCKS5 server then
10961 \*(UA will proxy all of its network activities through it.
10962 This can be used to proxy SMTP, POP3 etc. network traffic through the
10963 Tor anonymizer, for example.
10964 The following would create a local SOCKS proxy on port 10000 that
10965 forwards to the machine
10967 and from which the network traffic is actually instantiated:
10968 .Bd -literal -offset indent
10969 # Create local proxy server in terminal 1 forwarding to HOST
10970 $ ssh -D 10000 USER@HOST
10971 # Then, start a client that uses it in terminal 2
10972 $ \*(uA -Ssocks-proxy-USER@HOST=localhost:10000
10975 .It Va spam-interface
10976 \*(OP In order to use any of the spam-related commands (like, e.g.,
10978 the desired spam interface must be defined by setting this variable.
10979 Please refer to the manual section
10980 .Sx "Handling spam"
10981 for the complete picture of spam handling in \*(UA.
10982 All or none of the following interfaces may be available:
10983 .Bl -tag -width ".It Ql _ilte_"
10989 .Pf ( Lk http://spamassassin.apache.org SpamAssassin )
10991 Different to the generic filter interface \*(UA will automatically add
10992 the correct arguments for a given command and has the necessary
10993 knowledge to parse the program's output.
10994 A default value for
10996 will have been compiled into the \*(UA binary if
11000 during compilation.
11001 Shall it be necessary to define a specific connection type (rather than
11002 using a configuration file for that), the variable
11003 .Va spamc-arguments
11004 can be used as in, e.g.,
11005 .Ql -d server.example.com -p 783 .
11006 It is also possible to specify a per-user configuration via
11008 Note that this interface does not inspect the
11010 flag of a message for the command
11013 generic spam filter support via freely configurable hooks.
11014 This interface is meant for programs like
11016 and requires according behaviour in respect to the hooks' exit
11017 status for at least the command
11020 meaning a message is spam,
11024 for unsure and any other return value indicating a hard error);
11025 since the hooks can include shell code snippets diverting behaviour
11026 can be intercepted as necessary.
11028 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
11031 .Va spamfilter-spam ;
11033 .Sx "Handling spam"
11034 contains examples for some programs.
11035 The process environment of the hooks will have the variable
11036 .Ev MAILX_FILENAME_GENERATED
11038 Note that spam score support for
11040 is not supported unless the \*(OPtional regular expression support is
11042 .Va spamfilter-rate-scanscore
11046 .It Va spam-maxsize
11047 \*(OP Messages that exceed this size will not be passed through to the
11049 .Va spam-interface .
11050 If unset or 0, the default of 420000 bytes is used.
11052 .It Va spamc-command
11053 \*(OP The path to the
11057 .Va spam-interface .
11058 Note that the path is not expanded, but used
11060 A fallback path will have been compiled into the \*(UA binary if the
11061 executable had been found during compilation.
11063 .It Va spamc-arguments
11064 \*(OP Even though \*(UA deals with most arguments for the
11067 automatically, it may at least sometimes be desirable to specify
11068 connection-related ones via this variable, e.g.,
11069 .Ql -d server.example.com -p 783 .
11072 \*(OP Specify a username for per-user configuration files for the
11074 .Va spam-interface .
11075 If this is set to the empty string then \*(UA will use the name of the
11083 .It Va spamfilter-ham , spamfilter-noham , \
11084 spamfilter-nospam , spamfilter-rate , spamfilter-spam
11085 \*(OP Command and argument hooks for the
11087 .Va spam-interface .
11089 .Sx "Handling spam"
11090 contains examples for some programs.
11092 .It Va spamfilter-rate-scanscore
11093 \*(OP Because of the generic nature of the
11096 spam scores are not supported for it by default, but if the \*(OPnal
11097 regular expression support is available then setting this variable can
11098 be used to overcome this restriction.
11099 It is interpreted as follows: first a number (digits) is parsed that
11100 must be followed by a semicolon
11102 and an extended regular expression.
11103 Then the latter is used to parse the first output line of the
11104 .Va spamfilter-rate
11105 hook, and, in case the evaluation is successful, the group that has been
11106 specified via the number is interpreted as a floating point scan score.
11109 .It Va ssl-ca-dir-USER@HOST , ssl-ca-dir-HOST , ssl-ca-dir ,\
11110 ssl-ca-file-USER@HOST , ssl-ca-file-HOST , ssl-ca-file
11111 \*(OP Specify the location of trusted CA certificates in PEM (Privacy
11112 Enhanced Mail) format as a directory and a file, respectively, for the
11113 purpose of verification of SSL/TLS server certificates.
11114 It is possible to set both, the file will be loaded immediately, the
11115 directory will be searched whenever no match has yet been found.
11116 The set of CA certificates which are built into the SSL/TLS library can
11117 be explicitly turned off by setting
11118 .Va ssl-ca-no-defaults ,
11119 and further fine-tuning is possible via
11122 .Xr SSL_CTX_load_verify_locations 3
11123 for more information.
11124 \*(UA will try to use the TLS/SNI (ServerNameIndication) extension when
11125 establishing TLS connections to servers identified with hostnames.
11126 .Mx Va ssl-ca-flags
11127 .It Va ssl-ca-flags-USER@HOST , ssl-ca-flags-HOST , ssl-ca-flags
11128 \*(OP Can be used to fine-tune behaviour of the X509 CA certificate
11129 storage, and the certificate verification that is used (also see
11131 The value is expected to consist of a comma-separated list of
11132 configuration directives, with any intervening whitespace being ignored.
11133 The directives directly map to flags that can be passed to
11134 .Xr X509_STORE_set_flags 3 ,
11135 which are usually defined in a file
11136 .Pa openssl/x509_vfy.h ,
11137 and the availability of which depends on the used SSL/TLS library
11138 version: a directive without mapping is ignored (error log subject to
11140 Directives currently understood (case-insensitively) include:
11142 .Bl -tag -compact -width ".It Cd BaNg"
11143 .It Cd no-alt-chains
11144 If the initial chain is not trusted, do not attempt to build an
11146 Setting this flag will make OpenSSL certificate verification match that
11147 of older OpenSSL versions, before automatic building and checking of
11148 alternative chains has been implemented; also see
11149 .Cd trusted-first .
11150 .It Cd no-check-time
11151 Do not check certificate/CRL validity against current time.
11152 .It Cd partial-chain
11153 By default partial, incomplete chains which cannot be verified up to the
11154 chain top, a self-signed root certificate, will not verify.
11155 With this flag set, a chain succeeds to verify if at least one signing
11156 certificate of the chain is in any of the configured trusted stores of
11158 The OpenSSL manual page
11159 .Xr SSL_CTX_load_verify_locations 3
11160 gives some advise how to manage your own trusted store of CA certificates.
11162 Disable workarounds for broken certificates.
11163 .It Cd trusted-first
11164 Try building a chain using issuers in the trusted store first to avoid
11165 problems with server-sent legacy intermediate certificates.
11166 Newer versions of OpenSSL support alternative chain checking and enable
11167 it by default, resulting in the same behaviour; also see
11168 .Cd no-alt-chains .
11170 .Mx Va ssl-ca-no-defaults
11171 .It Va ssl-ca-no-defaults-USER@HOST , ssl-ca-no-defaults-HOST ,\
11173 \*(BO\*(OP Do not load the default CA locations that are built into the
11174 used to SSL/TLS library to verify SSL/TLS server certificates.
11176 .It Va ssl-cert-USER@HOST , ssl-cert-HOST , ssl-cert
11177 \*(OB\*(OP Please use the
11180 .Va ssl-config-pairs .
11181 .Mx Va ssl-cipher-list
11182 .It Va ssl-cipher-list-USER@HOST , ssl-cipher-list-HOST , ssl-cipher-list
11183 \*(OB\*(OP Please use the
11186 .Va ssl-config-pairs .
11188 .It Va ssl-config-file
11189 \*(OP If this variable is set
11190 .Xr CONF_modules_load_file 3
11192 .Ql +modules-load-file
11195 is used to allow resource file based configuration of the SSL/TLS library.
11196 This happens once the library is used first, which may also be early
11197 during startup (logged with
11199 If a non-empty value is given then the given file, after performing
11200 .Sx "Filename transformations" ,
11201 will be used instead of the global OpenSSL default, and it is an error
11202 if the file cannot be loaded.
11203 The application name will always be passed as
11205 Some SSL/TLS libraries support application-specific configuration via
11206 resource files loaded like this, please see
11207 .Va ssl-config-module .
11208 .Mx Va ssl-config-module
11209 .It Va ssl-config-module-USER@HOST , ssl-config-module-HOST ,\
11211 \*(OP If file based application-specific configuration via
11212 .Va ssl-config-file
11213 is available, announced as
11217 indicating availability of
11218 .Xr SSL_CTX_config 3 ,
11219 then, it becomes possible to use a central SSL/TLS configuration file
11220 for all programs, including \*(uA, e.g.:
11221 .Bd -literal -offset indent
11222 # Register a configuration section for \*(uA
11223 \*(uA = mailx_master
11224 # The top configuration section creates a relation
11225 # in between dynamic SSL configuration and an actual
11226 # program specific configuration section
11228 ssl_conf = mailx_ssl_config
11229 # Well that actual program specific configuration section
11230 # now can map individual ssl-config-module names to sections,
11231 # e.g., ssl-config-module=account_xy
11233 account_xy = mailx_account_xy
11234 account_yz = mailx_account_yz
11236 MinProtocol = TLSv1.2
11239 CipherString = TLSv1.2:!aNULL:!eNULL:
11240 MinProtocol = TLSv1.1
11243 .Mx Va ssl-config-pairs
11244 .It Va ssl-config-pairs-USER@HOST , ssl-config-pairs-HOST , ssl-config-pairs
11245 \*(OP The value of this variable chain will be interpreted as
11246 a comma-separated list of directive/value pairs.
11247 Different to when placing these pairs in a
11248 .Va ssl-config-module
11250 .Va ssl-config-file
11253 need to be escaped with a reverse solidus
11255 when included in pairs.
11256 Just likewise directives and values need to be separated by equals signs
11258 any whitespace surrounding pair members is removed.
11259 Keys are (usually) case-insensitive.
11260 Unless proper support is announced by
11262 .Pf ( Ql +conf-ctx )
11263 only the keys below are supported, otherwise the pairs will be used
11264 directly as arguments to the function
11265 .Xr SSL_CONF_cmd 3 .
11268 may be preceded with an asterisk
11271 .Sx "Filename transformations"
11272 shall be performed on the value; it is an error if these fail.
11274 .Bl -tag -compact -width ".It Cd C_rtificate"
11276 Filename of a SSL/TLS client certificate (chain) required by some servers.
11277 Fallback support via
11278 .Xr SSL_CTX_use_certificate_chain_file 3 .
11279 .Sx "Filename transformations"
11282 if you use this you need to specify the private key via
11287 A list of ciphers for SSL/TLS connections, see
11289 By default no list of ciphers is set, resulting in a
11290 .Cd Protocol Ns - Ns
11291 specific list of ciphers (the protocol standards define lists of
11292 acceptable ciphers; possibly cramped by the used SSL/TLS library).
11293 Fallback support via
11294 .Xr SSL_CTX_set_cipher_list 3 .
11296 A list of supported elliptic curves, if applicable.
11297 By default no curves are set.
11298 Fallback support via
11299 .Xr SSL_CTX_set1_curves_list 3 ,
11301 .It Cd MaxProtocol , MinProtocol
11302 The maximum and minimum supported SSL/TLS versions, respectively.
11303 Optional fallback support via
11304 .Xr SSL_CTX_set_max_proto_version 3
11306 .Xr SSL_CTX_set_min_proto_version 3
11310 .Ql +ctx-set-maxmin-proto ,
11311 otherwise this directive results in an error.
11312 The fallback uses an internal parser which understands the strings
11317 and the special value
11319 which disables the given limit.
11321 Various flags to set.
11323 .Xr SSL_CTX_set_options 3 ,
11324 in which case any other value but (exactly)
11326 results in an error.
11328 Filename of the private key in PEM format of a SSL/TLS client certificate.
11329 If unset, the name of the certificate file is used.
11330 .Sx "Filename transformations"
11333 .Xr SSL_CTX_use_PrivateKey_file 3 .
11335 if you use this you need to specify the certificate (chain) via
11340 The used SSL/TLS protocol.
11346 .Ql ctx-set-maxmin-proto
11353 .Xr SSL_CTX_set_options 3 ,
11354 driven via an internal parser which understands the strings
11359 and the special value
11361 Multiple protocols may be given as a comma-separated list, any
11362 whitespace is ignored, an optional plus sign
11364 prefix enables, a hyphen-minus
11366 prefix disables a protocol, so that
11368 enables only the TLSv1.2 protocol.
11372 .It Va ssl-crl-dir , ssl-crl-file
11373 \*(OP Specify a directory / a file, respectively that contains a CRL in
11374 PEM format to use when verifying SSL/TLS server certificates.
11376 .It Va ssl-curves-USER@HOST , ssl-curves-HOST , ssl-curves
11377 \*(OB\*(OP Please use the
11380 .Va ssl-config-pairs .
11382 .It Va ssl-features
11383 \*(OP\*(RO This expands to a comma separated list of the TLS/SSL library
11384 identity and optional TLS/SSL library features.
11385 Currently supported identities are
11389 (OpenSSL v1.1.x series)
11392 (elder OpenSSL series, other clones).
11393 Optional features are preceded with a plus sign
11395 when available, and with a hyphen-minus
11398 .Ql modules-load-file
11399 .Pf ( Va ssl-config-file ) ,
11401 .Pf ( Va ssl-config-pairs ) ,
11403 .Pf ( Va ssl-config-module ) ,
11404 .Ql ctx-set-maxmin-proto
11405 .Pf ( Va ssl-config-pairs )
11408 .Pf ( Va ssl-rand-egd ) .
11410 .It Va ssl-key-USER@HOST , ssl-key-HOST , ssl-key
11411 \*(OB\*(OP Please use the
11414 .Va ssl-config-pairs .
11415 .It Va ssl-method-USER@HOST , ssl-method-HOST , ssl-method
11416 \*(OB\*(OP Please use the
11419 .Va ssl-config-pairs .
11420 .Mx Va ssl-protocol
11421 .It Va ssl-protocol-USER@HOST , ssl-protocol-HOST , ssl-protocol
11422 \*(OB\*(OP Please use the
11425 .Va ssl-config-pairs .
11427 .It Va ssl-rand-egd
11428 \*(OP Gives the pathname to an entropy daemon socket, see
11430 Not all SSL/TLS libraries support this,
11432 announces availability with
11435 .It Va ssl-rand-file
11436 \*(OP Gives the filename to a file with random entropy data, see
11437 .Xr RAND_load_file 3 .
11438 If this variable is not set, or set to the empty string, or if the
11439 .Sx "Filename transformations"
11441 .Xr RAND_file_name 3
11442 will be used to create the filename.
11443 If the SSL PRNG was seeded successfully
11444 The file will be updated
11445 .Pf ( Xr RAND_write_file 3 )
11446 if and only if seeding and buffer stirring succeeds.
11447 This variable is only used if
11449 is not set (or not supported by the SSL/TLS library).
11451 .It Va ssl-verify-USER@HOST , ssl-verify-HOST , ssl-verify
11452 \*(OP Variable chain that sets the action to be performed if an error
11453 occurs during SSL/TLS server certificate validation against the
11454 specified or default trust stores
11457 or the SSL/TLS library built-in defaults (unless usage disallowed via
11458 .Va ssl-ca-no-defaults ) ,
11459 and as fine-tuned via
11461 Valid (case-insensitive) values are
11463 (fail and close connection immediately),
11465 (ask whether to continue on standard input),
11467 (show a warning and continue),
11469 (do not perform validation).
11474 If only set without an assigned value, then this setting inhibits the
11480 header fields that include obvious references to \*(UA.
11481 There are two pitfalls associated with this:
11482 First, the message id of outgoing messages is not known anymore.
11483 Second, an expert may still use the remaining information in the header
11484 to track down the originating mail user agent.
11485 If set to the value
11491 suppression does not occur.
11494 (\*(OP) This specifies a comma-separated list of
11499 .Sx "On terminal control and line editor" ,
11500 escape commas with reverse solidus) to be used to overwrite or define
11503 this variable will only be queried once at program startup and can
11504 thus only be specified in resource files or on the command line.
11506 String capabilities form
11508 pairs and are expected unless noted otherwise.
11509 Numerics have to be notated as
11511 where the number is expected in normal decimal notation.
11512 Finally, booleans do not have any value but indicate a true or false
11513 state simply by being defined or not; this indeed means that \*(UA
11514 does not support undefining an existing boolean.
11515 String capability values will undergo some expansions before use:
11516 for one notations like
11519 .Ql control-LETTER ,
11520 and for clarification purposes
11522 can be used to specify
11524 (the control notation
11526 could lead to misreadings when a left bracket follows, which it does for
11527 the standard CSI sequence);
11528 finally three letter octal sequences, as in
11531 To specify that a terminal supports 256-colours, and to define sequences
11532 that home the cursor and produce an audible bell, one might write:
11533 .Bd -literal -offset indent
11534 ? set termcap='Co#256,home=\eE[H,bel=^G'
11537 The following terminal capabilities are or may be meaningful for the
11538 operation of the built-in line editor or \*(UA in general:
11540 .Bl -tag -compact -width ".It Cd yay"
11541 .It Cd colors Ns \0or Cd Co
11543 numeric capability specifying the maximum number of colours.
11544 Note that \*(UA does not actually care about the terminal beside that,
11545 but always emits ANSI / ISO 6429 escape sequences.
11546 .It Cd rmcup Ns \0or Cd te Ns \0/ Cd smcup Ns \0or Cd ti
11549 .Cd enter_ca_mode ,
11550 respectively: exit and enter the alternative screen ca-mode,
11551 effectively turning \*(UA into a fullscreen application.
11552 This must be enabled explicitly by setting
11553 .Va termcap-ca-mode .
11554 .It Cd smkx Ns \0or Cd ks Ns \0/ Cd rmkx Ns \0or Cd ke
11558 respectively: enable and disable the keypad.
11559 This is always enabled if available, because it seems even keyboards
11560 without keypads generate other key codes for, e.g., cursor keys in that
11561 case, and only if enabled we see the codes that we are interested in.
11562 .It Cd ed Ns \0or Cd cd
11565 .It Cd clear Ns \0or Cd cl
11567 clear the screen and home cursor.
11568 (Will be simulated via
11572 .It Cd home Ns \0or Cd ho
11575 .It Cd el Ns \0or Cd ce
11577 clear to the end of line.
11578 (Will be simulated via
11580 plus repetitions of space characters.)
11581 .It Cd hpa Ns \0or Cd ch
11582 .Cd column_address :
11583 move the cursor (to the given column parameter) in the current row.
11584 (Will be simulated via
11589 .Cd carriage_return :
11590 move to the first column in the current row.
11591 The default built-in fallback is
11593 .It Cd cub1 Ns \0or Cd le
11595 move the cursor left one space (non-destructively).
11596 The default built-in fallback is
11598 .It Cd cuf1 Ns \0or Cd nd
11600 move the cursor right one space (non-destructively).
11601 The default built-in fallback is
11603 which is used by most terminals.
11610 Many more capabilities which describe key-sequences are documented for
11613 .It Va termcap-ca-mode
11614 \*(OP Allow usage of the
11618 terminal capabilities, effectively turning \*(UA into a fullscreen
11619 application, as documented for
11622 this variable will only be queried once at program startup and can
11623 thus only be specified in resource files or on the command line.
11625 .It Va termcap-disable
11626 \*(OP Disable any interaction with a terminal control library.
11627 If set only some generic fallback built-ins and possibly the content of
11629 describe the terminal to \*(UA.
11631 this variable will only be queried once at program startup and can
11632 thus only be specified in resource files or on the command line.
11635 If defined, gives the number of lines of a message to be displayed
11638 if unset, the first five lines are printed, if set to 0 the variable
11641 If the value is negative then its absolute value will be used for
11642 unsigned right shifting (see
11649 \*(BO If set then the
11651 command series will strip adjacent empty lines and quotations.
11654 The character set of the terminal \*(UA operates on,
11655 and the one and only supported character set that \*(UA can use if no
11656 character set conversion capabilities have been compiled into it,
11657 in which case it defaults to ISO-8859-1.
11658 Otherwise it defaults to UTF-8.
11659 Sufficient locale support provided the default will be preferably
11660 deduced from the locale environment if that is set (e.g.,
11662 see there for more); runtime locale changes will be reflected by
11664 except during the program startup phase and if
11666 had been used to freeze the given value.
11667 Refer to the section
11668 .Sx "Character sets"
11669 for the complete picture about character sets.
11671 .It Va typescript-mode
11672 \*(BO A special multiplex variable that disables all variables and
11673 settings which result in behaviour that interferes with running \*(UA in
11676 .Va colour-disable ,
11677 .Va line-editor-disable
11678 and (before startup completed only)
11679 .Va termcap-disable .
11680 Unsetting it does not restore the former state of the covered settings.
11683 For a safe-by-default policy the process file mode creation mask
11687 on program startup by default.
11688 Child processes inherit the file mode creation mask of their parent, and
11689 by setting this variable to an empty value no change will be applied,
11690 and the inherited value will be used.
11691 Otherwise the given value will be made the new file mode creation mask.
11693 .It Va user-HOST , user
11694 \*(IN Variable chain that sets a global fallback user name, which is
11695 used in case none has been given in the protocol and account-specific
11697 This variable defaults to the name of the user who runs \*(UA.
11700 \*(BO Setting this enables upward compatibility with \*(UA
11701 version 15.0 in respect to which configuration options are available and
11702 how they are handled.
11703 This manual uses \*(IN and \*(OU to refer to the new and the old way of
11704 doing things, respectively.
11707 \*(BO This setting, also controllable via the command line option
11709 causes \*(UA to be more verbose, e.g., it will display obsoletion
11710 warnings and SSL/TLS certificate chains.
11711 Even though marked \*(BO this option may be set twice in order to
11712 increase the level of verbosity even more, in which case even details of
11713 the actual message delivery and protocol conversations are shown.
11716 is sufficient to disable verbosity as such.
11722 .It Va version , version-date , \
11723 version-hexnum , version-major , version-minor , version-update
11724 \*(RO \*(UA version information: the first variable is a string with
11725 the complete version identification, the second the release date in ISO
11726 8601 notation without time.
11727 The third is a 32-bit hexadecimal number with the upper 8 bits storing
11728 the major, followed by the minor and update version numbers which occupy
11730 The latter three variables contain only decimal digits: the major, minor
11731 and update version numbers.
11732 The output of the command
11734 will include this information.
11736 .It Va writebackedited
11737 If this variable is set messages modified using the
11741 commands are written back to the current folder when it is quit;
11742 it is only honoured for writable folders in MBOX format, though.
11743 Note that the editor will be pointed to the raw message content in that
11744 case, i.e., neither MIME decoding nor decryption will have been
11745 performed, and proper RFC 4155
11747 quoting of newly added or edited content is also left as an exercise to
11752 .Dq environment variable
11753 should be considered an indication that these variables are either
11754 standardized as vivid parts of process environments, or that they are
11755 commonly found in there.
11756 The process environment is inherited from the
11758 once \*(UA is started, and unless otherwise explicitly noted handling of
11759 the following variables transparently integrates into that of the
11760 .Sx "INTERNAL VARIABLES"
11761 from \*(UA's point of view.
11762 This means that, e.g., they can be managed via
11766 causing automatic program environment updates (to be inherited by
11767 newly created child processes).
11769 In order to transparently integrate other environment variables equally
11770 they need to be imported (linked) with the command
11772 This command can also be used to set and unset non-integrated
11773 environment variables from scratch, sufficient system support provided.
11774 The following example, applicable to a POSIX shell, sets the
11776 environment variable for \*(UA only, and beforehand exports the
11778 in order to affect any further processing in the running shell:
11779 .Bd -literal -offset indent
11780 $ EDITOR="vim -u ${HOME}/.vimrc"
11782 $ COLUMNS=80 \*(uA -R
11784 .Bl -tag -width ".It Ev BaNg"
11787 The user's preferred width in column positions for the terminal screen
11789 Queried and used once on program startup, actively managed for child
11790 processes and the MLE (see
11791 .Sx "On terminal control and line editor" )
11792 in interactive mode thereafter.
11793 Ignored in non-interactive mode, which always uses 80 columns, unless in
11798 The name of the (mailbox)
11800 to use for saving aborted messages if
11802 is set; this defaults to
11809 is set no output will be generated, otherwise the contents of the file
11813 Pathname of the text editor to use in the
11817 .Sx "COMMAND ESCAPES" .
11818 A default editor is used if this value is not defined.
11821 The user's home directory.
11822 This variable is only used when it resides in the process environment.
11823 The calling user's home directory will be used instead if this directory
11824 does not exist, is not accessible or cannot be read;
11825 it will always be used for the root user.
11826 (No test for being writable is performed to allow usage by
11827 non-privileged users within read-only jails, but dependent on the
11828 variable settings this directory is a default write target, e.g. for
11835 .It Ev LC_ALL , LC_CTYPE , LANG
11836 \*(OP The (names in lookup order of the)
11840 which indicates the used
11841 .Sx "Character sets" .
11842 Runtime changes trigger automatic updates of the entire locale system,
11843 which includes updating
11845 (except during startup if the variable has been frozen via
11849 The user's preferred number of lines on a page or the vertical screen
11850 or window size in lines.
11851 Queried and used once on program startup, actively managed for child
11852 processes in interactive mode thereafter.
11853 Ignored in non-interactive mode, which always uses 24 lines, unless in
11858 Pathname of the directory lister to use in the
11860 command when operating on local mailboxes.
11863 (path search through
11867 Upon startup \*(UA will actively ensure that this variable refers to the
11868 name of the user who runs \*(UA, in order to be able to pass a verified
11869 name to any newly created child process.
11872 Is used as the users
11874 .Sx "primary system mailbox"
11878 This is assumed to be an absolute pathname.
11881 \*(OP Overrides the default path search for
11882 .Sx "The Mailcap files" ,
11883 which is defined in the standard RFC 1524 as
11884 .Ql ~/.mailcap:\:/etc/mailcap:\:/usr/etc/mailcap:\:/usr/local/etc/mailcap .
11885 (\*(UA makes it a configuration option, however.)
11886 Note this is not a search path, but a path search.
11889 Is used as a startup file instead of
11892 In order to avoid side-effects from configuration files scripts should
11893 either set this variable to
11897 command line option should be used.
11899 .It Ev MAILX_NO_SYSTEM_RC
11900 If this variable is set then reading of
11902 at startup is inhibited, i.e., the same effect is achieved as if \*(UA
11903 had been started up with the option
11905 (and according argument) or
11907 This variable is only used when it resides in the process environment.
11910 The name of the users
11912 .Sx "secondary mailbox"
11914 A logical subset of the special
11915 .Sx "Filename transformations"
11921 Traditionally this MBOX is used as the file to save messages from the
11923 .Sx "primary system mailbox"
11924 that have been read.
11926 .Sx "Message states" .
11929 \*(IN\*(OP This variable overrides the default location of the user's
11934 Pathname of the program to use for backing the command
11938 variable enforces usage of a pager for output.
11939 The default paginator is
11941 (path search through
11944 \*(UA inspects the contents of this variable: if its contains the string
11946 then a non-existing environment variable
11953 will optionally be set to
11959 A colon-separated list of directories that is searched by the shell when
11960 looking for commands, e.g.,
11961 .Ql /bin:/usr/bin:/usr/local/bin .
11963 .It Ev POSIXLY_CORRECT
11964 This variable is automatically looked for upon startup, see
11969 The shell to use for the commands
11974 .Sx "COMMAND ESCAPES"
11975 and when starting subprocesses.
11976 A default shell is used if this environment variable is not defined.
11978 .It Ev SOURCE_DATE_EPOCH
11979 Specifies a time in seconds since the Unix epoch (1970-01-01) to be
11980 used in place of the current time.
11981 This variable is looked up upon program startup, and its existence will
11982 switch \*(UA to a reproducible mode
11983 .Pf ( Lk https://reproducible-builds.org )
11984 which uses deterministic random numbers, a special fixated pseudo
11987 This operation mode is used for development and by software packagers.
11988 \*(ID Currently an invalid setting is only ignored, rather than causing
11989 a program abortion.
11991 .Dl $ SOURCE_DATE_EPOCH=`date +%s` \*(uA
11994 \*(OP The terminal type for which output is to be prepared.
11995 For extended colour and font control please refer to
11996 .Sx "Coloured display" ,
11997 and for terminal management in general to
11998 .Sx "On terminal control and line editor" .
12001 Except for the root user this variable defines the directory for
12002 temporary files to be used instead of
12004 (or the given compile-time constant) if set, existent, accessible as
12005 well as read- and writable.
12006 This variable is only used when it resides in the process environment,
12007 but \*(UA will ensure at startup that this environment variable is
12008 updated to contain a usable temporary directory.
12013 (see there), but this variable is not standardized, should therefore not
12014 be used, and is only corrected if already set.
12017 Pathname of the text editor to use in the
12021 .Sx "COMMAND ESCAPES" .
12024 .Bl -tag -width ".It Pa BaNg"
12026 File giving initial commands, one of the
12027 .Sx "Resource files" .
12029 System wide initialization file, one of the
12030 .Sx "Resource files" .
12033 \*(OP Personal MIME type handler definition file, see
12034 .Sx "The Mailcap files" .
12035 This location is part of the RFC 1524 standard search path, which is
12036 a configuration option and can be overridden via
12039 .It Pa /etc/mailcap
12040 \*(OP System wide MIME type handler definition file, see
12041 .Sx "The Mailcap files" .
12042 This location is part of the RFC 1524 standard search path, which is
12043 a configuration option and can be overridden via
12046 The default value for
12048 The actually used path is a configuration option.
12050 .It Pa ~/.mime.types
12051 Personal MIME types, see
12052 .Sx "The mime.types files" .
12053 The actually used path is a configuration option.
12055 .It Pa /etc/mime.types
12056 System wide MIME types, see
12057 .Sx "The mime.types files" .
12058 The actually used path is a configuration option.
12061 \*(IN\*(OP The default location of the users
12063 file \(en the section
12064 .Sx "The .netrc file"
12065 documents the file format.
12066 The actually used path is a configuration option and can be overridden via
12072 The actually used path is a compile-time constant.
12074 .Ss "Resource files"
12075 Upon startup \*(UA reads in several resource files:
12076 .Bl -tag -width ".It Pa BaNg"
12079 System wide initialization file.
12080 Reading of this file can be suppressed, either by using the
12082 (and according argument) or
12084 command line options, or by setting the
12087 .Ev MAILX_NO_SYSTEM_RC .
12090 File giving initial commands.
12091 A different file can be chosen by setting the
12095 Reading of this file can be suppressed with the
12097 command line option.
12098 .It Va mailx-extra-rc
12099 Defines a startup file to be read after all other resource files.
12100 It can be used to specify settings that are not understood by other
12102 implementations, for example.
12103 This variable is only honoured when defined in a resource file, e.g.,
12105 .Sx "INTERNAL VARIABLES" .
12108 The content of these files is interpreted as follows:
12110 .Bl -bullet -compact
12112 The whitespace characters space, tabulator and newline,
12113 as well as those defined by the variable
12115 are removed from the beginning and end of input lines.
12117 Empty lines are ignored.
12119 Any other line is interpreted as a command.
12120 It may be spread over multiple input lines if the newline character is
12122 by placing a reverse solidus character
12124 as the last character of the line; whereas any leading whitespace of
12125 follow lines is ignored, trailing whitespace before a escaped newline
12126 remains in the input.
12128 If the line (content) starts with the number sign
12130 then it is a comment-command and also ignored.
12131 (The comment-command is a real command, which does nothing, and
12132 therefore the usual follow lines mechanism applies!)
12135 Unless \*(UA is about to enter interactive mode syntax errors that occur
12136 while loading these files are treated as errors and cause program exit.
12137 More files with syntactically equal content can be
12139 The following, saved in a file, would be an examplary content:
12140 .Bd -literal -offset indent
12141 # This line is a comment command. And y\e
12142 es, it is really continued here.
12147 .Ss "The mime.types files"
12149 .Sx "HTML mail and MIME attachments"
12150 \*(UA needs to learn about MIME (Multipurpose Internet Mail Extensions)
12151 media types in order to classify message and attachment content.
12152 One source for them are
12154 files, the loading of which can be controlled by setting the variable
12155 .Va mimetypes-load-control .
12156 Another is the command
12158 which also offers access to \*(UAs MIME type cache.
12160 files have the following syntax:
12161 .Bd -literal -offset indent
12162 type/subtype extension [extension ...]
12163 # E.g., text/html html htm
12168 define the MIME media type, as standardized in RFC 2046:
12170 is used to declare the general type of data, while the
12172 specifies a specific format for that type of data.
12173 One or multiple filename
12175 s, separated by whitespace, can be bound to the media type format.
12176 Comments may be introduced anywhere on a line with a number sign
12178 causing the remaining line to be discarded.
12179 \*(UA also supports an extended, non-portable syntax in especially
12180 crafted files, which can be loaded via the alternative value syntax of
12181 .Va mimetypes-load-control ,
12182 and prepends an optional
12185 .Dl [type-marker ]type/subtype extension [extension ...]
12187 The following type markers are supported:
12189 .Bl -tag -compact -width ".It Ar _n_u"
12191 Treat message parts with this content as plain text.
12196 Treat message parts with this content as HTML tagsoup.
12197 If the \*(OPal HTML-tagsoup-to-text converter is not available treat
12198 the content as plain text instead.
12202 but instead of falling back to plain text require an explicit content
12203 handler to be defined.
12205 If no handler can be found a text message is displayed which says so.
12206 This can be annoying, for example signatures serve a contextual purpose,
12207 their content is of no use by itself.
12208 This marker will avoid displaying the text message.
12212 for sending messages:
12214 .Va mime-allow-text-controls ,
12215 .Va mimetypes-load-control .
12216 For reading etc. messages:
12217 .Sx "HTML mail and MIME attachments" ,
12218 .Sx "The Mailcap files" ,
12220 .Va mime-counter-evidence ,
12221 .Va mimetypes-load-control ,
12222 .Va pipe-TYPE/SUBTYPE ,
12223 .Va pipe-EXTENSION .
12224 .Ss "The Mailcap files"
12225 .Sy This feature is not available in v14.9.0, sorry!
12227 .Dq User Agent Configuration Mechanism
12228 which \*(UA \*(OPally supports (see
12229 .Sx "HTML mail and MIME attachments" ) .
12230 It defines a file format to be used to inform mail user agent programs
12231 about the locally-installed facilities for handling various data
12232 formats, i.e., about commands and how they can be used to display, edit
12233 et cetera MIME part contents, as well as a default path search that
12234 includes multiple possible locations of
12238 environment variable that can be used to overwrite that (repeating here
12239 that it is not a search path, but instead a path search specification).
12240 Any existing files will be loaded in sequence, appending any content to
12241 the list of MIME type handler directives.
12244 files consist of a set of newline separated entries.
12245 Comment lines start with a number sign
12247 (in the first column!) and are ignored.
12248 Empty lines are also ignored.
12249 All other lines form individual entries that must adhere to the syntax
12251 To extend a single entry (not comment) its line can be continued on
12252 follow lines if newline characters are
12254 by preceding them with the reverse solidus character
12256 The standard does not specify how leading whitespace of follow lines
12257 is to be treated, therefore \*(UA retains it.
12260 entries consist of a number of semicolon
12262 separated fields, and the reverse solidus
12264 character can be used to escape any following character including
12265 semicolon and itself.
12266 The first two fields are mandatory and must occur in the specified
12267 order, the remaining fields are optional and may appear in any order.
12268 Leading and trailing whitespace of content is ignored (removed).
12270 The first field defines the MIME
12272 the entry is about to handle (case-insensitively, and no reverse solidus
12273 escaping is possible in this field).
12274 If the subtype is specified as an asterisk
12276 the entry is meant to match all subtypes of the named type, e.g.,
12278 would match any audio type.
12279 The second field defines the shell command which shall be used to
12281 MIME parts of the given type; it is implicitly called the
12287 shell commands message (MIME part) data is passed via standard input
12288 unless the given shell command includes one or more instances of the
12291 in which case these instances will be replaced with a temporary filename
12292 and the data will have been stored in the file that is being pointed to.
12295 shell commands data is assumed to be generated on standard output unless
12296 the given command includes (one ore multiple)
12298 In any case any given
12300 format is replaced with a(n already) properly quoted filename.
12301 Note that when a command makes use of a temporary file via
12303 then \*(UA will remove it again, as if the
12304 .Cd x-mailx-tmpfile ,
12305 .Cd x-mailx-tmpfile-fill
12307 .Cd x-mailx-tmpfile-unlink
12308 flags had been set; see below for more.
12310 The optional fields either define a shell command or an attribute (flag)
12311 value, the latter being a single word and the former being a keyword
12312 naming the field followed by an equals sign
12314 succeeded by a shell command, and as usual for any
12316 content any whitespace surrounding the equals sign will be removed, too.
12317 Optional fields include the following:
12318 .Bl -tag -width ".It Cd BaNg"
12320 A program that can be used to compose a new body or body part in the
12322 (Currently unused.)
12323 .It Cd composetyped
12326 field, but is to be used when the composing program needs to specify the
12328 header field to be applied to the composed data.
12329 (Currently unused.)
12331 A program that can be used to edit a body or body part in the given
12333 (Currently unused.)
12335 A program that can be used to print a message or body part in the given
12337 (Currently unused.)
12339 Specifies a program to be run to test some condition, e.g., the machine
12340 architecture, or the window system in use, to determine whether or not
12341 this mailcap entry applies.
12342 If the test fails, a subsequent mailcap entry should be sought; also see
12343 .Cd x-mailx-test-once .
12345 .It Cd needsterminal
12346 This flag field indicates that the given shell command must be run on
12347 an interactive terminal.
12348 \*(UA will temporarily release the terminal to the given command in
12349 interactive mode, in non-interactive mode this entry will be entirely
12350 ignored; this flag implies
12351 .Cd x-mailx-noquote .
12353 .It Cd copiousoutput
12354 A flag field which indicates that the output of the
12356 command will be an extended stream of textual output that can be
12357 (re)integrated into \*(UA's normal visual display.
12358 It is mutually exclusive with
12359 .Cd needsterminal .
12360 .It Cd textualnewlines
12361 A flag field which indicates that this type of data is line-oriented and
12362 that, if encoded in
12364 all newlines should be converted to canonical form (CRLF) before
12365 encoding, and will be in that form after decoding.
12366 (Currently unused.)
12367 .It Cd nametemplate
12368 This field gives a filename format, in which
12370 will be replaced by a random string, the joined combination of which
12371 will be used as the filename denoted by
12372 .Ev MAILX_FILENAME_TEMPORARY .
12373 One could specify that a GIF file being passed to an image viewer should
12374 have a name ending in
12377 .Ql nametemplate=%s.gif .
12378 Note that \*(UA ignores the name template unless that solely specifies
12379 a filename suffix that consists of (ASCII) alphabetic and numeric
12380 characters, the underscore and dot only.
12382 Names a file, in X11 bitmap (xbm) format, which points to an appropriate
12383 icon to be used to visually denote the presence of this kind of data.
12384 This field is not used by \*(UA.
12386 A textual description that describes this type of data.
12388 .It Cd x-mailx-even-if-not-interactive
12389 An extension flag test field \(em by default handlers without
12391 are entirely ignored in non-interactive mode, but if this flag is set
12392 then their use will be considered.
12393 It is an error if this flag is set for commands that use the flag
12394 .Cd needsterminal .
12396 .It Cd x-mailx-noquote
12397 An extension flag field that indicates that even a
12400 command shall not be used to generate message quotes
12401 (as it would be by default).
12403 .It Cd x-mailx-async
12404 Extension flag field that denotes that the given
12406 command shall be executed asynchronously, without blocking \*(UA.
12407 Cannot be used in conjunction with
12408 .Cd needsterminal .
12410 .It Cd x-mailx-test-once
12411 Extension flag which denotes whether the given
12413 command shall be evaluated once only and the (boolean) result be cached.
12414 This is handy if some global unchanging condition is to be queried, like
12415 .Dq running under the X Window System .
12417 .It Cd x-mailx-tmpfile
12418 Extension flag field that requests creation of a zero-sized temporary
12419 file, the name of which is to be placed in the environment variable
12420 .Ev MAILX_FILENAME_TEMPORARY .
12421 It is an error to use this flag with commands that include a
12425 .It Cd x-mailx-tmpfile-fill
12426 Normally the MIME part content is passed to the handler via standard
12427 input; if this flag is set then the data will instead be written into
12429 .Cd x-mailx-tmpfile .
12430 In order to cause deletion of the temporary file you will have to set
12431 .Cd x-mailx-tmpfile-unlink
12433 It is an error to use this flag with commands that include a
12437 .It Cd x-mailx-tmpfile-unlink
12438 Extension flag field that requests that the temporary file shall be
12439 deleted automatically when the command loop is entered again at latest.
12440 (Do not use this for asynchronous handlers.)
12441 It is an error to use this flag with commands that include a
12443 format, or in conjunction with
12444 .Cd x-mailx-async ,
12445 or without also setting
12446 .Cd x-mailx-tmpfile
12448 .Cd x-mailx-tmpfile-fill .
12450 .It Cd x-mailx-tmpfile-keep
12453 implies the three tmpfile related flags above, but if you want, e.g.,
12455 and deal with the temporary file yourself, you can add in this flag to
12457 .Cd x-mailx-tmpfile-unlink .
12460 The standard includes the possibility to define any number of additional
12461 entry fields, prefixed by
12463 Flag fields apply to the entire
12465 entry \(em in some unusual cases, this may not be desirable, but
12466 differentiation can be accomplished via separate entries, taking
12467 advantage of the fact that subsequent entries are searched if an earlier
12468 one does not provide enough information.
12471 command needs to specify the
12475 command shall not, the following will help out the latter (with enabled
12479 level \*(UA will show information about handler evaluation):
12480 .Bd -literal -offset indent
12481 application/postscript; ps-to-terminal %s; needsterminal
12482 application/postscript; ps-to-terminal %s; compose=idraw %s
12485 In fields any occurrence of the format string
12487 will be replaced by the
12490 Named parameters from the
12492 field may be placed in the command execution line using
12494 followed by the parameter name and a closing
12497 The entire parameter should appear as a single command line argument,
12498 regardless of embedded spaces; thus:
12499 .Bd -literal -offset indent
12501 Content-type: multipart/mixed; boundary=42
12504 multipart/*; /usr/local/bin/showmulti \e
12505 %t %{boundary} ; composetyped = /usr/local/bin/makemulti
12507 # Executed shell command
12508 /usr/local/bin/showmulti multipart/mixed 42
12511 Note that \*(UA does not support handlers for multipart MIME parts as
12512 shown in this example (as of today).
12513 \*(UA does not support the additional formats
12517 An example file, also showing how to properly deal with the expansion of
12519 which includes any quotes that are necessary to make it a valid shell
12520 argument by itself and thus will cause undesired behaviour when placed
12521 in additional user-provided quotes:
12522 .Bd -literal -offset indent
12524 text/richtext; richtext %s; copiousoutput
12526 text/x-perl; perl -cWT %s
12528 application/pdf; \e
12530 trap "rm -f ${infile}" EXIT\e; \e
12531 trap "exit 75" INT QUIT TERM\e; \e
12533 x-mailx-async; x-mailx-tmpfile-keep
12535 application/*; echo "This is \e"%t\e" but \e
12536 is 50 \e% Greek to me" \e; < %s head -c 1024 | cat -vET; \e
12537 copiousoutput; x-mailx-noquote
12541 .Sx "HTML mail and MIME attachments" ,
12542 .Sx "The mime.types files" ,
12545 .Va mime-counter-evidence ,
12546 .Va pipe-TYPE/SUBTYPE ,
12547 .Va pipe-EXTENSION .
12548 .Ss "The .netrc file"
12551 file contains user credentials for machine accounts.
12552 The default location in the user's
12554 directory may be overridden by the
12556 environment variable.
12557 The file consists of space, tabulator or newline separated tokens.
12558 \*(UA implements a parser that supports a superset of the original BSD
12559 syntax, but users should nonetheless be aware of portability glitches
12560 of that file format, shall their
12562 be usable across multiple programs and platforms:
12564 .Bl -bullet -compact
12566 BSD does not support single, but only double quotation marks, e.g.,
12567 .Ql password="pass with spaces" .
12569 BSD (only?) supports escaping of single characters via a reverse solidus
12570 (e.g., a space can be escaped via
12572 in- as well as outside of a quoted string.
12574 BSD does not require a final quotation mark of the last user input token.
12576 The original BSD (Berknet) parser also supported a format which allowed
12577 tokens to be separated with commas \(en whereas at least Hewlett-Packard
12578 still seems to support this syntax, \*(UA does not!
12580 As a non-portable extension some widely-used programs support
12581 shell-style comments: if an input line starts, after any amount of
12582 whitespace, with a number sign
12584 then the rest of the line is ignored.
12586 Whereas other programs may require that the
12588 file is accessible by only the user if it contains a
12590 token for any other
12594 \*(UA will always require these strict permissions.
12597 Of the following list of supported tokens \*(UA only uses (and caches)
12602 At runtime the command
12604 can be used to control \*(UA's
12607 .Bl -tag -width ".It Cd BaNg"
12608 .It Cd machine Ar name
12609 The hostname of the entries' machine, lowercase-normalized by \*(UA
12611 Any further file content, until either end-of-file or the occurrence
12616 first-class token is bound (only related) to the machine
12619 As an extension that should not be the cause of any worries
12620 \*(UA supports a single wildcard prefix for
12622 .Bd -literal -offset indent
12623 machine *.example.com login USER password PASS
12624 machine pop3.example.com login USER password PASS
12625 machine smtp.example.com login USER password PASS
12631 .Ql pop3.example.com ,
12635 .Ql local.smtp.example.com .
12636 Note that in the example neither
12637 .Ql pop3.example.com
12639 .Ql smtp.example.com
12640 will be matched by the wildcard, since the exact matches take
12641 precedence (it is however faster to specify it the other way around).
12643 This is the same as
12645 except that it is a fallback entry that is used shall none of the
12646 specified machines match; only one default token may be specified,
12647 and it must be the last first-class token.
12648 .It Cd login Ar name
12649 The user name on the remote machine.
12650 .It Cd password Ar string
12651 The user's password on the remote machine.
12652 .It Cd account Ar string
12653 Supply an additional account password.
12654 This is merely for FTP purposes.
12655 .It Cd macdef Ar name
12657 A macro is defined with the specified
12659 it is formed from all lines beginning with the next line and continuing
12660 until a blank line is (consecutive newline characters are) encountered.
12663 entries cannot be utilized by multiple machines, too, but must be
12664 defined following the
12666 they are intended to be used with.)
12669 exists, it is automatically run as the last step of the login process.
12670 This is merely for FTP purposes.
12673 .Ss "An example configuration"
12674 .Bd -literal -offset indent
12675 # This example assumes v15.0 compatibility mode
12678 # Request strict SSL/TLS transport security checks
12679 set ssl-verify=strict
12681 # Where are the up-to-date SSL/TLS certificates?
12682 # (Since we manage up-to-date ones explicitly, do not use any,
12683 # possibly outdated, default certificates shipped with OpenSSL)
12684 #set ssl-ca-dir=/etc/ssl/certs
12685 set ssl-ca-file=/etc/ssl/certs/ca-certificates.crt
12686 set ssl-ca-no-defaults
12687 #set ssl-ca-flags=partial-chain
12688 wysh set smime-ca-file="${ssl-ca-file}" \e
12689 smime-ca-no-defaults #smime-ca-flags="${ssl-ca-flags}"
12691 # This could be outsourced to a central configuration file via
12692 # ssl-config-file plus ssl-config-module if the used library allows.
12693 # CipherList: explicitly define the list of ciphers, which may
12694 # improve security, especially with protocols older than TLS v1.2.
12695 # See ciphers(1). Possibly best to only use ssl-cipher-list-HOST
12696 # (or -USER@HOST), as necessary, again..
12697 # Curves: especially with TLSv1.3 curves selection may be desired.
12698 # MinProtocol,MaxProtocol: do not use protocols older than TLS v1.2.
12699 # Change this only when the remote server does not support it:
12700 # maybe use chain support via ssl-config-pairs-HOST / -USER@HOST
12701 # to define such explicit exceptions, then, e.g.
12702 # MinProtocol=TLSv1.1
12703 if [ "$ssl-features" =% +ctx-set-maxmin-proto ]
12704 wysh set ssl-config-pairs='\e
12705 CipherList=TLSv1.2:!aNULL:!eNULL:@STRENGTH,\e
12706 Curves=P-521:P-384:P-256,\e
12707 MinProtocol=TLSv1.1'
12709 wysh set ssl-config-pairs='\e
12710 CipherList=TLSv1.2:!aNULL:!eNULL:@STRENGTH,\e
12711 Curves=P-521:P-384:P-256,\e
12712 Protocol=-ALL\e,+TLSv1.1 \e, +TLSv1.2'
12715 # Essential setting: select allowed character sets
12716 set sendcharsets=utf-8,iso-8859-1
12718 # A very kind option: when replying to a message, first try to
12719 # use the same encoding that the original poster used herself!
12720 set reply-in-same-charset
12722 # When replying, do not merge From: and To: of the original message
12723 # into To:. Instead old From: -> new To:, old To: -> merge Cc:.
12724 set recipients-in-cc
12726 # When sending messages, wait until the Mail-Transfer-Agent finishs.
12727 # Only like this you will be able to see errors reported through the
12728 # exit status of the MTA (including the built-in SMTP one)!
12731 # Only use built-in MIME types, no mime.types(5) files
12732 set mimetypes-load-control
12734 # Default directory where we act in (relative to $HOME)
12736 # A leading "+" (often) means: under *folder*
12737 # *record* is used to save copies of sent messages
12738 set MBOX=+mbox.mbox DEAD=+dead.txt \e
12739 record=+sent.mbox record-files record-resent
12741 # Make "file mymbox" and "file myrec" go to..
12742 shortcut mymbox %:+mbox.mbox myrec +sent.mbox
12744 # Not really optional, e.g., for S/MIME
12745 set from='Your Name <address@exam.ple>'
12747 # It may be necessary to set hostname and/or smtp-hostname
12748 # if the "SERVER" of mta and "domain" of from do not match.
12749 # The `urlencode' command can be used to encode USER and PASS
12750 set mta=(smtps?|submission)://[USER[:PASS]@]SERVER[:PORT] \e
12751 smtp-auth=login/plain... \e
12754 # Never refuse to start into interactive mode, and more
12756 colour-pager crt= \e
12757 followup-to followup-to-honour=ask-yes fullnames \e
12758 history-file=+.\*(uAhist history-size=-1 history-gabby \e
12759 mime-counter-evidence=0b1111 \e
12760 prompt='?\e$?!\e$!/\e$^ERRNAME[\e$account#\e$mailbox-display]? ' \e
12761 reply-to-honour=ask-yes \e
12764 # Only include the selected header fields when typing messages
12765 headerpick type retain from_ date from to cc subject \e
12766 message-id mail-followup-to reply-to
12767 # ...when forwarding messages
12768 headerpick forward retain subject date from to cc
12769 # ...when saving message, etc.
12770 #headerpick save ignore ^Original-.*$ ^X-.*$
12772 # Some mailing lists
12773 mlist '@xyz-editor\e.xyz$' '@xyzf\e.xyz$'
12774 mlsubscribe '^xfans@xfans\e.xyz$'
12776 # Handle a few file extensions (to store MBOX databases)
12777 filetype bz2 'bzip2 -dc' 'bzip2 -zc' \e
12778 gz 'gzip -dc' 'gzip -c' xz 'xz -dc' 'xz -zc' \e
12779 zst 'zstd -dc' 'zstd -19 -zc' \e
12780 zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
12782 # A real life example of a very huge free mail provider
12783 # Instead of directly placing content inside `account',
12784 # we `define' a macro: like that we can switch "accounts"
12785 # from within *on-compose-splice*, for example!
12787 set folder=~/spool/XooglX inbox=+syste.mbox sent=+sent
12788 set from='Your Name <address@examp.ple>'
12790 set pop3-no-apop-pop.gmXil.com
12791 shortcut pop %:pop3s://pop.gmXil.com
12792 shortcut imap %:imaps://imap.gmXil.com
12793 #set record="+[Gmail]/Sent Mail"
12794 # Select: File imaps://imap.gmXil.com/[Gmail]/Sent\e Mail
12796 set mta=smtp://USER:PASS@smtp.gmXil.com smtp-use-starttls
12798 set mta=smtps://USER:PASS@smtp.gmail.com:465
12804 # Here is a pretty large one which does not allow sending mails
12805 # if there is a domain name mismatch on the SMTP protocol level,
12806 # which would bite us if the value of from does not match, e.g.,
12807 # for people who have a sXXXXeforge project and want to speak
12808 # with the mailing list under their project account (in from),
12809 # still sending the message through their normal mail provider
12811 set folder=~/spool/XandeX inbox=+syste.mbox sent=+sent
12812 set from='Your Name <address@exam.ple>'
12814 shortcut pop %:pop3s://pop.yaXXex.com
12815 shortcut imap %:imaps://imap.yaXXex.com
12817 set mta=smtps://USER:PASS@smtp.yaXXex.com:465 \e
12818 hostname=yaXXex.com smtp-hostname=
12824 # Create some new commands so that, e.g., `ls /tmp' will..
12825 commandalias lls '!ls ${LS_COLOR_FLAG} -aFlrS'
12826 commandalias llS '!ls ${LS_COLOR_FLAG} -aFlS'
12828 set pipe-message/external-body='@* echo $MAILX_EXTERNAL_BODY_URL'
12830 # We do not support gpg(1) directly yet. But simple --clearsign'd
12831 # message parts can be dealt with as follows:
12834 wysh set pipe-text/plain=$'@*#++=@\e
12835 < "${MAILX_FILENAME_TEMPORARY}" awk \e
12836 -v TMPFILE="${MAILX_FILENAME_TEMPORARY}" \e'\e
12838 /^-----BEGIN PGP SIGNED MESSAGE-----/,/^$/ {\e
12841 print "--- GPG --verify ---";\e
12842 system("gpg --verify " TMPFILE " 2>&1");\e
12843 print "--- GPG --verify ---";\e
12847 /^-----BEGIN PGP SIGNATURE-----/,\e
12848 /^-----END PGP SIGNATURE-----/{\e
12855 commandalias V '\e'call V
12858 When storing passwords in
12860 appropriate permissions should be set on this file with
12861 .Ql $ chmod 0600 \*(ur .
12864 is available user credentials can be stored in the central
12866 file instead; e.g., here is a different version of the example account
12867 that sets up SMTP and POP3:
12868 .Bd -literal -offset indent
12870 set folder=~/spool/XandeX inbox=+syste.mbox sent=+sent
12871 set from='Your Name <address@exam.ple>'
12873 # Load an encrypted ~/.netrc by uncommenting the next line
12874 #set netrc-pipe='gpg -qd ~/.netrc.pgp'
12876 set mta=smtps://smtp.yXXXXx.ru:465 \e
12877 smtp-hostname= hostname=yXXXXx.com
12878 set pop3-keepalive=240 pop3-no-apop-pop.yXXXXx.ru
12879 commandalias xp fi pop3s://pop.yXXXXx.ru
12889 .Bd -literal -offset indent
12890 machine *.yXXXXx.ru login USER password PASS
12893 This configuration should now work just fine:
12895 .Dl $ echo text | \*(uA -dvv -AXandeX -s Subject user@exam.ple
12896 .Ss "S/MIME step by step"
12897 \*(OP The first thing you need for participating in S/MIME message
12898 exchange is your personal certificate, including a private key.
12899 The certificate contains public information, in particular your name and
12900 your email address(es), and the public key that is used by others to
12901 encrypt messages for you,
12902 and to verify signed messages they supposedly received from you.
12903 The certificate is included in each signed message you send.
12904 The private key must be kept secret.
12905 It is used to decrypt messages that were previously encrypted with your
12906 public key, and to sign messages.
12908 For personal use it is recommended that you get a S/MIME certificate
12909 from one of the major CAs on the Internet using your WWW browser.
12910 Many CAs offer such certificates for free.
12912 .Lk https://www.CAcert.org
12913 which issues client and server certificates to members of their
12914 community for free; their root certificate
12915 .Pf ( Lk https://\:www.cacert.org/\:certs/\:root.crt )
12916 is often not in the default set of trusted CA root certificates, though,
12917 which means you will have to download their root certificate separately
12918 and ensure it is part of our S/MIME certificate validation chain by
12921 or as a vivid member of the
12922 .Va smime-ca-file .
12923 But let us take a step-by-step tour on how to setup S/MIME with
12924 a certificate from CAcert.org despite this situation!
12926 First of all you will have to become a member of the CAcert.org
12927 community, simply by registrating yourself via the web interface.
12928 Once you are, create and verify all email addresses you want to be able
12929 to create signed and encrypted messages for/with using the corresponding
12930 entries of the web interface.
12931 Now ready to create S/MIME certificates, so let us create a new
12932 .Dq client certificate ,
12933 ensure to include all email addresses that should be covered by the
12934 certificate in the following web form, and also to use your name as the
12937 Create a private key and a certificate request on your local computer
12938 (please see the manual pages of the used commands for more in-depth
12939 knowledge on what the used arguments etc. do):
12941 .Dl $ openssl req -nodes -newkey rsa:4096 -keyout key.pem -out creq.pem
12943 Afterwards copy-and-paste the content of
12945 into the certificate-request (CSR) field of the web form on the
12946 CAcert.org website (you may need to unfold some
12947 .Dq advanced options
12948 to see the corresponding text field).
12949 This last step will ensure that your private key (which never left your
12950 box) and the certificate belong together (through the public key that
12951 will find its way into the certificate via the certificate-request).
12952 You are now ready and can create your CAcert certified certificate.
12953 Download and store or copy-and-paste it as
12957 In order to use your new S/MIME setup a combined private key/public key
12958 (certificate) file has to be created:
12960 .Dl $ cat key.pem pub.crt > ME@HERE.com.paired
12962 This is the file \*(UA will work with.
12963 If you have created your private key with a passphrase then \*(UA will
12964 ask you for it whenever a message is signed or decrypted.
12965 Set the following variables to henceforth use S/MIME (setting
12967 is of interest for verification only):
12968 .Bd -literal -offset indent
12969 ? set smime-ca-file=ALL-TRUSTED-ROOT-CERTS-HERE \e
12970 smime-sign-cert=ME@HERE.com.paired \e
12971 smime-sign-message-digest=SHA256 \e
12974 .Ss "Using CRLs with S/MIME or SSL/TLS"
12975 \*(OP Certification authorities (CAs) issue certificate revocation
12976 lists (CRLs) on a regular basis.
12977 These lists contain the serial numbers of certificates that have been
12978 declared invalid after they have been issued.
12979 Such usually happens because the private key for the certificate has
12981 because the owner of the certificate has left the organization that is
12982 mentioned in the certificate, etc.
12983 To seriously use S/MIME or SSL/TLS verification,
12984 an up-to-date CRL is required for each trusted CA.
12985 There is otherwise no method to distinguish between valid and
12986 invalidated certificates.
12987 \*(UA currently offers no mechanism to fetch CRLs, nor to access them on
12988 the Internet, so they have to be retrieved by some external mechanism.
12990 \*(UA accepts CRLs in PEM format only;
12991 CRLs in DER format must be converted, like, e.\|g.:
12993 .Dl $ openssl crl \-inform DER \-in crl.der \-out crl.pem
12995 To tell \*(UA about the CRLs, a directory that contains all CRL files
12996 (and no other files) must be created.
13001 variables, respectively, must then be set to point to that directory.
13002 After that, \*(UA requires a CRL to be present for each CA that is used
13003 to verify a certificate.
13005 In general it is a good idea to turn on
13011 twice) if something does not work well.
13012 Very often a diagnostic message can be produced that leads to the
13013 problems' solution.
13014 .Ss "\*(UA shortly hangs on startup"
13015 This can have two reasons, one is the necessity to wait for a file lock
13016 and cannot be helped, the other being that \*(UA calls the function
13018 in order to query the nodename of the box (sometimes the real one is
13019 needed instead of the one represented by the internal variable
13021 One may have varying success by ensuring that the real hostname and
13025 or, more generally, that the name service is properly setup \(en
13028 return the expected value?
13029 Does this local hostname have a domain suffix?
13030 RFC 6762 standardized the link-local top-level domain
13032 try again after adding an (additional) entry with this extension.
13033 .Ss "I cannot login to Google mail aka GMail"
13034 Since 2014 some free service providers classify programs as
13036 unless they use a special authentication method (OAuth 2.0) which
13037 was not standardized for non-HTTP protocol authentication token query
13038 until August 2015 (RFC 7628).
13040 Different to Kerberos / GSSAPI, which is developed since the mid of the
13041 1980s, where a user can easily create a local authentication ticket for
13042 her- and himself with the locally installed
13044 program, that protocol has no such local part but instead requires
13045 a world-wide-web query to create or fetch a token; since there is no
13046 local cache this query would have to be performed whenever \*(UA is
13047 invoked (in interactive sessions situation may differ).
13049 \*(UA does not support OAuth.
13050 Because of this it is necessary to declare \*(UA a
13051 .Dq less secure app
13052 (on the providers account web page) in order to read and send mail.
13053 However, it also seems possible to take the following steps instead:
13057 give the provider the number of a mobile phone,
13060 .Dq 2-Step Verification ,
13062 create an application specific password (16 characters), and
13064 use that special password instead of the real Google account password in
13065 \*(UA (for more on that see the section
13066 .Sx "On URL syntax and credential lookup" ) .
13068 .Ss "Not \(dqdefunctional\(dq, but the editor key does not work"
13069 It can happen that the terminal library (see
13070 .Sx "On terminal control and line editor",
13073 reports different codes than the terminal really sends, in which case
13074 \*(UA will tell that a key binding is functional, but will not be able to
13075 recognize it because the received data does not match anything expected.
13076 Especially without the \*(OPal terminal capability library support one
13077 reason for this may be that the (possibly even non-existing) keypad
13078 is not turned on and the resulting layout reports the keypad control
13079 codes for the normal keyboard keys.
13084 ings will show the byte sequences that are expected.
13086 To overcome the situation, use, e.g., the program
13088 in conjunction with the command line option
13090 if available, to see the byte sequences which are actually produced
13091 by keypresses, and use the variable
13093 to make \*(UA aware of them.
13094 E.g., the terminal this is typed on produces some false sequences, here
13095 an example showing the shifted home key:
13096 .Bd -literal -offset indent
13099 # 1B 5B=[ 31=1 3B=; 32=2 48=H
13104 ? \*(uA -v -Stermcap='kHOM=\eE[H'
13109 .Ss "Can \*(UA git-send-email?"
13111 Put (at least parts of) the following in your
13113 .Bd -literal -offset indent
13115 smtpserver = /usr/bin/s-mailx
13116 smtpserveroption = -t
13117 #smtpserveroption = -Sexpandaddr
13118 smtpserveroption = -Athe-account-you-need
13121 suppressfrom = false
13122 assume8bitEncoding = UTF-8
13125 chainreplyto = true
13132 \*(OPally there is IMAP client support available.
13133 This part of the program is obsolete and will vanish in v15 with the
13134 large MIME and I/O layer rewrite, because it uses old-style blocking I/O
13135 and makes excessive use of signal based long code jumps.
13136 Support can hopefully be readded later based on a new-style I/O, with
13137 SysV signal handling.
13138 In fact the IMAP support had already been removed from the codebase, but
13139 was reinstantiated on user demand: in effect the IMAP code is at the
13140 level of \*(UA v14.8.16 (with
13142 being the sole exception), and should be treated with some care.
13148 protocol prefixes, and an IMAP-based
13151 IMAP URLs (paths) undergo inspections and possible transformations
13152 before use (and the command
13154 can be used to manually apply them to any given argument).
13155 Hierarchy delimiters are normalized, a step which is configurable via the
13157 variable chain, but defaults to the first seen delimiter otherwise.
13158 \*(UA supports internationalised IMAP names, and en- and decodes the
13159 names from and to the
13161 as necessary and possible.
13162 If a mailbox name is expanded (see
13163 .Sx "Filename transformations" )
13164 to an IMAP mailbox, all names that begin with `+' then refer to IMAP
13165 mailboxes below the
13167 target box, while folder names prefixed by `@' refer to folders below
13168 the hierarchy base, e.g., the following lists all folders below the
13169 current one when in an IMAP mailbox:
13172 Note: some IMAP servers do not accept the creation of mailboxes in
13173 the hierarchy base, but require that they are created as subfolders of
13174 `INBOX' \(en with such servers a folder name of the form
13176 .Dl imaps://mylogin@imap.myisp.example/INBOX.
13178 should be used (the last character is the server's hierarchy
13180 The following IMAP-specific commands exist:
13181 .Bl -tag -width ".It Ic BaNg"
13184 Only applicable to cached IMAP mailboxes;
13185 takes a message list and reads the specified messages into the IMAP
13189 If operating in disconnected mode on an IMAP mailbox,
13190 switch to online mode and connect to the mail server while retaining
13191 the mailbox status.
13192 See the description of the
13194 variable for more information.
13197 If operating in online mode on an IMAP mailbox,
13198 switch to disconnected mode while retaining the mailbox status.
13199 See the description of the
13202 A list of messages may optionally be given as argument;
13203 the respective messages are then read into the cache before the
13204 connection is closed, thus
13206 makes the entire mailbox available for disconnected use.
13209 Sends command strings directly to the current IMAP server.
13210 \*(UA operates always in IMAP `selected state' on the current mailbox;
13211 commands that change this will produce undesirable results and should be
13213 Useful IMAP commands are:
13214 .Bl -tag -offset indent -width ".Ic getquotearoot"
13216 Takes the name of an IMAP mailbox as an argument and creates it.
13218 (RFC 2087) Takes the name of an IMAP mailbox as an argument
13219 and prints the quotas that apply to the mailbox.
13220 Not all IMAP servers support this command.
13222 (RFC 2342) Takes no arguments and prints the Personal Namespaces,
13223 the Other User's Namespaces and the Shared Namespaces.
13224 Each namespace type is printed in parentheses;
13225 if there are multiple namespaces of the same type,
13226 inner parentheses separate them.
13227 For each namespace a prefix and a hierarchy separator is listed.
13228 Not all IMAP servers support this command.
13232 Perform IMAP path transformations.
13236 .Sx "Command modifiers" ) ,
13237 and manages the error number
13239 The first argument specifies the operation:
13241 normalizes hierarchy delimiters (see
13243 and converts the strings from the locale
13245 to the internationalized variant used by IMAP,
13247 performs the reverse operation.
13250 The following IMAP-specific internal variables exist:
13251 .Bl -tag -width ".It Va BaNg"
13253 .It Va disconnected
13254 \*(BO When an IMAP mailbox is selected and this variable is set,
13255 no connection to the server is initiated.
13256 Instead, data is obtained from the local cache (see
13259 Mailboxes that are not present in the cache
13260 and messages that have not yet entirely been fetched from the server
13262 to fetch all messages in a mailbox at once,
13264 .No ` Ns Li copy * /dev/null Ns '
13265 can be used while still in connected mode.
13266 Changes that are made to IMAP mailboxes in disconnected mode are queued
13267 and committed later when a connection to that server is made.
13268 This procedure is not completely reliable since it cannot be guaranteed
13269 that the IMAP unique identifiers (UIDs) on the server still match the
13270 ones in the cache at that time.
13273 when this problem occurs.
13274 .It Va disconnected-USER@HOST
13275 The specified account is handled as described for the
13278 but other accounts are not affected.
13280 .It Va imap-auth-USER@HOST , imap-auth
13281 Sets the IMAP authentication method.
13282 Valid values are `login' for the usual password-based authentication
13284 `cram-md5', which is a password-based authentication that does not send
13285 the password over the network in clear text,
13286 and `gssapi' for GSS-API based authentication.
13289 Enables caching of IMAP mailboxes.
13290 The value of this variable must point to a directory that is either
13291 existent or can be created by \*(UA.
13292 All contents of the cache can be deleted by \*(UA at any time;
13293 it is not safe to make assumptions about them.
13295 .It Va imap-delim-USER@HOST , imap-delim-HOST , imap-delim
13296 The hierarchy separator used by the IMAP server.
13297 Whenever an IMAP path is specified it will undergo normalization.
13298 One of the normalization steps is the squeezing and adjustment of
13299 hierarchy separators.
13300 If this variable is set, any occurrence of any character of the given
13301 value that exists in the path will be replaced by the first member of
13302 the value; an empty value will cause the default to be used, it is
13304 If not set, we will reuse the first hierarchy separator character that
13305 is discovered in a user-given mailbox name.
13306 .Mx Va imap-keepalive
13307 .It Va imap-keepalive-USER@HOST , imap-keepalive-HOST , imap-keepalive
13308 IMAP servers may close the connection after a period of
13309 inactivity; the standard requires this to be at least 30 minutes,
13310 but practical experience may vary.
13311 Setting this variable to a numeric `value' greater than 0 causes
13312 a `NOOP' command to be sent each `value' seconds if no other operation
13315 .It Va imap-list-depth
13316 When retrieving the list of folders on an IMAP server, the
13318 command stops after it has reached a certain depth to avoid possible
13320 The value of this variable sets the maximum depth allowed.
13322 If the folder separator on the current IMAP server is a slash `/',
13323 this variable has no effect and the
13325 command does not descend to subfolders.
13326 .Mx Va imap-use-starttls
13327 .It Va imap-use-starttls-USER@HOST , imap-use-starttls-HOST , imap-use-starttls
13328 Causes \*(UA to issue a `STARTTLS' command to make an unencrypted
13329 IMAP session SSL/TLS encrypted.
13330 This functionality is not supported by all servers,
13331 and is not used if the session is already encrypted by the IMAPS method.
13341 .Xr spamassassin 1 ,
13350 .Xr mailwrapper 8 ,
13353 M. Douglas McIlroy writes in his article
13354 .Dq A Research UNIX Reader: Annotated Excerpts \
13355 from the Programmer's Manual, 1971-1986
13358 command already appeared in First Edition
13361 .Bd -ragged -offset indent
13362 Electronic mail was there from the start.
13363 Never satisfied with its exact behavior, everybody touched it at one
13364 time or another: to assure the safety of simultaneous access, to improve
13365 privacy, to survive crashes, to exploit uucp, to screen out foreign
13366 freeloaders, or whatever.
13367 Not until v7 did the interface change (Thompson).
13368 Later, as mail became global in its reach, Dave Presotto took charge and
13369 brought order to communications with a grab-bag of external networks
13374 Mail was written in 1978 by Kurt Shoens and developed as part of the
13377 distribution until 1995.
13378 Mail has then seen further development in open source
13380 variants, noticeably by Christos Zoulas in
13382 Based upon this Nail, later Heirloom Mailx, was developed by Gunnar
13383 Ritter in the years 2000 until 2008.
13384 Since 2012 S-nail is maintained by Steffen (Daode) Nurpmeso.
13385 This man page is derived from
13386 .Dq The Mail Reference Manual
13387 that was originally written by Kurt Shoens.
13390 .An "Kurt Shoens" ,
13391 .An "Edward Wang" ,
13392 .An "Keith Bostic" ,
13393 .An "Christos Zoulas" ,
13394 .An "Gunnar Ritter" .
13395 \*(UA is developed by
13396 .An "Steffen Nurpmeso" Aq steffen@sdaoden.eu .
13398 \*(ID Interrupting an operation via
13402 from anywhere else but a command prompt is very problematic and likely
13403 to leave the program in an undefined state: many library functions
13404 cannot deal with the
13406 that this software (still) performs; even though efforts have been taken
13407 to address this, no sooner but in v15 it will have been worked out:
13408 interruptions have not been disabled in order to allow forceful breakage
13409 of hanging network connections, for example (all this is unrelated to
13412 The SMTP and POP3 protocol support of \*(UA is very basic.
13413 Also, if it fails to contact its upstream SMTP server, it will not make
13414 further attempts to transfer the message at a later time (setting
13419 If this is a concern, it might be better to set up a local SMTP server
13420 that is capable of message queuing.
13422 After deleting some message of a POP3 mailbox the header summary falsely
13423 claims that there are no messages to display, one needs to perform
13424 a scroll or dot movement to restore proper state.
13425 In threaded display a power user may encounter crashes very
13426 occasionally (this is may and very).
13429 in the source repository lists future directions.
13431 Please report bugs to the
13433 address, e.g., from within \*(uA:
13434 .Ql ? Ns \| Ic eval Ns \| Ic mail Ns \| $contact-mail .
13435 Including the output of the command
13437 may be helpful, e.g.,
13438 .Bd -literal -offset indent
13439 ? vput version xy; wysh set escape=!; eval mail $contact-mail
13445 More information is available on the web:
13446 .Ql $ \*(uA -X 'echo Ns \| $ Ns Va contact-web Ns ' -Xx .