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 +# open-hook \\.bz2$ "bzip2 -cd %f > %t"
68 +# close-hook \\.bz2$ "bzip2 -c %t > %f"
69 +# append-hook \\.bz2$ "bzip2 -c %t >> %f"
71 # If Mutt is unable to determine your site's domain name correctly, you can
72 # set the default here.
74 diff -Nur mutt-1.3.27.orig/Muttrc.head mutt-1.3.27/Muttrc.head
75 --- mutt-1.3.27.orig/Muttrc.head Tue Jan 1 21:18:02 2002
76 +++ mutt-1.3.27/Muttrc.head Fri Feb 1 22:51:32 2002
78 macro index <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
79 macro pager <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
81 +# Use folders which match on \\.gz$ as gzipped folders:
82 +# open-hook \\.gz$ "gzip -cd %f > %t"
83 +# close-hook \\.gz$ "gzip -c %t > %f"
84 +# append-hook \\.gz$ "gzip -c %t >> %f"
86 +# open-hook \\.bz2$ "bzip2 -cd %f > %t"
87 +# close-hook \\.bz2$ "bzip2 -c %t > %f"
88 +# append-hook \\.bz2$ "bzip2 -c %t >> %f"
90 # If Mutt is unable to determine your site's domain name correctly, you can
91 # set the default here.
93 diff -Nur mutt-1.3.27.orig/Muttrc.head.in mutt-1.3.27/Muttrc.head.in
94 --- mutt-1.3.27.orig/Muttrc.head.in Mon Mar 20 11:25:49 2000
95 +++ mutt-1.3.27/Muttrc.head.in Fri Feb 1 22:51:32 2002
97 macro index <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
98 macro pager <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
100 +# Use folders which match on \\.gz$ as gzipped folders:
101 +# open-hook \\.gz$ "gzip -cd %f > %t"
102 +# close-hook \\.gz$ "gzip -c %t > %f"
103 +# append-hook \\.gz$ "gzip -c %t >> %f"
105 +# open-hook \\.bz2$ "bzip2 -cd %f > %t"
106 +# close-hook \\.bz2$ "bzip2 -c %t > %f"
107 +# append-hook \\.bz2$ "bzip2 -c %t >> %f"
109 # If Mutt is unable to determine your site's domain name correctly, you can
110 # set the default here.
112 diff -Nur mutt-1.3.27.orig/PATCHES mutt-1.3.27/PATCHES
113 --- mutt-1.3.27.orig/PATCHES Mon Nov 26 20:16:22 2001
114 +++ mutt-1.3.27/PATCHES Fri Feb 1 22:51:32 2002
116 +patch-1.3.27.rr.compressed.1
117 diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
118 --- mutt-1.3.27.orig/compress.c Thu Jan 1 01:00:00 1970
119 +++ mutt-1.3.27/compress.c Fri Feb 1 22:51:32 2002
122 + * Copyright (C) 1997 Alain Penders <Alain@Finale-Dev.com>
124 + * This program is free software; you can redistribute it and/or modify
125 + * it under the terms of the GNU General Public License as published by
126 + * the Free Software Foundation; either version 2 of the License, or
127 + * (at your option) any later version.
129 + * This program is distributed in the hope that it will be useful,
130 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
131 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
132 + * GNU General Public License for more details.
134 + * You should have received a copy of the GNU General Public License
135 + * along with this program; if not, write to the Free Software
136 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
141 +#ifdef USE_COMPRESSED
144 +#include "mailbox.h"
145 +#include "mutt_curses.h"
150 +#include <sys/stat.h>
154 + const char *close; /* close-hook command */
155 + const char *open; /* open-hook command */
156 + const char *append; /* append-hook command */
157 + off_t size; /* size of real folder */
162 + * ctx - context to lock
163 + * excl - exclusive lock?
164 + * retry - should retry if unable to lock?
166 +int mbox_lock_compressed (CONTEXT *ctx, FILE *fp, int excl, int retry)
170 + if ((r = mx_lock_file (ctx->realpath, fileno (fp), excl, 1, retry)) == 0)
172 + else if (retry && !excl)
181 +void mbox_unlock_compressed (CONTEXT *ctx, FILE *fp)
187 + mx_unlock_file (ctx->realpath, fileno (fp), 1);
192 +static int is_new (const char *path)
194 + return (access (path, W_OK) != 0 && errno == ENOENT) ? 1 : 0;
197 +static const char* find_compress_hook (int type, const char *path)
199 + const char* c = mutt_find_hook (type, path);
200 + return (!c || !*c) ? NULL : c;
203 +int mutt_can_read_compressed (const char *path)
205 + return find_compress_hook (M_OPENHOOK, path) ? 1 : 0;
209 + * if the file is new, we really do not append, but create, and so use
210 + * close-hook, and not append-hook
212 +static const char* get_append_command (const char *path, const CONTEXT* ctx)
214 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
215 + return (is_new (path)) ? ci->close : ci->append;
218 +int mutt_can_append_compressed (const char *path)
223 + return (find_compress_hook (M_CLOSEHOOK, path) ? 1 : 0);
225 + magic = mx_get_magic (path);
227 + if (magic != 0 && magic != M_COMPRESSED)
230 + return (find_compress_hook (M_APPENDHOOK, path)
231 + || (find_compress_hook (M_OPENHOOK, path)
232 + && find_compress_hook (M_CLOSEHOOK, path))) ? 1 : 0;
235 +/* open a compressed mailbox */
236 +static COMPRESS_INFO *set_compress_info (CONTEXT *ctx)
240 + /* Now lets uncompress this thing */
241 + ci = safe_malloc (sizeof (COMPRESS_INFO));
242 + ctx->compressinfo = (void*) ci;
243 + ci->append = find_compress_hook (M_APPENDHOOK, ctx->path);
244 + ci->open = find_compress_hook (M_OPENHOOK, ctx->path);
245 + ci->close = find_compress_hook (M_CLOSEHOOK, ctx->path);
249 +static void set_path (CONTEXT* ctx)
251 + char tmppath[_POSIX_PATH_MAX];
253 + /* Setup the right paths */
254 + ctx->realpath = ctx->path;
256 + /* Uncompress to /tmp */
257 + mutt_mktemp (tmppath);
258 + ctx->path = safe_malloc (strlen (tmppath) + 1);
259 + strcpy (ctx->path, tmppath);
262 +static int get_size (const char* path)
265 + if (stat (path, &sb) != 0)
267 + return (sb.st_size);
270 +static void store_size (CONTEXT* ctx)
272 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
273 + ci->size = get_size (ctx->realpath);
277 +compresshook_format_str (char *dest, size_t destlen, char op, const char *src,
278 + const char *fmt, const char *ifstring,
279 + const char *elsestring, unsigned long data,
282 + char tmp[SHORT_STRING];
284 + CONTEXT *ctx = (CONTEXT *) data;
288 + snprintf (tmp, sizeof (tmp), "%%%ss", fmt);
289 + snprintf (dest, destlen, tmp, ctx->realpath);
292 + snprintf (tmp, sizeof (tmp), "%%%ss", fmt);
293 + snprintf (dest, destlen, tmp, ctx->path);
300 + * check that the command has both %f and %t
301 + * 0 means OK, -1 means error
303 +int mutt_test_compress_command (const char* cmd)
305 + return (strstr (cmd, "%f") && strstr (cmd, "%t")) ? 0 : -1;
308 +static char *get_compression_cmd (const char* cmd, const CONTEXT* ctx)
310 + char expanded[_POSIX_PATH_MAX];
311 + mutt_FormatString (expanded, sizeof (expanded), cmd, compresshook_format_str,
312 + (unsigned long) ctx, 0);
313 + return safe_strdup (expanded);
316 +int mutt_check_mailbox_compressed (CONTEXT* ctx)
318 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
319 + if (ci->size != get_size (ctx->realpath))
321 + safe_free ((void**)&ctx->compressinfo);
322 + safe_free ((void**)&ctx->realpath);
323 + mutt_error _("Mailbox was corrupted!");
329 +int mutt_open_read_compressed (CONTEXT *ctx)
335 + COMPRESS_INFO *ci = set_compress_info (ctx);
338 + safe_free ((void**)ctx->compressinfo);
341 + if (!ci->close || access (ctx->path, W_OK) != 0)
348 + mutt_message (_("Decompressing %s..."), ctx->realpath);
350 + cmd = get_compression_cmd (ci->open, ctx);
353 + dprint (2, (debugfile, "DecompressCmd: '%s'\n", cmd));
355 + if ((fp = fopen (ctx->realpath, "r")) == NULL)
357 + mutt_perror (ctx->realpath);
358 + safe_free ((void **)&cmd);
361 + mutt_block_signals ();
362 + if (mbox_lock_compressed (ctx, fp, 0, 1) == -1)
365 + mutt_unblock_signals ();
366 + mutt_error _("Unable to lock mailbox!");
367 + safe_free ((void **)&cmd);
373 + fprintf (stderr, _("Decompressing %s...\n"),ctx->realpath);
374 + rc = mutt_system (cmd);
375 + mbox_unlock_compressed (ctx, fp);
376 + mutt_unblock_signals ();
381 + mutt_any_key_to_continue (NULL);
383 + safe_free ((void**)ctx->compressinfo);
384 + mutt_error (_("Error executing: %s : unable to open the mailbox!\n"), cmd);
386 + safe_free ((void **)&cmd);
390 + if (mutt_check_mailbox_compressed (ctx))
393 + ctx->magic = mx_get_magic (ctx->path);
398 +void restore_path (CONTEXT* ctx)
400 + safe_free ((void **)&ctx->path);
401 + ctx->path = ctx->realpath;
404 +/* remove the temporary mailbox */
405 +void remove_file (CONTEXT* ctx)
407 + if (ctx->magic == M_MBOX || ctx->magic == M_MMDF)
408 + remove (ctx->path);
411 +int mutt_open_append_compressed (CONTEXT *ctx)
414 + COMPRESS_INFO *ci = set_compress_info (ctx);
416 + if (!get_append_command (ctx->path, ctx))
418 + if (ci->open && ci->close)
419 + return (mutt_open_read_compressed (ctx));
422 + safe_free ((void**)&ctx->compressinfo);
428 + ctx->magic = DefaultMagic;
430 + if (!is_new (ctx->realpath))
431 + if (ctx->magic == M_MBOX || ctx->magic == M_MMDF)
432 + if ((fh = fopen (ctx->path, "w")))
434 + /* No error checking - the parent function will catch it */
439 +/* close a compressed mailbox */
440 +void mutt_fast_close_compressed (CONTEXT *ctx)
442 + dprint (2, (debugfile, "mutt_fast_close_compressed called on '%s'\n",
445 + if (ctx->compressinfo)
450 + /* if the folder was removed, remove the gzipped folder too */
451 + if ((ctx->magic > 0)
452 + && (access (ctx->path, F_OK) != 0)
453 + && ! option (OPTSAVEEMPTY))
454 + remove (ctx->realpath);
458 + restore_path (ctx);
459 + safe_free ((void**)&ctx->compressinfo);
463 +/* return 0 on success, -1 on failure */
464 +int mutt_sync_compressed (CONTEXT* ctx)
469 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
472 + mutt_message (_("Compressing %s..."), ctx->realpath);
474 + cmd = get_compression_cmd (ci->close, ctx);
478 + if ((fp = fopen (ctx->realpath, "a")) == NULL)
480 + mutt_perror (ctx->realpath);
481 + safe_free ((void **)&cmd);
484 + mutt_block_signals ();
485 + if (mbox_lock_compressed (ctx, fp, 1, 1) == -1)
488 + mutt_unblock_signals ();
489 + mutt_error _("Unable to lock mailbox!");
491 + safe_free ((void **)&cmd);
495 + dprint (2, (debugfile, "CompressCommand: '%s'\n", cmd));
499 + fprintf (stderr, _("Compressing %s...\n"), ctx->realpath);
500 + if (mutt_system (cmd))
502 + mutt_any_key_to_continue (NULL);
503 + mutt_error (_("%s: Error compressing mailbox! Original mailbox deleted, uncompressed one kept!\n"), ctx->path);
507 + mbox_unlock_compressed (ctx, fp);
508 + mutt_unblock_signals ();
511 + safe_free ((void **)&cmd);
518 +int mutt_slow_close_compressed (CONTEXT *ctx)
521 + const char *append;
523 + COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
525 + dprint (2, (debugfile, "mutt_slow_close_compressed called on '%s'\n",
529 + && ((append = get_append_command (ctx->realpath, ctx))
530 + || (append = ci->close))))
532 + /* if we can not or should not append, we only have to remove the */
533 + /* compressed info, because sync was already called */
534 + mutt_fast_close_compressed (ctx);
544 + if (append == ci->close)
545 + mutt_message (_("Compressing %s..."), ctx->realpath);
547 + mutt_message (_("Compressed-appending to %s..."), ctx->realpath);
550 + cmd = get_compression_cmd (append, ctx);
554 + if ((fp = fopen (ctx->realpath, "a")) == NULL)
556 + mutt_perror (ctx->realpath);
557 + safe_free ((void **)&cmd);
560 + mutt_block_signals ();
561 + if (mbox_lock_compressed (ctx, fp, 1, 1) == -1)
564 + mutt_unblock_signals ();
565 + mutt_error _("Unable to lock mailbox!");
566 + safe_free ((void **)&cmd);
570 + dprint (2, (debugfile, "CompressCmd: '%s'\n", cmd));
575 + if (append == ci->close)
576 + fprintf (stderr, _("Compressing %s...\n"), ctx->realpath);
578 + fprintf (stderr, _("Compressed-appending to %s...\n"), ctx->realpath);
580 + if (mutt_system (cmd))
582 + mutt_any_key_to_continue (NULL);
583 + mutt_error (_(" %s: Error compressing mailbox! Uncompressed one kept!\n"),
585 + safe_free ((void **)&cmd);
586 + mbox_unlock_compressed (ctx, fp);
587 + mutt_unblock_signals ();
592 + mbox_unlock_compressed (ctx, fp);
593 + mutt_unblock_signals ();
596 + restore_path (ctx);
597 + safe_free ((void **)&cmd);
598 + safe_free ((void **)&ctx->compressinfo);
603 +#endif /* USE_COMPRESSED */
604 diff -Nur mutt-1.3.27.orig/compress.h mutt-1.3.27/compress.h
605 --- mutt-1.3.27.orig/compress.h Thu Jan 1 01:00:00 1970
606 +++ mutt-1.3.27/compress.h Fri Feb 1 22:51:32 2002
609 + * Copyright (C) 1997 Alain Penders <Alain@Finale-Dev.com>
611 + * This program is free software; you can redistribute it and/or modify
612 + * it under the terms of the GNU General Public License as published by
613 + * the Free Software Foundation; either version 2 of the License, or
614 + * (at your option) any later version.
616 + * This program is distributed in the hope that it will be useful,
617 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
618 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
619 + * GNU General Public License for more details.
621 + * You should have received a copy of the GNU General Public License
622 + * along with this program; if not, write to the Free Software
623 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
626 +int mutt_can_read_compressed (const char *);
627 +int mutt_can_append_compressed (const char *);
628 +int mutt_open_read_compressed (CONTEXT *);
629 +int mutt_open_append_compressed (CONTEXT *);
630 +int mutt_slow_close_compressed (CONTEXT *);
631 +int mutt_sync_compressed (CONTEXT *);
632 +int mutt_test_compress_command (const char *);
633 +int mutt_check_mailbox_compressed (CONTEXT *);
634 +void mutt_fast_close_compressed (CONTEXT *);
635 diff -Nur mutt-1.3.27.orig/config.h.in mutt-1.3.27/config.h.in
636 --- mutt-1.3.27.orig/config.h.in Fri Aug 3 18:52:17 2001
637 +++ mutt-1.3.27/config.h.in Fri Feb 1 22:52:59 2002
639 /* Define to enable Sun mailtool attachments support. */
640 #undef SUN_ATTACHMENT
642 +/* Define to enable compressed mailboxes support */
643 +#undef USE_COMPRESSED
645 /* Define if the result of isprint() is unreliable. */
648 diff -Nur mutt-1.3.27.orig/configure mutt-1.3.27/configure
649 --- mutt-1.3.27.orig/configure Tue Jan 1 21:17:56 2002
650 +++ mutt-1.3.27/configure Fri Feb 1 22:51:32 2002
653 --enable-locales-fix The result of isprint() is unreliable "
655 + --enable-compressed Enable compressed folders support "
657 --with-exec-shell=SHELL Specify alternate shell (ONLY if /bin/sh is broken)"
659 --enable-exact-address Enable regeneration of email addresses"
660 @@ -5793,6 +5795,18 @@
667 +# Check whether --enable-compressed or --disable-compressed was given.
668 +if test "${enable_compressed+set}" = set; then
669 + enableval="$enable_compressed"
670 + if test x$enableval = xyes; then
671 + cat >> confdefs.h <<\EOF
672 +#define USE_COMPRESSED 1
679 diff -Nur mutt-1.3.27.orig/configure.in mutt-1.3.27/configure.in
680 --- mutt-1.3.27.orig/configure.in Fri Feb 1 22:51:17 2002
681 +++ mutt-1.3.27/configure.in Fri Feb 1 22:51:32 2002
683 AC_DEFINE(LOCALES_HACK,1,[ Define if the result of isprint() is unreliable. ])
686 +AC_ARG_ENABLE(compressed, [ --enable-compressed Enable compressed folders support ],
687 + [if test x$enableval = xyes; then
688 + AC_DEFINE(USE_COMPRESSED,1, [ Define to support compressed folders. ])
691 AC_ARG_WITH(exec-shell, [ --with-exec-shell=SHELL Specify alternate shell (ONLY if /bin/sh is broken)],
692 [if test $withval != yes; then
693 AC_DEFINE_UNQUOTED(EXECSHELL, "$withval")
694 diff -Nur mutt-1.3.27.orig/curs_main.c mutt-1.3.27/curs_main.c
695 --- mutt-1.3.27.orig/curs_main.c Wed Jan 23 00:42:01 2002
696 +++ mutt-1.3.27/curs_main.c Fri Feb 1 22:51:32 2002
697 @@ -1010,6 +1010,11 @@
701 +#ifdef USE_COMPRESSED
702 + if (Context->compressinfo && Context->realpath)
703 + mutt_str_replace (&LastFolder, Context->realpath);
706 mutt_str_replace (&LastFolder, Context->path);
707 oldcount = Context ? Context->msgcount : 0;
709 diff -Nur mutt-1.3.27.orig/doc/manual-6.html mutt-1.3.27/doc/manual-6.html
710 --- mutt-1.3.27.orig/doc/manual-6.html Tue Jan 1 21:18:13 2002
711 +++ mutt-1.3.27/doc/manual-6.html Fri Feb 1 22:51:32 2002
714 <A HREF="manual-5.html#alternative_order">alternative_order</A></CODE> <EM>mimetype</EM> [ <EM>mimetype</EM> ... ]</LI>
716 +<A HREF="manual-4.html#append-hook">append-hook</A></CODE> <EM>regexp</EM> "<EM>command</EM>"</LI>
718 <A HREF="manual-5.html#auto_view">auto_view</A></CODE> <EM>mimetype</EM> [ <EM>mimetype</EM> ... ]</LI>
720 <A HREF="manual-3.html#bind">bind</A></CODE> <EM>map</EM> <EM>key</EM> <EM>function</EM></LI>
722 <A HREF="manual-3.html#charset-hook">charset-hook</A></CODE> <EM>alias</EM> <EM>charset</EM></LI>
724 +<A HREF="manual-4.html#close-hook">close-hook</A></CODE> <EM>regexp</EM> "<EM>command</EM>"</LI>
726 <A HREF="manual-3.html#color">color</A></CODE> <EM>object</EM> <EM>foreground</EM> <EM>background</EM> [ <EM>regexp</EM> ]</LI>
728 <A HREF="manual-3.html#color">uncolor</A></CODE> <EM>index</EM> <EM>pattern</EM> [ <EM>pattern</EM> ... ]</LI>
731 <A HREF="manual-3.html#my_hdr">unmy_hdr</A></CODE> <EM>field</EM> [ <EM>field</EM> ... ]</LI>
733 +<A HREF="manual-4.html#open-hook">open-hook</A></CODE> <EM>regexp</EM> "<EM>command</EM>"</LI>
735 <A HREF="manual-3.html#pgp-hook">pgp-hook</A></CODE> <EM>pattern</EM> <EM>key-id</EM></LI>
737 <A HREF="manual-3.html#push">push</A></CODE> <EM>string</EM></LI>
738 diff -Nur mutt-1.3.27.orig/doc/manual.sgml mutt-1.3.27/doc/manual.sgml
739 --- mutt-1.3.27.orig/doc/manual.sgml Tue Jan 1 21:18:05 2002
740 +++ mutt-1.3.27/doc/manual.sgml Fri Feb 1 22:51:32 2002
741 @@ -2318,6 +2318,176 @@
742 macro pager \cb |urlview\n
745 +<sect1>Compressed folders Support (OPTIONAL)
748 +If Mutt was compiled with compressed folders support (by running the
749 +<em/configure/ script with the <em/--enable-compressed/ flag), Mutt
750 +can open folders stored in an arbitrary format, provided that the user
751 +has a script to convert from/to this format to one of the accepted.
753 +The most common use is to open compressed archived folders e.g. with
756 +In addition, the user can provide a script that gets a folder in an
757 +accepted format and appends its context to the folder in the
758 +user-defined format, which may be faster than converting the entire
759 +folder to the accepted format, appending to it and converting back to
760 +the user-defined format.
762 +There are three hooks defined (<ref id="open-hook" name="open-hook">,
763 +<ref id="close-hook" name="close-hook"> and <ref id="append-hook"
764 +name="append-hook">) which define commands to uncompress and compress
765 +a folder and to append messages to an existing compressed folder
771 +open-hook \\.gz$ "gzip -cd %f > %t"
772 +close-hook \\.gz$ "gzip -c %t > %f"
773 +append-hook \\.gz$ "gzip -c %t >> %f"
776 +You do not have to specify all of the commands. If you omit <ref
777 +id="append-hook" name="append-hook">, the folder will be open and
778 +closed again each time you will add to it. If you omit <ref
779 +id="close-hook" name="close-hook"> (or give empty command) , the
780 +folder will be open in the mode. If you specify <ref
781 +id="append-hook" name="append-hook"> though you'll be able to append
784 +Note that Mutt will only try to use hooks if the file is not in one of
785 +the accepted formats. In particular, if the file is empty, mutt
786 +supposes it is not compressed. This is important because it allows the
787 +use of programs that do not have well defined extensions. Just use
788 +&dquot;.&dquot; as a regexp. But this may be surprising if your
789 +compressing script produces empty files. In this situation, unset <ref
790 +id="save_empty" name="$save_empty">, so that the compressed file
791 +will be removed if you delete all of the messages.
793 +<sect2>Open a compressed mailbox for reading<label id="open-hook">
795 +Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
797 +The <em/command/ is the command that can be used for opening the
798 +folders whose names match <em/regexp/.
800 +The <em/command/ string is the printf-like format string, and it
801 +should accept two parameters: %f, which is replaced with the
802 +(compressed) folder name, and %t which is replaced with the
803 +name of the temporary folder to which to write.
805 +%f and %t can be repeated any number of times in the
806 +command string, and all of the entries are replaced with the
807 +appropriate folder name. In addition, %% is replaced by
808 +%, as in printf, and any other %anything is left as is.
810 +The <em/command/ should <bf/not/ remove the original compressed file.
811 +The <em/command/ should return non-zero exit status if it fails, so
812 +mutt knows something's wrong.
817 +open-hook \\.gz$ "gzip -cd %f > %t"
820 +If the <em/command/ is empty, this operation is disabled for this file
823 +<sect2>Write a compressed mailbox<label id="close-hook">
825 +Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
827 +This is used to close the folder that was open with the <ref id="open-hook"
828 +name="open-hook"> command after some changes were made to it.
830 +The <em/command/ string is the command that can be used for closing the
831 +folders whose names match <em/regexp/. It has the same format as in
832 +the <ref id="open-hook" name="open-hook"> command. Temporary folder
833 +in this case is the folder previously produced by the <ref id="open-hook"
834 +name="open-hook"> command.
836 +The <em/command/ should <bf/not/ remove the decompressed file. The
837 +<em/command/ should return non-zero exit status if it fails, so mutt
838 +knows something's wrong.
843 +close-hook \\.gz$ "gzip -c %t > %f"
846 +If the <em/command/ is empty, this operation is disabled for this file
847 +type, and the file can only be open in the read-only mode.
849 +<ref id="close-hook" name ="close-hook"> is not called when you exit
850 +from the folder if the folder was not changed.
852 +<sect2>Append a message to a compressed mailbox<label id="append-hook">
854 +Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
856 +This command is used for saving to an existing compressed folder.
857 +The <em/command/ is the command that can be used for appending to the
858 +folders whose names match <em/regexp/. It has the same format as in
859 + the <ref id="open-hook" name="open-hook"> command.
860 +The temporary folder in this case contains the messages that are being
863 +The <em/command/ should <bf/not/ remove the decompressed file. The
864 +<em/command/ should return non-zero exit status if it fails, so mutt
865 +knows something's wrong.
870 +append-hook \\.gz$ "gzip -c %t >> %f"
873 +When <ref id="append-hook" name="append-hook"> is used, the folder is
874 +not opened, which saves time, but this means that we can not find out
875 +what the folder type is. Thus the default (<ref id="mbox_type"
876 +name="$mbox_type">) type is always supposed (i.e.
877 +this is the format used for the temporary folder).
879 +If the file does not exist when you save to it, <ref id="close-hook"
880 +name="close-hook"> is called, and not <ref id="append-hook"
881 +name="append-hook">. <ref id="append-hook" name="append-hook"> is only
882 +for appending to existing folders.
884 +If the <em/command/ is empty, this operation is disabled for this file
885 +type. In this case, the folder will be open and closed again (using
886 +<ref id="open-hook" name="open-hook"> and <ref id="close-hook"
887 +name="close-hook">respectively) each time you will add to it.
889 +<sect2>Encrypted folders
891 +The compressed folders support can also be used to handle encrypted
892 +folders. If you want to encrypt a folder with PGP, you may want to use
893 +the following hooks:
896 +open-hook \\.pgp$ "pgp -f < %f > %t"
897 +close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
900 +Please note, that PGP does not support appending to an encrypted
901 +folder, so there is no append-hook defined.
903 +If you are using GnuPG instead of PGP, you may use the following hooks
907 +open-hook \\.gpg$ "gpg --decrypt < %f > %t"
908 +close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId < %t > %f"
911 +<bf/Note:/ the folder is temporary stored decrypted in the /tmp
912 +directory, where it can be read by your system administrator. So think
913 +about the security aspects of this.
915 <sect>Mutt's MIME Support
917 Quite a bit of effort has been made to make Mutt the premier text-mode
918 @@ -2868,12 +3038,16 @@
920 <tt><ref id="alternative_order" name="alternative_order"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
922 +<tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
924 <tt><ref id="auto_view" name="auto_view"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
926 <tt><ref id="bind" name="bind"></tt> <em/map/ <em/key/ <em/function/
928 <tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
930 +<tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
932 <tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ [ <em/regexp/ ]
934 <tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ [ <em/pattern/ ... ]
935 @@ -2916,6 +3090,8 @@
937 <tt><ref id="my_hdr" name="unmy_hdr"></tt> <em/field/ [ <em/field/ ... ]
939 +<tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
941 <tt><ref id="pgp-hook" name="pgp-hook"></tt> <em/pattern/ <em/key-id/
943 <tt><ref id="push" name="push"></tt> <em/string/
944 diff -Nur mutt-1.3.27.orig/doc/manual.sgml.head mutt-1.3.27/doc/manual.sgml.head
945 --- mutt-1.3.27.orig/doc/manual.sgml.head Wed Jan 23 00:42:01 2002
946 +++ mutt-1.3.27/doc/manual.sgml.head Fri Feb 1 22:51:32 2002
947 @@ -2319,6 +2319,176 @@
948 macro pager \cb |urlview\n
951 +<sect1>Compressed folders Support (OPTIONAL)
954 +If Mutt was compiled with compressed folders support (by running the
955 +<em/configure/ script with the <em/--enable-compressed/ flag), Mutt
956 +can open folders stored in an arbitrary format, provided that the user
957 +has a script to convert from/to this format to one of the accepted.
959 +The most common use is to open compressed archived folders e.g. with
962 +In addition, the user can provide a script that gets a folder in an
963 +accepted format and appends its context to the folder in the
964 +user-defined format, which may be faster than converting the entire
965 +folder to the accepted format, appending to it and converting back to
966 +the user-defined format.
968 +There are three hooks defined (<ref id="open-hook" name="open-hook">,
969 +<ref id="close-hook" name="close-hook"> and <ref id="append-hook"
970 +name="append-hook">) which define commands to uncompress and compress
971 +a folder and to append messages to an existing compressed folder
977 +open-hook \\.gz$ "gzip -cd %f > %t"
978 +close-hook \\.gz$ "gzip -c %t > %f"
979 +append-hook \\.gz$ "gzip -c %t >> %f"
982 +You do not have to specify all of the commands. If you omit <ref
983 +id="append-hook" name="append-hook">, the folder will be open and
984 +closed again each time you will add to it. If you omit <ref
985 +id="close-hook" name="close-hook"> (or give empty command) , the
986 +folder will be open in the mode. If you specify <ref
987 +id="append-hook" name="append-hook"> though you'll be able to append
990 +Note that Mutt will only try to use hooks if the file is not in one of
991 +the accepted formats. In particular, if the file is empty, mutt
992 +supposes it is not compressed. This is important because it allows the
993 +use of programs that do not have well defined extensions. Just use
994 +&dquot;.&dquot; as a regexp. But this may be surprising if your
995 +compressing script produces empty files. In this situation, unset <ref
996 +id="save_empty" name="$save_empty">, so that the compressed file
997 +will be removed if you delete all of the messages.
999 +<sect2>Open a compressed mailbox for reading<label id="open-hook">
1001 +Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
1003 +The <em/command/ is the command that can be used for opening the
1004 +folders whose names match <em/regexp/.
1006 +The <em/command/ string is the printf-like format string, and it
1007 +should accept two parameters: %f, which is replaced with the
1008 +(compressed) folder name, and %t which is replaced with the
1009 +name of the temporary folder to which to write.
1011 +%f and %t can be repeated any number of times in the
1012 +command string, and all of the entries are replaced with the
1013 +appropriate folder name. In addition, %% is replaced by
1014 +%, as in printf, and any other %anything is left as is.
1016 +The <em/command/ should <bf/not/ remove the original compressed file.
1017 +The <em/command/ should return non-zero exit status if it fails, so
1018 +mutt knows something's wrong.
1023 +open-hook \\.gz$ "gzip -cd %f > %t"
1026 +If the <em/command/ is empty, this operation is disabled for this file
1029 +<sect2>Write a compressed mailbox<label id="close-hook">
1031 +Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
1033 +This is used to close the folder that was open with the <ref id="open-hook"
1034 +name="open-hook"> command after some changes were made to it.
1036 +The <em/command/ string is the command that can be used for closing the
1037 +folders whose names match <em/regexp/. It has the same format as in
1038 +the <ref id="open-hook" name="open-hook"> command. Temporary folder
1039 +in this case is the folder previously produced by the <ref id="open-hook"
1040 +name="open-hook"> command.
1042 +The <em/command/ should <bf/not/ remove the decompressed file. The
1043 +<em/command/ should return non-zero exit status if it fails, so mutt
1044 +knows something's wrong.
1049 +close-hook \\.gz$ "gzip -c %t > %f"
1052 +If the <em/command/ is empty, this operation is disabled for this file
1053 +type, and the file can only be open in the read-only mode.
1055 +<ref id="close-hook" name ="close-hook"> is not called when you exit
1056 +from the folder if the folder was not changed.
1058 +<sect2>Append a message to a compressed mailbox<label id="append-hook">
1060 +Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
1062 +This command is used for saving to an existing compressed folder.
1063 +The <em/command/ is the command that can be used for appending to the
1064 +folders whose names match <em/regexp/. It has the same format as in
1065 + the <ref id="open-hook" name="open-hook"> command.
1066 +The temporary folder in this case contains the messages that are being
1069 +The <em/command/ should <bf/not/ remove the decompressed file. The
1070 +<em/command/ should return non-zero exit status if it fails, so mutt
1071 +knows something's wrong.
1076 +append-hook \\.gz$ "gzip -c %t >> %f"
1079 +When <ref id="append-hook" name="append-hook"> is used, the folder is
1080 +not opened, which saves time, but this means that we can not find out
1081 +what the folder type is. Thus the default (<ref id="mbox_type"
1082 +name="$mbox_type">) type is always supposed (i.e.
1083 +this is the format used for the temporary folder).
1085 +If the file does not exist when you save to it, <ref id="close-hook"
1086 +name="close-hook"> is called, and not <ref id="append-hook"
1087 +name="append-hook">. <ref id="append-hook" name="append-hook"> is only
1088 +for appending to existing folders.
1090 +If the <em/command/ is empty, this operation is disabled for this file
1091 +type. In this case, the folder will be open and closed again (using
1092 +<ref id="open-hook" name="open-hook"> and <ref id="close-hook"
1093 +name="close-hook">respectively) each time you will add to it.
1095 +<sect2>Encrypted folders
1097 +The compressed folders support can also be used to handle encrypted
1098 +folders. If you want to encrypt a folder with PGP, you may want to use
1099 +the following hooks:
1102 +open-hook \\.pgp$ "pgp -f < %f > %t"
1103 +close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
1106 +Please note, that PGP does not support appending to an encrypted
1107 +folder, so there is no append-hook defined.
1109 +If you are using GnuPG instead of PGP, you may use the following hooks
1113 +open-hook \\.gpg$ "gpg --decrypt < %f > %t"
1114 +close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId < %t > %f"
1117 +<bf/Note:/ the folder is temporary stored decrypted in the /tmp
1118 +directory, where it can be read by your system administrator. So think
1119 +about the security aspects of this.
1121 <sect>Mutt's MIME Support
1123 Quite a bit of effort has been made to make Mutt the premier text-mode
1124 @@ -2869,12 +3039,16 @@
1126 <tt><ref id="alternative_order" name="alternative_order"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
1128 +<tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
1130 <tt><ref id="auto_view" name="auto_view"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
1132 <tt><ref id="bind" name="bind"></tt> <em/map/ <em/key/ <em/function/
1134 <tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
1136 +<tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
1138 <tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ [ <em/regexp/ ]
1140 <tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ [ <em/pattern/ ... ]
1141 @@ -2917,6 +3091,8 @@
1143 <tt><ref id="my_hdr" name="unmy_hdr"></tt> <em/field/ [ <em/field/ ... ]
1145 +<tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
1147 <tt><ref id="pgp-hook" name="pgp-hook"></tt> <em/pattern/ <em/key-id/
1149 <tt><ref id="push" name="push"></tt> <em/string/
1150 diff -Nur mutt-1.3.27.orig/doc/manual.txt mutt-1.3.27/doc/manual.txt
1151 --- mutt-1.3.27.orig/doc/manual.txt Tue Jan 1 21:18:08 2002
1152 +++ mutt-1.3.27/doc/manual.txt Fri Feb 1 22:51:32 2002
1154 4.11.2 Authentication
1155 4.12 Managing multiple IMAP/POP accounts (OPTIONAL)
1156 4.13 Start a WWW Browser on URLs (EXTERNAL)
1157 + 4.14 Compressed folders Support (OPTIONAL)
1158 + 4.14.1 Open a compressed mailbox for reading
1159 + 4.14.2 Write a compressed mailbox
1160 + 4.14.3 Append a message to a compressed mailbox
1161 + 4.14.4 Encrypted folders
1163 5. Mutt's MIME Support
1164 5.1 Using MIME in Mutt
1165 @@ -2554,6 +2559,156 @@
1166 macro index \cb |urlview\n
1167 macro pager \cb |urlview\n
1169 + 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)
1171 + If Mutt was compiled with compressed folders support (by running the
1172 + _
\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
1173 + folders stored in an arbitrary format, provided that the user has a
1174 + script to convert from/to this format to one of the accepted.
1176 + The most common use is to open compressed archived folders e.g. with
1179 + In addition, the user can provide a script that gets a folder in an
1180 + accepted format and appends its context to the folder in the user-
1181 + defined format, which may be faster than converting the entire folder
1182 + to the accepted format, appending to it and converting back to the
1183 + user-defined format.
1185 + There are three hooks defined (``open-hook'', ``close-hook'' and
1186 + ``append-hook'') which define commands to uncompress and compress a
1187 + folder and to append messages to an existing compressed folder
1192 + open-hook \\.gz$ "gzip -cd %f > %t"
1193 + close-hook \\.gz$ "gzip -c %t > %f"
1194 + append-hook \\.gz$ "gzip -c %t >> %f"
1196 + You do not have to specify all of the commands. If you omit ``append-
1197 + hook'', the folder will be open and closed again each time you will
1198 + add to it. If you omit ``close-hook'' (or give empty command) , the
1199 + folder will be open in the mode. If you specify ``append-hook''
1200 + though you'll be able to append to the folder.
1202 + Note that Mutt will only try to use hooks if the file is not in one of
1203 + the accepted formats. In particular, if the file is empty, mutt
1204 + supposes it is not compressed. This is important because it allows the
1205 + use of programs that do not have well defined extensions. Just use "."
1206 + as a regexp. But this may be surprising if your compressing script
1207 + produces empty files. In this situation, unset ``$save_empty'', so
1208 + that the compressed file will be removed if you delete all of the
1211 + 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
1213 + Usage: open-hook _
\br_
\be_
\bg_
\be_
\bx_
\bp "_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd"
1215 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is the command that can be used for opening the folders
1216 + whose names match _
\br_
\be_
\bg_
\be_
\bx_
\bp.
1218 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd string is the printf-like format string, and it should
1219 + accept two parameters: %f, which is replaced with the (compressed)
1220 + folder name, and %t which is replaced with the name of the temporary
1221 + folder to which to write.
1223 + %f and %t can be repeated any number of times in the command string,
1224 + and all of the entries are replaced with the appropriate folder name.
1225 + In addition, %% is replaced by %, as in printf, and any other
1226 + %anything is left as is.
1228 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd should n
\bno
\bot
\bt remove the original compressed file. The
1229 + _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd should return non-zero exit status if it fails, so mutt knows
1230 + something's wrong.
1234 + open-hook \\.gz$ "gzip -cd %f > %t"
1236 + If the _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is empty, this operation is disabled for this file
1239 + 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
1241 + Usage: close-hook _
\br_
\be_
\bg_
\be_
\bx_
\bp "_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd"
1243 + This is used to close the folder that was open with the ``open-hook''
1244 + command after some changes were made to it.
1246 + The _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd string is the command that can be used for closing the
1247 + folders whose names match _
\br_
\be_
\bg_
\be_
\bx_
\bp. It has the same format as in the
1248 + ``open-hook'' command. Temporary folder in this case is the folder
1249 + previously produced by the ``open-hook'' command.
1251 + 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
1252 + should return non-zero exit status if it fails, so mutt knows
1253 + something's wrong.
1257 + close-hook \\.gz$ "gzip -c %t > %f"
1259 + If the _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is empty, this operation is disabled for this file
1260 + type, and the file can only be open in the read-only mode.
1262 + ``close-hook'' is not called when you exit from the folder if the
1263 + folder was not changed.
1265 + 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
1267 + Usage: append-hook _
\br_
\be_
\bg_
\be_
\bx_
\bp "_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd"
1269 + This command is used for saving to an existing compressed folder. The
1270 + _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is the command that can be used for appending to the folders
1271 + whose names match _
\br_
\be_
\bg_
\be_
\bx_
\bp. It has the same format as in the ``open-
1272 + hook'' command. The temporary folder in this case contains the
1273 + messages that are being appended.
1275 + 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
1276 + should return non-zero exit status if it fails, so mutt knows
1277 + something's wrong.
1281 + append-hook \\.gz$ "gzip -c %t >> %f"
1283 + When ``append-hook'' is used, the folder is not opened, which saves
1284 + time, but this means that we can not find out what the folder type is.
1285 + Thus the default (``$mbox_type'') type is always supposed (i.e. this
1286 + is the format used for the temporary folder).
1288 + If the file does not exist when you save to it, ``close-hook'' is
1289 + called, and not ``append-hook''. ``append-hook'' is only for appending
1290 + to existing folders.
1292 + If the _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is empty, this operation is disabled for this file
1293 + type. In this case, the folder will be open and closed again (using
1294 + ``open-hook'' and ``close-hook''respectively) each time you will add
1297 + 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
1299 + The compressed folders support can also be used to handle encrypted
1300 + folders. If you want to encrypt a folder with PGP, you may want to use
1301 + the following hooks:
1303 + open-hook \\.pgp$ "pgp -f < %f > %t"
1304 + close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
1306 + Please note, that PGP does not support appending to an encrypted
1307 + folder, so there is no append-hook defined.
1309 + If you are using GnuPG instead of PGP, you may use the following hooks
1312 + open-hook \\.gpg$ "gpg --decrypt < %f > %t"
1313 + close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId < %t > %f"
1315 + N
\bNo
\bot
\bte
\be:
\b: the folder is temporary stored decrypted in the /tmp directory,
1316 + where it can be read by your system administrator. So think about the
1317 + security aspects of this.
1319 5
\b5.
\b. M
\bMu
\but
\btt
\bt'
\b's
\bs M
\bMI
\bIM
\bME
\bE S
\bSu
\bup
\bpp
\bpo
\bor
\brt
\bt
1321 Quite a bit of effort has been made to make Mutt the premier text-mode
1322 @@ -3148,6 +3303,8 @@
1324 · ``unmy_hdr'' _
\bf_
\bi_
\be_
\bl_
\bd [ _
\bf_
\bi_
\be_
\bl_
\bd ... ]
1326 + · ``open-hook'' _
\br_
\be_
\bg_
\be_
\bx_
\bp "_
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd"
1328 · ``pgp-hook'' _
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn _
\bk_
\be_
\by_
\b-_
\bi_
\bd
1330 · ``push'' _
\bs_
\bt_
\br_
\bi_
\bn_
\bg
1331 diff -Nur mutt-1.3.27.orig/doc/muttrc.man mutt-1.3.27/doc/muttrc.man
1332 --- mutt-1.3.27.orig/doc/muttrc.man Fri Dec 28 18:14:28 2001
1333 +++ mutt-1.3.27/doc/muttrc.man Fri Feb 1 22:51:32 2002
1334 @@ -258,6 +258,24 @@
1335 The pgp-hook command provides a method by which you can
1336 specify the ID of the public key to be used when encrypting messages
1337 to a certain recipient.
1340 +\fBopen-hook\fP \fIregexp\fP "\fIcommand\fP"
1341 +\fBclose-hook\fP \fIregexp\fP "\fIcommand\fP"
1342 +\fBappend-hook\fP \fIregexp\fP "\fIcommand\fP"
1345 +These commands provide a way to handle compressed folders. The given
1346 +\fBregexp\fP specifies which folders are taken as compressed (e.g.
1347 +"\fI\\\\.gz$\fP"). The commands tell Mutt how to uncompress a folder
1348 +(\fBopen-hook\fP), compress a folder (\fBclose-hook\fP) or append a
1349 +compressed mail to a compressed folder (\fBappend-hook\fP). The
1350 +\fIcommand\fP string is the
1352 +like format string, and it should accept two parameters: \fB%f\fP,
1353 +which is replaced with the (compressed) folder name, and \fB%t\fP
1354 +which is replaced with the name of the temporary folder to which to
1357 \fBpush\fP \fIstring\fP
1358 This command adds the named \fIstring\fP to the keyboard buffer.
1359 diff -Nur mutt-1.3.27.orig/doc/muttrc.man.head mutt-1.3.27/doc/muttrc.man.head
1360 --- mutt-1.3.27.orig/doc/muttrc.man.head Wed Jan 23 00:42:01 2002
1361 +++ mutt-1.3.27/doc/muttrc.man.head Fri Feb 1 22:51:32 2002
1362 @@ -258,6 +258,24 @@
1363 The pgp-hook command provides a method by which you can
1364 specify the ID of the public key to be used when encrypting messages
1365 to a certain recipient.
1368 +\fBopen-hook\fP \fIregexp\fP "\fIcommand\fP"
1369 +\fBclose-hook\fP \fIregexp\fP "\fIcommand\fP"
1370 +\fBappend-hook\fP \fIregexp\fP "\fIcommand\fP"
1373 +These commands provide a way to handle compressed folders. The given
1374 +\fBregexp\fP specifies which folders are taken as compressed (e.g.
1375 +"\fI\\\\.gz$\fP"). The commands tell Mutt how to uncompress a folder
1376 +(\fBopen-hook\fP), compress a folder (\fBclose-hook\fP) or append a
1377 +compressed mail to a compressed folder (\fBappend-hook\fP). The
1378 +\fIcommand\fP string is the
1380 +like format string, and it should accept two parameters: \fB%f\fP,
1381 +which is replaced with the (compressed) folder name, and \fB%t\fP
1382 +which is replaced with the name of the temporary folder to which to
1385 \fBpush\fP \fIstring\fP
1386 This command adds the named \fIstring\fP to the keyboard buffer.
1387 diff -Nur mutt-1.3.27.orig/hook.c mutt-1.3.27/hook.c
1388 --- mutt-1.3.27.orig/hook.c Fri Jun 29 12:05:50 2001
1389 +++ mutt-1.3.27/hook.c Fri Feb 1 22:51:32 2002
1392 #include "mailbox.h"
1394 +#ifdef USE_COMPRESSED
1395 +#include "compress.h"
1402 memset (&pattern, 0, sizeof (pattern));
1403 pattern.data = safe_strdup (path);
1405 +#ifdef USE_COMPRESSED
1406 + else if (data & (M_APPENDHOOK | M_OPENHOOK | M_CLOSEHOOK))
1408 + if (mutt_test_compress_command (command.data))
1410 + strfcpy (err->data, _("bad formatted command string"), err->dsize);
1415 else if (DefaultHook && (data & (M_FOLDERHOOK | M_MBOXHOOK | M_SENDHOOK |
1416 M_FCCHOOK | M_SAVEHOOK | M_MESSAGEHOOK)))
1418 diff -Nur mutt-1.3.27.orig/init.h mutt-1.3.27/init.h
1419 --- mutt-1.3.27.orig/init.h Mon Dec 10 11:09:03 2001
1420 +++ mutt-1.3.27/init.h Fri Feb 1 22:51:32 2002
1421 @@ -2447,6 +2447,11 @@
1422 { "fcc-hook", mutt_parse_hook, M_FCCHOOK },
1423 { "fcc-save-hook", mutt_parse_hook, M_FCCHOOK | M_SAVEHOOK },
1424 { "folder-hook", mutt_parse_hook, M_FOLDERHOOK },
1425 +#ifdef USE_COMPRESSED
1426 + { "open-hook", mutt_parse_hook, M_OPENHOOK },
1427 + { "close-hook", mutt_parse_hook, M_CLOSEHOOK },
1428 + { "append-hook", mutt_parse_hook, M_APPENDHOOK },
1430 { "hdr_order", parse_list, UL &HeaderOrderList },
1431 { "iconv-hook", mutt_parse_hook, M_ICONVHOOK },
1432 { "ignore", parse_ignore, 0 },
1433 diff -Nur mutt-1.3.27.orig/main.c mutt-1.3.27/main.c
1434 --- mutt-1.3.27.orig/main.c Wed Nov 7 11:40:26 2001
1435 +++ mutt-1.3.27/main.c Fri Feb 1 22:51:32 2002
1436 @@ -328,6 +328,12 @@
1441 +#ifdef USE_COMPRESSED
1447 #ifdef HAVE_WC_FUNCS
1449 diff -Nur mutt-1.3.27.orig/mbox.c mutt-1.3.27/mbox.c
1450 --- mutt-1.3.27.orig/mbox.c Wed Oct 31 10:40:05 2001
1451 +++ mutt-1.3.27/mbox.c Fri Feb 1 22:51:32 2002
1456 +#ifdef USE_COMPRESSED
1457 +#include "compress.h"
1460 #include <sys/stat.h>
1463 @@ -1045,6 +1049,12 @@
1464 int mbox_close_mailbox (CONTEXT *ctx)
1466 mx_unlock_file (ctx->path, fileno (ctx->fp), 1);
1468 +#ifdef USE_COMPRESSED
1469 + if (ctx->compressinfo)
1470 + mutt_slow_close_compressed (ctx);
1473 mutt_unblock_signals ();
1474 mx_fastclose_mailbox (ctx);
1476 diff -Nur mutt-1.3.27.orig/mutt.h mutt-1.3.27/mutt.h
1477 --- mutt-1.3.27.orig/mutt.h Wed Jan 23 00:42:01 2002
1478 +++ mutt-1.3.27/mutt.h Fri Feb 1 22:51:32 2002
1479 @@ -143,6 +143,11 @@
1480 #define M_PGPHOOK (1<<8)
1482 #define M_ACCOUNTHOOK (1<<9)
1483 +#ifdef USE_COMPRESSED
1484 +#define M_OPENHOOK (1<<10)
1485 +#define M_APPENDHOOK (1<<11)
1486 +#define M_CLOSEHOOK (1<<12)
1489 /* tree characters for linearize_tree and print_enriched_string */
1490 #define M_TREE_LLCORNER 1
1491 @@ -745,6 +750,11 @@
1492 void *data; /* driver specific data */
1493 #endif /* USE_IMAP */
1495 +#ifdef USE_COMPRESSED
1496 + void *compressinfo; /* compressed mbox module private data */
1497 + char *realpath; /* path to compressed mailbox */
1498 +#endif /* USE_COMPRESSED */
1500 short magic; /* mailbox type */
1502 unsigned int locked : 1; /* is the mailbox locked? */
1503 diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
1504 --- mutt-1.3.27.orig/mx.c Wed Jan 23 00:42:01 2002
1505 +++ mutt-1.3.27/mx.c Fri Feb 1 22:51:32 2002
1510 +#ifdef USE_COMPRESSED
1511 +#include "compress.h"
1517 @@ -448,6 +452,10 @@
1521 +#ifdef USE_COMPRESSED
1522 + if (magic == 0 && mutt_can_read_compressed (path))
1523 + return M_COMPRESSED;
1528 @@ -489,6 +497,13 @@
1532 +#ifdef USE_COMPRESSED
1533 + /* special case for appending to compressed folders -
1534 + * even if we can not open them for reading */
1535 + if (mutt_can_append_compressed (ctx->path))
1536 + mutt_open_append_compressed (ctx);
1542 @@ -649,7 +664,12 @@
1545 ctx->magic = mx_get_magic (path);
1548 +#ifdef USE_COMPRESSED
1549 + if (ctx->magic == M_COMPRESSED)
1550 + mutt_open_read_compressed (ctx);
1554 mutt_error (_("%s is not a mailbox."), path);
1556 @@ -755,6 +775,10 @@
1557 mutt_free_header (&ctx->hdrs[i]);
1558 safe_free ((void **) &ctx->hdrs);
1559 safe_free ((void **) &ctx->v2r);
1560 +#ifdef USE_COMPRESSED
1561 + if (ctx->compressinfo)
1562 + mutt_fast_close_compressed (ctx);
1564 safe_free ((void **) &ctx->path);
1565 safe_free ((void **) &ctx->pattern);
1566 if (ctx->limit_pattern)
1567 @@ -812,6 +836,12 @@
1568 if (tmp && tmp->new == 0)
1569 mutt_update_mailbox (tmp);
1572 +#ifdef USE_COMPRESSED
1573 + if (rc == 0 && ctx->compressinfo)
1574 + return mutt_sync_compressed (ctx);
1580 @@ -1018,6 +1048,11 @@
1581 !mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY))
1582 mx_unlink_empty (ctx->path);
1584 +#ifdef USE_COMPRESSED
1585 + if (ctx->compressinfo && mutt_slow_close_compressed (ctx))
1589 mx_fastclose_mailbox (ctx);
1592 @@ -1325,6 +1360,11 @@
1596 +#ifdef USE_COMPRESSED
1597 + if (ctx->compressinfo)
1598 + return mutt_check_mailbox_compressed (ctx);
1603 if (ctx->locked) lock = 0;
1604 diff -Nur mutt-1.3.27.orig/mx.h mutt-1.3.27/mx.h
1605 --- mutt-1.3.27.orig/mx.h Wed Oct 31 10:40:05 2001
1606 +++ mutt-1.3.27/mx.h Fri Feb 1 22:51:32 2002
1611 +#ifdef USE_COMPRESSED
1616 WHERE short DefaultMagic INITVAL (M_MBOX);
1617 diff -Nur mutt-1.3.27.orig/po/POTFILES.in mutt-1.3.27/po/POTFILES.in
1618 --- mutt-1.3.27.orig/po/POTFILES.in Tue Oct 10 21:18:37 2000
1619 +++ mutt-1.3.27/po/POTFILES.in Fri Feb 1 22:51:32 2002
1628 diff -Nur mutt-1.3.27.orig/po/de.po mutt-1.3.27/po/de.po
1629 --- mutt-1.3.27.orig/po/de.po Wed Jan 23 00:43:05 2002
1630 +++ mutt-1.3.27/po/de.po Fri Feb 1 22:51:32 2002
1631 @@ -654,6 +654,48 @@
1632 msgid "Message written."
1633 msgstr "Nachricht geschrieben."
1635 +#: compress.c:203 mbox.c:661
1636 +msgid "Mailbox was corrupted!"
1637 +msgstr "Mailbox wurde zerstört!"
1639 +#: compress.c:228 compress.c:253
1641 +msgid "Decompressing %s...\n"
1642 +msgstr "Entpacke %s...\n"
1644 +#: compress.c:246 compress.c:367 compress.c:443 mbox.c:706
1645 +msgid "Unable to lock mailbox!"
1646 +msgstr "Kann Mailbox nicht für exklusiven Zugriff sperren!"
1650 +msgid "Error executing: %s : unable to open the mailbox!\n"
1651 +msgstr "Fehler beim Ausführen von %s : Kann die Mailbox nicht öffnen!\n"
1653 +#: compress.c:350 compress.c:377 compress.c:423 compress.c:454
1655 +msgid "Compressing %s...\n"
1656 +msgstr "Komprimiere %s...\n"
1661 +"%s: Error compressing mailbox! Original mailbox deleted, uncompressed one "
1664 +"%s: Fehler beim Komprimieren der Mailbox! Ursprüngliche Mailbox gelöscht, "
1665 +"entpackte gespeichert!\n"
1667 +#: compress.c:425 compress.c:456
1669 +msgid "Compressed-appending to %s...\n"
1670 +msgstr "Hänge komprimiert an %s... an\n"
1674 +msgid " %s: Error compressing mailbox! Uncompressed one kept!\n"
1675 +msgstr " %s: Fehler beim packen der Mailbox! Entpackte Mailbox gespeichert!\n"
1680 @@ -1137,6 +1179,10 @@
1682 msgstr "Hilfe für %s"
1685 +msgid "bad formatted command string"
1686 +msgstr "Hook enthält nicht die Muster %f und %t"
1689 msgid "unhook: Can't do unhook * from within a hook."
1690 msgstr "unhook: Innerhalb eines hook kann kein unhook * aufgerufen werden."
1691 @@ -2459,18 +2505,10 @@
1692 msgid "Mailbox is corrupt!"
1693 msgstr "Mailbox fehlerhaft!"
1696 -msgid "Mailbox was corrupted!"
1697 -msgstr "Mailbox wurde zerstört!"
1699 #: mbox.c:702 mbox.c:978
1700 msgid "Fatal error! Could not reopen mailbox!"
1701 msgstr "Fataler Fehler, konnte Mailbox nicht erneut öffnen!"
1704 -msgid "Unable to lock mailbox!"
1705 -msgstr "Kann Mailbox nicht für exklusiven Zugriff sperren!"
1707 #. this means ctx->changed or ctx->deleted was set, but no
1708 #. * messages were found to be changed or deleted. This should
1709 #. * never happen, is we presume it is a bug in mutt.
1710 diff -Nur mutt-1.3.27.orig/status.c mutt-1.3.27/status.c
1711 --- mutt-1.3.27.orig/status.c Fri Mar 3 11:10:14 2000
1712 +++ mutt-1.3.27/status.c Fri Feb 1 22:51:32 2002
1716 snprintf (fmt, sizeof(fmt), "%%%ss", prefix);
1717 +#ifdef USE_COMPRESSED
1718 + if (Context && Context->compressinfo && Context->realpath)
1720 + strfcpy (tmp, Context->realpath, sizeof (tmp));
1721 + mutt_pretty_mailbox (tmp);
1725 if (Context && Context->path)
1727 strfcpy (tmp, Context->path, sizeof (tmp));
1728 --- mutt-1.3.99/doc/manual-4.html~ Tue May 21 22:14:04 2002
1729 +++ mutt-1.3.99/doc/manual-4.html Tue May 21 22:15:56 2002
1730 @@ -815,7 +815,57 @@
1731 </CODE></BLOCKQUOTE>
1735 +<H2><A NAME="ss4.14">4.14 Compressed folders Support (OPTIONAL)</A>
1739 +<P>If Mutt was compiled with compressed folders support (by running the
1740 +<EM>configure</EM> script with the <EM>--enable-compressed</EM> flag), Mutt
1741 +can open folders stored in an arbitrary format, provided that the user
1742 +has a script to convert from/to this format to one of the accepted.</P>
1743 +<P>The most common use is to open compressed archived folders e.g. with
1745 +<P>In addition, the user can provide a script that gets a folder in an
1746 +accepted format and appends its context to the folder in the
1747 +user-defined format, which may be faster than converting the entire
1748 +folder to the accepted format, appending to it and converting back to
1749 +the user-defined format.</P>
1750 +<P>There are three hooks defined (
1751 +<A HREF="#open-hook">open-hook</A>,
1752 +<A HREF="#close-hook">close-hook</A> and
1753 +<A HREF="#append-hook">append-hook</A>) which define commands to uncompress and compress
1754 +a folder and to append messages to an existing compressed folder
1756 +<P>For example:</P>
1760 +open-hook \\.gz$ "gzip -cd %f > %t"
1761 +close-hook \\.gz$ "gzip -c %t > %f"
1762 +append-hook \\.gz$ "gzip -c %t >> %f"
1764 +</CODE></BLOCKQUOTE>
1766 +<P>You do not have to specify all of the commands. If you omit
1767 +<A HREF="#append-hook">append-hook</A>, the folder will be open and
1768 +closed again each time you will add to it. If you omit
1769 +<A HREF="#close-hook">close-hook</A> (or give empty command) , the
1770 +folder will be open in the mode. If you specify
1771 +<A HREF="#append-hook">append-hook</A> though you'll be able to append
1773 +<P>Note that Mutt will only try to use hooks if the file is not in one of
1774 +the accepted formats. In particular, if the file is empty, mutt
1775 +supposes it is not compressed. This is important because it allows the
1776 +use of programs that do not have well defined extensions. Just use
1777 +"." as a regexp. But this may be surprising if your
1778 +compressing script produces empty files. In this situation, unset
1779 +<A HREF="manual-6.html#save_empty">$save_empty</A>, so that the compressed file
1780 +will be removed if you delete all of the messages.</P>
1782 +<H3><A NAME="open-hook"></A> Open a compressed mailbox for reading</H3>
1784 +<P>Usage: <CODE>open-hook</CODE> <EM>regexp</EM> "<EM>command</EM>"</P><HR>
1786 <A HREF="manual-5.html">Next</A>
1787 <A HREF="manual-3.html">Previous</A>
1788 <A HREF="manual.html#toc4">Contents</A>