Ravenports generated: 22 Apr 2020 16:05
[ravenports.git] / bucket_8F / mutt
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               mutt
4 VERSION=                1.13.5
5 REVISION=               2
6 KEYWORDS=               mail
7 VARIANTS=               standard
8 SDESC[standard]=        Powerful mail client
9 HOMEPAGE=               http://www.mutt.org/
10 CONTACT=                Leonid_Bobrov[goleo@disroot.org]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            ftp://ftp.mutt.org/pub/mutt/
14 DISTFILE[1]=            mutt-1.13.5.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[standard]=        complete
17                         primary
18                         docs
19                         nls
20
21 OPTIONS_AVAILABLE=      none
22 OPTIONS_STANDARD=       none
23
24 BUILD_DEPENDS=          docbook-xsl:primary:standard
25                         lynx:primary:standard
26 BUILDRUN_DEPENDS=       cyrus-sasl:primary:standard
27                         gettext:runtime:standard
28                         libidn2:primary:standard
29 RUN_DEPENDS=            mime-support:single:standard
30
31 USES=                   cpe ncurses perl shebangfix ssl zlib iconv:translit
32
33 LICENSE=                GPLv2+:primary
34 LICENSE_TERMS=          primary:{{WRKSRC}}/COPYRIGHT
35 LICENSE_FILE=           GPLv2+:stock
36 LICENSE_SCHEME=         solo
37
38 FPC_EQUIVALENT=         mail/mutt
39 SHEBANG_FILES=          contrib/smime_keys_test.pl
40                         doc/gen-map-doc
41                         smime_keys.pl
42
43 MUST_CONFIGURE=         gnu
44 CONFIGURE_ARGS=         --disable-debug
45                         --disable-flock
46                         --enable-compressed
47                         --enable-external_dotlock
48                         --enable-fcntl
49                         --disable-gpgme
50                         --enable-hcache
51                         --enable-imap
52                         --enable-nls
53                         --enable-pop
54                         --enable-sidebar
55                         --enable-smtp
56                         --mandir={{MANPREFIX}}/man
57                         --prefix={{PREFIX}}
58                         --sysconfdir={{PREFIX}}/etc
59                         --with-docdir={{PREFIX}}/share/doc/mutt
60                         --with-curses
61                         --with-gdbm
62                         --with-idn2
63                         --with-sasl={{LOCALBASE}}
64                         --with-ssl
65                         --with-libiconv-prefix={{LOCALBASE}}
66                         --without-kyotocabinet
67                         --without-tokyocabinet
68                         --without-qdbm
69
70 CFLAGS=                 -I{{NCURSESINC}}
71
72 post-install:
73         ${RM} ${STAGEDIR}${PREFIX}/etc/mime.types
74
75 [FILE:414:descriptions/desc.primary]
76 Mutt is a small but very powerful text-based mail client for Unix-like
77 operating systems. Features include support for multiple mailbox formats
78 (including IMAP, POP3, mbox, MMDF, MH, Maildir), MIME/RFC2047, message
79 threading, encryption and signing with PGP/GPG and S/MIME, and many
80 operations can use regular expressions. It's highly customizable with
81 many options for colours, key bindings, display formats etc.
82
83
84 [FILE:97:distinfo]
85 6cd71b5b3e6b255afef6bed3b5e1e8ee9819b3d7c9839fd95e798045882aa653      4902500 mutt-1.13.5.tar.gz
86
87
88 [FILE:288:manifests/plist.primary]
89 @sample etc/Muttrc.sample
90 bin/
91  flea
92  mutt
93 @(,mail,2755) bin/mutt_dotlock
94  mutt_pgpring
95  muttbug
96  pgpewrap
97  smime_keys
98 share/info/mutt.info
99 share/man/man1/
100  mutt.1.gz
101  mutt_dotlock.1.gz
102  mutt_pgpring.1.gz
103  pgpewrap.1.gz
104  smime_keys.1.gz
105 share/man/man5/
106  mbox.5.gz
107  mmdf.5.gz
108  muttrc.5.gz
109
110
111 [FILE:1089:manifests/plist.nls]
112 share/locale/bg/LC_MESSAGES/mutt.mo
113 share/locale/ca/LC_MESSAGES/mutt.mo
114 share/locale/cs/LC_MESSAGES/mutt.mo
115 share/locale/da/LC_MESSAGES/mutt.mo
116 share/locale/de/LC_MESSAGES/mutt.mo
117 share/locale/el/LC_MESSAGES/mutt.mo
118 share/locale/eo/LC_MESSAGES/mutt.mo
119 share/locale/es/LC_MESSAGES/mutt.mo
120 share/locale/et/LC_MESSAGES/mutt.mo
121 share/locale/eu/LC_MESSAGES/mutt.mo
122 share/locale/fi/LC_MESSAGES/mutt.mo
123 share/locale/fr/LC_MESSAGES/mutt.mo
124 share/locale/ga/LC_MESSAGES/mutt.mo
125 share/locale/gl/LC_MESSAGES/mutt.mo
126 share/locale/hu/LC_MESSAGES/mutt.mo
127 share/locale/id/LC_MESSAGES/mutt.mo
128 share/locale/it/LC_MESSAGES/mutt.mo
129 share/locale/ja/LC_MESSAGES/mutt.mo
130 share/locale/ko/LC_MESSAGES/mutt.mo
131 share/locale/lt/LC_MESSAGES/mutt.mo
132 share/locale/nl/LC_MESSAGES/mutt.mo
133 share/locale/pl/LC_MESSAGES/mutt.mo
134 share/locale/pt_BR/LC_MESSAGES/mutt.mo
135 share/locale/ru/LC_MESSAGES/mutt.mo
136 share/locale/sk/LC_MESSAGES/mutt.mo
137 share/locale/sv/LC_MESSAGES/mutt.mo
138 share/locale/tr/LC_MESSAGES/mutt.mo
139 share/locale/uk/LC_MESSAGES/mutt.mo
140 share/locale/zh_CN/LC_MESSAGES/mutt.mo
141 share/locale/zh_TW/LC_MESSAGES/mutt.mo
142
143
144 [FILE:1465:patches/patch-Makefile.in]
145 --- Makefile.in.orig    2020-03-28 18:22:01 UTC
146 +++ Makefile.in
147 @@ -540,7 +540,7 @@ AUTOMAKE_OPTIONS = 1.6 foreign
148  @BUILD_IMAP_TRUE@IMAP_INCLUDES = -I$(top_srcdir)/imap
149  @BUILD_AUTOCRYPT_TRUE@AUTOCRYPT_SUBDIR = autocrypt
150  @BUILD_AUTOCRYPT_TRUE@AUTOCRYPT_INCLUDES = -I$(top_srcdir)/autocrypt
151 -SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) $(AUTOCRYPT_SUBDIR)
152 +SUBDIRS = m4 po intl contrib $(IMAP_SUBDIR) $(AUTOCRYPT_SUBDIR) . doc
153  bin_SCRIPTS = muttbug flea $(SMIMEAUX_TARGET)
154  @BUILD_HCACHE_TRUE@HCVERSION = hcversion.h
155  BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h conststrings.c version.h $(HCVERSION)
156 @@ -1690,18 +1690,9 @@ install-exec-hook:
157                 rm -f $(DESTDIR)$(bindir)/mutt.dotlock ;                \
158                 ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
159         fi
160 -       if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x$(DOTLOCK_GROUP) != x ; then \
161 -               chgrp $(DOTLOCK_GROUP) $(DESTDIR)$(bindir)/mutt_dotlock && \
162 -               chmod $(DOTLOCK_PERMISSION) $(DESTDIR)$(bindir)/mutt_dotlock || \
163 -               { echo "Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
164 -       fi
165  
166  install-data-local:
167         $(MKDIR_P) $(DESTDIR)$(sysconfdir)
168 -       $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/mime.types.dist
169 -       -if [ ! -f $(DESTDIR)$(sysconfdir)/mime.types ]; then \
170 -               $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir); \
171 -       fi
172  
173  uninstall-local:
174         for i in mime.types ; do \
175
176
177 [FILE:2628:patches/patch-browser.c]
178 --- browser.c.orig      2020-03-28 18:17:53 UTC
179 +++ browser.c
180 @@ -32,6 +32,7 @@
181  #ifdef USE_IMAP
182  #include "imap.h"
183  #endif
184 +#include "mx.h"
185  
186  #include <stdlib.h>
187  #include <dirent.h>
188 @@ -86,6 +87,12 @@ static int browser_compare_subject (cons
189    struct folder_file *pa = (struct folder_file *) a;
190    struct folder_file *pb = (struct folder_file *) b;
191  
192 +  /* Always keep '..' in first menu position */
193 +  if (!strncmp(pa->display_name, "..", 2))
194 +         return(-1);
195 +  if (!strncmp(pb->display_name, "..", 2))
196 +         return(1);
197 +
198    int r = mutt_strcoll (pa->display_name, pb->display_name);
199  
200    return ((BrowserSort & SORT_REVERSE) ? -r : r);
201 @@ -96,6 +103,12 @@ static int browser_compare_date (const v
202    struct folder_file *pa = (struct folder_file *) a;
203    struct folder_file *pb = (struct folder_file *) b;
204  
205 +  /* Always keep '..' in first menu position */
206 +  if (!strncmp(pa->display_name, "..", 2))
207 +         return(-1);
208 +  if (!strncmp(pb->display_name, "..", 2))
209 +         return(1);
210 +
211    int r = pa->mtime - pb->mtime;
212  
213    return ((BrowserSort & SORT_REVERSE) ? -r : r);
214 @@ -106,6 +119,12 @@ static int browser_compare_size (const v
215    struct folder_file *pa = (struct folder_file *) a;
216    struct folder_file *pb = (struct folder_file *) b;
217  
218 +  /* Always keep '..' in first menu position */
219 +  if (!strncmp(pa->display_name, "..", 2))
220 +         return(-1);
221 +  if (!strncmp(pb->display_name, "..", 2))
222 +         return(1);
223 +
224    int r = pa->size - pb->size;
225  
226    return ((BrowserSort & SORT_REVERSE) ? -r : r);
227 @@ -430,6 +449,21 @@ static void init_state (struct browser_s
228      menu->data = state->entry;
229  }
230  
231 +static void check_maildir_times (BUFFY *buf, struct stat *st)
232 +{
233 +  char buffer[_POSIX_PATH_MAX + SHORT_STRING];
234 +  struct stat s;
235 +
236 +  if(!buf || buf->magic != MUTT_MAILDIR)
237 +    return;
238 +
239 +  snprintf (buffer, sizeof (buffer), "%s/tmp", mutt_b2s(buf->pathbuf));
240 +  if (lstat (buffer, &s) != 0)
241 +    return;
242 +
243 +  st->st_mtime = s.st_mtime;
244 +}
245 +
246  static int examine_directory (MUTTMENU *menu, struct browser_state *state,
247                               const char *d, const char *prefix)
248  {
249 @@ -496,6 +530,7 @@ static int examine_directory (MUTTMENU *
250      tmp = Incoming;
251      while (tmp && mutt_strcmp (mutt_b2s (full_path), mutt_b2s (tmp->pathbuf)))
252        tmp = tmp->next;
253 +    check_maildir_times (tmp, &s);
254      if (tmp && Context &&
255          !mutt_strcmp (tmp->realpath, Context->realpath))
256      {
257 @@ -574,6 +609,7 @@ static int examine_mailboxes (MUTTMENU *
258         s.st_mtime = st2.st_mtime;
259      }
260  
261 +    check_maildir_times (tmp, &s);
262      add_folder (menu, state, mutt_b2s (mailbox), mutt_b2s (tmp->pathbuf), &s, tmp);
263    }
264    while ((tmp = tmp->next));
265
266
267 [FILE:422:patches/patch-commands.c]
268 --- commands.c.orig     2020-02-21 20:17:47 UTC
269 +++ commands.c
270 @@ -285,7 +285,7 @@ int mutt_display_message (HEADER *cur)
271      {
272        if (cur->security & GOODSIGN)
273        {
274 -       if (!crypt_smime_verify_sender(cur))
275 +       if (option(OPTSMIMENOSENDER) || !crypt_smime_verify_sender(cur))
276           mutt_message ( _("S/MIME signature successfully verified."));
277         else
278           mutt_error ( _("S/MIME certificate owner does not match sender."));
279
280
281 [FILE:521:patches/patch-contrib_Makefile.in]
282 --- contrib/Makefile.in.orig    2020-03-28 18:22:01 UTC
283 +++ contrib/Makefile.in
284 @@ -280,7 +280,7 @@ top_build_prefix = @top_build_prefix@
285  top_builddir = @top_builddir@
286  top_srcdir = @top_srcdir@
287  subdir = contrib
288 -SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \
289 +SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp6.rc Tin.rc \
290         sample.mailcap sample.muttrc sample.muttrc-sidebar sample.muttrc-tlr \
291         sample.muttrc-compress sample.muttrc-starter \
292         sample.vimrc-sidebar colors.default colors.linux smime.rc \
293
294
295 [FILE:1239:patches/patch-doc_Makefile.in]
296 --- doc/Makefile.in.orig        2020-03-28 18:22:01 UTC
297 +++ doc/Makefile.in
298 @@ -691,14 +691,7 @@ install-data-local: makedoc-all instdoc
299             $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir) ; \
300           fi \
301         done
302 -       $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.dist
303 -       -if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \
304 -               mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \
305 -       elif [ -f $(DESTDIR)$(pkgdatadir)/../Muttrc ] ; then \
306 -               mv $(DESTDIR)$(pkgdatadir)/../Muttrc* $(DESTDIR)$(sysconfdir) ; \
307 -       elif [ ! -f $(DESTDIR)$(sysconfdir)/Muttrc ] ; then \
308 -               $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir) ; \
309 -       fi
310 +       $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.sample
311         -if [ -f mutt.info ] ; then \
312           $(MKDIR_P) $(DESTDIR)$(infodir) ; \
313           $(INSTALL) -m 644 mutt.info $(DESTDIR)$(infodir) ; \
314 @@ -734,9 +727,7 @@ uninstall-local:
315  
316  check:
317  manual.txt: manual.html
318 -       -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ || \
319 -       LC_ALL=C w3m -dump manual.html > $@ || \
320 -       LC_ALL=C elinks -dump -no-numbering -no-references manual.html | sed -e 's,\\001, ,g' > $@
321 +       -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@
322  
323  Muttrc: stamp-doc-rc
324  
325
326
327 [FILE:4313:patches/patch-hdrline.c]
328 --- hdrline.c.orig      2020-03-28 18:17:53 UTC
329 +++ hdrline.c
330 @@ -248,6 +248,89 @@ static char *apply_subject_mods (ENVELOP
331   * %Y = `x-label:' field (if present, tree unfolded, and != parent's x-label)
332   * %Z = status flags   */
333  
334 +static void
335 +format_smartdate( char *buf, size_t max, struct tm *tm, smartdate_type type )
336 +{
337 +    char *strftime_fmt = NULL;
338 +
339 +    switch( type ) {
340 +        case FUTURE:        /* Date in the future */
341 +            strftime_fmt = "%d%h%y!";
342 +            break;
343 +        case SMARTTIME:     /* Today */
344 +            strftime_fmt = "%I:%M %p";
345 +            break;
346 +        case YESTERDAY:     /* Yesterday */
347 +            strncpy( buf, "Yesterday", max );
348 +            break;
349 +        case WEEKDAY:       /* Within the last 7 days */
350 +            strftime_fmt = "%A";
351 +            break;
352 +        case STANDARD:      /* Within the last six months */
353 +            strftime_fmt = "%h %d";
354 +            break;
355 +        case ANCIENT:       /* Older than 6 months */
356 +            strftime_fmt = "%h %Y";
357 +            break;
358 +    }
359 +
360 +    if( strftime_fmt != NULL ) {
361 +        strftime( buf, max, strftime_fmt, tm );
362 +    }
363 +}
364 +
365 +static void
366 +smartdate( char *buf, size_t max, struct tm *tm )
367 +{
368 +    smartdate_type type = 0;
369 +
370 +    struct tm now;
371 +
372 +    time_t sse = mktime( tm );   /* Seconds since epoch */
373 +    time_t sse_now = time(NULL); /* Seconds since epoch until now */
374 +
375 +    int dse = 0;            /* Days since epoch */
376 +    int dse_now = 0;        /* Days since epoch until today */
377 +
378 +    /* Calculate the number of days since epoch */
379 +    dse = sse / (60*60*24);
380 +    dse_now = sse_now / (60*60*24);
381 +
382 +    /* Default display type */
383 +    type = STANDARD;
384 +
385 +    /* Check if the date is in the future */
386 +    if( dse > dse_now ) {
387 +        type = FUTURE;
388 +    }
389 +    else {
390 +        int diff = dse_now - dse;
391 +        if( diff == 0 ) type = SMARTTIME;
392 +        else if( diff == 1 ) type = YESTERDAY;
393 +        else if( diff < 7 ) type = WEEKDAY;
394 +        else if( diff > 215 ) type = ANCIENT;  /* Surely older than six
395 +                                                  months */
396 +        else if( diff > 180 ) {
397 +            /*
398 +             * Slightly heavy calculation to check if the date is more
399 +             * than six months in the past.  This calculation uses
400 +             * calendar months and not the exact number of days.  So,
401 +             * January 31, 2003 would be considered more than six months
402 +             * old whether today's date is August 1 or August 31, 2003
403 +             */
404 +            int monthdiff;
405 +            localtime_r( &sse_now, &now );
406 +            monthdiff = ( now.tm_mon - tm->tm_mon )
407 +                + ( ( now.tm_year - tm->tm_year ) * 12 );
408 +            if( monthdiff > 6 ) {
409 +                type = ANCIENT;
410 +            }
411 +        }
412 +    }
413 +
414 +    format_smartdate( buf, max, tm, type );
415 +}
416 +
417  static const char *
418  hdr_format_str (char *dest,
419                 size_t destlen,
420 @@ -344,6 +427,53 @@ hdr_format_str (char *dest,
421        const char *cp;
422        struct tm *tm;
423        time_t T;
424 +       int i = 0, invert = 0;
425 +
426 +       if (optional && (op == '[' || op == '(')) {
427 +         char *is;
428 +         T = time(NULL);
429 +         T -= (op == '(') ? hdr->received : hdr->date_sent;
430 +
431 +         is = (char *)prefix;
432 +         if( *is == '>' ) {
433 +           invert = 1;
434 +           ++is;
435 +         }
436 +
437 +         while( *is && *is != '?' ) {
438 +           int t = strtol (is, &is, 10);
439 +           switch (*(is++)) {
440 +             case '?':
441 +               break;
442 +             case 'y':
443 +               t *= 365 * 24 * 60 * 60;
444 +               break;
445 +             case 'M':
446 +               t *= 30 * 24 * 60 * 60;
447 +               break;
448 +             case 'w':
449 +               t *= 7 * 24 * 60 * 60;
450 +               break;
451 +             case 'd':
452 +               t *= 24 * 60 * 60;
453 +               break;
454 +             case 'h':
455 +               t *= 60 * 60;
456 +               break;
457 +             case 'm':
458 +               t *= 60;
459 +               break;
460 +           }
461 +           i += t;
462 +         }
463 +
464 +         if (i < 0)
465 +           i *= -1;
466 +
467 +         if( (T > i || T < -1*i) ^ invert )
468 +           optional = 0;
469 +         break;
470 +       }
471  
472        p = dest;
473  
474 @@ -421,7 +551,13 @@ hdr_format_str (char *dest,
475  
476        if (!do_locales)
477          setlocale (LC_TIME, "C");
478 -      strftime (buf2, sizeof (buf2), dest, tm);
479 +               /* Identify the non-strftime smartdate pattern (%@) */
480 +               if( strncmp( dest, "%@", 2 ) == 0 ) {
481 +                       smartdate( buf2, sizeof( buf2 ), tm );
482 +               }
483 +               else {
484 +                       strftime (buf2, sizeof (buf2), dest, tm);
485 +               }
486        if (!do_locales)
487          setlocale (LC_TIME, "");
488  
489
490
491 [FILE:1313:patches/patch-init.c]
492 --- init.c.orig 2020-03-28 18:17:53 UTC
493 +++ init.c
494 @@ -651,6 +651,52 @@ static mbchar_table *parse_mbchar_table
495    return t;
496  }
497  
498 +static int parse_ifdef (BUFFER *tmp, BUFFER *s, union pointer_long_t data, BUFFER *err)
499 +{
500 +  int i, j, res = 0;
501 +  BUFFER token;
502 +
503 +  memset (&token, 0, sizeof (token));
504 +  mutt_extract_token (tmp, s, 0);
505 +
506 +  /* is the item defined as a variable or a function? */
507 +  if (!(res = (mutt_option_index (tmp->data) != -1)))
508 +    for (i = 0; !res && i < MENU_MAX; i++)
509 +    {
510 +      struct binding_t *b = km_get_table (Menus[i].value);
511 +
512 +      if (!b)
513 +       continue;
514 +
515 +      for (j = 0; b[j].name; j++)
516 +       if (!ascii_strncasecmp (tmp->data, b[j].name, mutt_strlen (tmp->data))
517 +             && (mutt_strlen (b[j].name) == mutt_strlen (tmp->data)))
518 +       {
519 +         res = 1;
520 +         break;
521 +       }
522 +    }
523 +
524 +  if (!MoreArgs (s))
525 +  {
526 +    snprintf (err->data, err->dsize, _("ifdef: too few arguments"));
527 +    return (-1);
528 +  }
529 +  mutt_extract_token (tmp, s, MUTT_TOKEN_SPACE);
530 +
531 +  if (res)
532 +  {
533 +    if (mutt_parse_rc_line (tmp->data, &token, err) == -1)
534 +    {
535 +      mutt_error ("Erreur: %s", err->data);
536 +      FREE (&token.data);
537 +      return (-1);
538 +    }
539 +    FREE (&token.data);
540 +  }
541 +  return 0;
542 +}
543 +
544  static int parse_unignore (BUFFER *buf, BUFFER *s, union pointer_long_t udata, BUFFER *err)
545  {
546    do
547
548
549 [FILE:2779:patches/patch-init.h]
550 --- init.h.orig 2020-03-28 18:17:53 UTC
551 +++ init.h
552 @@ -1079,6 +1079,11 @@ struct option_t MuttVars[] = {
553    ** sent to both the list and your address, resulting in two copies
554    ** of the same email for you.
555    */
556 +  { "force_base64",   DT_BOOL, R_NONE, {.l=OPTFORCEBASE64}, {.l=0} },
557 +  /*
558 +  ** .pp
559 +  ** If you need to encode all text parts to base64, set this option.
560 +  */
561    { "force_name",      DT_BOOL, R_NONE, {.l=OPTFORCENAME}, {.l=0} },
562    /*
563    ** .pp
564 @@ -3021,6 +3026,13 @@ struct option_t MuttVars[] = {
565    ** In either case, a missing real name will be filled in afterwards
566    ** using the value of $$realname.
567    */
568 +  { "reverse_reply",   DT_BOOL, R_NONE, {.l=OPTREVREPLY}, {.l=0} },
569 +  /*
570 +  ** .pp
571 +  ** When set, this variable uses the name from your aliases in the To and Cc
572 +  ** headers of reply mails you send, like $reverse_alias does in the index.
573 +  ** When unset, the headers taken from the original mail are left unchanged.
574 +  */
575    { "rfc2047_parameters", DT_BOOL, R_NONE, {.l=OPTRFC2047PARAMS}, {.l=0} },
576    /*
577    ** .pp
578 @@ -3511,6 +3523,15 @@ struct option_t MuttVars[] = {
579    ** to determine the key to use. It will ask you to supply a key, if it can't find one.
580    ** (S/MIME only)
581    */
582 +  { "smime_dont_check_sender", DT_BOOL, R_NONE, {.l=OPTSMIMENOSENDER}, {.l=0} },
583 +  /*
584 +  ** .pp
585 +  ** This flag controls wether you want the skip the check for the sender's
586 +  ** email address against the email address stored in the certificate. 
587 +  ** This can be useful if most of your email senders use SMIMEv3 which no
588 +  ** longer needs email-addresses as part of the certificates.
589 +  ** It is not set by default.
590 +  */
591    { "smime_self_encrypt_as",   DT_SYN,  R_NONE, {.p="smime_default_key"}, {.p=0} },
592    { "smime_default_key",               DT_STR,  R_NONE, {.p=&SmimeDefaultKey}, {.p=0} },
593    /*
594 @@ -4503,6 +4524,7 @@ static int parse_lists (BUFFER *, BUFFER
595  static int parse_unlists (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
596  static int parse_alias (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
597  static int parse_unalias (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
598 +static int parse_ifdef (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
599  static int parse_echo (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
600  static int parse_ignore (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
601  static int parse_unignore (BUFFER *, BUFFER *, union pointer_long_t, BUFFER *);
602 @@ -4567,6 +4589,7 @@ const struct command_t Commands[] = {
603    { "hdr_order",       parse_list,             {.p=&HeaderOrderList} },
604  #ifdef HAVE_ICONV
605    { "iconv-hook",      mutt_parse_hook,        {.l=MUTT_ICONVHOOK} },
606 +  { "ifdef",           parse_ifdef,            {.l=0} },
607  #endif
608    { "ignore",          parse_ignore,           {.l=0} },
609    { "index-format-hook",mutt_parse_idxfmt_hook, {.l=MUTT_IDXFMTHOOK} },
610
611
612 [FILE:1070:patches/patch-mutt.h]
613 --- mutt.h.orig 2020-03-28 18:17:53 UTC
614 +++ mutt.h
615 @@ -165,6 +165,16 @@ typedef enum
616    MUTT_WRITE_HEADER_MIME
617  } mutt_write_header_mode;
618  
619 +/* flags for SmartDate */
620 +typedef enum {
621 +    FUTURE      = 1,
622 +    SMARTTIME   = 2,
623 +    YESTERDAY   = 3,
624 +    WEEKDAY     = 4,
625 +    STANDARD    = 5,
626 +    ANCIENT     = 6
627 +} smartdate_type;
628 +
629  /* types for mutt_add_hook() */
630  #define MUTT_FOLDERHOOK  1
631  #define MUTT_MBOXHOOK    (1<<1)
632 @@ -232,6 +242,7 @@ enum
633    MUTT_EXPIRED,
634    MUTT_SUPERSEDED,
635    MUTT_TRASH,
636 +  MUTT_THREADCOMPLETE,
637  
638    /* actions for mutt_pattern_comp/mutt_pattern_exec */
639    MUTT_AND,
640 @@ -411,6 +422,7 @@ enum
641    OPTFCCCLEAR,
642    OPTFLAGSAFE,
643    OPTFOLLOWUPTO,
644 +  OPTFORCEBASE64,
645    OPTFORCENAME,
646    OPTFORWDECODE,
647    OPTFORWQUOTE,
648 @@ -504,6 +516,7 @@ enum
649    OPTREVALIAS,
650    OPTREVNAME,
651    OPTREVREAL,
652 +  OPTREVREPLY,
653    OPTRFC2047PARAMS,
654    OPTSAVEADDRESS,
655    OPTSAVEEMPTY,
656 @@ -575,6 +588,7 @@ enum
657    OPTSMIMEISDEFAULT,
658    OPTSMIMESELFENCRYPT,
659    OPTASKCERTLABEL,
660 +  OPTSMIMENOSENDER,
661    OPTSDEFAULTDECRYPTKEY,
662    OPTPGPIGNORESUB,
663    OPTPGPCHECKEXIT,
664
665
666 [FILE:2656:patches/patch-muttlib.c]
667 --- muttlib.c.orig      2020-03-28 18:17:53 UTC
668 +++ muttlib.c
669 @@ -877,16 +877,15 @@ void _mutt_buffer_mktemp (BUFFER *buf, c
670  void _mutt_mktemp (char *s, size_t slen, const char *prefix, const char *suffix,
671                     const char *src, int line)
672  {
673 -  size_t n = snprintf (s, slen, "%s/%s-%s-%d-%d-%ld%ld%s%s",
674 -                       NONULL (Tempdir), NONULL (prefix), NONULL (Hostname),
675 -                       (int) getuid (), (int) getpid (), random (), random (),
676 -                       suffix ? "." : "", NONULL (suffix));
677 +  size_t n = snprintf (s, slen, "%s/mutt-%s-XXXXXXXX", NONULL (Tempdir), NONULL (Hostname));
678    if (n >= slen)
679      dprint (1, (debugfile, "%s:%d: ERROR: insufficient buffer space to hold temporary filename! slen=%zu but need %zu\n",
680                  src, line, slen, n));
681 -  dprint (3, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s));
682 -  if (unlink (s) && errno != ENOENT)
683 -    dprint (1, (debugfile, "%s:%d: ERROR: unlink(\"%s\"): %s (errno %d)\n", src, line, s, strerror (errno), errno));
684 +  if (mktemp (s)) { 
685 +    dprint (3, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s));
686 +  } else {
687 +    dprint (1, (debugfile, "%s:%d: ERROR: mktemp(\"%s\"): %s (errno %d)\n", src, line, s, strerror (errno), errno));
688 +  }
689  }
690  
691  /* these characters must be escaped in regular expressions */
692 @@ -1563,7 +1562,16 @@ void mutt_FormatString (char *dest,              /*
693        if (*src == '?')
694        {
695         flags |= MUTT_FORMAT_OPTIONAL;
696 -       src++;
697 +       ch = *(++src); /* save the character to switch on */
698 +       cp = prefix;
699 +       ++src;
700 +       count = 0;
701 +       while (count < sizeof (prefix) && *src != '?')
702 +       {
703 +         *cp++ = *src++;
704 +         count++;
705 +       }
706 +       *cp = 0;
707        }
708        else
709        {
710 @@ -1579,12 +1587,12 @@ void mutt_FormatString (char *dest,             /*
711           count++;
712         }
713         *cp = 0;
714 -      }
715  
716 -      if (!*src)
717 -       break; /* bad format */
718 +       if (!*src)
719 +         break; /* bad format */
720  
721 -      ch = *src++; /* save the character to switch on */
722 +       ch = *src++; /* save the character to switch on */
723 +      }
724  
725        if (flags & MUTT_FORMAT_OPTIONAL)
726        {
727 @@ -1597,6 +1605,12 @@ void mutt_FormatString (char *dest,              /*
728         count = 0;
729          while (count < sizeof (ifstring) && *src && *src != '?' && *src != '&')
730         {
731 +         if (*src == '\\')
732 +         {
733 +           src++;
734 +           if (!*src)
735 +             break;
736 +         }
737            *cp++ = *src++;
738           count++;
739         }
740 @@ -1609,7 +1623,13 @@ void mutt_FormatString (char *dest,              /*
741         count = 0;
742         while (count < sizeof (elsestring) && *src && *src != '?')
743         {
744 -         *cp++ = *src++;
745 +         if (*src == '\\')
746 +         {
747 +           src++;
748 +           if (!*src)
749 +             break;
750 +         }
751 +          *cp++ = *src++;
752           count++;
753         }
754         *cp = 0;
755
756
757 [FILE:910:patches/patch-pattern.c]
758 --- pattern.c.orig      2020-03-28 18:17:53 UTC
759 +++ pattern.c
760 @@ -57,6 +57,7 @@ static const struct pattern_flags
761  }
762  Flags[] =
763  {
764 +  { 'a', MUTT_THREADCOMPLETE,  0,              NULL },
765    { 'A', MUTT_ALL,                     0,              NULL },
766    { 'b', MUTT_BODY,            MUTT_FULL_MSG,  eat_regexp },
767    { 'B', MUTT_WHOLE_MSG,               MUTT_FULL_MSG,  eat_regexp },
768 @@ -1342,6 +1343,16 @@ mutt_pattern_exec (struct pattern_t *pat
769        else
770          result = mutt_is_list_cc (pat->alladdr, h->env->to, h->env->cc);
771        return (pat->not ^ result);
772 +    case MUTT_THREADCOMPLETE:
773 +      { static pattern_t tmp;
774 +        static short pattern_set = 0;
775 +        if(! pattern_set) {
776 +          memset (&tmp, 0, sizeof (tmp));
777 +          tmp.op = MUTT_TAG;
778 +          pattern_set = 1;
779 +        }
780 +        return (pat->not ^ (h->env && match_threadcomplete(&tmp, flags, ctx, h->thread, 1, 1, 1, 1)));
781 +      } 
782      case MUTT_SUBSCRIBED_LIST:
783        if (cache)
784        {
785
786
787 [FILE:402:patches/patch-protos.h]
788 --- protos.h.orig       2020-03-28 18:17:53 UTC
789 +++ protos.h
790 @@ -87,6 +87,7 @@ ADDRESS *mutt_get_address (ENVELOPE *, c
791  ADDRESS *mutt_lookup_alias (const char *s);
792  ADDRESS *mutt_remove_duplicates (ADDRESS *);
793  ADDRESS *mutt_remove_xrefs (ADDRESS *, ADDRESS *);
794 +ADDRESS *mutt_reverse_address (ADDRESS *);
795  ADDRESS *mutt_expand_aliases (ADDRESS *);
796  ADDRESS *mutt_parse_adrlist (ADDRESS *, const char *);
797  
798
799
800 [FILE:474:patches/patch-send.c]
801 --- send.c.orig 2020-03-28 18:17:53 UTC
802 +++ send.c
803 @@ -723,6 +723,10 @@ void mutt_fix_reply_recipients (ENVELOPE
804    /* the CC field can get cluttered, especially with lists */
805    env->to = mutt_remove_duplicates (env->to);
806    env->cc = mutt_remove_duplicates (env->cc);
807 +  if (option (OPTREVREPLY)){
808 +       env->to = mutt_reverse_address (env->to);
809 +       env->cc = mutt_reverse_address (env->cc);
810 +  }
811    env->cc = mutt_remove_xrefs (env->to, env->cc);
812  
813    if (env->cc && !env->to)
814
815
816 [FILE:1667:patches/patch-sendlib.c]
817 --- sendlib.c.orig      2020-03-28 18:17:53 UTC
818 +++ sendlib.c
819 @@ -1218,7 +1218,9 @@ static void mutt_set_encoding (BODY *b,
820    if (b->type == TYPETEXT)
821    {
822      char *chsname = mutt_get_body_charset (send_charset, sizeof (send_charset), b);
823 -    if ((info->lobin && ascii_strncasecmp (chsname, "iso-2022", 8)) || info->linemax > 990 || (info->from && option (OPTENCODEFROM)))
824 +    if (option (OPTFORCEBASE64))
825 +      b->encoding = ENCBASE64;
826 +    else if ((info->lobin && ascii_strncasecmp (chsname, "iso-2022", 8)) || info->linemax > 990 || (info->from && option (OPTENCODEFROM)))
827        b->encoding = ENCQUOTEDPRINTABLE;
828      else if (info->hibin)
829        b->encoding = option (OPTALLOW8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE;
830 @@ -2974,6 +2976,35 @@ static void set_noconv_flags (BODY *b, s
831    }
832  }
833  
834 +/* given a list of addresses, return a list of reverse_alias'ed addresses */
835 +ADDRESS *mutt_reverse_address (ADDRESS *addr)
836 +{
837 +  ADDRESS *top,*tmp,*alias;
838 +
839 +  if (addr == NULL)
840 +    return NULL;
841 +
842 +  if ((alias = alias_reverse_lookup (addr)) && alias->personal) {
843 +    tmp = rfc822_cpy_adr_real(alias);
844 +    tmp->next = addr->next;
845 +    addr->next = NULL;
846 +    rfc822_free_address(&addr);
847 +    addr = tmp;
848 +  }
849 +
850 +  for (top = addr; top->next != NULL; top = tmp) {
851 +    tmp = top->next;
852 +    if ((alias = alias_reverse_lookup (tmp)) && alias->personal) {
853 +      top->next = rfc822_cpy_adr_real(alias);
854 +      top->next->next = tmp->next;
855 +      tmp->next = NULL;
856 +      rfc822_free_address(&tmp);
857 +      tmp = top->next;
858 +    }
859 +  }
860 +  return addr;
861 +}
862 +
863  int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post, const char *fcc)
864  {
865    CONTEXT f;
866