1 diff -Nur mutt-1.3.27.orig/Makefile.am mutt-1.3.27/Makefile.am
2 --- mutt-1.3.27.orig/Makefile.am Fri Nov 9 01:18:28 2001
3 +++ mutt-1.3.27/Makefile.am Fri Feb 1 22:51:32 2002
5 bin_PROGRAMS = mutt @DOTLOCK_TARGET@ @PGPAUX_TARGET@
6 mutt_SOURCES = $(BUILT_SOURCES) \
7 addrbook.c alias.c attach.c base64.c browser.c buffy.c color.c \
8 - commands.c complete.c compose.c copy.c curs_lib.c curs_main.c date.c \
9 + commands.c complete.c compose.c compress.c copy.c curs_lib.c \
10 + curs_main.c date.c \
11 edit.c enter.c flags.c init.c filter.c from.c getdomain.c \
12 handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \
13 main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \
15 browser.h mbyte.h remailer.h url.h mutt_ssl_nss.c pgppacket.c
17 EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP TODO configure acconfig.h account.h \
18 - attach.h buffy.h charset.h copy.h dotlock.h functions.h gen_defs \
19 - globals.h hash.h history.h init.h keymap.h \
20 + attach.h buffy.h charset.h compress.h copy.h dotlock.h functions.h \
21 + gen_defs globals.h hash.h history.h init.h keymap.h \
22 mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
23 mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
24 mx.h pager.h pgp.h pop.h protos.h reldate.h rfc1524.h rfc2047.h \
25 diff -Nur mutt-1.3.27.orig/Makefile.in mutt-1.3.27/Makefile.in
26 --- mutt-1.3.27.orig/Makefile.in Tue Jan 1 21:18:15 2002
27 +++ mutt-1.3.27/Makefile.in Fri Feb 1 22:51:32 2002
29 BUILT_SOURCES = keymap_defs.h patchlist.c
31 bin_PROGRAMS = mutt @DOTLOCK_TARGET@ @PGPAUX_TARGET@
32 -mutt_SOURCES = $(BUILT_SOURCES) addrbook.c alias.c attach.c base64.c browser.c buffy.c color.c commands.c complete.c compose.c copy.c curs_lib.c curs_main.c date.c edit.c enter.c flags.c init.c filter.c from.c getdomain.c handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c postpone.c query.c recvattach.c recvcmd.c rfc822.c rfc1524.c rfc2047.c rfc2231.c score.c send.c sendlib.c signal.c sort.c status.c system.c thread.c charset.c history.c lib.c muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c url.c ascii.c
33 +mutt_SOURCES = $(BUILT_SOURCES) addrbook.c alias.c attach.c base64.c browser.c buffy.c color.c commands.c complete.c compose.c compress.c copy.c curs_lib.c curs_main.c date.c edit.c enter.c flags.c init.c filter.c from.c getdomain.c handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c postpone.c query.c recvattach.c recvcmd.c rfc822.c rfc1524.c rfc2047.c rfc2231.c score.c send.c sendlib.c signal.c sort.c status.c system.c thread.c charset.c history.c lib.c muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c url.c ascii.c
36 mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
38 EXTRA_mutt_SOURCES = account.c md5c.c mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_tunnel.c pop.c pop_auth.c pop_lib.c pgp.c pgpinvoke.c pgpkey.c pgplib.c sha1.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c browser.h mbyte.h remailer.h url.h mutt_ssl_nss.c pgppacket.c
41 -EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP TODO configure acconfig.h account.h attach.h buffy.h charset.h copy.h dotlock.h functions.h gen_defs globals.h hash.h history.h init.h keymap.h mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h mx.h pager.h pgp.h pop.h protos.h reldate.h rfc1524.h rfc2047.h rfc2231.h rfc822.h sha1.h sort.h mime.types VERSION prepare _regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h mbyte.h lib.h extlib.c pgpewrap.c pgplib.h Muttrc.head Muttrc makedoc.c stamp-doc-rc README.SSL muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh
42 +EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP TODO configure acconfig.h account.h attach.h buffy.h charset.h compress.h copy.h dotlock.h functions.h gen_defs globals.h hash.h history.h init.h keymap.h mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h mx.h pager.h pgp.h pop.h protos.h reldate.h rfc1524.h rfc2047.h rfc2231.h rfc822.h sha1.h sort.h mime.types VERSION prepare _regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h mbyte.h lib.h extlib.c pgpewrap.c pgplib.h Muttrc.head Muttrc makedoc.c stamp-doc-rc README.SSL muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh
45 mutt_dotlock_SOURCES = mutt_dotlock.c
47 makedoc_OBJECTS = makedoc.o
49 mutt_OBJECTS = patchlist.o addrbook.o alias.o attach.o base64.o \
50 -browser.o buffy.o color.o commands.o complete.o compose.o copy.o \
51 +browser.o buffy.o color.o commands.o complete.o compose.o compress.o copy.o \
52 curs_lib.o curs_main.o date.o edit.o enter.o flags.o init.o filter.o \
53 from.o getdomain.o handler.o hash.o hdrline.o headers.o help.o hook.o \
54 keymap.o main.o mbox.o menu.o mh.o mx.o pager.o parse.o pattern.o \
55 diff -Nur mutt-1.3.27.orig/Muttrc mutt-1.3.27/Muttrc
56 --- mutt-1.3.27.orig/Muttrc Tue Jan 1 21:18:05 2002
57 +++ mutt-1.3.27/Muttrc Fri Feb 1 22:51:32 2002
59 macro index <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
60 macro pager <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
62 +# Use folders which match on \\.gz$ as gzipped folders:
63 +# open-hook \\.gz$ "gzip -cd %f > %t"
64 +# close-hook \\.gz$ "gzip -c %t > %f"
65 +# append-hook \\.gz$ "gzip -c %t >> %f"
67 # If Mutt is unable to determine your site's domain name correctly, you can
68 # set the default here.
70 diff -Nur mutt-1.3.27.orig/Muttrc.head mutt-1.3.27/Muttrc.head
71 --- mutt-1.3.27.orig/Muttrc.head Tue Jan 1 21:18:02 2002
72 +++ mutt-1.3.27/Muttrc.head Fri Feb 1 22:51:32 2002
74 macro index <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
75 macro pager <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
77 +# Use folders which match on \\.gz$ as gzipped folders:
78 +# open-hook \\.gz$ "gzip -cd %f > %t"
79 +# close-hook \\.gz$ "gzip -c %t > %f"
80 +# append-hook \\.gz$ "gzip -c %t >> %f"
82 # If Mutt is unable to determine your site's domain name correctly, you can
83 # set the default here.
85 diff -Nur mutt-1.3.27.orig/Muttrc.head.in mutt-1.3.27/Muttrc.head.in
86 --- mutt-1.3.27.orig/Muttrc.head.in Mon Mar 20 11:25:49 2000
87 +++ mutt-1.3.27/Muttrc.head.in Fri Feb 1 22:51:32 2002
89 macro index <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
90 macro pager <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
92 +# Use folders which match on \\.gz$ as gzipped folders:
93 +# open-hook \\.gz$ "gzip -cd %f > %t"
94 +# close-hook \\.gz$ "gzip -c %t > %f"
95 +# append-hook \\.gz$ "gzip -c %t >> %f"
97 # If Mutt is unable to determine your site's domain name correctly, you can
98 # set the default here.
100 diff -Nur mutt-1.3.27.orig/PATCHES mutt-1.3.27/PATCHES
101 --- mutt-1.3.27.orig/PATCHES Mon Nov 26 20:16:22 2001
102 +++ mutt-1.3.27/PATCHES Fri Feb 1 22:51:32 2002
104 +patch-1.3.27.rr.compressed.1
105 diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
106 --- mutt-1.3.27.orig/compress.c Thu Jan 1 01:00:00 1970
107 +++ mutt-1.3.27/compress.c Fri Feb 1 22:51:32 2002
110 + * Copyright (C) 1997 Alain Penders <Alain@Finale-Dev.com>
112 + * This program is free software; you can redistribute it and/or modify
113 + * it under the terms of the GNU General Public License as published by
114 + * the Free Software Foundation; either version 2 of the License, or
115 + * (at your option) any later version.
117 + * This program is distributed in the hope that it will be useful,
118 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
119 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
120 + * GNU General Public License for more details.
122 + * You should have received a copy of the GNU General Public License
123 + * along with this program; if not, write to the Free Software
124 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
129 +#ifdef USE_COMPRESSED
132 +#include "mailbox.h"
133 +#include "mutt_curses.h"
138 +#include <sys/stat.h>
142 + const char *close; /* close-hook command */
143 + const char *open; /* open-hook command */
144 + const char *append; /* append-hook command */
145 + off_t size; /* size of real folder */
150 + * ctx - context to lock
151 + * excl - exclusive lock?
152 + * retry - should retry if unable to lock?
154 +int mbox_lock_compressed (CONTEXT *ctx, FILE *fp, int excl, int retry)
158 + if ((r = mx_lock_file (ctx->realpath, fileno (fp), excl, 1, retry)) == 0)
160 + else if (retry && !excl)
169 +void mbox_unlock_compressed (CONTEXT *ctx, FILE *fp)
175 + mx_unlock_file (ctx->realpath, fileno (fp), 1);
180 +static int is_new (const char *path)
182 + return (access (path, W_OK) != 0 && errno == ENOENT) ? 1 : 0;
185 +static const char* find_compress_hook (int type, const char *path)
187 + const char* c = mutt_find_hook (type, path);
188 + return (!c || !*c) ? NULL : c;
191 +int mutt_can_read_compressed (const char *path)
193 + return find_compress_hook (M_OPENHOOK, path) ? 1 : 0;
197 + * if the file is new, we really do not append, but create, and so use
198 + * close-hook, and not append-hook
200 +static const char* get_append_command (const char *path, const CONTEXT* ctx)
202 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
203 + return (is_new (path)) ? ci->close : ci->append;
206 +int mutt_can_append_compressed (const char *path)
211 + return (find_compress_hook (M_CLOSEHOOK, path) ? 1 : 0);
213 + magic = mx_get_magic (path);
215 + if (magic != 0 && magic != M_COMPRESSED)
218 + return (find_compress_hook (M_APPENDHOOK, path)
219 + || (find_compress_hook (M_OPENHOOK, path)
220 + && find_compress_hook (M_CLOSEHOOK, path))) ? 1 : 0;
223 +/* open a compressed mailbox */
224 +static COMPRESS_INFO *set_compress_info (CONTEXT *ctx)
228 + /* Now lets uncompress this thing */
229 + ci = safe_malloc (sizeof (COMPRESS_INFO));
230 + ctx->compressinfo = (void*) ci;
231 + ci->append = find_compress_hook (M_APPENDHOOK, ctx->path);
232 + ci->open = find_compress_hook (M_OPENHOOK, ctx->path);
233 + ci->close = find_compress_hook (M_CLOSEHOOK, ctx->path);
237 +static void set_path (CONTEXT* ctx)
239 + char tmppath[_POSIX_PATH_MAX];
241 + /* Setup the right paths */
242 + ctx->realpath = ctx->path;
244 + /* Uncompress to /tmp */
245 + mutt_mktemp (tmppath);
246 + ctx->path = safe_malloc (strlen (tmppath) + 1);
247 + strcpy (ctx->path, tmppath);
250 +static int get_size (const char* path)
253 + if (stat (path, &sb) != 0)
255 + return (sb.st_size);
258 +static void store_size (CONTEXT* ctx)
260 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
261 + ci->size = get_size (ctx->realpath);
265 +compresshook_format_str (char *dest, size_t destlen, char op, const char *src,
266 + const char *fmt, const char *ifstring,
267 + const char *elsestring, unsigned long data,
270 + char tmp[SHORT_STRING];
272 + CONTEXT *ctx = (CONTEXT *) data;
276 + snprintf (tmp, sizeof (tmp), "%%%ss", fmt);
277 + snprintf (dest, destlen, tmp, ctx->realpath);
280 + snprintf (tmp, sizeof (tmp), "%%%ss", fmt);
281 + snprintf (dest, destlen, tmp, ctx->path);
288 + * check that the command has both %f and %t
289 + * 0 means OK, -1 means error
291 +int mutt_test_compress_command (const char* cmd)
293 + return (strstr (cmd, "%f") && strstr (cmd, "%t")) ? 0 : -1;
296 +static char *get_compression_cmd (const char* cmd, const CONTEXT* ctx)
298 + char expanded[_POSIX_PATH_MAX];
299 + mutt_FormatString (expanded, sizeof (expanded), cmd, compresshook_format_str,
300 + (unsigned long) ctx, 0);
301 + return safe_strdup (expanded);
304 +int mutt_check_mailbox_compressed (CONTEXT* ctx)
306 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
307 + if (ci->size != get_size (ctx->realpath))
309 + safe_free ((void**)&ctx->compressinfo);
310 + safe_free ((void**)&ctx->realpath);
311 + mutt_error _("Mailbox was corrupted!");
317 +int mutt_open_read_compressed (CONTEXT *ctx)
323 + COMPRESS_INFO *ci = set_compress_info (ctx);
326 + safe_free ((void**)ctx->compressinfo);
329 + if (!ci->close || access (ctx->path, W_OK) != 0)
336 + mutt_message (_("Decompressing %s..."), ctx->realpath);
338 + cmd = get_compression_cmd (ci->open, ctx);
341 + dprint (2, (debugfile, "DecompressCmd: '%s'\n", cmd));
343 + if ((fp = fopen (ctx->realpath, "r")) == NULL)
345 + mutt_perror (ctx->realpath);
346 + safe_free ((void **)&cmd);
349 + mutt_block_signals ();
350 + if (mbox_lock_compressed (ctx, fp, 0, 1) == -1)
353 + mutt_unblock_signals ();
354 + mutt_error _("Unable to lock mailbox!");
355 + safe_free ((void **)&cmd);
361 + fprintf (stderr, _("Decompressing %s...\n"),ctx->realpath);
362 + rc = mutt_system (cmd);
363 + mbox_unlock_compressed (ctx, fp);
364 + mutt_unblock_signals ();
369 + mutt_any_key_to_continue (NULL);
371 + safe_free ((void**)ctx->compressinfo);
372 + mutt_error (_("Error executing: %s : unable to open the mailbox!\n"), cmd);
374 + safe_free ((void **)&cmd);
378 + if (mutt_check_mailbox_compressed (ctx))
381 + ctx->magic = mx_get_magic (ctx->path);
386 +void restore_path (CONTEXT* ctx)
388 + safe_free ((void **)&ctx->path);
389 + ctx->path = ctx->realpath;
392 +/* remove the temporary mailbox */
393 +void remove_file (CONTEXT* ctx)
395 + if (ctx->magic == M_MBOX || ctx->magic == M_MMDF)
396 + remove (ctx->path);
399 +int mutt_open_append_compressed (CONTEXT *ctx)
402 + COMPRESS_INFO *ci = set_compress_info (ctx);
404 + if (!get_append_command (ctx->path, ctx))
406 + if (ci->open && ci->close)
407 + return (mutt_open_read_compressed (ctx));
410 + safe_free ((void**)&ctx->compressinfo);
416 + ctx->magic = DefaultMagic;
418 + if (!is_new (ctx->realpath))
419 + if (ctx->magic == M_MBOX || ctx->magic == M_MMDF)
420 + if ((fh = fopen (ctx->path, "w")))
422 + /* No error checking - the parent function will catch it */
427 +/* close a compressed mailbox */
428 +void mutt_fast_close_compressed (CONTEXT *ctx)
430 + dprint (2, (debugfile, "mutt_fast_close_compressed called on '%s'\n",
433 + if (ctx->compressinfo)
438 + /* if the folder was removed, remove the gzipped folder too */
439 + if ((ctx->magic > 0)
440 + && (access (ctx->path, F_OK) != 0)
441 + && ! option (OPTSAVEEMPTY))
442 + remove (ctx->realpath);
446 + restore_path (ctx);
447 + safe_free ((void**)&ctx->compressinfo);
451 +/* return 0 on success, -1 on failure */
452 +int mutt_sync_compressed (CONTEXT* ctx)
457 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
460 + mutt_message (_("Compressing %s..."), ctx->realpath);
462 + cmd = get_compression_cmd (ci->close, ctx);
466 + if ((fp = fopen (ctx->realpath, "a")) == NULL)
468 + mutt_perror (ctx->realpath);
469 + safe_free ((void **)&cmd);
472 + mutt_block_signals ();
473 + if (mbox_lock_compressed (ctx, fp, 1, 1) == -1)
476 + mutt_unblock_signals ();
477 + mutt_error _("Unable to lock mailbox!");
479 + safe_free ((void **)&cmd);
483 + dprint (2, (debugfile, "CompressCommand: '%s'\n", cmd));
487 + fprintf (stderr, _("Compressing %s...\n"), ctx->realpath);
488 + if (mutt_system (cmd))
490 + mutt_any_key_to_continue (NULL);
491 + mutt_error (_("%s: Error compressing mailbox! Original mailbox deleted, uncompressed one kept!\n"), ctx->path);
495 + mbox_unlock_compressed (ctx, fp);
496 + mutt_unblock_signals ();
499 + safe_free ((void **)&cmd);
506 +int mutt_slow_close_compressed (CONTEXT *ctx)
509 + const char *append;
511 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
513 + dprint (2, (debugfile, "mutt_slow_close_compressed called on '%s'\n",
517 + && ((append = get_append_command (ctx->realpath, ctx))
518 + || (append = ci->close))))
520 + /* if we can not or should not append, we only have to remove the */
521 + /* compressed info, because sync was already called */
522 + mutt_fast_close_compressed (ctx);
532 + if (append == ci->close)
533 + mutt_message (_("Compressing %s..."), ctx->realpath);
535 + mutt_message (_("Compressed-appending to %s..."), ctx->realpath);
538 + cmd = get_compression_cmd (append, ctx);
542 + if ((fp = fopen (ctx->realpath, "a")) == NULL)
544 + mutt_perror (ctx->realpath);
545 + safe_free ((void **)&cmd);
548 + mutt_block_signals ();
549 + if (mbox_lock_compressed (ctx, fp, 1, 1) == -1)
552 + mutt_unblock_signals ();
553 + mutt_error _("Unable to lock mailbox!");
554 + safe_free ((void **)&cmd);
558 + dprint (2, (debugfile, "CompressCmd: '%s'\n", cmd));
563 + if (append == ci->close)
564 + fprintf (stderr, _("Compressing %s...\n"), ctx->realpath);
566 + fprintf (stderr, _("Compressed-appending to %s...\n"), ctx->realpath);
568 + if (mutt_system (cmd))
570 + mutt_any_key_to_continue (NULL);
571 + mutt_error (_(" %s: Error compressing mailbox! Uncompressed one kept!\n"),
573 + safe_free ((void **)&cmd);
574 + mbox_unlock_compressed (ctx, fp);
575 + mutt_unblock_signals ();
580 + mbox_unlock_compressed (ctx, fp);
581 + mutt_unblock_signals ();
584 + restore_path (ctx);
585 + safe_free ((void **)&cmd);
586 + safe_free ((void **)&ctx->compressinfo);
591 +#endif /* USE_COMPRESSED */
592 diff -Nur mutt-1.3.27.orig/compress.h mutt-1.3.27/compress.h
593 --- mutt-1.3.27.orig/compress.h Thu Jan 1 01:00:00 1970
594 +++ mutt-1.3.27/compress.h Fri Feb 1 22:51:32 2002
597 + * Copyright (C) 1997 Alain Penders <Alain@Finale-Dev.com>
599 + * This program is free software; you can redistribute it and/or modify
600 + * it under the terms of the GNU General Public License as published by
601 + * the Free Software Foundation; either version 2 of the License, or
602 + * (at your option) any later version.
604 + * This program is distributed in the hope that it will be useful,
605 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
606 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
607 + * GNU General Public License for more details.
609 + * You should have received a copy of the GNU General Public License
610 + * along with this program; if not, write to the Free Software
611 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
614 +int mutt_can_read_compressed (const char *);
615 +int mutt_can_append_compressed (const char *);
616 +int mutt_open_read_compressed (CONTEXT *);
617 +int mutt_open_append_compressed (CONTEXT *);
618 +int mutt_slow_close_compressed (CONTEXT *);
619 +int mutt_sync_compressed (CONTEXT *);
620 +int mutt_test_compress_command (const char *);
621 +int mutt_check_mailbox_compressed (CONTEXT *);
622 +void mutt_fast_close_compressed (CONTEXT *);
623 diff -Nur mutt-1.3.27.orig/config.h.in mutt-1.3.27/config.h.in
624 --- mutt-1.3.27.orig/config.h.in Fri Aug 3 18:52:17 2001
625 +++ mutt-1.3.27/config.h.in Fri Feb 1 22:52:59 2002
627 /* The Sun mailtool attachments support */
628 #undef SUN_ATTACHMENT
630 +/* Define to enable compressed mailboxes support */
631 +#undef USE_COMPRESSED
633 /* The result of isprint() is unreliable? */
636 diff -Nur mutt-1.3.27.orig/configure mutt-1.3.27/configure
637 --- mutt-1.3.27.orig/configure Tue Jan 1 21:17:56 2002
638 +++ mutt-1.3.27/configure Fri Feb 1 22:51:32 2002
641 --enable-locales-fix The result of isprint() is unreliable "
643 + --enable-compressed Enable compressed folders support "
645 --with-exec-shell=SHELL Specify alternate shell (ONLY if /bin/sh is broken)"
647 --enable-exact-address Enable regeneration of email addresses"
648 @@ -5793,6 +5795,18 @@
655 +# Check whether --enable-compressed or --disable-compressed was given.
656 +if test "${enable_compressed+set}" = set; then
657 + enableval="$enable_compressed"
658 + if test x$enableval = xyes; then
659 + cat >> confdefs.h <<\EOF
660 +#define USE_COMPRESSED 1
667 diff -Nur mutt-1.3.27.orig/configure.in mutt-1.3.27/configure.in
668 --- mutt-1.3.27.orig/configure.in Fri Feb 1 22:51:17 2002
669 +++ mutt-1.3.27/configure.in Fri Feb 1 22:51:32 2002
671 AC_DEFINE(LOCALES_HACK,1,[ Define if the result of isprint() is unreliable. ])
674 +AC_ARG_ENABLE(compressed, [ --enable-compressed Enable compressed folders support ],
675 + [if test x$enableval = xyes; then
676 + AC_DEFINE(USE_COMPRESSED,1, [ Define to support compressed folders. ])
679 AC_ARG_WITH(exec-shell, [ --with-exec-shell=SHELL Specify alternate shell (ONLY if /bin/sh is broken)],
680 [if test $withval != yes; then
681 AC_DEFINE_UNQUOTED(EXECSHELL, "$withval")
682 diff -Nur mutt-1.3.27.orig/curs_main.c mutt-1.3.27/curs_main.c
683 --- mutt-1.3.27.orig/curs_main.c Wed Jan 23 00:42:01 2002
684 +++ mutt-1.3.27/curs_main.c Fri Feb 1 22:51:32 2002
685 @@ -1010,6 +1010,11 @@
689 +#ifdef USE_COMPRESSED
690 + if (Context->compressinfo && Context->realpath)
691 + mutt_str_replace (&LastFolder, Context->realpath);
694 mutt_str_replace (&LastFolder, Context->path);
695 oldcount = Context ? Context->msgcount : 0;
697 diff -Nur mutt-1.3.27.orig/doc/manual-4.html mutt-1.3.27/doc/manual-4.html
698 --- mutt-1.3.27.orig/doc/manual-4.html Tue Jan 1 21:18:11 2002
699 +++ mutt-1.3.27/doc/manual-4.html Fri Feb 1 22:51:32 2002
700 @@ -788,7 +788,176 @@
701 macro pager \cb |urlview\n
706 +<H2><A NAME="ss4.14">4.14 Compressed folders Support (OPTIONAL)</A>
710 +<P>If Mutt was compiled with compressed folders support (by running the
711 +<EM>configure</EM> script with the <EM>--enable-compressed</EM> flag), Mutt
712 +can open folders stored in an arbitrary format, provided that the user
713 +has a script to convert from/to this format to one of the accepted.</P>
714 +<P>The most common use is to open compressed archived folders e.g. with
716 +<P>In addition, the user can provide a script that gets a folder in an
717 +accepted format and appends its context to the folder in the
718 +user-defined format, which may be faster than converting the entire
719 +folder to the accepted format, appending to it and converting back to
720 +the user-defined format.</P>
721 +<P>There are three hooks defined (
722 +<A HREF="#open-hook">open-hook</A>,
723 +<A HREF="#close-hook">close-hook</A> and
724 +<A HREF="#append-hook">append-hook</A>) which define commands to uncompress and compress
725 +a folder and to append messages to an existing compressed folder
731 +open-hook \\.gz$ "gzip -cd %f > %t"
732 +close-hook \\.gz$ "gzip -c %t > %f"
733 +append-hook \\.gz$ "gzip -c %t >> %f"
735 +</CODE></BLOCKQUOTE>
737 +<P>You do not have to specify all of the commands. If you omit
738 +<A HREF="#append-hook">append-hook</A>, the folder will be open and
739 +closed again each time you will add to it. If you omit
740 +<A HREF="#close-hook">close-hook</A> (or give empty command) , the
741 +folder will be open in the mode. If you specify
742 +<A HREF="#append-hook">append-hook</A> though you'll be able to append
744 +<P>Note that Mutt will only try to use hooks if the file is not in one of
745 +the accepted formats. In particular, if the file is empty, mutt
746 +supposes it is not compressed. This is important because it allows the
747 +use of programs that do not have well defined extensions. Just use
748 +"." as a regexp. But this may be surprising if your
749 +compressing script produces empty files. In this situation, unset
750 +<A HREF="manual-6.html#save_empty">$save_empty</A>, so that the compressed file
751 +will be removed if you delete all of the messages.</P>
753 +<H3><A NAME="open-hook"></A> Open a compressed mailbox for reading</H3>
755 +<P>Usage: <CODE>open-hook</CODE> <EM>regexp</EM> "<EM>command</EM>"</P>
756 +<P>The <EM>command</EM> is the command that can be used for opening the
757 +folders whose names match <EM>regexp</EM>.</P>
758 +<P>The <EM>command</EM> string is the printf-like format string, and it
759 +should accept two parameters: %f, which is replaced with the
760 +(compressed) folder name, and %t which is replaced with the
761 +name of the temporary folder to which to write.</P>
762 +<P>%f and %t can be repeated any number of times in the
763 +command string, and all of the entries are replaced with the
764 +appropriate folder name. In addition, %% is replaced by
765 +%, as in printf, and any other %anything is left as is.</P>
766 +<P>The <EM>command</EM> should <B>not</B> remove the original compressed file.
767 +The <EM>command</EM> should return non-zero exit status if it fails, so
768 +mutt knows something's wrong.</P>
773 +open-hook \\.gz$ "gzip -cd %f > %t"
775 +</CODE></BLOCKQUOTE>
777 +<P>If the <EM>command</EM> is empty, this operation is disabled for this file
780 +<H3><A NAME="close-hook"></A> Write a compressed mailbox</H3>
782 +<P>Usage: <CODE>close-hook</CODE> <EM>regexp</EM> "<EM>command</EM>"</P>
783 +<P>This is used to close the folder that was open with the
784 +<A HREF="#open-hook">open-hook</A> command after some changes were made to it.</P>
785 +<P>The <EM>command</EM> string is the command that can be used for closing the
786 +folders whose names match <EM>regexp</EM>. It has the same format as in
788 +<A HREF="#open-hook">open-hook</A> command. Temporary folder
789 +in this case is the folder previously produced by the
790 +<A HREF="#open-hook">open-hook</A> command.</P>
791 +<P>The <EM>command</EM> should <B>not</B> remove the decompressed file. The
792 +<EM>command</EM> should return non-zero exit status if it fails, so mutt
793 +knows something's wrong.</P>
798 +close-hook \\.gz$ "gzip -c %t > %f"
800 +</CODE></BLOCKQUOTE>
802 +<P>If the <EM>command</EM> is empty, this operation is disabled for this file
803 +type, and the file can only be open in the read-only mode.</P>
805 +<A HREF="#close-hook">close-hook</A> is not called when you exit
806 +from the folder if the folder was not changed.</P>
808 +<H3><A NAME="append-hook"></A> Append a message to a compressed mailbox</H3>
810 +<P>Usage: <CODE>append-hook</CODE> <EM>regexp</EM> "<EM>command</EM>"</P>
811 +<P>This command is used for saving to an existing compressed folder.
812 +The <EM>command</EM> is the command that can be used for appending to the
813 +folders whose names match <EM>regexp</EM>. It has the same format as in
815 +<A HREF="#open-hook">open-hook</A> command.
816 +The temporary folder in this case contains the messages that are being
818 +<P>The <EM>command</EM> should <B>not</B> remove the decompressed file. The
819 +<EM>command</EM> should return non-zero exit status if it fails, so mutt
820 +knows something's wrong.</P>
825 +append-hook \\.gz$ "gzip -c %t >> %f"
827 +</CODE></BLOCKQUOTE>
830 +<A HREF="#append-hook">append-hook</A> is used, the folder is
831 +not opened, which saves time, but this means that we can not find out
832 +what the folder type is. Thus the default (
833 +<A HREF="manual-6.html#mbox_type">$mbox_type</A>) type is always supposed (i.e.
834 +this is the format used for the temporary folder).</P>
835 +<P>If the file does not exist when you save to it,
836 +<A HREF="#close-hook">close-hook</A> is called, and not
837 +<A HREF="#append-hook">append-hook</A>.
838 +<A HREF="#append-hook">append-hook</A> is only
839 +for appending to existing folders.</P>
840 +<P>If the <EM>command</EM> is empty, this operation is disabled for this file
841 +type. In this case, the folder will be open and closed again (using
842 +<A HREF="#open-hook">open-hook</A> and
843 +<A HREF="#close-hook">close-hook</A>respectively) each time you will add to it.</P>
845 +<H3>Encrypted folders</H3>
847 +<P>The compressed folders support can also be used to handle encrypted
848 +folders. If you want to encrypt a folder with PGP, you may want to use
849 +the following hooks:</P>
853 +open-hook \\.pgp$ "pgp -f < %f > %t"
854 +close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
856 +</CODE></BLOCKQUOTE>
858 +<P>Please note, that PGP does not support appending to an encrypted
859 +folder, so there is no append-hook defined.</P>
860 +<P>If you are using GnuPG instead of PGP, you may use the following hooks
865 +open-hook \\.gpg$ "gpg --decrypt < %f > %t"
866 +close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId < %t > %f"
868 +</CODE></BLOCKQUOTE>
870 +<P><B>Note:</B> the folder is temporary stored decrypted in the /tmp
871 +directory, where it can be read by your system administrator. So think
872 +about the security aspects of this.</P>
875 <A HREF="manual-5.html">Next</A>
876 <A HREF="manual-3.html">Previous</A>
877 diff -Nur mutt-1.3.27.orig/doc/manual-6.html mutt-1.3.27/doc/manual-6.html
878 --- mutt-1.3.27.orig/doc/manual-6.html Tue Jan 1 21:18:13 2002
879 +++ mutt-1.3.27/doc/manual-6.html Fri Feb 1 22:51:32 2002
882 <A HREF="manual-5.html#alternative_order">alternative_order</A></CODE> <EM>mimetype</EM> [ <EM>mimetype</EM> ... ]</LI>
884 +<A HREF="manual-4.html#append-hook">append-hook</A></CODE> <EM>regexp</EM> "<EM>command</EM>"</LI>
886 <A HREF="manual-5.html#auto_view">auto_view</A></CODE> <EM>mimetype</EM> [ <EM>mimetype</EM> ... ]</LI>
888 <A HREF="manual-3.html#bind">bind</A></CODE> <EM>map</EM> <EM>key</EM> <EM>function</EM></LI>
890 <A HREF="manual-3.html#charset-hook">charset-hook</A></CODE> <EM>alias</EM> <EM>charset</EM></LI>
892 +<A HREF="manual-4.html#close-hook">close-hook</A></CODE> <EM>regexp</EM> "<EM>command</EM>"</LI>
894 <A HREF="manual-3.html#color">color</A></CODE> <EM>object</EM> <EM>foreground</EM> <EM>background</EM> [ <EM>regexp</EM> ]</LI>
896 <A HREF="manual-3.html#color">uncolor</A></CODE> <EM>index</EM> <EM>pattern</EM> [ <EM>pattern</EM> ... ]</LI>
899 <A HREF="manual-3.html#my_hdr">unmy_hdr</A></CODE> <EM>field</EM> [ <EM>field</EM> ... ]</LI>
901 +<A HREF="manual-4.html#open-hook">open-hook</A></CODE> <EM>regexp</EM> "<EM>command</EM>"</LI>
903 <A HREF="manual-3.html#pgp-hook">pgp-hook</A></CODE> <EM>pattern</EM> <EM>key-id</EM></LI>
905 <A HREF="manual-3.html#push">push</A></CODE> <EM>string</EM></LI>
906 diff -Nur mutt-1.3.27.orig/doc/manual.sgml mutt-1.3.27/doc/manual.sgml
907 --- mutt-1.3.27.orig/doc/manual.sgml Tue Jan 1 21:18:05 2002
908 +++ mutt-1.3.27/doc/manual.sgml Fri Feb 1 22:51:32 2002
909 @@ -2318,6 +2318,176 @@
910 macro pager \cb |urlview\n
913 +<sect1>Compressed folders Support (OPTIONAL)
916 +If Mutt was compiled with compressed folders support (by running the
917 +<em/configure/ script with the <em/--enable-compressed/ flag), Mutt
918 +can open folders stored in an arbitrary format, provided that the user
919 +has a script to convert from/to this format to one of the accepted.
921 +The most common use is to open compressed archived folders e.g. with
924 +In addition, the user can provide a script that gets a folder in an
925 +accepted format and appends its context to the folder in the
926 +user-defined format, which may be faster than converting the entire
927 +folder to the accepted format, appending to it and converting back to
928 +the user-defined format.
930 +There are three hooks defined (<ref id="open-hook" name="open-hook">,
931 +<ref id="close-hook" name="close-hook"> and <ref id="append-hook"
932 +name="append-hook">) which define commands to uncompress and compress
933 +a folder and to append messages to an existing compressed folder
939 +open-hook \\.gz$ "gzip -cd %f > %t"
940 +close-hook \\.gz$ "gzip -c %t > %f"
941 +append-hook \\.gz$ "gzip -c %t >> %f"
944 +You do not have to specify all of the commands. If you omit <ref
945 +id="append-hook" name="append-hook">, the folder will be open and
946 +closed again each time you will add to it. If you omit <ref
947 +id="close-hook" name="close-hook"> (or give empty command) , the
948 +folder will be open in the mode. If you specify <ref
949 +id="append-hook" name="append-hook"> though you'll be able to append
952 +Note that Mutt will only try to use hooks if the file is not in one of
953 +the accepted formats. In particular, if the file is empty, mutt
954 +supposes it is not compressed. This is important because it allows the
955 +use of programs that do not have well defined extensions. Just use
956 +&dquot;.&dquot; as a regexp. But this may be surprising if your
957 +compressing script produces empty files. In this situation, unset <ref
958 +id="save_empty" name="$save_empty">, so that the compressed file
959 +will be removed if you delete all of the messages.
961 +<sect2>Open a compressed mailbox for reading<label id="open-hook">
963 +Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
965 +The <em/command/ is the command that can be used for opening the
966 +folders whose names match <em/regexp/.
968 +The <em/command/ string is the printf-like format string, and it
969 +should accept two parameters: %f, which is replaced with the
970 +(compressed) folder name, and %t which is replaced with the
971 +name of the temporary folder to which to write.
973 +%f and %t can be repeated any number of times in the
974 +command string, and all of the entries are replaced with the
975 +appropriate folder name. In addition, %% is replaced by
976 +%, as in printf, and any other %anything is left as is.
978 +The <em/command/ should <bf/not/ remove the original compressed file.
979 +The <em/command/ should return non-zero exit status if it fails, so
980 +mutt knows something's wrong.
985 +open-hook \\.gz$ "gzip -cd %f > %t"
988 +If the <em/command/ is empty, this operation is disabled for this file
991 +<sect2>Write a compressed mailbox<label id="close-hook">
993 +Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
995 +This is used to close the folder that was open with the <ref id="open-hook"
996 +name="open-hook"> command after some changes were made to it.
998 +The <em/command/ string is the command that can be used for closing the
999 +folders whose names match <em/regexp/. It has the same format as in
1000 +the <ref id="open-hook" name="open-hook"> command. Temporary folder
1001 +in this case is the folder previously produced by the <ref id="open-hook"
1002 +name="open-hook"> command.
1004 +The <em/command/ should <bf/not/ remove the decompressed file. The
1005 +<em/command/ should return non-zero exit status if it fails, so mutt
1006 +knows something's wrong.
1011 +close-hook \\.gz$ "gzip -c %t > %f"
1014 +If the <em/command/ is empty, this operation is disabled for this file
1015 +type, and the file can only be open in the read-only mode.
1017 +<ref id="close-hook" name ="close-hook"> is not called when you exit
1018 +from the folder if the folder was not changed.
1020 +<sect2>Append a message to a compressed mailbox<label id="append-hook">
1022 +Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
1024 +This command is used for saving to an existing compressed folder.
1025 +The <em/command/ is the command that can be used for appending to the
1026 +folders whose names match <em/regexp/. It has the same format as in
1027 + the <ref id="open-hook" name="open-hook"> command.
1028 +The temporary folder in this case contains the messages that are being
1031 +The <em/command/ should <bf/not/ remove the decompressed file. The
1032 +<em/command/ should return non-zero exit status if it fails, so mutt
1033 +knows something's wrong.
1038 +append-hook \\.gz$ "gzip -c %t >> %f"
1041 +When <ref id="append-hook" name="append-hook"> is used, the folder is
1042 +not opened, which saves time, but this means that we can not find out
1043 +what the folder type is. Thus the default (<ref id="mbox_type"
1044 +name="$mbox_type">) type is always supposed (i.e.
1045 +this is the format used for the temporary folder).
1047 +If the file does not exist when you save to it, <ref id="close-hook"
1048 +name="close-hook"> is called, and not <ref id="append-hook"
1049 +name="append-hook">. <ref id="append-hook" name="append-hook"> is only
1050 +for appending to existing folders.
1052 +If the <em/command/ is empty, this operation is disabled for this file
1053 +type. In this case, the folder will be open and closed again (using
1054 +<ref id="open-hook" name="open-hook"> and <ref id="close-hook"
1055 +name="close-hook">respectively) each time you will add to it.
1057 +<sect2>Encrypted folders
1059 +The compressed folders support can also be used to handle encrypted
1060 +folders. If you want to encrypt a folder with PGP, you may want to use
1061 +the following hooks:
1064 +open-hook \\.pgp$ "pgp -f < %f > %t"
1065 +close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
1068 +Please note, that PGP does not support appending to an encrypted
1069 +folder, so there is no append-hook defined.
1071 +If you are using GnuPG instead of PGP, you may use the following hooks
1075 +open-hook \\.gpg$ "gpg --decrypt < %f > %t"
1076 +close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId < %t > %f"
1079 +<bf/Note:/ the folder is temporary stored decrypted in the /tmp
1080 +directory, where it can be read by your system administrator. So think
1081 +about the security aspects of this.
1083 <sect>Mutt's MIME Support
1085 Quite a bit of effort has been made to make Mutt the premier text-mode
1086 @@ -2868,12 +3038,16 @@
1088 <tt><ref id="alternative_order" name="alternative_order"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
1090 +<tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
1092 <tt><ref id="auto_view" name="auto_view"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
1094 <tt><ref id="bind" name="bind"></tt> <em/map/ <em/key/ <em/function/
1096 <tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
1098 +<tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
1100 <tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ [ <em/regexp/ ]
1102 <tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ [ <em/pattern/ ... ]
1103 @@ -2916,6 +3090,8 @@
1105 <tt><ref id="my_hdr" name="unmy_hdr"></tt> <em/field/ [ <em/field/ ... ]
1107 +<tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
1109 <tt><ref id="pgp-hook" name="pgp-hook"></tt> <em/pattern/ <em/key-id/
1111 <tt><ref id="push" name="push"></tt> <em/string/
1112 diff -Nur mutt-1.3.27.orig/doc/manual.sgml.head mutt-1.3.27/doc/manual.sgml.head
1113 --- mutt-1.3.27.orig/doc/manual.sgml.head Wed Jan 23 00:42:01 2002
1114 +++ mutt-1.3.27/doc/manual.sgml.head Fri Feb 1 22:51:32 2002
1115 @@ -2319,6 +2319,176 @@
1116 macro pager \cb |urlview\n
1119 +<sect1>Compressed folders Support (OPTIONAL)
1122 +If Mutt was compiled with compressed folders support (by running the
1123 +<em/configure/ script with the <em/--enable-compressed/ flag), Mutt
1124 +can open folders stored in an arbitrary format, provided that the user
1125 +has a script to convert from/to this format to one of the accepted.
1127 +The most common use is to open compressed archived folders e.g. with
1130 +In addition, the user can provide a script that gets a folder in an
1131 +accepted format and appends its context to the folder in the
1132 +user-defined format, which may be faster than converting the entire
1133 +folder to the accepted format, appending to it and converting back to
1134 +the user-defined format.
1136 +There are three hooks defined (<ref id="open-hook" name="open-hook">,
1137 +<ref id="close-hook" name="close-hook"> and <ref id="append-hook"
1138 +name="append-hook">) which define commands to uncompress and compress
1139 +a folder and to append messages to an existing compressed folder
1145 +open-hook \\.gz$ "gzip -cd %f > %t"
1146 +close-hook \\.gz$ "gzip -c %t > %f"
1147 +append-hook \\.gz$ "gzip -c %t >> %f"
1150 +You do not have to specify all of the commands. If you omit <ref
1151 +id="append-hook" name="append-hook">, the folder will be open and
1152 +closed again each time you will add to it. If you omit <ref
1153 +id="close-hook" name="close-hook"> (or give empty command) , the
1154 +folder will be open in the mode. If you specify <ref
1155 +id="append-hook" name="append-hook"> though you'll be able to append
1158 +Note that Mutt will only try to use hooks if the file is not in one of
1159 +the accepted formats. In particular, if the file is empty, mutt
1160 +supposes it is not compressed. This is important because it allows the
1161 +use of programs that do not have well defined extensions. Just use
1162 +&dquot;.&dquot; as a regexp. But this may be surprising if your
1163 +compressing script produces empty files. In this situation, unset <ref
1164 +id="save_empty" name="$save_empty">, so that the compressed file
1165 +will be removed if you delete all of the messages.
1167 +<sect2>Open a compressed mailbox for reading<label id="open-hook">
1169 +Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
1171 +The <em/command/ is the command that can be used for opening the
1172 +folders whose names match <em/regexp/.
1174 +The <em/command/ string is the printf-like format string, and it
1175 +should accept two parameters: %f, which is replaced with the
1176 +(compressed) folder name, and %t which is replaced with the
1177 +name of the temporary folder to which to write.
1179 +%f and %t can be repeated any number of times in the
1180 +command string, and all of the entries are replaced with the
1181 +appropriate folder name. In addition, %% is replaced by
1182 +%, as in printf, and any other %anything is left as is.
1184 +The <em/command/ should <bf/not/ remove the original compressed file.
1185 +The <em/command/ should return non-zero exit status if it fails, so
1186 +mutt knows something's wrong.
1191 +open-hook \\.gz$ "gzip -cd %f > %t"
1194 +If the <em/command/ is empty, this operation is disabled for this file
1197 +<sect2>Write a compressed mailbox<label id="close-hook">
1199 +Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
1201 +This is used to close the folder that was open with the <ref id="open-hook"
1202 +name="open-hook"> command after some changes were made to it.
1204 +The <em/command/ string is the command that can be used for closing the
1205 +folders whose names match <em/regexp/. It has the same format as in
1206 +the <ref id="open-hook" name="open-hook"> command. Temporary folder
1207 +in this case is the folder previously produced by the <ref id="open-hook"
1208 +name="open-hook"> command.
1210 +The <em/command/ should <bf/not/ remove the decompressed file. The
1211 +<em/command/ should return non-zero exit status if it fails, so mutt
1212 +knows something's wrong.
1217 +close-hook \\.gz$ "gzip -c %t > %f"
1220 +If the <em/command/ is empty, this operation is disabled for this file
1221 +type, and the file can only be open in the read-only mode.
1223 +<ref id="close-hook" name ="close-hook"> is not called when you exit
1224 +from the folder if the folder was not changed.
1226 +<sect2>Append a message to a compressed mailbox<label id="append-hook">
1228 +Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
1230 +This command is used for saving to an existing compressed folder.
1231 +The <em/command/ is the command that can be used for appending to the
1232 +folders whose names match <em/regexp/. It has the same format as in
1233 + the <ref id="open-hook" name="open-hook"> command.
1234 +The temporary folder in this case contains the messages that are being
1237 +The <em/command/ should <bf/not/ remove the decompressed file. The
1238 +<em/command/ should return non-zero exit status if it fails, so mutt
1239 +knows something's wrong.
1244 +append-hook \\.gz$ "gzip -c %t >> %f"
1247 +When <ref id="append-hook" name="append-hook"> is used, the folder is
1248 +not opened, which saves time, but this means that we can not find out
1249 +what the folder type is. Thus the default (<ref id="mbox_type"
1250 +name="$mbox_type">) type is always supposed (i.e.
1251 +this is the format used for the temporary folder).
1253 +If the file does not exist when you save to it, <ref id="close-hook"
1254 +name="close-hook"> is called, and not <ref id="append-hook"
1255 +name="append-hook">. <ref id="append-hook" name="append-hook"> is only
1256 +for appending to existing folders.
1258 +If the <em/command/ is empty, this operation is disabled for this file
1259 +type. In this case, the folder will be open and closed again (using
1260 +<ref id="open-hook" name="open-hook"> and <ref id="close-hook"
1261 +name="close-hook">respectively) each time you will add to it.
1263 +<sect2>Encrypted folders
1265 +The compressed folders support can also be used to handle encrypted
1266 +folders. If you want to encrypt a folder with PGP, you may want to use
1267 +the following hooks:
1270 +open-hook \\.pgp$ "pgp -f < %f > %t"
1271 +close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
1274 +Please note, that PGP does not support appending to an encrypted
1275 +folder, so there is no append-hook defined.
1277 +If you are using GnuPG instead of PGP, you may use the following hooks
1281 +open-hook \\.gpg$ "gpg --decrypt < %f > %t"
1282 +close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId < %t > %f"
1285 +<bf/Note:/ the folder is temporary stored decrypted in the /tmp
1286 +directory, where it can be read by your system administrator. So think
1287 +about the security aspects of this.
1289 <sect>Mutt's MIME Support
1291 Quite a bit of effort has been made to make Mutt the premier text-mode
1292 @@ -2869,12 +3039,16 @@
1294 <tt><ref id="alternative_order" name="alternative_order"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
1296 +<tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
1298 <tt><ref id="auto_view" name="auto_view"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
1300 <tt><ref id="bind" name="bind"></tt> <em/map/ <em/key/ <em/function/
1302 <tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
1304 +<tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
1306 <tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ [ <em/regexp/ ]
1308 <tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ [ <em/pattern/ ... ]
1309 @@ -2917,6 +3091,8 @@
1311 <tt><ref id="my_hdr" name="unmy_hdr"></tt> <em/field/ [ <em/field/ ... ]
1313 +<tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
1315 <tt><ref id="pgp-hook" name="pgp-hook"></tt> <em/pattern/ <em/key-id/
1317 <tt><ref id="push" name="push"></tt> <em/string/
1318 diff -Nur mutt-1.3.27.orig/doc/manual.txt mutt-1.3.27/doc/manual.txt
1319 --- mutt-1.3.27.orig/doc/manual.txt Tue Jan 1 21:18:08 2002
1320 +++ mutt-1.3.27/doc/manual.txt Fri Feb 1 22:51:32 2002
1322 4.11.2 Authentication
1323 4.12 Managing multiple IMAP/POP accounts (OPTIONAL)
1324 4.13 Start a WWW Browser on URLs (EXTERNAL)
1325 + 4.14 Compressed folders Support (OPTIONAL)
1326 + 4.14.1 Open a compressed mailbox for reading
1327 + 4.14.2 Write a compressed mailbox
1328 + 4.14.3 Append a message to a compressed mailbox
1329 + 4.14.4 Encrypted folders
1331 5. Mutt's MIME Support
1332 5.1 Using MIME in Mutt
1333 @@ -2554,6 +2559,156 @@
1334 macro index \cb |urlview\n
1335 macro pager \cb |urlview\n
1337 + 4
\b4.
\b.1
\b14
\b4.
\b. C
\bCo
\bom
\bmp
\bpr
\bre
\bes
\bss
\bse
\bed
\bd f
\bfo
\bol
\bld
\bde
\ber
\brs
\bs S
\bSu
\bup
\bpp
\bpo
\bor
\brt
\bt (
\b(O
\bOP
\bPT
\bTI
\bIO
\bON
\bNA
\bAL
\bL)
\b)
1339 + If Mutt was compiled with compressed folders support (by running the
1340 + _
\bc_
\bo_
\bn_
\bf_
\bi_
\bg_
\bu_
\br_
\be script with the _
\b-_
\b-_
\be_
\bn_
\ba_
\bb_
\bl_
\be_
\b-_
\bc_
\bo_
\bm_
\bp_
\br_
\be_
\bs_
\bs_
\be_
\bd flag), Mutt can open
1341 + folders stored in an arbitrary format, provided that the user has a
1342 + script to convert from/to this format to one of the accepted.
1344 + The most common use is to open compressed archived folders e.g. with
1347 + In addition, the user can provide a script that gets a folder in an
1348 + accepted format and appends its context to the folder in the user-
1349 + defined format, which may be faster than converting the entire folder
1350 + to the accepted format, appending to it and converting back to the
1351 + user-defined format.
1353 + There are three hooks defined (``open-hook'', ``close-hook'' and
1354 + ``append-hook'') which define commands to uncompress and compress a
1355 + folder and to append messages to an existing compressed folder
1360 + open-hook \\.gz$ "gzip -cd %f > %t"
1361 + close-hook \\.gz$ "gzip -c %t > %f"
1362 + append-hook \\.gz$ "gzip -c %t >> %f"
1364 + You do not have to specify all of the commands. If you omit ``append-
1365 + hook'', the folder will be open and closed again each time you will
1366 + add to it. If you omit ``close-hook'' (or give empty command) , the
1367 + folder will be open in the mode. If you specify ``append-hook''
1368 + though you'll be able to append to the folder.
1370 + Note that Mutt will only try to use hooks if the file is not in one of
1371 + the accepted formats. In particular, if the file is empty, mutt
1372 + supposes it is not compressed. This is important because it allows the
1373 + use of programs that do not have well defined extensions. Just use "."
1374 + as a regexp. But this may be surprising if your compressing script
1375 + produces empty files. In this situation, unset ``$save_empty'', so
1376 + that the compressed file will be removed if you delete all of the
1379 + 4
\b4.
\b.1
\b14
\b4.
\b.1
\b1.
\b. O
\bOp
\bpe
\ben
\bn a
\ba c
\bco
\bom
\bmp
\bpr
\bre
\bes
\bss
\bse
\bed
\bd m
\bma
\bai
\bil
\blb
\bbo
\box
\bx f
\bfo
\bor
\br r
\bre
\bea
\bad
\bdi
\bin
\bng
\bg
1381 + Usage: open-hook _
\br_
\be_
\bg_
\be_
\bx_
\bp "_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd"
1383 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is the command that can be used for opening the folders
1384 + whose names match _
\br_
\be_
\bg_
\be_
\bx_
\bp.
1386 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd string is the printf-like format string, and it should
1387 + accept two parameters: %f, which is replaced with the (compressed)
1388 + folder name, and %t which is replaced with the name of the temporary
1389 + folder to which to write.
1391 + %f and %t can be repeated any number of times in the command string,
1392 + and all of the entries are replaced with the appropriate folder name.
1393 + In addition, %% is replaced by %, as in printf, and any other
1394 + %anything is left as is.
1396 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd should n
\bno
\bot
\bt remove the original compressed file. The
1397 + _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd should return non-zero exit status if it fails, so mutt knows
1398 + something's wrong.
1402 + open-hook \\.gz$ "gzip -cd %f > %t"
1404 + If the _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is empty, this operation is disabled for this file
1407 + 4
\b4.
\b.1
\b14
\b4.
\b.2
\b2.
\b. W
\bWr
\bri
\bit
\bte
\be a
\ba c
\bco
\bom
\bmp
\bpr
\bre
\bes
\bss
\bse
\bed
\bd m
\bma
\bai
\bil
\blb
\bbo
\box
\bx
1409 + Usage: close-hook _
\br_
\be_
\bg_
\be_
\bx_
\bp "_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd"
1411 + This is used to close the folder that was open with the ``open-hook''
1412 + command after some changes were made to it.
1414 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd string is the command that can be used for closing the
1415 + folders whose names match _
\br_
\be_
\bg_
\be_
\bx_
\bp. It has the same format as in the
1416 + ``open-hook'' command. Temporary folder in this case is the folder
1417 + previously produced by the ``open-hook'' command.
1419 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd should n
\bno
\bot
\bt remove the decompressed file. The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd
1420 + should return non-zero exit status if it fails, so mutt knows
1421 + something's wrong.
1425 + close-hook \\.gz$ "gzip -c %t > %f"
1427 + If the _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is empty, this operation is disabled for this file
1428 + type, and the file can only be open in the read-only mode.
1430 + ``close-hook'' is not called when you exit from the folder if the
1431 + folder was not changed.
1433 + 4
\b4.
\b.1
\b14
\b4.
\b.3
\b3.
\b. A
\bAp
\bpp
\bpe
\ben
\bnd
\bd a
\ba m
\bme
\bes
\bss
\bsa
\bag
\bge
\be t
\bto
\bo a
\ba c
\bco
\bom
\bmp
\bpr
\bre
\bes
\bss
\bse
\bed
\bd m
\bma
\bai
\bil
\blb
\bbo
\box
\bx
1435 + Usage: append-hook _
\br_
\be_
\bg_
\be_
\bx_
\bp "_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd"
1437 + This command is used for saving to an existing compressed folder. The
1438 + _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is the command that can be used for appending to the folders
1439 + whose names match _
\br_
\be_
\bg_
\be_
\bx_
\bp. It has the same format as in the ``open-
1440 + hook'' command. The temporary folder in this case contains the
1441 + messages that are being appended.
1443 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd should n
\bno
\bot
\bt remove the decompressed file. The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd
1444 + should return non-zero exit status if it fails, so mutt knows
1445 + something's wrong.
1449 + append-hook \\.gz$ "gzip -c %t >> %f"
1451 + When ``append-hook'' is used, the folder is not opened, which saves
1452 + time, but this means that we can not find out what the folder type is.
1453 + Thus the default (``$mbox_type'') type is always supposed (i.e. this
1454 + is the format used for the temporary folder).
1456 + If the file does not exist when you save to it, ``close-hook'' is
1457 + called, and not ``append-hook''. ``append-hook'' is only for appending
1458 + to existing folders.
1460 + If the _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is empty, this operation is disabled for this file
1461 + type. In this case, the folder will be open and closed again (using
1462 + ``open-hook'' and ``close-hook''respectively) each time you will add
1465 + 4
\b4.
\b.1
\b14
\b4.
\b.4
\b4.
\b. E
\bEn
\bnc
\bcr
\bry
\byp
\bpt
\bte
\bed
\bd f
\bfo
\bol
\bld
\bde
\ber
\brs
\bs
1467 + The compressed folders support can also be used to handle encrypted
1468 + folders. If you want to encrypt a folder with PGP, you may want to use
1469 + the following hooks:
1471 + open-hook \\.pgp$ "pgp -f < %f > %t"
1472 + close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
1474 + Please note, that PGP does not support appending to an encrypted
1475 + folder, so there is no append-hook defined.
1477 + If you are using GnuPG instead of PGP, you may use the following hooks
1480 + open-hook \\.gpg$ "gpg --decrypt < %f > %t"
1481 + close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId < %t > %f"
1483 + N
\bNo
\bot
\bte
\be:
\b: the folder is temporary stored decrypted in the /tmp directory,
1484 + where it can be read by your system administrator. So think about the
1485 + security aspects of this.
1487 5
\b5.
\b. M
\bMu
\but
\btt
\bt'
\b's
\bs M
\bMI
\bIM
\bME
\bE S
\bSu
\bup
\bpp
\bpo
\bor
\brt
\bt
1489 Quite a bit of effort has been made to make Mutt the premier text-mode
1490 @@ -3148,6 +3303,8 @@
1492 · ``unmy_hdr'' _
\bf_
\bi_
\be_
\bl_
\bd [ _
\bf_
\bi_
\be_
\bl_
\bd ... ]
1494 + · ``open-hook'' _
\br_
\be_
\bg_
\be_
\bx_
\bp "_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd"
1496 · ``pgp-hook'' _
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn _
\bk_
\be_
\by_
\b-_
\bi_
\bd
1498 · ``push'' _
\bs_
\bt_
\br_
\bi_
\bn_
\bg
1499 diff -Nur mutt-1.3.27.orig/doc/muttrc.man mutt-1.3.27/doc/muttrc.man
1500 --- mutt-1.3.27.orig/doc/muttrc.man Fri Dec 28 18:14:28 2001
1501 +++ mutt-1.3.27/doc/muttrc.man Fri Feb 1 22:51:32 2002
1502 @@ -258,6 +258,24 @@
1503 The pgp-hook command provides a method by which you can
1504 specify the ID of the public key to be used when encrypting messages
1505 to a certain recipient.
1508 +\fBopen-hook\fP \fIregexp\fP "\fIcommand\fP"
1509 +\fBclose-hook\fP \fIregexp\fP "\fIcommand\fP"
1510 +\fBappend-hook\fP \fIregexp\fP "\fIcommand\fP"
1513 +These commands provide a way to handle compressed folders. The given
1514 +\fBregexp\fP specifies which folders are taken as compressed (e.g.
1515 +"\fI\\\\.gz$\fP"). The commands tell Mutt how to uncompress a folder
1516 +(\fBopen-hook\fP), compress a folder (\fBclose-hook\fP) or append a
1517 +compressed mail to a compressed folder (\fBappend-hook\fP). The
1518 +\fIcommand\fP string is the
1520 +like format string, and it should accept two parameters: \fB%f\fP,
1521 +which is replaced with the (compressed) folder name, and \fB%t\fP
1522 +which is replaced with the name of the temporary folder to which to
1525 \fBpush\fP \fIstring\fP
1526 This command adds the named \fIstring\fP to the keyboard buffer.
1527 diff -Nur mutt-1.3.27.orig/doc/muttrc.man.head mutt-1.3.27/doc/muttrc.man.head
1528 --- mutt-1.3.27.orig/doc/muttrc.man.head Wed Jan 23 00:42:01 2002
1529 +++ mutt-1.3.27/doc/muttrc.man.head Fri Feb 1 22:51:32 2002
1530 @@ -258,6 +258,24 @@
1531 The pgp-hook command provides a method by which you can
1532 specify the ID of the public key to be used when encrypting messages
1533 to a certain recipient.
1536 +\fBopen-hook\fP \fIregexp\fP "\fIcommand\fP"
1537 +\fBclose-hook\fP \fIregexp\fP "\fIcommand\fP"
1538 +\fBappend-hook\fP \fIregexp\fP "\fIcommand\fP"
1541 +These commands provide a way to handle compressed folders. The given
1542 +\fBregexp\fP specifies which folders are taken as compressed (e.g.
1543 +"\fI\\\\.gz$\fP"). The commands tell Mutt how to uncompress a folder
1544 +(\fBopen-hook\fP), compress a folder (\fBclose-hook\fP) or append a
1545 +compressed mail to a compressed folder (\fBappend-hook\fP). The
1546 +\fIcommand\fP string is the
1548 +like format string, and it should accept two parameters: \fB%f\fP,
1549 +which is replaced with the (compressed) folder name, and \fB%t\fP
1550 +which is replaced with the name of the temporary folder to which to
1553 \fBpush\fP \fIstring\fP
1554 This command adds the named \fIstring\fP to the keyboard buffer.
1555 diff -Nur mutt-1.3.27.orig/hook.c mutt-1.3.27/hook.c
1556 --- mutt-1.3.27.orig/hook.c Fri Jun 29 12:05:50 2001
1557 +++ mutt-1.3.27/hook.c Fri Feb 1 22:51:32 2002
1560 #include "mailbox.h"
1562 +#ifdef USE_COMPRESSED
1563 +#include "compress.h"
1570 memset (&pattern, 0, sizeof (pattern));
1571 pattern.data = safe_strdup (path);
1573 +#ifdef USE_COMPRESSED
1574 + else if (data & (M_APPENDHOOK | M_OPENHOOK | M_CLOSEHOOK))
1576 + if (mutt_test_compress_command (command.data))
1578 + strfcpy (err->data, _("bad formatted command string"), err->dsize);
1583 else if (DefaultHook && (data & (M_FOLDERHOOK | M_MBOXHOOK | M_SENDHOOK |
1584 M_FCCHOOK | M_SAVEHOOK | M_MESSAGEHOOK)))
1586 diff -Nur mutt-1.3.27.orig/init.h mutt-1.3.27/init.h
1587 --- mutt-1.3.27.orig/init.h Mon Dec 10 11:09:03 2001
1588 +++ mutt-1.3.27/init.h Fri Feb 1 22:51:32 2002
1589 @@ -2447,6 +2447,11 @@
1590 { "fcc-hook", mutt_parse_hook, M_FCCHOOK },
1591 { "fcc-save-hook", mutt_parse_hook, M_FCCHOOK | M_SAVEHOOK },
1592 { "folder-hook", mutt_parse_hook, M_FOLDERHOOK },
1593 +#ifdef USE_COMPRESSED
1594 + { "open-hook", mutt_parse_hook, M_OPENHOOK },
1595 + { "close-hook", mutt_parse_hook, M_CLOSEHOOK },
1596 + { "append-hook", mutt_parse_hook, M_APPENDHOOK },
1598 { "hdr_order", parse_list, UL &HeaderOrderList },
1599 { "iconv-hook", mutt_parse_hook, M_ICONVHOOK },
1600 { "ignore", parse_ignore, 0 },
1601 diff -Nur mutt-1.3.27.orig/main.c mutt-1.3.27/main.c
1602 --- mutt-1.3.27.orig/main.c Wed Nov 7 11:40:26 2001
1603 +++ mutt-1.3.27/main.c Fri Feb 1 22:51:32 2002
1604 @@ -328,6 +328,12 @@
1609 +#ifdef USE_COMPRESSED
1615 #ifdef HAVE_WC_FUNCS
1617 diff -Nur mutt-1.3.27.orig/mbox.c mutt-1.3.27/mbox.c
1618 --- mutt-1.3.27.orig/mbox.c Wed Oct 31 10:40:05 2001
1619 +++ mutt-1.3.27/mbox.c Fri Feb 1 22:51:32 2002
1624 +#ifdef USE_COMPRESSED
1625 +#include "compress.h"
1628 #include <sys/stat.h>
1631 @@ -1045,6 +1049,12 @@
1632 int mbox_close_mailbox (CONTEXT *ctx)
1634 mx_unlock_file (ctx->path, fileno (ctx->fp), 1);
1636 +#ifdef USE_COMPRESSED
1637 + if (ctx->compressinfo)
1638 + mutt_slow_close_compressed (ctx);
1641 mutt_unblock_signals ();
1642 mx_fastclose_mailbox (ctx);
1644 diff -Nur mutt-1.3.27.orig/mutt.h mutt-1.3.27/mutt.h
1645 --- mutt-1.3.27.orig/mutt.h Wed Jan 23 00:42:01 2002
1646 +++ mutt-1.3.27/mutt.h Fri Feb 1 22:51:32 2002
1647 @@ -143,6 +143,11 @@
1648 #define M_PGPHOOK (1<<8)
1650 #define M_ACCOUNTHOOK (1<<9)
1651 +#ifdef USE_COMPRESSED
1652 +#define M_OPENHOOK (1<<10)
1653 +#define M_APPENDHOOK (1<<11)
1654 +#define M_CLOSEHOOK (1<<12)
1657 /* tree characters for linearize_tree and print_enriched_string */
1658 #define M_TREE_LLCORNER 1
1659 @@ -745,6 +750,11 @@
1660 void *data; /* driver specific data */
1661 #endif /* USE_IMAP */
1663 +#ifdef USE_COMPRESSED
1664 + void *compressinfo; /* compressed mbox module private data */
1665 + char *realpath; /* path to compressed mailbox */
1666 +#endif /* USE_COMPRESSED */
1668 short magic; /* mailbox type */
1670 unsigned int locked : 1; /* is the mailbox locked? */
1671 diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
1672 --- mutt-1.3.27.orig/mx.c Wed Jan 23 00:42:01 2002
1673 +++ mutt-1.3.27/mx.c Fri Feb 1 22:51:32 2002
1678 +#ifdef USE_COMPRESSED
1679 +#include "compress.h"
1685 @@ -448,6 +452,10 @@
1689 +#ifdef USE_COMPRESSED
1690 + if (magic == 0 && mutt_can_read_compressed (path))
1691 + return M_COMPRESSED;
1696 @@ -489,6 +497,13 @@
1700 +#ifdef USE_COMPRESSED
1701 + /* special case for appending to compressed folders -
1702 + * even if we can not open them for reading */
1703 + if (mutt_can_append_compressed (ctx->path))
1704 + mutt_open_append_compressed (ctx);
1710 @@ -649,7 +664,12 @@
1713 ctx->magic = mx_get_magic (path);
1716 +#ifdef USE_COMPRESSED
1717 + if (ctx->magic == M_COMPRESSED)
1718 + mutt_open_read_compressed (ctx);
1722 mutt_error (_("%s is not a mailbox."), path);
1724 @@ -755,6 +775,10 @@
1725 mutt_free_header (&ctx->hdrs[i]);
1726 safe_free ((void **) &ctx->hdrs);
1727 safe_free ((void **) &ctx->v2r);
1728 +#ifdef USE_COMPRESSED
1729 + if (ctx->compressinfo)
1730 + mutt_fast_close_compressed (ctx);
1732 safe_free ((void **) &ctx->path);
1733 safe_free ((void **) &ctx->pattern);
1734 if (ctx->limit_pattern)
1735 @@ -812,6 +836,12 @@
1736 if (tmp && tmp->new == 0)
1737 mutt_update_mailbox (tmp);
1740 +#ifdef USE_COMPRESSED
1741 + if (rc == 0 && ctx->compressinfo)
1742 + return mutt_sync_compressed (ctx);
1748 @@ -1018,6 +1048,11 @@
1749 !mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY))
1750 mx_unlink_empty (ctx->path);
1752 +#ifdef USE_COMPRESSED
1753 + if (ctx->compressinfo && mutt_slow_close_compressed (ctx))
1757 mx_fastclose_mailbox (ctx);
1760 @@ -1325,6 +1360,11 @@
1764 +#ifdef USE_COMPRESSED
1765 + if (ctx->compressinfo)
1766 + return mutt_check_mailbox_compressed (ctx);
1771 if (ctx->locked) lock = 0;
1772 diff -Nur mutt-1.3.27.orig/mx.h mutt-1.3.27/mx.h
1773 --- mutt-1.3.27.orig/mx.h Wed Oct 31 10:40:05 2001
1774 +++ mutt-1.3.27/mx.h Fri Feb 1 22:51:32 2002
1779 +#ifdef USE_COMPRESSED
1784 WHERE short DefaultMagic INITVAL (M_MBOX);
1785 diff -Nur mutt-1.3.27.orig/po/POTFILES.in mutt-1.3.27/po/POTFILES.in
1786 --- mutt-1.3.27.orig/po/POTFILES.in Tue Oct 10 21:18:37 2000
1787 +++ mutt-1.3.27/po/POTFILES.in Fri Feb 1 22:51:32 2002
1796 diff -Nur mutt-1.3.27.orig/po/de.po mutt-1.3.27/po/de.po
1797 --- mutt-1.3.27.orig/po/de.po Wed Jan 23 00:43:05 2002
1798 +++ mutt-1.3.27/po/de.po Fri Feb 1 22:51:32 2002
1799 @@ -654,6 +654,48 @@
1800 msgid "Message written."
1801 msgstr "Nachricht geschrieben."
1803 +#: compress.c:203 mbox.c:661
1804 +msgid "Mailbox was corrupted!"
1805 +msgstr "Mailbox wurde zerstört!"
1807 +#: compress.c:228 compress.c:253
1809 +msgid "Decompressing %s...\n"
1810 +msgstr "Entpacke %s...\n"
1812 +#: compress.c:246 compress.c:367 compress.c:443 mbox.c:706
1813 +msgid "Unable to lock mailbox!"
1814 +msgstr "Kann Mailbox nicht für exklusiven Zugriff sperren!"
1818 +msgid "Error executing: %s : unable to open the mailbox!\n"
1819 +msgstr "Fehler beim Ausführen von %s : Kann die Mailbox nicht öffnen!\n"
1821 +#: compress.c:350 compress.c:377 compress.c:423 compress.c:454
1823 +msgid "Compressing %s...\n"
1824 +msgstr "Komprimiere %s...\n"
1829 +"%s: Error compressing mailbox! Original mailbox deleted, uncompressed one "
1832 +"%s: Fehler beim Komprimieren der Mailbox! Ursprüngliche Mailbox gelöscht, "
1833 +"entpackte gespeichert!\n"
1835 +#: compress.c:425 compress.c:456
1837 +msgid "Compressed-appending to %s...\n"
1838 +msgstr "Hänge komprimiert an %s... an\n"
1842 +msgid " %s: Error compressing mailbox! Uncompressed one kept!\n"
1843 +msgstr " %s: Fehler beim packen der Mailbox! Entpackte Mailbox gespeichert!\n"
1848 @@ -1137,6 +1179,10 @@
1850 msgstr "Hilfe für %s"
1853 +msgid "bad formatted command string"
1854 +msgstr "Hook enthält nicht die Muster %f und %t"
1857 msgid "unhook: Can't do unhook * from within a hook."
1858 msgstr "unhook: Innerhalb eines hook kann kein unhook * aufgerufen werden."
1859 @@ -2459,18 +2505,10 @@
1860 msgid "Mailbox is corrupt!"
1861 msgstr "Mailbox fehlerhaft!"
1864 -msgid "Mailbox was corrupted!"
1865 -msgstr "Mailbox wurde zerstört!"
1867 #: mbox.c:702 mbox.c:978
1868 msgid "Fatal error! Could not reopen mailbox!"
1869 msgstr "Fataler Fehler, konnte Mailbox nicht erneut öffnen!"
1872 -msgid "Unable to lock mailbox!"
1873 -msgstr "Kann Mailbox nicht für exklusiven Zugriff sperren!"
1875 #. this means ctx->changed or ctx->deleted was set, but no
1876 #. * messages were found to be changed or deleted. This should
1877 #. * never happen, is we presume it is a bug in mutt.
1878 diff -Nur mutt-1.3.27.orig/status.c mutt-1.3.27/status.c
1879 --- mutt-1.3.27.orig/status.c Fri Mar 3 11:10:14 2000
1880 +++ mutt-1.3.27/status.c Fri Feb 1 22:51:32 2002
1884 snprintf (fmt, sizeof(fmt), "%%%ss", prefix);
1885 +#ifdef USE_COMPRESSED
1886 + if (Context && Context->compressinfo && Context->realpath)
1888 + strfcpy (tmp, Context->realpath, sizeof (tmp));
1889 + mutt_pretty_mailbox (tmp);
1893 if (Context && Context->path)
1895 strfcpy (tmp, Context->path, sizeof (tmp));