Bump S-nail v14.8.11.ar, 2016-10-03
[s-mailx.git] / nail.1
blob0bf650780006d69758bb8a6353279c3deacdb9ad
1 .\" Copyright (c) 1980, 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\" Copyright (c) 2000
4 .\"     Gunnar Ritter.  All rights reserved.
5 .\" Copyright (c) 2012 - 2015 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. All advertising materials mentioning features or use of this software
16 .\"    must display the following acknowledgement:
17 .\"     This product includes software developed by the University of
18 .\"     California, Berkeley and its contributors.
19 .\"     This product includes software developed by Gunnar Ritter
20 .\"     and his contributors.
21 .\" 4. Neither the name of the University nor the names of its contributors
22 .\"    may be used to endorse or promote products derived from this software
23 .\"    without specific prior written permission.
24 .\"
25 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS 'AS IS' AND
26 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .\" SUCH DAMAGE.
36 .\"
37 .\"@ S-nail(1): v14.8.11 / 2016-10-03
38 .Dd Oct 03, 2016
39 .ds VV \\%v14.8.11
40 .\"--MKMAN-START--
41 .ds UU \\%S-NAIL
42 .ds UA \\%S-nail
43 .ds ua \\%s-nail
44 .ds UR \\%s-nail.rc
45 .\"--MKMAN-END--
46 .ds ur \\%~/.mailrc
47 .ds OB [Obsolete]
48 .ds OP [Option]
49 .ds IN [v15-compat]
50 .ds OU [no v15-compat]
51 .ds ID [v15 behaviour may differ]
52 .ds BY (Binary)
53 .ds RO (Read-only)
54 .Dt "\*(UU" 1
55 .Os
56 .\" Uncomment for mandoc(1) compat.:
57 .\".ds mx-toc-name TABLE OF CONTENTS
58 .Mx -enable -preprocessed
59 .Mx -anchor-spass Sh "NAME" 1
60 .Mx -anchor-spass Sh "SYNOPSIS" 2
61 .Mx -anchor-spass Sh "\*[mx-toc-name]" 3
62 .Mx -anchor-spass Sh "DESCRIPTION" 4
63 .Mx -anchor-spass Sh "COMMANDS" 5
64 .Mx -anchor-spass Sh "TILDE ESCAPES" 6
65 .Mx -anchor-spass Sh "VARIABLE OPTIONS" 7
66 .Mx -anchor-spass Sh "ENVIRONMENT" 8
67 .Mx -anchor-spass Sh "FILES" 9
68 .Mx -anchor-spass Sh "EXAMPLES" 10
69 .Mx -anchor-spass Sh "FAQ" 11
70 .Mx -anchor-spass Sh "SEE ALSO" 12
71 .Mx -anchor-spass Sh "HISTORY" 13
72 .Mx -anchor-spass Sh "AUTHORS" 14
73 .Mx -anchor-spass Sh "CAVEATS" 15
74 .Mx -anchor-spass Sh "BUGS" 16
75 .Mx -anchor-spass Ss "Options" 4
76 .Mx -anchor-spass Ss "A starter" 4
77 .Mx -anchor-spass Ss "Sending mail" 4
78 .Mx -anchor-spass Ss "Reading mail" 4
79 .Mx -anchor-spass Ss "Viewing HTML mail and MIME attachments" 4
80 .Mx -anchor-spass Ss "Mailing lists" 4
81 .Mx -anchor-spass Ss "Resource files" 4
82 .Mx -anchor-spass Ss "Character sets" 4
83 .Mx -anchor-spass Ss "Message states" 4
84 .Mx -anchor-spass Ss "Specifying messages" 4
85 .Mx -anchor-spass Ss "On URL syntax and credential lookup" 4
86 .Mx -anchor-spass Ss "Command line editor" 4
87 .Mx -anchor-spass Ss "Coloured message display" 4
88 .Mx -anchor-spass Ss "Initial Settings" 7
89 .Mx -anchor-spass Ss "Binary options" 7
90 .Mx -anchor-spass Ss "Value options" 7
91 .Mx -anchor-spass Ss "The mime.types files" 9
92 .Mx -anchor-spass Ss "The .netrc file" 9
93 .Mx -anchor-spass Ss "An example configuration" 10
94 .Mx -anchor-spass Ss "Signed and encrypted messages with S/MIME" 10
95 .Mx -anchor-spass Ss "Using CRLs with S/MIME or SSL/TLS" 10
96 .Mx -anchor-spass Ss "Handling spam" 10
97 .Mx -anchor-spass Ss "\*(UA shortly hangs on startup" 11
98 .Mx -anchor-spass Ss "I can't login to Google mail a.k.a. GMail" 11
99 .Mx -anchor-spass Fl "A"
100 .Mx -anchor-spass Fl "a"
101 .Mx -anchor-spass Fl "B"
102 .Mx -anchor-spass Fl "b"
103 .Mx -anchor-spass Fl "c"
104 .Mx -anchor-spass Fl "D"
105 .Mx -anchor-spass Fl "d"
106 .Mx -anchor-spass Fl "E"
107 .Mx -anchor-spass Fl "e"
108 .Mx -anchor-spass Fl "F"
109 .Mx -anchor-spass Fl "f"
110 .Mx -anchor-spass Fl "H"
111 .Mx -anchor-spass Fl "h"
112 .Mx -anchor-spass Fl "i"
113 .Mx -anchor-spass Fl "L"
114 .Mx -anchor-spass Fl "N"
115 .Mx -anchor-spass Fl "n"
116 .Mx -anchor-spass Fl "q"
117 .Mx -anchor-spass Fl "R"
118 .Mx -anchor-spass Fl "r"
119 .Mx -anchor-spass Fl "S"
120 .Mx -anchor-spass Fl "s"
121 .Mx -anchor-spass Fl "t"
122 .Mx -anchor-spass Fl "u"
123 .Mx -anchor-spass Fl "V"
124 .Mx -anchor-spass Fl "v"
125 .Mx -anchor-spass Fl "X"
126 .Mx -anchor-spass Fl "~"
127 .Mx -anchor-spass Fl "#"
128 .Mx -anchor-spass Fl "."
129 .Mx -anchor-spass Pa "\*(UR"
130 .Mx -anchor-spass Pa "\*(ur"
131 .Mx -anchor-spass Ic "#"
132 .Mx -anchor-spass Ic "~"
133 .Mx -anchor-spass Ic "-"
134 .Mx -anchor-spass Ic "="
135 .Mx -anchor-spass Ic "?"
136 .Mx -anchor-spass Ic "!"
137 .Mx -anchor-spass Ic "|"
138 .Mx -anchor-spass Ic "account"
139 .Mx -anchor-spass Ic "alias"
140 .Mx -anchor-spass Ic "alternates"
141 .Mx -anchor-spass Ic "answered"
142 .Mx -anchor-spass Ic "cache"
143 .Mx -anchor-spass Ic "call"
144 .Mx -anchor-spass Ic "cd"
145 .Mx -anchor-spass Ic "certsave"
146 .Mx -anchor-spass Ic "chdir"
147 .Mx -anchor-spass Ic "collapse"
148 .Mx -anchor-spass Ic "connect"
149 .Mx -anchor-spass Ic "Copy"
150 .Mx -anchor-spass Ic "copy"
151 .Mx -anchor-spass Ic "cwd"
152 .Mx -anchor-spass Ic "Decrypt"
153 .Mx -anchor-spass Ic "decrypt"
154 .Mx -anchor-spass Ic "define"
155 .Mx -anchor-spass Ic "delete"
156 .Mx -anchor-spass Ic "discard"
157 .Mx -anchor-spass Ic "disconnect"
158 .Mx -anchor-spass Ic "dp"
159 .Mx -anchor-spass Ic "dt"
160 .Mx -anchor-spass Ic "draft"
161 .Mx -anchor-spass Ic "echo"
162 .Mx -anchor-spass Ic "edit"
163 .Mx -anchor-spass Ic "elif"
164 .Mx -anchor-spass Ic "else"
165 .Mx -anchor-spass Ic "endif"
166 .Mx -anchor-spass Ic "errors"
167 .Mx -anchor-spass Ic "exit"
168 .Mx -anchor-spass Ic "features"
169 .Mx -anchor-spass Ic "File"
170 .Mx -anchor-spass Ic "file"
171 .Mx -anchor-spass Ic "flag"
172 .Mx -anchor-spass Ic "folder"
173 .Mx -anchor-spass Ic "folders"
174 .Mx -anchor-spass Ic "Followup"
175 .Mx -anchor-spass Ic "followup"
176 .Mx -anchor-spass Ic "followupall"
177 .Mx -anchor-spass Ic "followupsender"
178 .Mx -anchor-spass Ic "Forward"
179 .Mx -anchor-spass Ic "forward"
180 .Mx -anchor-spass Ic "from"
181 .Mx -anchor-spass Ic "Fwd"
182 .Mx -anchor-spass Ic "fwd"
183 .Mx -anchor-spass Ic "fwdignore"
184 .Mx -anchor-spass Ic "fwdretain"
185 .Mx -anchor-spass Ic "ghost"
186 .Mx -anchor-spass Ic "headers"
187 .Mx -anchor-spass Ic "help"
188 .Mx -anchor-spass Ic "history"
189 .Mx -anchor-spass Ic "hold"
190 .Mx -anchor-spass Ic "if"
191 .Mx -anchor-spass Ic "ignore"
192 .Mx -anchor-spass Ic "imap"
193 .Mx -anchor-spass Ic "inc"
194 .Mx -anchor-spass Ic "list"
195 .Mx -anchor-spass Ic "localopts"
196 .Mx -anchor-spass Ic "Lreply"
197 .Mx -anchor-spass Ic "Mail"
198 .Mx -anchor-spass Ic "mail"
199 .Mx -anchor-spass Ic "mbox"
200 .Mx -anchor-spass Ic "mimetype"
201 .Mx -anchor-spass Ic "mlist"
202 .Mx -anchor-spass Ic "mlsubscribe"
203 .Mx -anchor-spass Ic "Move"
204 .Mx -anchor-spass Ic "move"
205 .Mx -anchor-spass Ic "More"
206 .Mx -anchor-spass Ic "more"
207 .Mx -anchor-spass Ic "netrc"
208 .Mx -anchor-spass Ic "newmail"
209 .Mx -anchor-spass Ic "next"
210 .Mx -anchor-spass Ic "New"
211 .Mx -anchor-spass Ic "new"
212 .Mx -anchor-spass Ic "noop"
213 .Mx -anchor-spass Ic "Page"
214 .Mx -anchor-spass Ic "page"
215 .Mx -anchor-spass Ic "Pipe"
216 .Mx -anchor-spass Ic "pipe"
217 .Mx -anchor-spass Ic "preserve"
218 .Mx -anchor-spass Ic "Print"
219 .Mx -anchor-spass Ic "print"
220 .Mx -anchor-spass Ic "quit"
221 .Mx -anchor-spass Ic "redirect"
222 .Mx -anchor-spass Ic "Redirect"
223 .Mx -anchor-spass Ic "remove"
224 .Mx -anchor-spass Ic "rename"
225 .Mx -anchor-spass Ic "Reply"
226 .Mx -anchor-spass Ic "reply"
227 .Mx -anchor-spass Ic "replyall"
228 .Mx -anchor-spass Ic "replysender"
229 .Mx -anchor-spass Ic "Resend"
230 .Mx -anchor-spass Ic "resend"
231 .Mx -anchor-spass Ic "Respond"
232 .Mx -anchor-spass Ic "respond"
233 .Mx -anchor-spass Ic "respondall"
234 .Mx -anchor-spass Ic "respondsender"
235 .Mx -anchor-spass Ic "retain"
236 .Mx -anchor-spass Ic "Save"
237 .Mx -anchor-spass Ic "save"
238 .Mx -anchor-spass Ic "savediscard"
239 .Mx -anchor-spass Ic "saveignore"
240 .Mx -anchor-spass Ic "saveretain"
241 .Mx -anchor-spass Ic "seen"
242 .Mx -anchor-spass Ic "set"
243 .Mx -anchor-spass Ic "setenv"
244 .Mx -anchor-spass Ic "shell"
245 .Mx -anchor-spass Ic "shortcut"
246 .Mx -anchor-spass Ic "show"
247 .Mx -anchor-spass Ic "size"
248 .Mx -anchor-spass Ic "sort"
249 .Mx -anchor-spass Ic "source"
250 .Mx -anchor-spass Ic "source_if"
251 .Mx -anchor-spass Ic "spamclear"
252 .Mx -anchor-spass Ic "spamforget"
253 .Mx -anchor-spass Ic "spamham"
254 .Mx -anchor-spass Ic "spamrate"
255 .Mx -anchor-spass Ic "spamset"
256 .Mx -anchor-spass Ic "spamspam"
257 .Mx -anchor-spass Ic "thread"
258 .Mx -anchor-spass Ic "top"
259 .Mx -anchor-spass Ic "touch"
260 .Mx -anchor-spass Ic "Type"
261 .Mx -anchor-spass Ic "type"
262 .Mx -anchor-spass Ic "unaccount"
263 .Mx -anchor-spass Ic "unalias"
264 .Mx -anchor-spass Ic "unanswered"
265 .Mx -anchor-spass Ic "uncollapse"
266 .Mx -anchor-spass Ic "undefine"
267 .Mx -anchor-spass Ic "undelete"
268 .Mx -anchor-spass Ic "undraft"
269 .Mx -anchor-spass Ic "unflag"
270 .Mx -anchor-spass Ic "unfwdignore"
271 .Mx -anchor-spass Ic "unfwdretain"
272 .Mx -anchor-spass Ic "unghost"
273 .Mx -anchor-spass Ic "unignore"
274 .Mx -anchor-spass Ic "unmimetype"
275 .Mx -anchor-spass Ic "unmlist"
276 .Mx -anchor-spass Ic "unmlsubscribe"
277 .Mx -anchor-spass Ic "Unread"
278 .Mx -anchor-spass Ic "unread"
279 .Mx -anchor-spass Ic "unretain"
280 .Mx -anchor-spass Ic "unsaveignore"
281 .Mx -anchor-spass Ic "unsaveretain"
282 .Mx -anchor-spass Ic "unset"
283 .Mx -anchor-spass Ic "unsetenv"
284 .Mx -anchor-spass Ic "unshortcut"
285 .Mx -anchor-spass Ic "unsort"
286 .Mx -anchor-spass Ic "unthread"
287 .Mx -anchor-spass Ic "urldecode"
288 .Mx -anchor-spass Ic "urlencode"
289 .Mx -anchor-spass Ic "varedit"
290 .Mx -anchor-spass Ic "varshow"
291 .Mx -anchor-spass Ic "verify"
292 .Mx -anchor-spass Ic "visual"
293 .Mx -anchor-spass Ic "write"
294 .Mx -anchor-spass Ic "xit"
295 .Mx -anchor-spass Ic "z"
296 .Mx -anchor-spass Ic "Z"
297 .Mx -anchor-spass Ic "~~"
298 .Mx -anchor-spass Ic "~!"
299 .Mx -anchor-spass Ic "~."
300 .Mx -anchor-spass Ic "~:"
301 .Mx -anchor-spass Ic "~?"
302 .Mx -anchor-spass Ic "~<"
303 .Mx -anchor-spass Ic "~<!"
304 .Mx -anchor-spass Ic "~@"
305 .Mx -anchor-spass Ic "~A"
306 .Mx -anchor-spass Ic "~a"
307 .Mx -anchor-spass Ic "~b"
308 .Mx -anchor-spass Ic "~c"
309 .Mx -anchor-spass Ic "~d"
310 .Mx -anchor-spass Ic "~e"
311 .Mx -anchor-spass Ic "~F"
312 .Mx -anchor-spass Ic "~f"
313 .Mx -anchor-spass Ic "~H"
314 .Mx -anchor-spass Ic "~h"
315 .Mx -anchor-spass Ic "~i"
316 .Mx -anchor-spass Ic "~M"
317 .Mx -anchor-spass Ic "~m"
318 .Mx -anchor-spass Ic "~p"
319 .Mx -anchor-spass Ic "~q"
320 .Mx -anchor-spass Ic "~R"
321 .Mx -anchor-spass Ic "~r"
322 .Mx -anchor-spass Ic "~s"
323 .Mx -anchor-spass Ic "~t"
324 .Mx -anchor-spass Ic "~U"
325 .Mx -anchor-spass Ic "~u"
326 .Mx -anchor-spass Ic "~v"
327 .Mx -anchor-spass Ic "~w"
328 .Mx -anchor-spass Ic "~x"
329 .Mx -anchor-spass Ic "~|"
330 .Mx -anchor-spass Va "add-file-recipients"
331 .Mx -anchor-spass Va "allnet"
332 .Mx -anchor-spass Va "append"
333 .Mx -anchor-spass Va "ask"
334 .Mx -anchor-spass Va "asksub"
335 .Mx -anchor-spass Va "askatend"
336 .Mx -anchor-spass Va "askattach"
337 .Mx -anchor-spass Va "askcc"
338 .Mx -anchor-spass Va "askbcc"
339 .Mx -anchor-spass Va "asksign"
340 .Mx -anchor-spass Va "autocollapse"
341 .Mx -anchor-spass Va "autoprint"
342 .Mx -anchor-spass Va "autothread"
343 .Mx -anchor-spass Va "bang"
344 .Mx -anchor-spass Va "batch-exit-on-error"
345 .Mx -anchor-spass Va "bsdannounce"
346 .Mx -anchor-spass Va "bsdcompat"
347 .Mx -anchor-spass Va "bsdflags"
348 .Mx -anchor-spass Va "bsdheadline"
349 .Mx -anchor-spass Va "bsdmsgs"
350 .Mx -anchor-spass Va "bsdorder"
351 .Mx -anchor-spass Va "bsdset"
352 .Mx -anchor-spass Va "colour-disable"
353 .Mx -anchor-spass Va "colour-pager"
354 .Mx -anchor-spass Va "debug"
355 .Mx -anchor-spass Va "disconnected"
356 .Mx -anchor-spass Va "disposition-notification-send"
357 .Mx -anchor-spass Va "dot"
358 .Mx -anchor-spass Va "dotlock-ignore-error"
359 .Mx -anchor-spass Va "editalong"
360 .Mx -anchor-spass Va "editheaders"
361 .Mx -anchor-spass Va "emptystart"
362 .Mx -anchor-spass Va "flipr"
363 .Mx -anchor-spass Va "followup-to"
364 .Mx -anchor-spass Va "forward-as-attachment"
365 .Mx -anchor-spass Va "fullnames"
366 .Mx -anchor-spass Va "header"
367 .Mx -anchor-spass Va "history-gabby"
368 .Mx -anchor-spass Va "history-gabby-persist"
369 .Mx -anchor-spass Va "hold"
370 .Mx -anchor-spass Va "idna-disable"
371 .Mx -anchor-spass Va "ignore"
372 .Mx -anchor-spass Va "ignoreeof"
373 .Mx -anchor-spass Va "imap-use-starttls"
374 .Mx -anchor-spass Va "keep"
375 .Mx -anchor-spass Va "keepsave"
376 .Mx -anchor-spass Va "line-editor-disable"
377 .Mx -anchor-spass Va "markanswered"
378 .Mx -anchor-spass Va "message-id-disable"
379 .Mx -anchor-spass Va "metoo"
380 .Mx -anchor-spass Va "mime-allow-text-controls"
381 .Mx -anchor-spass Va "netrc-lookup"
382 .Mx -anchor-spass Va "outfolder"
383 .Mx -anchor-spass Va "page"
384 .Mx -anchor-spass Va "piperaw"
385 .Mx -anchor-spass Va "pop3-bulk-load"
386 .Mx -anchor-spass Va "pop3-no-apop"
387 .Mx -anchor-spass Va "pop3-no-apop-HOST"
388 .Mx -anchor-spass Va "pop3-use-starttls"
389 .Mx -anchor-spass Va "print-all-chars"
390 .Mx -anchor-spass Va "print-alternatives"
391 .Mx -anchor-spass Va "quiet"
392 .Mx -anchor-spass Va "quote-as-attachment"
393 .Mx -anchor-spass Va "recipients-in-cc"
394 .Mx -anchor-spass Va "record-resent"
395 .Mx -anchor-spass Va "reply-in-same-charset"
396 .Mx -anchor-spass Va "rfc822-body-from_"
397 .Mx -anchor-spass Va "save"
398 .Mx -anchor-spass Va "searchheaders"
399 .Mx -anchor-spass Va "sendcharsets-else-ttycharset"
400 .Mx -anchor-spass Va "sendwait"
401 .Mx -anchor-spass Va "showlast"
402 .Mx -anchor-spass Va "showname"
403 .Mx -anchor-spass Va "showto"
404 .Mx -anchor-spass Va "skipemptybody"
405 .Mx -anchor-spass Va "smime-force-encryption"
406 .Mx -anchor-spass Va "smime-sign"
407 .Mx -anchor-spass Va "smime-no-default-ca"
408 .Mx -anchor-spass Va "smtp-use-starttls"
409 .Mx -anchor-spass Va "ssl-no-default-ca"
410 .Mx -anchor-spass Va "term-ca-mode"
411 .Mx -anchor-spass Va "keep-content-length"
412 .Mx -anchor-spass Va "v15-compat"
413 .Mx -anchor-spass Va "verbose"
414 .Mx -anchor-spass Va "writebackedited"
415 .Mx -anchor-spass Va "agent-shell-lookup"
416 .Mx -anchor-spass Va "attrlist"
417 .Mx -anchor-spass Va "autobcc"
418 .Mx -anchor-spass Va "autocc"
419 .Mx -anchor-spass Va "autosort"
420 .Mx -anchor-spass Va "charset-7bit"
421 .Mx -anchor-spass Va "charset-8bit"
422 .Mx -anchor-spass Va "charset-unknown-8bit"
423 .Mx -anchor-spass Va "cmd"
424 .Mx -anchor-spass Va "colour-from_"
425 .Mx -anchor-spass Va "colour-header"
426 .Mx -anchor-spass Va "colour-msginfo"
427 .Mx -anchor-spass Va "colour-partinfo"
428 .Mx -anchor-spass Va "colour-terms"
429 .Mx -anchor-spass Va "colour-uheader"
430 .Mx -anchor-spass Va "colour-user-headers"
431 .Mx -anchor-spass Va "crt"
432 .Mx -anchor-spass Va "datefield"
433 .Mx -anchor-spass Va "datefield-markout-older"
434 .Mx -anchor-spass Va "encoding"
435 .Mx -anchor-spass Va "escape"
436 .Mx -anchor-spass Va "expandaddr"
437 .Mx -anchor-spass Va "expandargv"
438 .Mx -anchor-spass Va "features"
439 .Mx -anchor-spass Va "file-hook-load-EXTENSION"
440 .Mx -anchor-spass Va "file-hook-save-EXTENSION"
441 .Mx -anchor-spass Va "folder"
442 .Mx -anchor-spass Va "folder-hook"
443 .Mx -anchor-spass Va "folder-hook-FOLDER"
444 .Mx -anchor-spass Va "followup-to-honour"
445 .Mx -anchor-spass Va "from"
446 .Mx -anchor-spass Va "fwdheading"
447 .Mx -anchor-spass Va "headline"
448 .Mx -anchor-spass Va "headline-bidi"
449 .Mx -anchor-spass Va "hostname"
450 .Mx -anchor-spass Va "imap-auth"
451 .Mx -anchor-spass Va "imap-cache"
452 .Mx -anchor-spass Va "imap-keepalive"
453 .Mx -anchor-spass Va "imap-list-depth"
454 .Mx -anchor-spass Va "indentprefix"
455 .Mx -anchor-spass Va "line-editor-cursor-right"
456 .Mx -anchor-spass Va "MAIL"
457 .Mx -anchor-spass Va "mime-counter-evidence"
458 .Mx -anchor-spass Va "mimetypes-load-control"
459 .Mx -anchor-spass Va "NAIL_EXTRA_RC"
460 .Mx -anchor-spass Va "NAIL_HEAD"
461 .Mx -anchor-spass Va "NAIL_HISTFILE"
462 .Mx -anchor-spass Va "NAIL_HISTSIZE"
463 .Mx -anchor-spass Va "NAIL_TAIL"
464 .Mx -anchor-spass Va "newfolders"
465 .Mx -anchor-spass Va "newmail"
466 .Mx -anchor-spass Va "ORGANIZATION"
467 .Mx -anchor-spass Va "password"
468 .Mx -anchor-spass Va "pipe-TYPE/SUBTYPE"
469 .Mx -anchor-spass Ev "NAIL_TMPDIR"
470 .Mx -anchor-spass Ev "NAIL_FILENAME"
471 .Mx -anchor-spass Ev "NAIL_FILENAME_GENERATED"
472 .Mx -anchor-spass Ev "NAIL_CONTENT"
473 .Mx -anchor-spass Ev "NAIL_CONTENT_EVIDENCE"
474 .Mx -anchor-spass Va "pipe-EXTENSION"
475 .Mx -anchor-spass Va "pop3-keepalive"
476 .Mx -anchor-spass Va "prompt"
477 .Mx -anchor-spass Va "quote"
478 .Mx -anchor-spass Va "quote-fold"
479 .Mx -anchor-spass Va "record"
480 .Mx -anchor-spass Va "reply_strings"
481 .Mx -anchor-spass Va "replyto"
482 .Mx -anchor-spass Va "reply-to-honour"
483 .Mx -anchor-spass Va "screen"
484 .Mx -anchor-spass Va "sendcharsets"
485 .Mx -anchor-spass Va "sender"
486 .Mx -anchor-spass Va "sendmail"
487 .Mx -anchor-spass Va "sendmail-arguments"
488 .Mx -anchor-spass Va "sendmail-no-default-arguments"
489 .Mx -anchor-spass Va "sendmail-progname"
490 .Mx -anchor-spass Va "Sign"
491 .Mx -anchor-spass Va "sign"
492 .Mx -anchor-spass Va "signature"
493 .Mx -anchor-spass Va "smime-ca-dir"
494 .Mx -anchor-spass Va "smime-ca-file"
495 .Mx -anchor-spass Va "smime-cipher"
496 .Mx -anchor-spass Va "smime-crl-dir"
497 .Mx -anchor-spass Va "smime-crl-file"
498 .Mx -anchor-spass Va "smime-encrypt-USER@HOST"
499 .Mx -anchor-spass Va "smime-sign-cert"
500 .Mx -anchor-spass Va "smime-sign-include-certs"
501 .Mx -anchor-spass Va "smime-sign-message-digest"
502 .Mx -anchor-spass Va "smtp"
503 .Mx -anchor-spass Va "smtp-auth"
504 .Mx -anchor-spass Va "smtp-hostname"
505 .Mx -anchor-spass Va "spam-interface"
506 .Mx -anchor-spass Va "spam-maxsize"
507 .Mx -anchor-spass Va "spamc-command"
508 .Mx -anchor-spass Va "spamc-arguments"
509 .Mx -anchor-spass Va "spamc-user"
510 .Mx -anchor-spass Va "spamd-socket"
511 .Mx -anchor-spass Va "spamd-user"
512 .Mx -anchor-spass Va "spamfilter-ham"
513 .Mx -anchor-spass Va "spamfilter-noham"
514 .Mx -anchor-spass Va "spamfilter-nospam"
515 .Mx -anchor-spass Va "spamfilter-rate"
516 .Mx -anchor-spass Va "spamfilter-spam"
517 .Mx -anchor-spass Va "spamfilter-rate-scanscore"
518 .Mx -anchor-spass Va "ssl-ca-dir"
519 .Mx -anchor-spass Va "ssl-ca-file"
520 .Mx -anchor-spass Va "ssl-cert"
521 .Mx -anchor-spass Va "ssl-cipher-list"
522 .Mx -anchor-spass Va "ssl-config-file"
523 .Mx -anchor-spass Va "ssl-crl-file"
524 .Mx -anchor-spass Va "ssl-crl-dir"
525 .Mx -anchor-spass Va "ssl-key"
526 .Mx -anchor-spass Va "ssl-method"
527 .Mx -anchor-spass Va "ssl-protocol"
528 .Mx -anchor-spass Va "ssl-rand-egd"
529 .Mx -anchor-spass Va "ssl-rand-file"
530 .Mx -anchor-spass Va "ssl-verify"
531 .Mx -anchor-spass Va "stealthmua"
532 .Mx -anchor-spass Va "toplines"
533 .Mx -anchor-spass Va "ttycharset"
534 .Mx -anchor-spass Va "user"
535 .Mx -anchor-spass Va "version"
536 .Mx -anchor-spass Va "version-major"
537 .Mx -anchor-spass Va "version-minor"
538 .Mx -anchor-spass Va "version-update"
539 .Mx -anchor-spass Ev "COLUMNS"
540 .Mx -anchor-spass Ev "DEAD"
541 .Mx -anchor-spass Ev "EDITOR"
542 .Mx -anchor-spass Ev "HOME"
543 .Mx -anchor-spass Ev "LANG"
544 .Mx -anchor-spass Ev "LC_ALL"
545 .Mx -anchor-spass Ev "LC_COLLATE"
546 .Mx -anchor-spass Ev "LC_CTYPE"
547 .Mx -anchor-spass Ev "LC_MESSAGES"
548 .Mx -anchor-spass Ev "LINES"
549 .Mx -anchor-spass Ev "LISTER"
550 .Mx -anchor-spass Ev "MBOX"
551 .Mx -anchor-spass Ev "MAILRC"
552 .Mx -anchor-spass Ev "NAIL_NO_SYSTEM_RC"
553 .Mx -anchor-spass Ev "NETRC"
554 .Mx -anchor-spass Ev "PAGER"
555 .Mx -anchor-spass Ev "PATH"
556 .Mx -anchor-spass Ev "SHELL"
557 .Mx -anchor-spass Ev "SYSV3"
558 .Mx -anchor-spass Ev "TERM"
559 .Mx -anchor-spass Ev "TMPDIR"
560 .Mx -anchor-spass Ev "USER"
561 .Mx -anchor-spass Ev "VISUAL"
562 .Mx -anchor-spass Pa "~/.mime.types"
563 .Mx -anchor-spass Pa "/etc/mime.types"
564 .Mx -anchor-spass Pa "~/.netrc"
565 .Sh NAME
566 .Nm \*(UA \%[\*(VV]
567 .Nd send and receive Internet mail
568 .Sh SYNOPSIS
569 .Nm \*(ua
570 .Fl h | Fl Fl help
571 .Nm \*(ua
572 .Bk -words
573 .Op Fl BDdEFintv~
574 .Op Fl A Ar account
575 .Op Fl a Ar attachment
576 .Op Fl b Ar bcc-addr
577 .Op Fl c Ar cc-addr
578 .Op Fl q Ar quote-file
579 .Op Fl r Ar from-addr
580 .Op Fl S Ar variable Ns Op Ns = Ns Ar value
581 .Op Fl s Ar subject
582 .Op Fl X Ar cmd
583 .Op Fl \&.
584 .Ar to-addr ...
585 .Op Fl Fl \: Ar mta-option ...
587 .Nm \*(ua
588 .Bk -words
589 .Op Fl BDdEeHiNnRv~#
590 .Op Fl A Ar account
591 .Op Fl L Ar spec-list
592 .Op Fl r Ar from-addr
593 .Op Fl S Ar variable Ns Op Ns = Ns Ar value
594 .Op Fl X Ar cmd
595 .Fl f Op Ar file
596 .Op Fl Fl \: Ar mta-option ...
598 .Nm \*(ua
599 .Bk -words
600 .Op Fl BDdEeHiNnRv~#
601 .Op Fl A Ar account
602 .Op Fl L Ar spec-list
603 .Op Fl r Ar from-addr
604 .Op Fl S Ar variable Ns Op Ns = Ns Ar value
605 .Op Fl u Ar user
606 .Op Fl X Ar cmd
607 .Op Fl Fl \: Ar mta-option ...
609 .Mx -toc -tree html pdf ps xhtml
610 .Sh DESCRIPTION
611 .Bd -filled -compact -offset indent
612 .Sy Compatibility note:
613 S-nail (\*(UA) will wrap up into \%S-mailx in v15.0 (circa 2018).
614 A partial set of compatibility options exist, tagged as \*(IN and \*(OU.
615 To choose upward compatible behaviour, please set the internal variable
616 .Va v15-compat .
617 Anything which will vanish in v15.0 is tagged \*(OB, and using
618 .Fl d
619 will print warnings for many use cases of obsolete features.
622 \*(UA is a mail processing system with a command syntax reminiscent of
623 .Xr ed 1
624 with lines replaced by messages.
625 It is intended to provide the functionality of the POSIX
626 .Xr mailx 1
627 command and offers (mostly optional) extensions for line editing, IDNA,
628 MIME, S/MIME, SMTP and POP3 (and IMAP).
629 It is usable as a mail batch language.
630 .Ss "Options"
631 .Bl -tag -width ".Fl _ Ar _ccount"
633 .It Fl A Ar account
634 Executes an
635 .Ic account
636 command (see below) for
637 .Ar account
638 after the startup files have been read.
640 .It Fl a Ar file
641 Attach the given file to the message.
642 The same filename conventions as described in the section
643 .Sx COMMANDS
644 apply: shell word expansion is restricted to the tilde
645 .Ql ~
646 and variables.
647 Shall
648 .Ar file
649 not be accessible but contain a
650 .Ql =
651 character, then anything after the
652 .Ql =
653 is assumed to specify the input character set and anything before
654 .Ql =
655 the filename: this is the only option to specify the input character set
656 (and don't perform any character set conversion) for text attachments
657 from the command line, not using the
658 .Ic ~@
659 tilde escape command.
661 .It Fl B
662 Make standard input and standard output line-buffered.
664 .It Fl b Ar address
665 Send blind carbon copies to the given list of addresses.
666 .Sx Sending mail
667 below goes into more detail on that.
669 .It Fl c Ar address
670 Send carbon copies to the given list of addresses.
672 .It Fl D
673 \*(OP Set the
674 .Va disconnected
675 variable.
677 .It Fl d
678 Set the
679 .Va debug
680 variable, which enables debug messages and disables message delivery.
682 .It Fl E
683 Set the
684 .Va skipemptybody
685 variable and thus discard messages with an empty message part body.
686 This is useful for sending messages from scripts.
688 .It Fl e
689 Just check if mail is present in the system mailbox.
690 If yes, return an exit status of zero, a non-zero value otherwise.
692 .It Fl F
693 Save the message to send in a file named after the local part of the
694 first recipient's address (instead of in
695 .Va record Ns ).
697 .It Fl f Op Ar file
698 Read in the contents of the user's
699 .Ev MBOX
700 (or the specified file) for processing;
701 when \*(UA is quit, it writes undeleted messages back to this file
702 (but be aware of the
703 .Va hold
704 option).
705 Some special conventions are recognized for the string
706 .Ar file
707 which are documented for the
708 .Ic file
709 command below.
710 Note that
711 .Ar file
712 is not a direct argument to the flag
713 .Fl f ,
714 but is instead taken from the command line after option processing has
715 been completed.
716 In order to use a
717 .Ar file
718 that starts with a hyphen, prefix it with a (relative) path, as in
719 .Ql ./-hyphenbox.mbox .
721 .It Fl H
722 Print a header summary of all messages and exit.
723 A configurable summary view is available via the
724 .Fl L
725 option.
727 .It Fl h
728 Print a short usage summary.
729 Because of widespread use a
730 .Fl Fl help
731 argument will have the same effect.
733 .It Fl i
734 Set the
735 .Va ignore
736 variable to ignore tty interrupt signals.
738 .It Fl L Ar spec-list
739 Print a header summary of only those messages that match the given
740 .Ar spec-list ,
741 then exit.
742 See the section
743 .Sx "Specifying messages"
744 for the format of
745 .Ar spec-list .
746 If the
747 .Fl H
748 option has been given in addition no header summary is produced,
749 but \*(UA will instead indicate via its exit status whether
750 .Ar spec-list
751 matched any messages
752 .Pf ( Ql 0 )
753 or not
754 .Pf ( Ql 1 ) ;
755 note that any verbose output is suppressed in this mode and must instead
756 be enabled explicitly (e.g., by using the option
757 .Fl v ) .
759 .It Fl N
760 Unset the
761 .Va header
762 variable and thus inhibit initial display of message headers when
763 reading mail or editing a mail folder.
765 .It Fl n
766 Inhibits reading
767 .Pa \*(UR
768 upon startup.
769 This option should be activated for \*(UA scripts that are invoked on
770 more than one machine, because the contents of that file may differ
771 between them.
772 (The same behaviour can be achieved by setting the
773 .Ev NAIL_NO_SYSTEM_RC
774 environment variable.)
776 .It Fl q Ar file
777 Start the message with the contents of the specified file.
778 May be given in send mode only.
780 .It Fl R
781 Any folder opened will be in read-only mode.
783 .It Fl r Ar address
785 .Ar address
786 is a valid address then it specifies the envelope sender address to be
787 passed to the MTA as
788 .Ql -f Ar address
789 when a message is send.
790 Shall
791 .Ar address
792 include a user name, comments etc., then the components will be
793 separated and the name part will be passed to the MTA individually via
794 .Ql -F Ar name .
795 The given
796 .Ar address
797 will also be assigned to the
798 .Va from
799 variable, just as if additionally
800 .Ql -Sfrom=address
801 had been specified (therefore affecting SMTP data transfer, too).
803 If instead an empty string is passed as
804 .Ar address
805 then the content of the variable
806 .Va from
807 will be evaluated and used for this purpose whenever the MTA is
808 contacted.
809 Note that \*(UA by default, without
810 .Fl \&\&r
811 that is, neither passes
812 .Ql -f
814 .Ql -F
815 flags to the MTA by itself.
817 .It Fl S Ar variable Ns Op = Ns value
818 Sets the internal option
819 .Ar variable
820 and, in case of a value option, assigns
821 .Ar value
822 to it.
823 Even though options set via
824 .Fl S
825 may be overwritten from within resource files,
826 the command line setting will be reestablished after all resource files
827 have been loaded.
829 .It Fl s Ar subject
830 Specify the subject of the to-be-sent message.
832 .It Fl t
833 The message to be sent is expected to contain a message header with
834 .Ql To: ,
835 .Ql Cc: ,
837 .Ql Bcc:
838 fields giving its recipients, which will be added to those given on the
839 command line.
840 If a message subject is specified via
841 .Ql Subject:
842 then it'll be used in favour of one given on the command line.
844 Also understood are
845 .Ql Reply-To:
846 (possibly overriding
847 .Va replyto ) ,
848 .Ql Sender:
849 (p.\ o.\&
850 .Va sender ) ,
851 .Ql Organization:
852 (p.\ o.\&
853 .Va ORGANIZATION ) .
854 Note you can also specify
855 .Ql From: ,
856 possibly overriding
857 .Va from
858 and the envelope address possibly specified with the option
859 .Fl r !
861 The following, which are normally created automatically based
862 upon the message context, can also be specified:
863 .Ql Message-ID: ,
864 .Ql In-Reply-To: ,
865 .Ql References:
867 .Ql Mail-Followup-To:
868 (special address massage will however still occur for the latter).
870 .It Fl u Ar user
871 Read the system mailbox of
872 .Ar user
873 (appropriate privileges presumed), and
874 .Dq assume to be
875 .Ar user
876 in some aspects, e.g. in respect to
877 .Ic file Ns
878 \(enexpansions of
879 .Ql %
880 etc.; also see
881 .Ev USER .
883 .It Fl V
884 Print \*(UA's version and exit.
886 .It Fl v
887 Setting the
888 .Va verbose
889 option causes some verbosity (like printing of certificate chains).
890 Using it twice increases the level of verbosity.
892 .It Fl X Ar cmd
893 Add the given
894 .Ar cmd
895 to the list of commands to be executed before normal operation starts.
896 Correlates with
897 .Fl #
899 .Va batch-exit-on-error ;
900 the only possibility to execute commands in non-interactive mode when
901 reading startup files is actively prohibited.
903 .It Fl ~
904 Enable
905 .Sx TILDE ESCAPES
906 even if not in interactive mode.
908 .It Fl #
909 This sets several options to prepare \*(UA for working in (most likely
910 non-interactive) batch mode:
911 .Va dot ,
912 .Va emptystart ,
913 .Pf no Va header ,
914 .Va quiet ,
915 .Va sendwait ,
916 as well as
917 .Ev MBOX
919 .Va folder
920 (both to
921 .Pa /dev/null ) .
922 It also enables processing of
923 .Sx "TILDE ESCAPES" .
924 E.g., the following should send an email message to
925 .Dq bob :
926 .Bd -literal -offset indent
927 $ LC_ALL=C printf 'm bob\en~s ubject\enText\en.\enx\en' | \e
928   LC_ALL=C MAILRC=/dev/null s-nail -n -# -Snosave
931 .It Fl \&.
932 This flag forces termination of option processing in order to prevent
933 .Dq option injection
934 (attacks).
935 It also forcefully puts \*(UA into send mode, see
936 .Sx "Sending mail" .
939 In the above list of supported command line options,
940 .Fl D , d , E , i , N
942 .Fl v
943 are implemented by means of setting the respective option, as via
944 .Fl S .
945 .Bk -words
946 .Op Ar mta-option ...
948 arguments that are given at the end of the command line after a
949 .Ql --
950 separator will be passed through to the mail-transfer-agent (MTA) and
951 persist for an entire (interactive) session \(en if the setting of
952 .Va expandargv
953 allows their recognition;
954 MTA arguments can also be specified in the variable
955 .Va sendmail-arguments ;
956 find MTA interaction described in more detail in the documentation of
957 .Va sendmail .
958 MTA arguments are ignored when mail is send via SMTP data transfer.
959 .Ss "A starter"
960 \*(UA is a direct descendant of the BSD Mail program that was introduced
961 in 1978 (itself superceeding the simpler UNIX mail program) and used
962 to introduce itself (in the Mail reference manual) as follows:
963 .Bd -ragged -offset indent
964 Mail provides a simple and friendly environment for sending and
965 receiving mail.
966 It divides incoming mail into its constituent messages and allows the
967 user to deal with them in any order.
968 In addition, it provides a set of
969 .Xr ed 1 Ns
970 -like commands for manipulating messages and sending mail.
971 Mail offers the user simple editing capabilities to ease the composition
972 of outgoing messages, as well as providing the ability to define and
973 send to names which address groups of users.
976 \*(UA is thus the user side of the Unix mail system, whereas the system
977 side (mail-transfer-agent, MTA) was traditionally taken by
978 .Xr sendmail 8 ;
979 today
980 .Xr postfix 1
982 .Xr exim 8
983 are often used for this purpose instead.
984 If the \*(OPal SMTP feature has been built into \*(UA then the
985 system side is not a mandatory precondition for mail delivery.
987 Because \*(UA strives for compliance with POSIX
988 .Xr mailx 1
989 it is likely that some configuration settings have to be adjusted before
990 using it is a smooth experience.
991 The default global
992 .Pa \*(UR
993 file already bends those standard settings a bit towards more user
994 friendliness and safety, e.g., it sets the
995 .Va hold
997 .Va keepsave
998 options in order to suppress the automatic moving of messages to
999 .Ev MBOX
1000 that would otherwise occur (see
1001 .Sx "Message states" )
1003 .Va keep
1004 to not remove empty files in order not to mangle file permissions when
1005 files eventually get recreated.
1006 It does not set the
1007 .Va folder
1008 option so that by default file grouping (via the
1009 .Ql +
1010 prefix as documented also for
1011 .Ic file )
1012 is not enabled.
1013 The section
1014 .Sx EXAMPLES
1015 contains some further suggestions.
1016 .Ss "Sending mail"
1017 To send a message to one or more people, using a local
1018 mail-transfer-agent (MTA; the executable path can be set via
1019 .Va sendmail )
1020 or the \*(OPal builtin SMTP (set and see the variable
1021 .Va smtp )
1022 transport to actually deliver the generated mail message, \*(UA can be
1023 invoked with arguments which are the names of people to whom the mail
1024 will be sent:
1025 .Bd -literal -offset indent
1026 $ \*(ua -s Subject -a attachm.ent bill@host1 'Bob <bob@host2>'
1027 # But... try it in an isolated dry-run mode first
1028 $ LC_ALL=C MAILRC=/dev/null \e
1029   \*(ua -n -d -vv -Sfrom="me <he@re>" \e
1030     -s Subject -. "(Lovely) Bob <bob@host2>"
1033 The user is then expected to type in the message contents.
1034 In this compose mode \*(UA treats lines beginning with the character
1035 .Ql ~
1036 special \(en these are so-called
1037 .Sx "TILDE ESCAPES"
1038 which can be used to read in files, process shell commands, add and edit
1039 attachments and more; e.g., the tilde escape
1040 .Ql Ic ~e
1041 will start the text editor to revise the message in it's current state,
1042 .Ql Ic ~h
1043 allows editing of the message recipients and
1044 .Ql Ic ~?
1045 gives an overview of available tilde escapes.
1046 Typing control-D
1047 .Ql ^D
1048 at the beginning of an empty line leaves compose mode and causes the
1049 message to be send, whereas typing control-C
1050 .Ql ^C
1051 twice will abort the current letter (saving its contents in the file
1052 denoted by
1053 .Ev DEAD
1054 unless
1055 .Pf no Va save
1056 is set.)
1058 A number of options can be used to alter default behavior; e.g.,
1059 .Ic set Ns
1060 ting (also via
1061 .Fl S )
1062 .Va editalong
1063 will automatically startup a text editor when compose mode is entered,
1064 .Va askcc
1065 will cause the user to be prompted actively for carbon-copy recipients
1066 and the
1067 .Va dot
1068 option will allow leaving compose mode by writing a line consisting
1069 solely of a dot
1070 .Pf ( Ql \&. ) .
1072 Very important, though, is to define which
1073 .Sx "Character sets"
1074 may be used when sending messages, usually by setting the option
1075 .Va sendcharsets
1076 accordingly,
1077 having read the section
1078 .Sx "The mime.types files"
1079 to understand how the MIME-type of outgoing attachments is classified
1080 and the knowledge that messages are sent asynchronously unless
1081 .Va sendwait
1082 is set: only with it MTA delivery errors will be recognizable.
1084 Setting
1085 .Va from
1086 is often necessary (e.g., in conjunction with
1087 .Va smtp )
1088 or desirable, you may want to do some dry-run tests before you go.
1089 Saving a copy of the sent messages in a
1090 .Va record
1091 may also be desirable \(en as for most mailbox file targets some
1092 special conventions are recognized, see the
1093 .Ic file
1094 command for more on that.
1095 The section
1096 .Sx "On URL syntax and credential lookup"
1097 will spread some light on the
1098 .Ql USER@HOST
1099 variable chains as well as on using URLs for accessing protocol-specific
1100 resources, like
1101 .Va smtp ,
1103 .Sx EXAMPLES
1104 contains an example configuration for sending messages via some of the
1105 well-known public mail providers;
1106 note it also gives a compact overview on how to setup a secure SSL/TLS
1107 environment.
1109 Message recipients (as specified on the command line or defined in
1110 .Ql To: ,
1111 .Ql Cc:
1113 .Ql Bcc: )
1114 may not only be email addressees but can also be names of mailboxes and
1115 even complete shell command pipe specifications.
1116 Proper quoting may be necessary, e.g., to embed whitespace characters.
1117 (Recall that \*(UA deals with mail standards, therefore those define the
1118 rules with which content is interpreted.)
1119 If the variable
1120 .Va expandaddr
1121 is not set then only network addresses (see
1122 .Xr mailaddr 7
1123 for a description of mail addresses) and plain user names (including MTA
1124 aliases) may be used, other types will be filtered out, giving a warning
1125 message.
1127 If the variable
1128 .Va expandaddr
1129 is set then extended recipient addresses will optionally be accepted:
1130 Any name which starts with a vertical bar
1131 .Ql |
1132 character specifies a command pipe \(en the command string following the
1133 .Ql |
1134 is executed and the message is sent to its standard input;
1135 Likewise, any name that starts with the character slash
1136 .Ql /
1137 or the character sequence dot slash
1138 .Ql ./
1139 is treated as a file, regardless of the remaining content.
1140 Any other name which contains an at sign
1141 .Ql @
1142 character is treated as a network address;
1143 Any other name which starts with a plus sign
1144 .Ql +
1145 character specifies a mailbox name;
1146 Any other name which contains a slash
1147 .Ql /
1148 character but no exclamation mark
1149 .Ql \&!
1150 or percent sign
1151 .Ql %
1152 character before also specifies a mailbox name;
1153 What remains is treated as a network address.
1154 .Bd -literal -offset indent
1155 $ echo bla | \*(ua -Sexpandaddr -s test ./mbox.mbox
1156 $ echo bla | \*(ua -Sexpandaddr -s test '|cat >> ./mbox.mbox'
1157 $ echo safe | LC_ALL=C MAILRC=/dev/null \e
1158     \*(ua -n -Sv15-compat -Ssendwait -Snosave \e
1159       -Sexpandaddr=fail,-all,+addr -s test \e
1160       -. bob@home.net
1163 It is possible to create personal distribution lists via the
1164 .Ic alias
1165 command, so that, for instance, the user can send mail to
1166 .Ql cohorts
1167 and have it go to a group of people:
1169 .Dl alias cohorts bill jkf mark kridle@ucbcory ~/mail/cohorts.mbox
1171 Please note that this mechanism has nothing in common with the system
1172 wide aliases that may be used by the local MTA (mail-transfer-agent),
1173 which are subject to the
1174 .Ql name
1175 constraint of
1176 .Va expandaddr
1177 and are often tracked in a file
1178 .Pa /etc/aliases
1179 (and documented in
1180 .Xr aliases 5
1182 .Xr sendmail 1 ) .
1183 Personal aliases will be expanded by \*(UA before the message is sent,
1184 and are thus a convenient alternative to specifying each addressee by
1185 itself.
1187 To avoid environmental noise scripts should
1188 .Dq detach
1189 \*(ua from any configuration files and create a script-local
1190 environment, either by pointing the
1191 .Ev MAILRC
1192 variable to a custom configuration file, or by using the
1193 .Fl S
1194 command line option to specify options:
1195 .Bd -literal -offset indent
1196 $ env LC_ALL=C MAILRC=/dev/null password=NOTSECRET \e
1197   \*(ua -n -Sv15-compat -Ssendwait -Snosave \e
1198     -Sexpandaddr=fail,-all,+addr \e
1199     -S 'smtp=smtps://mylogin@some.host:465' -Ssmtp-auth=login \e
1200     -S 'from=scriptreply@domain' \e
1201     -s 'subject' -a attachment_file \e
1202     -. "Recipient 1 <recipient1@domain>" recipient2@domain \e
1203     < content_file
1205 .Ss "Reading mail"
1206 When invoked without addressees \*(UA enters interactive mode in which
1207 mails may be read.
1208 When used like that the user's system mailbox is read in and a one line
1209 header of each message therein is printed.
1210 (See the command
1211 .Ic file
1212 for an in-depth description of the different mailbox types that exist.)
1213 Note that if the mailbox is empty \*(UA will exit after printing
1214 a message unless the option
1215 .Va emptystart
1216 is found to be set.
1218 At the
1219 .Va prompt
1220 the command
1221 .Ic list
1222 will give a listing of all available commands and
1223 .Ic help
1224 will give a summary of some common ones.
1225 If the \*(OPal documentation strings are available one can type
1226 .Ql ?X
1227 and see the actual expansion of
1228 .Ql X
1229 and what it's purpose is, i.e., commands can be abbreviated
1230 (note that POSIX defines some abbreviations, so that the alphabetical
1231 order of commands doesn't necessarily relate to the abbreviations; it is
1232 possible to define overwrites with the
1233 .Ic ghost
1234 command, however).
1236 Messages are given numbers (starting at 1) which uniquely identify
1237 messages; the current message \(en the
1238 .Dq dot
1239 \(en will either be the first new message, or the first unread message,
1240 or the first message of the mailbox; the option
1241 .Va showlast
1242 will instead cause usage of the last message for this purpose.
1244 Messages can be printed with the
1245 .Ic print
1246 command, or short:
1247 .Ql p .
1248 By default the current message
1249 .Pf ( Dq dot )
1250 is printed, but like with most other commands it is possible to give
1251 a fancy message specification (see
1252 .Sx "Specifying messages" ) ,
1253 e.g.,
1254 .Ql p:u
1255 will display all unread messages,
1256 .Ql p.
1257 will print the
1258 .Dq dot ,
1259 .Ql p 1 5
1260 will print the messages 1 and 5,
1261 .Ql p 1-5
1262 will print the messages 1 through 5, and
1263 .Ql p-
1265 .Ql p+
1266 will print the last and the next message, respectively.
1268 In the default setup all header fields of a message will be printed,
1269 but this can be changed: either by blacklisting a list of fields via
1270 .Ic ignore ,
1271 or by whitelisting only a given list with the
1272 .Ic retain
1273 command, e.g.,
1274 .Ql Ic \:retain Ns \0date from to cc subject .
1275 In order to print all header fields of a message regardless of currently
1276 active ignore or retain lists, use the command
1277 .Ic Print .
1278 The variable
1279 .Va crt
1280 controls whether and when \*(UA will use the configured
1281 .Ev PAGER
1282 for printing instead of directly writing to the terminal (generally
1283 speaking).
1285 Dependent upon the configuration a
1286 .Sx "Command line editor"
1287 aims at making user experience with the many
1288 .Sx COMMANDS
1289 a bit nicer.
1290 When reading the system mailbox or when
1291 .Fl f
1293 .Ic file )
1294 specified a mailbox explicitly prefixed with the special
1295 .Ql %:
1296 modifier then messages which have been read will be moved to the user's
1297 .Ev MBOX
1298 file automatically when the mailbox is left, either by changing the
1299 active mailbox or by quitting \*(UA (also see
1300 .Sx "Message states" ) .
1302 After examining a message the user can also
1303 .Ic delete Ql d
1304 the message,
1305 .Ic reply Ql r
1306 to the sender and all recipients or
1307 .Ic Reply Ql R
1308 exclusively to the sender.
1309 Messages can also be
1310 .Ic forward Ns
1311 ed (shorter alias is
1312 .Ic fwd Ns ).
1313 Note that when replying to or forwarding a message recipient addresses
1314 will be stripped from comments and names unless the option
1315 .Va fullnames
1316 is set.
1317 Deletion causes \*(UA to forget about the message;
1318 This is not irreversible, though, one can
1319 .Ic undelete Ql u
1320 the message by giving its number,
1321 or the \*(UA session can be ended by giving the
1322 .Ic exit Ql x
1323 command.
1325 To end a mail processing session one may either issue
1326 .Ic quit Ql q
1327 to cause a full program exit, which possibly includes
1328 automatic moving of read messages to
1329 .Ev MBOX
1330 as well as updating the \*(OPal command line editor history file,
1331 or use the command
1332 .Ic exit Ql x
1333 instead in order to prevent any of these actions.
1334 .Ss "Viewing HTML mail and MIME attachments"
1335 Messages which are HTML-only get more and more common and of course many
1336 messages come bundled with a bouquet of MIME attachments.
1337 Whereas \*(UA \*(OPally supports a simple HTML-to-text converter to deal
1338 with HTML messages (see
1339 .Sx "The mime.types files" ) ,
1340 it normally can't deal with any of these itself, but instead programs
1341 need to become registered to deal with specific MIME types or file
1342 extensions.
1343 These programs may either prepare plain text versions of their input
1344 in order to enable \*(UA to display the content on the terminal,
1345 or display the content themselves, for example in a graphical window.
1346 The latter type of programs by default
1347 .Dq blocks
1348 \*(UA until the external viewer has terminated, but asynchronous
1349 side-by-side execution is also possible, in which case \*(UA will
1350 continue to display the message and remain responsive.
1352 To install an external handler program for a specific MIME type set an
1353 according
1354 .Va pipe-TYPE/SUBTYPE
1355 variable.
1356 To define a handler for a specific file extension set the respective
1357 .Va pipe-EXTENSION
1358 variable \(en these handlers take precedence.
1359 The variable
1360 .Va mime-counter-evidence
1361 can be set to improve dealing with faulty MIME part declarations as are
1362 often seen in real-life messages.
1363 E.g., to display a HTML message inline (that is, converted to a more
1364 fancy plain text representation than the builtin converter is capable to
1365 produce) with either of the text-mode browsers
1366 .Xr lynx 1
1368 .Xr elinks 1 ,
1369 teach \*(UA about MathML documents and make it display them as plain text
1370 and to open PDF attachments in an external PDF viewer, asynchronously:
1371 .Bd -literal -offset indent
1372 if $features !@ HTML-FILTER
1373   #set pipe-text/html="elinks -force-html -dump 1"
1374   set pipe-text/html="lynx -stdin -dump -force_html"
1375   # Display HTML as plain text instead
1376   #set pipe-text/html=@
1377 endif
1378 mimetype '@ application/mathml+xml mathml'
1379 set pipe-application/pdf="@&set -C;\e
1380     : > \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e"; \e
1381     trap \e"rm -f \e\e\e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e\e\e"\e" \e
1382       EXIT INT QUIT PIPE TERM;\e
1383     set +C;\e
1384     cat > \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e"; \e
1385     xpdf \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e""
1388 Note: special care must be taken when using such commands as mail
1389 viruses may be distributed by this method: if messages of type
1390 .Ql application/x-sh
1391 or files with the extension
1392 .Ql .sh
1393 were blindly filtered through the shell, for example, a message sender
1394 could easily execute arbitrary code on the system \*(UA is running on.
1395 For more on MIME, also in respect to sending of messages, see the
1396 section
1397 .Sx "The mime.types files"
1398 and the command
1399 .Ic mimetype .
1400 .Ss "Mailing lists"
1401 \*(UA offers some support to ease handling of mailing lists.
1402 The command
1403 .Ic mlist
1404 promotes all given arguments to known mailing lists, and
1405 .Ic mlsubscribe
1406 sets their subscription attribute, creating them first as necessary.
1407 (On the other hand
1408 .Ic unmlsubscribe
1409 doesn't
1410 .Ic unmlist
1411 automatically, but only resets the subscription attribute.)
1412 Using the commands without arguments will print out (a subset of) all
1413 currently defined mailing lists.
1415 .Va headline
1416 format
1417 .Ql \&%T
1418 can be used to mark out messages with configured list addresses
1419 in the header display.
1421 \*(OPally mailing lists may also be specified as regular expressions,
1422 which allows matching of many addresses with a single expression.
1423 However, all fully qualified list addresses are matched via a fast
1424 dictionary, whereas expressions are placed in (a) list(s) which is
1425 (are) matched sequentially.
1426 .Bd -literal -offset indent
1427 set followup-to followup-to-honour=ask-yes reply-to-honour=ask-yes
1428 mlist a1@b1.c1 a2@b2.c2 .*@lists.c3$
1429 mlsubscribe a4@b4.c4 exact@lists.c3
1432 The variable
1433 .Va followup-to-honour
1434 will ensure that a
1435 .Ql Mail-\:Followup-\:To:
1436 header is honoured when the message is being replied to (via
1437 .Ic reply
1439 .Ic Lreply )
1441 .Va followup-to
1442 controls whether this header is created when sending mails; it will be
1443 created automatically for a couple of reasons, too, like when the
1444 special
1445 .Dq mailing list specific
1446 respond command
1447 .Ic Lreply
1448 is used, when
1449 .Ic reply
1450 is used to respond to a message with its
1451 .Ql Mail-Followup-To:
1452 being honoured etc.
1454 A difference in between the handling of known and subscribed lists is
1455 that the address of the sender is usually not part of a generated
1456 .Ql Mail-Followup-To:
1457 when addressing the latter, whereas it is for the former kind of lists.
1458 Usually because there are exceptions: say, if multiple lists are
1459 addressed and not all of them are subscribed lists.
1461 For convenience \*(UA will, temporarily, automatically add a list
1462 address that is presented in the
1463 .Ql List-To:
1464 header of a message that is being responded to to the list of known
1465 mailing lists.
1466 Shall that header have existed \*(UA will instead, dependend on the
1467 variable
1468 .Va reply-to-honour ,
1469 use an also set
1470 .Ql Reply-To:
1471 for this purpose in order to accept a list administrators' wish that
1472 is supposed to have been manifested like that (but only if it provides
1473 a single address which resides on the same domain as what is stated in
1474 .Ql List-To: ) .
1475 .Ss "Resource files"
1476 Upon startup \*(UA reads in several resource files:
1477 .Bl -tag -width ".It Pa _AIL_EXTRA_R_"
1479 .It Pa \*(UR
1480 System wide initialization file.
1481 Reading of this file can be suppressed, either by using the
1482 .Fl n
1483 command line option, or by setting the environment variable
1484 .Ev NAIL_NO_SYSTEM_RC .
1486 .It Pa \*(ur
1487 File giving initial commands.
1488 A different file can be chosen by setting the environment variable
1489 .Ev MAILRC .
1490 .It Va NAIL_EXTRA_RC
1491 Can be used to define an optional startup file to be read after
1492 .Pa \*(ur .
1493 This variable is only honoured in certain circumstances (see its
1494 documentation for more).
1497 The content of these files is interpreted as follows:
1499 .Bl -bullet -compact
1501 A lines' leading whitespace is ignored.
1503 An empty line is ignored.
1505 If the line (content) starts with the number sign
1506 .Ql #
1507 then it is a comment-command \(en a real command! \(en and also ignored.
1508 This command is the only form of comment that is understood.
1510 A line can be
1511 .Dq continued
1512 on the next line if the newline character is
1513 .Dq escaped
1514 by preceding it with the backslash character
1515 .Ql \e .
1516 Note that any leading whitespace of follow lines is removed:
1517 If whitespace is desired it must be placed before the backslash.
1518 For example:
1519 .Bd -literal -offset indent
1520  # This line is a comment command.  And y\e
1521     es, it is really continued here.
1522 set debug \e
1523     verbose
1526 .Ss "Character sets"
1527 \*(OP \*(UA detects the character set of the terminal by using
1528 mechanisms that are controlled by the
1529 .Ev LC_CTYPE
1530 locale setting
1531 (the manual for
1532 .Xr setlocale 3
1533 should give an overview); the \*(UA internal variable
1534 .Va ttycharset
1535 will be set to the detected terminal character set accordingly
1536 and will thus show up in the output of the commands
1537 .Ic set
1539 .Ic varshow .
1541 However, a user supplied
1542 .Va ttycharset
1543 value is not overwritten by this detection mechanism: this
1544 .Dq feature
1545 must be used if the detection doesn't work properly,
1546 and it may be used to adjust the name of the locale character set.
1547 E.g., on BSD systems one may use a locale with the character set
1548 ISO8859-1, which is not a valid name for this character set; to be on
1549 the safe side, one may set
1550 .Va ttycharset
1551 to the correct name, which is ISO-8859-1.
1553 Note that changing the value doesn't mean much beside that,
1554 since several aspects of the real character set are implied by the
1555 locale environment of the system,
1556 and that stays unaffected by the content of an overwritten
1557 .Va ttycharset
1558 variable.
1559 (This is mostly an issue when interactively using \*(UA, though.
1560 It is actually possible to send mail in a completely
1561 .Dq faked
1562 locale environment.)
1564 If no character set conversion capabilities have been compiled into
1565 \*(UA (i.e., no
1566 .Xr iconv 3
1567 library has been found), then
1568 .Va ttycharset
1569 will be the only supported character set,
1570 it is simply assumed that it can be used to exchange 8-bit messages,
1571 and the rest of this section does not apply;
1572 it may however still be necessary to explicitly set it if automatic
1573 detection fails, since in that case it defaults to the mentioned
1574 ISO-8859-1.
1576 When reading messages, their text is converted into
1577 .Va ttycharset
1578 as necessary in order to display them on the users terminal.
1579 Unprintable characters and invalid byte sequences are detected
1580 and replaced by proper substitution characters (unless the variable
1581 .Va print-all-chars
1582 was set once \*(UA was started).
1583 Also see
1584 .Va charset-unknown-8bit
1585 to deal with another hairy aspect of message interpretation.
1587 When sending messages all their parts and attachments are classified.
1588 Whereas no character set conversion is performed on those parts which
1589 appear to be binary data,
1590 the character set being used must be declared within the MIME header of
1591 an outgoing text part if it contains characters that do not conform to
1592 the set of characters that are allowed by the email standards.
1593 Permissible values for character sets can be declared using the
1594 .Va sendcharsets
1595 variable, and
1596 .Va charset-8bit ,
1597 which defines a catch-all last-resort fallback character set that is
1598 implicitly appended to the list of character-sets in
1599 .Va sendcharsets .
1601 When replying to a message and the variable
1602 .Va reply-in-same-charset
1603 is set then the character set of the message being replied to is tried
1604 first.
1605 And it is also possible to make \*(UA work even more closely related to
1606 the current locale setting automatically by using the variable
1607 .Va sendcharsets-else-ttycharset ,
1608 please see there for more information.
1610 All the specified character sets are tried in order unless the
1611 conversion of the part or attachment succeeds.
1612 If none of the tried (8-bit) character sets is capable to represent the
1613 content of the part or attachment,
1614 then the message will not be sent and its text will be saved to
1615 .Ev DEAD .
1616 In general, if the message
1617 .Dq Cannot convert from a to b
1618 appears, either some characters are not appropriate for the currently
1619 selected (terminal) character set,
1620 or the needed conversion is not supported by the system.
1621 In the first case, it is necessary to set an appropriate
1622 .Ev LC_CTYPE
1623 locale and/or the variable
1624 .Va ttycharset .
1626 The best results are usually achieved when \*(UA is run in a UTF-8
1627 locale on a UTF-8 capable terminal, in which case the full Unicode
1628 spectrum of characters is available.
1629 In this setup characters from various countries can be displayed,
1630 while it is still possible to use more simple character sets for sending
1631 to retain maximum compatibility with older mail clients.
1632 .Ss "Message states"
1633 \*(UA differentiates in between several different message states;
1634 the current state will be reflected in the header display if
1635 .Va headline
1636 is configured to do so.
1637 In \*(UA message states are inspected when leaving a mailbox and may
1638 cause messages to be automatically moved to the special
1639 .Ev MBOX
1640 mailbox \(en because this may be irritating to users which are used to
1641 .Dq more modern
1642 mail-user-agents, the default global
1643 .Pa \*(UR
1644 sets the
1645 .Va hold
1647 .Va keepsave
1648 variables in order to suppress this behaviour.
1649 .Bl -tag -width ".It Ql _reserved"
1650 .It Ql new
1651 Message has neither been viewed nor moved to any other state.
1652 Such messages are retained even in the system mailbox.
1653 .It Ql unread
1654 Message has neither been viewed nor moved to any other state, but the
1655 message was present already when the mailbox has been opened last:
1656 Such messages are retained even in the system mailbox.
1657 .It Ql read
1658 The message has been processed by one of the following commands:
1659 .Ic ~f ,
1660 .Ic ~m ,
1661 .Ic ~F ,
1662 .Ic ~M ,
1663 .Ic copy ,
1664 .Ic mbox ,
1665 .Ic next ,
1666 .Ic pipe  ,
1667 .Ic print ,
1668 .Ic Print ,
1669 .Ic top ,
1670 .Ic type ,
1671 .Ic Type ,
1672 .Ic undelete .
1674 .Ic delete ,
1675 .Ic dp ,
1677 .Ic dt
1678 commands may also cause the next message to be marked as read, depending
1679 on the value of the
1680 .Va autoprint
1681 variable.
1682 Except when the
1683 .Ic exit
1684 command is used, messages that are in the system mailbox or in mailboxes
1685 which were opened with the special
1686 .Ql %:
1687 prefix and are in
1688 .Ql read
1689 state when the mailbox is left will be saved in
1690 .Ev MBOX
1691 unless the option
1692 .Va hold
1693 it set.
1694 .It Ql deleted
1695 The message has been processed by one of the following commands:
1696 .Ic delete ,
1697 .Ic dp ,
1698 .Ic dt .
1699 Only
1700 .Ic undelete
1701 can be used to access such messages.
1702 .It Ql preserved
1703 The message has been processed by a
1704 .Ic preserve
1705 command and it will be retained in its current location.
1706 .It Ql saved
1707 The message has been processed by one of the following commands:
1708 .Ic save
1710 .Ic write .
1711 Unless when the
1712 .Ic exit
1713 command is used, messages that are in the system mailbox or in mailboxes
1714 which were opened with the special
1715 .Ql %:
1716 prefix and are in
1717 .Ql saved
1718 state when the mailbox is left will be deleted; they will be saved in
1719 .Ev MBOX
1720 when the option
1721 .Va keepsave
1722 is set.
1724 .Ss "Specifying messages"
1725 Commands such as
1726 .Ic print
1728 .Ic delete
1729 can be given a list of message numbers as arguments to apply to a number
1730 of messages at once.
1731 Thus
1732 .Ql delete 1 2
1733 deletes messages 1 and 2,
1734 whereas
1735 .Ql delete 1-5
1736 will delete the messages 1 through 5.
1737 In sorted or threaded mode (see the
1738 .Ic sort
1739 command),
1740 .Ql delete 1-5
1741 will delete the messages that are located between (and including)
1742 messages 1 through 5 in the sorted/threaded order, as shown in the
1743 header summary.
1744 Multiple colon modifiers can be joined into one, e.g.,
1745 .Ql :du .
1746 The following special message names exist:
1747 .Bl -tag -width ".It Ar _n_u"
1748 .It Ar :n
1750 .Ql new
1751 messages.
1752 .It Ar :o
1753 All old messages (any not in state
1754 .Ql read
1756 .Ql new ) .
1757 .It Ar :u
1759 .Ql unread
1760 messages.
1761 .It Ar :d
1763 .Ql deleted
1764 messages (for the
1765 .Ic undelete
1766 command).
1767 .It Ar :r
1769 .Ql read
1770 messages.
1771 .It Ar :f
1773 .Ic flag Ns
1774 ged messages.
1775 .It Ar :a
1776 All answered messages
1777 (cf. the
1778 .Va markanswered
1779 variable).
1780 .It Ar :t
1781 All messages marked as draft.
1782 .It Ar :s
1783 \*(OP All messages classified as spam.
1784 .It Ar :S
1785 \*(OP All messages with unsure spam classification.
1786 .It Ar \&.
1787 The current message, the so-called
1788 .Dq dot .
1789 .It Ar \&;
1790 The message that was previously the current message.
1791 .It Ar \&,
1792 The parent message of the current message,
1793 that is the message with the Message-ID given in the
1794 .Ql In-Reply-To:
1795 field or the last entry of the
1796 .Ql References:
1797 field of the current message.
1798 .It Ar -
1799 The next previous undeleted message,
1800 or the next previous deleted message for the
1801 .Ic undelete
1802 command.
1803 In sorted/threaded mode,
1804 the next previous such message in the sorted/threaded order.
1805 .It Ar +
1806 The next undeleted message,
1807 or the next deleted message for the
1808 .Ic undelete
1809 command.
1810 In sorted/threaded mode,
1811 the next such message in the sorted/threaded order.
1812 .It Ar ^
1813 The first undeleted message,
1814 or the first deleted message for the
1815 .Ic undelete
1816 command.
1817 In sorted/threaded mode,
1818 the first such message in the sorted/threaded order.
1819 .It Ar $
1820 The last message.
1821 In sorted/threaded mode,
1822 the last message in the sorted/threaded order.
1823 .It Ar & Ns Ar x
1824 In threaded mode,
1825 selects the message addressed with
1826 .Ar x ,
1827 where
1828 .Ar x
1829 is any other message specification,
1830 and all messages from the thread that begins at it.
1831 Otherwise it is identical to
1832 .Ar x .
1834 .Ar x
1835 is omitted,
1836 the thread beginning with the current message is selected.
1837 .It Ar *
1838 All messages.
1839 .It Ar `
1840 All messages that were included in the message list for the previous
1841 command.
1842 .It Ar / Ns Ar string
1843 All messages that contain
1844 .Ar string
1845 in the subject field (case ignored).
1846 See also the
1847 .Va searchheaders
1848 variable.
1850 .Ar string
1851 is empty,
1852 the string from the previous specification of that type is used again.
1853 .It Xo Op Ar @ Ns Ar name-list Ns
1854 .Ar @ Ns Ar expr
1856 All messages that contain the given case-insensitive search
1857 .Ar expr Ns
1858 ession; if the \*(OPal regular expression (see
1859 .Xr re_format 7 )
1860 support is available
1861 .Ar expr
1862 will be interpreted as one if any of the
1863 .Dq magical
1864 regular expression characters is seen.
1865 If the optional
1866 .Ar @ Ns Ar name-list
1867 part is missing, the search is restricted to the subject field body,
1868 but otherwise
1869 .Ar name-list
1870 specifies a comma-separated list of header fields to search, as in
1872 .Dl '@to,from,cc@Someone i ought to know'
1874 In order to search for a string that includes a
1875 .Ql @
1876 (commercial at) character the
1877 .Ar name-list
1878 is effectively non-optional, but may be given as the empty string.
1879 Some special header fields may be abbreviated:
1880 .Ql f ,
1881 .Ql t ,
1882 .Ql c ,
1883 .Ql b
1885 .Ql s
1886 will match
1887 .Ql From ,
1888 .Ql To ,
1889 .Ql Cc ,
1890 .Ql Bcc
1892 .Ql Subject ,
1893 respectively and case-insensitively.
1894 The special names
1895 .Ql header
1897 .Ql <
1898 can be used to search in (all of) the header(s) of the message, and the
1899 special names
1900 .Ql body
1902 .Ql >
1904 .Ql text
1906 .Ql =
1907 can be used to perform full text searches \(en whereas the former
1908 searches only the body, the latter also searches the message header.
1910 This message specification performs full text comparison, but even with
1911 regular expression support it is almost impossible to write a search
1912 expression that savely matches only a specific address domain.
1913 To request that the content of the header is treated as a list of
1914 addresses, and to strip those down to the plain email address which the
1915 search expression is to be matched against, prefix the header name
1916 (abbreviation) with a tilde
1917 .Ql ~ :
1919 .Dl '@~f@@a\e.safe\e.domain\e.match$'
1920 .It Ar address
1921 A case-insensitive
1922 .Dq any substring matches
1923 search against the
1924 .Ql From:
1925 header, which will match addresses (too) even if
1926 .Va showname
1927 is set (and POSIX says
1928 .Dq any address as shown in a header summary shall be matchable in this form ) ;
1929 However, if the
1930 .Va allnet
1931 variable is set, only the local part of the address is evaluated
1932 for the comparison, not ignoring case, and the setting of
1933 .Va showname
1934 is completely ignored.
1935 For finer control and match boundaries use the
1936 .Ql @
1937 search expression; the \*(OPal IMAP-style
1938 .Ql (from address)
1939 expression can also be used if substring matches are desired.
1942 \*(OP IMAP-style SEARCH expressions may also be used.
1943 This addressing mode is available with all types of folders;
1944 \*(UA will perform the search locally as necessary.
1945 Strings must be enclosed by double quotes
1946 .Ql \&"
1947 in their entirety if they contain white space or parentheses;
1948 within the quotes, only backslash
1949 .Ql \e
1950 is recognized as an escape character.
1951 All string searches are case-insensitive.
1952 When the description indicates that the
1953 .Dq envelope
1954 representation of an address field is used,
1955 this means that the search string is checked against both a list
1956 constructed as
1957 .Bd -literal -offset indent
1958 (\*qname\*q \*qsource\*q \*qlocal-part\*q \*qdomain-part\*q)
1961 for each address,
1962 and the addresses without real names from the respective header field.
1963 These search expressions can be nested using parentheses, see below for
1964 examples.
1966 .Bl -tag -compact -width ".It Ar _n_u"
1967 .It Ar ( criterion )
1968 All messages that satisfy the given
1969 .Ar criterion .
1970 .It Ar ( criterion1 criterion2 ... criterionN )
1971 All messages that satisfy all of the given criteria.
1972 .It Ar ( or criterion1 criterion2 )
1973 All messages that satisfy either
1974 .Ar criterion1
1976 .Ar criterion2 ,
1977 or both.
1978 To connect more than two criteria using
1979 .Ql or
1980 specifications have to be nested using additional parentheses,
1981 as with
1982 .Ql (or a (or b c)) ,
1983 since
1984 .Ql (or a b c)
1985 really means
1986 .Ql ((a or b) and c) .
1987 For a simple
1988 .Ql or
1989 operation of independent criteria on the lowest nesting level,
1990 it is possible to achieve similar effects by using three separate
1991 criteria, as with
1992 .Ql (a) (b) (c) .
1993 .It Ar ( not criterion )
1994 All messages that do not satisfy
1995 .Ar criterion .
1996 .It Ar ( bcc \*q Ns Ar string Ns Ar \*q )
1997 All messages that contain
1998 .Ar string
1999 in the envelope representation of the
2000 .Ql Bcc:
2001 field.
2002 .It Ar ( cc \*q Ns Ar string Ns Ar \*q )
2003 All messages that contain
2004 .Ar string
2005 in the envelope representation of the
2006 .Ql Cc:
2007 field.
2008 .It Ar ( from \*q Ns Ar string Ns Ar \*q )
2009 All messages that contain
2010 .Ar string
2011 in the envelope representation of the
2012 .Ql From:
2013 field.
2014 .It Ar ( subject \*q Ns Ar string Ns Ar \*q )
2015 All messages that contain
2016 .Ar string
2017 in the
2018 .Ql Subject:
2019 field.
2020 .It Ar ( to \*q Ns Ar string Ns Ar \*q )
2021 All messages that contain
2022 .Ar string
2023 in the envelope representation of the
2024 .Ql To:
2025 field.
2026 .It Ar ( header name \*q Ns Ar string Ns Ar \*q )
2027 All messages that contain
2028 .Ar string
2029 in the specified
2030 .Ql Name:
2031 field.
2032 .It Ar ( body \*q Ns Ar string Ns Ar \*q )
2033 All messages that contain
2034 .Ar string
2035 in their body.
2036 .It Ar ( text \*q Ns Ar string Ns Ar \*q )
2037 All messages that contain
2038 .Ar string
2039 in their header or body.
2040 .It Ar ( larger size )
2041 All messages that are larger than
2042 .Ar size
2043 (in bytes).
2044 .It Ar ( smaller size )
2045 All messages that are smaller than
2046 .Ar size
2047 (in bytes).
2048 .It Ar ( before date )
2049 All messages that were received before
2050 .Ar date ,
2051 which must be in the form
2052 .Ql d[d]-mon-yyyy ,
2053 where
2054 .Ql d
2055 denotes the day of the month as one or two digits,
2056 .Ql mon
2057 is the name of the month \(en one of
2058 .Ql Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ,
2060 .Ql yyyy
2061 is the year as four digits, e.g.,
2062 .Ql 28-Dec-2012 .
2063 .It Ar ( on date )
2064 All messages that were received on the specified date.
2065 .It Ar ( since date )
2066 All messages that were received since the specified date.
2067 .It Ar ( sentbefore date )
2068 All messages that were sent on the specified date.
2069 .It Ar ( senton date )
2070 All messages that were sent on the specified date.
2071 .It Ar ( sentsince date )
2072 All messages that were sent since the specified date.
2073 .It Ar ()
2074 The same criterion as for the previous search.
2075 This specification cannot be used as part of another criterion.
2076 If the previous command line contained more than one independent
2077 criterion then the last of those criteria is used.
2079 .Ss "On URL syntax and credential lookup"
2080 \*(IN For accessing protocol-specific resources, like POP3 mailboxes,
2081 usage of compact and standardized Uniform Resource Locators
2082 (URL, RFC 1738) has become omnipresent.
2083 \*(UA expects and understands URLs in the following form;
2084 parts in brackets
2085 .Ql []
2086 denote optional parts, optional either because there also exist other
2087 ways to define the information in question or because support of the
2088 part is protocol-specific \(en e.g.,
2089 .Ql /path
2090 is used by the IMAP protocol but not by POP3.
2092 .Dl PROTOCOL://[USER[:PASSWORD]@]server[:port][/path]
2095 .Ql USER
2097 .Ql PASSWORD
2098 are specified as part of an URL they must be given in URL percent
2099 encoded (RFC 3986) form \(en the command
2100 .Ic urlencode
2101 can be used to perform the encoding and show the encoded value.
2102 (This doesn't really conform to any standard, but for one it isn't
2103 used for any data exchange over the internet, and second it's easier for
2104 users to simply call
2105 .Ic urlencode
2106 on a string and use that instead of having to deal with several
2107 different standards.)
2108 On the other hand, values given in variables are expected not to be URL
2109 percent encoded.
2111 Many variable options of \*(UA exist in multiple versions, called
2112 variable chains for the rest of this document: the plain
2113 .Ql variable
2114 as well as
2115 .Ql variable-HOST
2117 .Ql variable-USER@HOST .
2118 Here
2119 .Ql HOST
2120 indeed means
2121 .Ql server:port
2122 if a
2123 .Ql port
2124 had been specified in the respective URL, otherwise it refers to the plain
2125 .Ql server .
2126 Also,
2127 .Ql USER
2128 isn't truly the
2129 .Ql USER
2130 that had been found when doing the user chain lookup as is described
2131 below, i.e., this
2132 .Ql USER
2133 will never be in URL percent encoded form, whether it came from an URL or not.
2135 For example, whether an hypothetical URL
2136 .Ql smtp://hey%3Ayou@our.house
2137 had been given that includes a user, or whether the URL was
2138 .Ql smtp://our.house
2139 and the user had been found differently, to lookup the variable chain
2140 .Va smtp-use-starttls
2141 \*(UA first looks for whether
2142 .Ql smtp-\:use-\:starttls-\:hey:you@our.house
2143 is defined, then whether
2144 .Ql smtp-\:use-\:starttls-\:our.house
2145 exists before finally ending up looking at the plain variable itself.
2147 \*(UA obeys the following logic scheme when dealing with the
2148 necessary credential informations of an account:
2149 .Bl -bullet
2151 If no
2152 .Ql USER
2153 has been given in the URL the variables
2154 .Va user-HOST
2156 .Va user
2157 are looked up; if no such variable(s) can be found then \*(UA will,
2158 when enforced by the \*(OPal variables
2159 .Va netrc-lookup-HOST
2161 .Va netrc-lookup ,
2162 search the users
2163 .Pa .netrc
2164 file for a
2165 .Ql HOST
2166 specific entry which provides a
2167 .Ql login
2168 name: this lookup will only succeed if unambiguous (one possible matching
2169 entry for
2170 .Ql HOST ) .
2172 If there is still no
2173 .Ql USER
2174 then \*(UA will fall back to the user who is supposed to run \*(UA:
2175 either the name that has been given with the
2176 .Fl u
2177 command line option (or, equivalently, but with less precedence, the
2178 environment variable
2179 .Ev USER ) ,
2180 or the
2181 .Dq current
2182 user.
2183 The identity of this user has been fixated during \*(UA startup and is
2184 known to be a valid user on the current host.
2186 Authentication: unless otherwise noted this will lookup the
2187 .Va PROTOCOL-auth-USER@HOST , PROTOCOL-auth-HOST , PROTOCOL-auth
2188 variable chain, falling back to a protocol-specific default should this
2189 have no success.
2191 If no
2192 .Ql PASSWORD
2193 has been given in the URL \(en it should be noted once that specifying
2194 the password in the URL is only syntactic sugar for the user, it'll
2195 never be part of an URL that \*(UA uses itself \(en, then if the
2196 .Ql USER
2197 has been found through the \*(OPal
2198 .Pa .netrc
2199 file lookup then that may have already provided the password, too.
2200 Otherwise the variable chain
2201 .Va password-USER@HOST , password-HOST , password
2202 is looked up.
2204 \*(OP Then if any of the variables of the chain
2205 .Va agent-shell-lookup-USER@HOST , agent-shell-lookup-HOST , \
2206   agent-shell-lookup
2207 is set the shell command specified therein is run and the output (less
2208 newline characters) will be used as the password.
2209 It is perfectly valid for such an agent to simply not return any data,
2210 in which case the password lookup is continued somewhere else;
2211 Any command failure is treated as a hard error, however.
2213 The next variable chain that is inspected is the \*(OPal
2214 .Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup ,
2215 but this time looking only for the password (multiple user accounts
2216 for a single machine may exist as well as a fallback entry without
2217 user but with a password).
2219 If at that point there is still no password available, but the
2220 (protocols') chosen authentication type requires a password, then in
2221 interactive mode the user will be prompted on the terminal.
2224 .Sy Note:
2225 S/MIME verification works relative to the values found in the
2226 .Ql From:
2228 .Ql Sender: )
2229 header field(s), which means that the values of
2230 .Va smime-sign , smime-sign-cert , smime-sign-include-certs
2232 .Va smime-sign-message-digest
2233 will not be looked up using the
2234 .Ql USER
2236 .Ql HOST
2237 chains from above but instead use the corresponding values from the
2238 message that is being worked on.
2239 In unusual cases multiple and different
2240 .Ql USER
2242 .Ql HOST
2243 combinations may therefore be involved \(en on the other hand those
2244 unusual cases become possible.
2245 The usual case is as short as:
2247 .Dl set smtp=smtp://USER:PASS@HOST smtp-use-starttls \e
2248 .Dl \ \ \ \ smime-sign smime-sign-cert=+smime.pair
2250 The section
2251 .Sx EXAMPLES
2252 contains complete example configurations.
2253 .Ss "Command line editor"
2254 \*(OP \*(UA can be configured to support a command line editor and
2255 command history lists which are saved in between sessions.
2256 One may link against fully-fledged external libraries
2257 .Pf ( Xr readline 6 ,
2258 .Xr editline 3 Ns
2259 ) or use \*(UA's own command line editor NCL (Nail-Command-Line)
2260 instead, which should work in all environments which comply to the
2261 ISO C standard (ISO/IEC 9899:1990/Amendment 1:1995).
2262 When an external library is used, interactive behaviour of \*(UA relies
2263 on that library and may not correspond one-to-one to what is described
2264 in this manual.
2266 Regardless of the actually used command line editor
2267 .Ic history
2268 entries will be created for lines entered in command mode only, and
2269 creation of such an entry can be forcefully suppressed by starting the
2270 line with a space character.
2271 Note that
2272 .Ic history
2273 handling is by itself an optional feature and may therefore not be
2274 available.
2275 For more information see the documentation of the options
2276 .Va emptystart ,
2277 .Va history-gabby ,
2278 .Va history-gabby-persist ,
2279 .Va line-editor-disable ,
2280 .Va NAIL_HISTFILE
2282 .Va NAIL_HISTSIZE .
2284 The builtin \*(UA command line editor supports the following operations;
2285 the notation
2286 .Ql ^-character
2287 stands for the combination of the
2288 .Dq Control
2289 key plus the mentioned character, e.g.,
2290 .Ql ^A
2291 means
2292 .Dq hold down control key and press the A key :
2294 .Bl -tag -compact -width "Ql _M"
2295 .It Ql ^A
2296 Go to the start of the line.
2297 .It Ql ^B
2298 Move the cursor backward one character.
2299 .It Ql ^D
2300 Forward delete the character under the cursor;
2301 quits \*(UA if used on the empty line unless the
2302 .Va ignoreeof
2303 option is set.
2304 .It Ql ^E
2305 Go to the end of the line.
2306 .It Ql ^F
2307 Move the cursor forward one character.
2308 .It Ql ^G
2309 Cancel current operation, full reset.
2310 If there is an active history search or tabulator expansion then this
2311 command will first reset that, reverting to the former line content;
2312 thus a second reset is needed for a full reset in this case.
2313 In all cases \*(UA will reset a possibly used multibyte character input
2314 state machine.
2315 .It Ql ^H
2316 The same as
2317 .Dq backspace :
2318 backward delete one character.
2319 .It Ql ^I
2320 \*(OP The same as
2321 .Dq horizontal tabulator :
2322 try to expand the word before the cursor.
2323 (Note this is not
2324 .Dq tabulator-completion
2325 as is known from the
2326 .Xr sh 1
2327 but really means the usual \*(UA expansion, as documented for
2328 .Ic file ,
2329 yet it involves shell expansion as a last step, too.)
2330 .It Ql ^J
2331 The same as
2332 .Dq ENTER :
2333 complete this line of input.
2334 .It Ql ^K
2335 Delete all characters from the cursor to the end of the line.
2336 .It Ql ^L
2337 Repaint the line.
2338 .It Ql ^N
2339 \*(OP Go to the next history entry.
2340 .It Ql ^O
2341 Execute the command
2342 .Ic dp .
2343 .It Ql ^P
2344 \*(OP Go to the previous history entry.
2345 .It Ql ^R
2346 \*(OP Complete the current line from (the remaining older) history entries.
2347 .It Ql ^U
2348 The same as
2349 .Ql ^A
2350 followed by
2351 .Ql ^K .
2352 .It Ql ^W
2353 Delete the characters from the one preceding the cursor to the preceding
2354 word boundary.
2355 .It Ql ^X
2356 Move the cursor forward one word boundary.
2357 .It Ql ^Y
2358 Move the cursor backward one word boundary.
2361 If problems with commands that are based upon rightwise movement are
2362 encountered, adjustments of the option
2363 .Va line-editor-cursor-right
2364 may solve the problem, as documented for it.
2366 If the terminal produces key sequences which are compatible with
2367 .Xr xterm 1
2368 then the left and right cursor keys will map to
2369 .Ql ^B
2371 .Ql ^F ,
2372 respectively, the up and down cursor keys will map to
2373 .Ql ^P
2375 .Ql ^N ,
2376 and the Home/End/PgUp/PgDown keys will call the
2377 .Ic z
2378 command with the respective arguments
2379 .Ql 0 ,
2380 .Ql $ ,
2381 .Ql -
2383 .Ql +
2384 (i.e., perform scrolling through the header summary list).
2385 .Ss "Coloured message display"
2386 \*(OP \*(UA can be configured to support coloured message display,
2387 realized by emitting ANSI colour escape sequences.
2388 Colours are only used when the
2389 .Ev TERM
2390 environment variable is set and either the terminal type can be found in
2391 .Va colour-terms
2392 or its name includes the string
2393 .Ql color .
2395 On top of that the binary option
2396 .Va colour-pager
2397 defines whether these colour sequences are also generated when the output
2398 of a command needs to go through the
2399 .Ev PAGER
2400 (also see
2401 .Va crt Ns
2402 ) \(en this is not enabled by default because different pager programs
2403 need different command line switches or other configuration in order to
2404 support those colour sequences, please see the option for more details.
2406 To forcefully disable all colour support, set
2407 .Va colour-disable .
2409 Colours can be configured through font attributes
2410 .Pf ( Ql ft=
2411 \(en
2412 .Ql bold ,
2413 .Ql invers
2415 .Ql underline ) ,
2416 foreground
2417 .Pf ( Ql fg= )
2418 and background
2419 .Pf ( Ql bg= )
2420 colours
2421 .Pf ( Ql black ,
2422 .Ql blue ,
2423 .Ql green ,
2424 .Ql red ,
2425 .Ql brown ,
2426 .Ql magenta ,
2427 .Ql cyan
2429 .Ql white ) .
2430 Multiple specifications can be joined in a comma separated list, as in
2432 .Dl set colour-msginfo="ft=bold,fg=magenta,bg=cyan"
2434 Options to be set are
2435 .Va colour-msginfo ,
2436 .Va colour-partinfo ,
2437 .Va colour-from_ ,
2438 .Va colour-header
2440 .Va colour-uheader ,
2441 as well as
2442 .Va colour-user-headers ,
2443 which is a list of headers to be colourized via
2444 .Va colour-uheader
2445 instead of the default
2446 .Va colour-header .
2447 .Sh COMMANDS
2448 Each command is typed on a line by itself,
2449 and may take arguments following the command word.
2450 The command need not be typed in its entirety \(en
2451 the first command which matches the typed prefix is used.
2452 (The command
2453 .Ic list
2454 prints a sorted list of available commands, and the command
2455 .Ic help
2457 .Ic \&? ) ,
2458 when given an argument, will show a documentation string for the
2459 expansion, as in
2460 .Ql ?unc ;
2461 documentation strings are however \*(OPal.)
2463 For commands which take message lists as arguments, the next message
2464 forward that satisfies the command's requirements will be used shall no
2465 explicit message list have been passed.
2466 If there are no messages forward of the current message,
2467 the search proceeds backwards,
2468 and if there are no good messages at all,
2469 \*(UA types
2470 .Dq no applicable messages
2471 and aborts the command.
2472 The arguments to commands can be quoted, using the following methods:
2474 .Bl -bullet -compact -offset indent
2476 An argument can be enclosed between paired double-quotes
2477 .Ql """argument"""
2479 single-quotes
2480 .Ql 'argument' ;
2481 any white space, shell word expansion, or backslash characters (except
2482 as described next) within the quotes are treated literally as part of
2483 the argument.
2484 A double-quote will be treated literally within single-quotes and vice
2485 versa.
2486 Inside such a quoted string the actually used quote character can be
2487 used nonetheless by escaping it with a backslash
2488 .Ql \e ,
2489 as in
2490 .Ql """y\e""ou""" .
2492 An argument that is not enclosed in quotes, as above, can usually still
2493 contain space characters if those spaces are backslash-escaped.
2495 A backslash outside of the enclosing quotes is discarded
2496 and the following character is treated literally as part of the argument.
2498 An unquoted backslash at the end of a command line is discarded and the
2499 next line continues the command.
2502 Filenames, where expected, are subsequently subjected to the following
2503 transformations, in sequence:
2505 .Bl -bullet -compact -offset indent
2507 If the filename begins with an unquoted plus sign, and the
2508 .Va folder
2509 variable is defined,
2510 the plus sign will be replaced by the value of the
2511 .Va folder
2512 variable followed by a slash.
2513 If the
2514 .Va folder
2515 variable is unset or is set to null, the filename will be unchanged.
2517 Shell word expansions are applied to the filename.
2518 .Sy Compatibility note:
2519 on the long run support for complete shell word expansion will be
2520 replaced by an internally implemented restricted expansion mechanism in
2521 order to circumvent possible security impacts through shell expansion.
2522 Expect that a growing number of program parts only support this
2523 restricted syntax:
2525 Meta expansions are applied to the filename: leading tilde characters
2526 .Pf ( Ql ~/ )
2527 will be replaced by the expansion of
2528 .Ev HOME ,
2529 and any occurrence of
2530 .Ql $VARIABLE
2532 .Ql ${VARIABLE} )
2533 will be replaced by the expansion of the variable, if possible;
2534 \*(UA internal as well as environmental (shell) variables can be
2535 accessed through this mechanism.
2536 In order to include a raw
2537 .Ql $
2538 character precede it with a backslash
2539 .Ql \e ,
2540 to include a backslash double it.
2541 If more than a single pathname results from this expansion and the
2542 command is expecting one file, an error results.
2544 Note that in interactive display context, in order to allow simple
2545 value acceptance (typing
2546 .Dq ENTER ) ,
2547 backslash quoting is performed automatically as necessary, e.g., a file
2548 .Ql diet\e is \ecurd.txt
2549 will be displayed as
2550 .Ql diet\e\e is \e\ecurd.txt .
2553 The following commands are available:
2554 .Bl -tag -width ".Ic _ccount"
2556 .It Ic #
2557 The comment-command causes the entire line to be ignored.
2558 .Sy Note:
2559 this really is a normal command which' purpose is to discard its
2560 arguments, not a
2561 .Dq comment-start
2562 indicating special character, which means that, e.g., trailing comments
2563 on a line are not possible.
2565 .It Ic ~
2566 Interprets the remainder of the word as a macro name and passes it
2567 through to the
2568 .Ic call
2569 command; e.g.,
2570 .Ql ~ Ns Ar mymacro
2571 is a shorter synonym for
2572 .Ql call Ar mymacro .
2574 .It Ic -
2575 Print out the preceding message.
2576 If given a numeric argument n,
2577 goes to the n'th previous message and prints it.
2579 .It Ic =
2580 Show the current message number (the
2581 .Dq dot ) .
2583 .It Ic \&?
2584 Prints a brief summary of commands.
2585 \*(OP Given an argument a synopsis for the command in question is
2586 printed instead;
2587 commands can be abbreviated in general and this command can be used
2588 to see the full expansion of an abbreviation including the synopsis,
2589 try, e.g.,
2590 .Ql ?h ,
2591 .Ql ?hel
2593 .Ql ?help
2594 and see how the display changes.
2596 .It Ic \&!
2597 Executes the
2598 .Ev SHELL
2599 (see
2600 .Xr sh 1 Ns
2601 ) command which follows.
2603 .It Ic \&|
2604 A synonym for the
2605 .Ic pipe
2606 command.
2608 .It Ic account
2609 (ac) Creates, selects or lists (an) account(s).
2610 An account is a group of commands and variable settings which together
2611 usually arrange the environment for the purpose of creating a system login.
2612 Without any argument a listing of all defined accounts and their content
2613 is printed.
2614 A specific account can be activated by giving solely its name, resulting
2615 in the system mailbox or inbox of that account to be activated as via an
2616 explicit use of the command
2617 .Ic file .
2618 The two argument form is identical to defining a macro as via
2619 .Ic define .
2620 For example:
2621 .Bd -literal -offset indent
2622 account myisp {
2623   set folder=imaps://mylogin@imap.myisp.example
2624   set record=+Sent
2625   set from="myname@myisp.example (My Name)"
2626   set smtp=smtp://mylogin@smtp.myisp.example
2630 creates an account named
2631 .Ql myisp
2632 which can later be selected by specifying
2633 .Ql account myisp .
2634 The special account
2635 .Ql null
2636 (case-insensitive) always exists.
2637 .Ic localopts
2638 can be used to localize account settings \(en different to normal macros
2639 the settings will be reverted once the account is switched off.
2640 Accounts can be deleted via
2641 .Ic unaccount .
2643 .It Ic alias
2644 (a) With no arguments, prints out all currently-defined aliases.
2645 With one argument, prints out that alias.
2646 With more than one argument,
2647 creates a new alias or appends to an existing one.
2648 .Ic unalias
2649 can be used to delete aliases.
2651 .It Ic alternates
2652 (alt) Manage a list of alternate addresses / names of the active user,
2653 members of which will be removed from recipient lists when replying to
2654 messages (and the
2655 .Va metoo
2656 variable is not set).
2657 If arguments are given the set of alternate names is replaced by them,
2658 without arguments the current set is displayed.
2660 .It Ic answered
2661 Takes a message list and marks each message as having been answered.
2662 This mark has no technical meaning in the mail system;
2663 it just causes messages to be marked in the header summary,
2664 and makes them specially addressable.
2666 .It Ic cache
2667 \*(OP Only applicable to cached IMAP mailboxes;
2668 takes a message list and reads the specified messages into the IMAP
2669 cache.
2671 .It Ic call
2672 Calls a macro that has been created via
2673 .Ic define .
2675 .It Ic cd
2676 (ch) Change the working directory to
2677 .Ev HOME
2678 or the given argument.
2679 Synonym for
2680 .Ic chdir .
2682 .It Ic certsave
2683 \*(OP Only applicable to S/MIME signed messages.
2684 Takes a message list and a file name and saves the certificates
2685 contained within the message signatures to the named file in both
2686 human-readable and PEM format.
2687 The certificates can later be used to send encrypted messages to the
2688 respective message senders by setting
2689 .Va smime-encrypt-USER@HOST
2690 variables.
2692 .It Ic chdir
2693 (ch) Change the working directory to
2694 .Ev HOME
2695 or the given argument.
2696 Synonym for
2697 .Ic cd .
2699 .It Ic collapse
2700 Only applicable to threaded mode.
2701 Takes a message list and makes all replies to these messages invisible
2702 in header summaries, unless they are in state
2703 .Ql new .
2705 .It Ic connect
2706 \*(OP If operating in disconnected mode on an IMAP mailbox,
2707 switch to online mode and connect to the mail server while retaining
2708 the mailbox status.
2709 See the description of the
2710 .Va disconnected
2711 variable for more information.
2713 .It Ic Copy
2714 (C) Copy messages to files whose names are derived from the author of
2715 the respective message and don't mark them as being saved;
2716 otherwise identical to
2717 .Ic Save .
2719 .It Ic copy
2720 (c) Copy messages to the named file and don't mark them as being saved;
2721 otherwise identical to
2722 .Ic save .
2724 .It Ic cwd
2725 Print the current working directory.
2727 .It Ic Decrypt
2728 \*(OP For unencrypted messages this command is identical to
2729 .Ic Copy ;
2730 Encrypted messages are first decrypted, if possible, and then copied.
2732 .It Ic decrypt
2733 \*(OP For unencrypted messages this command is identical to
2734 .Ic copy ;
2735 Encrypted messages are first decrypted, if possible, and then copied.
2737 .It Ic define
2738 Without arguments the current list of macros, including their content,
2739 is printed, but otherwise a macro is defined.
2740 A macro definition is a sequence of commands in the following form:
2741 .Bd -literal -offset indent
2742 define name {
2743   command1
2744   command2
2745   ...
2746   commandN
2750 A defined macro can be invoked explicitly by using the
2751 .Ic call
2753 .Ic ~
2754 commands, or implicitly by setting the
2755 .Va folder-hook
2757 .Va folder-hook-FOLDER
2758 variables.
2759 Note that interpretation of
2760 .Ic localopts
2761 depends on how (i.e.,
2762 .Dq as what :
2763 normal macro, folder hook, account switch) the macro is invoked.
2764 Macros can be deleted via
2765 .Ic undefine .
2767 .It Ic delete
2768 (d) Marks the given message list as
2769 .Ql deleted .
2770 Deleted messages will neither be saved in
2771 .Ev MBOX
2772 nor will they be available for most other commands.
2774 .It Ic discard
2775 (di) Identical to
2776 .Ic ignore .
2777 Also see
2778 .Ic retain .
2780 .It Ic disconnect
2781 \*(OP (disco) If operating in online mode on an IMAP mailbox,
2782 switch to disconnected mode while retaining the mailbox status.
2783 See the description of the
2784 .Va disconnected
2785 variable for more.
2786 A list of messages may optionally be given as argument;
2787 the respective messages are then read into the cache before the
2788 connection is closed.
2789 Thus `disco *' makes the entire mailbox available for disconnected use.
2792 .It Ic dp , dt
2793 Deletes the current message and prints the next message.
2794 If there is no next message, \*(UA says
2795 .Dq at EOF .
2797 .It Ic draft
2798 Takes a message list and marks each given message as a draft.
2799 This mark has no technical meaning in the mail system;
2800 it just causes messages to be marked in the header summary,
2801 and makes them specially addressable.
2803 .It Ic echo
2804 (ec) Echoes its arguments,
2805 resolving special names as documented for the command
2806 .Ic file .
2807 The escape sequences
2808 .Ql \ea ,
2809 .Ql \eb ,
2810 .Ql \ec ,
2811 .Ql \ef ,
2812 .Ql \en ,
2813 .Ql \er ,
2814 .Ql \et ,
2815 .Ql \ev ,
2816 .Ql \e\e
2818 .Ql \e0octal-num
2819 are interpreted just as they are by
2820 .Xr printf 1
2821 (proper quoting provided).
2823 .It Ic edit
2824 (e) Point the text editor (as defined in
2825 .Ev EDITOR )
2826 at each message from the given list in turn.
2827 Modified contents are discarded unless the
2828 .Va writebackedited
2829 variable is set.
2831 .It Ic elif
2832 Part of the
2833 .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif
2834 conditional \(em if the condition of a preceeding
2835 .Ic if
2836 was false, check the following condition and execute the following block
2837 if it evaluates true.
2839 .It Ic else
2840 (el) Part of the
2841 .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif
2842 conditional \(em if none of the conditions of the preceeding
2843 .Ic if
2845 .Ic elif
2846 commands was true, the
2847 .Ic else
2848 block is executed.
2850 .It Ic endif
2851 (en) Marks the end of an
2852 .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif
2853 conditional execution block.
2855 .It Ic errors
2856 \*(OP Since \*(UA uses the console as a user interface it can happen
2857 that messages scroll by too fast to become recognized.
2858 Optionally an error message ring queue is available which stores
2859 duplicates of any error message and notifies the user in interactive
2860 sessions whenever a new error has occurred.
2861 The queue is finite: if its maximum size is reached any new message
2862 replaces the eldest.
2863 The command
2864 .Ic errors
2865 can be used to manage this message queue: if given
2866 .Ar show
2867 or no argument the queue will be displayed and cleared,
2868 .Ar clear
2869 will only clear all messages from the queue.
2871 .It Ic exit
2872 (ex or x) Exit from \*(UA without changing the active mailbox and skip
2873 any saving of messages in
2874 .Ev MBOX
2875 as well as a possibly tracked command line editor history file.
2877 .It Ic features
2878 Print the list of features that have been compiled into \*(UA.
2880 .It Ic File
2881 (Fi) Like
2882 .Ic file ,
2883 but open the mailbox readonly.
2885 .It Ic file
2886 (fi) The file command switches to a new mailbox.
2887 Without arguments it prints the complete state of the current mailbox.
2888 If an argument is given, it will write out changes (such as deletions)
2889 the user has made and open a new mailbox.
2890 Some special conventions are recognized for the
2891 .Ar name
2892 argument:
2894 .Bl -tag -compact -offset indent -width ".Ar %:__lespec"
2895 .It Ar #
2896 (number sign) means the previous file,
2897 .It Ar %
2898 (percent sign) means the invoking user's system mailbox
2899 (or the value of
2900 .Va folder
2901 for IMAP folders),
2902 .It Ar %user
2903 means the system mailbox of
2904 .Ar user
2905 (and never the value of
2906 .Va folder ,
2907 regardless of its actual setting),
2908 .It Ar &
2909 (ampersand) means the invoking user's
2910 .Ev MBOX
2911 file and
2912 .It Ar +file
2913 means a
2914 .Ar file
2915 in the
2916 .Va folder
2917 directory.
2918 .It Ar %:filespec
2919 expands to the same value as
2920 .Ar filespec ,
2921 but the file is handled as a system mailbox by, e.g., the
2922 .Ic mbox
2924 .Ic save
2925 commands, meaning that messages that have been read in the current
2926 session will be moved to the
2927 .Ev MBOX
2928 mailbox instead of simply being flagged as read.
2931 If the name matches one of the strings defined with the command
2932 .Ic shortcut ,
2933 it is replaced by its long form and expanded.
2934 If the name ends with
2935 .Ql .gz ,
2936 .Ql .bz2
2938 .Ql .xz
2939 it is treated as being compressed with
2940 .Xr gzip 1 ,
2941 .Xr bzip2 1
2943 .Xr xz 1 ,
2944 respectively, and transparently handled through an intermediate
2945 (un)compression step (using a temporary file) with the according
2946 facility, sufficient support provided.
2947 Likewise, if the named file doesn't exist, but a file with one of the
2948 mentioned compression extensions does, then the name is automatically
2949 expanded and the compressed file is used.
2951 Otherwise, if the name ends with an extension for which
2952 .Va file-hook-load-EXTENSION
2954 .Va file-hook-save-EXTENSION
2955 variables are set, then the given hooks will be used to load and save
2956 .Dq name ,
2957 and \*(UA will work with an intermediate temporary file.
2959 MBOX files (flat file-based mailboxes) are generally locked during file
2960 operations in order to avoid inconsistencies against concurrent
2961 modifications.
2962 Mailbox files which \*(UA treats as system mailboxes will also be
2963 protected by so-called dotlock files, the traditional way of mail spool
2964 file locking: for any file
2965 .Ql a
2966 a lock file
2967 .Ql a.lock
2968 will be created for the duration of the synchronization \(em
2969 as necessary a privilege-separated dotlock child process will be used
2970 to accommodate for necessary privilege adjustments in order to create
2971 the dotlock file in the same directory
2972 and with the same user and group identities as the file of interest.
2975 .Ar name
2976 refers to a directory with the subdirectories
2977 .Ql tmp ,
2978 .Ql new
2980 .Ql cur ,
2981 then it is treated as a folder in
2982 .Dq Maildir
2983 format.
2984 A name of the form
2986 .Dl \*(IN protocol://[user[:password]@]host[:port][/path]
2987 .Dl \*(OU protocol://[user@]host[:port][/path]
2989 is taken as an Internet mailbox specification.
2990 The \*(OPally supported protocols are
2991 .Ar pop3
2992 (POP3) and
2993 .Ar pop3s
2994 (POP3 with SSL/TLS encrypted transport).
2996 .Ar [/path]
2997 part is valid only for IMAP; there it defaults to
2998 .Ar INBOX .
2999 Also see the section
3000 .Sx "On URL syntax and credential lookup" .
3002 \*(OU If
3003 .Ar user
3004 contains special characters, in particular
3005 .Ql /
3007 .Ql % ,
3008 they must be escaped in URL notation \(en the command
3009 .Ic urlencode
3010 can be used to show the necessary conversion.
3011 The optional `path' part applies to IMAP only;
3012 if it is omitted, the default `INBOX' is used.
3014 If \*(UA is connected to an IMAP server,
3015 a name of the form `@mailbox' refers to the `mailbox' on that server,
3016 but otherwise a `@' prefix has no special meaning.
3018 .It Ic flag
3019 Takes a message list and marks the messages as
3020 .Ic flag Ns
3021 ged for urgent/special attention.
3022 This mark has no technical meaning in the mail system;
3023 it just causes messages to be highlighted in the header summary,
3024 and makes them specially addressable.
3026 .It Ic folder
3027 (fold) The same as
3028 .Ic file .
3030 .It Ic folders
3031 With no arguments, list the names of the folders in the folder directory.
3032 With an existing folder as an argument,
3033 lists the names of folders below the named folder;
3034 e.\|g. the command `folders @' lists the folders on the base level of
3035 the current IMAP server.
3036 See also the variable
3037 .Va imap-list-depth .
3039 .It Ic Followup
3040 (F) Similar to
3041 .Ic Respond ,
3042 but saves the message in a file named after the local part of the first
3043 recipient's address (instead of in
3044 .Va record Ns ).
3046 .It Ic followup
3047 (fo) Similar to
3048 .Ic respond ,
3049 but saves the message in a file named after the local part of the first
3050 recipient's address (instead of in
3051 .Va record Ns ).
3053 .It Ic followupall
3054 Similar to
3055 .Ic followup ,
3056 but responds to all recipients regardless of the
3057 .Va flipr
3058 variable.
3060 .It Ic followupsender
3061 Similar to
3062 .Ic Followup ,
3063 but responds to the sender only regardless of the
3064 .Va flipr
3065 variable.
3067 .It Ic Forward
3068 Alias for
3069 .Ic Fwd .
3071 .It Ic forward
3072 Alias for
3073 .Ic fwd .
3075 .It Ic from
3076 (f) Takes a list of messages and prints their message headers
3077 (which qualifies this command as \*(UAs search facility).
3079 .It Ic Fwd
3080 Similar to
3081 .Ic fwd ,
3082 but saves the message in a file named after the local part of the
3083 recipient's address (instead of in
3084 .Va record Ns ).
3086 .It Ic fwd
3087 Takes a message and the address of a recipient
3088 and forwards the message to him.
3089 The text of the original message is included in the new one,
3090 with the value of the
3091 .Va fwdheading
3092 variable printed before.
3094 .Ic fwdignore
3096 .Ic fwdretain
3097 commands specify which header fields are included in the new message.
3098 Only the first part of a multipart message is included unless the
3099 .Va forward-as-attachment
3100 option is set.
3101 Unless the option
3102 .Va fullnames
3103 is set recipient addresses will be stripped from comments, names etc.
3105 .It Ic fwdignore
3106 Specifies which header fields are to be ignored with the command
3107 .Ic fwd .
3108 This command has no effect when the
3109 .Va forward-as-attachment
3110 option is set.
3112 .It Ic fwdretain
3113 Specifies which header fields are to be retained with the command
3114 .Ic fwd .
3115 .Ic fwdretain
3116 overrides
3117 .Ic fwdignore .
3118 This command has no effect when the
3119 .Va forward-as-attachment
3120 option is set.
3122 .It Ic ghost
3123 Define or list command aliases, so-called ghosts.
3124 Without arguments a list of all currently known aliases is printed.
3125 With one argument the expansion of the given alias is shown.
3126 With two or more arguments a command alias is defined or updated: the
3127 first argument is the name under which the remaining command line should
3128 be accessible, the content of which can be just about anything.
3129 A ghost can be used everywhere a normal command can be used, but always
3130 takes precedence; any arguments that are given to the command alias are
3131 joined onto the alias content, and the resulting string forms the
3132 command line that is, in effect, executed.
3133 Also see
3134 .Ic unghost .
3135 .Bd -literal -offset indent
3136 ? gh xx
3137 `ghost': no such alias: "xx"
3138 ? gh xx echo hello,
3139 ? gh xx
3140 ghost xx "echo hello,"
3141 ? xx
3142 hello,
3143 ? xx world
3144 hello, world
3147 .It Ic headers
3148 (h) Show the current group of headers, the size of which depends on
3149 the variable
3150 .Va screen .
3151 If a message-specification is given the group of headers containing the
3152 first message therein is shown and the message at the top of the screen
3153 becomes the new
3154 .Dq dot .
3156 .It Ic help
3157 (hel) A synonym for
3158 .Ic \&? .
3160 .It Ic history
3161 \*(OP Either
3162 .Ar show
3164 .Ar clear
3165 the list of history entries;
3166 a decimal
3167 .Ar NUMBER
3168 argument selects and shows the respective history entry \(en
3169 press
3170 .Dq ENTER
3171 to accept it, and the history entry will become the new history top.
3172 The default mode if no arguments are given is
3173 .Ar show .
3175 .It Ic hold
3176 (ho, also
3177 .Ic preserve )
3178 Takes a message list and marks each message therein to be saved in the
3179 user's system mailbox instead of in
3180 .Ev MBOX .
3181 Does not override the
3182 .Ic delete
3183 command.
3184 \*(UA deviates from the POSIX standard with this command, because a
3185 .Ic next
3186 command issued after
3187 .Ic hold
3188 will display the following message, not the current one.
3190 .It Ic if
3191 (i) Part of the nestable
3192 .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif
3193 conditional execution construct \(em if the given condition is true then
3194 the encapsulated block is executed.
3195 POSIX only supports the conditions
3196 .Ql [Rr]eceive ,
3197 .Ql [Ss]end
3199 .Ql [Tt]erm
3200 (execute if standard input is a tty), all remaining conditions are
3201 non-portable extensions; note that falsely specified conditions cause
3202 the execution of the entire conditional construct until the
3203 (matching) closing
3204 .Ic endif
3205 command to be suppressed.
3206 The syntax of the nestable
3207 .Ic if
3208 conditional execution construct requires that each condition and syntax
3209 element is surrounded by whitespace.
3210 .Bd -literal -offset indent
3211 if receive
3212   commands ...
3213 else
3214   commands ...
3215 endif
3218 Another condition can be any boolean value (see the section
3219 .Sx "Value options"
3220 for booleans) to mark an enwrapped block as
3221 .Dq never execute
3223 .Dq always execute .
3224 It is possible to check a variable for existence or compare its
3225 expansion against a user given value or another variable via the
3226 .Ql $
3227 .Pf ( Dq variable next )
3228 conditional trigger character.
3229 The available comparison operators are
3230 .Ql <
3231 (less than),
3232 .Ql <=
3233 (less than or equal to),
3234 .Ql ==
3235 (equal),
3236 .Ql !=
3237 (not equal),
3238 .Ql >=
3239 (greater than or equal to),
3240 .Ql >
3241 (greater than),
3242 .Ql =@
3243 (is substring of) and
3244 .Ql !@
3245 (is not substring of).
3246 The values of the left and right hand side are treated as strings and
3247 are compared 8-bit byte-wise, ignoring case according to the rules of
3248 the US-ASCII encoding (therefore, dependend on the active locale,
3249 possibly producing false results for strings in the locale encoding).
3250 Except for the substring checks the comparison will instead be performed
3251 arithmetically if both, the user given value as well as the variable
3252 content, can be parsed as numbers (integers).
3253 An unset variable is treated as the empty string.
3255 When the \*(OPal regular expression support is available, the additional
3256 test cases
3257 .Ql =~
3259 .Ql !~
3260 can be used.
3261 They treat the right hand side as a regular expression that is matched
3262 case-insensitively and according to the active
3263 .Ev LC_CTYPE
3264 locale, meaning that strings in the locale encoding should be matched
3265 correctly.
3267 Conditions can be joined via AND-OR lists (where the AND operator is
3268 .Ql &&
3269 and the OR operator is
3270 .Ql || ) ,
3271 which have equal precedence and will be evaluated with left
3272 associativity, thus using the same syntax that is known for the
3273 .Xr sh 1 .
3274 It is also possible to form groups of conditions and lists by enclosing
3275 them in pairs of brackets
3276 .Ql [\ \&.\&.\&.\ ] ,
3277 which may be interlocked within each other, and also be joined via
3278 AND-OR lists.
3280 The results of individual conditions and entire groups may be modified
3281 via unary operators: the unary operator
3282 .Ql \&!
3283 will reverse the result.
3284 .Bd -literal -offset indent
3285 if $debug
3286   echo *debug* is set
3287 endif
3288 if $ttycharset == "UTF-8"
3289   echo *ttycharset* is set to UTF-8, case-insensitively
3290 endif
3291 set t1=one t2=one
3292 if $t1 == $t2
3293   echo These two variables are equal
3294 endif
3295 if $version-major >= 15
3296   echo Running a new version..
3297   if $features =@ "regex"
3298     if $TERM =~ "^xterm\&.*"
3299       echo ..in an X terminal
3300     endif
3301   endif
3302   if [ [ true ] && [ [ $debug ] || [ $verbose ] ] ]
3303     echo Noisy, noisy
3304   endif
3305   if true && $debug || $verbose
3306     echo Left associativity, as is known from the shell
3307   endif
3308   if ! ! true && ! [ ! $debug && ! $verbose ]
3309     echo Unary operator support
3310   endif
3311 endif
3314 .It Ic ignore
3315 Without arguments the list of ignored header fields is printed,
3316 otherwise the given list of header fields is added to the ignore list:
3317 Header fields in the ignore list are not printed on the terminal when
3318 a message is printed.
3319 To print a message in its entirety, use the commands
3320 .Ic Type
3322 .Ic Print .
3323 Also see
3324 .Ic discard
3326 .Ic retain .
3328 .It Ic imap
3329 \*(OP Sends command strings directly to the current IMAP server.
3330 \*(UA operates always in IMAP `selected state' on the current mailbox;
3331 commands that change this will produce undesirable results and should be
3332 avoided.
3333 Useful IMAP commands are:
3334 .Bl -tag -offset indent -width ".Ic getquotearoot"
3335 .It create
3336 Takes the name of an IMAP mailbox as an argument and creates it.
3337 .It getquotaroot
3338 (RFC 2087) Takes the name of an IMAP mailbox as an argument
3339 and prints the quotas that apply to the mailbox.
3340 Not all IMAP servers support this command.
3341 .It namespace
3342 (RFC 2342) Takes no arguments and prints the Personal Namespaces,
3343 the Other User's Namespaces and the Shared Namespaces.
3344 Each namespace type is printed in parentheses;
3345 if there are multiple namespaces of the same type,
3346 inner parentheses separate them.
3347 For each namespace a prefix and a hierarchy separator is listed.
3348 Not all IMAP servers support this command.
3351 .It Ic inc
3352 Same as
3353 .Ic newmail .
3355 .It Ic list
3356 Prints the names of all available commands, alphabetically sorted.
3358 .It Ic localopts
3359 This command can be used to localize changes to variables, meaning that
3360 their state will be reverted to the former one once the covered scope
3361 is left.
3362 It can only be used inside of macro definition blocks introduced by
3363 .Ic account
3365 .Ic define ,
3366 and is interpreted as a boolean (see
3367 .Sx "Value options" ) ;
3369 .Dq covered scope
3370 of an account is left once it is switched off again.
3371 .Bd -literal -offset indent
3372 define temporary_settings {
3373   set global_option1
3374   localopts on
3375   set local_option1
3376   set local_option2
3377   localopts off
3378   set global_option2
3382 .Sy Note
3383 that this setting
3384 .Dq stacks up :
3385 i.e., if
3386 .Ql macro1
3387 enables change localization and calls
3388 .Ql macro2 ,
3389 which explicitly resets localization, then any value changes within
3390 .Ql macro2
3391 will still be reverted by
3392 .Ql macro1 !
3394 .It Ic Lreply
3395 Reply to messages that come in via known
3396 .Pf ( Ic mlist )
3397 or subscribed
3398 .Pf ( Ic mlsubscribe )
3399 mailing lists, or pretend to do so (see
3400 .Sx "Mailing lists" ) :
3401 on top of the usual
3402 .Ic reply
3403 functionality this will actively resort and even remove message
3404 recipients in order to generate a message that is supposed to be send to
3405 a mailing list.
3406 For example it will also implicitly generate a
3407 .Ql Mail-Followup-To:
3408 header if that seems useful, regardless of the setting of the variable
3409 .Va followup-to .
3411 .It Ic Mail
3412 Similar to
3413 .Ic mail ,
3414 but saves the message in a file named after the local part of the first
3415 recipient's address (instead of in
3416 .Va record Ns ).
3418 .It Ic mail
3419 (m) Takes a (list of) recipient address(es) as (an) argument(s),
3420 or asks on standard input if none were given;
3421 then collects the remaining mail content and sends it out.
3423 .It Ic mbox
3424 (mb) The given message list is to be sent to
3425 .Ev MBOX
3426 when \*(UA is quit; this is the default action unless the
3427 .Va hold
3428 option is set.
3429 \*(ID This command can only be used in a system mailbox (see
3430 .Ic file ) .
3432 .It Ic mimetype
3433 Without any arguments the content of the MIME type cache will displayed.
3434 Otherwise each argument defines a complete MIME type specification of
3435 a type that shall be added (prepended) to the cache.
3436 In any event MIME type sources are loaded first as necessary \(en
3437 .Va mimetypes-load-control
3438 can be used to fine-tune which sources are actually loaded.
3439 Refer to the section on
3440 .Sx "The mime.types files"
3441 for more on MIME type specifications and this topic in general.
3442 MIME type unregistration and cache resets can be triggered with
3443 .Ic unmimetype .
3445 .It Ic mlist
3446 Without arguments the list of all currently defined mailing lists
3447 (and their attributes, if any) is printed.
3448 Otherwise all given arguments (which need not be quoted except for
3449 whitespace) will be added and henceforth be recognized as mailing lists.
3450 Mailing lists may be removed via the command
3451 .Ic unmlist .
3453 If the \*(OPal regular expression support is available then mailing
3454 lists may also be specified as regular expressions (see
3455 .Xr re_format 7
3456 for more on those).
3458 .It Ic mlsubscribe
3459 Without arguments the list of all currently defined mailing lists which
3460 have a subscription attribute is printed.
3461 Otherwise this attribute will be set for all given mailing lists,
3462 newly creating them as necessary (as via
3463 .Ic mlist ) .
3464 Subscription attributes may be removed via the command
3465 .Ic unmlsubscribe .
3466 Also see
3467 .Va followup-to .
3469 .It Ic Move
3470 Similar to
3471 .Ic move ,
3472 but moves the messages to a file named after the local part of the
3473 sender address of the first message (instead of in
3474 .Va record Ns ).
3476 .It Ic move
3477 Acts like
3478 .Ic copy
3479 but marks the messages for deletion if they were transferred
3480 successfully.
3482 .It Ic More
3483 Like
3484 .Ic more ,
3485 but also prints ignored header fields and all MIME parts.
3486 Identical to
3487 .Ic Page .
3489 .It Ic more
3490 Invokes the
3491 .Ev PAGER
3492 on the given messages, even in non-interactive mode and as long as the
3493 standard output is a terminal.
3494 Identical to
3495 .Ic page .
3497 .It Ic netrc
3498 \*(OP Either
3499 .Pf ( Ar show
3501 .Ar clear
3502 the current
3503 .Pa .netrc
3504 cache, loading the file first as necessary in the former case.
3505 Note that \*(UA will try to read the file only once, use
3506 .Ql Ic netrc Ns \:\0\:clear
3507 to unlock the next attempt.
3509 .Va netrc-lookup
3510 and the section
3511 .Sx "On URL syntax and credential lookup" ;
3512 the section
3513 .Sx "The .netrc file"
3514 documents the file format in detail.
3516 .It Ic newmail
3517 Checks for new mail in the current folder without committing any changes
3518 before.
3519 If new mail is present, a message is printed.
3520 If the
3521 .Va header
3522 variable is set,
3523 the headers of each new message are also printed.
3525 .It Ic next
3526 (n) (like
3527 .Ql +
3529 .Dq ENTER )
3530 Goes to the next message in sequence and types it.
3531 With an argument list, types the next matching message.
3533 .It Ic New
3534 Same as
3535 .Ic Unread .
3537 .It Ic new
3538 Same as
3539 .Ic unread .
3541 .It Ic noop
3542 If the current folder is accessed via a network connection, a
3543 .Dq NOOP
3544 command is sent, otherwise no operation is performed.
3546 .It Ic Page
3547 Like
3548 .Ic page ,
3549 but also prints ignored header fields and all MIME parts.
3550 Identical to
3551 .Ic More .
3553 .It Ic page
3554 Invokes the
3555 .Ev PAGER
3556 on the given messages, even in non-interactive mode and as long as the
3557 standard output is a terminal.
3558 Identical to
3559 .Ic more .
3561 .It Ic Pipe
3562 Like
3563 .Ic pipe
3564 but also pipes ignored header fields and all parts of MIME
3565 .Ql multipart/alternative
3566 messages.
3568 .It Ic pipe
3569 (pi) Takes a message list and a shell command
3570 and pipes the messages through the command.
3571 Without an argument the current message is piped through the command
3572 given by the
3573 .Va cmd
3574 variable.
3575 If the
3576 .Va page
3577 variable is set,
3578 every message is followed by a formfeed character.
3580 .It Ic preserve
3581 (pre) A synonym for
3582 .Ic hold .
3584 .It Ic Print
3585 (P) Like
3586 .Ic print
3587 but also prints out ignored header fields and all parts of MIME
3588 .Ql multipart/alternative
3589 messages.
3590 See also
3591 .Ic print ,
3592 .Ic ignore
3594 .Ic retain .
3596 .It Ic print
3597 (p) Takes a message list and types out each message on the user's
3598 terminal.
3599 For MIME multipart messages, all parts with a content type of
3600 .Ql text
3602 .Ql message
3603 are shown, the other are hidden except for their headers.
3604 Messages are decrypted and converted to the terminal character set
3605 if necessary.
3607 .It Ic quit
3608 (q) Terminates the session, saving all undeleted, unsaved messages in
3609 the current
3610 .Ev MBOX ,
3611 preserving all messages marked with
3612 .Ic hold
3614 .Ic preserve
3615 or never referenced in the system mailbox,
3616 and removing all other messages from the system mailbox.
3617 If new mail has arrived during the session,
3618 the message
3619 .Dq You have new mail
3620 will be shown.
3621 If given while editing a mailbox file with the command line flag
3622 .Fl f ,
3623 then the edit file is rewritten.
3624 A return to the shell is effected,
3625 unless the rewrite of edit file fails,
3626 in which case the user can escape with the exit command.
3628 .It Ic redirect
3629 Same as
3630 .Ic resend .
3632 .It Ic Redirect
3633 Same as
3634 .Ic Resend .
3636 .It Ic remove
3637 Removes the named folders.
3638 The user is asked for confirmation in interactive mode.
3640 .It Ic rename
3641 Takes the name of an existing folder
3642 and the name for the new folder
3643 and renames the first to the second one.
3644 Both folders must be of the same type
3645 and must be located on the current server for IMAP.
3647 .It Ic Reply
3648 (R) Reply to originator.
3649 Does not reply to other recipients of the original message.
3650 .Va flipr
3651 will exchange this command with
3652 .Ic reply .
3653 Unless the option
3654 .Va fullnames
3655 is set the recipient address will be stripped from comments, names etc.
3657 .It Ic reply
3658 (r) Take a message and group-responds to it by addressing the sender
3659 and all recipients.
3660 .Va followup-to ,
3661 .Va followup-to-honour ,
3662 .Va reply-to-honour
3663 as well as
3664 .Va recipients-in-cc
3665 influence response behaviour.
3666 The command
3667 .Ic Lreply
3668 offers special support for replying to mailing lists.
3669 Unless the option
3670 .Va fullnames
3671 is set recipient addresses will be stripped from comments, names etc.
3673 .Va flipr
3674 is set the commands
3675 .Ic Reply
3677 .Ic reply
3678 are exchanged.
3680 .It Ic replyall
3681 Similar to
3682 .Ic reply ,
3683 but initiates a group-reply regardless of the value of
3684 .Va flipr .
3686 .It Ic replysender
3687 Similar to
3688 .Ic Reply ,
3689 but responds to the sender only regardless of the value of
3690 .Va flipr .
3692 .It Ic Resend
3693 Like
3694 .Ic resend ,
3695 but does not add any header lines.
3696 This is not a way to hide the sender's identity,
3697 but useful for sending a message again to the same recipients.
3699 .It Ic resend
3700 Takes a list of messages and a user name
3701 and sends each message to the named user.
3702 .Ql Resent-From:
3703 and related header fields are prepended to the new copy of the message.
3705 .It Ic Respond
3706 Same as
3707 .Ic Reply .
3709 .It Ic respond
3710 Same as
3711 .Ic reply .
3713 .It Ic respondall
3714 Same as
3715 .Ic replyall .
3717 .It Ic respondsender
3718 Same as
3719 .Ic replysender .
3721 .It Ic retain
3722 (ret) Without arguments the list of retained header fields is printed,
3723 otherwise the given list of header fields is added to the retain list:
3724 Header fields in the retain list are shown on the terminal when
3725 a message is printed, all other header fields are suppressed.
3726 To print a message in its entirety, use the commands
3727 .Ic Type
3729 .Ic Print .
3730 Also see
3731 .Ic discard
3733 .Ic ignore ;
3734 .Ic retain
3735 takes precedence over the mentioned.
3737 .It Ic Save
3738 (S) Similar to
3739 .Ic save,
3740 but saves the messages in a file named after the local part of the
3741 sender of the first message instead of (in
3742 .Va record
3743 and) taking a filename argument.
3745 .It Ic save
3746 (s) Takes a message list and a filename and appends each message in turn
3747 to the end of the file.
3748 If no filename is given, the
3749 .Ev MBOX
3750 file is used.
3751 The filename in quotes, followed by the generated character count
3752 is echoed on the user's terminal.
3753 If editing a system mailbox the messages are marked for deletion.
3754 Compressed files and IMAP mailboxes are handled as described for the
3755 .Fl f
3756 command line option above.
3758 .It Ic savediscard
3759 Same as
3760 .Ic saveignore .
3762 .It Ic saveignore
3763 Is to
3764 .Ic save
3765 what
3766 .Ic ignore
3767 is to
3768 .Ic print
3770 .Ic type .
3771 Header fields thus marked are filtered out when saving a message by
3772 .Ic save
3773 or when automatically saving to
3774 .Ev MBOX .
3775 This command should only be applied to header fields that do not contain
3776 information needed to decode the message,
3777 as MIME content fields do.
3778 If saving messages on an IMAP account ignoring fields makes it
3779 impossible to copy the data directly on the server,
3780 thus operation usually becomes much slower.
3782 .It Ic saveretain
3783 Is to
3784 .Ic save
3785 what
3786 .Ic retain
3787 is to
3788 .Ic print
3790 .Ic type .
3791 Header fields thus marked are the only ones saved with a message when
3792 saving by
3793 .Ic save
3794 or when automatically saving to
3795 .Ev MBOX .
3796 .Ic saveretain
3797 overrides
3798 .Ic saveignore .
3799 The use of this command is strongly discouraged since it may strip
3800 header fields that are needed to decode the message correctly.
3802 .It Ic seen
3803 Takes a message list and marks all messages as having been read.
3805 .It Ic set
3806 (se) Without arguments this command prints all options and, for
3807 non-binary options, values that are currently known to \*(UA.
3808 Setting any of the options
3809 .Va bsdcompat
3811 .Va bsdset
3812 changes the output format to BSD style, otherwise a properly quoted
3813 listing is produced.
3815 .Va debug
3816 is set or
3817 .Va verbose
3818 has been set twice then the listing is modified to mark out assembled
3819 variables.
3821 Otherwise modifies (set and unsets) the given options.
3822 Arguments are of the form
3823 .Ql option=value
3824 (no space before or after
3825 .Ql = ) ,
3826 or plain
3827 .Ql option
3828 if there is no value.
3829 Quotation marks may be placed around any part of the assignment
3830 statement to quote blanks or tabs, e.g.,
3832 .Dl set indentprefix="->"
3834 If an argument begins with
3835 .Ql no ,
3836 as in
3837 .Ql set nosave ,
3838 the effect is the same as invoking the
3839 .Ic unset
3840 command with the remaining part of the variable
3841 .Pf ( Ql unset save ) .
3843 .It Ic setenv
3844 Identical to
3845 .Ic set
3846 except that the options are also exported into the program environment;
3847 since this task requires native host support the command will always
3848 report error if that is not available (but still act like
3849 .Ic set
3850 in this case).
3851 This operation is a no-op unless all resource files have been loaded.
3852 Also see
3853 .Ic unsetenv .
3855 .It Ic shell
3856 (sh) Invokes an interactive version of the shell.
3858 .It Ic shortcut
3859 Without arguments the list of all currently defined shortcuts is
3860 printed.
3861 Otherwise all given arguments (which need not be quoted except for
3862 whitespace) are treated as pairs of shortcuts and their expansions,
3863 creating new or changing already existing shortcuts, as necessary.
3864 Shortcuts may be removed via the command
3865 .Ic unshortcut .
3866 The expansion strings should be in the syntax that has been described
3867 for the
3868 .Ic file
3869 command.
3871 .It Ic show
3872 Like
3873 .Ic print ,
3874 but performs neither MIME decoding nor decryption, so that the raw
3875 message text is shown.
3877 .It Ic size
3878 (si) Print the size in characters of each message of the given
3879 message-list.
3881 .It Ic sort
3882 Create a sorted representation of the current folder,
3883 and change the
3884 .Ic next
3885 command and the addressing modes such that they refer to messages in the
3886 sorted order.
3887 Message numbers are the same as in regular mode.
3888 If the
3889 .Va header
3890 variable is set,
3891 a header summary in the new order is also printed.
3892 Possible sorting criteria are:
3894 .Bl -tag -compact -offset indent -width "subject"
3895 .It date
3896 Sort the messages by their
3897 .Ql Date:
3898 field, that is by the time they were sent.
3899 .It from
3900 Sort messages by the value of their
3901 .Ql From:
3902 field, that is by the address of the sender.
3903 If the
3904 .Va showname
3905 variable is set, the sender's real name (if any) is used.
3906 .It size
3907 Sort the messages by their size.
3908 .It spam
3909 \*(OP Sort the message by their spam score, as has been classified by
3910 .Ic spamrate .
3911 .It status
3912 Sort the messages by their message status.
3913 .It subject
3914 Sort the messages by their subject.
3915 .It thread
3916 Create a threaded display.
3917 .It to
3918 Sort messages by the value of their
3919 .Ql To:
3920 field, that is by the address of the recipient.
3921 If the
3922 .Va showname
3923 variable is set, the recipient's real name (if any) is used.
3926 If no argument is given,
3927 the current sorting criterion is printed.
3929 .It Ic source
3930 (so) The source command reads commands from a file.
3932 .It Ic source_if
3933 The difference to
3934 .Ic source
3935 is that this command will not generate an error if the given file
3936 argument cannot be opened successfully.
3937 This can matter in, e.g., resource files, since loading of those is
3938 stopped when an error is encountered.
3940 .It Ic spamclear
3941 \*(OP Takes a list of messages and clears their
3942 .Ql is-spam
3943 flag.
3945 .It Ic spamforget
3946 \*(OP Takes a list of messages and causes the
3947 .Va spam-interface
3948 to forget it has ever used them to train its Bayesian filter.
3949 Unless otherwise noted the
3950 .Ql is-spam
3951 flag of the message is inspected to chose whether a message shall be
3952 forgotten to be
3953 .Dq ham
3955 .Dq spam .
3957 .It Ic spamham
3958 \*(OP Takes a list of messages and informs the Bayesian filter of the
3959 .Va spam-interface
3960 that they are
3961 .Dq ham .
3962 This also clears the
3963 .Ql is-spam
3964 flag of the messages in question.
3966 .It Ic spamrate
3967 \*(OP Takes a list of messages and rates them using the configured
3968 .Va spam-interface ,
3969 without modifying the messages, but setting their
3970 .Ql is-spam
3971 flag as appropriate; because the spam rating headers are lost the rate
3972 will be forgotten once the mailbox is left.
3973 Refer to the manual section
3974 .Sx "Handling spam"
3975 for the complete picture of spam handling in \*(UA.
3977 .It Ic spamset
3978 \*(OP Takes a list of messages and sets their
3979 .Ql is-spam
3980 flag.
3982 .It Ic spamspam
3983 \*(OP Takes a list of messages and informs the Bayesian filter of the
3984 .Va spam-interface
3985 that they are
3986 .Dq spam .
3987 This also sets the
3988 .Ql is-spam
3989 flag of the messages in question.
3991 .It Ic thread
3992 \*(OB The same as
3993 .Ql sort thread
3994 (consider using a
3995 .Ql ghost
3996 as necessary).
3997 Create a threaded representation of the current folder,
3998 i.\|e. indent messages that are replies to other messages in the header
3999 display and change the
4000 .Ic next
4001 command and the addressing modes such that they refer to messages in the
4002 threaded order.
4003 Message numbers are the same as in unthreaded mode.
4004 If the
4005 .Va header
4006 variable is set,
4007 a header summary in threaded order is also printed.
4009 .It Ic top
4010 (to) Takes a message list and prints the top few lines of each.
4011 The number of lines printed is controlled by the variable
4012 .Va toplines
4013 and defaults to five.
4015 .It Ic touch
4016 (tou) Takes a message list and marks the messages for saving in
4017 .Ev MBOX .
4018 \*(UA deviates from the POSIX standard with this command,
4019 as a following
4020 .Ic next
4021 command will display the following message instead of the current one.
4023 .It Ic Type
4024 (T) Identical to the
4025 .Ic Print
4026 command.
4028 .It Ic type
4029 (t) A synonym for
4030 .Ic print .
4032 .It Ic unaccount
4033 Delete all given accounts.
4034 An error message is printed if a given account is not defined.
4035 The special name
4036 .Ql *
4037 will discard all existing accounts.
4039 .It Ic unalias
4040 (una) Takes a list of names defined by alias commands
4041 and discards the remembered groups of users.
4042 The special name
4043 .Ql *
4044 will discard all existing aliases.
4046 .It Ic unanswered
4047 Takes a message list and marks each message as not having been answered.
4049 .It Ic uncollapse
4050 Only applicable to threaded mode.
4051 Takes a message list and makes the message and all replies to it visible
4052 in header summaries again.
4053 When a message becomes the current message,
4054 it is automatically made visible.
4055 Also when a message with collapsed replies is printed,
4056 all of these are automatically uncollapsed.
4058 .It Ic undefine
4059 Undefine all given macros.
4060 An error message is printed if a given macro is not defined.
4061 The special name
4062 .Ql *
4063 will discard all existing macros.
4065 .It Ic undelete
4066 (u) Takes a message list and marks each message as not being deleted.
4068 .It Ic undraft
4069 Takes a message list and
4070 .Pf un Ic draft Ns
4071 s each message.
4073 .It Ic unflag
4074 Takes a message list and marks each message as not being
4075 .Ic flag Ns ged .
4077 .It Ic unfwdignore
4078 Removes the header field names from the list of ignored fields for the
4079 .Ic forward
4080 command.
4081 The special name
4082 .Ql *
4083 will remove all fields.
4085 .It Ic unfwdretain
4086 Removes the header field names from the list of retained fields for the
4087 .Ic forward
4088 command.
4089 The special name
4090 .Ql *
4091 will remove all fields.
4093 .It Ic unghost
4094 Remove all the given command
4095 .Ic ghost Ns s Ns .
4096 The special name
4097 .Ql *
4098 will remove all ghosts.
4100 .It Ic unignore
4101 Removes the header field names from the list of ignored fields.
4102 The special name
4103 .Ql *
4104 will remove all fields.
4106 .It Ic unmimetype
4107 Delete all given MIME types, e.g.,
4108 .Ql unmimetype text/plain
4109 will remove all registered specifications for the MIME type
4110 .Ql text/plain .
4111 The special name
4112 .Ql *
4113 will discard all existing MIME types, just as will
4114 .Ql reset ,
4115 but which also reenables cache initialization via
4116 .Va mimetypes-load-control .
4118 .It Ic unmlist
4119 Forget about all the given mailing lists.
4120 The special name
4121 .Ql *
4122 will remove all lists.
4123 Also see
4124 .Ic mlist .
4126 .It Ic unmlsubscribe
4127 Remove the subscription attribute from all given mailing lists.
4128 The special name
4129 .Ql *
4130 will clear the attribute from all lists which have it set.
4131 Also see
4132 .Ic mlsubscribe .
4134 .It Ic Unread
4135 Same as
4136 .Ic unread .
4138 .It Ic unread
4139 Takes a message list and marks each message as not having been read.
4141 .It Ic unretain
4142 Removes the header field names from the list of retained fields.
4143 The special name
4144 .Ql *
4145 will remove all fields.
4147 .It Ic unsaveignore
4148 Removes the header field names from the list of ignored fields for
4149 saving.
4150 The special name
4151 .Ql *
4152 will remove all fields.
4154 .It Ic unsaveretain
4155 Removes the header field names from the list of retained fields for
4156 saving.
4157 The special name
4158 .Ql *
4159 will remove all fields.
4161 .It Ic unset
4162 (uns) Takes a list of option names and discards their remembered values;
4163 the inverse of
4164 .Ic set .
4166 .It Ic unsetenv
4167 Identical to
4168 .Ic unset
4169 except that the options are also removed from the program environment;
4170 since this task requires native host support the command will always
4171 report error if that is not available (but still act like
4172 .Ic unset Ns
4174 This operation is a no-op unless all resource files have been loaded.
4175 Also see
4176 .Ic setenv .
4178 .It Ic unshortcut
4179 Deletes the shortcut names given as arguments.
4180 The special name
4181 .Ql *
4182 will remove all shortcuts.
4184 .It Ic unsort
4185 Disable sorted or threaded mode
4186 (see the
4187 .Ic sort
4189 .Ic thread
4190 commands),
4191 return to normal message order and,
4192 if the
4193 .Va header
4194 variable is set,
4195 print a header summary.
4197 .It Ic unthread
4198 \*(OB
4199 Same as
4200 .Ic unsort .
4202 .It Ic urldecode
4203 Decode the given URL-encoded string arguments and show the results.
4205 .It Ic urlencode
4206 URL-encode the given arguments and show the results.
4208 .It Ic varedit
4209 Edit the values of or create the given variable(s) in the
4210 .Ev EDITOR .
4211 Binary variables cannot be edited.
4213 .It Ic varshow
4214 Show informations about all the given options.
4215 \*(UA knows about a finite set of known builtin variables that are
4216 subdivided further in binary and value variants;
4217 they may have special properties, like
4218 .Dq read-only
4219 (setting may not be changed) and
4220 .Dq virtual ,
4221 meaning that the value is generated on-the-fly as necessary.
4222 Beside those known variables an infinite number of unknown, so-called
4223 .Dq assembled
4224 variables, which are expected to be able to store values, may exist.
4225 .Bd -literal -offset indent
4226 ? set foo=bar nobar
4227 ? varshow sendwait version-major foo bar
4228 "sendwait": (73) binary: set=1 (ENVIRON=0)
4229 "version-major": (192) value, read-only, virtual:\e
4230   set=1 (ENVIRON=0) value<14>
4231 "foo": (assembled) set=1 (ENVIRON=0) value<bar>
4232 "bar": (assembled) set=0 (ENVIRON=0) value<NULL>
4235 .It Ic verify
4236 \*(OP Takes a message list and verifies each message.
4237 If a message is not a S/MIME signed message,
4238 verification will fail for it.
4239 The verification process checks if the message was signed using a valid
4240 certificate,
4241 if the message sender's email address matches one of those contained
4242 within the certificate,
4243 and if the message content has been altered.
4245 .It Ic visual
4246 (v) Takes a message list and invokes the display editor on each message.
4247 Modified contents are discarded unless the
4248 .Va writebackedited
4249 variable is set.
4251 .It Ic write
4252 (w) For conventional messages the body without all headers is written.
4253 The output is decrypted and converted to its native format as necessary.
4254 If the output file exists, the text is appended.
4255 If a message is in MIME multipart format its first part is written to
4256 the specified file as for conventional messages,
4257 and the user is asked for a filename to save each other part.
4258 For convience saving of each part may be skipped by giving an empty value;
4259 the same result can also be achieved by writing it to
4260 .Pa /dev/null .
4261 For the second and subsequent parts a leading
4262 .Ql |
4263 character causes the part to be piped to the remainder of the user input
4264 interpreted as a shell command;
4265 otherwise the user input is expanded as usually for folders,
4266 e.g., tilde expansion is performed.
4267 In non-interactive mode, only the parts of the multipart message
4268 that have a filename given in the part header are written,
4269 the others are discarded.
4270 The original message is never marked for deletion in the originating
4271 mail folder.
4272 For attachments,
4273 the contents of the destination file are overwritten if the file
4274 previously existed.
4275 No special handling of compressed files is performed.
4277 .It Ic xit
4278 (x) A synonym for
4279 .Ic exit .
4281 .It Ic z
4282 \*(UA presents message headers in windowfuls as described under the
4283 .Ic headers
4284 command.
4285 This command scrolls to the next window of messages.
4286 If an argument is given,
4287 it specifies the window to use.
4288 A number prefixed by
4289 .Ql +
4291 .Ql \-
4292 indicates that the window is calculated in relation to the current position.
4293 A number without a prefix specifies an absolute window number,
4294 and a
4295 .Ql $
4296 lets \*(UA scroll to the last window of messages.
4298 .It Ic Z
4299 Similar to
4300 .Ic z ,
4301 but scrolls to the next or previous window that contains at least one
4302 .Ql new
4304 .Ic flag Ns
4305 ged message.
4307 .Sh "TILDE ESCAPES"
4308 Here is a summary of the tilde escapes,
4309 which are used to perform special functions when composing messages.
4310 Tilde escapes are only recognized at the beginning of lines.
4311 The name
4312 .Dq tilde escape
4313 is somewhat of a misnomer since the actual escape character can be
4314 changed by adjusting the option
4315 .Va escape .
4316 .Bl -tag -width ".Ic __ filename"
4318 .It Ic ~~ Ar string
4319 Insert the string of text in the message prefaced by a single
4320 .Ql ~ .
4321 (If the escape character has been changed,
4322 that character must be doubled
4323 in order to send it at the beginning of a line.)
4325 .It Ic ~! Ar command
4326 Execute the indicated shell
4327 .Ar command ,
4328 then return to the message.
4330 .It Ic ~.
4331 Same effect as typing the end-of-file character.
4333 .It Ic ~: Ar \*(UA-command Ns \0or Ic ~_ Ar \*(UA-command
4334 Execute the given \*(UA command.
4335 Not all commands, however, are allowed.
4337 .It Ic ~?
4338 Write a summary of command escapes.
4340 .It Ic ~< Ar filename
4341 Identical to
4342 .Ic ~r .
4344 .It Ic ~<! Ar command
4345 .Ar command
4346 is executed using the shell.
4347 Its standard output is inserted into the message.
4349 .It Ic ~@ Op Ar filename...
4350 With no arguments, edit the attachment list interactively.
4351 If an attachment's file name is left empty,
4352 that attachment is deleted from the list.
4353 When the end of the attachment list is reached,
4354 \*(UA will ask for further attachments until an empty name is given.
4355 If a given file name solely consists of the number sign
4356 .Ql #
4357 followed by a valid message number of the currently active mailbox, then
4358 the given message is attached as a MIME
4359 .Ql message/rfc822
4360 and the rest of this section does not apply.
4362 If character set conversion has been compiled into \*(UA, then this mode
4363 gives the user the option to specify input and output character sets,
4364 unless the file extension indicates binary content, in which case \*(UA
4365 asks whether this step shall be skipped for the attachment in question.
4366 If not skipped, then the charset that succeeds to represent the
4367 attachment data will be used in the
4368 .Ql charset=
4369 MIME parameter of the mail message:
4371 .Bl -bullet -compact
4373 If input and output character sets are specified, then the conversion is
4374 performed on the fly.
4375 The user will be asked repeatedly until the desired conversion succeeds.
4377 If only an output character set is specified, then the input is assumed
4378 to be in the
4379 .Va ttycharset
4380 charset and will be converted to the given output charset on the fly.
4381 The user will be asked repeatedly until the desired conversion succeeds.
4383 If no character sets are specified at all then the algorithm that is
4384 documented in the section
4385 .Sx "Character sets"
4386 is applied, but directly and on the fly.
4387 The user will be asked repeatedly until the desired conversion succeeds.
4389 Finally, if an input-, but no output character set is specified, then no
4390 conversion is ever performed, but the
4391 .Ql charset=
4392 MIME parameter value will still be set to the user input.
4394 The character set selection loop can be left by typing
4395 .Ql control-C ,
4396 i.e., causing an interrupt.
4397 Note that before \*(UA version 15.0 this terminates the entire
4398 current attachment selection, not only the character set selection.
4401 Without character set conversion support, \*(UA will ask for the input
4402 character set only, and it'll set the
4403 .Ql charset=
4404 MIME parameter value to the given input, if any;
4405 if no user input is seen then the
4406 .Va ttycharset
4407 character set will be used for the parameter value instead.
4408 Note that the file extension check isn't performed in this mode, since
4409 no conversion will take place anyway.
4411 Note that in non-interactive mode, for reproduceabilities sake, there
4412 will always be two questions for each attachment, regardless of whether
4413 character set conversion is available and what the file extension is.
4414 The first asks for the filename, and the second asks for the input
4415 character set to be passed through to the corresponding MIME parameter;
4416 no conversion will be tried if there is input to the latter question,
4417 otherwise the usual conversion algorithm, as above, is applied.
4418 For message attachments, the answer to the second question is completely
4419 ignored.
4421 If (instead)
4422 .Ar filename
4423 arguments are specified for the
4424 .Ic \&\&~@
4425 command they are treated as a comma separated list of files,
4426 which are all expanded and appended to the end of the attachment list.
4427 (Filenames with commas, or with leading or trailing whitespace can only
4428 be added via the command line or the first method.
4429 Message attachments can only be added via the first method;
4430 filenames which clash with message numbers can only be added via the
4431 command line or the second method.)
4432 In this mode the (text) attachments are assumed to be in
4433 .Va ttycharset
4434 encoding, and will be evaluated as documented in the section
4435 .Sx "Character sets" .
4437 .It Ic ~A
4438 Inserts the string contained in the
4439 .Va Sign
4440 variable (same as
4441 .Ql Ic ~i Ns \0Sign ) .
4442 The escape sequences tabulator
4443 .Ql \et
4444 and newline
4445 .Ql \en
4446 are understood.
4448 .It Ic ~a
4449 Inserts the string contained in the
4450 .Va sign
4451 variable (same as
4452 .Ql Ic ~i Ns \0sign ) .
4453 The escape sequences tabulator
4454 .Ql \et
4455 and newline
4456 .Ql \en
4457 are understood.
4459 .It Ic ~b Ar name ...
4460 Add the given names to the list of blind carbon copy recipients.
4462 .It Ic ~c Ar name ...
4463 Add the given names to the list of carbon copy recipients.
4465 .It Ic ~d
4466 Read the file specified by the
4467 .Ev DEAD
4468 variable into the message.
4470 .It Ic ~e
4471 Invoke the text editor on the message collected so far.
4472 After the editing session is finished,
4473 the user may continue appending text to the message.
4475 .It Ic ~F Ar messages
4476 Read the named messages into the message being sent, including all
4477 message headers and MIME parts.
4478 If no messages are specified, read in the current message.
4480 .It Ic ~f Ar messages
4481 Read the named messages into the message being sent.
4482 If no messages are specified, read in the current message.
4483 .Ic ignore
4485 .Ic retain
4486 lists are used to modify the message headers.
4487 For MIME multipart messages,
4488 only the first printable part is included.
4490 .It Ic ~H
4491 Edit the message header fields
4492 .Ql From: ,
4493 .Ql Reply-To: ,
4494 .Ql Sender:
4496 .Ql Organization:
4497 by typing each one in turn and allowing the user to edit the field.
4498 The default values for these fields originate from the
4499 .Va from , replyto , sender
4501 .Va ORGANIZATION
4502 variables.
4504 .It Ic ~h
4505 Edit the message header fields
4506 .Ql To: ,
4507 .Ql Cc: ,
4508 .Ql Bcc:
4510 .Ql Subject:
4511 by typing each one in turn and allowing the user to edit the field.
4513 .It Ic ~i Ar variable
4514 Insert the value of the specified variable into the message,
4515 adding a newline character at the end.
4516 The message remains unaltered if the variable is unset or empty.
4517 The escape sequences tabulator
4518 .Ql \et
4519 and newline
4520 .Ql \en
4521 are understood.
4523 .It Ic ~M Ar messages
4524 Read the named messages into the message being sent,
4525 indented by
4526 .Va indentprefix .
4527 If no messages are specified, read the current message.
4529 .It Ic ~m Ar messages
4530 Read the named messages into the message being sent,
4531 indented by
4532 .Va indentprefix .
4533 If no messages are specified, read the current message.
4534 .Ic ignore
4536 .Ic retain
4537 lists are used to modify the message headers.
4538 For MIME multipart messages,
4539 only the first printable part is included.
4541 .It Ic ~p
4542 Print out the message collected so far,
4543 prefaced by the message header fields
4544 and followed by the attachment list, if any.
4546 .It Ic ~q
4547 Abort the message being sent,
4548 copying it to the file specified by the
4549 .Ev DEAD
4550 variable if
4551 .Va save
4552 is set.
4554 .It Ic ~R Ar filename
4555 Read the named file into the message, indented by
4556 .Va indentprefix .
4558 .It Ic ~r Ar filename
4559 Read the named file into the message.
4561 .It Ic ~s Ar string
4562 Cause the named string to become the current subject field.
4564 .It Ic ~t Ar name ...
4565 Add the given name(s) to the direct recipient list.
4567 .It Ic ~U Ar messages
4568 Read in the given / current message(s) excluding all headers, indented by
4569 .Va indentprefix .
4571 .It Ic ~u Ar messages
4572 Read in the given / current message(s), excluding all headers.
4574 .It Ic ~v
4575 Invoke an alternate editor (defined by the
4576 .Ev VISUAL
4577 option) on the message collected so far.
4578 Usually, the alternate editor will be a screen editor.
4579 After the editor is quit,
4580 the user may resume appending text to the end of the message.
4582 .It Ic ~w Ar filename
4583 Write the message onto the named file.
4584 If the file exists,
4585 the message is appended to it.
4587 .It Ic ~x
4588 Same as
4589 .Ic ~q ,
4590 except that the message is not saved at all.
4592 .It Ic ~| Ar command
4593 Pipe the message through the specified filter command.
4594 If the command gives no output or terminates abnormally,
4595 retain the original text of the message.
4596 E.g., the command
4597 .Xr fmt 1
4598 is often used as a rejustifying filter.
4600 .Sh "VARIABLE OPTIONS"
4601 Variables are controlled via
4602 .Ic set
4604 .Ic unset
4605 commands; in general using
4606 .Ic unset
4607 can also be accomplished by prefixing a variable name with the string
4608 .Dq no
4609 and calling
4610 .Ic set ,
4611 e.g.,
4612 .Ql unset crt
4613 will have the same effect as
4614 .Ql set nocrt .
4615 Creation or editing of variables in an editor can also be achieved with
4616 .Ic varedit .
4617 .Ic varshow
4618 will give more insight on the given variable(s), whereas
4619 .Ic set
4620 will print a listing of all variables when called without arguments.
4621 Options are also implicitly inherited from the program
4622 .Sx ENVIRONMENT
4623 and can be set explicitly via the command line option
4624 .Fl S .
4626 Different kind of options exist:
4627 binary options, which can only be in one of the two states
4628 .Dq set
4630 .Dq unset ,
4631 as well as value options which have an assigned string value, for which
4632 proper quoting may be important upon assignment time.
4633 .Ss "Initial Settings"
4634 The standard POSIX 2008/Cor 1-2013 mandates the following initial
4635 variable settings:
4636 .Pf no Va allnet ,
4637 .Pf no Va append ,
4638 .Va asksub ,
4639 .Pf no Va askbcc ,
4640 .Pf no Va autoprint ,
4641 .Pf no Va bang ,
4642 .Pf no Va cmd ,
4643 .Pf no Va crt ,
4644 .Pf no Va debug ,
4645 .Pf no Va dot ,
4646 .Va escape
4647 set to
4648 .Ql ~ ,
4649 .Pf no Va flipr ,
4650 .Pf no Va folder ,
4651 .Va header ,
4652 .Pf no Va hold ,
4653 .Pf no Va ignore ,
4654 .Pf no Va ignoreeof ,
4655 .Pf no Va keep ,
4656 .Pf no Va keepsave ,
4657 .Pf no Va metoo ,
4658 .Pf no Va outfolder ,
4659 .Pf no Va page ,
4660 .Va prompt
4661 set to
4662 .Ql ?\0
4663 (note that \*(UA deviates from the standard by using
4664 .Ql \e&\0 ,
4665 but the
4666 .Ql \e&
4667 special prompt escape results in
4668 .Dq \&?
4669 being printed unless
4670 .Va bsdcompat
4671 is set),
4672 .Pf no Va quiet ,
4673 .Pf no Va record ,
4674 .Va save ,
4675 .Pf no Va sendwait ,
4676 .Pf no Va showto ,
4677 .Pf no Va Sign ,
4678 .Pf no Va sign ,
4679 .Va toplines
4680 set to
4681 .Ql 5 .
4683 Notes: \*(UA doesn't support the
4684 .Pf no Va onehop
4685 variable \(en use command line options or
4686 .Va sendmail-arguments
4687 to pass options through to a MTA.
4688 And the default global
4689 .Pa \*(UR
4690 file (which is loaded unless the
4691 .Fl n
4692 command line flag has been used or the
4693 .Ev NAIL_NO_SYSTEM_RC
4694 environment variable is set) bends those initial settings a bit, e.g.,
4695 it sets the options
4696 .Va hold ,
4697 .Va keepsave
4699 .Va keep ,
4700 to name a few, calls
4701 .Ic retain
4702 etc., and should thus be taken into account.
4703 .Ss "Binary options"
4704 .Bl -tag -width ".Va _utoprin_"
4706 .It Va add-file-recipients
4707 When file or pipe recipients have been specified,
4708 mention them in the corresponding address fields of the message instead
4709 of silently stripping them from their recipient list.
4710 By default such addressees are not mentioned.
4712 .It Va allnet
4713 Causes only the local part to be evaluated
4714 when comparing addresses.
4716 .It Va append
4717 Causes messages saved in
4718 .Ev MBOX
4719 to be appended to the end rather than prepended.
4720 This should always be set.
4723 .It Va ask Ns \0or Va asksub
4724 Causes \*(UA to prompt for the subject of each message sent.
4725 If the user responds with simply a newline,
4726 no subject field will be sent.
4728 .It Va askatend
4729 Causes the prompts for
4730 .Ql Cc:
4732 .Ql Bcc:
4733 lists to appear after the message has been edited.
4735 .It Va askattach
4736 If set, \*(UA asks for files to attach at the end of each message, shall
4737 the list be found empty at that time.
4738 An empty line finalizes the list.
4740 .It Va askcc
4741 Causes the user to be prompted for carbon copy recipients
4742 (at the end of each message if
4743 .Va askatend
4745 .Va bsdcompat
4746 are set) shall the list be found empty (at that time).
4747 An empty line finalizes the list.
4749 .It Va askbcc
4750 Causes the user to be prompted for blind carbon copy
4751 recipients (at the end of each message if
4752 .Va askatend
4754 .Va bsdcompat
4755 are set) shall the list be found empty (at that time).
4756 An empty line finalizes the list.
4758 .It Va asksign
4759 \*(OP Causes the user to be prompted if the message is to be signed at
4760 the end of each message.
4762 .Va smime-sign
4763 variable is ignored when this variable is set.
4765 .It Va autocollapse
4766 Causes threads to be collapsed automatically when threaded mode is
4767 entered (see the
4768 .Ic collapse
4769 command).
4771 .It Va autoprint
4772 Causes the delete command to behave like
4773 .Ql dp - ;
4774 thus, after deleting a message the next one will be typed automatically.
4776 .It Va autothread
4777 \*(OB Causes threaded mode (see the
4778 .Ic thread
4779 command) to be entered automatically when a folder is opened.
4780 The same as
4781 .Ql autosort=thread .
4783 .It Va bang
4784 Enables the substitution of
4785 .Ql \&!
4786 by the contents of the last command line in shell escapes.
4788 .It Va batch-exit-on-error
4789 If the batch mode has been enabled via the
4790 .Fl #
4791 command line option, then this variable will be consulted whenever \*(UA
4792 completes one operation (returns to the command prompt); if it is set
4793 then \*(UA will terminate if the last operation generated an error.
4795 .It Va bsdannounce
4796 Causes automatic display of a header summary after executing a
4797 .Ic file
4798 command.
4800 .It Va bsdcompat
4801 Sets some cosmetical features to traditional BSD style;
4802 has the same affect as setting
4803 .Va askatend
4804 and all other variables prefixed with
4805 .Ql bsd ;
4806 it also changes the meaning of the \*(UA specific
4807 .Ql \e&
4808 .Va prompt
4809 escape sequence.
4811 .It Va bsdflags
4812 Changes the letters printed in the first column of a header summary
4813 to traditional BSD style.
4815 .It Va bsdheadline
4816 Changes the display of columns in a header summary to traditional BSD
4817 style.
4819 .It Va bsdmsgs
4820 Changes some informational messages to traditional BSD style.
4822 .It Va bsdorder
4823 Causes the
4824 .Ql Subject:
4825 field to appear immediately after the
4826 .Ql To:
4827 field in message headers and with the
4828 .Ic ~h
4829 .Sx "TILDE ESCAPES" .
4831 .It Va bsdset
4832 Changes the output format of the
4833 .Ic set
4834 command to traditional BSD style.
4836 .It Va colour-disable
4837 \*(OP Forcefully disable usage of colours.
4838 Also see the section
4839 .Sx "Coloured message display" .
4841 .It Va colour-pager
4842 \*(OP Whether colour shall be used for output that is paged through
4843 .Ev PAGER .
4844 Note that pagers may need special flags, e.g.,
4845 .Xr less 1
4846 requires the option
4847 .Fl \&\&R
4849 .Xr lv 1
4850 the option
4851 .Fl \&\&c
4852 in order to support colours; therefore \*(UA will inspect the variable
4853 .Ev PAGER
4854 \(en if that starts with the string
4855 .Dq less
4856 a non-existing environment variable
4857 .Va LESS
4858 will be set to
4859 .Ql FRSXi ,
4860 likewise for
4861 .Dq lv
4862 .Va LV
4863 will optionally be set to
4864 .Dq -c .
4865 Also see the section
4866 .Sx "Coloured message display"
4867 for more on this.
4869 .It Va debug
4870 Prints debugging messages and disables the actual delivery of messages.
4871 Also implies
4872 .Pf no Va record
4874 .Pf no Va save .
4876 .It Va disconnected
4877 \*(OP When an IMAP mailbox is selected and this variable is set,
4878 no connection to the server is initiated.
4879 Instead, data is obtained from the local cache (see
4880 .Va imap-cache Ns
4882 Mailboxes that are not present in the cache
4883 and messages that have not yet entirely been fetched from the server
4884 are not available;
4885 to fetch all messages in a mailbox at once,
4886 the command
4887 .No ` Ns Li copy * /dev/null Ns '
4888 can be used while still in connected mode.
4889 Changes that are made to IMAP mailboxes in disconnected mode are queued
4890 and committed later when a connection to that server is made.
4891 This procedure is not completely reliable since it cannot be guaranteed
4892 that the IMAP unique identifiers (UIDs) on the server still match the
4893 ones in the cache at that time.
4894 Data is saved to
4895 .Ev DEAD
4896 when this problem occurs.
4897 .It Va disconnected-USER@HOST
4898 The specified account is handled as described for the
4899 .Va disconnected
4900 variable above,
4901 but other accounts are not affected.
4903 .It Va disposition-notification-send
4904 \*(OP Emit a
4905 .Ql Disposition-Notification-To:
4906 header (RFC 3798) with the message.
4907 This requires a set
4908 .Va from
4909 variable.
4911 .It Va dot
4912 When dot is set, a dot
4913 .Ql \&.
4914 on a line by itself during message input from a terminal shall be
4915 treated as end-of-message (in addition to the normal end-of-file
4916 condition).
4918 .Va ignoreeof
4919 is set
4920 .Pf no Va dot
4921 is ignored and using a dot is the only method to terminate input mode.
4923 .It Va dotlock-ignore-error
4924 \*(OP Synchronization of mailboxes which \*(UA treats as system
4925 mailboxes (see the command
4926 .Ic file )
4927 will be protected with so-called dotlock files\(emthe traditional mail
4928 spool file locking method\(emin addition to system file locking.
4929 Because \*(UA ships with a privilege-separated dotlock creation program
4930 that should always be able to create such a dotlock file there is no
4931 good reason to ignore dotlock file creation errors, and thus these are
4932 fatal unless this variable is set.
4934 .It Va editalong
4935 If this variable is set then the editor is started automatically when
4936 a message is composed in interactive mode, as if the
4937 .Ic ~e
4938 .Sx "TILDE ESCAPES"
4939 had been specified.
4941 .Va editheaders
4942 variable is implied for this automatically spawned editor session.
4944 .It Va editheaders
4945 When a message is edited while being composed,
4946 its header is included in the editable text.
4948 .Ql To: ,
4949 .Ql Cc: ,
4950 .Ql Bcc: ,
4951 .Ql Subject: ,
4952 .Ql From: ,
4953 .Ql Reply-To: ,
4954 .Ql Sender: ,
4956 .Ql Organization:
4957 fields are accepted within the header, other fields are ignored.
4959 .It Va emptystart
4960 If the mailbox is empty \*(UA normally prints
4961 .Dq \&No mail for user
4962 and exits immediately.
4963 If this option is set \*(UA starts even with an empty mailbox.
4965 .It Va flipr
4966 This option reverses the meanings of a set of reply commands,
4967 turning the lowercase variants, which by default address all recipients
4968 included in the header of a message
4969 .Pf ( Ic reply , respond , followup )
4970 into the uppercase variants, which by default address the sender only
4971 .Pf ( Ic Reply , Respond , Followup )
4972 and vice versa.
4973 The commands
4974 .Ic replysender , respondsender , followupsender
4975 as well as
4976 .Ic replyall , respondall , followupall
4977 are not affected by the current setting of
4978 .Va flipr .
4980 .It Va followup-to
4981 Controls whether a
4982 .Ql Mail-Followup-To:
4983 header is generated when sending messages to known mailing lists.
4984 Also see
4985 .Va followup-to-honour
4986 and the commands
4987 .Ic mlist , mlsubscribe , reply
4989 .Ic Lreply .
4991 .It Va forward-as-attachment
4992 Original messages are normally sent as inline text with the
4993 .Ic forward
4994 command,
4995 and only the first part of a multipart message is included.
4996 With this option messages are sent as unmodified MIME
4997 .Ql message/rfc822
4998 attachments with all of their parts included.
5000 .It Va fullnames
5001 When replying to or forwarding a message \*(UA normally removes the
5002 comment and name parts of email addresses.
5003 If this variable is set such stripping is not performed,
5004 and comments, names etc. are retained.
5006 .It Va header
5007 Causes the header summary to be written at startup and after commands
5008 that affect the number of messages or the order of messages in the
5009 current folder; enabled by default.
5010 The command line option
5011 .Fl N
5012 can be used to set
5013 .Pf no Va header .
5015 .It Va history-gabby
5016 \*(OP Add more entries to the history as is normally done.
5018 .It Va history-gabby-persist
5019 \*(OP \*(UAs own NCL will not save the additional (gabby) history
5020 entries in persistent storage unless this variable is also set.
5021 Also see
5022 .Va NAIL_HISTFILE .
5024 .It Va hold
5025 This option is used to hold messages in the system mailbox by default.
5027 .It Va idna-disable
5028 \*(OP Can be used to turn off the automatic conversion of domain names
5029 according to the rules of IDNA (internationalized domain names for
5030 applications).
5031 Since the IDNA code assumes that domain names are specified with the
5032 .Va ttycharset
5033 character set, an UTF-8 locale charset is required to represent all
5034 possible international domain names (before conversion, that is).
5036 .It Va ignore
5037 Ignore interrupt signals from the terminal while entering messages;
5038 instead echo them as
5039 .Ql @
5040 characters and discard the current line.
5042 .It Va ignoreeof
5043 Ignore end-of-file conditions
5044 .Pf ( Ql control-D ) ,
5045 on message input, which instead can be terminated only by entering a
5046 .Va dot
5047 .Ql \&.
5048 on a line by itself or by using the
5049 .Ic ~.
5050 .Sx "TILDE ESCAPES" .
5051 This option also applies to \*(UA command mode.
5052 .Mx Va imap-use-starttls
5053 .It Va imap-use-starttls-USER@HOST , imap-use-starttls-HOST , imap-use-starttls
5054 \*(OP Causes \*(UA to issue a `STARTTLS' command to make an unencrypted
5055 IMAP session SSL/TLS encrypted.
5056 This functionality is not supported by all servers,
5057 and is not used if the session is already encrypted by the IMAPS method.
5059 .It Va keep
5060 If set, an empty mailbox file is not removed.
5061 This may improve the interoperability with other mail user agents
5062 when using a common folder directory, and prevents malicious users
5063 from creating fake mailboxes in a world-writable spool directory.
5064 Note this only applies to local regular (MBOX) files, other mailbox
5065 types will never be removed.
5067 .It Va keepsave
5068 When a message is saved it is usually discarded from the originating
5069 folder when \*(UA is quit.
5070 Setting this option causes all saved message to be retained.
5072 .It Va line-editor-disable
5073 Turn off any enhanced command line editing capabilities (see
5074 .Sx "Command line editor"
5075 for more).
5077 .It Va markanswered
5078 When a message is replied to and this variable is set,
5079 it is marked as having been answered.
5080 This mark has no technical meaning in the mail system;
5081 it just causes messages to be marked in the header summary,
5082 and makes them specially addressable.
5084 .It Va message-id-disable
5085 By setting this option the generation of
5086 .Ql Message-ID:
5087 can be completely suppressed, effectively leaving this task up to the
5088 mail-transfer-agent (MTA) or the SMTP server.
5089 (According to RFC 5321 your SMTP server is not required to add this
5090 field by itself, so you should ensure that it accepts messages without a
5091 .Ql Message-ID . )
5093 .It Va metoo
5094 Usually, when an
5095 .Ic alias
5096 expansion contains the sender, the sender is removed from the expansion.
5097 Setting this option suppresses these removals.
5098 Note that a set
5099 .Va metoo
5100 also causes a
5101 .Ql -m
5102 option to be passed to mail-transfer-agents (MTAs);
5103 though most of the modern MTAs don't (no longer) document this flag, no
5104 MTA is known which doesn't support it (for historical compatibility).
5106 .It Va mime-allow-text-controls
5107 When sending messages, each part of the message is MIME-inspected in
5108 order to classify the
5109 .Ql Content-Type:
5111 .Ql Content-Transfer-Encoding:
5112 (see
5113 .Va encoding )
5114 that is required to send this part over mail transport, i.e.,
5115 a computation rather similar to what the
5116 .Xr file 1
5117 command produces when used with the
5118 .Ql --mime
5119 option.
5121 This classification however treats text files which are encoded in
5122 UTF-16 (seen for HTML files) and similar character sets as binary
5123 octet-streams, forcefully changing any
5124 .Ql text/plain
5126 .Ql text/html
5127 specification to
5128 .Ql application/octet-stream :
5129 If that actually happens a yet unset charset MIME parameter is set to
5130 .Ql binary ,
5131 effectively making it impossible for the receiving MUA to automatically
5132 interpret the contents of the part.
5134 If this option is set, and the data was unambiguously identified as text
5135 data at first glance (by a
5136 .Ql .txt
5138 .Ql .html
5139 file extension), then the original
5140 .Ql Content-Type:
5141 will not be overwritten.
5142 .Mx Va netrc-lookup
5143 .It Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup
5144 \*(IN \*(OP Used to control usage of the users
5145 .Pa .netrc
5146 file for lookup of account credentials, as documented in the section
5147 .Sx "On URL syntax and credential lookup"
5148 and for the command
5149 .Ic netrc ;
5150 the section
5151 .Sx "The .netrc file"
5152 documents the file format.
5154 .It Va outfolder
5155 Causes the filename given in the
5156 .Va record
5157 variable
5158 and the sender-based filenames for the
5159 .Ic Copy
5161 .Ic Save
5162 commands to be interpreted relative to the directory given in the
5163 .Va folder
5164 variable rather than to the current directory,
5165 unless it is set to an absolute pathname.
5167 .It Va page
5168 If set, each message the
5169 .Ic pipe
5170 command prints out is followed by a formfeed character
5171 .Ql \ef .
5173 .It Va piperaw
5174 Send messages to the
5175 .Ic pipe
5176 command without performing MIME and character set conversions.
5178 .Mx Va pop3-bulk-load
5179 .It Va pop3-bulk-load-USER@HOST , pop3-bulk-load-HOST , pop3-bulk-load
5180 \*(OP When accessing a POP3 server \*(UA loads the headers of the
5181 messages, and only requests the message bodies on user request.
5182 For the POP3 protocol this means that the message headers will be
5183 downloaded twice.
5184 If this option is set then \*(UA will download only complete messages
5185 from the given POP3 server(s) instead.
5186 .Mx Va pop3-no-apop
5187 .It Va pop3-no-apop-USER@HOST , pop3-no-apop-HOST , pop3-no-apop
5188 \*(OP Unless this variable is set the
5189 .Ql APOP
5190 authentication method will be used when connecting to a POP3 server that
5191 advertises support.
5192 The advantage of
5193 .Ql APOP
5194 is that the password is not sent in clear text over the wire and that
5195 only a single packet is sent for the user/password tuple.
5196 Note that
5197 .Va pop3-no-apop-HOST
5198 requires \*(IN.
5199 .Mx Va pop3-use-starttls
5200 .It Va pop3-use-starttls-USER@HOST , pop3-use-starttls-HOST , pop3-use-starttls
5201 \*(OP Causes \*(UA to issue a
5202 .Ql STLS
5203 command to make an unencrypted POP3 session SSL/TLS encrypted.
5204 This functionality is not supported by all servers,
5205 and is not used if the session is already encrypted by the POP3S method.
5206 Note that
5207 .Va pop3-use-starttls-HOST
5208 requires \*(IN.
5210 .It Va print-all-chars
5211 This option causes all characters to be considered printable.
5212 It is only effective if given in a startup file.
5213 With this option set some character sequences in messages may put the
5214 user's terminal in an undefined state when printed;
5215 it should only be used as a last resort if no working system locale can
5216 be found.
5218 .It Va print-alternatives
5219 When a MIME message part of type
5220 .Ql multipart/alternative
5221 is displayed and it contains a subpart of type
5222 .Ql text/plain ,
5223 other parts are normally discarded.
5224 Setting this variable causes all subparts to be displayed,
5225 just as if the surrounding part was of type
5226 .Ql multipart/mixed .
5228 .It Va quiet
5229 Suppresses the printing of the version when first invoked.
5231 .It Va quote-as-attachment
5232 If this is set, then the original message is added in its entirety as a
5233 .Ql message/rfc822
5234 MIME attachment when replying to a message.
5235 Note this works regardless of the setting of
5236 .Va quote .
5238 .It Va recipients-in-cc
5239 On group replies, specify only the sender of the original mail in
5240 .Ql To:
5241 and mention the other recipients in the secondary
5242 .Ql Cc: .
5243 By default all recipients of the original mail will be addressed via
5244 .Ql To: .
5246 .It Va record-resent
5247 If both this variable and the
5248 .Va record
5249 variable are set,
5251 .Ic resend
5253 .Ic Resend
5254 commands save messages to the
5255 .Va record
5256 folder as it is normally only done for newly composed messages.
5258 .It Va reply-in-same-charset
5259 If this variable is set \*(UA first tries to use the same character set
5260 of the original message for replies.
5261 If this fails, the mechanism described in
5262 .Sx "Character sets"
5263 is evaluated as usual.
5265 .It Va rfc822-body-from_
5266 This variable can be used to force displaying a so-called
5267 .Ql From_
5268 line for messages that are embedded into an envelope mail via the
5269 .Ql message/rfc822
5270 MIME mechanism, for more visual convenience.
5272 .It Va save
5273 Enable saving of (partial) messages in
5274 .Ev DEAD
5275 upon interrupt or delivery error.
5277 .It Va searchheaders
5278 Expand message-list specifiers in the form
5279 .Ql /x:y
5280 to all messages containing the substring
5281 .Dq y
5282 in the header field
5283 .Ql x .
5284 The string search is case insensitive.
5286 .It Va sendcharsets-else-ttycharset
5287 \*(OP If this variable is set, but
5288 .Va sendcharsets
5289 is not, then \*(UA acts as if
5290 .Va sendcharsets
5291 had been set to the value of the variable
5292 .Va ttycharset .
5293 In effect this combination passes through the message data in the
5294 character set of the current locale (given that
5295 .Va ttycharset
5296 hasn't been set manually), i.e., without converting it to the
5297 .Va charset-8bit
5298 fallback character set.
5299 Thus, mail message text will be in ISO-8859-1 encoding when send from
5300 within a ISO-8859-1 locale, and in UTF-8 encoding when send from within
5301 an UTF-8 locale.
5302 If no character set conversion capabilities are available in \*(UA then
5303 the only supported character set is
5304 .Va ttycharset .
5305 .It Va sendmail-no-default-arguments
5306 Unless this option is set \*(UA will pass some well known
5307 standard command line options to the defined
5308 .Va sendmail
5309 program, see there for more.
5311 .It Va sendwait
5312 When sending a message wait until the MTA (including the builtin SMTP
5313 one) exits before accepting further commands.
5314 .Sy Only
5315 with this variable set errors reported by the MTA will be recognizable!
5316 If the MTA returns a non-zero exit status,
5317 the exit status of \*(ua will also be non-zero.
5319 .It Va showlast
5320 Setting this option causes \*(UA to start at the last message instead of
5321 the first one when opening a mail folder.
5323 .It Va showname
5324 Causes \*(UA to use the sender's real name instead of the plain address
5325 in the header field summary and in message specifications.
5327 .It Va showto
5328 Causes the recipient of the message to be shown in the header summary
5329 if the message was sent by the user.
5331 .It Va skipemptybody
5332 If an outgoing message does not contain any text in its first or only
5333 message part,
5334 do not send it but discard it silently (see also the command line option
5335 .Fl E ) .
5337 .It Va smime-force-encryption
5338 \*(OP Causes \*(UA to refuse sending unencrypted messages.
5340 .It Va smime-sign
5341 \*(OP S/MIME sign outgoing messages with the user's private key and
5342 include the user's certificate as a MIME attachment.
5343 Signing a message enables a recipient to verify that the sender used
5344 a valid certificate,
5345 that the email addresses in the certificate match those in the message
5346 header and that the message content has not been altered.
5347 It does not change the message text,
5348 and people will be able to read the message as usual.
5349 Also see
5350 .Va smime-sign-cert , smime-sign-include-certs
5352 .Va smime-sign-message-digest .
5354 .It Va smime-no-default-ca
5355 \*(OP Don't load default CA locations when verifying S/MIME signed
5356 messages.
5357 .Mx Va smtp-use-starttls
5358 .It Va smtp-use-starttls-USER@HOST , smtp-use-starttls-HOST , smtp-use-starttls
5359 \*(OP Causes \*(UA to issue a
5360 .Ql STARTTLS
5361 command to make an SMTP session SSL/TLS encrypted, i.e., to enable
5362 transport layer security.
5364 .It Va ssl-no-default-ca
5365 \*(OP Don't load default CA locations to verify SSL/TLS server
5366 certificates.
5368 .It Va term-ca-mode
5369 \*(OP If terminal capability queries are supported and this option is
5370 set then \*(UA will try to switch to the
5371 .Dq alternate screen
5372 when in interactive mode, so that the terminal will go back to the
5373 normal screen, leaving all the text there intact, when \*(UA exits.
5374 .Sy Note:
5375 even when supported for this to produce appealing results the used
5376 .Ev PAGER
5377 and possibly configured
5378 .Va pipe-TYPE/SUBTYPE
5379 applications that take control over the terminal need to have
5380 corresponding support too, e.g., the
5381 .Xr less 1
5382 pager should be driven with the
5383 .Ql -X
5384 command line flag.
5386 .It Va keep-content-length
5387 When (editing messages and) writing
5388 .Ev MBOX
5389 mailbox files \*(UA can be told to keep the
5390 .Ql Content-Length:
5392 .Ql Lines:
5393 header fields that some MUAs generate by setting this variable.
5394 Since \*(UA does neither use nor update these non-standardized header
5395 fields (which in itself shows one of their conceptual problems),
5396 stripping them should increase interoperability in between MUAs that
5397 work with with same mailbox files.
5398 Note that, if this is not set but
5399 .Va writebackedited ,
5400 as below, is, a possibly performed automatic stripping of these header
5401 fields already marks the message as being modified.
5403 .It Va v15-compat
5404 Setting this option enables upward compatibility with \*(UA version 15.0
5405 in respect to which configuration options are available and how they are
5406 handled.
5407 This manual uses \*(IN and \*(OU to refer to the new and the old way of
5408 doing things, respectively.
5410 .It Va verbose
5411 Setting this option, also controllable via the command line option
5412 .Fl v ,
5413 causes \*(UA to be more verbose, so that, e.g., certificate chains will
5414 be displayed on the users terminal.
5415 Setting this binary option twice increases the level of verbosity, in
5416 which case even details of the actual message delivery and protocol
5417 conversations are shown.
5418 A single
5419 .Pf no Va verbose
5420 is sufficient to disable verbosity as such.
5422 .It Va writebackedited
5423 If this variable is set messages modified using the
5424 .Ic edit
5426 .Ic visual
5427 commands are written back to the current folder when it is quit;
5428 it is only honoured for writable folders in MBOX format, though.
5429 Note that the editor will be pointed to the raw message content in that
5430 case, i.e., neither MIME decoding nor decryption will have been
5431 performed, and proper RFC 4155
5432 .Ql From_
5433 quoting of newly added or edited content is also left as an excercise to
5434 the user.
5436 .Ss "Value options"
5437 Options with values that are generally treated as strings.
5438 To embed whitespace (space and tabulator) in a value it either needs to
5439 be escaped with a backslash character, or the entire value must be
5440 enclosed in (double or single) quotation marks;
5441 To use quotation marks identical to those used to enclose the value,
5442 escape them with a backslash character.
5443 The backslash character has no special meaning except in these cases.
5444 .Bd -literal -offset indent
5445 set 1=val\e one 2="val two" 3='val "three"' 4='val \e'four\e''
5446 varshow 1 2 3 4
5447 unset 1 2 3 4
5450 Booleans are special string values that must either be set to decimal
5451 integers (in which case
5452 .Ql 0
5453 is false and
5454 .Ql 1
5455 and any other value is true) or to any of
5456 .Ql off ,
5457 .Ql no
5459 .Ql false
5460 for a false boolean and
5461 .Ql on ,
5462 .Ql yes
5464 .Ql true
5465 for a true boolean; matching is performed case-insensitively.
5466 And there exists a special kind of boolean, the
5467 .Dq quadoption :
5468 this is expected to either name a boolean or one of the strings
5469 .Ql ask-yes
5471 .Ql ask-no
5472 (in fact:
5473 .Ql ask-
5474 followed by a valid boolean, case-insensitively);
5475 if one of the latter is set then in interactive mode the user will be
5476 prompted with the default value (also used for empty user input) set to
5477 the given boolean, whereas in non-interactive the given default will
5478 be used right away.
5479 .Bl -tag -width ".It Va _utoprin_"
5480 .Mx Va agent-shell-lookup
5481 .It Va agent-shell-lookup-USER@HOST , agent-shell-lookup-HOST , \
5482   agent-shell-lookup
5483 \*(IN \*(OP Account passwords can be fetched via an external agent
5484 program in order to permit encrypted password storage \(en see
5485 .Sx "On URL syntax and credential lookup"
5486 for more on credential lookup.
5487 If this is set then the content is interpreted as a shell command the
5488 output of which (with newline characters removed) is treated as the
5489 account password shall the command succeed (and have produced non-empty
5490 non-newline output); e.g., via
5491 .Xr gpg 1 :
5492 .Bd -literal -offset indent
5493 $ echo PASSWORD > .pass
5494 $ gpg -e .pass
5495 $ eval `gpg-agent --daemon \e
5496     --pinentry-program=/usr/bin/pinentry-curses \e
5497     --max-cache-ttl 99999 --default-cache-ttl 99999`
5498 $ echo 'set agent-shell-lookup="gpg -d .pass.gpg"' \e
5499     >> \*(ur
5502 A couple of environment variables will be set for the agent:
5504 .Bl -tag -compact -width ".It Ev _AIL_TMPDIR[337]"
5505 .It Ev NAIL_TMPDIR
5506 The temporary directory that \*(UA uses.
5507 Usually identical to
5508 .Ev TMPDIR ,
5509 but guaranteed to be set and usable by child processes;
5510 to ensure the latter condition for
5511 .Ev TMPDIR
5512 also, it'll be set.
5513 .It Ev NAIL_USER
5514 The user
5515 .Pf ( Ql USER )
5516 for which the password is looked up.
5517 .It Ev NAIL_USER_ENC
5518 The URL percent-encoded variant of
5519 .Ev NAIL_USER .
5520 .It Ev NAIL_HOST
5521 The plain machine hostname of the user account.
5522 .It Ev NAIL_HOST_PORT
5524 .Ql HOST
5525 (hostname possibly including port) of the user account.
5528 .It Va attrlist
5529 A sequence of characters to print in the
5530 .Ql attribute
5531 column of the
5532 .Va headline
5533 as shown in the header display; each for one type of messages (see
5534 .Sx "Message states" ) ,
5535 with the default being
5536 .Ql NUROSPMFAT+\-$~
5538 .Ql NU\ \ *HMFAT+\-$~
5540 .Va bsdflags
5541 or the
5542 .Ev SYSV3
5543 environment variable are set, in the following order:
5545 .Bl -tag -compact -offset indent -width ".It Ql _"
5546 .It Ql N
5547 new.
5548 .It Ql U
5549 unread but old.
5550 .It Ql R
5551 new but read.
5552 .It Ql O
5553 read and old.
5554 .It Ql S
5555 saved.
5556 .It Ql P
5557 preserved.
5558 .It Ql M
5559 mboxed.
5560 .It Ql F
5561 flagged.
5562 .It Ql A
5563 answered.
5564 .It Ql T
5565 draft.
5566 .It Ql +
5567 start of a collapsed thread.
5568 .It Ql -
5569 collapsed.
5570 .It Ql $
5571 classified as spam.
5572 .It Ql ~
5573 classified as possible spam.
5576 .It Va autobcc
5577 Specifies a list of recipients to which a blind carbon copy of each
5578 outgoing message will be sent automatically.
5580 .It Va autocc
5581 Specifies a list of recipients to which a carbon copy of each outgoing
5582 message will be sent automatically.
5584 .It Va autosort
5585 Causes sorted mode (see the
5586 .Ic sort
5587 command) to be entered automatically with the value of this option as
5588 sorting method when a folder is opened.
5590 .It Va charset-7bit
5591 The value that should appear in the
5592 .Ql charset=
5593 parameter of
5594 .Ql Content-Type:
5595 MIME header fields when no character set conversion of the message data
5596 was performed.
5597 This defaults to US-ASCII, and the chosen character set should be
5598 US-ASCII compatible.
5600 .It Va charset-8bit
5601 \*(OP The default 8-bit character set that is used as an implicit last
5602 member of the variable
5603 .Va sendcharsets .
5604 This defaults to UTF-8.
5605 If no character set conversion capabilities are available in \*(UA then
5606 the only supported character set is
5607 .Va ttycharset .
5608 Refer to the section
5609 .Sx "Character sets"
5610 for the complete picture of character set conversion in \*(UA.
5612 .It Va charset-unknown-8bit
5613 \*(OP RFC 1428 specifies conditions when internet mail gateways shall
5614 .Dq upgrade
5615 the content of a mail message by using a character set with the name
5616 .Ql unknown-8bit .
5617 Because of the unclassified nature of this character set \*(UA will not
5618 be capable to convert this character set to any other character set.
5619 If this variable is set any message part which uses the character set
5620 .Ql unknown-8bit
5621 is assumed to really be in the character set given in the value,
5622 otherwise the (final) value of
5623 .Va charset-8bit
5624 is used for this purpose.
5626 .It Va cmd
5627 The default value for the
5628 .Ic pipe
5629 command.
5631 .It Va colour-from_
5632 \*(OP The colour specification for so-called
5633 .Ql From_
5634 lines.
5635 See the section
5636 .Sx "Coloured message display"
5637 for the format of the value.
5639 .It Va colour-header
5640 \*(OP The colour specification for header lines.
5642 .It Va colour-msginfo
5643 \*(OP The colour specification for the introductional message info line.
5645 .It Va colour-partinfo
5646 \*(OP The colour specification for MIME part info lines.
5648 .It Va colour-terms
5649 \*(OP A comma-separated list of
5650 .Ev TERM Ns
5651 inals for which coloured message display can be used.
5652 Entries only need to be added if the string
5653 .Dq color
5654 isn't part of the terminal name itself; the default value is
5656 .Dl cons25,linux,rxvt,rxvt-unicode,\:screen,\:sun,\:vt100,\:vt220,\:\
5657 wsvt25,\:xterm
5659 .It Va colour-uheader
5660 \*(OP The colour specification for those header lines that have been
5661 placed in the
5662 .Va colour-user-headers
5663 list.
5664 See the section
5665 .Sx "Coloured message display" .
5667 .It Va colour-user-headers
5668 A comma separated list of (case-insensitive) header names which should
5669 be colourized with the alternative
5670 .Va colour-uheader
5671 colours.
5672 The default value is
5673 .Ql from,subject .
5675 .It Va crt
5676 In a(n interactive) terminal session, then if this valued option is set
5677 it'll be used as a threshold to determine how many lines the given
5678 output has to span before it will be displayed via the configured
5679 .Ev PAGER ;
5680 Usage of the
5681 .Ev PAGER
5682 can be forced by setting this to the value
5683 .Ql 0 ,
5684 setting it without a value will deduce the current height of the
5685 terminal screen to compute the treshold (see
5686 .Ev LINES
5688 .Xr stty 1 ) .
5690 .It Va datefield
5691 The date in a header summary is normally the date of the mailbox
5692 .Ql From_
5693 line of the message.
5694 If this variable is set, then the date as given in the
5695 .Ql Date:
5696 field is used, converted to local time.
5697 It is possible to control the display of the date by assigning a value,
5698 in which case the
5699 .Xr strftime 3
5700 function will be used to format the date accordingly.
5701 Please read your system manual for the available formats.
5702 Note that the
5703 .Ql %n
5704 format should not be used, because \*(UA doesn't take embedded newlines
5705 into account when calculating how many lines fit onto the screen.
5707 .It Va datefield-markout-older
5708 This option, when set in addition to
5709 .Va datefield ,
5710 is used to display
5711 .Dq older
5712 messages (concept is rather comparable to the
5713 .Fl \&\&l
5714 option of the POSIX utility
5715 .Xr ls 1 ) .
5716 The content interpretation is identical to
5717 .Va datefield .
5719 .It Va encoding
5720 Suggestion for the MIME encoding to use in outgoing text messages
5721 and message parts.
5722 Valid values are the default
5723 .Ql quoted-printable ,
5724 .Ql 8bit
5726 .Ql base64 .
5727 .Ql 8bit
5728 may cause problems when transferring mail messages over channels that
5729 are not ESMTP (RFC 1869) compliant.
5730 If there is no need to encode a message,
5731 .Ql 7bit
5732 transfer mode is always used regardless of this variable.
5733 Binary data is always encoded as
5734 .Ql base64 .
5736 .It Va escape
5737 If defined, the first character of this option
5738 gives the character to use in place of
5739 .Ql ~
5740 to denote
5741 .Sx "TILDE ESCAPES" .
5743 .It Va expandaddr
5744 If not set then file and command pipeline targets are not allowed,
5745 and any such address will be filtered out, giving a warning message.
5746 If set without a value then all possible recipient address
5747 specifications will be accepted \(en see the section
5748 .Sx "Sending mail"
5749 for more on this.
5750 To accept them, but only in interactive mode, or when tilde commands
5751 were enabled explicitly by using one of the command line options
5752 .Fl ~
5754 .Fl # ,
5755 set this to the (case-insensitive) value
5756 .Ql restrict
5757 (note right now this is actually like setting
5758 .Ql restrict,-all,+name,+addr ) .
5760 In fact the value is interpreted as a comma-separated list of values.
5761 If it contains
5762 .Ql fail
5763 then the existence of disallowed specifications is treated as a hard
5764 send error instead of only filtering them out.
5765 The remaining values specify whether a specific type of recipient
5766 address specification is allowed (optionally indicated by a plus sign
5767 .Ql +
5768 prefix) or disallowed (prefixed with a hyphen
5769 .Ql - ) .
5770 The value
5771 .Ql all
5772 addresses all possible address specifications,
5773 .Ql file
5774 file targets,
5775 .Ql pipe
5776 command pipeline targets,
5777 .Ql name
5778 plain user names and (MTA) aliases (\*(OB
5779 .Ql noalias
5780 may be used as an alternative syntax to
5781 .Ql -name )
5783 .Ql addr
5784 network addresses.
5785 These kind of values are interpreted in the given order, so that
5786 .Ql restrict,\:fail,\:+file,\:-all,\:+addr
5787 will cause hard errors for any non-network address recipient address
5788 unless \*(UA is in interactive mode or has been started with the
5789 .Fl ~
5791 .Fl #
5792 command line option; in the latter case(s) any address may be used, then.
5794 .It Va expandargv
5795 Unless this variable is set additional mail-transfer-agent (MTA)
5796 arguments from the command line, as can be given after a
5797 .Ql --
5798 separator, are ignored due to safety reasons.
5799 However, if set to the special value
5800 .Ql fail ,
5801 then the presence of additional MTA arguments is treated as a hard
5802 error that causes \*(UA to exit with failure status.
5803 A lesser strict variant is the otherwise identical
5804 .Ql restrict ,
5805 which does accept such arguments in interactive mode, or if tilde
5806 commands were enabled explicitly by using one of the command line options
5807 .Fl ~
5809 .Fl # .
5811 .It Va features
5812 \*(RO Information on the features compiled into \*(UA \(en the content
5813 of this variable is identical to the output of the command
5814 .Ic features .
5817 .It Va file-hook-load-EXTENSION , file-hook-save-EXTENSION
5818 It is possible to install file hooks which will be used by the
5819 .Ic file
5820 command in order to be able to transparently handle (through an
5821 intermediate temporary file) files with specific
5822 .Ql EXTENSION Ns
5823 s: the variable values can include shell snippets and are expected to
5824 write data to standard output / read data from standard input,
5825 respectively.
5826 \*(ID The variables may not be changed while there is a mailbox
5827 attendant.
5828 .Bd -literal -offset indent
5829 set file-hook-load-xy='echo >&2 XY-LOAD; gzip -cd' \e
5830     file-hook-save-xy='echo >&2 XY-SAVE; gzip -c' \e
5831     record=+null-sent.xy
5834 .It Va folder
5835 The name of the directory to use for storing folders of messages.
5836 All folder names that begin with
5837 .Ql +
5838 refer to files below it.
5839 The same special conventions as documented for the
5840 .Ic file
5841 command may be used when specifying a new value for
5842 .Va \&\&folder ,
5843 but be aware that the expansion is fully performed immediately.
5844 E.g., if the expanded name refers to an IMAP account, all names that
5845 begin with `+' refer to IMAP mailboxes below the
5846 .Va folder
5847 target box.
5849 Note: for IMAP it makes a difference whether
5850 .Va \&\&folder
5851 ends with a directory separator solidus or not in respect to the
5852 automatic append of `INBOX' strings.
5853 Ssome IMAP servers do not accept the creation of mailboxes in
5854 the hierarchy base, but require that they are created as subfolders of
5855 `INBOX' \(en with such servers a folder name of the form
5857 .Dl imaps://mylogin@imap.myisp.example/INBOX.
5859 should be used (the last character is the server's hierarchy delimiter).
5860 Folder names prefixed by `+' will then refer to folders below `INBOX',
5861 while folder names prefixed by `@' refer to folders below the hierarchy
5862 base.
5863 See the
5864 .Ic imap
5865 namespace command for a method to detect the appropriate prefix and
5866 delimiter.
5868 .It Va folder-hook
5869 When a folder is opened and this variable is set,
5870 the macro corresponding to the value of this variable is executed.
5871 The macro is also invoked when new mail arrives,
5872 but message lists for commands executed from the macro
5873 only include newly arrived messages then.
5875 .Ic localopts
5876 are activated in a folder hook, then the covered settings will be
5877 reverted once the folder is left again.
5879 .It Va folder-hook-FOLDER
5880 Overrides
5881 .Va folder-hook
5882 for a folder named
5883 .Ql FOLDER .
5884 Unlike other folder specifications, the fully expanded name of a folder,
5885 without metacharacters, is used to avoid ambiguities.
5886 However, if the mailbox resides under
5887 .Va folder
5888 then the usual
5889 .Ql +
5890 specification is tried in addition, e.g., if
5891 .Va \&\&folder
5893 .Dq mail
5894 (and thus relative to the user's home directory) then
5895 .Pa /home/usr1/mail/sent
5896 will be tried as
5897 .Ql folder-hook-/home/usr1/mail/sent
5898 first, but then followed by
5899 .Ql folder-hook-+sent .
5901 .It Va followup-to-honour
5902 Controls whether a
5903 .Ql Mail-Followup-To:
5904 header is honoured when group-replying to a message via
5905 .Ic reply
5907 .Ic Lreply .
5908 This is a quadoption; if set without a value it defaults to
5909 .Dq yes .
5910 Also see
5911 .Va followup-to
5912 and the commands
5913 .Ic mlist
5915 .Ic mlsubscribe .
5917 .It Va from
5918 The address (or a list of addresses) to put into the
5919 .Ql From:
5920 field of the message header, quoting RFC 5322:
5921 the author(s) of the message, that is, the mailbox(es) of the person(s)
5922 or system(s) responsible for the writing of the message.
5923 If replying to messages these addresses are handled as if they were in
5925 .Ic alternates
5926 list.
5927 If the machine's hostname is not valid at the Internet (for example at
5928 a dialup machine) then either this variable or
5929 .Va hostname
5930 (\*(IN and with
5931 .Va smtp
5932 .Va smtp-hostname
5933 adds even more fine-tuning capabilities),
5934 have to be set.
5936 .Va \&\&from
5937 contains more than one address,
5938 setting the
5939 .Va sender
5940 variable is required (according to the standard RFC 5322).
5942 .It Va fwdheading
5943 The string to print before the text of a message with the
5944 .Ic forward
5945 command
5946 (unless the
5947 .Va forward-as-attachment
5948 variable is set).
5949 Defaults to
5950 .Dq -------- Original Message --------
5951 if unset; No heading is printed if it is set to the empty string.
5953 .It Va headline
5954 A format string to use for the header summary,
5955 similar to
5956 .Xr printf 3
5957 formats.
5958 A percent character
5959 .Ql %
5960 introduces a format specifier that may be followed by a number
5961 indicating the field width;
5962 If the (possibly implicitly implied) field width is negative, the field
5963 is to be left-aligned.
5964 Valid format specifiers are:
5966 .Bl -tag -compact -offset indent -width "_%%_"
5967 .It Ql %%
5968 A plain percent character.
5969 .It Ql %>
5970 A space character but for the current message, for which it expands to
5971 .Ql > .
5972 .It Ql %<
5973 A space character but for the current message, for which it expands to
5974 .Ql < .
5975 .It Ql %$
5976 \*(OP The spam score of the message, as has been classified via the
5977 command
5978 .Ic spamrate .
5979 Prints only a replacement character if there is no spam support.
5980 .It Ql %a
5981 Message attribute character (status flag); the actual content can be
5982 adjusted by setting
5983 .Va attrlist .
5984 .It Ql %d
5985 The date when the message was received.
5986 .It Ql %e
5987 The indenting level in threaded mode.
5988 .It Ql %f
5989 The address of the message sender.
5990 .It Ql %i
5991 The message thread structure.
5992 (Note that this format doesn't support a field width.)
5993 .It Ql %l
5994 The number of lines of the message.
5995 .It Ql %m
5996 Message number.
5997 .It Ql %o
5998 The number of octets (bytes) in the message.
5999 .It Ql %s
6000 Message subject (if any).
6001 .It Ql %S
6002 Message subject (if any) in double quotes.
6003 .It Ql \&%T
6004 Message recipient flags: is the addressee of the message a known or
6005 subscribed mailing list \(en see
6006 .Ic mlist
6008 .Ic mlsubscribe .
6009 .It Ql %t
6010 The position in threaded/sorted order.
6013 The default is
6014 .Ql %>\&%a\&%m\ %-18f\ %16d\ %4l/%\-5o\ %i%-s ,
6016 .Ql %>\&%a\&%m\ %20-f\ \ %16d\ %3l/%\-5o\ %i%-S
6018 .Va bsdcompat
6019 is set.
6020 Also see
6021 .Va attrlist
6023 .Va headline-bidi .
6025 .It Va headline-bidi
6026 Bidirectional text requires special treatment when displaying headers,
6027 because numbers (in dates or for file sizes etc.) will not affect the
6028 current text direction, in effect resulting in ugly line layouts when
6029 arabic or other right-to-left text is to be displayed.
6030 On the other hand only a minority of terminals is capable to correctly
6031 handle direction changes, so that user interaction is necessary for
6032 acceptable results.
6033 Note that extended host system support is required nonetheless, e.g.,
6034 detection of the terminal character set is one precondition;
6035 and this feature only works in an Unicode (i.e., UTF-8) locale.
6037 In general setting this variable will cause \*(UA to encapsulate text
6038 fields that may occur when printing
6039 .Va headline
6040 (and some other fields, like dynamic expansions in
6041 .Va prompt )
6042 with special Unicode control sequences;
6043 it is possible to fine-tune the terminal support level by assigning
6044 a value:
6045 no value (or any value other than
6046 .Ql 1 ,
6047 .Ql 2
6049 .Ql 3 )
6050 will make \*(UA assume that the terminal is capable to properly deal
6051 with Unicode version 6.3, in which case text is embedded in a pair of
6052 U+2068 (FIRST STRONG ISOLATE) and U+2069 (POP DIRECTIONAL ISOLATE)
6053 characters.
6054 In addition no space on the line is reserved for these characters.
6056 Weaker support is chosen by using the value
6057 .Ql 1
6058 (Unicode 6.3, but reserve the room of two spaces for writing the control
6059 sequences onto the line).
6060 The values
6061 .Ql 2
6063 .Ql 3
6064 select Unicode 1.1 support (U+200E, LEFT-TO-RIGHT MARK); the latter
6065 again reserves room for two spaces in addition.
6067 .It Va hostname
6068 Use this string as hostname when expanding local addresses instead of
6069 the value obtained from
6070 .Xr uname 3
6072 .Xr getaddrinfo 3 ,
6073 i.e., in
6074 .Ql Message-ID:
6076 .Ql From:
6077 fields.
6078 Note that when
6079 .Va smtp
6080 transport is not used then it is normally the responsibility of the MTA
6081 to create these fields, \*(IN in conjunction with
6082 .Va smtp
6083 however
6084 .Va smtp-hostname
6085 also influences the results;
6086 you should produce some test messages with the desired combination of
6087 .Va \&\&hostname ,
6088 and/or
6089 .Va from ,
6090 .Va sender
6091 etc. first.
6092 .Mx Va imap-auth
6093 .It Va imap-auth-USER@HOST , imap-auth
6094 \*(OP Sets the IMAP authentication method.
6095 Valid values are `login' for the usual password-based authentication
6096 (the default),
6097 `cram-md5', which is a password-based authentication that does not send
6098 the password over the network in clear text,
6099 and `gssapi' for GSS-API based authentication.
6101 .It Va imap-cache
6102 \*(OP Enables caching of IMAP mailboxes.
6103 The value of this variable must point to a directory that is either
6104 existent or can be created by \*(UA.
6105 All contents of the cache can be deleted by \*(UA at any time;
6106 it is not safe to make assumptions about them.
6107 .Mx Va imap-keepalive
6108 .It Va imap-keepalive-USER@HOST , imap-keepalive-HOST , imap-keepalive
6109 \*(OP IMAP servers may close the connection after a period of
6110 inactivity; the standard requires this to be at least 30 minutes,
6111 but practical experience may vary.
6112 Setting this variable to a numeric `value' greater than 0 causes
6113 a `NOOP' command to be sent each `value' seconds if no other operation
6114 is performed.
6116 .It Va imap-list-depth
6117 \*(OP When retrieving the list of folders on an IMAP server, the
6118 .Ic folders
6119 command stops after it has reached a certain depth to avoid possible
6120 infinite loops.
6121 The value of this variable sets the maximum depth allowed.
6122 The default is 2.
6123 If the folder separator on the current IMAP server is a slash `/',
6124 this variable has no effect and the
6125 .Ic folders
6126 command does not descend to subfolders.
6128 .It Va indentprefix
6129 String used by the
6130 .Ic ~m , ~M
6132 .Ic ~R
6133 .Sx "TILDE ESCAPES"
6134 and by the
6135 .Va quote
6136 option for indenting messages,
6137 in place of the normal tabulator character
6138 .Ql ^I ,
6139 which is the default.
6140 Be sure to quote the value if it contains spaces or tabs.
6142 .It Va line-editor-cursor-right
6143 \*(OP If the builtin command line editor is used, actions which are
6144 based on rightwise movement may not work on some terminals.
6145 If you encounter such problems, set this variable to the terminal
6146 control sequence that is necessary to move the cursor one column to the
6147 right.
6148 The default is
6149 .Ql \e033[C ,
6150 which should work for most terminals.
6151 Less often occur
6152 .Ql \e033OC
6154 .Ql \e014 .
6155 Note that
6156 .Dq Escape
6157 and other control character have to be written as shell-style escape
6158 sequences, e.g.,
6159 .Ql \e033
6160 for (US-ASCII)
6161 .Dq Escape .
6163 .It Va MAIL
6164 Is used as the user's mailbox, if set.
6165 Otherwise, a system-dependent default is used.
6166 Supports a logical subset of the special conventions that are documented
6167 for the
6168 .Ic file
6169 command and the
6170 .Va folder
6171 option.
6173 .It Va mime-counter-evidence
6174 Normally the
6175 .Ql Content-Type:
6176 field is used to decide how to handle MIME parts.
6177 Some MUAs however don't use
6178 .Xr mime.types 5
6179 or a similar mechanism to correctly classify content, but simply specify
6180 .Ql application/octet-stream ,
6181 even for plain text attachments like
6182 .Ql text/diff .
6183 If this variable is set then \*(UA will try to classify such MIME
6184 message parts on its own, if possible, and through their file name.
6185 This variable can also be given a non-empty value, in which case the
6186 value is expected to be a number, actually a carrier of bits.
6187 Creating the bit-carrying number is a simple addition:
6188 .Bd -literal -offset indent
6189 ? !echo Value should be set to $((2 + 4))
6190 Value should be set to 6
6193 .Bl -bullet -compact
6195 If bit two is set (2) then the detected
6196 .Qd real
6197 content-type will be carried along with the message and be used for
6198 deciding which
6199 .Va pipe-TYPE/SUBTYPE
6200 is responsible for the MIME part, shall that question arise;
6201 when displaying such a MIME part the part-info will indicate the
6202 overridden content-type by showing a plus-sign
6203 .Ql + .
6205 If bit three is set (4) then the counter-evidence is always produced
6206 and a positive result will be used as the MIME type, even forcefully
6207 overriding the parts given MIME type.
6210 .It Va mimetypes-load-control
6211 This option can be used to control which of the
6212 .Xr mime.types 5
6213 databases are loaded by \*(UA, as furtherly described in the section
6214 .Sx "The mime.types files" .
6215 If the letter
6216 .Ql u
6217 is part of the option value, then the user's personal
6218 .Pa ~/.mime.types
6219 file will be loaded (if it exists); likewise the letter
6220 .Ql s
6221 controls loading of the system wide
6222 .Pa /etc/mime.types ;
6223 the user file is loaded first, letter matching is case-insensitive.
6224 If this option is not set \*(UA will try to load both files instead.
6225 Incorporation of the \*(UA-builtin MIME types cannot be suppressed,
6226 but they will be matched last.
6228 More sources can be specified by using a different syntax: if the
6229 value string contains an equals sign
6230 .Ql =
6231 then it is instead parsed as a comma-separated list of the described
6232 letters plus
6233 .Ql f=FILENAME
6234 pairs; the given filenames will be expanded and loaded, and their
6235 content may use the extended syntax that is described in the section
6236 .Sx "The mime.types files" .
6238 .It Va NAIL_EXTRA_RC
6239 The name of an optional startup file to be read after
6240 .Pa \*(ur .
6241 This variable has an effect only if it is set in
6242 .Pa \*(UR
6244 .Pa \&\&\*(ur ,
6245 it is not imported from the environment in order to honour
6246 .Ql MAILRC=/dev/null Ns /
6247 .Fl n
6248 invocations.
6249 Use this file for commands that are not understood by other POSIX
6250 .Xr mailx 1
6251 implementations.
6253 .It Va NAIL_HEAD
6254 A string to put at the beginning of each new message.
6255 The escape sequences tabulator
6256 .Ql \et
6257 and newline
6258 .Ql \en
6259 are understood.
6261 .It Va NAIL_HISTFILE
6262 \*(OP If a command line editor is available then this can be set to
6263 name the (expandable) path of the location of a permanent history file.
6265 .It Va NAIL_HISTSIZE
6266 \*(OP If a command line editor is available this value restricts the
6267 amount of history entries that are saved into a set and valid
6268 .Va NAIL_HISTFILE .
6269 A value of less than 0 disables this feature;
6270 note that loading and incorporation of
6271 .Va NAIL_HISTFILE
6272 upon program startup can also be suppressed by doing this.
6273 An unset or invalid value, or 0, causes a default value to be used.
6274 Dependent on the available command line editor this will also define the
6275 number of history entries in memory;
6276 it is also editor-specific whether runtime updates of this value will be
6277 honoured.
6279 .It Va NAIL_TAIL
6280 A string to put at the end of each new message.
6281 The escape sequences tabulator
6282 .Ql \et
6283 and newline
6284 .Ql \en
6285 are understood.
6287 .It Va newfolders
6288 If this variable has the value
6289 .Ql maildir ,
6290 newly created local folders will be in Maildir format.
6292 .It Va newmail
6293 Checks for new mail in the current folder each time the prompt is
6294 printed.
6295 For IMAP mailboxes the server is then polled for new mail,
6296 which may result in delayed operation if the connection to the server is
6297 slow.
6298 A Maildir folder must be re-scanned to determine if new mail has arrived.
6300 If this variable is set to the special value
6301 .Dq nopoll
6302 an IMAP server is not actively asked for new mail, but new mail may
6303 still be detected and announced with any other IMAP command that is sent
6304 to the server.
6305 In either case the IMAP server may send notifications about messages
6306 that have been deleted on the server by another process or client.
6307 In this case,
6308 .Dq Expunged X messages
6309 is printed regardless of this variable, and message numbers may have
6310 changed.
6312 If this variable is set to the special value
6313 .Ql nopoll
6314 then a Maildir folder will not be rescanned completely, but only
6315 timestamp changes are detected.
6317 .It Va ORGANIZATION
6318 The value to put into the
6319 .Ql Organization:
6320 field of the message header.
6321 .Mx Va password
6322 .It Va password-USER@HOST , password-HOST , password
6323 \*(IN Variable chain that sets a password, which is used in case none has
6324 been given in the protocol and account-specific URL;
6325 as a last resort \*(UA will ask for a password on the user's terminal if
6326 the authentication method requires a password.
6327 Specifying passwords in a startup file is generally a security risk;
6328 the file should be readable by the invoking user only.
6329 .It Va password-USER@HOST
6330 \*(OU (see the chain above for \*(IN)
6331 Set the password for
6332 .Ql USER
6333 when connecting to
6334 .Ql HOST .
6335 If no such variable is defined for a host,
6336 the user will be asked for a password on standard input.
6337 Specifying passwords in a startup file is generally a security risk;
6338 the file should be readable by the invoking user only.
6340 .It Va pipe-TYPE/SUBTYPE
6341 When a MIME message part of type
6342 .Ql TYPE/SUBTYPE
6343 (normalized to lowercase) is displayed or quoted,
6344 its text is filtered through the value of this variable interpreted as
6345 a shell command.
6346 The special value
6347 .Ql @
6348 can be used to force interpretation of the message part as plain text, e.g.,
6349 .Ql set pipe-application/pgp-signature=@
6350 will henceforth treat signatures as plain text and display them "as is".
6351 (The same can also be achieved, in a more useful context, by using the
6352 .Ic mimetype
6353 command in conjunction with a type marker.)
6355 Also, if a shell command is prefixed with
6356 .Ql @ ,
6357 then the command will only be used to prepare the MIME message part if
6358 the message is displayed by itself, but not when multiple messages are
6359 displayed at once.
6361 Finally, if a shell command is prefixed with
6362 .Ql @& ,
6363 then, in addition to what has been described for the plain
6364 .Ql @
6365 shell command prefix, the command will be run asynchronously, i.e.,
6366 without blocking \*(UA, which may be a handy way to display a, e.g., PDF
6367 file while also continuing to read the mail message.
6368 Some information about the MIME part to be displayed is embedded into
6369 the environment of the shell command:
6371 .Bl -tag -compact -width ".It Ev _AIL__ILENAME__ENERATED"
6373 .It Ev NAIL_TMPDIR
6374 The temporary directory that \*(UA uses.
6375 Usually identical to
6376 .Ev TMPDIR ,
6377 but guaranteed to be set and usable by child processes;
6378 to ensure the latter condition for
6379 .Ev \&\&TMPDIR
6380 also, it'll be set.
6382 .It Ev NAIL_FILENAME
6383 The filename, if any is set, the empty string otherwise.
6385 .It Ev NAIL_FILENAME_GENERATED
6386 A random string.
6388 .It Ev NAIL_CONTENT
6389 The MIME content-type of the part, if known, the empty string otherwise.
6391 .It Ev NAIL_CONTENT_EVIDENCE
6393 .Va mime-counter-evidence
6394 includes the carry-around-bit (2), then this will be set to the detected
6395 MIME content-type; not only then identical to
6396 .Ev \&\&NAIL_CONTENT
6397 otherwise.
6400 .It Va pipe-EXTENSION
6401 This is identical to
6402 .Va pipe-TYPE/SUBTYPE
6403 except that
6404 .Ql EXTENSION
6405 (normalized to lowercase using character mappings of the ASCII charset)
6406 names a file extension, e.g.,
6407 .Ql xhtml .
6408 Handlers registered using this method take precedence.
6409 .Mx Va pop3-keepalive
6410 .It Va pop3-keepalive-USER@HOST , pop3-keepalive-HOST , pop3-keepalive
6411 \*(OP POP3 servers close the connection after a period of inactivity;
6412 the standard requires this to be at least 10 minutes,
6413 but practical experience may vary.
6414 Setting this variable to a numeric value greater than
6415 .Ql 0
6416 causes a
6417 .Ql NOOP
6418 command to be sent each value seconds if no other operation is performed.
6420 .It Va prompt
6421 The string printed when a command is accepted.
6422 Prompting may be prevented by either setting this to the null string
6423 or by setting
6424 .Pf no Va prompt .
6425 The same XSI escape sequences that are understood by the
6426 .Ic echo
6427 command may be used within
6428 .Va \&\&prompt .
6430 In addition, the following \*(UA specific additional sequences are
6431 understood:
6432 .Ql \e& ,
6433 which expands to
6434 .Dq \&?
6435 unless
6436 .Va bsdcompat
6437 is set, in which case it expands to
6438 .Dq \&& ;
6439 note that
6440 .Ql \e&\0
6441 is the default value of
6442 .Va \&\&prompt .
6443 .Ql \e? ,
6444 which will expand to
6445 .Dq 1
6446 if the last command failed and to
6447 .Dq 0
6448 otherwise,
6449 .Ql \e$ ,
6450 which will expand to the name of the currently active
6451 .Ic account ,
6452 if any, and to the empty string otherwise, and
6453 .Ql \e@ ,
6454 which will expand to the name of the currently active mailbox.
6455 (Note that the prompt buffer is size-limited, excess is cut off.)
6457 Even though
6458 .Va \&\&prompt
6459 checks for
6460 .Va headline-bidi
6461 to encapsulate the expansions of the
6462 .Ql \e$
6464 .Ql \e@
6465 escape sequences as necessary to correctly display bidirectional text,
6466 this is not true for the final string that makes up
6467 .Va \&\&prompt
6468 as such, i.e., real BIDI handling is not supported.
6470 When a newer version of the
6471 .Xr editline 3
6472 .Sx "Command line editor"
6473 is used, any escape sequence must itself be encapsulated with another
6474 escape character for usage with the
6475 .Va EL_PROMPT_ESC
6476 mechanism: \*(UA configures the control character
6477 .Ql \e01
6478 for this.
6480 .It Va quote
6481 If set, \*(UA starts a replying message with the original message
6482 prefixed by the value of the variable
6483 .Va indentprefix .
6484 Normally, a heading consisting of
6485 .Dq Fromheaderfield wrote:
6486 is printed before the quotation.
6487 If the string
6488 .Ql noheading
6489 is assigned to the
6490 .Va \&\&quote
6491 variable, this heading is omitted.
6492 If the string
6493 .Ql headers
6494 is assigned, the headers selected by the
6495 .Ic ignore Ns / Ns Ic retain
6496 commands are printed above the message body,
6497 thus
6498 .Va \&\&quote
6499 acts like an automatic
6500 .Pf ` Ic ~m Ns '
6501 .Sx "TILDE ESCAPES"
6502 command, then.
6503 If the string
6504 .Ql allheaders
6505 is assigned, all headers are printed above the message body and all MIME
6506 parts are included, making
6507 .Va \&\&quote
6508 act like an automatic
6509 .Pf ` Ic ~M Ns '
6510 command; also see
6511 .Va quote-as-attachment .
6513 .It Va quote-fold
6514 \*(OP Can be set in addition to
6515 .Va indentprefix .
6516 Setting this turns on a more fancy quotation algorithm in that leading
6517 quotation characters are compressed and overlong lines are folded.
6518 .Va \&\&quote-fold
6519 can be set to either one or two (space separated) numeric values,
6520 which are interpreted as the maximum (goal) and the minimum line length,
6521 respectively, in a spirit rather equal to the
6522 .Xr fmt 1
6523 program, but line-, not paragraph-based.
6524 If not set explicitly the minimum will reflect the goal algorithmically.
6525 The goal can't be smaller than the length of
6526 .Va indentprefix
6527 plus some additional pad.
6528 Necessary adjustments take place silently.
6530 .It Va record
6531 If defined, gives the pathname of the folder used to record all outgoing
6532 mail.
6533 If not defined, then outgoing mail is not saved.
6534 When saving to this folder fails the message is not sent,
6535 but instead saved to
6536 .Ev DEAD .
6538 .It Va reply_strings
6539 Can be set to a comma-separated list of (case-insensitive according to
6540 ASCII rules) strings which shall be recognized in addition to the
6541 builtin strings as
6542 .Ql Subject:
6543 reply message indicators \(en builtin are
6544 .Ql Re: ,
6545 which is mandated by RFC 5322, as well as the german
6546 .Ql Aw: .
6548 .It Va replyto
6549 A list of addresses to put into the
6550 .Ql Reply-To:
6551 field of the message header.
6552 Members of this list are handled as if they were in the
6553 .Ic alternates
6554 list.
6556 .It Va reply-to-honour
6557 Controls whether a
6558 .Ql Reply-To:
6559 header is honoured when replying to a message via
6560 .Ic reply
6562 .Ic Lreply .
6563 This is a quadoption; if set without a value it defaults to
6564 .Dq yes .
6566 .It Va screen
6567 When \*(UA initially prints the message headers it determines the number
6568 to print by looking at the speed of the terminal.
6569 The faster the terminal, the more it prints.
6570 This option overrides this calculation and specifies how many message
6571 headers are printed.
6572 This number is also used for scrolling with the
6573 .Ic z
6574 command.
6576 .It Va sendcharsets
6577 \*(OP A comma-separated list of character set names that can be used in
6578 outgoing internet mail.
6579 The value of the variable
6580 .Va charset-8bit
6581 is automatically appended to this list of character-sets.
6582 If no character set conversion capabilities are compiled into \*(UA then
6583 the only supported charset is
6584 .Va ttycharset .
6585 Also see
6586 .Va sendcharsets-else-ttycharset
6587 and refer to the section
6588 .Sx "Character sets"
6589 for the complete picture of character set conversion in \*(UA.
6591 .It Va sender
6592 An address that is put into the
6593 .Ql Sender:
6594 field of outgoing messages, quoting RFC 5322: the mailbox of the agent
6595 responsible for the actual transmission of the message.
6596 This field should normally not be used unless the
6597 .Ql From:
6598 field contains more than one address, on which case it is required.
6600 .Va \&\&sender
6601 address is handled as if it were in the
6602 .Ic alternates
6603 list.
6605 .It Va sendmail
6606 To use an alternate mail transport agent (MTA),
6607 set this option to the full pathname of the program to use.
6608 It may be necessary to set
6609 .Va sendmail-progname
6610 in addition.
6612 The MTA will be passed command line arguments from several possible
6613 sources: from the variable
6614 .Va sendmail-arguments
6615 if set, from the command line if given and the variable
6616 .Va expandargv
6617 allows their use.
6618 Argument processing of the MTA will be terminated with a
6619 .Ql --
6620 separator.
6622 The otherwise occurring implicit usage of the following MTA command line
6623 arguments can be disabled by setting the boolean option
6624 .Va sendmail-no-default-arguments
6625 (which will also disable passing
6626 .Ql --
6627 to the MTA):
6628 .Ql -i
6629 (for not treating a line with only a dot
6630 .Ql \&.
6631 character as the end of input),
6632 .Ql -m
6633 (shall the option
6634 .Va metoo
6635 be set) and
6636 .Ql -v
6637 (if the
6638 .Va verbose
6639 option is set); in conjunction with the
6640 .Fl r
6641 command line option \*(UA will also pass
6642 .Ql -f
6643 as well as
6644 .Ql -F .
6646 .It Va sendmail-arguments
6647 Arguments to pass through to the Mail-Transfer-Agent can be given via
6648 this option.
6649 The content of this variable will be split up in a vector of arguments
6650 which will be joined onto other possible MTA options:
6652 .Dl set sendmail-arguments='-t -X \&"/tmp/my log\&"'
6654 .It Va sendmail-no-default-arguments
6655 \*(BY Unless this option is set \*(UA will pass some well known
6656 standard command line options to the defined
6657 .Va sendmail
6658 program, see there for more.
6660 .It Va sendmail-progname
6661 Many systems use a so-called
6662 .Xr mailwrapper 8
6663 environment to ensure compatibility with
6664 .Xr sendmail 1 .
6665 This works by inspecting the name that was used to invoke the mail
6666 delivery system.
6667 If this variable is set then the mailwrapper (the program that is
6668 actually executed when calling
6669 .Dq sendmail )
6670 will treat its contents as that name.
6671 The default is
6672 .Ql sendmail .
6674 .It Va Sign
6675 A string for use with the
6676 .Ic ~A
6677 tilde escape.
6679 .It Va sign
6680 A string for use with the
6681 .Ic ~a
6682 tilde escape.
6684 .It Va signature
6685 Must correspond to the name of a readable file if set.
6686 The file's content is then appended to each singlepart message
6687 and to the first part of each multipart message.
6688 Be warned that there is no possibility to edit the signature for an
6689 individual message.
6691 .It Va smime-ca-dir
6692 \*(OP Specifies a directory with CA certificates in PEM (Privacy
6693 Enhanced Mail) format for verification of S/MIME signed messages.
6695 .It Va smime-ca-file
6696 \*(OP Specifies a file with CA certificates in PEM format for
6697 verification of S/MIME signed messages.
6698 .Mx Va smime-cipher
6699 .It Va smime-cipher-USER@HOST , smime-cipher
6700 \*(OP Specifies the cipher to use when generating S/MIME encrypted
6701 messages (for the specified account).
6702 RFC 5751 mandates a default of
6703 .Ql aes128
6704 (AES-128 CBC).
6705 Possible values are (case-insensitive and) in decreasing cipher strength:
6706 .Ql aes256
6707 (AES-256 CBC),
6708 .Ql aes192
6709 (AES-192 CBC),
6710 .Ql aes128
6711 (AES-128 CBC),
6712 .Ql des3
6713 (DES EDE3 CBC, 168 bits; default if
6714 .Ql aes128
6715 isn't available) and
6716 .Ql des
6717 (DES CBC, 56 bits).
6719 The actually available cipher algorithms depend on the cryptographic
6720 library that \*(UA uses.
6721 \*(OP Support for more cipher algorithms may be available through
6722 dynamic loading via, e.g.,
6723 .Xr EVP_get_cipherbyname 3
6724 (OpenSSL) if \*(UA has been compiled to support this.
6726 .It Va smime-crl-dir
6727 \*(OP Specifies a directory that contains files with CRLs in PEM format
6728 to use when verifying S/MIME messages.
6730 .It Va smime-crl-file
6731 \*(OP Specifies a file that contains a CRL in PEM format to use when
6732 verifying S/MIME messages.
6734 .It Va smime-encrypt-USER@HOST
6735 \*(OP If this variable is set, messages send to the given receiver are
6736 encrypted before sending.
6737 The value of the variable must be set to the name of a file that
6738 contains a certificate in PEM format.
6740 If a message is sent to multiple recipients,
6741 each of them for whom a corresponding variable is set will receive an
6742 individually encrypted message;
6743 other recipients will continue to receive the message in plain text
6744 unless the
6745 .Va smime-force-encryption
6746 variable is set.
6747 It is recommended to sign encrypted messages, i.e., to also set the
6748 .Va smime-sign
6749 variable.
6750 .Mx Va smime-sign-cert
6751 .It Va smime-sign-cert-USER@HOST , smime-sign-cert
6752 \*(OP Points to a file in PEM format.
6753 For the purpose of signing and decryption this file needs to contain the
6754 user's private key as well as his certificate.
6756 For message signing
6757 .Ql USER@HOST
6758 is always derived from the value of
6759 .Va from
6760 (or, if that contains multiple addresses,
6761 .Va sender ) .
6762 For the purpose of encryption the recipient's public encryption key
6763 (certificate) is expected; the command
6764 .Ic certsave
6765 can be used to save certificates of signed messages (the section
6766 .Sx "Signed and encrypted messages with S/MIME"
6767 gives some details).
6768 This mode of operation is usually driven by the specialized form.
6770 When decrypting messages the account is derived from the recipient
6771 fields
6772 .Pf ( Ql To:
6774 .Ql Cc: )
6775 of the message, which are searched for addresses for which such
6776 a variable is set.
6777 \*(UA always uses the first address that matches,
6778 so if the same message is sent to more than one of the user's addresses
6779 using different encryption keys, decryption might fail.
6780 .Mx Va smime-sign-include-certs
6781 .It Va smime-sign-include-certs-USER@HOST , smime-sign-include-certs
6782 \*(OP If used, this is supposed to a consist of a comma-separated list
6783 of files, each of which containing a single certificate in PEM format to
6784 be included in the S/MIME message in addition to the
6785 .Va smime-sign-cert
6786 certificate.
6787 This is most useful for long certificate chains if it is desired to aid
6788 the receiving party's verification process.
6789 Note that top level certificates may also be included in the chain but
6790 don't play a role for verification.
6791 Also see
6792 .Va smime-sign-cert .
6793 Remember that for this
6794 .Ql USER@HOST
6795 refers to the variable
6796 .Va from
6797 (or, if that contains multiple addresses,
6798 .Va sender ) .
6799 .Mx Va smime-sign-message-digest
6800 .It Va smime-sign-message-digest-USER@HOST , smime-sign-message-digest
6801 \*(OP Specifies the message digest to use when signing S/MIME messages.
6802 RFC 5751 mandates a default of
6803 .Ql sha1 .
6804 Possible values are (case-insensitive and) in decreasing cipher strength:
6805 .Ql sha512 ,
6806 .Ql sha384 ,
6807 .Ql sha256 ,
6808 .Ql sha224
6810 .Ql md5 .
6812 The actually available message digest algorithms depend on the
6813 cryptographic library that \*(UA uses.
6814 \*(OP Support for more message digest algorithms may be available
6815 through dynamic loading via, e.g.,
6816 .Xr EVP_get_digestbyname 3
6817 (OpenSSL) if \*(UA has been compiled to support this.
6818 Remember that for this
6819 .Ql USER@HOST
6820 refers to the variable
6821 .Va from
6822 (or, if that contains multiple addresses,
6823 .Va sender ) .
6825 .It Va smtp
6826 \*(OP Normally \*(UA invokes the program defined via
6827 .Va sendmail
6828 to transfer messages, as described in
6829 .Sx "Sending mail" .
6830 Setting the
6831 .Va \&\&smtp
6832 variable will instead cause SMTP network connections be made to the
6833 server specified therein in order to directly submit the message.
6834 \*(UA knows about three different
6835 .Dq SMTP protocols :
6837 .Bl -bullet -compact
6839 The plain SMTP protocol (RFC 5321) that normally lives on the
6840 server port 25 and requires setting the
6841 .Va smtp-use-starttls
6842 variable to enter a SSL/TLS encrypted session state.
6843 Assign a value like \*(IN
6844 .Ql [smtp://][user[:password]@]server[:port]
6845 (\*(OU
6846 .Ql [smtp://]server[:port] )
6847 to choose this protocol.
6849 Then the so-called SMTPS which is supposed to live on server port 465
6850 and is automatically SSL/TLS secured.
6851 Unfortunately it never became a standardized protocol and may thus not
6852 be supported by your hosts network service database
6853 \(en in fact the port number has already been reassigned to other
6854 protocols!
6856 SMTPS is nonetheless a commonly offered protocol and thus can be
6857 chosen by assigning a value like \*(IN
6858 .Ql smtps://[user[:password]@]server[:port]
6859 (\*(OU
6860 .Ql smtps://server[:port] ) ;
6861 due to the mentioned problems it is usually necessary to explicitly
6862 specify the port as
6863 .Ql :465 ,
6864 however.
6866 Finally there is the SUBMISSION protocol (RFC 6409), which usually
6867 lives on server port 587 and is practically identically to the SMTP
6868 protocol from \*(UAs point of view beside that; it requires setting the
6869 .Va smtp-use-starttls
6870 variable to enter a SSL/TLS secured session state.
6871 Assign a value like \*(IN
6872 .Ql submission://[user[:password]@]server[:port]
6873 (\*(OU
6874 .Ql submission://server[:port] ) .
6877 For more on credentials etc. please see
6878 .Sx "On URL syntax and credential lookup" .
6879 The SMTP transfer is executed in a child process, which runs
6880 asynchronously unless either the
6881 .Va sendwait
6882 or the
6883 .Va verbose
6884 variable is set.
6885 If it receives a TERM signal, it will abort and save the message to
6886 .Ev DEAD .
6887 .Mx Va smtp-auth
6888 .It Va smtp-auth-USER@HOST , smtp-auth-HOST , smtp-auth
6889 \*(OP Variable chain that sets the SMTP authentication method.
6890 Possible values are
6891 .Ql none
6892 (\*(OU default),
6893 .Ql plain
6894 (\*(IN default),
6895 .Ql login
6896 as well as the \*(OPal methods
6897 .Ql cram-md5
6899 .Ql gssapi .
6901 .Ql none
6902 method doesn't need any user credentials,
6903 .Ql gssapi
6904 requires a user name and all other methods require a user name and
6905 a password.
6906 See \*(IN
6907 .Va smtp ,
6908 .Va user
6910 .Va password
6911 (\*(OU
6912 .Va smtp-auth-password
6914 .Va smtp-auth-user ) .
6915 Note that
6916 .Va smtp-auth-HOST
6917 is \*(IN.
6918 \*(OU: Note for
6919 .Va smtp-auth-USER@HOST :
6920 may override dependend on sender address in the variable
6921 .Va from .
6922 .It Va smtp-auth-password
6923 \*(OP \*(OU Sets the global fallback password for SMTP authentication.
6924 If the authentication method requires a password, but neither
6925 .Va smtp-auth-password
6926 nor a matching
6927 .Va smtp-auth-password-USER@HOST
6928 can be found,
6929 \*(UA will ask for a password on the user's terminal.
6930 .It Va smtp-auth-password-USER@HOST
6931 \*(OU Overrides
6932 .Va smtp-auth-password
6933 for specific values of sender addresses, dependent upon the variable
6934 .Va from .
6935 .It Va smtp-auth-user
6936 \*(OP \*(OU Sets the global fallback user name for SMTP authentication.
6937 If the authentication method requires a user name, but neither
6938 .Va smtp-auth-user
6939 nor a matching
6940 .Va smtp-auth-user-USER@HOST
6941 can be found,
6942 \*(UA will ask for a user name on the user's terminal.
6943 .It Va smtp-auth-user-USER@HOST
6944 \*(OU Overrides
6945 .Va smtp-auth-user
6946 for specific values of sender addresses, dependent upon the variable
6947 .Va from .
6949 .It Va smtp-hostname
6950 \*(IN Normally \*(UA uses the variable
6951 .Va from
6952 to derive the necessary
6953 .Ql USER@HOST
6954 information to issue a
6955 .Ql MAIL FROM:<>
6956 SMTP command.
6957 Setting
6958 .Va smtp-hostname
6959 can be used to use the
6960 .Ql USER
6961 from the SMTP account
6962 .Pf ( Va smtp
6963 or the
6964 .Va user
6965 variable chain)
6966 and the
6967 .Ql HOST
6968 from the content of this variable (or, if that is the empty string,
6969 .Va hostname
6970 or the local hostname as a last resort).
6971 This often allows using an address that is itself valid but hosted by
6972 a provider other than which (in
6973 .Va from )
6974 is about to send the message.
6975 Setting this variable also influences the generated
6976 .Ql Message-ID: .
6978 .It Va spam-interface
6979 \*(OP In order to use any of the spam-related commands (like, e.g.,
6980 .Ic spamrate )
6981 the desired spam interface must be defined by setting this variable.
6982 Please refer to the manual section
6983 .Sx "Handling spam"
6984 for the complete picture of spam handling in \*(UA.
6985 All or none of the following interfaces may be available:
6986 .Bl -tag -width ".It Ql _ilte_"
6987 .It Ql spamc
6988 Interaction with
6989 .Xr spamc 1
6990 from the
6991 .Xr spamassassin 1
6992 .Pf ( Lk http://spamassassin.apache.org SpamAssassin )
6993 suite.
6994 Different to the generic filter interface \*(UA will automatically add
6995 the correct arguments for a given command and has the necessary
6996 knowledge to parse the program's output.
6997 A default value for
6998 .Va spamc-command
6999 will have been compiled into the \*(UA binary if
7000 .Xr spamc 1
7001 has been found in
7002 .Ev PATH
7003 during compilation.
7004 Shall it be necessary to define a specific connection type (rather than
7005 using a configuration file for that), the variable
7006 .Va spamc-arguments
7007 can be used as in, e.g.,
7008 .Ql -d server.example.com -p 783 .
7009 It is also possible to specify a per-user configuration via
7010 .Va spamc-user .
7011 Note that this interface doesn't inspect the
7012 .Ql is-spam
7013 flag of a message for the command
7014 .Ic spamforget .
7015 .It Ql spamd
7016 \*(UA will directly communicate with the
7017 .Xr spamassassin 1
7018 daemon
7019 .Xr spamd 1
7020 via a path-based
7021 .Xr unix 4
7022 stream socket as specified in
7023 .Va spamd-socket .
7024 It is possible to specify a per-user configuration via
7025 .Va spamd-user .
7026 .It Ql filter
7027 generic spam filter support via freely configurable hooks.
7028 This interface is ment for programs like
7029 .Xr bogofilter 1
7031 .Xr sylfilter 1
7032 and requires according behaviour in respect to the hooks' exit
7033 status for at least the command
7034 .Ic spamrate
7035 .Pf ( Ql 0
7036 meaning a message is spam,
7037 .Ql 1
7038 for non-spam,
7039 .Ql 2
7040 for unsure and any other return value indicating a hard error);
7041 since the hooks can include shell code snippets diverting behaviour
7042 can be intercepted as necessary.
7043 The hooks are
7044 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
7045   spamfilter-rate
7047 .Va spamfilter-spam ;
7048 the manual section
7049 .Sx "Handling spam"
7050 contains examples for some programs.
7051 The process environment of the hooks will have the variables
7052 .Ev NAIL_TMPDIR , TMPDIR
7054 .Ev NAIL_FILENAME_GENERATED
7055 set.
7056 Note that spam score support for
7057 .Ic spamrate
7058 isn't supported unless the \*(OPtional regular expression support is
7059 available and the
7060 .Va spamfilter-rate-scanscore
7061 variable is set.
7064 .It Va spam-maxsize
7065 \*(OP Messages that exceed this size won't be passed through to the
7066 configured
7067 .Va spam-interface .
7068 The default is 420000 bytes.
7070 .It Va spamc-command
7071 \*(OP The path to the
7072 .Xr spamc 1
7073 program for the
7074 .Ql spamc
7075 .Va spam-interface .
7076 Note that the path is not expanded, but used
7077 .Dq as is .
7078 A fallback path will have been compiled into the \*(UA binary if the
7079 executable had been found during compilation.
7081 .It Va spamc-arguments
7082 \*(OP Even though \*(UA deals with most arguments for the
7083 .Ql spamc
7084 .Va spam-interface
7085 automatically, it may at least sometimes be desirable to specifiy
7086 connection-related ones via this variable, e.g.,
7087 .Ql -d server.example.com -p 783 .
7089 .It Va spamc-user
7090 \*(OP Specify a username for per-user configuration files for the
7091 .Ql spamc
7092 .Va spam-interface .
7093 If this is set to the empty string then \*(UA will use the name of the
7094 current
7095 .Va user .
7097 .It Va spamd-socket
7098 \*(OP Specify the path of the
7099 .Xr unix 4
7100 domain socket on which
7101 .Xr spamd 1
7102 listens for connections for the
7103 .Ql spamd
7104 .Va spam-interface .
7105 Note that the path is not expanded, but used
7106 .Dq as is .
7108 .It Va spamd-user
7109 \*(OP Specify a username for per-user configuration files for the
7110 .Ql spamd
7111 .Va spam-interface .
7112 If this is set to the empty string then \*(UA will use the name of the
7113 current
7114 .Va user .
7120 .It Va spamfilter-ham , spamfilter-noham , \
7121   spamfilter-nospam , spamfilter-rate , spamfilter-spam
7122 \*(OP Command and argument hooks for the
7123 .Ql filter
7124 .Va spam-interface .
7125 The manual section
7126 .Sx "Handling spam"
7127 contains examples for some programs.
7129 .It Va spamfilter-rate-scanscore
7130 \*(OP Because of the generic nature of the
7131 .Ql filter
7132 .Va spam-interface
7133 spam scores are not supported for it by default, but if the \*(OPtional
7134 regular expression support is available then setting this variable can
7135 be used to overcome this restriction.
7136 It is interpreted as follows: first a number (digits) is parsed that
7137 must be followed by a semicolon
7138 .Ql \&;
7139 and a regular expression.
7140 Then the latter is used to parse the first output line of the
7141 .Va spamfilter-rate
7142 hook, and, in case the evaluation is successful, the group that has been
7143 specified via the number is interpreted as a floating point scan score.
7145 .It Va ssl-ca-dir
7146 \*(OP Specifies a directory with CA certificates in PEM (Pricacy
7147 Enhanced Mail) for verification of of SSL/TLS server certificates.
7149 .Xr SSL_CTX_load_verify_locations 3
7150 for more information.
7152 .It Va ssl-ca-file
7153 \*(OP Specifies a file with CA certificates in PEM format for
7154 verification of SSL/TLS server certificates.
7156 .Xr SSL_CTX_load_verify_locations 3
7157 for more information.
7158 .Mx Va ssl-cert
7159 .It Va ssl-cert-USER@HOST , ssl-cert-HOST , ssl-cert
7160 \*(OP Variable chain that sets the file name for a SSL/TLS client
7161 certificate required by some servers.
7162 This is a direct interface to the
7163 .Ql Certificate
7164 slot of the
7165 .Xr SSL_CONF_cmd 3
7166 function of the OpenSSL library, if available.
7167 .Mx Va ssl-cipher-list
7168 .It Va ssl-cipher-list-USER@HOST , ssl-cipher-list-HOST , ssl-cipher-list
7169 \*(OP Specifies a list of ciphers for SSL/TLS connections.
7170 This is a direct interface to the
7171 .Ql CipherString
7172 slot of the
7173 .Xr SSL_CONF_cmd 3
7174 function of the OpenSSL library, if available; see
7175 .Xr ciphers 1
7176 for more information.
7177 By default \*(UA doesn't set a list of ciphers, which in effect will use a
7178 .Va ssl-protocol
7179 specific cipher (protocol standards ship with a list of acceptable
7180 ciphers), possibly cramped to what the actually used SSL/TLS library
7181 supports \(en the manual section
7182 .Sx "An example configuration"
7183 also contains a SSL/TLS use case.
7185 .It Va ssl-config-file
7186 \*(OP If this variable is set \*(UA will call
7187 .Xr CONF_modules_load_file 3
7188 to allow OpenSSL to be configured according to the host system wide
7189 security settings.
7190 If a non-empty value is given then this will be used to specify the
7191 configuration file to be used instead of the global OpenSSL default;
7192 note that in this case it is an error if the file cannot be loaded.
7193 The application name will always be passed as
7194 .Dq \*(ua .
7196 .It Va ssl-crl-file
7197 \*(OP Specifies a file that contains a CRL in PEM format to use when
7198 verifying SSL/TLS server certificates.
7200 .It Va ssl-crl-dir
7201 \*(OP Specifies a directory that contains files with CRLs in PEM format
7202 to use when verifying SSL/TLS server certificates.
7203 .Mx Va ssl-key
7204 .It Va ssl-key-USER@HOST , ssl-key-HOST , ssl-key
7205 \*(OP Variable chain that sets the file name for the private key of
7206 a SSL/TLS client certificate.
7207 If unset, the name of the certificate file is used.
7208 The file is expected to be in PEM format.
7209 This is a direct interface to the
7210 .Ql PrivateKey
7211 slot of the
7212 .Xr SSL_CONF_cmd 3
7213 function of the OpenSSL library, if available.
7214 .Mx Va ssl-method
7215 .It Va ssl-method-USER@HOST , ssl-method-HOST , ssl-method
7216 \*(OP
7217 \*(OB Please use the newer and more flexible
7218 .Va ssl-protocol
7219 instead: if both values are set,
7220 .Va ssl-protocol
7221 will take precedence!
7222 Can be set to the following values, the actually used
7223 .Va ssl-protocol
7224 specification to which it is mapped is shown in parenthesis:
7225 .Ql tls1.2
7226 .Pf ( Ql -ALL, TLSv1.2 ) ,
7227 .Ql tls1.1
7228 .Pf ( Ql -ALL, TLSv1.1 ) ,
7229 .Ql tls1
7230 .Pf ( Ql -ALL, TLSv1 )
7232 .Ql ssl3
7233 .Pf ( Ql -ALL, SSLv3 ) ;
7234 the special value
7235 .Ql auto
7236 is mapped to
7237 .Ql ALL, -SSLv2
7238 and thus includes the SSLv3 protocol.
7239 Note that SSLv2 is no longer supported at all.
7240 .Mx Va ssl-protocol
7241 .It Va ssl-protocol-USER@HOST , ssl-protocol-HOST , ssl-protocol
7242 \*(OP Specify the used SSL/TLS protocol.
7243 This is a direct interface to the
7244 .Ql Protocol
7245 slot of the
7246 .Xr SSL_CONF_cmd 3
7247 function of the OpenSSL library, if available;
7248 otherwise an \*(UA internal parser is used which understands the
7249 following subset of (case-insensitive) command strings:
7250 .Ql SSLv3 ,
7251 .Ql TLSv1 ,
7252 .Ql TLSv1.1
7254 .Ql TLSv1.2 ,
7255 as well as the special value
7256 .Ql ALL .
7257 Multiple specifications may be given via a comma-separated list which
7258 ignores any whitespace.
7259 An optional
7260 .Ql +
7261 plus prefix will enable a protocol, a
7262 .Ql -
7263 minus prefix will disable it, so that
7264 .Ql -ALL, TLSv1.2
7265 will enable only the TLSv1.2 protocol.
7267 It depends upon the used TLS/SSL library which protocols are actually
7268 supported and which protocols are used if
7269 .Va ssl-protocol
7270 is not set, but note that SSLv2 is no longer supported at all and
7271 actively disabled.
7272 Especially for older protocols explicitly securing
7273 .Va ssl-cipher-list
7274 may be worthwile, see
7275 .Sx "An example configuration" .
7277 .It Va ssl-rand-egd
7278 \*(OP Gives the pathname to an entropy daemon socket, see
7279 .Xr RAND_egd 3 .
7280 Not all SSL/TLS libraries support this.
7282 .It Va ssl-rand-file
7283 \*(OP Gives the pathname to a file with entropy data, see
7284 .Xr RAND_load_file 3 .
7285 If the file is a regular file writable by the invoking user,
7286 new data is written to it after it has been loaded.
7287 .Mx Va ssl-verify
7288 .It Va ssl-verify-USER@HOST , ssl-verify-HOST , ssl-verify
7289 \*(OP Variable chain that sets the action to be performed if an error
7290 occurs during SSL/TLS server certificate validation.
7291 Valid (case-insensitive) values are
7292 .Ql strict
7293 (fail and close connection immediately),
7294 .Ql ask
7295 (ask whether to continue on standard input),
7296 .Ql warn
7297 (print a warning and continue),
7298 .Ql ignore
7299 (do not perform validation).
7300 The default is
7301 .Ql ask .
7303 .It Va stealthmua
7304 If only set without an assigned value, then this option inhibits the
7305 generation of the
7306 .Ql Message-ID:
7308 .Ql User-Agent:
7309 header fields that include obvious references to \*(UA.
7310 There are two pitfalls associated with this:
7311 First, the message id of outgoing messages is not known anymore.
7312 Second, an expert may still use the remaining information in the header
7313 to track down the originating mail user agent.
7314 If set to the value
7315 .Ql noagent ,
7316 then the mentioned
7317 .Ql Message-ID:
7318 suppression doesn't occur.
7320 .It Va toplines
7321 If defined, gives the number of lines of a message to be printed out
7322 with the top command; normally, the first five lines are printed.
7324 .It Va ttycharset
7325 The character set of the terminal \*(UA operates on,
7326 and the one and only supported character set that \*(UA can use if no
7327 character set conversion capabilities have been compiled into it,
7328 in which case it defaults to ISO-8859-1 unless it can deduce a value
7329 from the
7330 .Ev LC_CTYPE
7331 locale environment.
7332 Refer to the section
7333 .Sx "Character sets"
7334 for the complete picture about character sets.
7335 .Mx Va user
7336 .It Va user-HOST , user
7337 \*(IN Variable chain that sets a global fallback user name, which is
7338 used in case none has been given in the protocol and account-specific
7339 URL.
7340 This variable defaults to the value of
7341 .Ev USER .
7346 .It Va version , version-major , version-minor , version-update
7347 \*(RO \*(UA version information: the first variable contains a string
7348 containing the complete version identification \(en this is identical to
7349 the output of the command
7350 .Ic version .
7351 The latter three contain only digits: the major, minor and update
7352 version numbers.
7354 .Sh ENVIRONMENT
7355 The term
7356 .Dq environment variable
7357 should be considered an indication that the following variables are
7358 either standardized as being vivid parts of process environments, or
7359 are commonly found in there.
7360 Unless otherwise explicitly noted they integrate into the normal
7361 variable handling, as documented above, from \*(UAs point of view.
7362 .Bl -tag -width ".It Ev _AILR_"
7364 .It Ev COLUMNS
7365 The user's preferred width in column positions for the terminal screen
7366 or window.
7367 Queried and used once on program startup.
7369 .It Ev DEAD
7370 The name of the file to use for saving aborted messages if
7371 .Va save
7372 is set; this defaults to
7373 .Pa dead.letter
7374 in the user's
7375 .Ev HOME
7376 directory.
7378 .It Ev EDITOR
7379 Pathname of the text editor to use in the
7380 .Ic edit
7381 command and
7382 .Ic ~e
7383 .Sx "TILDE ESCAPES" .
7384 A default editor is used if this value is not defined.
7386 .It Ev HOME
7387 The user's home directory.
7388 This variable is only used when it resides in the process environment.
7390 .Ic setenv
7391 to update the value at runtime.
7397 .It Ev LANG , LC_ALL , LC_COLLATE , LC_CTYPE , LC_MESSAGES
7399 .Xr locale 7
7401 .Sx "Character sets" .
7403 .It Ev LINES
7404 The user's preferred number of lines on a page or the vertical screen
7405 or window size in lines.
7406 Queried and used once on program startup.
7408 .It Ev LISTER
7409 Pathname of the directory lister to use in the
7410 .Ic folders
7411 command when operating on local mailboxes.
7412 Default is
7413 .Xr ls 1
7414 (path search through
7415 .Ev SHELL ) .
7417 .It Ev MBOX
7418 The name of the user's mbox file.
7419 Supports a logical subset of the special conventions that are
7420 documented for the
7421 .Ic file
7422 command and the
7423 .Va folder
7424 option.
7425 The fallback default is
7426 .Pa mbox
7427 in the user's
7428 .Ev HOME
7429 directory.
7431 .It Ev MAILRC
7432 Is used as a startup file instead of
7433 .Pa \*(ur
7434 if set.
7435 When \*(UA scripts are invoked on behalf of other users,
7436 this variable should be set to
7437 .Pa /dev/null
7438 to avoid side-effects from reading their configuration files.
7439 This variable is only used when it resides in the process environment.
7441 .It Ev NAIL_NO_SYSTEM_RC
7442 If this variable is set then reading of
7443 .Pa \*(UR
7444 at startup is inhibited, i.e., the same effect is achieved as if \*(UA
7445 had been started up with the option
7446 .Fl n .
7447 This variable is only used when it resides in the process environment.
7449 .It Ev NETRC
7450 \*(IN \*(OP This variable overrides the default location of the user's
7451 .Pa .netrc
7452 file.
7454 .It Ev PAGER
7455 Pathname of the program to use in the more command or when the
7456 .Va crt
7457 variable is set.
7458 The default paginator is
7459 .Xr more 1
7460 (path search through
7461 .Ev SHELL ) .
7463 .It Ev PATH
7464 A list of directories that is searched by the shell when looking for
7465 commands (as such only recognized in the process environment).
7467 .It Ev SHELL
7468 The shell to use for the commands
7469 .Ic \&! ,
7470 .Ic shell ,
7472 .Ic ~!
7473 .Sx "TILDE ESCAPES"
7474 and when starting subprocesses.
7475 A default shell is used if this option is not defined.
7477 .It Ev SYSV3
7478 Changes the letters printed in the first column of a header summary.
7480 .It Ev TERM
7481 \*(OP The terminal type for which output is to be prepared.
7483 .It Ev TMPDIR
7484 Used as directory for temporary files instead of
7485 .Pa /tmp ,
7486 if set.
7487 This variable is only used when it resides in the process environment.
7489 .Ic setenv
7490 to update the value at runtime.
7492 .It Ev USER
7493 Force identification as the given user, i.e., identical to the
7494 .Fl u
7495 command line option.
7496 This variable is only used when it resides in the process environment.
7498 .Ic setenv
7499 to update the value at runtime, but note that doing so won't trigger any
7500 of those validation checks that were performed on program startup (again).
7502 .It Ev VISUAL
7503 Pathname of the text editor to use in the
7504 .Ic visual
7505 command and
7506 .Ic ~v
7507 .Sx "TILDE ESCAPES" .
7509 .Sh FILES
7510 .Bl -tag -width ".It Pa _etc/mime.type_"
7511 .It Pa \*(ur
7512 File giving initial commands.
7513 .It Pa \*(UR
7514 System wide initialization file.
7516 .It Pa ~/.mime.types
7517 Personal MIME types, see
7518 .Sx "The mime.types files" .
7520 .It Pa /etc/mime.types
7521 System wide MIME types, see
7522 .Sx "The mime.types files" .
7524 .It Pa ~/.netrc
7525 \*(IN \*(OP The default location of the users
7526 .Pa .netrc
7527 file \(en the section
7528 .Sx "The .netrc file"
7529 documents the file format.
7531 .Ss "The mime.types files"
7532 When sending messages \*(UA tries to determine the content type of all
7533 attachments.
7534 When displaying message content or attachments \*(UA uses the content
7535 type to decide whether it can directly display data or whether it needs to
7536 deal with content handlers, as can be defined via
7537 .Va pipe-TYPE/SUBTYPE
7538 (and
7539 .Va pipe-EXTENSION )
7540 variables, to do so.
7542 It learns about MIME types and how to treat them by reading
7543 .Pa mime.types
7544 files, the loading of which can be controlled by setting the variable
7545 .Va mimetypes-load-control .
7546 (The command
7547 .Ic mimetype
7548 can also be used to deal with MIME types.)
7549 .Pa mime.types
7550 files have the following syntax:
7552 .Dl type/subtype extension [extension ...]
7554 where
7555 .Ql type/subtype
7556 are strings describing the file contents, and one or multiple
7557 .Ql extension Ns
7558 s, separated by whitespace, name the part of a filename starting after
7559 the last dot (of interest).
7560 Comments may be introduced anywhere on a line with a number sign
7561 .Ql # ,
7562 causing the remaining line to be discarded.
7563 \*(UA also supports an extended, non-portable syntax in specially
7564 crafted files, which can be loaded via the alternative value syntax of
7565 .Va mimetypes-load-control
7566 and prepends an optional
7567 .Ql type-marker :
7569 .Dl [type-marker ]type/subtype extension [extension ...]
7571 The following type markers are supported:
7573 .Bl -tag -compact -offset indent -width ".It Ar _n_u"
7574 .It Ar @
7575 Treat message parts with this content as plain text.
7576 .It Ar @t@
7577 The same as plain
7578 .Ar @ .
7579 .It Ar @h@
7580 Treat message parts with this content as HTML tagsoup.
7581 If the \*(OPal HTML-tagsoup-to-text converter is not available treat
7582 the content as plain text instead.
7583 .It Ar @H@
7584 Likewise
7585 .Ar @h@
7586 but instead of falling back to plain text require an explicit content
7587 handler to be defined.
7590 Further reading:
7591 for sending messages:
7592 .Va mime-allow-text-controls .
7593 For reading etc. messages:
7594 .Sx "Viewing HTML mail and MIME attachments" ,
7595 .Va mime-counter-evidence ,
7596 .Va pipe-TYPE/SUBTYPE ,
7597 .Va pipe-EXTENSION .
7598 .Ss "The .netrc file"
7600 .Pa .netrc
7601 file contains user credentials for machine accounts.
7602 The default location in the user's
7603 .Ev HOME
7604 directory may be overridden by the
7605 .Ev NETRC
7606 environment variable.
7607 The file consists of space, tabulator or newline separated tokens.
7608 \*(UA implements a parser that supports a superset of the original BSD
7609 syntax, but users should nonetheless be aware of portability glitches
7610 of that file format, shall their
7611 .Pa .netrc
7612 be usable across multiple programs and platforms:
7614 .Bl -bullet -compact
7616 BSD doesn't support single, but only double quotation marks, e.g.,
7617 .Ql password="pass with spaces" .
7619 BSD (only?) supports escaping of single characters via a backslash
7620 (e.g., a space can be escaped via
7621 .Ql \e\0 ) ,
7622 in- as well as outside of a quoted string.
7624 BSD doesn't require the final quotation mark of the final user input token.
7626 At least Hewlett-Packard seems to support a format which also allows
7627 tokens to be separated with commas \(en this format is not supported!
7629 Whereas other programs may require that the
7630 .Pa .netrc
7631 file is accessible by only the user if it contains a
7632 .Cd password
7633 token for any other
7634 .Cd login
7635 than
7636 .Dq anonymous ,
7637 \*(UA will always require these strict permissions.
7640 Of the following list of supported tokens \*(UA only uses (and caches)
7641 .Cd machine ,
7642 .Cd login
7644 .Cd password :
7645 .Bl -tag -width password
7646 .It Cd machine Ar name
7647 The hostname of the entries' machine, lowercase-normalized by \*(UA
7648 before use.
7649 Any further file content, until either end-of-file or the occurrence
7650 of another
7651 .Cd machine
7652 or a
7653 .Cd default
7654 first-class token is bound (only related) to the machine
7655 .Ar name .
7657 As an extension that shouldn't be the cause of any worries
7658 \*(UA supports a single wildcard prefix for
7659 .Ar name :
7660 .Bd -literal -offset indent
7661 machine *.example.com login USER password PASS
7662 machine pop3.example.com login USER password PASS
7663 machine smtp.example.com login USER password PASS
7666 which would match
7667 .Ql xy.example.com
7668 as well as
7669 .Ql pop3.example.com ,
7670 but neither
7671 .Ql example.com
7673 .Ql local.smtp.example.com .
7674 Note that in the example neither
7675 .Ql pop3.example.com
7677 .Ql smtp.example.com
7678 will be matched by the wildcard, since the exact matches take
7679 precedence (it is however faster to specify it the other way around).
7680 .It Cd default
7681 This is the same as
7682 .Cd machine
7683 except that it is a fallback entry that is used shall none of the
7684 specified machines match; only one default token may be specified,
7685 and it must be the last first-class token.
7686 .It Cd login Ar name
7687 The user name on the remote machine.
7688 .It Cd password Ar string
7689 The user's password on the remote machine.
7690 .It Cd account Ar string
7691 Supply an additional account password.
7692 This is merely for FTP purposes.
7693 .It Cd macdef Ar name
7694 Define a macro.
7695 A macro is defined with the specified
7696 .Ar name ;
7697 it is formed from all lines beginning with the next line and continuing
7698 until a blank line is (consecutive newline characters are) encountered.
7699 (Note that
7700 .Cd macdef
7701 entries cannot be utilized by multiple machines, too, but must be
7702 defined following the
7703 .Ic machine
7704 they are intended to be used with.)
7705 If a macro named
7706 .Ar init
7707 exists, it is automatically run as the last step of the login process.
7708 This is merely for FTP purposes.
7710 .Sh EXAMPLES
7711 .Ss "An example configuration"
7712 .Bd -literal -offset indent
7713 # This example assumes v15.0 compatibility mode
7714 set v15-compat
7716 # Where are the up-to-date SSL certificates?
7717 #set ssl-ca-dir=/etc/ssl/certs
7718 set ssl-ca-file=/etc/ssl/certs/ca-certificates.crt
7720 # (Since we manage up-to-date ones explicitly, don't use any,
7721 # possibly outdated, default certificates shipped with OpenSSL
7722 set ssl-no-default-ca
7724 # Don't use protocols olders than TLS v1.2.
7725 # Change this only when the remote server doesn't support it:
7726 # maybe use ssl-protocol-HOST (or -USER@HOST) syntax to define
7727 # such explicit exceptions, then
7728 set ssl-protocol="-ALL,+TLSv1.2"
7730 # Explicitly define the list of ciphers, which may improve security,
7731 # especially with protocols older than TLS v1.2.  See ciphers(1).
7732 # Hint: it is important to include "@STRENGTH": only with it the
7733 # final list will be sorted by algorithm strength.
7734 # This is an example: in reality it is possibly best to only use
7735 # ssl-cipher-list-HOST (or -USER@HOST), as necessary, again..
7736 set ssl-cipher-list="ALL:!aNULL:!MEDIUM:!LOW:\e
7737     !MD5:!RC4:!EXPORT:@STRENGTH"
7739 # Request strict transport security checks!
7740 set ssl-verify=strict
7742 # Essential setting: select allowed character sets
7743 set sendcharsets=utf-8,iso-8859-1
7745 # A very kind option: when replying to a message, first try to
7746 # use the same encoding that the original poster used herself!
7747 set reply-in-same-charset
7749 # When replying to or forwarding a message the comment and name
7750 # parts of email addresses are removed unless this variable is set
7751 set fullnames
7753 # When sending messages, wait until the Mail-Transfer-Agent finishs.
7754 # Only like this you'll be able to see errors reported through the
7755 # exit status of the MTA (including the builtin SMTP one)!
7756 set sendwait
7758 # Only use builtin MIME types, no mime.types(5) files
7759 set mimetypes-load-control
7761 # Default directory where we act in (relative to $HOME)
7762 set folder=mail MBOX=+mbox.mbox record=+sent.mbox \e
7763     DEAD=+dead.mbox
7765 # Make "file mymbox" and "file myrec" go to..
7766 shortcut mymbox %:+mbox.mbox myrec +sent.mbox
7768 # Not really optional, e.g., for S/MIME
7769 set from="Your Name <youremail@domain>"
7771 # It may be necessary to set hostname and/or smtp-hostname
7772 # if the "SERVER" of smtp and "domain" of from don't match.
7773 # The `urlencode' command can be used to encode USER and PASS
7774 set smtp=(smtp[s]/submission)://[USER[:PASS]@]SERVER[:PORT] \e
7775     smtp-auth=login/plain... \e
7776     smtp-use-starttls
7778 # Never refuse to start into interactive mode, and more
7779 set emptystart \e
7780     colour-pager crt= followup-to followup-to-honour=ask-yes \e
7781     history-gabby mime-counter-evidence=6 \e
7782     prompt="\e033[31m?\e?[\e$ \e@]\e& \e033[0m" \e
7783     NAIL_HISTFILE=+.s-nailhist NAIL_HISTSIZE=-1 \e
7784     reply-to-honour=ask-yes
7786 # When `p'rinting messages, show only these headers
7787 # (use `P'rint for all headers and `S'how for raw message)
7788 retain date from to cc subject
7790 # Some mailing lists
7791 mlist @xyz-editor.xyz$ @xyzf.xyz$
7792 mlsubscribe ^xfans@xfans.xyz$
7794 # A real life example of a very huge free mail provider
7795 account XooglX {
7796   localopts yes
7797   set from="Your Name <youremail@domain>"
7798   # (The plain smtp:// proto is optional)
7799   set smtp=USER:PASS@smtp.gmXil.com smtp-use-starttls
7802 # Here is a pretty large one which does not allow sending mails
7803 # if there is a domain name mismatch on the SMTP protocol level,
7804 # which would bite us if the value of from does not match, e.g.,
7805 # for people who have a sXXXXeforge project and want to speak
7806 # with the mailing list under their project account (in from),
7807 # still sending the message through their normal mail provider
7808 account XandeX {
7809   localopts true
7810   set from="Your Name <youremail@domain>"
7811   set smtp=smtps://USER:PASS@smtp.yaXXex.ru:465 \e
7812       hostname=yaXXex.com smtp-hostname=
7815 # Create some new commands so that, e.g., `ls /tmp' will..
7816 ghost l   !ls -aFtr
7817 ghost L   !ls -aFt
7818 ghost ll  !ls -aFltr
7819 ghost Ll  !ls -aFlt
7820 ghost la  !ls -aFr
7821 ghost La  !ls -aF
7822 ghost lla !ls -aFlr
7823 ghost Lla !ls -aFl
7824 ghost lS  !ls -aFrS
7825 ghost LS  !ls -aFS
7826 ghost llS !ls -aFlrS
7827 ghost LlS !ls -aFlS
7829 # We don't support gpg(1) directly yet.  But simple --clearsign'd
7830 # message parts can be dealt with as follows:
7831 define V {
7832   localopts yes
7833   set pipe-text/plain="set -C;\e
7834     : > \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e" \e
7835     trap \e"rm -f \e\e\e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e\e\e"\e" \e
7836       EXIT INT QUIT PIPE TERM;\e
7837     set +C;\e
7838     cat > \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e";\e
7839     < \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e" awk \e
7840         -v TMPFILE=\e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e" '\e
7841       BEGIN {done=0}\e
7842       /^-----BEGIN PGP SIGNED MESSAGE-----/,/^$/ {\e
7843         if (done++ != 0)\e
7844           next;\e
7845         print \e"--- GPG --verify ---\e";\e
7846         system(\e"gpg --verify \e" TMPFILE \e" 2>&1\e");\e
7847         print \e"--- GPG --verify ---\e";\e
7848         print \e"\e";\e
7849         next;\e
7850       }\e
7851       /^-----BEGIN PGP SIGNATURE-----/,\e
7852           /^-----END PGP SIGNATURE-----/ {\e
7853         next;\e
7854       }\e
7855       {print}\e
7856       '"
7857   print
7859 ghost V call V
7861 define RK {
7862   !printf 'Key IDs to gpg --recv-keys: ';\e
7863     read keyids;\e
7864     gpg --recv-keys ${keyids};
7866 ghost RK call RK
7869 When storing passwords in
7870 .Pa \*(ur
7871 appropriate permissions should be set on this file with
7872 .Ql $ chmod 0600 \*(ur .
7873 If the \*(OPal
7874 .Va netrc-lookup
7875 is available user credentials can be stored in the central
7876 .Pa .netrc
7877 file instead; e.g., here is a different version of the example account
7878 that sets up SMTP and POP3:
7879 .Bd -literal -offset indent
7880 account XandeX {
7881   localopts true
7882   set from="Your Name <youremail@domain>"
7883   set netrc-lookup
7884   #set agent-shell-lookup="gpg -d .pass.gpg"
7886   set smtp=smtps://smtp.yXXXXx.ru:465 \e
7887       smtp-hostname= hostname=yXXXXx.com
7888   set pop3-keepalive=240 pop3-no-apop-pop.yXXXXx.ru
7889   ghost xp fi pop3s://pop.yXXXXx.ru
7893 and, in the
7894 .Pa .netrc
7895 file:
7896 .Bd -literal -offset indent
7897 machine *.yXXXXx.ru login USER password PASS
7900 If the also \*(OPal
7901 .Va agent-shell-lookup
7902 is available things could be diversified further by using encrypted
7903 password storage: for this, don't specify
7904 .Ql password PASS
7905 in the
7906 .Pa .netrc
7907 file and instead uncomment the line that defines agent lookup in the
7908 example
7909 .Ic account
7910 above, then create the encrypted password storage file
7911 .Pa .pass.gpg :
7912 .Bd -literal -offset indent
7913 $ echo PASS > .pass
7914 $ gpg -e .pass
7915 $ eval `gpg-agent --daemon \e
7916         --pinentry-program=/usr/bin/pinentry-curses \e
7917         --max-cache-ttl 99999 --default-cache-ttl 99999`
7920 This configuration should now work just fine (use the
7921 .Fl d
7922 command line option for a(n almost) dry-run):
7924 .Dl $ echo text | \*(ua -vv -AXandeX -s Subject some@where
7925 .Ss "Signed and encrypted messages with S/MIME"
7926 \*(OP S/MIME provides two central mechanisms:
7927 message signing and message encryption.
7928 A signed message contains some data in addition to the regular text.
7929 The data can be used to verify that the message was sent using a valid
7930 certificate, that the sender's address in the message header matches
7931 that in the certificate, and that the message text has not been altered.
7932 Signing a message does not change its regular text;
7933 it can be read regardless of whether the recipient's software is able to
7934 handle S/MIME.
7936 It is thus usually possible to sign all outgoing messages if so desired.
7937 Encryption, in contrast, makes the message text invisible for all people
7938 except those who have access to the secret decryption key.
7939 To encrypt a message, the specific recipient's public encryption key
7940 must be known.
7941 It is therefore not possible to send encrypted mail to people unless their
7942 key has been retrieved from either previous communication or public key
7943 directories.
7944 A message should always be signed before it is encrypted.
7945 Otherwise, it is still possible that the encrypted message text is
7946 altered.
7948 A central concept to S/MIME is that of the certification authority (CA).
7949 A CA is a trusted institution that issues certificates.
7950 For each of these certificates it can be verified that it really
7951 originates from the CA, provided that the CA's own certificate is
7952 previously known.
7953 A set of CA certificates is usually delivered with OpenSSL and installed
7954 on your system.
7955 If you trust the source of your OpenSSL software installation,
7956 this offers reasonable security for S/MIME on the Internet.
7957 (Otherwise set
7958 .Va ssl-no-default-ca
7959 and use
7960 .Va smime-ca-file
7961 and/or
7962 .Va smime-ca-dir . )
7963 In general, a certificate cannot be more secure than the method its CA
7964 certificate has been retrieved with, though.
7965 Thus if you download a CA certificate from the Internet,
7966 you can only trust the messages you verify using that certificate as
7967 much as you trust the download process.
7969 The first thing you need for participating in S/MIME message exchange is
7970 your personal certificate, including a private key.
7971 The certificate contains public information, in particular your name and
7972 your email address(es), and the public key that is used by others to
7973 encrypt messages for you,
7974 and to verify signed messages they supposedly received from you.
7975 The certificate is included in each signed message you send.
7976 The private key must be kept secret.
7977 It is used to decrypt messages that were previously encrypted with your
7978 public key, and to sign messages.
7980 For personal use it is recommended that you get a S/MIME certificate
7981 from one of the major CAs on the Internet using your WWW browser.
7982 Many CAs offer such certificates for free.
7983 There is also
7984 .Lk https://www.CAcert.org
7985 which issues client and server certificates to members of their
7986 community for free; their root certificate
7987 .Pf ( Lk https://\:www.cacert.org/\:certs/\:root.crt )
7988 is often not in the default set of trusted CA root certificates, though,
7989 which means you will have to download their root certificate separately
7990 and ensure it is part of our S/MIME certificate validation chain by
7991 including it in
7992 .Va smime-ca-dir
7993 or as a vivid member of the
7994 .Va smime-ca-file .
7995 But let's take a step-by-step tour on how to setup S/MIME with
7996 a certificate from CAcert.org despite this situation!
7998 First of all you will have to become a member of the CAcert.org
7999 community, simply by registrating yourself via the web interface.
8000 Once you are, create and verify all email addresses you want to be able
8001 to create signed and encrypted messages for/with using the corresponding
8002 entries of the web interface.
8003 Now ready to create S/MIME certificates, so let's create a new
8004 .Dq client certificate ,
8005 ensure to include all email addresses that should be covered by the
8006 certificate in the following web form, and also to use your name as the
8007 .Dq common name .
8009 Create a private key and a certificate request on your local computer
8010 (please see the manual pages of the used commands for more in-depth
8011 knowledge on what the used arguments etc. do):
8013 .Dl openssl req -nodes -newkey rsa:4096 -keyout key.pem -out creq.pem
8015 Afterwards copy-and-paste the content of
8016 .Dq creq.pem
8017 into the certificate-request (CSR) field of the web form on the
8018 CAcert.org website (you may need to unfold some
8019 .Dq advanced options
8020 to see the corresponding text field).
8021 This last step will ensure that your private key (which never left your
8022 box) and the certificate belong together (through the public key that
8023 will find its way into the certificate via the certificate-request).
8024 You are now ready and can create your CAcert certified certificate.
8025 Download and store or copy-and-paste it as
8026 .Dq pub.crt .
8028 Yay.
8029 In order to use your new S/MIME setup you will have to create
8030 a combined private key/public key (certificate) file:
8032 .Dl cat key.pem pub.crt > ME@HERE.com.paired
8034 This is the file \*(UA will work with.
8035 If you have created your private key with a passphrase then \*(UA will
8036 ask you for it whenever a message is signed or decrypted.
8037 Set the following variables to henceforth use S/MIME (setting
8038 .Va smime-ca-file
8039 is of interest for verification only):
8040 .Bd -literal -offset indent
8041 set smime-ca-file=ALL-TRUSTED-ROOT-CERTS-HERE \e
8042   smime-sign-cert=ME@HERE.com.paired \e
8043   smime-sign-message-digest=SHA256 \e
8044   smime-sign
8047 From each signed message you send, the recipient can fetch your
8048 certificate and use it to send encrypted mail back to you.
8049 Accordingly if somebody sends you a signed message, you can do the same,
8050 and use the
8051 .Ic verify
8052 command to check the validity of the certificate.
8054 Options of interest for S/MIME signing:
8055 .Va smime-ca-dir ,
8056 .Va smime-ca-file ,
8057 .Va smime-crl-dir ,
8058 .Va smime-crl-file ,
8059 .Va smime-no-default-ca ,
8060 .Va smime-sign ,
8061 .Va smime-sign-cert ,
8062 .Va smime-sign-include-certs
8064 .Va smime-sign-message-digest .
8066 After it has been verified save the certificate via
8067 .Ic certsave
8068 and tell \*(UA that it should use it for encryption for further
8069 communication with that somebody:
8070 .Bd -literal -offset indent
8071 certsave FILENAME
8072 set smime-encrypt-USER@HOST=FILENAME \e
8073     smime-cipher-USER@HOST=AES256
8076 Additional options of interest for S/MIME en- and decryption:
8077 .Va smime-cipher
8079 .Va smime-encrypt-USER@HOST .
8081 You should carefully consider if you prefer to store encrypted messages
8082 in decrypted form.
8083 If you do, anybody who has access to your mail folders can read them,
8084 but if you do not, you might be unable to read them yourself later if
8085 you happen to lose your private key.
8087 .Ic decrypt
8088 command saves messages in decrypted form, while the
8089 .Ic save , copy ,
8091 .Ic move
8092 commands leave them encrypted.
8094 Note that neither S/MIME signing nor encryption applies to message
8095 subjects or other header fields yet.
8096 Thus they may not contain sensitive information for encrypted messages,
8097 and cannot be trusted even if the message content has been verified.
8098 When sending signed messages,
8099 it is recommended to repeat any important header information in the
8100 message text.
8101 .Ss "Using CRLs with S/MIME or SSL/TLS"
8102 \*(OP Certification authorities (CAs) issue certificate revocation
8103 lists (CRLs) on a regular basis.
8104 These lists contain the serial numbers of certificates that have been
8105 declared invalid after they have been issued.
8106 Such usually happens because the private key for the certificate has
8107 been compromised,
8108 because the owner of the certificate has left the organization that is
8109 mentioned in the certificate, etc.
8110 To seriously use S/MIME or SSL/TLS verification,
8111 an up-to-date CRL is required for each trusted CA.
8112 There is otherwise no method to distinguish between valid and
8113 invalidated certificates.
8114 \*(UA currently offers no mechanism to fetch CRLs, nor to access them on
8115 the Internet, so you have to retrieve them by some external mechanism.
8117 \*(UA accepts CRLs in PEM format only;
8118 CRLs in DER format must be converted, like, e.\|g.:
8120 .Dl $ openssl crl \-inform DER \-in crl.der \-out crl.pem
8122 To tell \*(UA about the CRLs, a directory that contains all CRL files
8123 (and no other files) must be created.
8125 .Va smime-crl-dir
8127 .Va ssl-crl-dir
8128 variables, respectively, must then be set to point to that directory.
8129 After that, \*(UA requires a CRL to be present for each CA that is used
8130 to verify a certificate.
8131 .Ss "Handling spam"
8132 \*(OP \*(UA can make use of several spam interfaces for the purpose of
8133 identification of, and, in general, dealing with spam messages.
8134 A precondition of most commands in order to function is that the
8135 .Va spam-interface
8136 variable is set to one of the supported interfaces.
8137 Once messages have been identified as spam their (volatile)
8138 .Ql is-spam
8139 state can be prompted: the
8140 .Ql Ar :s
8142 .Ql Ar :S
8143 message specifications will address respective messages and their
8144 .Va attrlist
8145 entries will be used when displaying the
8146 .Va headline
8147 in the header display.
8148 .Bl -bullet
8150 .Ic spamrate
8151 rates the given messages and sets their
8152 .Ql is-spam
8153 flag accordingly.
8154 If the spam interface offers spam scores those can also be displayed in
8155 the header display by including the
8156 .Ql %$
8157 format in the
8158 .Va headline
8159 variable.
8161 .Ic spamham ,
8162 .Ic spamspam
8164 .Ic spamforget
8165 will interact with the Bayesian filter of the chosen interface and learn
8166 the given messages as
8167 .Dq ham
8169 .Dq spam ,
8170 respectively; the last command can be used to cause
8171 .Dq unlearning
8172 of messages; it adheres to their current
8173 .Ql is-spam
8174 state and thus reverts previous teachings.
8176 .Ic spamclear
8178 .Ic spamset
8179 will simply set and clear, respectively, the mentioned volatile
8180 .Ql is-spam
8181 message flag, without any interface interaction.
8185 .Xr spamassassin 1
8186 based
8187 .Va spam-interface Ns s
8188 .Ql spamc
8190 .Ql spamd
8191 require a running instance of the
8192 .Xr spamd 1
8193 server in order to function, started with the option
8194 .Fl -allow-tell
8195 shall Bayesian filter learning be possible.
8196 .Ql spamd
8197 only works via a local path-based
8198 .Xr unix 4
8199 socket, but otherwise the following will be equivalently fine:
8200 .Bd -literal -offset indent
8201 $ spamd -i localhost:2142 -i /tmp/.spamsock -d [-L] [-l]
8202 $ spamd --listen=localhost:2142 --listen=/tmp/.spamsock \e
8203     --daemonize [--local] [--allow-tell]
8206 Thereafter \*(UA can make use of these interfaces:
8207 .Bd -literal -offset indent
8208 $ \*(ua -Sspam-interface=spamd -Sspam-maxsize=500000 \e
8209     -Sspamd-socket=/tmp/.spamsock -Sspamd-user=
8211 $ \*(ua -Sspam-interface=spamc -Sspam-maxsize=500000 \e
8212     -Sspamc-command=/usr/local/bin/spamc \e
8213     -Sspamc-arguments="-U /tmp/.spamsock" -Sspamc-user=
8215 $ \*(ua -Sspam-interface=spamc -Sspam-maxsize=500000 \e
8216     -Sspamc-command=/usr/local/bin/spamc \e
8217     -Sspamc-arguments="-d localhost -p 2142" -Sspamc-user=
8220 Using the generic filter approach allows usage of programs like
8221 .Xr bogofilter 1
8223 .Xr sylfilter 1 .
8224 Here is an example for the former, requiring it to be accessible via
8225 .Ev PATH :
8226 .Bd -literal -offset indent
8227 $ \*(ua -Sspam-interface=filter -Sspam-maxsize=500000 \e
8228     -Sspamfilter-ham="bogofilter -n" \e
8229     -Sspamfilter-noham="bogofilter -N" \e
8230     -Sspamfilter-nospam="bogofilter -S" \e
8231     -Sspamfilter-rate="bogofilter -TTu 2>/dev/null" \e
8232     -Sspamfilter-spam="bogofilter -s" \e
8233     -Sspamfilter-rate-scanscore="1;^(.+)$"
8236 Because messages must exist on local storage in order to be scored (or
8237 used for Bayesian filter training), it is possibly a good idea to
8238 perform the local spam check last:
8239 .Bd -literal -offset indent
8240 define spamdelhook {
8241   # Server side DCC
8242   spamset (header x-dcc-brand-metrics "bulk")
8243   # Server-side spamassassin(1)
8244   spamset (header x-spam-flag "YES")
8245   del :s # TODO we HAVE to be able to do `spamrate :u ! :sS'
8246   move :S +maybe-spam
8247   spamrate :u
8248   del :s
8249   move :S +maybe-spam
8251 set folder-hook-FOLDER=spamdelhook
8254 See also the documentation for the variables
8255 .Va spam-interface , spam-maxsize ,
8256 .Va spamc-command , spamc-arguments , spamc-user ,
8257 .Va spamd-socket , spamd-user ,
8258 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
8259   spamfilter-rate
8261 .Va spamfilter-rate-scanscore .
8262 .Sh "FAQ"
8263 .Ss "\*(UA shortly hangs on startup"
8264 This can have two reasons, one is the necessity to wait for a file lock
8265 and can't be helped, the other being that \*(UA calls the function
8266 .Xr uname 2
8267 in order to query the nodename of the box (sometimes the real one is
8268 needed instead of the one represented by the internal variable
8269 .Va hostname ) .
8270 You may have varying success by ensuring that the real hostname and
8271 .Ql localhost
8272 have entries in
8273 .Pa /etc/hosts ,
8274 or, more generally, that the name service is properly setup \(en
8275 and does
8276 .Xr hostname 1
8277 return what you'd expect?
8278 .Ss "I can't login to Google mail a.k.a. GMail"
8279 Since 2014 some free service providers classify programs as
8280 .Dq less secure
8281 unless they use a special authentification method (OAuth 2.0) which
8282 wasn't standardized for non-HTTP protocol authentication token query
8283 until August 2015 (RFC 7628).
8285 Different to Kerberos / GSSAPI, which is developed since the mid of the
8286 1980s, where a user can easily create a local authentication ticket for
8287 her- and himself with the locally installed
8288 .Xr kinit 1
8289 program, that protocol has no such local part but instead requires
8290 a world-wide-web query to create or fetch a token; since there is no
8291 local cache this query has to be performed whenever \*(UA is invoked
8292 from the command line (in interactive sessions situation may differ).
8294 \*(UA doesn't support OAuth.
8295 Because of this it is necessary to declare \*(UA a
8296 .Dq less secure app
8297 (on the providers account web page) in order to read and send mail.
8298 However, it also seems possible to take the following steps instead:
8300 .Bl -enum -compact
8302 give the provider the number of a mobile phone,
8304 enable
8305 .Dq 2-Step Verification ,
8307 create an application specific password (16 characters), and
8309 use that special password instead of your real Google account password in
8310 S-nail (for more on that see the section
8311 .Sx "On URL syntax and credential lookup" ) .
8313 .Sh "SEE ALSO"
8314 .Xr bogofilter 1 ,
8315 .Xr bzip2 1 ,
8316 .Xr file 1 ,
8317 .Xr fmt 1 ,
8318 .Xr gpg 1 ,
8319 .Xr gpg-agent 1 ,
8320 .Xr gzip 1 ,
8321 .Xr less 1 ,
8322 .Xr more 1 ,
8323 .Xr newaliases 1 ,
8324 .Xr openssl 1 ,
8325 .Xr postfix 1 ,
8326 .Xr printf 1 ,
8327 .Xr sendmail 1 ,
8328 .Xr sh 1 ,
8329 .Xr spamassassin 1 ,
8330 .Xr spamc 1 ,
8331 .Xr spamd 1 ,
8332 .Xr sylfilter 1 ,
8333 .Xr vacation 1 ,
8334 .Xr xterm 1 ,
8335 .Xr xz 1 ,
8336 .Xr editline 3 ,
8337 .Xr iconv 3 ,
8338 .Xr readline 3 ,
8339 .Xr setlocale 3 ,
8340 .Xr ssl 3 ,
8341 .Xr aliases 5 ,
8342 .Xr locale 7 ,
8343 .Xr mailaddr 7 ,
8344 .Xr re_format 7 ,
8345 .Xr exim 8 ,
8346 .Xr mailwrapper 8 ,
8347 .Xr sendmail 8
8348 .Sh HISTORY
8350 .Em mail
8351 command appeared in Version 1 AT&T Unix.
8352 Berkeley Mail was written in 1978 by Kurt Shoens.
8353 This man page is derived from from
8354 .Dq The Mail Reference Manual
8355 originally written by Kurt Shoens.
8356 .Dq Heirloom Mailx
8357 enhancements are maintained and documented by Gunnar
8358 Ritter.
8359 .Dq S-nail
8360 is maintained and documented by Steffen (Daode) Nurpmeso.
8362 Portions of this text are reprinted and reproduced in electronic form
8363 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
8364 \(en Operating System Interface (POSIX), The Open Group Base
8365 Specifications Issue 6, Copyright \(co 2001-2003 by the Institute of
8366 Electrical and Electronics Engineers, Inc and The Open Group.
8367 In the event of any discrepancy between this version and the original
8368 IEEE and The Open Group Standard, the original IEEE and The Open Group
8369 Standard is the referee document.
8370 The original Standard can be obtained online at
8371 .Lk http://www.opengroup.org/unix/online.html OpenGroup.org
8372 Redistribution of this material is permitted so long as this notice
8373 remains intact.
8374 .Sh AUTHORS
8375 .An "Kurt Shoens" ,
8376 .An "Christos Zoulas" ,
8377 .An "Gunnar Ritter" ,
8378 .An "Steffen Nurpmeso" Aq Mt s-nail-users@lists.sourceforge.net
8379 (later
8380 .Mt s-mailx@sdaoden.eu ) .
8381 .Sh CAVEATS
8382 The character set conversion uses and relies upon the
8383 .Xr iconv 3
8384 function.
8385 Its functionality differs widely between the various system environments
8386 \*(UA runs on.
8388 Limitations with IMAP mailboxes are:
8389 It is not possible to edit messages, but it is possible to append them.
8390 Thus to edit a message, create a local copy of it, edit it, append it,
8391 and delete the original.
8392 The line count for the header display is only appropriate if the entire
8393 message has been downloaded from the server.
8394 The marking of messages as `new' is performed by the IMAP server;
8395 use of the
8396 .Ic exit
8397 command instead of
8398 .Ic quit
8399 will not cause it to be reset, and if the
8400 .Va newmail
8401 variable is unset, messages that arrived during a session will not be
8402 in state `new' anymore when the folder is opened again.
8403 Also if commands queued in disconnected mode are committed,
8404 the IMAP server will delete the `new' flag for all messages in the
8405 changed folder,
8406 and new messages will appear as unread when it is selected for viewing
8407 later.
8408 The `flagged', `answered', and `draft' attributes are usually permanent,
8409 but some IMAP servers are known to drop them without notification.
8410 Message numbers may change with IMAP every time before the prompt is
8411 printed if \*(UA is notified by the server that messages have been
8412 deleted by some other client or process.
8413 In this case, `Expunged n messages' is printed, and message numbers may
8414 have changed.
8416 Limitations with POP3 mailboxes are:
8417 It is not possible to edit messages, they can only be copied and deleted.
8418 The line count for the header display is only appropriate if the entire
8419 message has been downloaded from the server.
8420 The status field of a message is maintained by the server between
8421 connections; some servers do not update it at all, and with a server
8422 that does, the
8423 .Ic exit
8424 command will not cause the message status to be reset.
8426 .Ic newmail
8427 command and the
8428 .Va newmail
8429 variable have no effect.
8430 It is not possible to rename or to remove POP3 mailboxes.
8432 If a
8433 .Dq RUBOUT
8434 (interrupt,
8435 .Ql control-C )
8436 is typed while an IMAP or POP3 operation is in progress, \*(UA will wait
8437 until the operation can be safely aborted, and will then return to the
8438 command loop and print the prompt again.
8439 When a second
8440 .Dq RUBOUT
8441 is typed while \*(UA is waiting for the operation to complete, the
8442 operation itself will be cancelled.
8443 In this case, data that has not been fetched yet will have to be fetched
8444 before the next command can be performed.
8445 If the cancelled operation was using an SSL/TLS encrypted channel,
8446 an error in the SSL transport will very likely result and render the
8447 connection unusable.
8449 As \*(UA is a mail user agent, it provides only basic SMTP services.
8450 If it fails to contact its upstream SMTP server, it will not make
8451 further attempts to transfer the message at a later time,
8452 and it does not leave other information about this condition than an
8453 error message on the terminal and an entry in
8454 .Ev DEAD .
8455 This is usually not a problem if the SMTP server is located in the same
8456 local network as the computer on which \*(UA is run.
8457 However, care should be taken when using a remote server of an ISP;
8458 it might be better to set up a local SMTP server then which just acts as
8459 a proxy.
8461 \*(UA immediately contacts the SMTP server (or
8462 .Xr sendmail 1 Ns
8463 ) even when operating in
8464 .Va disconnected
8465 mode.
8466 It would not make much sense for \*(UA to defer outgoing mail since SMTP
8467 servers usually provide much more elaborated delay handling than \*(UA
8468 could perform as a client.
8469 Thus the recommended setup for sending mail in
8470 .Va disconnected
8471 mode is to configure a local SMTP server such that it sends outgoing
8472 mail as soon as an external network connection is available again,
8473 i.e., to advise it to do that from a network startup script.
8474 .Sh BUGS
8475 With IMAP, at least if the IMAP cache is used, if multiple
8476 .Ic connect
8478 .Ic disconnect
8479 cycles happen without an intervening change of the active mailbox then
8480 \*(UA will at some time loose the ability to keep the local state
8481 up-to-date, meaning that, e.g., messages show up with false numbers, and
8482 including the possibility that messages are accessed via numbers that
8483 are no(t longer) valid, resulting in program crashes.
8484 The solution is to change the active mailbox before that happens :).
8485 Also see the file
8486 .Pa TODO
8487 from the distribution or the repository.
8488 After deleting some message of a POP3 mailbox the header summary falsely
8489 claims that there are no messages to display, you need to perform
8490 a scroll or dot movement to restore proper state.
8491 In threaded display a power user may encounter crashes very
8492 occasionally (this is may and very).