Andreas Krennmair:
[apps/madmutt.git] / init.h
diff --git a/init.h b/init.h
index 970bcd6..10c1824 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
+ * Copyright (C) 2004 g10 Code GmbH
  * 
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
@@ -209,7 +210,7 @@ struct option_t MuttVars[] = {
   ** .pp
   ** .dl
   ** .dt %C  .dd charset
-  ** .dt %c  .dd reqiures charset conversion (n or c)
+  ** .dt %c  .dd requires charset conversion (n or c)
   ** .dt %D  .dd deleted flag
   ** .dt %d  .dd description
   ** .dt %e  .dd MIME content-transfer-encoding
@@ -333,7 +334,7 @@ struct option_t MuttVars[] = {
   { "compose_format",  DT_STR,  R_BOTH, UL &ComposeFormat, UL "-- Mutt: Compose  [Approx. msg size: %l   Atts: %a]%>-" },
   /*
   ** .pp
-  ** Controls the format of the status line displayed in the \fCompose\fP
+  ** Controls the format of the status line displayed in the \fICompose\fP
   ** menu.  This string is similar to ``$$status_format'', but has its own
   ** set of printf()-like sequences:
   ** .pp
@@ -347,6 +348,12 @@ struct option_t MuttVars[] = {
   ** See the text describing the ``$$status_format'' option for more 
   ** information on how to set ``$$compose_format''.
   */
+  { "config_charset",  DT_STR,  R_NONE, UL &ConfigCharset, UL 0 },
+  /*
+  ** .pp
+  ** When defined, Mutt will recode commands in rc files from this
+  ** encoding.
+  */
   { "confirmappend",   DT_BOOL, R_NONE, OPTCONFIRMAPPEND, 1 },
   /*
   ** .pp
@@ -378,6 +385,17 @@ struct option_t MuttVars[] = {
   ** will be saved for later references.  Also see ``$$record'',
   ** ``$$save_name'', ``$$force_name'' and ``$fcc-hook''.
   */
+  
+  { "crypt_use_gpgme",  DT_BOOL, R_NONE, OPTCRYPTUSEGPGME, 0 },
+  /*
+  ** .pp
+  ** This variable controls the use the GPGME enabled crypto backends.
+  ** If it is set and Mutt was build with gpgme support, the gpgme code for
+  ** S/MIME and PGP will be used instead of the classic code.  Note, that
+  ** you need to use this option in .muttrc as it won't have any effect when 
+  ** used interactively.
+  */
+  
   { "crypt_autopgp",   DT_BOOL, R_NONE, OPTCRYPTAUTOPGP, 1 },
   /*
   ** .pp
@@ -441,8 +459,8 @@ struct option_t MuttVars[] = {
   { "digest_collapse", DT_BOOL, R_NONE, OPTDIGESTCOLLAPSE, 1},
   /*
   ** .pp
-  ** If this option is \fIset\fP, mutt's revattach menu will not show the subparts of
-  ** individual messages in a digest.  To see these subparts, press 'v' on that menu.
+  ** If this option is \fIset\fP, mutt's received-attachments menu will not show the subparts of
+  ** individual messages in a multipart/digest.  To see these subparts, press 'v' on that menu.
   */
   { "display_filter",  DT_PATH, R_PAGER, UL &DisplayFilter, UL "" },
   /*
@@ -452,7 +470,7 @@ struct option_t MuttVars[] = {
   ** filtered message is read from the standard output.
   */
 #if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
-  { "dotlock_program",  DT_PATH, R_NONE, UL &MuttDotlock, UL BINDIR "/mutt_dotlock" },
+  { "dotlock_program",  DT_PATH, R_NONE, UL &MuttDotlock, UL BINDIR "/muttng_dotlock" },
   /*
   ** .pp
   ** Contains the path of the mutt_dotlock (8) binary to be used by
@@ -760,6 +778,13 @@ struct option_t MuttVars[] = {
   ** When set, mutt will not show the presence of missing messages in the
   ** thread tree.
   */
+  { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, OPTHIDETHREADSUBJECT, 1 },
+  /*
+  ** .pp
+  ** When set, mutt will not show the subject of messages in the thread
+  ** tree that have the same subject as their parent or closest previously
+  ** displayed sibling.
+  */
   { "hide_top_limited",        DT_BOOL, R_TREE|R_INDEX, OPTHIDETOPLIMITED, 0 },
   /*
   ** .pp
@@ -813,8 +838,8 @@ struct option_t MuttVars[] = {
   ** This is a colon-delimited list of authentication methods mutt may
   ** attempt to use to log in to an IMAP server, in the order mutt should
   ** try them.  Authentication methods are either 'login' or the right
-  ** side of an IMAP 'AUTH=xxx' capability string, eg 'digest-md5',
-  ** 'gssapi' or 'cram-md5'. This parameter is case-insensitive. If this
+  ** side of an IMAP 'AUTH=xxx' capability string, eg 'digest-md5', 'gssapi'
+  ** or 'cram-md5'. This parameter is case-insensitive. If this
   ** parameter is unset (the default) mutt will try all available methods,
   ** in order from most-secure to least-secure.
   ** .pp
@@ -831,7 +856,7 @@ struct option_t MuttVars[] = {
   ** as folder separators for displaying IMAP paths. In particular it
   ** helps in using the '=' shortcut for your \fIfolder\fP variable.
   */
-# ifdef USE_SSL
+# if defined(USE_SSL) || defined(USE_GNUTLS)
   { "imap_force_ssl",          DT_BOOL, R_NONE, OPTIMAPFORCESSL, 0 },
   /*
   ** .pp
@@ -839,6 +864,15 @@ struct option_t MuttVars[] = {
   ** connecting to IMAP servers.
   */
 # endif
+  { "imap_headers",    DT_STR, R_INDEX, UL &ImapHeaders, UL 0},
+  /*
+  ** .pp
+  ** Mutt requests these header fields in addition to the default headers
+  ** ("DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE
+  ** CONTENT-DESCRIPTION IN-REPLY-TO REPLY-TO LINES X-LABEL") from IMAP
+  ** servers before displaying the index menu. You may want to add more
+  ** headers for spam detection. \fBNote:\fP This is a space separated list.
+  */
   { "imap_home_namespace",     DT_STR, R_NONE, UL &ImapHomeNamespace, UL 0},
   /*
   ** .pp
@@ -890,6 +924,12 @@ struct option_t MuttVars[] = {
   ** but can make closing an IMAP folder somewhat slower. This option
   ** exists to appease speed freaks.
   */
+  { "imap_reconnect",  DT_QUAD, R_NONE, OPT_IMAPRECONNECT, M_ASKYES },
+  /*
+  ** .pp
+  ** Controls whether or not Mutt-ng will try to reconnect to IMAP server when
+  ** the connection is lost.
+  */
   { "imap_servernoise",                DT_BOOL, R_NONE, OPTIMAPSERVERNOISE, 1 },
   /*
   ** .pp
@@ -922,6 +962,12 @@ struct option_t MuttVars[] = {
   ** Controls whether or not a copy of the message(s) you are replying to
   ** is included in your reply.
   */
+  { "include_onlyfirst",       DT_BOOL, R_NONE, OPTINCLUDEONLYFIRST, 0},
+  /*
+  ** .pp
+  ** Controls whether or not Mutt includes only the first attachment
+  ** of the message you are replying.
+  */
   { "indent_string",   DT_STR,  R_NONE, UL &Prefix, UL "> " },
   /*
   ** .pp
@@ -957,6 +1003,7 @@ struct option_t MuttVars[] = {
   ** .dt %E .dd number of messages in current thread
   ** .dt %f .dd entire From: line (address + real name)
   ** .dt %F .dd author name, or recipient name if the message is from you
+  ** .dt %H .dd spam attribute(s) of this message
   ** .dt %g .dd newsgroup name (if compiled with nntp support)
   ** .dt %i .dd message-id of the current message
   ** .dt %l .dd number of lines in the message (does not work with maildir,
@@ -1061,6 +1108,34 @@ struct option_t MuttVars[] = {
   ** \fBDON'T CHANGE THIS SETTING UNLESS YOU ARE REALLY SURE WHAT YOU ARE
   ** DOING!\fP
   */
+#if USE_HCACHE
+
+  { "header_cache", DT_PATH, R_NONE, UL &HeaderCache, 0 },
+  /*
+  ** .pp
+  ** The header_cache variable points to the header cache database. If
+  ** header_cache points to a directory there will be created one header cache
+  ** database per folder within this directory. If it doesn't point to a directory a
+  ** global header cache for all folders is used. Per default it is unset and so
+  ** no header caching will be used.
+  */
+  { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPTHCACHEVERIFY, 1 },
+  /*
+  ** .pp
+  ** Check for Maildir unaware programs other than mutt having modified maildir
+  ** files when the header cache is in use.  This incurs one stat(2) per
+  ** message every time the folder is opened.
+  */
+  { "header_cache_pagesize", DT_STR, R_NONE, UL &HeaderCachePageSize, UL "16384" },
+  /*
+  ** .pp
+  ** Change the maildir header cache database page size.  Too large
+  ** or too small of a page size for the common header can waste
+  ** space, memory effectiveness, or CPU time. The default should be more or
+  ** less the best you can get. For details google after mutt maildir header
+  ** cache (first hit).
+  */
+#endif /* USE_HCACHE */
   { "maildir_trash", DT_BOOL, R_NONE, OPTMAILDIRTRASH, 0 },
   /*
   ** .pp
@@ -1253,6 +1328,32 @@ struct option_t MuttVars[] = {
   { "msg_format",      DT_SYN,  R_NONE, UL "message_format", 0 },
   /*
   */
+  { "msgid_format",    DT_STR, R_NONE, UL &MsgIdFormat, UL "%Y%m%d%h%M%s.G%P%p" },
+  /*
+  ** .pp
+  ** This is the format for the ``local part'' of the message-IDs generated
+  ** by Mutt-ng. The format string contains of one or more characters. The '%'
+  ** character marks that certain data will be added to the string, similar to
+  ** printf(). The following characters are allowed:
+  ** .pp
+  ** .dl
+  ** .dt %d .dd the current day of month
+  ** .dt %h .dd the current hour
+  ** .dt %m .dd the current month
+  ** .dt %M .dd the current minute
+  ** .dt %O .dd the current UNIX timestamp (octal)
+  ** .dt %p .dd the process ID
+  ** .dt %P .dd the current message-ID prefix (a character rotating with 
+  **            every message-ID being generated)
+  ** .dt %r .dd a random integer value (decimal)
+  ** .dt %R .dd a random integer value (hexadecimal)
+  ** .dt %s .dd the current second
+  ** .dt %T .dd the current UNIX timestamp (decimal)
+  ** .dt %X .dd the current UNIX timestamp (hexadecimal)
+  ** .dt %Y .dd the current year (Y2K compliant)
+  ** .dt %% .dd the '%' character
+  ** .de
+  */
   { "narrow_tree",     DT_BOOL, R_TREE|R_INDEX, OPTNARROWTREE, 0 },
   /*
   ** .pp
@@ -1550,6 +1651,48 @@ struct option_t MuttVars[] = {
   ** removed, while the inner multipart/signed part is retained.
   ** (PGP only)
   */
+  { "pgp_create_traditional",  DT_SYN, R_NONE, UL "pgp_autoinline", 0 },
+  { "pgp_autoinline",          DT_BOOL, R_NONE, OPTPGPAUTOINLINE, 0 },
+  /*
+  ** .pp
+  ** This option controls whether Mutt generates old-style inline
+  ** (traditional) PGP encrypted or signed messages under certain
+  ** circumstances.  This can be overridden by use of the \fIpgp-menu\fP,
+  ** when inline is not required.
+  ** .pp
+  ** Note that Mutt might automatically use PGP/MIME for messages
+  ** which consist of more than a single MIME part.  Mutt can be
+  ** configured to ask before sending PGP/MIME messages when inline
+  ** (traditional) would not work.
+  ** See also: ``$$pgp_mime_auto''.
+  ** .pp
+  ** Also note that using the old-style PGP message format is \fBstrongly\fP
+  ** \fBdeprecated\fP.
+  ** (PGP only)
+  */
+  { "pgp_auto_traditional",    DT_SYN, R_NONE, UL "pgp_replyinline", 0 },
+  { "pgp_replyinline",         DT_BOOL, R_NONE, OPTPGPREPLYINLINE, 0 },
+  /*
+  ** .pp
+  ** Setting this variable will cause Mutt to always attempt to
+  ** create an inline (traditional) message when replying to a
+  ** message which is PGP encrypted/signed inline.  This can be
+  ** overridden by use of the \fIpgp-menu\fP, when inline is not
+  ** required.  This option does not automatically detect if the
+  ** (replied-to) message is inline; instead it relies on Mutt
+  ** internals for previously checked/flagged messages.
+  ** .pp
+  ** Note that Mutt might automatically use PGP/MIME for messages
+  ** which consist of more than a single MIME part.  Mutt can be
+  ** configured to ask before sending PGP/MIME messages when inline
+  ** (traditional) would not work.
+  ** See also: ``$$pgp_mime_auto''.
+  ** .pp
+  ** Also note that using the old-style PGP message format is \fBstrongly\fP
+  ** \fBdeprecated\fP.
+  ** (PGP only)
+  ** 
+  */
   { "pgp_show_unusable", DT_BOOL, R_NONE, OPTPGPSHOWUNUSABLE, 1 },
   /*
   ** .pp
@@ -1599,37 +1742,17 @@ struct option_t MuttVars[] = {
   ** `reverse-'.
   ** (PGP only)
   */
-  { "pgp_create_traditional", DT_QUAD, R_NONE, OPT_PGPTRADITIONAL, M_NO },
+  { "pgp_mime_auto", DT_QUAD, R_NONE, OPT_PGPMIMEAUTO, M_ASKYES },
   /*
   ** .pp
-  ** This option controls whether Mutt generates old-style inline PGP
-  ** encrypted or signed messages.
-  ** .pp
-  ** Note that PGP/MIME will be used automatically for messages which have
-  ** a character set different from us-ascii, or which consist of more than
-  ** a single MIME part.
+  ** This option controls whether Mutt will prompt you for
+  ** automatically sending a (signed/encrypted) message using
+  ** PGP/MIME when inline (traditional) fails (for any reason).
   ** .pp
   ** Also note that using the old-style PGP message format is \fBstrongly\fP
   ** \fBdeprecated\fP.
   ** (PGP only)
   */
-  { "pgp_auto_traditional", DT_BOOL, R_NONE, OPTPGPAUTOTRAD, 0 },
-  /*
-  ** .pp
-  ** This option causes Mutt to generate an old-style inline PGP
-  ** encrypted or signed message when replying to an old-style
-  ** message, and a PGP/MIME message when replying to a PGP/MIME
-  ** message.  Note that this option is only meaningful when using
-  ** ``$$crypt_replyencrypt'', ``$$crypt_replysign'', or
-  ** ``$$crypt_replysignencrypted''.
-  ** .pp
-  ** Also note that PGP/MIME will be used automatically for messages
-  ** which have a character set different from us-ascii, or which
-  ** consist of more than a single MIME part.
-  ** .pp
-  ** This option overrides ``$$pgp_create_traditional''
-  ** (PGP only)
-  */
 
   /* XXX Default values! */
   
@@ -1881,8 +2004,8 @@ struct option_t MuttVars[] = {
   /*
   ** .pp
   ** This command is used to extract only the signers X509 certificate from a S/MIME
-  **  signature, so that the certificate's owner may get compared to the email's 
-  ** 'From'-field.
+  ** signature, so that the certificate's owner may get compared to the
+  ** email's 'From'-field.
   ** (S/MIME only)
   */
   { "smime_import_cert_command",       DT_STR, R_NONE, UL &SmimeImportCertCommand, 0},
@@ -1939,8 +2062,8 @@ struct option_t MuttVars[] = {
   */
 #endif
  
-#if defined(USE_SSL)||defined(USE_NSS)
-# ifndef USE_NSS  
+#if defined(USE_SSL)||defined(USE_NSS)||defined(USE_GNUTLS)
+# if defined(USE_SSL)||defined(USE_GNUTLS)
   { "ssl_starttls", DT_QUAD, R_NONE, OPT_SSLSTARTTLS, M_YES },
   /*
   ** .pp
@@ -1949,7 +2072,7 @@ struct option_t MuttVars[] = {
   ** use STARTTLS regardless of the server's capabilities.
   */
 # endif  
-  { "certificate_file",        DT_PATH, R_NONE, UL &SslCertFile, 0 },
+  { "certificate_file",        DT_PATH, R_NONE, UL &SslCertFile, UL "~/.mutt_certificates" },
   /*
   ** .pp
   ** This variable specifies the file where the certificates you trust
@@ -1964,6 +2087,7 @@ struct option_t MuttVars[] = {
   ** .pp
   ** Example: set certificate_file=~/.mutt/certificates
   */
+# ifndef USE_GNUTLS
   { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPTSSLSYSTEMCERTS, 1 },
   /*
   ** .pp
@@ -1983,6 +2107,7 @@ struct option_t MuttVars[] = {
   ** This variables specifies whether to attempt to use SSLv2 in the
   ** SSL authentication process.
   */
+# endif
   { "ssl_use_sslv3", DT_BOOL, R_NONE, OPTSSLV3, 1 },
   /*
   ** .pp
@@ -1995,6 +2120,48 @@ struct option_t MuttVars[] = {
   ** This variables specifies whether to attempt to use TLSv1 in the
   ** SSL authentication process.
   */
+#ifdef USE_GNUTLS
+  { "ssl_min_dh_prime_bits", DT_NUM, R_NONE, UL &SslDHPrimeBits, 0 },
+  /*
+  ** .pp
+  ** This variable specifies the minimum acceptable prime size (in bits)
+  ** for use in any Diffie-Hellman key exchange. A value of 0 will use
+  ** the default from the GNUTLS library.
+  */
+  { "ssl_ca_certificates_file", DT_PATH, R_NONE, UL &SslCACertFile, 0 },
+  /*
+  ** .pp
+  ** This variable specifies a file containing trusted CA certificates.
+  ** Any server certificate that is signed with one of these CA
+  ** certificates are also automatically accepted.
+  ** .pp
+  ** Example: set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt
+  */
+  { "ssl_client_cert", DT_PATH, R_NONE, UL &SslClientCert, 0 },
+  /*
+  ** .pp
+  ** The file containing a client certificate and its associated private
+  ** key.
+  */
+#ifdef USE_GNUTLS
+  { "ssl_min_dh_prime_bits", DT_NUM, R_NONE, UL &SslDHPrimeBits, 0 },
+  /*
+  ** .pp
+  ** This variable specifies the minimum acceptable prime size (in bits)
+  ** for use in any Diffie-Hellman key exchange. A value of 0 will use
+  ** the default from the GNUTLS library.
+  */
+  { "ssl_ca_certificates_file", DT_PATH, R_NONE, UL &SslCACertFile, 0 },
+  /*
+  ** .pp
+  ** This variable specifies a file containing trusted CA certificates.
+  ** Any server certificate that is signed with one of these CA
+  ** certificates are also automatically accepted.
+  ** .pp
+  ** Example: set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt
+  */
+#endif
+#endif
 #endif
 
   { "pipe_split",      DT_BOOL, R_NONE, OPTPIPESPLIT, 0 },
@@ -2341,8 +2508,10 @@ struct option_t MuttVars[] = {
   ** move the messages to another machine, and reply to some the messages
   ** from there.  If this variable is set, the default \fIFrom:\fP line of
   ** the reply messages is built using the address where you received the
-  ** messages you are replying to.  If the variable is unset, the
-  ** \fIFrom:\fP line will use your address on the current machine.
+  ** messages you are replying to \fBif\fP that address matches your
+  ** alternates.  If the variable is unset, or the address that would be
+  ** used doesn't match your alternates, the \fIFrom:\fP line will use
+  ** your address on the current machine.
   */
   { "reverse_realname",        DT_BOOL, R_BOTH, OPTREVREAL, 1 },
   /*
@@ -2519,6 +2688,16 @@ struct option_t MuttVars[] = {
   ** assumed that filename is a shell command and input should be read from
   ** its stdout.
   */
+  { "signoff_string",  DT_STR, R_NONE, UL &SignOffString, UL 0 },
+  /*
+  ** .pp
+  ** If set, this string will be inserted before the signature. This is useful
+  ** for people that want to sign off every message they send with their name.
+  ** .pp
+  ** If you want to insert your website's URL, additional contact information or 
+  ** witty quotes into your mails, better use a signature file instead of
+  ** the signoff string.
+  */
   { "simple_search",   DT_STR,  R_NONE, UL &SimpleSearch, UL "~f %s | ~s %s" },
   /*
   ** .pp
@@ -2568,6 +2747,7 @@ struct option_t MuttVars[] = {
   ** .  mailbox-order (unsorted)
   ** .  score
   ** .  size
+  ** .  spam
   ** .  subject
   ** .  threads
   ** .  to
@@ -2605,7 +2785,7 @@ struct option_t MuttVars[] = {
   ** order $$sort_aux is reversed again (which is not the right thing to do,
   ** but kept to not break any existing configuration setting).
   */
-  { "sort_browser",    DT_SORT|DT_SORT_BROWSER, R_NONE, UL &BrowserSort, SORT_SUBJECT },
+  { "sort_browser",    DT_SORT|DT_SORT_BROWSER, R_NONE, UL &BrowserSort, SORT_ALPHA },
   /*
   ** .pp
   ** Specifies how to sort entries in the file browser.  By default, the
@@ -2633,6 +2813,15 @@ struct option_t MuttVars[] = {
   ** the message whether or not this is the case, as long as the
   ** non-``$$reply_regexp'' parts of both messages are identical.
   */
+  { "spam_separator",   DT_STR, R_NONE, UL &SpamSep, UL "," },
+  /*
+  ** .pp
+  ** ``$spam_separator'' controls what happens when multiple spam headers
+  ** are matched: if unset, each successive header will overwrite any
+  ** previous matches value for the spam label. If set, each successive
+  ** match will append to the previous, using ``$spam_separator'' as a
+  ** separator.
+  */
   { "spoolfile",       DT_PATH, R_NONE, UL &Spoolfile, 0 },
   /*
   ** .pp
@@ -2740,6 +2929,13 @@ struct option_t MuttVars[] = {
   ** personal mailbox where you might have several unrelated messages with
   ** the subject ``hi'' which will get grouped together.
   */
+  { "stuff_quoted",    DT_BOOL, R_BOTH, OPTSTUFFQUOTED, 0 },
+  /*
+  ** .pp
+  ** If set, attachments with flowed format will have their quoting ``stuffed'',
+  ** i.e. a space will be inserted between the quote characters and the actual
+  ** text.
+  */
   { "suspend",         DT_BOOL, R_NONE, OPTSUSPEND, 1 },
   /*
   ** .pp
@@ -2831,6 +3027,12 @@ struct option_t MuttVars[] = {
   ** machine without having to enter a password.
   */
 #endif
+  { "umask",   DT_NUM, R_NONE, UL &Umask, 0077 },
+  /*
+  ** .pp
+  ** This sets the umask that will be used by mutt-ng when creating all
+  ** kinds of files. If unset, the default value is 077.
+  */
   { "use_8bitmime",    DT_BOOL, R_NONE, OPTUSE8BITMIME, 0 },
   /*
   ** .pp
@@ -2948,12 +3150,6 @@ struct option_t MuttVars[] = {
   ** xterm_set_titles has been set. This string is identical in formatting
   ** to the one used by ``$$status_format''.
   */
-  { "xface",           DT_BOOL, R_NONE, OPTXFACE, 0 },
-  /*
-  ** .pp
-  ** Controls whether mutt uses slrnface to display X-Faces when run
-  ** in an X11 terminal emulator.
-  */
 #ifdef USE_NNTP
   { "x_comment_to",   DT_BOOL, R_NONE, OPTXCOMMENTTO, 0 },
   /*
@@ -2977,6 +3173,7 @@ const struct mapping_t SortMethods[] = {
   { "threads",         SORT_THREADS },
   { "to",              SORT_TO },
   { "score",           SORT_SCORE },
+  { "spam",            SORT_SPAM },
   { NULL,              0 }
 };
 
@@ -2995,6 +3192,7 @@ const struct mapping_t SortAuxMethods[] = {
                                         */
   { "to",              SORT_TO },
   { "score",           SORT_SCORE },
+  { "spam",            SORT_SPAM },
   { NULL,              0 }
 };
   
@@ -3027,6 +3225,7 @@ const struct mapping_t SortKeyMethods[] = {
 
 static int parse_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_rx_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+static int parse_spam_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_rx_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 
@@ -3041,6 +3240,9 @@ static int parse_my_hdr (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_unmy_hdr (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_subscribe (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 
+static int parse_alternates (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+static int parse_unalternates (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+
 struct command_t
 {
   char *name;
@@ -3049,8 +3251,8 @@ struct command_t
 };
 
 struct command_t Commands[] = {
-  { "alternates",      parse_rx_list,          UL &Alternates },
-  { "unalternates",    parse_rx_unlist,        UL &Alternates },
+  { "alternates",      parse_alternates,       UL &Alternates },
+  { "unalternates",    parse_unalternates,     UL &Alternates },
 #ifdef USE_SOCKET
   { "account-hook",     mutt_parse_hook,        M_ACCOUNTHOOK },
 #endif
@@ -3095,8 +3297,11 @@ struct command_t Commands[] = {
   { "save-hook",       mutt_parse_hook,        M_SAVEHOOK },
   { "score",           mutt_parse_score,       0 },
   { "send-hook",       mutt_parse_hook,        M_SENDHOOK },
+  { "send2-hook",      mutt_parse_hook,        M_SEND2HOOK },
   { "set",             parse_set,              0 },
   { "source",          parse_source,           0 },
+  { "spam",            parse_spam_list,        M_SPAM },
+  { "nospam",          parse_spam_list,        M_NOSPAM },
   { "subscribe",       parse_subscribe,        0 },
   { "toggle",          parse_set,              M_SET_INV },
   { "unalias",         parse_unalias,          0 },