Changes specific to mutt-ng:
+2004-01-14:
+ * Integrated the following patches:
+ * rr.compressed for compressed folders
+ * Changed User-Agent string
+ * Added operating_system to set fake operating system for User-Agent string
2004-01-09:
* first version of mutt-ng
bin_PROGRAMS = muttng @DOTLOCK_TARGET@ @PGPAUX_TARGET@ @SMIMEAUX_TARGET@
muttng_SOURCES = $(BUILT_SOURCES) \
addrbook.c alias.c attach.c base64.c browser.c buffy.c color.c \
- crypt.c cryptglue.c \
+ compress.c crypt.c cryptglue.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 \
EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \
configure acconfig.h account.h \
+ compress.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 mutt_crypt.h \
mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
bin_PROGRAMS = muttng @DOTLOCK_TARGET@ @PGPAUX_TARGET@ @SMIMEAUX_TARGET@
muttng_SOURCES = $(BUILT_SOURCES) \
addrbook.c alias.c attach.c base64.c browser.c buffy.c color.c \
- crypt.c cryptglue.c \
+ compress.c crypt.c cryptglue.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 \
EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \
configure acconfig.h account.h \
+ compress.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 mutt_crypt.h \
mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
am__objects_1 = patchlist.$(OBJEXT)
am_muttng_OBJECTS = $(am__objects_1) addrbook.$(OBJEXT) alias.$(OBJEXT) \
attach.$(OBJEXT) base64.$(OBJEXT) browser.$(OBJEXT) \
- buffy.$(OBJEXT) color.$(OBJEXT) crypt.$(OBJEXT) \
- cryptglue.$(OBJEXT) commands.$(OBJEXT) complete.$(OBJEXT) \
- compose.$(OBJEXT) copy.$(OBJEXT) curs_lib.$(OBJEXT) \
- curs_main.$(OBJEXT) date.$(OBJEXT) edit.$(OBJEXT) \
- enter.$(OBJEXT) flags.$(OBJEXT) init.$(OBJEXT) filter.$(OBJEXT) \
- from.$(OBJEXT) getdomain.$(OBJEXT) handler.$(OBJEXT) \
- hash.$(OBJEXT) hdrline.$(OBJEXT) headers.$(OBJEXT) \
- help.$(OBJEXT) hook.$(OBJEXT) keymap.$(OBJEXT) main.$(OBJEXT) \
- mbox.$(OBJEXT) menu.$(OBJEXT) mh.$(OBJEXT) mx.$(OBJEXT) \
- pager.$(OBJEXT) parse.$(OBJEXT) pattern.$(OBJEXT) \
- postpone.$(OBJEXT) query.$(OBJEXT) recvattach.$(OBJEXT) \
- recvcmd.$(OBJEXT) rfc822.$(OBJEXT) rfc1524.$(OBJEXT) \
- rfc2047.$(OBJEXT) rfc2231.$(OBJEXT) score.$(OBJEXT) \
- send.$(OBJEXT) sendlib.$(OBJEXT) signal.$(OBJEXT) \
- sort.$(OBJEXT) status.$(OBJEXT) system.$(OBJEXT) \
- thread.$(OBJEXT) charset.$(OBJEXT) history.$(OBJEXT) \
- lib.$(OBJEXT) muttlib.$(OBJEXT) editmsg.$(OBJEXT) \
- utf8.$(OBJEXT) mbyte.$(OBJEXT) wcwidth.$(OBJEXT) url.$(OBJEXT) \
- ascii.$(OBJEXT) mutt_idna.$(OBJEXT) sidebar.$(OBJEXT)
+ buffy.$(OBJEXT) color.$(OBJEXT) compress.$(OBJEXT) \
+ crypt.$(OBJEXT) cryptglue.$(OBJEXT) commands.$(OBJEXT) \
+ complete.$(OBJEXT) compose.$(OBJEXT) copy.$(OBJEXT) \
+ curs_lib.$(OBJEXT) curs_main.$(OBJEXT) date.$(OBJEXT) \
+ edit.$(OBJEXT) enter.$(OBJEXT) flags.$(OBJEXT) init.$(OBJEXT) \
+ filter.$(OBJEXT) from.$(OBJEXT) getdomain.$(OBJEXT) \
+ handler.$(OBJEXT) hash.$(OBJEXT) hdrline.$(OBJEXT) \
+ headers.$(OBJEXT) help.$(OBJEXT) hook.$(OBJEXT) \
+ keymap.$(OBJEXT) main.$(OBJEXT) mbox.$(OBJEXT) menu.$(OBJEXT) \
+ mh.$(OBJEXT) mx.$(OBJEXT) pager.$(OBJEXT) parse.$(OBJEXT) \
+ pattern.$(OBJEXT) postpone.$(OBJEXT) query.$(OBJEXT) \
+ recvattach.$(OBJEXT) recvcmd.$(OBJEXT) rfc822.$(OBJEXT) \
+ rfc1524.$(OBJEXT) rfc2047.$(OBJEXT) rfc2231.$(OBJEXT) \
+ score.$(OBJEXT) send.$(OBJEXT) sendlib.$(OBJEXT) \
+ signal.$(OBJEXT) sort.$(OBJEXT) status.$(OBJEXT) \
+ system.$(OBJEXT) thread.$(OBJEXT) charset.$(OBJEXT) \
+ history.$(OBJEXT) lib.$(OBJEXT) muttlib.$(OBJEXT) \
+ editmsg.$(OBJEXT) utf8.$(OBJEXT) mbyte.$(OBJEXT) \
+ wcwidth.$(OBJEXT) url.$(OBJEXT) ascii.$(OBJEXT) \
+ mutt_idna.$(OBJEXT) sidebar.$(OBJEXT)
muttng_OBJECTS = $(am_muttng_OBJECTS)
muttng_LDFLAGS =
am_pgpring_OBJECTS = pgppubring.$(OBJEXT) pgplib.$(OBJEXT) lib.$(OBJEXT) \
+rr.compressed
patch-1.5.6i.sidebar.20041122
patch-1.5.4.aw.listreply.1
patch-1.5.4.cd.source_multiple.2
* all return values other than (size_t)(-1) as equivalent. */
#undef ICONV_NONTRANS
+/* The compressed mailboxes support */
+#undef USE_COMPRESSED
+
* all return values other than (size_t)(-1) as equivalent. */
#undef ICONV_NONTRANS
+/* The compressed mailboxes support */
+#undef USE_COMPRESSED
+
--enable-nfs-fix Work around an NFS with broken attributes caching
--enable-buffy-size Use file size attribute instead of access time
--enable-mailtool Enable Sun mailtool attachments support
+ --enable-compressed Enable compressed folders support
--enable-locales-fix The result of isprint() is unreliable
--enable-exact-address Enable regeneration of email addresses
--disable-iconv Disable iconv support
fi
fi;
+# Check whether --enable-compressed or --disable-compressed was given.
+if test "${enable_compressed+set}" = set; then
+ enableval="$enable_compressed"
+ if test x$enableval = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_COMPRESSED 1
+_ACEOF
+
+ fi
+fi;
+
# Check whether --enable-locales-fix or --disable-locales-fix was given.
if test "${enable_locales_fix+set}" = set; then
enableval="$enable_locales_fix"
AC_DEFINE(SUN_ATTACHMENT,1,[ Define to enable Sun mailtool attachments support. ])
fi])
+AC_ARG_ENABLE(compressed, [ --enable-compressed Enable compressed folders support ],
+ [if test x$enableval = xyes; then
+ AC_DEFINE(USE_COMPRESSED)
+ fi])
+
AC_ARG_ENABLE(locales-fix, [ --enable-locales-fix The result of isprint() is unreliable ],
[if test x$enableval = xyes; then
AC_DEFINE(LOCALES_HACK,1,[ Define if the result of isprint() is unreliable. ])
{
int check;
+#ifdef USE_COMPRESSED
+ if (Context->compressinfo && Context->realpath)
+ mutt_str_replace (&LastFolder, Context->realpath);
+ else
+#endif
+
mutt_str_replace (&LastFolder, Context->path);
oldcount = Context ? Context->msgcount : 0;
macro pager \cb |urlview\n
</verb></tscreen>
+<sect1>Compressed folders Support (OPTIONAL)
+<p>
+
+If Mutt was compiled with compressed folders support (by running the
+<em/configure/ script with the <em/--enable-compressed/ flag), Mutt
+can open folders stored in an arbitrary format, provided that the user
+has a script to convert from/to this format to one of the accepted.
+
+The most common use is to open compressed archived folders e.g. with
+gzip.
+
+In addition, the user can provide a script that gets a folder in an
+accepted format and appends its context to the folder in the
+user-defined format, which may be faster than converting the entire
+folder to the accepted format, appending to it and converting back to
+the user-defined format.
+
+There are three hooks defined (<ref id="open-hook" name="open-hook">,
+<ref id="close-hook" name="close-hook"> and <ref id="append-hook"
+name="append-hook">) which define commands to uncompress and compress
+a folder and to append messages to an existing compressed folder
+respectively.
+
+For example:
+
+<tscreen><verb>
+open-hook \\.gz$ "gzip -cd %f > %t"
+close-hook \\.gz$ "gzip -c %t > %f"
+append-hook \\.gz$ "gzip -c %t >> %f"
+</verb></tscreen>
+
+You do not have to specify all of the commands. If you omit <ref
+id="append-hook" name="append-hook">, the folder will be open and
+closed again each time you will add to it. If you omit <ref
+id="close-hook" name="close-hook"> (or give empty command) , the
+folder will be open in the mode. If you specify <ref
+id="append-hook" name="append-hook"> though you'll be able to append
+to the folder.
+
+Note that Mutt will only try to use hooks if the file is not in one of
+the accepted formats. In particular, if the file is empty, mutt
+supposes it is not compressed. This is important because it allows the
+use of programs that do not have well defined extensions. Just use
+&dquot;.&dquot; as a regexp. But this may be surprising if your
+compressing script produces empty files. In this situation, unset <ref
+id="save_empty" name="$save_empty">, so that the compressed file
+will be removed if you delete all of the messages.
+
+<sect2>Open a compressed mailbox for reading<label id="open-hook">
+<p>
+Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
+
+The <em/command/ is the command that can be used for opening the
+folders whose names match <em/regexp/.
+
+The <em/command/ string is the printf-like format string, and it
+should accept two parameters: %f, which is replaced with the
+(compressed) folder name, and %t which is replaced with the
+name of the temporary folder to which to write.
+
+%f and %t can be repeated any number of times in the
+command string, and all of the entries are replaced with the
+appropriate folder name. In addition, %% is replaced by
+%, as in printf, and any other %anything is left as is.
+
+The <em/command/ should <bf/not/ remove the original compressed file.
+The <em/command/ should return non-zero exit status if it fails, so
+mutt knows something's wrong.
+
+Example:
+
+<tscreen><verb>
+open-hook \\.gz$ "gzip -cd %f > %t"
+</verb></tscreen>
+
+If the <em/command/ is empty, this operation is disabled for this file
+type.
+
+<sect2>Write a compressed mailbox<label id="close-hook">
+<p>
+Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
+
+This is used to close the folder that was open with the <ref id="open-hook"
+name="open-hook"> command after some changes were made to it.
+
+The <em/command/ string is the command that can be used for closing the
+folders whose names match <em/regexp/. It has the same format as in
+the <ref id="open-hook" name="open-hook"> command. Temporary folder
+in this case is the folder previously produced by the <<ref id="open-hook"
+name="open-hook"> command.
+
+The <em/command/ should <bf/not/ remove the decompressed file. The
+<em/command/ should return non-zero exit status if it fails, so mutt
+knows something's wrong.
+
+Example:
+
+<tscreen><verb>
+close-hook \\.gz$ "gzip -c %t > %f"
+</verb></tscreen>
+
+If the <em/command/ is empty, this operation is disabled for this file
+type, and the file can only be open in the readonly mode.
+
+<ref id="close-hook" name ="close-hook"> is not called when you exit
+from the folder if the folder was not changed.
+
+<sect2>Append a message to a compressed mailbox<label id="append-hook">
+<p>
+Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
+
+This command is used for saving to an existing compressed folder.
+The <em/command/ is the command that can be used for appending to the
+folders whose names match <em/regexp/. It has the same format as in
+ the <ref id="open-hook" name="open-hook"> command.
+The temporary folder in this case contains the messages that are being
+appended.
+
+The <em/command/ should <bf/not/ remove the decompressed file. The
+<em/command/ should return non-zero exit status if it fails, so mutt
+knows something's wrong.
+
+Example:
+
+<tscreen><verb>
+append-hook \\.gz$ "gzip -c %t >> %f"
+</verb></tscreen>
+
+When <ref id="append-hook" name="append-hook"> is used, the folder is
+not opened, which saves time, but this means that we can not find out
+what the folder type is. Thus the default (<ref id="mbox_type"
+name="$mbox_type">) type is always supposed (i.e.
+this is the format used for the temporary folder).
+
+If the file does not exist when you save to it, <ref id="close-hook"
+name="close-hook"> is called, and not <ref id="append-hook"
+name="append-hook">. <ref id="append-hook" name="append-hook"> is only
+for appending to existing folders.
+
+If the <em/command/ is empty, this operation is disabled for this file
+type. In this case, the folder will be open and closed again (using
+<ref id="open-hook" name="open-hook"> and <ref id="close-hook"
+name="close-hook">respectively) each time you will add to it.
+
+<sect2>Encrypted folders
+<p>
+The compressed folders support can also be used to handle encrypted
+folders. If you want to encrypt a folder with PGP, you may want to use
+the following hooks:
+
+<tscreen><verb>
+open-hook \\.pgp$ "pgp -f < %f > %t"
+close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
+</verb></tscreen>
+
+Please note, that PGP does not support appending to an encrypted
+folder, so there is no append-hook defined.
+
+<bf/Note:/ the folder is temporary stored decrypted in the /tmp
+directory, where it can be read by your system administrator. So think
+about the security aspects of this.
+
<sect>Mutt's MIME Support
<p>
Quite a bit of effort has been made to make Mutt the premier text-mode
<item>
<tt><ref id="alternative_order" name="unalternative_order"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
<item>
+<tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ <em/command/
+<item>
<tt><ref id="auto_view" name="auto_view"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
<item>
<tt><ref id="auto_view" name="unauto_view"></tt> <em/mimetype/ [ <em/mimetype/ ... ]
<item>
<tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
<item>
+<tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ <em/command/
+<item>
<tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ [ <em/regexp/ ]
<item>
<tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ [ <em/pattern/ ... ]
<item>
<tt><ref id="my_hdr" name="unmy_hdr"></tt> <em/field/ [ <em/field/ ... ]
<item>
+<tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ <em/command/
+<item>
<tt><ref id="crypt-hook" name="crypt-hook"></tt> <em/pattern/ <em/key-id/
<item>
<tt><ref id="push" name="push"></tt> <em/string/
to a certain recipient. The meaning of "key ID" is to be taken
broadly: This can be a different e-mail address, a numerical key ID,
or even just an arbitrary search string.
+.PP
+.nf
+\fBopen-hook\fP \fIregexp\fP "\fIcommand\fP"
+\fBclose-hook\fP \fIregexp\fP "\fIcommand\fP"
+\fBappend-hook\fP \fIregexp\fP "\fIcommand\fP"
+.fi
+.IP
+These commands provide a way to handle compressed folders. The given
+\fBregexp\fP specifies which folders are taken as compressed (e.g.
+"\fI\\\\.gz$\fP"). The commands tell Mutt how to uncompress a folder
+(\fBopen-hook\fP), compress a folder (\fBclose-hook\fP) or append a
+compressed mail to a compressed folder (\fBappend-hook\fP). The
+\fIcommand\fP string is the
+.BR printf (3)
+like format string, and it should accept two parameters: \fB%f\fP,
+which is replaced with the (compressed) folder name, and \fB%t\fP
+which is replaced with the name of the temporary folder to which to
+write.
.TP
\fBpush\fP \fIstring\fP
This command adds the named \fIstring\fP to the keyboard buffer.
WHERE char *MixEntryFormat;
#endif
+WHERE char *OperatingSystem INITVAL (NULL);
+
WHERE char *Muttrc INITVAL (NULL);
#ifdef USE_NNTP
WHERE char *NewsCacheDir;
#include "mailbox.h"
#include "mutt_crypt.h"
+#ifdef USE_COMPRESSED
+#include "compress.h"
+#endif
+
#include <limits.h>
#include <string.h>
#include <stdlib.h>
memset (&pattern, 0, sizeof (pattern));
pattern.data = safe_strdup (path);
}
+#ifdef USE_COMPRESSED
+ else if (data & (M_APPENDHOOK | M_OPENHOOK | M_CLOSEHOOK))
+ {
+ if (mutt_test_compress_command (command.data))
+ {
+ strfcpy (err->data, _("bad formatted command string"), err->dsize);
+ return (-1);
+ }
+ }
+#endif
else if (DefaultHook && !(data & (M_CHARSETHOOK | M_ACCOUNTHOOK))
&& (!WithCrypto || !(data & M_CRYPTHOOK))
)
** This specifies the folder into which read mail in your ``$$spoolfile''
** folder will be appended.
*/
+ { "operating_system", DT_STR, R_NONE, UL&OperatingSystem, 0 },
+ /*
+ ** .pp
+ ** This specifies the operating system name for the User-Agent header. If
+ ** this is unset, it will be set to the operating system name that uname(2)
+ ** returns. If uname(2) fails, "UNIX" will be used.
+ */
{ "sidebar_visible", DT_BOOL, R_BOTH, OPTMBOXPANE, 0 },
/*
** .pp
{ "fcc-hook", mutt_parse_hook, M_FCCHOOK },
{ "fcc-save-hook", mutt_parse_hook, M_FCCHOOK | M_SAVEHOOK },
{ "folder-hook", mutt_parse_hook, M_FOLDERHOOK },
+#ifdef USE_COMPRESSED
+ { "open-hook", mutt_parse_hook, M_OPENHOOK },
+ { "close-hook", mutt_parse_hook, M_CLOSEHOOK },
+ { "append-hook", mutt_parse_hook, M_APPENDHOOK },
+#endif
{ "hdr_order", parse_list, UL &HeaderOrderList },
#ifdef HAVE_ICONV
{ "iconv-hook", mutt_parse_hook, M_ICONVHOOK },
"-USE_GNU_REGEX "
#endif
+#ifdef USE_COMPRESSED
+ "+COMPRESSED "
+#else
+ "-COMPRESSED "
+#endif
+
"\n"
#ifdef HAVE_COLOR
#include "sort.h"
#include "copy.h"
+#ifdef USE_COMPRESSED
+#include "compress.h"
+#endif
+
#include <sys/stat.h>
#include <dirent.h>
#include <string.h>
int mbox_close_mailbox (CONTEXT *ctx)
{
mx_unlock_file (ctx->path, fileno (ctx->fp), 1);
+
+#ifdef USE_COMPRESSED
+ if (ctx->compressinfo)
+ mutt_slow_close_compressed (ctx);
+#endif
+
mutt_unblock_signals ();
mx_fastclose_mailbox (ctx);
return 0;
#define M_CRYPTHOOK (1<<8)
#define M_ACCOUNTHOOK (1<<9)
#define M_REPLYHOOK (1<<10)
+#ifdef USE_COMPRESSED
+#define M_OPENHOOK (1<<12)
+#define M_APPENDHOOK (1<<13)
+#define M_CLOSEHOOK (1<<14)
+#endif
/* tree characters for linearize_tree and print_enriched_string */
#define M_TREE_LLCORNER 1
short magic; /* mailbox type */
+#ifdef USE_COMPRESSED
+ void *compressinfo; /* compressed mbox module private data */
+ char *realpath; /* path to compressed mailbox */
+#endif /* USE_COMPRESSED */
+
unsigned int locked : 1; /* is the mailbox locked? */
unsigned int changed : 1; /* mailbox has been modified */
unsigned int readonly : 1; /* don't allow changes to the mailbox */
#include "keymap.h"
#include "url.h"
+#ifdef USE_COMPRESSED
+#include "compress.h"
+#endif
+
#ifdef USE_IMAP
#include "imap.h"
#endif
return (-1);
}
+#ifdef USE_COMPRESSED
+ if (magic == 0 && mutt_can_read_compressed (path))
+ return M_COMPRESSED;
+#endif
+
return (magic);
}
{
struct stat sb;
+#ifdef USE_COMPRESSED
+ /* special case for appending to compressed folders -
+ * even if we can not open them for reading */
+ if (mutt_can_append_compressed (ctx->path))
+ mutt_open_append_compressed (ctx);
+#endif
+
ctx->append = 1;
#ifdef USE_IMAP
ctx->magic = mx_get_magic (path);
+#ifdef USE_COMPRESSED
+ if (ctx->magic == M_COMPRESSED)
+ mutt_open_read_compressed (ctx);
+#endif
+
if(ctx->magic == 0)
mutt_error (_("%s is not a mailbox."), path);
mutt_free_header (&ctx->hdrs[i]);
FREE (&ctx->hdrs);
FREE (&ctx->v2r);
+#ifdef USE_COMPRESSED
+ if (ctx->compressinfo)
+ mutt_fast_close_compressed (ctx);
+#endif
FREE (&ctx->path);
FREE (&ctx->pattern);
if (ctx->limit_pattern)
if (tmp && tmp->new == 0)
mutt_update_mailbox (tmp);
#endif
+
+#ifdef USE_COMPRESSED
+ if (rc == 0 && ctx->compressinfo)
+ return mutt_sync_compressed (ctx);
+#endif
+
return rc;
}
!mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY))
mx_unlink_empty (ctx->path);
+#ifdef USE_COMPRESSED
+ if (ctx->compressinfo && mutt_slow_close_compressed (ctx))
+ return (-1);
+#endif
+
mx_fastclose_mailbox (ctx);
return 0;
{
int rc;
+#ifdef USE_COMPRESSED
+ if (ctx->compressinfo)
+ return mutt_check_mailbox_compressed (ctx);
+#endif
+
if (ctx)
{
if (ctx->locked) lock = 0;
#ifdef USE_NNTP
, M_NNTP
#endif
+#ifdef USE_COMPRESSED
+ , M_COMPRESSED
+#endif
};
WHERE short DefaultMagic INITVAL (M_MBOX);
color.c
commands.c
compose.c
+compress.c
crypt.c
curs_lib.c
curs_main.c
#include <signal.h>
#include <sys/wait.h>
#include <fcntl.h>
+#include <sys/utsname.h>
#ifdef USE_NNTP
#include <nntp.h>
if (mode == 0 && !privacy && option (OPTXMAILER) && !has_agent)
{
+ struct utsname un;
+ char * os;
+ if (OperatingSystem!=NULL) {
+ os = OperatingSystem;
+ } else {
+ if (uname(&un)==-1) {
+ os = "UNIX";
+ } else {
+ os = un.sysname;
+ }
+ }
/* Add a vanity header */
- fprintf (fp, "User-Agent: Mutt/%s\n", MUTT_VERSION);
+ fprintf (fp, "User-Agent: mutt-ng %s (%s)\n", MUTT_VERSION,os);
}
return (ferror (fp) == 0 ? 0 : -1);
case 'f':
snprintf (fmt, sizeof(fmt), "%%%ss", prefix);
+#ifdef USE_COMPRESSED
+ if (Context && Context->compressinfo && Context->realpath)
+ {
+ strfcpy (tmp, Context->realpath, sizeof (tmp));
+ mutt_pretty_mailbox (tmp);
+ }
+ else
+#endif
if (Context && Context->path)
{
strfcpy (tmp, Context->path, sizeof (tmp));