Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 mutt (1.14.2-1.0antix1) unstable; urgency=medium
 .
   * New upstream release
   * antiX buster build
Author: anticapitalista <antix@operamail.com>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2020-05-30

--- mutt-1.14.2.orig/attach.c
+++ mutt-1.14.2/attach.c
@@ -427,7 +427,6 @@ int mutt_view_attachment (FILE *fp, BODY
       FREE (&fname);
       if (mutt_save_attachment (fp, a, mutt_b2s (tempfile), 0, NULL) == -1)
 	goto return_error;
-      chmod (tempfile, 0400);
     }
 
     use_pipe = mutt_rfc1524_expand_command (a, mutt_b2s (tempfile), type,
@@ -604,11 +603,7 @@ return_error:
 
   rfc1524_free_entry (&entry);
   if (fp && (mutt_b2s (tempfile))[0])
-  {
-    /* Restore write permission so mutt_unlink can open the file for writing */
-    chmod(tempfile, 0600);
     mutt_unlink (mutt_b2s (tempfile));
-  }
   else if (unlink_tempfile)
     unlink (mutt_b2s (tempfile));
 
--- mutt-1.14.2.orig/contrib/gpg.rc
+++ mutt-1.14.2/contrib/gpg.rc
@@ -52,36 +52,30 @@
 # in some localiaztion environments, generates 8bit data in that header, thereby
 # breaking PGP/MIME.
 
-# Note from the Debian mutt maintainers: starting from 1.7.0-2 GPGME is enabled
-# by default. More info in NEWS.Debian.
-# THe pgp_* commands are left here for people who disable gpgme in their
-# ~/.muttrc
-set crypt_use_gpgme=yes
-
-# Note from the Debian mutt maintainers: the addition of
-# "--pinentry-mode loopback" breaks gpgv1 compatiblity, if you need to use gpgv1
-# remove that statement.
-
 # decode application/pgp
-set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0 --pinentry-mode=loopback? --no-verbose --quiet --batch --output - %f"
+set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
 
 # verify a pgp/mime signature
 set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
 
 # decrypt a pgp/mime attachment
-set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0 --pinentry-mode=loopback? --no-verbose --quiet --batch --output - %f"
+set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
 
 # create a pgp/mime signed attachment
-set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0 --pinentry-mode=loopback? --armor --detach-sign --textmode %?a?-u %a? %f"
+# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
+set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
 
 # create a application/pgp signed (old-style) message
-set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0 --pinentry-mode=loopback? --armor --textmode --clearsign %?a?-u %a? %f"
+# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
+set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
 
 # create a pgp/mime encrypted attachment
-set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
+# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
 
 # create a pgp/mime encrypted and signed attachment
-set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd 0 --pinentry-mode=loopback? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
+# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
 
 # import a key into the public key ring
 set pgp_import_command="gpg --no-verbose --import %f"
--- mutt-1.14.2.orig/contrib/smime.rc
+++ mutt-1.14.2/contrib/smime.rc
@@ -4,20 +4,20 @@
 
 # If you compiled mutt with support for both PGP and S/MIME, PGP
 # will be the default method unless the following option is set
-#set smime_is_default
+set smime_is_default
 
 # Uncomment this if you don't want to set labels for certificates you add.
 # unset smime_ask_cert_label
 
 # Passphrase expiration
-#set smime_timeout=300
+set smime_timeout=300
 
 # Global crypto options -- these affect PGP operations as well.
-#set crypt_autosign = yes
-#set crypt_replyencrypt = yes
-#set crypt_replysign = yes
-#set crypt_replysignencrypted = yes
-#set crypt_verify_sig = yes
+set crypt_autosign = yes
+set crypt_replyencrypt = yes
+set crypt_replysign = yes
+set crypt_replysignencrypted = yes
+set crypt_verify_sig = yes
 
 
 # Section A: Key Management
@@ -47,8 +47,7 @@
 # unset smime_decrypt_use_default_key
 
 # Path to a file or directory with trusted certificates
-#set smime_ca_location="~/.smime/ca-bundle.crt"
-set smime_ca_location=`for f in $HOME/.smime/ca-certificates.crt $HOME/.smime/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt ; do if [ -e $f ] ; then echo $f ; exit ; fi ; done`
+set smime_ca_location="~/.smime/ca-bundle.crt"
 
 # Path to where all known certificates go. (must exist!)
 set smime_certificates="~/.smime/certificates"
@@ -95,7 +94,7 @@ set smime_sign_command="openssl smime -s
 # Section C: Incoming messages
 
 # Decrypt a message.  Output is a MIME entity.
-set smime_decrypt_command="openssl cms -decrypt -passin stdin -inform DER -in %f -inkey %k -recip %c"
+set smime_decrypt_command="openssl smime -decrypt -passin stdin -inform DER -in %f -inkey %k -recip %c"
 
 # Verify a signature of type multipart/signed
 set smime_verify_command="openssl smime -verify -inform DER -in %s %C -content %f"
--- mutt-1.14.2.orig/doc/Makefile.am
+++ mutt-1.14.2/doc/Makefile.am
@@ -137,7 +137,9 @@ uninstall-local:
 
 check:
 manual.txt: manual.html
-	LC_ALL=C w3m -dump -O UTF-8 manual.html > $@
+	-LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ || \
+	LC_ALL=C w3m -dump manual.html > $@ || \
+	LC_ALL=C elinks -dump -no-numbering -no-references manual.html | sed -e 's,\\001, ,g' > $@
 
 Muttrc: stamp-doc-rc
 
@@ -149,7 +151,7 @@ stamp-doc-rc: $(top_srcdir)/init.h maked
 	touch stamp-doc-rc
 
 manual.html: $(srcdir)/html.xsl $(srcdir)/mutt.xsl stamp-doc-xml $(srcdir)/mutt.css
-	xsltproc --nonet -o $@ $(srcdir)/html.xsl manual.xml
+	-xsltproc --nonet -o $@ $(srcdir)/html.xsl manual.xml
 
 stamp-doc-chunked: $(srcdir)/chunk.xsl $(srcdir)/mutt.xsl stamp-doc-xml $(srcdir)/mutt.css
 	-xsltproc --nonet $(srcdir)/chunk.xsl manual.xml
--- mutt-1.14.2.orig/doc/Muttrc.head
+++ mutt-1.14.2/doc/Muttrc.head
@@ -12,34 +12,6 @@ unignore from: subject to cc date x-mail
 # Display the fields in this order
 hdr_order date from to cc subject
 
-# emacs-like bindings
-bind editor    "\e<delete>"    kill-word
-bind editor    "\e<backspace>" kill-word
-
-# map delete-char to a sane value
-bind editor     <delete>  delete-char
-
-# some people actually like these settings
-#set pager_stop
-#bind pager <up> previous-line
-#bind pager <down> next-line
-
-# Specifies how to sort messages in the index menu.
-set sort=threads
-
-# The behavior of this option on the Debian mutt package is
-# not the original one because exim4, the default SMTP on Debian
-# does not strip bcc headers so this can cause privacy problems;
-# see man muttrc for more info
-#unset write_bcc
-# Postfix and qmail use Delivered-To for detecting loops
-unset bounce_delivered
-
-set mixmaster="mixmaster-filter"
-
-# System-wide CA file managed by the ca-certificates package
-set ssl_ca_certificates_file="/etc/ssl/certs/ca-certificates.crt"
-
 # imitate the old search-body function
 macro index \eb "<search>~b " "search in message bodies"
 
@@ -51,7 +23,7 @@ macro index,pager,attach,compose \cb "\
 "call urlview to extract URLs out of a message"
 
 # Show documentation when pressing F1
-macro generic,pager <F1> "<shell-escape> zcat @docdir@/manual.txt.gz | sensible-pager<enter>" "show Mutt documentation"
+macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation"
 
 # show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
 # note: these macros have been subsumed by the <browse-mailboxes> function.
@@ -65,7 +37,7 @@ bind browser y exit
 # append-hook '\.gz$'  "gzip -c   '%t' >> '%f'"
 
 # If Mutt is unable to determine your site's domain name correctly, you can
-# set the default here. (better: fix /etc/mailname)
+# set the default here.
 #
 # set hostname=cs.hmc.edu
 
@@ -77,13 +49,6 @@ bind browser y exit
 # be undone with unmime_lookup.
 mime_lookup application/octet-stream
 
-# Upgrade the progress counter every 250ms, good for mutt over SSH
-# see http://bugs.debian.org/537746
-set time_inc=250
-
-# Allow mutt to understand References, Cc and In-Reply-To as headers in mailto:
-mailto_allow = cc in-reply-to references
-
 ##
 ## *** DEFAULT SETTINGS FOR THE ATTACHMENTS PATCH ***
 ##
--- mutt-1.14.2.orig/doc/mutt.man
+++ mutt-1.14.2/doc/mutt.man
@@ -191,7 +191,7 @@ User's personal mapping between MIME typ
 System mapping between MIME types and file extensions.
 .IP "@bindir@/mutt_dotlock"
 The privileged dotlocking program.
-.IP "/usr/share/doc/mutt/manual.txt.gz"
+.IP "@docdir@/manual.txt"
 The Mutt manual.
 .SH BUGS
 .PP
--- mutt-1.14.2.orig/headers.c
+++ mutt-1.14.2/headers.c
@@ -55,7 +55,7 @@ int mutt_edit_headers (const char *edito
     }
 
     mutt_env_to_local (sctx->msg->env);
-    mutt_write_rfc822_header (ofp, sctx->msg->env, NULL, MUTT_WRITE_HEADER_EDITHDRS, 0, 0, 1);
+    mutt_write_rfc822_header (ofp, sctx->msg->env, NULL, MUTT_WRITE_HEADER_EDITHDRS, 0, 0);
     fputc ('\n', ofp);	/* tie off the header. */
 
     /* now copy the body of the message. */
--- mutt-1.14.2.orig/init.c
+++ mutt-1.14.2/init.c
@@ -135,30 +135,6 @@ static int mutt_option_index (char *s)
   return (-1);
 }
 
-/* getmailname returns the content of /etc/mailname if present, so that the caller can use that instead of calling
- * gethostbyname() on the hostname; the function returns NULL in case of failure or a dynamically allocated buffer in
- * case of success. The buffer needs to be freed after use.
- */
-static char *getmailname(void)
-{
-  FILE *f;
-  int lineno = 0;
-  size_t slen = 0;
-  char *s;
-
-  if (!(f = safe_fopen("/etc/mailname", "r")))
-  {
-    return NULL;
-  }
-
-  s = mutt_read_line(NULL, &slen, f, &lineno, 0);
-  safe_fclose(&f);
-  if (!s || slen == 0) {
-    return NULL;
-  }
-  return s;
-}
-
 int mutt_extract_token (BUFFER *dest, BUFFER *tok, int flags)
 {
   char		ch;
@@ -3600,37 +3576,30 @@ void mutt_init (int skip_sys_rc, LIST *c
   else
     Hostname = safe_strdup (utsname.nodename);
 
-  /* If /etc/mailname is available, use that as domain name, otherwise the
-   * configured domain, DNS or uname (in order) */
-  if ((p = getmailname()))
-  {
-    Fqdn = safe_strdup(p);
-  }
-  else if (domain)
+  /* now get FQDN.  Use configured domain first, DNS next, then uname */
+  if (domain)
   {
     /* we have a compile-time domain name, use that for Fqdn */
     Fqdn = safe_malloc (mutt_strlen (domain) + mutt_strlen (Hostname) + 2);
     sprintf (Fqdn, "%s.%s", NONULL(Hostname), domain);	/* __SPRINTF_CHECKED__ */
   }
-  else if (!Fqdn)
+  else if (!(getdnsdomainname (buffer)))
   {
-    if (!(getdnsdomainname (buffer)))
-    {
-      Fqdn = safe_malloc (mutt_buffer_len (buffer) + mutt_strlen (Hostname) + 2);
-      sprintf (Fqdn, "%s.%s", NONULL(Hostname), mutt_b2s (buffer));	/* __SPRINTF_CHECKED__ */
-    }
-    else
-      /*
-       * DNS failed, use the nodename.  Whether or not the nodename had a '.' in
-       * it, we can use the nodename as the FQDN.  On hosts where DNS is not
-       * being used, e.g. small network that relies on hosts files, a short host
-       * name is all that is required for SMTP to work correctly.  It could be
-       * wrong, but we've done the best we can, at this point the onus is on the
-       * user to provide the correct hostname if the nodename won't work in their
-       * network.
-       */
-      Fqdn = safe_strdup(utsname.nodename);
+    Fqdn = safe_malloc (mutt_buffer_len (buffer) + mutt_strlen (Hostname) + 2);
+    sprintf (Fqdn, "%s.%s", NONULL(Hostname), mutt_b2s (buffer));	/* __SPRINTF_CHECKED__ */
   }
+  else
+    /*
+     * DNS failed, use the nodename.  Whether or not the nodename had a '.' in
+     * it, we can use the nodename as the FQDN.  On hosts where DNS is not
+     * being used, e.g. small network that relies on hosts files, a short host
+     * name is all that is required for SMTP to work correctly.  It could be
+     * wrong, but we've done the best we can, at this point the onus is on the
+     * user to provide the correct hostname if the nodename won't work in their
+     * network.
+     */
+    Fqdn = safe_strdup(utsname.nodename);
+
 
   if ((p = getenv ("MAIL")))
     Spoolfile = safe_strdup (p);
@@ -3661,7 +3630,7 @@ void mutt_init (int skip_sys_rc, LIST *c
   {
     p = getenv ("EDITOR");
     if (!p)
-      p = "/usr/bin/editor";
+      p = "vi";
   }
   Editor = safe_strdup (p);
   Visual = safe_strdup (p);
--- mutt-1.14.2.orig/init.h
+++ mutt-1.14.2/init.h
@@ -4465,9 +4465,6 @@ struct option_t MuttVars[] = {
   ** Note this option only affects the sending of messages.  Fcc'ed
   ** copies of a message will always contain the ``Bcc:'' header if
   ** one exists.
-  ** .pp
-  ** On Debian systems, exim4 and postfix strip BCC headers by
-  ** default. The above warning applies to exim3 users, see /etc/Muttrc.
   */
   { "write_inc",	DT_NUM,	 R_NONE, {.p=&WriteInc}, {.l=10} },
   /*
--- mutt-1.14.2.orig/main.c
+++ mutt-1.14.2/main.c
@@ -1249,7 +1249,7 @@ int main (int argc, char **argv, char **
         mutt_write_rfc822_header (fout, msg->env, msg->content,
                                   MUTT_WRITE_HEADER_POSTPONE, 0,
                                   option (OPTCRYPTPROTHDRSREAD) &&
-                                  mutt_should_hide_protected_subject (msg), 1);
+                                  mutt_should_hide_protected_subject (msg));
         if (option (OPTRESUMEEDITEDDRAFTFILES))
           fprintf (fout, "X-Mutt-Resume-Draft: 1\n");
         fputc ('\n', fout);
--- mutt-1.14.2.orig/pattern.c
+++ mutt-1.14.2/pattern.c
@@ -278,7 +278,7 @@ static int msg_search_sendmode (HEADER *
 
     mutt_write_rfc822_header (fp, h->env, h->content,
                               MUTT_WRITE_HEADER_POSTPONE,
-                              0, 0, 1);
+                              0, 0);
     fflush (fp);
     fseek (fp, 0, 0);
 
--- mutt-1.14.2.orig/protos.h
+++ mutt-1.14.2/protos.h
@@ -401,7 +401,7 @@ int mutt_write_fcc (const char *path, SE
 int mutt_write_mime_body (BODY *, FILE *);
 int mutt_write_mime_header (BODY *, FILE *);
 int mutt_write_one_header (FILE *fp, const char *tag, const char *value, const char *pfx, int wraplen, int flags);
-int mutt_write_rfc822_header (FILE *, ENVELOPE *, BODY *, mutt_write_header_mode, int, int, int);
+int mutt_write_rfc822_header (FILE *, ENVELOPE *, BODY *, mutt_write_header_mode, int, int);
 void mutt_write_references (LIST *, FILE *, int);
 int mutt_yesorno (const char *, int);
 void mutt_set_header_color(CONTEXT *, HEADER *);
--- mutt-1.14.2.orig/send.c
+++ mutt-1.14.2/send.c
@@ -1158,12 +1158,12 @@ static int invoke_mta (HEADER *msg)
 #ifdef MIXMASTER
   mutt_write_rfc822_header (tempfp, msg->env, msg->content,
                             MUTT_WRITE_HEADER_NORMAL, msg->chain ? 1 : 0,
-                            mutt_should_hide_protected_subject (msg), 0);
+                            mutt_should_hide_protected_subject (msg));
 #endif
 #ifndef MIXMASTER
   mutt_write_rfc822_header (tempfp, msg->env, msg->content,
                             MUTT_WRITE_HEADER_NORMAL, 0,
-                            mutt_should_hide_protected_subject (msg), 0);
+                            mutt_should_hide_protected_subject (msg));
 #endif
 #ifdef USE_SMTP
   if (old_write_bcc)
--- mutt-1.14.2.orig/sendlib.c
+++ mutt-1.14.2/sendlib.c
@@ -427,7 +427,7 @@ int mutt_write_mime_header (BODY *a, FIL
         ) &&
       a->mime_headers)
   {
-    mutt_write_rfc822_header (f, a->mime_headers, NULL, MUTT_WRITE_HEADER_MIME, 0, 0, 1);
+    mutt_write_rfc822_header (f, a->mime_headers, NULL, MUTT_WRITE_HEADER_MIME, 0, 0);
   }
 
   /* Do NOT add the terminator here!!! */
@@ -2181,7 +2181,7 @@ out:
  */
 int mutt_write_rfc822_header (FILE *fp, ENVELOPE *env, BODY *attach,
 			      mutt_write_header_mode mode, int privacy,
-                              int hide_protected_subject, int should_write_bcc)
+                              int hide_protected_subject)
 {
   char buffer[LONG_STRING];
   char *p, *q;
@@ -2225,7 +2225,7 @@ int mutt_write_rfc822_header (FILE *fp,
   else if (mode == MUTT_WRITE_HEADER_EDITHDRS)
     fputs ("Cc: \n", fp);
 
-  if (env->bcc && should_write_bcc)
+  if (env->bcc)
   {
     if (mode == MUTT_WRITE_HEADER_POSTPONE ||
         mode == MUTT_WRITE_HEADER_EDITHDRS ||
@@ -3040,7 +3040,7 @@ int mutt_write_fcc (const char *path, SE
                             post ? MUTT_WRITE_HEADER_POSTPONE : MUTT_WRITE_HEADER_FCC,
                             0,
                             option (OPTCRYPTPROTHDRSREAD) &&
-                            mutt_should_hide_protected_subject (hdr), 1);
+                            mutt_should_hide_protected_subject (hdr));
 
   /* (postponment) if this was a reply of some sort, <msgid> contains the
    * Message-ID: of message replied to.  Save it using a special X-Mutt-
