wibble
[apps/madmutt.git] / init.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
4  * Copyright (C) 2004 g10 Code GmbH
5  *
6  * Parts were writte/modified by:
7  * Nico Golde <nico@ngolde.de>
8  *
9  * This file is part of mutt-ng, see http://www.muttng.org/.
10  * It's licensed under the GNU General Public License,
11  * please see the file GPL in the top level source directory.
12  */
13
14 #include "sort.h"
15 #include "mutt.h"
16
17 #ifndef _MAKEDOC
18 #define DT_MASK         0x0f
19 #define DT_BOOL         1       /* boolean option */
20 #define DT_NUM          2       /* a number */
21 #define DT_STR          3       /* a string */
22 #define DT_PATH         4       /* a pathname */
23 #define DT_QUAD         5       /* quad-option (yes/no/ask-yes/ask-no) */
24 #define DT_SORT         6       /* sorting methods */
25 #define DT_RX           7       /* regular expressions */
26 #define DT_MAGIC        8       /* mailbox type */
27
28 #define DTYPE(x) ((x) & DT_MASK)
29
30 /* subtypes */
31 #define DT_SUBTYPE_MASK 0xf0
32 #define DT_SORT_ALIAS   0x10
33 #define DT_SORT_BROWSER 0x20
34 #define DT_SORT_KEYS    0x40
35 #define DT_SORT_AUX     0x80
36
37 /* flags to parse_set() */
38 #define M_SET_INV       (1<<0)  /* default is to invert all vars */
39 #define M_SET_UNSET     (1<<1)  /* default is to unset all vars */
40 #define M_SET_RESET     (1<<2)  /* default is to reset all vars to default */
41
42 struct option_t {
43   const char *option;
44   short type;
45   unsigned long data;
46   const char *init;
47 };
48
49 #define UL (unsigned long)
50
51 #endif /* _MAKEDOC */
52
53 /* build complete documentation */
54
55 struct option_t MuttVars[] = {
56   /*++*/
57   {"abort_noattach", DT_QUAD, OPT_ATTACH, "no" },
58   /*
59    ** .pp
60    ** This variable specifies whether to abort sending if no attachment
61    ** was made but the content references them, i.e. the content
62    ** matches the regular expression given in
63    ** $$attach_remind_regexp. If a match was found and this
64    ** variable is set to \fIyes\fP, message sending will be aborted
65    ** but the mail will be send nevertheless if set to \fIno\fP.
66    **
67    ** .pp
68    ** This variable and $$attach_remind_regexp are intended to
69    ** remind the user to attach files if the message's text
70    ** references them.
71    **
72    ** .pp
73    ** See also the $$attach_remind_regexp variable.
74    */
75   {"abort_nosubject", DT_QUAD, OPT_SUBJECT, "ask-yes" },
76   /*
77    ** .pp
78    ** If set to \fIyes\fP, when composing messages and no subject is given
79    ** at the subject prompt, composition will be aborted.  If set to
80    ** \fIno\fP, composing messages with no subject given at the subject
81    ** prompt will never be aborted.
82    */
83   {"abort_unmodified", DT_QUAD, OPT_ABORT, "yes" },
84   /*
85    ** .pp
86    ** If set to \fIyes\fP, composition will automatically abort after
87    ** editing the message body if no changes are made to the file (this
88    ** check only happens after the \fIfirst\fP edit of the file).  When set
89    ** to \fIno\fP, composition will never be aborted.
90    */
91   {"allow_8bit", DT_BOOL, OPTALLOW8BIT, "yes" },
92   /*
93    ** .pp
94    ** Controls whether 8-bit data is converted to 7-bit using either
95    ** \fTquoted-printable\fP or \fTbase64\fP encoding when sending mail.
96    */
97   {"askbcc", DT_BOOL, OPTASKBCC, "no" },
98   /*
99    ** .pp
100    ** If \fIset\fP, Madmutt will prompt you for blind-carbon-copy (Bcc) recipients
101    ** before editing an outgoing message.
102    */
103   {"askcc", DT_BOOL, OPTASKCC, "no" },
104   /*
105    ** .pp
106    ** If \fIset\fP, Madmutt will prompt you for carbon-copy (Cc) recipients before
107    ** editing the body of an outgoing message.
108    */
109   {"attach_format", DT_STR, UL &AttachFormat, "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] "},
110   /*
111    ** .pp
112    ** This variable describes the format of the ``attachment'' menu.  The
113    ** following \fTprintf(3)\fP-style sequences are understood:
114    ** .pp
115    ** .dl
116    ** .dt %C  .dd charset
117    ** .dt %c  .dd requires charset conversion (n or c)
118    ** .dt %D  .dd deleted flag
119    ** .dt %d  .dd description
120    ** .dt %e  .dd MIME \fTContent-Transfer-Encoding:\fP header field
121    ** .dt %f  .dd filename
122    ** .dt %I  .dd MIME \fTContent-Disposition:\fP header field (\fTI\fP=inline, \fTA\fP=attachment)
123    ** .dt %m  .dd major MIME type
124    ** .dt %M  .dd MIME subtype
125    ** .dt %n  .dd attachment number
126    ** .dt %Q  .dd "Q", if MIME part qualifies for attachment counting
127    ** .dt %s  .dd size
128    ** .dt %t  .dd tagged flag
129    ** .dt %T  .dd graphic tree characters
130    ** .dt %u  .dd unlink (=to delete) flag
131    ** .dt %X  .dd number of qualifying MIME parts in this part and its children
132    ** .dt %>X .dd right justify the rest of the string and pad with character "X"
133    ** .dt %|X .dd pad to the end of the line with character "X"
134    ** .de
135    */
136   {"attach_remind_regexp", DT_RX, UL &AttachRemindRegexp, "attach"},
137   /*
138    ** .pp
139    ** If this variable is non-empty, madmutt will scan a message's contents
140    ** before sending for this regular expression. If it is found, it will
141    ** ask for what to do depending on the setting of $$abort_noattach.
142    ** .pp
143    ** This variable and $$abort_noattach are intended to remind the user
144    ** to attach files if the message's text references them.
145    */
146   {"attach_sep", DT_STR, UL &AttachSep, "\n"},
147   /*
148    ** .pp
149    ** The separator to add between attachments when operating (saving,
150    ** printing, piping, etc) on a list of tagged attachments.
151    */
152   {"attach_split", DT_BOOL, OPTATTACHSPLIT, "yes" },
153   /*
154    ** .pp
155    ** If this variable is \fIunset\fP, when operating (saving, printing, piping,
156    ** etc) on a list of tagged attachments, Madmutt will concatenate the
157    ** attachments and will operate on them as a single attachment. The
158    ** ``$$attach_sep'' separator is added after each attachment. When \fIset\fP,
159    ** Madmutt will operate on the attachments one by one.
160    */
161   {"attribution", DT_STR, UL &Attribution, "On %d, %n wrote:"},
162   /*
163    ** .pp
164    ** This is the string that will precede a message which has been included
165    ** in a reply.  For a full listing of defined \fTprintf(3)\fP-like sequences see
166    ** the section on ``$$index_format''.
167    */
168   {"autoedit", DT_BOOL, OPTAUTOEDIT, "no" },
169   /*
170    ** .pp
171    ** When \fIset\fP along with ``$$edit_headers'', Madmutt will skip the initial
172    ** send-menu and allow you to immediately begin editing the body of your
173    ** message.  The send-menu may still be accessed once you have finished
174    ** editing the body of your message.
175    ** .pp
176    ** Also see ``$$fast_reply''.
177    */
178   {"auto_tag", DT_BOOL, OPTAUTOTAG, "no" },
179   /*
180    ** .pp
181    ** When \fIset\fP, functions in the \fIindex\fP menu which affect a message
182    ** will be applied to all tagged messages (if there are any).  When
183    ** unset, you must first use the ``tag-prefix'' function (default: "\fT;\fP") to
184    ** make the next function apply to all tagged messages.
185    */
186   {"bounce", DT_QUAD, OPT_BOUNCE, "ask-yes" },
187   /*
188    ** .pp
189    ** Controls whether you will be asked to confirm bouncing messages.
190    ** If set to \fIyes\fP you don't get asked if you want to bounce a
191    ** message. Setting this variable to \fIno\fP is not generally useful,
192    ** and thus not recommended, because you are unable to bounce messages.
193    */
194   {"bounce_delivered", DT_BOOL, OPTBOUNCEDELIVERED, "yes" },
195   /*
196    ** .pp
197    ** When this variable is \fIset\fP, Madmutt will include
198    ** \fTDelivered-To:\fP header fields when bouncing messages.
199    ** Postfix users may wish to \fIunset\fP this variable.
200    */
201   {"check_new", DT_BOOL, OPTCHECKNEW, "yes" },
202   /*
203    ** .pp
204    ** \fBNote:\fP this option only affects \fImaildir\fP and \fIMH\fP style
205    ** mailboxes.
206    ** .pp
207    ** When \fIset\fP, Madmutt will check for new mail delivered while the
208    ** mailbox is open.  Especially with MH mailboxes, this operation can
209    ** take quite some time since it involves scanning the directory and
210    ** checking each file to see if it has already been looked at.  If it's
211    ** \fIunset\fP, no check for new mail is performed while the mailbox is open.
212    */
213   {"collapse_unread", DT_BOOL, OPTCOLLAPSEUNREAD, "yes" },
214   /*
215    ** .pp
216    ** When \fIunset\fP, Madmutt will not collapse a thread if it contains any
217    ** unread messages.
218    */
219   {"uncollapse_jump", DT_BOOL, OPTUNCOLLAPSEJUMP, "no" },
220   /*
221    ** .pp
222    ** When \fIset\fP, Madmutt will jump to the next unread message, if any,
223    ** when the current thread is \fIun\fPcollapsed.
224    */
225   {"compose_format", DT_STR, UL &ComposeFormat, "-- Madmutt: Compose  [Approx. msg size: %l   Atts: %a]%>-"},
226   /*
227    ** .pp
228    ** Controls the format of the status line displayed in the ``compose''
229    ** menu.  This string is similar to ``$$status_format'', but has its own
230    ** set of \fTprintf(3)\fP-like sequences:
231    ** .pp
232    ** .dl
233    ** .dt %a .dd total number of attachments
234    ** .dt %h .dd local hostname
235    ** .dt %l .dd approximate size (in bytes) of the current message
236    ** .dt %v .dd Madmutt version string
237    ** .de
238    ** .pp
239    ** See the text describing the ``$$status_format'' option for more
240    ** information on how to set ``$$compose_format''.
241    */
242   {"config_charset", DT_STR, UL &ConfigCharset, "" },
243   /*
244    ** .pp
245    ** When defined, Madmutt will recode commands in rc files from this
246    ** encoding.
247    */
248   {"confirmappend", DT_BOOL, OPTCONFIRMAPPEND, "yes" },
249   /*
250    ** .pp
251    ** When \fIset\fP, Madmutt will prompt for confirmation when appending messages to
252    ** an existing mailbox.
253    */
254   {"confirmcreate", DT_BOOL, OPTCONFIRMCREATE, "yes" },
255   /*
256    ** .pp
257    ** When \fIset\fP, Madmutt will prompt for confirmation when saving messages to a
258    ** mailbox which does not yet exist before creating it.
259    */
260   {"connect_timeout", DT_NUM, UL &ConnectTimeout, "30" },
261   /*
262    ** .pp
263    ** Causes Madmutt to timeout a network connection (for IMAP or POP) after this
264    ** many seconds if the connection is not able to be established.  A negative
265    ** value causes Madmutt to wait indefinitely for the connection to succeed.
266    */
267   {"content_type", DT_STR, UL &ContentType, "text/plain"},
268   /*
269    ** .pp
270    ** Sets the default \fTContent-Type:\fP header field for the body
271    ** of newly composed messages.
272    */
273   {"copy", DT_QUAD, OPT_COPY, "yes" },
274   /*
275    ** .pp
276    ** This variable controls whether or not copies of your outgoing messages
277    ** will be saved for later references.  Also see ``$$record'',
278    ** and ``$fcc-hook''.
279    */
280   {"date_format", DT_STR, UL &DateFmt, "!%a, %b %d, %Y at %I:%M:%S%p %Z"},
281   /*
282    ** .pp
283    ** This variable controls the format of the date printed by the ``\fT%d\fP''
284    ** sequence in ``$$index_format''.  This is passed to \fTstrftime(3)\fP
285    ** to process the date.
286    ** .pp
287    ** Unless the first character in the string is a bang (``\fT!\fP''), the month
288    ** and week day names are expanded according to the locale specified in
289    ** the variable ``$$locale''. If the first character in the string is a
290    ** bang, the bang is discarded, and the month and week day names in the
291    ** rest of the string are expanded in the \fIC\fP locale (that is in US
292    ** English).
293    */
294   {"default_hook", DT_STR, UL &DefaultHook, "~f %s !~P | (~P ~C %s)"},
295   /*
296    ** .pp
297    ** This variable controls how send-hooks, message-hooks, save-hooks,
298    ** and fcc-hooks will
299    ** be interpreted if they are specified with only a simple regexp,
300    ** instead of a matching pattern.  The hooks are expanded when they are
301    ** declared, so a hook will be interpreted according to the value of this
302    ** variable at the time the hook is declared.  The default value matches
303    ** if the message is either from a user matching the regular expression
304    ** given, or if it is from you (if the from address matches
305    ** ``alternates'') and is to or cc'ed to a user matching the given
306    ** regular expression.
307    */
308   {"delete", DT_QUAD, OPT_DELETE, "ask-yes" },
309   /*
310    ** .pp
311    ** Controls whether or not messages are really deleted when closing or
312    ** synchronizing a mailbox.  If set to \fIyes\fP, messages marked for
313    ** deleting will automatically be purged without prompting.  If set to
314    ** \fIno\fP, messages marked for deletion will be kept in the mailbox.
315    */
316   {"delete_space", DT_BOOL, OPTDELSP, "no" },
317   /*
318    ** .pp
319    ** When sending messages with \fTformat=flowed\fP by \fIsetting\fP the
320    ** $$text_flowed variable, this variable specifies whether to also
321    ** set the \fTDelSp\fP parameter to \fTyes\fP. If this is \fIunset\fP,
322    ** no additional parameter will be send as a value of \fTno\fP already
323    ** is the default behavior.
324    **
325    ** .pp
326    ** \fBNote:\fP this variable only has an effect on \fIoutgoing\fP messages
327    ** (if $$text_flowed is \fIset\fP) but not on incomming.
328    */
329   {"delete_untag", DT_BOOL, OPTDELETEUNTAG, "yes" },
330   /*
331    ** .pp
332    ** If this option is \fIset\fP, Madmutt will untag messages when marking them
333    ** for deletion.  This applies when you either explicitly delete a message,
334    ** or when you save it to another folder.
335    */
336   {"digest_collapse", DT_BOOL, OPTDIGESTCOLLAPSE, "yes" },
337   /*
338    ** .pp
339    ** If this option is \fIset\fP, Madmutt's received-attachments menu will not show the subparts of
340    ** individual messages in a multipart/digest.  To see these subparts, press 'v' on that menu.
341    */
342   {"display_filter", DT_PATH, UL &DisplayFilter, ""},
343   /*
344    ** .pp
345    ** When \fIset\fP, specifies a command used to filter messages.  When a message
346    ** is viewed it is passed as standard input to $$display_filter, and the
347    ** filtered message is read from the standard output.
348    */
349   {"duplicate_threads", DT_BOOL, OPTDUPTHREADS, "yes" },
350   /*
351    ** .pp
352    ** This variable controls whether Madmutt, when sorting by threads, threads
353    ** messages with the same \fTMessage-ID:\fP header field together.
354    ** If it is \fIset\fP, it will indicate that it thinks they are duplicates
355    ** of each other with an equals sign in the thread diagram.
356    */
357   {"edit_headers", DT_BOOL, OPTEDITHDRS, "no" },
358   /*
359    ** .pp
360    ** This option allows you to edit the header of your outgoing messages
361    ** along with the body of your message.
362    **
363    ** .pp
364    ** Which empty header fields to show is controlled by the
365    ** $$editor_headers option.
366    */
367   {"editor_headers", DT_STR, UL &EditorHeaders, "From: To: Cc: Bcc: Subject: Reply-To:" },
368   /*
369    ** .pp
370    ** If $$edit_headers is \fIset\fP, this space-separated list specifies
371    ** which \fInon-empty\fP header fields to edit in addition to
372    ** user-defined headers.
373    **
374    ** .pp
375    ** Note: if $$edit_headers had to be turned on by force because
376    ** $$strict_mailto is \fIunset\fP, this option has no effect.
377    */
378   {"encode_from", DT_BOOL, OPTENCODEFROM, "no" },
379   /*
380    ** .pp
381    ** When \fIset\fP, Madmutt will \fTquoted-printable\fP encode messages when
382    ** they contain the string ``\fTFrom \fP'' (note the trailing space)
383    ** in the beginning of a line. Useful to avoid the tampering certain mail
384    ** delivery and transport agents tend to do with messages.
385    **
386    ** .pp
387    ** \fBNote:\fP as Madmutt currently violates RfC3676 defining
388    ** \fTformat=flowed\fP, it's <em/strongly/ advised to \fIset\fP
389    ** this option although discouraged by the standard. Alternatively,
390    ** you must take care of space-stuffing <tt/From / lines (with a trailing
391    ** space) yourself.
392    */
393   {"fast_reply", DT_BOOL, OPTFASTREPLY, "no" },
394   /*
395    ** .pp
396    ** When \fIset\fP, the initial prompt for recipients and subject are skipped
397    ** when replying to messages, and the initial prompt for subject is
398    ** skipped when forwarding messages.
399    ** .pp
400    ** \fBNote:\fP this variable has no effect when the ``$$autoedit''
401    ** variable is \fIset\fP.
402    */
403   {"fcc_attach", DT_BOOL, OPTFCCATTACH, "yes" },
404   /*
405    ** .pp
406    ** This variable controls whether or not attachments on outgoing messages
407    ** are saved along with the main body of your message.
408    */
409   {"fcc_clear", DT_BOOL, OPTFCCCLEAR, "no" },
410   /*
411    ** .pp
412    ** When this variable is \fIset\fP, FCCs will be stored unencrypted and
413    ** unsigned, even when the actual message is encrypted and/or
414    ** signed.
415    ** (PGP only)
416    */
417   {"folder", DT_PATH, UL &Maildir, "~/Mail"},
418   /*
419    ** .pp
420    ** Specifies the default location of your mailboxes.  A ``\fT+\fP'' or ``\fT=\fP'' at the
421    ** beginning of a pathname will be expanded to the value of this
422    ** variable.  Note that if you change this variable from the default
423    ** value you need to make sure that the assignment occurs \fIbefore\fP
424    ** you use ``+'' or ``='' for any other variables since expansion takes place
425    ** during the ``set'' command.
426    */
427   {"folder_format", DT_STR, UL &FolderFormat, "%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f"},
428   /*
429    ** .pp
430    ** This variable allows you to customize the file browser display to your
431    ** personal taste.  This string is similar to ``$$index_format'', but has
432    ** its own set of \fTprintf(3)\fP-like sequences:
433    ** .pp
434    ** .dl
435    ** .dt %C  .dd current file number
436    ** .dt %d  .dd date/time folder was last modified
437    ** .dt %f  .dd filename
438    ** .dt %F  .dd file permissions
439    ** .dt %g  .dd group name (or numeric gid, if missing)
440    ** .dt %l  .dd number of hard links
441    ** .dt %N  .dd N if folder has new mail, blank otherwise
442    ** .dt %s  .dd size in bytes
443    ** .dt %t  .dd * if the file is tagged, blank otherwise
444    ** .dt %u  .dd owner name (or numeric uid, if missing)
445    ** .dt %>X .dd right justify the rest of the string and pad with character "X"
446    ** .dt %|X .dd pad to the end of the line with character "X"
447    ** .de
448    */
449   {"followup_to", DT_BOOL, OPTFOLLOWUPTO, "yes" },
450   /*
451    ** .pp
452    ** Controls whether or not the \fTMail-Followup-To:\fP header field is
453    ** generated when sending mail.  When \fIset\fP, Madmutt will generate this
454    ** field when you are replying to a known mailing list, specified with
455    ** the ``subscribe'' or ``$lists'' commands or detected by common mailing list
456    ** headers.
457    ** .pp
458    ** This field has two purposes.  First, preventing you from
459    ** receiving duplicate copies of replies to messages which you send
460    ** to mailing lists. Second, ensuring that you do get a reply
461    ** separately for any messages sent to known lists to which you are
462    ** not subscribed.  The header will contain only the list's address
463    ** for subscribed lists, and both the list address and your own
464    ** email address for unsubscribed lists.  Without this header, a
465    ** group reply to your message sent to a subscribed list will be
466    ** sent to both the list and your address, resulting in two copies
467    ** of the same email for you.
468    */
469   {"force_buffy_check", DT_BOOL, OPTFORCEBUFFYCHECK, "no" },
470   /*
471    ** .pp
472    ** When \fIset\fP, it causes Madmutt to check for new mail when the
473    ** \fIbuffy-list\fP command is invoked. When \fIunset\fP, \fIbuffy_list\fP
474    ** will just list all mailboxes which are already known to have new mail.
475    ** .pp
476    ** Also see the following variables: ``$$timeout'', ``$$mail_check'' and
477    ** ``$$imap_mail_check''.
478    */
479   {"forward_decode", DT_BOOL, OPTFORWDECODE, "yes" },
480   /*
481    ** .pp
482    ** Controls the decoding of complex MIME messages into \fTtext/plain\fP when
483    ** forwarding a message.  The message header is also RFC2047 decoded.
484    ** This variable is only used, if ``$$mime_forward'' is \fIunset\fP,
485    ** otherwise ``$$mime_forward_decode'' is used instead.
486    */
487   {"forward_edit", DT_QUAD, OPT_FORWEDIT, "yes" },
488   /*
489    ** .pp
490    ** This quadoption controls whether or not the user is automatically
491    ** placed in the editor when forwarding messages.  For those who always want
492    ** to forward with no modification, use a setting of \fIno\fP.
493    */
494   {"forward_format", DT_STR, UL &ForwFmt, "[%a: %s]"},
495   /*
496    ** .pp
497    ** This variable controls the default subject when forwarding a message.
498    ** It uses the same format sequences as the ``$$index_format'' variable.
499    */
500   {"forward_quote", DT_BOOL, OPTFORWQUOTE, "no" },
501   /*
502    ** .pp
503    ** When \fIset\fP forwarded messages included in the main body of the
504    ** message (when ``$$mime_forward'' is \fIunset\fP) will be quoted using
505    ** ``$$indent_string''.
506    */
507   {"header", DT_BOOL, OPTHEADER, "no" },
508   /*
509    ** .pp
510    ** When \fIset\fP, this variable causes Madmutt to include the header
511    ** of the message you are replying to into the edit buffer.
512    ** The ``$$weed'' setting applies.
513    */
514   {"hidden_host", DT_BOOL, OPTHIDDENHOST, "no" },
515   /*
516    ** .pp
517    ** When \fIset\fP, Madmutt will skip the host name part of ``$$hostname'' variable
518    ** when adding the domain part to addresses.  This variable does not
519    ** affect the generation of \fTMessage-ID:\fP header fields, and it will not lead to the
520    ** cut-off of first-level domains.
521    */
522   {"hide_limited", DT_BOOL, OPTHIDELIMITED, "no" },
523   /*
524    ** .pp
525    ** When \fIset\fP, Madmutt will not show the presence of messages that are hidden
526    ** by limiting, in the thread tree.
527    */
528   {"hide_missing", DT_BOOL, OPTHIDEMISSING, "yes" },
529   /*
530    ** .pp
531    ** When \fIset\fP, Madmutt will not show the presence of missing messages in the
532    ** thread tree.
533    */
534   {"hide_thread_subject", DT_BOOL, OPTHIDETHREADSUBJECT, "yes" },
535   /*
536    ** .pp
537    ** When \fIset\fP, Madmutt will not show the subject of messages in the thread
538    ** tree that have the same subject as their parent or closest previously
539    ** displayed sibling.
540    */
541   {"hide_top_limited", DT_BOOL, OPTHIDETOPLIMITED, "no" },
542   /*
543    ** .pp
544    ** When \fIset\fP, Madmutt will not show the presence of messages that are hidden
545    ** by limiting, at the top of threads in the thread tree.  Note that when
546    ** $$hide_missing is \fIset\fP, this option will have no effect.
547    */
548   {"hide_top_missing", DT_BOOL, OPTHIDETOPMISSING, "yes" },
549   /*
550    ** .pp
551    ** When \fIset\fP, Madmutt will not show the presence of missing messages at the
552    ** top of threads in the thread tree.  Note that when $$hide_limited is
553    ** \fIset\fP, this option will have no effect.
554    */
555   {"history", DT_NUM, UL &HistSize, "10" },
556   /*
557    ** .pp
558    ** This variable controls the size (in number of strings remembered) of
559    ** the string history buffer. The buffer is cleared each time the
560    ** variable is changed.
561    */
562   {"honor_followup_to", DT_QUAD, OPT_MFUPTO, "yes" },
563   /*
564    ** .pp
565    ** This variable controls whether or not a \fTMail-Followup-To:\fP header field is
566    ** honored when group-replying to a message.
567    */
568   {"ignore_list_reply_to", DT_BOOL, OPTIGNORELISTREPLYTO, "no" },
569   /*
570    ** .pp
571    ** Affects the behaviour of the \fIreply\fP function when replying to
572    ** messages from mailing lists.  When \fIset\fP, if the ``\fTReply-To:\fP'' header field is
573    ** set to the same value as the ``\fTTo:\fP'' header field, Madmutt assumes that the
574    ** ``\fTReply-To:\fP'' header field was set by the mailing list to automate responses
575    ** to the list, and will ignore this field.  To direct a response to the
576    ** mailing list when this option is set, use the \fIlist-reply\fP
577    ** function; \fIgroup-reply\fP will reply to both the sender and the
578    ** list.
579    ** Remember: This option works only for mailing lists which are explicitly set in your madmuttrc
580    ** configuration file.
581    */
582   {"imap_authenticators", DT_STR, UL &ImapAuthenticators, "" },
583   /*
584    ** .pp
585    ** This is a colon-delimited list of authentication methods Madmutt may
586    ** attempt to use to log in to an IMAP server, in the order Madmutt should
587    ** try them.  Authentication methods are either ``\fTlogin\fP'' or the right
588    ** side of an IMAP ``\fTAUTH=\fP'' capability string, e.g. ``\fTdigest-md5\fP'',
589    ** ``\fTgssapi\fP'' or ``\fTcram-md5\fP''. This parameter is case-insensitive.
590    ** .pp
591    ** If this
592    ** parameter is \fIunset\fP (the default) Madmutt will try all available methods,
593    ** in order from most-secure to least-secure.
594    ** .pp
595    ** Example: \fTset imap_authenticators="gssapi:cram-md5:login"\fP
596    ** .pp
597    ** \fBNote:\fP Madmutt will only fall back to other authentication methods if
598    ** the previous methods are unavailable. If a method is available but
599    ** authentication fails, Madmutt will not connect to the IMAP server.
600    */
601   { "imap_check_subscribed",  DT_BOOL, OPTIMAPCHECKSUBSCRIBED, "no" },
602   /*
603    ** .pp
604    ** When \fIset\fP, mutt will fetch the set of subscribed folders from
605    ** your server on connection, and add them to the set of mailboxes
606    ** it polls for new mail. See also the ``$mailboxes'' command.
607    */
608   {"imap_delim_chars", DT_STR, UL &ImapDelimChars, "/."},
609   /*
610    ** .pp
611    ** This contains the list of characters which you would like to treat
612    ** as folder separators for displaying IMAP paths. In particular it
613    ** helps in using the '\fT=\fP' shortcut for your $$folder variable.
614    */
615   {"imap_headers", DT_STR, UL &ImapHeaders, "" },
616   /*
617    ** .pp
618    ** Madmutt requests these header fields in addition to the default headers
619    ** (``DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE
620    ** CONTENT-DESCRIPTION IN-REPLY-TO REPLY-TO LINES X-LABEL'') from IMAP
621    ** servers before displaying the ``index'' menu. You may want to add more
622    ** headers for spam detection.
623    ** .pp
624    ** \fBNote:\fP This is a space separated list.
625    */
626   {"imap_keepalive", DT_NUM, UL &ImapKeepalive, "900" },
627   /*
628    ** .pp
629    ** This variable specifies the maximum amount of time in seconds that Madmutt
630    ** will wait before polling open IMAP connections, to prevent the server
631    ** from closing them before Madmutt has finished with them.
632    ** .pp
633    ** The default is
634    ** well within the RFC-specified minimum amount of time (30 minutes) before
635    ** a server is allowed to do this, but in practice the RFC does get
636    ** violated every now and then.
637    ** .pp
638    ** Reduce this number if you find yourself
639    ** getting disconnected from your IMAP server due to inactivity.
640    */
641   {"imap_login", DT_STR, UL &ImapLogin, "" },
642   /*
643    ** .pp
644    ** Your login name on the IMAP server.
645    ** .pp
646    ** This variable defaults to the value of ``$$imap_user.''
647    */
648   {"imap_list_subscribed", DT_BOOL, OPTIMAPLSUB, "no" },
649   /*
650    ** .pp
651    ** This variable configures whether IMAP folder browsing will look for
652    ** only subscribed folders or all folders.  This can be toggled in the
653    ** IMAP browser with the \fItoggle-subscribed\fP function.
654    */
655   {"imap_mail_check", DT_NUM, UL &ImapBuffyTimeout, "300" },
656   /*
657    ** .pp
658    ** This variable configures how often (in seconds) Madmutt should look for
659    ** new mail in IMAP folders. This is split from the ``$mail_check'' variable
660    ** to generate less traffic and get more accurate information for local folders.
661    */
662   {"imap_pass", DT_STR, UL &ImapPass, "" },
663   /*
664    ** .pp
665    ** Specifies the password for your IMAP account.  If \fIunset\fP, Madmutt will
666    ** prompt you for your password when you invoke the fetch-mail function.
667    ** .pp
668    ** \fBWarning\fP: you should only use this option when you are on a
669    ** fairly secure machine, because the superuser can read your configuration even
670    ** if you are the only one who can read the file.
671    */
672   {"imap_passive", DT_BOOL, OPTIMAPPASSIVE, "yes" },
673   /*
674    ** .pp
675    ** When \fIset\fP, Madmutt will not open new IMAP connections to check for new
676    ** mail.  Madmutt will only check for new mail over existing IMAP
677    ** connections.  This is useful if you don't want to be prompted to
678    ** user/password pairs on Madmutt invocation, or if opening the connection
679    ** is slow.
680    */
681   {"imap_reconnect", DT_QUAD, OPT_IMAPRECONNECT, "ask-yes" },
682   /*
683    ** .pp
684    ** Controls whether or not Madmutt will try to reconnect to IMAP server when
685    ** the connection is lost.
686    */
687   {"imap_servernoise", DT_BOOL, OPTIMAPSERVERNOISE, "yes" },
688   /*
689    ** .pp
690    ** When \fIset\fP, Madmutt will display warning messages from the IMAP
691    ** server as error messages. Since these messages are often
692    ** harmless, or generated due to configuration problems on the
693    ** server which are out of the users' hands, you may wish to suppress
694    ** them at some point.
695    */
696   {"imap_user", DT_STR, UL &ImapUser, "" },
697   /*
698    ** .pp
699    ** The name of the user whose mail you intend to access on the IMAP
700    ** server.
701    ** .pp
702    ** This variable defaults to your user name on the local machine.
703    */
704   {"implicit_autoview", DT_BOOL, OPTIMPLICITAUTOVIEW, "no" },
705   /*
706    ** .pp
707    ** If \fIset\fP, Madmutt will look for a mailcap entry with the
708    ** ``\fTcopiousoutput\fP'' flag set for \fIevery\fP MIME attachment it doesn't have
709    ** an internal viewer defined for.  If such an entry is found, Madmutt will
710    ** use the viewer defined in that entry to convert the body part to text
711    ** form.
712    */
713   {"include", DT_QUAD, OPT_INCLUDE, "ask-yes" },
714   /*
715    ** .pp
716    ** Controls whether or not a copy of the message(s) you are replying to
717    ** is included in your reply.
718    */
719   {"indent_string", DT_STR, UL &Prefix, "> "},
720   /*
721    ** .pp
722    ** Specifies the string to prepend to each line of text quoted in a
723    ** message to which you are replying.  You are strongly encouraged not to
724    ** change this value, as it tends to agitate the more fanatical netizens.
725    */
726   {"index_format", DT_STR, UL &HdrFmt, "%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s"},
727   /*
728    ** .pp
729    ** This variable allows you to customize the message index display to
730    ** your personal taste.
731    ** .pp
732    ** ``Format strings'' are similar to the strings used in the ``C''
733    ** function \fTprintf(3)\fP to format output (see the man page for more detail).
734    ** The following sequences are defined in Madmutt:
735    ** .pp
736    ** .dl
737    ** .dt %a .dd address of the author
738    ** .dt %A .dd reply-to address (if present; otherwise: address of author)
739    ** .dt %b .dd filename of the original message folder (think mailBox)
740    ** .dt %B .dd the list to which the letter was sent, or else the folder name (%b).
741    ** .dt %c .dd number of characters (bytes) in the message
742    ** .dt %C .dd current message number
743    ** .dt %d .dd date and time of the message in the format specified by
744    **            ``date_format'' converted to sender's time zone
745    ** .dt %D .dd date and time of the message in the format specified by
746    **            ``date_format'' converted to the local time zone
747    ** .dt %e .dd current message number in thread
748    ** .dt %E .dd number of messages in current thread
749    ** .dt %f .dd entire From: line (address + real name)
750    ** .dt %F .dd author name, or recipient name if the message is from you
751    ** .dt %H .dd spam attribute(s) of this message
752    ** .dt %g .dd newsgroup name (if compiled with nntp support)
753    ** .dt %i .dd message-id of the current message
754    ** .dt %l .dd number of lines in the message (does not work with maildir,
755    **            mh, and possibly IMAP folders)
756    ** .dt %L .dd If an address in the To or CC header field matches an address
757    **            defined by the users ``subscribe'' command, this displays
758    **            "To <list-name>", otherwise the same as %F.
759    ** .dt %m .dd total number of message in the mailbox
760    ** .dt %M .dd number of hidden messages if the thread is collapsed.
761    ** .dt %N .dd message score
762    ** .dt %n .dd author's real name (or address if missing)
763    ** .dt %O .dd (_O_riginal save folder)  Where Madmutt would formerly have
764    **            stashed the message: list name or recipient name if no list
765    ** .dt %s .dd subject of the message
766    ** .dt %S .dd status of the message (N/D/d/!/r/\(as)
767    ** .dt %t .dd `to:' field (recipients)
768    ** .dt %T .dd the appropriate character from the $$to_chars string
769    ** .dt %u .dd user (login) name of the author
770    ** .dt %v .dd first name of the author, or the recipient if the message is from you
771    ** .dt %W .dd name of organization of author (`organization:' field)
772    ** .dt %X .dd number of attachments
773    ** .dt %y .dd `x-label:' field, if present
774    ** .dt %Y .dd `x-label' field, if present, and (1) not at part of a thread tree,
775    **            (2) at the top of a thread, or (3) `x-label' is different from
776    **            preceding message's `x-label'.
777    ** .dt %Z .dd message status flags
778    ** .dt %{fmt} .dd the date and time of the message is converted to sender's
779    **                time zone, and ``fmt'' is expanded by the library function
780    **                ``strftime''; a leading bang disables locales
781    ** .dt %[fmt] .dd the date and time of the message is converted to the local
782    **                time zone, and ``fmt'' is expanded by the library function
783    **                ``strftime''; a leading bang disables locales
784    ** .dt %(fmt) .dd the local date and time when the message was received.
785    **                ``fmt'' is expanded by the library function ``strftime'';
786    **                a leading bang disables locales
787    ** .dt %<fmt> .dd the current local time. ``fmt'' is expanded by the library
788    **                function ``strftime''; a leading bang disables locales.
789    ** .dt %>X    .dd right justify the rest of the string and pad with character "X"
790    ** .dt %|X    .dd pad to the end of the line with character "X"
791    ** .de
792    ** .pp
793    ** See also: ``$$to_chars''.
794    */
795   {"keep_flagged", DT_BOOL, OPTKEEPFLAGGED, "no" },
796   /*
797    ** .pp
798    ** If \fIset\fP, read messages marked as flagged will not be moved
799    ** from your spool mailbox to your ``$$mbox'' mailbox, or as a result of
800    ** a ``$mbox-hook'' command.
801    */
802   {"locale", DT_STR, UL &Locale, "C"},
803   /*
804    ** .pp
805    ** The locale used by \fTstrftime(3)\fP to format dates. Legal values are
806    ** the strings your system accepts for the locale variable \fTLC_TIME\fP.
807    */
808   {"force_list_reply", DT_QUAD, OPT_LISTREPLY, "ask-no" },
809   /*
810    ** .pp
811    ** This variable controls what effect ordinary replies have on mailing list
812    ** messages: if \fIset\fP, a normal reply will be interpreted as list-reply
813    ** while if it's \fIunset\fP the reply functions work as usual.
814    */
815   {"max_display_recips", DT_NUM, UL &MaxDispRecips, "0" },
816   /*
817    ** .pp
818    ** When set non-zero, this specifies the maximum number of recipient header
819    ** lines (\fTTo:\fP, \fTCc:\fP and \fTBcc:\fP) to display in the pager if header
820    ** weeding is turned on. In case the number of lines exeeds its value, the
821    ** last line will have 3 dots appended.
822    */
823   {"max_line_length", DT_NUM, UL &MaxLineLength, "0" },
824   /*
825    ** .pp
826    ** When \fIset\fP, the maximum line length for displaying ``format = flowed'' messages is limited
827    ** to this length. A value of 0 (which is also the default) means that the
828    ** maximum line length is determined by the terminal width and $$wrapmargin.
829    */
830   {"maildir_trash", DT_BOOL, OPTMAILDIRTRASH, "no" },
831   /*
832    ** .pp
833    ** If \fIset\fP, messages marked as deleted will be saved with the maildir
834    ** (T)rashed flag instead of physically deleted.
835    ** .pp
836    ** \fBNOTE:\fP this only applies
837    ** to maildir-style mailboxes. Setting it will have no effect on other
838    ** mailbox types.
839    ** .pp
840    ** It is similiar to the trash option.
841    */
842   {"mark_old", DT_BOOL, OPTMARKOLD, "yes" },
843   /*
844    ** .pp
845    ** Controls whether or not Madmutt marks \fInew\fP \fBunread\fP
846    ** messages as \fIold\fP if you exit a mailbox without reading them.
847    ** .pp
848    ** With this option \fIset\fP, the next time you start Madmutt, the messages
849    ** will show up with an "O" next to them in the ``index'' menu,
850    ** indicating that they are old.
851    */
852   {"markers", DT_BOOL, OPTMARKERS, "yes" },
853   /*
854    ** .pp
855    ** Controls the display of wrapped lines in the internal pager. If set, a
856    ** ``\fT+\fP'' marker is displayed at the beginning of wrapped lines. Also see
857    ** the ``$$smart_wrap'' variable.
858    */
859   {"mask", DT_RX, UL &Mask, "!^\\.[^.]"},
860   /*
861    ** .pp
862    ** A regular expression used in the file browser, optionally preceded by
863    ** the \fInot\fP operator ``\fT!\fP''.  Only files whose names match this mask
864    ** will be shown. The match is always case-sensitive.
865    */
866   {"mbox", DT_PATH, UL &Inbox, "~/mbox"},
867   /*
868    ** .pp
869    ** This specifies the folder into which read mail in your ``$$spoolfile''
870    ** folder will be appended.
871    */
872   {"sidebar_boundary", DT_STR, UL &SidebarBoundary, "." },
873   /*
874    ** .pp
875    ** When the sidebar is displayed and $$sidebar_shorten_hierarchy is \fIset\fP, this
876    ** variable specifies the characters at which to split a folder name into
877    ** ``hierarchy items.''
878    */
879   {"sidebar_visible", DT_BOOL, OPTMBOXPANE, "no" },
880   /*
881    ** .pp
882    ** This specifies whether or not to show the sidebar (a list of folders specified
883    ** with the ``mailboxes'' command).
884    */
885   {"sidebar_width", DT_NUM, UL &SidebarWidth, "0" },
886   /*
887    ** .pp
888    ** The width of the sidebar.
889    */
890   {"sidebar_newmail_only", DT_BOOL, OPTSIDEBARNEWMAILONLY, "no" },
891   /*
892    ** .pp
893    ** If \fIset\fP, only folders with new mail will be shown in the sidebar.
894    */
895   {"sidebar_number_format", DT_STR, UL &SidebarNumberFormat, "%m%?n?(%n)?%?f?[%f]?"},
896   /*
897    ** .pp
898    ** This variable controls how message counts are printed when the sidebar
899    ** is enabled. If this variable is \fIempty\fP (\fIand only if\fP), no numbers
900    ** will be printed \fIand\fP Madmutt won't frequently count mail (which
901    ** may be a great speedup esp. with mbox-style mailboxes.)
902    ** .pp
903    ** The following \fTprintf(3)\fP-like sequences are supported all of which
904    ** may be printed non-zero:
905    ** .pp
906    ** .dl
907    ** .dt %d .dd Number of deleted messages. 1)
908    ** .dt %F .dd Number of flagged messages.
909    ** .dt %m .dd Total number of messages.
910    ** .dt %M .dd Total number of messages shown, i.e. not hidden by a limit. 1)
911    ** .dt %n .dd Number of new messages.
912    ** .dt %t .dd Number of tagged messages. 1)
913    ** .dt %u .dd Number of unread messages.
914    ** .de
915    ** .pp
916    ** 1) These expandos only have a non-zero value for the current mailbox and
917    ** will always be zero otherwise.
918    */
919   {"sidebar_shorten_hierarchy", DT_BOOL, OPTSHORTENHIERARCHY, "no" },
920   /*
921    ** .pp
922    ** When \fIset\fP, the ``hierarchy'' of the sidebar entries will be shortened
923    ** only if they cannot be printed in full length (because ``$$sidebar_width''
924    ** is set to a too low value). For example, if the newsgroup name
925    ** ``de.alt.sysadmin.recovery'' doesn't fit on the screen, it'll get shortened
926    ** ``d.a.s.recovery'' while ``de.alt.d0'' still would and thus will not get
927    ** shortened.
928    ** .pp
929    ** At which characters this compression is done is controled via the
930    ** $$sidebar_boundary variable.
931    */
932   {"mbox_type", DT_MAGIC, UL &DefaultMagic, "mbox" },
933   /*
934    ** .pp
935    ** The default mailbox type used when creating new folders. May be any of
936    ** \fTmbox\fP, \fTMH\fP and \fTMaildir\fP.
937    */
938   {"metoo", DT_BOOL, OPTMETOO, "no" },
939   /*
940    ** .pp
941    ** If \fIunset\fP, Madmutt will remove your address (see the ``alternates''
942    ** command) from the list of recipients when replying to a message.
943    */
944   {"menu_context", DT_NUM, UL &MenuContext, "0" },
945   /*
946    ** .pp
947    ** This variable controls the number of lines of context that are given
948    ** when scrolling through menus. (Similar to ``$$pager_context''.)
949    */
950   {"mh_purge", DT_BOOL, OPTMHPURGE, "no" },
951   /*
952    ** .pp
953    ** When \fIunset\fP, Madmutt will mimic mh's behaviour and rename deleted messages
954    ** to \fI,<old file name>\fP in mh folders instead of really deleting
955    ** them.  If the variable is set, the message files will simply be
956    ** deleted.
957    */
958   {"mh_seq_flagged", DT_STR, UL &MhFlagged, "flagged"},
959   /*
960    ** .pp
961    ** The name of the MH sequence used for flagged messages.
962    */
963   {"mh_seq_replied", DT_STR, UL &MhReplied, "replied"},
964   /*
965    ** .pp
966    ** The name of the MH sequence used to tag replied messages.
967    */
968   {"mh_seq_unseen", DT_STR, UL &MhUnseen, "unseen"},
969   /*
970    ** .pp
971    ** The name of the MH sequence used for unseen messages.
972    */
973   {"mime_forward", DT_QUAD, OPT_MIMEFWD, "no" },
974   /*
975    ** .pp
976    ** When \fIset\fP, the message you are forwarding will be attached as a
977    ** separate MIME part instead of included in the main body of the
978    ** message.
979    ** .pp
980    ** This is useful for forwarding MIME messages so the receiver
981    ** can properly view the message as it was delivered to you. If you like
982    ** to switch between MIME and not MIME from mail to mail, set this
983    ** variable to ask-no or ask-yes.
984    ** .pp
985    ** Also see ``$$forward_decode'' and ``$$mime_forward_decode''.
986    */
987   {"mime_forward_decode", DT_BOOL, OPTMIMEFORWDECODE, "no" },
988   /*
989    ** .pp
990    ** Controls the decoding of complex MIME messages into \fTtext/plain\fP when
991    ** forwarding a message while ``$$mime_forward'' is \fIset\fP. Otherwise
992    ** ``$$forward_decode'' is used instead.
993    */
994   {"mime_forward_rest", DT_QUAD, OPT_MIMEFWDREST, "yes" },
995   /*
996    ** .pp
997    ** When forwarding multiple attachments of a MIME message from the recvattach
998    ** menu, attachments which cannot be decoded in a reasonable manner will
999    ** be attached to the newly composed message if this option is set.
1000    */
1001   {"move", DT_QUAD, OPT_MOVE, "ask-no" },
1002   /*
1003    ** .pp
1004    ** Controls whether or not Madmutt will move read messages
1005    ** from your spool mailbox to your ``$$mbox'' mailbox, or as a result of
1006    ** a ``$mbox-hook'' command.
1007    */
1008   {"message_format", DT_STR, UL &MsgFmt, "%s"},
1009   /*
1010    ** .pp
1011    ** This is the string displayed in the ``attachment'' menu for
1012    ** attachments of type \fTmessage/rfc822\fP.  For a full listing of defined
1013    ** \fTprintf(3)\fP-like sequences see the section on ``$$index_format''.
1014    */
1015   {"msgid_format", DT_STR, UL &MsgIdFormat, "%Y%m%d%h%M%s.G%P%p"},
1016   /*
1017    ** .pp
1018    ** This is the format for the ``local part'' of the \fTMessage-ID:\fP header
1019    ** field generated by Madmutt. If this variable is empty, no \fTMessage-ID:\fP
1020    ** headers will be generated. The '%'
1021    ** character marks that certain data will be added to the string, similar to
1022    ** \fTprintf(3)\fP. The following characters are allowed:
1023    ** .pp
1024    ** .dl
1025    ** .dt %d .dd the current day of month
1026    ** .dt %h .dd the current hour
1027    ** .dt %m .dd the current month
1028    ** .dt %M .dd the current minute
1029    ** .dt %O .dd the current UNIX timestamp (octal)
1030    ** .dt %p .dd the process ID
1031    ** .dt %P .dd the current Message-ID prefix (a character rotating with
1032    **            every Message-ID being generated)
1033    ** .dt %r .dd a random integer value (decimal)
1034    ** .dt %R .dd a random integer value (hexadecimal)
1035    ** .dt %s .dd the current second
1036    ** .dt %T .dd the current UNIX timestamp (decimal)
1037    ** .dt %X .dd the current UNIX timestamp (hexadecimal)
1038    ** .dt %Y .dd the current year (Y2K compliant)
1039    ** .dt %% .dd the '%' character
1040    ** .de
1041    ** .pp
1042    ** \fBNote:\fP Please only change this setting if you know what you are doing.
1043    ** Also make sure to consult RFC2822 to produce technically \fIvalid\fP strings.
1044    */
1045   {"narrow_tree", DT_BOOL, OPTNARROWTREE, "no" },
1046   /*
1047    ** .pp
1048    ** This variable, when \fIset\fP, makes the thread tree narrower, allowing
1049    ** deeper threads to fit on the screen.
1050    */
1051   { "net_inc", DT_NUM, UL &NetInc, "10" },
1052   /*
1053   ** .pp
1054   ** Operations that expect to transfer a large amount of data over the
1055   ** network will update their progress every \fInet_inc\fP kilobytes.
1056   ** If set to 0, no progress messages will be displayed.
1057   ** .pp
1058   ** See also ``$$read_inc'' and ``$$write_inc''.
1059   */
1060   {"pager_context", DT_NUM, UL &PagerContext, "0" },
1061   /*
1062    ** .pp
1063    ** This variable controls the number of lines of context that are given
1064    ** when displaying the next or previous page in the internal pager.  By
1065    ** default, Madmutt will display the line after the last one on the screen
1066    ** at the top of the next page (0 lines of context).
1067    */
1068   {"pager_format", DT_STR, UL &PagerFmt, "-%Z- %C/%m: %-20.20n   %s"},
1069   /*
1070    ** .pp
1071    ** This variable controls the format of the one-line message ``status''
1072    ** displayed before each message in either the internal or an external
1073    ** pager.  The valid sequences are listed in the ``$$index_format''
1074    ** section.
1075    */
1076   {"pager_index_lines", DT_NUM, UL &PagerIndexLines, "0" },
1077   /*
1078    ** .pp
1079    ** Determines the number of lines of a mini-index which is shown when in
1080    ** the pager.  The current message, unless near the top or bottom of the
1081    ** folder, will be roughly one third of the way down this mini-index,
1082    ** giving the reader the context of a few messages before and after the
1083    ** message.  This is useful, for example, to determine how many messages
1084    ** remain to be read in the current thread.  One of the lines is reserved
1085    ** for the status bar from the index, so a \fIpager_index_lines\fP of 6
1086    ** will only show 5 lines of the actual index.  A value of 0 results in
1087    ** no index being shown.  If the number of messages in the current folder
1088    ** is less than \fIpager_index_lines\fP, then the index will only use as
1089    ** many lines as it needs.
1090    */
1091   {"pager_stop", DT_BOOL, OPTPAGERSTOP, "no" },
1092   /*
1093    ** .pp
1094    ** When \fIset\fP, the internal-pager will \fBnot\fP move to the next message
1095    ** when you are at the end of a message and invoke the \fInext-page\fP
1096    ** function.
1097    */
1098   {"pgp_retainable_sigs", DT_BOOL, OPTPGPRETAINABLESIG, "no" },
1099   /*
1100    ** .pp
1101    ** If \fIset\fP, signed and encrypted messages will consist of nested
1102    ** multipart/signed and multipart/encrypted body parts.
1103    ** .pp
1104    ** This is useful for applications like encrypted and signed mailing
1105    ** lists, where the outer layer (multipart/encrypted) can be easily
1106    ** removed, while the inner multipart/signed part is retained.
1107    ** (PGP only)
1108    */
1109   {"pgp_show_unusable", DT_BOOL, OPTPGPSHOWUNUSABLE, "yes" },
1110   /*
1111    ** .pp
1112    ** If \fIset\fP, Madmutt will display non-usable keys on the PGP key selection
1113    ** menu.  This includes keys which have been revoked, have expired, or
1114    ** have been marked as ``disabled'' by the user.
1115    ** (PGP only)
1116    */
1117   {"pgp_sign_as", DT_STR, UL &PgpSignAs, "" },
1118   /*
1119    ** .pp
1120    ** If you have more than one key pair, this option allows you to specify
1121    ** which of your private keys to use.  It is recommended that you use the
1122    ** keyid form to specify your key (e.g., ``\fT0x00112233\fP'').
1123    ** (PGP only)
1124    */
1125   {"pgp_sort_keys", DT_SORT|DT_SORT_KEYS, UL &PgpSortKeys, "address" },
1126   /*
1127    ** .pp
1128    ** Specifies how the entries in the ``pgp keys'' menu are sorted. The
1129    ** following are legal values:
1130    ** .pp
1131    ** .dl
1132    ** .dt address .dd sort alphabetically by user id
1133    ** .dt keyid   .dd sort alphabetically by key id
1134    ** .dt date    .dd sort by key creation date
1135    ** .dt trust   .dd sort by the trust of the key
1136    ** .de
1137    ** .pp
1138    ** If you prefer reverse order of the above values, prefix it with
1139    ** ``reverse-''.
1140    ** (PGP only)
1141    */
1142   {"forward_decrypt", DT_BOOL, OPTFORWDECRYPT, "yes" },
1143   /*
1144    ** .pp
1145    ** Controls the handling of encrypted messages when forwarding a message.
1146    ** When \fIset\fP, the outer layer of encryption is stripped off.  This
1147    ** variable is only used if ``$$mime_forward'' is \fIset\fP and
1148    ** ``$$mime_forward_decode'' is \fIunset\fP.
1149    ** (PGP only)
1150    */
1151   {"smime_encrypt_with", DT_STR, UL &SmimeCryptAlg, "" },
1152   /*
1153    ** .pp
1154    ** This sets the algorithm that should be used for encryption.
1155    ** Valid choices are ``\fTdes\fP'', ``\fTdes3\fP'', ``\fTrc2-40\fP'',
1156    ** ``\fTrc2-64\fP'', ``\frc2-128\fP''.
1157    ** .pp
1158    ** If \fIunset\fP ``\fI3des\fP'' (TripleDES) is used.
1159    ** (S/MIME only)
1160    */
1161   {"smime_default_key", DT_STR, UL &SmimeDefaultKey, "" },
1162   /*
1163    ** .pp
1164    ** This is the default key-pair to use for signing. This must be set to the
1165    ** keyid (the hash-value that OpenSSL generates) to work properly
1166    ** (S/MIME only)
1167    */
1168   {"pipe_split", DT_BOOL, OPTPIPESPLIT, "no" },
1169   /*
1170    ** .pp
1171    ** Used in connection with the \fIpipe-message\fP command and the ``tag-
1172    ** prefix'' or ``tag-prefix-cond'' operators.
1173    ** If this variable is \fIunset\fP, when piping a list of
1174    ** tagged messages Madmutt will concatenate the messages and will pipe them
1175    ** as a single folder.  When \fIset\fP, Madmutt will pipe the messages one by one.
1176    ** In both cases the messages are piped in the current sorted order,
1177    ** and the ``$$pipe_sep'' separator is added after each message.
1178    */
1179   {"pipe_decode", DT_BOOL, OPTPIPEDECODE, "no" },
1180   /*
1181    ** .pp
1182    ** Used in connection with the \fIpipe-message\fP command.  When \fIunset\fP,
1183    ** Madmutt will pipe the messages without any preprocessing. When \fIset\fP, Madmutt
1184    ** will weed headers and will attempt to PGP/MIME decode the messages
1185    ** first.
1186    */
1187   {"pipe_sep", DT_STR, UL &PipeSep, "\n"},
1188   /*
1189    ** .pp
1190    ** The separator to add between messages when piping a list of tagged
1191    ** messages to an external Unix command.
1192    */
1193   {"pop_authenticators", DT_STR, UL &PopAuthenticators, "" },
1194   /*
1195    ** .pp
1196    ** This is a colon-delimited list of authentication methods Madmutt may
1197    ** attempt to use to log in to an POP server, in the order Madmutt should
1198    ** try them.  Authentication methods are either ``\fTuser\fP'', ``\fTapop\fP''
1199    ** or any SASL mechanism, eg ``\fTdigest-md5\fP'', ``\fTgssapi\fP'' or ``\fTcram-md5\fP''.
1200    ** .pp
1201    ** This parameter is case-insensitive. If this parameter is \fIunset\fP
1202    ** (the default) Madmutt will try all available methods, in order from
1203    ** most-secure to least-secure.
1204    ** .pp
1205    ** Example: \fTset pop_authenticators="digest-md5:apop:user"\fP
1206    */
1207   {"pop_mail_check", DT_NUM, UL &PopCheckTimeout, "60" },
1208   /*
1209    ** .pp
1210    ** This variable configures how often (in seconds) Madmutt should look for
1211    ** new mail.
1212    */
1213   {"pop_delete", DT_QUAD, OPT_POPDELETE, "ask-no" },
1214   /*
1215    ** .pp
1216    ** If \fIset\fP, Madmutt will delete successfully downloaded messages from the POP
1217    ** server when using the ``fetch-mail'' function.  When \fIunset\fP, Madmutt will
1218    ** download messages but also leave them on the POP server.
1219    */
1220   {"pop_host", DT_STR, UL &PopHost, ""},
1221   /*
1222    ** .pp
1223    ** The name of your POP server for the ``fetch-mail'' function.  You
1224    ** can also specify an alternative port, username and password, i.e.:
1225    ** .pp
1226    ** \fT[pop[s]://][username[:password]@]popserver[:port]\fP
1227    ** .pp
1228    ** \fBNote:\fP Storing passwords in a configuration file
1229    ** presents a security risk since the superuser of your machine may read it
1230    ** regardless of the file's permissions.
1231    */
1232   {"pop_last", DT_BOOL, OPTPOPLAST, "no" },
1233   /*
1234    ** .pp
1235    ** If this variable is \fIset\fP, Madmutt will try to use the ``\fTLAST\fP'' POP command
1236    ** for retrieving only unread messages from the POP server when using
1237    ** the ``fetch-mail'' function.
1238    */
1239   {"pop_reconnect", DT_QUAD, OPT_POPRECONNECT, "ask-yes" },
1240   /*
1241    ** .pp
1242    ** Controls whether or not Madmutt will try to reconnect to a POP server if the
1243    ** connection is lost.
1244    */
1245   {"pop_user", DT_STR, UL &PopUser, "" },
1246   /*
1247    ** .pp
1248    ** Your login name on the POP server.
1249    ** .pp
1250    ** This variable defaults to your user name on the local machine.
1251    */
1252   {"pop_pass", DT_STR, UL &PopPass, ""},
1253   /*
1254    ** .pp
1255    ** Specifies the password for your POP account.  If \fIunset\fP, Madmutt will
1256    ** prompt you for your password when you open POP mailbox.
1257    ** .pp
1258    ** \fBNote:\fP Storing passwords in a configuration file
1259    ** presents a security risk since the superuser of your machine may read it
1260    ** regardless of the file's permissions.
1261    */
1262   {"postpone", DT_QUAD, OPT_POSTPONE, "ask-yes" },
1263   /*
1264    ** .pp
1265    ** Controls whether or not messages are saved in the ``$$postponed''
1266    ** mailbox when you elect not to send immediately.
1267    */
1268   {"postponed", DT_PATH, UL &Postponed, "~/postponed"},
1269   /*
1270    ** .pp
1271    ** Madmutt allows you to indefinitely ``$postpone sending a message'' which
1272    ** you are editing.  When you choose to postpone a message, Madmutt saves it
1273    ** in the mailbox specified by this variable.  Also see the ``$$postpone''
1274    ** variable.
1275    */
1276   {"preconnect", DT_STR, UL &Preconnect, "" },
1277   /*
1278    ** .pp
1279    ** If \fIset\fP, a shell command to be executed if Madmutt fails to establish
1280    ** a connection to the server. This is useful for setting up secure
1281    ** connections, e.g. with \fTssh(1)\fP. If the command returns a  nonzero
1282    ** status, Madmutt gives up opening the server. Example:
1283    ** .pp
1284    ** \fTpreconnect="ssh -f -q -L 1234:mailhost.net:143 mailhost.net
1285    **                sleep 20 < /dev/null > /dev/null"\fP
1286    ** .pp
1287    ** Mailbox ``foo'' on mailhost.net can now be reached
1288    ** as ``{localhost:1234}foo''.
1289    ** .pp
1290    ** \fBNote:\fP For this example to work, you must be able to log in to the
1291    ** remote machine without having to enter a password.
1292    */
1293   {"print", DT_QUAD, OPT_PRINT, "ask-no" },
1294   /*
1295    ** .pp
1296    ** Controls whether or not Madmutt really prints messages.
1297    ** This is set to \fIask-no\fP by default, because some people
1298    ** accidentally hit ``p'' often.
1299    */
1300   {"print_command", DT_PATH, UL &PrintCmd, "lpr"},
1301   /*
1302    ** .pp
1303    ** This specifies the command pipe that should be used to print messages.
1304    */
1305   {"print_decode", DT_BOOL, OPTPRINTDECODE, "yes" },
1306   /*
1307    ** .pp
1308    ** Used in connection with the print-message command.  If this
1309    ** option is \fIset\fP, the message is decoded before it is passed to the
1310    ** external command specified by $$print_command.  If this option
1311    ** is \fIunset\fP, no processing will be applied to the message when
1312    ** printing it.  The latter setting may be useful if you are using
1313    ** some advanced printer filter which is able to properly format
1314    ** e-mail messages for printing.
1315    */
1316   {"print_split", DT_BOOL, OPTPRINTSPLIT, "no" },
1317   /*
1318    ** .pp
1319    ** Used in connection with the print-message command.  If this option
1320    ** is \fIset\fP, the command specified by $$print_command is executed once for
1321    ** each message which is to be printed.  If this option is \fIunset\fP,
1322    ** the command specified by $$print_command is executed only once, and
1323    ** all the messages are concatenated, with a form feed as the message
1324    ** separator.
1325    ** .pp
1326    ** Those who use the \fTenscript(1)\fP program's mail-printing mode will
1327    ** most likely want to set this option.
1328    */
1329   {"prompt_after", DT_BOOL, OPTPROMPTAFTER, "yes" },
1330   /*
1331    ** .pp
1332    ** If you use an \fIexternal\fP ``$$pager'', setting this variable will
1333    ** cause Madmutt to prompt you for a command when the pager exits rather
1334    ** than returning to the index menu.  If \fIunset\fP, Madmutt will return to the
1335    ** index menu when the external pager exits.
1336    */
1337   {"query_command", DT_PATH, UL &QueryCmd, ""},
1338   /*
1339    ** .pp
1340    ** This specifies the command that Madmutt will use to make external address
1341    ** queries.  The string should contain a \fT%s\fP, which will be substituted
1342    ** with the query string the user types.  See ``$query'' for more
1343    ** information.
1344    */
1345   {"quote_empty", DT_BOOL, OPTQUOTEEMPTY, "yes" },
1346   /*
1347    ** .pp
1348    ** Controls whether or not empty lines will be quoted using
1349    ** ``$indent_string''.
1350    */
1351   {"quote_quoted", DT_BOOL, OPTQUOTEQUOTED, "no" },
1352   /*
1353    ** .pp
1354    ** Controls how quoted lines will be quoted. If \fIset\fP, one quote
1355    ** character will be added to the end of existing prefix.  Otherwise,
1356    ** quoted lines will be prepended by ``$indent_string''.
1357    */
1358   {"quote_regexp", DT_RX, UL &QuoteRegexp, "^([ \t]*[|>:}#])+"},
1359   /*
1360    ** .pp
1361    ** A regular expression used in the internal-pager to determine quoted
1362    ** sections of text in the body of a message.
1363    ** .pp
1364    ** \fBNote:\fP In order to use the \fIquoted\fP\fBx\fP patterns in the
1365    ** internal pager, you need to set this to a regular expression that
1366    ** matches \fIexactly\fP the quote characters at the beginning of quoted
1367    ** lines.
1368    */
1369   {"read_inc", DT_NUM, UL &ReadInc, "10" },
1370   /*
1371    ** .pp
1372    ** If set to a value greater than 0, Madmutt will display which message it
1373    ** is currently on when reading a mailbox.  The message is printed after
1374    ** \fIread_inc\fP messages have been read (e.g., if set to 25, Madmutt will
1375    ** print a message when it reads message 25, and then again when it gets
1376    ** to message 50).  This variable is meant to indicate progress when
1377    ** reading large mailboxes which may take some time.
1378    ** When set to 0, only a single message will appear before the reading
1379    ** the mailbox.
1380    ** .pp
1381    ** Also see the ``$$write_inc'' variable.
1382    */
1383   {"realname", DT_STR, UL &Realname, "" },
1384   /*
1385    ** .pp
1386    ** This variable specifies what ``real'' or ``personal'' name should be used
1387    ** when sending messages.
1388    ** .pp
1389    ** By default, this is the GECOS field from \fT/etc/passwd\fP.
1390    ** .pp
1391    ** \fINote:\fP This
1392    ** variable will \fInot\fP be used when the user has set a real name
1393    ** in the $$from variable.
1394    */
1395   {"recall", DT_QUAD, OPT_RECALL, "ask-yes" },
1396   /*
1397    ** .pp
1398    ** Controls whether or not Madmutt recalls postponed messages
1399    ** when composing a new message.  Also see ``$$postponed''.
1400    ** .pp
1401    ** Setting this variable to \fIyes\fP is not generally useful, and thus not
1402    ** recommended.
1403    */
1404   {"reply_regexp", DT_RX, UL &ReplyRegexp, "^(re([\\[0-9\\]+])*|aw):[ \t]*"},
1405   /*
1406    ** .pp
1407    ** A regular expression used to recognize reply messages when threading
1408    ** and replying. The default value corresponds to the English ``Re:'' and
1409    ** the German ``Aw:''.
1410    */
1411   {"reply_to", DT_QUAD, OPT_REPLYTO, "ask-yes" },
1412   /*
1413    ** .pp
1414    ** If \fIset\fP, when replying to a message, Madmutt will use the address listed
1415    ** in the ``\fTReply-To:\fP'' header field as the recipient of the reply.  If \fIunset\fP,
1416    ** it will use the address in the ``\fTFrom:\fP'' header field instead.
1417    ** .pp
1418    ** This
1419    ** option is useful for reading a mailing list that sets the ``\fTReply-To:\fP''
1420    ** header field to the list address and you want to send a private
1421    ** message to the author of a message.
1422    */
1423   {"resolve", DT_BOOL, OPTRESOLVE, "yes" },
1424   /*
1425    ** .pp
1426    ** When set, the cursor will be automatically advanced to the next
1427    ** (possibly undeleted) message whenever a command that modifies the
1428    ** current message is executed.
1429    */
1430   {"reverse_alias", DT_BOOL, OPTREVALIAS, "no" },
1431   /*
1432    ** .pp
1433    ** This variable controls whether or not Madmutt will display the ``personal''
1434    ** name from your aliases in the index menu if it finds an alias that
1435    ** matches the message's sender.  For example, if you have the following
1436    ** alias:
1437    ** .pp
1438    **  \fTalias juser abd30425@somewhere.net (Joe User)\fP
1439    ** .pp
1440    ** and then you receive mail which contains the following header:
1441    ** .pp
1442    **  \fTFrom: abd30425@somewhere.net\fP
1443    ** .pp
1444    ** It would be displayed in the index menu as ``Joe User'' instead of
1445    ** ``abd30425@somewhere.net.''  This is useful when the person's e-mail
1446    ** address is not human friendly (like CompuServe addresses).
1447    */
1448   {"reverse_name", DT_BOOL, OPTREVNAME, "no" },
1449   /*
1450    ** .pp
1451    ** It may sometimes arrive that you receive mail to a certain machine,
1452    ** move the messages to another machine, and reply to some the messages
1453    ** from there.  If this variable is \fIset\fP, the default \fTFrom:\fP line of
1454    ** the reply messages is built using the address where you received the
1455    ** messages you are replying to \fBif\fP that address matches your
1456    ** alternates.  If the variable is \fIunset\fP, or the address that would be
1457    ** used doesn't match your alternates, the \fTFrom:\fP line will use
1458    ** your address on the current machine.
1459    */
1460   {"reverse_realname", DT_BOOL, OPTREVREAL, "yes" },
1461   /*
1462    ** .pp
1463    ** This variable fine-tunes the behaviour of the $reverse_name feature.
1464    ** When it is \fIset\fP, Madmutt will use the address from incoming messages as-is,
1465    ** possibly including eventual real names.  When it is \fIunset\fP, Madmutt will
1466    ** override any such real names with the setting of the $realname variable.
1467    */
1468   {"sig_dashes", DT_BOOL, OPTSIGDASHES, "yes" },
1469   /*
1470    ** .pp
1471    ** If set, a line containing ``\fT-- \fP'' (dash, dash, space)
1472    ** will be inserted before your ``$$signature''.  It is \fBstrongly\fP
1473    ** recommended that you not unset this variable unless your ``signature''
1474    ** contains just your name. The reason for this is because many software
1475    ** packages use ``\fT-- \n\fP'' to detect your signature.
1476    ** .pp
1477    ** For example, Madmutt has the ability to highlight
1478    ** the signature in a different color in the builtin pager.
1479    */
1480   {"signoff_string", DT_STR, UL &SignOffString, "" },
1481   /*
1482    ** .pp
1483    ** If \fIset\fP, this string will be inserted before the signature. This is useful
1484    ** for people that want to sign off every message they send with their name.
1485    ** .pp
1486    ** If you want to insert your website's URL, additional contact information or
1487    ** witty quotes into your mails, better use a signature file instead of
1488    ** the signoff string.
1489    */
1490   {"simple_search", DT_STR, UL &SimpleSearch, "~f %s | ~s %s"},
1491   /*
1492    ** .pp
1493    ** Specifies how Madmutt should expand a simple search into a real search
1494    ** pattern.  A simple search is one that does not contain any of the ~
1495    ** operators.  See ``$patterns'' for more information on search patterns.
1496    ** .pp
1497    ** For example, if you simply type ``joe'' at a search or limit prompt, Madmutt
1498    ** will automatically expand it to the value specified by this variable.
1499    ** For the default value it would be:
1500    ** .pp
1501    ** \fT~f joe | ~s joe\fP
1502    */
1503   {"smart_wrap", DT_BOOL, OPTWRAP, "yes" },
1504   /*
1505    ** .pp
1506    ** Controls the display of lines longer than the screen width in the
1507    ** internal pager. If \fIset\fP, long lines are wrapped at a word boundary.
1508    ** If \fIunset\fP, lines are simply wrapped at the screen edge. Also see the
1509    ** ``$$markers'' variable.
1510    */
1511   {"smileys", DT_RX, UL &Smileys, "(>From )|(:[-^]?[][)(><}{|/DP])"},
1512   /*
1513    ** .pp
1514    ** The \fIpager\fP uses this variable to catch some common false
1515    ** positives of ``$$quote_regexp'', most notably smileys in the beginning
1516    ** of a line
1517    */
1518   {"sleep_time", DT_NUM, UL &SleepTime, "1" },
1519   /*
1520    ** .pp
1521    ** Specifies time, in seconds, to pause while displaying certain informational
1522    ** messages, while moving from folder to folder and after expunging
1523    ** messages from the current folder.  The default is to pause one second, so
1524    ** a value of zero for this option suppresses the pause.
1525    */
1526   {"sort", DT_SORT, UL &Sort, "date" },
1527   /*
1528    ** .pp
1529    ** Specifies how to sort messages in the \fIindex\fP menu.  Valid values
1530    ** are:
1531    ** .pp
1532    ** .ts
1533    ** .  date or date-sent
1534    ** .  date-received
1535    ** .  from
1536    ** .  mailbox-order (unsorted)
1537    ** .  score
1538    ** .  size
1539    ** .  spam
1540    ** .  subject
1541    ** .  threads
1542    ** .  to
1543    ** .te
1544    ** .pp
1545    ** You may optionally use the ``reverse-'' prefix to specify reverse sorting
1546    ** order (example: \fTset sort=reverse-date-sent\fP).
1547    */
1548   {"sort_alias", DT_SORT|DT_SORT_ALIAS, UL &SortAlias, "alias" },
1549   /*
1550    ** .pp
1551    ** Specifies how the entries in the ``alias'' menu are sorted.  The
1552    ** following are legal values:
1553    ** .pp
1554    ** .ts
1555    ** .  address (sort alphabetically by email address)
1556    ** .  alias (sort alphabetically by alias name)
1557    ** .  unsorted (leave in order specified in .muttrc)
1558    ** .te
1559    */
1560   {"sort_aux", DT_SORT|DT_SORT_AUX, UL &SortAux, "date" },
1561   /*
1562    ** .pp
1563    ** When sorting by threads, this variable controls how threads are sorted
1564    ** in relation to other threads, and how the branches of the thread trees
1565    ** are sorted.  This can be set to any value that ``$$sort'' can, except
1566    ** threads (in that case, Madmutt will just use date-sent).  You can also
1567    ** specify the ``last-'' prefix in addition to ``reverse-'' prefix, but last-
1568    ** must come after reverse-.  The last- prefix causes messages to be
1569    ** sorted against its siblings by which has the last descendant, using
1570    ** the rest of sort_aux as an ordering.
1571    ** .pp
1572    ** For instance, \fTset sort_aux=last-date-received\fP would mean that if
1573    ** a new message is received in a thread, that thread becomes the last one
1574    ** displayed (or the first, if you have \fTset sort=reverse-threads\fP.)
1575    ** .pp
1576    ** \fBNote:\fP For reversed ``$$sort'' order $$sort_aux is reversed again
1577    ** (which is not the right thing to do, but kept to not break any existing
1578    ** configuration setting).
1579    */
1580   {"sort_browser", DT_SORT|DT_SORT_BROWSER, UL &BrowserSort, "alpha" },
1581   /*
1582    ** .pp
1583    ** Specifies how to sort entries in the file browser.  By default, the
1584    ** entries are sorted alphabetically.  Valid values:
1585    ** .pp
1586    ** .ts
1587    ** .  alpha (alphabetically)
1588    ** .  date
1589    ** .  size
1590    ** .  unsorted
1591    ** .te
1592    ** .pp
1593    ** You may optionally use the ``reverse-'' prefix to specify reverse sorting
1594    ** order (example: \fTset sort_browser=reverse-date\fP).
1595    */
1596   {"sort_re", DT_BOOL, OPTSORTRE, "yes" },
1597   /*
1598    ** .pp
1599    ** This variable is only useful when sorting by threads with
1600    ** ``$$strict_threads'' \fIunset\fP. In that case, it changes the heuristic
1601    ** Madmutt uses to thread messages by subject.  With $$sort_re \fIset\fP,
1602    ** Madmutt will only attach a message as the child of another message by
1603    ** subject if the subject of the child message starts with a substring
1604    ** matching the setting of ``$$reply_regexp''. With $$sort_re \fIunset\fP,
1605    ** Madmutt will attach the message whether or not this is the case,
1606    ** as long as the non-``$$reply_regexp'' parts of both messages are identical.
1607    */
1608   {"spoolfile", DT_PATH, UL &Spoolfile, "" },
1609   /*
1610    ** .pp
1611    ** If your spool mailbox is in a non-default place where Madmutt cannot find
1612    ** it, you can specify its location with this variable.  Madmutt will
1613    ** automatically set this variable to the value of the environment
1614    ** variable $$$MAIL if it is not set.
1615    */
1616   {"status_chars", DT_STR, UL &StChars, "-*%A"},
1617   /*
1618    ** .pp
1619    ** Controls the characters used by the ``\fT%r\fP'' indicator in
1620    ** ``$$status_format''. The first character is used when the mailbox is
1621    ** unchanged. The second is used when the mailbox has been changed, and
1622    ** it needs to be resynchronized. The third is used if the mailbox is in
1623    ** read-only mode, or if the mailbox will not be written when exiting
1624    ** that mailbox (You can toggle whether to write changes to a mailbox
1625    ** with the toggle-write operation, bound by default to ``\fT%\fP'').
1626    ** The fourth  is used to indicate that the current folder has been
1627    ** opened in attach-message mode (Certain operations like composing
1628    ** a new mail, replying, forwarding, etc. are not permitted in this mode).
1629    */
1630   {"status_format", DT_STR, UL &Status, "-%r-Madmutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---"},
1631   /*
1632    ** .pp
1633    ** Controls the format of the status line displayed in the \fIindex\fP
1634    ** menu.  This string is similar to ``$$index_format'', but has its own
1635    ** set of \fTprintf(3)\fP-like sequences:
1636    ** .pp
1637    ** .dl
1638    ** .dt %b  .dd number of mailboxes with new mail *
1639    ** .dt %B  .dd the short pathname of the current mailbox
1640    ** .dt %d  .dd number of deleted messages *
1641    ** .dt %f  .dd the full pathname of the current mailbox
1642    ** .dt %F  .dd number of flagged messages *
1643    ** .dt %h  .dd local hostname
1644    ** .dt %l  .dd size (in bytes) of the current mailbox *
1645    ** .dt %L  .dd size (in bytes) of the messages shown
1646    **             (i.e., which match the current limit) *
1647    ** .dt %m  .dd the number of messages in the mailbox *
1648    ** .dt %M  .dd the number of messages shown (i.e., which match the current limit) *
1649    ** .dt %n  .dd number of new messages in the mailbox *
1650    ** .dt %o  .dd number of old unread messages *
1651    ** .dt %p  .dd number of postponed messages *
1652    ** .dt %P  .dd percentage of the way through the index
1653    ** .dt %r  .dd modified/read-only/won't-write/attach-message indicator,
1654    **             according to $$status_chars
1655    ** .dt %s  .dd current sorting mode ($$sort)
1656    ** .dt %S  .dd current aux sorting method ($$sort_aux)
1657    ** .dt %t  .dd number of tagged messages *
1658    ** .dt %u  .dd number of unread messages *
1659    ** .dt %v  .dd Madmutt version string
1660    ** .dt %V  .dd currently active limit pattern, if any *
1661    ** .dt %>X .dd right justify the rest of the string and pad with "X"
1662    ** .dt %|X .dd pad to the end of the line with "X"
1663    ** .de
1664    ** .pp
1665    ** * = can be optionally printed if nonzero
1666    ** .pp
1667    ** Some of the above sequences can be used to optionally print a string
1668    ** if their value is nonzero.  For example, you may only want to see the
1669    ** number of flagged messages if such messages exist, since zero is not
1670    ** particularly meaningful.  To optionally print a string based upon one
1671    ** of the above sequences, the following construct is used
1672    ** .pp
1673    **  \fT%?<sequence_char>?<optional_string>?\fP
1674    ** .pp
1675    ** where \fIsequence_char\fP is a character from the table above, and
1676    ** \fIoptional_string\fP is the string you would like printed if
1677    ** \fIsequence_char\fP is nonzero.  \fIoptional_string\fP \fBmay\fP contain
1678    ** other sequences as well as normal text, but you may \fBnot\fP nest
1679    ** optional strings.
1680    ** .pp
1681    ** Here is an example illustrating how to optionally print the number of
1682    ** new messages in a mailbox:
1683    ** .pp
1684    **  \fT%?n?%n new messages.?\fP
1685    ** .pp
1686    ** Additionally you can switch between two strings, the first one, if a
1687    ** value is zero, the second one, if the value is nonzero, by using the
1688    ** following construct:
1689    ** .pp
1690    **  \fT%?<sequence_char>?<if_string>&<else_string>?\fP
1691    ** .pp
1692    ** You can additionally force the result of any \fTprintf(3)\fP-like sequence
1693    ** to be lowercase by prefixing the sequence character with an underscore
1694    ** (\fT_\fP) sign.  For example, if you want to display the local hostname in
1695    ** lowercase, you would use:
1696    ** .pp
1697    **  \fT%_h\fP
1698    ** .pp
1699    ** If you prefix the sequence character with a colon (\fT:\fP) character, Madmutt
1700    ** will replace any dots in the expansion by underscores. This might be helpful
1701    ** with IMAP folders that don't like dots in folder names.
1702    */
1703   {"strict_mailto", DT_BOOL, OPTSTRICTMAILTO, "yes" },
1704   /*
1705    **
1706    ** .pp
1707    ** With mailto: style links, a body as well as arbitrary header information
1708    ** may be embedded. This may lead to (user) headers being overwriten without note
1709    ** if ``$$edit_headers'' is unset.
1710    **
1711    ** .pp
1712    ** If this variable is \fIset\fP, Madmutt is strict and allows anything to be
1713    ** changed. If it's \fIunset\fP, all headers given will be prefixed with
1714    ** ``X-Mailto-'' and the message including headers will be shown in the editor
1715    ** regardless of what ``$$edit_headers'' is set to.
1716    **/
1717   {"strict_threads", DT_BOOL, OPTSTRICTTHREADS, "no" },
1718   /*
1719    ** .pp
1720    ** If \fIset\fP, threading will only make use of the ``\fTIn-Reply-To:\fP'' and
1721    ** ``\fTReferences:\fP'' header fields when you ``$$sort'' by message threads.  By
1722    ** default, messages with the same subject are grouped together in
1723    ** ``pseudo threads.''  This may not always be desirable, such as in a
1724    ** personal mailbox where you might have several unrelated messages with
1725    ** the subject ``hi'' which will get grouped together. See also
1726    ** ``$$sort_re'' for a less drastic way of controlling this
1727    ** behaviour.
1728    */
1729   {"strip_was", DT_BOOL, OPTSTRIPWAS, "no" },
1730   /**
1731   ** .pp
1732   ** When \fIset\fP, Madmutt will remove the trailing part of the ``\fTSubject:\fP''
1733   ** line which matches $$strip_was_regex when replying. This is useful to
1734   ** properly react on subject changes and reduce ``subject noise.'' (esp. in Usenet)
1735   **/
1736   {"strip_was_regex", DT_RX, UL &StripWasRegexp, "\\([Ww][Aa][RrSs]: .*\\)[ ]*$"},
1737   /**
1738   ** .pp
1739   ** When non-empty and $$strip_was is \fIset\fP, Madmutt will remove this
1740   ** trailing part of the ``Subject'' line when replying if it won't be empty
1741   ** afterwards.
1742   **/
1743   {"stuff_quoted", DT_BOOL, OPTSTUFFQUOTED, "no" },
1744   /*
1745    ** .pp
1746    ** If \fIset\fP, attachments with flowed format will have their quoting ``stuffed'',
1747    ** i.e. a space will be inserted between the quote characters and the actual
1748    ** text.
1749    */
1750   {"text_flowed", DT_BOOL, OPTTEXTFLOWED, "no" },
1751   /*
1752    ** .pp
1753    ** When \fIset\fP, Madmutt will generate \fTtext/plain; format=flowed\fP attachments.
1754    ** This format is easier to handle for some mailing software, and generally
1755    ** just looks like ordinary text.  To actually make use of this format's
1756    ** features, you'll need support in your editor.
1757    ** .pp
1758    ** Note that $$indent_string is ignored when this option is set.
1759    */
1760   {"thread_received", DT_BOOL, OPTTHREADRECEIVED, "no" },
1761   /*
1762    ** .pp
1763    ** When \fIset\fP, Madmutt uses the date received rather than the date sent
1764    ** to thread messages by subject.
1765    */
1766   {"thorough_search", DT_BOOL, OPTTHOROUGHSRC, "no" },
1767   /*
1768    ** .pp
1769    ** Affects the \fT~b\fP and \fT~h\fP search operations described in
1770    ** section ``$patterns'' above.  If \fIset\fP, the headers and attachments of
1771    ** messages to be searched are decoded before searching.  If \fIunset\fP,
1772    ** messages are searched as they appear in the folder.
1773    */
1774   {"tilde", DT_BOOL, OPTTILDE, "no" },
1775   /*
1776    ** .pp
1777    ** When \fIset\fP, the internal-pager will pad blank lines to the bottom of the
1778    ** screen with a tilde (~).
1779    */
1780   {"timeout", DT_NUM, UL &Timeout, "600" },
1781   /*
1782    ** .pp
1783    ** This variable controls the \fInumber of seconds\fP Madmutt will wait
1784    ** for a key to be pressed in the main menu before timing out and
1785    ** checking for new mail.  A value of zero or less will cause Madmutt
1786    ** to never time out.
1787    */
1788   {"to_chars", DT_STR, UL &Tochars, " +TCFL"},
1789   /*
1790    ** .pp
1791    ** Controls the character used to indicate mail addressed to you.  The
1792    ** first character is the one used when the mail is NOT addressed to your
1793    ** address (default: space).  The second is used when you are the only
1794    ** recipient of the message (default: +).  The third is when your address
1795    ** appears in the ``\fTTo:\fP'' header field, but you are not the only recipient of
1796    ** the message (default: T).  The fourth character is used when your
1797    ** address is specified in the ``\fTCc:\fP'' header field, but you are not the only
1798    ** recipient.  The fifth character is used to indicate mail that was sent
1799    ** by \fIyou\fP.  The sixth character is used to indicate when a mail
1800    ** was sent to a mailing-list you're subscribe to (default: L).
1801    */
1802   {"trash", DT_PATH, UL &TrashPath, "" },
1803   /*
1804    ** .pp
1805    ** If \fIset\fP, this variable specifies the path of the trash folder where the
1806    ** mails marked for deletion will be moved, instead of being irremediably
1807    ** purged.
1808    ** .pp
1809    ** \fBNote\fP: When you delete a message in the trash folder, it is really
1810    ** deleted, so that there is no way to recover mail.
1811    */
1812   {"tunnel", DT_STR, UL &Tunnel, "" },
1813   /*
1814    ** .pp
1815    ** Setting this variable will cause Madmutt to open a pipe to a command
1816    ** instead of a raw socket. You may be able to use this to set up
1817    ** preauthenticated connections to your IMAP/POP3 server. Example:
1818    ** .pp
1819    **  \fTtunnel="ssh -q mailhost.net /usr/local/libexec/imapd"\fP
1820    ** .pp
1821    ** \fBNote:\fP For this example to work you must be able to log in to the remote
1822    ** machine without having to enter a password.
1823    */
1824   {"umask", DT_NUM, UL &Umask, "0077" },
1825   /*
1826    ** .pp
1827    ** This sets the umask that will be used by Madmutt when creating all
1828    ** kinds of files. If \fIunset\fP, the default value is \fT077\fP.
1829    */
1830   {"use_from", DT_BOOL, OPTUSEFROM, "yes" },
1831   /*
1832    ** .pp
1833    ** When \fIset\fP, Madmutt will generate the ``\fTFrom:\fP'' header field when
1834    ** sending messages. If \fIunset\fP, no ``\fTFrom:\fP'' header field will be
1835    ** generated unless the user explicitly sets one using the ``$my_hdr''
1836    ** command.
1837    */
1838 #ifdef HAVE_LIBIDN
1839   {"use_idn", DT_BOOL, OPTUSEIDN, "yes" },
1840   /*
1841    ** .pp
1842    ** Availability: IDN
1843    **
1844    ** .pp
1845    ** When \fIset\fP, Madmutt will show you international domain names decoded.
1846    ** .pp
1847    ** \fBNote:\fP You can use IDNs for addresses even if this is \fIunset\fP.
1848    ** This variable only affects decoding.
1849    */
1850 #endif /* HAVE_LIBIDN */
1851   {"agent_string", DT_BOOL, OPTXMAILER, "yes" },
1852   /*
1853    ** .pp
1854    ** When \fIset\fP, Madmutt will add a ``\fTUser-Agent:\fP'' header to outgoing
1855    ** messages, indicating which version of Madmutt was used for composing
1856    ** them.
1857    */
1858   {"wait_key", DT_BOOL, OPTWAITKEY, "yes" },
1859   /*
1860    ** .pp
1861    ** Controls whether Madmutt will ask you to press a key after \fIshell-
1862    ** escape\fP, \fIpipe-message\fP, \fIpipe-entry\fP, \fIprint-message\fP,
1863    ** and \fIprint-entry\fP commands.
1864    ** .pp
1865    ** It is also used when viewing attachments with ``$auto_view'', provided
1866    ** that the corresponding mailcap entry has a \fTneedsterminal\fP flag,
1867    ** and the external program is interactive.
1868    ** .pp
1869    ** When \fIset\fP, Madmutt will always ask for a key. When \fIunset\fP, Madmutt will wait
1870    ** for a key only if the external command returned a non-zero status.
1871    */
1872   {"weed", DT_BOOL, OPTWEED, "yes" },
1873   /*
1874    ** .pp
1875    ** When \fIset\fP, Madmutt will weed headers when displaying, forwarding,
1876    ** printing, or replying to messages.
1877    */
1878   {"wrap_search", DT_BOOL, OPTWRAPSEARCH, "yes" },
1879   /*
1880    ** .pp
1881    ** Controls whether searches wrap around the end of the mailbox.
1882    ** .pp
1883    ** When \fIset\fP, searches will wrap around the first (or last) message. When
1884    ** \fIunset\fP, searches will not wrap.
1885    */
1886   {"wrapmargin", DT_NUM, UL &WrapMargin, "0" },
1887   /*
1888    ** .pp
1889    ** Controls the size of the margin remaining at the right side of
1890    ** the terminal when Madmutt's pager does smart wrapping.
1891    */
1892   {"write_inc", DT_NUM, UL &WriteInc, "10" },
1893   /*
1894    ** .pp
1895    ** When writing a mailbox, a message will be printed every
1896    ** \fIwrite_inc\fP messages to indicate progress.  If set to 0, only a
1897    ** single message will be displayed before writing a mailbox.
1898    ** .pp
1899    ** Also see the ``$$read_inc'' variable.
1900    */
1901   {"write_bcc", DT_BOOL, OPTWRITEBCC, "yes" },
1902   /*
1903    ** .pp
1904    ** Controls whether Madmutt writes out the Bcc header when preparing
1905    ** messages to be sent.  Exim users may wish to \fIunset\fP this.
1906    */
1907   {"xterm_icon", DT_STR, UL &XtermIcon, "M%?n?AIL&ail?"},
1908   /*
1909    ** .pp
1910    ** Controls the format of the X11 icon title, as long as $$xterm_set_titles
1911    ** is \fIset\fP. This string is identical in formatting to the one used by
1912    ** ``$$status_format''.
1913    */
1914   {"xterm_set_titles", DT_BOOL, OPTXTERMSETTITLES, "no" },
1915   /*
1916    ** .pp
1917    ** Controls whether Madmutt sets the xterm title bar and icon name
1918    ** (as long as you're in an appropriate terminal). The default must
1919    ** be \fIunset\fP to force in the validity checking.
1920    */
1921   {"xterm_leave", DT_STR, UL &XtermLeave, "" },
1922   /*
1923    ** .pp
1924    ** If $$xterm_set_titles is \fIset\fP, this string will be used to
1925    ** set the title when leaving Madmutt. For terminal-based programs,
1926    ** there's no easy and portable way to read the current title so Madmutt
1927    ** cannot read it upon startup and restore it when exiting.
1928    **
1929    ** .pp
1930    ** Based on the xterm FAQ, the following might work:
1931    **
1932    ** .pp
1933    ** \fTset xterm_leave = "`test x$$$DISPLAY != x && xprop -id $$$WINDOWID | grep WM_NAME | cut -d '"' -f 2`"\fP
1934    */
1935   {"xterm_title", DT_STR, UL &XtermTitle, "Madmutt with %?m?%m messages&no messages?%?n? [%n New]?"},
1936   /*
1937    ** .pp
1938    ** Controls the format of the title bar of the xterm provided that
1939    ** $$xterm_set_titles has been \fIset\fP. This string is identical in formatting
1940    ** to the one used by ``$$status_format''.
1941    */
1942   /*--*/
1943   { NULL, -1, -1, NULL }
1944 };
1945
1946 const struct mapping_t SortMethods[] = {
1947     {"date", SORT_DATE},
1948     {"date-sent", SORT_DATE},
1949     {"date-received", SORT_RECEIVED},
1950     {"mailbox-order", SORT_ORDER},
1951     {"subject", SORT_SUBJECT},
1952     {"from", SORT_FROM},
1953     {"size", SORT_SIZE},
1954     {"threads", SORT_THREADS},
1955     {"to", SORT_TO},
1956     {"score", SORT_SCORE},
1957     {"spam", SORT_SPAM},
1958     {NULL, 0}
1959 };
1960
1961 /* same as SortMethods, but with "threads" replaced by "date" */
1962
1963 const struct mapping_t SortAuxMethods[] = {
1964     {"date", SORT_DATE},
1965     {"date-sent", SORT_DATE},
1966     {"date-received", SORT_RECEIVED},
1967     {"mailbox-order", SORT_ORDER},
1968     {"subject", SORT_SUBJECT},
1969     {"from", SORT_FROM},
1970     {"size", SORT_SIZE},
1971     {"threads", SORT_DATE},       /* note: sort_aux == threads
1972                                    * isn't possible.
1973                                    */
1974     {"to", SORT_TO},
1975     {"score", SORT_SCORE},
1976     {"spam", SORT_SPAM},
1977     {NULL, 0}
1978 };
1979
1980
1981 const struct mapping_t SortBrowserMethods[] = {
1982     {"alpha", SORT_SUBJECT},
1983     {"date", SORT_DATE},
1984     {"size", SORT_SIZE},
1985     {"unsorted", SORT_ORDER},
1986     {NULL, 0}
1987 };
1988
1989 const struct mapping_t SortAliasMethods[] = {
1990     {"alias", SORT_ALIAS},
1991     {"address", SORT_ADDRESS},
1992     {"unsorted", SORT_ORDER},
1993     {NULL, 0}
1994 };
1995
1996 const struct mapping_t SortKeyMethods[] = {
1997     {"address", SORT_ADDRESS},
1998     {"date", SORT_DATE},
1999     {"keyid", SORT_KEYID},
2000     {"trust", SORT_TRUST},
2001     {NULL, 0}
2002 };
2003
2004
2005 /* functions used to parse commands in a rc file */
2006
2007 static int parse_attachments (BUFFER *, BUFFER *, unsigned long, BUFFER *);
2008 static int parse_unattachments (BUFFER *, BUFFER *, unsigned long, BUFFER *);
2009 static int parse_alias (BUFFER *, BUFFER *, unsigned long, BUFFER *);
2010 static int parse_unalias (BUFFER *, BUFFER *, unsigned long, BUFFER *);
2011 static int parse_source (BUFFER *, BUFFER *, unsigned long, BUFFER *);
2012 static int parse_set (BUFFER *, BUFFER *, unsigned long, BUFFER *);
2013 static int parse_my_hdr (BUFFER *, BUFFER *, unsigned long, BUFFER *);
2014 static int parse_unmy_hdr (BUFFER *, BUFFER *, unsigned long, BUFFER *);
2015
2016 struct command_t {
2017     const char *name;
2018     int (*func) (BUFFER *, BUFFER *, unsigned long, BUFFER *);
2019     unsigned long data;
2020 };
2021
2022 struct command_t Commands[] = {
2023     {"bind",                mutt_parse_bind,       0},
2024     {"color",               mutt_parse_color,      0},
2025     {"exec",                mutt_parse_exec,       0},
2026     {"append-hook",         mutt_parse_hook,       M_APPENDHOOK},
2027     {"close-hook",          mutt_parse_hook,       M_CLOSEHOOK},
2028     {"crypt-hook",          mutt_parse_hook,       M_CRYPTHOOK},
2029     {"fcc-hook",            mutt_parse_hook,       M_FCCHOOK},
2030     {"fcc-save-hook",       mutt_parse_hook,       M_FCCHOOK|M_SAVEHOOK},
2031     {"folder-hook",         mutt_parse_hook,       M_FOLDERHOOK},
2032     {"mbox-hook",           mutt_parse_hook,       M_MBOXHOOK},
2033     {"message-hook",        mutt_parse_hook,       M_MESSAGEHOOK},
2034     {"open-hook",           mutt_parse_hook,       M_OPENHOOK},
2035     {"pgp-hook",            mutt_parse_hook,       M_CRYPTHOOK},
2036     {"reply-hook",          mutt_parse_hook,       M_REPLYHOOK},
2037     {"save-hook",           mutt_parse_hook,       M_SAVEHOOK},
2038     {"send2-hook",          mutt_parse_hook,       M_SEND2HOOK},
2039     {"send-hook",           mutt_parse_hook,       M_SENDHOOK},
2040     {"macro",               mutt_parse_macro,      0},
2041     {"push",                mutt_parse_push,       0},
2042     {"uncolor",             mutt_parse_uncolor,    0},
2043     {"unhook",              mutt_parse_unhook,     0},
2044     {"alias",               parse_alias,           0},
2045     {"attachments",         parse_attachments,     0 },
2046     {"my_hdr",              parse_my_hdr,          0},
2047     {"reset",               parse_set,             M_SET_RESET},
2048     {"set",                 parse_set,             0},
2049     {"toggle",              parse_set,             M_SET_INV},
2050     {"unset",               parse_set,             M_SET_UNSET},
2051     {"source",              parse_source,          0},
2052     {"unalias",             parse_unalias,         0},
2053     {"unattachments",       parse_unattachments,   0},
2054     {"unmy_hdr",            parse_unmy_hdr,        0},
2055     {NULL, NULL, 0}
2056 };