View | Details | Raw Unified | Return to bug 203056
Collapse All | Expand All

(-)./Makefile (-6 / +10 lines)
Lines 2-16 Link Here
2
# $FreeBSD: head/mail/mutt/Makefile 386495 2015-05-16 01:19:11Z jbeich $
2
# $FreeBSD: head/mail/mutt/Makefile 386495 2015-05-16 01:19:11Z jbeich $
3
3
4
PORTNAME=	mutt
4
PORTNAME=	mutt
5
PORTVERSION=	1.5.23
5
PORTVERSION=	1.5.24
6
PORTREVISION?=	9
6
PORTREVISION?=	0
7
CATEGORIES+=	mail ipv6
7
CATEGORIES+=	mail ipv6
8
MASTER_SITES=	ftp://ftp.mutt.org/mutt/ \
8
MASTER_SITES=	ftp://ftp.mutt.org/mutt/ \
9
		ftp://ftp.mutt.org/mutt/devel/ \
10
		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
9
		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
11
		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/devel/ \
12
		ftp://ftp.demon.co.uk/pub/mirrors/mutt/ \
10
		ftp://ftp.demon.co.uk/pub/mirrors/mutt/ \
13
		ftp://ftp.demon.co.uk/pub/mirrors/mutt/devel/ \
14
		http://www.mutt.org.ua/download/mutt-${VVV_PATCH_VERSION}/:vvv \
11
		http://www.mutt.org.ua/download/mutt-${VVV_PATCH_VERSION}/:vvv \
15
		http://www2.mutt.org.ua/download/mutt-${VVV_PATCH_VERSION}/:vvv \
12
		http://www2.mutt.org.ua/download/mutt-${VVV_PATCH_VERSION}/:vvv \
16
		http://www3.mutt.org.ua/download/mutt-${VVV_PATCH_VERSION}/:vvv \
13
		http://www3.mutt.org.ua/download/mutt-${VVV_PATCH_VERSION}/:vvv \
Lines 66-72 Link Here
66
		GPGME GREETING_PATCH GSSAPI HTML ICONV IDN IFDEF_PATCH \
63
		GPGME GREETING_PATCH GSSAPI HTML ICONV IDN IFDEF_PATCH \
67
		IMAP_HEADER_CACHE LOCALES_FIX MAILBOX_MANPAGES \
64
		IMAP_HEADER_CACHE LOCALES_FIX MAILBOX_MANPAGES \
68
		MAILDIR_HEADER_CACHE MAILDIR_MTIME_PATCH \
65
		MAILDIR_HEADER_CACHE MAILDIR_MTIME_PATCH \
69
		NLS NNTP PARENT_CHILD_MATCH_PATCH \
66
		MIXMASTER NLS NNTP PARENT_CHILD_MATCH_PATCH \
70
		QUOTE_PATCH REVERSE_REPLY_PATCH SIDEBAR_PATCH \
67
		QUOTE_PATCH REVERSE_REPLY_PATCH SIDEBAR_PATCH \
71
		SIGNATURE_MENU SMART_DATE SMIME_OUTLOOK_COMPAT SMTP \
68
		SIGNATURE_MENU SMART_DATE SMIME_OUTLOOK_COMPAT SMTP \
72
		TOKYOCABINET TRASH_PATCH XML
69
		TOKYOCABINET TRASH_PATCH XML
Lines 91-96 Link Here
91
MAILDIR_HEADER_CACHE_DESC=	Maildir header cache
88
MAILDIR_HEADER_CACHE_DESC=	Maildir header cache
92
MAILDIR_MTIME_PATCH_DESC=	Maildir mtime patch
89
MAILDIR_MTIME_PATCH_DESC=	Maildir mtime patch
93
MBOX_HOOK_PATCH_DESC=	Enhanced mbox-hook
90
MBOX_HOOK_PATCH_DESC=	Enhanced mbox-hook
91
MIXMASTER_DESC=	Mixmaster support
94
NCURSES_DESC=	Ncurses support
92
NCURSES_DESC=	Ncurses support
95
NLS_DESC=	Native language support
93
NLS_DESC=	Native language support
96
PARENT_CHILD_MATCH_PATCH_DESC=	Parent/child match
94
PARENT_CHILD_MATCH_PATCH_DESC=	Parent/child match
Lines 188-193 Link Here
188
CONFIGURE_ARGS+=	--with-sasl=${LOCALBASE}
186
CONFIGURE_ARGS+=	--with-sasl=${LOCALBASE}
189
.endif
187
.endif
190
188
189
.if ${PORT_OPTIONS:MMIXMASTER}
190
# BUILD_DEPENDS+=	mixmaster:${PORTSDIR}/mail/mixmaster
191
RUN_DEPENDS+=	mixmaster:${PORTSDIR}/mail/mixmaster
192
CONFIGURE_ARGS+=	--with-mixmaster=${LOCALBASE}
193
.endif
194
191
.if ${PORT_OPTIONS:MSMIME_OUTLOOK_COMPAT}
195
.if ${PORT_OPTIONS:MSMIME_OUTLOOK_COMPAT}
192
post-patch::
196
post-patch::
193
	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-smime-outlook
197
	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-smime-outlook
(-)./distinfo (-12 / +12 lines)
Lines 1-12 Link Here
1
SHA256 (mutt/mutt-1.5.23.tar.gz) = 3af0701e57b9e1880ed3a0dee34498a228939e854a16cdccd24e5e502626fd37
1
SHA256 (mutt/mutt-1.5.24.tar.gz) = a292ca765ed7b19db4ac495938a3ef808a16193b7d623d65562bb8feb2b42200
2
SIZE (mutt/mutt-1.5.23.tar.gz) = 3782032
2
SIZE (mutt/mutt-1.5.24.tar.gz) = 3897115
3
SHA256 (mutt/patch-1.5.23.rr.compressed.gz) = 585d0df6e251ca4519327e85923f580d685fc33aaa9c8c532e0916224b43134f
3
SHA256 (mutt/patch-1.5.24.rr.compressed.gz) = c5eb9b53f7bd3feaa5ee03722575f64e43512b756c099ffe20db6fe5c958e3dc
4
SIZE (mutt/patch-1.5.23.rr.compressed.gz) = 10127
4
SIZE (mutt/patch-1.5.24.rr.compressed.gz) = 10019
5
SHA256 (mutt/patch-1.5.23.vvv.nntp.gz) = 281f56aa60b01860f4b5d4ad43a000a14d39d7a69c17fa3983dc6463e1675589
5
SHA256 (mutt/patch-1.5.24.vvv.nntp.gz) = d34be4542d549aab6de9f7038c88b3eeefe826db643c92b27e1e65ab5f7d573e
6
SIZE (mutt/patch-1.5.23.vvv.nntp.gz) = 61184
6
SIZE (mutt/patch-1.5.24.vvv.nntp.gz) = 61359
7
SHA256 (mutt/patch-1.5.23.vvv.nntp_ru.gz) = 8e36a8eb90bb9085d5fdf8bde1d80adff90c7d1e0982eae34b81df4eb2e5c6bd
7
SHA256 (mutt/patch-1.5.24.vvv.nntp_ru.gz) = 70436af316aefd0d31aa33e127df49da4bdd1b4a8b3fbec73b3fca5428f3ab0e
8
SIZE (mutt/patch-1.5.23.vvv.nntp_ru.gz) = 5733
8
SIZE (mutt/patch-1.5.24.vvv.nntp_ru.gz) = 5719
9
SHA256 (mutt/patch-1.5.23.vvv.initials.gz) = d02fc55ac846bcaa241a1af644988d906192081584f85d971be42c37f39e6e23
9
SHA256 (mutt/patch-1.5.24.vvv.initials.gz) = 6522d12d34c0be71531465e05010413a0f2907d597e9fb5100a65d18093f0599
10
SIZE (mutt/patch-1.5.23.vvv.initials.gz) = 673
10
SIZE (mutt/patch-1.5.24.vvv.initials.gz) = 671
11
SHA256 (mutt/patch-1.5.23.vvv.quote.gz) = 2e98fafe8e221e1a0dd923bd71bf53245aa1141c99aae4c93bef35f1a25cdc10
11
SHA256 (mutt/patch-1.5.24.vvv.quote.gz) = fa161302179bbc646a83d7029381f828bece5b177e940f2fca6d5769633b9f0a
12
SIZE (mutt/patch-1.5.23.vvv.quote.gz) = 1260
12
SIZE (mutt/patch-1.5.24.vvv.quote.gz) = 1254
(-)./files/extra-patch-sidebar (-389 / +340 lines)
Lines 1-281 Link Here
1
Taken from http://lunar-linux.org/~tchan/mutt/patch-1.5.23.sidebar.20140412.txt
1
Taken from http://lunar-linux.org/~tchan/mutt/patch-1.5.23.sidebar.20140412.txt
2
2
3
diff -uNp -r mutt-1.5.22.orig/buffy.c mutt-1.5.22/buffy.c
3
diff -uNp -r mutt-1.5.22.orig/buffy.c mutt-1.5.22/buffy.c
4
*** mutt-1.5.23-orig/buffy.c	2014-03-12 11:03:44.000000000 -0500
4
*** mutt-1.5.23-orig/buffy.c.orig	2015-08-30 19:06:38.000000000 +0200
5
--- mutt-1.5.23/buffy.c	2014-04-12 15:33:54.000000000 -0500
5
--- mutt-1.5.23/buffy.c	2015-09-10 09:31:22.000000000 +0200
6
***************
6
@@ -161,6 +161,49 @@
7
*** 161,166 ****
7
   }
8
--- 161,209 ----
8
 }
9
    }
9
 
10
  }
10
+static int buffy_compare_name(const void *a, const void *b) {
11
  
11
+  const BUFFY *b1 = * (BUFFY * const *) a;
12
+ static int buffy_compare_name(const void *a, const void *b) {
12
+  const BUFFY *b2 = * (BUFFY * const *) b;
13
+   const BUFFY *b1 = * (BUFFY * const *) a;
13
+
14
+   const BUFFY *b2 = * (BUFFY * const *) b;
14
+  return mutt_strcoll(b1->path, b2->path);
15
+ 
15
+}
16
+   return mutt_strcoll(b1->path, b2->path);
16
+
17
+ }
17
+static BUFFY *buffy_sort(BUFFY *b)
18
+ 
18
+{
19
+ static BUFFY *buffy_sort(BUFFY *b)
19
+  BUFFY *tmp = b;
20
+ {
20
+  int buffycount = 0;
21
+   BUFFY *tmp = b;
21
+  BUFFY **ary;
22
+   int buffycount = 0;
22
+  int i;
23
+   BUFFY **ary;
23
+
24
+   int i;
24
+  if (!option(OPTSIDEBARSORT))
25
+ 
25
+    return b;
26
+   if (!option(OPTSIDEBARSORT))
26
+
27
+     return b;
27
+  for (; tmp != NULL; tmp = tmp->next)
28
+ 
28
+    buffycount++;
29
+   for (; tmp != NULL; tmp = tmp->next)
29
+
30
+     buffycount++;
30
+  ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary));
31
+ 
31
+
32
+   ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary));
32
+  tmp = b;
33
+ 
33
+  for (i = 0; tmp != NULL; tmp = tmp->next, i++) {
34
+   tmp = b;
34
+    ary[i] = tmp;
35
+   for (i = 0; tmp != NULL; tmp = tmp->next, i++) {
35
+  }
36
+     ary[i] = tmp;
36
+
37
+   }
37
+  qsort(ary, buffycount, sizeof(*ary), buffy_compare_name);
38
+ 
38
+
39
+   qsort(ary, buffycount, sizeof(*ary), buffy_compare_name);
39
+  for (i = 0; i < buffycount - 1; i++) {
40
+ 
40
+    ary[i]->next = ary[i+1];
41
+   for (i = 0; i < buffycount - 1; i++) {
41
+  }
42
+     ary[i]->next = ary[i+1];
42
+  ary[buffycount - 1]->next = NULL;
43
+   }
43
+  for (i = 1; i < buffycount; i++) {
44
+   ary[buffycount - 1]->next = NULL;
44
+    ary[i]->prev = ary[i-1];
45
+   for (i = 1; i < buffycount; i++) {
45
+  }
46
+     ary[i]->prev = ary[i-1];
46
+  ary[0]->prev = NULL;
47
+   }
47
+
48
+   ary[0]->prev = NULL;
48
+  tmp = ary[0];
49
+ 
49
+  free(ary);
50
+   tmp = ary[0];
50
+  return tmp;
51
+   free(ary);
51
+}
52
+   return tmp;
52
+
53
+ }
53
 BUFFY *mutt_find_mailbox (const char *path)
54
+ 
54
 {
55
  BUFFY *mutt_find_mailbox (const char *path)
55
   BUFFY *tmp = NULL;
56
  {
56
@@ -196,9 +239,13 @@
57
    BUFFY *tmp = NULL;
57
 static BUFFY *buffy_new (const char *path)
58
***************
58
 {
59
*** 196,204 ****
59
   BUFFY* buffy;
60
--- 239,251 ----
60
+  char rp[PATH_MAX];
61
  static BUFFY *buffy_new (const char *path)
61
+  char *r;
62
  {
62
 
63
    BUFFY* buffy;
63
   buffy = (BUFFY *) safe_calloc (1, sizeof (BUFFY));
64
+   char rp[PATH_MAX];
64
   strfcpy (buffy->path, path, sizeof (buffy->path));
65
+   char *r;
65
+  r = realpath(path, rp);
66
  
66
+  strfcpy (buffy->realpath, r ? rp : path, sizeof (buffy->realpath));
67
    buffy = (BUFFY *) safe_calloc (1, sizeof (BUFFY));
67
   buffy->next = NULL;
68
    strfcpy (buffy->path, path, sizeof (buffy->path));
68
   buffy->magic = 0;
69
+   r = realpath(path, rp);
69
 
70
+   strfcpy (buffy->realpath, r ? rp : path, sizeof (buffy->realpath));
70
@@ -243,8 +290,8 @@
71
    buffy->next = NULL;
71
     p = realpath (buf, f1);
72
    buffy->magic = 0;
72
     for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
73
  
73
     {
74
***************
74
-      q = realpath ((*tmp)->path, f2);
75
*** 243,250 ****
75
-      if (mutt_strcmp (p ? p : buf, q ? q : (*tmp)->path) == 0)
76
      p = realpath (buf, f1);
76
+      q = (*tmp)->realpath;
77
      for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
77
+      if (mutt_strcmp (p ? p : buf, q) == 0)
78
      {
78
       {
79
!       q = realpath ((*tmp)->path, f2);
79
 	dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path));
80
!       if (mutt_strcmp (p ? p : buf, q ? q : (*tmp)->path) == 0)
80
 	break;
81
        {
81
@@ -282,6 +329,7 @@
82
  	dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path));
82
     else
83
  	break;
83
       (*tmp)->size = 0;
84
--- 290,297 ----
84
   }
85
      p = realpath (buf, f1);
85
+  Incoming = buffy_sort(Incoming);
86
      for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
86
   return 0;
87
      {
87
 }
88
!       q = (*tmp)->realpath;
88
 
89
!       if (mutt_strcmp (p ? p : buf, q) == 0)
89
@@ -306,6 +354,11 @@
90
        {
90
       return 0;
91
  	dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path));
91
   }
92
  	break;
92
 
93
***************
93
+  if (option(OPTSIDEBAR) && mailbox->msg_unread > 0) {
94
*** 282,287 ****
94
+      mailbox->new = 1;
95
--- 329,335 ----
95
+      return 1;
96
      else
96
+  }
97
        (*tmp)->size = 0;
97
+
98
    }
98
   if ((dirp = opendir (path)) == NULL)
99
+   Incoming = buffy_sort(Incoming);
99
   {
100
    return 0;
100
     mailbox->magic = 0;
101
  }
101
@@ -357,6 +410,73 @@
102
  
102
 
103
***************
103
   return 0;
104
*** 306,311 ****
104
 }
105
--- 354,364 ----
105
+  
106
        return 0;
106
+/* update message counts for the sidebar */
107
    }
107
+void buffy_maildir_update (BUFFY* mailbox)
108
  
108
+{
109
+   if (option(OPTSIDEBAR) && mailbox->msg_unread > 0) {
109
+  char path[_POSIX_PATH_MAX];
110
+       mailbox->new = 1;
110
+  DIR *dirp;
111
+       return 1;
111
+  struct dirent *de;
112
+   }
112
+  char *p;
113
+ 
113
+
114
    if ((dirp = opendir (path)) == NULL)
114
+  if(!option(OPTSIDEBAR))
115
    {
115
+      return;
116
      mailbox->magic = 0;
116
+
117
***************
117
+  mailbox->msgcount = 0;
118
*** 340,345 ****
118
+  mailbox->msg_unread = 0;
119
--- 393,464 ----
119
+  mailbox->msg_flagged = 0;
120
    return rc;
120
+
121
  }
121
+  snprintf (path, sizeof (path), "%s/new", mailbox->path);
122
  
122
+        
123
+ /* update message counts for the sidebar */
123
+  if ((dirp = opendir (path)) == NULL)
124
+ void buffy_maildir_update (BUFFY* mailbox)
124
+  {   
125
+ {
125
+    mailbox->magic = 0;
126
+   char path[_POSIX_PATH_MAX];
126
+    return;
127
+   DIR *dirp;
127
+  } 
128
+   struct dirent *de;
128
+      
129
+   char *p;
129
+  while ((de = readdir (dirp)) != NULL)
130
+ 
130
+  {
131
+   if(!option(OPTSIDEBAR))
131
+    if (*de->d_name == '.')
132
+       return;
132
+      continue;
133
+ 
133
+
134
+   mailbox->msgcount = 0;
134
+    if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
135
+   mailbox->msg_unread = 0;
135
+      mailbox->new = 1;
136
+   mailbox->msg_flagged = 0;
136
+      mailbox->msgcount++;
137
+ 
137
+      mailbox->msg_unread++;
138
+   snprintf (path, sizeof (path), "%s/new", mailbox->path);
138
+    }
139
+         
139
+  }
140
+   if ((dirp = opendir (path)) == NULL)
140
+
141
+   {   
141
+  closedir (dirp);
142
+     mailbox->magic = 0;
142
+  snprintf (path, sizeof (path), "%s/cur", mailbox->path);
143
+     return;
143
+        
144
+   } 
144
+  if ((dirp = opendir (path)) == NULL)
145
+       
145
+  {   
146
+   while ((de = readdir (dirp)) != NULL)
146
+    mailbox->magic = 0;
147
+   {
147
+    return;
148
+     if (*de->d_name == '.')
148
+  } 
149
+       continue;
149
+      
150
+ 
150
+  while ((de = readdir (dirp)) != NULL)
151
+     if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
151
+  {
152
+       mailbox->new = 1;
152
+    if (*de->d_name == '.')
153
+       mailbox->msgcount++;
153
+      continue;
154
+       mailbox->msg_unread++;
154
+
155
+     }
155
+    if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
156
+   }
156
+      mailbox->msgcount++;
157
+ 
157
+      if ((p = strstr (de->d_name, ":2,"))) {
158
+   closedir (dirp);
158
+        if (!strchr (p + 3, 'T')) {
159
+   snprintf (path, sizeof (path), "%s/cur", mailbox->path);
159
+          if (!strchr (p + 3, 'S'))
160
+         
160
+            mailbox->msg_unread++;
161
+   if ((dirp = opendir (path)) == NULL)
161
+          if (strchr(p + 3, 'F'))
162
+   {   
162
+            mailbox->msg_flagged++;
163
+     mailbox->magic = 0;
163
+        }
164
+     return;
164
+      }
165
+   } 
165
+    }
166
+       
166
+  }
167
+   while ((de = readdir (dirp)) != NULL)
167
+
168
+   {
168
+  mailbox->sb_last_checked = time(NULL);
169
+     if (*de->d_name == '.')
169
+  closedir (dirp);
170
+       continue;
170
+}
171
+ 
171
+
172
+     if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
172
 /* returns 1 if mailbox has new mail */ 
173
+       mailbox->msgcount++;
173
 static int buffy_mbox_hasnew (BUFFY* mailbox, struct stat *sb)
174
+       if ((p = strstr (de->d_name, ":2,"))) {
174
 {
175
+         if (!strchr (p + 3, 'T')) {
175
@@ -368,7 +488,7 @@
176
+           if (!strchr (p + 3, 'S'))
176
   else
177
+             mailbox->msg_unread++;
177
     statcheck = sb->st_mtime > sb->st_atime
178
+           if (strchr(p + 3, 'F'))
178
       || (mailbox->newly_created && sb->st_ctime == sb->st_mtime && sb->st_ctime == sb->st_atime);
179
+             mailbox->msg_flagged++;
179
-  if (statcheck)
180
+         }
180
+  if ((!option(OPTSIDEBAR) && statcheck) || (option(OPTSIDEBAR) && mailbox->msg_unread > 0))
181
+       }
181
   {
182
+     }
182
     if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
183
+   }
183
     {
184
+ 
184
@@ -388,6 +508,27 @@
185
+   mailbox->sb_last_checked = time(NULL);
185
   return rc;
186
+   closedir (dirp);
186
 }
187
+ }
187
 
188
+ 
188
+/* update message counts for the sidebar */
189
  /* returns 1 if mailbox has new mail */ 
189
+void buffy_mbox_update (BUFFY* mailbox, struct stat *sb)
190
  static int buffy_mbox_hasnew (BUFFY* mailbox, struct stat *sb)
190
+{
191
  {
191
+  CONTEXT *ctx = NULL;
192
***************
192
+
193
*** 351,357 ****
193
+  if(!option(OPTSIDEBAR))
194
    else
194
+      return;
195
      statcheck = sb->st_mtime > sb->st_atime
195
+  if(mailbox->sb_last_checked > sb->st_mtime && mailbox->msgcount != 0)
196
        || (mailbox->newly_created && sb->st_ctime == sb->st_mtime && sb->st_ctime == sb->st_atime);
196
+      return; /* no check necessary */
197
!   if (statcheck)
197
+
198
    {
198
+  ctx = mx_open_mailbox(mailbox->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL);
199
      if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
199
+  if(ctx)
200
      {
200
+  {
201
--- 470,476 ----
201
+    mailbox->msgcount = ctx->msgcount;
202
    else
202
+    mailbox->msg_unread = ctx->unread;
203
      statcheck = sb->st_mtime > sb->st_atime
203
+    mailbox->msg_flagged = ctx->flagged;
204
        || (mailbox->newly_created && sb->st_ctime == sb->st_mtime && sb->st_ctime == sb->st_atime);
204
+    mailbox->sb_last_checked = time(NULL);
205
!   if ((!option(OPTSIDEBAR) && statcheck) || (option(OPTSIDEBAR) && mailbox->msg_unread > 0))
205
+    mx_close_mailbox(ctx, 0);
206
    {
206
+  }
207
      if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
207
+}
208
      {
208
+
209
***************
209
 int mutt_buffy_check (int force)
210
*** 371,376 ****
210
 {
211
--- 490,516 ----
211
   BUFFY *tmp;
212
    return rc;
212
@@ -461,17 +602,20 @@
213
  }
213
       {
214
  
214
       case M_MBOX:
215
+ /* update message counts for the sidebar */
215
       case M_MMDF:
216
+ void buffy_mbox_update (BUFFY* mailbox, struct stat *sb)
216
+	buffy_mbox_update (tmp, &sb);
217
+ {
217
 	if (buffy_mbox_hasnew (tmp, &sb) > 0)
218
+   CONTEXT *ctx = NULL;
218
 	  BuffyCount++;
219
+ 
219
 	break;
220
+   if(!option(OPTSIDEBAR))
220
 
221
+       return;
221
       case M_MAILDIR:
222
+   if(mailbox->sb_last_checked > sb->st_mtime && mailbox->msgcount != 0)
222
+	buffy_maildir_update (tmp);
223
+       return; /* no check necessary */
223
 	if (buffy_maildir_hasnew (tmp) > 0)
224
+ 
224
 	  BuffyCount++;
225
+   ctx = mx_open_mailbox(mailbox->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL);
225
 	break;
226
+   if(ctx)
226
 
227
+   {
227
       case M_MH:
228
+     mailbox->msgcount = ctx->msgcount;
228
-	mh_buffy(tmp);
229
+     mailbox->msg_unread = ctx->unread;
229
+	mh_buffy_update (tmp->path, &tmp->msgcount, &tmp->msg_unread, &tmp->msg_flagged, &tmp->sb_last_checked);
230
+     mailbox->msg_flagged = ctx->flagged;
230
+        mh_buffy(tmp);
231
+     mailbox->sb_last_checked = time(NULL);
231
 	if (tmp->new)
232
+     mx_close_mailbox(ctx, 0);
232
 	  BuffyCount++;
233
+   }
233
 	break;
234
+ }
235
+ 
236
  int mutt_buffy_check (int force)
237
  {
238
    BUFFY *tmp;
239
***************
240
*** 444,460 ****
241
        {
242
        case M_MBOX:
243
        case M_MMDF:
244
  	if (buffy_mbox_hasnew (tmp, &sb) > 0)
245
  	  BuffyCount++;
246
  	break;
247
  
248
        case M_MAILDIR:
249
  	if (buffy_maildir_hasnew (tmp) > 0)
250
  	  BuffyCount++;
251
  	break;
252
  
253
        case M_MH:
254
! 	mh_buffy(tmp);
255
  	if (tmp->new)
256
  	  BuffyCount++;
257
  	break;
258
--- 584,603 ----
259
        {
260
        case M_MBOX:
261
        case M_MMDF:
262
+ 	buffy_mbox_update (tmp, &sb);
263
  	if (buffy_mbox_hasnew (tmp, &sb) > 0)
264
  	  BuffyCount++;
265
  	break;
266
  
267
        case M_MAILDIR:
268
+ 	buffy_maildir_update (tmp);
269
  	if (buffy_maildir_hasnew (tmp) > 0)
270
  	  BuffyCount++;
271
  	break;
272
  
273
        case M_MH:
274
! 	mh_buffy_update (tmp->path, &tmp->msgcount, &tmp->msg_unread, &tmp->msg_flagged, &tmp->sb_last_checked);
275
!         mh_buffy(tmp);
276
  	if (tmp->new)
277
  	  BuffyCount++;
278
  	break;
279
*** mutt-1.5.23-orig/buffy.h	2014-03-12 11:03:44.000000000 -0500
234
*** mutt-1.5.23-orig/buffy.h	2014-03-12 11:03:44.000000000 -0500
280
--- mutt-1.5.23/buffy.h	2014-04-11 10:14:01.000000000 -0500
235
--- mutt-1.5.23/buffy.h	2014-04-11 10:14:01.000000000 -0500
281
***************
236
***************
Lines 300-318 Link Here
300
  }
255
  }
301
  BUFFY;
256
  BUFFY;
302
  
257
  
303
*** mutt-1.5.23-orig/color.c	2014-03-12 11:03:45.000000000 -0500
258
*** mutt-1.5.23-orig/color.c.orig	2015-08-30 19:06:38.000000000 +0200
304
--- mutt-1.5.23/color.c	2014-04-11 10:14:01.000000000 -0500
259
--- mutt-1.5.23/color.c	2015-09-10 09:34:06.000000000 +0200
305
***************
260
@@ -94,6 +94,8 @@
306
*** 93,98 ****
261
   { "underline",	MT_COLOR_UNDERLINE },
307
--- 93,100 ----
262
   { "index",		MT_COLOR_INDEX },
308
    { "bold",		MT_COLOR_BOLD },
263
   { "prompt",		MT_COLOR_PROMPT },
309
    { "underline",	MT_COLOR_UNDERLINE },
264
+  { "sidebar_new",	MT_COLOR_NEW },
310
    { "index",		MT_COLOR_INDEX },
265
+  { "sidebar_flagged",	MT_COLOR_FLAGGED },
311
+   { "sidebar_new",	MT_COLOR_NEW },
266
   { NULL,		0 }
312
+   { "sidebar_flagged",	MT_COLOR_FLAGGED },
267
 };
313
    { NULL,		0 }
268
 
314
  };
315
  
316
*** mutt-1.5.23-orig/compose.c	2014-03-12 11:03:45.000000000 -0500
269
*** mutt-1.5.23-orig/compose.c	2014-03-12 11:03:45.000000000 -0500
317
--- mutt-1.5.23/compose.c	2014-04-12 12:15:56.000000000 -0500
270
--- mutt-1.5.23/compose.c	2014-04-12 12:15:56.000000000 -0500
318
***************
271
***************
Lines 785-868 Link Here
785
  #ifdef USE_IMAP
738
  #ifdef USE_IMAP
786
  WHERE short ImapKeepalive;
739
  WHERE short ImapKeepalive;
787
  WHERE short ImapPipelineDepth;
740
  WHERE short ImapPipelineDepth;
788
*** mutt-1.5.23-orig/handler.c	2014-03-12 11:03:45.000000000 -0500
741
*** mutt-1.5.23-orig/handler.c.orig	2015-09-10 09:34:53.000000000 +0200
789
--- mutt-1.5.23/handler.c	2014-04-11 10:14:01.000000000 -0500
742
--- mutt-1.5.23/handler.c	2015-09-10 09:58:03.000000000 +0200
790
***************
743
@@ -1625,6 +1625,11 @@
791
*** 1599,1604 ****
744
   int decode = 0;
792
--- 1599,1609 ----
745
   int rc = 0;
793
    size_t tmplength = 0;
746
 
794
    int rc = 0;
747
+#ifdef HAVE_FMEMOPEN
795
  
748
+  char *temp;
796
+ #ifdef HAVE_FMEMOPEN
749
+  size_t tempsize;
797
+   char *temp;
750
+#endif
798
+   size_t tempsize;
751
+
799
+ #endif
752
   fseeko (s->fpin, b->offset, 0);
800
+ 
753
 
801
    int oflags = s->flags;
754
   /* see if we need to decode this part before processing it */
802
    
755
@@ -1642,6 +1647,14 @@
803
    /* first determine which handler to use to process this part */
756
     {
804
***************
757
       /* decode to a tempfile, saving the original destination */
805
*** 1711,1716 ****
758
       fp = s->fpout;
806
--- 1716,1729 ----
759
+#ifdef HAVE_FMEMOPEN
807
        {
760
+	if ((s->fpout = open_memstream(&temp, &tempsize)) == NULL)
808
  	/* decode to a tempfile, saving the original destination */
761
+	{
809
  	fp = s->fpout;
762
+	  mutt_error _("Unable to open memory stream!");
810
+ #ifdef HAVE_FMEMOPEN
763
+	  dprint (1, (debugfile, "Can't open memory stream.\n"));
811
+ 	if ((s->fpout = open_memstream(&temp, &tempsize)) == NULL)
764
+	  goto bail;
812
+ 	{
765
+	}
813
+ 	  mutt_error _("Unable to open memory stream!");
766
+#else
814
+ 	  dprint (1, (debugfile, "Can't open memory stream.\n"));
767
       mutt_mktemp (tempfile, sizeof (tempfile));
815
+ 	  goto bail;
768
       if ((s->fpout = safe_fopen (tempfile, "w")) == NULL)
816
+ 	}
769
       {
817
+ #else
770
@@ -1649,6 +1662,7 @@
818
  	mutt_mktemp (tempfile, sizeof (tempfile));
771
         dprint (1, (debugfile, "Can't open %s.\n", tempfile));
819
  	if ((s->fpout = safe_fopen (tempfile, "w")) == NULL)
772
         return -1;
820
  	{
773
       }
821
***************
774
+#endif
822
*** 1718,1723 ****
775
       /* decoding the attachment changes the size and offset, so save a copy
823
--- 1731,1737 ----
776
         * of the "real" values now, and restore them after processing
824
  	  dprint (1, (debugfile, "Can't open %s.\n", tempfile));
777
         */
825
  	  goto bail;
778
@@ -1677,8 +1691,19 @@
826
  	}
779
       /* restore final destination and substitute the tempfile for input */
827
+ #endif
780
       s->fpout = fp;
828
  	/* decoding the attachment changes the size and offset, so save a copy
781
       fp = s->fpin;
829
  	 * of the "real" values now, and restore them after processing
782
+#ifdef HAVE_FMEMOPEN
830
  	 */
783
+	if(tempsize)
831
***************
784
+		s->fpin = fmemopen(temp, tempsize, "r");
832
*** 1746,1753 ****
785
+	else /* fmemopen cannot handle zero-length buffers */
833
--- 1760,1778 ----
786
+		s->fpin = safe_fopen ("/dev/null", "r");
834
  	/* restore final destination and substitute the tempfile for input */
787
+	if(s->fpin == NULL) {
835
  	s->fpout = fp;
788
+		mutt_perror("failed to re-open memstream!");
836
  	fp = s->fpin;
789
+		return (-1);
837
+ #ifdef HAVE_FMEMOPEN
790
+	}
838
+ 	if(tempsize)
791
+#else
839
+ 		s->fpin = fmemopen(temp, tempsize, "r");
792
       s->fpin = fopen (tempfile, "r");
840
+ 	else /* fmemopen cannot handle zero-length buffers */
793
       unlink (tempfile);
841
+ 		s->fpin = safe_fopen ("/dev/null", "r");
794
+#endif
842
+ 	if(s->fpin == NULL) {
795
 
843
+ 		mutt_perror("failed to re-open memstream!");
796
       /* restore the prefix */
844
+ 		return (-1);
797
       s->prefix = savePrefix;
845
+ 	}
798
@@ -1704,9 +1729,14 @@
846
+ #else
799
 
847
  	s->fpin = fopen (tempfile, "r");
800
       /* restore the original source stream */
848
  	unlink (tempfile);
801
       safe_fclose (&s->fpin);
849
+ #endif
802
+#ifdef HAVE_FMEMOPEN
850
  
803
+	if(tempsize)
851
  	/* restore the prefix */
804
+	    FREE(&temp);
852
  	s->prefix = savePrefix;
805
+#endif
853
***************
806
       s->fpin = fp;
854
*** 1773,1778 ****
807
     }
855
--- 1798,1807 ----
808
   }
856
  
809
+  bail:
857
  	/* restore the original source stream */
810
   s->flags |= M_FIRSTDONE;
858
  	safe_fclose (&s->fpin);
811
 
859
+ #ifdef HAVE_FMEMOPEN
812
   return rc;
860
+ 	if(tempsize)
813
@@ -1743,6 +1773,7 @@
861
+ 	    FREE(&temp);
814
   handler_t handler = NULL;
862
+ #endif
815
   int rc = 0;
863
  	s->fpin = fp;
816
 
864
        }
817
+
865
      }
818
   int oflags = s->flags;
819
   
820
   /* first determine which handler to use to process this part */
866
*** mutt-1.5.23-orig/init.h	2014-03-12 11:06:17.000000000 -0500
821
*** mutt-1.5.23-orig/init.h	2014-03-12 11:06:17.000000000 -0500
867
--- mutt-1.5.23/init.h	2014-04-11 10:14:01.000000000 -0500
822
--- mutt-1.5.23/init.h	2014-04-11 10:14:01.000000000 -0500
868
***************
823
***************
Lines 1285-1313 Link Here
1285
  static int mh_mkstemp (CONTEXT * dest, FILE ** fp, char **tgt)
1240
  static int mh_mkstemp (CONTEXT * dest, FILE ** fp, char **tgt)
1286
  {
1241
  {
1287
    int fd;
1242
    int fd;
1288
*** mutt-1.5.23-orig/mutt_curses.h	2014-03-12 11:03:45.000000000 -0500
1243
*** mutt-1.5.23-orig/mutt_curses.h.orig	2015-08-30 19:06:38.000000000 +0200
1289
--- mutt-1.5.23/mutt_curses.h	2014-04-11 10:14:01.000000000 -0500
1244
--- mutt-1.5.23/mutt_curses.h	2015-09-10 09:42:34.000000000 +0200
1290
***************
1245
@@ -64,6 +64,7 @@
1291
*** 64,69 ****
1246
 #undef lines
1292
--- 64,70 ----
1247
 #endif /* lines */
1293
  #undef lines
1248
 
1294
  #endif /* lines */
1249
+#define CLEARLINE_WIN(x) move(x,SidebarWidth), clrtoeol()
1295
  
1250
 #define CLEARLINE(x) move(x,0), clrtoeol()
1296
+ #define CLEARLINE_WIN(x) move(x,SidebarWidth), clrtoeol()
1251
 #define CENTERLINE(x,y) move(y, (COLS-strlen(x))/2), addstr(x)
1297
  #define CLEARLINE(x) move(x,0), clrtoeol()
1252
 #define BEEP() do { if (option (OPTBEEP)) beep(); } while (0)
1298
  #define CENTERLINE(x,y) move(y, (COLS-strlen(x))/2), addstr(x)
1253
@@ -121,6 +122,8 @@
1299
  #define BEEP() do { if (option (OPTBEEP)) beep(); } while (0)
1254
   MT_COLOR_UNDERLINE,
1300
***************
1255
   MT_COLOR_INDEX,
1301
*** 120,125 ****
1256
   MT_COLOR_PROMPT,
1302
--- 121,128 ----
1257
+  MT_COLOR_NEW,
1303
    MT_COLOR_BOLD,
1258
+  MT_COLOR_FLAGGED,
1304
    MT_COLOR_UNDERLINE,
1259
   MT_COLOR_MAX
1305
    MT_COLOR_INDEX,
1260
 };
1306
+   MT_COLOR_NEW,
1261
 
1307
+   MT_COLOR_FLAGGED,
1308
    MT_COLOR_MAX
1309
  };
1310
  
1311
*** mutt-1.5.23-orig/mutt_menu.h	2014-03-12 11:06:17.000000000 -0500
1262
*** mutt-1.5.23-orig/mutt_menu.h	2014-03-12 11:06:17.000000000 -0500
1312
--- mutt-1.5.23/mutt_menu.h	2014-04-11 10:14:01.000000000 -0500
1263
--- mutt-1.5.23/mutt_menu.h	2014-04-11 10:14:01.000000000 -0500
1313
***************
1264
***************
(-)./files/extra-patch-sidebar-nntp (-402 / +353 lines)
Lines 1-281 Link Here
1
Taken from http://lunar-linux.org/~tchan/mutt/patch-1.5.23.sidebar.20140412.txt
1
Taken from http://lunar-linux.org/~tchan/mutt/patch-1.5.23.sidebar.20140412.txt
2
2
3
diff -uNp -r mutt-1.5.22.orig/buffy.c mutt-1.5.22/buffy.c
3
diff -uNp -r mutt-1.5.22.orig/buffy.c mutt-1.5.22/buffy.c
4
*** mutt-1.5.23-orig/buffy.c	2014-03-12 11:03:44.000000000 -0500
4
*** mutt-1.5.23-orig/buffy.c.orig	2015-08-30 19:06:38.000000000 +0200
5
--- mutt-1.5.23/buffy.c	2014-04-12 15:33:54.000000000 -0500
5
--- mutt-1.5.23/buffy.c	2015-09-10 09:31:22.000000000 +0200
6
***************
6
@@ -161,6 +161,49 @@
7
*** 161,166 ****
7
   }
8
--- 161,209 ----
8
 }
9
    }
9
 
10
  }
10
+static int buffy_compare_name(const void *a, const void *b) {
11
  
11
+  const BUFFY *b1 = * (BUFFY * const *) a;
12
+ static int buffy_compare_name(const void *a, const void *b) {
12
+  const BUFFY *b2 = * (BUFFY * const *) b;
13
+   const BUFFY *b1 = * (BUFFY * const *) a;
13
+
14
+   const BUFFY *b2 = * (BUFFY * const *) b;
14
+  return mutt_strcoll(b1->path, b2->path);
15
+ 
15
+}
16
+   return mutt_strcoll(b1->path, b2->path);
16
+
17
+ }
17
+static BUFFY *buffy_sort(BUFFY *b)
18
+ 
18
+{
19
+ static BUFFY *buffy_sort(BUFFY *b)
19
+  BUFFY *tmp = b;
20
+ {
20
+  int buffycount = 0;
21
+   BUFFY *tmp = b;
21
+  BUFFY **ary;
22
+   int buffycount = 0;
22
+  int i;
23
+   BUFFY **ary;
23
+
24
+   int i;
24
+  if (!option(OPTSIDEBARSORT))
25
+ 
25
+    return b;
26
+   if (!option(OPTSIDEBARSORT))
26
+
27
+     return b;
27
+  for (; tmp != NULL; tmp = tmp->next)
28
+ 
28
+    buffycount++;
29
+   for (; tmp != NULL; tmp = tmp->next)
29
+
30
+     buffycount++;
30
+  ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary));
31
+ 
31
+
32
+   ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary));
32
+  tmp = b;
33
+ 
33
+  for (i = 0; tmp != NULL; tmp = tmp->next, i++) {
34
+   tmp = b;
34
+    ary[i] = tmp;
35
+   for (i = 0; tmp != NULL; tmp = tmp->next, i++) {
35
+  }
36
+     ary[i] = tmp;
36
+
37
+   }
37
+  qsort(ary, buffycount, sizeof(*ary), buffy_compare_name);
38
+ 
38
+
39
+   qsort(ary, buffycount, sizeof(*ary), buffy_compare_name);
39
+  for (i = 0; i < buffycount - 1; i++) {
40
+ 
40
+    ary[i]->next = ary[i+1];
41
+   for (i = 0; i < buffycount - 1; i++) {
41
+  }
42
+     ary[i]->next = ary[i+1];
42
+  ary[buffycount - 1]->next = NULL;
43
+   }
43
+  for (i = 1; i < buffycount; i++) {
44
+   ary[buffycount - 1]->next = NULL;
44
+    ary[i]->prev = ary[i-1];
45
+   for (i = 1; i < buffycount; i++) {
45
+  }
46
+     ary[i]->prev = ary[i-1];
46
+  ary[0]->prev = NULL;
47
+   }
47
+
48
+   ary[0]->prev = NULL;
48
+  tmp = ary[0];
49
+ 
49
+  free(ary);
50
+   tmp = ary[0];
50
+  return tmp;
51
+   free(ary);
51
+}
52
+   return tmp;
52
+
53
+ }
53
 BUFFY *mutt_find_mailbox (const char *path)
54
+ 
54
 {
55
  BUFFY *mutt_find_mailbox (const char *path)
55
   BUFFY *tmp = NULL;
56
  {
56
@@ -196,9 +239,13 @@
57
    BUFFY *tmp = NULL;
57
 static BUFFY *buffy_new (const char *path)
58
***************
58
 {
59
*** 196,204 ****
59
   BUFFY* buffy;
60
--- 239,251 ----
60
+  char rp[PATH_MAX];
61
  static BUFFY *buffy_new (const char *path)
61
+  char *r;
62
  {
62
 
63
    BUFFY* buffy;
63
   buffy = (BUFFY *) safe_calloc (1, sizeof (BUFFY));
64
+   char rp[PATH_MAX];
64
   strfcpy (buffy->path, path, sizeof (buffy->path));
65
+   char *r;
65
+  r = realpath(path, rp);
66
  
66
+  strfcpy (buffy->realpath, r ? rp : path, sizeof (buffy->realpath));
67
    buffy = (BUFFY *) safe_calloc (1, sizeof (BUFFY));
67
   buffy->next = NULL;
68
    strfcpy (buffy->path, path, sizeof (buffy->path));
68
   buffy->magic = 0;
69
+   r = realpath(path, rp);
69
 
70
+   strfcpy (buffy->realpath, r ? rp : path, sizeof (buffy->realpath));
70
@@ -243,8 +290,8 @@
71
    buffy->next = NULL;
71
     p = realpath (buf, f1);
72
    buffy->magic = 0;
72
     for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
73
  
73
     {
74
***************
74
-      q = realpath ((*tmp)->path, f2);
75
*** 243,250 ****
75
-      if (mutt_strcmp (p ? p : buf, q ? q : (*tmp)->path) == 0)
76
      p = realpath (buf, f1);
76
+      q = (*tmp)->realpath;
77
      for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
77
+      if (mutt_strcmp (p ? p : buf, q) == 0)
78
      {
78
       {
79
!       q = realpath ((*tmp)->path, f2);
79
 	dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path));
80
!       if (mutt_strcmp (p ? p : buf, q ? q : (*tmp)->path) == 0)
80
 	break;
81
        {
81
@@ -282,6 +329,7 @@
82
  	dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path));
82
     else
83
  	break;
83
       (*tmp)->size = 0;
84
--- 290,297 ----
84
   }
85
      p = realpath (buf, f1);
85
+  Incoming = buffy_sort(Incoming);
86
      for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
86
   return 0;
87
      {
87
 }
88
!       q = (*tmp)->realpath;
88
 
89
!       if (mutt_strcmp (p ? p : buf, q) == 0)
89
@@ -306,6 +354,11 @@
90
        {
90
       return 0;
91
  	dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path));
91
   }
92
  	break;
92
 
93
***************
93
+  if (option(OPTSIDEBAR) && mailbox->msg_unread > 0) {
94
*** 282,287 ****
94
+      mailbox->new = 1;
95
--- 329,335 ----
95
+      return 1;
96
      else
96
+  }
97
        (*tmp)->size = 0;
97
+
98
    }
98
   if ((dirp = opendir (path)) == NULL)
99
+   Incoming = buffy_sort(Incoming);
99
   {
100
    return 0;
100
     mailbox->magic = 0;
101
  }
101
@@ -357,6 +410,73 @@
102
  
102
 
103
***************
103
   return 0;
104
*** 306,311 ****
104
 }
105
--- 354,364 ----
105
+  
106
        return 0;
106
+/* update message counts for the sidebar */
107
    }
107
+void buffy_maildir_update (BUFFY* mailbox)
108
  
108
+{
109
+   if (option(OPTSIDEBAR) && mailbox->msg_unread > 0) {
109
+  char path[_POSIX_PATH_MAX];
110
+       mailbox->new = 1;
110
+  DIR *dirp;
111
+       return 1;
111
+  struct dirent *de;
112
+   }
112
+  char *p;
113
+ 
113
+
114
    if ((dirp = opendir (path)) == NULL)
114
+  if(!option(OPTSIDEBAR))
115
    {
115
+      return;
116
      mailbox->magic = 0;
116
+
117
***************
117
+  mailbox->msgcount = 0;
118
*** 340,345 ****
118
+  mailbox->msg_unread = 0;
119
--- 393,464 ----
119
+  mailbox->msg_flagged = 0;
120
    return rc;
120
+
121
  }
121
+  snprintf (path, sizeof (path), "%s/new", mailbox->path);
122
  
122
+        
123
+ /* update message counts for the sidebar */
123
+  if ((dirp = opendir (path)) == NULL)
124
+ void buffy_maildir_update (BUFFY* mailbox)
124
+  {   
125
+ {
125
+    mailbox->magic = 0;
126
+   char path[_POSIX_PATH_MAX];
126
+    return;
127
+   DIR *dirp;
127
+  } 
128
+   struct dirent *de;
128
+      
129
+   char *p;
129
+  while ((de = readdir (dirp)) != NULL)
130
+ 
130
+  {
131
+   if(!option(OPTSIDEBAR))
131
+    if (*de->d_name == '.')
132
+       return;
132
+      continue;
133
+ 
133
+
134
+   mailbox->msgcount = 0;
134
+    if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
135
+   mailbox->msg_unread = 0;
135
+      mailbox->new = 1;
136
+   mailbox->msg_flagged = 0;
136
+      mailbox->msgcount++;
137
+ 
137
+      mailbox->msg_unread++;
138
+   snprintf (path, sizeof (path), "%s/new", mailbox->path);
138
+    }
139
+         
139
+  }
140
+   if ((dirp = opendir (path)) == NULL)
140
+
141
+   {   
141
+  closedir (dirp);
142
+     mailbox->magic = 0;
142
+  snprintf (path, sizeof (path), "%s/cur", mailbox->path);
143
+     return;
143
+        
144
+   } 
144
+  if ((dirp = opendir (path)) == NULL)
145
+       
145
+  {   
146
+   while ((de = readdir (dirp)) != NULL)
146
+    mailbox->magic = 0;
147
+   {
147
+    return;
148
+     if (*de->d_name == '.')
148
+  } 
149
+       continue;
149
+      
150
+ 
150
+  while ((de = readdir (dirp)) != NULL)
151
+     if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
151
+  {
152
+       mailbox->new = 1;
152
+    if (*de->d_name == '.')
153
+       mailbox->msgcount++;
153
+      continue;
154
+       mailbox->msg_unread++;
154
+
155
+     }
155
+    if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
156
+   }
156
+      mailbox->msgcount++;
157
+ 
157
+      if ((p = strstr (de->d_name, ":2,"))) {
158
+   closedir (dirp);
158
+        if (!strchr (p + 3, 'T')) {
159
+   snprintf (path, sizeof (path), "%s/cur", mailbox->path);
159
+          if (!strchr (p + 3, 'S'))
160
+         
160
+            mailbox->msg_unread++;
161
+   if ((dirp = opendir (path)) == NULL)
161
+          if (strchr(p + 3, 'F'))
162
+   {   
162
+            mailbox->msg_flagged++;
163
+     mailbox->magic = 0;
163
+        }
164
+     return;
164
+      }
165
+   } 
165
+    }
166
+       
166
+  }
167
+   while ((de = readdir (dirp)) != NULL)
167
+
168
+   {
168
+  mailbox->sb_last_checked = time(NULL);
169
+     if (*de->d_name == '.')
169
+  closedir (dirp);
170
+       continue;
170
+}
171
+ 
171
+
172
+     if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
172
 /* returns 1 if mailbox has new mail */ 
173
+       mailbox->msgcount++;
173
 static int buffy_mbox_hasnew (BUFFY* mailbox, struct stat *sb)
174
+       if ((p = strstr (de->d_name, ":2,"))) {
174
 {
175
+         if (!strchr (p + 3, 'T')) {
175
@@ -368,7 +488,7 @@
176
+           if (!strchr (p + 3, 'S'))
176
   else
177
+             mailbox->msg_unread++;
177
     statcheck = sb->st_mtime > sb->st_atime
178
+           if (strchr(p + 3, 'F'))
178
       || (mailbox->newly_created && sb->st_ctime == sb->st_mtime && sb->st_ctime == sb->st_atime);
179
+             mailbox->msg_flagged++;
179
-  if (statcheck)
180
+         }
180
+  if ((!option(OPTSIDEBAR) && statcheck) || (option(OPTSIDEBAR) && mailbox->msg_unread > 0))
181
+       }
181
   {
182
+     }
182
     if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
183
+   }
183
     {
184
+ 
184
@@ -388,6 +508,27 @@
185
+   mailbox->sb_last_checked = time(NULL);
185
   return rc;
186
+   closedir (dirp);
186
 }
187
+ }
187
 
188
+ 
188
+/* update message counts for the sidebar */
189
  /* returns 1 if mailbox has new mail */ 
189
+void buffy_mbox_update (BUFFY* mailbox, struct stat *sb)
190
  static int buffy_mbox_hasnew (BUFFY* mailbox, struct stat *sb)
190
+{
191
  {
191
+  CONTEXT *ctx = NULL;
192
***************
192
+
193
*** 351,357 ****
193
+  if(!option(OPTSIDEBAR))
194
    else
194
+      return;
195
      statcheck = sb->st_mtime > sb->st_atime
195
+  if(mailbox->sb_last_checked > sb->st_mtime && mailbox->msgcount != 0)
196
        || (mailbox->newly_created && sb->st_ctime == sb->st_mtime && sb->st_ctime == sb->st_atime);
196
+      return; /* no check necessary */
197
!   if (statcheck)
197
+
198
    {
198
+  ctx = mx_open_mailbox(mailbox->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL);
199
      if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
199
+  if(ctx)
200
      {
200
+  {
201
--- 470,476 ----
201
+    mailbox->msgcount = ctx->msgcount;
202
    else
202
+    mailbox->msg_unread = ctx->unread;
203
      statcheck = sb->st_mtime > sb->st_atime
203
+    mailbox->msg_flagged = ctx->flagged;
204
        || (mailbox->newly_created && sb->st_ctime == sb->st_mtime && sb->st_ctime == sb->st_atime);
204
+    mailbox->sb_last_checked = time(NULL);
205
!   if ((!option(OPTSIDEBAR) && statcheck) || (option(OPTSIDEBAR) && mailbox->msg_unread > 0))
205
+    mx_close_mailbox(ctx, 0);
206
    {
206
+  }
207
      if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
207
+}
208
      {
208
+
209
***************
209
 int mutt_buffy_check (int force)
210
*** 371,376 ****
210
 {
211
--- 490,516 ----
211
   BUFFY *tmp;
212
    return rc;
212
@@ -461,17 +602,20 @@
213
  }
213
       {
214
  
214
       case M_MBOX:
215
+ /* update message counts for the sidebar */
215
       case M_MMDF:
216
+ void buffy_mbox_update (BUFFY* mailbox, struct stat *sb)
216
+	buffy_mbox_update (tmp, &sb);
217
+ {
217
 	if (buffy_mbox_hasnew (tmp, &sb) > 0)
218
+   CONTEXT *ctx = NULL;
218
 	  BuffyCount++;
219
+ 
219
 	break;
220
+   if(!option(OPTSIDEBAR))
220
 
221
+       return;
221
       case M_MAILDIR:
222
+   if(mailbox->sb_last_checked > sb->st_mtime && mailbox->msgcount != 0)
222
+	buffy_maildir_update (tmp);
223
+       return; /* no check necessary */
223
 	if (buffy_maildir_hasnew (tmp) > 0)
224
+ 
224
 	  BuffyCount++;
225
+   ctx = mx_open_mailbox(mailbox->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL);
225
 	break;
226
+   if(ctx)
226
 
227
+   {
227
       case M_MH:
228
+     mailbox->msgcount = ctx->msgcount;
228
-	mh_buffy(tmp);
229
+     mailbox->msg_unread = ctx->unread;
229
+	mh_buffy_update (tmp->path, &tmp->msgcount, &tmp->msg_unread, &tmp->msg_flagged, &tmp->sb_last_checked);
230
+     mailbox->msg_flagged = ctx->flagged;
230
+        mh_buffy(tmp);
231
+     mailbox->sb_last_checked = time(NULL);
231
 	if (tmp->new)
232
+     mx_close_mailbox(ctx, 0);
232
 	  BuffyCount++;
233
+   }
233
 	break;
234
+ }
235
+ 
236
  int mutt_buffy_check (int force)
237
  {
238
    BUFFY *tmp;
239
***************
240
*** 444,460 ****
241
        {
242
        case M_MBOX:
243
        case M_MMDF:
244
  	if (buffy_mbox_hasnew (tmp, &sb) > 0)
245
  	  BuffyCount++;
246
  	break;
247
  
248
        case M_MAILDIR:
249
  	if (buffy_maildir_hasnew (tmp) > 0)
250
  	  BuffyCount++;
251
  	break;
252
  
253
        case M_MH:
254
! 	mh_buffy(tmp);
255
  	if (tmp->new)
256
  	  BuffyCount++;
257
  	break;
258
--- 584,603 ----
259
        {
260
        case M_MBOX:
261
        case M_MMDF:
262
+ 	buffy_mbox_update (tmp, &sb);
263
  	if (buffy_mbox_hasnew (tmp, &sb) > 0)
264
  	  BuffyCount++;
265
  	break;
266
  
267
        case M_MAILDIR:
268
+ 	buffy_maildir_update (tmp);
269
  	if (buffy_maildir_hasnew (tmp) > 0)
270
  	  BuffyCount++;
271
  	break;
272
  
273
        case M_MH:
274
! 	mh_buffy_update (tmp->path, &tmp->msgcount, &tmp->msg_unread, &tmp->msg_flagged, &tmp->sb_last_checked);
275
!         mh_buffy(tmp);
276
  	if (tmp->new)
277
  	  BuffyCount++;
278
  	break;
279
*** mutt-1.5.23-orig/buffy.h	2014-03-12 11:03:44.000000000 -0500
234
*** mutt-1.5.23-orig/buffy.h	2014-03-12 11:03:44.000000000 -0500
280
--- mutt-1.5.23/buffy.h	2014-04-11 10:14:01.000000000 -0500
235
--- mutt-1.5.23/buffy.h	2014-04-11 10:14:01.000000000 -0500
281
***************
236
***************
Lines 300-320 Link Here
300
  }
255
  }
301
  BUFFY;
256
  BUFFY;
302
  
257
  
303
*** mutt-1.5.23-orig/color.c	2014-03-12 11:03:45.000000000 -0500
258
*** mutt-1.5.23-orig/color.c.orig	2015-08-30 19:06:38.000000000 +0200
304
--- mutt-1.5.23/color.c	2014-04-11 10:14:01.000000000 -0500
259
--- mutt-1.5.23/color.c	2015-09-10 09:34:06.000000000 +0200
305
***************
260
@@ -94,6 +94,8 @@
306
*** 93,98 ****
261
   { "underline",	MT_COLOR_UNDERLINE },
307
--- 93,100 ----
262
   { "index",		MT_COLOR_INDEX },
308
    { "bold",		MT_COLOR_BOLD },
263
   { "prompt",		MT_COLOR_PROMPT },
309
    { "underline",	MT_COLOR_UNDERLINE },
264
+  { "sidebar_new",	MT_COLOR_NEW },
310
    { "index",		MT_COLOR_INDEX },
265
+  { "sidebar_flagged",	MT_COLOR_FLAGGED },
311
+   { "sidebar_new",	MT_COLOR_NEW },
266
   { NULL,		0 }
312
+   { "sidebar_flagged",	MT_COLOR_FLAGGED },
267
 };
313
    { NULL,		0 }
268
 
314
  };
269
*** mutt-1.5.23-orig/compose.c.orig	2015-09-10 19:24:26.000000000 +0200
315
  
270
--- mutt-1.5.23/compose.c	2015-09-10 20:49:12.000000000 +0200
316
*** mutt-1.5.23-orig/compose.c.orig	2014-04-13 09:37:15.000000000 +0200
317
--- mutt-1.5.23/compose.c	2014-04-13 09:41:42.000000000 +0200
318
@@ -83,7 +83,7 @@
271
@@ -83,7 +83,7 @@
319
 
272
 
320
 #define HDR_XOFFSET 14
273
 #define HDR_XOFFSET 14
Lines 333-340 Link Here
333
 
286
 
334
   if ((WithCrypto & (APPLICATION_PGP | APPLICATION_SMIME)) == 0)
287
   if ((WithCrypto & (APPLICATION_PGP | APPLICATION_SMIME)) == 0)
335
   {
288
   {
336
@@ -176,7 +176,7 @@
289
@@ -179,7 +179,7 @@
337
   }
290
       addstr (_(" (OppEnc mode)"));
338
 
291
 
339
   clrtoeol ();
292
   clrtoeol ();
340
-  move (HDR_CRYPTINFO, 0);
293
-  move (HDR_CRYPTINFO, 0);
Lines 342-348 Link Here
342
   clrtoeol ();
295
   clrtoeol ();
343
 
296
 
344
   if ((WithCrypto & APPLICATION_PGP)
297
   if ((WithCrypto & APPLICATION_PGP)
345
@@ -194,7 +194,7 @@
298
@@ -204,7 +204,7 @@
346
       && (msg->security & ENCRYPT)
299
       && (msg->security & ENCRYPT)
347
       && SmimeCryptAlg
300
       && SmimeCryptAlg
348
       && *SmimeCryptAlg) {
301
       && *SmimeCryptAlg) {
Lines 351-357 Link Here
351
 		NONULL(SmimeCryptAlg));
304
 		NONULL(SmimeCryptAlg));
352
   }
305
   }
353
 }
306
 }
354
@@ -207,7 +207,7 @@
307
@@ -217,7 +217,7 @@
355
   int c;
308
   int c;
356
   char *t;
309
   char *t;
357
 
310
 
Lines 360-366 Link Here
360
 
313
 
361
   if (!chain)
314
   if (!chain)
362
   {
315
   {
363
@@ -222,7 +222,7 @@
316
@@ -232,7 +232,7 @@
364
     if (t && t[0] == '0' && t[1] == '\0')
317
     if (t && t[0] == '0' && t[1] == '\0')
365
       t = "<random>";
318
       t = "<random>";
366
     
319
     
Lines 369-375 Link Here
369
       break;
322
       break;
370
 
323
 
371
     addstr (NONULL(t));
324
     addstr (NONULL(t));
372
@@ -274,7 +274,7 @@
325
@@ -284,7 +284,7 @@
373
 
326
 
374
   buf[0] = 0;
327
   buf[0] = 0;
375
   rfc822_write_address (buf, sizeof (buf), addr, 1);
328
   rfc822_write_address (buf, sizeof (buf), addr, 1);
Lines 378-384 Link Here
378
   mutt_paddstr (W, buf);
331
   mutt_paddstr (W, buf);
379
 }
332
 }
380
 
333
 
381
@@ -292,21 +292,21 @@
334
@@ -302,21 +302,21 @@
382
   }
335
   }
383
   else
336
   else
384
   {
337
   {
Lines 405-411 Link Here
405
   mutt_paddstr (W, fcc);
358
   mutt_paddstr (W, fcc);
406
 
359
 
407
   if (WithCrypto)
360
   if (WithCrypto)
408
@@ -317,7 +317,7 @@
361
@@ -327,7 +327,7 @@
409
 #endif
362
 #endif
410
 
363
 
411
   SETCOLOR (MT_COLOR_STATUS);
364
   SETCOLOR (MT_COLOR_STATUS);
Lines 414-420 Link Here
414
   clrtoeol ();
367
   clrtoeol ();
415
 
368
 
416
   NORMAL_COLOR;
369
   NORMAL_COLOR;
417
@@ -353,7 +353,7 @@
370
@@ -363,7 +363,7 @@
418
   /* redraw the expanded list so the user can see the result */
371
   /* redraw the expanded list so the user can see the result */
419
   buf[0] = 0;
372
   buf[0] = 0;
420
   rfc822_write_address (buf, sizeof (buf), *addr, 1);
373
   rfc822_write_address (buf, sizeof (buf), *addr, 1);
Lines 423-429 Link Here
423
   mutt_paddstr (W, buf);
376
   mutt_paddstr (W, buf);
424
   
377
   
425
   return 0;
378
   return 0;
426
@@ -685,7 +685,7 @@
379
@@ -705,7 +705,7 @@
427
 	if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0)
380
 	if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0)
428
 	{
381
 	{
429
 	  mutt_str_replace (&msg->env->subject, buf);
382
 	  mutt_str_replace (&msg->env->subject, buf);
Lines 432-438 Link Here
432
 	  if (msg->env->subject)
385
 	  if (msg->env->subject)
433
 	    mutt_paddstr (W, msg->env->subject);
386
 	    mutt_paddstr (W, msg->env->subject);
434
 	  else
387
 	  else
435
@@ -703,7 +703,7 @@
388
@@ -723,7 +723,7 @@
436
 	{
389
 	{
437
 	  strfcpy (fcc, buf, fcclen);
390
 	  strfcpy (fcc, buf, fcclen);
438
 	  mutt_pretty_mailbox (fcc, fcclen);
391
 	  mutt_pretty_mailbox (fcc, fcclen);
Lines 701-784 Link Here
701
  #ifdef USE_IMAP
654
  #ifdef USE_IMAP
702
  WHERE short ImapKeepalive;
655
  WHERE short ImapKeepalive;
703
  WHERE short ImapPipelineDepth;
656
  WHERE short ImapPipelineDepth;
704
*** mutt-1.5.23-orig/handler.c	2014-03-12 11:03:45.000000000 -0500
657
*** mutt-1.5.23-orig/handler.c.orig	2015-09-10 09:34:53.000000000 +0200
705
--- mutt-1.5.23/handler.c	2014-04-11 10:14:01.000000000 -0500
658
--- mutt-1.5.23/handler.c	2015-09-10 09:58:03.000000000 +0200
706
***************
659
@@ -1625,6 +1625,11 @@
707
*** 1599,1604 ****
660
   int decode = 0;
708
--- 1599,1609 ----
661
   int rc = 0;
709
    size_t tmplength = 0;
662
 
710
    int rc = 0;
663
+#ifdef HAVE_FMEMOPEN
711
  
664
+  char *temp;
712
+ #ifdef HAVE_FMEMOPEN
665
+  size_t tempsize;
713
+   char *temp;
666
+#endif
714
+   size_t tempsize;
667
+
715
+ #endif
668
   fseeko (s->fpin, b->offset, 0);
716
+ 
669
 
717
    int oflags = s->flags;
670
   /* see if we need to decode this part before processing it */
718
    
671
@@ -1642,6 +1647,14 @@
719
    /* first determine which handler to use to process this part */
672
     {
720
***************
673
       /* decode to a tempfile, saving the original destination */
721
*** 1711,1716 ****
674
       fp = s->fpout;
722
--- 1716,1729 ----
675
+#ifdef HAVE_FMEMOPEN
723
        {
676
+	if ((s->fpout = open_memstream(&temp, &tempsize)) == NULL)
724
  	/* decode to a tempfile, saving the original destination */
677
+	{
725
  	fp = s->fpout;
678
+	  mutt_error _("Unable to open memory stream!");
726
+ #ifdef HAVE_FMEMOPEN
679
+	  dprint (1, (debugfile, "Can't open memory stream.\n"));
727
+ 	if ((s->fpout = open_memstream(&temp, &tempsize)) == NULL)
680
+	  goto bail;
728
+ 	{
681
+	}
729
+ 	  mutt_error _("Unable to open memory stream!");
682
+#else
730
+ 	  dprint (1, (debugfile, "Can't open memory stream.\n"));
683
       mutt_mktemp (tempfile, sizeof (tempfile));
731
+ 	  goto bail;
684
       if ((s->fpout = safe_fopen (tempfile, "w")) == NULL)
732
+ 	}
685
       {
733
+ #else
686
@@ -1649,6 +1662,7 @@
734
  	mutt_mktemp (tempfile, sizeof (tempfile));
687
         dprint (1, (debugfile, "Can't open %s.\n", tempfile));
735
  	if ((s->fpout = safe_fopen (tempfile, "w")) == NULL)
688
         return -1;
736
  	{
689
       }
737
***************
690
+#endif
738
*** 1718,1723 ****
691
       /* decoding the attachment changes the size and offset, so save a copy
739
--- 1731,1737 ----
692
         * of the "real" values now, and restore them after processing
740
  	  dprint (1, (debugfile, "Can't open %s.\n", tempfile));
693
         */
741
  	  goto bail;
694
@@ -1677,8 +1691,19 @@
742
  	}
695
       /* restore final destination and substitute the tempfile for input */
743
+ #endif
696
       s->fpout = fp;
744
  	/* decoding the attachment changes the size and offset, so save a copy
697
       fp = s->fpin;
745
  	 * of the "real" values now, and restore them after processing
698
+#ifdef HAVE_FMEMOPEN
746
  	 */
699
+	if(tempsize)
747
***************
700
+		s->fpin = fmemopen(temp, tempsize, "r");
748
*** 1746,1753 ****
701
+	else /* fmemopen cannot handle zero-length buffers */
749
--- 1760,1778 ----
702
+		s->fpin = safe_fopen ("/dev/null", "r");
750
  	/* restore final destination and substitute the tempfile for input */
703
+	if(s->fpin == NULL) {
751
  	s->fpout = fp;
704
+		mutt_perror("failed to re-open memstream!");
752
  	fp = s->fpin;
705
+		return (-1);
753
+ #ifdef HAVE_FMEMOPEN
706
+	}
754
+ 	if(tempsize)
707
+#else
755
+ 		s->fpin = fmemopen(temp, tempsize, "r");
708
       s->fpin = fopen (tempfile, "r");
756
+ 	else /* fmemopen cannot handle zero-length buffers */
709
       unlink (tempfile);
757
+ 		s->fpin = safe_fopen ("/dev/null", "r");
710
+#endif
758
+ 	if(s->fpin == NULL) {
711
 
759
+ 		mutt_perror("failed to re-open memstream!");
712
       /* restore the prefix */
760
+ 		return (-1);
713
       s->prefix = savePrefix;
761
+ 	}
714
@@ -1704,9 +1729,14 @@
762
+ #else
715
 
763
  	s->fpin = fopen (tempfile, "r");
716
       /* restore the original source stream */
764
  	unlink (tempfile);
717
       safe_fclose (&s->fpin);
765
+ #endif
718
+#ifdef HAVE_FMEMOPEN
766
  
719
+	if(tempsize)
767
  	/* restore the prefix */
720
+	    FREE(&temp);
768
  	s->prefix = savePrefix;
721
+#endif
769
***************
722
       s->fpin = fp;
770
*** 1773,1778 ****
723
     }
771
--- 1798,1807 ----
724
   }
772
  
725
+  bail:
773
  	/* restore the original source stream */
726
   s->flags |= M_FIRSTDONE;
774
  	safe_fclose (&s->fpin);
727
 
775
+ #ifdef HAVE_FMEMOPEN
728
   return rc;
776
+ 	if(tempsize)
729
@@ -1743,6 +1773,7 @@
777
+ 	    FREE(&temp);
730
   handler_t handler = NULL;
778
+ #endif
731
   int rc = 0;
779
  	s->fpin = fp;
732
 
780
        }
733
+
781
      }
734
   int oflags = s->flags;
735
   
736
   /* first determine which handler to use to process this part */
782
*** mutt-1.5.23-orig/init.h	2014-03-12 11:06:17.000000000 -0500
737
*** mutt-1.5.23-orig/init.h	2014-03-12 11:06:17.000000000 -0500
783
--- mutt-1.5.23/init.h	2014-04-11 10:14:01.000000000 -0500
738
--- mutt-1.5.23/init.h	2014-04-11 10:14:01.000000000 -0500
784
***************
739
***************
Lines 1201-1229 Link Here
1201
  static int mh_mkstemp (CONTEXT * dest, FILE ** fp, char **tgt)
1156
  static int mh_mkstemp (CONTEXT * dest, FILE ** fp, char **tgt)
1202
  {
1157
  {
1203
    int fd;
1158
    int fd;
1204
*** mutt-1.5.23-orig/mutt_curses.h	2014-03-12 11:03:45.000000000 -0500
1159
*** mutt-1.5.23-orig/mutt_curses.h.orig	2015-08-30 19:06:38.000000000 +0200
1205
--- mutt-1.5.23/mutt_curses.h	2014-04-11 10:14:01.000000000 -0500
1160
--- mutt-1.5.23/mutt_curses.h	2015-09-10 09:42:34.000000000 +0200
1206
***************
1161
@@ -64,6 +64,7 @@
1207
*** 64,69 ****
1162
 #undef lines
1208
--- 64,70 ----
1163
 #endif /* lines */
1209
  #undef lines
1164
 
1210
  #endif /* lines */
1165
+#define CLEARLINE_WIN(x) move(x,SidebarWidth), clrtoeol()
1211
  
1166
 #define CLEARLINE(x) move(x,0), clrtoeol()
1212
+ #define CLEARLINE_WIN(x) move(x,SidebarWidth), clrtoeol()
1167
 #define CENTERLINE(x,y) move(y, (COLS-strlen(x))/2), addstr(x)
1213
  #define CLEARLINE(x) move(x,0), clrtoeol()
1168
 #define BEEP() do { if (option (OPTBEEP)) beep(); } while (0)
1214
  #define CENTERLINE(x,y) move(y, (COLS-strlen(x))/2), addstr(x)
1169
@@ -121,6 +122,8 @@
1215
  #define BEEP() do { if (option (OPTBEEP)) beep(); } while (0)
1170
   MT_COLOR_UNDERLINE,
1216
***************
1171
   MT_COLOR_INDEX,
1217
*** 120,125 ****
1172
   MT_COLOR_PROMPT,
1218
--- 121,128 ----
1173
+  MT_COLOR_NEW,
1219
    MT_COLOR_BOLD,
1174
+  MT_COLOR_FLAGGED,
1220
    MT_COLOR_UNDERLINE,
1175
   MT_COLOR_MAX
1221
    MT_COLOR_INDEX,
1176
 };
1222
+   MT_COLOR_NEW,
1177
 
1223
+   MT_COLOR_FLAGGED,
1224
    MT_COLOR_MAX
1225
  };
1226
  
1227
*** mutt-1.5.23-orig/mutt_menu.h	2014-03-12 11:06:17.000000000 -0500
1178
*** mutt-1.5.23-orig/mutt_menu.h	2014-03-12 11:06:17.000000000 -0500
1228
--- mutt-1.5.23/mutt_menu.h	2014-04-11 10:14:01.000000000 -0500
1179
--- mutt-1.5.23/mutt_menu.h	2014-04-11 10:14:01.000000000 -0500
1229
***************
1180
***************
(-)./files/extra-patch-trash-purge (-6 / +6 lines)
Lines 147-162 Link Here
147
   { "exit",		OP_EXIT,			"q" },
147
   { "exit",		OP_EXIT,			"q" },
148
   { "reply",		OP_REPLY,			"r" },
148
   { "reply",		OP_REPLY,			"r" },
149
diff -pruN -x'*.orig' mutt-1.5.20/globals.h mutt-1.5.20-trash/globals.h
149
diff -pruN -x'*.orig' mutt-1.5.20/globals.h mutt-1.5.20-trash/globals.h
150
--- mutt-1.5.20/globals.h	2009-06-03 16:48:31.000000000 -0400
150
--- mutt-1.5.24/globals.h.orig	2015-08-30 19:06:38.000000000 +0200
151
+++ mutt-1.5.20-trash/globals.h	2009-07-23 09:44:40.000000000 -0400
151
+++ mutt-1.5.20-trash/globals.h	2015-09-10 09:26:21.000000000 +0200
152
@@ -139,6 +139,7 @@ WHERE char *StChars;
152
@@ -141,6 +141,7 @@
153
 WHERE char *Status;
153
 WHERE char *Status;
154
 WHERE char *Tempdir;
154
 WHERE char *Tempdir;
155
 WHERE char *Tochars;
155
 WHERE char *Tochars;
156
+WHERE char *TrashPath;
156
+WHERE char *TrashPath;
157
 WHERE char *Username;
157
 WHERE char *TSStatusFormat;
158
 WHERE char *Visual;
158
 WHERE char *TSIconFormat;
159
 
159
 WHERE short TSSupported;
160
diff -pruN -x'*.orig' mutt-1.5.20/imap/message.c mutt-1.5.20-trash/imap/message.c
160
diff -pruN -x'*.orig' mutt-1.5.20/imap/message.c mutt-1.5.20-trash/imap/message.c
161
--- mutt-1.5.20/imap/message.c	2009-06-07 13:52:57.000000000 -0400
161
--- mutt-1.5.20/imap/message.c	2009-06-07 13:52:57.000000000 -0400
162
+++ mutt-1.5.20-trash/imap/message.c	2009-07-23 09:44:40.000000000 -0400
162
+++ mutt-1.5.20-trash/imap/message.c	2009-07-23 09:44:40.000000000 -0400
(-)./files/patch-CVE-2014-9116 (-43 lines)
Lines 1-43 Link Here
1
# HG changeset patch
2
# User Kevin McCarthy <kevin@8t8.us>
3
# Date 1417472364 28800
4
#      Mon Dec 01 14:19:24 2014 -0800
5
# Branch stable
6
# Node ID 54c59aaf88b9f6b50f1078fc6f7551fa9315ac3e
7
# Parent  1b583341d5ad677c8a1935eb4110eba27606878a
8
Revert write_one_header() to skip space and tab.  (closes #3716)
9
10
This patch fixes CVE-2014-9116 in the stable branch.  It reverts
11
write_one_header() to the pre [f251d523ca5a] code for skipping
12
whitespace.
13
14
Thanks to Antonio Radici and Tomas Hoger for their analysis and patches
15
to mutt, which this patch is based off of.
16
17
diff --git a/sendlib.c b/sendlib.c
18
--- sendlib.c
19
+++ sendlib.c
20
@@ -1809,17 +1809,22 @@
21
     {
22
       tagbuf = NULL;
23
       valbuf = mutt_substrdup (start, end);
24
     }
25
     else
26
     {
27
       tagbuf = mutt_substrdup (start, t);
28
       /* skip over the colon separating the header field name and value */
29
-      t = skip_email_wsp(t + 1);
30
+      ++t;
31
+
32
+      /* skip over any leading whitespace (WSP, as defined in RFC5322) */
33
+      while (*t == ' ' || *t == '\t')
34
+        t++;
35
+
36
       valbuf = mutt_substrdup (t, end);
37
     }
38
     dprint(4,(debugfile,"mwoh: buf[%s%s] too long, "
39
 	      "max width = %d > %d\n",
40
 	      NONULL(pfx), valbuf, max, wraplen));
41
     if (fold_one_header (fp, tagbuf, valbuf, pfx, wraplen, flags) < 0)
42
       return -1;
43
     FREE (&tagbuf);
(-)./files/patch-Makefile.am (-12 / +3 lines)
Lines 1-18 Link Here
1
--- Makefile.am.orig	2014-03-12 17:03:44.000000000 +0100
1
--- Makefile.am.orig	2015-09-10 07:37:42.000000000 +0200
2
+++ Makefile.am	2014-03-16 17:22:07.000000000 +0100
2
+++ Makefile.am	2015-09-10 07:38:51.000000000 +0200
3
@@ -97,7 +97,7 @@
4
 
5
 # If this fails, we will fall back to the implementation in txt2c.sh
6
 txt2c: txt2c.c
7
-	-$${NATIVECC-$(CC)} -o $@ $<
8
+	-$(CC) -o $@ $<
9
 
10
 conststrings.c: txt2c config.status
11
 	( \
12
@@ -162,10 +162,6 @@
3
@@ -162,10 +162,6 @@
13
 
4
 
14
 install-data-local:
5
 install-data-local:
15
 	$(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
6
 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)
16
-	$(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/mime.types.dist
7
-	$(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/mime.types.dist
17
-	-if [ ! -f $(DESTDIR)$(sysconfdir)/mime.types ]; then \
8
-	-if [ ! -f $(DESTDIR)$(sysconfdir)/mime.types ]; then \
18
-		$(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir); \
9
-		$(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir); \
(-)./files/patch-curs_lib.c (-43 lines)
Lines 1-43 Link Here
1
--- curs_lib.c.old	Wed Sep  1 19:39:20 1999
2
+++ curs_lib.c	Sun Sep 26 23:47:03 1999
3
@@ -156,6 +156,16 @@
4
       def = 0;
5
       break;
6
     }
7
+    else if (tolower(ch.ch) == 'y')
8
+    {
9
+      def = 1;
10
+      break;
11
+    }
12
+    else if (tolower(ch.ch) == 'n')
13
+    {
14
+      def = 0;
15
+      break;
16
+    }
17
     else
18
     {
19
       BEEP();
20
@@ -413,8 +423,9 @@
21
 {
22
   event_t ch;
23
   int choice;
24
-  char *p;
25
+  char *p, *nletters;
26
 
27
+  nletters = _(letters);
28
   mvaddstr (LINES - 1, 0, prompt);
29
   clrtoeol ();
30
   FOREVER
31
@@ -428,6 +439,12 @@
32
     }
33
     else
34
     {
35
+      p = strchr (nletters, ch.ch);
36
+      if (p)
37
+      {
38
+	choice = p - nletters + 1;
39
+	break;
40
+      }
41
       p = strchr (letters, ch.ch);
42
       if (p)
43
       {
(-)./files/patch-examples (-40 / +36 lines)
Lines 1-26 Link Here
1
--- contrib/Makefile.am.orig	Tue Jul 18 20:04:14 2006
1
--- contrib/Makefile.am.orig	2015-09-10 08:43:38.000000000 +0200
2
+++ contrib/Makefile.am	Wed Aug 30 16:05:33 2006
2
+++ contrib/Makefile.am	2015-09-10 08:48:05.000000000 +0200
3
@@ -1,6 +1,7 @@
3
@@ -1,6 +1,7 @@
4
 # $Id: Makefile.am,v 3.1 2006/07/18 18:04:14 brendan Exp $
4
 # $Id$
5
 
5
 
6
 subdir = contrib
6
 subdir = contrib
7
+samplesdir = @samplesdir@
7
+samplesdir = @samplesdir@
8
 
8
 
9
 SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \
9
 SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp6.rc Tin.rc \
10
 	sample.muttrc  sample.mailcap sample.muttrc-tlr \
10
 	sample.muttrc  sample.mailcap sample.muttrc-tlr \
11
@@ -14,12 +15,12 @@
11
@@ -14,12 +15,12 @@
12
 	iconv/make.sh
12
 	iconv/make.sh
13
 
13
 
14
 install-data-local:
14
 install-data-local:
15
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir)/samples $(DESTDIR)$(docdir)/samples/iconv
15
-	$(MKDIR_P) $(DESTDIR)$(docdir)/samples $(DESTDIR)$(docdir)/samples/iconv
16
+	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(samplesdir) $(DESTDIR)$(samplesdir)/iconv
16
+	$(MKDIR_P) $(DESTDIR)$(samplesdir) $(DESTDIR)$(samplesdir)/iconv
17
 	for f in $(SAMPLES) ; do \
17
 	for f in $(SAMPLES) ; do \
18
-		$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir)/samples ;	\
18
-		$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir)/samples ;	\
19
+		$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(samplesdir) ;	\
19
+		$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(samplesdir) ;	\
20
 	done
20
 	done
21
 	for f in $(srcdir)/iconv/*.rc ; do					\
21
 	for f in $(srcdir)/iconv/*.rc ; do					\
22
-		$(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/samples/iconv	  ;	\
22
-		$(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/samples/iconv	  ;	\
23
+		$(INSTALL) -m 644 $$f $(DESTDIR)$(samplesdir)/iconv  ;	\
23
+		$(INSTALL) -m 644 $$f $(DESTDIR)$(samplesdir)/iconv  ;		\
24
 	done
24
 	done
25
 
25
 
26
 uninstall-local:
26
 uninstall-local:
Lines 68-109 Link Here
68
 
68
 
69
 into your system's global Muttrc, which normally resides in /etc or
69
 into your system's global Muttrc, which normally resides in /etc or
70
 /usr/local/etc.
70
 /usr/local/etc.
71
--- doc/manual.txt.orig	2009-06-14 20:54:56.000000000 +0200
71
--- doc/manual.txt.orig	2015-08-30 19:25:51.000000000 +0200
72
+++ doc/manual.txt	2009-06-22 15:11:26.000000000 +0200
72
+++ doc/manual.txt	2015-09-10 08:56:32.000000000 +0200
73
@@ -3225,9 +3225,9 @@
73
@@ -3128,8 +3128,8 @@
74
 shows that arguments can be quoted: the script will receive the expanded string
74
    argument.
75
 between the single quotes as the only argument.
75
 
76
 
76
    A practical example is the mutt_xtitle script installed in the samples
77
-A practical example is the mutt_xtitle script installed in the samples
77
-   subdirectory of the Mutt documentation: it can be used as filter for
78
-subdirectory of the Mutt documentation: it can be used as filter for
78
-   $$ssttaattuuss__ffoorrmmaatt to set the current terminal's title, if supported.
79
-$status_format to set the current terminal's title, if supported.
79
+   share/examples/mutt subdirectory of the Mutt documentation: it can be used as
80
+A practical example is the mutt_xtitle script installed in the
80
+   filter for $$ssttaattuuss__ffoorrmmaatt to set the current terminal's title, if supported.
81
+share/examples/mutt/ subdirectory of the Mutt documentation: it can be used as
82
+filter for $status_format to set the current terminal's title, if supported.
83
 
81
 
84
 29.4. Padding
82
 29.4. Padding
85
 
83
 
86
@@ -7740,8 +7740,8 @@
84
@@ -7736,8 +7736,8 @@
87
 
85
 
88
 For examples on how to configure these formats for the various versions of PGP
86
    For examples on how to configure these formats for the various versions
89
 which are floating around, see the pgp and gpg sample configuration files in
87
    of PGP which are floating around, see the pgp and gpg sample
90
-the samples/ subdirectory which has been installed on your system alongside the
88
-   configuration files in the samples/ subdirectory which has been
91
-documentation. (PGP only)
89
-   installed on your system alongside the documentation. (PGP only)
92
+the share/examples/mutt/ subdirectory which has been installed on your system.
90
+   configuration files in the share/examples/mutt/ subdirectory which has
93
+(PGP only)
91
+   been installed on your system alongside the documentation. (PGP only)
94
 
92
 
95
 3.158. pgp_decrypt_command
93
 3.162. pgp_decrypt_command
96
 
94
 
97
@@ -8751,9 +8751,9 @@
95
@@ -8783,8 +8783,8 @@
98
 |  |$smime_ca_location?.                                                      |
96
       "-CAfile $$ssmmiimmee__ccaa__llooccaattiioonn".
99
 +-----------------------------------------------------------------------------+
97
 
100
 
98
    For examples on how to configure these formats, see the smime.rc in the
101
-For examples on how to configure these formats, see the smime.rc in the samples
99
-   samples/ subdirectory which has been installed on your system alongside
102
-/ subdirectory which has been installed on your system alongside the
100
-   the documentation. (S/MIME only)
103
-documentation. (S/MIME only)
101
+   share/examples/mutt/ subdirectory which has been installed on your system
104
+For examples on how to configure these formats, see the smime.rc in the 
102
+   alongside the documentation. (S/MIME only)
105
+share/examples/mutt/ subdirectory which has been installed on your system.
106
+(S/MIME only)
107
 
103
 
108
 3.244. smime_decrypt_use_default_key
104
 3.252. smime_decrypt_use_default_key
109
 
105
 
(-)./files/patch-gpg_agent_info (-95 lines)
Lines 1-95 Link Here
1
# HG changeset patch
2
# User Kevin McCarthy <kevin@8t8.us>
3
# Date 1422238196 28800
4
# Node ID df55f14f45858193a4cc506065ae2c6989138c2e
5
# Parent  a0a5e505463e9db9b365e244452eab7301c1827c
6
Remove GPG_AGENT_INFO check for GnuPG 2.1 compatibility.  (closes #3715)
7
8
GnuPG version 2.1 stops exporting the GPG_AGENT_INFO environment
9
variable, so mutt can't check for the presence of that to ensure the
10
agent is running.
11
12
For GPGME, we can check for the OpenPGP protocol being present.  For
13
classic pgp, we have to trust the user setting.
14
15
This patch is based on the patches sent by CustaiCo and muffins.  Thank
16
you both for reporting the problem and creating a patch.
17
18
diff -r a0a5e505463e -r df55f14f4585 crypt-gpgme.c
19
--- crypt-gpgme.c	Tue Jan 27 00:52:02 2015 +0100
20
+++ crypt-gpgme.c	Sun Jan 25 18:09:56 2015 -0800
21
@@ -4548,27 +4548,36 @@
22
   }
23
 }
24
 
25
-/* Initialization.  */
26
-static void init_gpgme (void)
27
+static void init_pgp (void)
28
 {
29
-  /* Make sure that gpg-agent is running.  */
30
-  if (! getenv ("GPG_AGENT_INFO"))
31
-    {
32
-      mutt_error (_("\nUsing GPGME backend, although no gpg-agent is running"));
33
-      if (mutt_any_key_to_continue (NULL) == -1)
34
-	mutt_exit(1);
35
-    }
36
+  if (gpgme_engine_check_version (GPGME_PROTOCOL_OpenPGP) != GPG_ERR_NO_ERROR)
37
+  {
38
+    mutt_error (_("GPGME: OpenPGP protocol not available"));
39
+    if (mutt_any_key_to_continue (NULL) == -1)
40
+      mutt_exit(1);
41
+  }
42
+}
43
+
44
+static void init_smime (void)
45
+{
46
+  if (gpgme_engine_check_version (GPGME_PROTOCOL_CMS) != GPG_ERR_NO_ERROR)
47
+  {
48
+    mutt_error (_("GPGME: CMS protocol not available"));
49
+    if (mutt_any_key_to_continue (NULL) == -1)
50
+      mutt_exit(1);
51
+  }
52
 }
53
 
54
 void pgp_gpgme_init (void)
55
 {
56
-  init_common();
57
-  init_gpgme ();
58
+  init_common ();
59
+  init_pgp ();
60
 }
61
 
62
 void smime_gpgme_init (void)
63
 {
64
-  init_common();
65
+  init_common ();
66
+  init_smime ();
67
 }
68
 
69
 static int gpgme_send_menu (HEADER *msg, int *redraw, int is_smime)
70
diff -r a0a5e505463e -r df55f14f4585 init.h
71
--- init.h	Tue Jan 27 00:52:02 2015 +0100
72
+++ init.h	Sun Jan 25 18:09:56 2015 -0800
73
@@ -1970,6 +1970,8 @@
74
   /*
75
   ** .pp
76
   ** If \fIset\fP, mutt will use a possibly-running \fCgpg-agent(1)\fP process.
77
+  ** Note that as of version 2.1, GnuPG no longer exports GPG_AGENT_INFO, so
78
+  ** mutt no longer verifies if the agent is running.
79
   ** (PGP only)
80
   */
81
   { "pgp_verify_command", 	DT_STR, R_NONE, UL &PgpVerifyCommand, 0},
82
diff -r a0a5e505463e -r df55f14f4585 pgp.c
83
--- pgp.c	Tue Jan 27 00:52:02 2015 +0100
84
+++ pgp.c	Sun Jan 25 18:09:56 2015 -0800
85
@@ -108,7 +108,8 @@
86
 {
87
   char *tty;
88
 
89
-  if (!option (OPTUSEGPGAGENT) || !getenv ("GPG_AGENT_INFO"))
90
+  /* GnuPG 2.1 no longer exports GPG_AGENT_INFO */
91
+  if (!option (OPTUSEGPGAGENT))
92
     return 0;
93
 
94
   if ((tty = ttyname(0)))
95
(-)./files/patch-mktemp (-7 / +9 lines)
Lines 1-11 Link Here
1
--- muttlib.c.orig	2010-09-19 09:58:24.000000000 +0200
1
--- muttlib.c.orig	2015-09-10 08:59:45.000000000 +0200
2
+++ muttlib.c	2010-09-19 10:36:26.000000000 +0200
2
+++ muttlib.c	2015-09-10 09:04:24.000000000 +0200
3
@@ -788,14 +788,15 @@
3
@@ -774,16 +774,15 @@
4
 
4
 void _mutt_mktemp (char *s, size_t slen, const char *prefix, const char *suffix,
5
 void _mutt_mktemp (char *s, size_t slen, const char *src, int line)
5
                    const char *src, int line)
6
 {
6
 {
7
-  size_t n = snprintf (s, slen, "%s/mutt-%s-%d-%d-%ld%ld", NONULL (Tempdir), NONULL (Hostname),
7
-  size_t n = snprintf (s, slen, "%s/%s-%s-%d-%d-%ld%ld%s%s",
8
-      (int) getuid (), (int) getpid (), random (), random ());
8
-      NONULL (Tempdir), NONULL (prefix), NONULL (Hostname),
9
-      (int) getuid (), (int) getpid (), random (), random (),
10
-      suffix ? "." : "", NONULL (suffix));
9
+  size_t n = snprintf (s, slen, "%s/mutt-%s-XXXXXXXX", NONULL (Tempdir), NONULL (Hostname));
11
+  size_t n = snprintf (s, slen, "%s/mutt-%s-XXXXXXXX", NONULL (Tempdir), NONULL (Hostname));
10
   if (n >= slen)
12
   if (n >= slen)
11
     dprint (1, (debugfile, "%s:%d: ERROR: insufficient buffer space to hold temporary filename! slen=%zu but need %zu\n",
13
     dprint (1, (debugfile, "%s:%d: ERROR: insufficient buffer space to hold temporary filename! slen=%zu but need %zu\n",
(-)./files/patch-pgpkey.c (-18 lines)
Lines 1-18 Link Here
1
--- pgpkey.c.orig	2014-03-12 17:03:44.000000000 +0100
2
+++ pgpkey.c	2015-04-13 17:50:05.000000000 +0200
3
@@ -985,13 +985,13 @@
4
       pgp_remove_key (&matches, k);
5
 
6
     pgp_free_key (&matches);
7
-    if (!p[l-1])
8
+    if (l && !p[l-1])
9
       p[l-1] = '!';
10
     return k;
11
   }
12
 
13
 out:
14
-  if (!p[l-1])
15
+  if (l && !p[l-1])
16
     p[l-1] = '!';
17
   return NULL;
18
 }
(-)./files/patch-smime-self (-12 / +11 lines)
Lines 22-31 Link Here
22
       {
22
       {
23
 	/* signed ? free it! */
23
 	/* signed ? free it! */
24
 	return (-1);
24
 	return (-1);
25
--- init.h.orig	2009-02-06 13:43:14.000000000 +0100
25
--- init.h.orig	2015-09-10 09:06:48.000000000 +0200
26
+++ init.h	2009-02-06 13:46:53.000000000 +0100
26
+++ init.h	2015-09-10 09:08:24.000000000 +0200
27
@@ -1957,6 +1957,11 @@
27
@@ -2748,6 +2748,11 @@
28
   ** not used.
28
   ** possible \fCprintf(3)\fP-like sequences.
29
   ** (S/MIME only)
29
   ** (S/MIME only)
30
   */
30
   */
31
+  { "smime_encrypt_self",	DT_QUAD,	 R_NONE, OPT_SMIMEENCRYPTSELF, 1 },
31
+  { "smime_encrypt_self",	DT_QUAD,	 R_NONE, OPT_SMIMEENCRYPTSELF, 1 },
Lines 33-39 Link Here
33
+  ** .pp
33
+  ** .pp
34
+  ** Encrypt the message to smime_default_key too.
34
+  ** Encrypt the message to smime_default_key too.
35
+  */
35
+  */
36
   { "smime_encrypt_with",	DT_STR,	 R_NONE, UL &SmimeCryptAlg, 0 },
36
   { "smime_encrypt_with",	DT_STR,	 R_NONE, UL &SmimeCryptAlg, UL "aes256" },
37
   /*
37
   /*
38
   ** .pp
38
   ** .pp
39
diff -u -d -b -B -r3.18 mutt.h
39
diff -u -d -b -B -r3.18 mutt.h
Lines 47-66 Link Here
47
   OPT_MFUPTO,
47
   OPT_MFUPTO,
48
   OPT_MIMEFWD,
48
   OPT_MIMEFWD,
49
   OPT_MIMEFWDREST,
49
   OPT_MIMEFWDREST,
50
--- contrib/smime.rc.orig	Sat Mar  2 13:11:35 2002
50
--- contrib/smime.rc.orig	2015-08-30 19:06:38.000000000 +0200
51
+++ contrib/smime.rc	Sat Oct 25 17:56:28 2003
51
+++ contrib/smime.rc	2015-09-10 09:14:20.000000000 +0200
52
@@ -23,9 +23,12 @@
52
@@ -23,8 +23,12 @@
53
 
53
 
54
 # The (default) keyfile for signing/decrypting.  Uncomment the following
54
 # The (default) keyfile for signing/decrypting.  Uncomment the following
55
 # line and replace the keyid with your own.
55
 # line and replace the keyid with your own.
56
-set smime_default_key="12345678.0"
56
-set smime_default_key="12345678.0"
57
+# set smime_default_key="12345678.0"
57
+# set smime_default_key="12345678.0"
58
 
58
+# Uncomment the following line in addition to the one above, if you want that
59
+# Uncomment the following line in addition to the one above, if you want that
59
+# all encrypted messages are also encrypted with your default key.
60
+# all encrypted messages are also encrypted with your default key.
60
+# set smime_encrypt_self = yes
61
+# set smime_encrypt_self = yes
61
 
62
+  
62
-# Uncommen to make mutt ask what key to use when trying to decrypt a message.
63
 # Uncomment to make mutt ask what key to use when trying to decrypt a message.
63
+# Uncomment to make mutt ask what key to use when trying to decrypt a message.
64
 # It will use the default key above (if that was set) else.
64
 # It will use the default key above (if that was set) else.
65
 # unset smime_decrypt_use_default_key
65
 # unset smime_decrypt_use_default_key
66
 
(-)./files/patch-smime-sender (-9 / +8 lines)
Lines 37-54 Link Here
37
   OPTSDEFAULTDECRYPTKEY,
37
   OPTSDEFAULTDECRYPTKEY,
38
 #endif
38
 #endif
39
 #ifdef HAVE_PGP
39
 #ifdef HAVE_PGP
40
--- contrib/smime.rc.orig	Sat Oct 25 17:57:35 2003
40
--- contrib/smime.rc.orig	2015-09-10 09:16:17.000000000 +0200
41
+++ contrib/smime.rc	Sat Oct 25 17:57:35 2003
41
+++ contrib/smime.rc	2015-09-10 09:18:18.000000000 +0200
42
@@ -6,8 +6,11 @@
42
@@ -8,7 +8,10 @@
43
 # will be the default method unless the following option is set
44
 set smime_is_default
45
 
43
 
46
-# Uncoment this if you don't want to set labels for certificates you add.
44
 # Uncomment this if you don't want to set labels for certificates you add.
47
+# Uncomment this if you don't want to set labels for certificates you add.
48
 # unset smime_ask_cert_label
45
 # unset smime_ask_cert_label
49
+
46
-
47
+ 
50
+# Uncomment this if you don't want to check for sender's email address
48
+# Uncomment this if you don't want to check for sender's email address
51
+# set smime_dont_check_sender = yes
49
+# set smime_dont_check_sender = yes
52
 
50
+  
53
 # Passphrase expiration
51
 # Passphrase expiration
54
 set smime_timeout=300
52
 set smime_timeout=300
53
 
(-)./files/patch-staging-Makefile.am (-10 / +14 lines)
Lines 1-14 Link Here
1
--- Makefile.am.orig	2013-12-20 12:47:32.000000000 +0100
1
--- Makefile.am.orig	2015-09-10 09:19:15.000000000 +0200
2
+++ Makefile.am	2013-12-20 12:52:38.000000000 +0100
2
+++ Makefile.am	2015-09-10 09:21:00.000000000 +0200
3
@@ -156,11 +156,6 @@
3
@@ -150,15 +150,6 @@
4
 		rm -f $(DESTDIR)$(bindir)/mutt.dotlock ;		\
4
 	$(srcdir)/patchlist.sh < $(srcdir)/PATCHES > patchlist.c
5
 		ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
5
 
6
 	fi
6
 install-exec-hook:
7
-	if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x@DOTLOCK_GROUP@ != x ; then \
7
-	if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/mutt_dotlock ; then	\
8
-		chgrp @DOTLOCK_GROUP@ $(DESTDIR)$(bindir)/mutt_dotlock && \
8
-		rm -f $(DESTDIR)$(bindir)/mutt.dotlock ;		\
9
-		chmod @DOTLOCK_PERMISSION@ $(DESTDIR)$(bindir)/mutt_dotlock || \
9
-		ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
10
-	fi
11
-	if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x$(DOTLOCK_GROUP) != x ; then \
12
-		chgrp $(DOTLOCK_GROUP) $(DESTDIR)$(bindir)/mutt_dotlock && \
13
-		chmod $(DOTLOCK_PERMISSION) $(DESTDIR)$(bindir)/mutt_dotlock || \
10
-		{ echo "Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
14
-		{ echo "Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
11
-	fi
15
-	fi
12
 
16
 
13
 install-data-local:
17
 install-data-local:
14
 	$(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
18
 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)

Return to bug 203056