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