Browse Source

mutt patches

master
Shaggy 5 years ago
parent
commit
445730e3a5
48 changed files with 14899 additions and 0 deletions
  1. 72
    0
      mutt-patched/.AURINFO
  2. 48
    0
      mutt-patched/228671-pipe-mime.patch
  3. 25
    0
      mutt-patched/383769-score-match.patch
  4. 127
    0
      mutt-patched/467432-write_bcc.patch
  5. 39
    0
      mutt-patched/528233-readonly-open.patch
  6. 26
    0
      mutt-patched/531430-imapuser.patch
  7. 25
    0
      mutt-patched/542817-smimekeys-tmpdir.patch
  8. 29
    0
      mutt-patched/543467-thread-segfault.patch
  9. 95
    0
      mutt-patched/547980-smime_keys-chaining.patch
  10. 39
    0
      mutt-patched/548577-gpgme-1.2.patch
  11. 29
    0
      mutt-patched/553321-ansi-escape-segfault.patch
  12. 39
    0
      mutt-patched/566076-build_doc_adjustments.patch
  13. 33
    0
      mutt-patched/603288-split-fetches.patch
  14. 52
    0
      mutt-patched/611410-no-implicit_autoview-for-text-html.patch
  15. 82
    0
      mutt-patched/Md.etc_mailname_gethostbyname.patch
  16. 81
    0
      mutt-patched/Muttrc.patch
  17. 208
    0
      mutt-patched/PKGBUILD
  18. 22
    0
      mutt-patched/am-maintainer-mode.patch
  19. 27
    0
      mutt-patched/assumed_charset-compat.patch
  20. 22
    0
      mutt-patched/compressed-folders.debian.patch
  21. 1188
    0
      mutt-patched/compressed-folders.patch
  22. 25
    0
      mutt-patched/correct_docdir_in_man_page.patch
  23. 24
    0
      mutt-patched/define-pgp_getkeys_command.patch
  24. 87
    0
      mutt-patched/document_debian_defaults.patch
  25. 39
    0
      mutt-patched/dont_document_not_present_features.patch
  26. 22
    0
      mutt-patched/fix-configure-test-operator.patch
  27. 29
    0
      mutt-patched/gpg.rc-paths.patch
  28. 160
    0
      mutt-patched/ifdef.patch
  29. 114
    0
      mutt-patched/imap_fast_trash.patch
  30. 8
    0
      mutt-patched/install
  31. 83
    0
      mutt-patched/multiple-fcc.patch
  32. 8748
    0
      mutt-patched/nntp.patch
  33. 63
    0
      mutt-patched/patch-1.5.4.vk.pgp_verbose_mime.patch
  34. 25
    0
      mutt-patched/path_max.patch
  35. 241
    0
      mutt-patched/purge-message.patch
  36. 115
    0
      mutt-patched/sensible_browser_position.patch
  37. 40
    0
      mutt-patched/sidebar-compose.patch
  38. 38
    0
      mutt-patched/sidebar-delimnullwide.patch
  39. 98
    0
      mutt-patched/sidebar-dotpathsep.patch
  40. 97
    0
      mutt-patched/sidebar-new.patch
  41. 198
    0
      mutt-patched/sidebar-newonly.patch
  42. 132
    0
      mutt-patched/sidebar-utf8.patch
  43. 1476
    0
      mutt-patched/sidebar.patch
  44. 60
    0
      mutt-patched/smime.rc.patch
  45. 316
    0
      mutt-patched/trash-folder.patch
  46. 115
    0
      mutt-patched/update_german_translation.patch
  47. 40
    0
      mutt-patched/use_usr_bin_editor.patch
  48. 198
    0
      mutt-patched/xtitles.patch

+ 72
- 0
mutt-patched/.AURINFO View File

@@ -0,0 +1,72 @@
pkgbase = mutt-patched
pkgdesc = Small but very powerful text-based mail client (plus a huge pile of patches mostly from debian)
pkgver = 1.5.23
pkgrel = 4
url = http://www.mutt.org/
install = install
arch = i686
arch = x86_64
license = GPL
makedepends = w3m
makedepends = docbook-xsl
depends = gpgme
depends = ncurses
depends = gnutls
depends = libsasl
depends = libidn
depends = mime-types
depends = krb5
depends = tokyocabinet
optdepends = smtp-forwarder: to send mail
provides = mutt
conflicts = mutt
source = https://bitbucket.org/mutt/mutt/downloads/mutt-1.5.23.tar.gz
source = am-maintainer-mode.patch
source = ifdef.patch
source = xtitles.patch
source = trash-folder.patch
source = purge-message.patch
source = imap_fast_trash.patch
source = sensible_browser_position.patch
source = patch-1.5.4.vk.pgp_verbose_mime.patch
source = compressed-folders.patch
source = compressed-folders.debian.patch
source = Muttrc.patch
source = Md.etc_mailname_gethostbyname.patch
source = use_usr_bin_editor.patch
source = correct_docdir_in_man_page.patch
source = dont_document_not_present_features.patch
source = document_debian_defaults.patch
source = assumed_charset-compat.patch
source = 467432-write_bcc.patch
source = 566076-build_doc_adjustments.patch
source = define-pgp_getkeys_command.patch
source = gpg.rc-paths.patch
source = smime.rc.patch
source = fix-configure-test-operator.patch
source = 531430-imapuser.patch
source = 543467-thread-segfault.patch
source = 542817-smimekeys-tmpdir.patch
source = 548577-gpgme-1.2.patch
source = 553321-ansi-escape-segfault.patch
source = 547980-smime_keys-chaining.patch
source = 528233-readonly-open.patch
source = 228671-pipe-mime.patch
source = 383769-score-match.patch
source = 603288-split-fetches.patch
source = 611410-no-implicit_autoview-for-text-html.patch
source = path_max.patch
source = update_german_translation.patch
source = sidebar.patch
source = sidebar-dotpathsep.patch
source = sidebar-utf8.patch
source = multiple-fcc.patch
source = sidebar-newonly.patch
source = sidebar-delimnullwide.patch
source = sidebar-compose.patch
source = sidebar-new.patch
source = nntp.patch
backup = etc/Muttrc

pkgname = mutt-patched


+ 48
- 0
mutt-patched/228671-pipe-mime.patch View File

@@ -0,0 +1,48 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 17:11:56 +0100
Subject: 228671-pipe-mime

Don't draw imap fetch progress if we aren't in visual mode.
Drawing progress leaves terminal in confusing state when
piping a message from pager to less(1).
See http://bugs.mutt.org/1771

Updated in Debian bug #569279

Gbp-Pq: Topic upstream
---
imap/message.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/imap/message.c b/imap/message.c
index 3c9822f..3504be8 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -398,7 +398,7 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, int msgno)
char path[_POSIX_PATH_MAX];
char *pc;
long bytes;
- progress_t progressbar;
+ progress_t progressbar, *pbar;
int uid;
int cacheno;
IMAP_CACHE *cache;
@@ -495,9 +495,15 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, int msgno)
imap_error ("imap_fetch_message()", buf);
goto bail;
}
- mutt_progress_init (&progressbar, _("Fetching message..."),
- M_PROGRESS_SIZE, NetInc, bytes);
- if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0)
+ if (!isendwin())
+ {
+ mutt_progress_init (&progressbar, _("Fetching message..."),
+ M_PROGRESS_SIZE, NetInc, bytes);
+ pbar = &progressbar;
+ }
+ else
+ pbar = NULL;
+ if (imap_read_literal (msg->fp, idata, bytes, pbar) < 0)
goto bail;
/* pick up trailing line */
if ((rc = imap_cmd_step (idata)) != IMAP_CMD_CONTINUE)

+ 25
- 0
mutt-patched/383769-score-match.patch View File

@@ -0,0 +1,25 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 17:14:35 +0100
Subject: 383769-score-match

Better matching for ~f, same as mutt-ng did.
(see upstream http://bugs.mutt.org/2179)

Gbp-Pq: Topic upstream
---
score.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/score.c b/score.c
index 6f952a5..7bc4d83 100644
--- a/score.c
+++ b/score.c
@@ -133,7 +133,7 @@ void mutt_score_message (CONTEXT *ctx, HEADER *hdr, int upd_ctx)
hdr->score = 0; /* in case of re-scoring */
for (tmp = Score; tmp; tmp = tmp->next)
{
- if (mutt_pattern_exec (tmp->pat, 0, NULL, hdr) > 0)
+ if (mutt_pattern_exec (tmp->pat, M_MATCH_FULL_ADDRESS, NULL, hdr) > 0)
{
if (tmp->exact || tmp->val == 9999 || tmp->val == -9999)
{

+ 127
- 0
mutt-patched/467432-write_bcc.patch View File

@@ -0,0 +1,127 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:22:51 +0100
Subject: 467432-write_bcc
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

The purpose of this patch is to alter the behavior of the write_bcc option
because exim4, the default SMTP in Debian, does not strip the Bcc headers; by
default write_bcc is set so this could cause a privacy leak.

The behavior that this patch introduces is: never write the Bcc header when the
message is sent, otherwise, if the message is sent to Fcc, then this optin
will be evaluated and the Bcc header will be written based on that.

Background discussion on this is in the following bugs:
http://bugs.debian.org/304718
http://bugs.debian.org/467432

This patch is a slightly modified version of the patch provided by
Stefan Völkel <stefan@bc-bd.org> in the second bug.

Gbp-Pq: Topic debian-specific
---
headers.c | 2 +-
init.h | 11 +++--------
protos.h | 2 +-
send.c | 4 ++--
sendlib.c | 6 +++---
5 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/headers.c b/headers.c
index 578b33d..f701c8e 100644
--- a/headers.c
+++ b/headers.c
@@ -52,7 +52,7 @@ void mutt_edit_headers (const char *editor,
}
mutt_env_to_local (msg->env);
- mutt_write_rfc822_header (ofp, msg->env, NULL, 1, 0);
+ mutt_write_rfc822_header (ofp, msg->env, NULL, 1, 0, 1);
fputc ('\n', ofp); /* tie off the header. */
/* now copy the body of the message. */
diff --git a/init.h b/init.h
index 875cad8..42b79d6 100644
--- a/init.h
+++ b/init.h
@@ -3440,14 +3440,9 @@ struct option_t MuttVars[] = {
{ "write_bcc", DT_BOOL, R_NONE, OPTWRITEBCC, 1},
/*
** .pp
- ** Controls whether mutt writes out the ``Bcc:'' header when preparing
- ** messages to be sent. Exim users may wish to unset this. If mutt
- ** is set to deliver directly via SMTP (see $$smtp_url), this
- ** option does nothing: mutt will never write out the ``Bcc:'' header
- ** in this case.
- ** .pp
- ** \fBNote:\fP On Debian systems, exim4 and postfix strip BCC headers by
- ** default. The above warning applies to exim3 users, see /etc/Muttrc.
+ ** Controls whether mutt writes out the Bcc header when saving
+ ** messages to FCC. Bcc headers will never be written to a message
+ ** when sending it. Note: this behavior is Debian specific.
*/
{ "write_inc", DT_NUM, R_NONE, UL &WriteInc, 10 },
/*
diff --git a/protos.h b/protos.h
index 8542f91..38c8c01 100644
--- a/protos.h
+++ b/protos.h
@@ -366,7 +366,7 @@ int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int, char
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 *, int, int);
+int mutt_write_rfc822_header (FILE *, ENVELOPE *, BODY *, int, int, int);
void mutt_write_references (LIST *, FILE *, int);
int mutt_yesorno (const char *, int);
void mutt_set_header_color(CONTEXT *, HEADER *);
diff --git a/send.c b/send.c
index fce003c..18b9390 100644
--- a/send.c
+++ b/send.c
@@ -994,10 +994,10 @@ static int send_message (HEADER *msg)
unset_option (OPTWRITEBCC);
#endif
#ifdef MIXMASTER
- mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, msg->chain ? 1 : 0);
+ mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, msg->chain ? 1 : 0, 0);
#endif
#ifndef MIXMASTER
- mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, 0);
+ mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, 0, 0);
#endif
#ifdef USE_SMTP
if (old_write_bcc)
diff --git a/sendlib.c b/sendlib.c
index cede853..0f05298 100644
--- a/sendlib.c
+++ b/sendlib.c
@@ -1929,7 +1929,7 @@ out:
int mutt_write_rfc822_header (FILE *fp, ENVELOPE *env, BODY *attach,
- int mode, int privacy)
+ int mode, int privacy, int should_write_bcc)
{
char buffer[LONG_STRING];
char *p, *q;
@@ -1972,7 +1972,7 @@ int mutt_write_rfc822_header (FILE *fp, ENVELOPE *env, BODY *attach,
else if (mode > 0)
fputs ("Cc: \n", fp);
- if (env->bcc)
+ if (env->bcc && should_write_bcc)
{
if(mode != 0 || option(OPTWRITEBCC))
{
@@ -2727,7 +2727,7 @@ int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post,
/* post == 1 => postpone message. Set mode = -1 in mutt_write_rfc822_header()
* post == 0 => Normal mode. Set mode = 0 in mutt_write_rfc822_header()
* */
- mutt_write_rfc822_header (msg->fp, hdr->env, hdr->content, post ? -post : 0, 0);
+ mutt_write_rfc822_header (msg->fp, hdr->env, hdr->content, post ? -post : 0, 0, 1);
/* (postponment) if this was a reply of some sort, <msgid> contians the
* Message-ID: of message replied to. Save it using a special X-Mutt-

+ 39
- 0
mutt-patched/528233-readonly-open.patch View File

@@ -0,0 +1,39 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 17:07:35 +0100
Subject: 528233-readonly-open

Open attachments as read-only so the editor won't be able to modify it;
otherwise the user can believe that he/she can edit it and risk to lose
his/her work (see upstream bug http://bugs.mutt.org/3261)

Debian bugs: #528233, updated in #572203

Gbp-Pq: Topic upstream
---
attach.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/attach.c b/attach.c
index 0efeb79..c5f47d9 100644
--- a/attach.c
+++ b/attach.c
@@ -415,6 +415,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
FREE (&fname);
if (mutt_save_attachment (fp, a, tempfile, 0, NULL) == -1)
goto return_error;
+ chmod (tempfile, 0400);
}
use_pipe = rfc1524_expand_command (a, tempfile, type,
@@ -587,7 +588,11 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
if (entry)
rfc1524_free_entry (&entry);
if (fp && tempfile[0])
+ {
+ /* Restore write permission so mutt_unlink can open the file for writing */
+ chmod(tempfile, 0600);
mutt_unlink (tempfile);
+ }
else if (unlink_tempfile)
unlink(tempfile);

+ 26
- 0
mutt-patched/531430-imapuser.patch View File

@@ -0,0 +1,26 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:36:23 +0100
Subject: 531430-imapuser

Fixes a problem where the imap->login has the precedence
so the user is asked with wrong informaton,
see upstream #3240.

Gbp-Pq: Topic upstream
---
account.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/account.c b/account.c
index f738991..bf59995 100644
--- a/account.c
+++ b/account.c
@@ -222,7 +222,7 @@ int mutt_account_getpass (ACCOUNT* account)
else
{
snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "),
- account->flags & M_ACCT_LOGIN ? account->login : account->user,
+ ((account->flags & M_ACCT_LOGIN) && !(account->user)) ? account->login : account->user,
account->host);
account->pass[0] = '\0';
if (mutt_get_password (prompt, account->pass, sizeof (account->pass)))

+ 25
- 0
mutt-patched/542817-smimekeys-tmpdir.patch View File

@@ -0,0 +1,25 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:45:38 +0100
Subject: 542817-smimekeys-tmpdir

Skip the configured tmpdir if it contains '=',
that convention is used only by Mutt.
(see upstream http://bugs.mutt.org/3324)

Gbp-Pq: Topic upstream
---
smime_keys.pl | 1 +
1 file changed, 1 insertion(+)

diff --git a/smime_keys.pl b/smime_keys.pl
index a825358..2f4544a 100755
--- a/smime_keys.pl
+++ b/smime_keys.pl
@@ -946,6 +946,7 @@ sub newfile ($;$$) {
$option = "notemp" if (not defined($option));
if (! $tmpdir and $option eq "temp") {
$tmpdir = mutt_Q 'tmpdir';
+ $tmpdir = '/tmp' if ($tmpdir =~ m/=/); # if the tmpdir contains '=', use the default
$tmpdir = newfile("$tmpdir/smime");
mkdir $tmpdir, 0700 || die "Can't create $tmpdir: $!\n";
}

+ 29
- 0
mutt-patched/543467-thread-segfault.patch View File

@@ -0,0 +1,29 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:38:41 +0100
Subject: 543467-thread-segfault

Added a patch to prevent segfault when Ctrl+R is hit
on a malformed group of messages.
(see upstream bug http://bugs.mutt.org/3335)

Gbp-Pq: Topic upstream
---
flags.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/flags.c b/flags.c
index 5309bb7..133fa35 100644
--- a/flags.c
+++ b/flags.c
@@ -303,7 +303,10 @@ void mutt_tag_set_flag (int flag, int bf)
int mutt_thread_set_flag (HEADER *hdr, int flag, int bf, int subthread)
{
THREAD *start, *cur = hdr->thread;
-
+
+ if ( !hdr->thread )
+ return (-1);
+
if ((Sort & SORT_MASK) != SORT_THREADS)
{
mutt_error _("Threading is not enabled.");

+ 95
- 0
mutt-patched/547980-smime_keys-chaining.patch View File

@@ -0,0 +1,95 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 17:03:15 +0100
Subject: 547980-smime_keys-chaining

To suppose certificate chaining in smime_keys,
see upstream http://bugs.mutt.org/3339

Gbp-Pq: Topic upstream
---
smime_keys.pl | 57 ++++++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 48 insertions(+), 9 deletions(-)

diff --git a/smime_keys.pl b/smime_keys.pl
index 2f4544a..2a78e39 100755
--- a/smime_keys.pl
+++ b/smime_keys.pl
@@ -81,6 +81,30 @@ if ( -d $root_certs_path) {
# OPS
#
+
+sub get_certs {
+ my $file = shift;
+ return undef unless (defined($file) && -e $file);
+
+ open IN, "<$file";
+
+ my @certs = ();
+ my $in_cert = 0;
+ my $cert = q{};
+ while ( <IN> ) {
+ $in_cert = 1 if ( /^-----BEGIN CERTIFICATE-----$/ );
+ $cert .= $_;
+
+ if ( /^-----END CERTIFICATE-----$/ ) {
+ push @certs, $cert;
+ $cert = q{};
+ $in_cert = 0;
+ }
+ }
+
+ return @certs;
+}
+
if(@ARGV == 1 and $ARGV[0] eq "init") {
init_paths;
}
@@ -91,13 +115,27 @@ elsif(@ARGV == 2 and $ARGV[0] eq "label") {
change_label($ARGV[1]);
}
elsif(@ARGV == 2 and $ARGV[0] eq "add_cert") {
- my $format = -B $ARGV[1] ? 'DER' : 'PEM';
- my $cmd = "$opensslbin x509 -noout -hash -in $ARGV[1] -inform $format";
- my $cert_hash = `$cmd`;
- $? and die "'$cmd' returned $?";
- chomp($cert_hash);
- my $label = query_label;
- &add_certificate($ARGV[1], \$cert_hash, 1, $label, '?');
+ foreach my $cert ( get_certs( $ARGV[1] ) ) {
+
+ my $file = sprintf( '/tmp/smime-%d.%d', $$, int(rand( 999999 ) ) );
+ print STDERR "TMPFILE: $file\n";
+ if ( -e $file ) {
+ die( "ERROR: TMPFILE $file existss?!?!" );
+ }
+ open OUT, ">$file";
+ print OUT $cert;
+ close OUT;
+
+ my $format = -B $file ? 'DER' : 'PEM';
+ my $cmd = "$opensslbin x509 -noout -hash -in $file -inform $format";
+
+ my $cert_hash = `$cmd`;
+ $? and die "'$cmd' returned $?";
+ chomp($cert_hash);
+ my $label = query_label;
+ &add_certificate($ARGV[1], \$cert_hash, 1, $label, '?');
+ unlink $file;
+ }
}
elsif(@ARGV == 2 and $ARGV[0] eq "add_pem") {
-e $ARGV[1] and -s $ARGV[1] or die("$ARGV[1] is nonexistent or empty.");
@@ -381,9 +419,10 @@ sub query_label () {
print "the key ID. This has to be _one_ word (no whitespaces).\n\n";
print "Enter label: ";
- chomp($input = <STDIN>);
+ $input = <STDIN>;
+ chomp($input) if ( defined($input) );
- my ($label, $junk) = split(/\s/, $input, 2);
+ my ($label, $junk) = split(/\s/, $input, 2) if ( defined($input) );
defined $junk
and print "\nUsing '$label' as label; ignoring '$junk'\n";

+ 39
- 0
mutt-patched/548577-gpgme-1.2.patch View File

@@ -0,0 +1,39 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:50:21 +0100
Subject: 548577-gpgme-1.2

This patch fixes upstream bug http://bugs.mutt.org/3300,
so that Mutt will be able to open pgp crypted/signed
message with gpgme.

Gbp-Pq: Topic upstream
---
init.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/init.c b/init.c
index e0a0757..20a66bd 100644
--- a/init.c
+++ b/init.c
@@ -53,6 +53,10 @@
#include <sys/wait.h>
#include <sys/time.h>
+#if defined(CRYPT_BACKEND_GPGME)
+#include <gpgme.h>
+#endif
+
#define CHECK_PAGER \
if ((CurrentMenu == MENU_PAGER) && (idx >= 0) && \
(MuttVars[idx].flags & R_RESORT)) \
@@ -3277,6 +3281,10 @@ void mutt_init (int skip_sys_rc, LIST *commands)
mutt_read_histfile ();
+#ifdef CRYPT_BACKEND_GPGME
+ gpgme_check_version (NULL);
+#endif
+
#if 0
set_option (OPTWEED); /* turn weeding on by default */
#endif

+ 29
- 0
mutt-patched/553321-ansi-escape-segfault.patch View File

@@ -0,0 +1,29 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:56:37 +0100
Subject: 553321-ansi-escape-segfault

This patch prevents Mutt from crashing when *buf is freed,
the root cause is the fact that an adjacent memory segment
(*fmt) overruns and overwrite prev_size field in the heap.

The bug and the patch were forwarded upstream,
see http://bugs.mutt.org/3371

Gbp-Pq: Topic upstream
---
pager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pager.c b/pager.c
index b17afb4..7b61266 100644
--- a/pager.c
+++ b/pager.c
@@ -1053,7 +1053,7 @@ fill_buffer (FILE *f, LOFF_T *last_pos, LOFF_T offset, unsigned char **buf,
q = *fmt;
while (*p)
{
- if (*p == '\010' && (p > *buf))
+ if (*p == '\010' && (p > *buf) && (q > *fmt))
{
if (*(p+1) == '_') /* underline */
p += 2;

+ 39
- 0
mutt-patched/566076-build_doc_adjustments.patch View File

@@ -0,0 +1,39 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:25:39 +0100
Subject: 566076-build_doc_adjustments

Use w3m to build the txt manual.

Gbp-Pq: Topic debian-specific
---
doc/Makefile.am | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index f4e21bc..3676245 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -106,9 +106,7 @@ uninstall-local:
check:
manual.txt: 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' > $@
+ LC_ALL=C w3m -dump -O UTF-8 manual.html > $@
Muttrc: stamp-doc-rc
@@ -120,10 +118,10 @@ stamp-doc-rc: $(top_srcdir)/init.h makedoc$(EXEEXT) $(srcdir)/Muttrc.head
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
+ xsltproc --nonet $(srcdir)/chunk.xsl manual.xml
touch stamp-doc-chunked
$(CHUNKED_DOCFILES): stamp-doc-chunked

+ 33
- 0
mutt-patched/603288-split-fetches.patch View File

@@ -0,0 +1,33 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 17:16:58 +0100
Subject: 603288-split-fetches

A workaround for Exchange 2010 IMAP protocol,
tracked in http://bugs.mutt.org/3459,
already merged in the ubuntu version of Mutt.

Gbp-Pq: Topic upstream
---
imap/message.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/imap/message.c b/imap/message.c
index 3504be8..4234e22 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -240,6 +240,15 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
char *cmd;
fetchlast = msgend + 1;
+ /* Microsoft Exchange 2010 violates the IMAP protocol and
+ * starts omitting messages if one FETCHes more than 2047 (or
+ * or somewhere around that number. We therefore split the
+ * FETCH into chunks of 2000 messages each */
+ if (fetchlast - msgno - 1 > 2000)
+ {
+ fetchlast = msgno+1 + 2000;
+ }
+
safe_asprintf (&cmd, "FETCH %d:%d (UID FLAGS INTERNALDATE RFC822.SIZE %s)",
msgno + 1, fetchlast, hdrreq);
imap_cmd_start (idata, cmd);

+ 52
- 0
mutt-patched/611410-no-implicit_autoview-for-text-html.patch View File

@@ -0,0 +1,52 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 17:36:31 +0100
Subject: 611410-no-implicit_autoview-for-text-html
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

This patch blacklist text/html from the list of documents that will be
shown automatically, the patch (the muttlib.c part) has been written by
Loïc Minier <lool@dooz.org>, I've added the documentation bit.

The patch has been forwarded upstream originally by Loïc on:
http://bugs.mutt.org/3496

The original Debian bug for this problem is:
http://bugs.debian.org/611410

Gbp-Pq: Topic upstream
---
init.h | 4 +++-
muttlib.c | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/init.h b/init.h
index 42b79d6..08e004c 100644
--- a/init.h
+++ b/init.h
@@ -1222,7 +1222,9 @@ struct option_t MuttVars[] = {
** ``\fCcopiousoutput\fP'' flag set for \fIevery\fP MIME attachment it doesn't have
** an internal viewer defined for. If such an entry is found, mutt will
** use the viewer defined in that entry to convert the body part to text
- ** form.
+ ** form. MIME attachments with 'text' types, with the only exception
+ ** of text/html, are excluded: they will be shown as they are unless auto_view
+ ** is specified.
*/
{ "include", DT_QUAD, R_NONE, OPT_INCLUDE, M_ASKYES },
/*
diff --git a/muttlib.c b/muttlib.c
index 0425d45..c0d2026 100644
--- a/muttlib.c
+++ b/muttlib.c
@@ -658,6 +658,9 @@ int mutt_needs_mailcap (BODY *m)
switch (m->type)
{
case TYPETEXT:
+ /* we don't want to display text/html */
+ if (!ascii_strcasecmp ("html", m->subtype))
+ return 1;
/* we can display any text, overridable by auto_view */
return 0;
break;

+ 82
- 0
mutt-patched/Md.etc_mailname_gethostbyname.patch View File

@@ -0,0 +1,82 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 15:58:54 +0100
Subject: Md.etc_mailname_gethostbyname

If /etc/mailname is present, the hostname inside the file will be
used, rather than calling gethostbyname() on the actual hostname.

Gbp-Pq: Topic debian-specific
---
init.c | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

diff --git a/init.c b/init.c
index 81bb9e7..1401664 100644
--- a/init.c
+++ b/init.c
@@ -48,6 +48,7 @@
#include <unistd.h>
#include <string.h>
#include <sys/utsname.h>
+#include <netdb.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/time.h>
@@ -2965,6 +2966,31 @@ static void mutt_srandom (void)
srandom(seed);
}
+int getmailname(char *s, size_t l)
+{
+ FILE *f;
+ char tmp[512];
+ char *p = tmp;
+
+ if ((f = fopen ("/etc/mailname", "r")) == NULL)
+ return (-1);
+
+ if (fgets (tmp, 510, f) != NULL) {
+ while (*p && !ISSPACE(*p) && l > 0) {
+ *s++ = *p++;
+ l--;
+ }
+ if (*(s-1) == '.')
+ s--;
+ *s = 0;
+
+ fclose (f);
+ return 0;
+ }
+ fclose (f);
+ return (-1);
+}
+
void mutt_init (int skip_sys_rc, LIST *commands)
{
struct passwd *pw;
@@ -3041,10 +3067,25 @@ void mutt_init (int skip_sys_rc, LIST *commands)
Hostname = mutt_substrdup (utsname.nodename, p);
p++;
strfcpy (buffer, p, sizeof (buffer)); /* save the domain for below */
+ Fqdn = safe_strdup (utsname.nodename);
}
else
Hostname = safe_strdup (utsname.nodename);
+ /* if /etc/mailname exists use it and ignore everything else */
+ if (getmailname(buffer, sizeof (buffer)) != -1)
+ Fqdn = safe_strdup(buffer);
+
+ /* try gethostbyname(3) if /etc/mailname does not exists */
+ if (!Fqdn) {
+ struct hostent *hp;
+
+ if ((hp = gethostbyname(Hostname)))
+ Fqdn = safe_strdup(hp->h_name);
+ }
+
+ if (Fqdn) {
+ } else
#ifndef DOMAIN
#define DOMAIN buffer
if (!p && getdnsdomainname (buffer, sizeof (buffer)) == -1)

+ 81
- 0
mutt-patched/Muttrc.patch View File

@@ -0,0 +1,81 @@
From: Cristoph Berg <myon@debian.org>
Date: Thu, 27 Feb 2014 15:52:59 +0100
Subject: Muttrc

* 2009-01-15 myon: refreshed for mutt-1.5.19; drop our list of ignored headers
in favor of upstream's new unignore list

Signed-off-by: Matteo F. Vescovi <mfvescovi@gmail.com>

Gbp-Pq: Topic debian-specific
---
doc/Muttrc.head | 36 ++++++++++++++++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/doc/Muttrc.head b/doc/Muttrc.head
index 1f7012e..477c4b6 100644
--- a/doc/Muttrc.head
+++ b/doc/Muttrc.head
@@ -12,6 +12,34 @@ unignore from: subject to cc date x-mailer x-url user-agent
# 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"
@@ -23,14 +51,14 @@ 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> less @docdir@/manual.txt<Enter>" "show Mutt documentation"
+macro generic,pager <F1> "<shell-escape> zcat @docdir@/mutt/manual.txt.gz | sensible-pager<enter>" "show Mutt documentation"
# show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
bind browser y exit
# If Mutt is unable to determine your site's domain name correctly, you can
-# set the default here.
+# set the default here. (better: fix /etc/mailname)
#
# set hostname=cs.hmc.edu
@@ -42,6 +70,10 @@ 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
+
##
## *** DEFAULT SETTINGS FOR THE ATTACHMENTS PATCH ***
##

+ 208
- 0
mutt-patched/PKGBUILD View File

@@ -0,0 +1,208 @@
# Maintainer: Oscar Morante <oscar@morante.eu>
# Contributor: tobias [tobias [at] archlinux.org]
# Contributor: Gaetan Bisson <bisson@archlinux.org>

pkgname=mutt-patched
pkgver=1.5.23
pkgrel=4
pkgdesc='Small but very powerful text-based mail client (plus a huge pile of patches mostly from debian)'
url='http://www.mutt.org/'
license=('GPL')
backup=('etc/Muttrc')
arch=('i686' 'x86_64')
optdepends=('smtp-forwarder: to send mail')
depends=('gpgme' 'ncurses' 'gnutls' 'libsasl' 'libidn' 'mime-types'
'krb5' 'tokyocabinet')
makedepends=( 'w3m' 'docbook-xsl' )
conflicts=('mutt')
provides=('mutt')
source=(
"https://bitbucket.org/mutt/mutt/downloads/mutt-${pkgver}.tar.gz"
'am-maintainer-mode.patch'
'ifdef.patch'
'xtitles.patch'
'trash-folder.patch'
'purge-message.patch'
'imap_fast_trash.patch'
'sensible_browser_position.patch'
'patch-1.5.4.vk.pgp_verbose_mime.patch'
'compressed-folders.patch'
'compressed-folders.debian.patch'
'Muttrc.patch'
'Md.etc_mailname_gethostbyname.patch'
'use_usr_bin_editor.patch'
'correct_docdir_in_man_page.patch'
'dont_document_not_present_features.patch'
'document_debian_defaults.patch'
'assumed_charset-compat.patch'
'467432-write_bcc.patch'
'566076-build_doc_adjustments.patch'
'define-pgp_getkeys_command.patch'
'gpg.rc-paths.patch'
'smime.rc.patch'
'fix-configure-test-operator.patch'
'531430-imapuser.patch'
'543467-thread-segfault.patch'
'542817-smimekeys-tmpdir.patch'
'548577-gpgme-1.2.patch'
'553321-ansi-escape-segfault.patch'
'547980-smime_keys-chaining.patch'
'528233-readonly-open.patch'
'228671-pipe-mime.patch'
'383769-score-match.patch'
'603288-split-fetches.patch'
'611410-no-implicit_autoview-for-text-html.patch'
'path_max.patch'
'update_german_translation.patch'
'sidebar.patch'
'sidebar-dotpathsep.patch'
'sidebar-utf8.patch'
'multiple-fcc.patch'
'sidebar-newonly.patch'
'sidebar-delimnullwide.patch'
'sidebar-compose.patch'
'sidebar-new.patch'
'nntp.patch'
)
sha1sums=('8ac821d8b1e25504a31bf5fda9c08d93a4acc862'
'1ad77bdf742ff584b5695f1908dde83044195c0e'
'3aca6a18ac32b8f6c15216e6fb928a05320c5b74'
'ff3b66e57faaa163e3e6512f81fdbbea9e02a0bd'
'5c1eae78cb8636025916e7d83c192f6c32981ff3'
'c6eaf7fb1829809e7f07d039f75ab30de02d7873'
'72a35dfd4476238db3500f3a5651996691c1ce20'
'e3e7b9c5b17be4032e111edb6a6999a3185c8f7b'
'61630d6a6c3fdf7480c7b6a0e75552500c48f5f4'
'a7546f9616460da23e87957b0ce98776113b5f7b'
'6a53e85ee55c14beda0000de89a397f589cb29a7'
'b841ad389301d336ba533356d057ea1f09bc150b'
'ee72ecb042e337427b5d9c31ff1ecb78b440e2ff'
'773c59af8755b6daa1d73749fa9c38ccf953285c'
'0acf230d3b7e03b90239b256a6944ccf8a0b4e91'
'12c74c647238e653c4db5f8eb7590c5723635b9c'
'4dd818f69c4f302c5ca3e5a7fd95223112c853ac'
'464ca1c57f8a25177a586cb79b94398f694b32e3'
'c44f9b5a3104917417d09dbcb0dda77f4566c30a'
'206daf4a78f801d9835c8096c83181569ae74136'
'061afb767a30fb78d48b0de1e30aea2f0b3b9d5d'
'42ab3017961819669c678e7456657ca677c8eb56'
'8ae07c06cc9a552b7152c4e264b6284cd770a29c'
'ad645521bcd36a758e10cf0e2e2e8123c3c9a229'
'f1ee08450995fe21e0dc3807563e7120d2e3d04a'
'f2b98a258d5ee18f731aab975f5b0dd17945f228'
'98d958231c05fa1ddf5f1a0ab67a2dc6cefa8418'
'c8ac575a36876d711a16be09425301c4800bf21c'
'6ec4a7614dc78d230a9ebe8ec645393a98be41a4'
'f91ac0baf4eda090da7b80e272d422f234b459cd'
'03a42b8914c9ef1f684275cba355046de14b1c03'
'1b53316b0c09333dbee428448a6f565378ff5357'
'8121dd0a07f6f98377e1b1ad3659deaec3a83b6b'
'd4803ee5f29e9e495e12bf012dc938d7cd4adc47'
'561b600c79988975f034c9237158fb991ec92541'
'f91499aa8bee5827924e6c860bd853e0344d55bc'
'f99082007d3cb4486b96cb22d1fae1c71fdbe51e'
'fcdeb12e49735268c080e34c2d88211a7ccb8493'
'487850ffc2a6d639d9d17b3ced844257799a84a9'
'c01c8f84e3ea4ac71caf31edeb6adb062eb04fe0'
'2ba91afb71dc40793bac8198fd9f8d6500bd1ce3'
'e7181b191f06bd6c74c6e35372dba6dc3f8c4653'
'19fd36f9a1f15d4481f08d90f9a88d3912e12cdb'
'b648cb9ab1a0b447417647a82856af01a9a418e5'
'230973eb243265ee75bd098f0f8286690bed2d08'
'8d7d858e47bbb2c736c9d09de843d3892888e9c5')

install=install

prepare() {
cd "${srcdir}/mutt-$pkgver"

patch -Np1 -i "${srcdir}/am-maintainer-mode.patch"
patch -Np1 -i "${srcdir}/ifdef.patch"
patch -Np1 -i "${srcdir}/xtitles.patch"
patch -Np1 -i "${srcdir}/trash-folder.patch"
patch -Np1 -i "${srcdir}/purge-message.patch"
patch -Np1 -i "${srcdir}/imap_fast_trash.patch"
patch -Np1 -i "${srcdir}/sensible_browser_position.patch"
patch -Np1 -i "${srcdir}/patch-1.5.4.vk.pgp_verbose_mime.patch"
patch -Np1 -i "${srcdir}/compressed-folders.patch"
patch -Np1 -i "${srcdir}/compressed-folders.debian.patch"
patch -Np1 -i "${srcdir}/Muttrc.patch"
patch -Np1 -i "${srcdir}/Md.etc_mailname_gethostbyname.patch"
patch -Np1 -i "${srcdir}/use_usr_bin_editor.patch"
patch -Np1 -i "${srcdir}/correct_docdir_in_man_page.patch"
patch -Np1 -i "${srcdir}/dont_document_not_present_features.patch"
patch -Np1 -i "${srcdir}/document_debian_defaults.patch"
patch -Np1 -i "${srcdir}/assumed_charset-compat.patch"
patch -Np1 -i "${srcdir}/467432-write_bcc.patch"
patch -Np1 -i "${srcdir}/566076-build_doc_adjustments.patch"
patch -Np1 -i "${srcdir}/define-pgp_getkeys_command.patch"
patch -Np1 -i "${srcdir}/gpg.rc-paths.patch"
patch -Np1 -i "${srcdir}/smime.rc.patch"
patch -Np1 -i "${srcdir}/fix-configure-test-operator.patch"
patch -Np1 -i "${srcdir}/531430-imapuser.patch"
patch -Np1 -i "${srcdir}/543467-thread-segfault.patch"
patch -Np1 -i "${srcdir}/542817-smimekeys-tmpdir.patch"
patch -Np1 -i "${srcdir}/548577-gpgme-1.2.patch"
patch -Np1 -i "${srcdir}/553321-ansi-escape-segfault.patch"
patch -Np1 -i "${srcdir}/547980-smime_keys-chaining.patch"
patch -Np1 -i "${srcdir}/528233-readonly-open.patch"
patch -Np1 -i "${srcdir}/228671-pipe-mime.patch"
patch -Np1 -i "${srcdir}/383769-score-match.patch"
patch -Np1 -i "${srcdir}/603288-split-fetches.patch"
patch -Np1 -i "${srcdir}/611410-no-implicit_autoview-for-text-html.patch"
patch -Np1 -i "${srcdir}/path_max.patch"
patch -Np1 -i "${srcdir}/update_german_translation.patch"
patch -Np1 -i "${srcdir}/sidebar.patch"
patch -Np1 -i "${srcdir}/sidebar-dotpathsep.patch"
patch -Np1 -i "${srcdir}/sidebar-utf8.patch"
patch -Np1 -i "${srcdir}/multiple-fcc.patch"
patch -Np1 -i "${srcdir}/sidebar-newonly.patch"
patch -Np1 -i "${srcdir}/sidebar-delimnullwide.patch"
patch -Np1 -i "${srcdir}/sidebar-compose.patch"
patch -Np1 -i "${srcdir}/sidebar-new.patch"
patch -Np1 -i "${srcdir}/nntp.patch"

autoreconf -vfi
}

build() {
cd "${srcdir}/mutt-${pkgver}"

./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--with-docdir=/usr/share/doc \
--with-mailpath=/var/mail \
--disable-dependency-tracking \
--enable-compressed \
--enable-debug \
--enable-fcntl \
--enable-gpgme \
--enable-hcache \
--enable-imap \
--enable-pop \
--enable-smtp \
--with-curses \
--with-gss \
--with-idn \
--with-mixmaster \
--without-bdb \
--without-gdbm \
--without-qdbm \
--with-regex \
--with-sasl \
--with-gnutls

make
}

package() {
cd "${srcdir}/mutt-${pkgver}"
make DESTDIR="${pkgdir}" install

rm "${pkgdir}"/etc/mime.types{,.dist}
rm "${pkgdir}"/usr/bin/{flea,muttbug}
rm "${pkgdir}"/usr/share/man/man1/{flea,muttbug}.1
install -D -m 644 contrib/gpg.rc "$pkgdir"/etc/Muttrc.gpg.dist
}

+ 22
- 0
mutt-patched/am-maintainer-mode.patch View File

@@ -0,0 +1,22 @@
From: Antonio Radici <antonio@debian.org>
Date: Mon, 10 Feb 2014 18:14:45 +0100
Subject: am-maintainer-mode

Gbp-Pq: Topic misc
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 1b6e010..3d5f11b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ AC_INIT([mutt],[m4_esyscmd(tr -d \\n <VERSION)])
AC_CONFIG_SRCDIR(mutt.h)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
-
+AM_MAINTAINER_MODE
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
MUTT_VERSION=`env sh "$srcdir/version.sh"`

+ 27
- 0
mutt-patched/assumed_charset-compat.patch View File

@@ -0,0 +1,27 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:20:58 +0100
Subject: assumed_charset-compat

On upstream inclusion of the assumed_charset patch (past 1.5.14),
file_charset got renamed to attach_charset. We add it back
for compatibility.

Gbp-Pq: Topic debian-specific
---
init.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/init.h b/init.h
index 7d319ad..875cad8 100644
--- a/init.h
+++ b/init.h
@@ -211,6 +211,9 @@ struct option_t MuttVars[] = {
** Note: for Japanese users, ``iso-2022-*'' must be put at the head
** of the value as shown above if included.
*/
+ { "file_charset", DT_SYN, R_NONE, UL "attach_charset", 0 },
+ /*
+ */
{ "attach_format", DT_STR, R_NONE, UL &AttachFormat, UL "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " },
/*
** .pp

+ 22
- 0
mutt-patched/compressed-folders.debian.patch View File

@@ -0,0 +1,22 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 15:49:18 +0100
Subject: compressed-folders.debian

To enable the use of compressed folders.

Gbp-Pq: Topic features
---
config-debian.h | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 config-debian.h

diff --git a/config-debian.h b/config-debian.h
new file mode 100644
index 0000000..fdf5322
--- /dev/null
+++ b/config-debian.h
@@ -0,0 +1,4 @@
+#ifndef USE_COMPRESSED
+#error "You forgot to update debian/patches/autotools-update."
+#error "Run sh debian/update-autotools.sh"
+#endif

+ 1188
- 0
mutt-patched/compressed-folders.patch
File diff suppressed because it is too large
View File


+ 25
- 0
mutt-patched/correct_docdir_in_man_page.patch View File

@@ -0,0 +1,25 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:08:26 +0100
Subject: correct_docdir_in_man_page

Fix the link so it points to the correct docdir
and gzipped manual.

Gbp-Pq: Topic debian-specific
---
doc/mutt.man | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/mutt.man b/doc/mutt.man
index 181ef62..718f87a 100644
--- a/doc/mutt.man
+++ b/doc/mutt.man
@@ -185,7 +185,7 @@ User's personal mapping between MIME types and file extensions.
System mapping between MIME types and file extensions.
.IP "@bindir@/mutt_dotlock"
The privileged dotlocking program.
-.IP "@docdir@/manual.txt"
+.IP "/usr/share/doc/mutt/manual.txt.gz"
The Mutt manual.
.SH BUGS
.PP

+ 24
- 0
mutt-patched/define-pgp_getkeys_command.patch View File

@@ -0,0 +1,24 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:27:19 +0100
Subject: define-pgp_getkeys_command

Disabling pgp_getkeys_command until upstream fixes it.

Gbp-Pq: Topic misc
---
contrib/gpg.rc | 2 ++
1 file changed, 2 insertions(+)

diff --git a/contrib/gpg.rc b/contrib/gpg.rc
index d6c9def..7511f3c 100644
--- a/contrib/gpg.rc
+++ b/contrib/gpg.rc
@@ -72,6 +72,8 @@ set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --l
# fetch keys
# set pgp_getkeys_command="pkspxycwrap %r"
+# This will work when #172960 will be fixed upstream
+# set pgp_getkeys_command="gpg --recv-keys %r"
# pattern for good signature - may need to be adapted to locale!

+ 87
- 0
mutt-patched/document_debian_defaults.patch View File

@@ -0,0 +1,87 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:19:30 +0100
Subject: document_debian_defaults

Some customization of the option which are straying
from the default only on Debian systems.

Gbp-Pq: Topic debian-specific
---
init.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/init.h b/init.h
index dc69e2c..7d319ad 100644
--- a/init.h
+++ b/init.h
@@ -312,6 +312,9 @@ struct option_t MuttVars[] = {
** .pp
** When this variable is \fIset\fP, mutt will include Delivered-To headers when
** bouncing messages. Postfix users may wish to \fIunset\fP this variable.
+ ** .pp
+ ** \fBNote:\fP On Debian systems, this option is unset by default in
+ ** /etc/Muttrc.
*/
{ "braille_friendly", DT_BOOL, R_NONE, OPTBRAILLEFRIENDLY, 0 },
/*
@@ -1044,6 +1047,9 @@ struct option_t MuttVars[] = {
** one is not used.
** .pp
** Also see $$use_domain and $$hidden_host.
+ ** .pp
+ ** \fBNote:\fP On Debian systems, the default for this variable is obtained
+ ** from /etc/mailname when Mutt starts.
*/
{ "ignore_linear_white_space", DT_BOOL, R_NONE, OPTIGNORELWS, 0 },
/*
@@ -1577,6 +1583,9 @@ struct option_t MuttVars[] = {
** system. It is used with various sets of parameters to gather the
** list of known remailers, and to finally send a message through the
** mixmaster chain.
+ ** .pp
+ ** \fBNote:\fP On Debian systems, this option is set by default to
+ ** ``mixmaster-filter'' in /etc/Muttrc.
*/
#endif
{ "move", DT_QUAD, R_NONE, OPT_MOVE, M_NO },
@@ -2619,6 +2628,10 @@ struct option_t MuttVars[] = {
** This variable contains the name of either a directory, or a file which
** contains trusted certificates for use with OpenSSL.
** (S/MIME only)
+ ** .pp
+ ** \fBNote:\fP On Debian systems, this defaults to the first existing file in
+ ** the following list: ~/.smime/ca-certificates.crt ~/.smime/ca-bundle.crt
+ ** /etc/ssl/certs/ca-certificates.crt.
*/
{ "smime_certificates", DT_PATH, R_NONE, UL &SmimeCertificates, 0 },
/*
@@ -2825,6 +2838,9 @@ struct option_t MuttVars[] = {
** .ts
** set smtp_authenticators="digest-md5:cram-md5"
** .te
+ ** .pp
+ ** \fBNote:\fP On Debian systems, this variable defaults to the example
+ ** mentioned. This file is managed by the ``ca-certificates'' package.
*/
# endif /* USE_SASL */
{ "smtp_pass", DT_STR, R_NONE, UL &SmtpPass, UL 0 },
@@ -2872,6 +2888,9 @@ struct option_t MuttVars[] = {
** .pp
** You may optionally use the ``reverse-'' prefix to specify reverse sorting
** order (example: ``\fCset sort=reverse-date-sent\fP'').
+ ** .pp
+ ** \fBNote:\fP On Debian systems, this option is set by default to
+ ** ``threads'' in /etc/Muttrc.
*/
{ "sort_alias", DT_SORT|DT_SORT_ALIAS, R_NONE, UL &SortAlias, SORT_ALIAS },
/*
@@ -3423,6 +3442,9 @@ struct option_t MuttVars[] = {
** is set to deliver directly via SMTP (see $$smtp_url), this
** option does nothing: mutt will never write out the ``Bcc:'' header
** in this case.
+ ** .pp
+ ** \fBNote:\fP 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, UL &WriteInc, 10 },
/*

+ 39
- 0
mutt-patched/dont_document_not_present_features.patch View File

@@ -0,0 +1,39 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:17:42 +0100
Subject: dont_document_not_present_features

As the patch says, this will add an include so only
documented options for Debian will be used.

Gbp-Pq: Topic debian-specific
---
functions.h | 2 +-
init.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/functions.h b/functions.h
index a29388c..26171a0 100644
--- a/functions.h
+++ b/functions.h
@@ -35,7 +35,7 @@
#ifdef _MAKEDOC
# include "config.h"
-# include "doc/makedoc-defs.h"
+/* # include "doc/makedoc-defs.h" include only documented options for Debian */
#endif
const struct binding_t OpGeneric[] = { /* map: generic */
diff --git a/init.h b/init.h
index 7768683..dc69e2c 100644
--- a/init.h
+++ b/init.h
@@ -19,7 +19,7 @@
#ifdef _MAKEDOC
# include "config.h"
-# include "doc/makedoc-defs.h"
+/* # include "makedoc-defs.h" include only documented options for Debian */
#else
# include "sort.h"
#endif

+ 22
- 0
mutt-patched/fix-configure-test-operator.patch View File

@@ -0,0 +1,22 @@
From: Evgeni Golov <evgeni@debian.org>
Date: Wed, 5 Mar 2014 08:11:47 +0100
Subject: fix-configure-test-operator

Gbp-Pq: Topic misc
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e7ebe01..2d57b76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1187,7 +1187,7 @@ if test "x$with_idn" != "xno"; then
])
if test "$with_idn" != auto; then
- if test $have_stringprep_h = no || test $have_idna_h = no || test $ac_cv_search_STRINGPREP_CHECK_VERSION = no; then
+ if test "$have_stringprep_h" = no || test "$have_idna_h" = no || test "$ac_cv_search_STRINGPREP_CHECK_VERSION" = no; then
AC_MSG_ERROR([IDN was requested, but libidn was not usable on this system])
fi
fi

+ 29
- 0
mutt-patched/gpg.rc-paths.patch View File

@@ -0,0 +1,29 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 16:30:20 +0100
Subject: gpg.rc-paths

Use the correct path of pgpewrap.

Gbp-Pq: Topic misc
---
contrib/gpg.rc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/gpg.rc b/contrib/gpg.rc
index 7511f3c..27a76b9 100644
--- a/contrib/gpg.rc
+++ b/contrib/gpg.rc
@@ -49,11 +49,11 @@ set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--pas
# create a pgp/mime encrypted attachment
# 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"
+set pgp_encrypt_only_command="/usr/lib/mutt/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="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"
+set pgp_encrypt_sign_command="/usr/lib/mutt/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"

+ 160
- 0
mutt-patched/ifdef.patch View File

@@ -0,0 +1,160 @@
From: Cedric Duval <cedricduval@free.fr>
Date: Thu, 27 Feb 2014 12:06:21 +0100
Subject: ifdef

This command allows to test if a feature has been compiled in before
actually attempting to configure / use it.

Syntax:

ifdef <item> <command>

where <item> can be the name of a variable, function, or command.

Examples:

ifdef imap-fetch-mail 'source ~/.mutt/imap_setup'
ifdef trash set trash=~/Mail/trash

* Patch last synced with upstream:
- Date: 2007-02-15
- File:
http://cedricduval.free.fr/mutt/patches/download/patch-1.5.4.cd.ifdef.1

* Changes made:
- Updated to 1.5.13
- Also look for commands
- Use mutt_strcmp in favor of ascii_strncasecmp to compare strings.

Signed-off-by: Matteo F. Vescovi <mfvescovi@gmail.com>

Gbp-Pq: Topic features
---
doc/manual.xml.head | 22 ++++++++++++++++++++
init.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++
init.h | 2 ++
3 files changed, 83 insertions(+)

diff --git a/doc/manual.xml.head b/doc/manual.xml.head
index 0093685..18ae918 100644
--- a/doc/manual.xml.head
+++ b/doc/manual.xml.head
@@ -4378,6 +4378,28 @@ from which to read input (e.g. <literal><command>source</command>
</sect1>
+<sect1 id="ifdef">
+
+<title>Configuring features conditionally</title>
+
+<para>
+Usage: <literal>ifdef</literal> <emphasis>item</emphasis> <emphasis>command</emphasis>
+</para>
+
+<para>
+This command allows to test if a feature has been compiled in, before
+actually executing the command. Item can be either the name of a
+function, variable, or command. Example:
+</para>
+
+<para>
+<screen>
+ifdef imap_keepalive 'source ~/.mutt/imap_setup'
+</screen>
+</para>
+
+</sect1>
+
<sect1 id="unhook">
<title>Removing Hooks</title>
diff --git a/init.c b/init.c
index 4897b9e..cc3cf4b 100644
--- a/init.c
+++ b/init.c
@@ -601,6 +601,65 @@ static void remove_from_list (LIST **l, const char *str)
}
}
+static int parse_ifdef (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
+{
+ int i, j, res = 0;
+ BUFFER token;
+
+ memset (&token, 0, sizeof (token));
+ mutt_extract_token (tmp, s, 0);
+
+ /* is the item defined as a variable? */
+ res = (mutt_option_index (tmp->data) != -1);
+
+ /* a function? */
+ if (!res)
+ for (i = 0; !res && i < MENU_MAX; i++)
+ {
+ struct binding_t *b = km_get_table (Menus[i].value);
+
+ if (!b)
+ continue;
+
+ for (j = 0; b[j].name; j++)
+ if (!mutt_strcmp (tmp->data, b[j].name))
+ {
+ res = 1;
+ break;
+ }
+ }
+
+ /* a command? */
+ if (!res)
+ for (i = 0; Commands[i].name; i++)
+ {
+ if (!mutt_strcmp (tmp->data, Commands[i].name))
+ {
+ res = 1;
+ break;
+ }
+ }
+
+ if (!MoreArgs (s))
+ {
+ snprintf (err->data, err->dsize, _("ifdef: too few arguments"));
+ return (-1);
+ }
+ mutt_extract_token (tmp, s, M_TOKEN_SPACE);
+
+ if (res)
+ {
+ if (mutt_parse_rc_line (tmp->data, &token, err) == -1)
+ {
+ mutt_error ("Erreur: %s", err->data);
+ FREE (&token.data);
+ return (-1);
+ }
+ FREE (&token.data);
+ }
+ return 0;
+}
+
static int parse_unignore (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
{
do
diff --git a/init.h b/init.h
index 395cd3f..80d05ce 100644
--- a/init.h
+++ b/init.h
@@ -3487,6 +3487,7 @@ static int parse_lists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unlists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_alias (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unalias (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+static int parse_ifdef (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_ignore (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unignore (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_source (BUFFER *, BUFFER *, unsigned long, BUFFER *);
@@ -3537,6 +3538,7 @@ const struct command_t Commands[] = {
{ "group", parse_group, M_GROUP },
{ "ungroup", parse_group, M_UNGROUP },
{ "hdr_order", parse_list, UL &HeaderOrderList },
+ { "ifdef", parse_ifdef, 0 },
#ifdef HAVE_ICONV
{ "iconv-hook", mutt_parse_hook, M_ICONVHOOK },
#endif

+ 114
- 0
mutt-patched/imap_fast_trash.patch View File

@@ -0,0 +1,114 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 14:29:03 +0100
Subject: imap_fast_trash

Make "move to trash folder" use IMAP COPY.
By Paul Miller

Gbp-Pq: Topic features
---
imap/imap.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
imap/imap.h | 3 +++
mx.c | 5 +++++
3 files changed, 65 insertions(+)

diff --git a/imap/imap.c b/imap/imap.c
index 93dc06a..393d4ec 100644
--- a/imap/imap.c
+++ b/imap/imap.c
@@ -886,6 +886,12 @@ static int imap_make_msg_set (IMAP_DATA* idata, BUFFER* buf, int flag,
if (hdrs[n]->deleted != HEADER_DATA(hdrs[n])->deleted)
match = invert ^ hdrs[n]->deleted;
break;
+ case M_EXPIRED: /* imap_fast_trash version of M_DELETED */
+ if (hdrs[n]->purged)
+ break;
+ if (hdrs[n]->deleted != HEADER_DATA(hdrs[n])->deleted)
+ match = invert ^ (hdrs[n]->deleted && !hdrs[n]->appended);
+ break;
case M_FLAG:
if (hdrs[n]->flagged != HEADER_DATA(hdrs[n])->flagged)
match = invert ^ hdrs[n]->flagged;
@@ -2017,3 +2023,54 @@ int imap_complete(char* dest, size_t dlen, char* path) {
return -1;
}
+
+int imap_fast_trash() {
+
+ if( Context->magic == M_IMAP && mx_is_imap(TrashPath) ) {
+ IMAP_MBOX mx;
+ IMAP_DATA *idata = (IMAP_DATA *) Context->data;
+ char mbox[LONG_STRING];
+ char mmbox[LONG_STRING];
+ int rc;
+ dprint(1, (debugfile, "[itf] trashcan seems to be on imap.\n"));
+
+ if ( imap_parse_path(TrashPath, &mx) == 0 ) {
+ if( mutt_account_match(&(idata->conn->account), &(mx.account)) ) {
+ dprint(1, (debugfile, "[itf] trashcan seems to be on the same account.\n"));
+
+ imap_fix_path (idata, mx.mbox, mbox, sizeof (mbox));
+ if (!*mbox)
+ strfcpy (mbox, "INBOX", sizeof (mbox));
+ imap_munge_mbox_name (mmbox, sizeof (mmbox), mbox);
+
+ rc = imap_exec_msgset (idata, "UID COPY", mmbox, M_EXPIRED, 0, 0);
+ if (!rc) {
+ dprint (1, (debugfile, "imap_copy_messages: No messages del-tagged\n"));
+ rc = -1;
+ goto old_way;
+
+ } else if (rc < 0) {
+ dprint (1, (debugfile, "could not queue copy\n"));
+ goto old_way;
+
+ } else {
+ mutt_message (_("Copying %d messages to %s..."), rc, mbox);
+ return 0;
+ }
+
+ } else {
+ dprint(1, (debugfile, "[itf] trashcan seems to be on a different account.\n"));
+ }
+
+ old_way:
+ FREE (&mx.mbox); /* we probably only need to free this when the parse works */
+
+ } else {
+ dprint(1, (debugfile, "[itf] failed to parse TrashPath.\n" ));
+ }
+
+ dprint(1, (debugfile, "[itf] giving up and trying old fasioned way.\n" ));
+ }
+
+ return 1;
+}
diff --git a/imap/imap.h b/imap/imap.h
index 74d7e13..99cd454 100644
--- a/imap/imap.h
+++ b/imap/imap.h
@@ -72,4 +72,7 @@ void imap_keepalive (void);
int imap_account_match (const ACCOUNT* a1, const ACCOUNT* a2);
+/* trash */
+int imap_fast_trash();
+
#endif
diff --git a/mx.c b/mx.c
index 89b9431..cc60517 100644
--- a/mx.c
+++ b/mx.c
@@ -802,6 +802,11 @@ static int trash_append (CONTEXT *ctx)
&& stc.st_dev == st.st_dev && stc.st_rdev == st.st_rdev)
return 0; /* we are in the trash folder: simple sync */
+ #ifdef USE_IMAP
+ if( !imap_fast_trash() )
+ return 0;
+ #endif
+
if ((ctx_trash = mx_open_mailbox (TrashPath, M_APPEND, NULL)) != NULL)
{
for (i = 0 ; i < ctx->msgcount ; i++)

+ 8
- 0
mutt-patched/install View File

@@ -0,0 +1,8 @@
post_install() {
cat <<EOF

==> For GPG support, add the following to your muttrc:
==> source /etc/Muttrc.gpg.dist

EOF
}

+ 83
- 0
mutt-patched/multiple-fcc.patch View File

@@ -0,0 +1,83 @@
From: Antonio Radici <antonio@debian.org>
Date: Tue, 4 Mar 2014 15:40:45 +0100
Subject: multiple-fcc

A patch that allows multiple FCC separated by commas,
written by Omen Wild.

Original website: http://www.mandarb.com/mutt/
Bug asking for the inclusion: #586454

Gbp-Pq: Topic mutt-patched
---
protos.h | 1 +
send.c | 2 +-
sendlib.c | 30 ++++++++++++++++++++++++++++++
3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/protos.h b/protos.h
index 38c8c01..551b142 100644
--- a/protos.h
+++ b/protos.h
@@ -362,6 +362,7 @@ int mutt_user_is_recipient (HEADER *);
void mutt_update_num_postponed (void);
int mutt_wait_filter (pid_t);
int mutt_which_case (const char *);
+int mutt_write_multiple_fcc (const char *path, HEADER *hdr, const char *msgid, int, char *);
int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int, char *);
int mutt_write_mime_body (BODY *, FILE *);
int mutt_write_mime_header (BODY *, FILE *);
diff --git a/send.c b/send.c
index 18b9390..893c859 100644
--- a/send.c
+++ b/send.c
@@ -1747,7 +1747,7 @@ full_fcc:
* message was first postponed.
*/
msg->received = time (NULL);
- if (mutt_write_fcc (fcc, msg, NULL, 0, NULL) == -1)
+ if (mutt_write_multiple_fcc (fcc, msg, NULL, 0, NULL) == -1)
{
/*
* Error writing FCC, we should abort sending.
diff --git a/sendlib.c b/sendlib.c
index 0f05298..9d83401 100644
--- a/sendlib.c
+++ b/sendlib.c
@@ -2680,6 +2680,36 @@ static void set_noconv_flags (BODY *b, short flag)
}
}
+/* Handle a Fcc with multiple, comma separated entries. */
+int mutt_write_multiple_fcc (const char *path, HEADER *hdr, const char *msgid, int post, char *fcc) {
+ char fcc_tok[_POSIX_PATH_MAX];
+ char fcc_expanded[_POSIX_PATH_MAX];
+ char *tok = NULL;
+ int status;
+
+ strfcpy(fcc_tok, path, _POSIX_PATH_MAX);
+
+ tok = strtok(fcc_tok, ",");
+ dprint(1, (debugfile, "Fcc: initial mailbox = '%s'\n", tok));
+ /* mutt_expand_path already called above for the first token */
+ if((status = mutt_write_fcc (tok, hdr, NULL, 0, NULL)) != 0)
+ return status;
+
+ while((tok = strtok(NULL, ",")) != NULL) {
+ if(*tok) {
+ /* Only call mutt_expand_path iff tok has some data */
+ dprint(1, (debugfile, "Fcc: additional mailbox token = '%s'\n", tok));
+ strfcpy(fcc_expanded, tok, sizeof(fcc_expanded));
+ mutt_expand_path(fcc_expanded, sizeof(fcc_expanded));
+ dprint(1, (debugfile, " Additional mailbox expanded = '%s'\n", fcc_expanded));
+ if((status = mutt_write_fcc (fcc_expanded, hdr, NULL, 0, NULL)) != 0)
+ return status;
+ }
+ }
+
+ return 0;
+}
+
int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post, char *fcc)
{
CONTEXT f;

+ 8748
- 0
mutt-patched/nntp.patch
File diff suppressed because it is too large
View File


+ 63
- 0
mutt-patched/patch-1.5.4.vk.pgp_verbose_mime.patch View File

@@ -0,0 +1,63 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 14:45:01 +0100
Subject: patch-1.5.4.vk.pgp_verbose_mime

Enable pgp_mime_signature_filename and
pgp_mime_signature_description.

Gbp-Pq: Topic features-old
---
globals.h | 2 ++
init.h | 12 ++++++++++++
pgp.c | 2 ++
3 files changed, 16 insertions(+)

diff --git a/globals.h b/globals.h
index a7e2304..5b6e56a 100644
--- a/globals.h
+++ b/globals.h
@@ -244,6 +244,8 @@ WHERE char *PgpVerifyKeyCommand;
WHERE char *PgpListSecringCommand;
WHERE char *PgpListPubringCommand;
WHERE char *PgpGetkeysCommand;
+WHERE char *PgpMimeSignatureFilename;
+WHERE char *PgpMimeSignatureDescription;
/*-- formerly in smime.h --*/
WHERE char *SmimeDefaultKey;
diff --git a/init.h b/init.h
index d4a882b..a64992a 100644
--- a/init.h
+++ b/init.h
@@ -2590,6 +2590,18 @@ struct option_t MuttVars[] = {
** a line quoted text if it also matches $$smileys. This mostly
** happens at the beginning of a line.
*/
+ { "pgp_mime_signature_filename", DT_STR, R_NONE, UL &PgpMimeSignatureFilename, UL "signature.asc"},
+ /*
+ ** .pp
+ ** This option sets the filename used for signature parts in PGP/MIME
+ ** signed messages.
+ */
+ { "pgp_mime_signature_description", DT_STR, R_NONE, UL &PgpMimeSignatureDescription, UL "Digital signature"},
+ /*
+ ** .pp
+ ** This option sets the Content-Description used for signature parts in
+ ** PGP/MIME signed messages.
+ */
diff --git a/pgp.c b/pgp.c
index 506a078..92dee8c 100644
--- a/pgp.c
+++ b/pgp.c
@@ -1127,6 +1127,8 @@ BODY *pgp_sign_message (BODY *a)
t->disposition = DISPNONE;
t->encoding = ENC7BIT;
t->unlink = 1; /* ok to remove this file after sending. */
+ mutt_set_parameter ("name", PgpMimeSignatureFilename, &t->parameter);
+ t->description = safe_strdup (PgpMimeSignatureDescription);
return (a);
}

+ 25
- 0
mutt-patched/path_max.patch View File

@@ -0,0 +1,25 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 17:38:03 +0100
Subject: path_max

Gbp-Pq: Topic upstream
---
mutt.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/mutt.h b/mutt.h
index b71f071..4db92a6 100644
--- a/mutt.h
+++ b/mutt.h
@@ -52,6 +52,11 @@
#include <limits.h>
#endif
+/* PATH_MAX is undefined on the hurd */
+#ifndef PATH_MAX
+#define PATH_MAX _POSIX_PATH_MAX
+#endif
+
#include <pwd.h>
#include <grp.h>

+ 241
- 0
mutt-patched/purge-message.patch View File

@@ -0,0 +1,241 @@
From: Cedric Duval <cedricduval@free.fr>
Date: Thu, 27 Feb 2014 14:21:59 +0100
Subject: purge-message

(requires trash folder patch)

This patch adds the purge-message function, which, unlike delete-message,
will bypass the trash folder and really delete the mail.

You can bind this function to <esc>D, for instance, by adding the following
lines to your muttrc:

bind index \eD purge-message
bind pager \eD purge-message

Please be very careful with this function, and try to use it as less as
possible. The risk resides in getting into the habit of always using
purge-message instead of delete-message, which would really defeat the
purpose of having a trash folder feature.

* Patch last synced with upstream:
- Date: 2007-02-15
- File: http://cedricduval.free.fr/mutt/patches/download/patch-1.5.5.1.cd.purge_message.3.4

* Changes made:
- Updated to 1.5.13
- Fixed indentation of "purged" in mutt.h.

Signed-off-by: Matteo F. Vescovi <mfvescovi@gmail.com>

Gbp-Pq: Topic features
---
OPS | 1 +
curs_main.c | 12 ++++++++++--
flags.c | 10 ++++++++++
functions.h | 2 ++
mutt.h | 2 ++
mx.c | 1 +
pager.c | 8 +++++++-
pattern.c | 4 +++-
8 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/OPS b/OPS
index 8414a8b..02cea8e 100644
--- a/OPS
+++ b/OPS
@@ -142,6 +142,7 @@ OP_PREV_ENTRY "move to the previous entry"
OP_PREV_LINE "scroll up one line"
OP_PREV_PAGE "move to the previous page"
OP_PRINT "print the current entry"
+OP_PURGE_MESSAGE "really delete the current entry, bypassing the trash folder"
OP_QUERY "query external program for addresses"
OP_QUERY_APPEND "append new query results to current results"
OP_QUIT "save changes to mailbox and quit"
diff --git a/curs_main.c b/curs_main.c
index 16ddbc9..d266708 100644
--- a/curs_main.c
+++ b/curs_main.c
@@ -1844,6 +1844,7 @@ int mutt_index_menu (void)
MAYBE_REDRAW (menu->redraw);
break;
+ case OP_PURGE_MESSAGE:
case OP_DELETE:
CHECK_MSGCOUNT;
@@ -1854,6 +1855,7 @@ int mutt_index_menu (void)
if (tag)
{
mutt_tag_set_flag (M_DELETE, 1);
+ mutt_tag_set_flag (M_PURGED, (op != OP_PURGE_MESSAGE) ? 0 : 1);
if (option (OPTDELETEUNTAG))
mutt_tag_set_flag (M_TAG, 0);
menu->redraw = REDRAW_INDEX;
@@ -1861,6 +1863,8 @@ int mutt_index_menu (void)
else
{
mutt_set_flag (Context, CURHDR, M_DELETE, 1);
+ mutt_set_flag (Context, CURHDR, M_PURGED,
+ (op != OP_PURGE_MESSAGE) ? 0 : 1);
if (option (OPTDELETEUNTAG))
mutt_set_flag (Context, CURHDR, M_TAG, 0);
if (option (OPTRESOLVE))
@@ -2162,11 +2166,13 @@ int mutt_index_menu (void)
if (tag)
{
mutt_tag_set_flag (M_DELETE, 0);
+ mutt_tag_set_flag (M_PURGED, 0);
menu->redraw = REDRAW_INDEX;
}
else
{
mutt_set_flag (Context, CURHDR, M_DELETE, 0);
+ mutt_set_flag (Context, CURHDR, M_PURGED, 0);
if (option (OPTRESOLVE) && menu->current < Context->vcount - 1)
{
menu->current++;
@@ -2187,9 +2193,11 @@ int mutt_index_menu (void)
CHECK_ACL(M_ACL_DELETE, _("undelete message(s)"));
rc = mutt_thread_set_flag (CURHDR, M_DELETE, 0,
- op == OP_UNDELETE_THREAD ? 0 : 1);
+ op == OP_UNDELETE_THREAD ? 0 : 1)
+ + mutt_thread_set_flag (CURHDR, M_PURGED, 0,
+ op == OP_UNDELETE_THREAD ? 0 : 1);
- if (rc != -1)
+ if (rc > -1)
{
if (option (OPTRESOLVE))
{
diff --git a/flags.c b/flags.c
index dfa6a50..5309bb7 100644
--- a/flags.c
+++ b/flags.c
@@ -104,6 +104,16 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx)
}
break;
+ case M_PURGED:
+ if (bf)
+ {
+ if (!h->purged)
+ h->purged = 1;
+ }
+ else if (h->purged)
+ h->purged = 0;
+ break;
+
case M_NEW:
if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN))
diff --git a/functions.h b/functions.h
index 7a1c5a9..a29388c 100644
--- a/functions.h
+++ b/functions.h
@@ -121,6 +121,7 @@ const struct binding_t OpMain[] = { /* map: index */
{ "toggle-write", OP_TOGGLE_WRITE, "%" },
{ "next-thread", OP_MAIN_NEXT_THREAD, "\016" },
{ "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" },
+ { "purge-message", OP_PURGE_MESSAGE, NULL },
{ "query", OP_QUERY, "Q" },
{ "quit", OP_QUIT, "q" },
{ "reply", OP_REPLY, "r" },
@@ -213,6 +214,7 @@ const struct binding_t OpPager[] = { /* map: pager */
{ "print-message", OP_PRINT, "p" },
{ "previous-thread", OP_MAIN_PREV_THREAD, "\020" },
{ "previous-subthread",OP_MAIN_PREV_SUBTHREAD, "\033p" },
+ { "purge-message", OP_PURGE_MESSAGE, NULL },
{ "quit", OP_QUIT, "Q" },
{ "exit", OP_EXIT, "q" },
{ "reply", OP_REPLY, "r" },
diff --git a/mutt.h b/mutt.h
index 0b879b9..8cee3d2 100644
--- a/mutt.h
+++ b/mutt.h
@@ -186,6 +186,7 @@ enum
M_UNDELETE,
M_DELETED,
M_APPENDED,
+ M_PURGED,
M_FLAG,
M_TAG,
M_UNTAG,
@@ -711,6 +712,7 @@ typedef struct header
unsigned int flagged : 1; /* marked important? */
unsigned int tagged : 1;
unsigned int appended : 1; /* has been saved */
+ unsigned int purged : 1; /* bypassing the trash folder */
unsigned int deleted : 1;
unsigned int changed : 1;
unsigned int attach_del : 1; /* has an attachment marked for deletion */
diff --git a/mx.c b/mx.c
index f7fd01f..89b9431 100644
--- a/mx.c
+++ b/mx.c
@@ -806,6 +806,7 @@ static int trash_append (CONTEXT *ctx)
{
for (i = 0 ; i < ctx->msgcount ; i++)
if (ctx->hdrs[i]->deleted && !ctx->hdrs[i]->appended
+ && !ctx->hdrs[i]->purged
&& mutt_append_message (ctx_trash, ctx, ctx->hdrs[i], 0, 0) == -1)
{
mx_close_mailbox (ctx_trash, NULL);
diff --git a/pager.c b/pager.c
index 23eb8ca..b17afb4 100644
--- a/pager.c
+++ b/pager.c
@@ -2350,12 +2350,15 @@ search_next:
MAYBE_REDRAW (redraw);
break;
+ case OP_PURGE_MESSAGE:
case OP_DELETE:
CHECK_MODE(IsHeader (extra));
CHECK_READONLY;
CHECK_ACL(M_ACL_DELETE, _("delete message"));
mutt_set_flag (Context, extra->hdr, M_DELETE, 1);
+ mutt_set_flag (Context, extra->hdr, M_PURGED,
+ ch != OP_PURGE_MESSAGE ? 0 : 1);
if (option (OPTDELETEUNTAG))
mutt_set_flag (Context, extra->hdr, M_TAG, 0);
redraw = REDRAW_STATUS | REDRAW_INDEX;
@@ -2682,6 +2685,7 @@ search_next:
CHECK_ACL(M_ACL_DELETE, _("undelete message"));
mutt_set_flag (Context, extra->hdr, M_DELETE, 0);
+ mutt_set_flag (Context, extra->hdr, M_PURGED, 0);
redraw = REDRAW_STATUS | REDRAW_INDEX;
if (option (OPTRESOLVE))
{
@@ -2697,9 +2701,11 @@ search_next:
CHECK_ACL(M_ACL_DELETE, _("undelete message(s)"));
r = mutt_thread_set_flag (extra->hdr, M_DELETE, 0,
+ ch == OP_UNDELETE_THREAD ? 0 : 1)
+ + mutt_thread_set_flag (extra->hdr, M_PURGED, 0,
ch == OP_UNDELETE_THREAD ? 0 : 1);
- if (r != -1)
+ if (r > -1)
{
if (option (OPTRESOLVE))
{
diff --git a/pattern.c b/pattern.c
index 7af1c38..4cdbd05 100644
--- a/pattern.c
+++ b/pattern.c
@@ -1358,8 +1358,10 @@ int mutt_pattern_func (int op, char *prompt)
{
switch (op)
{
- case M_DELETE:
case M_UNDELETE:
+ mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_PURGED,
+ 0);
+ case M_DELETE:
mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_DELETE,
(op == M_DELETE));
break;

+ 115
- 0
mutt-patched/sensible_browser_position.patch View File

@@ -0,0 +1,115 @@
From: Antonio Radici <antonio@debian.org>
Date: Thu, 27 Feb 2014 14:42:36 +0100
Subject: sensible_browser_position

This is the sensible browser position patch by Haakon Riiser.

* Found in: <20050309162127.GA5656@s>
http://lists.df7cb.de/mutt/message/20050309.162127.a244a894.en.html