mutt-2.3.2/0000755000175000017500000000000015173276714010710 5ustar00kjmkjmmutt-2.3.2/m4/0000755000175000017500000000000015173276711011225 5ustar00kjmkjmmutt-2.3.2/m4/build-to-host.m40000644000175000017500000002203215173275715014163 0ustar00kjmkjm# build-to-host.m4 # serial 5 dnl Copyright (C) 2023-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file is offered as-is, without any warranty. dnl Written by Bruno Haible. dnl When the build environment ($build_os) is different from the target runtime dnl environment ($host_os), file names may need to be converted from the build dnl environment syntax to the target runtime environment syntax. This is dnl because the Makefiles are executed (mostly) by build environment tools and dnl therefore expect file names in build environment syntax, whereas the runtime dnl expects file names in target runtime environment syntax. dnl dnl For example, if $build_os = cygwin and $host_os = mingw32, filenames need dnl be converted from Cygwin syntax to native Windows syntax: dnl /cygdrive/c/foo/bar -> C:\foo\bar dnl /usr/local/share -> C:\cygwin64\usr\local\share dnl dnl gl_BUILD_TO_HOST([somedir]) dnl This macro takes as input an AC_SUBSTed variable 'somedir', which must dnl already have its final value assigned, and produces two additional dnl AC_SUBSTed variables 'somedir_c' and 'somedir_c_make', that designate the dnl same file name value, just in different syntax: dnl - somedir_c is the file name in target runtime environment syntax, dnl as a C string (starting and ending with a double-quote, dnl and with escaped backslashes and double-quotes in dnl between). dnl - somedir_c_make is the same thing, escaped for use in a Makefile. AC_DEFUN([gl_BUILD_TO_HOST], [ AC_REQUIRE([AC_CANONICAL_BUILD]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_BUILD_TO_HOST_INIT]) dnl Define somedir_c. gl_final_[$1]="$[$1]" dnl Translate it from build syntax to host syntax. case "$build_os" in cygwin*) case "$host_os" in mingw* | windows*) gl_final_[$1]=`cygpath -w "$gl_final_[$1]"` ;; esac ;; esac dnl Convert it to C string syntax. [$1]_c=`printf '%s\n' "$gl_final_[$1]" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes" | tr -d "$gl_tr_cr"` [$1]_c='"'"$[$1]_c"'"' AC_SUBST([$1_c]) dnl Define somedir_c_make. [$1]_c_make=`printf '%s\n' "$[$1]_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2" | tr -d "$gl_tr_cr"` dnl Use the substituted somedir variable, when possible, so that the user dnl may adjust somedir a posteriori when there are no special characters. if test "$[$1]_c_make" = '\"'"${gl_final_[$1]}"'\"'; then [$1]_c_make='\"$([$1])\"' fi AC_SUBST([$1_c_make]) ]) dnl Some initializations for gl_BUILD_TO_HOST. AC_DEFUN([gl_BUILD_TO_HOST_INIT], [ gl_sed_double_backslashes='s/\\/\\\\/g' gl_sed_escape_doublequotes='s/"/\\"/g' changequote(,)dnl gl_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g" changequote([,])dnl gl_sed_escape_for_make_2='s,\$,\\$$,g' dnl Find out how to remove carriage returns from output. Solaris /usr/ucb/tr dnl does not understand '\r'. case `echo r | tr -d '\r'` in '') gl_tr_cr='\015' ;; *) gl_tr_cr='\r' ;; esac ]) dnl The following macros are convenience invocations of gl_BUILD_TO_HOST dnl for some of the variables that are defined by Autoconf. dnl To do so for _all_ the possible variables, use the module 'configmake'. dnl Defines bindir_c and bindir_c_make. AC_DEFUN_ONCE([gl_BUILD_TO_HOST_BINDIR], [ dnl Find the final value of bindir. gl_saved_prefix="${prefix}" gl_saved_exec_prefix="${exec_prefix}" gl_saved_bindir="${bindir}" dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then prefix="$ac_default_prefix" fi if test "X$exec_prefix" = "XNONE"; then exec_prefix='${prefix}' fi eval exec_prefix="$exec_prefix" eval bindir="$bindir" gl_BUILD_TO_HOST([bindir]) bindir="${gl_saved_bindir}" exec_prefix="${gl_saved_exec_prefix}" prefix="${gl_saved_prefix}" ]) dnl Defines datadir_c and datadir_c_make, dnl where datadir = $(datarootdir) AC_DEFUN_ONCE([gl_BUILD_TO_HOST_DATADIR], [ dnl Find the final value of datadir. gl_saved_prefix="${prefix}" gl_saved_datarootdir="${datarootdir}" gl_saved_datadir="${datadir}" dnl Unfortunately, prefix gets only finally determined at the end of dnl configure. if test "X$prefix" = "XNONE"; then prefix="$ac_default_prefix" fi eval datarootdir="$datarootdir" eval datadir="$datadir" gl_BUILD_TO_HOST([datadir]) datadir="${gl_saved_datadir}" datarootdir="${gl_saved_datarootdir}" prefix="${gl_saved_prefix}" ]) dnl Defines libdir_c and libdir_c_make. AC_DEFUN_ONCE([gl_BUILD_TO_HOST_LIBDIR], [ dnl Find the final value of libdir. gl_saved_prefix="${prefix}" gl_saved_exec_prefix="${exec_prefix}" gl_saved_libdir="${libdir}" dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then prefix="$ac_default_prefix" fi if test "X$exec_prefix" = "XNONE"; then exec_prefix='${prefix}' fi eval exec_prefix="$exec_prefix" eval libdir="$libdir" gl_BUILD_TO_HOST([libdir]) libdir="${gl_saved_libdir}" exec_prefix="${gl_saved_exec_prefix}" prefix="${gl_saved_prefix}" ]) dnl Defines libexecdir_c and libexecdir_c_make. AC_DEFUN_ONCE([gl_BUILD_TO_HOST_LIBEXECDIR], [ dnl Find the final value of libexecdir. gl_saved_prefix="${prefix}" gl_saved_exec_prefix="${exec_prefix}" gl_saved_libexecdir="${libexecdir}" dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then prefix="$ac_default_prefix" fi if test "X$exec_prefix" = "XNONE"; then exec_prefix='${prefix}' fi eval exec_prefix="$exec_prefix" eval libexecdir="$libexecdir" gl_BUILD_TO_HOST([libexecdir]) libexecdir="${gl_saved_libexecdir}" exec_prefix="${gl_saved_exec_prefix}" prefix="${gl_saved_prefix}" ]) dnl Defines localedir_c and localedir_c_make. AC_DEFUN_ONCE([gl_BUILD_TO_HOST_LOCALEDIR], [ dnl Find the final value of localedir. gl_saved_prefix="${prefix}" gl_saved_datarootdir="${datarootdir}" gl_saved_localedir="${localedir}" dnl Unfortunately, prefix gets only finally determined at the end of dnl configure. if test "X$prefix" = "XNONE"; then prefix="$ac_default_prefix" fi eval datarootdir="$datarootdir" eval localedir="$localedir" gl_BUILD_TO_HOST([localedir]) localedir="${gl_saved_localedir}" datarootdir="${gl_saved_datarootdir}" prefix="${gl_saved_prefix}" ]) dnl Defines pkgdatadir_c and pkgdatadir_c_make, dnl where pkgdatadir = $(datadir)/$(PACKAGE) AC_DEFUN_ONCE([gl_BUILD_TO_HOST_PKGDATADIR], [ dnl Find the final value of pkgdatadir. gl_saved_prefix="${prefix}" gl_saved_datarootdir="${datarootdir}" gl_saved_datadir="${datadir}" gl_saved_pkgdatadir="${pkgdatadir}" dnl Unfortunately, prefix gets only finally determined at the end of dnl configure. if test "X$prefix" = "XNONE"; then prefix="$ac_default_prefix" fi eval datarootdir="$datarootdir" eval datadir="$datadir" eval pkgdatadir="$pkgdatadir" gl_BUILD_TO_HOST([pkgdatadir]) pkgdatadir="${gl_saved_pkgdatadir}" datadir="${gl_saved_datadir}" datarootdir="${gl_saved_datarootdir}" prefix="${gl_saved_prefix}" ]) dnl Defines pkglibdir_c and pkglibdir_c_make, dnl where pkglibdir = $(libdir)/$(PACKAGE) AC_DEFUN_ONCE([gl_BUILD_TO_HOST_PKGLIBDIR], [ dnl Find the final value of pkglibdir. gl_saved_prefix="${prefix}" gl_saved_exec_prefix="${exec_prefix}" gl_saved_libdir="${libdir}" gl_saved_pkglibdir="${pkglibdir}" dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then prefix="$ac_default_prefix" fi if test "X$exec_prefix" = "XNONE"; then exec_prefix='${prefix}' fi eval exec_prefix="$exec_prefix" eval libdir="$libdir" eval pkglibdir="$pkglibdir" gl_BUILD_TO_HOST([pkglibdir]) pkglibdir="${gl_saved_pkglibdir}" libdir="${gl_saved_libdir}" exec_prefix="${gl_saved_exec_prefix}" prefix="${gl_saved_prefix}" ]) dnl Defines pkglibexecdir_c and pkglibexecdir_c_make, dnl where pkglibexecdir = $(libexecdir)/$(PACKAGE) AC_DEFUN_ONCE([gl_BUILD_TO_HOST_PKGLIBEXECDIR], [ dnl Find the final value of pkglibexecdir. gl_saved_prefix="${prefix}" gl_saved_exec_prefix="${exec_prefix}" gl_saved_libexecdir="${libexecdir}" gl_saved_pkglibexecdir="${pkglibexecdir}" dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then prefix="$ac_default_prefix" fi if test "X$exec_prefix" = "XNONE"; then exec_prefix='${prefix}' fi eval exec_prefix="$exec_prefix" eval libexecdir="$libexecdir" eval pkglibexecdir="$pkglibexecdir" gl_BUILD_TO_HOST([pkglibexecdir]) pkglibexecdir="${gl_saved_pkglibexecdir}" libexecdir="${gl_saved_libexecdir}" exec_prefix="${gl_saved_exec_prefix}" prefix="${gl_saved_prefix}" ]) mutt-2.3.2/m4/curslib.m40000644000175000017500000000502315145244764013134 0ustar00kjmkjmdnl --------------------------------------------------------------------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. AC_DEFUN([CF_CURSES_LIBS],[ AC_CHECK_FUNC(initscr,,[ case $host_os in #(vi freebsd*) #(vi AC_CHECK_LIB(mytinfo,tgoto,[LIBS="-lmytinfo $LIBS"]) ;; hpux10.*|hpux11.*) AC_CHECK_LIB(cur_colr,initscr,[ LIBS="-lcur_colr $LIBS" CFLAGS="-I/usr/include/curses_colr $CFLAGS" ac_cv_func_initscr=yes ],[ AC_CHECK_LIB(Hcurses,initscr,[ # HP's header uses __HP_CURSES, but user claims _HP_CURSES. LIBS="-lHcurses $LIBS" CFLAGS="-D__HP_CURSES -D_HP_CURSES $CFLAGS" ac_cv_func_initscr=yes ])]) ;; linux*) # Suse Linux does not follow /usr/lib convention LIBS="$LIBS -L/lib" ;; esac if test ".$With5lib" != ".no" ; then if test -d /usr/5lib ; then # SunOS 3.x or 4.x CPPFLAGS="$CPPFLAGS -I/usr/5include" LIBS="$LIBS -L/usr/5lib" fi fi if test ".$ac_cv_func_initscr" != .yes ; then cf_save_LIBS="$LIBS" cf_term_lib="" cf_curs_lib="" # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ for cf_term_lib in termcap termlib unknown do AC_CHECK_LIB($cf_term_lib,tgoto,[break]) done ]) # Check for library containing initscr test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown do AC_CHECK_LIB($cf_curs_lib,initscr,[break]) done test $cf_curs_lib = unknown && AC_MSG_ERROR([no curses library found]) LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then AC_MSG_CHECKING(if we can link with $cf_curs_lib library) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <${cf_cv_ncurses_header-curses.h}>]], [[initscr()]])], [cf_result=yes], [cf_result=no]) AC_MSG_RESULT($cf_result) test $cf_result = no && AC_MSG_ERROR([cannot link curses library]) elif test "$cf_term_lib" != predefined ; then AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <${cf_cv_ncurses_header-curses.h}>]], [[initscr(); tgoto((char *)0, 0, 0);]])], [cf_result=no], [ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <${cf_cv_ncurses_header-curses.h}>]], [[initscr()]])], [cf_result=yes], [cf_result=error]) ]) AC_MSG_RESULT($cf_result) fi fi ])]) mutt-2.3.2/m4/funcdecl.m40000644000175000017500000000365315145244764013263 0ustar00kjmkjmdnl --------------------------------------------------------------------------- dnl Check if a function is declared by including a set of include files. dnl Invoke the corresponding actions according to whether it is found or not. dnl dnl Gcc (unlike other compilers) will only warn about the miscast assignment dnl in the first test, but most compilers will oblige with an error in the dnl second test. dnl dnl CF_CHECK_FUNCDECL(INCLUDES, FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) AC_DEFUN([CF_CHECK_FUNCDECL], [ AC_MSG_CHECKING([for $2 declaration]) AC_CACHE_VAL(ac_cv_func_decl_$2, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[#ifndef ${ac_func} extern int ${ac_func}(); #endif]])],[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[#ifndef ${ac_func} int (*p)() = ${ac_func}; #endif]])],[ eval "ac_cv_func_decl_$2=yes"],[ eval "ac_cv_func_decl_$2=no"])],[ eval "ac_cv_func_decl_$2=yes"])]) if eval "test \"`echo '$ac_cv_func_'decl_$2`\" = yes"; then AC_MSG_RESULT(yes) ifelse([$3], , :, [$3]) else AC_MSG_RESULT(no) ifelse([$4], , , [$4 ])dnl fi ])dnl dnl --------------------------------------------------------------------------- dnl Check if functions are declared by including a set of include files. dnl and define DECL_XXX if not. dnl dnl CF_CHECK_FUNCDECLS(INCLUDES, FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) AC_DEFUN([CF_CHECK_FUNCDECLS], [for ac_func in $2 do CF_CHECK_FUNCDECL([$1], $ac_func, [ CF_UPPER(ac_tr_func,HAVE_$ac_func) AC_DEFINE_UNQUOTED($ac_tr_func) $3], [$4])dnl dnl [$3], dnl [ dnl CF_UPPER(ac_tr_func,DECL_$ac_func) dnl AC_DEFINE_UNQUOTED($ac_tr_func) $4])dnl done ])dnl dnl --------------------------------------------------------------------------- dnl Make an uppercase version of a variable dnl $1=uppercase($2) AC_DEFUN([CF_UPPER], [ changequote(,)dnl $1=`echo $2 | tr '[a-z]' '[A-Z]'` changequote([,])dnl ])dnl dnl --------------------------------------------------------------------------- mutt-2.3.2/m4/gettext.m40000644000175000017500000003521615173275715013165 0ustar00kjmkjm# gettext.m4 # serial 81 (gettext-0.23) dnl Copyright (C) 1995-2014, 2016, 2018-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Lesser General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2024. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL must be one of 'external', 'use-libtool', 'here'. dnl INTLSYMBOL should be 'external' for packages other than GNU gettext. dnl It should be 'use-libtool' for the packages 'gettext-runtime' and dnl 'gettext-tools'. dnl It should be 'here' for the package 'gettext-runtime/intl'. dnl If INTLSYMBOL is 'here', then a libtool library dnl $(top_builddir)/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value '$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. m4_if([$1], [], , [m4_if([$1], [external], , [m4_if([$1], [use-libtool], , [m4_if([$1], [here], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) m4_if(m4_if([$1], [], [old])[]m4_if([$1], [no-libtool], [old]), [old], [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported. ])]) m4_if([$2], [], , [m4_if([$2], [need-ngettext], , [m4_if([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_building_libintl_in_same_build_tree], m4_if([$1], [use-libtool], [yes], [m4_if([$1], [here], [yes], [no])])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.ac invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it. m4_if(gt_building_libintl_in_same_build_tree, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) m4_if(gt_building_libintl_in_same_build_tree, yes, [ USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no m4_if(gt_building_libintl_in_same_build_tree, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. m4_if(gt_building_libintl_in_same_build_tree, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_saved_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv or other dnl OS dependent libraries, specifically on macOS and AIX. gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS" AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in aix*) gt_LIBINTL_EXTRA="-lpthread" ;; esac if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \ && { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then LIBS="$LIBS $LIBICONV $gt_LIBINTL_EXTRA" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [LIBINTL="$LIBINTL $LIBICONV $gt_LIBINTL_EXTRA" LTLIBINTL="$LTLIBINTL $LTLIBICONV $gt_LIBINTL_EXTRA" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_saved_CPPFLAGS" LIBS="$gt_saved_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools \ && test "$PACKAGE" != libintl; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi m4_if(gt_building_libintl_in_same_build_tree, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. USE_INCLUDED_LIBINTL=yes LIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD" LTLIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi m4_if(gt_building_libintl_in_same_build_tree, yes, [ dnl Make all variables we use known to autoconf. AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) ]) m4_if(gt_building_libintl_in_same_build_tree, yes, [], [ dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) ]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) dnl Define localedir_c and localedir_c_make. gl_BUILD_TO_HOST_LOCALEDIR ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) mutt-2.3.2/m4/gpg-error.m40000644000175000017500000002025415145244764013400 0ustar00kjmkjm# gpg-error.m4 - autoconf macro to detect libgpg-error. # Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020, 2021 # g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This file is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Last-changed: 2022-09-21 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl dnl Test for libgpg-error and define GPG_ERROR_CFLAGS, GPG_ERROR_LIBS, dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are dnl used for programs requireing real multi thread support. dnl dnl If a prefix option is not used, the config script is first dnl searched in $SYSROOT/bin and then along $PATH. If the used dnl config script does not match the host specification the script dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_GPG_ERROR], [ AC_REQUIRE([AC_CANONICAL_HOST]) gpg_error_config_prefix="" dnl --with-libgpg-error-prefix=PFX is the preferred name for this option, dnl since that is consistent with how our three siblings use the directory/ dnl package name in --with-$dir_name-prefix=PFX. AC_ARG_WITH(libgpg-error-prefix, AS_HELP_STRING([--with-libgpg-error-prefix=PFX], [prefix where GPG Error is installed (optional)]), [gpg_error_config_prefix="$withval"]) dnl Accept --with-gpg-error-prefix and make it work the same as dnl --with-libgpg-error-prefix above, for backwards compatibility, dnl but do not document this old, inconsistently-named option. AC_ARG_WITH(gpg-error-prefix,, [gpg_error_config_prefix="$withval"]) if test x"${GPG_ERROR_CONFIG}" = x ; then if test x"${gpg_error_config_prefix}" != x ; then GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config" else case "${SYSROOT}" in /*) if test -x "${SYSROOT}/bin/gpg-error-config" ; then GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config" fi ;; '') ;; *) AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) ;; esac fi fi AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) ok=no AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH]) if test "$GPGRT_CONFIG" != "no"; then # Determine gpgrt_libdir # # Get the prefix of gpgrt-config assuming it's something like: # /bin/gpgrt-config gpgrt_prefix=${GPGRT_CONFIG%/*/*} possible_libdir1=${gpgrt_prefix}/lib # Determine by using system libdir-format with CC, it's like: # Normal style: /usr/lib # GNU cross style: /usr//lib # Debian style: /usr/lib/ # Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64 # It is assumed that CC is specified to the one of host on cross build. if libdir_candidates=$(${CC:-cc} -print-search-dirs | \ sed -n -e "/^libraries/{s/libraries: =//;s/:/\\ /g;p;}"); then # From the output of -print-search-dirs, select valid pkgconfig dirs. libdir_candidates=$(for dir in $libdir_candidates; do if p=$(cd $dir 2>/dev/null && pwd); then test -d "$p/pkgconfig" && echo $p; fi done) for possible_libdir0 in $libdir_candidates; do # possible_libdir0: # Fallback candidate, the one of system-installed (by $CC) # (/usr//lib, /usr/lib/ or /usr/lib32) # possible_libdir1: # Another candidate, user-locally-installed # (/lib) # possible_libdir2 # Most preferred # (//lib, # /lib/ or /lib32) if test "${possible_libdir0##*/}" = "lib"; then possible_prefix0=${possible_libdir0%/lib} possible_prefix0_triplet=${possible_prefix0##*/} if test -z "$possible_prefix0_triplet"; then continue fi possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib else possible_prefix0=${possible_libdir0%%/lib*} possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0} fi if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then gpgrt_libdir=${possible_libdir2} elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then gpgrt_libdir=${possible_libdir1} elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then gpgrt_libdir=${possible_libdir0} fi if test -n "$gpgrt_libdir"; then break; fi done if test -z "$libdir_candidates"; then # No valid pkgconfig dir in any of the system directories, fallback gpgrt_libdir=${possible_libdir1} fi else # When we cannot determine system libdir-format, use this: gpgrt_libdir=${possible_libdir1} fi else unset GPGRT_CONFIG fi if test -n "$gpgrt_libdir"; then GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` else unset GPGRT_CONFIG fi elif test "$GPG_ERROR_CONFIG" != "no"; then gpg_error_config_version=`$GPG_ERROR_CONFIG --version` unset GPGRT_CONFIG fi if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` if test "$major" -gt "$req_major"; then ok=yes else if test "$major" -eq "$req_major"; then if test "$minor" -ge "$req_minor"; then ok=yes fi fi fi fi AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` if test -z "$GPGRT_CONFIG"; then GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` else GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) if test -z "$GPGRT_CONFIG"; then gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` else gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ *** *** The config script "$GPG_ERROR_CONFIG" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgpg-error-prefix *** to specify a matching config script or use \$SYSROOT. ***]]) gpg_config_script_warn="$gpg_config_script_warn libgpg-error" fi fi else GPG_ERROR_CFLAGS="" GPG_ERROR_LIBS="" GPG_ERROR_MT_CFLAGS="" GPG_ERROR_MT_LIBS="" AC_MSG_RESULT(no) ifelse([$3], , :, [$3]) fi AC_SUBST(GPG_ERROR_CFLAGS) AC_SUBST(GPG_ERROR_LIBS) AC_SUBST(GPG_ERROR_MT_CFLAGS) AC_SUBST(GPG_ERROR_MT_LIBS) ]) mutt-2.3.2/m4/gpgme.m40000644000175000017500000002452615145244764012601 0ustar00kjmkjm# gpgme.m4 - autoconf macro to detect GPGME. # Copyright (C) 2002, 2003, 2004, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This file is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Last-changed: 2022-11-02 AC_DEFUN([_AM_PATH_GPGME_CONFIG], [ AC_ARG_WITH(gpgme-prefix, AS_HELP_STRING([--with-gpgme-prefix=PFX], [prefix where GPGME is installed (optional)]), gpgme_config_prefix="$withval", gpgme_config_prefix="") if test x"${GPGME_CONFIG}" = x ; then if test x"${gpgme_config_prefix}" != x ; then GPGME_CONFIG="${gpgme_config_prefix}/bin/gpgme-config" else case "${SYSROOT}" in /*) if test -x "${SYSROOT}/bin/gpgme-config" ; then GPGME_CONFIG="${SYSROOT}/bin/gpgme-config" fi ;; '') ;; *) AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) ;; esac fi fi use_gpgrt_config="" if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if $GPGRT_CONFIG gpgme --exists; then GPGME_CONFIG="$GPGRT_CONFIG gpgme" AC_MSG_NOTICE([Use gpgrt-config as gpgme-config]) use_gpgrt_config=yes fi fi if test -z "$use_gpgrt_config"; then AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no) fi if test "$GPGME_CONFIG" != "no" ; then if test -z "$use_gpgrt_config"; then gpgme_version=`$GPGME_CONFIG --version` else gpgme_version=`$GPGME_CONFIG --modversion` fi fi gpgme_version_major=`echo $gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` gpgme_version_minor=`echo $gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` gpgme_version_micro=`echo $gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` ]) AC_DEFUN([_AM_PATH_GPGME_CONFIG_HOST_CHECK], [ if test -z "$use_gpgrt_config"; then gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none` else gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$gpgme_config_host" != xnone ; then if test x"$gpgme_config_host" != x"$host" ; then AC_MSG_WARN([[ *** *** The config script "$GPGME_CONFIG" was *** built for $gpgme_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-gpgme-prefix *** to specify a matching config script or use \$SYSROOT. ***]]) gpg_config_script_warn="$gpg_config_script_warn gpgme" fi fi ]) dnl AM_PATH_GPGME([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS. dnl dnl If a prefix option is not used, the config script is first dnl searched in $SYSROOT/bin and then along $PATH. If the used dnl config script does not match the host specification the script dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_GPGME], [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl tmp=ifelse([$1], ,1:0.4.2,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_gpgme_api=0 min_gpgme_version="$tmp" fi AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) ok=no if test "$GPGME_CONFIG" != "no" ; then req_major=`echo $min_gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test "$gpgme_version_major" -gt "$req_major"; then ok=yes else if test "$gpgme_version_major" -eq "$req_major"; then if test "$gpgme_version_minor" -gt "$req_minor"; then ok=yes else if test "$gpgme_version_minor" -eq "$req_minor"; then if test "$gpgme_version_micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi if test $ok = yes; then # If we have a recent GPGME, we should also check that the # API is compatible. if test "$req_gpgme_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` else tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then if test "$req_gpgme_api" -ne "$tmp" ; then ok=no fi fi fi fi if test $ok = yes; then GPGME_CFLAGS=`$GPGME_CONFIG --cflags` GPGME_LIBS=`$GPGME_CONFIG --libs` AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) _AM_PATH_GPGME_CONFIG_HOST_CHECK else GPGME_CFLAGS="" GPGME_LIBS="" AC_MSG_RESULT(no) ifelse([$3], , :, [$3]) fi AC_SUBST(GPGME_CFLAGS) AC_SUBST(GPGME_LIBS) ]) dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS dnl and GPGME_PTHREAD_LIBS. dnl AC_DEFUN([AM_PATH_GPGME_PTHREAD], [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl tmp=ifelse([$1], ,1:0.4.2,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_gpgme_api=0 min_gpgme_version="$tmp" fi AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version) ok=no if test "$GPGME_CONFIG" != "no" ; then if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then req_major=`echo $min_gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test "$gpgme_version_major" -gt "$req_major"; then ok=yes else if test "$gpgme_version_major" -eq "$req_major"; then if test "$gpgme_version_minor" -gt "$req_minor"; then ok=yes else if test "$gpgme_version_minor" -eq "$req_minor"; then if test "$gpgme_version_micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi fi if test $ok = yes; then # If we have a recent GPGME, we should also check that the # API is compatible. if test "$req_gpgme_api" -gt 0 ; then tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then if test "$req_gpgme_api" -ne "$tmp" ; then ok=no fi fi fi fi if test $ok = yes; then GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags` GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs` AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) _AM_PATH_GPGME_CONFIG_HOST_CHECK else GPGME_PTHREAD_CFLAGS="" GPGME_PTHREAD_LIBS="" AC_MSG_RESULT(no) ifelse([$3], , :, [$3]) fi AC_SUBST(GPGME_PTHREAD_CFLAGS) AC_SUBST(GPGME_PTHREAD_LIBS) ]) dnl AM_PATH_GPGME_GLIB([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgpgme-glib and define GPGME_GLIB_CFLAGS and GPGME_GLIB_LIBS. dnl AC_DEFUN([AM_PATH_GPGME_GLIB], [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl tmp=ifelse([$1], ,1:0.4.2,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_gpgme_api=0 min_gpgme_version="$tmp" fi AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) ok=no if test "$GPGME_CONFIG" != "no" ; then req_major=`echo $min_gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_gpgme_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test "$gpgme_version_major" -gt "$req_major"; then ok=yes else if test "$gpgme_version_major" -eq "$req_major"; then if test "$gpgme_version_minor" -gt "$req_minor"; then ok=yes else if test "$gpgme_version_minor" -eq "$req_minor"; then if test "$gpgme_version_micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi if test $ok = yes; then # If we have a recent GPGME, we should also check that the # API is compatible. if test "$req_gpgme_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` else tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then if test "$req_gpgme_api" -ne "$tmp" ; then ok=no fi fi fi fi if test $ok = yes; then if test -z "$use_gpgrt_config"; then GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags` GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs` else if $GPGRT_CONFIG gpgme-glib --exists; then GPGME_CONFIG="$GPGRT_CONFIG gpgme-glib" GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --cflags` GPGME_GLIB_LIBS=`$GPGME_CONFIG --libs` else ok = no fi fi fi if test $ok = yes; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) _AM_PATH_GPGME_CONFIG_HOST_CHECK else GPGME_GLIB_CFLAGS="" GPGME_GLIB_LIBS="" AC_MSG_RESULT(no) ifelse([$3], , :, [$3]) fi AC_SUBST(GPGME_GLIB_CFLAGS) AC_SUBST(GPGME_GLIB_LIBS) ]) mutt-2.3.2/m4/gssapi.m40000644000175000017500000000600215145244764012755 0ustar00kjmkjm# gssapi.m4: Find GSSAPI libraries in either Heimdal or MIT implementations # Brendan Cully 20010529 dnl MUTT_AM_PATH_GSSAPI(PREFIX) dnl Search for a GSSAPI implementation in the standard locations plus PREFIX, dnl if it is set and not "yes". dnl Defines GSSAPI_CFLAGS and GSSAPI_LIBS if found. dnl Defines GSSAPI_IMPL to "Heimdal", "MIT", or "OldMIT", or "none" if not found AC_DEFUN([MUTT_AM_PATH_GSSAPI], [ GSSAPI_PREFIX=[$]$1 GSSAPI_IMPL="none" saved_CPPFLAGS="$CPPFLAGS" saved_LDFLAGS="$LDFLAGS" saved_LIBS="$LIBS" dnl First try krb5-config if test "$GSSAPI_PREFIX" != "yes" then krb5_path="$GSSAPI_PREFIX/bin" else krb5_path="$PATH" fi AC_PATH_PROG(KRB5CFGPATH, krb5-config, none, $krb5_path) if test "$KRB5CFGPATH" != "none" then GSSAPI_CFLAGS="`$KRB5CFGPATH --cflags gssapi`" GSSAPI_LIBS="`$KRB5CFGPATH --libs gssapi`" case "`$KRB5CFGPATH --version`" in "Kerberos 5 "*) GSSAPI_IMPL="MIT";; ?eimdal*) GSSAPI_IMPL="Heimdal";; *) GSSAPI_IMPL="Unknown";; esac dnl check to make sure the library exists LIBS="$saved_LIBS $GSSAPI_LIBS" AC_CHECK_FUNC([gss_init_sec_context], [], [GSSAPI_IMPL="none"]) dnl No krb5-config, run the old code else if test "$GSSAPI_PREFIX" != "yes" then GSSAPI_CFLAGS="-I$GSSAPI_PREFIX/include" GSSAPI_LDFLAGS="-L$GSSAPI_PREFIX/lib" CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS" LDFLAGS="$LDFLAGS $GSSAPI_LDFLAGS" fi dnl New MIT kerberos V support AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context, [ GSSAPI_IMPL="MIT", GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" ],, -lkrb5 -lk5crypto -lcom_err) dnl Heimdal kerberos V support if test "$GSSAPI_IMPL" = "none" then AC_CHECK_LIB(gssapi, gss_init_sec_context, [ GSSAPI_IMPL="Heimdal" GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi -lkrb5 -ldes -lasn1 -lroken" GSSAPI_LIBS="$GSSAPI_LIBS -lcrypt -lcom_err" ],, -lkrb5 -ldes -lasn1 -lroken -lcrypt -lcom_err) fi dnl Old MIT Kerberos V dnl Note: older krb5 distributions use -lcrypto instead of dnl -lk5crypto, which collides with OpenSSL. One way of dealing dnl with that is to extract all objects from krb5's libcrypto dnl and from openssl's libcrypto into the same directory, then dnl to create a new libcrypto from these. if test "$GSSAPI_IMPL" = "none" then AC_CHECK_LIB(gssapi_krb5, g_order_init, [ GSSAPI_IMPL="OldMIT", GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err" ],, -lkrb5 -lcrypto -lcom_err) fi fi dnl Check headers exist if test "$GSSAPI_IMPL" != "none" then CPPFLAGS="$saved_CPPFLAGS $GSSAPI_CFLAGS" if test "$GSSAPI_IMPL" != "Heimdal" then AC_CHECK_HEADER([gssapi/gssapi_generic.h], [], [GSSAPI_IMPL="none"], []) fi AC_CHECK_HEADER([gssapi/gssapi.h], [], [GSSAPI_IMPL="none"], []) fi CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" LIBS="$saved_LIBS" ]) mutt-2.3.2/m4/host-cpu-c-abi.m40000644000175000017500000004145215173275715014213 0ustar00kjmkjm# host-cpu-c-abi.m4 # serial 18 dnl Copyright (C) 2002-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file is offered as-is, without any warranty. dnl From Bruno Haible and Sam Steingold. dnl Sets the HOST_CPU variable to the canonical name of the CPU. dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its dnl C language ABI (application binary interface). dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in dnl config.h. dnl dnl This canonical name can be used to select a particular assembly language dnl source file that will interoperate with C code on the given host. dnl dnl For example: dnl * 'i386' and 'sparc' are different canonical names, because code for i386 dnl will not run on SPARC CPUs and vice versa. They have different dnl instruction sets. dnl * 'sparc' and 'sparc64' are different canonical names, because code for dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit dnl mode, but not both. dnl * 'mips' and 'mipsn32' are different canonical names, because they use dnl different argument passing and return conventions for C functions, and dnl although the instruction set of 'mips' is a large subset of the dnl instruction set of 'mipsn32'. dnl * 'mipsn32' and 'mips64' are different canonical names, because they use dnl different sizes for the C types like 'int' and 'void *', and although dnl the instruction sets of 'mipsn32' and 'mips64' are the same. dnl * The same canonical name is used for different endiannesses. You can dnl determine the endianness through preprocessor symbols: dnl - 'arm': test __ARMEL__. dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. dnl - 'powerpc64': test __BIG_ENDIAN__ vs. __LITTLE_ENDIAN__. dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because dnl - Instructions that do not exist on all of these CPUs (cmpxchg, dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your dnl assembly language source files use such instructions, you will dnl need to make the distinction. dnl - Speed of execution of the common instruction set is reasonable across dnl the entire family of CPUs. If you have assembly language source files dnl that are optimized for particular CPU types (like GNU gmp has), you dnl will need to make the distinction. dnl See . AC_DEFUN([gl_HOST_CPU_C_ABI], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_C_ASM]) AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], [case "$host_cpu" in changequote(,)dnl i[34567]86 ) changequote([,])dnl gl_cv_host_cpu_c_abi=i386 ;; x86_64 ) # On x86_64 systems, the C compiler may be generating code in one of # these ABIs: # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 # with native Windows (mingw, MSVC). # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if (defined __x86_64__ || defined __amd64__ \ || defined _M_X64 || defined _M_AMD64) int ok; #else error fail #endif ]])], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __ILP32__ || defined _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=x86_64-x32], [gl_cv_host_cpu_c_abi=x86_64])], [gl_cv_host_cpu_c_abi=i386]) ;; changequote(,)dnl alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) changequote([,])dnl gl_cv_host_cpu_c_abi=alpha ;; arm* | aarch64 ) # Assume arm with EABI. # On arm64 systems, the C compiler may be generating code in one of # these ABIs: # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef __aarch64__ int ok; #else error fail #endif ]])], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __ILP32__ || defined _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=arm64-ilp32], [gl_cv_host_cpu_c_abi=arm64])], [# Don't distinguish little-endian and big-endian arm, since they # don't require different machine code for simple operations and # since the user can distinguish them through the preprocessor # defines __ARMEL__ vs. __ARMEB__. # But distinguish arm which passes floating-point arguments and # return values in integer registers (r0, r1, ...) - this is # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which # passes them in float registers (s0, s1, ...) and double registers # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer # sets the preprocessor defines __ARM_PCS (for the first case) and # __ARM_PCS_VFP (for the second case), but older GCC does not. echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c # Look for a reference to the register d0 in the .s file. AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then gl_cv_host_cpu_c_abi=armhf else gl_cv_host_cpu_c_abi=arm fi rm -f conftest* ]) ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) # On hppa, the C compiler may be generating 32-bit code or 64-bit # code. In the latter case, it defines _LP64 and __LP64__. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef __LP64__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=hppa64], [gl_cv_host_cpu_c_abi=hppa]) ;; ia64* ) # On ia64 on HP-UX, the C compiler may be generating 64-bit code or # 32-bit code. In the latter case, it defines _ILP32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=ia64-ilp32], [gl_cv_host_cpu_c_abi=ia64]) ;; mips* ) # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this # at 32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=mips64], [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but # may later get defined by ), and _MIPS_SIM == _ABIN32. # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but # may later get defined by ), and _MIPS_SIM == _ABIO32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if (_MIPS_SIM == _ABIN32) int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=mipsn32], [gl_cv_host_cpu_c_abi=mips])]) ;; powerpc* ) # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. # No need to distinguish them here; the caller may distinguish # them based on the OS. # On powerpc64 systems, the C compiler may still be generating # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may # be generating 64-bit code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __powerpc64__ || defined __LP64__ int ok; #else error fail #endif ]])], [# On powerpc64, there are two ABIs on Linux: The AIX compatible # one and the ELFv2 one. The latter defines _CALL_ELF=2. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined _CALL_ELF && _CALL_ELF == 2 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=powerpc64-elfv2], [gl_cv_host_cpu_c_abi=powerpc64]) ], [gl_cv_host_cpu_c_abi=powerpc]) ;; rs6000 ) gl_cv_host_cpu_c_abi=powerpc ;; riscv32 | riscv64 ) # There are 2 architectures (with variants): rv32* and rv64*. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if __riscv_xlen == 64 int ok; #else error fail #endif ]])], [cpu=riscv64], [cpu=riscv32]) # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. # Size of 'long' and 'void *': AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __LP64__ int ok; #else error fail #endif ]])], [main_abi=lp64], [main_abi=ilp32]) # Float ABIs: # __riscv_float_abi_double: # 'float' and 'double' are passed in floating-point registers. # __riscv_float_abi_single: # 'float' are passed in floating-point registers. # __riscv_float_abi_soft: # No values are passed in floating-point registers. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __riscv_float_abi_double int ok; #else error fail #endif ]])], [float_abi=d], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __riscv_float_abi_single int ok; #else error fail #endif ]])], [float_abi=f], [float_abi='']) ]) gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" ;; s390* ) # On s390x, the C compiler may be generating 64-bit (= s390x) code # or 31-bit (= s390) code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __LP64__ || defined __s390x__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=s390x], [gl_cv_host_cpu_c_abi=s390]) ;; sparc | sparc64 ) # UltraSPARCs running Linux have `uname -m` = "sparc64", but the # C compiler still generates 32-bit code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=sparc64], [gl_cv_host_cpu_c_abi=sparc]) ;; *) gl_cv_host_cpu_c_abi="$host_cpu" ;; esac ]) dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" AC_SUBST([HOST_CPU]) AC_SUBST([HOST_CPU_C_ABI]) # This was # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) # earlier, but KAI C++ 3.2d doesn't like this. sed -e 's/-/_/g' >> confdefs.h <. dnl Don't make changes that are incompatible with that documentation! AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. gl_saved_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then gl_saved_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$gl_saved_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10, macOS 14.4. gl_saved_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif ]], [[int result = 0; /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from successful returns. This is even documented in */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against macOS 14.4 bug: Failures are not distinguishable from successful returns. POSIX:2018 says: "The iconv() function shall ... return the number of non-identical conversions performed." But here, the conversion always does transliteration (the suffixes "//TRANSLIT" and "//IGNORE" have no effect, nor does iconvctl()) and does not report when it does a non-identical conversion. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\305\202"; /* LATIN SMALL LETTER L WITH STROKE */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); /* Here: With glibc, GNU libiconv (including macOS up to 13): res == (size_t)-1, errno == EILSEQ. With musl libc, NetBSD 10, Solaris 11: res == 1. With macOS 14.4: res == 0, output is "l". */ if (res == 0) result |= 2; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 4; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 8; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 16; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 32; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ]])], [am_cv_func_iconv_works=yes], , [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) test "$am_cv_func_iconv_works" = no || break done LIBS="$gl_saved_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$gl_saved_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". AC_DEFUN_ONCE([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([whether iconv is compatible with its POSIX signature], [gl_cv_iconv_nonconst], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); ]], [[]])], [gl_cv_iconv_nonconst=yes], [gl_cv_iconv_nonconst=no]) ]) else dnl When compiling GNU libiconv on a system that does not have iconv yet, dnl pick the POSIX compliant declaration without 'const'. gl_cv_iconv_nonconst=yes fi if test $gl_cv_iconv_nonconst = yes; then iconv_arg1="" else iconv_arg1="const" fi AC_DEFINE_UNQUOTED([ICONV_CONST], [$iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test $gl_cv_iconv_nonconst != yes; then ICONV_CONST="const" fi ]) dnl A summary result, for those packages which want to print a summary at the dnl end of the configuration. if test "$am_func_iconv" = yes; then if test -n "$LIBICONV"; then am_cv_func_iconv_summary='yes, in libiconv' else am_cv_func_iconv_summary='yes, in libc' fi else if test "$am_cv_func_iconv" = yes; then am_cv_func_iconv_summary='not working, consider installing GNU libiconv' else am_cv_func_iconv_summary='no, consider installing GNU libiconv' fi fi ]) mutt-2.3.2/m4/intlmacosx.m40000644000175000017500000000675015173275715013663 0ustar00kjmkjm# intlmacosx.m4 # serial 10 (gettext-0.23) dnl Copyright (C) 2004-2014, 2016, 2019-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file is offered as-is, without any warranty. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Lesser General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on Mac OS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in Mac OS X 10.4. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_saved_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Don't check for the API introduced in Mac OS X 10.5, CFLocaleCopyCurrent, dnl because in macOS 10.13.4 it has the following behaviour: dnl When two or more languages are specified in the dnl "System Preferences > Language & Region > Preferred Languages" panel, dnl it returns en_CC where CC is the territory (even when English is not among dnl the preferred languages!). What we want instead is what dnl CFLocaleCopyCurrent returned in earlier macOS releases and what dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the dnl first among the preferred languages and CC is the territory. AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], [gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFLocaleCopyPreferredLanguages();]])], [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) LIBS="$gt_saved_LIBS"]) if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then dnl Starting with macOS version 14, CoreFoundation relies on CoreServices, dnl and we have to link it in explicitly, otherwise an exception dnl NSInvalidArgumentException "unrecognized selector sent to instance" dnl occurs. INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) mutt-2.3.2/m4/lib-ld.m40000644000175000017500000001250015173275715012633 0ustar00kjmkjm# lib-ld.m4 # serial 13 dnl Copyright (C) 1996-2003, 2009-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file is offered as-is, without any warranty. dnl Subroutines of libtool.m4, dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi if test -n "$LD"; then AC_MSG_CHECKING([for ld]) elif test "$GCC" = yes; then AC_MSG_CHECKING([for ld used by $CC]) elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi if test -n "$LD"; then # Let the user override the test with a path. : else AC_CACHE_VAL([acl_cv_path_LD], [ acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw* | windows*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_saved_IFS" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) AC_ARG_WITH(PACK[-prefix], [[ --with-]]PACK[[-prefix[=DIR] search for ]]PACKLIBS[[ in DIR/include and DIR/lib --without-]]PACK[[-prefix don't search for ]]PACKLIBS[[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi ]) if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Use breadth-first search. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi fi done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$saved_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then dnl Really add $dependency_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then dnl Really add $dependency_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. dnl But on GNU systems, ignore -lc options, because dnl - linking with libc is the default anyway, dnl - linking with libc.a may produce an error dnl "/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie" dnl or may produce an executable that always crashes, see dnl . dep=`echo "X$dep" | sed -e 's/^X-l//'` if test "X$dep" != Xc \ || case $host_os in linux* | gnu* | k*bsd*-gnu) false ;; *) true ;; esac; then names_next_round="$names_next_round $dep" fi ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2" \ && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2" \ && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_saved_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) mutt-2.3.2/m4/lib-prefix.m40000644000175000017500000003044615173275715013542 0ustar00kjmkjm# lib-prefix.m4 # serial 23 dnl Copyright (C) 2001-2005, 2008-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file is offered as-is, without any warranty. dnl From Bruno Haible. dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH([lib-prefix], [[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_saved_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_saved_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a function acl_is_expected_elfclass, that tests whether standard input dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing dnl the basename of the libdir to try in turn, either "lib" or "lib64" or dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib, lib32, and lib64. dnl On most glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. dnl We determine the compiler's default mode by looking at the compiler's dnl library search path. If at least one of its elements ends in /lib64 or dnl points to a directory whose absolute pathname ends in /lib64, we use that dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, dnl namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], [AC_EGREP_CPP([Extensible Linking Format], [#if defined __ELF__ || (defined __linux__ && (defined __EDG__ || defined __SUNPRO_C)) Extensible Linking Format #endif ], [gl_cv_elf=yes], [gl_cv_elf=no]) ]) if test $gl_cv_elf = yes; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then # Use POSIX od. func_elfclass () { od -A n -t d1 -j 4 -N 1 } else # Use BSD hexdump. func_elfclass () { dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' echo } fi # Use 'expr', not 'test', to compare the values of func_elfclass, because on # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, # not 1 or 2. changequote(,)dnl case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null } ;; *) # Unknown. acl_is_expected_elfclass () { : } ;; esac changequote([,])dnl else acl_is_expected_elfclass () { : } fi dnl Allow the user to override the result by setting acl_cv_libdirstems. AC_CACHE_CHECK([for the common suffixes of directories in the library search path], [acl_cv_libdirstems], [dnl Try 'lib' first, because that's the default for libdir in GNU, see dnl . acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. if test $HOST_CPU_C_ABI_32BIT = no; then acl_libdirstem2=lib/64 case "$host_cpu" in sparc*) acl_libdirstem3=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; netbsd*) dnl On NetBSD/sparc64, there is a 'sparc' subdirectory that contains dnl 32-bit libraries. if test $HOST_CPU_C_ABI_32BIT != no; then case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparc ;; esac fi ;; *) dnl If $CC generates code for a 32-bit ABI, the libraries are dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. dnl Find the compiler's search path. However, non-system compilers dnl sometimes have odd library search paths. But we can't simply invoke dnl '/usr/bin/gcc -print-search-dirs' because that would not take into dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test $HOST_CPU_C_ABI_32BIT != no; then # 32-bit or unknown ABI. if test -d /usr/lib32; then acl_libdirstem2=lib32 fi fi if test $HOST_CPU_C_ABI_32BIT != yes; then # 64-bit or unknown ABI. if test -d /usr/lib64; then acl_libdirstem3=lib64 fi fi if test -n "$searchpath"; then acl_saved_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib32 ) acl_libdirstem2=lib32 ;; */lib64 ) acl_libdirstem3=lib64 ;; esac ;; esac fi done IFS="$acl_saved_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= fi if test $HOST_CPU_C_ABI_32BIT = no; then # 64-bit ABI. acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" ]) dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and dnl acl_libdirstem3. changequote(,)dnl acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` changequote([,])dnl ]) mutt-2.3.2/m4/nls.m40000644000175000017500000000232415173275715012267 0ustar00kjmkjm# nls.m4 # serial 6 (gettext-0.20.2) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2024 Free dnl Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Lesser General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) mutt-2.3.2/m4/po.m40000644000175000017500000004510515173275715012115 0ustar00kjmkjm# po.m4 # serial 33 (gettext-0.23) dnl Copyright (C) 1995-2014, 2016, 2018-2022, 2024 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Lesser General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2024. AC_PREREQ([2.60]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AC_PROG_SED])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.22]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Test whether it is GNU msgmerge >= 0.20. if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' else dnl Test whether it is GNU msgmerge >= 0.12. if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' else dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is dnl slow. But this is not a big problem, as such old gettext versions are dnl hardly in use any more. MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' fi fi AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*) useit=yes ;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. AC_PREREQ([2.53]) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in m4_if([$5], , $PATH, [$5]); do IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$gt_saved_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. m4_if([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test m4_if([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) fi AC_SUBST([$1])dnl ]) mutt-2.3.2/m4/types.m40000644000175000017500000000160413653360550012630 0ustar00kjmkjmdnl types.m4 dnl macros for type checks not covered by autoconf dnl MUTT_C99_INTTYPES dnl Brendan Cully dnl # MUTT_C99_INTTYPES # Check for C99 integer type definitions, or define if missing AC_DEFUN([MUTT_C99_INTTYPES], [dnl AC_CHECK_HEADERS([inttypes.h]) AC_CHECK_TYPE([uint32_t], [AC_DEFINE(HAVE_C99_INTTYPES, 1, [Define if you have the C99 integer types])]) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long long)]) AH_VERBATIM([X_HAVE_C99_INTTYPES], [#ifndef HAVE_C99_INTTYPES # if SIZEOF_SHORT == 4 typedef unsigned short uint32_t; # elif SIZEOF_INT == 4 typedef unsigned int uint32_t; # elif SIZEOF_LONG == 4 typedef unsigned long uint32_t; # endif # if SIZEOF_INT == 8 typedef unsigned int uint64_t; # elif SIZEOF_LONG == 8 typedef unsigned long uint64_t; # elif SIZEOF_LONG_LONG == 8 typedef unsigned long long uint64_t; # endif #endif ]) mutt-2.3.2/m4/Makefile.am0000644000175000017500000000026515145244764013266 0ustar00kjmkjmEXTRA_DIST = host-cpu-c-abi.m4 intlmacosx.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 README dist-hook: for i in $(srcdir)/*.m4 ; do \ cp -f -p $$i $(distdir) ; \ done mutt-2.3.2/m4/Makefile.in0000644000175000017500000003274115173276605013303 0ustar00kjmkjm# Makefile.in generated by automake 1.18.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2025 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) am__rm_f = rm -f $(am__rm_f_notfound) am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/build-to-host.m4 \ $(top_srcdir)/m4/curslib.m4 $(top_srcdir)/m4/funcdecl.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gpg-error.m4 \ $(top_srcdir)/m4/gpgme.m4 $(top_srcdir)/m4/gssapi.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/types.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DB2XTEXI = @DB2XTEXI@ DBX = @DBX@ DEBUGGER = @DEBUGGER@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOTLOCK_GROUP = @DOTLOCK_GROUP@ DOTLOCK_PERMISSION = @DOTLOCK_PERMISSION@ DOTLOCK_TARGET = @DOTLOCK_TARGET@ DSLROOT = @DSLROOT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ GDB = @GDB@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPGME_CFLAGS = @GPGME_CFLAGS@ GPGME_CONFIG = @GPGME_CONFIG@ GPGME_LIBS = @GPGME_LIBS@ GPGRT_CONFIG = @GPGRT_CONFIG@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@ GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ ISPELL = @ISPELL@ KRB5CFGPATH = @KRB5CFGPATH@ LDFLAGS = @LDFLAGS@ LIBAUTOCRYPT = @LIBAUTOCRYPT@ LIBAUTOCRYPTDEPS = @LIBAUTOCRYPTDEPS@ LIBICONV = @LIBICONV@ LIBIMAP = @LIBIMAP@ LIBIMAPDEPS = @LIBIMAPDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MUTTLIBS = @MUTTLIBS@ MUTT_LIB_OBJECTS = @MUTT_LIB_OBJECTS@ OBJEXT = @OBJEXT@ OPS = @OPS@ OSPCAT = @OSPCAT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGPAUX_TARGET = @PGPAUX_TARGET@ POSUB = @POSUB@ RANLIB = @RANLIB@ SDB = @SDB@ SED = @SED@ SENDMAIL = @SENDMAIL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SMIMEAUX_TARGET = @SMIMEAUX_TARGET@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localedir_c = @localedir_c@ localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = host-cpu-c-abi.m4 intlmacosx.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 README all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -$(am__rm_f) $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am dist-hook distclean distclean-generic distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am .PRECIOUS: Makefile dist-hook: for i in $(srcdir)/*.m4 ; do \ cp -f -p $$i $(distdir) ; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Tell GNU make to disable its built-in pattern rules. %:: %,v %:: RCS/%,v %:: RCS/% %:: s.% %:: SCCS/s.% mutt-2.3.2/m4/README0000644000175000017500000000120715145244764012107 0ustar00kjmkjmThese files are used by a program called aclocal (part of the GNU automake package). aclocal uses these files to create aclocal.m4 which is in turn used by autoconf to create the configure script at the the top level in this distribution. Used for gettext and iconv (installed by gettextize): gettext.m4 host-cpu-c-abi.m4 iconv.m4 intlmacosx.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 Used for curses: curslib.m4 funcdecl.m4 Used for GPGME: gpgme.m4 gpg-error.m4 Used for GSSAPI (kerberos): gssapi.m4 Used for integer types: types.m4 (should probably be pulled inside the main configure.ac file instead.) mutt-2.3.2/Makefile.am0000644000175000017500000002040015173275600012731 0ustar00kjmkjm## Process this file with automake to produce Makefile.in ## Use aclocal -I m4; automake --foreign include $(top_srcdir)/flymake.am AUTOMAKE_OPTIONS = 1.6 foreign EXTRA_PROGRAMS = mutt_dotlock mutt_pgpring pgpewrap if BUILD_IMAP IMAP_SUBDIR = imap IMAP_INCLUDES = -I$(top_srcdir)/imap endif if BUILD_AUTOCRYPT AUTOCRYPT_SUBDIR = autocrypt AUTOCRYPT_INCLUDES = -I$(top_srcdir)/autocrypt endif SUBDIRS = m4 po doc contrib $(IMAP_SUBDIR) $(AUTOCRYPT_SUBDIR) bin_SCRIPTS = muttbug flea $(SMIMEAUX_TARGET) if BUILD_HCACHE HCVERSION = hcversion.h endif BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h conststrings.c version.h $(HCVERSION) bin_PROGRAMS = mutt $(DOTLOCK_TARGET) $(PGPAUX_TARGET) mutt_SOURCES = \ addrbook.c alias.c attach.c background.c base64.c browser.c buffer.c \ buffy.c color.c crypt.c cryptglue.c \ commands.c complete.c compose.c copy.c curs_lib.c curs_main.c \ curs_ti_lib.c date.c \ edit.c enter.c flags.c init.c filter.c from.c \ getdomain.c group.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 rfc3676.c \ score.c send.c sendlib.c signal.c sort.c \ status.c system.c thread.c charset.c history.c lib.c \ mutt_lisp.c muttlib.c editmsg.c mbyte.c \ url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c \ mutt_random.c listmenu.c messageid.c nodist_mutt_SOURCES = $(BUILT_SOURCES) mutt_LDADD = $(MUTT_LIB_OBJECTS) $(LIBOBJS) \ $(LIBIMAP) $(LIBAUTOCRYPT) \ $(MUTTLIBS) \ $(LIBINTL) $(LIBICONV) $(GPGME_LIBS) $(GPG_ERROR_LIBS) mutt_DEPENDENCIES = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAPDEPS) \ $(INTLDEPS) $(LIBAUTOCRYPTDEPS) DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \ -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \ -DHAVE_CONFIG_H=1 AM_CPPFLAGS=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(AUTOCRYPT_INCLUDES) $(GPGME_CFLAGS) $(GPG_ERROR_CFLAGS) # This option allows `make distcheck` to run without encountering # setgid errors. AM_DISTCHECK_CONFIGURE_FLAGS = --with-homespool EXTRA_mutt_SOURCES = account.c bcache.c compress.c crypt-gpgme.c crypt-mod-pgp-classic.c \ crypt-mod-pgp-gpgme.c crypt-mod-smime-classic.c \ crypt-mod-smime-gpgme.c dotlock.c gnupgparse.c hcache.c md5.c monitor.c \ mutt_idna.c mutt_sasl.c mutt_sasl_gnu.c mutt_socket.c mutt_ssl.c \ mutt_ssl_gnutls.c \ mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c pgplib.c pgpmicalg.c \ pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c resize.c sha1.c \ sidebar.c smime.c smtp.c utf8.c wcwidth.c mutt_zstrm.c \ bcache.h browser.h hcache.h mbyte.h monitor.h mutt_idna.h remailer.h url.h \ mutt_lisp.h mutt_random.h EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \ configure account.h \ attach.h buffer.h buffy.h charset.h color.h compress.h copy.h crypthash.h \ dotlock.h functions.h gen_defs gettext.h \ 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 \ mutt_regex.h mutt_sasl.h mutt_sasl_gnu.h mutt_socket.h mutt_ssl.h \ mutt_tunnel.h \ mx.h pager.h pgp.h pop.h protos.h rfc1524.h rfc2047.h \ rfc2231.h rfc822.h rfc3676.h sha1.h sort.h mime.types VERSION prepare \ _mutt_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \ mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h \ README.SSL smime.h group.h mutt_zstrm.h send.h background.h \ muttbug pgppacket.h depcomp ascii.h PATCHES patchlist.sh \ ChangeLog mkchangelog.sh mkreldate.sh mutt_idna.h sidebar.h OPS.SIDEBAR \ regex.c crypt-gpgme.h hcachever.pl \ txt2c.c txt2c.sh version.sh check_sec.sh README.PACKAGERS EXTRA_SCRIPTS = smime_keys mutt_dotlock_SOURCES = mutt_dotlock.c mutt_dotlock_LDADD = $(LIBOBJS) mutt_dotlock_DEPENDENCIES = $(LIBOBJS) mutt_pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c mutt_pgpring_LDADD = $(LIBOBJS) $(LIBINTL) mutt_pgpring_DEPENDENCIES = $(LIBOBJS) $(INTLDEPS) txt2c_SOURCES = txt2c.c txt2c_LDADD = noinst_PROGRAMS = txt2c mutt_dotlock.c: dotlock.c cp $(srcdir)/dotlock.c mutt_dotlock.c # With autoconf 2.71, the "ac_cs_config=" line in config.status may contain # sequences like '\'' when using a configure argument with spaces in it, # for instance CFLAGS with several options. Thus it is not sufficient to # get this line with grep; one needs to eval it and output the result. conststrings.c: txt2c config.status ( \ ($(CC) -v >/dev/null 2>&1 && $(CC) -v) || \ ($(CC) --version >/dev/null 2>&1 && $(CC) --version) || \ ($(CC) -V >/dev/null 2>&1 && $(CC) -V) || \ echo "unknown compiler"; \ ) 2>&1 | ${srcdir}/txt2c.sh cc_version >conststrings_c echo "$(CFLAGS)" | ${srcdir}/txt2c.sh cc_cflags >>conststrings_c ( eval "`grep '^ac_cs_config=' config.status`" && echo $$ac_cs_config; ) | ${srcdir}/txt2c.sh configure_options >>conststrings_c mv -f conststrings_c conststrings.c CLEANFILES = mutt_dotlock.c $(BUILT_SOURCES) DISTCLEANFILES= flea smime_keys txt2c po/$(PACKAGE).pot ACLOCAL_AMFLAGS = -I m4 LDADD = $(LIBOBJS) $(LIBINTL) flea: $(srcdir)/muttbug cp $(srcdir)/muttbug flea chmod +x flea smime_keys: $(srcdir)/smime_keys.pl cp $(srcdir)/smime_keys.pl smime_keys chmod +x smime_keys keymap_defs.h: $(OPS) config.h $(srcdir)/gen_defs $(srcdir)/gen_defs $(OPS) > keymap_defs.h # If we have GNU make, we can use the FORCE target to enable # automatic rebuilding of version.h after a commit. if GNU_MAKE version.h: FORCE echo '#define MUTT_VERSION "'`sh "$(srcdir)/version.sh"`'"' > $@.tmp cmp -s $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@ FORCE: # On some other versions of make, such as OpenBSD, invoking the # version.h target always retriggers targets with that prerequisite, which # causes installation issues. else version.h: $(srcdir)/version.sh echo '#define MUTT_VERSION "'`sh "$(srcdir)/version.sh"`'"' > version.h endif reldate.h: $(srcdir)/mkreldate.sh $(srcdir)/ChangeLog echo 'const char *ReleaseDate = "'`(cd $(srcdir) && ./mkreldate.sh)`'";' > reldate.h # The '#undef ENABLE_NLS' is to work around an automake ordering issue: # BUILT_SOURCES are processed before SUBDIRS. # If configured with --with-included-gettext this means that intl will # not have generated libintl.h yet, and mutt.h -> lib.h will generate # an error. hcversion.h: $(srcdir)/mutt.h $(srcdir)/rfc822.h $(srcdir)/buffer.h config.h $(srcdir)/hcachever.pl $(srcdir)/color.h ( echo '#include "config.h"'; echo '#undef ENABLE_NLS'; echo '#include "mutt.h"'; ) \ | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - | perl $(srcdir)/hcachever.pl > hcversion.h patchlist.c: $(srcdir)/PATCHES $(srcdir)/patchlist.sh $(srcdir)/patchlist.sh < $(srcdir)/PATCHES > patchlist.c install-exec-hook: if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/mutt_dotlock ; then \ rm -f $(DESTDIR)$(bindir)/mutt.dotlock ; \ ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \ fi if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x$(DOTLOCK_GROUP) != x ; then \ chgrp $(DOTLOCK_GROUP) $(DESTDIR)$(bindir)/mutt_dotlock && \ chmod $(DOTLOCK_PERMISSION) $(DESTDIR)$(bindir)/mutt_dotlock || \ { echo "Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \ fi install-data-local: $(MKDIR_P) $(DESTDIR)$(sysconfdir) $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/mime.types.dist -if [ ! -f $(DESTDIR)$(sysconfdir)/mime.types ]; then \ $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir); \ fi uninstall-local: for i in mime.types ; do \ if cmp -s $(DESTDIR)$(sysconfdir)/$$i.dist $(DESTDIR)$(sysconfdir)/$$i ; then \ rm $(DESTDIR)$(sysconfdir)/$$i ; \ fi ; \ rm $(DESTDIR)$(sysconfdir)/$${i}.dist ; \ done pclean: cat /dev/null > $(top_srcdir)/PATCHES check-security: (cd $(top_srcdir) && ./check_sec.sh) update-changelog: (cd $(top_srcdir); \ (sh ./mkchangelog.sh; echo; cat ChangeLog) > ChangeLog.$$$$ && mv ChangeLog.$$$$ ChangeLog; \ $${VISUAL:-vi} ChangeLog) mutt-dist: (cd $(srcdir) && ./build-release ) update-doc: (cd doc && $(MAKE) update-doc) shellcheck: (find . -name \*.sh && echo "gen_defs muttbug prepare") | xargs shellcheck --exclude=SC2003,SC2006,SC2086,SC2162,SC2046 .PHONY: commit pclean check-security shellcheck mutt-2.3.2/configure0000755000175000017500000206433215173276605012630 0ustar00kjmkjm#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.73 for mutt 2.3.2. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2026 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # contradicts POSIX and common usage. Disable this. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf '%s\n' "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac case $# in # (( 0) exec $CONFIG_SHELL $as_opts "$as_myself" ;; *) exec $CONFIG_SHELL $as_opts "$as_myself" "$@" ;; esac # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf '%s\n' "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # contradicts POSIX and common usage. Disable this. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case e in #( e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else case e in #( e) exitcode=1; echo positional parameters were not saved. ;; esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else case e in #( e) as_have_required=no ;; esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi ;; esac fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac case $# in # (( 0) exec $CONFIG_SHELL $as_opts "$as_myself" ;; *) exec $CONFIG_SHELL $as_opts "$as_myself" "$@" ;; esac # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf '%s\n' "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf '%s\n' "$0: This script requires a shell more modern than all" printf '%s\n' "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf '%s\n' "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf '%s\n' "$0: be upgraded to zsh 4.3.4 or later." else printf '%s\n' "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi ;; esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf '%s\n' "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf '%s\n' X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf '%s\n' "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf '%s\n' X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' t clear :clear s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf '%s\n' "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_CONFIG_STATUS= ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='mutt' PACKAGE_TARNAME='mutt' PACKAGE_VERSION='2.3.2' PACKAGE_STRING='mutt 2.3.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="mutt.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_func_c_list= gt_needs= : ${enable_year2038:=no} ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS BUILD_DOC_FALSE BUILD_DOC_TRUE BUILD_INFO_FALSE BUILD_INFO_TRUE DB2XTEXI DSLROOT OSPCAT localedir_c_make localedir_c POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS MSGMERGE_FOR_MSGFMT_OPTION MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS SED LIBIMAPDEPS LIBIMAP MUTT_LIB_OBJECTS MUTTLIBS BUILD_HCACHE_FALSE BUILD_HCACHE_TRUE USE_SASL_GNU_FALSE USE_SASL_GNU_TRUE USE_SASL_CYRUS_FALSE USE_SASL_CYRUS_TRUE USE_SSL_FALSE USE_SSL_TRUE USE_GSS_FALSE USE_GSS_TRUE KRB5CFGPATH BUILD_IMAP_FALSE BUILD_IMAP_TRUE DOTLOCK_PERMISSION DOTLOCK_GROUP DOTLOCK_TARGET LIBOBJS ISPELL SMIMEAUX_TARGET PGPAUX_TARGET OPS BUILD_COMPRESS_FALSE BUILD_COMPRESS_TRUE GPGME_LIBS GPGME_CFLAGS GPGME_CONFIG GPG_ERROR_MT_LIBS GPG_ERROR_MT_CFLAGS GPG_ERROR_LIBS GPG_ERROR_CFLAGS GPGRT_CONFIG GPG_ERROR_CONFIG LIBAUTOCRYPTDEPS LIBAUTOCRYPT BUILD_AUTOCRYPT_FALSE BUILD_AUTOCRYPT_TRUE SENDMAIL DEBUGGER SDB GDB DBX GNU_MAKE_FALSE GNU_MAKE_TRUE AR RANLIB CPP host_os host_vendor host_cpu host build_os build_vendor build_cpu build am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC CONFIG_STATUS_DEPENDENCIES am__xargs_n am__rm_f_notfound AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM ECHO_T ECHO_N ECHO_C target_alias host_alias build_alias LIBS DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_largefile with_sqlite3 enable_autocrypt enable_gpgme with_libgpg_error_prefix with_gpg_error_prefix with_gpgme_prefix enable_pgp enable_smime enable_sidebar enable_compressed with_mixmaster with_slang with_curses with_bundled_regex with_homespool with_mailpath enable_external_dotlock with_docdir with_domain enable_pop enable_imap enable_smtp with_gss with_zlib with_ssl with_gnutls with_sasl with_gsasl enable_debug enable_flock enable_fcntl enable_filemonitor enable_warnings enable_nfs_fix enable_mailtool enable_locales_fix with_exec_shell enable_exact_address enable_hcache with_kyotocabinet with_tokyocabinet with_lmdb with_qdbm with_gdbm with_bdb enable_iconv enable_nls with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix with_idn with_idn2 with_wc_funcs enable_doc enable_full_doc enable_year2038 ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf '%s\n' "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf '%s\n' "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf '%s\n' "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf '%s\n' "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: '$ac_option' Try '$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf '%s\n' "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf '%s\n' "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`printf '%s\n' $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf '%s\n' "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf '%s\n' X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF 'configure' configures mutt 2.3.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, 'make install' will install all the files in '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify an installation prefix other than '$ac_default_prefix' using '--prefix', for instance '--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/mutt] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of mutt 2.3.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-largefile omit support for large files --enable-autocrypt Enable autocrypt support --enable-gpgme Enable GPGME support --disable-pgp Disable PGP support --disable-smime Disable SMIME support --enable-sidebar Enable Sidebar support --enable-compressed Enable compressed folders support --enable-external-dotlock Force use of an external dotlock program --enable-pop Enable POP3 support --enable-imap Enable IMAP support --enable-smtp include internal SMTP relay support --enable-debug Enable debugging support --enable-flock Use flock() to lock files --disable-fcntl Do NOT use fcntl() to lock files --disable-filemonitor Disable file monitoring support (Linux only) --disable-warnings Turn off compiler warnings (not recommended) --enable-nfs-fix Work around an NFS with broken attributes caching --enable-mailtool Enable Sun mailtool attachments support --enable-locales-fix The result of isprint() is unreliable --enable-exact-address Enable regeneration of email addresses --enable-hcache Enable header caching --disable-iconv Disable iconv support --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths --disable-doc Do not build the documentation --disable-full-doc Omit disabled variables --enable-year2038 support timestamps after 2038 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-sqlite3[=PFX] Enable sqlite3 support. Required by autocrypt. --with-libgpg-error-prefix=PFX prefix where GPG Error is installed (optional) --with-gpgme-prefix=PFX prefix where GPGME is installed (optional) --with-mixmaster[=PATH] Include Mixmaster support --with-slang[=DIR] Use S-Lang instead of ncurses --with-curses=DIR Where ncurses is installed --with-bundled-regex Use the bundled GNU regex library --with-homespool[=FILE] File in user's directory where new mail is spooled --with-mailpath=DIR Directory where spool mailboxes are located --with-docdir=PATH Specify where to put the documentation --with-domain=DOMAIN Specify your DNS domain name --with-gss[=PFX] Compile in GSSAPI authentication for IMAP --with-zlib[=PFX] Enable DEFLATE support for IMAP using libz --with-ssl[=PFX] Enable TLS support using OpenSSL --with-gnutls[=PFX] enable TLS support using gnutls --with-sasl[=PFX] Use SASL network security library --with-gsasl[=PFX] Use GNU SASL network security library --with-exec-shell=SHELL Specify alternate shell (ONLY if /bin/sh is broken) --with-kyotocabinet[=DIR] Use kyotocabinet hcache backend --with-tokyocabinet[=DIR] Use tokyocabinet hcache backend --with-lmdb[=DIR] Use lmdb hcache backend --with-qdbm[=DIR] Use qdbm hcache backend --with-gdbm[=DIR] Use gdbm hcache backend --with-bdb[=DIR] Use bdb hcache backend --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --with-idn=[PFX] Use GNU libidn for internationalized domain names --with-idn2=[PFX] Use GNU libidn2 for internationalized domain names --without-wc-funcs Do not use the system's wchar_t functions Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf '%s\n' "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf '%s\n' "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf '%s\n' "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF mutt configure 2.3.2 generated by GNU Autoconf 2.73 Copyright (C) 2026 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else case e in #( e) printf '%s\n' "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else case e in #( e) printf '%s\n' "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err } then : ac_retval=0 else case e in #( e) printf '%s\n' "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else case e in #( e) printf '%s\n' "$as_me: program exited with status $ac_status" >&5 printf '%s\n' "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status ;; esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break else case e in #( e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break else case e in #( e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else case e in #( e) ac_lo= ac_hi= ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid else case e in #( e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval (void) { return $2; } static unsigned long int ulongval (void) { return $2; } #include #include int main (void) { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) eval "$3=yes" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (void); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. ac_fn_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS ;; esac fi eval ac_res=\$$3 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_check_decl # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 printf %s "checking for $2.$3... " >&6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main (void) { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main (void) { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" else case e in #( e) eval "$4=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$4 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf '%s\n' "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf '%s\n' "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by mutt $as_me 2.3.2, which was generated by GNU Autoconf 2.73. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf '%s\n' "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf '%s\n' "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # Dump the cache to stdout. It can be in a pipe (this is a requirement). ac_cache_dump () { # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf '%s\n' "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) } # Print debugging info to stdout. ac_dump_debugging_info () { echo printf '%s\n' "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo ac_cache_dump echo printf '%s\n' "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'*) ac_val=`printf '%s\n' "$ac_val" | sed "s/'/'\\\\\\\\''/g"`;; esac printf '%s\n' "$ac_var='$ac_val'" done | sort echo if test -n "$ac_subst_files"; then printf '%s\n' "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'*) ac_val=`printf '%s\n' "$ac_val" | sed "s/'/'\\\\\\\\''/g"`;; esac printf '%s\n' "$ac_var='$ac_val'" done | sort echo fi if test -s confdefs.h; then printf '%s\n' "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf '%s\n' "$as_me: caught signal $ac_signal" printf '%s\n' "$as_me: exit $exit_status" } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. ac_exit_trap () { exit_status= # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. ac_dump_debugging_info >&5 eval "rm -f $ac_clean_CONFIG_STATUS core *.core core.conftest.*" && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status } trap 'ac_exit_trap $?' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf '%s\n' "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf '%s\n' "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf '%s\n' "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf '%s\n' "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf '%s\n' "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf '%s\n' "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf '%s\n' "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf '%s\n' "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See 'config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf '%s\n' "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf '%s\n' "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" # Test code for whether the C compiler supports C23 (global declarations) ac_c_conftest_c23_globals=' /* Does the compiler advertise conformance to C17 or earlier? Although GCC 14 does not do that, even with -std=gnu23, it is close enough, and defines __STDC_VERSION == 202000L. */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ <= 201710L # error "Compiler advertises conformance to C17 or earlier" #endif // Check alignas. char alignas (double) c23_aligned_as_double; char alignas (0) c23_no_special_alignment; extern char c23_aligned_as_int; char alignas (0) alignas (int) c23_aligned_as_int; // Check alignof. enum { c23_int_alignment = alignof (int), c23_int_array_alignment = alignof (int[100]), c23_char_alignment = alignof (char) }; static_assert (0 < -alignof (int), "alignof is signed"); int function_with_unnamed_parameter (int) { return 0; } void c23_noreturn (); /* Test parsing of string and char UTF-8 literals (including hex escapes). The parens pacify GCC 15. */ bool use_u8 = (!sizeof u8"\xFF") == (!u8'\''x'\''); bool check_that_bool_works = true | false | !nullptr; #if !true # error "true does not work in #if" #endif #if false #elifdef __STDC_VERSION__ #else # error "#elifdef does not work" #endif #ifndef __has_c_attribute # error "__has_c_attribute not defined" #endif #ifndef __has_include # error "__has_include not defined" #endif #define LPAREN() ( #define FORTY_TWO(x) 42 #define VA_OPT_TEST(r, x, ...) __VA_OPT__ (FORTY_TWO r x)) static_assert (VA_OPT_TEST (LPAREN (), 0, <:-) == 42); static_assert (0b101010 == 42); static_assert (0B101010 == 42); static_assert (0xDEAD'\''BEEF == 3'\''735'\''928'\''559); static_assert (0.500'\''000'\''000 == 0.5); enum unsignedish : unsigned int { uione = 1 }; static_assert (0 < -uione); #include constexpr nullptr_t null_pointer = nullptr; static typeof (1 + 1L) two () { return 2; } static long int three () { return 3; } ' # Test code for whether the C compiler supports C23 (body of main). ac_c_conftest_c23_main=' { label_before_declaration: int arr[10] = {}; if (arr[0]) goto label_before_declaration; if (!arr[0]) goto label_at_end_of_block; label_at_end_of_block: } ok |= !null_pointer; ok |= two != three; ' # Test code for whether the C compiler supports C23 (complete). ac_c_conftest_c23_program="${ac_c_conftest_c23_globals} int main (int, char **) { int ok = 0; ${ac_c_conftest_c23_main} return ok; } " # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Do not test the value of __STDC__, because some compilers define it to 0 or do not define it, while otherwise adequately conforming. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (char **p, int i) { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* C89 style stringification. */ #define noexpand_stringify(a) #a const char *stringified = noexpand_stringify(arbitrary+token=sequence); /* C89 style token pasting. Exercises some of the corner cases that e.g. old MSVC gets wrong, but not very hard. */ #define noexpand_concat(a,b) a##b #define expand_concat(a,b) noexpand_concat(a,b) extern int vA; extern int vbee; #define aye A #define bee B int *pvA = &expand_concat(v,aye); int *pvbee = &noexpand_concat(v,bee); /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' /* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif // See if C++-style comments work. #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr, and "aND" is used instead of "and" to work around // GCC bug 40564 which is irrelevant here. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, aND third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; const char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. static struct incomplete_array *volatile incomplete_array_pointer; struct incomplete_array *ia = incomplete_array_pointer; ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Work around memory leak warnings. free (ia); // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; // Do not test for VLAs, as some otherwise-conforming compilers lack them. // C code should instead use __STDC_NO_VLA__; see Autoconf manual. // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || ni.number != 58); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' /* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" as_fn_append ac_func_c_list " inotify_init1 HAVE_INOTIFY_INIT1" gt_needs="$gt_needs " # Auxiliary files required by this configure script. ac_aux_files="config.rpath config.guess config.sub compile missing install-sh" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf '%s\n' "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf '%s\n' "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf '%s\n' "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf '%s\n' "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf '%s\n' "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf '%s\n' "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; esac fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 printf '%s\n' "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 printf '%s\n' "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w= for ac_val in x $ac_old_val; do ac_old_val_w="$ac_old_val_w $ac_val" done ac_new_val_w= for ac_val in x $ac_new_val; do ac_new_val_w="$ac_new_val_w $ac_val" done if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 printf '%s\n' "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 printf '%s\n' "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 printf '%s\n' "$as_me: former value: '$ac_old_val'" >&2;} { printf '%s\n' "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 printf '%s\n' "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf '%s\n' "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf '%s\n' "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.18' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF/1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF/1 since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir ;; esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf '%s\n' "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5 printf %s "checking whether sleep supports fractional seconds... " >&6; } if test ${am_cv_sleep_fractional_seconds+y} then : printf %s "(cached) " >&6 else case e in #( e) if sleep 0.001 2>/dev/null then : am_cv_sleep_fractional_seconds=yes else case e in #( e) am_cv_sleep_fractional_seconds=no ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5 printf '%s\n' "$am_cv_sleep_fractional_seconds" >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking filesystem timestamp resolution" >&5 printf %s "checking filesystem timestamp resolution... " >&6; } if test ${am_cv_filesystem_timestamp_resolution+y} then : printf %s "(cached) " >&6 else case e in #( e) # Default to the worst case. am_cv_filesystem_timestamp_resolution=2 # Only try to go finer than 1 sec if sleep can do it. # Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, # - 1 sec is not much of a win compared to 2 sec, and # - it takes 2 seconds to perform the test whether 1 sec works. # # Instead, just use the default 2s on platforms that have 1s resolution, # accept the extra 1s delay when using $sleep in the Automake tests, in # exchange for not incurring the 2s delay for running the test for all # packages. # am_try_resolutions= if test "$am_cv_sleep_fractional_seconds" = yes; then # Even a millisecond often causes a bunch of false positives, # so just try a hundredth of a second. The time saved between .001 and # .01 is not terribly consequential. am_try_resolutions="0.01 0.1 $am_try_resolutions" fi # In order to catch current-generation FAT out, we must *modify* files # that already exist; the *creation* timestamp is finer. Use names # that make ls -t sort them differently when they have equal # timestamps than when they have distinct timestamps, keeping # in mind that ls -t prints the *newest* file first. rm -f conftest.ts? : > conftest.ts1 : > conftest.ts2 : > conftest.ts3 # Make sure ls -t actually works. Do 'set' in a subshell so we don't # clobber the current shell's arguments. (Outer-level square brackets # are removed by m4; they're present so that m4 does not expand # ; be careful, easy to get confused.) if ( set X `ls -t conftest.ts[12]` && { test "$*" != "X conftest.ts1 conftest.ts2" || test "$*" != "X conftest.ts2 conftest.ts1"; } ); then :; else # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". printf '%s\n' ""Bad output from ls -t: \"`ls -t conftest.ts[12]`\""" >&5 { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "ls -t produces unexpected output. Make sure there is not a broken ls alias in your environment. See 'config.log' for more details" "$LINENO" 5; } fi for am_try_res in $am_try_resolutions; do # Any one fine-grained sleep might happen to cross the boundary # between two values of a coarser actual resolution, but if we do # two fine-grained sleeps in a row, at least one of them will fall # entirely within a coarse interval. echo alpha > conftest.ts1 sleep $am_try_res echo beta > conftest.ts2 sleep $am_try_res echo gamma > conftest.ts3 # We assume that 'ls -t' will make use of high-resolution # timestamps if the operating system supports them at all. if (set X `ls -t conftest.ts?` && test "$2" = conftest.ts3 && test "$3" = conftest.ts2 && test "$4" = conftest.ts1); then # # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, # because we don't need to test make. make_ok=true if test $am_try_res != 1; then # But if we've succeeded so far with a subsecond resolution, we # have one more thing to check: make. It can happen that # everything else supports the subsecond mtimes, but make doesn't; # notably on macOS, which ships make 3.81 from 2006 (the last one # released under GPLv2). https://bugs.gnu.org/68808 # # We test $MAKE if it is defined in the environment, else "make". # It might get overridden later, but our hope is that in practice # it does not matter: it is the system "make" which is (by far) # the most likely to be broken, whereas if the user overrides it, # probably they did so with a better, or at least not worse, make. # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html # # Create a Makefile (real tab character here): rm -f conftest.mk echo 'conftest.ts1: conftest.ts2' >conftest.mk echo ' touch conftest.ts2' >>conftest.mk # # Now, running # touch conftest.ts1; touch conftest.ts2; make # should touch ts1 because ts2 is newer. This could happen by luck, # but most often, it will fail if make's support is insufficient. So # test for several consecutive successes. # # (We reuse conftest.ts[12] because we still want to modify existing # files, not create new ones, per above.) n=0 make=${MAKE-make} until test $n -eq 3; do echo one > conftest.ts1 sleep $am_try_res echo two > conftest.ts2 # ts2 should now be newer than ts1 if $make -f conftest.mk | grep 'up to date' >/dev/null; then make_ok=false break # out of $n loop fi n=`expr $n + 1` done fi # if $make_ok; then # Everything we know to check worked out, so call this resolution good. am_cv_filesystem_timestamp_resolution=$am_try_res break # out of $am_try_res loop fi # Otherwise, we'll go on to check the next resolution. fi done rm -f conftest.ts? # (end _am_filesystem_timestamp_resolution) ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5 printf '%s\n' "$am_cv_filesystem_timestamp_resolution" >&6; } # This check should not be cached, as it may vary across builds of # different projects. { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). am_build_env_is_sane=no am_has_slept=no rm -f conftest.file for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi test "$2" = conftest.file ); then am_build_env_is_sane=yes break fi # Just in case. sleep "$am_cv_filesystem_timestamp_resolution" am_has_slept=yes done { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_build_env_is_sane" >&5 printf '%s\n' "$am_build_env_is_sane" >&6; } if test "$am_build_env_is_sane" = no; then as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1 then : else case e in #( e) ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! ;; esac fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was 's,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf '%s\n' "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf '%s\n' "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf '%s\n' "$STRIP" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf '%s\n' "$ac_ct_STRIP" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf '%s\n' "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS ;; esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use plain mkdir -p, # in the hope it doesn't have the bugs of ancient mkdir. MKDIR_P='mkdir -p' fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf '%s\n' "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk 'busybox awk' do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf '%s\n' "$AWK" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi test -n "$AWK" && break done { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf '%s\n' "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else case e in #( e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @printf '%s\n' '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make ;; esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } SET_MAKE= else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AM_DEFAULT_VERBOSITY=1 # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi am_make=${MAKE-make} { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf '%s\n' 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf '%s\n' "$am_cv_make_support_nested_variables" >&6; } AM_BACKSLASH='\' am__rm_f_notfound= if (rm -f && rm -fr && rm -rf) 2>/dev/null then : else case e in #( e) am__rm_f_notfound='""' ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5 printf %s "checking xargs -n works... " >&6; } if test ${am_cv_xargs_n_works+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 3" then : am_cv_xargs_n_works=yes else case e in #( e) am_cv_xargs_n_works=no ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5 printf '%s\n' "$am_cv_xargs_n_works" >&6; } if test "$am_cv_xargs_n_works" = yes then : am__xargs_n='xargs -n' else case e in #( e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }' ;; esac fi if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='mutt' VERSION='2.3.2' printf '%s\n' "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf '%s\n' "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' # The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 printf %s "checking whether UID '$am_uid' is supported by ustar format... " >&6; } if test x$am_uid = xunknown; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: ancient id detected; assuming current UID is ok, but dist-ustar might not work" >&5 printf '%s\n' "$as_me: WARNING: ancient id detected; assuming current UID is ok, but dist-ustar might not work" >&2;} elif test $am_uid -le $am_max_uid; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } _am_tools=none fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 printf %s "checking whether GID '$am_gid' is supported by ustar format... " >&6; } if test x$gm_gid = xunknown; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: ancient id detected; assuming current GID is ok, but dist-ustar might not work" >&5 printf '%s\n' "$as_me: WARNING: ancient id detected; assuming current GID is ok, but dist-ustar might not work" >&2;} elif test $am_gid -le $am_max_gid; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } _am_tools=none fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 printf %s "checking how to create a ustar tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_ustar-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' am__tar_='find "$tardir" -print | cpio -o -H ustar -L' am__untar='cpio -i -H ustar -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_ustar}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if test ${am_cv_prog_tar_ustar+y} then : printf %s "(cached) " >&6 else case e in #( e) am_cv_prog_tar_ustar=$_am_tool ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 printf '%s\n' "$am_cv_prog_tar_ustar" >&6; } # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi ac_config_headers="$ac_config_headers config.h" CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/VERSION' DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf '%s\n' "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf '%s\n' "$ac_ct_CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf '%s\n' "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf '%s\n' "$ac_ct_CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf '%s\n' "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf '%s\n' "$ac_ct_CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf '%s\n' "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf '%s\n' "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else case e in #( e) ac_file='' ;; esac fi if test -z "$ac_file" then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } printf '%s\n' "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf '%s\n' "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will # work properly (i.e., refer to 'conftest.exe'), while it won't with # 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else case e in #( e) { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest conftest$ac_cv_exeext { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf '%s\n' "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); if (!f) return 1; return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use '--host'. See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf '%s\n' "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext \ conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else case e in #( e) printf '%s\n' "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf '%s\n' "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf '%s\n' "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else case e in #( e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf '%s\n' "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C23 features" >&5 printf %s "checking for $CC option to enable C23 features... " >&6; } if test ${ac_cv_prog_cc_c23+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c23=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c23_program _ACEOF for ac_arg in '' -std=gnu23 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c23=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c23" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c23" = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf '%s\n' "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c23" = x then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf '%s\n' "none needed" >&6; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c23" >&5 printf '%s\n' "$ac_cv_prog_cc_c23" >&6; } CC="$CC $ac_cv_prog_cc_c23" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c23 ac_prog_cc_stdc=c23 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 -std:c11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf '%s\n' "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf '%s\n' "none needed" >&6; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf '%s\n' "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf '%s\n' "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf '%s\n' "none needed" >&6; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf '%s\n' "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf '%s\n' "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c89" = x then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf '%s\n' "none needed" >&6; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf '%s\n' "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done # aligned with autoconf, so not including core; see bug#72225. rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \ conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \ conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM unset am_i ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf '%s\n' "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf '%s\n' "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf '%s\n' "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf '%s\n' "#define STDC_HEADERS 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test ${ac_cv_safe_to_define___extensions__+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_safe_to_define___extensions__=yes else case e in #( e) ac_cv_safe_to_define___extensions__=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 printf '%s\n' "$ac_cv_safe_to_define___extensions__" >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } if test ${ac_cv_should_define__xopen_source+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_should_define__xopen_source=no if test $ac_cv_header_wchar_h = yes then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include mbstate_t x; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 500 #include mbstate_t x; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_should_define__xopen_source=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 printf '%s\n' "$ac_cv_should_define__xopen_source" >&6; } printf '%s\n' "#define _ALL_SOURCE 1" >>confdefs.h printf '%s\n' "#define _COSMO_SOURCE 1" >>confdefs.h printf '%s\n' "#define _DARWIN_C_SOURCE 1" >>confdefs.h printf '%s\n' "#define _GNU_SOURCE 1" >>confdefs.h printf '%s\n' "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h printf '%s\n' "#define _NETBSD_SOURCE 1" >>confdefs.h printf '%s\n' "#define _OPENBSD_SOURCE 1" >>confdefs.h printf '%s\n' "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h printf '%s\n' "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h printf '%s\n' "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h printf '%s\n' "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h printf '%s\n' "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h printf '%s\n' "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h printf '%s\n' "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h printf '%s\n' "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h printf '%s\n' "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h printf '%s\n' "#define _TANDEM_SOURCE 1" >>confdefs.h if test $ac_cv_header_minix_config_h = yes then : MINIX=yes printf '%s\n' "#define _MINIX 1" >>confdefs.h printf '%s\n' "#define _POSIX_SOURCE 1" >>confdefs.h printf '%s\n' "#define _POSIX_1_SOURCE 2" >>confdefs.h else case e in #( e) MINIX= ;; esac fi if test $ac_cv_safe_to_define___extensions__ = yes then : printf '%s\n' "#define __EXTENSIONS__ 1" >>confdefs.h fi if test $ac_cv_should_define__xopen_source = yes then : printf '%s\n' "#define _XOPEN_SOURCE 500" >>confdefs.h fi # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf '%s\n' "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`printf '%s\n' "$build_os" | sed 's/ /-/g'`;; esac { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf '%s\n' "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`printf '%s\n' "$host_os" | sed 's/ /-/g'`;; esac { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for prefix" >&5 printf %s "checking for prefix... " >&6; } if test x$prefix = xNONE; then mutt_cv_prefix=$ac_default_prefix else mutt_cv_prefix=$prefix fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_prefix" >&5 printf '%s\n' "$mutt_cv_prefix" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf '%s\n' "$ac_ct_CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf '%s\n' "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf '%s\n' "$ac_ct_CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf '%s\n' "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf '%s\n' "$CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf '%s\n' "$ac_ct_CC" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf '%s\n' "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf '%s\n' "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf '%s\n' "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf '%s\n' "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else case e in #( e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf '%s\n' "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C23 features" >&5 printf %s "checking for $CC option to enable C23 features... " >&6; } if test ${ac_cv_prog_cc_c23+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c23=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c23_program _ACEOF for ac_arg in '' -std=gnu23 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c23=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c23" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c23" = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf '%s\n' "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c23" = x then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf '%s\n' "none needed" >&6; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c23" >&5 printf '%s\n' "$ac_cv_prog_cc_c23" >&6; } CC="$CC $ac_cv_prog_cc_c23" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c23 ac_prog_cc_stdc=c23 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 -std:c11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf '%s\n' "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf '%s\n' "none needed" >&6; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf '%s\n' "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf '%s\n' "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf '%s\n' "none needed" >&6; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf '%s\n' "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf '%s\n' "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c89" = x then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf '%s\n' "none needed" >&6; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf '%s\n' "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done # aligned with autoconf, so not including core; see bug#72225. rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \ conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \ conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM unset am_i ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf '%s\n' "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf '%s\n' "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$ac_cv_prog_cc_c99" = "xno"; then as_fn_error $? "A C99 compliant compiler is required" "$LINENO" 5 fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 printf %s "checking for library containing strerror... " >&6; } if test ${ac_cv_search_strerror+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char strerror (void); int main (void) { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_strerror+y} then : break fi done if test ${ac_cv_search_strerror+y} then : else case e in #( e) ac_cv_search_strerror=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 printf '%s\n' "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 else case e in #( e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : break fi done ac_cv_prog_CPP=$CPP ;; esac fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 printf '%s\n' "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : else case e in #( e) { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See 'config.log' for more details" "$LINENO" 5; } ;; esac fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf '%s\n' "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else case e in #( e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @printf '%s\n' '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make ;; esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } SET_MAKE= else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf '%s\n' "$RANLIB" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf '%s\n' "$ac_ct_RANLIB" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf '%s\n' "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AR=$ac_cv_prog_AR if test -n "$AR"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 printf '%s\n' "$AR" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 printf '%s\n' "$ac_ct_AR" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="ar" else case $cross_compiling:$ac_tool_warned in yes:) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf '%s\n' "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 printf %s "checking for GNU make... " >&6; } if test ${mutt_cv_gnu_make_command+y} then : printf %s "(cached) " >&6 else case e in #( e) mutt_cv_gnu_make_command="no" if ${MAKE:-make} --version 2> /dev/null | grep "GNU Make" 2>&1 > /dev/null ; then mutt_cv_gnu_make_command="yes" fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_gnu_make_command" >&5 printf '%s\n' "$mutt_cv_gnu_make_command" >&6; } if test x$mutt_cv_gnu_make_command = xyes; then GNU_MAKE_TRUE= GNU_MAKE_FALSE='#' else GNU_MAKE_TRUE='#' GNU_MAKE_FALSE= fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 printf %s "checking for inline... " >&6; } if test ${ac_cv_c_inline+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo (void) {return 0; } $ac_kw foo_t foo (void) {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 printf '%s\n' "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Derived from code rejected by Sun C 1.0 and similar vintage. */ int x[] = {25, 17}; typedef int const *iptr; iptr foo = &x[0]; ++foo; if (!*foo) return 0; } { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes else case e in #( e) ac_cv_c_const=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf '%s\n' "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then printf '%s\n' "#define const /**/" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO" then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else case e in #( e) ac_cv_c_bigendian=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else case e in #( e) ac_cv_c_bigendian=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; unsigned short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } unsigned short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; unsigned short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } int main (int argc, char **argv) { /* Intimidate the compiler so that it does not optimize the arrays away. */ char *p = argv[0]; ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; return use_ascii (argc) == use_ebcdic (*p); } _ACEOF if ac_fn_c_try_link "$LINENO" then : if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no else case e in #( e) ac_cv_c_bigendian=yes ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf '%s\n' "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) printf '%s\n' "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) printf '%s\n' "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac # Check whether --enable-largefile was given. if test ${enable_largefile+y} then : enableval=$enable_largefile; fi if test "$enable_largefile,$enable_year2038" != no,no then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to support large files" >&5 printf %s "checking for $CC option to support large files... " >&6; } if test ${ac_cv_sys_largefile_opts+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CPPFLAGS=$CPPFLAGS ac_opt_found=no for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1"; do if test x"$ac_opt" != x"none needed" then : CPPFLAGS="$ac_save_CPPFLAGS $ac_opt" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef FTYPE # define FTYPE off_t #endif /* Check that FTYPE can represent 2**63 - 1 correctly. We can't simply define LARGE_FTYPE to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31)) int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721 && LARGE_FTYPE % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_opt" = x"none needed" then : # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t. CPPFLAGS="$CPPFLAGS -DFTYPE=ino_t" if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64" if ac_fn_c_try_compile "$LINENO" then : ac_opt='-D_FILE_OFFSET_BITS=64' fi rm -f core conftest.err conftest.$ac_objext conftest.beam ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam fi ac_cv_sys_largefile_opts=$ac_opt ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test $ac_opt_found = no || break done CPPFLAGS=$ac_save_CPPFLAGS test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5 printf '%s\n' "$ac_cv_sys_largefile_opts" >&6; } ac_have_largefile=yes case $ac_cv_sys_largefile_opts in #( "none needed") : ;; #( "supported through gnulib") : ;; #( "support not detected") : ac_have_largefile=no ;; #( "-D_FILE_OFFSET_BITS=64") : printf '%s\n' "#define _FILE_OFFSET_BITS 64" >>confdefs.h ;; #( "-D_LARGE_FILES=1") : printf '%s\n' "#define _LARGE_FILES 1" >>confdefs.h ;; #( *) : as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;; esac if test "$enable_year2038" != no then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC option to support timestamps after 2038" >&5 printf %s "checking for $CC option to support timestamps after 2038... " >&6; } if test ${ac_cv_sys_year2038_opts+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CPPFLAGS="$CPPFLAGS" ac_opt_found=no for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do if test x"$ac_opt" != x"none needed" then : CPPFLAGS="$ac_save_CPPFLAGS $ac_opt" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that time_t can represent 2**32 - 1 correctly. */ #define LARGE_TIME_T \\ ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))) int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535 && LARGE_TIME_T % 65537 == 0) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_year2038_opts="$ac_opt" ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test $ac_opt_found = no || break done CPPFLAGS="$ac_save_CPPFLAGS" test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5 printf '%s\n' "$ac_cv_sys_year2038_opts" >&6; } ac_have_year2038=yes case $ac_cv_sys_year2038_opts in #( "none needed") : ;; #( "support not detected") : ac_have_year2038=no ;; #( "-D_TIME_BITS=64") : printf '%s\n' "#define _TIME_BITS 64" >>confdefs.h ;; #( "-D__MINGW_USE_VC2005_COMPAT") : printf '%s\n' "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h ;; #( "-U_USE_32_BIT_TIME_T"*) : { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It will stop working after mid-January 2038. Remove _USE_32BIT_TIME_T from the compiler flags. See 'config.log' for more details" "$LINENO" 5; } ;; #( *) : as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;; esac fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for declarations of fseeko and ftello" >&5 printf %s "checking for declarations of fseeko and ftello... " >&6; } if test ${ac_cv_func_fseeko_ftello+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __hpux && !defined _LARGEFILE_SOURCE # include # if LONG_MAX >> 31 == 0 # error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++" # endif #endif #include /* for off_t */ #include int main (void) { int (*fp1) (FILE *, off_t, int) = fseeko; off_t (*fp2) (FILE *) = ftello; return fseeko (stdin, 0, 0) && fp1 (stdin, 0, 0) && ftello (stdin) >= 0 && fp2 (stdin) >= 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_fseeko_ftello=yes else case e in #( e) ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE=1" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __hpux && !defined _LARGEFILE_SOURCE # include # if LONG_MAX >> 31 == 0 # error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++" # endif #endif #include /* for off_t */ #include int main (void) { int (*fp1) (FILE *, off_t, int) = fseeko; off_t (*fp2) (FILE *) = ftello; return fseeko (stdin, 0, 0) && fp1 (stdin, 0, 0) && ftello (stdin) >= 0 && fp2 (stdin) >= 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_fseeko_ftello="need _LARGEFILE_SOURCE" else case e in #( e) ac_cv_func_fseeko_ftello=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fseeko_ftello" >&5 printf '%s\n' "$ac_cv_func_fseeko_ftello" >&6; } if test "$ac_cv_func_fseeko_ftello" != no then : printf '%s\n' "#define HAVE_FSEEKO 1" >>confdefs.h fi if test "$ac_cv_func_fseeko_ftello" = "need _LARGEFILE_SOURCE" then : printf '%s\n' "#define _LARGEFILE_SOURCE 1" >>confdefs.h fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 printf %s "checking size of off_t... " >&6; } if test ${ac_cv_sizeof_off_t+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default" then : else case e in #( e) ac_cv_sizeof_off_t=0 ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 printf '%s\n' "$ac_cv_sizeof_off_t" >&6; } printf '%s\n' "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h # Extract the first word of "dbx", so it can be a program name with args. set dummy dbx; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_DBX+y} then : printf %s "(cached) " >&6 else case e in #( e) case $DBX in [\\/]* | ?:[\\/]*) ac_cv_path_DBX="$DBX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_DBX="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_DBX" && ac_cv_path_DBX="no" ;; esac ;; esac fi DBX=$ac_cv_path_DBX if test -n "$DBX"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $DBX" >&5 printf '%s\n' "$DBX" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi # Extract the first word of "gdb", so it can be a program name with args. set dummy gdb; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GDB+y} then : printf %s "(cached) " >&6 else case e in #( e) case $GDB in [\\/]* | ?:[\\/]*) ac_cv_path_GDB="$GDB" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GDB="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GDB" && ac_cv_path_GDB="no" ;; esac ;; esac fi GDB=$ac_cv_path_GDB if test -n "$GDB"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $GDB" >&5 printf '%s\n' "$GDB" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi # Extract the first word of "sdb", so it can be a program name with args. set dummy sdb; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_SDB+y} then : printf %s "(cached) " >&6 else case e in #( e) case $SDB in [\\/]* | ?:[\\/]*) ac_cv_path_SDB="$SDB" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_SDB="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SDB" && ac_cv_path_SDB="no" ;; esac ;; esac fi SDB=$ac_cv_path_SDB if test -n "$SDB"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $SDB" >&5 printf '%s\n' "$SDB" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test $GDB != no ; then DEBUGGER=$GDB elif test $DBX != no ; then DEBUGGER=$DBX elif test $SDB != no ; then DEBUGGER=$SDB else DEBUGGER=no fi ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = xyes then : printf '%s\n' "#define HAVE_INTTYPES_H 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default" if test "x$ac_cv_type_uint32_t" = xyes then : printf '%s\n' "#define HAVE_C99_INTTYPES 1" >>confdefs.h fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 printf %s "checking size of short... " >&6; } if test ${ac_cv_sizeof_short+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" then : else case e in #( e) ac_cv_sizeof_short=0 ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 printf '%s\n' "$ac_cv_sizeof_short" >&6; } printf '%s\n' "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : else case e in #( e) ac_cv_sizeof_int=0 ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf '%s\n' "$ac_cv_sizeof_int" >&6; } printf '%s\n' "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : else case e in #( e) ac_cv_sizeof_long=0 ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf '%s\n' "$ac_cv_sizeof_long" >&6; } printf '%s\n' "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : else case e in #( e) ac_cv_sizeof_long_long=0 ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf '%s\n' "$ac_cv_sizeof_long_long" >&6; } printf '%s\n' "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 printf %s "checking for unsigned long long int... " >&6; } if test ${ac_cv_type_unsigned_long_long_int+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_type_unsigned_long_long_int=yes case $ac_prog_cc_stdc in no | c89) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main (void) { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : else case e in #( e) ac_cv_type_unsigned_long_long_int=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext;; esac ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 printf '%s\n' "$ac_cv_type_unsigned_long_long_int" >&6; } if test $ac_cv_type_unsigned_long_long_int = yes; then printf '%s\n' "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 printf %s "checking for long long int... " >&6; } if test ${ac_cv_type_long_long_int+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_type_long_long_int=yes case $ac_prog_cc_stdc in no | c89) ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int if test $ac_cv_type_long_long_int = yes; then if test "$cross_compiling" = yes then : : else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef LLONG_MAX # define HALF \\ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) # define LLONG_MAX (HALF - 1 + HALF) #endif int main (void) { long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : else case e in #( e) ac_cv_type_long_long_int=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi fi;; esac ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 printf '%s\n' "$ac_cv_type_long_long_int" >&6; } if test $ac_cv_type_long_long_int = yes; then printf '%s\n' "#define HAVE_LONG_LONG_INT 1" >>confdefs.h fi ac_aux_path_sendmail=/usr/sbin:/usr/lib # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_SENDMAIL+y} then : printf %s "(cached) " >&6 else case e in #( e) case $SENDMAIL in [\\/]* | ?:[\\/]*) ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:$ac_aux_path_sendmail" for as_dir in $as_dummy do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_SENDMAIL="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/sbin/sendmail" ;; esac ;; esac fi SENDMAIL=$ac_cv_path_SENDMAIL if test -n "$SENDMAIL"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $SENDMAIL" >&5 printf '%s\n' "$SENDMAIL" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi printf '%s\n' "#define SENDMAIL \"$ac_cv_path_SENDMAIL\"" >>confdefs.h OPS='$(srcdir)/OPS' # Check whether --with-sqlite3 was given. if test ${with_sqlite3+y} then : withval=$with_sqlite3; else case e in #( e) with_sqlite3=no ;; esac fi if test x$with_sqlite3 != xno; then if test x$with_sqlite3 != xyes; then LDFLAGS="$LDFLAGS -L$with_sqlite3/lib" CPPFLAGS="$CPPFLAGS -I$with_sqlite3/include" fi saved_LIBS="$LIBS" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5 printf %s "checking for sqlite3_open in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_open+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char sqlite3_open (void); int main (void) { return sqlite3_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_open=yes else case e in #( e) ac_cv_lib_sqlite3_sqlite3_open=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5 printf '%s\n' "$ac_cv_lib_sqlite3_sqlite3_open" >&6; } if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes then : printf '%s\n' "#define HAVE_LIBSQLITE3 1" >>confdefs.h LIBS="-lsqlite3 $LIBS" else case e in #( e) as_fn_error $? "Unable to find sqlite3 library" "$LINENO" 5 ;; esac fi ac_fn_c_check_func "$LINENO" "sqlite3_prepare_v3" "ac_cv_func_sqlite3_prepare_v3" if test "x$ac_cv_func_sqlite3_prepare_v3" = xyes then : else case e in #( e) as_fn_error $? "sqlite3 version 3.20 or greater is required" "$LINENO" 5 ;; esac fi LIBS="$saved_LIBS" MUTTLIBS="$MUTTLIBS -lsqlite3" fi # Check whether --enable-autocrypt was given. if test ${enable_autocrypt+y} then : enableval=$enable_autocrypt; else case e in #( e) enable_autocrypt=no ;; esac fi if test x$enable_autocrypt = xyes; then if test x$with_sqlite3 = xno; then as_fn_error $? "autocrypt requires --with-sqlite3" "$LINENO" 5 fi printf '%s\n' "#define USE_AUTOCRYPT 1" >>confdefs.h LIBAUTOCRYPT="-Lautocrypt -lautocrypt" LIBAUTOCRYPTDEPS="\$(top_srcdir)/autocrypt/autocrypt.h autocrypt/libautocrypt.a" mutt_enable_gpgme=yes echo "enabling autocrypt..." mutt_gpgme_version="1.8.0" echo "Note: autocrypt requires GPGME version $mutt_gpgme_version or greater" fi if test x$enable_autocrypt = xyes; then BUILD_AUTOCRYPT_TRUE= BUILD_AUTOCRYPT_FALSE='#' else BUILD_AUTOCRYPT_TRUE='#' BUILD_AUTOCRYPT_FALSE= fi if test x$mutt_enable_gpgme != xyes; then # Check whether --enable-gpgme was given. if test ${enable_gpgme+y} then : enableval=$enable_gpgme; if test x$enableval = xyes; then mutt_enable_gpgme=yes mutt_gpgme_version="1.4.0" fi fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether to build with GPGME support" >&5 printf %s "checking whether to build with GPGME support... " >&6; } if test x"$mutt_enable_gpgme" = xyes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } gpg_error_config_prefix="" # Check whether --with-libgpg-error-prefix was given. if test ${with_libgpg_error_prefix+y} then : withval=$with_libgpg_error_prefix; gpg_error_config_prefix="$withval" fi # Check whether --with-gpg-error-prefix was given. if test ${with_gpg_error_prefix+y} then : withval=$with_gpg_error_prefix; gpg_error_config_prefix="$withval" fi if test x"${GPG_ERROR_CONFIG}" = x ; then if test x"${gpg_error_config_prefix}" != x ; then GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config" else case "${SYSROOT}" in /*) if test -x "${SYSROOT}/bin/gpg-error-config" ; then GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config" fi ;; '') ;; *) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&5 printf '%s\n' "$as_me: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&2;} ;; esac fi fi # Extract the first word of "gpg-error-config", so it can be a program name with args. set dummy gpg-error-config; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GPG_ERROR_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $GPG_ERROR_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GPG_ERROR_CONFIG="$GPG_ERROR_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GPG_ERROR_CONFIG="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GPG_ERROR_CONFIG" && ac_cv_path_GPG_ERROR_CONFIG="no" ;; esac ;; esac fi GPG_ERROR_CONFIG=$ac_cv_path_GPG_ERROR_CONFIG if test -n "$GPG_ERROR_CONFIG"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $GPG_ERROR_CONFIG" >&5 printf '%s\n' "$GPG_ERROR_CONFIG" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi min_gpg_error_version=1.33 ok=no # Extract the first word of "gpgrt-config", so it can be a program name with args. set dummy gpgrt-config; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GPGRT_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $GPGRT_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GPGRT_CONFIG="$GPGRT_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$prefix/bin:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GPGRT_CONFIG="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GPGRT_CONFIG" && ac_cv_path_GPGRT_CONFIG="no" ;; esac ;; esac fi GPGRT_CONFIG=$ac_cv_path_GPGRT_CONFIG if test -n "$GPGRT_CONFIG"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $GPGRT_CONFIG" >&5 printf '%s\n' "$GPGRT_CONFIG" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "$GPGRT_CONFIG" != "no"; then # Determine gpgrt_libdir # # Get the prefix of gpgrt-config assuming it's something like: # /bin/gpgrt-config gpgrt_prefix=${GPGRT_CONFIG%/*/*} possible_libdir1=${gpgrt_prefix}/lib # Determine by using system libdir-format with CC, it's like: # Normal style: /usr/lib # GNU cross style: /usr//lib # Debian style: /usr/lib/ # Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64 # It is assumed that CC is specified to the one of host on cross build. if libdir_candidates=$(${CC:-cc} -print-search-dirs | \ sed -n -e "/^libraries/{s/libraries: =//;s/:/\\ /g;p;}"); then # From the output of -print-search-dirs, select valid pkgconfig dirs. libdir_candidates=$(for dir in $libdir_candidates; do if p=$(cd $dir 2>/dev/null && pwd); then test -d "$p/pkgconfig" && echo $p; fi done) for possible_libdir0 in $libdir_candidates; do # possible_libdir0: # Fallback candidate, the one of system-installed (by $CC) # (/usr//lib, /usr/lib/ or /usr/lib32) # possible_libdir1: # Another candidate, user-locally-installed # (/lib) # possible_libdir2 # Most preferred # (//lib, # /lib/ or /lib32) if test "${possible_libdir0##*/}" = "lib"; then possible_prefix0=${possible_libdir0%/lib} possible_prefix0_triplet=${possible_prefix0##*/} if test -z "$possible_prefix0_triplet"; then continue fi possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib else possible_prefix0=${possible_libdir0%%/lib*} possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0} fi if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then gpgrt_libdir=${possible_libdir2} elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then gpgrt_libdir=${possible_libdir1} elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then gpgrt_libdir=${possible_libdir0} fi if test -n "$gpgrt_libdir"; then break; fi done if test -z "$libdir_candidates"; then # No valid pkgconfig dir in any of the system directories, fallback gpgrt_libdir=${possible_libdir1} fi else # When we cannot determine system libdir-format, use this: gpgrt_libdir=${possible_libdir1} fi else unset GPGRT_CONFIG fi if test -n "$gpgrt_libdir"; then GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&5 printf '%s\n' "$as_me: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&6;} gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` else unset GPGRT_CONFIG fi elif test "$GPG_ERROR_CONFIG" != "no"; then gpg_error_config_version=`$GPG_ERROR_CONFIG --version` unset GPGRT_CONFIG fi if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)/\2/'` major=`echo $gpg_error_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'` if test "$major" -gt "$req_major"; then ok=yes else if test "$major" -eq "$req_major"; then if test "$minor" -ge "$req_minor"; then ok=yes fi fi fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for GPG Error - version >= $min_gpg_error_version" >&5 printf %s "checking for GPG Error - version >= $min_gpg_error_version... " >&6; } if test $ok = yes; then GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` if test -z "$GPGRT_CONFIG"; then GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` else GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes ($gpg_error_config_version)" >&5 printf '%s\n' "yes ($gpg_error_config_version)" >&6; } : if test -z "$GPGRT_CONFIG"; then gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` else gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: *** *** The config script \"$GPG_ERROR_CONFIG\" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgpg-error-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&5 printf '%s\n' "$as_me: WARNING: *** *** The config script \"$GPG_ERROR_CONFIG\" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgpg-error-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&2;} gpg_config_script_warn="$gpg_config_script_warn libgpg-error" fi fi else GPG_ERROR_CFLAGS="" GPG_ERROR_LIBS="" GPG_ERROR_MT_CFLAGS="" GPG_ERROR_MT_LIBS="" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } : fi # Check whether --with-gpgme-prefix was given. if test ${with_gpgme_prefix+y} then : withval=$with_gpgme_prefix; gpgme_config_prefix="$withval" else case e in #( e) gpgme_config_prefix="" ;; esac fi if test x"${GPGME_CONFIG}" = x ; then if test x"${gpgme_config_prefix}" != x ; then GPGME_CONFIG="${gpgme_config_prefix}/bin/gpgme-config" else case "${SYSROOT}" in /*) if test -x "${SYSROOT}/bin/gpgme-config" ; then GPGME_CONFIG="${SYSROOT}/bin/gpgme-config" fi ;; '') ;; *) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&5 printf '%s\n' "$as_me: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&2;} ;; esac fi fi use_gpgrt_config="" if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if $GPGRT_CONFIG gpgme --exists; then GPGME_CONFIG="$GPGRT_CONFIG gpgme" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: Use gpgrt-config as gpgme-config" >&5 printf '%s\n' "$as_me: Use gpgrt-config as gpgme-config" >&6;} use_gpgrt_config=yes fi fi if test -z "$use_gpgrt_config"; then # Extract the first word of "gpgme-config", so it can be a program name with args. set dummy gpgme-config; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GPGME_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $GPGME_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GPGME_CONFIG="$GPGME_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GPGME_CONFIG="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GPGME_CONFIG" && ac_cv_path_GPGME_CONFIG="no" ;; esac ;; esac fi GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG if test -n "$GPGME_CONFIG"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $GPGME_CONFIG" >&5 printf '%s\n' "$GPGME_CONFIG" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi fi if test "$GPGME_CONFIG" != "no" ; then if test -z "$use_gpgrt_config"; then gpgme_version=`$GPGME_CONFIG --version` else gpgme_version=`$GPGME_CONFIG --modversion` fi fi gpgme_version_major=`echo $gpgme_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'` gpgme_version_minor=`echo $gpgme_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'` gpgme_version_micro=`echo $gpgme_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'` tmp=$mutt_gpgme_version if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_gpgme_api=0 min_gpgme_version="$tmp" fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for GPGME - version >= $min_gpgme_version" >&5 printf %s "checking for GPGME - version >= $min_gpgme_version... " >&6; } ok=no if test "$GPGME_CONFIG" != "no" ; then req_major=`echo $min_gpgme_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'` req_minor=`echo $min_gpgme_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'` req_micro=`echo $min_gpgme_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'` if test "$gpgme_version_major" -gt "$req_major"; then ok=yes else if test "$gpgme_version_major" -eq "$req_major"; then if test "$gpgme_version_minor" -gt "$req_minor"; then ok=yes else if test "$gpgme_version_minor" -eq "$req_minor"; then if test "$gpgme_version_micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi if test $ok = yes; then # If we have a recent GPGME, we should also check that the # API is compatible. if test "$req_gpgme_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` else tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then if test "$req_gpgme_api" -ne "$tmp" ; then ok=no fi fi fi fi if test $ok = yes; then GPGME_CFLAGS=`$GPGME_CONFIG --cflags` GPGME_LIBS=`$GPGME_CONFIG --libs` { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } printf '%s\n' "#define CRYPT_BACKEND_GPGME 1" >>confdefs.h if test -z "$use_gpgrt_config"; then gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none` else gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$gpgme_config_host" != xnone ; then if test x"$gpgme_config_host" != x"$host" ; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: *** *** The config script \"$GPGME_CONFIG\" was *** built for $gpgme_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-gpgme-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&5 printf '%s\n' "$as_me: WARNING: *** *** The config script \"$GPGME_CONFIG\" was *** built for $gpgme_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-gpgme-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&2;} gpg_config_script_warn="$gpg_config_script_warn gpgme" fi fi else GPGME_CFLAGS="" GPGME_LIBS="" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } gpgme_found=no fi if test x"$gpgme_found" = xno; then as_fn_error $? "*** GPGME not found or version is older than $mutt_gpgme_version ***" "$LINENO" 5 else MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS crypt-gpgme.o crypt-mod-pgp-gpgme.o crypt-mod-smime-gpgme.o" fi else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi # Check whether --enable-pgp was given. if test ${enable_pgp+y} then : enableval=$enable_pgp; if test x$enableval = xno ; then have_pgp=no fi fi if test x$have_pgp != xno ; then printf '%s\n' "#define CRYPT_BACKEND_CLASSIC_PGP 1" >>confdefs.h PGPAUX_TARGET="mutt_pgpring\$(EXEEXT) pgpewrap\$(EXEEXT)" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o" fi # Check whether --enable-smime was given. if test ${enable_smime+y} then : enableval=$enable_smime; if test x$enableval = xno ; then have_smime=no fi fi if test x$have_smime != xno ; then printf '%s\n' "#define CRYPT_BACKEND_CLASSIC_SMIME 1" >>confdefs.h MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smime.o crypt-mod-smime-classic.o" SMIMEAUX_TARGET="smime_keys" fi # Check whether --enable-sidebar was given. if test ${enable_sidebar+y} then : enableval=$enable_sidebar; if test x$enableval = xyes ; then printf '%s\n' "#define USE_SIDEBAR 1" >>confdefs.h OPS="$OPS \$(srcdir)/OPS.SIDEBAR" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS sidebar.o" fi fi # Check whether --enable-compressed was given. if test ${enable_compressed+y} then : enableval=$enable_compressed; enable_compressed=$enableval else case e in #( e) enable_compressed=no ;; esac fi if test x$enable_compressed = "xyes" then : printf '%s\n' "#define USE_COMPRESSED 1" >>confdefs.h MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS compress.o" fi if test x$enable_compressed = xyes; then BUILD_COMPRESS_TRUE= BUILD_COMPRESS_FALSE='#' else BUILD_COMPRESS_TRUE='#' BUILD_COMPRESS_FALSE= fi # Check whether --with-mixmaster was given. if test ${with_mixmaster+y} then : withval=$with_mixmaster; if test "$withval" != no then if test -x "$withval" then MIXMASTER="$withval" else MIXMASTER="mixmaster" fi OPS="$OPS \$(srcdir)/OPS.MIX" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS remailer.o" printf '%s\n' "#define MIXMASTER \"$MIXMASTER\"" >>confdefs.h fi fi # We now require all OPS OPS="$OPS \$(srcdir)/OPS.PGP \$(srcdir)/OPS.SMIME \$(srcdir)/OPS.CRYPT " # Extract the first word of "ispell", so it can be a program name with args. set dummy ispell; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ISPELL+y} then : printf %s "(cached) " >&6 else case e in #( e) case $ISPELL in [\\/]* | ?:[\\/]*) ac_cv_path_ISPELL="$ISPELL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ISPELL="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ISPELL" && ac_cv_path_ISPELL="no" ;; esac ;; esac fi ISPELL=$ac_cv_path_ISPELL if test -n "$ISPELL"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ISPELL" >&5 printf '%s\n' "$ISPELL" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test $ISPELL != no; then printf '%s\n' "#define ISPELL \"$ISPELL\"" >>confdefs.h fi # Check whether --with-slang was given. if test ${with_slang+y} then : withval=$with_slang; { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking if this is a BSD system" >&5 printf %s "checking if this is a BSD system... " >&6; } if test ${mutt_cv_bsdish+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : mutt_cv_bsdish=no else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include main () { #ifdef BSD exit (0); #else exit (1); #endif } _ACEOF if ac_fn_c_try_run "$LINENO" then : mutt_cv_bsdish=yes else case e in #( e) mutt_cv_bsdish=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_bsdish" >&5 printf '%s\n' "$mutt_cv_bsdish" >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for S-Lang" >&5 printf %s "checking for S-Lang... " >&6; } if test $withval = yes; then if test -d $srcdir/../slang; then mutt_cv_slang=$srcdir/../slang/src CPPFLAGS="$CPPFLAGS -I${mutt_cv_slang}" LDFLAGS="$LDFLAGS -L${mutt_cv_slang}/objs" else if test -d $mutt_cv_prefix/include/slang; then CPPFLAGS="$CPPFLAGS -I$mutt_cv_prefix/include/slang" elif test -d /usr/include/slang; then CPPFLAGS="$CPPFLAGS -I/usr/include/slang" fi mutt_cv_slang=yes fi else if test -f $withval/src/slang.h; then mutt_cv_slang=$withval/src CPPFLAGS="$CPPFLAGS -I${mutt_cv_slang}" LDFLAGS="$LDFLAGS -L${mutt_cv_slang}/objs" else mutt_cv_slang=$withval if test -d $withval/include/slang; then CPPFLAGS="$CPPFLAGS -I${withval}/include/slang" elif test -d $withval/include; then CPPFLAGS="$CPPFLAGS -I${withval}/include" fi LDFLAGS="$LDFLAGS -L${withval}/lib" fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_slang" >&5 printf '%s\n' "$mutt_cv_slang" >&6; } if test $mutt_cv_bsdish = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for main in -ltermlib" >&5 printf %s "checking for main in -ltermlib... " >&6; } if test ${ac_cv_lib_termlib_main+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ltermlib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_termlib_main=yes else case e in #( e) ac_cv_lib_termlib_main=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termlib_main" >&5 printf '%s\n' "$ac_cv_lib_termlib_main" >&6; } if test "x$ac_cv_lib_termlib_main" = xyes then : printf '%s\n' "#define HAVE_LIBTERMLIB 1" >>confdefs.h LIBS="-ltermlib $LIBS" fi fi printf '%s\n' "#define USE_SLANG_CURSES 1" >>confdefs.h printf '%s\n' "#define HAVE_COLOR 1" >>confdefs.h MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for SLtt_get_terminfo in -lslang" >&5 printf %s "checking for SLtt_get_terminfo in -lslang... " >&6; } if test ${ac_cv_lib_slang_SLtt_get_terminfo+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lslang -lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char SLtt_get_terminfo (void); int main (void) { return SLtt_get_terminfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_slang_SLtt_get_terminfo=yes else case e in #( e) ac_cv_lib_slang_SLtt_get_terminfo=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slang_SLtt_get_terminfo" >&5 printf '%s\n' "$ac_cv_lib_slang_SLtt_get_terminfo" >&6; } if test "x$ac_cv_lib_slang_SLtt_get_terminfo" = xyes then : MUTTLIBS="$MUTTLIBS -lslang -lm" else case e in #( e) as_fn_error $? "unable to compile. check config.log" "$LINENO" 5 ;; esac fi else case e in #( e) mutt_cv_curses=/usr # Check whether --with-curses was given. if test ${with_curses+y} then : withval=$with_curses; if test x$withval != xyes; then mutt_cv_curses=$withval fi if test x$mutt_cv_curses != x/usr; then LDFLAGS="$LDFLAGS -L${mutt_cv_curses}/lib" CPPFLAGS="$CPPFLAGS -I${mutt_cv_curses}/include" fi fi ac_fn_c_check_func "$LINENO" "initscr" "ac_cv_func_initscr" if test "x$ac_cv_func_initscr" = xyes then : else case e in #( e) cf_ncurses="ncurses" for lib in ncurses ncursesw do as_ac_Lib=`printf '%s\n' "ac_cv_lib_$lib""_waddnwstr" | sed "$as_sed_sh"` { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for waddnwstr in -l$lib" >&5 printf %s "checking for waddnwstr in -l$lib... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-l$lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char waddnwstr (void); int main (void) { return waddnwstr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$as_ac_Lib=yes" else case e in #( e) eval "$as_ac_Lib=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi eval ac_res=\$$as_ac_Lib { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : cf_ncurses="$lib"; break fi done as_ac_Lib=`printf '%s\n' "ac_cv_lib_$cf_ncurses""_initscr" | sed "$as_sed_sh"` { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for initscr in -l$cf_ncurses" >&5 printf %s "checking for initscr in -l$cf_ncurses... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_ncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char initscr (void); int main (void) { return initscr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$as_ac_Lib=yes" else case e in #( e) eval "$as_ac_Lib=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi eval ac_res=\$$as_ac_Lib { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : MUTTLIBS="$MUTTLIBS -l$cf_ncurses" if test "$cf_ncurses" = ncursesw; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfow" >&5 printf %s "checking for tgetent in -ltinfow... " >&6; } if test ${ac_cv_lib_tinfow_tgetent+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ltinfow $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char tgetent (void); int main (void) { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_tinfow_tgetent=yes else case e in #( e) ac_cv_lib_tinfow_tgetent=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfow_tgetent" >&5 printf '%s\n' "$ac_cv_lib_tinfow_tgetent" >&6; } if test "x$ac_cv_lib_tinfow_tgetent" = xyes then : MUTTLIBS="$MUTTLIBS -ltinfow" else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 printf %s "checking for tgetent in -ltinfo... " >&6; } if test ${ac_cv_lib_tinfo_tgetent+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ltinfo $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char tgetent (void); int main (void) { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_tinfo_tgetent=yes else case e in #( e) ac_cv_lib_tinfo_tgetent=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 printf '%s\n' "$ac_cv_lib_tinfo_tgetent" >&6; } if test "x$ac_cv_lib_tinfo_tgetent" = xyes then : MUTTLIBS="$MUTTLIBS -ltinfo" fi ;; esac fi for ac_header in ncursesw/ncurses.h do : ac_fn_c_check_header_compile "$LINENO" "ncursesw/ncurses.h" "ac_cv_header_ncursesw_ncurses_h" "$ac_includes_default" if test "x$ac_cv_header_ncursesw_ncurses_h" = xyes then : printf '%s\n' "#define HAVE_NCURSESW_NCURSES_H 1" >>confdefs.h cf_cv_ncurses_header="ncursesw/ncurses.h" else case e in #( e) for ac_header in ncurses.h do : ac_fn_c_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" if test "x$ac_cv_header_ncurses_h" = xyes then : printf '%s\n' "#define HAVE_NCURSES_H 1" >>confdefs.h cf_cv_ncurses_header="ncurses.h" fi done ;; esac fi done else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 printf %s "checking for tgetent in -ltinfo... " >&6; } if test ${ac_cv_lib_tinfo_tgetent+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ltinfo $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char tgetent (void); int main (void) { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_tinfo_tgetent=yes else case e in #( e) ac_cv_lib_tinfo_tgetent=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 printf '%s\n' "$ac_cv_lib_tinfo_tgetent" >&6; } if test "x$ac_cv_lib_tinfo_tgetent" = xyes then : MUTTLIBS="$MUTTLIBS -ltinfo" fi for ac_header in ncurses/ncurses.h do : ac_fn_c_check_header_compile "$LINENO" "ncurses/ncurses.h" "ac_cv_header_ncurses_ncurses_h" "$ac_includes_default" if test "x$ac_cv_header_ncurses_ncurses_h" = xyes then : printf '%s\n' "#define HAVE_NCURSES_NCURSES_H 1" >>confdefs.h cf_cv_ncurses_header="ncurses/ncurses.h" else case e in #( e) for ac_header in ncurses.h do : ac_fn_c_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" if test "x$ac_cv_header_ncurses_h" = xyes then : printf '%s\n' "#define HAVE_NCURSES_H 1" >>confdefs.h cf_cv_ncurses_header="ncurses.h" fi done ;; esac fi done fi else case e in #( e) ac_fn_c_check_func "$LINENO" "initscr" "ac_cv_func_initscr" if test "x$ac_cv_func_initscr" = xyes then : else case e in #( e) case $host_os in #(vi freebsd*) #(vi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for tgoto in -lmytinfo" >&5 printf %s "checking for tgoto in -lmytinfo... " >&6; } if test ${ac_cv_lib_mytinfo_tgoto+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char tgoto (void); int main (void) { return tgoto (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_mytinfo_tgoto=yes else case e in #( e) ac_cv_lib_mytinfo_tgoto=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mytinfo_tgoto" >&5 printf '%s\n' "$ac_cv_lib_mytinfo_tgoto" >&6; } if test "x$ac_cv_lib_mytinfo_tgoto" = xyes then : LIBS="-lmytinfo $LIBS" fi ;; hpux10.*|hpux11.*) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcur_colr" >&5 printf %s "checking for initscr in -lcur_colr... " >&6; } if test ${ac_cv_lib_cur_colr_initscr+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcur_colr $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char initscr (void); int main (void) { return initscr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cur_colr_initscr=yes else case e in #( e) ac_cv_lib_cur_colr_initscr=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cur_colr_initscr" >&5 printf '%s\n' "$ac_cv_lib_cur_colr_initscr" >&6; } if test "x$ac_cv_lib_cur_colr_initscr" = xyes then : LIBS="-lcur_colr $LIBS" CFLAGS="-I/usr/include/curses_colr $CFLAGS" ac_cv_func_initscr=yes else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for initscr in -lHcurses" >&5 printf %s "checking for initscr in -lHcurses... " >&6; } if test ${ac_cv_lib_Hcurses_initscr+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lHcurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char initscr (void); int main (void) { return initscr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_Hcurses_initscr=yes else case e in #( e) ac_cv_lib_Hcurses_initscr=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Hcurses_initscr" >&5 printf '%s\n' "$ac_cv_lib_Hcurses_initscr" >&6; } if test "x$ac_cv_lib_Hcurses_initscr" = xyes then : # HP's header uses __HP_CURSES, but user claims _HP_CURSES. LIBS="-lHcurses $LIBS" CFLAGS="-D__HP_CURSES -D_HP_CURSES $CFLAGS" ac_cv_func_initscr=yes fi ;; esac fi ;; linux*) # Suse Linux does not follow /usr/lib convention LIBS="$LIBS -L/lib" ;; esac if test ".$With5lib" != ".no" ; then if test -d /usr/5lib ; then # SunOS 3.x or 4.x CPPFLAGS="$CPPFLAGS -I/usr/5include" LIBS="$LIBS -L/usr/5lib" fi fi if test ".$ac_cv_func_initscr" != .yes ; then cf_save_LIBS="$LIBS" cf_term_lib="" cf_curs_lib="" # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. ac_fn_c_check_func "$LINENO" "tgoto" "ac_cv_func_tgoto" if test "x$ac_cv_func_tgoto" = xyes then : cf_term_lib=predefined else case e in #( e) for cf_term_lib in termcap termlib unknown do as_ac_Lib=`printf '%s\n' "ac_cv_lib_$cf_term_lib""_tgoto" | sed "$as_sed_sh"` { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for tgoto in -l$cf_term_lib" >&5 printf %s "checking for tgoto in -l$cf_term_lib... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_term_lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char tgoto (void); int main (void) { return tgoto (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$as_ac_Lib=yes" else case e in #( e) eval "$as_ac_Lib=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi eval ac_res=\$$as_ac_Lib { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : break fi done ;; esac fi # Check for library containing initscr test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown do as_ac_Lib=`printf '%s\n' "ac_cv_lib_$cf_curs_lib""_initscr" | sed "$as_sed_sh"` { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for initscr in -l$cf_curs_lib" >&5 printf %s "checking for initscr in -l$cf_curs_lib... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_curs_lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char initscr (void); int main (void) { return initscr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$as_ac_Lib=yes" else case e in #( e) eval "$as_ac_Lib=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi eval ac_res=\$$as_ac_Lib { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : break fi done test $cf_curs_lib = unknown && as_fn_error $? "no curses library found" "$LINENO" 5 LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking if we can link with $cf_curs_lib library" >&5 printf %s "checking if we can link with $cf_curs_lib library... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${cf_cv_ncurses_header-curses.h}> int main (void) { initscr() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : cf_result=yes else case e in #( e) cf_result=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $cf_result" >&5 printf '%s\n' "$cf_result" >&6; } test $cf_result = no && as_fn_error $? "cannot link curses library" "$LINENO" 5 elif test "$cf_term_lib" != predefined ; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 printf %s "checking if we need both $cf_curs_lib and $cf_term_lib libraries... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${cf_cv_ncurses_header-curses.h}> int main (void) { initscr(); tgoto((char *)0, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : cf_result=no else case e in #( e) LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${cf_cv_ncurses_header-curses.h}> int main (void) { initscr() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : cf_result=yes else case e in #( e) cf_result=error ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $cf_result" >&5 printf '%s\n' "$cf_result" >&6; } fi fi ;; esac fi ;; esac fi ;; esac fi ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "$ac_includes_default" if test "x$ac_cv_header_term_h" = xyes then : printf '%s\n' "#define HAVE_TERM_H 1" >>confdefs.h fi old_LIBS="$LIBS" LIBS="$LIBS $MUTTLIBS" for ac_func in start_color typeahead bkgdset curs_set meta use_default_colors resizeterm setcchar bkgrndset use_tioctl do { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_func declaration" >&5 printf %s "checking for $ac_func declaration... " >&6; } if eval test \${ac_cv_func_decl_$ac_func+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${cf_cv_ncurses_header-curses.h}> int main (void) { #ifndef ${ac_func} extern int ${ac_func}(); #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${cf_cv_ncurses_header-curses.h}> int main (void) { #ifndef ${ac_func} int (*p)() = ${ac_func}; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "ac_cv_func_decl_$ac_func=yes" else case e in #( e) eval "ac_cv_func_decl_$ac_func=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext else case e in #( e) eval "ac_cv_func_decl_$ac_func=yes" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } ac_tr_func=`echo HAVE_$ac_func | tr '[a-z]' '[A-Z]'` printf '%s\n' "#define $ac_tr_func 1" >>confdefs.h else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi done if test "$ac_cv_func_decl_start_color" = yes; then printf '%s\n' "#define HAVE_COLOR 1" >>confdefs.h fi if test "$ac_cv_func_decl_resizeterm" = yes; then MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o" fi ac_fn_c_check_func "$LINENO" "use_extended_names" "ac_cv_func_use_extended_names" if test "x$ac_cv_func_use_extended_names" = xyes then : printf '%s\n' "#define HAVE_USE_EXTENDED_NAMES 1" >>confdefs.h fi LIBS="$old_LIBS" ;; esac fi ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" if test "x$ac_cv_header_stdarg_h" = xyes then : printf '%s\n' "#define HAVE_STDARG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" if test "x$ac_cv_header_sys_ioctl_h" = xyes then : printf '%s\n' "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "ioctl.h" "ac_cv_header_ioctl_h" "$ac_includes_default" if test "x$ac_cv_header_ioctl_h" = xyes then : printf '%s\n' "#define HAVE_IOCTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default" if test "x$ac_cv_header_sysexits_h" = xyes then : printf '%s\n' "#define HAVE_SYSEXITS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes then : printf '%s\n' "#define HAVE_SYS_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" if test "x$ac_cv_header_sys_resource_h" = xyes then : printf '%s\n' "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unix.h" "ac_cv_header_unix_h" "$ac_includes_default" if test "x$ac_cv_header_unix_h" = xyes then : printf '%s\n' "#define HAVE_UNIX_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit" if test "x$ac_cv_func_setrlimit" = xyes then : printf '%s\n' "#define HAVE_SETRLIMIT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getsid" "ac_cv_func_getsid" if test "x$ac_cv_func_getsid" = xyes then : printf '%s\n' "#define HAVE_GETSID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fgets_unlocked" "ac_cv_func_fgets_unlocked" if test "x$ac_cv_func_fgets_unlocked" = xyes then : printf '%s\n' "#define HAVE_FGETS_UNLOCKED 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fgetc_unlocked" "ac_cv_func_fgetc_unlocked" if test "x$ac_cv_func_fgetc_unlocked" = xyes then : printf '%s\n' "#define HAVE_FGETC_UNLOCKED 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5 printf %s "checking for sig_atomic_t in signal.h... " >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 printf %s "checking for egrep -e... " >&6; } if test ${ac_cv_path_EGREP_TRADITIONAL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf '%s\n' 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then : fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi if test "$ac_cv_path_EGREP_TRADITIONAL" then : ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf '%s\n' 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 printf '%s\n' "$ac_cv_path_EGREP_TRADITIONAL" >&6; } EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "sig_atomic_t" >/dev/null 2>&1 then : ac_cv_type_sig_atomic_t=yes; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "volatile.*sig_atomic_t" >/dev/null 2>&1 then : is_sig_atomic_t_volatile=yes; { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes, volatile" >&5 printf '%s\n' "yes, volatile" >&6; } else case e in #( e) is_sig_atomic_t_volatile=no; { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes, non volatile" >&5 printf '%s\n' "yes, non volatile" >&6; } ;; esac fi rm -rf conftest* else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default" if test "x$ac_cv_type_sig_atomic_t" = xyes then : else case e in #( e) printf '%s\n' "#define sig_atomic_t int" >>confdefs.h ;; esac fi is_sig_atomic_t_volatile=no ;; esac fi rm -rf conftest* if test $is_sig_atomic_t_volatile = 'yes' then printf '%s\n' "#define SIG_ATOMIC_VOLATILE_T sig_atomic_t" >>confdefs.h else printf '%s\n' "#define SIG_ATOMIC_VOLATILE_T volatile sig_atomic_t" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC options to detect undeclared functions" >&5 printf %s "checking for $CC options to detect undeclared functions... " >&6; } if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" # This test program should *not* compile successfully. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { (void) strchr; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the # off chance that they somehow elicit warnings. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include extern void ac_decl (int, char *); int main (void) { (void) ac_decl (0, (char *) 0); (void) ac_decl; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' else case e in #( e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; esac fi break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf '%s\n' "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins See 'config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; esac { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $CC options to ignore future-version functions" >&5 printf %s "checking for $CC options to ignore future-version functions... " >&6; } if test ${ac_cv_c_future_darwin_options+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_compile_saved="$ac_compile" ac_compile="$ac_compile -Werror=unguarded-availability-new" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if ! (defined __APPLE__ && defined __MACH__) #error "-Werror=unguarded-availability-new not needed here" #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_future_darwin_options='-Werror=unguarded-availability-new' else case e in #( e) ac_cv_c_future_darwin_options='none needed' ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_compile="$ac_compile_saved" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_future_darwin_options" >&5 printf '%s\n' "$ac_cv_c_future_darwin_options" >&6; } case $ac_cv_c_future_darwin_options in #( 'none needed') : ac_c_future_darwin_options='' ;; #( *) : ac_c_future_darwin_options=$ac_cv_c_future_darwin_options ;; esac ac_fn_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include /* NetBSD declares sys_siglist in unistd.h. */ #ifdef HAVE_UNISTD_H # include #endif " "$ac_c_undeclared_builtin_options$ac_c_future_darwin_options" "CFLAGS" if test "x$ac_cv_have_decl_sys_siglist" = xyes then : ac_have_decl=1 else case e in #( e) ac_have_decl=0 ;; esac fi printf '%s\n' "#define HAVE_DECL_SYS_SIGLIST $ac_have_decl" >>confdefs.h ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default " if test "x$ac_cv_type_pid_t" = xyes then : else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _WIN64 && !defined __CYGWIN__ LLP64 #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_pid_type='int' else case e in #( e) ac_pid_type='__int64' ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf '%s\n' "#define pid_t $ac_pid_type" >>confdefs.h ;; esac fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes then : else case e in #( e) printf '%s\n' "#define ssize_t int" >>confdefs.h ;; esac fi ac_fn_c_check_func "$LINENO" "fgetpos" "ac_cv_func_fgetpos" if test "x$ac_cv_func_fgetpos" = xyes then : printf '%s\n' "#define HAVE_FGETPOS 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" if test "x$ac_cv_func_memmove" = xyes then : printf '%s\n' "#define HAVE_MEMMOVE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memccpy" "ac_cv_func_memccpy" if test "x$ac_cv_func_memccpy" = xyes then : printf '%s\n' "#define HAVE_MEMCCPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid" if test "x$ac_cv_func_setegid" = xyes then : printf '%s\n' "#define HAVE_SETEGID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "srand48" "ac_cv_func_srand48" if test "x$ac_cv_func_srand48" = xyes then : printf '%s\n' "#define HAVE_SRAND48 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes then : printf '%s\n' "#define HAVE_STRERROR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" if test "x$ac_cv_func_setenv" = xyes then : printf '%s\n' "#define HAVE_SETENV 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" setenv.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS setenv.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes then : printf '%s\n' "#define HAVE_STRCASECMP 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strcasecmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" if test "x$ac_cv_func_strdup" = xyes then : printf '%s\n' "#define HAVE_STRDUP 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strdup.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep" if test "x$ac_cv_func_strsep" = xyes then : printf '%s\n' "#define HAVE_STRSEP 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strsep.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strsep.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" if test "x$ac_cv_func_strtok_r" = xyes then : printf '%s\n' "#define HAVE_STRTOK_R 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strtok_r.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "wcscasecmp" "ac_cv_func_wcscasecmp" if test "x$ac_cv_func_wcscasecmp" = xyes then : printf '%s\n' "#define HAVE_WCSCASECMP 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" wcscasecmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS wcscasecmp.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" if test "x$ac_cv_func_strcasestr" = xyes then : printf '%s\n' "#define HAVE_STRCASESTR 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strcasestr.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" if test "x$ac_cv_func_mkdtemp" = xyes then : printf '%s\n' "#define HAVE_MKDTEMP 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" mkdtemp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" if test "x$ac_cv_func_getopt" = xyes then : fi if test $ac_cv_func_getopt = yes; then ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = xyes then : printf '%s\n' "#define HAVE_GETOPT_H 1" >>confdefs.h fi fi for ac_func in ftruncate do : ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" if test "x$ac_cv_func_ftruncate" = xyes then : printf '%s\n' "#define HAVE_FTRUNCATE 1" >>confdefs.h else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for chsize in -lx" >&5 printf %s "checking for chsize in -lx... " >&6; } if test ${ac_cv_lib_x_chsize+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lx $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char chsize (void); int main (void) { return chsize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_x_chsize=yes else case e in #( e) ac_cv_lib_x_chsize=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_x_chsize" >&5 printf '%s\n' "$ac_cv_lib_x_chsize" >&6; } if test "x$ac_cv_lib_x_chsize" = xyes then : printf '%s\n' "#define HAVE_LIBX 1" >>confdefs.h LIBS="-lx $LIBS" fi ;; esac fi done for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes then : printf '%s\n' "#define HAVE_STRFTIME 1" >>confdefs.h else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 printf %s "checking for strftime in -lintl... " >&6; } if test ${ac_cv_lib_intl_strftime+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char strftime (void); int main (void) { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_intl_strftime=yes else case e in #( e) ac_cv_lib_intl_strftime=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 printf '%s\n' "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes then : printf '%s\n' "#define HAVE_LIBINTL 1" >>confdefs.h LIBS="-lintl $LIBS" fi ;; esac fi done ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens" if test "x$ac_cv_func_futimens" = xyes then : printf '%s\n' "#define HAVE_FUTIMENS 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "#include " if test "x$ac_cv_type_struct_timespec" = xyes then : printf '%s\n' "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include " if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes then : printf '%s\n' "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim.tv_nsec" "ac_cv_member_struct_stat_st_mtim_tv_nsec" "#include " if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = xyes then : printf '%s\n' "#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct stat" "st_ctim.tv_nsec" "ac_cv_member_struct_stat_st_ctim_tv_nsec" "#include " if test "x$ac_cv_member_struct_stat_st_ctim_tv_nsec" = xyes then : printf '%s\n' "#define HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat" if test "x$ac_cv_func_utimensat" = xyes then : printf '%s\n' "#define HAVE_UTIMENSAT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" if test "x$ac_cv_func_clock_gettime" = xyes then : printf '%s\n' "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h fi for ac_func in fchdir do : ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir" if test "x$ac_cv_func_fchdir" = xyes then : printf '%s\n' "#define HAVE_FCHDIR 1" >>confdefs.h else case e in #( e) mutt_cv_fchdir=no ;; esac fi done # Check whether --with-bundled-regex was given. if test ${with_bundled_regex+y} then : withval=$with_bundled_regex; mutt_cv_regex=yes else case e in #( e) for ac_func in regcomp do : ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp" if test "x$ac_cv_func_regcomp" = xyes then : printf '%s\n' "#define HAVE_REGCOMP 1" >>confdefs.h mutt_cv_regex=no else case e in #( e) mutt_cv_regex=yes ;; esac fi done ;; esac fi if test $mutt_cv_regex = no ; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether your system's regexp library is completely broken" >&5 printf %s "checking whether your system's regexp library is completely broken... " >&6; } if test ${mutt_cv_regex_broken+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : mutt_cv_regex_broken=yes else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main() { regex_t blah; regmatch_t p; p.rm_eo = p.rm_eo; if (regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec(&blah, "foobar", 0, NULL, 0)) return(1); regfree(&blah); return(0); } _ACEOF if ac_fn_c_try_run "$LINENO" then : mutt_cv_regex_broken=no else case e in #( e) mutt_cv_regex_broken=yes ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_regex_broken" >&5 printf '%s\n' "$mutt_cv_regex_broken" >&6; } if test $mutt_cv_regex_broken = yes ; then echo "Using the included GNU regex instead." >&6 mutt_cv_regex=yes fi fi if test $mutt_cv_regex = yes; then printf '%s\n' "#define USE_GNU_REGEX 1" >>confdefs.h case " $LIBOBJS " in *" regex.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS regex.$ac_objext" ;; esac fi # Check whether --with-homespool was given. if test ${with_homespool+y} then : withval=$with_homespool; with_homespool=${withval} fi if test x$with_homespool != x; then if test $with_homespool = yes; then with_homespool=mailbox fi printf '%s\n' "#define MAILPATH \"$with_homespool\"" >>confdefs.h printf '%s\n' "#define HOMESPOOL 1" >>confdefs.h printf '%s\n' "#define USE_DOTLOCK 1" >>confdefs.h mutt_cv_setgid=no else # Check whether --with-mailpath was given. if test ${with_mailpath+y} then : withval=$with_mailpath; mutt_cv_mailpath=$withval else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking where new mail is stored" >&5 printf %s "checking where new mail is stored... " >&6; } if test ${mutt_cv_mailpath+y} then : printf %s "(cached) " >&6 else case e in #( e) mutt_cv_mailpath=no if test -d /var/mail; then mutt_cv_mailpath=/var/mail elif test -d /var/spool/mail; then mutt_cv_mailpath=/var/spool/mail elif test -d /usr/spool/mail; then mutt_cv_mailpath=/usr/spool/mail elif test -d /usr/mail; then mutt_cv_mailpath=/usr/mail fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_mailpath" >&5 printf '%s\n' "$mutt_cv_mailpath" >&6; } ;; esac fi if test "$mutt_cv_mailpath" = no; then as_fn_error $? "\"Could not determine where new mail is stored.\"" "$LINENO" 5 fi printf '%s\n' "#define MAILPATH \"$mutt_cv_mailpath\"" >>confdefs.h { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking if $mutt_cv_mailpath is world writable" >&5 printf %s "checking if $mutt_cv_mailpath is world writable... " >&6; } if test ${mutt_cv_worldwrite+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : mutt_cv_worldwrite=no else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main (int argc, char **argv) { struct stat s; if (stat ("$mutt_cv_mailpath", &s)) exit (1); if (s.st_mode & S_IWOTH) exit (0); exit (1); } _ACEOF if ac_fn_c_try_run "$LINENO" then : mutt_cv_worldwrite=yes else case e in #( e) mutt_cv_worldwrite=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_worldwrite" >&5 printf '%s\n' "$mutt_cv_worldwrite" >&6; } mutt_cv_setgid=no if test $mutt_cv_worldwrite = yes; then printf '%s\n' "#define USE_DOTLOCK 1" >>confdefs.h else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking if $mutt_cv_mailpath is group writable" >&5 printf %s "checking if $mutt_cv_mailpath is group writable... " >&6; } if test ${mutt_cv_groupwrite+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : mutt_cv_groupwrite=no else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main (int argc, char **argv) { struct stat s; if (stat ("$mutt_cv_mailpath", &s)) exit (1); if (s.st_mode & S_IWGRP) exit (0); exit (1); } _ACEOF if ac_fn_c_try_run "$LINENO" then : mutt_cv_groupwrite=yes else case e in #( e) mutt_cv_groupwrite=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_groupwrite" >&5 printf '%s\n' "$mutt_cv_groupwrite" >&6; } if test $mutt_cv_groupwrite = yes; then printf '%s\n' "#define USE_DOTLOCK 1" >>confdefs.h printf '%s\n' "#define USE_SETGID 1" >>confdefs.h mutt_cv_setgid=yes fi fi fi # Check whether --enable-external_dotlock was given. if test ${enable_external_dotlock+y} then : enableval=$enable_external_dotlock; mutt_cv_external_dotlock="$enableval" fi if test "x$mutt_cv_setgid" = "xyes" || test "x$mutt_cv_fchdir" = "xno" \ || test "x$mutt_cv_external_dotlock" = "xyes" then printf '%s\n' "#define DL_STANDALONE 1" >>confdefs.h DOTLOCK_TARGET="mutt_dotlock\$(EXEEXT)" else MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS dotlock.o" fi if test -z "$datarootdir"; then datarootdir='${prefix}/share' fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking where to put the documentation" >&5 printf %s "checking where to put the documentation... " >&6; } # Check whether --with-docdir was given. if test ${with_docdir+y} then : withval=$with_docdir; mutt_cv_docdir=$withval else case e in #( e) mutt_cv_docdir='${datarootdir}/doc/mutt' ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_docdir" >&5 printf '%s\n' "$mutt_cv_docdir" >&6; } if test -z "$docdir" -o -n "$with_docdir" then docdir=$mutt_cv_docdir fi if test x$mutt_cv_setgid = xyes; then DOTLOCK_GROUP='mail' DOTLOCK_PERMISSION=2755 else DOTLOCK_GROUP='' DOTLOCK_PERMISSION=755 fi # Check whether --with-domain was given. if test ${with_domain+y} then : withval=$with_domain; if test $withval != yes; then if test $withval != no; then printf '%s\n' "#define DOMAIN \"$withval\"" >>confdefs.h fi fi fi need_socket="no" ac_fn_c_check_func "$LINENO" "gethostent" "ac_cv_func_gethostent" if test "x$ac_cv_func_gethostent" = xyes then : else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for gethostent in -lnsl" >&5 printf %s "checking for gethostent in -lnsl... " >&6; } if test ${ac_cv_lib_nsl_gethostent+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char gethostent (void); int main (void) { return gethostent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_nsl_gethostent=yes else case e in #( e) ac_cv_lib_nsl_gethostent=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostent" >&5 printf '%s\n' "$ac_cv_lib_nsl_gethostent" >&6; } if test "x$ac_cv_lib_nsl_gethostent" = xyes then : printf '%s\n' "#define HAVE_LIBNSL 1" >>confdefs.h LIBS="-lnsl $LIBS" fi ;; esac fi ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt" if test "x$ac_cv_func_setsockopt" = xyes then : else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5 printf %s "checking for setsockopt in -lsocket... " >&6; } if test ${ac_cv_lib_socket_setsockopt+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char setsockopt (void); int main (void) { return setsockopt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_socket_setsockopt=yes else case e in #( e) ac_cv_lib_socket_setsockopt=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5 printf '%s\n' "$ac_cv_lib_socket_setsockopt" >&6; } if test "x$ac_cv_lib_socket_setsockopt" = xyes then : printf '%s\n' "#define HAVE_LIBSOCKET 1" >>confdefs.h LIBS="-lsocket $LIBS" fi ;; esac fi ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" if test "x$ac_cv_func_getaddrinfo" = xyes then : printf '%s\n' "#define HAVE_GETADDRINFO 1" >>confdefs.h fi # Check whether --enable-pop was given. if test ${enable_pop+y} then : enableval=$enable_pop; if test x$enableval = xyes ; then printf '%s\n' "#define USE_POP 1" >>confdefs.h MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o pop_lib.o pop_auth.o" need_pop="yes" need_socket="yes" need_md5="yes" fi fi # Check whether --enable-imap was given. if test ${enable_imap+y} then : enableval=$enable_imap; if test x$enableval = xyes ; then printf '%s\n' "#define USE_IMAP 1" >>confdefs.h LIBIMAP="-Limap -limap" LIBIMAPDEPS="\$(top_srcdir)/imap/imap.h imap/libimap.a" need_imap="yes" need_socket="yes" need_md5="yes" fi fi if test x$need_imap = xyes; then BUILD_IMAP_TRUE= BUILD_IMAP_FALSE='#' else BUILD_IMAP_TRUE='#' BUILD_IMAP_FALSE= fi # Check whether --enable-smtp was given. if test ${enable_smtp+y} then : enableval=$enable_smtp; if test $enableval = yes; then printf '%s\n' "#define USE_SMTP 1" >>confdefs.h MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smtp.o" need_socket="yes" fi fi if test x"$need_imap" = xyes -o x"$need_pop" = xyes ; then MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS bcache.o" fi if test "$need_socket" = "yes" then ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" if test "x$ac_cv_header_sys_select_h" = xyes then : printf '%s\n' "#define HAVE_SYS_SELECT_H 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 printf %s "checking for socklen_t... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "socklen_t" >/dev/null 2>&1 then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } printf '%s\n' "#define socklen_t int" >>confdefs.h ;; esac fi rm -rf conftest* printf '%s\n' "#define USE_SOCKET 1" >>confdefs.h MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS account.o mutt_socket.o mutt_tunnel.o" fi # Check whether --with-gss was given. if test ${with_gss+y} then : withval=$with_gss; gss_prefix="$withval" else case e in #( e) gss_prefix="no" ;; esac fi if test "$gss_prefix" != "no" then if test "$need_imap" = "yes" then GSSAPI_PREFIX=$gss_prefix GSSAPI_IMPL="none" saved_CPPFLAGS="$CPPFLAGS" saved_LDFLAGS="$LDFLAGS" saved_LIBS="$LIBS" if test "$GSSAPI_PREFIX" != "yes" then krb5_path="$GSSAPI_PREFIX/bin" else krb5_path="$PATH" fi # Extract the first word of "krb5-config", so it can be a program name with args. set dummy krb5-config; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_KRB5CFGPATH+y} then : printf %s "(cached) " >&6 else case e in #( e) case $KRB5CFGPATH in [\\/]* | ?:[\\/]*) ac_cv_path_KRB5CFGPATH="$KRB5CFGPATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $krb5_path do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_KRB5CFGPATH="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_KRB5CFGPATH" && ac_cv_path_KRB5CFGPATH="none" ;; esac ;; esac fi KRB5CFGPATH=$ac_cv_path_KRB5CFGPATH if test -n "$KRB5CFGPATH"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $KRB5CFGPATH" >&5 printf '%s\n' "$KRB5CFGPATH" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "$KRB5CFGPATH" != "none" then GSSAPI_CFLAGS="`$KRB5CFGPATH --cflags gssapi`" GSSAPI_LIBS="`$KRB5CFGPATH --libs gssapi`" case "`$KRB5CFGPATH --version`" in "Kerberos 5 "*) GSSAPI_IMPL="MIT";; ?eimdal*) GSSAPI_IMPL="Heimdal";; *) GSSAPI_IMPL="Unknown";; esac LIBS="$saved_LIBS $GSSAPI_LIBS" ac_fn_c_check_func "$LINENO" "gss_init_sec_context" "ac_cv_func_gss_init_sec_context" if test "x$ac_cv_func_gss_init_sec_context" = xyes then : else case e in #( e) GSSAPI_IMPL="none" ;; esac fi else if test "$GSSAPI_PREFIX" != "yes" then GSSAPI_CFLAGS="-I$GSSAPI_PREFIX/include" GSSAPI_LDFLAGS="-L$GSSAPI_PREFIX/lib" CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS" LDFLAGS="$LDFLAGS $GSSAPI_LDFLAGS" fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5 printf %s "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; } if test ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char gss_init_sec_context (void); int main (void) { return gss_init_sec_context (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes else case e in #( e) ac_cv_lib_gssapi_krb5_gss_init_sec_context=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5 printf '%s\n' "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; } if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes then : GSSAPI_IMPL="MIT", GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" fi if test "$GSSAPI_IMPL" = "none" then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5 printf %s "checking for gss_init_sec_context in -lgssapi... " >&6; } if test ${ac_cv_lib_gssapi_gss_init_sec_context+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgssapi -lkrb5 -ldes -lasn1 -lroken -lcrypt -lcom_err $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char gss_init_sec_context (void); int main (void) { return gss_init_sec_context (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gssapi_gss_init_sec_context=yes else case e in #( e) ac_cv_lib_gssapi_gss_init_sec_context=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5 printf '%s\n' "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; } if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes then : GSSAPI_IMPL="Heimdal" GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi -lkrb5 -ldes -lasn1 -lroken" GSSAPI_LIBS="$GSSAPI_LIBS -lcrypt -lcom_err" fi fi if test "$GSSAPI_IMPL" = "none" then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for g_order_init in -lgssapi_krb5" >&5 printf %s "checking for g_order_init in -lgssapi_krb5... " >&6; } if test ${ac_cv_lib_gssapi_krb5_g_order_init+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgssapi_krb5 -lkrb5 -lcrypto -lcom_err $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char g_order_init (void); int main (void) { return g_order_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gssapi_krb5_g_order_init=yes else case e in #( e) ac_cv_lib_gssapi_krb5_g_order_init=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_g_order_init" >&5 printf '%s\n' "$ac_cv_lib_gssapi_krb5_g_order_init" >&6; } if test "x$ac_cv_lib_gssapi_krb5_g_order_init" = xyes then : GSSAPI_IMPL="OldMIT", GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err" fi fi fi if test "$GSSAPI_IMPL" != "none" then CPPFLAGS="$saved_CPPFLAGS $GSSAPI_CFLAGS" if test "$GSSAPI_IMPL" != "Heimdal" then ac_fn_c_check_header_compile "$LINENO" "gssapi/gssapi_generic.h" "ac_cv_header_gssapi_gssapi_generic_h" "$ac_includes_default" if test "x$ac_cv_header_gssapi_gssapi_generic_h" = xyes then : else case e in #( e) GSSAPI_IMPL="none" ;; esac fi fi ac_fn_c_check_header_compile "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default" if test "x$ac_cv_header_gssapi_gssapi_h" = xyes then : else case e in #( e) GSSAPI_IMPL="none" ;; esac fi fi CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" LIBS="$saved_LIBS" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking GSSAPI implementation" >&5 printf %s "checking GSSAPI implementation... " >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $GSSAPI_IMPL" >&5 printf '%s\n' "$GSSAPI_IMPL" >&6; } if test "$GSSAPI_IMPL" = "none" then cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # 'ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF ac_cache_dump | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf '%s\n' "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf '%s\n' "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache as_fn_error $? "GSSAPI libraries not found" "$LINENO" 5 fi if test "$GSSAPI_IMPL" = "Heimdal" then printf '%s\n' "#define HAVE_HEIMDAL 1" >>confdefs.h fi CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS" MUTTLIBS="$MUTTLIBS $GSSAPI_LIBS" printf '%s\n' "#define USE_GSS 1" >>confdefs.h need_gss="yes" else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: GSS was requested but IMAP is not enabled" >&5 printf '%s\n' "$as_me: WARNING: GSS was requested but IMAP is not enabled" >&2;} fi fi if test x$need_gss = xyes; then USE_GSS_TRUE= USE_GSS_FALSE='#' else USE_GSS_TRUE='#' USE_GSS_FALSE= fi # if zlib # Check whether --with-zlib was given. if test ${with_zlib+y} then : withval=$with_zlib; zlib_prefix="$withval" else case e in #( e) zlib_prefix="auto" ;; esac fi if test "$zlib_prefix" != "no" then if test "$need_imap" = "yes" then have_zlib= if test "$zlib_prefix" != "yes" -a "$zlib_prefix" != "auto" then LDFLAGS="$LDFLAGS -L$zlib_prefix/lib" CPPFLAGS="$CPPFLAGS -I$zlib_prefix/include" fi saved_LIBS="$LIBS" for ac_header in zlib.h do : ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes then : printf '%s\n' "#define HAVE_ZLIB_H 1" >>confdefs.h { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 printf %s "checking for deflate in -lz... " >&6; } if test ${ac_cv_lib_z_deflate+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char deflate (void); int main (void) { return deflate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_z_deflate=yes else case e in #( e) ac_cv_lib_z_deflate=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5 printf '%s\n' "$ac_cv_lib_z_deflate" >&6; } if test "x$ac_cv_lib_z_deflate" = xyes then : have_zlib=yes fi fi done if test "x$have_zlib" = "x" then if test "x$zlib_prefix" != "xauto" then as_fn_error $? "ZLIB requested, but library or headers not found" "$LINENO" 5 fi else MUTTLIBS="$MUTTLIBS -lz" printf '%s\n' "#define USE_ZLIB 1" >>confdefs.h MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_zstrm.o" fi LIBS="$saved_LIBS" else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: ZLIB was requested but IMAP is not enabled" >&5 printf '%s\n' "$as_me: WARNING: ZLIB was requested but IMAP is not enabled" >&2;} fi fi # Check whether --with-ssl was given. if test ${with_ssl+y} then : withval=$with_ssl; if test "$with_ssl" != "no" then if test "$need_socket" != "yes"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: SSL support is only useful with POP, IMAP or SMTP support" >&5 printf '%s\n' "$as_me: WARNING: SSL support is only useful with POP, IMAP or SMTP support" >&2;} else if test "$with_ssl" != "yes" then LDFLAGS="$LDFLAGS -L$withval/lib" CPPFLAGS="$CPPFLAGS -I$withval/include" fi saved_LIBS="$LIBS" crypto_libs="" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 printf %s "checking for deflate in -lz... " >&6; } if test ${ac_cv_lib_z_deflate+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char deflate (void); int main (void) { return deflate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_z_deflate=yes else case e in #( e) ac_cv_lib_z_deflate=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5 printf '%s\n' "$ac_cv_lib_z_deflate" >&6; } if test "x$ac_cv_lib_z_deflate" = xyes then : crypto_libs=-lz fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for X509_STORE_CTX_new in -lcrypto" >&5 printf %s "checking for X509_STORE_CTX_new in -lcrypto... " >&6; } if test ${ac_cv_lib_crypto_X509_STORE_CTX_new+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $crypto_libs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char X509_STORE_CTX_new (void); int main (void) { return X509_STORE_CTX_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_crypto_X509_STORE_CTX_new=yes else case e in #( e) ac_cv_lib_crypto_X509_STORE_CTX_new=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_X509_STORE_CTX_new" >&5 printf '%s\n' "$ac_cv_lib_crypto_X509_STORE_CTX_new" >&6; } if test "x$ac_cv_lib_crypto_X509_STORE_CTX_new" = xyes then : crypto_libs="-lcrypto $crypto_libs" else case e in #( e) as_fn_error $? "Unable to find SSL library" "$LINENO" 5 ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 printf %s "checking for SSL_new in -lssl... " >&6; } if test ${ac_cv_lib_ssl_SSL_new+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lssl $crypto_libs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char SSL_new (void); int main (void) { return SSL_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ssl_SSL_new=yes else case e in #( e) ac_cv_lib_ssl_SSL_new=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5 printf '%s\n' "$ac_cv_lib_ssl_SSL_new" >&6; } if test "x$ac_cv_lib_ssl_SSL_new" = xyes then : printf '%s\n' "#define HAVE_LIBSSL 1" >>confdefs.h LIBS="-lssl $LIBS" else case e in #( e) as_fn_error $? "Unable to find SSL library" "$LINENO" 5 ;; esac fi LIBS="$LIBS $crypto_libs" ac_fn_c_check_func "$LINENO" "RAND_egd" "ac_cv_func_RAND_egd" if test "x$ac_cv_func_RAND_egd" = xyes then : printf '%s\n' "#define HAVE_RAND_EGD 1" >>confdefs.h fi ac_fn_check_decl "$LINENO" "SSL_set_mode" "ac_cv_have_decl_SSL_set_mode" "#include " "$ac_c_undeclared_builtin_options$ac_c_future_darwin_options" "CFLAGS" if test "x$ac_cv_have_decl_SSL_set_mode" = xyes then : ac_have_decl=1 else case e in #( e) ac_have_decl=0 ;; esac fi printf '%s\n' "#define HAVE_DECL_SSL_SET_MODE $ac_have_decl" >>confdefs.h if test $ac_have_decl = 1 then : else case e in #( e) as_fn_error $? "Unable to find decent SSL header" "$LINENO" 5 ;; esac fi ac_fn_check_decl "$LINENO" "SSL_MODE_AUTO_RETRY" "ac_cv_have_decl_SSL_MODE_AUTO_RETRY" "#include " "$ac_c_undeclared_builtin_options$ac_c_future_darwin_options" "CFLAGS" if test "x$ac_cv_have_decl_SSL_MODE_AUTO_RETRY" = xyes then : ac_have_decl=1 else case e in #( e) ac_have_decl=0 ;; esac fi printf '%s\n' "#define HAVE_DECL_SSL_MODE_AUTO_RETRY $ac_have_decl" >>confdefs.h if test $ac_have_decl = 1 then : else case e in #( e) as_fn_error $? "Unable to find decent SSL header" "$LINENO" 5 ;; esac fi ac_fn_check_decl "$LINENO" "X509_V_FLAG_PARTIAL_CHAIN" "ac_cv_have_decl_X509_V_FLAG_PARTIAL_CHAIN" "#include " "$ac_c_undeclared_builtin_options$ac_c_future_darwin_options" "CFLAGS" if test "x$ac_cv_have_decl_X509_V_FLAG_PARTIAL_CHAIN" = xyes then : printf '%s\n' "#define HAVE_SSL_PARTIAL_CHAIN 1" >>confdefs.h fi printf '%s\n' "#define USE_SSL 1" >>confdefs.h printf '%s\n' "#define USE_SSL_OPENSSL 1" >>confdefs.h LIBS="$saved_LIBS" MUTTLIBS="$MUTTLIBS -lssl $crypto_libs" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o" need_ssl=yes fi fi fi # Check whether --with-gnutls was given. if test ${with_gnutls+y} then : withval=$with_gnutls; gnutls_prefix="$withval" else case e in #( e) gnutls_prefix="no" ;; esac fi if test "$gnutls_prefix" != "no" && test x"$need_ssl" != xyes then if test "$need_socket" != "yes" then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: SSL support is only useful with POP, IMAP or SMTP support" >&5 printf '%s\n' "$as_me: WARNING: SSL support is only useful with POP, IMAP or SMTP support" >&2;} else if test "$gnutls_prefix" != "yes" then LDFLAGS="$LDFLAGS -L$gnutls_prefix/lib" CPPFLAGS="$CPPFLAGS -I$gnutls_prefix/include" fi saved_LIBS="$LIBS" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for gnutls_check_version in -lgnutls" >&5 printf %s "checking for gnutls_check_version in -lgnutls... " >&6; } if test ${ac_cv_lib_gnutls_gnutls_check_version+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgnutls $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char gnutls_check_version (void); int main (void) { return gnutls_check_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gnutls_gnutls_check_version=yes else case e in #( e) ac_cv_lib_gnutls_gnutls_check_version=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_check_version" >&5 printf '%s\n' "$ac_cv_lib_gnutls_gnutls_check_version" >&6; } if test "x$ac_cv_lib_gnutls_gnutls_check_version" = xyes then : ac_fn_check_decl "$LINENO" "GNUTLS_VERIFY_DISABLE_TIME_CHECKS" "ac_cv_have_decl_GNUTLS_VERIFY_DISABLE_TIME_CHECKS" "#include " "$ac_c_undeclared_builtin_options$ac_c_future_darwin_options" "CFLAGS" if test "x$ac_cv_have_decl_GNUTLS_VERIFY_DISABLE_TIME_CHECKS" = xyes then : ac_have_decl=1 else case e in #( e) ac_have_decl=0 ;; esac fi printf '%s\n' "#define HAVE_DECL_GNUTLS_VERIFY_DISABLE_TIME_CHECKS $ac_have_decl" >>confdefs.h LIBS="$LIBS -lgnutls" ac_fn_c_check_func "$LINENO" "gnutls_priority_set_direct" "ac_cv_func_gnutls_priority_set_direct" if test "x$ac_cv_func_gnutls_priority_set_direct" = xyes then : printf '%s\n' "#define HAVE_GNUTLS_PRIORITY_SET_DIRECT 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "gnutls_certificate_credentials_t" "ac_cv_type_gnutls_certificate_credentials_t" "#include " if test "x$ac_cv_type_gnutls_certificate_credentials_t" = xyes then : printf '%s\n' "#define HAVE_GNUTLS_CERTIFICATE_CREDENTIALS_T 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "gnutls_certificate_status_t" "ac_cv_type_gnutls_certificate_status_t" "#include " if test "x$ac_cv_type_gnutls_certificate_status_t" = xyes then : printf '%s\n' "#define HAVE_GNUTLS_CERTIFICATE_STATUS_T 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "gnutls_datum_t" "ac_cv_type_gnutls_datum_t" "#include " if test "x$ac_cv_type_gnutls_datum_t" = xyes then : printf '%s\n' "#define HAVE_GNUTLS_DATUM_T 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "gnutls_digest_algorithm_t" "ac_cv_type_gnutls_digest_algorithm_t" "#include " if test "x$ac_cv_type_gnutls_digest_algorithm_t" = xyes then : printf '%s\n' "#define HAVE_GNUTLS_DIGEST_ALGORITHM_T 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "gnutls_session_t" "ac_cv_type_gnutls_session_t" "#include " if test "x$ac_cv_type_gnutls_session_t" = xyes then : printf '%s\n' "#define HAVE_GNUTLS_SESSION_T 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "gnutls_transport_ptr_t" "ac_cv_type_gnutls_transport_ptr_t" "#include " if test "x$ac_cv_type_gnutls_transport_ptr_t" = xyes then : printf '%s\n' "#define HAVE_GNUTLS_TRANSPORT_PTR_T 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "gnutls_x509_crt_t" "ac_cv_type_gnutls_x509_crt_t" "#include " if test "x$ac_cv_type_gnutls_x509_crt_t" = xyes then : printf '%s\n' "#define HAVE_GNUTLS_X509_CRT_T 1" >>confdefs.h fi LIBS="$saved_LIBS" MUTTLIBS="$MUTTLIBS -lgnutls" printf '%s\n' "#define USE_SSL 1" >>confdefs.h printf '%s\n' "#define USE_SSL_GNUTLS 1" >>confdefs.h MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl_gnutls.o" need_ssl=yes else case e in #( e) as_fn_error $? "could not find libgnutls" "$LINENO" 5 ;; esac fi fi fi if test x$need_ssl = xyes; then USE_SSL_TRUE= USE_SSL_FALSE='#' else USE_SSL_TRUE='#' USE_SSL_FALSE= fi # Check whether --with-sasl was given. if test ${with_sasl+y} then : withval=$with_sasl; if test "$with_sasl" != "no" then if test "$need_socket" != "yes" then as_fn_error $? "SASL support is only useful with POP or IMAP support" "$LINENO" 5 fi if test "$with_sasl" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_sasl/include" LDFLAGS="$LDFLAGS -L$with_sasl/lib" fi saved_LIBS="$LIBS" LIBS= # OpenSolaris provides a SASL2 interface in libsasl sasl_libs="sasl2 sasl" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for library containing sasl_encode64" >&5 printf %s "checking for library containing sasl_encode64... " >&6; } if test ${ac_cv_search_sasl_encode64+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char sasl_encode64 (void); int main (void) { return sasl_encode64 (); ; return 0; } _ACEOF for ac_lib in '' $sasl_libs do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_sasl_encode64=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_sasl_encode64+y} then : break fi done if test ${ac_cv_search_sasl_encode64+y} then : else case e in #( e) ac_cv_search_sasl_encode64=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sasl_encode64" >&5 printf '%s\n' "$ac_cv_search_sasl_encode64" >&6; } ac_res=$ac_cv_search_sasl_encode64 if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else case e in #( e) as_fn_error $? "could not find sasl lib" "$LINENO" 5 ;; esac fi MUTTLIBS="$MUTTLIBS $LIBS" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_sasl.o" LIBS="$saved_LIBS" printf '%s\n' "#define USE_SASL 1" >>confdefs.h printf '%s\n' "#define USE_SASL_CYRUS 1" >>confdefs.h need_sasl=yes need_sasl_cyrus=yes fi fi # Check whether --with-gsasl was given. if test ${with_gsasl+y} then : withval=$with_gsasl; if test "$with_gsasl" != "no" then if test "$need_socket" != "yes" then as_fn_error $? "GNU SASL support is only useful with POP or IMAP support" "$LINENO" 5 fi if test x"$need_sasl" = "xyes" then as_fn_error $? "Both --with-gsasl and --with-sasl can not be enabled at the same time" "$LINENO" 5 fi if test "$with_gsasl" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_gsasl/include" LDFLAGS="$LDFLAGS -L$with_gsasl/lib" fi saved_LIBS="$LIBS" LIBS= ac_fn_c_check_header_compile "$LINENO" "gsasl.h" "ac_cv_header_gsasl_h" "$ac_includes_default" if test "x$ac_cv_header_gsasl_h" = xyes then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for gsasl_check_version in -lgsasl" >&5 printf %s "checking for gsasl_check_version in -lgsasl... " >&6; } if test ${ac_cv_lib_gsasl_gsasl_check_version+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgsasl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char gsasl_check_version (void); int main (void) { return gsasl_check_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gsasl_gsasl_check_version=yes else case e in #( e) ac_cv_lib_gsasl_gsasl_check_version=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsasl_gsasl_check_version" >&5 printf '%s\n' "$ac_cv_lib_gsasl_gsasl_check_version" >&6; } if test "x$ac_cv_lib_gsasl_gsasl_check_version" = xyes then : printf '%s\n' "#define HAVE_LIBGSASL 1" >>confdefs.h LIBS="-lgsasl $LIBS" else case e in #( e) as_fn_error $? "GNU SASL library not found" "$LINENO" 5 ;; esac fi else case e in #( e) as_fn_error $? "GNU SASL headers not found" "$LINENO" 5 ;; esac fi MUTTLIBS="$MUTTLIBS -lgsasl" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_sasl_gnu.o" LIBS="$saved_LIBS" printf '%s\n' "#define USE_SASL 1" >>confdefs.h printf '%s\n' "#define USE_SASL_GNU 1" >>confdefs.h need_sasl=yes need_sasl_gnu=yes fi fi if test x$need_sasl_cyrus = xyes; then USE_SASL_CYRUS_TRUE= USE_SASL_CYRUS_FALSE='#' else USE_SASL_CYRUS_TRUE='#' USE_SASL_CYRUS_FALSE= fi if test x$need_sasl_gnu = xyes; then USE_SASL_GNU_TRUE= USE_SASL_GNU_FALSE='#' else USE_SASL_GNU_TRUE='#' USE_SASL_GNU_FALSE= fi # Check whether --enable-debug was given. if test ${enable_debug+y} then : enableval=$enable_debug; if test x$enableval = xyes ; then printf '%s\n' "#define DEBUG 1" >>confdefs.h fi fi # Check whether --enable-flock was given. if test ${enable_flock+y} then : enableval=$enable_flock; if test $enableval = yes; then printf '%s\n' "#define USE_FLOCK 1" >>confdefs.h fi fi mutt_cv_fcntl=yes # Check whether --enable-fcntl was given. if test ${enable_fcntl+y} then : enableval=$enable_fcntl; if test $enableval = no; then mutt_cv_fcntl=no; fi fi if test $mutt_cv_fcntl = yes; then printf '%s\n' "#define USE_FCNTL 1" >>confdefs.h fi # Check whether --enable-filemonitor was given. if test ${enable_filemonitor+y} then : enableval=$enable_filemonitor; if test x$enableval = xno ; then have_filemonitor=no fi fi if test x$have_filemonitor != xno ; then for ac_func in inotify_init inotify_add_watch inotify_rm_watch do : as_ac_var=`printf '%s\n' "ac_cv_func_$ac_func" | sed "$as_sed_sh"` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf '%s\n' "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 _ACEOF else case e in #( e) have_filemonitor=no ;; esac fi done if test x$have_filemonitor != xno ; then printf '%s\n' "#define USE_INOTIFY 1" >>confdefs.h ac_func= for ac_item in $ac_func_c_list do if test $ac_func; then ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then echo "#define $ac_item 1" >> confdefs.h fi ac_func= else ac_func=$ac_item fi done ac_fn_c_check_header_compile "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default" if test "x$ac_cv_header_sys_inotify_h" = xyes then : printf '%s\n' "#define HAVE_SYS_INOTIFY_H 1" >>confdefs.h fi MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS monitor.o" fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether struct dirent defines d_ino" >&5 printf %s "checking whether struct dirent defines d_ino... " >&6; } ac_cv_dirent_d_ino=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { struct dirent dp; (void)dp.d_ino ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_dirent_d_ino=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test x$ac_cv_dirent_d_ino = xyes ; then printf '%s\n' "#define HAVE_DIRENT_D_INO 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dirent_d_ino" >&5 printf '%s\n' "$ac_cv_dirent_d_ino" >&6; } mutt_cv_warnings=yes # Check whether --enable-warnings was given. if test ${enable_warnings+y} then : enableval=$enable_warnings; if test $enableval = no; then mutt_cv_warnings=no fi fi if test x$GCC = xyes && test $mutt_cv_warnings = yes; then CFLAGS="-Wall -pedantic -Wno-long-long $CFLAGS" fi # Check whether --enable-nfs-fix was given. if test ${enable_nfs_fix+y} then : enableval=$enable_nfs_fix; if test x$enableval = xyes; then printf '%s\n' "#define NFS_ATTRIBUTE_HACK 1" >>confdefs.h fi fi # Check whether --enable-mailtool was given. if test ${enable_mailtool+y} then : enableval=$enable_mailtool; if test x$enableval = xyes; then printf '%s\n' "#define SUN_ATTACHMENT 1" >>confdefs.h fi fi # Check whether --enable-locales-fix was given. if test ${enable_locales_fix+y} then : enableval=$enable_locales_fix; if test x$enableval = xyes; then printf '%s\n' "#define LOCALES_HACK 1" >>confdefs.h fi fi # Check whether --with-exec-shell was given. if test ${with_exec_shell+y} then : withval=$with_exec_shell; if test $withval != yes; then printf '%s\n' "#define EXECSHELL \"$withval\"" >>confdefs.h else printf '%s\n' "#define EXECSHELL \"/bin/sh\"" >>confdefs.h fi else case e in #( e) printf '%s\n' "#define EXECSHELL \"/bin/sh\"" >>confdefs.h ;; esac fi # Check whether --enable-exact-address was given. if test ${enable_exact_address+y} then : enableval=$enable_exact_address; if test $enableval = yes; then printf '%s\n' "#define EXACT_ADDRESS 1" >>confdefs.h fi fi db_found=no db_requested=auto # Check whether --enable-hcache was given. if test ${enable_hcache+y} then : enableval=$enable_hcache; fi # Check whether --with-kyotocabinet was given. if test ${with_kyotocabinet+y} then : withval=$with_kyotocabinet; fi # Check whether --with-tokyocabinet was given. if test ${with_tokyocabinet+y} then : withval=$with_tokyocabinet; fi # Check whether --with-lmdb was given. if test ${with_lmdb+y} then : withval=$with_lmdb; fi # Check whether --with-qdbm was given. if test ${with_qdbm+y} then : withval=$with_qdbm; fi # Check whether --with-gdbm was given. if test ${with_gdbm+y} then : withval=$with_gdbm; fi # Check whether --with-bdb was given. if test ${with_bdb+y} then : withval=$with_bdb; fi if test x$enable_hcache = xyes then printf '%s\n' "#define USE_HCACHE 1" >>confdefs.h MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache.o" OLDCPPFLAGS="$CPPFLAGS" OLDLDFLAGS="$LDFLAGS" OLDLIBS="$LIBS" need_md5="yes" if test -n "$with_kyotocabinet" && test "$with_kyotocabinet" != "no" then if test "$db_requested" != "auto" then as_fn_error $? "more than one header cache engine requested." "$LINENO" 5 else db_requested=kc fi fi if test -n "$with_tokyocabinet" && test "$with_tokyocabinet" != "no" then if test "$db_requested" != "auto" then as_fn_error $? "more than one header cache engine requested." "$LINENO" 5 else db_requested=tc fi fi if test -n "$with_lmdb" && test "$with_lmdb" != "no" then if test "$db_requested" != "auto" then as_fn_error $? "more than one header cache engine requested." "$LINENO" 5 else db_requested=lmdb fi fi if test -n "$with_qdbm" && test "$with_qdbm" != "no" then if test "$db_requested" != "auto" then as_fn_error $? "more than one header cache engine requested." "$LINENO" 5 else db_requested=qdbm fi fi if test -n "$with_gdbm" && test "$with_gdbm" != "no" then if test "$db_requested" != "auto" then as_fn_error $? "more than one header cache engine requested." "$LINENO" 5 else db_requested=gdbm fi fi if test -n "$with_bdb" && test "$with_bdb" != "no" then if test "$db_requested" != "auto" then as_fn_error $? "more than one header cache engine requested." "$LINENO" 5 else db_requested=bdb fi fi if test x$with_kyotocabinet != xno && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = kc then if test -n "$with_kyotocabinet" && test "$with_kyotocabinet" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_kyotocabinet/include" LDFLAGS="$LDFLAGS -L$with_kyotocabinet/lib" fi ac_fn_c_check_header_compile "$LINENO" "kclangc.h" "ac_cv_header_kclangc_h" "$ac_includes_default" if test "x$ac_cv_header_kclangc_h" = xyes then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for kcdbopen in -lkyotocabinet" >&5 printf %s "checking for kcdbopen in -lkyotocabinet... " >&6; } if test ${ac_cv_lib_kyotocabinet_kcdbopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lkyotocabinet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char kcdbopen (void); int main (void) { return kcdbopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_kyotocabinet_kcdbopen=yes else case e in #( e) ac_cv_lib_kyotocabinet_kcdbopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kyotocabinet_kcdbopen" >&5 printf '%s\n' "$ac_cv_lib_kyotocabinet_kcdbopen" >&6; } if test "x$ac_cv_lib_kyotocabinet_kcdbopen" = xyes then : MUTTLIBS="$MUTTLIBS -lkyotocabinet" printf '%s\n' "#define HAVE_KC 1" >>confdefs.h db_found=kc else case e in #( e) CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS" ;; esac fi fi if test "$db_requested" != auto && test "$db_found" != "$db_requested" then as_fn_error $? "Kyoto Cabinet could not be used. Check config.log for details." "$LINENO" 5 fi fi if test "x$with_tokyocabinet" != "xno" && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = tc then if test -n "$with_tokyocabinet" && test "$with_tokyocabinet" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_tokyocabinet/include" LDFLAGS="$LDFLAGS -L$with_tokyocabinet/lib" fi ac_fn_c_check_header_compile "$LINENO" "tcbdb.h" "ac_cv_header_tcbdb_h" "$ac_includes_default" if test "x$ac_cv_header_tcbdb_h" = xyes then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for tcbdbopen in -ltokyocabinet" >&5 printf %s "checking for tcbdbopen in -ltokyocabinet... " >&6; } if test ${ac_cv_lib_tokyocabinet_tcbdbopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ltokyocabinet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char tcbdbopen (void); int main (void) { return tcbdbopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_tokyocabinet_tcbdbopen=yes else case e in #( e) ac_cv_lib_tokyocabinet_tcbdbopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tokyocabinet_tcbdbopen" >&5 printf '%s\n' "$ac_cv_lib_tokyocabinet_tcbdbopen" >&6; } if test "x$ac_cv_lib_tokyocabinet_tcbdbopen" = xyes then : MUTTLIBS="$MUTTLIBS -ltokyocabinet" printf '%s\n' "#define HAVE_TC 1" >>confdefs.h db_found=tc else case e in #( e) CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS" ;; esac fi fi if test "$db_requested" != auto && test "$db_found" != "$db_requested" then as_fn_error $? "Tokyo Cabinet could not be used. Check config.log for details." "$LINENO" 5 fi fi if test x$with_lmdb != xno && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = lmdb then if test -n "$with_lmdb" && test "$with_lmdb" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_lmdb/include" LDFLAGS="$LDFLAGS -L$with_lmdb/lib" fi saved_LIBS="$LIBS" LIBS="$LIBS -llmdb" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for mdb_env_create" >&5 printf %s "checking for mdb_env_create... " >&6; } if test ${ac_cv_mdbenvcreate+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_mdbenvcreate=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { mdb_env_create(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_mdbenvcreate=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mdbenvcreate" >&5 printf '%s\n' "$ac_cv_mdbenvcreate" >&6; } LIBS="$saved_LIBS" if test "$ac_cv_mdbenvcreate" = yes then printf '%s\n' "#define HAVE_LMDB 1" >>confdefs.h MUTTLIBS="$MUTTLIBS -llmdb" db_found=lmdb fi if test "$db_requested" != auto && test "$db_found" != "$db_requested" then as_fn_error $? "LMDB could not be used. Check config.log for details." "$LINENO" 5 fi fi if test "$with_qdbm" != "no" && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = qdbm then if test -n "$with_qdbm" && test "$with_qdbm" != "yes" then if test -d $with_qdbm/include/qdbm; then CPPFLAGS="$CPPFLAGS -I$with_qdbm/include/qdbm" else CPPFLAGS="$CPPFLAGS -I$with_qdbm/include" fi LDFLAGS="$LDFLAGS -L$with_qdbm/lib" else if test -d /usr/include/qdbm; then CPPFLAGS="$CPPFLAGS -I/usr/include/qdbm" fi fi saved_LIBS="$LIBS" ac_fn_c_check_header_compile "$LINENO" "villa.h" "ac_cv_header_villa_h" "$ac_includes_default" if test "x$ac_cv_header_villa_h" = xyes then : printf '%s\n' "#define HAVE_VILLA_H 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for vlopen in -lqdbm" >&5 printf %s "checking for vlopen in -lqdbm... " >&6; } if test ${ac_cv_lib_qdbm_vlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lqdbm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char vlopen (void); int main (void) { return vlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_qdbm_vlopen=yes else case e in #( e) ac_cv_lib_qdbm_vlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_qdbm_vlopen" >&5 printf '%s\n' "$ac_cv_lib_qdbm_vlopen" >&6; } if test "x$ac_cv_lib_qdbm_vlopen" = xyes then : MUTTLIBS="$MUTTLIBS -lqdbm" printf '%s\n' "#define HAVE_QDBM 1" >>confdefs.h db_found=qdbm else case e in #( e) CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS" ;; esac fi LIBS="$saved_LIBS" if test "$db_requested" != auto && test "$db_found" != "$db_requested" then as_fn_error $? "QDBM could not be used. Check config.log for details." "$LINENO" 5 fi fi if test x$with_gdbm != xno && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = gdbm then if test -n "$with_gdbm" && test "$with_gdbm" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_gdbm/include" LDFLAGS="$LDFLAGS -L$with_gdbm/lib" fi saved_LIBS="$LIBS" LIBS="$LIBS -lgdbm" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for gdbm_open" >&5 printf %s "checking for gdbm_open... " >&6; } if test ${ac_cv_gdbmopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_gdbmopen=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { gdbm_open(0,0,0,0,0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_gdbmopen=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gdbmopen" >&5 printf '%s\n' "$ac_cv_gdbmopen" >&6; } LIBS="$saved_LIBS" if test "$ac_cv_gdbmopen" = yes then printf '%s\n' "#define HAVE_GDBM 1" >>confdefs.h MUTTLIBS="$MUTTLIBS -lgdbm" db_found=gdbm fi if test "$db_requested" != auto && test "$db_found" != "$db_requested" then as_fn_error $? "GDBM could not be used. Check config.log for details." "$LINENO" 5 fi fi if test x$with_bdb != xno && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = bdb then if test -n "$with_bdb" && test "$with_bdb" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_bdb/include" LDFLAGS="$LDFLAGS -L$with_bdb/lib" fi saved_LIBS="$LIBS" LIBS="$LIBS -ldb" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for BDB > 4.0" >&5 printf %s "checking for BDB > 4.0... " >&6; } if test ${ac_cv_dbcreate+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_dbcreate=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { DB *db = NULL; db->open(db,NULL,NULL,NULL,0,0,0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_dbcreate=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dbcreate" >&5 printf '%s\n' "$ac_cv_dbcreate" >&6; } LIBS="$saved_LIBS" if test "x$ac_cv_dbcreate" = "xyes" then printf '%s\n' "#define HAVE_DB4 1" >>confdefs.h MUTTLIBS="$MUTTLIBS -ldb" db_found=bdb fi if test "$db_requested" != auto && test "$db_found" != "$db_requested" then as_fn_error $? "BDB could not be used. Check config.log for details." "$LINENO" 5 fi fi if test $db_found = no then as_fn_error $? "You need Kyoto Cabinet, Tokyo Cabinet, LMDB, QDBM, GDBM, or BDB for hcache" "$LINENO" 5 fi fi if test x$db_found != xno; then BUILD_HCACHE_TRUE= BUILD_HCACHE_FALSE='#' else BUILD_HCACHE_TRUE='#' BUILD_HCACHE_FALSE= fi if test "$need_md5" = "yes" then MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS md5.o" fi # Check whether --enable-iconv was given. if test ${enable_iconv+y} then : enableval=$enable_iconv; if test x$enableval = xno ; then am_cv_func_iconv=no fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf '%s\n' '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf '%s\n' "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 printf %s "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test ${enable_nls+y} then : enableval=$enable_nls; USE_NLS=$enableval else case e in #( e) USE_NLS=yes ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf '%s\n' "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.22 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGFMT+y} then : printf %s "(cached) " >&6 else case e in #( e) case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$gt_saved_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 printf '%s\n' "$MSGFMT" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GMSGFMT+y} then : printf %s "(cached) " >&6 else case e in #( e) case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 printf '%s\n' "$GMSGFMT" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XGETTEXT+y} then : printf %s "(cached) " >&6 else case e in #( e) case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$gt_saved_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 printf '%s\n' "$XGETTEXT" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGMERGE+y} then : printf %s "(cached) " >&6 else case e in #( e) case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$gt_saved_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 printf '%s\n' "$MSGMERGE" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' else if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' else MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' fi fi test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_saved_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_saved_prefix" # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else case e in #( e) with_gnu_ld=no ;; esac fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi if test -n "$LD"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 printf %s "checking for ld... " >&6; } elif test "$GCC" = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } elif test "$with_gnu_ld" = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test -n "$LD"; then # Let the user override the test with a path. : else if test ${acl_cv_path_LD+y} then : printf %s "(cached) " >&6 else case e in #( e) acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw* | windows*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_saved_IFS" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext /* end confdefs.h. */ #if defined __powerpc64__ || defined __LP64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : # The compiler produces 64-bit code. Add option '-b64' so that the # linker groks 64-bit object files. case "$acl_cv_path_LD " in *" -b64 "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; sparc64-*-netbsd*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) # The compiler produces 32-bit code. Add option '-m elf32_sparc' # so that the linker groks 32-bit object files. case "$acl_cv_path_LD " in *" -m elf32_sparc "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; esac ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac ;; esac fi LD="$acl_cv_path_LD" fi if test -n "$LD"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 printf '%s\n' "$LD" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${acl_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else case e in #( e) # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf '%s\n' "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 printf %s "checking for shared library run path origin... " >&6; } if test ${acl_cv_rpath+y} then : printf %s "(cached) " >&6 else case e in #( e) CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 printf '%s\n' "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test ${enable_rpath+y} then : enableval=$enable_rpath; : else case e in #( e) enable_rpath=yes ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 printf %s "checking 32-bit host C ABI... " >&6; } if test ${gl_cv_host_cpu_c_abi_32bit+y} then : printf %s "(cached) " >&6 else case e in #( e) case "$host_cpu" in # CPUs that only support a 32-bit ABI. arc \ | bfin \ | cris* \ | csky \ | epiphany \ | ft32 \ | h8300 \ | m68k \ | microblaze | microblazeel \ | nds32 | nds32le | nds32be \ | nios2 | nios2eb | nios2el \ | or1k* \ | or32 \ | sh | sh1234 | sh1234elb \ | tic6x \ | xtensa* ) gl_cv_host_cpu_c_abi_32bit=yes ;; # CPUs that only support a 64-bit ABI. alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ | mmix ) gl_cv_host_cpu_c_abi_32bit=no ;; *) if test -n "$gl_cv_host_cpu_c_abi"; then case "$gl_cv_host_cpu_c_abi" in i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) gl_cv_host_cpu_c_abi_32bit=yes ;; x86_64 | alpha | arm64 | aarch64c | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) gl_cv_host_cpu_c_abi_32bit=no ;; *) gl_cv_host_cpu_c_abi_32bit=unknown ;; esac else gl_cv_host_cpu_c_abi_32bit=unknown fi if test $gl_cv_host_cpu_c_abi_32bit = unknown; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int test_pointer_size[sizeof (void *) - 5]; _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else case e in #( e) gl_cv_host_cpu_c_abi_32bit=yes ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi ;; esac ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 printf '%s\n' "$gl_cv_host_cpu_c_abi_32bit" >&6; } HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 printf %s "checking for ELF binary format... " >&6; } if test ${gl_cv_elf+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __ELF__ || (defined __linux__ && (defined __EDG__ || defined __SUNPRO_C)) Extensible Linking Format #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1 then : gl_cv_elf=yes else case e in #( e) gl_cv_elf=no ;; esac fi rm -rf conftest* ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 printf '%s\n' "$gl_cv_elf" >&6; } if test $gl_cv_elf = yes; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then # Use POSIX od. func_elfclass () { od -A n -t d1 -j 4 -N 1 } else # Use BSD hexdump. func_elfclass () { dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' echo } fi # Use 'expr', not 'test', to compare the values of func_elfclass, because on # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, # not 1 or 2. case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null } ;; *) # Unknown. acl_is_expected_elfclass () { : } ;; esac else acl_is_expected_elfclass () { : } fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 printf %s "checking for the common suffixes of directories in the library search path... " >&6; } if test ${acl_cv_libdirstems+y} then : printf %s "(cached) " >&6 else case e in #( e) acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in solaris*) if test $HOST_CPU_C_ABI_32BIT = no; then acl_libdirstem2=lib/64 case "$host_cpu" in sparc*) acl_libdirstem3=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; netbsd*) if test $HOST_CPU_C_ABI_32BIT != no; then case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparc ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test $HOST_CPU_C_ABI_32BIT != no; then # 32-bit or unknown ABI. if test -d /usr/lib32; then acl_libdirstem2=lib32 fi fi if test $HOST_CPU_C_ABI_32BIT != yes; then # 64-bit or unknown ABI. if test -d /usr/lib64; then acl_libdirstem3=lib64 fi fi if test -n "$searchpath"; then acl_saved_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib32 ) acl_libdirstem2=lib32 ;; */lib64 ) acl_libdirstem3=lib64 ;; esac ;; esac fi done IFS="$acl_saved_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= fi if test $HOST_CPU_C_ABI_32BIT = no; then # 64-bit ABI. acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 printf '%s\n' "$acl_cv_libdirstems" >&6; } acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` use_additional=yes acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" # Check whether --with-libiconv-prefix was given. if test ${with_libiconv_prefix+y} then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi fi if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi fi done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$saved_libdir" for dep in $dependency_libs; do case "$dep" in -L*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dep=`echo "X$dep" | sed -e 's/^X-l//'` if test "X$dep" != Xc \ || case $host_os in linux* | gnu* | k*bsd*-gnu) false ;; *) true ;; esac; then names_next_round="$names_next_round $dep" fi ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi gl_sed_double_backslashes='s/\\/\\\\/g' gl_sed_escape_doublequotes='s/"/\\"/g' gl_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g" gl_sed_escape_for_make_2='s,\$,\\$$,g' case `echo r | tr -d '\r'` in '') gl_tr_cr='\015' ;; *) gl_tr_cr='\r' ;; esac gl_saved_prefix="${prefix}" gl_saved_datarootdir="${datarootdir}" gl_saved_localedir="${localedir}" if test "X$prefix" = "XNONE"; then prefix="$ac_default_prefix" fi eval datarootdir="$datarootdir" eval localedir="$localedir" gl_final_localedir="$localedir" case "$build_os" in cygwin*) case "$host_os" in mingw* | windows*) gl_final_localedir=`cygpath -w "$gl_final_localedir"` ;; esac ;; esac localedir_c=`printf '%s\n' "$gl_final_localedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes" | tr -d "$gl_tr_cr"` localedir_c='"'"$localedir_c"'"' localedir_c_make=`printf '%s\n' "$localedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2" | tr -d "$gl_tr_cr"` if test "$localedir_c_make" = '\"'"${gl_final_localedir}"'\"'; then localedir_c_make='\"$(localedir)\"' fi localedir="${gl_saved_localedir}" datarootdir="${gl_saved_datarootdir}" prefix="${gl_saved_prefix}" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 printf %s "checking for CFPreferencesCopyAppValue... " >&6; } if test ${gt_cv_func_CFPreferencesCopyAppValue+y} then : printf %s "(cached) " >&6 else case e in #( e) gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFPreferencesCopyAppValue=yes else case e in #( e) gt_cv_func_CFPreferencesCopyAppValue=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_saved_LIBS" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 printf '%s\n' "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then printf '%s\n' "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} then : printf %s "(cached) " >&6 else case e in #( e) gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFLocaleCopyPreferredLanguages(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFLocaleCopyPreferredLanguages=yes else case e in #( e) gt_cv_func_CFLocaleCopyPreferredLanguages=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_saved_LIBS" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 printf '%s\n' "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then printf '%s\n' "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 printf %s "checking for GNU gettext in libc... " >&6; } if eval test \${$gt_func_gnugettext_libc+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libc=yes" else case e in #( e) eval "$gt_func_gnugettext_libc=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi eval ac_res=\$$gt_func_gnugettext_libc { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then gl_saved_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else case e in #( e) am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then gl_saved_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_saved_LIBS" fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf '%s\n' "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 else case e in #( e) gl_saved_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do if test "$cross_compiling" = yes then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main (void) { int result = 0; /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from successful returns. This is even documented in */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against macOS 14.4 bug: Failures are not distinguishable from successful returns. POSIX:2018 says: "The iconv() function shall ... return the number of non-identical conversions performed." But here, the conversion always does transliteration (the suffixes "//TRANSLIT" and "//IGNORE" have no effect, nor does iconvctl()) and does not report when it does a non-identical conversion. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\305\202"; /* LATIN SMALL LETTER L WITH STROKE */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); /* Here: With glibc, GNU libiconv (including macOS up to 13): res == (size_t)-1, errno == EILSEQ. With musl libc, NetBSD 10, Solaris 11: res == 1. With macOS 14.4: res == 0, output is "l". */ if (res == 0) result |= 2; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 4; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 8; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 16; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 32; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi test "$am_cv_func_iconv_works" = no || break done LIBS="$gl_saved_LIBS" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf '%s\n' "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then printf '%s\n' "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 printf %s "checking how to link with libiconv... " >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf '%s\n' "$LIBICONV" >&6; } else CPPFLAGS="$gl_saved_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" # Check whether --with-libintl-prefix was given. if test ${with_libintl_prefix+y} then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi fi if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi fi done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$saved_libdir" for dep in $dependency_libs; do case "$dep" in -L*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dep=`echo "X$dep" | sed -e 's/^X-l//'` if test "X$dep" != Xc \ || case $host_os in linux* | gnu* | k*bsd*-gnu) false ;; *) true ;; esac; then names_next_round="$names_next_round $dep" fi ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 printf %s "checking for GNU gettext in libintl... " >&6; } if eval test \${$gt_func_gnugettext_libintl+y} then : printf %s "(cached) " >&6 else case e in #( e) gt_saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_saved_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libintl=yes" else case e in #( e) eval "$gt_func_gnugettext_libintl=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS" case "$host_os" in aix*) gt_LIBINTL_EXTRA="-lpthread" ;; esac if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \ && { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then LIBS="$LIBS $LIBICONV $gt_LIBINTL_EXTRA" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : LIBINTL="$LIBINTL $LIBICONV $gt_LIBINTL_EXTRA" LTLIBINTL="$LTLIBINTL $LTLIBICONV $gt_LIBINTL_EXTRA" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_saved_CPPFLAGS" LIBS="$gt_saved_LIBS" ;; esac fi eval ac_res=\$$gt_func_gnugettext_libintl { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf '%s\n' "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools \ && test "$PACKAGE" != libintl; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then printf '%s\n' "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 printf %s "checking whether to use NLS... " >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf '%s\n' "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 printf %s "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 printf '%s\n' "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 printf %s "checking how to link with libintl... " >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 printf '%s\n' "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi printf '%s\n' "#define HAVE_GETTEXT 1" >>confdefs.h printf '%s\n' "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" gl_saved_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else case e in #( e) am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then gl_saved_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_saved_LIBS" fi ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf '%s\n' "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 else case e in #( e) gl_saved_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do if test "$cross_compiling" = yes then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main (void) { int result = 0; /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from successful returns. This is even documented in */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against macOS 14.4 bug: Failures are not distinguishable from successful returns. POSIX:2018 says: "The iconv() function shall ... return the number of non-identical conversions performed." But here, the conversion always does transliteration (the suffixes "//TRANSLIT" and "//IGNORE" have no effect, nor does iconvctl()) and does not report when it does a non-identical conversion. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\305\202"; /* LATIN SMALL LETTER L WITH STROKE */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); /* Here: With glibc, GNU libiconv (including macOS up to 13): res == (size_t)-1, errno == EILSEQ. With musl libc, NetBSD 10, Solaris 11: res == 1. With macOS 14.4: res == 0, output is "l". */ if (res == 0) result |= 2; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 4; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 8; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 16; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 32; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi test "$am_cv_func_iconv_works" = no || break done LIBS="$gl_saved_LIBS" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf '%s\n' "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then printf '%s\n' "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 printf %s "checking how to link with libiconv... " >&6; } { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf '%s\n' "$LIBICONV" >&6; } else CPPFLAGS="$gl_saved_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5 printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; } if test ${gl_cv_iconv_nonconst+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_iconv_nonconst=yes else case e in #( e) gl_cv_iconv_nonconst=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5 printf '%s\n' "$gl_cv_iconv_nonconst" >&6; } else gl_cv_iconv_nonconst=yes fi if test $gl_cv_iconv_nonconst = yes; then iconv_arg1="" else iconv_arg1="const" fi printf '%s\n' "#define ICONV_CONST $iconv_arg1" >>confdefs.h if test "$am_func_iconv" = yes; then if test -n "$LIBICONV"; then am_cv_func_iconv_summary='yes, in libiconv' else am_cv_func_iconv_summary='yes, in libc' fi else if test "$am_cv_func_iconv" = yes; then am_cv_func_iconv_summary='not working, consider installing GNU libiconv' else am_cv_func_iconv_summary='no, consider installing GNU libiconv' fi fi if test "$am_func_iconv" != "yes" then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: Configuring without iconv support. See INSTALL for details" >&5 printf '%s\n' "$as_me: WARNING: Configuring without iconv support. See INSTALL for details" >&2;} else for ac_header in iconv.h do : ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" if test "x$ac_cv_header_iconv_h" = xyes then : printf '%s\n' "#define HAVE_ICONV_H 1" >>confdefs.h { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether iconv.h defines iconv_t" >&5 printf %s "checking whether iconv.h defines iconv_t... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "typedef.*iconv_t" >/dev/null 2>&1 then : { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf '%s\n' "yes" >&6; } printf '%s\n' "#define HAVE_ICONV_T_DEF 1" >>confdefs.h else case e in #( e) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } ;; esac fi rm -rf conftest* fi done { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether this iconv is good enough" >&5 printf %s "checking whether this iconv is good enough... " >&6; } if test ${mutt_cv_iconv_good+y} then : printf %s "(cached) " >&6 else case e in #( e) mutt_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" if test "$cross_compiling" = yes then : mutt_cv_iconv_good=yes else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { iconv_t cd; char buf[4]; char *ob; size_t obl; ob = buf, obl = sizeof(buf); return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) && (iconv(cd, 0, 0, &ob, &obl) || !(ob == buf && obl == sizeof(buf)) || iconv_close(cd))); } _ACEOF if ac_fn_c_try_run "$LINENO" then : mutt_cv_iconv_good=yes else case e in #( e) mutt_cv_iconv_good=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi LIBS="$mutt_save_LIBS" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_iconv_good" >&5 printf '%s\n' "$mutt_cv_iconv_good" >&6; } if test "$mutt_cv_iconv_good" = no; then as_fn_error $? "Try using libiconv instead" "$LINENO" 5 fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether iconv is non-transcribing" >&5 printf %s "checking whether iconv is non-transcribing... " >&6; } if test ${mutt_cv_iconv_nontrans+y} then : printf %s "(cached) " >&6 else case e in #( e) mutt_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" if test "$cross_compiling" = yes then : mutt_cv_iconv_nontrans=no else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main() { iconv_t cd; char *ib; char *ob; size_t ibl, obl; char *s = (char *) "\304\211"; char t[3]; ib = s, ibl = 2, ob = t, obl = 3; return ((cd = iconv_open("UTF-8", "UTF-8")) == (iconv_t)(-1) || iconv(cd, &ib, &ibl, &ob, &obl)); } _ACEOF if ac_fn_c_try_run "$LINENO" then : mutt_cv_iconv_nontrans=no else case e in #( e) mutt_cv_iconv_nontrans=yes ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi LIBS="$mutt_save_LIBS" ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_iconv_nontrans" >&5 printf '%s\n' "$mutt_cv_iconv_nontrans" >&6; } if test "$mutt_cv_iconv_nontrans" = yes; then printf '%s\n' "#define ICONV_NONTRANS 1" >>confdefs.h else printf '%s\n' "#define ICONV_NONTRANS 0" >>confdefs.h fi mutt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes then : printf '%s\n' "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h fi LIBS="$mutt_save_LIBS" fi # libiconv if test "$am_func_iconv" = yes; then MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_idna.o" fi # Check whether --with-idn was given. if test ${with_idn+y} then : withval=$with_idn; if test "$with_idn" != "no" ; then if test "$with_idn" != "yes" ; then CPPFLAGS="$CPPFLAGS -I$with_idn/include" LDFLAGS="$LDFLAGS -L$with_idn/lib" fi fi else case e in #( e) with_idn=auto ;; esac fi # Check whether --with-idn2 was given. if test ${with_idn2+y} then : withval=$with_idn2; if test "$with_idn2" != "no" ; then if test "$with_idn" = "auto"; then with_idn="no" fi if test "$with_idn" != "no"; then as_fn_error $? "Cannot enable IDN and IDN2 support at the same time" "$LINENO" 5 fi if test "$with_idn2" != "yes" ; then CPPFLAGS="$CPPFLAGS -I$with_idn2/include" LDFLAGS="$LDFLAGS -L$with_idn2/lib" fi fi else case e in #( e) with_idn2=no ;; esac fi if test "x$with_idn" != "xno"; then if test "$am_func_iconv" != "yes"; then if test "$with_idn" != "auto"; then as_fn_error $? "IDN requested but iconv is disabled or unavailable" "$LINENO" 5 fi else have_stringprep_h=no for ac_header in stringprep.h idn/stringprep.h do : as_ac_Header=`printf '%s\n' "ac_cv_header_$ac_header" | sed "$as_sed_sh"` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf '%s\n' "HAVE_$ac_header" | sed "$as_sed_cpp"` 1 _ACEOF have_stringprep_h=yes break fi done have_idna_h=no for ac_header in idna.h idn/idna.h do : as_ac_Header=`printf '%s\n' "ac_cv_header_$ac_header" | sed "$as_sed_sh"` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf '%s\n' "HAVE_$ac_header" | sed "$as_sed_cpp"` 1 _ACEOF have_idna_h=yes break fi done mutt_save_LIBS="$LIBS" LIBS= { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for library containing stringprep_check_version" >&5 printf %s "checking for library containing stringprep_check_version... " >&6; } if test ${ac_cv_search_stringprep_check_version+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char stringprep_check_version (void); int main (void) { return stringprep_check_version (); ; return 0; } _ACEOF for ac_lib in '' idn do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_stringprep_check_version=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_stringprep_check_version+y} then : break fi done if test ${ac_cv_search_stringprep_check_version+y} then : else case e in #( e) ac_cv_search_stringprep_check_version=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_stringprep_check_version" >&5 printf '%s\n' "$ac_cv_search_stringprep_check_version" >&6; } ac_res=$ac_cv_search_stringprep_check_version if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" printf '%s\n' "#define HAVE_LIBIDN 1" >>confdefs.h MUTTLIBS="$MUTTLIBS $LIBS" LIBS="$LIBS $LIBICONV" ac_fn_c_check_func "$LINENO" "idna_to_unicode_utf8_from_utf8" "ac_cv_func_idna_to_unicode_utf8_from_utf8" if test "x$ac_cv_func_idna_to_unicode_utf8_from_utf8" = xyes then : printf '%s\n' "#define HAVE_IDNA_TO_UNICODE_UTF8_FROM_UTF8 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "idna_to_unicode_8z8z" "ac_cv_func_idna_to_unicode_8z8z" if test "x$ac_cv_func_idna_to_unicode_8z8z" = xyes then : printf '%s\n' "#define HAVE_IDNA_TO_UNICODE_8Z8Z 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "idna_to_ascii_from_utf8" "ac_cv_func_idna_to_ascii_from_utf8" if test "x$ac_cv_func_idna_to_ascii_from_utf8" = xyes then : printf '%s\n' "#define HAVE_IDNA_TO_ASCII_FROM_UTF8 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "idna_to_ascii_8z" "ac_cv_func_idna_to_ascii_8z" if test "x$ac_cv_func_idna_to_ascii_8z" = xyes then : printf '%s\n' "#define HAVE_IDNA_TO_ASCII_8Z 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "idna_to_ascii_lz" "ac_cv_func_idna_to_ascii_lz" if test "x$ac_cv_func_idna_to_ascii_lz" = xyes then : printf '%s\n' "#define HAVE_IDNA_TO_ASCII_LZ 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "idna_to_ascii_from_locale" "ac_cv_func_idna_to_ascii_from_locale" if test "x$ac_cv_func_idna_to_ascii_from_locale" = xyes then : printf '%s\n' "#define HAVE_IDNA_TO_ASCII_FROM_LOCALE 1" >>confdefs.h fi fi LIBS="$mutt_save_LIBS" if test "$with_idn" != auto; then if test $have_stringprep_h = no || test $have_idna_h = no || test $ac_cv_search_stringprep_check_version = no; then as_fn_error $? "IDN was requested, but libidn was not usable on this system" "$LINENO" 5 fi fi fi fi if test "x$with_idn2" != "xno"; then if test "$am_func_iconv" != "yes"; then as_fn_error $? "IDN2 requested but iconv is disabled or unavailable" "$LINENO" 5 else have_idn2_h=no for ac_header in idn2.h idn/idn2.h do : as_ac_Header=`printf '%s\n' "ac_cv_header_$ac_header" | sed "$as_sed_sh"` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf '%s\n' "HAVE_$ac_header" | sed "$as_sed_cpp"` 1 _ACEOF have_idn2_h=yes break fi done mutt_save_LIBS="$LIBS" LIBS= { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for library containing idn2_check_version" >&5 printf %s "checking for library containing idn2_check_version... " >&6; } if test ${ac_cv_search_idn2_check_version+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char idn2_check_version (void); int main (void) { return idn2_check_version (); ; return 0; } _ACEOF for ac_lib in '' idn2 do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_idn2_check_version=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_idn2_check_version+y} then : break fi done if test ${ac_cv_search_idn2_check_version+y} then : else case e in #( e) ac_cv_search_idn2_check_version=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_idn2_check_version" >&5 printf '%s\n' "$ac_cv_search_idn2_check_version" >&6; } ac_res=$ac_cv_search_idn2_check_version if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" printf '%s\n' "#define HAVE_LIBIDN2 1" >>confdefs.h MUTTLIBS="$MUTTLIBS $LIBS" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for library containing u8_strconv_from_locale" >&5 printf %s "checking for library containing u8_strconv_from_locale... " >&6; } if test ${ac_cv_search_u8_strconv_from_locale+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char u8_strconv_from_locale (void); int main (void) { return u8_strconv_from_locale (); ; return 0; } _ACEOF for ac_lib in '' unistring do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_u8_strconv_from_locale=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_u8_strconv_from_locale+y} then : break fi done if test ${ac_cv_search_u8_strconv_from_locale+y} then : else case e in #( e) ac_cv_search_u8_strconv_from_locale=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_u8_strconv_from_locale" >&5 printf '%s\n' "$ac_cv_search_u8_strconv_from_locale" >&6; } ac_res=$ac_cv_search_u8_strconv_from_locale if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" if test "$ac_cv_search_u8_strconv_from_locale" != "none required"; then MUTTLIBS="$MUTTLIBS -lunistring" fi fi LIBS="$LIBS $LIBICONV" ac_fn_check_decl "$LINENO" "idna_to_unicode_8z8z" "ac_cv_have_decl_idna_to_unicode_8z8z" " #if defined(HAVE_IDN2_H) #include #elif defined(HAVE_IDN_IDN2_H) #include #endif " "$ac_c_undeclared_builtin_options$ac_c_future_darwin_options" "CFLAGS" if test "x$ac_cv_have_decl_idna_to_unicode_8z8z" = xyes then : printf '%s\n' "#define HAVE_IDNA_TO_UNICODE_8Z8Z 1" >>confdefs.h fi ac_fn_check_decl "$LINENO" "idna_to_ascii_8z" "ac_cv_have_decl_idna_to_ascii_8z" " #if defined(HAVE_IDN2_H) #include #elif defined(HAVE_IDN_IDN2_H) #include #endif " "$ac_c_undeclared_builtin_options$ac_c_future_darwin_options" "CFLAGS" if test "x$ac_cv_have_decl_idna_to_ascii_8z" = xyes then : printf '%s\n' "#define HAVE_IDNA_TO_ASCII_8Z 1" >>confdefs.h fi ac_fn_check_decl "$LINENO" "idna_to_ascii_lz" "ac_cv_have_decl_idna_to_ascii_lz" " #if defined(HAVE_IDN2_H) #include #elif defined(HAVE_IDN_IDN2_H) #include #endif " "$ac_c_undeclared_builtin_options$ac_c_future_darwin_options" "CFLAGS" if test "x$ac_cv_have_decl_idna_to_ascii_lz" = xyes then : printf '%s\n' "#define HAVE_IDNA_TO_ASCII_LZ 1" >>confdefs.h fi fi LIBS="$mutt_save_LIBS" if test "$have_idn2_h" = "no" || \ test "$ac_cv_search_idn2_check_version" = "no" || \ test "x$ac_cv_have_decl_idna_to_unicode_8z8z" != "xyes" || \ test "x$ac_cv_have_decl_idna_to_ascii_8z" != "xyes" || \ test "x$ac_cv_have_decl_idna_to_ascii_lz" != "xyes" then as_fn_error $? "IDN2 was requested, but libidn2 was not usable on this system" "$LINENO" 5 fi fi fi ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = xyes then : printf '%s\n' "#define HAVE_WCHAR_H 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 printf %s "checking for wchar_t... " >&6; } if test ${mutt_cv_wchar_t+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_WCHAR_H #include #endif int main (void) { wchar_t wc; return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : mutt_cv_wchar_t=yes else case e in #( e) mutt_cv_wchar_t=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_wchar_t" >&5 printf '%s\n' "$mutt_cv_wchar_t" >&6; } if test "$mutt_cv_wchar_t" = no; then printf '%s\n' "#define wchar_t int" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 printf %s "checking for wint_t... " >&6; } if test ${mutt_cv_wint_t+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_WCHAR_H #include #endif int main (void) { wint_t wc; return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : mutt_cv_wint_t=yes else case e in #( e) mutt_cv_wint_t=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_wint_t" >&5 printf '%s\n' "$mutt_cv_wint_t" >&6; } if test "$mutt_cv_wint_t" = no; then printf '%s\n' "#define wint_t int" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" if test "x$ac_cv_header_wctype_h" = xyes then : printf '%s\n' "#define HAVE_WCTYPE_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswalnum" "ac_cv_func_iswalnum" if test "x$ac_cv_func_iswalnum" = xyes then : printf '%s\n' "#define HAVE_ISWALNUM 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswalpha" "ac_cv_func_iswalpha" if test "x$ac_cv_func_iswalpha" = xyes then : printf '%s\n' "#define HAVE_ISWALPHA 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswblank" "ac_cv_func_iswblank" if test "x$ac_cv_func_iswblank" = xyes then : printf '%s\n' "#define HAVE_ISWBLANK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswcntrl" "ac_cv_func_iswcntrl" if test "x$ac_cv_func_iswcntrl" = xyes then : printf '%s\n' "#define HAVE_ISWCNTRL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswdigit" "ac_cv_func_iswdigit" if test "x$ac_cv_func_iswdigit" = xyes then : printf '%s\n' "#define HAVE_ISWDIGIT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswgraph" "ac_cv_func_iswgraph" if test "x$ac_cv_func_iswgraph" = xyes then : printf '%s\n' "#define HAVE_ISWGRAPH 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswlower" "ac_cv_func_iswlower" if test "x$ac_cv_func_iswlower" = xyes then : printf '%s\n' "#define HAVE_ISWLOWER 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswprint" "ac_cv_func_iswprint" if test "x$ac_cv_func_iswprint" = xyes then : printf '%s\n' "#define HAVE_ISWPRINT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswpunct" "ac_cv_func_iswpunct" if test "x$ac_cv_func_iswpunct" = xyes then : printf '%s\n' "#define HAVE_ISWPUNCT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswspace" "ac_cv_func_iswspace" if test "x$ac_cv_func_iswspace" = xyes then : printf '%s\n' "#define HAVE_ISWSPACE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper" if test "x$ac_cv_func_iswupper" = xyes then : printf '%s\n' "#define HAVE_ISWUPPER 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "iswxdigit" "ac_cv_func_iswxdigit" if test "x$ac_cv_func_iswxdigit" = xyes then : printf '%s\n' "#define HAVE_ISWXDIGIT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper" if test "x$ac_cv_func_towupper" = xyes then : printf '%s\n' "#define HAVE_TOWUPPER 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" if test "x$ac_cv_func_towlower" = xyes then : printf '%s\n' "#define HAVE_TOWLOWER 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 printf %s "checking for mbstate_t... " >&6; } if test ${mutt_cv_mbstate_t+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_WCHAR_H #include #endif int main (void) { mbstate_t s; return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : mutt_cv_mbstate_t=yes else case e in #( e) mutt_cv_mbstate_t=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_mbstate_t" >&5 printf '%s\n' "$mutt_cv_mbstate_t" >&6; } if test "$mutt_cv_mbstate_t" = no; then printf '%s\n' "#define mbstate_t int" >>confdefs.h fi wc_funcs=maybe # Check whether --with-wc-funcs was given. if test ${with_wc_funcs+y} then : withval=$with_wc_funcs; wc_funcs=$withval fi if test "$wc_funcs" != yes && test "$wc_funcs" != no; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for wchar_t functions" >&5 printf %s "checking for wchar_t functions... " >&6; } if test ${mutt_cv_wc_funcs+y} then : printf %s "(cached) " >&6 else case e in #( e) mutt_cv_wc_funcs=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 600 #include #include #ifdef HAVE_WCHAR_H #include #endif #ifdef HAVE_WCTYPE_H #include #endif int main (void) { mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0); iswblank(0); iswprint(0); iswspace(0); towlower(0); towupper(0); iswalnum(0) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : mutt_cv_wc_funcs=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_wc_funcs" >&5 printf '%s\n' "$mutt_cv_wc_funcs" >&6; } wc_funcs=$mutt_cv_wc_funcs fi if test $wc_funcs = yes; then printf '%s\n' "#define HAVE_WC_FUNCS 1" >>confdefs.h else MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS utf8.o wcwidth.o" fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 printf %s "checking for nl_langinfo and CODESET... " >&6; } if test ${mutt_cv_langinfo_codeset+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { char* cs = nl_langinfo(CODESET); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : mutt_cv_langinfo_codeset=yes else case e in #( e) mutt_cv_langinfo_codeset=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_langinfo_codeset" >&5 printf '%s\n' "$mutt_cv_langinfo_codeset" >&6; } if test $mutt_cv_langinfo_codeset = yes; then printf '%s\n' "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5 printf %s "checking for nl_langinfo and YESEXPR... " >&6; } if test ${mutt_cv_langinfo_yesexpr+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { char* cs = nl_langinfo(YESEXPR); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : mutt_cv_langinfo_yesexpr=yes else case e in #( e) mutt_cv_langinfo_yesexpr=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $mutt_cv_langinfo_yesexpr" >&5 printf '%s\n' "$mutt_cv_langinfo_yesexpr" >&6; } if test $mutt_cv_langinfo_yesexpr = yes; then printf '%s\n' "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h fi have_openjade="no" # Extract the first word of "ospcat", so it can be a program name with args. set dummy ospcat; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_OSPCAT+y} then : printf %s "(cached) " >&6 else case e in #( e) case $OSPCAT in [\\/]* | ?:[\\/]*) ac_cv_path_OSPCAT="$OSPCAT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_OSPCAT="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_OSPCAT" && ac_cv_path_OSPCAT="none" ;; esac ;; esac fi OSPCAT=$ac_cv_path_OSPCAT if test -n "$OSPCAT"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $OSPCAT" >&5 printf '%s\n' "$OSPCAT" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "$OSPCAT" != "none" then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for openjade docbook stylesheets" >&5 printf %s "checking for openjade docbook stylesheets... " >&6; } dslosfile=`ospcat --public-id="-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN"` DSLROOT=`echo $dslosfile | sed -n -e "s/.*SOIBASE='\([^']*\)\/catalog'.*/\1/p"` # ospcat may spit out an absolute path without an SOIBASE if test -z "$DSLROOT" then DSLROOT=`echo $dslosfile | sed -e 's|\(.*\)/print/docbook.dsl|\1|'` fi if test -f $DSLROOT/print/docbook.dsl then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: in $DSLROOT" >&5 printf '%s\n' "in $DSLROOT" >&6; } have_openjade="yes" else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: not found: PDF documentation will not be built." >&5 printf '%s\n' "not found: PDF documentation will not be built." >&6; } fi fi for ac_prog in docbook2x-texi db2x_docbook2texi docbook2texi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_DB2XTEXI+y} then : printf %s "(cached) " >&6 else case e in #( e) case $DB2XTEXI in [\\/]* | ?:[\\/]*) ac_cv_path_DB2XTEXI="$DB2XTEXI" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_DB2XTEXI="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi DB2XTEXI=$ac_cv_path_DB2XTEXI if test -n "$DB2XTEXI"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $DB2XTEXI" >&5 printf '%s\n' "$DB2XTEXI" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi test -n "$DB2XTEXI" && break done test -n "$DB2XTEXI" || DB2XTEXI="none" if test "$DB2XTEXI" != "none"; then # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MAKEINFO+y} then : printf %s "(cached) " >&6 else case e in #( e) case $MAKEINFO in [\\/]* | ?:[\\/]*) ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_MAKEINFO="$as_dir$ac_word$ac_exec_ext" printf '%s\n' "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="none" ;; esac ;; esac fi MAKEINFO=$ac_cv_path_MAKEINFO if test -n "$MAKEINFO"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 printf '%s\n' "$MAKEINFO" >&6; } else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf '%s\n' "no" >&6; } fi if test "$MAKEINFO" != "none"; then do_build_info=yes fi fi if test x$do_build_info = xyes; then BUILD_INFO_TRUE= BUILD_INFO_FALSE='#' else BUILD_INFO_TRUE='#' BUILD_INFO_FALSE= fi # Check whether --enable-doc was given. if test ${enable_doc+y} then : enableval=$enable_doc; if test x$enableval = xno ; then do_build_doc=no fi fi if test x$do_build_doc != xno; then BUILD_DOC_TRUE= BUILD_DOC_FALSE='#' else BUILD_DOC_TRUE='#' BUILD_DOC_FALSE= fi # Check whether --enable-full_doc was given. if test ${enable_full_doc+y} then : enableval=$enable_full_doc; if test x$enableval = xno ; then full_doc=no fi fi if test x$full_doc != xno ; then printf '%s\n' "#define MAKEDOC_FULL 1" >>confdefs.h fi ac_config_files="$ac_config_files Makefile contrib/Makefile doc/Makefile imap/Makefile m4/Makefile po/Makefile.in autocrypt/Makefile doc/instdoc.sh" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # 'ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF ac_cache_dump | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf '%s\n' "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf '%s\n' "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf '%s\n' "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf '%s\n' "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf '%s\n' "done" >&6; } case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; esac if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then as_fn_error $? "conditional \"GNU_MAKE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi # Check whether --enable-year2038 was given. if test ${enable_year2038+y} then : enableval=$enable_year2038; fi if test -z "${BUILD_AUTOCRYPT_TRUE}" && test -z "${BUILD_AUTOCRYPT_FALSE}"; then as_fn_error $? "conditional \"BUILD_AUTOCRYPT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_COMPRESS_TRUE}" && test -z "${BUILD_COMPRESS_FALSE}"; then as_fn_error $? "conditional \"BUILD_COMPRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_IMAP_TRUE}" && test -z "${BUILD_IMAP_FALSE}"; then as_fn_error $? "conditional \"BUILD_IMAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_GSS_TRUE}" && test -z "${USE_GSS_FALSE}"; then as_fn_error $? "conditional \"USE_GSS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SSL_TRUE}" && test -z "${USE_SSL_FALSE}"; then as_fn_error $? "conditional \"USE_SSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SASL_CYRUS_TRUE}" && test -z "${USE_SASL_CYRUS_FALSE}"; then as_fn_error $? "conditional \"USE_SASL_CYRUS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SASL_GNU_TRUE}" && test -z "${USE_SASL_GNU_FALSE}"; then as_fn_error $? "conditional \"USE_SASL_GNU\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_HCACHE_TRUE}" && test -z "${BUILD_HCACHE_FALSE}"; then as_fn_error $? "conditional \"BUILD_HCACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then as_fn_error $? "conditional \"BUILD_INFO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then as_fn_error $? "conditional \"BUILD_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" case $CONFIG_STATUS in #( -*) : CONFIG_STATUS=./$CONFIG_STATUS ;; #( */*) : ;; #( *) : CONFIG_STATUS=./$CONFIG_STATUS ;; esac ac_write_fail=0 ac_clean_CONFIG_STATUS='"$CONFIG_STATUS"' { printf '%s\n' "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf '%s\n' "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >"$CONFIG_STATUS" <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>"$CONFIG_STATUS" <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # contradicts POSIX and common usage. Disable this. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf '%s\n' "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf '%s\n' "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf '%s\n' X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf '%s\n' "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf '%s\n' X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 ## ------------------------------------- ## ## Main body of "$CONFIG_STATUS" script. ## ## ------------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x "$CONFIG_STATUS" || ac_write_fail=1 cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by mutt $as_me 2.3.2, which was generated by GNU Autoconf 2.73. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ '$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF ac_cs_config=`printf '%s\n' "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf '%s\n' "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ mutt config.status 2.3.2 configured by $0, generated by GNU Autoconf 2.73, with options \\"\$ac_cs_config\\" Copyright (C) 2026 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || { awk '' >"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf '%s\n' "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf '%s\n' "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf '%s\n' "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf '%s\n' "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: '$1' Try '$0 --help' for more information.";; --help | --hel | -h ) printf '%s\n' "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: '$1' Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf '%s\n' "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf '%s\n' "$ac_log" } >&5 _ACEOF cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "imap/Makefile") CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "autocrypt/Makefile") CONFIG_FILES="$CONFIG_FILES autocrypt/Makefile" ;; "doc/instdoc.sh") CONFIG_FILES="$CONFIG_FILES doc/instdoc.sh" ;; *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | sed -n '$='` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | sed -n '$='` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >"$CONFIG_STATUS" || ac_write_fail=1 rm -f conf$$subs.awk cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >"$CONFIG_STATUS" || ac_write_fail=1 cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { suffix = P[macro] D[macro] while (suffix ~ /[\t ]$/) { suffix = substr(suffix, 1, length(suffix) - 1) } # Preserve the white space surrounding the "#". print prefix "define", macro suffix next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf '%s\n' "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf '%s\n' "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf '%s\n' "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf '%s\n' "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf '%s\n' "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf '%s\n' X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf '%s\n' "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf '%s\n' "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf '%s\n' "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf '%s\n' "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf '%s\n' "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf '%s\n' "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf '%s\n' "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf '%s\n' X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { printf '%s\n' "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf '%s\n' "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf '%s\n' "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf '%s\n' X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf '%s\n' X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf '%s\n' "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf '%s\n' "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See 'config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*) useit=yes ;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_CONFIG_STATUS= test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: case $CONFIG_STATUS in #( -*) : ac_no_opts=-- ;; #( *) : ac_no_opts= ;; esac ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $ac_no_opts "$CONFIG_STATUS" $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf '%s\n' "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi mutt-2.3.2/configure.ac0000644000175000017500000015511315173275600013175 0ustar00kjmkjmdnl Process this file with autoconf to produce a configure script. dnl !!! WHEN ADDING NEW CONFIGURE TESTS, PLEASE ADD CODE TO MAIN.C !!! dnl !!! TO DUMP THEIR RESULTS WHEN MUTT -V IS CALLED !!! AC_INIT([mutt],[m4_esyscmd(tr -d \\n /dev/null | grep "GNU Make" 2>&1 > /dev/null ; then mutt_cv_gnu_make_command="yes" fi]) AM_CONDITIONAL(GNU_MAKE, test x$mutt_cv_gnu_make_command = xyes) AC_C_INLINE AC_C_CONST AC_C_BIGENDIAN AC_SYS_LARGEFILE AC_FUNC_FSEEKO AC_CHECK_SIZEOF(off_t) AC_PATH_PROG(DBX, dbx, no) AC_PATH_PROG(GDB, gdb, no) AC_PATH_PROG(SDB, sdb, no) if test $GDB != no ; then DEBUGGER=$GDB elif test $DBX != no ; then DEBUGGER=$DBX elif test $SDB != no ; then DEBUGGER=$SDB else DEBUGGER=no fi AC_SUBST([DEBUGGER]) AH_TEMPLATE([HAVE_START_COLOR], [Define if you have start_color, as a function or macro.]) AH_TEMPLATE([HAVE_TYPEAHEAD], [Define if you have typeahead, as a function or macro.]) AH_TEMPLATE([HAVE_BKGDSET], [Define if you have bkgdset, as a function or macro.]) AH_TEMPLATE([HAVE_CURS_SET], [Define if you have curs_set, as a function or macro.]) AH_TEMPLATE([HAVE_META], [Define if you have meta, as a function or macro.]) AH_TEMPLATE([HAVE_USE_DEFAULT_COLORS], [Define if you have use_default_colors, as a function or macro.]) AH_TEMPLATE([HAVE_RESIZETERM], [Define if you have resizeterm, as a function or macro.]) AH_TEMPLATE([HAVE_SETCCHAR], [Define if you have setcchar, as a function or macro.]) AH_TEMPLATE([HAVE_BKGRNDSET], [Define if you have bkgrndset, as a function or macro.]) AH_TEMPLATE([HAVE_USE_TIOCTL], [Define if you have use_tioctl, as a function or macro.]) AH_TEMPLATE([SIG_ATOMIC_VOLATILE_T], [Some systems declare sig_atomic_t as volatile, some others -- no. This define will have value `sig_atomic_t' or `volatile sig_atomic_t' accordingly.]) AH_TEMPLATE([ICONV_NONTRANS], [Define as 1 if iconv() only converts exactly and we should treat all return values other than (size_t)(-1) as equivalent.]) AH_BOTTOM([/* fseeko portability defines */ #ifdef HAVE_FSEEKO # define LOFF_T off_t # if HAVE_C99_INTTYPES && HAVE_INTTYPES_H # if SIZEOF_OFF_T == 8 # define OFF_T_FMT "%" PRId64 # else # define OFF_T_FMT "%" PRId32 # endif # else # if (SIZEOF_OFF_T == 8) && (SIZEOF_LONG == 4) # define OFF_T_FMT "%lld" # else # define OFF_T_FMT "%ld" # endif # endif #else # define LOFF_T long # define fseeko fseek # define ftello ftell # define OFF_T_FMT "%ld" #endif ]) MUTT_C99_INTTYPES AC_TYPE_LONG_LONG_INT ac_aux_path_sendmail=/usr/sbin:/usr/lib AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, $PATH:$ac_aux_path_sendmail) AC_DEFINE_UNQUOTED(SENDMAIL,"$ac_cv_path_SENDMAIL", [Where to find sendmail on your system.]) OPS='$(srcdir)/OPS' AC_ARG_WITH(sqlite3, AS_HELP_STRING([--with-sqlite3@<:@=PFX@:>@], [Enable sqlite3 support. Required by autocrypt.]), [], [with_sqlite3=no]) if test x$with_sqlite3 != xno; then if test x$with_sqlite3 != xyes; then LDFLAGS="$LDFLAGS -L$with_sqlite3/lib" CPPFLAGS="$CPPFLAGS -I$with_sqlite3/include" fi saved_LIBS="$LIBS" AC_CHECK_LIB(sqlite3, sqlite3_open, [], AC_MSG_ERROR([Unable to find sqlite3 library])) AC_CHECK_FUNC(sqlite3_prepare_v3, [], AC_MSG_ERROR([sqlite3 version 3.20 or greater is required])) LIBS="$saved_LIBS" MUTTLIBS="$MUTTLIBS -lsqlite3" fi AC_ARG_ENABLE(autocrypt, AS_HELP_STRING([--enable-autocrypt],[Enable autocrypt support]), [], [enable_autocrypt=no]) if test x$enable_autocrypt = xyes; then if test x$with_sqlite3 = xno; then AC_MSG_ERROR([autocrypt requires --with-sqlite3]) fi AC_DEFINE(USE_AUTOCRYPT,1,[ Define if you want support for autocrypt. ]) LIBAUTOCRYPT="-Lautocrypt -lautocrypt" LIBAUTOCRYPTDEPS="\$(top_srcdir)/autocrypt/autocrypt.h autocrypt/libautocrypt.a" mutt_enable_gpgme=yes echo "enabling autocrypt..." mutt_gpgme_version="1.8.0" echo "Note: autocrypt requires GPGME version $mutt_gpgme_version or greater" fi AM_CONDITIONAL(BUILD_AUTOCRYPT, test x$enable_autocrypt = xyes) AC_SUBST(LIBAUTOCRYPT) AC_SUBST(LIBAUTOCRYPTDEPS) if test x$mutt_enable_gpgme != xyes; then AC_ARG_ENABLE(gpgme, AS_HELP_STRING([--enable-gpgme],[Enable GPGME support]), [ if test x$enableval = xyes; then mutt_enable_gpgme=yes mutt_gpgme_version="1.4.0" fi ]) fi AC_MSG_CHECKING([whether to build with GPGME support]) if test x"$mutt_enable_gpgme" = xyes; then AC_MSG_RESULT(yes) AM_PATH_GPG_ERROR(1.33) AM_PATH_GPGME([$mutt_gpgme_version], AC_DEFINE(CRYPT_BACKEND_GPGME, 1, [Defined, if GPGME support is enabled]), [gpgme_found=no]) if test x"$gpgme_found" = xno; then AC_MSG_ERROR([*** GPGME not found or version is older than $mutt_gpgme_version ***]) else MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS crypt-gpgme.o crypt-mod-pgp-gpgme.o crypt-mod-smime-gpgme.o" fi else AC_MSG_RESULT([no]) fi AC_ARG_ENABLE(pgp, AS_HELP_STRING([--disable-pgp],[Disable PGP support]), [ if test x$enableval = xno ; then have_pgp=no fi ]) if test x$have_pgp != xno ; then AC_DEFINE(CRYPT_BACKEND_CLASSIC_PGP,1, [Define if you want classic PGP support.]) PGPAUX_TARGET="mutt_pgpring\$(EXEEXT) pgpewrap\$(EXEEXT)" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o" fi AC_ARG_ENABLE(smime, AS_HELP_STRING([--disable-smime],[Disable SMIME support]), [ if test x$enableval = xno ; then have_smime=no fi ]) if test x$have_smime != xno ; then AC_DEFINE(CRYPT_BACKEND_CLASSIC_SMIME, 1, [Define if you want classic S/MIME support.]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smime.o crypt-mod-smime-classic.o" SMIMEAUX_TARGET="smime_keys" fi AC_ARG_ENABLE(sidebar, AS_HELP_STRING([--enable-sidebar], [Enable Sidebar support]), [ if test x$enableval = xyes ; then AC_DEFINE(USE_SIDEBAR, 1, [Define if you want support for the sidebar.]) OPS="$OPS \$(srcdir)/OPS.SIDEBAR" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS sidebar.o" fi ]) AC_ARG_ENABLE(compressed, AS_HELP_STRING([--enable-compressed], [Enable compressed folders support]), enable_compressed=$enableval, enable_compressed=no ) AS_IF([test x$enable_compressed = "xyes"], [ AC_DEFINE(USE_COMPRESSED, 1, [Define to enable compressed folders support.]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS compress.o" ]) AM_CONDITIONAL(BUILD_COMPRESS, test x$enable_compressed = xyes) AC_ARG_WITH(mixmaster, AS_HELP_STRING([--with-mixmaster@<:@=PATH@:>@],[Include Mixmaster support]), [if test "$withval" != no then if test -x "$withval" then MIXMASTER="$withval" else MIXMASTER="mixmaster" fi OPS="$OPS \$(srcdir)/OPS.MIX" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS remailer.o" AC_DEFINE_UNQUOTED(MIXMASTER,"$MIXMASTER", [Where to find mixmaster on your system.]) fi]) # We now require all OPS OPS="$OPS \$(srcdir)/OPS.PGP \$(srcdir)/OPS.SMIME \$(srcdir)/OPS.CRYPT " AC_SUBST([OPS]) AC_SUBST(PGPAUX_TARGET) AC_SUBST(SMIMEAUX_TARGET) AC_PATH_PROG(ISPELL, ispell, no) if test $ISPELL != no; then AC_DEFINE_UNQUOTED(ISPELL,"$ISPELL",[ Where to find ispell on your system. ]) fi AC_ARG_WITH(slang, AS_HELP_STRING([--with-slang@<:@=DIR@:>@],[Use S-Lang instead of ncurses]), [AC_CACHE_CHECK([if this is a BSD system], mutt_cv_bsdish, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include main () { #ifdef BSD exit (0); #else exit (1); #endif }]])],[mutt_cv_bsdish=yes],[mutt_cv_bsdish=no],[mutt_cv_bsdish=no])]) AC_MSG_CHECKING(for S-Lang) if test $withval = yes; then if test -d $srcdir/../slang; then mutt_cv_slang=$srcdir/../slang/src CPPFLAGS="$CPPFLAGS -I${mutt_cv_slang}" LDFLAGS="$LDFLAGS -L${mutt_cv_slang}/objs" else if test -d $mutt_cv_prefix/include/slang; then CPPFLAGS="$CPPFLAGS -I$mutt_cv_prefix/include/slang" elif test -d /usr/include/slang; then CPPFLAGS="$CPPFLAGS -I/usr/include/slang" fi mutt_cv_slang=yes fi else dnl ---Check to see if $withval is a source directory if test -f $withval/src/slang.h; then mutt_cv_slang=$withval/src CPPFLAGS="$CPPFLAGS -I${mutt_cv_slang}" LDFLAGS="$LDFLAGS -L${mutt_cv_slang}/objs" else dnl ---Must be installed somewhere mutt_cv_slang=$withval if test -d $withval/include/slang; then CPPFLAGS="$CPPFLAGS -I${withval}/include/slang" elif test -d $withval/include; then CPPFLAGS="$CPPFLAGS -I${withval}/include" fi LDFLAGS="$LDFLAGS -L${withval}/lib" fi fi AC_MSG_RESULT($mutt_cv_slang) if test $mutt_cv_bsdish = yes; then AC_CHECK_LIB(termlib, main) fi AC_DEFINE(USE_SLANG_CURSES,1, [ Define if you compile with SLang instead of curses/ncurses. ]) AC_DEFINE(HAVE_COLOR,1,[ Define if your curses library supports color. ]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o" dnl --- now that we've found it, check the link AC_CHECK_LIB(slang, SLtt_get_terminfo, [MUTTLIBS="$MUTTLIBS -lslang -lm"], [AC_MSG_ERROR(unable to compile. check config.log)], -lm) ], [mutt_cv_curses=/usr AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses=DIR],[Where ncurses is installed]), [if test x$withval != xyes; then mutt_cv_curses=$withval fi if test x$mutt_cv_curses != x/usr; then LDFLAGS="$LDFLAGS -L${mutt_cv_curses}/lib" CPPFLAGS="$CPPFLAGS -I${mutt_cv_curses}/include" fi]) AC_CHECK_FUNC(initscr,,[ cf_ncurses="ncurses" for lib in ncurses ncursesw do AC_CHECK_LIB($lib, waddnwstr, [cf_ncurses="$lib"; break]) done AC_CHECK_LIB($cf_ncurses, initscr, [MUTTLIBS="$MUTTLIBS -l$cf_ncurses" if test "$cf_ncurses" = ncursesw; then AC_CHECK_LIB(tinfow, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfow"], AC_CHECK_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfo"])) AC_CHECK_HEADERS(ncursesw/ncurses.h,[cf_cv_ncurses_header="ncursesw/ncurses.h"], [AC_CHECK_HEADERS(ncurses.h,[cf_cv_ncurses_header="ncurses.h"])]) else AC_CHECK_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfo"]) AC_CHECK_HEADERS(ncurses/ncurses.h,[cf_cv_ncurses_header="ncurses/ncurses.h"], [AC_CHECK_HEADERS(ncurses.h,[cf_cv_ncurses_header="ncurses.h"])]) fi], [CF_CURSES_LIBS]) ]) AC_CHECK_HEADERS(term.h) old_LIBS="$LIBS" LIBS="$LIBS $MUTTLIBS" CF_CHECK_FUNCDECLS([#include <${cf_cv_ncurses_header-curses.h}>], [start_color typeahead bkgdset curs_set meta use_default_colors resizeterm setcchar bkgrndset use_tioctl]) if test "$ac_cv_func_decl_start_color" = yes; then AC_DEFINE(HAVE_COLOR,1,[ Define if your curses library supports color. ]) fi if test "$ac_cv_func_decl_resizeterm" = yes; then MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o" fi AC_CHECK_FUNCS([use_extended_names]) LIBS="$old_LIBS" ]) AC_CHECK_HEADERS(stdarg.h sys/ioctl.h ioctl.h sysexits.h) AC_CHECK_HEADERS(sys/time.h sys/resource.h) AC_CHECK_HEADERS(unix.h) AC_CHECK_FUNCS(setrlimit getsid) AC_CHECK_FUNCS(fgets_unlocked fgetc_unlocked) AC_MSG_CHECKING(for sig_atomic_t in signal.h) AC_EGREP_HEADER(sig_atomic_t,signal.h, [ ac_cv_type_sig_atomic_t=yes; AC_EGREP_HEADER(volatile.*sig_atomic_t, signal.h, [ is_sig_atomic_t_volatile=yes; AC_MSG_RESULT([yes, volatile]) ], [ is_sig_atomic_t_volatile=no; AC_MSG_RESULT([yes, non volatile]) ]) ], [ AC_MSG_RESULT(no) AC_CHECK_TYPE(sig_atomic_t, [], [AC_DEFINE([sig_atomic_t], [int], [Define to `int' if does not define.])]) is_sig_atomic_t_volatile=no ]) if test $is_sig_atomic_t_volatile = 'yes' then AC_DEFINE(SIG_ATOMIC_VOLATILE_T, sig_atomic_t) else AC_DEFINE(SIG_ATOMIC_VOLATILE_T, [volatile sig_atomic_t]) fi AC_CHECK_DECLS([sys_siglist],[],[],[#include /* NetBSD declares sys_siglist in unistd.h. */ #ifdef HAVE_UNISTD_H # include #endif ]) AC_TYPE_PID_T AC_CHECK_TYPE(ssize_t, [], [AC_DEFINE([ssize_t], [int], [Define to `int' if does not define.])]) AC_CHECK_FUNCS(fgetpos memmove memccpy setegid srand48 strerror) AC_REPLACE_FUNCS([setenv strcasecmp strdup strsep strtok_r wcscasecmp]) AC_REPLACE_FUNCS([strcasestr mkdtemp]) AC_CHECK_FUNC(getopt) if test $ac_cv_func_getopt = yes; then AC_CHECK_HEADERS(getopt.h) fi dnl SCO uses chsize() instead of ftruncate() AC_CHECK_FUNCS(ftruncate, , [AC_CHECK_LIB(x, chsize)]) dnl SCO has strftime() in libintl AC_CHECK_FUNCS(strftime, , [AC_CHECK_LIB(intl, strftime)]) dnl Set the atime of files AC_CHECK_FUNCS(futimens) dnl Check for struct timespec AC_CHECK_TYPES([struct timespec],,,[[#include ]]) dnl Check for stat nanosecond resolutions AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec, struct stat.st_mtim.tv_nsec, struct stat.st_ctim.tv_nsec],,,[[#include ]]) dnl Check for utimesnsat AC_CHECK_FUNCS(utimensat) dnl Check for clock_gettime AC_CHECK_FUNCS(clock_gettime) dnl AIX may not have fchdir() AC_CHECK_FUNCS(fchdir, , [mutt_cv_fchdir=no]) AC_ARG_WITH(bundled-regex, AS_HELP_STRING([--with-bundled-regex],[Use the bundled GNU regex library]), [mutt_cv_regex=yes], [AC_CHECK_FUNCS(regcomp, mutt_cv_regex=no, mutt_cv_regex=yes)]) if test $mutt_cv_regex = no ; then AC_CACHE_CHECK([whether your system's regexp library is completely broken], [mutt_cv_regex_broken], AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include int main() { regex_t blah; regmatch_t p; p.rm_eo = p.rm_eo; if (regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec(&blah, "foobar", 0, NULL, 0)) return(1); regfree(&blah); return(0); }]])], [mutt_cv_regex_broken=no], [mutt_cv_regex_broken=yes], [mutt_cv_regex_broken=yes])) if test $mutt_cv_regex_broken = yes ; then echo "Using the included GNU regex instead." >&AS_MESSAGE_FD mutt_cv_regex=yes fi fi if test $mutt_cv_regex = yes; then AC_DEFINE(USE_GNU_REGEX,1,[ Define if you want to use the included regex.c. ]) AC_LIBOBJ(regex) fi AC_ARG_WITH(homespool, AS_HELP_STRING([--with-homespool@<:@=FILE@:>@],[File in user's directory where new mail is spooled]), with_homespool=${withval}) if test x$with_homespool != x; then if test $with_homespool = yes; then with_homespool=mailbox fi AC_DEFINE_UNQUOTED(MAILPATH,"$with_homespool",[ Where new mail is spooled. ]) AC_DEFINE(HOMESPOOL,1, [Is mail spooled to the user's home directory? If defined, MAILPATH should be set to the filename of the spool mailbox relative the the home directory. use: configure --with-homespool=FILE]) AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ]) mutt_cv_setgid=no else AC_ARG_WITH(mailpath, AS_HELP_STRING([--with-mailpath=DIR],[Directory where spool mailboxes are located]), [mutt_cv_mailpath=$withval], [ AC_CACHE_CHECK(where new mail is stored, mutt_cv_mailpath, [mutt_cv_mailpath=no if test -d /var/mail; then mutt_cv_mailpath=/var/mail elif test -d /var/spool/mail; then mutt_cv_mailpath=/var/spool/mail elif test -d /usr/spool/mail; then mutt_cv_mailpath=/usr/spool/mail elif test -d /usr/mail; then mutt_cv_mailpath=/usr/mail fi]) ]) if test "$mutt_cv_mailpath" = no; then AC_MSG_ERROR("Could not determine where new mail is stored.") fi AC_DEFINE_UNQUOTED(MAILPATH,"$mutt_cv_mailpath",[ Where new mail is spooled. ]) AC_CACHE_CHECK(if $mutt_cv_mailpath is world writable, mutt_cv_worldwrite, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include #include int main (int argc, char **argv) { struct stat s; if (stat ("$mutt_cv_mailpath", &s)) exit (1); if (s.st_mode & S_IWOTH) exit (0); exit (1); }]])],[mutt_cv_worldwrite=yes],[mutt_cv_worldwrite=no],[mutt_cv_worldwrite=no])]) mutt_cv_setgid=no if test $mutt_cv_worldwrite = yes; then AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ]) else AC_CACHE_CHECK(if $mutt_cv_mailpath is group writable, mutt_cv_groupwrite, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include #include int main (int argc, char **argv) { struct stat s; if (stat ("$mutt_cv_mailpath", &s)) exit (1); if (s.st_mode & S_IWGRP) exit (0); exit (1); }]])],[mutt_cv_groupwrite=yes],[mutt_cv_groupwrite=no],[mutt_cv_groupwrite=no])]) if test $mutt_cv_groupwrite = yes; then AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ]) AC_DEFINE(USE_SETGID,1,[ Define if mutt should run setgid "mail". ]) mutt_cv_setgid=yes fi fi fi AC_ARG_ENABLE(external_dotlock, AS_HELP_STRING([--enable-external-dotlock],[Force use of an external dotlock program]), [mutt_cv_external_dotlock="$enableval"]) if test "x$mutt_cv_setgid" = "xyes" || test "x$mutt_cv_fchdir" = "xno" \ || test "x$mutt_cv_external_dotlock" = "xyes" then AC_DEFINE(DL_STANDALONE,1,[ Define if you want to use an external dotlocking program. ]) DOTLOCK_TARGET="mutt_dotlock\$(EXEEXT)" else MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS dotlock.o" fi AC_SUBST(DOTLOCK_TARGET) dnl autoconf <2.60 compatibility if test -z "$datarootdir"; then datarootdir='${prefix}/share' fi AC_SUBST([datarootdir]) AC_MSG_CHECKING(where to put the documentation) AC_ARG_WITH(docdir, AS_HELP_STRING([--with-docdir=PATH],[Specify where to put the documentation]), [mutt_cv_docdir=$withval], [mutt_cv_docdir='${datarootdir}/doc/mutt']) AC_MSG_RESULT($mutt_cv_docdir) if test -z "$docdir" -o -n "$with_docdir" then docdir=$mutt_cv_docdir fi AC_SUBST(docdir) if test x$mutt_cv_setgid = xyes; then DOTLOCK_GROUP='mail' DOTLOCK_PERMISSION=2755 else DOTLOCK_GROUP='' DOTLOCK_PERMISSION=755 fi AC_SUBST(DOTLOCK_GROUP) AC_SUBST(DOTLOCK_PERMISSION) AC_ARG_WITH(domain, AS_HELP_STRING([--with-domain=DOMAIN],[Specify your DNS domain name]), [if test $withval != yes; then if test $withval != no; then AC_DEFINE_UNQUOTED(DOMAIN,"$withval",[ Define your domain name. ]) fi fi]) need_socket="no" dnl -- socket dependencies -- dnl getaddrinfo is used by getdomain.c, and requires libnsl and dnl libsocket on some platforms AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) AC_CHECK_FUNCS(getaddrinfo) AC_ARG_ENABLE(pop, AS_HELP_STRING([--enable-pop],[Enable POP3 support]), [ if test x$enableval = xyes ; then AC_DEFINE(USE_POP,1,[ Define if you want support for the POP3 protocol. ]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o pop_lib.o pop_auth.o" need_pop="yes" need_socket="yes" need_md5="yes" fi ]) AC_ARG_ENABLE(imap, AS_HELP_STRING([--enable-imap],[Enable IMAP support]), [ if test x$enableval = xyes ; then AC_DEFINE(USE_IMAP,1,[ Define if you want support for the IMAP protocol. ]) LIBIMAP="-Limap -limap" LIBIMAPDEPS="\$(top_srcdir)/imap/imap.h imap/libimap.a" need_imap="yes" need_socket="yes" need_md5="yes" fi ]) AM_CONDITIONAL(BUILD_IMAP, test x$need_imap = xyes) AC_ARG_ENABLE(smtp, AS_HELP_STRING([--enable-smtp],[include internal SMTP relay support]), [if test $enableval = yes; then AC_DEFINE(USE_SMTP, 1, [Include internal SMTP relay support]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS smtp.o" need_socket="yes" fi]) if test x"$need_imap" = xyes -o x"$need_pop" = xyes ; then MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS bcache.o" fi dnl -- end socket dependencies -- if test "$need_socket" = "yes" then AC_CHECK_HEADERS([sys/select.h]) AC_MSG_CHECKING([for socklen_t]) AC_EGREP_HEADER(socklen_t, sys/socket.h, AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) AC_DEFINE(socklen_t,int, [ Define to 'int' if doesn't have it. ])) AC_DEFINE(USE_SOCKET,1, [ Include code for socket support. Set automatically if you enable POP3 or IMAP ]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS account.o mutt_socket.o mutt_tunnel.o" fi dnl -- imap dependencies -- AC_ARG_WITH(gss, AS_HELP_STRING([--with-gss@<:@=PFX@:>@],[Compile in GSSAPI authentication for IMAP]), gss_prefix="$withval", gss_prefix="no") if test "$gss_prefix" != "no" then if test "$need_imap" = "yes" then MUTT_AM_PATH_GSSAPI(gss_prefix) AC_MSG_CHECKING(GSSAPI implementation) AC_MSG_RESULT($GSSAPI_IMPL) if test "$GSSAPI_IMPL" = "none" then AC_CACHE_SAVE AC_MSG_ERROR([GSSAPI libraries not found]) fi if test "$GSSAPI_IMPL" = "Heimdal" then AC_DEFINE(HAVE_HEIMDAL,1,[ Define if your GSSAPI implementation is Heimdal ]) fi CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS" MUTTLIBS="$MUTTLIBS $GSSAPI_LIBS" AC_DEFINE(USE_GSS,1,[ Define if you have GSSAPI libraries available ]) need_gss="yes" else AC_MSG_WARN([GSS was requested but IMAP is not enabled]) fi fi AM_CONDITIONAL(USE_GSS, test x$need_gss = xyes) # if zlib AC_ARG_WITH(zlib, AS_HELP_STRING([--with-zlib@<:@=PFX@:>@],[Enable DEFLATE support for IMAP using libz]), zlib_prefix="$withval", zlib_prefix="auto") if test "$zlib_prefix" != "no" then if test "$need_imap" = "yes" then have_zlib= if test "$zlib_prefix" != "yes" -a "$zlib_prefix" != "auto" then LDFLAGS="$LDFLAGS -L$zlib_prefix/lib" CPPFLAGS="$CPPFLAGS -I$zlib_prefix/include" fi saved_LIBS="$LIBS" AC_CHECK_HEADERS([zlib.h], [AC_CHECK_LIB([z], [deflate], [have_zlib=yes])]) if test "x$have_zlib" = "x" then if test "x$zlib_prefix" != "xauto" then AC_MSG_ERROR([ZLIB requested, but library or headers not found]) fi else MUTTLIBS="$MUTTLIBS -lz" AC_DEFINE(USE_ZLIB, 1, [Define if you have libz available]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_zstrm.o" fi LIBS="$saved_LIBS" else AC_MSG_WARN([ZLIB was requested but IMAP is not enabled]) fi fi dnl -- end imap dependencies -- AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl@<:@=PFX@:>@],[Enable TLS support using OpenSSL]), [ if test "$with_ssl" != "no" then if test "$need_socket" != "yes"; then AC_MSG_WARN([SSL support is only useful with POP, IMAP or SMTP support]) else if test "$with_ssl" != "yes" then LDFLAGS="$LDFLAGS -L$withval/lib" CPPFLAGS="$CPPFLAGS -I$withval/include" fi saved_LIBS="$LIBS" crypto_libs="" AC_CHECK_LIB(z, deflate, [crypto_libs=-lz]) AC_CHECK_LIB(crypto, X509_STORE_CTX_new, [crypto_libs="-lcrypto $crypto_libs"], AC_MSG_ERROR([Unable to find SSL library]), [$crypto_libs]) AC_CHECK_LIB(ssl, SSL_new,, AC_MSG_ERROR([Unable to find SSL library]), [$crypto_libs]) LIBS="$LIBS $crypto_libs" AC_CHECK_FUNCS(RAND_egd) AC_CHECK_DECLS([SSL_set_mode, SSL_MODE_AUTO_RETRY],, AC_MSG_ERROR([Unable to find decent SSL header]), [[#include ]]) AC_CHECK_DECL([X509_V_FLAG_PARTIAL_CHAIN], AC_DEFINE(HAVE_SSL_PARTIAL_CHAIN,1,[ Define if OpenSSL supports partial chains. ]), , [[#include ]]) AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ]) AC_DEFINE(USE_SSL_OPENSSL,1,[ Define if you want support for SSL via OpenSSL. ]) LIBS="$saved_LIBS" MUTTLIBS="$MUTTLIBS -lssl $crypto_libs" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o" need_ssl=yes fi fi ]) AC_ARG_WITH([gnutls], AS_HELP_STRING([--with-gnutls@<:@=PFX@:>@],[enable TLS support using gnutls]), [gnutls_prefix="$withval"], [gnutls_prefix="no"]) if test "$gnutls_prefix" != "no" && test x"$need_ssl" != xyes then if test "$need_socket" != "yes" then AC_MSG_WARN([SSL support is only useful with POP, IMAP or SMTP support]) else if test "$gnutls_prefix" != "yes" then LDFLAGS="$LDFLAGS -L$gnutls_prefix/lib" CPPFLAGS="$CPPFLAGS -I$gnutls_prefix/include" fi saved_LIBS="$LIBS" AC_CHECK_LIB(gnutls, gnutls_check_version, [dnl GNUTLS found AC_CHECK_DECLS([GNUTLS_VERIFY_DISABLE_TIME_CHECKS], [], [], [[#include ]]) LIBS="$LIBS -lgnutls" AC_CHECK_FUNCS(gnutls_priority_set_direct) AC_CHECK_TYPES([gnutls_certificate_credentials_t, gnutls_certificate_status_t, gnutls_datum_t, gnutls_digest_algorithm_t, gnutls_session_t, gnutls_transport_ptr_t, gnutls_x509_crt_t], [], [], [[#include ]]) LIBS="$saved_LIBS" MUTTLIBS="$MUTTLIBS -lgnutls" AC_DEFINE(USE_SSL, 1, [ Define if you want support for SSL. ]) AC_DEFINE(USE_SSL_GNUTLS, 1, [ Define if you want support for SSL via GNUTLS. ]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl_gnutls.o" need_ssl=yes], [AC_MSG_ERROR([could not find libgnutls])]) fi fi AM_CONDITIONAL(USE_SSL, test x$need_ssl = xyes) AC_ARG_WITH(sasl, AS_HELP_STRING([--with-sasl@<:@=PFX@:>@],[Use SASL network security library]), [ if test "$with_sasl" != "no" then if test "$need_socket" != "yes" then AC_MSG_ERROR([SASL support is only useful with POP or IMAP support]) fi if test "$with_sasl" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_sasl/include" LDFLAGS="$LDFLAGS -L$with_sasl/lib" fi saved_LIBS="$LIBS" LIBS= # OpenSolaris provides a SASL2 interface in libsasl sasl_libs="sasl2 sasl" AC_SEARCH_LIBS(sasl_encode64, [$sasl_libs],, AC_MSG_ERROR([could not find sasl lib]),) MUTTLIBS="$MUTTLIBS $LIBS" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_sasl.o" LIBS="$saved_LIBS" AC_DEFINE(USE_SASL,1, [ Define if want support for SASL. ]) AC_DEFINE(USE_SASL_CYRUS,1, [ Define if want to use the Cyrus SASL library for POP/IMAP authentication. ]) need_sasl=yes need_sasl_cyrus=yes fi ]) AC_ARG_WITH(gsasl, AS_HELP_STRING([--with-gsasl@<:@=PFX@:>@],[Use GNU SASL network security library]), [ if test "$with_gsasl" != "no" then if test "$need_socket" != "yes" then AC_MSG_ERROR([GNU SASL support is only useful with POP or IMAP support]) fi if test x"$need_sasl" = "xyes" then AC_MSG_ERROR([Both --with-gsasl and --with-sasl can not be enabled at the same time]) fi if test "$with_gsasl" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_gsasl/include" LDFLAGS="$LDFLAGS -L$with_gsasl/lib" fi saved_LIBS="$LIBS" LIBS= AC_CHECK_HEADER(gsasl.h, AC_CHECK_LIB(gsasl, gsasl_check_version,, AC_MSG_ERROR([GNU SASL library not found])), AC_MSG_ERROR([GNU SASL headers not found])) MUTTLIBS="$MUTTLIBS -lgsasl" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_sasl_gnu.o" LIBS="$saved_LIBS" AC_DEFINE(USE_SASL,1, [ Define if want support for SASL. ]) AC_DEFINE(USE_SASL_GNU,1, [ Define if want to use the GNU SASL library for POP/IMAP authentication. ]) need_sasl=yes need_sasl_gnu=yes fi ]) AM_CONDITIONAL(USE_SASL_CYRUS, test x$need_sasl_cyrus = xyes) AM_CONDITIONAL(USE_SASL_GNU, test x$need_sasl_gnu = xyes) dnl -- end socket -- AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[Enable debugging support]), [ if test x$enableval = xyes ; then AC_DEFINE(DEBUG,1,[ Define to enable debugging info. ]) fi ]) AC_ARG_ENABLE(flock, AS_HELP_STRING([--enable-flock],[Use flock() to lock files]), [if test $enableval = yes; then AC_DEFINE(USE_FLOCK,1, [ Define to use flock() to lock mailboxes. ]) fi]) mutt_cv_fcntl=yes AC_ARG_ENABLE(fcntl, AS_HELP_STRING([--disable-fcntl],[Do NOT use fcntl() to lock files]), [if test $enableval = no; then mutt_cv_fcntl=no; fi]) if test $mutt_cv_fcntl = yes; then AC_DEFINE(USE_FCNTL,1, [ Define to use fcntl() to lock folders. ]) fi AC_ARG_ENABLE(filemonitor, AS_HELP_STRING([--disable-filemonitor],[Disable file monitoring support (Linux only)]), [ if test x$enableval = xno ; then have_filemonitor=no fi ]) if test x$have_filemonitor != xno ; then AC_CHECK_FUNCS(inotify_init inotify_add_watch inotify_rm_watch, [], [have_filemonitor=no]) if test x$have_filemonitor != xno ; then AC_DEFINE(USE_INOTIFY,1,[ Define if want to use inotify for filesystem monitoring (available in Linux only). ]) AC_CHECK_FUNCS_ONCE(inotify_init1) AC_CHECK_HEADERS(sys/inotify.h) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS monitor.o" fi fi AC_MSG_CHECKING(whether struct dirent defines d_ino) ac_cv_dirent_d_ino=no AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct dirent dp; (void)dp.d_ino]])],[ac_cv_dirent_d_ino=yes],[]) if test x$ac_cv_dirent_d_ino = xyes ; then AC_DEFINE(HAVE_DIRENT_D_INO,1, [Define to 1 if your system has the dirent::d_ino member]) fi AC_MSG_RESULT($ac_cv_dirent_d_ino) mutt_cv_warnings=yes AC_ARG_ENABLE(warnings, AS_HELP_STRING([--disable-warnings],[Turn off compiler warnings (not recommended)]), [if test $enableval = no; then mutt_cv_warnings=no fi]) if test x$GCC = xyes && test $mutt_cv_warnings = yes; then CFLAGS="-Wall -pedantic -Wno-long-long $CFLAGS" fi AC_ARG_ENABLE(nfs-fix, AS_HELP_STRING([--enable-nfs-fix],[Work around an NFS with broken attributes caching]), [if test x$enableval = xyes; then AC_DEFINE(NFS_ATTRIBUTE_HACK,1, [Define if you have problems with mutt not detecting new/old mailboxes over NFS. Some NFS implementations incorrectly cache the attributes of small files.]) fi]) AC_ARG_ENABLE(mailtool, AS_HELP_STRING([--enable-mailtool],[Enable Sun mailtool attachments support]), [if test x$enableval = xyes; then AC_DEFINE(SUN_ATTACHMENT,1,[ Define to enable Sun mailtool attachments support. ]) fi]) AC_ARG_ENABLE(locales-fix, AS_HELP_STRING([--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. ]) fi]) AC_ARG_WITH(exec-shell, AS_HELP_STRING([--with-exec-shell=SHELL],[Specify alternate shell (ONLY if /bin/sh is broken)]), [if test $withval != yes; then AC_DEFINE_UNQUOTED(EXECSHELL, "$withval", [program to use for shell commands]) else AC_DEFINE_UNQUOTED(EXECSHELL, "/bin/sh") fi], [AC_DEFINE_UNQUOTED(EXECSHELL, "/bin/sh")]) AC_ARG_ENABLE(exact-address, AS_HELP_STRING([--enable-exact-address],[Enable regeneration of email addresses]), [if test $enableval = yes; then AC_DEFINE(EXACT_ADDRESS,1, [Enable exact regeneration of email addresses as parsed? NOTE: this requires significant more memory when defined.]) fi]) dnl -- start cache -- db_found=no db_requested=auto AC_ARG_ENABLE(hcache, AS_HELP_STRING([--enable-hcache],[Enable header caching])) AC_ARG_WITH(kyotocabinet, AS_HELP_STRING([--with-kyotocabinet@<:@=DIR@:>@],[Use kyotocabinet hcache backend])) AC_ARG_WITH(tokyocabinet, AS_HELP_STRING([--with-tokyocabinet@<:@=DIR@:>@],[Use tokyocabinet hcache backend])) AC_ARG_WITH(lmdb, AS_HELP_STRING([--with-lmdb@<:@=DIR@:>@],[Use lmdb hcache backend])) AC_ARG_WITH(qdbm, AS_HELP_STRING([--with-qdbm@<:@=DIR@:>@],[Use qdbm hcache backend])) AC_ARG_WITH(gdbm, AS_HELP_STRING([--with-gdbm@<:@=DIR@:>@],[Use gdbm hcache backend])) AC_ARG_WITH(bdb, AS_HELP_STRING([--with-bdb@<:@=DIR@:>@],[Use bdb hcache backend])) if test x$enable_hcache = xyes then AC_DEFINE(USE_HCACHE, 1, [Enable header caching]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache.o" OLDCPPFLAGS="$CPPFLAGS" OLDLDFLAGS="$LDFLAGS" OLDLIBS="$LIBS" need_md5="yes" if test -n "$with_kyotocabinet" && test "$with_kyotocabinet" != "no" then if test "$db_requested" != "auto" then AC_MSG_ERROR([more than one header cache engine requested.]) else db_requested=kc fi fi if test -n "$with_tokyocabinet" && test "$with_tokyocabinet" != "no" then if test "$db_requested" != "auto" then AC_MSG_ERROR([more than one header cache engine requested.]) else db_requested=tc fi fi if test -n "$with_lmdb" && test "$with_lmdb" != "no" then if test "$db_requested" != "auto" then AC_MSG_ERROR([more than one header cache engine requested.]) else db_requested=lmdb fi fi if test -n "$with_qdbm" && test "$with_qdbm" != "no" then if test "$db_requested" != "auto" then AC_MSG_ERROR([more than one header cache engine requested.]) else db_requested=qdbm fi fi if test -n "$with_gdbm" && test "$with_gdbm" != "no" then if test "$db_requested" != "auto" then AC_MSG_ERROR([more than one header cache engine requested.]) else db_requested=gdbm fi fi if test -n "$with_bdb" && test "$with_bdb" != "no" then if test "$db_requested" != "auto" then AC_MSG_ERROR([more than one header cache engine requested.]) else db_requested=bdb fi fi dnl -- Kyoto Cabinet -- if test x$with_kyotocabinet != xno && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = kc then if test -n "$with_kyotocabinet" && test "$with_kyotocabinet" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_kyotocabinet/include" LDFLAGS="$LDFLAGS -L$with_kyotocabinet/lib" fi AC_CHECK_HEADER(kclangc.h, AC_CHECK_LIB(kyotocabinet, kcdbopen, [MUTTLIBS="$MUTTLIBS -lkyotocabinet" AC_DEFINE(HAVE_KC, 1, [Kyoto Cabinet Support]) db_found=kc], [CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS"])) if test "$db_requested" != auto && test "$db_found" != "$db_requested" then AC_MSG_ERROR([Kyoto Cabinet could not be used. Check config.log for details.]) fi fi dnl -- Tokyo Cabinet -- if test "x$with_tokyocabinet" != "xno" && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = tc then if test -n "$with_tokyocabinet" && test "$with_tokyocabinet" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_tokyocabinet/include" LDFLAGS="$LDFLAGS -L$with_tokyocabinet/lib" fi AC_CHECK_HEADER(tcbdb.h, AC_CHECK_LIB(tokyocabinet, tcbdbopen, [MUTTLIBS="$MUTTLIBS -ltokyocabinet" AC_DEFINE(HAVE_TC, 1, [Tokyo Cabinet Support]) db_found=tc], [CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS"])) if test "$db_requested" != auto && test "$db_found" != "$db_requested" then AC_MSG_ERROR([Tokyo Cabinet could not be used. Check config.log for details.]) fi fi dnl -- LMDB -- if test x$with_lmdb != xno && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = lmdb then if test -n "$with_lmdb" && test "$with_lmdb" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_lmdb/include" LDFLAGS="$LDFLAGS -L$with_lmdb/lib" fi saved_LIBS="$LIBS" LIBS="$LIBS -llmdb" AC_CACHE_CHECK(for mdb_env_create, ac_cv_mdbenvcreate,[ ac_cv_mdbenvcreate=no AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[mdb_env_create(0);]])],[ac_cv_mdbenvcreate=yes],[]) ]) LIBS="$saved_LIBS" if test "$ac_cv_mdbenvcreate" = yes then AC_DEFINE(HAVE_LMDB, 1, [LMDB Support]) MUTTLIBS="$MUTTLIBS -llmdb" db_found=lmdb fi if test "$db_requested" != auto && test "$db_found" != "$db_requested" then AC_MSG_ERROR([LMDB could not be used. Check config.log for details.]) fi fi dnl -- QDBM -- if test "$with_qdbm" != "no" && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = qdbm then if test -n "$with_qdbm" && test "$with_qdbm" != "yes" then if test -d $with_qdbm/include/qdbm; then CPPFLAGS="$CPPFLAGS -I$with_qdbm/include/qdbm" else CPPFLAGS="$CPPFLAGS -I$with_qdbm/include" fi LDFLAGS="$LDFLAGS -L$with_qdbm/lib" else if test -d /usr/include/qdbm; then CPPFLAGS="$CPPFLAGS -I/usr/include/qdbm" fi fi saved_LIBS="$LIBS" AC_CHECK_HEADERS(villa.h) AC_CHECK_LIB(qdbm, vlopen, [MUTTLIBS="$MUTTLIBS -lqdbm" AC_DEFINE(HAVE_QDBM, 1, [QDBM Support]) db_found=qdbm], [CPPFLAGS="$OLDCPPFLAGS" LDFLAGS="$OLDLDFLAGS"]) LIBS="$saved_LIBS" if test "$db_requested" != auto && test "$db_found" != "$db_requested" then AC_MSG_ERROR([QDBM could not be used. Check config.log for details.]) fi fi dnl -- GDBM -- if test x$with_gdbm != xno && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = gdbm then if test -n "$with_gdbm" && test "$with_gdbm" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_gdbm/include" LDFLAGS="$LDFLAGS -L$with_gdbm/lib" fi saved_LIBS="$LIBS" LIBS="$LIBS -lgdbm" AC_CACHE_CHECK(for gdbm_open, ac_cv_gdbmopen,[ ac_cv_gdbmopen=no AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[gdbm_open(0,0,0,0,0);]])],[ac_cv_gdbmopen=yes],[]) ]) LIBS="$saved_LIBS" if test "$ac_cv_gdbmopen" = yes then AC_DEFINE(HAVE_GDBM, 1, [GDBM Support]) MUTTLIBS="$MUTTLIBS -lgdbm" db_found=gdbm fi if test "$db_requested" != auto && test "$db_found" != "$db_requested" then AC_MSG_ERROR([GDBM could not be used. Check config.log for details.]) fi fi dnl -- BDB -- if test x$with_bdb != xno && test $db_found = no \ && test "$db_requested" = auto -o "$db_requested" = bdb then if test -n "$with_bdb" && test "$with_bdb" != "yes" then CPPFLAGS="$CPPFLAGS -I$with_bdb/include" LDFLAGS="$LDFLAGS -L$with_bdb/lib" fi saved_LIBS="$LIBS" LIBS="$LIBS -ldb" AC_CACHE_CHECK([for BDB > 4.0], ac_cv_dbcreate, [ ac_cv_dbcreate=no AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include ]], [[ DB *db = NULL; db->open(db,NULL,NULL,NULL,0,0,0); ]])],[ac_cv_dbcreate=yes],[]) ]) LIBS="$saved_LIBS" if test "x$ac_cv_dbcreate" = "xyes" then AC_DEFINE(HAVE_DB4, 1, [Berkeley DB4 Support]) MUTTLIBS="$MUTTLIBS -ldb" db_found=bdb fi if test "$db_requested" != auto && test "$db_found" != "$db_requested" then AC_MSG_ERROR([BDB could not be used. Check config.log for details.]) fi fi if test $db_found = no then AC_MSG_ERROR([You need Kyoto Cabinet, Tokyo Cabinet, LMDB, QDBM, GDBM, or BDB for hcache]) fi fi dnl -- end cache -- AM_CONDITIONAL(BUILD_HCACHE, test x$db_found != xno) if test "$need_md5" = "yes" then MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS md5.o" fi AC_SUBST(MUTTLIBS) AC_SUBST(MUTT_LIB_OBJECTS) AC_SUBST(LIBIMAP) AC_SUBST(LIBIMAPDEPS) dnl -- iconv/gettext -- AC_ARG_ENABLE(iconv, AS_HELP_STRING([--disable-iconv],[Disable iconv support]), [if test x$enableval = xno ; then am_cv_func_iconv=no fi ]) AM_GNU_GETTEXT([external]) AM_ICONV if test "$am_func_iconv" != "yes" then AC_MSG_WARN([Configuring without iconv support. See INSTALL for details]) else AC_CHECK_HEADERS(iconv.h, [AC_MSG_CHECKING(whether iconv.h defines iconv_t) AC_EGREP_HEADER([typedef.*iconv_t],iconv.h, [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_ICONV_T_DEF, 1, [Define if defines iconv_t.])], AC_MSG_RESULT(no))]) dnl (1) Some implementations of iconv won't convert from UTF-8 to UTF-8. dnl (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and dnl obl when args 2 and 3 are 0 (fixed in glibc-2.1.3). AC_CACHE_CHECK([whether this iconv is good enough], mutt_cv_iconv_good, mutt_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include int main() { iconv_t cd; changequote(, )dnl char buf[4]; changequote([, ])dnl char *ob; size_t obl; ob = buf, obl = sizeof(buf); return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1) && (iconv(cd, 0, 0, &ob, &obl) || !(ob == buf && obl == sizeof(buf)) || iconv_close(cd))); } ]])],[mutt_cv_iconv_good=yes],[mutt_cv_iconv_good=no],[mutt_cv_iconv_good=yes]) LIBS="$mutt_save_LIBS") if test "$mutt_cv_iconv_good" = no; then AC_MSG_ERROR(Try using libiconv instead) fi dnl This is to detect implementations such as the one in glibc-2.1, dnl which always convert exactly but return the number of characters dnl converted instead of the number converted inexactly. AC_CACHE_CHECK([whether iconv is non-transcribing], mutt_cv_iconv_nontrans, mutt_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include int main() { iconv_t cd; char *ib; char *ob; size_t ibl, obl; char *s = (char *) "\304\211"; changequote(, )dnl char t[3]; changequote([, ])dnl ib = s, ibl = 2, ob = t, obl = 3; return ((cd = iconv_open("UTF-8", "UTF-8")) == (iconv_t)(-1) || iconv(cd, &ib, &ibl, &ob, &obl)); } ]])],[mutt_cv_iconv_nontrans=no],[mutt_cv_iconv_nontrans=yes],[mutt_cv_iconv_nontrans=no]) LIBS="$mutt_save_LIBS") if test "$mutt_cv_iconv_nontrans" = yes; then AC_DEFINE(ICONV_NONTRANS, 1) else AC_DEFINE(ICONV_NONTRANS, 0) fi mutt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$mutt_save_LIBS" fi # libiconv dnl -- IDN depends on iconv dnl mutt_idna.c will perform charset transformations (for smtputf8 dnl support) as long as at least iconv is installed. If there is no dnl iconv, then it doesn't need to be included in the build. if test "$am_func_iconv" = yes; then MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_idna.o" fi AC_ARG_WITH(idn, AS_HELP_STRING([--with-idn=@<:@PFX@:>@],[Use GNU libidn for internationalized domain names]), [ if test "$with_idn" != "no" ; then if test "$with_idn" != "yes" ; then CPPFLAGS="$CPPFLAGS -I$with_idn/include" LDFLAGS="$LDFLAGS -L$with_idn/lib" fi fi ], [with_idn=auto]) AC_ARG_WITH(idn2, AS_HELP_STRING([--with-idn2=@<:@PFX@:>@],[Use GNU libidn2 for internationalized domain names]), [ if test "$with_idn2" != "no" ; then if test "$with_idn" = "auto"; then with_idn="no" fi if test "$with_idn" != "no"; then AC_MSG_ERROR([Cannot enable IDN and IDN2 support at the same time]) fi if test "$with_idn2" != "yes" ; then CPPFLAGS="$CPPFLAGS -I$with_idn2/include" LDFLAGS="$LDFLAGS -L$with_idn2/lib" fi fi ], [with_idn2=no]) if test "x$with_idn" != "xno"; then if test "$am_func_iconv" != "yes"; then if test "$with_idn" != "auto"; then AC_MSG_ERROR([IDN requested but iconv is disabled or unavailable]) fi else dnl Solaris 11 has /usr/include/idn have_stringprep_h=no AC_CHECK_HEADERS([stringprep.h idn/stringprep.h], [ have_stringprep_h=yes break]) have_idna_h=no AC_CHECK_HEADERS([idna.h idn/idna.h], [ have_idna_h=yes break]) mutt_save_LIBS="$LIBS" LIBS= AC_SEARCH_LIBS([stringprep_check_version], [idn], [ AC_DEFINE([HAVE_LIBIDN], 1, [Define to 1 if you have the GNU idn library]) MUTTLIBS="$MUTTLIBS $LIBS" LIBS="$LIBS $LIBICONV" AC_CHECK_FUNCS(idna_to_unicode_utf8_from_utf8 idna_to_unicode_8z8z) AC_CHECK_FUNCS(idna_to_ascii_from_utf8 idna_to_ascii_8z) AC_CHECK_FUNCS(idna_to_ascii_lz idna_to_ascii_from_locale) ]) LIBS="$mutt_save_LIBS" if test "$with_idn" != auto; then if test $have_stringprep_h = no || test $have_idna_h = no || test $ac_cv_search_stringprep_check_version = no; then AC_MSG_ERROR([IDN was requested, but libidn was not usable on this system]) fi fi fi fi dnl idna2 if test "x$with_idn2" != "xno"; then if test "$am_func_iconv" != "yes"; then AC_MSG_ERROR([IDN2 requested but iconv is disabled or unavailable]) else dnl Solaris 11 has /usr/include/idn have_idn2_h=no AC_CHECK_HEADERS([idn2.h idn/idn2.h], [ have_idn2_h=yes break]) mutt_save_LIBS="$LIBS" LIBS= AC_SEARCH_LIBS([idn2_check_version], [idn2], [ AC_DEFINE([HAVE_LIBIDN2], 1, [Define to 1 if you have the GNU idn2 library]) MUTTLIBS="$MUTTLIBS $LIBS" dnl -lunistring is needed for static linking, and has to come dnl after the -lidn2 AC_SEARCH_LIBS([u8_strconv_from_locale], [unistring], [ if test "$ac_cv_search_u8_strconv_from_locale" != "none required"; then MUTTLIBS="$MUTTLIBS -lunistring" fi ]) dnl libidn2 >= 2.0.0 declares compatibility macros in idn2.h LIBS="$LIBS $LIBICONV" AC_CHECK_DECL([idna_to_unicode_8z8z], [AC_DEFINE([HAVE_IDNA_TO_UNICODE_8Z8Z])], [], [[ #if defined(HAVE_IDN2_H) #include #elif defined(HAVE_IDN_IDN2_H) #include #endif ]]) AC_CHECK_DECL([idna_to_ascii_8z], [AC_DEFINE([HAVE_IDNA_TO_ASCII_8Z])], [], [[ #if defined(HAVE_IDN2_H) #include #elif defined(HAVE_IDN_IDN2_H) #include #endif ]]) AC_CHECK_DECL([idna_to_ascii_lz], [AC_DEFINE([HAVE_IDNA_TO_ASCII_LZ])], [], [[ #if defined(HAVE_IDN2_H) #include #elif defined(HAVE_IDN_IDN2_H) #include #endif ]]) ]) LIBS="$mutt_save_LIBS" if test "$have_idn2_h" = "no" || \ test "$ac_cv_search_idn2_check_version" = "no" || \ test "x$ac_cv_have_decl_idna_to_unicode_8z8z" != "xyes" || \ test "x$ac_cv_have_decl_idna_to_ascii_8z" != "xyes" || \ test "x$ac_cv_have_decl_idna_to_ascii_lz" != "xyes" then AC_MSG_ERROR([IDN2 was requested, but libidn2 was not usable on this system]) fi fi fi dnl -- locales -- AC_CHECK_HEADERS(wchar.h) AC_CACHE_CHECK([for wchar_t], mutt_cv_wchar_t, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include #ifdef HAVE_WCHAR_H #include #endif ]], [[ wchar_t wc; return 0; ]])],[mutt_cv_wchar_t=yes],[mutt_cv_wchar_t=no])) if test "$mutt_cv_wchar_t" = no; then AC_DEFINE(wchar_t,int,[ Define to 'int' if system headers don't define. ]) fi AC_CACHE_CHECK([for wint_t], mutt_cv_wint_t, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include #ifdef HAVE_WCHAR_H #include #endif ]], [[ wint_t wc; return 0; ]])],[mutt_cv_wint_t=yes],[mutt_cv_wint_t=no])) if test "$mutt_cv_wint_t" = no; then AC_DEFINE(wint_t,int,[ Define to 'int' if system headers don't define. ]) fi AC_CHECK_HEADERS(wctype.h) AC_CHECK_FUNCS(iswalnum iswalpha iswblank iswcntrl iswdigit) AC_CHECK_FUNCS(iswgraph iswlower iswprint iswpunct iswspace iswupper) AC_CHECK_FUNCS(iswxdigit towupper towlower) AC_CACHE_CHECK([for mbstate_t], mutt_cv_mbstate_t, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include #ifdef HAVE_WCHAR_H #include #endif ]], [[ mbstate_t s; return 0; ]])],[mutt_cv_mbstate_t=yes],[mutt_cv_mbstate_t=no])) if test "$mutt_cv_mbstate_t" = no; then AC_DEFINE(mbstate_t,int,[ Define to 'int' if system headers don't define. ]) fi wc_funcs=maybe AC_ARG_WITH(wc-funcs, AS_HELP_STRING([--without-wc-funcs],[Do not use the system's wchar_t functions]), wc_funcs=$withval) if test "$wc_funcs" != yes && test "$wc_funcs" != no; then AC_CACHE_CHECK([for wchar_t functions], mutt_cv_wc_funcs, mutt_cv_wc_funcs=no AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #define _XOPEN_SOURCE 600 #include #include #ifdef HAVE_WCHAR_H #include #endif #ifdef HAVE_WCTYPE_H #include #endif]], [[mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0); iswblank(0); iswprint(0); iswspace(0); towlower(0); towupper(0); iswalnum(0)]])],[mutt_cv_wc_funcs=yes],[])) wc_funcs=$mutt_cv_wc_funcs fi if test $wc_funcs = yes; then AC_DEFINE(HAVE_WC_FUNCS,1,[ Define if you are using the system's wchar_t functions. ]) else MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS utf8.o wcwidth.o" fi AC_CACHE_CHECK([for nl_langinfo and CODESET], mutt_cv_langinfo_codeset, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char* cs = nl_langinfo(CODESET);]])],[mutt_cv_langinfo_codeset=yes],[mutt_cv_langinfo_codeset=no])]) if test $mutt_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET,1,[ Define if you have and nl_langinfo(CODESET). ]) fi AC_CACHE_CHECK([for nl_langinfo and YESEXPR], mutt_cv_langinfo_yesexpr, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char* cs = nl_langinfo(YESEXPR);]])],[mutt_cv_langinfo_yesexpr=yes],[mutt_cv_langinfo_yesexpr=no])]) if test $mutt_cv_langinfo_yesexpr = yes; then AC_DEFINE(HAVE_LANGINFO_YESEXPR,1,[ Define if you have and nl_langinfo(YESEXPR). ]) fi dnl Documentation tools have_openjade="no" AC_PATH_PROG([OSPCAT], [ospcat], [none]) if test "$OSPCAT" != "none" then AC_MSG_CHECKING([for openjade docbook stylesheets]) dslosfile=`ospcat --public-id="-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN"` DSLROOT=`echo $dslosfile | sed -n -e "s/.*SOIBASE='\(@<:@^'@:>@*\)\/catalog'.*/\1/p"` # ospcat may spit out an absolute path without an SOIBASE if test -z "$DSLROOT" then DSLROOT=`echo $dslosfile | sed -e 's|\(.*\)/print/docbook.dsl|\1|'` fi if test -f $DSLROOT/print/docbook.dsl then AC_MSG_RESULT([in $DSLROOT]) have_openjade="yes" else AC_MSG_RESULT([not found: PDF documentation will not be built.]) fi fi AC_SUBST(DSLROOT) AC_PATH_PROGS([DB2XTEXI], [docbook2x-texi db2x_docbook2texi docbook2texi], [none]) if test "$DB2XTEXI" != "none"; then AC_PATH_PROG([MAKEINFO], [makeinfo], [none]) if test "$MAKEINFO" != "none"; then do_build_info=yes fi fi AM_CONDITIONAL(BUILD_INFO, test x$do_build_info = xyes) AC_SUBST(DB2XTEXI) AC_SUBST(MAKEINFO) AC_ARG_ENABLE(doc, AS_HELP_STRING([--disable-doc],[Do not build the documentation]), [ if test x$enableval = xno ; then do_build_doc=no fi ]) AM_CONDITIONAL(BUILD_DOC, test x$do_build_doc != xno) AC_ARG_ENABLE(full_doc, AS_HELP_STRING([--disable-full-doc],[Omit disabled variables]), [ if test x$enableval = xno ; then full_doc=no fi ]) if test x$full_doc != xno ; then AC_DEFINE(MAKEDOC_FULL,1, [Define if you want complete documentation.]) fi AC_CONFIG_FILES(Makefile contrib/Makefile doc/Makefile imap/Makefile m4/Makefile po/Makefile.in autocrypt/Makefile doc/instdoc.sh) AC_OUTPUT mutt-2.3.2/aclocal.m40000644000175000017500000014102015173276604012544 0ustar00kjmkjm# generated automatically by aclocal 1.18.1 -*- Autoconf -*- # Copyright (C) 1996-2025 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.73],, [m4_warning([this file was generated for autoconf 2.73. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.18' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.18.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.18.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_IF_OPTION([tar-v7], [_AM_PROG_TAR([v7])], [_AM_PROG_TAR([ustar])])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([_AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl AC_REQUIRE([_AM_PROG_RM_F]) AC_REQUIRE([_AM_PROG_XARGS_N]) dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done # aligned with autoconf, so not including core; see bug#72225. rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \ conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \ conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2022-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_RM_F # --------------- # Check whether 'rm -f' without any arguments works. # https://bugs.gnu.org/10828 AC_DEFUN([_AM_PROG_RM_F], [am__rm_f_notfound= AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""']) AC_SUBST(am__rm_f_notfound) ]) # Copyright (C) 2001-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SLEEP_FRACTIONAL_SECONDS # ---------------------------- AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl AC_CACHE_CHECK([whether sleep supports fractional seconds], am_cv_sleep_fractional_seconds, [dnl AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes], [am_cv_sleep_fractional_seconds=no]) ])]) # _AM_FILESYSTEM_TIMESTAMP_RESOLUTION # ----------------------------------- # Determine the filesystem's resolution for file modification # timestamps. The coarsest we know of is FAT, with a resolution # of only two seconds, even with the most recent "exFAT" extensions. # The finest (e.g. ext4 with large inodes, XFS, ZFS) is one # nanosecond, matching clock_gettime. However, it is probably not # possible to delay execution of a shell script for less than one # millisecond, due to process creation overhead and scheduling # granularity, so we don't check for anything finer than that. (See below.) AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS]) AC_CACHE_CHECK([filesystem timestamp resolution], am_cv_filesystem_timestamp_resolution, [dnl # Default to the worst case. am_cv_filesystem_timestamp_resolution=2 # Only try to go finer than 1 sec if sleep can do it. # Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, # - 1 sec is not much of a win compared to 2 sec, and # - it takes 2 seconds to perform the test whether 1 sec works. # # Instead, just use the default 2s on platforms that have 1s resolution, # accept the extra 1s delay when using $sleep in the Automake tests, in # exchange for not incurring the 2s delay for running the test for all # packages. # am_try_resolutions= if test "$am_cv_sleep_fractional_seconds" = yes; then # Even a millisecond often causes a bunch of false positives, # so just try a hundredth of a second. The time saved between .001 and # .01 is not terribly consequential. am_try_resolutions="0.01 0.1 $am_try_resolutions" fi # In order to catch current-generation FAT out, we must *modify* files # that already exist; the *creation* timestamp is finer. Use names # that make ls -t sort them differently when they have equal # timestamps than when they have distinct timestamps, keeping # in mind that ls -t prints the *newest* file first. rm -f conftest.ts? : > conftest.ts1 : > conftest.ts2 : > conftest.ts3 # Make sure ls -t actually works. Do 'set' in a subshell so we don't # clobber the current shell's arguments. (Outer-level square brackets # are removed by m4; they're present so that m4 does not expand # ; be careful, easy to get confused.) if ( set X `[ls -t conftest.ts[12]]` && { test "$[]*" != "X conftest.ts1 conftest.ts2" || test "$[]*" != "X conftest.ts2 conftest.ts1"; } ); then :; else # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". _AS_ECHO_UNQUOTED( ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""], [AS_MESSAGE_LOG_FD]) AC_MSG_FAILURE([ls -t produces unexpected output. Make sure there is not a broken ls alias in your environment.]) fi for am_try_res in $am_try_resolutions; do # Any one fine-grained sleep might happen to cross the boundary # between two values of a coarser actual resolution, but if we do # two fine-grained sleeps in a row, at least one of them will fall # entirely within a coarse interval. echo alpha > conftest.ts1 sleep $am_try_res echo beta > conftest.ts2 sleep $am_try_res echo gamma > conftest.ts3 # We assume that 'ls -t' will make use of high-resolution # timestamps if the operating system supports them at all. if (set X `ls -t conftest.ts?` && test "$[]2" = conftest.ts3 && test "$[]3" = conftest.ts2 && test "$[]4" = conftest.ts1); then # # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, # because we don't need to test make. make_ok=true if test $am_try_res != 1; then # But if we've succeeded so far with a subsecond resolution, we # have one more thing to check: make. It can happen that # everything else supports the subsecond mtimes, but make doesn't; # notably on macOS, which ships make 3.81 from 2006 (the last one # released under GPLv2). https://bugs.gnu.org/68808 # # We test $MAKE if it is defined in the environment, else "make". # It might get overridden later, but our hope is that in practice # it does not matter: it is the system "make" which is (by far) # the most likely to be broken, whereas if the user overrides it, # probably they did so with a better, or at least not worse, make. # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html # # Create a Makefile (real tab character here): rm -f conftest.mk echo 'conftest.ts1: conftest.ts2' >conftest.mk echo ' touch conftest.ts2' >>conftest.mk # # Now, running # touch conftest.ts1; touch conftest.ts2; make # should touch ts1 because ts2 is newer. This could happen by luck, # but most often, it will fail if make's support is insufficient. So # test for several consecutive successes. # # (We reuse conftest.ts[12] because we still want to modify existing # files, not create new ones, per above.) n=0 make=${MAKE-make} until test $n -eq 3; do echo one > conftest.ts1 sleep $am_try_res echo two > conftest.ts2 # ts2 should now be newer than ts1 if $make -f conftest.mk | grep 'up to date' >/dev/null; then make_ok=false break # out of $n loop fi n=`expr $n + 1` done fi # if $make_ok; then # Everything we know to check worked out, so call this resolution good. am_cv_filesystem_timestamp_resolution=$am_try_res break # out of $am_try_res loop fi # Otherwise, we'll go on to check the next resolution. fi done rm -f conftest.ts? # (end _am_filesystem_timestamp_resolution) ])]) # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION]) # This check should not be cached, as it may vary across builds of # different projects. AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_RESULT([no]) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_RESULT([no]) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). am_build_env_is_sane=no am_has_slept=no rm -f conftest.file for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[]*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi test "$[]2" = conftest.file ); then am_build_env_is_sane=yes break fi # Just in case. sleep "$am_cv_filesystem_timestamp_resolution" am_has_slept=yes done AC_MSG_RESULT([$am_build_env_is_sane]) if test "$am_build_env_is_sane" = no; then AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! ]) AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SILENT_RULES # ---------------- # Enable less verbose build rules support. AC_DEFUN([_AM_SILENT_RULES], [AM_DEFAULT_VERBOSITY=1 AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls dnl to AM_SILENT_RULES to change the default value. AC_CONFIG_COMMANDS_PRE([dnl case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; esac if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi ])dnl ]) # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or # empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_REQUIRE([_AM_SILENT_RULES]) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])m4_newline dnl We intentionally force a newline after the assignment, since a) nothing dnl good can come of more text following, and b) that was the behavior dnl before 1.17. See https://bugs.gnu.org/72267. ]) # Copyright (C) 2001-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test x$am_uid = xunknown; then AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work]) elif test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test x$gm_gid = xunknown; then AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work]) elif test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR # Copyright (C) 2022-2025 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_XARGS_N # ---------------- # Check whether 'xargs -n' works. It should work everywhere, so the fallback # is not optimized at all as we never expect to use it. AC_DEFUN([_AM_PROG_XARGS_N], [AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])]) AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }' ])dnl AC_SUBST(am__xargs_n) ]) m4_include([m4/build-to-host.m4]) m4_include([m4/curslib.m4]) m4_include([m4/funcdecl.m4]) m4_include([m4/gettext.m4]) m4_include([m4/gpg-error.m4]) m4_include([m4/gpgme.m4]) m4_include([m4/gssapi.m4]) m4_include([m4/host-cpu-c-abi.m4]) m4_include([m4/iconv.m4]) m4_include([m4/intlmacosx.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) m4_include([m4/types.m4]) mutt-2.3.2/Makefile.in0000644000175000017500000021007215173276605012756 0ustar00kjmkjm# Makefile.in generated by automake 1.18.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2025 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) am__rm_f = rm -f $(am__rm_f_notfound) am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = mutt_dotlock$(EXEEXT) mutt_pgpring$(EXEEXT) \ pgpewrap$(EXEEXT) bin_PROGRAMS = mutt$(EXEEXT) $(DOTLOCK_TARGET) $(PGPAUX_TARGET) noinst_PROGRAMS = txt2c$(EXEEXT) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/build-to-host.m4 \ $(top_srcdir)/m4/curslib.m4 $(top_srcdir)/m4/funcdecl.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gpg-error.m4 \ $(top_srcdir)/m4/gpgme.m4 $(top_srcdir)/m4/gssapi.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/types.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_mutt_OBJECTS = addrbook.$(OBJEXT) alias.$(OBJEXT) attach.$(OBJEXT) \ background.$(OBJEXT) base64.$(OBJEXT) browser.$(OBJEXT) \ buffer.$(OBJEXT) buffy.$(OBJEXT) color.$(OBJEXT) \ crypt.$(OBJEXT) cryptglue.$(OBJEXT) commands.$(OBJEXT) \ complete.$(OBJEXT) compose.$(OBJEXT) copy.$(OBJEXT) \ curs_lib.$(OBJEXT) curs_main.$(OBJEXT) curs_ti_lib.$(OBJEXT) \ date.$(OBJEXT) edit.$(OBJEXT) enter.$(OBJEXT) flags.$(OBJEXT) \ init.$(OBJEXT) filter.$(OBJEXT) from.$(OBJEXT) \ getdomain.$(OBJEXT) group.$(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) rfc3676.$(OBJEXT) \ score.$(OBJEXT) send.$(OBJEXT) sendlib.$(OBJEXT) \ signal.$(OBJEXT) sort.$(OBJEXT) status.$(OBJEXT) \ system.$(OBJEXT) thread.$(OBJEXT) charset.$(OBJEXT) \ history.$(OBJEXT) lib.$(OBJEXT) mutt_lisp.$(OBJEXT) \ muttlib.$(OBJEXT) editmsg.$(OBJEXT) mbyte.$(OBJEXT) \ url.$(OBJEXT) ascii.$(OBJEXT) crypt-mod.$(OBJEXT) \ safe_asprintf.$(OBJEXT) mutt_random.$(OBJEXT) \ listmenu.$(OBJEXT) messageid.$(OBJEXT) am__objects_1 = am__objects_2 = patchlist.$(OBJEXT) conststrings.$(OBJEXT) \ $(am__objects_1) nodist_mutt_OBJECTS = $(am__objects_2) mutt_OBJECTS = $(am_mutt_OBJECTS) $(nodist_mutt_OBJECTS) am__DEPENDENCIES_1 = am_mutt_dotlock_OBJECTS = mutt_dotlock.$(OBJEXT) mutt_dotlock_OBJECTS = $(am_mutt_dotlock_OBJECTS) am_mutt_pgpring_OBJECTS = pgppubring.$(OBJEXT) pgplib.$(OBJEXT) \ lib.$(OBJEXT) extlib.$(OBJEXT) sha1.$(OBJEXT) md5.$(OBJEXT) \ pgppacket.$(OBJEXT) ascii.$(OBJEXT) mutt_pgpring_OBJECTS = $(am_mutt_pgpring_OBJECTS) pgpewrap_SOURCES = pgpewrap.c pgpewrap_OBJECTS = pgpewrap.$(OBJEXT) pgpewrap_LDADD = $(LDADD) pgpewrap_DEPENDENCIES = $(LIBOBJS) $(am__DEPENDENCIES_1) am_txt2c_OBJECTS = txt2c.$(OBJEXT) txt2c_OBJECTS = $(am_txt2c_OBJECTS) txt2c_DEPENDENCIES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = $(DEPDIR)/mkdtemp.Po $(DEPDIR)/regex.Po \ $(DEPDIR)/setenv.Po $(DEPDIR)/strcasecmp.Po \ $(DEPDIR)/strcasestr.Po $(DEPDIR)/strdup.Po \ $(DEPDIR)/strsep.Po $(DEPDIR)/strtok_r.Po \ $(DEPDIR)/wcscasecmp.Po ./$(DEPDIR)/account.Po \ ./$(DEPDIR)/addrbook.Po ./$(DEPDIR)/alias.Po \ ./$(DEPDIR)/ascii.Po ./$(DEPDIR)/attach.Po \ ./$(DEPDIR)/background.Po ./$(DEPDIR)/base64.Po \ ./$(DEPDIR)/bcache.Po ./$(DEPDIR)/browser.Po \ ./$(DEPDIR)/buffer.Po ./$(DEPDIR)/buffy.Po \ ./$(DEPDIR)/charset.Po ./$(DEPDIR)/color.Po \ ./$(DEPDIR)/commands.Po ./$(DEPDIR)/complete.Po \ ./$(DEPDIR)/compose.Po ./$(DEPDIR)/compress.Po \ ./$(DEPDIR)/conststrings.Po ./$(DEPDIR)/copy.Po \ ./$(DEPDIR)/crypt-gpgme.Po \ ./$(DEPDIR)/crypt-mod-pgp-classic.Po \ ./$(DEPDIR)/crypt-mod-pgp-gpgme.Po \ ./$(DEPDIR)/crypt-mod-smime-classic.Po \ ./$(DEPDIR)/crypt-mod-smime-gpgme.Po ./$(DEPDIR)/crypt-mod.Po \ ./$(DEPDIR)/crypt.Po ./$(DEPDIR)/cryptglue.Po \ ./$(DEPDIR)/curs_lib.Po ./$(DEPDIR)/curs_main.Po \ ./$(DEPDIR)/curs_ti_lib.Po ./$(DEPDIR)/date.Po \ ./$(DEPDIR)/dotlock.Po ./$(DEPDIR)/edit.Po \ ./$(DEPDIR)/editmsg.Po ./$(DEPDIR)/enter.Po \ ./$(DEPDIR)/extlib.Po ./$(DEPDIR)/filter.Po \ ./$(DEPDIR)/flags.Po ./$(DEPDIR)/from.Po \ ./$(DEPDIR)/getdomain.Po ./$(DEPDIR)/gnupgparse.Po \ ./$(DEPDIR)/group.Po ./$(DEPDIR)/handler.Po \ ./$(DEPDIR)/hash.Po ./$(DEPDIR)/hcache.Po \ ./$(DEPDIR)/hdrline.Po ./$(DEPDIR)/headers.Po \ ./$(DEPDIR)/help.Po ./$(DEPDIR)/history.Po ./$(DEPDIR)/hook.Po \ ./$(DEPDIR)/init.Po ./$(DEPDIR)/keymap.Po ./$(DEPDIR)/lib.Po \ ./$(DEPDIR)/listmenu.Po ./$(DEPDIR)/main.Po \ ./$(DEPDIR)/mbox.Po ./$(DEPDIR)/mbyte.Po ./$(DEPDIR)/md5.Po \ ./$(DEPDIR)/menu.Po ./$(DEPDIR)/messageid.Po ./$(DEPDIR)/mh.Po \ ./$(DEPDIR)/monitor.Po ./$(DEPDIR)/mutt_dotlock.Po \ ./$(DEPDIR)/mutt_idna.Po ./$(DEPDIR)/mutt_lisp.Po \ ./$(DEPDIR)/mutt_random.Po ./$(DEPDIR)/mutt_sasl.Po \ ./$(DEPDIR)/mutt_sasl_gnu.Po ./$(DEPDIR)/mutt_socket.Po \ ./$(DEPDIR)/mutt_ssl.Po ./$(DEPDIR)/mutt_ssl_gnutls.Po \ ./$(DEPDIR)/mutt_tunnel.Po ./$(DEPDIR)/mutt_zstrm.Po \ ./$(DEPDIR)/muttlib.Po ./$(DEPDIR)/mx.Po ./$(DEPDIR)/pager.Po \ ./$(DEPDIR)/parse.Po ./$(DEPDIR)/patchlist.Po \ ./$(DEPDIR)/pattern.Po ./$(DEPDIR)/pgp.Po \ ./$(DEPDIR)/pgpewrap.Po ./$(DEPDIR)/pgpinvoke.Po \ ./$(DEPDIR)/pgpkey.Po ./$(DEPDIR)/pgplib.Po \ ./$(DEPDIR)/pgpmicalg.Po ./$(DEPDIR)/pgppacket.Po \ ./$(DEPDIR)/pgppubring.Po ./$(DEPDIR)/pop.Po \ ./$(DEPDIR)/pop_auth.Po ./$(DEPDIR)/pop_lib.Po \ ./$(DEPDIR)/postpone.Po ./$(DEPDIR)/query.Po \ ./$(DEPDIR)/recvattach.Po ./$(DEPDIR)/recvcmd.Po \ ./$(DEPDIR)/remailer.Po ./$(DEPDIR)/resize.Po \ ./$(DEPDIR)/rfc1524.Po ./$(DEPDIR)/rfc2047.Po \ ./$(DEPDIR)/rfc2231.Po ./$(DEPDIR)/rfc3676.Po \ ./$(DEPDIR)/rfc822.Po ./$(DEPDIR)/safe_asprintf.Po \ ./$(DEPDIR)/score.Po ./$(DEPDIR)/send.Po \ ./$(DEPDIR)/sendlib.Po ./$(DEPDIR)/sha1.Po \ ./$(DEPDIR)/sidebar.Po ./$(DEPDIR)/signal.Po \ ./$(DEPDIR)/smime.Po ./$(DEPDIR)/smtp.Po ./$(DEPDIR)/sort.Po \ ./$(DEPDIR)/status.Po ./$(DEPDIR)/system.Po \ ./$(DEPDIR)/thread.Po ./$(DEPDIR)/txt2c.Po ./$(DEPDIR)/url.Po \ ./$(DEPDIR)/utf8.Po ./$(DEPDIR)/wcwidth.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mutt_SOURCES) $(EXTRA_mutt_SOURCES) $(nodist_mutt_SOURCES) \ $(mutt_dotlock_SOURCES) $(mutt_pgpring_SOURCES) pgpewrap.c \ $(txt2c_SOURCES) DIST_SOURCES = $(mutt_SOURCES) $(EXTRA_mutt_SOURCES) \ $(mutt_dotlock_SOURCES) $(mutt_pgpring_SOURCES) pgpewrap.c \ $(txt2c_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = m4 po doc contrib imap autocrypt am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/flymake.am ABOUT-NLS ChangeLog INSTALL NEWS \ README TODO compile config.guess config.rpath config.sub \ depcomp install-sh missing mkdtemp.c regex.c setenv.c \ strcasecmp.c strcasestr.c strdup.c strsep.c strtok_r.c \ wcscasecmp.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ ; rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = -9 DIST_TARGETS = dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = \ find . \( -type f -a \! \ \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DB2XTEXI = @DB2XTEXI@ DBX = @DBX@ DEBUGGER = @DEBUGGER@ DEFS = -DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \ -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \ -DHAVE_CONFIG_H=1 DEPDIR = @DEPDIR@ DOTLOCK_GROUP = @DOTLOCK_GROUP@ DOTLOCK_PERMISSION = @DOTLOCK_PERMISSION@ DOTLOCK_TARGET = @DOTLOCK_TARGET@ DSLROOT = @DSLROOT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ GDB = @GDB@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GPGME_CFLAGS = @GPGME_CFLAGS@ GPGME_CONFIG = @GPGME_CONFIG@ GPGME_LIBS = @GPGME_LIBS@ GPGRT_CONFIG = @GPGRT_CONFIG@ GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@ GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@ GPG_ERROR_LIBS = @GPG_ERROR_LIBS@ GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@ GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ ISPELL = @ISPELL@ KRB5CFGPATH = @KRB5CFGPATH@ LDFLAGS = @LDFLAGS@ LIBAUTOCRYPT = @LIBAUTOCRYPT@ LIBAUTOCRYPTDEPS = @LIBAUTOCRYPTDEPS@ LIBICONV = @LIBICONV@ LIBIMAP = @LIBIMAP@ LIBIMAPDEPS = @LIBIMAPDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MUTTLIBS = @MUTTLIBS@ MUTT_LIB_OBJECTS = @MUTT_LIB_OBJECTS@ OBJEXT = @OBJEXT@ OPS = @OPS@ OSPCAT = @OSPCAT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGPAUX_TARGET = @PGPAUX_TARGET@ POSUB = @POSUB@ RANLIB = @RANLIB@ SDB = @SDB@ SED = @SED@ SENDMAIL = @SENDMAIL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SMIMEAUX_TARGET = @SMIMEAUX_TARGET@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localedir_c = @localedir_c@ localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ get_cs_flags = $(foreach target,$(subst .,_,$(subst -,_,$($(2)))),$($(target)_$(1)FLAGS)) get_cs_all_flags = $(foreach type,$(2),$(call get_cs_flags,$(1),$(type))) get_cs_compile = $(if $(subst C,,$(1)),$($(1)COMPILE),$(COMPILE)) get_cs_cmdline = $(call get_cs_compile,$(1)) $(call get_cs_all_flags,$(1),check_PROGRAMS bin_PROGRAMS lib_LTLIBRARIES) -fsyntax-only AUTOMAKE_OPTIONS = 1.6 foreign @BUILD_IMAP_TRUE@IMAP_SUBDIR = imap @BUILD_IMAP_TRUE@IMAP_INCLUDES = -I$(top_srcdir)/imap @BUILD_AUTOCRYPT_TRUE@AUTOCRYPT_SUBDIR = autocrypt @BUILD_AUTOCRYPT_TRUE@AUTOCRYPT_INCLUDES = -I$(top_srcdir)/autocrypt SUBDIRS = m4 po doc contrib $(IMAP_SUBDIR) $(AUTOCRYPT_SUBDIR) bin_SCRIPTS = muttbug flea $(SMIMEAUX_TARGET) @BUILD_HCACHE_TRUE@HCVERSION = hcversion.h BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h conststrings.c version.h $(HCVERSION) mutt_SOURCES = \ addrbook.c alias.c attach.c background.c base64.c browser.c buffer.c \ buffy.c color.c crypt.c cryptglue.c \ commands.c complete.c compose.c copy.c curs_lib.c curs_main.c \ curs_ti_lib.c date.c \ edit.c enter.c flags.c init.c filter.c from.c \ getdomain.c group.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 rfc3676.c \ score.c send.c sendlib.c signal.c sort.c \ status.c system.c thread.c charset.c history.c lib.c \ mutt_lisp.c muttlib.c editmsg.c mbyte.c \ url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c \ mutt_random.c listmenu.c messageid.c nodist_mutt_SOURCES = $(BUILT_SOURCES) mutt_LDADD = $(MUTT_LIB_OBJECTS) $(LIBOBJS) \ $(LIBIMAP) $(LIBAUTOCRYPT) \ $(MUTTLIBS) \ $(LIBINTL) $(LIBICONV) $(GPGME_LIBS) $(GPG_ERROR_LIBS) mutt_DEPENDENCIES = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAPDEPS) \ $(INTLDEPS) $(LIBAUTOCRYPTDEPS) AM_CPPFLAGS = -I. -I$(top_srcdir) $(IMAP_INCLUDES) $(AUTOCRYPT_INCLUDES) $(GPGME_CFLAGS) $(GPG_ERROR_CFLAGS) # This option allows `make distcheck` to run without encountering # setgid errors. AM_DISTCHECK_CONFIGURE_FLAGS = --with-homespool EXTRA_mutt_SOURCES = account.c bcache.c compress.c crypt-gpgme.c crypt-mod-pgp-classic.c \ crypt-mod-pgp-gpgme.c crypt-mod-smime-classic.c \ crypt-mod-smime-gpgme.c dotlock.c gnupgparse.c hcache.c md5.c monitor.c \ mutt_idna.c mutt_sasl.c mutt_sasl_gnu.c mutt_socket.c mutt_ssl.c \ mutt_ssl_gnutls.c \ mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c pgplib.c pgpmicalg.c \ pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c resize.c sha1.c \ sidebar.c smime.c smtp.c utf8.c wcwidth.c mutt_zstrm.c \ bcache.h browser.h hcache.h mbyte.h monitor.h mutt_idna.h remailer.h url.h \ mutt_lisp.h mutt_random.h EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \ configure account.h \ attach.h buffer.h buffy.h charset.h color.h compress.h copy.h crypthash.h \ dotlock.h functions.h gen_defs gettext.h \ 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 \ mutt_regex.h mutt_sasl.h mutt_sasl_gnu.h mutt_socket.h mutt_ssl.h \ mutt_tunnel.h \ mx.h pager.h pgp.h pop.h protos.h rfc1524.h rfc2047.h \ rfc2231.h rfc822.h rfc3676.h sha1.h sort.h mime.types VERSION prepare \ _mutt_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \ mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h \ README.SSL smime.h group.h mutt_zstrm.h send.h background.h \ muttbug pgppacket.h depcomp ascii.h PATCHES patchlist.sh \ ChangeLog mkchangelog.sh mkreldate.sh mutt_idna.h sidebar.h OPS.SIDEBAR \ regex.c crypt-gpgme.h hcachever.pl \ txt2c.c txt2c.sh version.sh check_sec.sh README.PACKAGERS EXTRA_SCRIPTS = smime_keys mutt_dotlock_SOURCES = mutt_dotlock.c mutt_dotlock_LDADD = $(LIBOBJS) mutt_dotlock_DEPENDENCIES = $(LIBOBJS) mutt_pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c mutt_pgpring_LDADD = $(LIBOBJS) $(LIBINTL) mutt_pgpring_DEPENDENCIES = $(LIBOBJS) $(INTLDEPS) txt2c_SOURCES = txt2c.c txt2c_LDADD = CLEANFILES = mutt_dotlock.c $(BUILT_SOURCES) DISTCLEANFILES = flea smime_keys txt2c po/$(PACKAGE).pot ACLOCAL_AMFLAGS = -I m4 LDADD = $(LIBOBJS) $(LIBINTL) all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/flymake.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/flymake.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status $(AM_V_at)rm -f stamp-h1 $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER)) $(AM_V_at)rm -f stamp-h1 $(AM_V_at)touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && $(am__rm_f) $$files clean-binPROGRAMS: -$(am__rm_f) $(bin_PROGRAMS) clean-noinstPROGRAMS: -$(am__rm_f) $(noinst_PROGRAMS) mutt$(EXEEXT): $(mutt_OBJECTS) $(mutt_DEPENDENCIES) $(EXTRA_mutt_DEPENDENCIES) @rm -f mutt$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mutt_OBJECTS) $(mutt_LDADD) $(LIBS) mutt_dotlock$(EXEEXT): $(mutt_dotlock_OBJECTS) $(mutt_dotlock_DEPENDENCIES) $(EXTRA_mutt_dotlock_DEPENDENCIES) @rm -f mutt_dotlock$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mutt_dotlock_OBJECTS) $(mutt_dotlock_LDADD) $(LIBS) mutt_pgpring$(EXEEXT): $(mutt_pgpring_OBJECTS) $(mutt_pgpring_DEPENDENCIES) $(EXTRA_mutt_pgpring_DEPENDENCIES) @rm -f mutt_pgpring$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mutt_pgpring_OBJECTS) $(mutt_pgpring_LDADD) $(LIBS) pgpewrap$(EXEEXT): $(pgpewrap_OBJECTS) $(pgpewrap_DEPENDENCIES) $(EXTRA_pgpewrap_DEPENDENCIES) @rm -f pgpewrap$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pgpewrap_OBJECTS) $(pgpewrap_LDADD) $(LIBS) txt2c$(EXEEXT): $(txt2c_OBJECTS) $(txt2c_DEPENDENCIES) $(EXTRA_txt2c_DEPENDENCIES) @rm -f txt2c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(txt2c_OBJECTS) $(txt2c_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkdtemp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regex.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasestr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strdup.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strsep.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtok_r.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/wcscasecmp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/account.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addrbook.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alias.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/background.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcache.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/browser.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffy.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/charset.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commands.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complete.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compose.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conststrings.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt-gpgme.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt-mod-pgp-classic.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt-mod-pgp-gpgme.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt-mod-smime-classic.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt-mod-smime-gpgme.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt-mod.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cryptglue.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curs_lib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curs_main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curs_ti_lib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/date.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dotlock.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/editmsg.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enter.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flags.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/from.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdomain.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnupgparse.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handler.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hcache.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdrline.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/headers.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hook.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keymap.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listmenu.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbox.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbyte.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messageid.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mh.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_dotlock.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_idna.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_lisp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_random.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_sasl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_sasl_gnu.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_socket.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_ssl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_ssl_gnutls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_tunnel.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutt_zstrm.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/muttlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pager.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patchlist.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pattern.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgpewrap.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgpinvoke.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgpkey.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgplib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgpmicalg.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgppacket.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgppubring.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_auth.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_lib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postpone.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvattach.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvcmd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remailer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resize.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc1524.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc2047.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc2231.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc3676.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc822.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe_asprintf.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/score.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendlib.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sidebar.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smime.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txt2c.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcwidth.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @: >>$@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) $(AM_V_at)$(MKDIR_P) "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-bzip3: distdir tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.bz3*) \ bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -$(am__rm_f) $(CLEANFILES) distclean-generic: -$(am__rm_f) $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) -$(am__rm_f) $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -$(am__rm_f) $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f $(DEPDIR)/mkdtemp.Po -rm -f $(DEPDIR)/regex.Po -rm -f $(DEPDIR)/setenv.Po -rm -f $(DEPDIR)/strcasecmp.Po -rm -f $(DEPDIR)/strcasestr.Po -rm -f $(DEPDIR)/strdup.Po -rm -f $(DEPDIR)/strsep.Po -rm -f $(DEPDIR)/strtok_r.Po -rm -f $(DEPDIR)/wcscasecmp.Po -rm -f ./$(DEPDIR)/account.Po -rm -f ./$(DEPDIR)/addrbook.Po -rm -f ./$(DEPDIR)/alias.Po -rm -f ./$(DEPDIR)/ascii.Po -rm -f ./$(DEPDIR)/attach.Po -rm -f ./$(DEPDIR)/background.Po -rm -f ./$(DEPDIR)/base64.Po -rm -f ./$(DEPDIR)/bcache.Po -rm -f ./$(DEPDIR)/browser.Po -rm -f ./$(DEPDIR)/buffer.Po -rm -f ./$(DEPDIR)/buffy.Po -rm -f ./$(DEPDIR)/charset.Po -rm -f ./$(DEPDIR)/color.Po -rm -f ./$(DEPDIR)/commands.Po -rm -f ./$(DEPDIR)/complete.Po -rm -f ./$(DEPDIR)/compose.Po -rm -f ./$(DEPDIR)/compress.Po -rm -f ./$(DEPDIR)/conststrings.Po -rm -f ./$(DEPDIR)/copy.Po -rm -f ./$(DEPDIR)/crypt-gpgme.Po -rm -f ./$(DEPDIR)/crypt-mod-pgp-classic.Po -rm -f ./$(DEPDIR)/crypt-mod-pgp-gpgme.Po -rm -f ./$(DEPDIR)/crypt-mod-smime-classic.Po -rm -f ./$(DEPDIR)/crypt-mod-smime-gpgme.Po -rm -f ./$(DEPDIR)/crypt-mod.Po -rm -f ./$(DEPDIR)/crypt.Po -rm -f ./$(DEPDIR)/cryptglue.Po -rm -f ./$(DEPDIR)/curs_lib.Po -rm -f ./$(DEPDIR)/curs_main.Po -rm -f ./$(DEPDIR)/curs_ti_lib.Po -rm -f ./$(DEPDIR)/date.Po -rm -f ./$(DEPDIR)/dotlock.Po -rm -f ./$(DEPDIR)/edit.Po -rm -f ./$(DEPDIR)/editmsg.Po -rm -f ./$(DEPDIR)/enter.Po -rm -f ./$(DEPDIR)/extlib.Po -rm -f ./$(DEPDIR)/filter.Po -rm -f ./$(DEPDIR)/flags.Po -rm -f ./$(DEPDIR)/from.Po -rm -f ./$(DEPDIR)/getdomain.Po -rm -f ./$(DEPDIR)/gnupgparse.Po -rm -f ./$(DEPDIR)/group.Po -rm -f ./$(DEPDIR)/handler.Po -rm -f ./$(DEPDIR)/hash.Po -rm -f ./$(DEPDIR)/hcache.Po -rm -f ./$(DEPDIR)/hdrline.Po -rm -f ./$(DEPDIR)/headers.Po -rm -f ./$(DEPDIR)/help.Po -rm -f ./$(DEPDIR)/history.Po -rm -f ./$(DEPDIR)/hook.Po -rm -f ./$(DEPDIR)/init.Po -rm -f ./$(DEPDIR)/keymap.Po -rm -f ./$(DEPDIR)/lib.Po -rm -f ./$(DEPDIR)/listmenu.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/mbox.Po -rm -f ./$(DEPDIR)/mbyte.Po -rm -f ./$(DEPDIR)/md5.Po -rm -f ./$(DEPDIR)/menu.Po -rm -f ./$(DEPDIR)/messageid.Po -rm -f ./$(DEPDIR)/mh.Po -rm -f ./$(DEPDIR)/monitor.Po -rm -f ./$(DEPDIR)/mutt_dotlock.Po -rm -f ./$(DEPDIR)/mutt_idna.Po -rm -f ./$(DEPDIR)/mutt_lisp.Po -rm -f ./$(DEPDIR)/mutt_random.Po -rm -f ./$(DEPDIR)/mutt_sasl.Po -rm -f ./$(DEPDIR)/mutt_sasl_gnu.Po -rm -f ./$(DEPDIR)/mutt_socket.Po -rm -f ./$(DEPDIR)/mutt_ssl.Po -rm -f ./$(DEPDIR)/mutt_ssl_gnutls.Po -rm -f ./$(DEPDIR)/mutt_tunnel.Po -rm -f ./$(DEPDIR)/mutt_zstrm.Po -rm -f ./$(DEPDIR)/muttlib.Po -rm -f ./$(DEPDIR)/mx.Po -rm -f ./$(DEPDIR)/pager.Po -rm -f ./$(DEPDIR)/parse.Po -rm -f ./$(DEPDIR)/patchlist.Po -rm -f ./$(DEPDIR)/pattern.Po -rm -f ./$(DEPDIR)/pgp.Po -rm -f ./$(DEPDIR)/pgpewrap.Po -rm -f ./$(DEPDIR)/pgpinvoke.Po -rm -f ./$(DEPDIR)/pgpkey.Po -rm -f ./$(DEPDIR)/pgplib.Po -rm -f ./$(DEPDIR)/pgpmicalg.Po -rm -f ./$(DEPDIR)/pgppacket.Po -rm -f ./$(DEPDIR)/pgppubring.Po -rm -f ./$(DEPDIR)/pop.Po -rm -f ./$(DEPDIR)/pop_auth.Po -rm -f ./$(DEPDIR)/pop_lib.Po -rm -f ./$(DEPDIR)/postpone.Po -rm -f ./$(DEPDIR)/query.Po -rm -f ./$(DEPDIR)/recvattach.Po -rm -f ./$(DEPDIR)/recvcmd.Po -rm -f ./$(DEPDIR)/remailer.Po -rm -f ./$(DEPDIR)/resize.Po -rm -f ./$(DEPDIR)/rfc1524.Po -rm -f ./$(DEPDIR)/rfc2047.Po -rm -f ./$(DEPDIR)/rfc2231.Po -rm -f ./$(DEPDIR)/rfc3676.Po -rm -f ./$(DEPDIR)/rfc822.Po -rm -f ./$(DEPDIR)/safe_asprintf.Po -rm -f ./$(DEPDIR)/score.Po -rm -f ./$(DEPDIR)/send.Po -rm -f ./$(DEPDIR)/sendlib.Po -rm -f ./$(DEPDIR)/sha1.Po -rm -f ./$(DEPDIR)/sidebar.Po -rm -f ./$(DEPDIR)/signal.Po -rm -f ./$(DEPDIR)/smime.Po -rm -f ./$(DEPDIR)/smtp.Po -rm -f ./$(DEPDIR)/sort.Po -rm -f ./$(DEPDIR)/status.Po -rm -f ./$(DEPDIR)/system.Po -rm -f ./$(DEPDIR)/thread.Po -rm -f ./$(DEPDIR)/txt2c.Po -rm -f ./$(DEPDIR)/url.Po -rm -f ./$(DEPDIR)/utf8.Po -rm -f ./$(DEPDIR)/wcwidth.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f $(DEPDIR)/mkdtemp.Po -rm -f $(DEPDIR)/regex.Po -rm -f $(DEPDIR)/setenv.Po -rm -f $(DEPDIR)/strcasecmp.Po -rm -f $(DEPDIR)/strcasestr.Po -rm -f $(DEPDIR)/strdup.Po -rm -f $(DEPDIR)/strsep.Po -rm -f $(DEPDIR)/strtok_r.Po -rm -f $(DEPDIR)/wcscasecmp.Po -rm -f ./$(DEPDIR)/account.Po -rm -f ./$(DEPDIR)/addrbook.Po -rm -f ./$(DEPDIR)/alias.Po -rm -f ./$(DEPDIR)/ascii.Po -rm -f ./$(DEPDIR)/attach.Po -rm -f ./$(DEPDIR)/background.Po -rm -f ./$(DEPDIR)/base64.Po -rm -f ./$(DEPDIR)/bcache.Po -rm -f ./$(DEPDIR)/browser.Po -rm -f ./$(DEPDIR)/buffer.Po -rm -f ./$(DEPDIR)/buffy.Po -rm -f ./$(DEPDIR)/charset.Po -rm -f ./$(DEPDIR)/color.Po -rm -f ./$(DEPDIR)/commands.Po -rm -f ./$(DEPDIR)/complete.Po -rm -f ./$(DEPDIR)/compose.Po -rm -f ./$(DEPDIR)/compress.Po -rm -f ./$(DEPDIR)/conststrings.Po -rm -f ./$(DEPDIR)/copy.Po -rm -f ./$(DEPDIR)/crypt-gpgme.Po -rm -f ./$(DEPDIR)/crypt-mod-pgp-classic.Po -rm -f ./$(DEPDIR)/crypt-mod-pgp-gpgme.Po -rm -f ./$(DEPDIR)/crypt-mod-smime-classic.Po -rm -f ./$(DEPDIR)/crypt-mod-smime-gpgme.Po -rm -f ./$(DEPDIR)/crypt-mod.Po -rm -f ./$(DEPDIR)/crypt.Po -rm -f ./$(DEPDIR)/cryptglue.Po -rm -f ./$(DEPDIR)/curs_lib.Po -rm -f ./$(DEPDIR)/curs_main.Po -rm -f ./$(DEPDIR)/curs_ti_lib.Po -rm -f ./$(DEPDIR)/date.Po -rm -f ./$(DEPDIR)/dotlock.Po -rm -f ./$(DEPDIR)/edit.Po -rm -f ./$(DEPDIR)/editmsg.Po -rm -f ./$(DEPDIR)/enter.Po -rm -f ./$(DEPDIR)/extlib.Po -rm -f ./$(DEPDIR)/filter.Po -rm -f ./$(DEPDIR)/flags.Po -rm -f ./$(DEPDIR)/from.Po -rm -f ./$(DEPDIR)/getdomain.Po -rm -f ./$(DEPDIR)/gnupgparse.Po -rm -f ./$(DEPDIR)/group.Po -rm -f ./$(DEPDIR)/handler.Po -rm -f ./$(DEPDIR)/hash.Po -rm -f ./$(DEPDIR)/hcache.Po -rm -f ./$(DEPDIR)/hdrline.Po -rm -f ./$(DEPDIR)/headers.Po -rm -f ./$(DEPDIR)/help.Po -rm -f ./$(DEPDIR)/history.Po -rm -f ./$(DEPDIR)/hook.Po -rm -f ./$(DEPDIR)/init.Po -rm -f ./$(DEPDIR)/keymap.Po -rm -f ./$(DEPDIR)/lib.Po -rm -f ./$(DEPDIR)/listmenu.Po -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/mbox.Po -rm -f ./$(DEPDIR)/mbyte.Po -rm -f ./$(DEPDIR)/md5.Po -rm -f ./$(DEPDIR)/menu.Po -rm -f ./$(DEPDIR)/messageid.Po -rm -f ./$(DEPDIR)/mh.Po -rm -f ./$(DEPDIR)/monitor.Po -rm -f ./$(DEPDIR)/mutt_dotlock.Po -rm -f ./$(DEPDIR)/mutt_idna.Po -rm -f ./$(DEPDIR)/mutt_lisp.Po -rm -f ./$(DEPDIR)/mutt_random.Po -rm -f ./$(DEPDIR)/mutt_sasl.Po -rm -f ./$(DEPDIR)/mutt_sasl_gnu.Po -rm -f ./$(DEPDIR)/mutt_socket.Po -rm -f ./$(DEPDIR)/mutt_ssl.Po -rm -f ./$(DEPDIR)/mutt_ssl_gnutls.Po -rm -f ./$(DEPDIR)/mutt_tunnel.Po -rm -f ./$(DEPDIR)/mutt_zstrm.Po -rm -f ./$(DEPDIR)/muttlib.Po -rm -f ./$(DEPDIR)/mx.Po -rm -f ./$(DEPDIR)/pager.Po -rm -f ./$(DEPDIR)/parse.Po -rm -f ./$(DEPDIR)/patchlist.Po -rm -f ./$(DEPDIR)/pattern.Po -rm -f ./$(DEPDIR)/pgp.Po -rm -f ./$(DEPDIR)/pgpewrap.Po -rm -f ./$(DEPDIR)/pgpinvoke.Po -rm -f ./$(DEPDIR)/pgpkey.Po -rm -f ./$(DEPDIR)/pgplib.Po -rm -f ./$(DEPDIR)/pgpmicalg.Po -rm -f ./$(DEPDIR)/pgppacket.Po -rm -f ./$(DEPDIR)/pgppubring.Po -rm -f ./$(DEPDIR)/pop.Po -rm -f ./$(DEPDIR)/pop_auth.Po -rm -f ./$(DEPDIR)/pop_lib.Po -rm -f ./$(DEPDIR)/postpone.Po -rm -f ./$(DEPDIR)/query.Po -rm -f ./$(DEPDIR)/recvattach.Po -rm -f ./$(DEPDIR)/recvcmd.Po -rm -f ./$(DEPDIR)/remailer.Po -rm -f ./$(DEPDIR)/resize.Po -rm -f ./$(DEPDIR)/rfc1524.Po -rm -f ./$(DEPDIR)/rfc2047.Po -rm -f ./$(DEPDIR)/rfc2231.Po -rm -f ./$(DEPDIR)/rfc3676.Po -rm -f ./$(DEPDIR)/rfc822.Po -rm -f ./$(DEPDIR)/safe_asprintf.Po -rm -f ./$(DEPDIR)/score.Po -rm -f ./$(DEPDIR)/send.Po -rm -f ./$(DEPDIR)/sendlib.Po -rm -f ./$(DEPDIR)/sha1.Po -rm -f ./$(DEPDIR)/sidebar.Po -rm -f ./$(DEPDIR)/signal.Po -rm -f ./$(DEPDIR)/smime.Po -rm -f ./$(DEPDIR)/smtp.Po -rm -f ./$(DEPDIR)/sort.Po -rm -f ./$(DEPDIR)/status.Po -rm -f ./$(DEPDIR)/system.Po -rm -f ./$(DEPDIR)/thread.Po -rm -f ./$(DEPDIR)/txt2c.Po -rm -f ./$(DEPDIR)/url.Po -rm -f ./$(DEPDIR)/utf8.Po -rm -f ./$(DEPDIR)/wcwidth.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-local .MAKE: $(am__recursive_targets) all check install install-am \ install-exec install-exec-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles am--refresh check check-am clean \ clean-binPROGRAMS clean-cscope clean-generic \ clean-noinstPROGRAMS cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-bzip3 dist-gzip dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-exec-hook install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-local .PRECIOUS: Makefile check-syntax: s=$(suffix $(CHK_SOURCES));\ if [ "$$s" = ".c" ]; then \ $(call get_cs_cmdline,C) $(call get_cs_cmdline,CPP) $(CHK_SOURCES);\ else exit 1; fi .PHONY: check-syntax mutt_dotlock.c: dotlock.c cp $(srcdir)/dotlock.c mutt_dotlock.c # With autoconf 2.71, the "ac_cs_config=" line in config.status may contain # sequences like '\'' when using a configure argument with spaces in it, # for instance CFLAGS with several options. Thus it is not sufficient to # get this line with grep; one needs to eval it and output the result. conststrings.c: txt2c config.status ( \ ($(CC) -v >/dev/null 2>&1 && $(CC) -v) || \ ($(CC) --version >/dev/null 2>&1 && $(CC) --version) || \ ($(CC) -V >/dev/null 2>&1 && $(CC) -V) || \ echo "unknown compiler"; \ ) 2>&1 | ${srcdir}/txt2c.sh cc_version >conststrings_c echo "$(CFLAGS)" | ${srcdir}/txt2c.sh cc_cflags >>conststrings_c ( eval "`grep '^ac_cs_config=' config.status`" && echo $$ac_cs_config; ) | ${srcdir}/txt2c.sh configure_options >>conststrings_c mv -f conststrings_c conststrings.c flea: $(srcdir)/muttbug cp $(srcdir)/muttbug flea chmod +x flea smime_keys: $(srcdir)/smime_keys.pl cp $(srcdir)/smime_keys.pl smime_keys chmod +x smime_keys keymap_defs.h: $(OPS) config.h $(srcdir)/gen_defs $(srcdir)/gen_defs $(OPS) > keymap_defs.h # If we have GNU make, we can use the FORCE target to enable # automatic rebuilding of version.h after a commit. @GNU_MAKE_TRUE@version.h: FORCE @GNU_MAKE_TRUE@ echo '#define MUTT_VERSION "'`sh "$(srcdir)/version.sh"`'"' > $@.tmp @GNU_MAKE_TRUE@ cmp -s $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@ @GNU_MAKE_TRUE@FORCE: # On some other versions of make, such as OpenBSD, invoking the # version.h target always retriggers targets with that prerequisite, which # causes installation issues. @GNU_MAKE_FALSE@version.h: $(srcdir)/version.sh @GNU_MAKE_FALSE@ echo '#define MUTT_VERSION "'`sh "$(srcdir)/version.sh"`'"' > version.h reldate.h: $(srcdir)/mkreldate.sh $(srcdir)/ChangeLog echo 'const char *ReleaseDate = "'`(cd $(srcdir) && ./mkreldate.sh)`'";' > reldate.h # The '#undef ENABLE_NLS' is to work around an automake ordering issue: # BUILT_SOURCES are processed before SUBDIRS. # If configured with --with-included-gettext this means that intl will # not have generated libintl.h yet, and mutt.h -> lib.h will generate # an error. hcversion.h: $(srcdir)/mutt.h $(srcdir)/rfc822.h $(srcdir)/buffer.h config.h $(srcdir)/hcachever.pl $(srcdir)/color.h ( echo '#include "config.h"'; echo '#undef ENABLE_NLS'; echo '#include "mutt.h"'; ) \ | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - | perl $(srcdir)/hcachever.pl > hcversion.h patchlist.c: $(srcdir)/PATCHES $(srcdir)/patchlist.sh $(srcdir)/patchlist.sh < $(srcdir)/PATCHES > patchlist.c install-exec-hook: if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/mutt_dotlock ; then \ rm -f $(DESTDIR)$(bindir)/mutt.dotlock ; \ ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \ fi if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x$(DOTLOCK_GROUP) != x ; then \ chgrp $(DOTLOCK_GROUP) $(DESTDIR)$(bindir)/mutt_dotlock && \ chmod $(DOTLOCK_PERMISSION) $(DESTDIR)$(bindir)/mutt_dotlock || \ { echo "Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \ fi install-data-local: $(MKDIR_P) $(DESTDIR)$(sysconfdir) $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/mime.types.dist -if [ ! -f $(DESTDIR)$(sysconfdir)/mime.types ]; then \ $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir); \ fi uninstall-local: for i in mime.types ; do \ if cmp -s $(DESTDIR)$(sysconfdir)/$$i.dist $(DESTDIR)$(sysconfdir)/$$i ; then \ rm $(DESTDIR)$(sysconfdir)/$$i ; \ fi ; \ rm $(DESTDIR)$(sysconfdir)/$${i}.dist ; \ done pclean: cat /dev/null > $(top_srcdir)/PATCHES check-security: (cd $(top_srcdir) && ./check_sec.sh) update-changelog: (cd $(top_srcdir); \ (sh ./mkchangelog.sh; echo; cat ChangeLog) > ChangeLog.$$$$ && mv ChangeLog.$$$$ ChangeLog; \ $${VISUAL:-vi} ChangeLog) mutt-dist: (cd $(srcdir) && ./build-release ) update-doc: (cd doc && $(MAKE) update-doc) shellcheck: (find . -name \*.sh && echo "gen_defs muttbug prepare") | xargs shellcheck --exclude=SC2003,SC2006,SC2086,SC2162,SC2046 .PHONY: commit pclean check-security shellcheck # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Tell GNU make to disable its built-in pattern rules. %:: %,v %:: RCS/%,v %:: RCS/% %:: s.% %:: SCCS/s.% mutt-2.3.2/config.h.in0000644000175000017500000005501615173276605012741 0ustar00kjmkjm/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define if you want classic PGP support. */ #undef CRYPT_BACKEND_CLASSIC_PGP /* Define if you want classic S/MIME support. */ #undef CRYPT_BACKEND_CLASSIC_SMIME /* Defined, if GPGME support is enabled */ #undef CRYPT_BACKEND_GPGME /* Define to enable debugging info. */ #undef DEBUG /* Define if you want to use an external dotlocking program. */ #undef DL_STANDALONE /* Define your domain name. */ #undef DOMAIN /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Enable exact regeneration of email addresses as parsed? NOTE: this requires significant more memory when defined. */ #undef EXACT_ADDRESS /* program to use for shell commands */ #undef EXECSHELL /* Define to 1 if you have the 'bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define if you have bkgdset, as a function or macro. */ #undef HAVE_BKGDSET /* Define if you have bkgrndset, as a function or macro. */ #undef HAVE_BKGRNDSET /* Define if you have the C99 integer types */ #undef HAVE_C99_INTTYPES /* Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define to 1 if you have the 'clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define if your curses library supports color. */ #undef HAVE_COLOR /* Define if you have curs_set, as a function or macro. */ #undef HAVE_CURS_SET /* Berkeley DB4 Support */ #undef HAVE_DB4 /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the declaration of 'GNUTLS_VERIFY_DISABLE_TIME_CHECKS', and to 0 if you don't. */ #undef HAVE_DECL_GNUTLS_VERIFY_DISABLE_TIME_CHECKS /* Define to 1 if you have the declaration of 'SSL_MODE_AUTO_RETRY', and to 0 if you don't. */ #undef HAVE_DECL_SSL_MODE_AUTO_RETRY /* Define to 1 if you have the declaration of 'SSL_set_mode', and to 0 if you don't. */ #undef HAVE_DECL_SSL_SET_MODE /* Define to 1 if you have the declaration of 'sys_siglist', and to 0 if you don't. */ #undef HAVE_DECL_SYS_SIGLIST /* Define to 1 if your system has the dirent::d_ino member */ #undef HAVE_DIRENT_D_INO /* Define to 1 if you have the 'fchdir' function. */ #undef HAVE_FCHDIR /* Define to 1 if you have the 'fgetc_unlocked' function. */ #undef HAVE_FGETC_UNLOCKED /* Define to 1 if you have the 'fgetpos' function. */ #undef HAVE_FGETPOS /* Define to 1 if you have the 'fgets_unlocked' function. */ #undef HAVE_FGETS_UNLOCKED /* Define to 1 if fseeko (and ftello) are declared in stdio.h. */ #undef HAVE_FSEEKO /* Define to 1 if you have the 'ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the 'futimens' function. */ #undef HAVE_FUTIMENS /* GDBM Support */ #undef HAVE_GDBM /* Define to 1 if you have the 'getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the 'getsid' function. */ #undef HAVE_GETSID /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if the system has the type 'gnutls_certificate_credentials_t'. */ #undef HAVE_GNUTLS_CERTIFICATE_CREDENTIALS_T /* Define to 1 if the system has the type 'gnutls_certificate_status_t'. */ #undef HAVE_GNUTLS_CERTIFICATE_STATUS_T /* Define to 1 if the system has the type 'gnutls_datum_t'. */ #undef HAVE_GNUTLS_DATUM_T /* Define to 1 if the system has the type 'gnutls_digest_algorithm_t'. */ #undef HAVE_GNUTLS_DIGEST_ALGORITHM_T /* Define to 1 if you have the 'gnutls_priority_set_direct' function. */ #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT /* Define to 1 if the system has the type 'gnutls_session_t'. */ #undef HAVE_GNUTLS_SESSION_T /* Define to 1 if the system has the type 'gnutls_transport_ptr_t'. */ #undef HAVE_GNUTLS_TRANSPORT_PTR_T /* Define to 1 if the system has the type 'gnutls_x509_crt_t'. */ #undef HAVE_GNUTLS_X509_CRT_T /* Define if your GSSAPI implementation is Heimdal */ #undef HAVE_HEIMDAL /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_ICONV_H /* Define if defines iconv_t. */ #undef HAVE_ICONV_T_DEF /* Define to 1 if you have the header file. */ #undef HAVE_IDN2_H /* Define to 1 if you have the header file. */ #undef HAVE_IDNA_H /* Define to 1 if you have the 'idna_to_ascii_8z' function. */ #undef HAVE_IDNA_TO_ASCII_8Z /* Define to 1 if you have the 'idna_to_ascii_from_locale' function. */ #undef HAVE_IDNA_TO_ASCII_FROM_LOCALE /* Define to 1 if you have the 'idna_to_ascii_from_utf8' function. */ #undef HAVE_IDNA_TO_ASCII_FROM_UTF8 /* Define to 1 if you have the 'idna_to_ascii_lz' function. */ #undef HAVE_IDNA_TO_ASCII_LZ /* Define to 1 if you have the 'idna_to_unicode_8z8z' function. */ #undef HAVE_IDNA_TO_UNICODE_8Z8Z /* Define to 1 if you have the 'idna_to_unicode_utf8_from_utf8' function. */ #undef HAVE_IDNA_TO_UNICODE_UTF8_FROM_UTF8 /* Define to 1 if you have the header file. */ #undef HAVE_IDN_IDN2_H /* Define to 1 if you have the header file. */ #undef HAVE_IDN_IDNA_H /* Define to 1 if you have the header file. */ #undef HAVE_IDN_STRINGPREP_H /* Define to 1 if you have the 'inotify_add_watch' function. */ #undef HAVE_INOTIFY_ADD_WATCH /* Define to 1 if you have the 'inotify_init' function. */ #undef HAVE_INOTIFY_INIT /* Define to 1 if you have the 'inotify_init1' function. */ #undef HAVE_INOTIFY_INIT1 /* Define to 1 if you have the 'inotify_rm_watch' function. */ #undef HAVE_INOTIFY_RM_WATCH /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IOCTL_H /* Define to 1 if you have the 'iswalnum' function. */ #undef HAVE_ISWALNUM /* Define to 1 if you have the 'iswalpha' function. */ #undef HAVE_ISWALPHA /* Define to 1 if you have the 'iswblank' function. */ #undef HAVE_ISWBLANK /* Define to 1 if you have the 'iswcntrl' function. */ #undef HAVE_ISWCNTRL /* Define to 1 if you have the 'iswdigit' function. */ #undef HAVE_ISWDIGIT /* Define to 1 if you have the 'iswgraph' function. */ #undef HAVE_ISWGRAPH /* Define to 1 if you have the 'iswlower' function. */ #undef HAVE_ISWLOWER /* Define to 1 if you have the 'iswprint' function. */ #undef HAVE_ISWPRINT /* Define to 1 if you have the 'iswpunct' function. */ #undef HAVE_ISWPUNCT /* Define to 1 if you have the 'iswspace' function. */ #undef HAVE_ISWSPACE /* Define to 1 if you have the 'iswupper' function. */ #undef HAVE_ISWUPPER /* Define to 1 if you have the 'iswxdigit' function. */ #undef HAVE_ISWXDIGIT /* Kyoto Cabinet Support */ #undef HAVE_KC /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if you have and nl_langinfo(YESEXPR). */ #undef HAVE_LANGINFO_YESEXPR /* Define to 1 if you have the 'gsasl' library (-lgsasl). */ #undef HAVE_LIBGSASL /* Define to 1 if you have the GNU idn library */ #undef HAVE_LIBIDN /* Define to 1 if you have the GNU idn2 library */ #undef HAVE_LIBIDN2 /* Define to 1 if you have the 'intl' library (-lintl). */ #undef HAVE_LIBINTL /* Define to 1 if you have the 'nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the 'socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the 'sqlite3' library (-lsqlite3). */ #undef HAVE_LIBSQLITE3 /* Define to 1 if you have the 'ssl' library (-lssl). */ #undef HAVE_LIBSSL /* Define to 1 if you have the 'termlib' library (-ltermlib). */ #undef HAVE_LIBTERMLIB /* Define to 1 if you have the 'x' library (-lx). */ #undef HAVE_LIBX /* LMDB Support */ #undef HAVE_LMDB /* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the 'memccpy' function. */ #undef HAVE_MEMCCPY /* Define to 1 if you have the 'memmove' function. */ #undef HAVE_MEMMOVE /* Define if you have meta, as a function or macro. */ #undef HAVE_META /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H /* Define to 1 if you have the 'mkdtemp' function. */ #undef HAVE_MKDTEMP /* Define to 1 if you have the header file. */ #undef HAVE_NCURSESW_NCURSES_H /* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_H /* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_NCURSES_H /* QDBM Support */ #undef HAVE_QDBM /* Define to 1 if you have the 'RAND_egd' function. */ #undef HAVE_RAND_EGD /* Define to 1 if you have the 'regcomp' function. */ #undef HAVE_REGCOMP /* Define if you have resizeterm, as a function or macro. */ #undef HAVE_RESIZETERM /* Define if you have setcchar, as a function or macro. */ #undef HAVE_SETCCHAR /* Define to 1 if you have the 'setegid' function. */ #undef HAVE_SETEGID /* Define to 1 if you have the 'setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the 'setrlimit' function. */ #undef HAVE_SETRLIMIT /* Define to 1 if you have the 'srand48' function. */ #undef HAVE_SRAND48 /* Define if OpenSSL supports partial chains. */ #undef HAVE_SSL_PARTIAL_CHAIN /* Define if you have start_color, as a function or macro. */ #undef HAVE_START_COLOR /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the 'strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the 'strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the 'strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the 'strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the 'strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ #undef HAVE_STRINGPREP_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the 'strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if you have the 'strtok_r' function. */ #undef HAVE_STRTOK_R /* Define to 1 if 'st_atim.tv_nsec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC /* Define to 1 if 'st_ctim.tv_nsec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC /* Define to 1 if 'st_mtim.tv_nsec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC /* Define to 1 if the system has the type 'struct timespec'. */ #undef HAVE_STRUCT_TIMESPEC /* Define to 1 if you have the header file. */ #undef HAVE_SYSEXITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INOTIFY_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Tokyo Cabinet Support */ #undef HAVE_TC /* Define to 1 if you have the header file. */ #undef HAVE_TERM_H /* Define to 1 if you have the 'towlower' function. */ #undef HAVE_TOWLOWER /* Define to 1 if you have the 'towupper' function. */ #undef HAVE_TOWUPPER /* Define if you have typeahead, as a function or macro. */ #undef HAVE_TYPEAHEAD /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_UNIX_H /* Define to 1 if the system has the type 'unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define if you have use_default_colors, as a function or macro. */ #undef HAVE_USE_DEFAULT_COLORS /* Define to 1 if you have the 'use_extended_names' function. */ #undef HAVE_USE_EXTENDED_NAMES /* Define if you have use_tioctl, as a function or macro. */ #undef HAVE_USE_TIOCTL /* Define to 1 if you have the 'utimensat' function. */ #undef HAVE_UTIMENSAT /* Define to 1 if you have the header file. */ #undef HAVE_VILLA_H /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if you have the 'wcscasecmp' function. */ #undef HAVE_WCSCASECMP /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H /* Define if you are using the system's wchar_t functions. */ #undef HAVE_WC_FUNCS /* Define to 1 if you have the header file. */ #undef HAVE_ZLIB_H /* Is mail spooled to the user's home directory? If defined, MAILPATH should be set to the filename of the spool mailbox relative the the home directory. use: configure --with-homespool=FILE */ #undef HOMESPOOL /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Define as 1 if iconv() only converts exactly and we should treat all return values other than (size_t)(-1) as equivalent. */ #undef ICONV_NONTRANS /* Where to find ispell on your system. */ #undef ISPELL /* Define if the result of isprint() is unreliable. */ #undef LOCALES_HACK /* Where new mail is spooled. */ #undef MAILPATH /* Define if you want complete documentation. */ #undef MAKEDOC_FULL /* Where to find mixmaster on your system. */ #undef MIXMASTER /* Define if you have problems with mutt not detecting new/old mailboxes over NFS. Some NFS implementations incorrectly cache the attributes of small files. */ #undef NFS_ATTRIBUTE_HACK /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Where to find sendmail on your system. */ #undef SENDMAIL /* Some systems declare sig_atomic_t as volatile, some others -- no. This define will have value `sig_atomic_t' or `volatile sig_atomic_t' accordingly. */ #undef SIG_ATOMIC_VOLATILE_T /* The size of 'int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of 'long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of 'long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* The size of 'off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T /* The size of 'short', as computed by sizeof. */ #undef SIZEOF_SHORT /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Define to enable Sun mailtool attachments support. */ #undef SUN_ATTACHMENT /* Define if you want support for autocrypt. */ #undef USE_AUTOCRYPT /* Define to enable compressed folders support. */ #undef USE_COMPRESSED /* Define to use dotlocking for mailboxes. */ #undef USE_DOTLOCK /* Define to use fcntl() to lock folders. */ #undef USE_FCNTL /* Define to use flock() to lock mailboxes. */ #undef USE_FLOCK /* Define if you want to use the included regex.c. */ #undef USE_GNU_REGEX /* Define if you have GSSAPI libraries available */ #undef USE_GSS /* Enable header caching */ #undef USE_HCACHE /* Define if you want support for the IMAP protocol. */ #undef USE_IMAP /* Define if want to use inotify for filesystem monitoring (available in Linux only). */ #undef USE_INOTIFY /* Define if you want support for the POP3 protocol. */ #undef USE_POP /* Define if want support for SASL. */ #undef USE_SASL /* Define if want to use the Cyrus SASL library for POP/IMAP authentication. */ #undef USE_SASL_CYRUS /* Define if want to use the GNU SASL library for POP/IMAP authentication. */ #undef USE_SASL_GNU /* Define if mutt should run setgid "mail". */ #undef USE_SETGID /* Define if you want support for the sidebar. */ #undef USE_SIDEBAR /* Define if you compile with SLang instead of curses/ncurses. */ #undef USE_SLANG_CURSES /* Include internal SMTP relay support */ #undef USE_SMTP /* Include code for socket support. Set automatically if you enable POP3 or IMAP */ #undef USE_SOCKET /* Define if you want support for SSL. */ #undef USE_SSL /* Define if you want support for SSL via GNUTLS. */ #undef USE_SSL_GNUTLS /* Define if you want support for SSL via OpenSSL. */ #undef USE_SSL_OPENSSL /* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable extensions on Cosmopolitan Libc. */ #ifndef _COSMO_SOURCE # undef _COSMO_SOURCE #endif /* Enable general extensions on macOS. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable X/Open compliant socket functions that do not require linking with -lxnet on HP-UX 11.11. */ #ifndef _HPUX_ALT_XOPEN_SOCKET_API # undef _HPUX_ALT_XOPEN_SOCKET_API #endif /* Identify the host operating system as Minix. This macro does not affect the system headers' behavior. A future release of Autoconf may stop defining this macro. */ #ifndef _MINIX # undef _MINIX #endif /* Enable general extensions on NetBSD. Enable NetBSD compatibility extensions on Minix. */ #ifndef _NETBSD_SOURCE # undef _NETBSD_SOURCE #endif /* Enable OpenBSD compatibility extensions on NetBSD. Oddly enough, this does nothing on OpenBSD. */ #ifndef _OPENBSD_SOURCE # undef _OPENBSD_SOURCE #endif /* Define to 1 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_SOURCE # undef _POSIX_SOURCE #endif /* Define to 2 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_1_SOURCE # undef _POSIX_1_SOURCE #endif /* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ # undef __STDC_WANT_IEC_60559_BFP_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # undef __STDC_WANT_IEC_60559_DFP_EXT__ #endif /* Enable extensions specified by C23 Annex F. */ #ifndef __STDC_WANT_IEC_60559_EXT__ # undef __STDC_WANT_IEC_60559_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif /* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # undef __STDC_WANT_IEC_60559_TYPES_EXT__ #endif /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ #ifndef __STDC_WANT_LIB_EXT2__ # undef __STDC_WANT_LIB_EXT2__ #endif /* Enable extensions specified by ISO/IEC 24747:2009. */ #ifndef __STDC_WANT_MATH_SPEC_FUNCS__ # undef __STDC_WANT_MATH_SPEC_FUNCS__ #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable X/Open extensions. Define to 500 only if necessary to make mbstate_t available. */ #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif /* Define if you have libz available */ #undef USE_ZLIB /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif #ifndef HAVE_C99_INTTYPES # if SIZEOF_SHORT == 4 typedef unsigned short uint32_t; # elif SIZEOF_INT == 4 typedef unsigned int uint32_t; # elif SIZEOF_LONG == 4 typedef unsigned long uint32_t; # endif # if SIZEOF_INT == 8 typedef unsigned int uint64_t; # elif SIZEOF_LONG == 8 typedef unsigned long uint64_t; # elif SIZEOF_LONG_LONG == 8 typedef unsigned long long uint64_t; # endif #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define to 1 if necessary to make fseeko visible. */ #undef _LARGEFILE_SOURCE /* Define to 1 on platforms where this makes off_t a 64-bit type. */ #undef _LARGE_FILES /* Number of bits in time_t, on hosts where this is settable. */ #undef _TIME_BITS /* Define to 1 on platforms where this makes time_t a 64-bit type. */ #undef __MINGW_USE_VC2005_COMPAT /* Define to empty if 'const' does not conform to ANSI C. */ #undef const /* Define to '__inline__' or '__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to 'int' if system headers don't define. */ #undef mbstate_t /* Define as a signed integer type capable of holding a process identifier. */ #undef pid_t /* Define to `int' if does not define. */ #undef sig_atomic_t /* Define to 'int' if doesn't have it. */ #undef socklen_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to 'int' if system headers don't define. */ #undef wchar_t /* Define to 'int' if system headers don't define. */ #undef wint_t /* fseeko portability defines */ #ifdef HAVE_FSEEKO # define LOFF_T off_t # if HAVE_C99_INTTYPES && HAVE_INTTYPES_H # if SIZEOF_OFF_T == 8 # define OFF_T_FMT "%" PRId64 # else # define OFF_T_FMT "%" PRId32 # endif # else # if (SIZEOF_OFF_T == 8) && (SIZEOF_LONG == 4) # define OFF_T_FMT "%lld" # else # define OFF_T_FMT "%ld" # endif # endif #else # define LOFF_T long # define fseeko fseek # define ftello ftell # define OFF_T_FMT "%ld" #endif mutt-2.3.2/flymake.am0000644000175000017500000000105213653360550012646 0ustar00kjmkjmget_cs_flags = $(foreach target,$(subst .,_,$(subst -,_,$($(2)))),$($(target)_$(1)FLAGS)) get_cs_all_flags = $(foreach type,$(2),$(call get_cs_flags,$(1),$(type))) get_cs_compile = $(if $(subst C,,$(1)),$($(1)COMPILE),$(COMPILE)) get_cs_cmdline = $(call get_cs_compile,$(1)) $(call get_cs_all_flags,$(1),check_PROGRAMS bin_PROGRAMS lib_LTLIBRARIES) -fsyntax-only check-syntax: s=$(suffix $(CHK_SOURCES));\ if [ "$$s" = ".c" ]; then \ $(call get_cs_cmdline,C) $(call get_cs_cmdline,CPP) $(CHK_SOURCES);\ else exit 1; fi .PHONY: check-syntax mutt-2.3.2/ABOUT-NLS0000644000175000017500000000010315173275600012122 0ustar00kjmkjm mutt-2.3.2/ChangeLog0000644000175000017500000535246615173276203012500 0ustar00kjmkjm2026-04-26 10:45:26 +0800 Kevin J. McCarthy (4a9c9248) * Update UPDATING file for 2.3.2 release. M UPDATING 2026-04-18 22:08:19 +0800 Kevin J. McCarthy (834c5a2e) * Fix IMAP auth_cram MD5 digest of secret to use memcpy(). For a secret longer than MD5_BLOCK_LEN, an MD5 digest is used instead. However, mutt was incorrectly using strfcpy() instead of memcpy() on the raw binary value returned by md5_buffer in hash_passwd. If hash_passwd contained an '\0' it would result in the value being truncated. Additionally, the strfcpy was truncating the hash_passwd by one byte regardless, due to passing a "size" of MD5_DIGEST_LEN when the data itself was length MD5_DIGEST_LEN. This likely hasn't been a reported issue because: 1. CRAM-MD5 is not used much anymore 2. Most people likely don't have a password length greater than 64 bytes. Thanks to evilrabbit@tutamail.com for the security report. M imap/auth_cram.c 2026-04-18 22:40:46 +0800 Kevin J. McCarthy (12f54fe3) * Check for embedded nul in url_pct_decode(). Consider %00 an invalid character in a URL. Thanks to evilrabbit@tutamail.com for the security report. Reviewed-by: Alejandro Colomar M url.c 2026-04-18 22:36:37 +0800 Kevin J. McCarthy (f547a849) * Fix imap_auth_gss() security level size check and buf_size type. Make sure send_token.length is 4 bytes before reading the data. Fix the buf_size type to be uint32_t instead of long. ntohl() operates on, and returns, a 32 bit unsigned integer. Most architectures now use a 64-bit long. I believe this only worked because in Little-Endian, the least-significant bits come first, so even though we were using 8 bytes of send_token.value (4 of which were out of bounds) for the cast to long, only the first 4 bytes were used to truncate to the uint32_t that ntohl() used. Likewise when we converted htonl() further down. Additionally, the comments indicate that mutt wasn't using buf_size in any case, so perhaps that also explains the lack of bug reports. Thanks to evilrabbit@tutamail.com for the security report. Reviewed-by: Alejandro Colomar M imap/auth_gss.c 2026-04-18 21:54:34 +0800 Kevin J. McCarthy (fdc04a17) * Fix infinite loop in gpgme data_object_to_stream(). The code was not properly checking for a -1 return value in the read, leading to an infinite loop, and printing past the buffer value to the stream. Thanks to evilrabbit@tutamail.com for the security report. Reviewed-by: Alejandro Colomar M crypt-gpgme.c 2026-04-18 21:41:23 +0800 Kevin J. McCarthy (ebfa2969) * Fix NULL dereference in show_sig_summary(). Inside show_one_sig_status(), if the error code is GPG_ERR_NO_PUBKEY, key is NULL. However, show_sig_summary() doesn't check for a NULL key before dereferencing for the "key expired" case. Thanks to evilrabbit@tutamail.com for the security report. Thanks to Alejandro Colomar for his review and suggestion to keep the ternary operator. Reviewed-by: Alejandro Colomar M crypt-gpgme.c 2026-03-20 13:26:34 +0800 Kevin J. McCarthy (519d1b9b) * automatic post-release commit for mutt-2.3.1 M ChangeLog M VERSION 2026-03-20 13:18:13 +0800 Kevin J. McCarthy (0f1f138c) * Update UPDATING file for 2.3.1 release. M UPDATING 2026-02-25 11:15:20 +0800 Kevin J. McCarthy (3a8dfafc) * Fix browser examine_directory() writable buffer parameter bug. Despite being "const char *", the directory "d" parameter was being modified inside examine_directory() if the directory no longer existed. The code climbed the directory path until it found where it still existed, using the strchr() return value as "char *" to modify the "const char *" parameter. Unfortunately, it modified the buffer data directly without updating the dptr. This could lead to buggy behavior, because subsequent buffer operations would append to the dptr, unaware that the string was nul terminated earlier. Thanks to Rene Kita for finding this issue and to Alejandro Colomar for his research into the problem. M browser.c 2026-02-22 12:34:22 +0800 Kevin J. McCarthy (a0083dc9) * Fix IMAP reconnect crash at password prompt. When waiting at a password prompt, eventually it will time out and call imap_keepalive(). This will end up recursively calling imap_check_mailbox(), because the idata has IMAP_REOPEN_ALLOW set during a reconnect operation. To prevent this problem, don't send keepalives on connections with a FATAL status. In any case, we shouldn't be sending keepalives since the connection is in an unknown state. As an aside, a reconnect should be using the cached credentials in the Connections list when imap_conn_find() iterates through the connection list. However, ticket 517 clearly shows there is a path where this is not happening. I haven't figured out how yet, but this fix should be applied regardless. M imap/util.c 2026-02-14 12:20:34 +0800 Kevin J. McCarthy (025a33ad) * Fix another compilation error --without-wc-funcs. This was generating an error on FreeBSD: mbyte.c:417:5: error: redefinition of '__wcwidth' Thanks to Daniel Tameling for suggesting the undef and testing it fixes the build error. M mbyte.h 2026-01-26 12:57:05 +0800 Kevin J. McCarthy (8b10799c) * Fix iswblank() compilation error when configured --without-wc-funcs. The iswblank() call was added to mutt_format_string() in commit 7074b571, more recently than all the mbyte.[ch] substitution code added about 25 years ago. Unfortunately, when added, it wasn't included in the HAVE_WC_FUNCS tests, and a replacement was not created in mbyte.c for when mutt is configured with --without-wc-funcs. This led to a compilation error in that (apparently rarely used) configuration, because wctype.h is not included in that case. Honestly the code is a little bit confusing, but I've preserved the existing conventions for this stable branch fix. M configure.ac M curs_lib.c M mbyte.c M mbyte.h 2026-01-25 11:01:42 +0800 Kevin J. McCarthy (50e3b1f3) * automatic post-release commit for mutt-2.3.0 M ChangeLog M VERSION M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2026-01-25 10:55:27 +0800 Kevin J. McCarthy (6d9cf2fb) * Update UPDATING file for 2.3.0 release. M UPDATING 2026-01-24 13:54:37 +0100 Rene Kita (8fa41ae2) * Make clear issues are not for feature requests As discussed in [0] feature requests should be discussed on the mailing list before being added to the issue tracker. Add some notes to make this more clear to the user. As discussed in [1] it makes more sense to send feature requests and bug reports to the dev ML. Update the manual to reflect that. Change wording to keep the list entries under 80 chars. While at it, copy a NOTE from the web site about the need to be subscribed in order to post to a ML. [0]: https://marc.info/?l=mutt-dev&m=176822608723403&w=2 [1]: https://marc.info/?l=mutt-dev&m=176925724408475&w=2 M doc/manual.xml.head M doc/mutt.man 2026-01-18 13:40:11 +0800 Kevin J. McCarthy (301067e4) * Add README.PACKAGERS file. This notes potential distribution issues of Mutt with OpenSSL (pre-3.0) and LibreSSL. M Makefile.am A README.PACKAGERS 2026-01-12 09:36:23 +0100 Grzegorz Szymaszek (5854039b) * Update the Polish translation for Mutt 2.3.0 M po/pl.po 2026-01-12 10:06:00 +0800 Ivan Vilata i Balaguer (0224e9fb) * Update Catalan translation. M po/ca.po 2026-01-11 20:35:40 +0800 Kevin McCarthy (12f17ce7) * Add POP3 non-base64 workaround to gsasl code too. As described in the previous commit, some servers send a non-base64 encoded challenge in the initial response. Ignore the base64 decode failure for the first challenge, to improve compatibility in the gsasl authentication code too. This is modeled after the same gsasl fix in smtp.c. M pop_auth.c 2026-01-11 20:09:49 +0800 Yao Zi (0746ae48) * pop_auth: Don't bail out when failing to decode the first SASL challenge RFC 5034 requires data in SASL server challenges to be encoded in base64 when integrating with POP3, > A server challenge is sent as a line consisting of a "+" character, > followed by a single space and a string encoded using Base64, as > specified in Section 4 of [RFC4648]. This line MUST NOT contain any > text other than the BASE64-encoded challenge. However, some mail providers put raw text instead of base64-encoded data in the challenge. Mutt always bails out when encountering them, [2026-01-08 05:02:31] Authenticating (SASL)... [2026-01-08 05:02:31] 6> AUTH PLAIN [2026-01-08 05:02:31] 6< + Ready for additional text [2026-01-08 05:02:31] pop_auth_sasl: error base64-decoding server response. [2026-01-08 05:02:31] 6> * [2026-01-08 05:02:32] 6< -ERR Au [2026-01-08 05:02:32] SASL authentication failed. while some other POP3 clients, e.g. cURL, accept them, > AUTH PLAIN < + Ready for additional text > dGVzdHRlc3R0ZXN0Cg== < +OK > LIST < +OK 223 messages (1256448 octets) which might work since some SASL mechanisms, e.g. PLAIN, don't care about the challenge responsed by server. Let's stop bailing out early when failing to decode the first SASL challenge as base64. Instead, print a debug message and then try to continue the authentication process for better compatibility with these quirky service providers. This takes a similar workaround to b363b602e179 ("Add SMTP gsasl auth workaround for broken Microsoft servers.") Link: https://datatracker.ietf.org/doc/html/rfc5034 Signed-off-by: Yao Zi M pop_auth.c 2026-01-10 10:59:31 +0100 Petr Písař (11bf4bbb) * Update Czech translation for mutt 2.2.16 M po/cs.po 2026-01-10 07:26:11 +0800 lilydjwg (8ddd7be5) * Update zh_CN.po translations. M po/zh_CN.po 2026-01-10 07:17:51 +0800 Emir SARI (9d11ccac) * Update Turkish translations M po/tr.po 2026-01-09 18:27:49 +0800 Kevin McCarthy (0908474f) * Fix sr.ht freebsd build system deps. db5 is not needed. The latest version running there appears to need gettext-tools installed in order to run autoreconf. M .builds/freebsd.yml 2026-01-09 21:15:24 +0800 Vsevolod Volkov (5ee1275b) * Updated Russian translation. M po/ru.po 2026-01-09 21:13:07 +0800 Vsevolod Volkov (f0c48b91) * Updated Ukrainian translation. M po/uk.po 2026-01-09 17:59:20 +0800 Helge Kreutzmann (4b79ae7a) * Update de.po. M po/de.po 2026-01-09 15:28:17 +0800 Daniel Nylander (f3733d23) * Updated Swedish translation. M po/sv.po 2026-01-09 12:45:29 +0800 Kevin McCarthy (f0092d23) * Update copyrights to 2026. M COPYRIGHT M doc/manual.xml.head M doc/mutt.man M main.c M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2026-01-07 16:38:40 +0100 Vincent Lefevre (33c58fb2) * Updated French translation. M po/fr.po 2025-12-14 14:26:41 +0800 Daniel Nylander (074eb728) * Updated Swedish translation. M po/sv.po 2025-12-11 15:24:08 +0000 Yao Zi via Mutt-dev (c8425a77) * Display the address when failing to add an SMTP recipient Some providers are picky about recipient addresses, they may refuse to send mails to an address to which mails have previously been rejected for "550 5.1.1 Bad destination mailbox address". Sending an RCPT TO command with such an address will fail with these providers, and result in a non-standard enhanced status code. In this case, mutt only emits an error like "SMTP session failed: 550 ..." without mentioning the address associated with the failed command, which doesn't help much if there are many recipients. This patch adds extra error log about the recipient address when an RCPT TO command fails. Users then could easily distinguish the problematic recipient, and remove it or contact the provider for support. Signed-off-by: Yao Zi M smtp.c 2025-11-22 11:07:18 +0800 Kevin McCarthy (597b2970) * Merge branch 'stable' 2025-11-22 10:59:52 +0800 Kevin McCarthy (7b98015d) * automatic post-release commit for mutt-2.2.16 M ChangeLog M VERSION 2025-11-09 12:52:41 +0800 Kevin McCarthy (58e9dca4) * Merge branch 'stable' 2025-10-03 13:17:07 +0200 Vincent Lefevre (ba36b184) * Updated French translation. M po/fr.po 2025-10-02 13:44:26 +0800 Kevin McCarthy (4bdfed9f) * Merge branch 'stable' 2025-09-23 14:01:32 +0800 Kevin McCarthy (a5e1f207) * Merge branch 'stable' 2025-08-26 19:07:40 +0800 Kevin McCarthy (0742c5d5) * Merge branch 'stable' 2025-08-26 10:44:13 +0800 Kevin McCarthy (3728efe6) * Merge branch 'stable' 2025-05-03 19:25:34 +0800 Kevin McCarthy (5fd040e3) * Merge branch 'stable' 2025-05-03 19:08:26 +0800 Kevin McCarthy (fb494674) * Merge branch 'stable' 2025-04-26 11:44:47 +0800 Kevin McCarthy (b2a0ef71) * Merge branch 'stable' 2025-03-23 13:43:26 +0800 Kevin McCarthy (2efcabc4) * Add $imap_reconnect_tries and $imap_reconnect_sleep. Try to make imap_reconnect() work a little harder by introducing options to control the number of reconnect attempts, and how long to sleep between each attempt. M globals.h M imap/imap.c M imap/message.c M init.h M mutt.h 2025-03-15 11:29:15 +0800 Kevin McCarthy (6fef346a) * Merge branch 'stable' 2025-02-20 12:23:41 +0800 Kevin McCarthy (5c8e775f) * Merge branch 'stable' 2025-02-08 11:23:30 +0800 Kevin McCarthy (bb2064ae) * Merge branch 'stable' 2025-02-06 11:43:35 +0800 Kevin McCarthy (22e0caf0) * Merge branch 'stable' 2025-01-21 10:13:39 -0500 Daniel Kahn Gillmor (caa8e5e7) * fix spelling M lib.c 2024-12-02 11:38:38 +0800 Kevin McCarthy (423f5002) * Merge branch 'stable' 2024-11-04 11:15:11 +0800 Kevin McCarthy (f87ab401) * Merge branch 'stable' 2024-06-20 11:29:12 -0700 William Yardley (9dc98409) * Add note about remote mailboxes to `$spoolfile` docs M init.h 2024-04-20 11:46:40 +0800 Kevin McCarthy (1f3da810) * Merge branch 'stable' 2024-04-13 13:47:34 +0800 Kevin McCarthy (762590bb) * Don't untag after edit-label. Mutt is pretty consistent about NOT untagging automatically after an operation. The only place where it does so is when deleting, but even this is configurable via $delete_untag. M headers.c 2024-04-13 18:31:59 +0800 Kevin McCarthy (680042df) * Merge branch 'stable' 2024-03-09 18:35:21 +0800 Kevin McCarthy (3c98bfa8) * Merge branch 'stable' 2024-03-09 18:16:00 +0800 Kevin McCarthy (e2d23514) * Merge branch 'stable' 2023-12-06 21:54:19 +0000 Norman Wood (354c5b11) * Use readline to overcome macOS input() restrictions Under macOS, for a python script launched in a terminal, input() accepts only 1024 characters. In the authcode flow, the authorization code that is read by the call to input() around line 200 is longer than this and will be truncated, causing token retrieval to fail. Importing readline resolves this, allowing input() to accept a longer character string. M contrib/mutt_oauth2.py 2023-12-07 19:39:06 +0100 Florian Weimer (563c5f60) * configure.ac: Fix ICONV_NONTRANS probe The standard iconv function uses char ** even for its input argument. With a const char ** argument, ICONV_NONTRANS is incorrectly set to 1 if the compiler produces an error for such incompatible pointer types. Although as far as I can see, the only thing that accomplishes is disabling an assert, so it probably does not matter much. M configure.ac 2023-09-09 14:55:00 +0800 Kevin McCarthy (757ca3b3) * Merge branch 'stable' 2023-08-23 15:42:19 +0800 Kevin McCarthy (b85b0dbf) * Merge branch 'stable' 2023-08-18 11:25:06 +0800 Kevin McCarthy (45bfedaf) * Merge branch 'stable' 2023-08-15 13:15:49 +0800 Kevin McCarthy (1480121f) * Merge branch 'stable' 2023-07-18 19:03:05 +0000 Aram Hamo (bf988762) * Update smime_keys.pl accepting old/insecure smime certificates M smime_keys.pl 2023-06-05 18:55:17 +0800 Kevin McCarthy (b470a9ad) * Merge branch 'stable' 2023-04-15 12:46:04 -0700 Kevin McCarthy (5347d1c5) * Merge branch 'stable' 2023-03-25 13:20:30 -0700 Kevin McCarthy (d2ed5d18) * Merge branch 'stable' 2023-03-13 18:27:45 -0700 Kevin McCarthy (caea3018) * Merge branch 'stable' 2023-03-12 19:54:44 -0700 Kevin McCarthy (3263c953) * Merge branch 'stable' 2023-03-12 19:41:08 -0700 Kevin McCarthy (277a12d1) * Merge branch 'stable' 2023-03-06 15:04:59 -0800 Kevin McCarthy (cf88e6d8) * Merge branch 'stable' 2022-12-20 09:16:42 -0800 Kevin McCarthy (90236f5a) * Merge branch 'stable' 2022-12-12 15:06:34 -0800 Kevin McCarthy (9917c0ea) * Merge branch 'stable' 2022-12-07 13:09:30 -0800 Kevin McCarthy (db429b21) * Merge branch 'stable' 2022-07-10 14:57:11 +0200 Matthias Andree (af2080d3) * mutt_ssl: refactor Implicit TLS and STARTTLS code Signed-off-by: Matthias Andree M mutt_ssl.c 2022-03-11 09:12:07 -0800 Kevin McCarthy (2f077d72) * Change the initial browser file to to cwd. If the working_dir was empty, it would be set to $folder, which isn't helpful if it's a IMAP directory. Instead set it to cwd. M browser.c 2022-03-04 14:27:53 -0800 Kevin McCarthy (946bf5b2) * Divide browser "LastDir" into separate file and mailbox locations. Previously there was only one "last" location stored, shared between file and mailbox operations when the MUTT_SEL_FOLDER flags was passed. This meant adding attachments to a composed message would start in the "mailbox" place (which could be an IMAP folder). Then, a subsequent change-folder would start in the attachment directory browsed to. Create two different flags, MUTT_SEL_MAILBOX and MUTT_SEL_FILE and use those to use the corresponding "last" variable. Change the browser function to use a temporary buffer, working_dir, instead of directly manipulating LastDir. Change callers to use the appropriate flag based on their usage. M browser.c M curs_lib.c M curs_main.c M enter.c M main.c M mutt.h 2022-12-03 17:55:36 -0800 Matthew Sotoudeh (185346ad) * Add socket send/receive timeout options On an unreliable connection (e.g., laptop put to sleep and changing wifi networks) I've had mutt fairly regularly become stuck in SSL_read and have to be killed. Per some of the comments on https://stackoverflow.com/questions/46517875/ssl-read-blocks-indefinitely adding a timeout to the socket should carry over to the SSL_read call. Using this socket_receive_timeout option appears to resolve the issue for me. M globals.h M init.h M mutt_socket.c 2022-11-21 12:48:46 -0800 Kevin McCarthy (c79959e1) * Merge branch 'stable' 2022-11-19 12:43:20 -0800 Kevin McCarthy (67517850) * Merge branch 'stable' 2022-11-12 13:02:50 -0800 Kevin McCarthy (f65467b0) * Merge branch 'stable' 2022-11-07 14:48:57 -0800 Kevin McCarthy (040ba998) * Merge branch 'stable' 2022-11-06 08:51:26 -0800 Kevin McCarthy (c11015d0) * Merge branch 'stable' 2022-11-05 13:25:15 -0700 Kevin McCarthy (0d2fb7c9) * Merge branch 'stable' 2022-11-04 13:31:45 -0700 Kevin McCarthy (39972738) * Merge branch 'stable' 2022-11-03 14:02:36 -0700 Kevin McCarthy (9d5489a5) * Merge branch 'stable' 2022-11-03 13:16:48 -0700 Kevin McCarthy (4ee5fcc4) * Merge branch 'stable' 2022-10-21 21:51:52 +0200 Vincent Lefevre (a318ca5a) * Updated French translation. M po/fr.po 2022-10-14 12:58:38 -0700 Kevin McCarthy (3c48d727) * Merge branch 'stable' 2022-10-09 19:31:41 -0700 Kevin McCarthy (8681885b) * Merge branch 'stable' 2022-10-08 13:51:04 -0700 Kevin McCarthy (590ec8e9) * Merge branch 'stable' 2022-10-08 12:45:54 -0700 Kevin McCarthy (f005b034) * Merge branch 'stable' 2022-09-02 13:12:10 +0200 Vincent Lefevre (a90f69b9) * Updated French translation. M po/fr.po 2022-08-30 18:20:42 -0700 Kevin McCarthy (578f3ae1) * Merge branch 'stable' 2022-08-25 13:32:12 -0700 Kevin McCarthy (c06f789b) * Merge branch 'stable' 2022-08-22 09:28:03 -0700 Kevin McCarthy (d84696f2) * Merge branch 'stable' 2022-08-07 10:28:10 -0700 Kevin McCarthy (1fccbbf8) * Merge branch 'stable' 2022-08-05 12:36:49 -0700 Kevin McCarthy (537cc1e4) * Merge branch 'stable' 2022-08-05 10:25:40 -0700 Kevin McCarthy (01a6e037) * Merge branch 'stable' 2022-07-31 11:11:16 -0700 Kevin McCarthy (76e93dd3) * Merge branch 'stable' 2022-07-28 13:05:26 -0700 Kevin McCarthy (05af53f1) * Merge branch 'stable' 2022-07-28 12:59:26 -0700 Kevin McCarthy (fa154e55) * Merge branch 'stable' 2022-07-06 14:46:15 -0700 Kevin McCarthy (7d9df177) * Merge branch 'stable' 2022-06-11 13:11:57 -0700 Kevin McCarthy (25743053) * Merge branch 'stable' 2022-06-05 12:27:16 -0700 Kevin McCarthy (74ce6f5a) * Merge branch 'stable' 2022-05-28 11:09:59 -0700 Kevin McCarthy (f582b526) * Merge branch 'stable' 2022-05-27 14:18:02 -0700 Kevin McCarthy (0a36fe5f) * Merge branch 'stable' 2022-05-25 10:02:13 -0700 Kevin McCarthy (e1058b2a) * Merge branch 'stable' 2022-05-21 09:35:27 -0700 Kevin McCarthy (1066be97) * Merge branch 'stable' 2022-05-20 08:51:45 -0700 Kevin McCarthy (188ece9a) * Merge branch 'stable' 2022-05-19 12:40:52 -0700 Kevin McCarthy (caf1d53e) * Merge branch 'stable' 2022-05-16 10:34:13 -0700 Kevin McCarthy (5e31bc48) * Merge branch 'stable' 2022-05-14 12:28:46 -0700 Kevin McCarthy (5cc97c19) * Merge branch 'stable' 2022-05-08 11:07:46 -0700 Kevin McCarthy (d448c911) * Merge branch 'stable' 2022-04-30 12:52:54 -0700 Kevin McCarthy (448b2574) * Merge branch 'stable' 2022-04-21 14:37:45 -0700 Kevin McCarthy (377f8c16) * Merge branch 'stable' 2022-04-12 12:34:29 -0700 Kevin McCarthy (6e7437c4) * Merge branch 'stable' 2022-03-25 13:23:16 -0700 Kevin McCarthy (f082dd14) * Merge branch 'stable' 2022-03-05 11:22:01 -0800 Kevin McCarthy (1ba319cf) * Merge branch 'stable' 2022-03-05 09:34:21 -0800 Kevin McCarthy (d1f297b5) * Merge branch 'stable' 2022-03-05 09:23:41 -0800 Kevin McCarthy (4797afee) * Merge branch 'stable' 2022-02-21 15:36:58 -0800 Kevin McCarthy (14187faf) * Merge branch 'stable' 2022-02-19 10:59:23 -0800 Kevin McCarthy (a102f762) * Merge branch 'stable' 2022-02-19 09:08:04 -0800 Kevin McCarthy (657210ed) * Merge branch 'stable' 2022-02-14 13:23:16 -0800 Kevin McCarthy (bfa075a3) * Merge branch 'stable' 2021-04-08 22:01:19 +0200 Paweł Zuzelski (955d281f) * Add missing period in a comment. That comment was a bit confusing without the punctuation. M hook.c 2025-11-22 10:55:45 +0800 Kevin McCarthy (8b81a856) * Update UPDATING file for 2.2.16 release. M UPDATING 2025-11-08 21:28:50 +1000 Jonathan Matthew (49aad685) * mutt_ssl: only allocate exdata indices once We don't need a new index for each connection, so allocating a new one each time is at best a memory leak. M mutt_ssl.c 2025-10-02 13:34:15 +0800 Kevin McCarthy (2b349c5e) * automatic post-release commit for mutt-2.2.15 M ChangeLog M VERSION 2025-10-02 13:18:22 +0800 Kevin McCarthy (b2db4087) * Update UPDATING file for 2.2.15 release. M UPDATING 2025-09-20 10:41:24 +0800 Kevin McCarthy (b363b602) * Add SMTP gsasl auth workaround for broken Microsoft servers. It appears some Microsoft servers append a non-BASE64 encoded response to what should be an empty challenge to the initial AUTH sent by the client. It's not RFC compliant, so gsasl rightly rejects the response. However, this doesn't help poor mutt users to authenticate. To work around this, check the response for the initial reply only, and if it's not BASE64 decodable, just drop the response. It is mostly likely meaningless, and would have resulted in the AUTH failing regardless. Thanks to Frank Reker for the bug report and proposed patch, which this is based upon. M smtp.c 2025-08-26 13:30:32 +0800 Kevin McCarthy (b4771a9d) * Add documentation about and its keybinding. Add a subsection to the "Editing Input Fields" section of the manual, explaining about the function, and when it is used. Also, add an explanation for a previously undocumented behavior: in other filename and mailbox prompts, typing the key binding falls back and invokes the function. Mention the function, as a useful way to enter a literal space, instead of invoking or when typing space. M doc/manual.xml.head 2025-08-26 10:32:22 +0800 Kevin McCarthy (467e919f) * Fix isdigit() argument to unsigned char in pager is_ansi() call. In a refactor, in commit 0ac6b609cd9e4588f00221b5c66e0fd5f584da88 a few years ago, I inadvertantly changed the type of the is_ansi() parameter, and thus changed the isdigit() argument to char. This is not allowed, and needs to be cast to (unsigned char) for correct behavior on some platforms. Thanks to Thomas Klausner (@_wiz_) for pointing out the bug and for the patch. M pager.c 2025-05-03 19:24:57 +0800 Kevin McCarthy (47ed1d21) * Fix .builds files to reference new srht repository. M .builds/alpine.yml M .builds/debian.yml M .builds/freebsd.yml 2025-05-03 19:06:44 +0800 Kevin McCarthy (42d9a016) * Improve the my_hdr documentation. Try to make it clearer that it can only be used for custom header fields and a certain set of standard header fields. M doc/manual.xml.head 2025-04-26 11:42:21 +0800 Kevin McCarthy (61a66d03) * Remove deprecated AC_PROG_CC_C99 call. The test and setting of $ac_cv_prog_cc_c99 is done by AC_PROG_CC now. M configure.ac 2025-03-13 15:28:55 +0800 Kevin McCarthy (dacd6a50) * Fix interleaved search/limit for IMAP mailboxes. mutt_search_command() and mutt_pattern_func() both invoke imap_search() for IMAP mailboxes. Additionally, mutt_search_command() uses the header->searched flag to cache search results for faster repeated matching. Interleaving a search, followed by a limit, followed by another search (with the exact same pattern) did not invalidate the previous search. The limit imap_search() cleared all the match flags, and set them to the results of the limit imap_search(). The second search for the same pattern tried to use the matched flag for headers with cached results, resulting in incorrect search results. Many thanks to Mikhail (@MikZyth) for the very detailed bug report, allowing me to easily track down the bug. M imap/imap.c 2025-02-20 10:58:56 +0800 Kevin McCarthy (516568dc) * automatic post-release commit for mutt-2.2.14 M ChangeLog M VERSION 2025-02-20 10:20:51 +0800 Kevin McCarthy (59908c2b) * Update UPDATING file for 2.2.14 release. M UPDATING 2025-02-08 11:20:38 +0800 Kevin McCarthy (aa1bc169) * Update copyrights to 2025. M COPYRIGHT M doc/manual.xml.head M doc/mutt.man M main.c M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2025-02-05 18:09:37 +0800 Kevin McCarthy (0ac64bf3) * Fix NULL pointer dereference when calling imap_logout_all(). When idata->status is set to IMAP_FATAL, it signals the connection is in an unusable state that can't be resolved. While doing cleanup, imap_close_mailbox() will leave the idata->state unchanged, and will set idata->ctx to NULL. So this could result in a situation where idata->status == IMAP_FATAL idata->state == IMAP_SELECTED idata->ctx == NULL. Normally when idata->state == IMAP_SELECTED (or higher), Mutt assumes a mailbox is selected and the ctx should be set to the open mailbox CONTEXT. However, when the status is IMAP_FATAL, mutt aborts trying to do anything with that connection. So there is no issue. When exiting mutt, imap_logout_all() is called, which loops through any unclosed connections and calls imap_logout() for each. Unfortunately, imap_logout() was overwriting idata->status to IMAP_BYE without checking if it was previously set to IMAP_FATAL, and then sending a "LOGOUT" commmand. This could result in idata->status == IMAP_BYE idata->state == IMAP_SELECTED idata->ctx == NULL in which case the IMAP code assumes a ctx will be present, because status is no longer set to IMAP_FATAL. This commit checks for an existing IMAP_FATAL status, and skips trying to reset the status and send "LOGOUT" in that case. Many thanks to Roberto Ricci for reporting the bug along with a stack trace, and working with me as I slowly found the problem. M imap/imap.c 2024-11-29 11:40:05 +0800 Kevin McCarthy (cba1fc27) * Remove "." from MimeSpecials (RFC2045 tspecials). RFC2045 declares tspecials to not include a period. So encoding it inside 2231 parameter values, or adding double quotes to MIME parameter values (such as in Content-Type and Content-Disposition) because of the presence of a period, while not illegal, is unnecessary. Ticket 491 reported a case where some Android clients were not decoding the "." in an attachment filename extension for some unknown reason. While this is clearly a bug in the Android client, it's also true that the period need not have been encoded in the first place. However, "." couldn't simply be removed from MIMESpecials, because it was also used for RFC2047 encoding. RFC2047 encoded-words are used in non-MIME headers, and cannot be double quoted. Create a third "specials" list, RFC2047Specials, adding back in the ".", to keep RFC2047 encoding the same as it was. Add a comment as to why it exists, to prevent someone from making the unfortunate mistake of thinking it can just be changed back to use MIMESpecials. Thanks to Peter Seiderer for reporting the issue and suggesting a fix, which this patch is based upon. M rfc2047.c M sendlib.c 2024-10-29 13:15:12 +0800 Kevin McCarthy (a5bd9821) * Fix configure.ac AM_ICONV result checking. --disable-iconv seeds the cache value variable, $am_cv_func_iconv, to "no" to skip the test and disable iconv. However, the result of an existing and *working* AM_ICONV test is stored in $am_func_iconv. The call to AC_DEFINE(HAVE_ICONV) depends on that variable. Mutt was improperly checking $am_cv_func_iconv below. In the event of an existing but broken iconv, this would result in HAVE_ICONV being undefined, but mutt_idna.o being added to MUTT_LIB_OBJECTS. This would cause both the stub functions in mutt_idna.h and the full functions in mutt_idna.c to be defined, giving a compilation error. Thanks to @juanitotc for the bug report and helping to test the fix. M configure.ac 2024-04-19 22:30:54 +0200 Alejandro Colomar (0af8a6fc) * crypt-gpgme.c: Fix NULL dereference Fixes: 1afaa74a19ee ("gpgme integration. See documentation for $crypt_use_gpgme, and http://www.gnupg.org/aegypten2/.") M crypt-gpgme.c 2024-04-13 13:22:11 +0800 Kevin McCarthy (0d75d71a) * Add $smime_pkcs7_default_smime_type config option. This works around Outlook sending application/pkcs7-mime ".p7m" parts without a smime-type parameter. Mutt previously hardcoded an assumption that these were SignedData to work around an old Outlook book. However Outlook now appears to also send EnvelopedData in this form. M contrib/smime.rc M crypt.c M globals.h M init.h 2024-03-09 18:29:03 +0800 Kevin McCarthy (00d56288) * automatic post-release commit for mutt-2.2.13 M ChangeLog M VERSION 2024-03-09 18:24:58 +0800 Kevin McCarthy (ceecc40b) * Update UPDATING file for 2.2.13 release. M UPDATING 2024-03-09 18:01:11 +0800 Kevin McCarthy (9b967f07) * Fix smtp client to respect $use_envelope_from option. The code was only looking to see if $envelope_from_address had a value, not if $use_envelope_from was set. Add extra safety checks to make sure the mailbox value isn't NULL. M smtp.c 2024-03-09 17:54:34 +0800 Kevin McCarthy (039cc521) * Fix smtp client $envelope_from_address possible dangling pointer. If the account-hook invoked by mutt_conn_find() modifies $envelope_from_address, envfrom could point no longer point to the address. Move the mutt_conn_find() before the code that determines the envelope from address. M smtp.c 2023-09-09 14:45:24 +0800 Kevin McCarthy (0a81a2a7) * automatic post-release commit for mutt-2.2.12 M ChangeLog M VERSION 2023-09-09 14:42:14 +0800 Kevin McCarthy (6a155b49) * Update UPDATING file for 2.2.12 release. M UPDATING 2023-09-03 14:11:48 +0800 Kevin McCarthy (a4752eb0) * Fix write_one_header() illegal header check. This is another crash caused by the rfc2047 decoding bug fixed in the second prior commit. In this case, an empty header line followed by a header line starting with ":", would result in t==end. The mutt_substrdup() further below would go very badly at that point, with t >= end+1. This could result in either a memcpy onto NULL or a huge malloc call. Thanks to Chenyuan Mi (@morningbread) for giving a working example draft message of the rfc2047 decoding flaw. This allowed me, with further testing, to discover this additional crash bug. M sendlib.c 2023-09-04 12:50:07 +0800 Kevin McCarthy (4cc3128a) * Check for NULL userhdrs. When composing an email, miscellaneous extra headers are stored in a userhdrs list. Mutt first checks to ensure each header contains at least a colon character, passes the entire userhdr field (name, colon, and body) to the rfc2047 decoder, and safe_strdup()'s the result on the userhdrs list. An empty result would from the decode would result in a NULL headers being added to list. The previous commit removed the possibility of the decoded header field being empty, but it's prudent to add a check to the strchr calls, in case there is another unexpected bug resulting in one. Thanks to Chenyuan Mi (@morningbread) for discovering the two strchr crashes, giving a working example draft message, and providing the stack traces for the two NULL derefences. M sendlib.c 2023-09-03 12:22:01 +0800 Kevin McCarthy (452ee330) * Fix rfc2047 base64 decoding to abort on illegal characters. For some reason, the rfc2047 base64 decoder ignored illegal characters, instead of aborting. This seems innocuous, but in fact leads to at least three crash-bugs elsewhere in Mutt. These stem from Mutt, in some cases, passing an entire header field (name, colon, and body) to the rfc2047 decoder. (It is technically incorrect to do so, by the way, but is beyond scope for these fixes in stable). Mutt then assumes the result can't be empty because of a previous check that the header contains at least a colon. This commit takes care of the source of the crashes, by aborting the rfc2047 decode. The following two commits add protective fixes to the specific crash points. Thanks to Chenyuan Mi (@morningbread) for discovering the strchr crashes, giving a working example draft message, and providing the stack traces for the two NULL derefences. M rfc2047.c 2023-08-23 15:40:19 +0800 Kevin McCarthy (7eb9c18f) * Add a documentation note that aliases are case insensitive. It's very old behavior, but doesn't seem to be documented anywhere. Thanks to Charles for pointing that out. M doc/manual.xml.head 2023-08-18 11:17:23 +0800 Kevin McCarthy (6b538297) * automatic post-release commit for mutt-2.2.11 M ChangeLog M VERSION 2023-08-18 11:07:42 +0800 Kevin McCarthy (d619496e) * Update UPDATING file for 2.2.11 release. M UPDATING 2023-08-15 12:34:05 +0800 Kevin McCarthy (d52c6115) * Fix GPGME build failure on MacOS. Commit 012981e8 (in release 2.2.9) updated the GPGME autoconf files, to fix a build issue with newer GPGME releases. Unfortunatley that caused a build issue for hosts where the gpg-error header files aren't in the include path. The newer autoconf file expect GPG_ERROR_CFLAGS to be added to the list of flags for the compiler. Thanks to Will Yardley for reporting the issue and quickly testing the proposed fix. M Makefile.am 2023-06-05 18:53:55 +0800 TAKAHASHI Tamotsu (a5423c40) * Updated Japanese translation. M po/ja.po 2023-04-14 15:57:07 -0700 Kevin McCarthy (50954c4a) * Fix behavior for sort=reverse-threads. When uncollapsing, _mutt_traverse_thread() returns the virtual number of the root message in the thread. directly sets menu->current to this value to cause the cursor to be on the *first* message of the thread (which isn't the same as the root message when sort=reverse-threads). finds the corresponding message by searching for it after re-indexing. However, when collapsing, _mutt_traverse_thread() had code to try and find the *first* message in the thread and return that virtual number. then did the same trick, because the old first message is now the new root message for sort=reverse-threads. However, that cleverness caused a bug for - it can't use that virtual number directly, and it can't "find" the message at the index after reindexing. To fix this, remove the cleverness from _mutt_traverse_thread() when collapsing. Return the virtual number of the root. Add searching behavior for to fix its behavior. M curs_main.c M thread.c 2023-03-25 13:07:19 -0700 Kevin McCarthy (e0e92c31) * automatic post-release commit for mutt-2.2.10 M ChangeLog M VERSION 2023-03-25 13:03:39 -0700 Kevin McCarthy (9138232d) * Update UPDATING files for 2.2.10 release. M UPDATING 2023-03-13 18:24:31 -0700 Kevin McCarthy (33f8b7ce) * Update copyright notices. This is generated from the copyright-updater script, with manual updates for the main.c and documentation, and po files. M COPYRIGHT M background.c M buffy.c M doc/manual.xml.head M doc/mutt.man M main.c M mutt_sasl_gnu.c M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po M sidebar.c 2022-11-12 10:02:01 -0800 Kevin McCarthy (9f01d4ab) * Abort imap_fast_trash() if previously checkpointed. We don't want to copy the deleted flag over to the trash folder too. I looked into various ways to keep the UID COPY, but they lead to niggling issues with error handling along with handling if the server sends flag updates back to the client. So for that (hopefully rare) case, abort the fast trash and just use a regular copy. M imap/imap.c 2023-03-06 18:55:06 -0800 Kevin McCarthy (216dd145) * Improve smtp oauth authentication. Split XOAUTH2 to use two steps. This follows the microsoft.com documentation example for smtp. Since office365 is the main site using XOAUTH2 now, it's better to match their documentation. It also matches msmtp's behavior, which probably means somewhere or another needs it that way. At the same time, improve response code checking. Mutt was using smtp_get_resp() before, which returns 0 for both a ready and success response code. Make sure it's a success response code when done authenticating. M smtp.c 2023-03-04 18:33:35 +0100 Sebastian Andrzej Siewior (5df86199) * Use base64 URL safe alphabet for message id generation. The character '/' from base64 alphabet breaks web redirectors if the message-id from an email is used as part of the URL for redirectors and/ or automatic pointers to an email. Use the URL safe alphabet from RFC4648 section 5 for message id generation. Signed-off-by: Sebastian Andrzej Siewior M base64.c M messageid.c M mime.h M protos.h M sendlib.c 2023-03-04 18:33:34 +0100 Sebastian Andrzej Siewior (cecddeac) * base64val: Add support to decode base64 safe URL. In the base64 safe URL dictionary the characters '+' and '/' are replaced by '-' and '_'. Add the characters to Index_64 to allow decoding if needed. Signed-off-by: Sebastian Andrzej Siewior M handler.c 2022-12-19 18:53:43 -0800 Cline, Wade (7c4fa478) * mutt_oauth2: Print access token request message There are cases when using the 'authcode' grant where the authorization request will succeed but the access token request will fail (for example: if the user's web browser and terminal use different proxy settings). The current implementation of the script does not inform the user that the authorization token is being exchanged for an access code, with the result that it can appear that a request has both succeeded (according to the browser) and failed (according to the terminal output) simultaneously. Add a message to inform the user that a second request is being made so there is less potential for confusion. M contrib/mutt_oauth2.py 2022-12-12 15:05:18 -0800 Kevin McCarthy (16d8ad64) * Move MuttLisp boolean config note. I think it probably makes more sense to be inside the (if) function documentation than (equal). M doc/manual.xml.head 2022-12-07 15:51:36 -0800 Kevin McCarthy (ef2abed2) * Fix counters for external maildir 'T' flag changes. The maildir_check_mailbox() code was not updating the context deleted and trashed counts in those cases. This could lead to messages marked as deleted, but no action being taken on a mailbox sync/close. wip: fix ctx counts for maildir 'T' flags updates. M mh.c 2022-12-07 12:58:40 -0800 Kevin McCarthy (d0faf2d4) * Remove reference to $mark_old inside $mail_check_recent. There doesn't appear to be any relationship between $mark_old and "new mail" status any more. Commit c26c2531 (from 2002) is the most recent commit that talked about reducing the meaning of $mark_old, and may have been the commit to make that separation. M init.h 2022-12-07 12:53:51 -0800 Kevin McCarthy (ba5e0dc2) * Add doc note to MuttLisp about boolean config vars. They evaluate to "yes" and "no", and so need an explicit comparison to those values when using the equal function. M doc/manual.xml.head 2022-11-19 13:20:25 -0800 Kevin McCarthy (2f35d2fd) * Reset header color after mutt_set_flag(). I partially changed this to lazily update after a thread update in commit c9fa0414, but unfortunately didn't investigate the reason for the color update while setting a flag. Since it was that way, I assumed it was for a purpose. However, it turns out there is no need to actively set the header color in that function. Many places in Mutt already simply reset the color values to 0 to invalidate and cause a recheck later. Setting the color there so can even be detrimental, if the user has slow 'color index' lines. For example doing a ~A will cause the color to be computed for the *entire* mailbox. Now, the user ought to not have a slow color index line, but if they do, this causes unnecessary pain. Note that the header->color doesn't have an actual "unset" value, which could also help performance. Maybe in the future in master branch. M flags.c M mutt.h M protos.h M score.c 2020-04-26 10:43:24 -0700 Kevin McCarthy (a60b22fe) * Filter U+200C in pager. "U+200C ZERO WIDTH NON-JOINER" is generating '?' on some systems. M pager.c 2022-11-12 12:50:23 -0800 Kevin McCarthy (00093fd7) * automatic post-release commit for mutt-2.2.9 M ChangeLog M VERSION 2022-11-12 12:44:13 -0800 Kevin McCarthy (b40c28ce) * Update UPDATING file for 2.2.9. M UPDATING 2022-11-12 12:39:11 -0800 Kevin McCarthy (a5296bcd) * Document the <1234> key syntax for bind. This is useful for octal values of greater (or less) than three digits. M doc/manual.xml.head 2022-11-06 19:19:40 -0800 Kevin McCarthy (3c0f8597) * Fix non-printable keyname printing to use syntax. The IsPrint() was grabbing values outside the range of a char. Instead, restrict the range and fall back to the syntax, which the muttrc actually accepts. M keymap.c 2022-11-07 14:32:59 -0800 Kevin McCarthy (52753702) * Move AM_PATH_GPG_ERROR before AM_PATH_GPGME. The former sets $GPGRT_CONFIG which the latter needs to find and use gpgrt-config instead of gpgme-config. M configure.ac 2022-11-07 09:01:58 -0800 Kevin McCarthy (012981e8) * Update gpgme autoconf files to the latest versions. GPGME is transitioning away from gpgme-config, to gpgrt-config, and the new autoconf files are required to make the transition. Thanks to Vincent Lefèvre for reporting the problem and helping test the required fixes. M m4/gpg-error.m4 M m4/gpgme.m4 2022-11-06 08:48:32 -0800 Kevin McCarthy (80e79060) * Adjust manual concerning IMAP Fcc in batch mode. Remove the sentence saying it isn't supported from the Batch Composition Flow section of the manual. M doc/manual.xml.head 2022-11-05 13:14:09 -0700 Kevin McCarthy (57e3de6d) * automatic post-release commit for mutt-2.2.8 M ChangeLog M VERSION 2022-11-05 12:37:33 -0700 Kevin McCarthy (44b9bd4f) * Update UPDATING file for 2.2.8 release. M UPDATING 2022-11-04 13:18:51 -0700 Kevin McCarthy (db16ce47) * Add explicit void to 0-parameter function definitions. These are the errors output with: -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition M autocrypt/autocrypt_acct_menu.c M background.c M charset.c M curs_lib.c M menu.c M monitor.c M pattern.c 2022-11-03 14:01:12 -0700 Kevin McCarthy (0838a8f4) * Clarify $uncollapse_new documentation. Indicate more clearly it is talking about "delivered" messages that arrive in a thread, not about the unread-status of those messages. M init.h 2022-11-01 20:22:06 -0700 Kevin McCarthy (b254f2fb) * Add a check for key->uids in create_recipient_set. For gpgme < 1.11.0, it used this function to create the encryption key list. The '!' was interpreted differently back then, and it apparently didn't check if the returned key had any uids before referencing it. Add a check to prevent a segv as in the public key block fix. M crypt-gpgme.c 2022-10-31 15:06:51 -0700 Kevin McCarthy (f0eb3586) * Fix public key block listing for old versions of gpgme. Commit 382355a5 accidentally removed the data import for legacy mode, which would cause it to produce empty output. M crypt-gpgme.c 2022-10-31 15:02:57 -0700 Kevin McCarthy (48b6ea32) * Fix gpgme crash when listing keys in a public key block. The gpgme code handling classic application/pgp assumed each key would have a uid. Change it to check for a missing uid list. Also change it to list every uid (instead of only the first), and to put each one on a "uid" line in the output. The output is only for display, so the format change won't affect other parts of the code. Thanks to Mikko Lehto for the high quality bug report, detailing the exact place of the crash with a reproducing example and a workaround patch. M crypt-gpgme.c 2022-10-13 13:25:51 -0700 Kevin McCarthy (25b69530) * Allow Fcc'ing to IMAP in batch mode. There are some prompts that can cause it to abruptly fail, but it turns out SMTP has some of those too. For now, abort if $confirmcreate is set. Certificate prompts were fixed in commit c46db2be for 2.2.7. M imap/imap.c M send.c 2022-10-13 13:18:55 -0700 Kevin McCarthy (a1c86bd2) * Add fcc error handling in batch mode. If $fcc_before_send is set, then abort with an error message. If it's not set (the default), then continue on, as the message is already sent. M send.c 2022-10-09 11:13:15 -0700 Kevin McCarthy (9cfa36ea) * Fix scrolling when handling SIGWINCH in the index. The index had some (very very old) code which reset the scroll top during SIGWINCH handling. This caused a recomputation of the top, which caused the index to jumble around randomly during resizing. The last few commits added SigWinch flag setting whenever mutt_endwin() was called, which meant this jumbling would occur much more often. (For example when piping a message.) After looking more closely, this top reset seems to be unnecessary. A full redraw needs to properly handle the case where "current" is outside the visible range, because a resize could occur in a called menu. Additionally, the menu.c code does just fine without this, and is used for all the other standard menus in Mutt. Thanks to Vincent Lefèvre for helping test the SigWinch changes, and reporting this regression. M curs_main.c 2022-10-08 13:47:15 -0700 Kevin McCarthy (082ed14e) * Explicitly mention --with-sqlite3 in the INSTALL file. M INSTALL 2022-09-23 13:05:59 +0800 Kevin McCarthy (5649e381) * Set the curses resize policy to use tioctl() mutt_resize_screen() calls mutt_reflow_windows(), which records window sizes in those data structures. After a endwin(), curses will also check the terminal size, but it if uses a different policy than Mutt, the screen will be drawn incorrectly. I looked into adding a config option to change this, but ran into a chicken-egg problem. initscr() must be called before the config is processed, to allow for color setting. However, use_env() must be called before initscr(). So for now, just set to policy to ignore the env vars, except as a fallback. M configure.ac M main.c 2022-09-21 13:03:22 +0800 Kevin McCarthy (fede64d0) * Remove unneeded calls in mutt_edit_file(). The mutt_resize_screen() is no longer needed now that mutt_endwin() sets SigWinch. The keypad() and clearok() calls are generally only needed if a program takes over the screen unexpectedly (without Mutt having run endwin()). M curs_lib.c 2022-09-21 13:02:40 +0800 Kevin McCarthy (9fb2755d) * Change a few cases of endwin() to call mutt_endwin(). The remaining cases in the Mutt code are special cases, but these two should be fixed. This ensures SigWinch is set. M commands.c M compress.c 2022-09-21 13:00:44 +0800 Kevin McCarthy (619db54f) * Add SigWinch = 1 to mutt_endwin(). Since mutt_reflow_window() needs to be called on a resize, and it's possible for programs to block SIGWINCH being sent to Mutt, this is a fail-safe to ensure it's run. The previous commit moved SigWinch handling before refresh() in the menus, which should prevent double-refresh issues. M curs_lib.c 2022-09-19 18:41:48 +0800 Kevin McCarthy (925a2927) * Move SigWinch handling before refresh in menus. This will prevent an unneeded double-refresh after an endwin() when we set SigWinch in the next commit. In the pager, change RETWINCH handling to account for a sigwinch while in the handler. Previously a redraw would occur and use/free the Resize data, but since the SigWinch check now occurs before the redraw, keep existing data. M curs_main.c M menu.c M pager.c 2022-08-30 15:31:24 -0700 Kevin McCarthy (e43a42bf) * Ensure pop_data is freed for mailbox and fetch-mail usage. was only free'ing the container and not the auth_list or timestamp used in authentication. Mailbox usage was never free'ing the pop_data object. Create a pop_free_pop_data() helper and use that in usage where the pop_data was being free'd before. Since the pop code always allocates and assigns a new pop_data object after each mutt_conn_find(), add a call to pop_close_mailbox() too. Just to make sure, reset connection->data before free'ing the pop_data in each case. M pop.c 2022-08-25 13:23:43 -0700 Kevin McCarthy (c46db2be) * Add error handling for cert prompts in batch mode. It looks like there are no batch mode checks before trying to throw up a curses menu for certificate prompts. This currently affects SMTP, and I guess either hasn't been an issue or people just learned to work around it. Mutt has no great way to deal with this, so at least for now display an error and abort verification gracefully as opposed to whatever was happening before (which could not have been pretty). Alas, this breaks my rule of adding translation strings in stable, but I couldn't find another appropriate string. M mutt_ssl.c M mutt_ssl_gnutls.c 2022-08-22 09:24:19 -0700 Ivan Vilata i Balaguer (56f1d398) * Updated Catalan translation. M po/ca.po 2022-08-07 10:20:17 -0700 Kevin McCarthy (4927240d) * automatic post-release commit for mutt-2.2.7 M ChangeLog M VERSION 2022-08-07 10:15:32 -0700 Kevin McCarthy (7b41537e) * Update UPDATING file for 2.2.7 release. M UPDATING 2022-08-02 20:51:17 -0700 Kevin McCarthy (40228035) * Fix mutt_read_rfc822_line() to use is_email_wsp(). ISSPACE() uses isspace() which is locale-dependent. On some platforms, unexpected 8-bit chars, such as 0xa0 or 0x85 return true. When using $edit_headers, this can result in Subject: lines being truncated if a multi-byte character ending in one of these values is at the end of a line. There are probably other bugs that could be triggered by this, such as in IMAP parsing. However, I need more time to investigate before making large-scale changes that could introduce new bugs. M parse.c 2022-08-04 10:25:26 +0200 Matthias Andree (4d2b33ba) * Drop X509 *cert from sslsockdata, unused. Signed-off-by: Matthias Andree (cherry picked from commit 0d03501ac9ddd1a4a62a7274651d64da0c4c3865) M mutt_ssl.c 2022-07-29 19:52:45 -0700 Kevin McCarthy (a1a08067) * Change mutt_display_message() $pager to use %s if present. Other places in the code all use mutt_do_pager(), which uses mutt_expand_file_fmt(). The use of %s was not documented (and likely not used since it's broken when displaying messages), so add documentation to the $pager option. M commands.c M init.h 2022-07-29 10:40:33 -0700 Kevin McCarthy (4f672027) * Overide SSL_CTX min/max protocol versions. Newer versions of OpenSSL disable old (insecure) protocols by default. Reset the allowed versions, so that Mutt's configuration variables enabling old protocols actually work if needed. Thanks to Matthias Andree for the patch, which this commit is based upon. M mutt_ssl.c 2022-03-04 15:26:56 -0800 Kevin McCarthy (b022931d) * Tighten $query_command parsing to allow empty name field. The documentation writes the output should be "each line containing a tab separated address then name then some other optional information". The wiki page at also implies a single tab between each field. Since the function used strtok, consecutive tab delimeters were treated as a single delimiter. This caused a missing name field to use the comment field as the name. Change the function to use strchr instead. This is not without risk, as the functionality is old. Who knows what all programs have been written that might assume initial, or multiple delimiters are acceptable... Thanks to Magnus Groß for reporting the problem along with a patch, which this commit is derived from. M query.c 2022-07-10 14:58:40 +0200 Matthias Andree (135fb67e) * version.sh: fix robustness on git failure for instance, with untrusted directory under sudo. Signed-off-by: Matthias Andree M version.sh 2022-07-17 22:20:12 +0200 Matthias Andree (607efef7) * de.po: Fix German certificate dialog translation. Remove the full-stop to ensure reader will continue reading rather than mistake this as a conclusion. Also, from: to: here translate to von: bis: (not an: which would be spatial not temporal). Finally, fix a mistranslation where SHA256 was translated as SHA1 Reviewed by: Helge Kreutzmann Signed-off-by: Matthias Andree M po/de.po 2022-07-06 14:39:42 -0700 Kevin McCarthy (0614c38c) * Comment out undesirable default settings in smime.rc. Some distributions, such as Debian, use the contrib/smime.rc as a default system configuration file (under /etc/Muttrc.d). However settings such as $smime_is_default and $crypt_autosign should not be enabled by default for everyone. Debian previously maintained a patch against the file, commenting out those settings, but the patch somehow got dropped and is causing confusion for Debian users. Since the settings aren't necessarily desirable for anyone who wants to use S/MIME, comment them out in the contrib file. M contrib/smime.rc 2022-06-09 09:22:03 -0700 Kevin McCarthy (97f8eee2) * Decrypt S/MIME when mime-forwarding with $forward_decrypt set. The code was performing a decode for S/MIME, but this had the effect of running attachments through the autoview routines. Change so it only performs a decrypt. This is also how copying is handled in set_copy_flags(), so I believe the decode was just a mistake. M sendlib.c 2022-06-05 11:20:00 -0700 Kevin McCarthy (d1ee1314) * automatic post-release commit for mutt-2.2.6 M ChangeLog M VERSION 2022-06-05 11:13:47 -0700 Kevin McCarthy (42c9d1ea) * Update UPDATING file for 2.2.6 release. M UPDATING 2022-05-27 14:58:23 -0700 Kevin McCarthy (44636260) * Fix $pgp_sort_keys sorting. Both gpgme and pgpkey used nonsensical comparison return values, for example: "return r > 0". Adjust numeric comparisons to use mutt_numeric_cmp() and have the comparator return the result of the actual comparison. Adjust the "trust" sorting of gpgme to be the same as classic-pgp: putting restrictions at the bottom, but reverse sorting validity, length and timestamp values so they come first in the list. M crypt-gpgme.c M pgpkey.c 2022-05-22 19:03:33 -0700 Kevin McCarthy (818ea32c) * Adjust browser and sidebar numeric sorting to use mutt_numeric_cmp() Large values shouldn't use subtraction into an integer return type, so just convert all of them to use the macro, to be safe. M browser.c M sidebar.c 2022-05-27 13:24:11 -0700 Kevin McCarthy (f8336984) * Fix mbrtowc() error handling in mutt_which_case(). The function did not reset the increment value on a -2 return value. Increase the maximum conversion size to the string length, and check for -2. Since we're looking at the whole string, we can then just terminate the loop on either value, assuming a case-sensitive search. mbrtowc() will return -2 if passed n==0, so add an explicit check for the end of string and a positive n count. M pattern.c 2022-05-27 13:22:22 -0700 Kevin McCarthy (def28317) * Fix mbrtowc() error handling in check_alias_name(). The function did not reset the increment value on any error. Increase the maximum conversion size to the string length, and check for -2. Since we're looking at the whole string, we can then just terminate the loop on a -2 return value. M alias.c 2022-05-26 11:29:15 -0700 Kevin McCarthy (51c67ba9) * Convert my_width() to use mbrtowc(). This allows handling a single corrupted character vs an incomplete multibyte character differently, as other parts of Mutt do. M sendlib.c 2022-05-25 20:59:39 -0700 Kevin McCarthy (ca960228) * Fix header folding my_width() calculation. After calculating the width of a character, the routine would only increment the string pointer by one byte. Any errors returned by mbtowc() would also increment the width by one. This means multibyte characters would overcount width by the number of bytes minus one. Change it to check the return value and use that value to increment the string pointer. Change mbtowc() to look at the whole rest of the string instead of just MB_CUR_MAX, as the manpage says even MB_CUR_MAX may not be enough in some circumstances. Since we calculate strlen, use that as well as '\0' for the loop termination check. Also check for mbtowc() returning 0 just for extra safety. Reset the internal mbstate_t before converting, and on any error. If mbtowc() returns an error, use replacment_char() as a substitue for width calcluation, as mutt_strwidth() and other parts of Mutt do. M sendlib.c 2022-05-25 09:53:07 -0700 Kevin McCarthy (67bb3d35) * Filter Arabic Letter Mark due to display corruption. Under GNU Screen, the directional marker causes display corruption in the index. This (along with past filters added) should perhaps be considered GNU Screen bugs. They've been reported upstream a while ago, but so far not received any attention. So for Mutt users' benefit it's better to filter them out for now. Thanks to Vincent Lefèvre for debugging and reporting the problem, along with providing historical information from similar past issues. M mbyte.c 2022-05-21 09:18:04 -0700 Kevin McCarthy (ceb6c4fc) * Fix browser completion path expansion to preserve a trailing slash. The browser lists the contents of a directory passed as 'f' when it has a trailing slash; without, it lists everything matching that name in the parent directory. Since the browser does its own relative path expansion, we can just use mutt_buffer_path_norel() to keep a trailing slash in 'f'. M browser.c 2022-05-21 09:07:23 -0700 Kevin McCarthy (599806a0) * Decouple expand_path() relpath vs trailing slash handling. This change was originally done for the next commit, to fix browser completion handling. However, I discovered the browser does its own relative path expansion, and could just be fixed by using the _norel() version. Still, I think this change is a good idea in any case. There may be a few more fixes needed that require relpath expansion while keeping trailing slashes. Since the number of flag parameters to expand_path would become excessive by adding a "remove_trailing_slash" paremeter, convert it to use a single 'flags' parameter instead. M hook.c M mutt.h M muttlib.c M protos.h 2022-05-20 08:51:05 -0700 Helge Kreutzmann (5006b546) * Update de.po. M po/de.po 2022-05-19 12:36:06 -0700 Kevin McCarthy (80d90e0c) * Document $sendmail invocation behavior. This variable is handled differently from other "command" variables in Mutt. It's tokenized by space and then executed via execvp(). This means spaces in command/arguments are not supported, and neither is shell quoting. I don't know if it was done this way out of some security concern, but it seems like using mutt_system() and mutt_buffer_quote_filename() for recipient arguments should at least be investigated. M init.h 2022-05-16 10:20:30 -0700 Kevin McCarthy (a8c7fba1) * automatic post-release commit for mutt-2.2.5 M ChangeLog M VERSION 2022-05-16 10:16:07 -0700 Kevin McCarthy (c94b511a) * Update UPDATING file for 2.2.5. M UPDATING 2022-05-13 15:37:58 -0700 Kevin McCarthy (6688bfbf) * Set gsasl hostname callback value. This is needed for GSSAPI, and apparently DIGEST-MD5 too. The gsasl documentation is a little confusing, saying it "should be the local host name of the machine", however the imap/auth_gss.c code seems to be using the server name, and the msmtp source also uses the server name for this callback. Thanks to brian m. carlson and Gábor Gombás for reporting this issue in Debian ticket 1010915, and an additional thanks to brian for quickly testing the fix. M mutt_sasl_gnu.c 2022-05-06 12:51:56 -0700 Kevin McCarthy (9d5db7cb) * Force IR with gsasl SMTP PLAIN authentication. Debian ticket 1010658 showed a server violating RFC 4954 by sending non-base64 data in the 334 response when Mutt sends "AUTH PLAIN" (without IR). The msmtp source also seems to force IR with PLAIN because it found other broken servers. So the best option seems to be just handling PLAIN specially for now. M smtp.c 2022-04-30 12:41:43 -0700 Kevin McCarthy (c3baa83e) * automatic post-release commit for mutt-2.2.4 M ChangeLog M VERSION 2022-04-30 12:38:09 -0700 Kevin McCarthy (4d082513) * Update UPDATING file for 2.2.4 release. M UPDATING 2022-04-30 11:11:04 -0700 Kevin McCarthy (7dec694f) * Document $header_cache behavior change wrt directories. Although not documented, Mutt would previously intepret a $header_cache value ending in '/' as a directory even if it didn't exist. The new DT_PATH normalization prevents this possibility, so a directory will need to be created in advance. I'm not fond of "fixing" regressions with documentation, but I believe this is a small issue, easily worked around for first-time use, and the benefits of the normalization are worth this small change. M doc/manual.xml.head M init.h 2022-04-28 12:48:09 -0700 Kevin McCarthy (a20ed9b4) * When expanding local paths, normalize to remove a trailing '/'. Commit 986e9e74 normalized Maildir/mh paths upon opening, to aid in mailbox comparison issues that can crop up (as the IMAP path normalization does). Unfortunately, this caused other problems in cases where users were explicitly adding a trailing '/' to their config settings, such as with buffy mailboxes, or with $spoolfile. To normalize properly, we need to do as the IMAP code does - both on the context opening, and expand_path (as imap_expand_path() and imap_fix_path() do). This also helps other cases; for example, the file browser returns entries without a trailing '/', while tab completion in the editor menu appends a trailing '/'. Right now the only regression I'm aware of is with $header_cache on first use, which I will document in the next commit. If it turns out there are more important regressions I may have to back this and the original commit out. M muttlib.c 2022-04-21 22:58:48 +0300 Emir SARI (b69aed8e) * Minor translation fixes M po/tr.po 2022-04-12 11:23:07 -0700 Kevin McCarthy (d9199322) * automatic post-release commit for mutt-2.2.3 M ChangeLog M VERSION 2022-04-12 11:14:38 -0700 Kevin McCarthy (03f8c660) * Update UPDATING file for 2.2.3. M UPDATING 2022-04-10 11:05:48 -0700 Kevin McCarthy (efe4186a) * Fix read past end of buf in is_mmnoask(). buf is size STRING while the environment variable is copied into a LONG_STRING, so lng can be past the end of buf. Swap the comparison order to make sure they match (and thus ensuring buf[lng] isn't outside the buffer). M handler.c 2022-04-09 13:32:33 -0700 Kevin McCarthy (f8264135) * Fix strlen() assigns to be of type size_t where obvious. Ticket 405 had an almost-exploit enabled by sloppy assignment of strlen(). There were more details involved, of course, but this served as encouragement to clean up obvious "strlen assignment to int" in the rest of the code. Note this is not *all* cases, only those that were simple and obvious. In some cases, the code assigns strlen() to an int but also uses that variable to hold negative values for another reason. In other cases, an API is involved (e.g. SASL) that make changing potentially dangerous. And lastly, some functions were just a bit too complicated to risk introducing a bug. M charset.c M compose.c M copy.c M crypt-gpgme.c M edit.c M handler.c M hcache.c M imap/auth_cram.c M imap/imap.c M init.c M muttlib.c M parse.c M pgp.c M sendlib.c M smime.c 2022-04-09 09:54:38 -0700 Kevin McCarthy (195bcad0) * Flush iconv() in mutt_convert_string(). The man page says this ought to be done, and other places in Mutt do so. M charset.c 2022-04-08 21:07:46 -0700 Kevin McCarthy (f58a25cc) * Add convert_string() size check. This is similar to the mutt_convert_string() fix in the last commit. In this case there was no integer overflow issue, but there was still a (remote) possibility of obl wrapping, so add a check. Also, ensure there is at least one byte to terminate ob by allocating "obl + 1" size buffer, but passing obl to iconv(). Note that mutt_convert_string() uses a multiplier of MB_LEN_MAX, while this function used 4. I thought MB_LEN_MAX might be too large, but Tavis Ormandy was able to give a counter-example (0x82 in TSCII (Tamil SCII) requires 4 3-byte UTF-8 codepoints). Convert this function to use MB_LEN_MAX, like mutt_convert_string(). M rfc2047.c 2022-04-08 20:19:27 -0700 Kevin McCarthy (f26d304b) * Fix integer overflow in mutt_convert_string(). In the case of a *very* large message header (which is possible via a compressed encrypted message) it's possible to overflow the incorrect assignment of strlen() to an int local variable. Thanks to Tavis Ormandy for the bug report and patch, which this commit is based upon. Although Tavis wasn't able to find an exploit, it was almost possible to make ob small and obl big, which would have allowed attacker control of a heap corruption. Change the strlen() to assign directly to ibl (of type size_t). This prevents signed to unsigned conversion of len to ibl, which make the attack almost possible. Note that ibl should reflect the number of bytes to be converted by iconv(), so the change of ibl to strlen() instead of (strlen() + 1) is intentional, and correct. ob is allocated with an additional byte for a trailing nul, which is appended after the conversion. M charset.c 2022-04-05 13:14:47 -0700 Kevin McCarthy (4ae494ca) * Fix uudecode cleanup on unexpected eof. Clean up iconv state and state->prefix handling instead of just returning. This is done for the other encoding handlers. M handler.c 2022-04-05 11:05:52 -0700 Kevin McCarthy (e5ed080c) * Fix uudecode buffer overflow. mutt_decode_uuencoded() used each line's initial "length character" without any validation. It would happily read past the end of the input line, and with a suitable value even past the length of the input buffer. As I noted in ticket 404, there are several other changes that could be added to make the parser more robust. However, to avoid accidentally introducing another bug or regression, I'm restricting this patch to simply addressing the overflow. Thanks to Tavis Ormandy for reporting the issue, along with a sample message demonstrating the problem. M handler.c 2022-03-25 13:07:34 -0700 Kevin McCarthy (aa28abe8) * automatic post-release commit for mutt-2.2.2 M ChangeLog M VERSION 2022-03-25 12:58:51 -0700 Kevin McCarthy (dcfbfb16) * Update UPDATING file for 2.2.2 release. M UPDATING 2022-03-05 11:17:40 -0800 Kevin McCarthy (8babf6c0) * Protect prompt completion memcpy() calls with a NULL check. The behavior of memcpy() is undefined when dest is NULL, even if n is 0. It's possible to trigger this, somewhat deliberately, for these two cases, so add a guard check. M enter.c 2022-03-05 09:31:21 -0800 Kevin McCarthy (7c8992aa) * Fix mutt.man formatting. Thanks for the fix from Mario Blättermann and the manpages-l10n project. M doc/mutt.man 2022-03-05 09:12:53 -0800 Kevin McCarthy (e65fdf56) * Fix query menu tagging behavior. rfc822_write_address() will automatically prepend ", " to the buf parameter if it is non-empty. Since query_menu() just appended ", " to buf, the '\0' marker is at "curpos + 2", and that should be passed as the offset instead. Prior to this fix, tagging would result in two comma-space separators between each tagged entry. Since rfc822_write_address() does the work too, we could just change query_menu() to pass rfc822_write_address(buf, buflen, tmpa, 0) each time. But for a stable-branch fix I'll make the smallest change. As a note, I presume this hasn't been reported because (almost) no one uses tagging in this menu. That may be because it requires hitting after tagging, which is non-intuitive. I think it would be worth changing to allow tagging and then hitting too. M query.c 2022-02-21 12:19:30 -0800 Kevin McCarthy (bce2c294) * Fix some mailbox prompts to use mailbox history ring. Commit b0570d76, in the 2.0 release, improved some of the mailbox prompt flow and logic, creating a separate function for mailbox prompting. At the same time it changed "save/copy to mailbox" to use that function and thus the mailbox history ring. Unfortunately, this created a partition between some other prompts that used the filename history ring but were actually prompting for mailboxes. Change those prompts: edit-fcc, and imap create/rename mailbox to use the mailbox history ring. This will allow values to be shared between them and prompts such as "open mailbox" and "save/copy to mailbox". Ordinarily I wouldn't commit this to stable, but that change broke at least one person's workflow badly. M compose.c M imap/browse.c 2022-02-19 10:48:43 -0800 Kevin McCarthy (c8109e14) * automatic post-release commit for mutt-2.2.1 M ChangeLog M VERSION 2022-02-19 10:42:53 -0800 Kevin McCarthy (58b6b76a) * Update UPDATING file for 2.2.1 release. M UPDATING 2022-02-17 14:38:04 -0800 Kevin McCarthy (30d18234) * Make sure username is included in header and body cache paths. Commit 960afab4 changed URL generation to preserve the data originally in the mailbox URL, to fix some internal comparison problems. Unfortunately, it also affected header and body cache generation. Since those could easily be shared across multi-muttrc situations, it's important the username be part of the pathname. Thanks to exg on the #mutt IRC channel for reporting the regression! M account.c M account.h M bcache.c M imap/command.c M imap/imap.c M imap/util.c M mutt_socket.c M pop.c 2022-02-15 00:15:28 +0300 Emir SARI (6457ac67) * Fix ambiguity in translation M po/tr.po 2022-02-12 10:57:33 -0800 Kevin McCarthy (7160e05a) * automatic post-release commit for mutt-2.2.0 M ChangeLog M VERSION M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2022-02-12 10:49:21 -0800 Kevin McCarthy (a5175478) * Set release date for 2.2.0 in UPDATING file. M UPDATING 2022-02-11 13:37:27 +0100 Grzegorz Szymaszek (cc7578a1) * Update the Polish translation for Mutt 2.2.0 M po/pl.po 2022-02-09 22:58:23 +0300 Emir SARI (1c47970f) * Improve Turkish translations M po/tr.po 2022-02-06 14:53:01 -0800 Kevin McCarthy (70958893) * Fix mutt_paddstr() to properly filter unprintable chars. The original version of this function had no "replacement character" functionality, so it simply directly called addnstr() to display the characters if everything was okay. Commit a080fd35 added replacement logic, similar to mutt_format_string(), but forgot to change addnstr to use the replacement character. This means garbage characters could goof up the mutt display, for things such as the subject in the compose menu. We could add calls to wcrtomb() like in mutt_format_string(), but mutt_addwch() already does this, and properly calls wcrtomb() a second time to add a shift sequence if needed. M curs_lib.c 2022-02-05 14:01:39 -0800 Kevin McCarthy (fe3dd705) * Change mailto_allow to be exact match only. The code was previously reusing mutt_matches_ignore(), but that allows prefixes. For mailto accepted headers we should be more picky. M url.c 2022-02-05 13:54:19 -0800 Kevin McCarthy (5c3c6e52) * Filter headers passed via the command line. The values passed via '-s' and mailto urls were not sufficiently sanitized, allowing an embedded newline that could be used to inject a header. M main.c M parse.c M protos.h M url.c 2022-02-05 09:22:44 -0800 Kevin McCarthy (d3b4ff88) * Fix mbox.man asctime(3) reference. The section number should not be part of the BR text. Thanks to @hmartink and the manpage-l10n project for the bug report! M doc/mbox.man 2022-02-04 18:33:34 -0500 Aaron Schrab (7d2a53ee) * Clarify description of $local_date_header When I reexamined the documentation of the $local_date_header option, I wasn't very confident about what it actually does. Much of what I did get from it came from a vague recollection of the discussion around when it was added, and I referred back to the commit which added this to solidify that understanding. Viewing this as a user (without looking at the internal implementation), I don't think the date is being converted, to me that implies that it was received from somewhere else in some other format; rather I'd view it as being initially generated in the local timezone. The reference to the "sender's timezone" makes me think that this would be operating on dates in messages received from other people; I've changed that to "your" to help clarify that it's about messages created locally. Finally, add information about what is done if this option is unset, along with some reasoning on why someone might want to unset this. M init.h 2022-02-02 12:51:08 -0800 Kevin McCarthy (c2ed716b) * Don't queue IMAP close commands. Commit e7df4d5a changed the close commands to queue up, on the theory that it will always be followed by a SELECT or a LOGOUT. However, performing a while in the inbox will open a *new* connection. mutt_conn_find() prepends the new conection to the Connections list. The next mailbox opened will use that *new* connection. The effect will be the queued CLOSE won't occur before that mailbox is opened, and so "\Deleted" messages won't be expunged on the server right away. If the user had $move set and reopened their $spoolfile, they would find the read messages marked for delete but not yet expunged from the server. M imap/imap.c 2022-02-02 06:47:45 -0800 Kevin McCarthy (92686e5d) * Update Finnish translation. M po/fi.po 2022-01-31 06:31:43 +0100 Flammie Pirinen (b485d04f) * update Finnish translations M po/fi.po 2022-01-30 10:15:20 -0800 Ivan Vilata i Balaguer (553f016e) * Updated Catalan translation. M po/ca.po 2022-01-30 09:21:58 -0800 Vsevolod Volkov (c7053420) * Updated Russian translation. M po/ru.po 2022-01-30 09:19:01 -0800 Vsevolod Volkov (db9ac4ad) * Updated Ukrainian translation. M po/uk.po 2022-01-29 14:24:52 -0800 Kevin McCarthy (8a6472f0) * Fix argc==0 handling. At least on Debian Linux, after invoking getopt() with argc==0, optind seems to remain at the default value of 1. mutt_dotlock was checking for optind==argc to report a missing parameter, and would end up invoking the function with the first environment variable instead. mutt, pgpewrap, and mutt_pgpring were assuming argv[0] was non-null, so just add a check and hardcode the value in that case to avoid a possible segv. mutt_pgpring allows no arguments. Its parameters to pgpring_find_candidates() would pass the environment list and a negative nhints in that case. The code seem to handle the case, but set optind=argc to be clear about it. M dotlock.c M main.c M pgpewrap.c M pgppubring.c 2022-01-29 11:46:56 -0800 Helge Kreutzmann (46ff6ccb) * Update de.po. M po/de.po 2022-01-29 09:34:04 -0800 Helge Kreutzmann (17452c87) * Update de.po. M po/de.po 2022-01-28 12:38:00 -0800 Emir SARI (7ae08fd5) * Update Turkish translations. M po/tr.po 2022-01-28 20:15:02 +0100 Petr Písař (df4eb293) * Update Czech translation for mutt-2.2.0 M po/cs.po 2022-01-28 09:34:39 -0800 Kevin McCarthy (0864ef75) * Update translation files copyright string. Thanks to Vincent Lefèvre for reminding me to do this too. M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2022-01-28 15:11:18 +0100 Vincent Lefevre (7f5ff5f2) * Updated French translation. M po/fr.po 2022-01-27 15:35:30 -0800 Kevin McCarthy (821803cd) * Fix $status_format documentation of $sort_thread_groups expando. M init.h 2022-01-27 14:29:35 -0800 Kevin McCarthy (890eb88c) * Initial draft of UPDATING file changes for 2.2.0. M UPDATING 2022-01-27 13:04:37 -0800 Kevin McCarthy (23ef6eb1) * Update source file copyright lines based on commit history. This is based on the copyright-updater script. That script only updates existing copyright lines in the headers. Other copyright is stored in the commit history. M background.c M buffer.c M buffer.h M buffy.c M hcachever.pl M send.h M sidebar.c 2022-01-27 12:18:57 -0800 Kevin McCarthy (ed65fe18) * Update manual and program copyright notices. M COPYRIGHT M doc/manual.xml.head M doc/mutt.man M main.c 2022-01-27 14:18:06 +0100 Vincent Lefevre (4f9eac94) * Updated French translation. M po/fr.po 2021-12-31 18:30:17 -0800 Kevin McCarthy (2e8b6fea) * Add very basic cd path completion. This uses existing code to partially complete, and then launch the browser for selection. Unfortunately, completing a path argument brings up other issues, such as quoting, which this currently doesn't handle. It also might be better to rotate through completions rather than launching the file brower. Add a "select directory" mode to the browser, modeled on the IMAP "enter vs select a mailbox with children" behavior: using to select the directory and to enter the directory. M browser.c M enter.c M init.c M mutt.h 2021-12-31 15:24:01 -0800 Kevin McCarthy (2362c114) * Simplify the mutt_select_file() call for MUTT_CMD completion. Flags never has both MUTT_CMD and MUTT_MAILBOX, so there is no need for the test. M enter.c 2021-12-31 15:10:25 -0800 Kevin McCarthy (bc01beeb) * Add memcpy on MUTT_CMD completion to invoke the file selector. It looks like commit 844a133f (21 years ago) accidentally removed the memcpy while refactoring, but without it the mutt_select_file() won't be called on the second tab keypress. M enter.c 2022-01-22 14:10:24 -0800 Kevin McCarthy (05b0dd2c) * Enable $rfc2047_parameters by default. 20+ years later, Mutt still gets bug reports about attachment names in 2047 encoded form. Although there is a tiny chance an attachment could legimately want to be named like that, it's far far more likely the sending MUA has incorrectly encoded the value. When a user has this problem, the "solution" is also difficult to find, unless they are initimately familiar with RFC2047 vs 2231. So I think users would benefit much more from this being set by default. M init.h 2022-01-17 15:36:55 -0800 Kevin McCarthy (4015c9a0) * Set environ for sendmail execvp() call. The code previously tried to use execvpe(), but that's a glibc extension. However, it's not hard to manually set environ before an execvp() call to accomplish the same thing. M sendlib.c 2022-01-17 09:54:11 +0100 Vincent Lefevre (fcd3d956) * Updated French translation. M po/fr.po 2022-01-14 15:17:38 -0800 Kevin McCarthy (2387728b) * Convert SMTP cyrus sasl to use buffers. Use the smtp_get_auth_response() added for gsasl, to allow multi-response lines and arbitrary length server response lines. The rfc notes that SASL lines are not constrained by the SMTP line length limits. Since everything was a bit tangled together before, change the output and base64 conversion to use buffers too. M smtp.c 2022-01-15 12:31:16 -0800 Robert Bartel (44269756) * Move hard_redraw() after sendmail invocation. If a curses gpg pinentry is displayed by the $sendmail program, the keypad() needs to called afterwards for it to re-enable function/arrow keys. M sendlib.c 2022-01-15 11:19:05 -0800 Kevin McCarthy (100d6f3b) * Revert "Add $reply_prefix." This reverts commit 9c1ce59874ce1c8e97d0c5bd71847596dafb1d50. The change is controversial, and probably ill-advised. Thanks to everyone for the feedback. M globals.h M init.h M send.c 2022-01-13 14:35:20 -0800 Kevin McCarthy (5b8e4605) * Add config.h dependency for keymap_defs.h generation. Ensure the header is regenerated if configure is re-run. The $(OPS) list might change as a result of re-configure, but the timestamps of those files won't. However, config.h will change so we can check that as a dependency. M Makefile.am 2022-01-10 17:53:09 -0800 Kevin McCarthy (4eff6049) * Force resort_init if $reply_regexp changes. Simply changing real_subj isn't enough to make sure the change is reflected in the current index. There may actually be a more subtle way to achieve this, but for now I'll just dump the subj_hash and force rethreading. M init.c M init.h 2022-01-10 14:37:06 -0800 Kevin McCarthy (9c1ce598) * Add $reply_prefix. Allow the user to modify the subject prefix used in a reply. Hopefully this would be used sparingly, but nothing prevented a user from manually modifying the prefix themselves before. M globals.h M init.h M send.c 2022-01-10 14:00:40 -0800 Kevin McCarthy (466d3b8b) * Localize $reply_regexp. This will allow translators to add additional reply prefixes common to their locale. Add more documentation to the option, to explain the parts of the regular expression. Give an example of adding more prefixes. Note that the result of this is stored in the header cache. Probably people rarely were affected by this before, but with the new localization, people may experiment and need to be aware to turn the header cache off while testing. M doc/makedoc.pl M init.c M init.h 2022-01-09 15:28:23 -0800 Kevin McCarthy (cd3a5c85) * Fix $reply_regexp default value. The default value happened to work, but didn't make logical sense. It was using a bracket expression that *included* a backslash, and left-bracket, 0-9, and again a backslash. The first ']' closed the bracket expression, and then '+' matched that 1 or more times, followed by ']'. Fortunately the whole parenthisized expression had a '*' so it would repeat matching, but as far as I can tell, it was working accidentally. Because even the fixed version is hard to understand, add some explanation of the parts to the documentation. M init.h 2022-01-09 14:57:07 -0800 Kevin McCarthy (3ca96fab) * Fix manual generation string_unescape() of backslash values. Since the values are shown as if double-quoted, backslash also needs to be properly escaped. M doc/makedoc.pl 2021-12-30 12:58:28 -0800 Kevin McCarthy (2926cf8c) * Merge branch 'stable' 2021-12-30 12:50:49 -0800 Kevin McCarthy (31b18ae9) * automatic post-release commit for mutt-2.1.5 M ChangeLog M VERSION 2021-12-30 11:09:31 +0300 Emir Sarı (da60500d) * Improve Turkish translations M po/tr.po 2021-12-28 13:42:43 -0800 Kevin McCarthy (7855611a) * Add pager REDRAW_FLOW redraw flag when popping a menu. A setting change or window resize could take place in the called menu, which will require reflowing the pager when returning to it. When converting to the menu stack, I left in manual REDRAW_FULL redraw assignments, to be cautious and because it wasn't causing an problems. However, with the REDRAW_FLOW added, the pager menu needs to have those assignments removed after a menu call. M menu.c M pager.c 2021-12-28 13:25:54 -0800 Kevin McCarthy (5c7e2bce) * Merge branch 'stable' 2021-12-27 12:59:49 -0800 Kevin McCarthy (938f91de) * Add config variable mentions to Forwarding and Bouncing Mail. Mention $forward_attribution_intro, $forward_attribution_trailer, and $forward_format. M doc/manual.xml.head 2021-12-27 12:25:24 -0800 Kevin McCarthy (752a1b44) * Merge branch 'stable' 2021-12-25 14:00:02 -0800 Kevin McCarthy (89681e9e) * Merge branch 'stable' 2021-12-23 17:30:27 -0800 Kevin McCarthy (4fd19957) * Add new gsasl files to POTFILES.in. M po/POTFILES.in 2021-12-15 17:50:00 -0800 Kevin McCarthy (68caf914) * Add GNU SASL support for authentication. It turns out Cyrus SASL's license may not be compatible with GPL programs, see Debian Bug 999672. So, add support for the GNU SASL library, using configure option --with-gsasl. I haven't touched the Cyrus SASL code in Mutt all that much in the past, but I've done my best to keep the gsasl code clean and simple. There are likely mistakes to be fixed and additions to be made, though. I queried the gsasl mailing list about the need for a socket wrapper (as is done for the cyrus code), and it seems this should no longer be needed. As long as GSASL_QOP is left at the default (qop-auth), the client should ask for authentication, and not negotiate integrity or confidentiality. (Thanks to Phil Pennock and Simon Josefsson for their reponses - although the blame is fully on *me* if this turns out to be incorrect). Therefore there is no CONNECTION wrapping in this implementation. Add multiline response support for SMTP authentication (which is probably not actually needed). Also add arbitrary line length for the SASL server responses (the RFCs note that for SASL, the protocol line lengths don't apply). M Makefile.am M ascii.h M configure.ac M doc/makedoc-defs.h M imap/Makefile.am M imap/auth.c M imap/auth.h A imap/auth_sasl_gnu.c M main.c A mutt_sasl_gnu.c A mutt_sasl_gnu.h M pop_auth.c M smtp.c 2021-12-21 18:29:26 -0800 Kevin McCarthy (e3faeb03) * Add mutt_socket_buffer_readln(). This will be useful for SMTP and POP SASL reading, where line of arbitrary length are required to be supported. M mutt_socket.c M mutt_socket.h 2021-12-20 15:37:16 -0800 Kevin McCarthy (22736484) * Merge branch 'stable' 2021-12-19 21:45:12 -0500 Mike Frysinger (a4da1664) * simplify envelope subject handling code a little Avoid excess defines. Compiled code is the same. M init.c 2021-12-14 13:36:15 -0800 Kevin McCarthy (80ba3a49) * Merge branch 'stable' 2021-12-13 18:55:14 -0800 Kevin McCarthy (f1cc1309) * Merge branch 'stable' 2021-12-11 13:22:40 -0800 Kevin McCarthy (fcecddaa) * Merge branch 'stable' 2021-12-07 14:46:12 -0800 Kevin McCarthy (ac348e19) * Merge branch 'stable' 2021-12-05 12:02:34 +0000 Torsten Franz (9dbde32c) * Update de.po M po/de.po 2021-12-02 15:44:37 -0800 Kevin McCarthy (32c03d3d) * Fix sidebar counters with $maildir_trash. On close, the sidebar decrements deleted messages, but should not when $maildir_trash is set. M mx.c 2021-12-02 15:36:59 -0800 Kevin McCarthy (29ed0c2e) * Improve the statusbar modified flag for $maildir_trash. Add a context counter for the trash status flag. Compare that to the number of deleted messages to determine modified state. Note that "undeleting" a trashed message will set context->changed. Without that we couldn't do a simple counter comparison. But with context->changed checked first, we can assume equal trash and deleted flags then means there are no "delete" modifications pending. M init.h M mutt.h M mx.c M status.c 2021-12-01 18:12:11 -0800 Kevin McCarthy (ede3cf58) * Ignore $delete when sync'ing with $maildir_trash set. When closing a mailbox, the $delete quadoption is not consulted to determine whether to write out the T flags. However, for some reason, sync was doing so. Since we aren't "purging" the messages, the prompt doesn't make sense. Make close and sync consistent by skipping the $delete check for sync. M init.h M mx.c 2021-11-24 13:51:32 -0600 Aaron Poffenberger (e8a01c1a) * Fix unused variable warning. M mutt_ssl.c 2021-11-20 14:21:29 -0800 Kevin McCarthy (04a7f1d9) * Allow an empty To: address prompt. If the user has $askcc or $askbcc configured, they may want to put addresses in those without filling in the To field. Instead check to make sure at least one of the fields is filled in after all the prompt before aborting. M send.c 2021-11-11 15:05:33 -0800 Kevin McCarthy (543e1151) * Convert COLOR_DEFAULT constant to -1. Previously, "mono" assigned -1 to fg/bg to indicate "unset" values. NCurses uses -1 to indicate "default" color (when supported), but COLOR_DEFAULT was assigned the value -2 and swapped at the last moment. While it worked, I personally found this confusing. To make the logic clearer, create a COLOR_UNSET constant with value -2, and switch COLOR_DEFAULT to -1. Then remove the last-minute translation when allocating the color. Change the "not set" initialization and testing to use COLOR_UNSET for clarity. Because map_getvaluebyname() returns -1 for a missing value, create a new lookup function that returns the matching mapping_t or NULL if not found. M color.c M init.c M mapping.h 2021-11-08 20:45:03 +0100 Charalampos Kardaris (f210e9a0) * [Fix] poll to use PollFdsCount and no PollFdsLen PollFdsLen tracks the maximum elements of the pollfd struct before needing reallocation, whereas PollFdsCount tracks the number of actual elements in it. Polling has to be done only on the actual number of elements. M monitor.c 2021-10-26 14:42:17 -0700 Kevin McCarthy (623eeb26) * Add a few mutt variable configure dependency comments. Add dependency comments to a few variables where it might not be obvious are dependent on the feature being enabled. While reviewing the dependencies, I noticed a couple #if could be indented for more uniformity in the file. M init.h 2021-10-22 18:08:48 -0700 Kevin McCarthy (75be20d6) * Fix color object case insensitive comparisons. In most of the color code, mutt_getvaluebyname() is used to compare against valid tables, which is (ascii) case insensitive. However, 'uncolor' and 'color quoted' for some reason used case sensitive comparison. The uncolor code can use object comparison instead, as the matching Fields value was just retrieve. For 'color quoted', switch to using ascii_strncasecmp() instead. M color.c 2021-10-20 14:30:48 -0700 Kevin McCarthy (9c1c9182) * Correct multipart/alternative manual section slightly. Step three only selects from enriched, plain, and then html; not _any_ text type. Step four considers any text type as one that Mutt can handle internally. M doc/manual.xml.head 2021-10-19 18:48:47 -0700 Kevin McCarthy (60ab5f11) * Add internal mutt_ctime() implementation. ctime() is marked obsolescent in the POSIX guide, so we ought to stop using it to ensure future portability. M from.c M mx.c M protos.h 2021-10-12 13:31:13 -0700 Kevin McCarthy (534f3ae0) * Improve pattern compiler whitespace skipping. Commit 564b515c fixed a problem with nested patterns, where trailing whitespace could cause a compilation error. That fix added missing SKIPWS() calls in a couple branches. However, the real problem is that the loop doesn't ensure whitespace is skipped *before* checking for *ps.dptr. Rather than relying on all the case branches (and "eater" functions) to skip the whitespace after processing, rearrange the logic so the SKIPWS() is after the switch statement. M pattern.c 2021-10-09 19:55:00 +0200 Vincent Lefevre (6270278f) * Updated French translation. M po/fr.po 2021-10-07 17:40:50 -0700 Kevin McCarthy (986e9e74) * Remove trailing slashes when opening maildir/mh mailboxes. IMAP cleans this up already (and file-based mailboxes don't allow it). It's easy to have this happen by tab-completing a maildir mailbox at the change folder prompt. Removing the slash makes the display more uniform, and prevents some problems such as $trash folder comparison. M mh.c 2021-10-07 13:02:29 -0700 Kevin McCarthy (14618717) * Note that IMAP mailboxes polling doesn't support flag counts. The IMAP protocol only supports unread and total counts, but the manual had no mention of this. M doc/manual.xml.head M init.h 2021-09-28 15:02:34 -0700 Kevin McCarthy (466432b5) * Add $attach_save_charset_convert quadoption. This prompts to allow charset conversion of received text-type attachments. Mutt automatically converts when sending to a value from $send_charset. If an attachment were automatically converted from utf-8 to iso-8859-1 on the sending side, then on the receiving side (also 99.9% likely to be utf-8 nowadays) it may not be helpful to save the the originally utf-8 attachment as iso-8859-1. This can be especially destructive for attached patches or translation updates. Add the quadoption, defaulting to ask-yes so people know about it. With a quadoption, it can be easily completely turned off or made the default if the user desires. Add code to skip the prompt if converting from ascii to extended ascii (e.g. utf-8 or iso-8859-*). There may be others too but this should cover almost all cases nowadays. M attach.c M init.h M mutt.h M muttlib.c M protos.h M recvattach.c 2021-09-25 14:28:18 -0700 Kevin McCarthy (769e5086) * Remove unneeded type save/restores around mutt_decode_attachment(). The type save/restore seems to have been copied around the other crypt code calls to mutt_decode_attachment(). Remove it, because mutt_decode_attachment() makes no such changes. Note run_decode_and_handler() *does* need to save/restore because it manually assigns to b->type itself. M crypt-gpgme.c M pgp.c M smime.c 2021-09-24 16:23:35 -0700 Kevin McCarthy (c0536334) * Improve smime_verify_one() error handling and general flow. mutt_decode_attachment() does not change offset, length, or type. The previous commit added a const modifier to its BODY parameter to assert that point. The save/restore appears to be copy/pasted from other code. The length/type are assigned to if the BODY is passed to a helper function after the decode, but that's not the case here. Remove the backup/restore code of the sigbdy fields. The smime_invoke_verify() call uses the signedfile directly, not the STATE parameter. Remove the code to swap s->fpin before calling smime_invoke_verify(). Improve the error handling to properly close file handles and unlink all temp files. M smime.c 2021-09-24 19:12:35 -0700 Kevin McCarthy (2077f72e) * Assert mutt_decode_attachment() doesn't modify body fields. Some old smime (and other parts of the code) have out of date comments asserting mutt_decode_attachment() modifies the body length, offset, and type fields. Add a const modifier to the parameter and called functions to assert this is not the case. M crypt.c M handler.c M mutt_crypt.h M muttlib.c M protos.h 2021-09-23 14:58:54 -0700 Kevin McCarthy (d0d40a33) * Don't use subtraction for qsort numeric value comparisons. Subtraction can overflow, resulting in incorrect sorts. This is especially a concern for the date and size sorting, whose fields are greater than an 'int' size. The index values should be okay, but it's better to be consistent and avoid any possible issues. Define a macro, mutt_numeric_cmp(), that uses direct comparison rather than subtraction. M imap/imap.c M lib.h M sort.c M thread.c 2021-09-23 13:29:25 -0700 Kevin McCarthy (4153ae96) * Fix alias menu multi-select documentation. The manual mistakenly said to use , which is not (and never has been) supported by the code. Change it to , and note that is bound to in the alias menu. M doc/manual.xml.head 2021-09-23 13:14:46 -0700 Kevin McCarthy (64d09812) * Implement as in index menu. The default keybindings of overshadow those of . However, for someone who rebinds (globally or just in the index menu), it's still possible to invoke inside the index. It's debatable if is the only choice in this case. For instance, in the compose menu could conceivably make use of the function. However that opens another set of issues, and as someone on mutt-users said is solving a problem no one has complained about. For now, I think is the best choice outside of displaying an error message, so make it do that. M curs_main.c 2021-09-18 13:52:45 -0700 Kevin McCarthy (c1c94be1) * Use km_error_key() in index only for OP_NULL. Like other menus, just ignore unimplemented functions. M curs_main.c 2021-09-07 12:55:23 -0700 Kevin McCarthy (960afab4) * Generate URLs with user/password as parsed. This helps ensure they match for browser sticky-cursor, sidebar, and a few other places where a path is compared against something (e.g. $trash). Add two flags that track if the user/password came from the parsed URL. If they were instead added to the account via $imap_user or $imap_pass, don't include those when generating a URL string as output. Change LSUB to also include the password, if present in the original connection URL. M account.c M account.h M imap/command.c M imap/util.c 2021-09-06 13:17:18 -0700 Kevin McCarthy (8bb11afe) * Ensure embedded IMAP passwords are stored in context->path. Without this, IMAP autoreconnect, background-edit Fcc, browser sticky-cursor, and sidebar "current" selection may not work properly. Change imap_qualify_path() to preserve the password if it is present in IMAP_MBOX for the generated URL. In almost all cases, DT_PATH types are run through mutt_pretty_mailbox(), which filters out the passwords, before displaying them in the UI. However there are a few cases where the context->path is displayed directly. Create a new function, mutt_buffer_remove_path_password() to remove it and display that instead. M browser.c M imap/imap.h M imap/util.c M muttlib.c M mx.c M protos.h 2021-09-13 04:06:02 +0200 Vincent Lefevre (d7d7b4b3) * Updated French translation. M po/fr.po 2021-09-10 13:25:58 -0700 Kevin McCarthy (49943c2a) * Merge branch 'stable' 2021-09-09 09:24:51 -0700 Kevin McCarthy (395a5a1d) * Merge branch 'stable' 2021-08-31 11:26:07 -0700 Kevin McCarthy (a6d83ff6) * Fix yesorno help prompt printing of choice. Commit d0b9bec8 added a '?' choice to print the variable controlling the prompt. However, it didn't properly relocate the cursor after hitting '?'. Make sure the "yes" or "no" is echoed in the collapsed MessageWindow. M curs_lib.c 2021-08-31 11:23:27 -0700 Kevin McCarthy (7358075a) * Add $compose_confirm_detach_first, default set. With the default keymap, hitting 'D' in the compose menu will remove parts and unlink owned files. Mutt prevents removing all the parts, but if you have added attachments, this makes it very easy mis-type and accidentally nuke the message you've been composing. This option only checks for the first part - which is highly likely the main composed message. It might be possible to try and make the check more intelligent, but I think a simple check will go a long way towards preventing disaster. M compose.c M init.h M mutt.h 2021-08-30 11:08:48 -0700 Kevin McCarthy (a5335121) * Add a comment about msn_seqset generation and header cache holes. M imap/message.c 2021-08-25 16:00:31 -0400 Craig Gallek (f0ff78a5) * Use cms utility for SMIME encryption/decryption. The openssl smime utility only supports RSA keys for encryption (more specifically, the PKCS7 container that it uses can't be used with other key types). The cms utility supports newer versions of the SMIME RFCs, including the use DH ephemeral-static algorithms for encrypting the symmetric key used during message encryption. This patch updates the suggested encryption/decryption commands, but does not change any of the commands used for signature generation/verification (as the smime sign/verify commands do support other key types). Debian seems to have already made this change[1] for the decryption path a while ago, but did not update the encryption command (current Debian patch for this file[2]). There is a slight danger of updating the decryption command at the same time as the encryption command (as clients still trying to decrypt with smime could have problems reading messages encrypted with cms), but the existence of that Debian bug seems to imply that there is already a source of messages using the newer CMS format. I verified that I am now able to encrypt a message with public key type id-ecPublicKey. Previously, this resulted in an error like: "encryption not supported for this key type:pk7_lib.c" [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639533 [2] https://sources.debian.org/patches/mutt/2.0.5-4.1/misc/smime.rc.patch/ Signed-off-by: Craig Gallek M contrib/smime.rc 2021-08-24 13:18:22 -0700 Kevin McCarthy (27e61da5) * Merge branch 'stable' 2021-08-24 12:50:53 -0700 Kevin McCarthy (fa5f8810) * Merge branch 'stable' 2021-08-24 15:17:05 +0200 Vincent Lefevre (67c16b7c) * Improve conststrings.c generation, mainly for GNU Autoconf 2.71. With GNU Autoconf 2.71, the "ac_cs_config=" line in config.status may contain sequences like '\'' when a configure argument has spaces in it, for instance CFLAGS with several options. Thus it is not sufficient to get this line with grep; one needs to eval it and output the result. GNU Autoconf 2.69 was including the whole $ac_cs_config value inside double quotes, and the previous code also had issues with configure arguments containing special characters (but spaces were fine). M Makefile.am 2021-08-24 02:29:55 +0200 Vincent Lefevre (898eb3ca) * Updated French translation. M po/fr.po 2021-08-20 13:37:39 -0700 Kevin McCarthy (a7eabb26) * Merge branch 'stable' 2021-08-20 20:43:41 +0100 Edmund Grimley Evans (2adf634c) * Update Esperanto translation. M po/eo.po 2021-08-16 18:41:23 -0700 Kevin McCarthy (4cce210a) * Add robustness checks to file attach functions. The compose fix in stable prevented an issue trying to attach a NULL filename, but the functions are called in other places. For robustness sake, add checks to the functions too. M sendlib.c 2021-08-16 18:34:00 -0700 Kevin McCarthy (b7128e2a) * Merge branch 'stable' 2021-08-11 15:02:30 -0400 Craig Gallek (3003857c) * Prompt for password when using encrypted client certificate This already worked when compiled against openssl, but not with gnutls. Signed-off-by: Craig Gallek M mutt_ssl_gnutls.c 2021-08-14 15:38:20 -0700 Kevin McCarthy (c9fa0414) * Lazily update header colors after a thread-flag update. Although there are other issues with threads and ~() color patterns, this helps with collapsed thread coloring. The thread-flag update can change the matching pattern, but that should be determined after all the thread messages are changed. For example, a collapsed thread with deleted messages and a color pattern '~v ~(~D)' should display differently after . Changing it to update colors lazily allows correct coloring (for that case). M flags.c M mutt.h M protos.h M score.c 2021-08-03 11:08:22 -0700 Kevin McCarthy (5aa75ed2) * Add $sort_thread_groups for top-level thread sorting. closes #368. Rename THREAD->sort_key to sort_aux_key, to make the fields more distinct. Add THREAD->sort_group_key for caching the top-level sort HEADER. An additional value is needed to allow propagating up values, for place-holder threads, and for "last" sort handling. Add recalc_aux_key and recalc_group_key bits to THREAD, in addition to sort_children. These are used to allow separate flagging of either the group key or aux key needing to be recalculated. Adding these two fields helped me keep better track of how the subthread sorting was working, because I'm just not as smart the people who originally wrote the threading code. :-) Fix up some of the logic with rescoring, and "first_message" to take the new config vars into account. Add %T expando to $status_format, and change the default to conditionally show the value based on whether $sort is "threads" and $sort_thread_groups is not "aux". Lastly, a thank you to Eric Blake. He implemented separate thread/subthread sorting in the NeoMutt code, after suggesting it on the #mutt IRC channel a couple months ago. When ticket 368 was opened he pointed me at his work and offered to port. However, I couldn't pass up the opportunity to learn more about the thread code myself, so I declined his offer. Although no copy/pasting was done, the basic of structure of the mutt_sort_subthreads() changes is the same, and I did look at his modifications to the function for guidance. Thank you Eric! M compose.c M curs_main.c M init.c M init.h M mutt.h M score.c M sort.h M status.c M thread.c 2021-07-31 18:34:28 -0700 Kevin McCarthy (b879daa7) * Make index sort compare functions independent from config variables. Previously, the various compare functions used the macros AUXSORT and SORTCODE internally. Those macros performed auxilliary sort using the AuxSort global, and also directly referenced SortAux and Sort to determine whether to reverse the result. This made the compare functions inflexible to handle other uses, such as $sort_thread_groups, which will be introduced in the next commit. Instead, introduce helper functions in sort.c and thread.c that call the compare functions, and have their own logic for auxilliary sort and reverse. Remove the no longer needed Sort=SortAux assignment around thread sorting, and change mutt_sort_subthreads() to reference SortAux instead. M sort.c M thread.c 2021-07-28 15:44:57 -0700 Kevin McCarthy (02298c19) * Improve generic menu type handling. Some of the menus are directly of MENU_GENERIC type. In a few places, Mutt handles those inefficiently or slightly incorrectly. Remove double "generic" lookups when Mutt is in a generic menu. Fix the help menu to not show unbound or "generic bindings" for a generic menu. For exec completion, always add generic functions to the possible completion list. M help.c M init.c M keymap.c 2021-07-25 14:45:56 -0700 Kevin McCarthy (4021ab59) * Break the menu OPS/funcs and keybindings into separate tables. Move the "extra" keybindings added manually inside km_init() into the keybinding tables instead. This allows the documentation in the manual to be generated correctly. It also corrects a small problem with duplicate OPS in the struct binding_t table. The exec completion and unbound list in the help menu iterated the active binding_t table and assumed each OP appears only once. When '\n' and '\r' were both added to the binding_t table, this broke the assumption and caused those to misbehave. M doc/gen-map-doc M functions.h M help.c M init.c M keymap.c M keymap.h 2021-07-22 15:44:42 -0700 Kevin McCarthy (f4ff768c) * Enable nonl() mode for ncurses. closes #362. This patch is based on the patch from Mike Frysinger, archived from the old trac system at: https://gitlab.com/muttmua/trac-tickets/-/blob/master/attachments/3494/mutt-enter-return-hg-6658.patch This version creates a new key symbol, for the KEY_ENTER value returned by getch(). According to Vincent Lefèvre's research, that corresponds to the "key pad" Enter key. If KEY_ENTER is not defined, it binds the symbol to "\n". It does this after the KeyNames[] definitions of and so they remain the default shown by . Since Mutt already accepts KEY_ENTER at the y/n prompt, add it for all the built-in operations too. Bindings with "\r" and "\n" in the binding_t structures don't need "" and "" to be re-specified in km_init(), so remove those. Instead add the "" bindings there. Remove unnecessary Alias menu bindings for OP_GENERIC_SELECT_ENTRY in km_init(). As a note: I don't believe non-extended key symbol bindings need to be bound inside km_init(). I'm not clear why this was done, or what purpose it serves. I'll do a bit more research, but if I can't uncover any issues, will move them inside the binding_t structures in another commit. M doc/gen-map-doc M doc/manual.xml.head M functions.h M keymap.c M main.c M mutt_curses.h 2021-07-22 12:12:15 -0700 Kevin McCarthy (e0232be7) * Revert "Silence strfcpy() warning in dotlock_deference_symlink()." This reverts commit 8970a4793c302c0bb8619a5dde56c8ca8de20532. I didn't like making this nonsensical change, just to silence the compiler. The last commit should turn off the warning for systems with memccpy(). M dotlock.c 2021-07-22 12:10:16 -0700 Kevin McCarthy (2caacce6) * Use memccpy() in the strfcpy macro if it's available. Thanks to Ian Collier for making this suggestion! It's more efficient and disables unhelpful compiler warnings about strncpy(), since strfcpy is terminating the string itself. If memccpy() is unavailable, use strncpy() but keep the old behavior of strncpy() length C instead of C-1, as I believe it tickles less compiler warnings. Add parenthesis around macro parameter uses, to be safe. Thanks to Vincent Lefèvre for pointing that out. M configure.ac M dotlock.c M lib.h 2021-07-22 11:57:32 +0200 Vincent Lefevre (abd78fb4) * Fix typo in comment and function name: deference -> dereference. M dotlock.c 2021-07-21 13:26:25 -0700 Kevin McCarthy (8970a479) * Silence strfcpy() warning in dotlock_deference_symlink(). The compiler is being a bit strange, only picking out and warning about the 'strfcpy (d, pathptr, l);' line at the bottom of the function, even though the source and dest are the same size. It seems a shame to leave just this last one, since all the other warnings (at least on Debian) have been vanquished. So, to calm the compiler down, "russian doll" the buffer size down the call stack "dotlock_dispatch() -> dotlock_prepare() -> dotlock_deference_symlink()". M dotlock.c 2021-07-19 10:21:16 -0700 Kevin McCarthy (3f9e99b2) * Add dprint for a backtick expansion with non-0 exit code. We don't want to abort, because that would change long-standing behavior, and in some circumstances a non-0 exit code might be expected. However, to make a potential unexpected problem easier to debug, add a dprint. This is also the behavior of mutt_FormatString() for a format pipe. M init.c 2021-07-17 15:34:41 -0700 Kevin McCarthy (1588a078) * Use SEEK_SET and SEEK_END for fseek/fseeko whence parameter. Thanks to Vincent Lefèvre for pointing out the incorrect usage. POSIX does not specify the actual values (although they are evidently commonly in use). M attach.c M buffy.c M copy.c M crypt-gpgme.c M crypt.c M edit.c M handler.c M listmenu.c M mbox.c M pager.c M parse.c M pattern.c M pgp.c M postpone.c M sendlib.c M smime.c 2021-07-16 14:00:01 -0700 Kevin McCarthy (df727efb) * Rewrite mutt_apply_replace() to use buffers. This removes the size truncation limit. It also removes a compiler warning about strncpy truncation. M muttlib.c 2021-07-13 14:43:47 -0700 Kevin McCarthy (f80f3ea1) * Increase scratch buf size in mutt_canonical_charset(). This siliences warnings about the destination being smaller than the source when copying. M charset.c 2021-07-13 14:27:30 -0700 Kevin McCarthy (a6047765) * Change hdrline make_from(_addr) to use snprintf for from. The other fields all use snprintf(). For some reason the strfcpy in this case is tickling a compiler warning, so change the from to use snprintf too. M hdrline.c 2021-07-13 13:15:38 -0700 Kevin McCarthy (658e8e94) * Silence compiler warning in _mutt_buffer_select_file(). Using a constant offset apparently allows the compiler to be smart enough to detect a potential problem, but it isn't smart enough to see we've already determined lastdirlen is non-zero. M browser.c 2021-07-12 19:40:08 -0700 Kevin McCarthy (6ecdb091) * Use memcpy in fseek_last_message() instead of strncpy. We are copying raw bytes and don't care about embedded nuls, so eliminate a compiler warning by using memcpy. BUFSIZ is guaranteed to be at least 256. Adjust the weird BUFSIZ + 9 size, which was added by an old commit 86f376dc that appears to have been a dead end. Also remove the no longer relevant comment next to the strncpy. Although it may be "safer" to use strlen() for the mutt_strncmp() parameter, the code is performing this comparison over and over. We already hardcode 7 in the buffer size and memcpy. So, make this loop faster by hardcoding it here too. M buffy.c 2021-07-12 18:22:42 -0700 Kevin McCarthy (9b0a2631) * Fix mutt_sasl buffer size to hold ip_port strings. The output buffer wasn't quite big enough to hold the maximum size input buffer. M mutt_sasl.c 2021-07-12 18:06:01 -0700 Kevin McCarthy (10ef9aae) * Silence imap_make_date() warning by switching to a BUFFER. M imap/imap_private.h M imap/message.c M imap/util.c 2021-07-12 17:39:00 -0700 Kevin McCarthy (1977fbb4) * Silence compiler "may be uninitialized" warnings. For both of these cases, there is no actual bug. But set them to 0 to make the compiler happy. M copy.c M imap/message.c 2021-07-17 15:13:44 -0700 Kevin McCarthy (2803adb2) * Merge branch 'stable' 2021-07-12 11:03:58 -0700 Kevin McCarthy (a1e71e64) * Merge branch 'stable' 2021-07-12 10:41:50 -0700 Kevin McCarthy (d5e626ce) * Merge branch 'stable' 2021-07-09 17:52:32 +0200 Vincent Lefevre (2a9220b2) * Updated French translation. M po/fr.po 2021-07-09 06:09:48 -0700 Kevin McCarthy (6e7b6436) * Merge branch 'stable' 2021-07-06 13:12:50 -0700 Kevin McCarthy (d0b9bec8) * Add a help choice '?' to the yes or no prompt for quadoptions. The prompt currently just prints "See $%s for more information." where %s is the variable name. This will at least give a pointer to what variable can be adjusted to change the prompt behavior. A handful of boolean variables also control prompt display. Add a help choice for those too using the function mutt_query_boolean(). M crypt-gpgme.c M curs_lib.c M curs_main.c M imap/imap.c M imap/message.c M init.c M muttlib.c M pgp.c M protos.h 2021-07-01 14:20:17 -0700 Kevin McCarthy (ab6bbb5b) * Filter out group delimiters for encrypt keylist generation. The group display-name and end delimiter shouldn't be included when generating the keylist. Also, filter them out for autocrypt operations. M autocrypt/autocrypt.c M crypt.c M protos.h M sendlib.c 2021-07-01 07:36:40 +0200 Aitor Soroa (9923ee67) * contrib/markdown2html: properly deal with lead-ins When matching lead-ins, make sure they are not quoted. M contrib/markdown2html 2021-07-01 07:34:34 +0200 Aitor Soroa (6943c01d) * contrib/markdown2html: properly deal with missing context Check that the proper variables exist e.g. "if prev is not None" instead of "if not prev". The latter causes malcfunctions when the variable is an e,pty string. M contrib/markdown2html 2021-07-01 07:49:50 +0200 Aitor Soroa (f891746f) * contrib/markdown: fix bug when dealing with quotelead classes The script tries to match previously written '

{.quotelead}' string without success, as '

' gets converted to '<p>' when creating the HTML version. M contrib/markdown2html 2021-06-30 20:25:45 +0200 Vincent Lefevre (9888ab2f) * Exit with a failure for any usage or version write error. M main.c 2021-06-30 17:04:20 +0200 Vincent Lefevre (1d2061b2) * Really fix usage and version write error checking. This had to be done for 'mutt -vv' too (in addition to -h and -v). No longer set errno = 0, unneeded due to the ferror() test. See issue #358. M main.c 2021-06-30 13:50:23 +0200 Vincent Lefevre (768ba86a) * Fix usage and version write error checking. "fflush (stdout)" is needed to detect most errors (only a closed stdout could be detected otherwise). A ferror test is also needed to avoid false positives since the C standard allows errno to be set even in the absence of errors. M main.c 2021-06-29 13:23:09 -0700 Kevin McCarthy (e6bcc2de) * Add usage and version write error checking. 'mutt -v' and 'mutt -h' did not check to ensure output actually printed to stdout. Technically, this is a lazy check, because many things can set errno, and it only checks errno at the end, rather than the return value of each write call. I'm compromising correctness for code readability in this case, given these are just help and version output commands. M main.c 2021-06-29 12:29:42 -0700 Kevin McCarthy (72fecfd6) * Check stdout is a terminal in curses mode. Mutt uses the standard initscr(), which writes to stdout. Ensure it's available (e.g. hasn't been closed or redirected). M main.c 2021-06-28 15:11:24 -0700 Kevin McCarthy (b5359339) * Add a hard redraw after oauth authentication. The sample contrib program can use gpg to decrypt a token. This may pop up a curses agent prompt, requiring a hard redraw. It may be that we should be calling a hard redraw after any fork/exec. I don't know if this will cause more problems, so for now I'll just patch this one place. But that is something to consider. M account.c 2021-06-28 15:07:15 -0700 Kevin McCarthy (e985ad2a) * Fix classic pgp decrypt_part() hard redraw on error. Ensure the hard redraw is set even if the decryption fails. The agent prompt still may have appeared. Since we don't need to set environment variables afterwards, directly check the OPTUSEGPGAGENT option for the post-check. M pgp.c 2021-06-20 14:33:36 -0700 Kevin McCarthy (5cc548e1) * Merge branch 'stable' 2021-06-18 14:53:12 -0700 Kevin McCarthy (80ed1d85) * Reset SIGPIPE signal handler in child process before exec(). Ignored signals, such as SIGPIPE in Mutt, are inherited by child processes. This can cause incorrect behavior in filter-like programs that expect SIGPIPE to be the default value of "Term". A couple other places in Mutt already reset SIGTERM, SIGTSTP, and SIGCONT, with a comment mentioning it really wasn't necessary. Since I don't much like messing with signals, I'll leave those resets in. Extract those plus SIGPIPE into a new function, mutt_reset_child_signals() and add that before each exec call. Thanks to Vincent Lefèvre for reporting the issue and for the initial patch, which this commit is based upon. M background.c M filter.c M mutt_tunnel.c M protos.h M sendlib.c M signal.c M system.c 2021-06-13 15:56:58 +0200 Rene Kita (9155c657) * Add $pager_skip_quoted_context option. Using the first unquoted line becomes the new top line displayed in the pager. This leaves the user with no context to know what the answer refers to. Add an option to keep some lines of context when using . With $pager_skip_quoted_context set to 5, will show at most 5 lines of the previous quote. If the previous quote is shorter than 5 lines the whole quote will be displayed. This option defaults to 0 to remain backwards compatible. M globals.h M init.h M pager.c 2021-06-17 02:08:09 +0200 Vincent Lefevre (4595cdb6) * Updated French translation. M po/fr.po 2021-06-13 14:58:47 -0700 Kevin McCarthy (86700b01) * Suggested translation changes. These were forwarded to mutt-po by Helge Kreutzmann, from his translation team. I've added comments to a couple places where the meaning was unclear. M OPS M autocrypt/autocrypt.c M compose.c M edit.c M muttlib.c M pattern.c M pop.c 2021-06-13 14:16:44 -0700 Kevin McCarthy (94d0285c) * Merge branch 'stable' 2021-06-13 14:12:30 -0700 Kevin McCarthy (3cf7a149) * Directly add full mailbox to GPG search hints. The code previously called (crypt/pgp)_add_string_to_hints(), which performs a strtok() using " ,.:\"()<>\n" and discards parts of size 3 or less. This makes sense for personal fields, and random "stuff" entered in the getkeybystr() prompt. But it doesn't make a lot of sense for the mailbox. There's no advantage I can see in chopping off and discarding the domain name for getting more relevant results. Ordinarily, I wouldn't bother fixing this, but in ticket 354 someone is experimenting with alternative backends, and they would like the full email address listed in the hints. M crypt-gpgme.c M pgpkey.c 2021-12-30 12:47:09 -0800 Kevin McCarthy (6fbb59cf) * Update UPDATING file for 2.1.5. M UPDATING 2021-12-27 13:45:21 -0800 Kevin McCarthy (a89a677c) * Reflow pager when setting $wrap. I somehow missed $wrap when adding commit 0636c24b. Lineinfo needs to be recomputed since color matching can change with the line wrapping change. M init.h 2021-12-26 15:43:27 -0800 Kevin McCarthy (c74cbba7) * Include before invoking tigetstr() and tigetflag(). On NetBSD, a segv was occurring in mutt_ts_capability() because tigetstr() was implicitly declared and thus defaulted to return type int. The 8-byte (char *) actually returned was being converted to a 4-byte int before being assigned to the (char *) variable. This resulted in a corrupted pointer, causing a segv when dereferenced. I thought C99+ should warn about implicit declarations. Although configure.ac AC_PROG_CC_C99 asserts the compiler can handle C99, perhaps it doesn't put the compiler in the mode to strictly enforce it. (Thanks to rkta on IRC for the input). The solution, as the man page notes, is to include before invoking those functions. Unfortunately term.h pollutes the namespace with all sorts of defines. Currently that include columns and lines, which are used inside Mutt. To help prevent issues, create Mutt wrappers for the functions and split them into a separate file, curs_ti_lib.c, that #include , rather than just adding #include to mutt_curses.h Apparently on some older platforms, #include would also include term.h, so make sure columns in undef'ed in mutt_curses.h. (I think we would have heard about that problem already, but just in case.) A huge thank you to rahl on IRC for debugging this issue, and working with me over IRC to test various suggestions until the issue was found. I didn't have access to a NetBSD instance, so rahl saved me much time and effort, and was crucial to fixing this bug. M Makefile.am M configure.ac M curs_main.c A curs_ti_lib.c M keymap.c M mutt_curses.h M po/POTFILES.in 2021-12-24 21:12:58 -0800 Kevin McCarthy (f58795c9) * Fix mutt_ts_capability() fallback list loop. The for loop termination check should be '*termp', not 'termp'. termp starts as &known[0], so to check for the NULL terminator, we need to look at *termp. Since *termp is now checked in each loop, it no longer needs to be in the if check inside the loop, so remove it there. This hasn't been blowing up because the mutt_strncasecmp() check inside the loop was also incorrect. It should be scanning for a matching entry, but was looking for non-zero (nonmatching) retval. Since term can't match both the first and second entries, it would always return 1 and would never get to the loop NULL terminator. M curs_main.c 2021-12-20 14:13:29 -0800 Kevin McCarthy (c60ffa27) * Fix SMTP response text potential buffer overread. mutt_socket_readln() returns the number of bytes, including the '\0'. smtp_code() only verifies 4 bytes (or a minimum strlen() of 3). The smtp_get_resp() and smtp_auth_sasl() were both looking at "buf+4" without verifying the string went past "buf+3". Note RFC 4954 and 5321 say there should be a trailing space on a response code with no text. But if the server neglected that, buf+4 would try to read or decode past the read data. M smtp.c 2021-12-13 19:31:04 -0800 Kevin McCarthy (5b318bc8) * Space unstuff flowed text for $send_multipart_alternative_filter. Mutt tries to hide the format=flowed stuff/unstuff processing from the user in other cases (when editing, viewing, piping, and printing, for instance). It should also do this when piping the content to the alternative filter. M compose.c M protos.h M send.c M sendlib.c 2021-12-13 15:43:00 -0800 Kevin McCarthy (91474fdf) * Don't force SMTP authentication without a username or client cert. See Debian bug 1001013. This is a regression from commit 191b0513, which fixed SMTP client certification authentication (see GitLab ticket 336). However, that commit assumed the server wouldn't advertise AUTH if it wasn't needed, which the Debian ticket shows is not always the case. Client certificate support still relies on AUTH properly being set. Add a check for either the username or a cert before calling smtp_auth(). The username check was removed by the above mentioned commit, but more importantly the username is no longer set by the OpenSSL/GnuTLS client cert code. (Which was the main problem addressed by the commit). So there shouldn't be an issue with adding the username check back. M smtp.c 2021-12-11 13:15:27 -0800 Kevin McCarthy (93ef06ae) * automatic post-release commit for mutt-2.1.4 M ChangeLog M VERSION 2021-12-11 13:11:39 -0800 Kevin McCarthy (138abb63) * Update UPDATING for 2.1.4. M UPDATING 2021-12-07 14:28:18 -0800 Kevin McCarthy (cc117960) * Loosen imap_open_mailbox() SELECT response data parsing. DavMail is putting more than one space between '*' and the EXISTS count, e.g. '* 5 EXISTS' Strictly speaking, this is disallowed by RFC3501 (see Section 9, Note 2). However, there is also no good reason for imap_open_mailbox() to be stricter than the untagged handler, which correctly extracts the count. Add a check to make sure we are looking at an untagged response, and then use imap_next_word() rather than just incrementing by two. Thank you to Michael Gernoth (@stargo) for debugging this issue, creating a merge request with a possible fix, and helping to test this commit. M imap/imap.c 2021-09-10 13:18:49 -0700 Kevin McCarthy (987dde4c) * automatic post-release commit for mutt-2.1.3 M ChangeLog M VERSION 2021-09-10 13:12:50 -0700 Kevin McCarthy (a7d54a9f) * Update UPDATING for 2.1.3. M UPDATING 2021-09-08 09:29:09 -0700 Kevin McCarthy (a547111a) * Reduce sorting when expunging QRESYNC VANISHED records. There is no need to perform expensive sorting (e.g. by thread), which will just need to be done again after the mailbox is opened. M imap/message.c 2021-09-08 07:37:37 -0700 Kevin McCarthy (57c1017d) * Clean up more context fields on a QRESYNC reset. Reset ctx->size. Clear all hash structures. Currently imap_expunge_mailbox() triggers a resort, which can populate some of these hashes. The next commit will change that, but it's better to make sure there are no remnants in any hashes to avoid memory corruption. M imap/message.c 2021-09-08 04:15:11 -0700 Kevin McCarthy (1c819fd6) * QRESYNC: don't increment msn for missing headers. Commit 74ce032f moved the msn increment outside the check for a missing header. The idea was that a header-cache hole needed to be accounted for. However, a header can also be missing just by a VANISH happening the last time the mailbox was open. Since the header won't be in the uid_hash, cmd_parse_vanished() can't decrement subsequent msns, so it need to be done in this loop. If there is a header cache hole, or another problem, verify_qresync() will detect a problem and try again without QRESYNC. However if there were an actual stored "blank", do increment, since there was no UID to process a vanish on. M imap/message.c 2021-09-07 21:42:07 -0700 Kevin McCarthy (fa2fef46) * Fix compare_uid() to work with large UID values. The function was pulled from the other sort methods used in mutt. But those don't work properly for a 32-bit unsigned value. If the difference between two UID values is greater than a signed int can represent, it will sort improperly. Some of the other sort functions need to be fixed too, but that can be done in master. M imap/imap.c 2021-08-24 12:58:36 -0700 Kevin McCarthy (9a92dba0) * automatic post-release commit for mutt-2.1.2 M ChangeLog M VERSION 2021-08-24 12:54:51 -0700 Kevin McCarthy (a86338a8) * Update UPDATING file for 2.1.2. M UPDATING 2021-08-21 18:42:33 -0700 Kevin McCarthy (74ce032f) * Preserve QRESYNC seqset holes when restoring from header cache. It's possible for there to be holes in the MSN sequence, and also in the header cache. When iterating through the seqset, preserve those by incrementing msn even if the result isn't found in the header cache (because it is 0 or because the record is missing in the header cache). M imap/message.c 2021-08-21 14:55:43 -0700 Kevin McCarthy (b0f54225) * Don't include inactive messages in msgset generation. Currently only deleted messages that will be expunged are marked inactive, so it shouldn't be an issue. However, before the previous commit (changing sorting by UID), I think there was a possibility for a bug if trailing expunge-marked messages with MAXINT index were also marked inactive. The sort change fixes that, but to make the code clearer just remove the possibility of inactive messages being included. M imap/imap.c 2021-08-21 13:00:12 -0700 Kevin McCarthy (647efbd1) * Sort headers by UID when generating a msgset sequence. When there is a hole in the header cache, the UID numbers are no longer guaranteed to increase with the index. This can result in incorrect msgset values being sent to the server. Thanks to Pieter-Tjerk de Boer for reporting this problem, with a detailed description of the problem, and a suggested patch. Note to backporters: * this patch depends on the imap_disallow_reopen() added in commit 6051760c2cf492ada1e06d910c0c2c05607c08bc for release 1.13.4. * the bug was introduced in release 1.9.0 so there is no need to backport earlier than that. M imap/imap.c M sort.h 2021-08-21 12:21:25 -0700 Pieter-Tjerk de Boer (44f2619c) * Reset msn_begin on a QRESYNC failure retry. Since the msn_index will be regenerated differently, Mutt needs to scan for holes again. M imap/message.c 2021-08-20 13:28:55 -0700 Kevin McCarthy (a54bb201) * Properly free mail_followup_to when resending a message. This one has been in the code for quite a while! Use the address free function to free all the parts instead of just FREE(). M postpone.c 2021-08-16 18:31:11 -0700 Kevin McCarthy (eda54c6b) * Improve attach files handling of empty value. Hitting enter at the attach files prompt will still allocate an entry in the attachment array. It might make sense to "abort" inside the prompt for that case, but it's a change of behavior to have the prompt do so. Instead, have the compose menu prompt skip NULL values. M compose.c 2021-07-13 14:44:29 -0700 Kevin McCarthy (6c0f75cc) * Fix strfcpy copy size in mutt_get_default_charset(). If AssumedCharset contained a ':', the value could be larger than fcharset. Ensure it's properly truncated. This also fixes a compiler warning. M charset.c 2021-07-13 14:30:33 -0700 Kevin McCarthy (19bdc79f) * Use strfcpy for edit_envelope() user-header subject. strncpy could leave an untruncated string. M send.c 2021-07-13 14:22:38 -0700 Kevin McCarthy (6637beb9) * Fix mutt_label_message to use strfcpy(). strncpy could leave an unterminated string. M headers.c 2021-07-12 10:56:15 -0700 Kevin McCarthy (e2a89abc) * automatic post-release commit for mutt-2.1.1 M ChangeLog M VERSION 2021-07-12 10:47:48 -0700 Kevin McCarthy (878e0388) * Update UPDATING file for 2.1.1 release. M UPDATING 2021-06-28 15:11:24 -0700 Kevin McCarthy (27f0a450) * Add a hard redraw after oauth authentication. The sample contrib program can use gpg to decrypt a token. This may pop up a curses agent prompt, requiring a hard redraw. It may be that we should be calling a hard redraw after any fork/exec. I don't know if this will cause more problems, so for now I'll just patch this one place. But that is something to consider. M account.c 2021-06-28 15:07:15 -0700 Kevin McCarthy (4035e100) * Fix classic pgp decrypt_part() hard redraw on error. Ensure the hard redraw is set even if the decryption fails. The agent prompt still may have appeared. Since we don't need to set environment variables afterwards, directly check the OPTUSEGPGAGENT option for the post-check. M pgp.c 2021-07-09 11:49:26 +0200 Alexander Sulfrian (94f5f35a) * listmenu: Fix parsing of list headers for mbox The parsing of the headers needs to skip the "From " lines at the start of the messages in mbox format. This now uses the same logic like mutt_read_rfc822_header in parse.c. M listmenu.c 2021-06-19 14:08:59 -0700 Kevin McCarthy (f5ccd687) * Fix menu.c sigwinch handling order. This fixes problems with a sigwinch that occurs during an external process, such as during a query menu lookup, or after exiting the background-edit landing page. Without this change, the user would see a misdrawn screen and would need to press a key first. Change it so that the SigWinch flag is handled before reading input, so that the page is automatically redrawn. This matches the behavior in the index, pager, and background-edit process list menu. M menu.c 2021-06-13 14:16:06 -0700 Kevin McCarthy (e1dfc2c4) * Fix getkeybyaddr() debug output. Add a NONULL wrapper and a newline at the end. M crypt-gpgme.c M pgpkey.c 2021-06-12 12:38:19 -0700 Ivan Vilata i Balaguer (9629d5d6) * Update Catalan translation. M po/ca.po 2021-06-12 10:48:43 -0700 Kevin McCarthy (4b100969) * automatic post-release commit for mutt-2.1.0 M ChangeLog M VERSION M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2021-06-12 10:40:18 -0700 Kevin McCarthy (bfccf9c6) * Update UPDATING file for 2.1.0 release. M UPDATING 2021-06-07 10:15:24 -0700 Vsevolod Volkov (0b2be236) * Updated Russian translation. M po/ru.po 2021-06-07 10:14:14 -0700 Vsevolod Volkov (6b458ebd) * Updated Ukrainian translation. M po/uk.po 2021-06-05 13:49:57 -0700 Kevin McCarthy (e8792708) * Minor UPDATING file fixes. M UPDATING 2021-06-05 13:48:05 -0700 Kevin McCarthy (bab86bf4) * Mention in the new-mail documentation. Add to the sentence mentioning '-y'. M doc/manual.xml.head 2021-06-03 10:40:22 +0200 Grzegorz Szymaszek (6a7f32a6) * Update the Polish translation for Mutt 2.1 M po/pl.po 2021-05-31 16:55:39 +0200 Petr PísaÅ™ (732efe2e) * Update Czech translatation for mutt-2.1.0 M po/cs.po 2021-05-30 10:20:50 -0700 Helge Kreutzmann (f0a64564) * Update de.po. M po/de.po 2021-05-29 12:39:25 -0700 Helge Kreutzmann (b37d5aa1) * Update de.po. M po/de.po 2021-05-29 12:38:04 -0700 Kevin McCarthy (c728976c) * Revert "Update de.po." This reverts commit e450615f5b0a77539916d9e8542c9a64bca73c09. Author was not properly attributed. Will reapply with author set. M po/de.po 2021-05-29 12:14:30 -0700 Kevin McCarthy (e450615f) * Update de.po. M po/de.po 2021-05-28 21:21:32 +0200 Flammie Pirinen (3d24855d) * Update Finnish translation M po/fi.po 2021-05-28 20:48:58 +0200 Eike Rathke (36fb911f) * Do not set From reverse name on postponed or to be resend messages Messages to be resend or resumed from postponed already had reverse names and alternates evaluated the first time they entered the compose menu and send-hook were already executed then. The user may also had edited the From to any other content before postponing or sending the message. Upon resuming, do not overwrite with a reverse_name lookup and do not remove the real name if reverse_realname=no is set. This restores the old behaviour and fixes the regression introduced with commit 961cf4bed679d9495cc3682d18496a53061d4581 CommitDate: Mon Feb 1 14:00:56 2021 -0800 Apply $reverse_name when tag-reply/forwarding too. M send.c 2021-05-28 20:29:03 +0300 Emir Sarı (ddd292b8) * Update Turkish translations M po/tr.po 2021-05-28 14:23:37 +0200 Greg Kroah-Hartman (88845a41) * fix gcc-11 build warnings for H_TO_INTL() The macro H_TO_INTL() in mutt_idna.c, causes a lot of build warnings about the indentation of the if () line to try to warn the developer that it looks like this might be a bug: mutt_idna.c: In function ‘mutt_env_to_intl’: mutt_idna.c:327:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 327 | if (tag) *tag = #a; e = 1; err = NULL; \ | ^~ mutt_idna.c:333:3: note: in expansion of macro ‘H_TO_INTL’ 333 | H_TO_INTL(return_path); | ^~~~~~~~~ mutt_idna.c:327:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 327 | if (tag) *tag = #a; e = 1; err = NULL; \ | ^ mutt_idna.c:333:3: note: in expansion of macro ‘H_TO_INTL’ 333 | H_TO_INTL(return_path); | ^~~~~~~~~ This goes on for many lines. Fix this up by properly indenting the lines so that gcc "knows" we mean well here. M mutt_idna.c 2021-05-28 14:38:41 +0300 Maxim Tarasov (76276257) * Trim the ToC for the option list in the manual Currently, every variable is shown in the table of contents of the reference manual. Variable list is over 400 items long. This makes the ToC difficult to work with. Removing is done by adding an overwriting template for the parent of variables section (that is sect1 tag with id="variables"). In the DocBook source matching template calls another template named subtoc with two parameters: context (self element) and nodes (child sections). Normally a list of descendant nodes is passed here, but we don't want that and instead call subtoc with no parameters. This approach results in semantically correct code being generated in all modes. Note, that the ID (variables) will have to be kept in sync with XML generating code, but that is already hardcoded elsewhere. M doc/TODO M doc/mutt.xsl 2021-05-26 15:41:40 -0700 Kevin McCarthy (f60882fc) * Add debug statements around $hostname setting. This will make slowdowns due to DNS issues more obvious. M init.c 2021-05-26 15:30:20 -0700 Kevin McCarthy (30aea067) * Add draft 2.1.0 notes to UPDATING file. M UPDATING 2021-05-23 11:20:54 -0700 Kevin McCarthy (ff7c68cc) * Merge branch 'stable' 2021-05-23 11:19:02 -0700 Kevin McCarthy (9f40cc39) * Update irc channel to libera.chat. M doc/manual.xml.head 2021-05-14 18:55:00 -0600 Gregory Anders (4c786d87) * Add local_date_header option Add an option to convert the date used in the Date header into the local (sender's) timezone. This is the current behavior and the option defaults to true. Unsetting this option causes the date in the Date header to be formatted using the GMT timezone. This option is useful for privacy-sensitive users who may not wish to divulge their sending timezone. M init.h M mutt.h M sendlib.c 2021-05-04 11:03:32 -0700 Kevin McCarthy (791fc1c6) * Merge branch 'stable' 2021-05-04 10:55:15 -0700 Kevin McCarthy (481f3800) * automatic post-release commit for mutt-2.0.7 M ChangeLog M VERSION 2021-05-04 10:38:24 -0700 Kevin McCarthy (bd29a9a0) * Merge branch 'stable' 2021-04-28 12:57:53 -0700 Kevin McCarthy (b24a1a25) * Add comments to the 2231 decode blocks. M rfc2231.c 2021-04-30 18:55:37 -0700 Kevin McCarthy (a10d0bb5) * Add sanitize call in print mailcap function. The mutt_rfc1524_expand_filename() function calls mutt_adv_mktemp(), which also calls the sanitizer. However, if the recv-mode suggested filename has a slash, it's better to sanitize before calling expand_filename() too, to preserve the entire filename (albeit with the slashes sanitized out). For example (ignoring name templates) if the file were called "either/or.pdf", pre-sanitizing would generate "either_or.pdf", while not doing so would generate "or.pdf". M attach.c 2021-04-27 13:37:21 -0700 Kevin McCarthy (98f0ca6b) * Add allow_8bit flag to sanitize_filename functions. This will allow "view" mailcap invocations and autoview invocations to display something reasonable for international file names. Also add the flag to mutt_adv_mktemp(), which the mailcap viewer calls. Convert the 'slash parameter' to an ALLOW_SLASH flag. This makes the flags consistent (both "allow" something not permitted by default), and invocations more readable. M attach.c M handler.c M lib.c M lib.h M muttlib.c M pop.c M protos.h M rfc1524.c 2021-04-29 12:54:41 -0700 Kevin McCarthy (fdee288a) * Modify makedoc.pl to read sort maps for the default value. Use the map tables to print out a correct default value for sort types. Remove the unneeded SORT_ALPHA type, for $sort_browser documentation, since we can do the lookup now. M doc/makedoc.pl M init.h M sort.h 2021-04-28 13:28:14 -0700 Kevin McCarthy (23b77a20) * Arrange sort maps by value instead of name. The value-to-name mapping uses the first match. Grouping by value makes it more obvious when there are duplicates and which one will be printed out, e.g. when querying the value of a variable. M init.h 2021-04-28 13:21:17 -0700 Kevin McCarthy (bee3474f) * Move sort maps before vars in init.h. This is so makedoc.pl can read in the maps and use them to properly print out default values for the sort options. M init.h 2021-04-28 11:16:50 -0700 Kevin McCarthy (acb2bdd4) * Merge branch 'stable' 2021-04-25 15:01:07 -0700 Kevin McCarthy (515a315c) * Mention ~B in $thorough_search documentation. It affects ~b, ~B, and ~h. M init.h 2021-04-25 10:47:32 -0700 Kevin McCarthy (b2125bcd) * Keep file browser '..' entries at the top. This makes it easier to navigate up a directory when the file browser is sorted by a value other than "alpha". M browser.c 2021-04-24 15:10:22 -0700 Kevin McCarthy (2333015f) * Change browser sort "unsorted" to preserve the original order. Record entry numbers as they are added to the list, so re-sorting by "unsorted" can return to the original order. This is most useful for the mailboxes case, where "unsorted" should mean the order listed in the muttrc. M browser.c M browser.h M imap/browse.c 2021-04-24 14:56:39 -0700 Kevin McCarthy (f8984468) * Fix imap_add_folder() reallocation check. entrymax contains the number of slots allocated. entrylen contains the current number of slots used. Note: there isn't a memory access bug here - it was merely reallocating too early. M imap/browse.c 2021-04-24 14:41:20 -0700 Kevin McCarthy (a877a29e) * Add $sort_browser_mailboxes configuration variable. This allows to control file browser sorting and mailbox browser sorting separately. M browser.c M browser.h M init.h M sort.h 2021-04-24 15:23:49 -0700 Kevin McCarthy (8b7dd25b) * Merge branch 'stable' 2021-04-23 18:35:30 -0700 Kevin McCarthy (30e657d3) * Improve sidebar drawing in small windows. Ensure the index window is given at least one column during reflow, truncating the sidebar width as necessary. Change the sidebar to use MuttSidebarWindow->cols instead of directly referencing SidebarWidth. M curs_lib.c M sidebar.c 2021-04-22 15:42:14 -0700 Kevin McCarthy (fe866a19) * Disable markers when wrap is at column 1. This can occur when the user resizes the window to a single column, or if they 'set wrap=1'. In that case, Mutt was outputting the '+' and setting the initial output to the second column. However, if there is only one column, nothing would then be printed. When trying to search or jump to end, Mutt would enter an infinite loop because no forward progress would be made in the file with each line. Disable the markers if there is only a single column, so at least one character of the message will get printed on each line. M pager.c 2021-04-19 18:53:30 -0700 Kevin McCarthy (8162c129) * Improve body_pattern and quoting when skipping down. The previous commit added the MUTT_TYPES flag to the search operation. However, adding the flag caused body_pattern and classify_quote matching to occur, as part of searching. Separate those two to only be done when MUTT_SHOWCOLOR is passed. Keep the classify_quote() call in resolve_types(), since otherwise during a normal display we would end up matching the regexps twice. Add a flag so the computation only occurs once, instead of each time the line is shown. For continuation lines, we need to scan from the start of line. Otherwise body_patterns and proper quote level coloring won't appear if we jump down to the middle of a continuation line. As part of this commit, I noticed is_cont_hdr was not reset when handling a REDRAW_FLOW. I believe this also fixes the old trac ticket issue 3744. M pager.c 2021-04-19 14:49:52 -0700 Kevin McCarthy (7bce3182) * Add MUTT_TYPES flag for pager search operation. This allows the display_line() search scanner to also determine the type of each line. Without that, searching down would not be able to properly highlight header lines or quote lines. M pager.c 2021-04-19 14:48:01 -0700 Kevin McCarthy (f8e405b3) * Revert "Add type resolution when searching in the pager." This reverts commit aa308b67a983918eb59f1d7b5af543817c2cfd04. This may be what I want to push to master eventually, but this commit was accidental. I need to test it more on a branch and add a better commit message before commiting to master. M pager.c 2021-04-19 14:45:01 -0700 Kevin McCarthy (aa308b67) * Add type resolution when searching in the pager. M pager.c 2021-04-19 14:20:47 -0700 Kevin McCarthy (4b6cd846) * Add a note about crypto operations being available interactively. They aren't available in batch mode. This was mentioned in the "batch compose flow" section, but should be mentioned a bit more prominently in the manual. M doc/manual.xml.head 2021-04-18 14:54:02 -0700 Kevin McCarthy (10c66a53) * Mention 8-bit ansi color support in manual. M doc/manual.xml.head 2021-04-17 09:34:16 -0700 Kevin McCarthy (36a704cf) * Add cc, in-reply-to, and references to default mailto_allow list. Thanks to Gregory Anders for the ticket and suggested patch, which this commit is based upon. M doc/manual.xml.head M init.c 2021-04-13 18:02:31 -0700 Kevin McCarthy (0684a051) * Add a check to make sure pair doesn't overflow. It's not clear if COLOR_PAIRS can be larger than SHRT_MAX + 1, so make sure with a check. M color.c 2021-04-11 15:56:42 -0700 Kevin McCarthy (2d683201) * Fix ansi colors to use default bg/fg when not set. Note the ColorList stores COLOR_DEFAULT (-2) not -1, so we need to translate those values in mutt_alloc_ansi_color(). If the curses backend doesn't support default colors, we abort and just return color pair 0. M color.c M pager.c 2021-04-11 14:19:33 -0700 Kevin McCarthy (c20a5169) * Use bkgrndset() as ATTRSET() backend if available. This function allows more usable color pairs, because it passes the pair parameter separately. The COLOR_PAIR() macro only returns 8-bits for a pair, limiting the total pairs used to 256 despite many systems having much larger COLOR_PAIRS values. In order to do this, separate out the pair and attrs values, instead of combining attr + COLOR_PAIR(pair) into a single value and storing that inside Mutt. For the older calls, bkgdset() and attrset(), we call COLOR_PAIR() at the last minute. Add COLOR_ATTR to header cache sum calculation, since it is used in the HEADER now. M Makefile.am M color.c A color.h M commands.c M configure.ac M curs_main.c M hcache.c M hcachever.pl M menu.c M mutt.h M mutt_curses.h M mutt_menu.h M pager.c M protos.h M score.c M sidebar.c M thread.c 2021-04-10 11:33:58 +0200 Vincent Lefevre (869c6cc4) * Updated French translation. M po/fr.po 2021-04-09 17:51:12 -0700 Kevin McCarthy (6a2e3dea) * Clarify -H usage in batch mode is not a "pass through" option. Mutt runs the file through mutt_prepare_template() in both cases, which will decrypt, remove signatures, strip multipart/alternatives. The documentation wasn't clear about this, and it might be misunderstood that -H is a "pass through" option. M doc/manual.xml.head M doc/mutt.man 2021-04-09 15:12:11 -0700 Kevin McCarthy (6c510773) * Add user-friendly error message if append to $trash fails. For the maildir case, this will then be displayed instead of a raw stat error message, in the case the mailbox disappears. M mx.c 2021-03-29 04:57:28 -0300 Marco Ippolito (9566a95c) * Fix documentation typo M doc/manual.xml.head 2021-03-27 19:14:10 -0700 Kevin McCarthy (4e01ccdb) * Stop batch mode emails with no argument or recipients. Closes #345. There are checks in send.c to guard against a no-recipient email being sent, but there might be a my_hdr or other setting in the muttrc. In that case, it would be surprising for an email to be sent. M main.c 2021-03-20 18:33:01 +0100 Vincent Lefevre (8ac730a1) * Updated French translation. M po/fr.po 2021-03-19 14:35:53 -0700 Kevin McCarthy (5ee27795) * Merge branch 'stable' 2021-03-16 14:13:38 -0700 Kevin McCarthy (9b8cc85e) * Add SigInt handler for pattern functions. Allow, for example, a ~B against a huge mailbox to be interruped via ctrl-c. This commit follows the same behavior as mutt_search_command() - not prompting and just interrupting. We could add a prompt if it's really deemed necessary, but I think if they hit ctrl-c they want to stop the pattern operation now. Since it's not practical to roll back, leave the Context in the "in the middle" state too. This may actually be desired. M pattern.c 2021-03-15 13:11:07 -0700 Kevin McCarthy (50f22244) * Turn off ~h header-only download when $message_cachedir is set. The initial pattern match will be slow, but then the body will be in the message cache. This is the same as previous behavior, so a message cache user should not notice any change. Those not using a message cache will see improvements from the header-only download, but of course they will have to download the full headers each time. M pattern.c 2021-03-13 18:51:34 +0100 Vincent Lefevre (5eb9dec8) * Updated French translation. M po/fr.po 2021-03-12 13:23:42 -0800 Kevin McCarthy (5cf52cd1) * Minor fixes to match_body_patterns(). Change the end condition to compare against buflen. I prefer this because we are not directly incrementing offset ourselves, but relying on the rational return values from regexec. If the regex library (incorrectly) returned a nul-match at the '\0' terminator for instance, the new nul-match logic would assign offset just past the terminator. Remove the i=0 initialization during definition, because it doesn't use or need it. M pager.c 2021-03-12 13:08:29 -0800 Kevin McCarthy (64dba506) * Factor out match_body_patterns to make resolve_types() simpler. The body pattern matching part has been getting more complex, and is now too big to have its details sit amongst the resolve_types() logic. Factor it out into a separate procedure. M pager.c 2021-03-10 18:10:39 -0800 Kevin McCarthy (63d29881) * Fix body color null_rx handling. The existing code did not work properly. If the null_rx occurred before another matching entry in the list, it would be ignored. If it occurred afterward, it could cause the entries to be created out-of-order which would affect the binary search later on when rendering. Instead, use the normal "match assignment" code, but if the best result is a null_rx match, simply discard it and increment the offset past the end of the null match. M pager.c 2021-03-10 15:09:49 -0800 Kevin McCarthy (53ffdb93) * Improve body color matching speed by caching future matches. On a *very* long body (or header_partial) lines with multiple color lines that match, performance can be degraded. For instance if there were moderately expensive regexp matches against "A" "B" and "C". A line with: A A A A A B A A C A A A B A A A C The B and C regexps were scanned again after every "A" match, despite that the result would be discarded again for the next A match. Change the color matching to cache the location of each color line match. Discard the cache once the match offset passes that point. M mutt_curses.h M pager.c 2021-03-11 14:02:03 -0800 Kevin McCarthy (17774247) * Merge branch 'stable' 2021-03-09 18:19:21 -0800 Kevin McCarthy (847ce203) * Add to compose menu. This mirrors the in the attachment menu (and just added to the compose menu), but adds it to the compose menu for alternative generation. M OPS M compose.c M doc/manual.xml.head M functions.h 2021-03-09 18:05:17 -0800 Kevin McCarthy (5a325ba4) * Add view-mailcap, view-pager, view-text to compose menu. These are less commonly needed, so don't bind them to a key. But for those who need it, make them be available. M OPS M compose.c M functions.h 2021-03-10 18:58:22 +0100 Vincent Lefevre (db80f61a) * Updated French translation. M po/fr.po 2021-03-05 18:52:48 -0800 Kevin McCarthy (191b0513) * Fix $ssl_client_cert usage with SMTP. The ssl and gnutls client-cert setup code was calling mutt_account_getuser(). This caused two problems. First, it's not necessarily the case that there will be a username. Second, populating the user would cause smtp_open() to check for AUTH capabilities and call smtp_auth - even if the user is already authenticated by the cert. The server won't advertize AUTH if they already authenticated, causing a connection abort. Remove prompt for mutt_account_getuser() in the ssl and gnutls client certificate connection code. The SASL code has callbacks, so I don't understand why it would need this. Let's take it out and see if anyone screams 8-P. If necessary, we can add a mutt_account_getuser() call to the very beginning of imap_auth_sasl(). Revamp the openssl ssl_passwd_cb() prompt. From the man pages, it appears to be used for the cert decryption. There's no need to call mutt_account_getuser() and use the generic mutt_account_getpass() just to read a password in. Instead create a callback function version to customize the prompt for a client cert with just the host. Change the SMTP authentication test to check if the AUTH capabilities are set, instead of if the user field is set before calling smtp_auth(). M account.c M account.h M mutt_ssl.c M mutt_ssl_gnutls.c M smtp.c 2021-03-07 09:02:23 +0100 Olaf Hering (fcc62991) * refresh de.po align with result of make update-po Signed-off-by: Olaf Hering M po/de.po 2021-03-06 13:59:54 -0800 Kevin McCarthy (2054ccf2) * Relocate po OPS files to bottom of POTFILES.in. This matches the pre-0.21 migration order, and will reduce the size of updates for the next release. M po/POTFILES.in 2021-03-06 22:26:21 +0100 Olaf Hering (1267c1ca) * refresh de.po Signed-off-by: Olaf Hering M po/de.po 2021-03-06 11:22:19 -0800 Kevin McCarthy (8940dbe0) * Merge branch 'stable' 2021-03-04 12:24:42 -0800 Kevin McCarthy (a796a1bd) * Add -nonumbers to lynx options. This will remove the useless link and field numbers from output in the manual.txt. M doc/Makefile.am 2021-03-04 12:18:30 -0800 Kevin McCarthy (22bab8ff) * Don't install an empty manual.txt file. Closes #334. If all the html to txt programs we use (lynx, elinks, w3m) are missing from the system, the shell redirection willl create an empty file. Change the install step to use -s "FILE exists and has a size greater than zero". Thanks to Mitchell Blank Jr for the ticket and suggested fix. M doc/Makefile.am 2021-03-03 23:17:55 +0100 Vincent Lefevre (9e338a19) * Updated French translation. M po/fr.po 2021-03-03 23:13:09 +0100 Vincent Lefevre (fb5f052f) * Updated French translation. M po/fr.po 2021-03-03 12:18:51 -0800 Kevin McCarthy (1d13381f) * Don't leak fp when aborting mutt_make_message_attach(). I forgot to close up the fp before returning. M sendlib.c 2021-03-01 18:19:08 -0800 Kevin McCarthy (16c381d8) * Prompt for retry on decrypt failure for mime message attachments. Closes #331. Change $forward_decyrpt to a quadoption, defaulting 'yes' for backward compatibility. This will allow users to choose on a per-message attachment basis if desired. If decoding from $mime_forward_decode fails or decrypting from $forward_decrypt, notify the user and prompt to retry attaching without the decode/decrypt. $forward_decrypt directly invokes decryption and returns -1 on error, while $mime_forward_decode uses the handler rendering, which returns a non-fatal 1 (to allow message display of failing encrypted message). So prompt on either case. If they decline to retry, or the retry fails, return NULL only on a hard-fail (-1) return code. They've been warned and can peek at the final result. The send generate_body() code was not checking for a NULL result. This seems like a bad idea, so add a check and error message in that case. M init.h M mutt.h M send.c M sendlib.c 2021-02-26 14:34:10 -0800 Kevin McCarthy (ad14641e) * Merge branch 'stable' 2021-02-24 14:59:19 -0800 Kevin McCarthy (e0d08c59) * Add a note about the '^' mailbox shortcut. Emphasize that it's not always set, for example in command-line mode, or when evaluating the muttrc at startup. M doc/manual.xml.head 2021-02-23 14:41:47 -0800 Kevin McCarthy (b412d83b) * Merge branch 'stable' 2021-02-20 13:08:54 -0800 Kevin McCarthy (7fd331fd) * Scan OPS files directly for gettext translation strings. Previously, gettext's po/Makefile.in.in was modified to separately scan and merge a generated file: keymap_alldefs.h. Gettext doesn't recommend nor provide support for scanning generated files. However, there is no reason we have to scan the generated file. Instead move the N_() markers and L10N comments into the OPS files. Then simply add the OPS files to po/POTFILES.in. Add a '--language=C' option to xgettext to avoid a warning about the OPS files not have any known language suffix. Modify gen_defs and doc/gen-map-doc to deal with the new format of the OPS files. M OPS M OPS.CRYPT M OPS.MIX M OPS.PGP M OPS.SIDEBAR M OPS.SMIME M doc/gen-map-doc M gen_defs M po/Makevars M po/POTFILES.in 2021-02-18 15:40:39 -0800 Kevin McCarthy (d4e13e4b) * Fix gettext update problems. The keymap_alldefs.h file was previously generated and scanned inside po/Makefile.in.in as an additional POTFILES files build dependency and step. The file can't be scanned by just adding it to po/POTFILES.in because it's a generated file that will be in the build directory. The next commit will instead add the OPS* files directly to POTFILES.in to be scanned. For this commit, remove the generation of keymap_alldefs.h. Remove the redundant ALL_LINGUAS setting from configure.ac. Reformat the LINGUAS file to be on one line, as the documentation shows. I think it was okay before, but just to be safe. Fix L10N scanning by adding '--add-comments=L10N' to XGETTEXT_OPTIONS in po/Makevars. Set MSGID_BUGS_ADDRESS to silence a warning. Add gettext.h to the Makefile.am EXTRA_DIST list. Remove -Iintl flags from all Makefile.am files, since the intl directory is no longer bundled in Mutt. M Makefile.am M autocrypt/Makefile.am M configure.ac M imap/Makefile.am M po/LINGUAS M po/Makevars 2021-02-19 00:20:42 +0100 Vincent Lefevre (8d94928e) * Remove the AM_GNU_GETTEXT_VERSION line as it makes autoreconf fail with gettext < 0.21 because autopoint complains that gettext is too old. Using this line with a version smaller than 0.21 makes autopoint itself fail, thus does not solve the problem. M configure.ac 2021-02-19 00:02:15 +0100 Vincent Lefevre (33fe78af) * Add AM_GNU_GETTEXT_VERSION line to avoid a warning from autoreconf. M configure.ac 2021-02-07 18:27:47 -0800 Kevin McCarthy (ccc18061) * Update gettext to version 0.21. Run 'gettextize -f --no-changelog' to update to 0.21. This removes the entire intl directory, and relies on an external libintl only. $(INTLLIBS) should now be referred to as $(LIBINTL), so change all references. Unfortunately, some of the gettext m4 files were modified and "mutt customized" in the past. I'm trying to keep them in a pristine state after this upgrade. glibc21.m4, lcmessage.m4, codeset.m4 have also been removed. Manually call AM_ICONV in configure.ac. This was previously called in the modified "MUTT_AM_GNU_GETTEXT" but the result $am_cv_func_iconv is tested just below. locale.h is a standard library defined by C99. The gpgme and pgp code wrapped those includes in HAVE_LOCALE_H checks, but that check was performed inside of gettext.m4. Remove the check inside those files (locale.h is already included unconditionally elsewhere in Mutt). Copy the sample gettext.h file and include that instead, as suggested by the gettext documentation. unistd.h is also a standard posix header, so remove HAVE_UNISTD_H checks inside mutt too. Create po/LINGUAS file listing available languages. Create po/Makevars from the template and customize for Mutt. Set PO_DEPENDS_ON_POT to no to prevent po file rebuilds. According to the gettext manual, with this set, "PO files can be accidentally updated even if a POT file is not updated" when using git. M .gitignore M ABOUT-NLS M INSTALL M Makefile.am A config.rpath M configure.ac M crypt-gpgme.c M crypt.c A gettext.h D intl/COPYING.LIB-2 D intl/COPYING.LIB-2.1 D intl/ChangeLog D intl/Makefile.in D intl/VERSION D intl/bindtextdom.c D intl/cat-compat.c D intl/config.charset D intl/dcgettext.c D intl/dcigettext.c D intl/dcngettext.c D intl/dgettext.c D intl/dngettext.c D intl/explodename.c D intl/finddomain.c D intl/gettext.c D intl/gettext.h D intl/gettextP.h D intl/hash-string.h D intl/intl-compat.c D intl/l10nflist.c D intl/libgettext.h D intl/libgnuintl.h D intl/libintl.glibc D intl/linux-msg.sed D intl/loadinfo.h D intl/loadmsgcat.c D intl/localcharset.c D intl/locale.alias D intl/localealias.c D intl/ngettext.c D intl/plural.c D intl/plural.y D intl/po2tbl.sed.in D intl/ref-add.sin D intl/ref-del.sin D intl/textdomain.c D intl/xopen-msg.sed M lib.h M m4/Makefile.am M m4/README D m4/codeset.m4 M m4/gettext.m4 D m4/glibc21.m4 A m4/host-cpu-c-abi.m4 M m4/iconv.m4 A m4/intlmacosx.m4 D m4/lcmessage.m4 A m4/lib-ld.m4 A m4/lib-link.m4 A m4/lib-prefix.m4 A m4/nls.m4 A m4/po.m4 M m4/progtest.m4 M mutt.h M pgp.c A po/LINGUAS M po/Makefile.in.in A po/Makevars A po/Rules-quot A po/boldquot.sed A po/en@boldquot.header A po/en@quot.header A po/insert-header.sin A po/quot.sed A po/remove-potcdate.sin M smime.c 2021-02-17 15:47:49 -0800 Kevin McCarthy (9635fad4) * Add backlinks for $fcc_before_send and self_encrypt options. Make sure the $fcc_before_send's behavior changes to $fcc_clear and $fcc_attach is mentiond in those options too. Add a "see also" in $fcc_clear to the self_encrypt options. M init.h 2021-02-13 12:31:59 -0800 Helge Kreutzmann (0ced35e0) * Update de.po. M po/de.po 2021-02-07 19:51:34 -0800 Kevin McCarthy (106ff19a) * Merge branch 'stable' 2021-02-05 15:34:37 -0800 Kevin McCarthy (e5c6a054) * Save CurrentFolder in background edit scope. The CurrentFolder can actually be used to resolve an fcc-hook at fcc time. We would want to use the folder they started composing in, to be consistent with expectations. M doc/manual.xml.head M send.c M send.h 2021-02-05 14:09:28 -0800 Kevin McCarthy (56f4c0b8) * Change attach inline forward messages default CH flag. Fix it to be CH_DECODE instead of CH_XMIT. I believe this was a mistake from a long time ago. The CH_XMIT flag is used in mutt for: - mutt_save_message() -> set_copy_flags() when decoding - pre-send conversion to 7 bit - mutt_make_message_attach() (for index mime-forwarding) - message bouncing Using it for *inline* forwarding in the attachment menu doesn't make sense. Both include_forward() in send.c, and include_header() in recvcmd.c use CH_DECODE. It seems reasonable to decode headers when inline forwarding from the attachment menu (as is done from the index), so I'm guessing that was what was meant here too. M recvcmd.c 2021-02-04 18:02:06 -0800 Kevin McCarthy (18c29a84) * Filter ANSI sequences when forwarding too. Add a MUTT_CM_FORWARDING flag to correspond with the MUTT_CM_REPLYING flag. Check those to turn on ANSI filtering. In order to guard against other accidental prefix setting without one of those flags, also check s->prefix to enable ANSI filtering (and prefix printing) too. Add missing MUTT_CM_REPLYING flags to the recvcmd.c reply functions. While updating the recvcmd.c reply code, I noticed CH_REORDER wasn't enabled with OPTWEED, like in the send.c code (and everywhere else), so add the missing flag. M copy.c M copy.h M handler.c M mutt.h M recvcmd.c M send.c 2021-02-03 15:50:49 -0800 Kevin McCarthy (1a9fea6f) * Add explicit flag to check for postponed message on . This used to check for: !flags && !msg which was still relatively clear that it was a unique situation (just for in the index and pager). With the addition of background editing, it became: (sctx->flags == SENDBACKGROUNDEDIT) && !sctx->msg This is less intuitively understood to be just for the case, and thus perhaps easy to create a bug in the future. Create an explicit flag, SENDCHECKPOSTPONED to perform the check, and enable for the operation in the index and pager. M curs_main.c M mutt.h M pager.c M send.c 2021-02-02 12:56:33 -0800 Kevin McCarthy (acf11418) * Merge branch 'stable' 2021-02-01 15:15:17 -0800 Kevin McCarthy (09f077c9) * Change REPLYTO handling to directly add the my_hdr. Don't send the header through the muttrc parser, to avoid issues with unexpected evaluation of an environment variable. M init.c 2021-01-28 18:02:47 -0800 Kevin McCarthy (961cf4be) * Apply $reverse_name when tag-reply/forwarding too. Enable $reverse_name for tag actions in the attach menu too. Since the ATTACH_CONTEXT is a different structure, move both single and tagged action handling into recvcmd.c M alias.c M protos.h M recvcmd.c M send.c 2021-01-27 15:02:10 -0800 Kevin McCarthy (ab6d0dc5) * Merge branch 'stable' 2021-01-27 13:38:53 -0800 Kevin McCarthy (3e35377e) * Fix small error in mutt_resize_term(). Commit 547b25a2 accidentally removed the default value setting if LINES or COLUMNS are null. Also, set default values if the atoi fails. M resize.c 2021-01-26 18:36:20 -0800 Kevin McCarthy (d1729b7c) * Create mutt_atolofft() to parse body->length field. This will allow proper range checking on the number, and set it to -1 if it's out of range. M muttlib.c M parse.c M protos.h 2021-01-26 12:58:54 -0800 Kevin McCarthy (5d73e4cf) * Convert all mutt_atoX functions to behave strictly. * Remove the automatic conversion of NULL and '\0' to 0. Add a flag for the cases that require lax evaluation. * Make trailing characters generate an error by default for the mutt_atouX functions. Add a flag for that case. Most of the IMAP code parses numbers out of a stream, so add the flag to those calls. * The mutt_atouX functions were also behaving incorrectly with invalid input, e.g. "ABC", returning and setting 0. Fix them to return an error in those cases. * Add a mutt_atoll() function, to be used in the next commit. * Change converters to store 0 on error. atos, atoi, and atoui were already doing this, but the others were not. M curs_main.c M edit.c M gnupgparse.c M imap/command.c M imap/imap.c M imap/message.c M imap/util.c M init.c M lib.c M lib.h M main.c M menu.c M mh.c M parse.c M resize.c M rfc2231.c M score.c M smtp.c M url.c 2021-01-27 07:27:31 -0800 Kevin McCarthy (7737b353) * Merge branch 'stable' 2021-01-24 15:01:33 -0800 Kevin McCarthy (3d6e7df7) * Fix hdr_order to use the longest match. Previously, Mutt would find the first match and use that. However, the example shown in the manual: hdr_order From Date: From: To: Cc: Subject: gives the expectation that an mbox From_ line would print first, then the Date:, and then the From: header. Change the matcher to scan all HeaderOrderList entries and use the longest match. Update the documentation to make it clear From_ lines are printed out with other "real" headers, and can be manipulated via ignore and hdr_order commands. M copy.c M doc/manual.xml.head 2021-01-23 18:14:02 -0800 Kevin McCarthy (c6700b05) * Fix double spacing after group display-name in pager and message. Edit-headers and message writing uses mutt_write_rfc822_header() -> mutt_write_address_list(), which renders each address one by one and outputs to a file. rfc822_write_address_single() already appends a space after the group display-name colon delimiter. Rendering to the pager uses a different code path: address_header_decode() -> format_address_header(). The logic is very similar to mutt_write_address_list() except it renders to memory. It also needs to avoid re-appending a space after the group display-name. M copy.c M sendlib.c 2021-01-23 15:00:12 -0800 Kevin McCarthy (075a4c70) * Restrict mime header date writing to protected headers. The previous code would generate and print a date header for autocrypt. This wouldn't really cause a problem, but is incorrect. Check explicitly for a passed in date parameter in MUTT_WRITE_HEADER_MIME mode. M sendlib.c 2021-01-23 14:31:19 -0800 Kevin McCarthy (94628052) * Mention C99 libc requirement in INSTALL file. M INSTALL 2021-01-22 15:15:56 -0800 Kevin McCarthy (e72c8ce1) * Tighten up group list parsing a bit more. The display-name is not optional for a group, so don't start a group list if the display-name is empty. Groups can't be nested, so terminate a previous group list if the terminator was left off. M rfc822.c 2021-01-16 15:46:54 -0800 Kevin McCarthy (46f86782) * Make some small fixes to the -nonotify commit. Fix logic error in mutt_buffy_check(). Add -nonotify flag to the configuration command list in the manual too. Add line wraps to the muttrc.man mailboxes options, to make the synopsis more readable within 80 columns. M buffy.c M doc/manual.xml.head M doc/muttrc.man.head 2021-01-16 20:53:57 +0100 Rene Kita (26770eac) * Add -nonotify argument to mailboxes command -nonotify allows to disable notifications for mailboxes. -notify can be used to re-enable notifications for a previously disabled mailbox. A typical use case are mailboxes for mailing lists. The User may want to get notified about new mail in their work mailbox, but not get disrupted by new mail received from the mailing list. This patch allows individual configuration for all mailboxes. M buffy.c M buffy.h M doc/manual.xml.head M doc/muttrc.man.head M imap/command.c M imap/imap.c 2021-01-21 12:42:45 -0800 Kevin McCarthy (933f3462) * Merge branch 'stable' 2021-01-20 11:51:58 +0100 Vincent Lefevre (d5a18cca) * Updated French translation. M po/fr.po 2021-01-18 14:47:32 -0800 Kevin McCarthy (feb30961) * Fix warning; minor code cleanup. random_dev isn't used anymore (after removing the %R expando). I originally had local variables in some of the case statements, and forgot to pull out the curly brackets when I moved those to the top of the function. M messageid.c 2021-01-18 14:02:37 -0500 Remco Rijnders (8641fb2a) * Remove %R format for $message_id_format M init.h M messageid.c 2021-01-18 13:54:13 -0500 Remco Rijnders (dadc0130) * Provide %x format for $message_id_format The expando format %x generates one pseudorandom byte and puts the output in a lowercase hex formatted string of length two. # Conflicts: # init.h # messageid.c M init.h M messageid.c 2021-01-17 19:39:01 -0800 Kevin McCarthy (5f5d33f8) * Change $message_id_format year expando from %y to %Y. So that it matches the strftime() 4-digit year. Thanks to Vincent Lefèvre for noting the discrepancy. M init.h M messageid.c 2021-01-15 15:56:45 -0800 Kevin McCarthy (1f188287) * Add $message_id_format for customizing generated Message-IDs. Provide expandos for the new (2.0+) format and the old format. Add %r and %R to generate fixed size 4-char Base64 blocks from the pseudo-random generator, or from /dev/urandom. The format string allows external filters, for complete control. M globals.h M init.h M messageid.c 2021-01-15 13:21:27 -0800 Kevin McCarthy (b5a807ca) * Move mutt_gen_msgid() over to messageid.c. M Makefile.am A messageid.c M po/POTFILES.in M sendlib.c 2021-01-17 11:05:36 -0800 Kevin McCarthy (d4305208) * Add group terminator if it is left off. If there is no terminating ";" add one to the list, to make the text re-rendering correct. M rfc822.c 2021-01-17 10:53:19 -0800 Kevin McCarthy (939b02b3) * Don't allocate a group terminator unless we are in a group-list. This will reduce memory allocation for garbage/spam address lists. It also makes no sense to store a terminator when there wasn't a display-name indicating the start of a group. M rfc822.c 2021-01-17 13:05:46 -0800 Kevin McCarthy (59a09320) * Merge branch 'stable' 2021-01-10 19:48:17 -0800 Kevin McCarthy (53181e6b) * Remove configure test for va_copy. Its presence is also dictated by the C99 specification. M configure.ac D m4/funcs.m4 2021-01-10 14:25:23 -0800 Kevin McCarthy (73ee27cb) * Remove snprintf and vsnprintf configure checks. There was a period of time where C99 was standardized but some systems still didn't include a correctly working version of those two functions. But I think we are long past that point now. Remove the checks and replacement code. M Makefile.am M configure.ac M dotlock.c M protos.h D snprintf.c 2021-01-13 19:15:32 -0800 Kevin McCarthy (d35bee80) * Merge branch 'stable' 2021-01-10 10:25:06 -0800 Kevin McCarthy (564af512) * Fix check for empty colors left. Because pair "0" is reserved (and we start searching at index 1), we only have access to (COLOR_PAIRS - 1) pairs. Also, don't increment UserColors during the check, because that would incorrectly inflate the number of color pairs allocated if none are available. That would delay or even remove the ability to reallocate pairs after future color pair frees. It actually would make more sense to just check (index > COLOR_PAIRS - 1). But since UserColors is incremented here, and is used in dprint statements, keep the check consistent. M color.c 2021-01-09 09:42:51 -0800 Kevin McCarthy (1ffe93ef) * Move empty color slot finding into initial compare loop. There is no need to scan the list again to find the place for a new entry, since we already do to check for duplicates. Store the last pointer in the initial loop, and calculate the lowest available index at the same time. M color.c 2021-01-08 18:23:09 -0800 Kevin McCarthy (7731d992) * Add code to free ansi colors. The 256 color ansi-escape sequence commit can create many more potential ansi colors than the 8-color version, so they shouldn't be allowed to just accumulate. Free ansi colors when exiting the pager. The pager can be called nested, so this could prematurely free the colors, but they will be automatically reallocated. Ansi and overlay colors shouldn't be refcounted like normal colors, so add a bit field for both. For now, we just let overlay colors accumulate, as before. If this becomes a problem, we could periodically flush them, the same way as ansi colors - perhaps when changing mailboxes. Change ColorList to be sorted by index. This removes the O(n^2) loop just to find the next available index. Likewise, improve the mutt_free_color() loop to keep track of the last pointer instead of relooping. M color.c M pager.c M protos.h 2021-01-08 19:11:34 -0800 Kevin McCarthy (00b70ff0) * Merge branch 'stable' 2021-01-07 14:16:28 +0200 Matti Niemenmaa (b0bc42ff) * pager: Parse 256-color "ANSI" escapes M pager.c 2021-01-07 14:20:42 +0200 Matti Niemenmaa (1b20dd42) * pager: Don't accept color code 8 38 and 48 are not valid color specifications: 30–37 and 40–47 specify the eight foreground and background colors while 39 and 49 are used to mean "reset to default". 38 and 48 are in use to specify 8-bit or 24-bit colors, but those cases require special handling. M pager.c 2021-01-03 15:33:46 -0800 Kevin McCarthy (a3db7ccb) * Add configure checks for gssapi library and functions. rkta on irc reported a build failure because the gss headers were not present. Add explicit checks for the required headers. Also add a check for gss_init_sec_context() when using the output of krb-config to configure flags. Abort configure if the library/header checks don't pass. It would previously continue on, setting USE_GSS and need_gss, which would just result in a build error. M configure.ac M m4/gssapi.m4 2021-01-01 18:51:32 -0800 Kevin McCarthy (e4a8abe8) * Remove obsolete AC_HEADER_STDC and STDC_HEADERS checks. The autoconf macro is obsolete in 2.70. Also, we now assume at least C99 so there is no point in checking for ANSI C89 header files. Fix up code to assume STDC_HEADERS is always true, removing the reference to it at the same time. M configure.ac M m4/gettext.m4 M mutt_curses.h M protos.h M regex.c 2021-01-01 18:13:59 -0800 Kevin McCarthy (475e800f) * Replace AC_OUTPUT_COMMANDS with AC_CONFIG_COMMANDS. M m4/gettext.m4 2021-01-01 18:05:04 -0800 Kevin McCarthy (b04bf448) * Convert AC_TRY_LINK to AC_LINK_IFELSE. M m4/codeset.m4 M m4/curslib.m4 M m4/funcs.m4 M m4/gettext.m4 M m4/iconv.m4 M m4/lcmessage.m4 2021-01-01 15:49:05 -0800 Kevin McCarthy (a01316d9) * Convert AC_TRY_COMPILE to AC_COMPILE_IFELSE. M m4/funcdecl.m4 M m4/iconv.m4 2021-01-01 14:04:01 -0800 Kevin McCarthy (9bb70dbc) * Remove obsolete AC_ISC_POSIX call. M m4/gettext.m4 2021-01-01 12:51:17 -0800 Kevin McCarthy (47dc3b08) * Replace AC_HELP_STRING with AS_HELP_STRING. M configure.ac M m4/gettext.m4 M m4/gpg-error.m4 M m4/gpgme.m4 M m4/iconv.m4 2021-01-01 12:45:18 -0800 Kevin McCarthy (2754a057) * Replace AC_ERROR with AC_MSG_ERROR. M m4/curslib.m4 2021-01-01 10:08:38 -0800 Kevin McCarthy (cbc0957e) * Update deprecated AC_CHECK_TYPE usage. M configure.ac 2021-01-01 12:33:22 -0800 Kevin McCarthy (c58d307d) * Update config.status invocation. The files are now specified on the command line, instead of via the CONFIG_FILES env var. This is the first of a series of patches updating obsolete autoconf macros and usages. The 2.70 release sqawks very loudly at those constructs, so best to start updating them. M intl/Makefile.in M po/Makefile.in.in 2020-12-30 14:31:11 -0800 Kevin McCarthy (4c6a0954) * Merge branch 'stable' 2020-12-29 14:28:23 -0800 Kevin McCarthy (625666ef) * Update header cache checking order and --with options. Automatically scan in the order: kyotocabinet, tokyocabinet, lmdb, qdbm, gdbm, bdb. Turn all the backend options into '--with' options and add a dir parameter. Specifying a single --with option declares the desired backend, turning off scanning. Specifying --without skips scanning for a backend. Update the INSTALL file to make that clear. This actually wasn't even clear to me until I studied it now, and for years I've been using an obfuscated combination of --without and --with to specify the backend, when I just needed to use --with. M INSTALL M configure.ac 2020-12-29 13:28:30 -0800 Kevin McCarthy (d6c7a1a5) * Merge branch 'stable' 2020-12-28 18:39:19 -0800 Kevin McCarthy (7932020f) * Fix freebsd build on srht. Looks like the db5 package does install in a wacky place. For now, just use kyotocabinet (which appears to install under /usr/local). M .builds/freebsd.yml 2020-12-28 18:24:10 -0800 Kevin McCarthy (a62d11d2) * Add non-zero length for gdbm and lmdb configure tests. In $db_requested=auto mode, the variables may be unset. M configure.ac 2020-12-28 15:57:04 -0800 Kevin McCarthy (60bd4a85) * Simplify BDB configure.ac check. Remove the long list of directory and library names to scan, and just look for -ldb and db.h. Use $with_bdb to search an alternative directory, just as the other header cache library searches do. If someone screams, we can enhance a *little* bit, but I think this is sufficient, and more important, maintainable. M configure.ac 2020-12-25 10:21:13 -0800 Kevin McCarthy (4032fd8a) * Merge branch 'stable' 2020-12-23 09:44:14 -0800 Kevin McCarthy (658d28b2) * Fix declaration of mutt_decode_base64(). Thanks to Charles for reporting the problem! M protos.h 2020-12-23 17:17:26 +0100 Olaf Hering (3e24f802) * refresh de.po Signed-off-by: Olaf Hering M po/de.po 2020-12-21 15:34:58 -0800 Kevin McCarthy (03e17ef7) * Correct length to use LOFF_T. This is a part two, made in master, to the stable branch commit 11b18027. These are mostly length adjustments to use LOFF_T, matching the BODY->length type. An argument could be made for size_t instead, and a few places in Mutt do assign between those types. I've used LOFF_T because off_t is a signed integer. Some changes in this commit affect loops that decrement a length pointer while > 0. Switching to a size_t could create a wraparound infinite loop bug. This also changes the Content-Length header parser to use atoll() intead of atol(). I noticed from the man page that atol() doesn't seem to return -1 on error. But I've kept the check anyway. M copy.c M crypt-gpgme.c M edit.c M handler.c M imap/message.c M mbox.c M parse.c M pattern.c M pop.c 2020-12-22 18:04:32 -0800 Kevin McCarthy (a4a2a1ed) * Merge branch 'stable' 2020-12-20 17:48:09 +0000 Christoph Berg (c1ae18c0) * Fix a typo in de.po M po/de.po 2020-12-20 03:58:21 +0100 Vincent Lefevre (ef4e63a5) * Typo in a L10N text. M imap/command.c 2020-12-20 03:43:14 +0100 Vincent Lefevre (7c6cbecc) * Updated French translation. M po/fr.po 2020-12-18 10:15:24 -0800 Kevin McCarthy (1598baa2) * Add a sanity check for qresync. If it fails, force a redownload without qresync, to set the uid_seqset to a correct state. Note the headers should almost all be in the header cache, so this isn't a huge penalty, but ensures no duplicates occur (the most common issue if something goes wrong). M imap/message.c 2020-12-16 15:14:29 -0800 Kevin McCarthy (09a1abe3) * Add a batch composition flow section to the manual. M doc/manual.xml.head 2020-12-15 12:58:24 -0800 Kevin McCarthy (a832cb5a) * Create $ssl_verify_host_override. This allows manually specifying the host name to verify a server certificate against. I'm not sure I like the idea, but since Mutt already allows turning hostname verification off, it's not any worse to leave it on but manually set the expected hostname in the certificate. Thanks to eudyptes-pachyrynchus for the merge request, which prompted me to take another look at the ticket. M globals.h M init.h M mutt_ssl.c M mutt_ssl_gnutls.c 2020-12-10 14:07:19 -0800 Kevin McCarthy (b860ea2f) * Add "headers" parameter to mx_open_message(). This will allow some operations to retrieve only headers, such as ~h pattern matching or the new list menu. Modify the IMAP and POP3 implementation to retrieve only headers when the parameter is set. Headers-only will use the message cache if one exists, but will not populate the message cache (since the body of the message is not downloaded.) M commands.c M compress.c M copy.c M imap/imap_private.h M imap/message.c M listmenu.c M mailbox.h M mbox.c M mh.c M mutt.h M mx.c M parse.c M pattern.c M pop.c M postpone.c M recvattach.c M send.c M sendlib.c 2020-12-10 20:19:08 +0100 Olaf Hering (c6868e1f) * mention system muttrc in man page mutt uses either the Muttrc owned by the sysadmin, or its own Muttrc. Signed-off-by: Olaf Hering M doc/Makefile.am M doc/mutt.man 2020-12-09 15:08:31 -0800 Kevin McCarthy (c8663d49) * Parse headers on demand for the list menu. This will be a bit slower over IMAP from the index, but it removes storing all the new headers in the header cache. Since those are not used for anything except the list menu, and the list menu is infrequently used, it's a bit wasteful to store them in the header cache. M hcache.c M imap/message.c M listmenu.c M mutt.h M muttlib.c M parse.c M protos.h 2020-12-09 20:00:57 +0100 Grzegorz Szymaszek (1f67773f) * Improve the Polish translation of OP_TOGGLE_WRITE M po/pl.po 2020-12-07 14:59:10 -0800 Kevin McCarthy (f7b469ee) * Merge branch 'stable' 2020-12-07 13:18:16 -0800 Kevin McCarthy (8a34338a) * Merge branch 'stable' 2020-12-07 17:36:30 +0000 dgc (59dc711f) * Add manual xml for list menu M doc/manual.xml.head 2020-12-07 08:53:35 +0100 Olaf Hering (25d2877f) * refresh de.po Signed-off-by: Olaf Hering M po/de.po 2020-12-07 02:09:07 +0100 Vincent Lefevre (b95a1d68) * Updated French translation. M po/fr.po 2020-11-26 15:21:05 -0800 Kevin McCarthy (42331065) * Add to skip past message headers in pager. This is based on , and is bound to 'H' by default. I've added an error message in case there is no text past the headers, just to cover the logical case. I don't think Mutt allows that to happen for text passed to the pager, but just in case. M OPS M doc/manual.xml.head M functions.h M pager.c 2020-12-06 12:56:45 -0800 Kevin McCarthy (c23921bc) * Fix list menu label alignment. Use mutt_strwidth() to find the maximum label length. Use mutt_FormatString() and mutt_format_s() to align the label. M listmenu.c 2020-12-06 21:47:35 +0100 Vincent Lefevre (067d802c) * Updated French translation. M po/fr.po 2020-12-06 11:20:06 -0800 Kevin McCarthy (aa85a70f) * Add new listmenu.c to POTFILES.in. M po/POTFILES.in 2020-12-06 20:03:02 +0100 Vincent Lefevre (64fce068) * Updated French translation for the master branch. M po/fr.po 2020-12-06 02:14:27 +0000 dgc (c92a06c0) * abstract some List-* header processing List-Post parsing is inline in the List-Post header handler. This moves it to some separate functions so that we can use it for other purposes. M Makefile.am M OPS M curs_main.c M doc/manual.xml.tail M functions.h M hcache.c M imap/message.c M keymap.c M keymap.h A listmenu.c M mutt.h M muttlib.c M pager.c M parse.c M protos.h 2020-12-04 11:05:35 -0800 Kevin McCarthy (6fe98cf5) * Merge branch 'stable' 2020-12-03 13:47:50 -0800 Kevin McCarthy (9518a0ab) * Add a mutt_error() when copy/save messages fails. Avoid using "part" translations for the tag/untagged copy/save combinations, even though that makes the code longer. M commands.c 2020-12-03 13:40:51 -0800 Kevin McCarthy (8d1f22a1) * Refresh index if a tagged save aborts in the middle. Make the sure the index message flags and status line are properly redrawn in that case. M curs_main.c 2020-12-02 13:22:52 -0800 Kevin McCarthy (d52b69bb) * Merge branch 'stable' 2020-12-01 14:21:31 -0800 Kevin McCarthy (1ec642e2) * Fix memory leak in imap_copy_messages(). mx.mbox (allocated by imap_parse_path) was not always freed before return. The sync_cmd and cmd buffers were also not always freed. One case was on retrying after creating the mailbox, which would overwrite the allocated pointers. As long as I'm touching the buffers, convert them to use the buffer pool. I think the mutt_buffer_clear() at the beginning of the retry loop isn't necessary, but will keep it to make it clear any existing values won't be reused a second time through the loop. M imap/message.c 2020-12-01 21:36:06 +0100 Vincent Lefevre (0a836cee) * Fix typos in the manual, found by codespell. M doc/manual.xml.head 2020-11-29 19:10:40 -0800 Kevin McCarthy (20334587) * Add mutt_buffer_rewind() function. This makes it a bit clearer what the assignment is doing, and reduces direct dptr manipulation a bit. M buffer.c M buffer.h M init.c M mutt_lisp.c M muttlib.c 2020-11-30 15:48:30 -0800 Kevin McCarthy (e1c962aa) * Fix a few mutt_extract_token() callers dest parameters. Some callers performed a mutt_buffer_init(), called mutt_extract_token() and then assumed that the buffer->data would never be NULL. Prior to the "fix" in commit f420be68, this was not true, even if MoreArgs() returns true, because the argument could be just ''. The parse_keymap() change fixed a possible segv. Don't use the buffer pool, because it returns buf->data to the caller. I don't believe the other two would segv, but they did still rely on the old behavior where the the buffer would have a '\0' appended always. So, change them to use the buffer pool to be cleaner. M init.c M keymap.c 2020-11-30 18:22:52 -0800 Kevin McCarthy (93a622ec) * Merge branch 'stable' 2020-11-29 15:34:33 -0800 Kevin McCarthy (25106303) * Merge branch 'stable' 2020-11-30 00:09:37 +0100 Vincent Lefevre (0149944d) * Updated Project-Id-Version to 2.0.2. M po/fr.po 2020-11-30 00:06:56 +0100 Vincent Lefevre (679c8184) * Updated French translation. M po/fr.po 2020-11-25 13:59:55 -0800 Kevin McCarthy (21ebc162) * Merge branch 'stable' 2020-11-25 10:24:22 -0800 Kevin McCarthy (239261b5) * Surround new and old debug functions with #ifdef DEBUG. The new function directly references debugfile, so needs the ifdef. The old function compiles fine, but since it's not used, put it inside the ifdef too. Thanks to Ian Allen for reporting the problem. M lib.c 2020-11-20 09:33:41 -0800 David Champion (a3011236) * add dprintf(n, fmt, ...) debugging macro dprintf(n, fmt, ...) is a more natural form of dprint(n, (debugfile, fmt, ...)). It prints code location in the debug file where possible. I believe this approach, while common, was not previously used because we were trying to be C90-compatible. C90 doesn't provide variadic macros. Now we require C99, so it makes sense to add this pattern. M lib.c M lib.h 2020-11-23 11:04:08 -0800 Kevin McCarthy (49545f61) * Add configure error if C compiler doesn't support C99. We added the test, but did not check to ensure it was found. Thanks to Oswald Buddenhagen for pointing out the missing check. He suggested the AC_PROG_CC might be redundant, but the info page seems to indicate AC_PROG_CC_C99 checks the properties of an already located compiler, so I'm leaving AC_PROG_CC in. Also, remove the $U check just below. Commit 64b1460a removed the call to AM_C_PROTOTYPES, but forgot to remove the $U check too. M configure.ac 2020-11-18 15:49:44 -0800 Kevin McCarthy (474d368e) * Add function to attachment menu. This uses a copiousoutput mailcap entry, or falls back to raw text. The existing functions do not provide a way to use copiousoutput mailcap entries exclusively. The default will use one for internally supported types if auto_view is configured, but there is no way to do so for other mime types (such as application/pdf). M OPS M attach.c M doc/manual.xml.head M functions.h M mutt.h M recvattach.c 2020-11-19 19:04:52 -0800 David Champion (03803e67) * Allow debugging without debug file rotation. start_debug() takes a boolean indicating whether to rotate debug files. The -d option allows a negative number. If negative, debug files are not rotated. The debug level is the absolute value. This is useful for continuously watching (e.g. tail -f) the .muttdebug0 file. M doc/manual.xml.head M doc/mutt.man M init.c M main.c 2020-11-22 20:22:23 +1100 Cameron Simpson (bb0cd944) * mutt.man: -H: clarify that a From_ line in the draft file is silently discarded M doc/mutt.man 2020-11-21 14:03:08 -0800 Kevin McCarthy (8c967ad5) * Clean up labels in imap_open_connection(). Commit 04b06aaa was purposely kept minimal, to aid backporting the fix. It kept the err_close_conn label, but there is no need for the label anymore. Change all goto's to use the bail label. M imap/imap.c 2020-11-20 09:32:41 -0800 Kevin McCarthy (3d362fa2) * Merge branch 'stable' 2020-11-19 15:10:48 -0800 Kevin McCarthy (452dee69) * Merge branch 'stable' 2020-11-18 14:17:00 -0800 Kevin McCarthy (1fccc7d1) * Remove buffer_normalize_fullpath(). This was supposed to normalize a path after relative path expansion. However, as Oswald Buddenhagen pointed out just before the release, its method of '..' expansion was incorrect with symlinks in play. Furthermore, it turned out mutt_pretty_mailbox() deals with '.' and '..'. The function was turned into a noop before the release, and I'm now pulling it out. M muttlib.c 2020-11-14 13:46:57 -0800 Kevin McCarthy (8dbc3b8d) * Merge branch 'stable' 2020-11-10 15:56:44 -0800 Kevin McCarthy (e832240e) * Fix IMAP UTF-7 for code points >= U+10000. The 20-year old utf7 conversion functions punted on those values, which was understandable for when they were written. We now have emojis and increasing number of characters that might be used in a mailbox. Add encode/decode logic using UTF-16 surrogate pairs. Thanks to Jeff Sipek for reporting this issue, and for giving pointers about how the values should be handled. M imap/utf7.c 2021-05-04 10:50:51 -0700 Kevin McCarthy (23ccbe39) * Update UPDATING file for 2.0.7. M UPDATING 2021-05-03 13:11:30 -0700 Kevin McCarthy (7c4779ac) * Fix seqset iterator when it ends in a comma. If the seqset ended with a comma, the substr_end marker would be just before the trailing nul. In the next call, the loop to skip the marker would iterate right past the end of string too. The fix is simple: place the substr_end marker and skip past it immediately. M imap/util.c 2021-04-28 10:59:03 -0700 Kevin McCarthy (e0f4d46b) * Filter unprintables for 2231 encoded continuations too. Changeset de8d8e8f a long time ago added the filter for 2047 and 2231 encoded values, to prevent strange issues. However, it looks like it missed the case where the value is broken into continuations. Those are assembled and charset converted in rfc2231_join_continuations(). Add a filter there too. M rfc2231.c 2021-04-24 15:20:02 -0700 Kevin McCarthy (8801dfe9) * Turn off pylint in gitlab-ci. It dynamically installs the latest pylint via pip, meaning it can start failing arbitrarily. It also appears to halt the build even on warnings. Since this is just checking a single contrib script, it's not worth my trouble. M .gitlab-ci.yml 2021-03-16 14:56:13 -0700 Kevin McCarthy (8eb29a4c) * Check if mutt_prepare_template() fails for -H command line arg. If the function fails, it will free the envelope, leading to a segv just below. Thanks to Phil Pennock for reporting the problem. M main.c 2021-03-10 18:31:42 -0800 Kevin McCarthy (dcf1d11f) * Fix resolve_types() newline removal and restoration. If the line had a '\n', the previous code would leave it off. The "buf[nl] = '\n'" at the end of the function was overwriting the old nul character, but there was a new one where the original newline was. However, if there was not a '\n', the code was removing the nul string terminator, which could cause very bad things for searches, (which are the only things that use fmt after resolve_types). Since this bug has been there for 12 years, I'm guessing the lines always contain a trailing '\n'. Now, there is a potential problem with behavior changes here... This could have an effect on the QuoteRegexp or SearchRE matches. It turns out SearchRE is compiled with REG_NEWLINE, but the other isn't. Since QuoteRegexp is (typically) only looking at the start of a line, I'm going to take the risk of restoring the '\n'. M pager.c 2021-03-06 11:15:07 -0800 Kevin McCarthy (98f8cb83) * automatic post-release commit for mutt-2.0.6 M ChangeLog M VERSION 2021-03-06 11:12:08 -0800 Kevin McCarthy (814f6d20) * Update UPDATING file for 2.0.6 release. M UPDATING 2021-02-25 14:19:19 -0800 Kevin McCarthy (de51ab4a) * Fix (un)setenv to not return an error with unset env vars. The code was returning -1 in those cases. This can cause hook processors, such as send2-hook, to sleep 1 second without an error message being set and displayed. It also causes the hook processor to abort executing subsequent matching commands. -1 should be reserved for syntax errors. For setenv querying, change the return value to 0. For unsetenv, generate a message and also change the return value to 0. checks if err->data is set to determine whether to print anything, and the behavior is used in the 'set' commands, so this is established correct behavior. M init.c 2021-02-05 15:34:37 -0800 Kevin McCarthy (0f8a2a13) * Save CurrentFolder in background edit scope. The CurrentFolder can actually be used to resolve an fcc-hook at fcc time. We would want to use the folder they started composing in, to be consistent with expectations. M doc/manual.xml.head M send.c M send.h 2021-02-07 19:41:21 -0800 Kevin McCarthy (564b515c) * Fix pattern compilation error for ~( !~>(~P) ) The problem is a nested recursive call followed by trailing whitespace. Other codepaths ensure trailng whitespaces are processed when processing the argument, but the parenthesis calls did not. This meant the outer loop while check: while (*ps.dptr) { SKIPWS (ps.dptr); switch (*ps.dptr) { /* process (~P), for instance */ } } would return true for the trailing space(s), the SKIPWS would skip over them, and then switch would try to evaluate '\0'. I think a better solution would be to rearrange the calls like: SKIPWS (ps.dptr); while (*ps.dptr) { switch (*ps.dptr) { } SKIPWS(ps.dptr); } to ensure any trailing whitespace is removed. However, that's a bit risky for a stable branch commit. So instead, just explicitly add the SKIPWS for the ~() thread ops and for the () groupings after processing the inside expression. M pattern.c 2021-02-02 12:47:24 -0800 Kevin McCarthy (ca272c39) * Fix contrib/markdown2html crash. The script crashes if the last line in the message ends with a colon. Thanks to Aitor Soroa (@asoroa) for the bug report and patch! M contrib/markdown2html 2021-01-27 14:55:35 -0800 Kevin McCarthy (6df1891b) * Fix another yesorno prompt, for autocrypt account creation. I seem to have trouble remembering that ctrl-g is one of the choices. :-( There is yet another autocrypt prompt for "enabling prefer-encryption" that *could* abort on ctrl-g. But, since it's not really an "action" prompt, I'm keeping that one as a "no on ctrl-g". M autocrypt/autocrypt_gpgme.c 2021-01-27 09:31:58 +0100 Christopher Zimmermann (2342b4d1) * Correctly handle CTRL-G on remaining background_edit sessions prompt M curs_lib.c M curs_main.c 2021-01-21 12:31:43 -0800 Kevin McCarthy (da5e3282) * automatic post-release commit for mutt-2.0.5 M ChangeLog M VERSION 2021-01-21 12:27:50 -0800 Kevin McCarthy (dd66f4ae) * Update UPDATING file for 2.0.5. M UPDATING 2021-01-17 10:40:37 -0800 Kevin McCarthy (4a2becbd) * Fix memory leak parsing group addresses without a display name. When there was a group address terminator with no previous addresses (including the group display-name), an address would be allocated but not attached to the address list. Change this to only allocate when last exists. It would be more correct to not allocate at all unless we are inside a group list, but I will address that in a separate commit to master. M rfc822.c 2020-12-01 14:21:31 -0800 Kevin McCarthy (464a9bc6) * Fix memory leak in imap_copy_messages(). mx.mbox (allocated by imap_parse_path) was not always freed before return. The sync_cmd and cmd buffers were also not always freed. One case was on retrying after creating the mailbox, which would overwrite the allocated pointers. As long as I'm touching the buffers, convert them to use the buffer pool. I think the mutt_buffer_clear() at the beginning of the retry loop isn't necessary, but will keep it to make it clear any existing values won't be reused a second time through the loop. M imap/message.c 2021-01-13 19:06:49 -0800 Kevin McCarthy (b40c7f6c) * Fix imap memory leaks. The mx.mbox allocated by imap_parse_path() was not freed on error in a couple places. There is also a leak in imap_copy_message(), but this was fixed in master in commit 1ec642e2. I'll cherry pick that into stable. M imap/imap.c 2021-01-08 19:04:18 -0800 Kevin McCarthy (b67ae9ce) * Fix color overlay when HAVE_COLOR is unset. mutt_merge_colors() and mutt_attrset_cursor() were not defined in that case, but are called in the menu and sidebar. Change mutt_merge_colors() to just combine attributes in that case. M color.c 2020-12-30 14:23:18 -0800 Kevin McCarthy (26f41dd1) * automatic post-release commit for mutt-2.0.4 M ChangeLog M UPDATING M VERSION 2020-12-30 14:15:08 -0800 Kevin McCarthy (5cc62090) * Bump copyright notices. I'll run the update tool on source files in master a bit later. M COPYRIGHT M doc/manual.xml.head M doc/mutt.man M main.c 2020-12-29 13:13:09 -0800 Kevin McCarthy (b23f900b) * Fix smtp debug segfault on invalid SmtpAuthenticators list. sasl_client_start() sets the mech parameter only on success. dprint() the whole mechlist on failure. M smtp.c 2020-12-24 15:33:57 -0800 Kevin McCarthy (48d08860) * Fix header cache BDB version checking. Update BDB versions up to 6.2. The scheme used here is, as Oswald nicely puts it, "totally insane", and seems to come straight from the initial header cache commit in c11667eaa3. For a stable release, I'm just going to add a few more Jenga pieces to the top. However, going forward this is unmaintainable. Oswald reports using a simple check for "db.h" and "-ldb" for about two decades with no issues. I will make that change in master later this week. M configure.ac 2020-12-21 15:30:01 -0800 Kevin McCarthy (11b18027) * Fix offset to use LOFF_T in a couple places. The BODY->hdr_offset was incorrectly of type long, which could result in corrupted >2gb mbox files in some circumstances. The uses in mh_rewrite_message() are not as serious, but they should still be of type LOFF_T. I found both of these fixes in a patch file, bug-676388-largefile.patch, in the openSUSE mutt src rpm. It looks like Harald Koenig was the original author of a larger patch in that openSUSE ticket, which was reduced over time as fixes were made to Mutt. Note that patch file also incorrectly adjusted old_hdr_lines in mh.c. I've removed that part, as HEADER->lines is type int. Unfortunately, the BODY->hdr_offset type change will result in a header cache change (i.e. invalidation). I'm not enthused about doing that during a stable release, but the change is important enough to merit it. M mh.c M mutt.h 2020-12-07 14:47:22 -0800 Kevin McCarthy (a7b839e5) * Ensure idata->check_status is cleared on mailbox close. I don't think this would cause any issues, but it should be cleared here in any case. M imap/imap.c 2020-12-07 13:03:41 -0800 Kevin McCarthy (b5ef1155) * Abort IMAP open if condstore/qresync updates fetch fails. An error in imap_cmd_step() was not being properly returned to the caller. M imap/message.c 2020-12-04 10:54:21 -0800 Kevin McCarthy (a51f058f) * automatic post-release commit for mutt-2.0.3 M ChangeLog M VERSION 2020-12-04 10:48:04 -0800 Kevin McCarthy (c6f114f8) * Update UPDATING file for 2.0.3 release. M UPDATING 2020-12-02 13:03:06 -0800 Kevin McCarthy (3ba8dac0) * Fix pager dropped input on SigWinch flag handling. The code to process the SigWinch flag ocurred after, and would drop an input character when the flag was set outside of, km_dokey(). This could happen, for instance, when a pipe operation was invoked. Thanks to Vincent Lefèvre for uncovering the problem. M pager.c 2020-11-30 15:53:49 -0800 Kevin McCarthy (f420be68) * Ensure mutt_extract_token() never returns a NULL dest->data. Commit e5a32a61 removed a 'mutt_buffer_addch (dest, 0)' at the end of the function. Most callers had been converted to use the buffer pool, and the call was strange since buffers self-terminate. However, this line covered up logic errors in some of the callers, which assumed the buffer->data could not be NULL afterwards. I will try to fix up callers with the logic errors in master. This is to fix the problem in stable, and also ensure future callers don't make the same mistake. M init.c 2020-11-29 13:44:30 -0800 Kevin McCarthy (cfdcfa7f) * Fix REPLY_TO environment variable handling. Commit 4e153adf changed this code to reuse the function buffer variable, but forgot to rewind the buffer for parsing in parse_my_hdr(). Additionally commit e5a32a61 removed an extra "null termination" mutt_buffer_addch() at the end of mutt_extract_token(). This caused a NULL value to be passed to the strpbrk() in parse_my_hdr(), causing a segv. Change to use a buffer pool token parameter instead. I actually think, like with the previous IMAP mailbox handling, this method of adding a my_hdr is dangerous. I'll look into refactoring it in master instead. Thanks to Paul Nevai for reporting the problem and tracking down the backtrace. M init.c 2020-11-29 10:48:22 -0800 Kevin McCarthy (dbdf481c) * Fix undefined NULL pointer arithmetic. clang 10 is giving a warning about arithmetic with a NULL pointer. To prevent any problems, add checks in the BUFFER increase-size handling functions. M buffer.c 2020-11-25 13:46:47 -0800 Kevin McCarthy (9109eff8) * Fix exact-address recording of last value. If the last address was also terminated by a comma (e.g: foo@local, bar@local,) the exact-address was incorrectly overwriting the recorded value. M rfc822.c 2020-11-24 12:54:00 -0800 Kevin McCarthy (d73a83f7) * Fix exact-address handling when addr->personal is set. The exact-address compile-time option takes an exact copy of an address when it is parsed, and prints that out when outputting the address. The idea is to preserve older "user@host (Name)" syntax. Unfortunately, when code tries to "update" the personal/name field, it needs to clear the exact-address copy for it to have any effect. An object-oriented design encapsulating the setting would help prevent this problem. It might be desirable to create a C function instead, but callers would have to remember it, and such a thing isn't common in the Mutt codebase. Another patch (I'm still debating applying) changes the address parser to discard the exact-address copy when it exactly matches the mailbox. However, that still won't fix every case (and it makes the parser even more difficult to follow.) So this commit (to stable) takes the straightforward approach. It fixes bugs in: * Alias creation. The "personal name" prompt was ignored. * Autocrypt initialization from address setting with $realname. * $pgp_getkeys_command handling. * Query menu results. * "unset $reverse_realname" handling. * $from handling of $realname. * Bounce Resent-From handling of $realname. M alias.c M autocrypt/autocrypt.c M pgpinvoke.c M query.c M send.c M sendlib.c 2020-11-20 09:23:29 -0800 Kevin McCarthy (d9268908) * automatic post-release commit for mutt-2.0.2 M ChangeLog M VERSION 2020-11-20 09:20:01 -0800 Kevin McCarthy (e4fd9247) * Update UPDATING file for 2.0.2. M UPDATING 2020-11-16 10:20:21 -0800 Kevin McCarthy (04b06aaa) * Ensure IMAP connection is closed after a connection error. During connection, if the server provided an illegal initial response, Mutt "bailed", but did not actually close the connection. The calling code unfortunately relied on the connection status to decide to continue with authentication, instead of checking the "bail" return value. This could result in authentication credentials being sent over an unencrypted connection, without $ssl_force_tls being consulted. Fix this by strictly closing the connection on any invalid response during connection. The fix is intentionally small, to ease backporting. A better fix would include removing the 'err_close_conn' label, and perhaps adding return value checking in the caller (though this change obviates the need for that). This addresses CVE-2020-28896. Thanks to Gabriel Salles-Loustau for reporting the problem, and providing test cases to reproduce. M imap/imap.c 2020-11-19 15:06:51 -0800 Keld Simonsen (d4c97068) * Updated Danish translation. M po/da.po 2020-11-14 13:16:03 -0800 Kevin McCarthy (42e08237) * automatic post-release commit for mutt-2.0.1 M ChangeLog M VERSION 2020-11-14 13:10:45 -0800 Kevin McCarthy (78fe7d4e) * Update UPDATING file for 2.0.1. M UPDATING 2020-11-12 09:42:28 -0800 Kevin McCarthy (894a49f6) * Clarify pattern completion uses . Some users may have bound tab to another function, so be specific. M UPDATING 2020-11-09 10:59:44 +0100 Remco Rijnders (86d64caa) * Consistently use uint32_t (closes #294) M hcache.c M mutt_random.c 2020-11-07 12:18:03 -0800 Kevin McCarthy (3d08634b) * automatic post-release commit for mutt-2.0.0 M ChangeLog M VERSION M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2020-11-07 11:30:13 -0800 Kevin McCarthy (0c8f4357) * Add missing new header files to EXTRA_mutt_SOURCES. I forgot to add the mutt_lisp.h and mutt_random.h files there. M Makefile.am 2020-11-07 11:01:47 -0800 Kevin McCarthy (a374cea8) * Update UPDATING file for 2.0. M UPDATING 2020-11-06 14:31:57 -0800 Vsevolod Volkov (3e9c605d) * Updated Russian translation. M po/ru.po 2020-11-06 14:29:11 -0800 Vsevolod Volkov (3317883a) * Updated Ukrainian translation. M po/uk.po 2020-11-06 14:26:09 -0800 Ivan Vilata i Balaguer (32fcad9f) * Updated Catalan translation. M po/ca.po 2020-11-06 14:02:49 -0800 Kevin McCarthy (f5aa9382) * Disable normalization after expand_path(). The algorithm used was incorrect, for '..' expansion with symlinks involved. Furthermore, mutt_pretty_mailbox() takes care of this for us. To be conservative, just before the release, I'm leaving the function but converting it to a noop. I'll pull the function out after the release. Thanks to Oswald Buddenhagen for pointing out the bug! M muttlib.c 2020-11-06 13:18:27 -0800 Kevin McCarthy (6704caf4) * Don't relative-path expand for fcc-hook and save-hook. "fcc-hook ~x. \\^" used to work, because mutt_addr_hook() calls mutt_make_string(), which performs backslash expansion. The same would happen for save-hook. Many thanks to Oswald Buddenhagen for reporting the issue. M hook.c M muttlib.c M protos.h 2020-11-04 23:01:55 +0100 Grzegorz Szymaszek (533c38f4) * Fix the Polish translation of “Attachments†I have misunderstood the “Atts†abbreviation for “Attributesâ€, while it actually means “Attachmentsâ€. M po/pl.po 2020-11-04 20:15:52 +0100 Grzegorz Szymaszek (cdc99643) * Update the Polish translation for Mutt 2.0 M po/pl.po 2020-11-03 16:50:23 +0100 Flammie Pirinen (f26731fa) * updated finnish translation M po/fi.po 2020-11-03 07:11:00 -0800 Kevin McCarthy (e677c196) * Minor fix to UPDATING file. M UPDATING 2020-10-31 15:35:53 +0100 Petr PísaÅ™ (d752a64c) * Czech translation updated for 2.0 M po/cs.po 2020-10-29 14:46:30 -0400 Remco Rijnders (f6fb0ca9) * Adjust Makefile.am to exclude BEWARE file M Makefile.am 2020-10-29 14:24:08 -0400 Remco Rijnders (37a1950a) * Move contents from BEWARE to devel-notes.txt D BEWARE M doc/devel-notes.txt 2020-10-29 13:59:13 -0400 Remco Rijnders (4fa19ba4) * Change instructions to subscribe to dev mail list M doc/devel-notes.txt 2020-10-25 15:07:55 -0700 Kevin McCarthy (9258922a) * Add a more explicit mention of ^G in the manual. It's a FAQ, so I think is worth emphasizing in the "getting started" section. M doc/manual.xml.head 2020-10-25 20:49:22 +0100 Christopher Zimmermann (cafe0fb5) * Allow to abort on question about multipart/alternative M send.c 2020-10-24 09:13:19 -0400 Remco Rijnders (63e8ba68) * Updated Dutch translation. M po/nl.po 2020-10-23 15:50:06 -0700 Emir Sarı (d8bbd22c) * Update Turkish translations. M po/tr.po 2020-10-23 19:10:58 +0200 Olaf Hering (18a07d14) * refresh de.po Signed-off-by: Olaf Hering M po/de.po 2020-10-22 19:41:14 -0700 Kevin McCarthy (e1089b5e) * Remove obsolete stamp-h.in. This file was used a long time ago (pre-1.0) when Makefile.in was checked in. We now generate Makefile.in from Makefile.am, and automake appears to use a different mechanism of time-stamping, using stamp-h + $counter. D stamp-h.in 2020-10-17 18:55:27 -0700 Kevin McCarthy (1036f0ed) * Add an initial change list for 2.0.0 to the UPDATING file. M UPDATING 2020-10-17 18:54:52 -0700 Kevin McCarthy (47fa1503) * Add the mailboxes history category to the manual. M doc/manual.xml.head 2020-10-14 14:29:27 +0200 Philipp Klaus Krause (36640a88) * Since the string from strerror should never be modified, use const. M curs_lib.c 2020-10-12 15:34:44 -0700 Kevin McCarthy (1061dcbc) * Create $attach_save_dir. This will be used when saving attachments via mutt_save_attachment_list(). Try to create the directory if it doesn't exist. If we're unable to chdir or create the directory just continue on, using cwd. M globals.h M init.h M recvattach.c 2020-10-09 09:20:11 -0700 Kevin McCarthy (f8263764) * Fix mutt_oauth.py.README example. $imap_authenticators should be colon delimited. M contrib/mutt_oauth2.py.README 2020-10-06 13:39:55 +1100 Cameron Simpson (0241b030) * doc/manual.xml.head: Most common mail sending keys: replace "compose" with "mail", incorrect function name M doc/manual.xml.head 2020-10-03 15:43:06 -0700 Kevin McCarthy (489ade5c) * Move MuttLisp example descriptions before the code. M doc/manual.xml.head 2020-10-01 13:33:55 -0700 Kevin McCarthy (ed9303a8) * More ansi/special cleanup. Relocate the checks for a->attr and special around the blocks that use them. M pager.c 2020-09-30 09:49:17 -0700 Kevin McCarthy (65b1ceab) * Don't do ansi coloring on a search result. M pager.c 2020-09-29 18:46:27 -0700 Kevin McCarthy (73a7bf2c) * Don't free and reuse ansi colors. You can't reallocate a color-pair to another color while the previous one is still on the screen. Since there are at most 64 ansi-color combinations, just let them accumulate. M pager.c 2020-09-29 14:20:24 -0700 Kevin McCarthy (a3a4d12f) * Fix $allow_ansi end-of-line handling for attachments. Attachment viewing doesn't set MUTT_SHOWCOLOR, but for proper display we need to call resolve_color() before clearing to end-of-line. M pager.c 2020-09-29 14:17:27 -0700 Kevin McCarthy (15372907) * Separate special color setting from $allow_ansi colors. The ColorDefs for MT_COLOR_BOLD and MT_COLOR_UNDERLINE should only be applied for the special formatting. They shouldn't apply when $allow_ansi has a bold/underline sequence. Change the exclusive or operator to a regular or. Exclusive or implies we are doing some kind of toggling, which we are not in this case. It just confuses things. Don't make the ansi underline, reverse, and blink mutually exclusive. M pager.c 2020-09-23 11:08:03 -0700 Kevin McCarthy (b0ccf259) * Delay $hostname setting until after the muttrc is evaluated. Commit 5c5c34f2 made back in 1.6 changed Fqdn setting to use gethostname() and getaddrinfo() to get the canonical domain. This is more accurate but can cause startup delays for systems where the DNS resolution is not set up properly. Because this occurred before muttrc reading, there was no workaround except to "fix DNS". Change Fqdn ($hostname) setting to occur after the muttrc and '-e' argument processing occur. This is a possible breaking change if users rely on $hostname inside their muttrc, for example 'source "muttrc.$hostname"'. The workaround would be to put something like (depending on the system type): 'set hostname = `hostname --fqdn`' in the muttrc above that invocation. Also note that we still set Hostname (the internal variable) early, because it is used in more places than Fqdn, such as tempfiles. M init.c M init.h 2020-09-22 11:17:07 -0700 Kevin McCarthy (8a2fc801) * Note that $cursor_overlay affects tree colors too. Change the font on "default" to indicate that actual value allows for color overlays between the layers. M init.h 2020-09-20 18:46:48 -0700 Kevin McCarthy (9204b24e) * Reenable $ssl_force_tls. The next release will be 2.0, providing more justification for (reasonable) breaking changes. In 2020, this should be the default. The documentation seems to already make appropriate warnings about $tunnel_is_secure. Since that option is introduced this release, there is no need to worry about existing users with it unset. However, there were a couple stray double-quotes in the documentation for that, so clean those up in this commit. M doc/manual.xml.head M init.h 2020-09-19 15:31:36 -0700 Kevin McCarthy (2ce2fb7b) * Add refresh option to smime_keys man page. M doc/smime_keys.man 2020-09-18 09:39:18 -0700 Kevin McCarthy (34ba89ec) * Add missing full stops in smime_keys.man page. Thanks to hmartink and the manpage-l10n project for pointing out the issues. M doc/smime_keys.man 2020-09-16 09:44:07 -0700 Kevin McCarthy (e91313b8) * Remove casts for mutt_random_bytes() argument. Unneeded casts can hide issues later on, so take them out. M mutt_random.c M muttlib.c M sendlib.c 2020-09-15 14:32:19 -0700 Kevin McCarthy (ee2b9d1d) * Remove message-id security leaks section of manual. The message-id generator has been changed to use a combination of time and random components for the left side. M doc/manual.xml.head 2020-09-08 14:05:49 -0400 Remco Rijnders (9da4e6e1) * Change Message-ID to be more unique and leak less information A Message-ID should be globally unique. Currently mutt generates this ID based on the current date and time, followed by ".G", followed by a letter A to Z (A for the 1st and 27th email sent, Z for the 26th, etc.), followed by the pid of the active mutt process, followed by "@" and the configured fqdn. This can lead to information being leaked as to an users email habits and activities, which might be undesirable. By replacing everything left of the "@" in the Message-ID with a Base64 encoded timestamp and 64 bits of randomness, we no longer include this information. M sendlib.c 2020-08-31 13:48:51 -0400 Remco Rijnders (b48233f7) * Use PRIu64 macro as format when printing uint64_t values M muttlib.c 2020-08-31 13:10:25 -0400 Remco Rijnders (8ccd96db) * Implement LFRS113 PRNG functions - Instead of relying on random() implementations which can be of questionable quality or relying on the presence of /dev/urandom, we implement our own PRNG implementation that uses the LFRS113 PRNG algorithm by Pierre L'Ecuyer. We seed this PRNG with values based on time, pid and ppid. It is OK if not all seeds are of the highest quality as all four seeds would have to be known to predict the numbers generated. In addition to this, we also use /dev/urandom values (if available) that we mix into our four seeds. In case we are reseeding we will also reuse our existing state information for setting the new seed values. - Add a function to Base64 encode 96 random bits M Makefile.am M init.c A mutt_random.c A mutt_random.h M muttlib.c M sendlib.c 2020-09-13 00:05:22 +0100 isdtor (56de020a) * Add note about $smime_default_key to use with GPGME. When using GPGME for S/MIME, the key id used should be the id displayed by "gpgsm --list-keys". M init.h 2020-09-06 15:39:07 -0700 Kevin McCarthy (4219d5f9) * Block signals during mbox-append operation. I first noticed this back in 2017, but no one replied to my query to mutt-dev and I forgot about it too. Thanks to Oswald Buddenhagen for the followup when he was going through the mailing list archives, confirming the mistake. I've also reviewed MUTT_APPEND and MUTT_NEWFOLDER uses to make sure the context is properly closed (and the signals restored). M mbox.c 2020-09-05 15:15:40 -0700 Kevin McCarthy (7157d009) * Removed unused mutt_expand_path() All usages now call mutt_buffer_expand_path(). M muttlib.c M protos.h 2020-09-05 15:11:59 -0700 Kevin McCarthy (d76aebd2) * Convert _mutt_enter_string() to use buffer expand_path function. This is the last usage of mutt_expand_path(). Converting all of _mutt_enter_string() is a large project, so instead just localize to use a BUFFER for the mutt_expand_path() call. M enter.c 2020-09-05 14:10:18 -0700 Kevin McCarthy (4a2f1067) * Remove unused mutt_quote_filename(). All callers now call the buffer function instead. M lib.c M lib.h 2020-09-04 19:46:02 -0700 Kevin McCarthy (bf68f089) * Convert mutt_create_alias and helpers to use buffer pool. This is working towards removing a few of the partially converted path functions, such as mutt_expand_path(). M alias.c M protos.h 2020-09-06 23:21:15 +0200 Olaf Hering (2d9c05c9) * Fix typos in de.po Signed-off-by: Olaf Hering M po/de.po 2020-09-04 14:16:21 -0700 Kevin McCarthy (c4fe5624) * Use muttmua ubuntu image for shellcheck. M .gitlab-ci.yml 2020-09-04 14:11:55 -0700 Kevin McCarthy (0f97dd3a) * Turn off shellcheck unused var warning for doc/instdoc.sh. M doc/instdoc.sh.in 2020-08-30 13:26:29 -0700 Kevin McCarthy (7ae6d9aa) * Disable relative expansion for signature and source pipes. Relative expansion shouldn't be performed when those values are to be executed as a pipe for the output. I believe this issue only affects $signature and the source command, so for now I'm disabling relative expansion for those two cases. If there is too much more breakage, I will consider backing out the relative expansion and disabling the :cd command. Thanks to Aaron Schrab for reporting this issue. M init.c 2020-08-28 15:51:55 -0700 Kevin McCarthy (2ba1d11f) * Normalize expanded paths with '.' or '..' in them. This usage is not too likely, but to prevent strange looking mailbox paths, make sure the path is normalized after being expanded. M muttlib.c 2020-07-29 13:44:17 -0700 Kevin McCarthy (6fc79323) * Remove relative path expansion for some cases. Some paths, such as the folder browser, or certain hook values, should be expanded for shortcuts, but not for relative paths. Configuration variables that hold commands that search by PATH should also not be expanded. Create a separate call, and a separate data type for config vars. M browser.c M commands.c M doc/makedoc.pl M hook.c M init.c M init.h M muttlib.c M protos.h M recvattach.c 2020-07-26 19:10:57 -0700 Kevin McCarthy (0f455d51) * Change expand_path() to expand relative paths. The introduction of the "cd" command can make relative paths unreliable. Change expand_path() to expand relative paths. Change pretty_mailbox() to contract relative paths, but only when the folder is outside of homedir, or when cwd is underneath the homedir. To try and keep the sidebar from changing, use the pretty_mailbox code to contract relative paths only. M muttlib.c M sidebar.c 2020-08-29 12:30:18 -0700 Kevin McCarthy (092bc204) * Merge branch 'stable' into master 2020-08-29 12:29:50 -0700 Kevin McCarthy (f34d0909) * automatic post-release commit for mutt-1.14.7 M ChangeLog M VERSION 2020-08-27 15:11:25 -0700 Kevin McCarthy (55c09cfb) * Merge branch 'stable' into master 2020-08-25 12:29:14 -0400 Remco Rijnders (20165b4e) * Remove always true conditional (#if 1) M main.c 2020-08-25 12:23:37 -0400 Remco Rijnders (9ef96f1f) * Remove always true conditional (#if 1) M strcasestr.c 2020-08-25 12:16:52 -0400 Remco Rijnders (ae3014e9) * Make returns after mx_fastclose_mailbox calls more consistent and cleaner M mx.c 2020-08-25 12:14:33 -0400 Remco Rijnders (97398c4f) * Remove always true conditional (#if 1) M imap/imap.c 2020-08-22 07:43:15 -0700 William Yardley (3f856d11) * refactor: update shell scripts for shellcheck warnings This updates shell scripts in the project to resolve shellcheck lint warnings. A couple of warnings are ignored instead, at least for now. M check_sec.sh M contrib/bgedit-detectgui.sh M contrib/iconv/make.sh M gen_defs M txt2c.sh 2020-08-24 12:12:39 -0700 William Yardley (6f4c0f7a) * gen_defs: switch from $(()) to expr For greater compatibility with Solaris's Bourne shell, switch to "expr" for numeric evaluation M gen_defs 2020-08-21 21:43:23 -0700 William Yardley (18dc7be4) * ci: enable shellcheck M .gitlab-ci.yml M Makefile.am 2020-08-25 09:00:26 -0700 Kevin McCarthy (2d1da9c0) * Merge branch 'stable' into master 2020-08-21 22:50:55 -0700 William Yardley (2f5a9496) * mutt_oauth2: update for pylint / flake8 warnings * Update style to resolve some pylint / flake8 warnings * Run pylint / flake8 in CI M .gitlab-ci.yml A .pylintrc M contrib/mutt_oauth2.py 2020-08-21 15:22:50 -0700 Alexander Perlis (c0218ade) * Updates to contrib/mutt_oauth2.py and README. The newer version of the mutt_oauth2.py script incorporates the following changes: - Uses /usr/bin/env at top - Many formatting changes to appease pylint - Improvement to POP test error message output Also attached is a README that has instructions for both Microsoft and Google. M contrib/mutt_oauth2.py M contrib/mutt_oauth2.py.README 2020-07-23 19:15:11 +0300 Maxim Tarasov (a563ce85) * Change hardcoded subject of replies This affects prefilled subject of a reply to an email with an empty subject. M send.c 2020-08-13 13:00:01 -0700 Kevin McCarthy (2bfb7fed) * Merge branch 'stable' into master 2020-08-13 19:07:10 +0200 Vincent Lefevre (c994f365) * Updated French translation. M po/fr.po 2020-08-10 11:19:46 -0700 Kevin McCarthy (a84e8823) * Improve clarity of help format_line() splitting. Thanks to Zero King for the initial patch. He says the original line confused some static analysis tools. I don't see anything wrong with the operator precedence, but as long as we are cleaning up the line, split assignment and conditional evaluation to make it even clearer. M help.c 2020-08-06 15:50:53 -0700 Kevin McCarthy (17df35f0) * Merge branch 'stable' 2020-08-04 11:03:08 -0700 Kevin McCarthy (8e8c586d) * Fix manual typo. M doc/manual.xml.head 2020-08-03 16:14:29 -0700 Kevin McCarthy (2fbc29ec) * Allow my_var assignments to reference the $my_var in the value. This is important for MuttLisp, where the current value could be used to determine the new assignment. M init.c 2020-08-01 19:55:26 -0700 Kevin McCarthy (312e9bd9) * Fix MuttLisp extract_token() call to remove trailing whitespace. MoreArgs() doesn't look for whitespace, and so assumes mutt_extract_token() will remove trailing whitespace too. M init.c 2020-07-27 08:56:10 +0200 Olaf Hering (7fe1aaad) * refresh de.po Signed-off-by: Olaf Hering M po/de.po 2020-07-26 03:04:33 +0300 Maxim Tarasov (0b3fc03c) * Fix man section in reference to mutt_dotlock M init.h 2020-07-26 03:00:54 +0300 Maxim Tarasov (661bd665) * Update mutt.1 manpage * Change the wording for some options to be imperative. * Rename parameters to be descriptive ("draft" instead of "file"). * Mention possible values for -m parameter. * Change "file [...]" to "file ..." as ellipsis already implies it's optional. * Format entries in the SYNOPSIS to avoid wrapping inside square brackets. * Space out examples in -a description. * Use consistent formatting everywhere: options using B, paths and option values using I, manual references using BR. * Group together descriptions of EDITOR and VISUAL environment variables since they're closely related. Mention the default editor. * Add references to these environment variables: EGDSOCKET, RANDFILE, LC_ALL, LC_CTYPE, LANG, and TEXTDOMAINDIR. * Clarify the way TMPDIR is used. * Add ~/.muttdebug0 to the FILES section. * Add missing manual pages to the SEE ALSO section. Sort the list. * Add line breaks after sentences (this is recommended in roff manual to enable sentence processing; sentences are double spaced automatically). M doc/mutt.man 2020-07-26 13:47:06 +0000 Asif Talybov (be906781) * Update russian translation - add a missing character and fix typo M po/ru.po 2020-07-25 16:08:03 -0700 Kevin McCarthy (317abd8f) * Fix a few typos in the manual. M doc/manual.xml.head M init.h 2020-07-25 16:07:14 -0700 Kevin McCarthy (9ab12e1e) * Add missing commands in the muttrc.man page. M doc/muttrc.man.head 2020-07-25 14:25:43 -0700 Kevin McCarthy (692a6069) * Add empty-request lines to muttrc.man for spacing. Adding them makes it a bit easier to see where the different commands stop and start. M doc/muttrc.man.head 2020-07-25 13:03:09 -0700 Kevin McCarthy (9edbbac1) * Change POP3 oauth to not use initial response. The Microsoft documents indicate their implementation requires a > AUTH XOAUTH2 < + > token sequence. I don't have their services configured to test, but it's safer to assume not all implementations will support initial response. I did test Gmail's and they are fine with the second round trip. M pop_auth.c 2020-07-25 09:29:21 -0700 Kevin McCarthy (e050c314) * Improve w3m invocation for manual.txt generation. This fix is also from Ambrose Li (@gniw). The invocation makes sure w3m won't attempt a remote connection if manual.html doesn't exist and a proxy is configured, by using manual.txt as stdin. It also gives a non-zero exit status in that case, and makes sure input is processed as utf-8. M doc/Makefile.am 2020-07-25 04:18:03 +0300 Maxim Tarasov (daab98e3) * Change \fC to \fB during muttrc.man generation \fC is not actually a valid escape sequence. Using it results in misplaced underlined formatting. M doc/makedoc.pl 2020-07-24 16:02:32 -0700 Kevin McCarthy (a21c9fc1) * Merge branch 'stable' 2020-07-23 17:11:47 +0300 Maxim Tarasov (6479ec5c) * Mention $XDG_CONFIG_HOME in the manpage Mutt supported processing $XDG_CONFIG_HOME/mutt/muttrc for a while now, but mutt(1) man page hasn't been updated to reflect that. This will also replace .IP with .TP to use one line per file name and highlight file names with .I which is common practice in manual formatting. M doc/mutt.man 2020-07-22 18:46:51 -0700 Kevin McCarthy (3c2501e5) * Fix redraw_motion() redraw bug. Commit e2a28006 moved the cur_color assignment so that $arrow_cursor could also use the value for overlays. Unfortunately, it at the same time moved the call *after* the call to mutt_window_move(), which would introduce a drawing bug if menu->color() went across IMAP. The previous commit removed overlays for $arrow_cursor, also removing the need for cur_color to be assigned for both. Move it back to where it was before. M menu.c 2020-07-22 18:22:03 -0700 Maxim Tarasov (12ff55e2) * Add color overlay to print_enriched_string(). It is called by main menu drawing routines and contains its own conditional coloring of a tree component. As is, everything in there gets overwritten by the indicator. Furthermore, do_color parameter specifically disables any coloring in order for indicator highlight to overwrite everything else. We need to merge three colors here: 1) index color; 2) tree color, that is drawn within menu using its own color; 3) indicator color, that, if active, is drawn over both of them. Combining these colors is implemented in that order. After some testing, I think it doesn't make sense to merge colors when $arrow_cursor is on. This part is reverted to the original behavior. Make print_enriched_string() coloring behavior self-contained, instead of assuming the proper base_color is already set. This makes the callers simpler and allows them to only handle $arrow_cursor logic. M menu.c 2020-07-21 14:40:50 -0700 Maxim Tarasov (aa8e6d4c) * Fix cursor overlay logic. Attributes should always be merged, not only when indicator background or foreground is set. M color.c 2020-07-20 19:43:58 -0700 Kevin McCarthy (e12028bd) * Don't increment color refcount for overlays. Add a ref parameter, setting to 0 for the overlays. The pager also allocates temporary colors, but seems to take the trouble to try and free them too. M color.c M pager.c M protos.h 2020-07-20 18:22:41 -0700 Kevin McCarthy (f2e96586) * Add $cursor_overlay, default unset, to control overlaying. Although I think the new behavior is desirable, experience has shown that changes need to be controlled by an option and usually defaulting the same as before. M color.c M init.h M menu.c M mutt.h M protos.h M sidebar.c 2020-07-20 22:50:10 +0300 Maxim Tarasov (e2a28006) * Add cursor overlay capability. Currently, when the indicator line is over an unread message, full indicator color definition is used, and the line is no longer displayed bold. It's harder to notice when using default reverse style for the indicator, but it becomes much more prominent when you have black on white display and only subtle change in the indicator background. We could improve this by merging indicator color definition with color definition of the underlying menu item. Here is how it's done: 1. First color definitions for the indicator and underlying menu item are taken and split back to foreground, background and attributes (meaning bold, underline, etc.). 2. If indicator does not specify foreground or background color, new color pair is created by using underlying menu item as base. Else indicator's own foreground and background are used (current behavior). 3. Then attributes of both colors are combined together. For example, if indicator has 'underline' and menu item has 'bold' result will be highlighted as 'bold underline'. 4. The resulting color is used in place of MT_COLOR_INDICATOR when highlighting things in menu.c. Combining attributes this way makes sense to me, because indicator is meant to _indicate_, meaning increasing information density. It also looks better when moving through the list containing differently styled items. This patch affects indicator, sidebar_highlight, and sidebar_indicator color objects. M color.c M menu.c M protos.h M sidebar.c 2020-07-15 19:44:52 -0700 Kevin McCarthy (40ce20c8) * Add first version of MuttLisp. This is somewhat simple enhancement to muttrc processing, not a full-blown embedded scripting language. There are no variables, functions, types, or abilities that compete with macros. MuttLisp can be invoked using the "run" command. If $muttlisp_inline_eval is set, it can also be invoked with a bare parenthesis expression as a command argument. $muttlisp_inline_eval defaults unset, to avoid breaking existing configurations, which might have bare parenthesis arguments for regexps. M Makefile.am M doc/manual.xml.head M init.c M init.h M keymap.c M mutt.h A mutt_lisp.c A mutt_lisp.h M muttlib.c M po/POTFILES.in 2020-07-19 13:44:47 -0700 Kevin McCarthy (c5c448d4) * Merge branch 'stable' 2020-07-14 14:42:30 -0700 Kevin McCarthy (c037a5a9) * Add mutt_oauth2.py and README file. This was contributed by Alexander Perlis to the mutt-dev mailing list. mutt_oauth2.py.README contains the contents of his introduction email for the script. M contrib/Makefile.am A contrib/mutt_oauth2.py A contrib/mutt_oauth2.py.README M doc/manual.xml.head 2020-07-13 12:43:39 -0700 Kevin McCarthy (35d63818) * Improve GPGME inline processing. Properly deal with multiple blocks: * Extract the inline block to armored_data, instead of the entire message. Use the code from pgp.c to find the block boundaries. * The copy_clearsigned() function, probably originally ported from the classic code too, assumes the first blank line starts the clear text. But this is only true if the passed in data is just the block. * Use the Charset armor header if found for encrypted content conversion, as pgp.d does. * Reset all states in each loop. It looks like the pgp.c code wasn't resetting pgp_keyblock and gpgcharset, so reset those in pgp.c too. M crypt-gpgme.c M pgp.c 2020-07-13 08:45:01 +0200 Olaf Hering (04490360) * update de.po Signed-off-by: Olaf Hering M po/de.po 2020-07-12 10:50:51 -0700 Kevin McCarthy (69afc2f0) * Try to improve "fcc to an imap mailbox" warning message. Add a "Warning: prefix", and print a followup message indicating the mailbox is being skipped. Previously, the message might leave the impression the send was aborted too. M send.c 2020-07-11 12:59:26 -0700 Kevin McCarthy (0e826090) * Merge branch 'stable' 2020-07-10 13:41:53 -0700 Kevin McCarthy (c94f43f9) * Fix mutt_print_attachment_list() to unstuff format=flowed. Several of the cases are covered by the pipe fixes in the last commit. The last case is similar to the mutt_view_attachment case. Since the send-mode file might be modified, change it to always save to a tempfile and then unstuff the tempfile. M attach.c 2020-07-09 19:31:48 -0700 Kevin McCarthy (b8217c6b) * Fix mutt_pipe_attachment_list() to unstuff format=flowed. The pipe routines are not used in other places (except printing attachments - to be handled next), so just directly modify them. Take care to space-stuff the filter output, since it replaces the space-stuffed compose part. M attach.c M recvattach.c 2020-07-08 19:07:55 -0700 Kevin McCarthy (104768bf) * Fix mutt_save_attachment_list() to unstuff format=flowed. Directly modifying mutt_save_attachment was awkward for several reasons. So instead implement a proxy function. It's ugly but straight-forward. M recvattach.c 2020-07-06 15:18:42 -0700 Kevin McCarthy (0600ebae) * Fix mutt_view_attachment() to unstuff format=flowed. This is used in receive mode for and . I don't think those are accessible from the compose menu, but the code allows it. So fix up the send-case too. Since we may need to unstuff the send-mode file, make a copy instead of symlinking. Also clean up the code to just sanitize the filename regardless. M attach.c 2020-07-06 10:39:06 -0700 Kevin McCarthy (e8436a01) * Factor out stuff/unstuff routines for attachment handling. M rfc3676.c M rfc3676.h 2020-07-09 19:25:52 +0000 Emir (00838646) * Update Turkish translations. M po/tr.po 2020-07-08 12:59:36 -0700 Kevin McCarthy (b108d1b7) * Merge branch 'stable' 2020-07-06 20:17:59 -0700 Kevin McCarthy (b48f8e1e) * Directly add/remove mailboxes for IMAP. The LSUB processor along with and would construct a mailboxes command and send it to the muttrc parser. Since the poll/label refactor it's much easier to just directly call the functions, and is much more secure. So do that instead. M buffy.c M buffy.h M imap/command.c M imap/imap.c 2020-06-30 15:31:19 -0700 Kevin McCarthy (25f82cf6) * Create $copy_decode_weed, $pipe_decode_weed, $print_decode_weed. $weed covers a bit too much functionality. It makes sense for it to control the display of messages in the pager, along with forwarding and replying. But (in my opinion) piping and copy/save-decode are something users might like to set differently without affecting the rest of Mutt's behavior. $copy_decode_weed affects the and functions. I've defaulted this *unset*, despite that it breaks backward compatibility, because I believe the header weeding is surprising to users and loses important information when copy/saving a message. $pipe_decode_weed affects when $pipe_decode is set. I've default this *set* for backward compatibility. $print_decode_weed affects when $print_decode is set. I've default this *set* for backward compatibility. M commands.c M doc/manual.xml.head M init.h M mutt.h 2020-06-27 15:04:45 -0700 Kevin McCarthy (3cacfb12) * Consider $reply_to before $reply_self. This is based on Derek Martin's patch in Trac ticket 2304. I've modified it to: * default to the value set by OPTREPLYSELF if the $ignore_list_reply_to short-circuit fires. * only apply the "from==reply_to" short circuit when $reply_self would indicate replying to from. * improve the "from==reply_to" short circuit to also fire when the display names are equal. The discussion in the trac ticket was somewhat contentious. This isn't particularly an area in the code I'm eager to touch. However, there are three points worth noting: 1) Mail-Followup-To is considered before $reply_self, so it makes some sense for Reply-To to also be. 2) $reply_to is a quadoption, allowing the header to be declined and then using $reply_self if appropriate. 3) $reply_self is a boolean. Previously, the only way to evaluate reply_to in these cases is to set $reply_self. Most users probably don't want that set by default, making that a poor workaround. If this becomes sore point, I'll revert, but I don't believe the change will be controversial in practice. M send.c 2020-06-28 11:55:31 -0700 Kevin McCarthy (2311519a) * Disable hook "command" argument expansion of config variables. From my email to mutt-dev: I've been thinking about this a *lot* more, and digging into past commits. It looks like the escaping has pretty consistently been intended for value completion and queries. See commits 3c00eb7a and 032dcbeb. I don't believe the escaping is useful for variable expansion as part of mutt_extract_token() - even for the hook "command" argument case. The escaping is targeted only for an expression surrounded by double quotes (as is generated by completion and queries). It doesn't escape single quotes or spaces, for instance. Thanks also to Oswald Buddenhagen and Cameron Simpson for their feedback. M hook.c M init.c 2020-06-26 12:31:22 -0700 Kevin McCarthy (e53ae9ed) * Escape config vars when expanding hook "command" argument. The "command" parameter of folder, send, send2, account, reply, and message hooks is run through mutt_extract_token() twice. Once when parsing the hook command initially, and once via mutt_parse_rc_line() when the actual hook fires. In theory, Mutt users should be aware of this, and should place all their command strings with configuration variables in single-quotes, to delay expansion until execution. But in reality Mutt has been escaping configuration variables as part of mutt_extract_token() for many years. The previous commit turned the escaping off, because it damages "backup" assignments to a $my_ variable, and I believe is confusing behavior. But for hooks, users now expect the escaping behavior (for double-quoted or unquoted command strings). Note that mutt_parse_hook() also passed the MUTT_TOKEN_SPACE flag, but neglected to do so for message-hook. Since all other "command" argument hooks were included, and were added to the list over the years, I believe this was an accidental oversight. M hook.c M init.c M mutt.h 2020-06-25 15:13:48 -0700 Kevin McCarthy (e5a32a61) * Convert var_to_string() to use a buffer, and disable auto-escaping. Inside mutt_extract_token(), expanding a configuration variable used a fixed size LONG_STRING. This would truncate long values, such as oauth_refresh, which may have a large token embedded in them. Convert var_to_string() to use a BUFFER parameter instead. var_to_string() also performed escaping, which is not always helpful. Disable the escaping inside. Add it back in mutt_var_value_complete(), via the pretty_var() call. The escaping may also be useful for hook "command" parameters. Since Mutt has had the escaping behavior there for years, removing it will likely break configurations. This will be added back in the next commit. M init.c 2020-06-24 18:44:18 -0700 Kevin McCarthy (110562b3) * Add tab-completion menu for patterns. This is based upon the patch from TAKAHASHI Tamotsu, maintained by Vincent Lefèvre. The push/pop menu operations take care of most redraw operations, so remove those from the patch. Change post-search to '|= REDRAW_MOTION' instead of assigning so it doesn't overwrite a full redraw. Add L10N for the new help strings. Add a format string and configuration variable for the menu. Add the multi-character thread patterns. Doing the above required some structural changes to the menu, so I rewrote it in a more common style used elsewhere in Mutt. M curs_main.c M enter.c M globals.h M init.h M pattern.c M protos.h 2020-06-24 02:03:40 +0200 Vincent Lefevre (bb407ec3) * Add a missing comma in the manual. M doc/manual.xml.head 2020-06-24 01:48:29 +0200 Vincent Lefevre (5b3b7a80) * Correct wording in a comment. M mutt_tunnel.c 2020-06-22 18:31:47 -0700 Kevin McCarthy (c9b58e3d) * Add $tunnel_is_secure config, defaulting set. The config variable is to resolve an ambiguity in Mutt about whether using $tunnel is secure. On the one hand, the examples in the manual show using ssh or a direct pipe to a program. Many users do this to connect to an IMAP server with PREAUTH configured, relying on the tunnel to be secured by ssh or by the fact that it's a local pipe. On the other hand, the Mutt connection code still respects $ssl_starttls and $ssl_force_tls, as if the $tunnel connection were not already secured. After some discussion on mutt-dev, it seemed the best idea to assume the connection is secure by default, in order to not break IMAP PREAUTH connections, but to provide a configuration variable in case there are situations where it is not. Thanks to Aaron Schrab for the original idea of setting conn->ssf for $tunnel in his patch to ticket 250. M doc/manual.xml.head M imap/imap.c M init.h M mutt.h M mutt_socket.h M mutt_tunnel.c 2020-06-23 10:45:01 -0700 Kevin McCarthy (0e428dd5) * Merge branch 'stable' 2020-06-22 12:46:08 -0700 Kevin McCarthy (22d7a1b3) * Merge branch 'stable' 2020-06-21 15:17:04 +0200 Vincent Lefevre (e807360d) * Updated French translation. M po/fr.po 2020-06-20 14:12:43 -0700 Kevin McCarthy (43184600) * Improve warning message for possible STARTTLS response injection. Thanks to Vincent Lefèvre for the improved wording, and to Cameron Simpson for his suggestions too. M mutt_ssl.c M mutt_ssl_gnutls.c 2020-06-20 22:30:20 +0200 Olaf Hering (db656f46) * Update de.po Signed-off-by: Olaf Hering M po/de.po 2020-06-20 06:55:47 -0700 Kevin McCarthy (4adb274a) * Merge branch 'stable' 2020-06-19 15:00:53 -0700 Kevin McCarthy (73b70169) * Add recommendation to use $ssl_force_tls. M init.h 2020-06-19 14:39:33 -0700 Kevin McCarthy (a400fc3f) * Add L10N comment for unencrypted PREAUTH warning. I forgot to add one while trying to get the fix out. M imap/imap.c 2020-06-18 14:18:48 -0700 Kevin McCarthy (fee31356) * Merge branch 'stable' 2020-06-15 12:27:24 +0200 Vincent Lefevre (75be2b07) * Updated French translation. M po/fr.po 2020-06-14 14:18:49 -0700 Kevin McCarthy (64c1d9ac) * Merge branch 'stable' 2020-06-11 16:11:36 -0700 Kevin McCarthy (c7a872d1) * Add basic XOAUTH2 support. This still relies on an external script to obtain the resource access token. Since XOAUTH2 should be slowly going away, use the same refresh_commands as with OAUTHBEARER. Unlike OAUTHBEARER, XOAUTH2 must be explicitly added to the $imap/smtp/pop_authenticators list. To keep the shared functions simpler, convert them to use buffers. RFC 7628 indicates that upon authentication failure the clients should be sending an BASE 64 encoded '^a' ("AQ=="), to terminate the SASL session, so change all the handlers to do that and read the following response. The RFC doesn't comment about a line terminator being required, but I assume it is, so add that too. M account.c M account.h M doc/manual.xml.head M imap/auth.c M imap/auth.h M imap/auth_oauth.c M imap/command.c M imap/imap_private.h M pop_auth.c M smtp.c 2020-06-08 12:57:43 -0700 Kevin McCarthy (5b844328) * Perform small cleanups in gnutls.c. These are some cleanups I started making during the stable branch fixes committed yesterday. It seemed a better idea to perform this amount of change in master rather than in stable, so they are in this separate commit. Fix the function-call spacing style. Change the #define CERTERR values to match the pattern used elsewhere in mutt. Use safe_calloc() instead of calloc. Add a few error checks in tls_get_client_cert(), and change to directly extract the CN using gnutls_x509_crt_get_dn_by_oid(). Use a do-while around the gnutls_handshake() instead of repeating it. M mutt_ssl_gnutls.c 2020-06-08 23:24:18 +0200 Vincent Lefevre (4938c97a) * Updated French translation. M po/fr.po 2020-06-07 12:30:01 -0700 Kevin McCarthy (8799adcf) * Merge branch 'stable' 2020-06-06 16:17:07 +0200 Vincent Lefevre (dcc59c63) * French translation: correction and improvement. M po/fr.po 2020-06-06 15:57:03 +0200 Vincent Lefevre (d4cb383e) * Updated French translation. Note: I initially translated "forward" as "faire suivre", but this is no longer possible now that the past participle "forwarded" is used. The translated term is now "transférer" (like in Thunderbird). M po/fr.po 2020-06-02 15:59:12 -0700 Kevin McCarthy (14709d7d) * Change postpone mode to write Date header too. This will ensure that postponed protected headers will match, in case Mutt later adds checks about that. I can't see any reason to not include it for the two other cases (searching and edit draft). M sendlib.c 2020-06-02 15:48:59 -0700 Kevin McCarthy (82b5c697) * Add other headers to written Protected Headers. In order to avoid $edit_headers, , or other places setting env->date and inadvertantly generating a wrong Date header, store the "protected headers" generated date header in the sctx, in addition to mime_headers. I initially removed env->date setting from mutt_parse_rfc822_line(), thinking it a more elegant solution, but unfortunately protected headers reading needs it to be there. We don't currently print or compare the headers, but might wish to in the future. Explicitly pass in a date parameters to mutt_write_rfc822_header() to make each caller conscious of where the date is coming from. M crypt.c M headers.c M main.c M pattern.c M protos.h M send.c M send.h M sendlib.c 2020-06-01 18:48:41 -0700 Kevin McCarthy (b0faa8d2) * Modify mutt_make_date() to append to a buffer. Remove the "Date: " prefix and the trailing newline, and convert callers to add those. This will be needed for protected headers Date support, where we will have to generate and store the date inside mutt_protect(). M copy.c M protos.h M sendlib.c 2020-06-01 13:50:41 -0700 Kevin McCarthy (82e80422) * Move protected-headers parameter cleanup out to send.c cleanup. Remove it in the same place that the mime-headers are removed. This is so that the parameter doesn't stay in there if we loop back to the compose menu on failure and the sender toggle encrption off. M crypt.c M send.c 2020-06-01 13:40:25 -0700 Kevin McCarthy (f07fa1a1) * Update the terminology and link for protected headers. M init.h 2020-06-01 13:27:38 -0700 Kevin McCarthy (e7ed170c) * Change default of $crypt_protected_headers_subject to "...". The most recent protected headers draft now specifies the obscured subject be "...". See https://github.com/autocrypt/protected-headers and https://datatracker.ietf.org/doc/draft-autocrypt-lamps-protected-headers/ M init.h 2020-06-03 12:34:51 -0700 Kevin McCarthy (c5441904) * Add check for sqlite3_prepare_v3() in configure.ac I didn't realize the function was added so recently: sqlite 3.20.0 (2017-08-01). Thanks to isdtor for pointing out the problem. M configure.ac 2020-05-29 10:54:56 -0700 Kevin McCarthy (44711a24) * Try to automatically reconnect to an open IMAP mailbox on error. For the Context, change cmd_handle_fatal() to flag idata->status on the error, but not close the mailbox and disconnect. Then have imap_check_mailbox() reconnect when IMAP_REOPEN_ALLOW is set (so the index is prepared to rebuild with all new headers). Try to merge flag, envelope, and attach_del changes back in. Replace the existing Context pointer with the new values, and swap out the idata passed in on success, so we don't continue to work with the wrong idata. The imap_check_mailbox() changes are purposely coded loosely to try and catch all sorts of errors - not just polling and imap_idle errors. Create a new check_mailbox() return code to indicate a reconnect. Display a more appropriate message in the index, but otherwise treat it the same as a REOPEN. M curs_main.c M imap/command.c M imap/imap.c M imap/imap_private.h M mailbox.h M mutt.h 2020-05-31 09:09:14 +0200 Grzegorz Szymaszek (878e261a) * Improve Polish translation of “undeleted†messages M po/pl.po 2020-05-29 15:46:29 -0400 Remco Rijnders (4091cbcd) * Remove support for OpenSSL <0.9.5 The current code provides a workaround for the absence of RAND_status in OpenSSL versions before 0.9.5. The comments in the code indicate these versions have to be supported, but as these versions are now more than 20 years old, this no longer applies. Removing this support simplifies the code and on the small chance that anyone is still using such old versions, breaking their build will actually be doing them a favor given the known issues with these OpenSSL versions. M configure.ac M mutt_ssl.c 2020-05-27 15:25:13 -0700 Kevin McCarthy (e2d27aac) * Add myself to the contributor list in the manual. I didn't realize previous maintainers were in the list, so I guess I should add myself. :-) M doc/manual.xml.tail 2020-05-27 14:51:04 -0700 Kevin McCarthy (9723c62c) * Allow tagging string config vars as L10N. Translate them once in mutt_set_default(). Modify makedoc.pl to remove the N_() tag, and to also note the type as "string (localized)". The makedoc.pl already will ignore L10N comment so add a basic comment above each config var in init.h. I'm not tagging $crypt_protected_headers_subject because the spec now says this should be "...". I plan on implementing that change along with other fixes before the next release. M doc/makedoc.pl M init.c M init.h M po/POTFILES.in 2020-05-27 14:39:51 -0700 Kevin McCarthy (4aedee85) * Merge branch 'stable' 2020-05-26 13:57:18 -0700 Kevin McCarthy (d3fd97b4) * Merge branch 'stable' 2020-05-25 13:38:46 -0700 Kevin McCarthy (52f5694b) * Merge branch 'stable' 2020-05-25 12:59:50 -0700 Kevin McCarthy (cb9c683d) * Merge branch 'stable' 2020-05-24 13:34:33 -0700 Kevin McCarthy (cd3b529f) * Merge branch 'stable' 2020-05-23 14:41:50 -0700 Kevin McCarthy (0ac6b609) * Refactor mutt_buffer_strip_formatting() inside of pager.c. Rather than duplicate the logic, move the function back inside pager.c. Add a parameter to optionally remove attachment markers. Inside fill_buffer(), use a stack-based buffer and directly assign the buffer.data back to fmt, to keep it as fast as before. M handler.c M muttlib.c M pager.c M pager.h M protos.h 2020-05-22 16:13:38 -0700 Kevin McCarthy (c44f0ce5) * Add cd command to change the current working directory. Original Author: Christoph Berg Use cases are saving attachments to some other place and others. Modified by Kevin McCarthy: - Fix up documentation to use cmdsynopsis/command/arg. - Add muttrc.man entry. - Fix compilation error. - Clean up the parse_cd() function to use buffers and remove new translation strings. M doc/manual.xml.head M doc/muttrc.man.head M init.c M init.h 2020-05-19 13:14:48 -0700 Kevin McCarthy (b3ab8ca9) * Merge branch 'stable' 2020-05-18 05:35:32 +0200 Cyril Roelandt (5bbc6be5) * Add default keybindings for common operations. This adds the following bindinds: - ^P for "history up" - ^N for "history down" M functions.h 2020-05-17 13:01:35 -0700 Kevin McCarthy (6150d285) * Clean up Editor Menu interface inside Mutt. enter_filename() api: * Rename enter_fname() to _enter_fname() * Rename mutt_buffer_enter_mailbox() to mutt_enter_mailbox() * Rename mutt_buffer_enter_filenames() to mutt_enter_filenames() * Remove 'multiple' and 'fname buffer' parameters from mutt_enter_filenames(). Create a temp buffer, and enable multiple automatically. This removes the possibility of mistakenly looking at an unpopulated 'fname' parameter for the result. * Create mutt_enter_filename(). This isn't used currently, but it makes sense to have a "single filename" api already set up with correct parameters. get_field() api: * Rename _mutt_buffer_get_field() to a static _get_field() function. * Remove _mutt_get_field() and make mutt_get_field() an actual function. * Remove the multiple/files/numfiles parameters, since this should only be done through mutt_enter_filenames(). _mutt_enter_string() api: Add comments to mutt_enter_string() and _mutt_enter_string() headers. Noting that they should generally not be called directly. List the functions that should be used inside Mutt. Note the behavior of the multiple parameter. M autocrypt/autocrypt.c M commands.c M compose.c M curs_lib.c M curs_main.c M enter.c M protos.h M send.c 2020-05-17 12:37:24 -0700 Kevin McCarthy (95cf171e) * Fix attach-file tag operation to work when quitting browser. There was a disconnect between the compose menu and the behavior when selecting multiple files. The select_file() operation populates the files and numfiles when hitting 'quit'. The compose menu was incorrectly looking at the fname parameter, which won't be populated unless the user presses enter. The enter_string() menu makes the same mistake. Change it to behave differently depending on whether multiple is set. The logic needs to be made clearer by changing the api. I will do that in the next commit. M browser.c M compose.c M enter.c 2020-05-16 14:39:00 -0700 Kevin McCarthy (1f20684a) * Merge branch 'stable' 2020-05-16 11:15:37 -0700 Kevin McCarthy (a0bbc02e) * Merge branch 'stable' 2020-05-16 14:41:58 +0800 Martin Michlmayr (5d4ec51a) * Fix typos M doc/makedoc.pl M doc/manual.xml.head M doc/muttrc.man.head 2020-05-15 18:23:32 -0400 Remco Rijnders (a8824b55) * Fix sidebar_sort_method usage in documentation M init.h 2020-05-15 09:27:31 +0200 Vincent Lefevre (e78d2b4f) * Updated French translation. M po/fr.po 2020-05-14 15:42:38 -0700 Kevin McCarthy (d1199f76) * Add Autocrypt error messages when trying to force send. If the account doesn't exist, or isn't enabled, display a message back in the compose menu. M autocrypt/autocrypt.c 2020-05-14 14:02:20 -0700 Kevin McCarthy (e3e0a0ba) * Change mailto handling to parse in-reply-to loosely. To fix ticket 241 without loosening in-reply-to email header parsing, add a direct call to mutt_parse_references(). Change the second parameter, which was not used, to indicate "allow nonbracketed" mode. M parse.c M protos.h M url.c 2020-05-14 12:01:21 -0700 Kevin McCarthy (194a60ae) * Adjust message-id extraction to retry more permissively on failure. It turns out some illegal message-id headers have neither angle brackets nor even an '@' in them. So adopt a different approach. First try parsing the Message-ID header in a strict(ish) mode requiring angle brackets. If that returns nothing, then try again in loose mode, which will basically grab the first non-comment token. Change References and In-Reply-To to keep the strict(ish) mode. We might loose some parent references, but that won't cause much loss of functionality in Mutt, and also helps prevents parsing in "garbage" and passing that back in replies. Thanks to Oswald Buddenhagen for the suggested approach. M parse.c M protos.h M send.c 2020-05-13 15:52:30 -0700 Kevin McCarthy (99ba609f) * Loosen message-id parser to parse ids without angle brackets. To do this, we need to enhance the loop to skip over comments. It does this using the rfc822 address parse_comment() routine. Keep parsing inside angle brackets non-strict, because of the history of trac tickets (1116, 1935, 3090) demonstrating message-ids with spaces inside the angle brackets, double-'@'s, or even completely missing '@'. However, in order to reduce the risk of extracting garbage, insist that message-id's outside of angle brackets at least have an '@'. Automatically add missing angle brackets so that Mutt will generate valid references/in-reply-to headers. M parse.c M rfc822.c M rfc822.h 2020-05-13 19:55:48 +0200 Vincent Lefevre (ba2430af) * Update section "Terminal Keybindings" in the manual. Also list ^Q, ^S and ^Z. Note that not all bindings output by "stty -a" affect Mutt. M doc/manual.xml.head 2020-05-12 20:05:12 -0700 Kevin McCarthy (48a0e90e) * Add a brief section on stty to the manual. Place it at the bottom of the keybindings section. It's by no means complete, but may be helpful to point some beginners in the right direction. M doc/manual.xml.head 2020-05-11 14:15:27 -0700 Kevin McCarthy (b0570d76) * Separate mailbox vs buffy-incoming for the "enter_fname" functions. Create mutt_buffer_enter_mailbox(), which turns on the MUTT_MAILBOX flag (renamed from MUTT_EFILE). This uses the mailbox history file category, and turns on MUTT_SEL_FOLDER in the select_file browser. Add a do_incoming paramter and a new separate flag MUTT_INCOMING, so that buffy-completion can be enabled optionally for mailboxes. It only makes sense for the change-folder operation, so disable it in other contexts (such as saving/copying a message, prompting for an Fcc mailbox, or an autocrypt scan mailbox). Change saving/copying a message to use the mailbox function, so that it shares the history file with other mailbox operations. It would previously use the "file" history category. Create mutt_buffer_enter_filenames() to replace the enter_fname() prompt for files. Since nothing directly uses the _mutt_buffer_enter_fname() function anymore, rename and make it static. M autocrypt/autocrypt.c M commands.c M compose.c M curs_lib.c M curs_main.c M enter.c M mutt.h M protos.h M send.c 2020-05-11 13:12:23 -0700 Kevin McCarthy (d338650f) * Remove unused mutt_enter_fname() functions. All the callers use the buffer version. M curs_lib.c M protos.h 2020-05-09 18:43:55 -0700 Kevin McCarthy (64d67279) * Merge branch 'stable' 2020-05-09 21:21:20 +0200 Vincent Lefevre (254e5eb5) * Updated French translation. M po/fr.po 2020-05-08 15:57:18 -0700 Kevin McCarthy (78ab1cca) * Add utime() loop for _maildir_commit_message(). While fixing up mutt_decrease_mtime(), I thought about creating a helper function to loop for EINTR. However, there is only one other place in the code that cares enough about utime succeeding to check the return value. maildir_commit_message() is used fairly often, so it's possible I might be writing useless error handling. However there are reports (easily found by internet search) of some systems returning EINTR, so might as well fix this place too. M mh.c 2020-05-08 13:47:41 -0700 Kevin McCarthy (1aa61c2e) * Improve mutt_decrease_mtime() error handling. Add a check for utime failure. Some non-posix implementations return EINTR. Since editing messages is a very common operation in Mutt, take care to retry in that case so as not to introduce message composition failures. Make sure all callers check mutt_decrease_mtime()'s return value, since stat could also fail. M editmsg.c M headers.c M muttlib.c M send.c 2020-05-08 13:05:44 -0700 Kevin McCarthy (08294769) * Merge branch 'stable' 2020-05-07 19:41:43 -0400 Remco Rijnders (4717b041) * Remove commented out mutt_message_hook calls M recvcmd.c 2020-05-07 19:17:42 -0400 Remco Rijnders (ad5dcf17) * Clarify CH_WEED debug message M copy.c 2020-05-07 16:32:46 -0700 Kevin McCarthy (a9fdeeab) * Fix sed invocation in gen_defs to work with non-GNU sed. \n isn't supported on FreeBSD's version, so instead directly embed the newline. M gen_defs 2020-05-07 16:09:24 -0700 Kevin McCarthy (3745c59e) * Turn off check_sec.sh warning. The script is stupid, but still useful, so just add the tag to turn off the warning. :-) M signal.c 2020-05-07 16:01:46 -0700 Kevin McCarthy (b70676a2) * Add L10N strings to exit_handler(). Since gettext() is not safe in the handler, cache them in advance. M main.c M protos.h M signal.c 2020-05-07 15:26:52 -0700 Kevin McCarthy (6c21b111) * Merge branch 'stable' 2020-05-07 15:10:44 +0200 Vincent Lefevre (52751db2) * exit_handler: add explanation about the missing l10n translations. Details in commit 5835f4c0594ff94a2aa62ad122c4dc2871ee8492. M signal.c 2020-04-25 18:39:38 -0700 Kevin McCarthy (27439a7e) * Support domain-literal values in email adddresses. RFC 5322 defines the domain-literal: domain = dot-atom / domain-literal / obs-domain domain-literal = [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS] dtext = %d33-90 / ; Printable US-ASCII %d94-126 / ; characters not including obs-dtext ; "[", "]", or "\" RFC 5321 defines possible literal values in section 4.1.3. I think this was unnoticed (and possibly unimplemented) because it's a rare use-case. However, Stuart Gathman @sdgathman in the ticket (#226) noted: The use case is replacing alpine with mutt for this fully decentralized usage: https://fedoramagazine.org/decentralize-common-fedora-apps-cjdns/ The only requirements are to support IPv6 and IPv6 literals (to avoid use of DNS). Adding this slightly complicates the parser, because we can't wait to decide whether it's a domain-literal until parse_mailboxdomain(), but we also need to accommodate the CFWS. Break out a parse_domain() function, with partial duplication of parse_mailboxdomain()'s logic. Also, add parse_literal() to the outer parser, because we need to handle both name-addr and top level addr-spec. The RFC822Errors[] are currently unused (and broken), but add a new error code and message, in case those get fixed up and introduced to the code in the future. Disable IDNA encoding for domain-literals. M mutt_idna.c M rfc822.c M rfc822.h 2020-05-06 21:54:02 +0200 Grzegorz Szymaszek (a48328bd) * Fix the Polish translation of a message The “delete the current entry†message refers to any entries/items (“elementâ€), not just to letters/messages (“listâ€). M po/pl.po 2020-04-25 01:28:30 +0900 Tamotsu TAKAHASHI (f11a6b1f) * L10N: add more helpful comments on OPS entries. Now translators can see exactly where the entries came from. Also, OPS.* can have L10N comments. Add "/* L10N: blabla */" to OPS files. This commit would help translators a lot. For example, the msgid "delete the current account" once surprised me. I said, "What? Can mutt delete my account???" With this commit, I can see that "the account" is clearly the "autocrypt" account. ```  #. L10N: Help screen description for OP_AUTOCRYPT_DELETE_ACCT  #. #: ../OPS:8  #: ../keymap_alldefs.h:29  msgid "delete the current account" ``` M doc/gen-map-doc M gen_defs 2020-05-05 13:32:59 +0200 Vincent Lefevre (3b2c4b7c) * Updated French translation. M po/fr.po 2020-04-19 16:28:02 -0400 Remco Rijnders (c5b8dba7) * olen length requirement was too conservative When converting binary values to Base 64 encoding, we go from a 8 bit representation to a 6 bit representation. As a result, we need extra space to store the result compared to the input value being converted. In the current implementation, the requirements on the size of the output buffer are too conservative; We only have to check if the remaining space is larger than 4 (3 input bytes get converted into 4 Base64 encoded output bytes, plus allowing for a terminating '\0' character) rather than 10. M base64.c 2020-05-04 11:06:23 -0700 Kevin McCarthy (e6679dfa) * Change pattern "operator" to "modifier" in doc and L10N strings. Thanks to TAKAHASHI Tamotsu for pointing out the inconsistency. M UPDATING M doc/muttrc.man.head M init.h M pattern.c 2020-05-03 17:29:55 +0200 Vincent Lefevre (f5a8419d) * Add missing blank lines in ChangeLog due to buggy update-changelog. M ChangeLog 2020-05-03 17:18:28 +0200 Vincent Lefevre (986f6263) * Fix update-changelog rule (missing blank line in generated ChangeLog). M Makefile.am 2020-08-29 12:25:28 -0700 Kevin McCarthy (5fb17352) * Update UPDATING file for 1.14.7. M UPDATING 2020-08-27 15:03:08 -0700 Kevin McCarthy (2b30e41d) * Remove cur parameter for pager recall and make-key ops. For the recall operation, this can lead to a memory leak where the recalled message overwrites the sctx saved data. Arguably instead, the send_message setup could be more picky about saving cur, or recall-message could be careful to not overwrite the message-id. The context parameter isn't actually used for mail-key, and the curs_main.c doesn't pass it. But I can't bring myself to make that change for a stable fix. M pager.c 2020-08-24 13:45:24 -0400 Remco Rijnders (f8f760d8) * Fix segfault when imap server is unreachable M mx.c 2020-08-12 10:37:56 -0700 Kevin McCarthy (3548ec07) * Ensure SIGALRM interrupts connect() in batch mode. Mutt doesn't call mutt_signal_init() in batch mode, which mean no default handler for SIGALRM is set in that case. The man pages seem to indicate SIGALRM by default should terminate the process, but ticket 273 reported no interruption occurring: Mutt just hung indefinitely. In any case, terminating isn't the desired behavior either. Add a handler, as is done in imap_wait_keepalive() and send_msg(). M mutt_socket.c 2020-07-29 13:54:19 -0700 Kevin McCarthy (05a2008e) * Fix List-Post header parser to handle multiple values. If the mailto url was in the second or greater position, beg was on the wrong character. This would cause url_check_scheme() to fail to recognize the mailto. Change the loop to skip to the '<' on subsequent loops. Keep the loop iterator the same, to ensure the list-post entries are comma separated. As a note, the parser is still not strictly following the RFC, but appears to work well enough in the "real world" that I'm not going to tweak it for now. M parse.c 2020-07-24 15:45:17 -0700 Kevin McCarthy (c3ae7ba5) * Prevent lynx from dumping a remote site if manual.txt is missing. Ambrose Li reported that if the xsltproc step fails in manual generation, lynx will dump a *remote* site to manual.txt, because manual.html does not exist. w3m and elinks appear not to have this issue. Prevent lynx from doing this by adding '-localhost' flag. Ambrose also suggested prefixing './manual.html' instead should fix the problem, but to be conservative about not breaking anything I'm just adding the '-localhost' flag. M doc/Makefile.am 2020-07-15 19:47:11 -0700 Kevin McCarthy (62fab7bd) * Ensure a blackslash inside backquotes doesn't skip past eos. I'm not sure if this is possible because of the way the input is read by the muttrc parser, but fix the logic to ensure it can't happen. M init.c 2020-07-11 12:58:51 -0700 Kevin McCarthy (9bb7acf7) * automatic post-release commit for mutt-1.14.6 M ChangeLog M VERSION 2020-07-11 12:55:01 -0700 Kevin McCarthy (e78fcc51) * Update UPDATING file for 1.14.6. M UPDATING 2020-07-07 21:09:03 -0700 Kevin McCarthy (222bd804) * Fix utimensat() to use cwd for relative paths. The utimensat() invocations were missing the AT_FDCWD parameter, meaning they would not work on relative paths. I can't remember whether I completely missed that difference from utime, or somehow thought all the paths would be full paths. :-( In any case, Mutt currently does not expand relative paths in mutt_expand_path(), so the paths can most certainly be relative in those calls too. This caused a bug where atimes were not being properly reset for mailbox entries. M buffy.c M mbox.c M mx.c 2020-06-23 10:44:09 -0700 Kevin McCarthy (85ab28c9) * automatic post-release commit for mutt-1.14.5 M ChangeLog M VERSION 2020-06-23 10:24:23 -0700 Kevin McCarthy (09cf1bca) * Update UPDATING file for 1.14.5 release. Amend notes for the 1.14.3 release, which also added $ssl_force_tls checking for an unencrypted IMAP PREAUTH connection. M UPDATING 2020-06-22 12:33:09 -0700 Kevin McCarthy (e37516c3) * Remove $ssl_starttls check for IMAP PREAUTH. Checking $ssl_starttls provides no real protection, because an attacker can just as easily spoof "* OK" and strip the STARTTLS capability as it can spoof "* PREAUTH". The only way to really protect again the MITM is through $ssl_force_tls. Add documentation about STARTTLS, $tunnel, and the current PREAUTH exception when using $tunnel. The behavior of Mutt about $tunnel is somewhat inconsistent: is it considered secure or not? For PREAUTH, to avoid breaking configurations, we assume it is secure. But at the same time, Mutt is still negotiating STARTTLS for other $tunnel connections. This will be resolved in master for the next release; probably by adding a $tunnel_is_secure config variable defaulting "yes" and removing the STARTTLS negotiation in that case. M doc/manual.xml.head M imap/imap.c 2020-06-20 06:35:35 -0700 Kevin McCarthy (dc909119) * Don't check IMAP PREAUTH encryption if $tunnel is in use. $tunnel is used to create an external encrypted connection. The default of $ssl_starttls is yes, meaning those kinds of connections will be broken by the CVE-2020-14093 fix. M imap/imap.c 2020-06-18 14:13:12 -0700 Kevin McCarthy (c94d2b00) * automatic post-release commit for mutt-1.14.4 M ChangeLog M VERSION 2020-06-18 14:09:03 -0700 Kevin McCarthy (e6ec35de) * Update UPDATING file for 1.14.4. M UPDATING 2020-06-16 13:49:20 -0700 Kevin McCarthy (c547433c) * Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP. When the server responds with its "let's do TLS now message", e.g. A OK begin TLS\r\n in IMAP or +OK begin TLS\r\n in POP3, Mutt will also read any data after the \r\n and save it into some internal buffer for later processing. This is problematic, because a MITM attacker can inject arbitrary responses. There is a nice blogpost by Wietse Venema about a "command injection" in postfix (http://www.postfix.org/CVE-2011-0411.html). What we have here is the problem in reverse, i.e. not a command injection, but a "response injection." This commit fixes the issue by clearing the CONNECTION input buffer in mutt_ssl_starttls(). To make backporting this fix easier, the new functions only clear the top-level CONNECTION buffer; they don't handle nested buffering in mutt_zstrm.c or mutt_sasl.c. However both of those wrap the connection *after* STARTTLS, so this is currently okay. mutt_tunnel.c occurs before connecting, but it does not perform any nesting. M mutt_socket.c M mutt_socket.h M mutt_ssl.c M mutt_ssl_gnutls.c 2020-06-14 14:17:45 -0700 Kevin McCarthy (34e3a1a3) * automatic post-release commit for mutt-1.14.3 M ChangeLog M UPDATING M VERSION 2020-06-14 11:30:00 -0700 Kevin McCarthy (3e88866d) * Prevent possible IMAP MITM via PREAUTH response. This is similar to CVE-2014-2567 and CVE-2020-12398. STARTTLS is not allowed in the Authenticated state, so previously Mutt would implicitly mark the connection as authenticated and skip any encryption checking/enabling. No credentials are exposed, but it does allow messages to be sent to an attacker, via postpone or fcc'ing for instance. Reuse the $ssl_starttls quadoption "in reverse" to prompt to abort the connection if it is unencrypted. Thanks very much to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue, and their help in testing the fix. M imap/imap.c 2020-06-06 20:03:56 -0700 Kevin McCarthy (f64ec1de) * Fix GnuTLS interactive prompt short-circuiting. tls_verify_peers() doesn't verify expiration dates. So aborting early because of a 0 certstat and the leaf passing tls_check_preauth() does not mean subsequent intermediate certs are okay: they could be expired. In the saved-cert preauth loop, instead of just noting the tls_check_preauth() rc for the leaf, note the highest cert that passes preauth. Then, in the interactive loop (which goes in the opposite order, from CA to leaf) check that value instead. Since we are trusting certs one by one, anything that passed in the previous loop will certainly pass the preauth check at the beginning of tls_check_one_certificate(). M mutt_ssl_gnutls.c 2020-06-05 18:16:31 -0700 Kevin McCarthy (5fccf603) * Abort GnuTLS certificate check if a cert in the chain is rejected. GnuTLS is not checking dates because we disabled that in tls_negotiate(). So if we don't do this, rejecting an expired intermediate cert will have no effect. Certstat won't contain an expiration error, and tls_check_preauth() will only look at each subsequent cert in the chain's dates. M mutt_ssl_gnutls.c 2020-06-05 15:21:03 -0700 Kevin McCarthy (bb0e6277) * Fix GnuTLS tls_verify_peers() checking. * Change the function to pass the certstatus parameter by reference, and indicate success/failure of the function via the return value. It was previously returning the certstatus, but was also returning 0 or the *unset* certstatus on error too. Since a 0 certstatus means "success", this meant a gnutls_certificate_verify_peers2() failure would be regarded as a valid cert. * The gnutls_certificate_type_get() inside tls_verify_peers() checks the *client* certificate type. Since it was only called if gnutls_certificate_verify_peers2() failed, I assume was either a mistake, or perhaps an attempt to give a special error message if the client cert was OpenPGP. In either case, the error message was not very informative, so just remove the call and special error message. * Fix GNUTLS_E_NO_CERTIFICATE_FOUND check to be against verify_ret instead of certstat. * Fix gnutls_strerror() call to use verify_ret instead of certstat. * gnutls_certificate_verify_peers2() already calls and checks gnutls_auth_get_type(), so remove call at the beginning of tls_check_certificate(). * gnutls_certificate_verify_peers2() also verifies the certificate type for the *server* is GNUTLS_CRT_X509. Add a comment about that. M mutt_ssl_gnutls.c 2020-05-27 14:33:58 -0700 Kevin McCarthy (5ea51e88) * Fix doc install to check builddir first for bundled files. Although some of the built files are bundled in the tarball, someone could still try to build/install from a git checkout with a separate build directory. There might be other circumstances too, so better to just add the check for now. M doc/Makefile.am 2020-05-26 13:51:56 -0700 Kevin McCarthy (0136dbd1) * Remove Muttrc and manual.txt from dist tarball files. The Muttrc needs to be generated because of docdir substitution. The manual.txt may traditionally be generated by a different tool than the one on my machine (lynx), so force that to be regenerated too. It may still be necessary to just rebuild everything, but let's see if this will do for stable for now. M doc/Makefile.am 2020-05-25 13:37:20 -0700 Kevin McCarthy (6feaec02) * automatic post-release commit for mutt-1.14.2 M ChangeLog M VERSION 2020-05-25 13:29:22 -0700 Kevin McCarthy (642a1cfd) * Update UPDATING file for release. M UPDATING 2020-05-25 12:44:43 -0700 Kevin McCarthy (f6fb5a17) * Fix mutt_pattern_comp() to not segv on a NULL pattern string. The change to mutt_parse_score() could now result in a NULL score pattern if the user specified ''. It might be possible for this to happen elsewhere too, so just add a check at the top of mutt_pattern_comp() to handle the case. M pattern.c 2020-05-25 12:23:02 -0700 Kevin McCarthy (5761113a) * Fix buffer pool buffer truncation with my_hdr and score commands. The buffer pool is now used for command invocation, but unfortunately a couple cases of mutt_buffer_init() were hidden in the my_hdr and score command processors. This would result in a shortened buffer being returned to the pool and used later for something like the prompt - which expects LONG_STRING everywhere. Fix up the two places to instead copy the string over. They don't need to grab a large buffer pool sized hunk of memory. Also, fix the mutt_buffer_pool_release() to resize upwards in case future code does this. I should have done this originally, but was afraid it would paper over more serious issues. :-/ Thanks to Armin Wolfermann for reporting the problem. M buffer.c M init.c M score.c 2020-05-24 13:26:49 -0700 Kevin McCarthy (d8e518db) * Increase the buffer size in _mutt_get_field(). Not doing so caused the subsequent _mutt_enter_string() to use the default buffer pool size of 1024 - negating the HUGE_STRING value passed into _mutt_get_field(). (Once we fully transition to buffers, this awkwardness can go away...) M curs_lib.c 2020-05-19 12:26:55 -0700 Kevin McCarthy (c72f740a) * Add mitigation against DoS from thousands of parts. A demonstration attack using a million tiny parts will freeze Mutt for several minutes. This is actually better than some other mail software, but can still be a problem at large levels. For now, set it to a very conservative 5000, but this can be adjusted up (or down) if necessary. Declare the previous stack-limit max depth as a constant too, and decrease it down to 50. Change the handler to return non-fatal "1" on reaching the limit. M handler.c M mime.h M parse.c 2020-05-16 14:34:07 -0700 Kevin McCarthy (a4059dd2) * Document my release process. The old script contents is for mercurial so remove it. My process is not automated, but at least write it down. M build-release 2020-05-16 10:43:06 -0700 Kevin McCarthy (12cf5b46) * automatic post-release commit for mutt-1.14.1 M ChangeLog M UPDATING M VERSION 2020-05-03 17:29:55 +0200 Vincent Lefevre (b4936342) * Add missing blank lines in ChangeLog due to buggy update-changelog. M ChangeLog 2020-05-03 17:18:28 +0200 Vincent Lefevre (274b1c5a) * Fix update-changelog rule (missing blank line in generated ChangeLog). M Makefile.am 2020-05-09 18:30:13 -0700 Kevin McCarthy (7bd57bc3) * Set AM_DISTCHECK_CONFIGURE_FLAGS to allow make distcheck to run. Add the '--with-homespool' flag, to allow it to run as non-root. M Makefile.am 2020-05-09 16:26:20 -0700 Kevin McCarthy (ba0c9f9e) * Fix doc installation directories. The conversion of makedoc.c to perl goofed up the documentation build/install process from a tarball. A late commit, 3c575cab, tried to fix this, but didn't fix the problem when building with a separate srcdir. Previously, because makedoc didn't exist, all the documentation would be rebuilt, even though it was distributed in the tarball. Now the files don't need to be rebuilt, and so exist in $(srcdir) instead of the build directory. I'm a little bit unsure how this would all work, trying to install from git with a separate srcdir. I think it would fail now. However, I don't believe that's a common use case. If I'm wrong, then an alternative would be to go back to rebuilding everything. This would be done by creating a new makedoc target, with rule 'cp $(srcdir)/makedoc.pl makedoc', and then changing all the other targets to depend on and invoke makedoc instead. M doc/Makefile.am 2020-05-08 12:48:19 -0700 Kevin McCarthy (30340e50) * Fix edit-message false-modified bug. The file was being stat() before the truncate, and mutt_decrease_mtime() only decreases if the sb.st_mtime is equal to the current time. That means operations crossing the second boundary: time x: stat time x+1: truncate, decrease_mtime would result in a false-modified bug if no changes were made during editing. The mutt_decrease_mtime() and callers need to be cleaned up for better error handling, but I will do that in master. M editmsg.c 2020-05-08 12:10:51 -0700 Kevin McCarthy (094a07fc) * Fix rc error setting in edit_one_message(). In a couple places, the rc was not set before bailing on an error. With a default of 0, the original message would be marked for delete/purge. M editmsg.c 2020-05-07 15:23:12 -0700 Kevin McCarthy (51ed59a7) * Wrap 'saving fcc' message in curses and sendmailx check. M send.c 2020-05-02 15:16:46 -0700 Kevin McCarthy (020321ed) * automatic post-release commit for mutt-1.14.0 M ChangeLog M VERSION M build-release M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2020-05-02 14:58:03 -0700 Kevin McCarthy (3c575cab) * Add missing doc built distfiles. When building the 1.14.0 release tarball, I discovered a hidden dependency problem from switching to makedoc.pl. The manual.xml is not properly defined, and so trying to build the muttrc.man and mutt.info file errors out. This was previously hidden because makedoc need to be compiled, forcing a rebuild. This problem derives because the stamp-* files (and most of the other documentation) are *included* in the tarball, except for muttrc.man and mutt.texi. Those attempt to rebuild, but manual.xml doesn't exist. For now, include muttrc.man and mutt.texi in the dist files. A better solution requires some thought, but not while I'm trying to get a release out. M doc/Makefile.am 2020-05-02 11:16:31 -0700 Kevin McCarthy (bd776a65) * Fix 'gpg' -> 'GPG' in manual and autocrypt translation string. M autocrypt/autocrypt_gpgme.c M doc/manual.xml.head M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2020-05-02 10:57:22 -0700 Kevin McCarthy (c6534102) * Update 'mutt -v' copyright date. Since the phrase contains "and others" the developers judged it was correct to increase the year number. M main.c M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2020-05-02 10:39:05 -0700 Kevin McCarthy (c60c7f69) * Set UPDATING release date for 1.14.0. M UPDATING 2020-05-01 09:26:48 -0700 Kevin McCarthy (48e5c70f) * Ensure idata->reopen is clear when the mailbox is closed. Commit ab457327 accidentally introduced a performance regression in the 1.13.0 release. The reason is that imap_sync_mailbox() was leaving IMAP_REOPEN_ALLOW set. When a mailbox was closed, and another opened, the imap_open_mailbox() would be processed with the reopen set. The initial connection and exec statements would trigger a imap_cmd_finish(). That would then prematurely trigger fetching new mail, with the newMailCount misset, which would in turn generate a tiny uid_hash. When the real download occurred, it would use the existing tiny hash, throttling performance. The regression commit removed what I thought was an unnecessary check, but it was guarding the fetch from happening at the wrong time during mailbox open too. The performance issue was already addressed by commit a8337951 in master, but I think it's good to wipe the entire state. The removes other possible strange behavior. A HUGE thanks to Guilhem Moulin for his help on this issue. Without all his work detailing the problem, creating automated testing, git bisecting, and logging, I would not have been able to find and fix the problem. M imap/imap.c 2020-05-01 03:55:39 -0700 Kevin McCarthy (67948d74) * Fix CONDSTORE/QRESYNC context flag counts on updates. read_headers_condstore_qresync_updates() differs from read_headers_normal_eval_cache() in that the FLAGS updates are issued for existing messages in the context. So cmd_parse_fetch() will process the flags *but* it will also increment/decrement context flag counters. Zero out the flags (as was being done for VANISHED handling), and let mx_update_context() set them properly afterwards. Thanks to Guilhem Moulin for reporting the issue and helping me test this fix. M imap/message.c 2020-04-30 16:57:01 +0200 Grzegorz Szymaszek (3a20ab36) * Improve the Polish translation M po/pl.po 2020-04-28 18:56:42 +0200 Grzegorz Szymaszek (99d67832) * Fix a typo in a message in the Polish translation M po/pl.po 2020-04-28 18:49:27 +0200 Grzegorz Szymaszek (8d8af9c2) * Improve a message in the Polish translation This makes the translation of “Unable to create SSL context†closer to the original meaning. M po/pl.po 2020-04-28 17:49:50 -0700 Kevin McCarthy (0fdc8668) * Document change to exact-address writing behavior. M UPDATING M doc/manual.xml.head 2020-04-28 15:23:29 -0700 Kevin McCarthy (b3fd56a4) * Turn off writing exact-addresses that require 2047-encoding. The full strdup'ed copy of the address can't be properly encoded without significant rework to parse, encode, and reassemble. (Additionally, IDNA is not being performed on the domain written in the exact-address string.) As an example, consider the current exact address behavior, given the three addresses: "ascii name" (comment) The ènd (comment) "The ènd" (comment) Before this commit, when sending Mutt would generate: "ascii name" (comment) The =?iso-8859-1?B?6G5kIChjb21tZW50KSA8YWRkcjJAZXhhbXBsZS5jb20+?= =?iso-8859-1?B?IlRoZSDobmQiIChjb21tZW50KSA8YWRkcjNAZXhhbXBsZS5jb20+?= The second address 2047 encodes everything starting with ènd, including the comment and address. The third address is completely encoded. A "quick workaround" I proposed to the list was turning off encode_specials. This results in: "ascii name" (comment) The =?iso-8859-1?B?6G5k?= (comment) "The =?iso-8859-1?Q?=E8nd=22?= (comment) That solves the second case, but in the third case 2047-encodes ènd" - including the trailing double quote. With this patch, we turn off writing the exact address if encoding is needed, generating: "ascii name" (comment) The =?iso-8859-1?B?6G5k?= The =?iso-8859-1?B?6G5k?= This reverts to Mutt-generated normalized form in the last two addresses, which require encoding. For the first case it preserves the address as "typed" by the user. M rfc2047.c M rfc2047.h 2020-04-27 18:18:34 -0700 Kevin McCarthy (43204e7b) * Add contrib/bgedit-screen-tmux.sh. This script wraps running the editor inside a new GNU Screen or tmux session. The script is derived from Aaron Schrab's script posted to mutt-dev, but rewritten to run in a posix shell, automatically adjust between tmux and screen, and with a bit more error checking. M contrib/Makefile.am A contrib/bgedit-screen-tmux.sh M doc/manual.xml.head 2020-04-27 06:40:11 -0700 Ivan Vilata i Balaguer (d5d8b62a) * Updated Catalan translation. M po/ca.po 2020-04-26 07:02:47 -0700 Morten Bo Johansen (0ab54fc7) * Updated Danish translation. M po/da.po 2020-04-25 07:08:05 -0700 Kevin McCarthy (0284e7dc) * Minor fix to polish translation. M po/pl.po 2020-04-25 14:30:52 +0200 Grzegorz Szymaszek (d19ed86c) * Update the Polish translation for Mutt 1.14 M po/pl.po 2020-04-25 04:34:10 +0200 Vincent Lefevre (8c960f97) * Fix typo in UPDATING. M UPDATING 2020-04-22 06:53:57 -0700 Kevin McCarthy (d9cb3438) * First draft of UPDATING file for 1.14 release. M UPDATING 2020-04-24 14:30:11 -0700 Kevin McCarthy (858d3f92) * Adjust comment on header.num_hidden field. Changeset 83be183b modified _mutt_traverse_thread() to update num_hidden in the entire thread, so that ~v will work properly when switching to a non-threaded view. M mutt.h 2020-04-24 14:20:16 -0700 Kevin McCarthy (3dfbff41) * Fix minor indentation problem in hcachever.pl. M hcachever.pl 2020-04-22 06:14:08 +0000 Tamotsu TAKAHASHI (af8b26b7) * Update ja.po for 1.14 M po/ja.po 2020-04-20 03:40:17 +0200 Vincent Lefevre (9935e756) * fr.po: forgot a period M po/fr.po 2020-04-19 18:28:52 -0700 Kevin McCarthy (d31f5692) * Fix copyright address. M contrib/bgedit-detectgui.sh 2020-04-20 03:19:41 +0200 Vincent Lefevre (190ef657) * fr.po: typo in a comment M po/fr.po 2020-04-20 03:07:34 +0200 Vincent Lefevre (5672c160) * Updated French translation. M po/fr.po 2020-04-19 13:23:17 -0700 Kevin McCarthy (c1d58163) * Clarify sidebar sorting by path vs alpha/name. The former only sorts by the path. The latter two will sort by label if defined. M doc/manual.xml.head 2020-04-19 09:31:01 -0700 Kevin McCarthy (5eea506e) * Add contrib/bgedit-detectgui.sh from Eike Rathke. M contrib/Makefile.am A contrib/bgedit-detectgui.sh 2020-04-18 14:05:52 -0700 Kevin McCarthy (3179e93c) * Freshen up other configuration options in INSTALL. Remco's patch pointed out this file has been getting rather stale. I haven't added all of the flags, but reordered them and added some of the major ones that were missing. M INSTALL 2020-04-18 11:50:45 -0400 Remco Rijnders (7299f6af) * Include instructions on how to build with sidebar support M INSTALL 2020-04-18 11:51:47 -0700 Remco Rijnders (749337e0) * Updated Dutch translation. M po/nl.po 2020-04-18 06:43:58 -0700 Vsevolod Volkov (0fcf6a42) * Updated Russian translation. M po/ru.po 2020-04-18 06:42:10 -0700 Vsevolod Volkov (e442d478) * Updated Ukrainian translation. M po/uk.po 2020-04-17 12:12:07 -0700 Petr Pisar (8a8e008d) * Updated Czech translation. M po/cs.po 2020-04-16 19:50:22 +0200 Olaf Hering (37a94853) * Update de.po Signed-off-by: Olaf Hering M po/de.po 2020-04-16 09:42:01 -0700 Kevin McCarthy (653b20b8) * Add l10n comment above the revised translation string. M rfc1524.c 2020-04-16 08:58:24 +0200 Olaf Hering (850aac1b) * Update error string in mailcap_path handling The code expects either 'mailcap_path' in muttrc, or MAILCAPS in environment. In this context a string 'mailcap path' is incorrect. Signed-off-by: Olaf Hering M rfc1524.c 2020-04-15 20:26:20 +0200 Olaf Hering (0cca6886) * refresh de.po Signed-off-by: Olaf Hering M po/de.po 2020-04-14 01:30:08 +0200 Vincent Lefevre (a2f963fd) * Fix spelling mistake in manual. M doc/manual.xml.head 2020-04-14 01:07:29 +0200 Vincent Lefevre (61867c9e) * Fix typo in manual. M doc/manual.xml.head 2020-04-12 13:13:43 -0700 Kevin McCarthy (c289e74c) * Remove ansi formatting from autoview generated quoted replies. If $allow_ansi is set, and the user has an autoview generating ansi output, it is helpful to strip out those sequences. This is based on Fabian's patch for ticket #218. My version results in partially duplicated logic, but avoids tangling the handler with pager's internal fill_buffer() logic. M handler.c M muttlib.c M protos.h 2020-04-13 07:00:49 -0700 Kevin McCarthy (950cc435) * Add background.c to POTFILES.in. Thanks to Petr Pisar for pointing out the mistake. M po/POTFILES.in 2020-04-10 14:30:11 -0700 Kevin McCarthy (15ef4a13) * Document multipart/alternative inline part disposition for counting. An initial multipart/alternative's top-level inline parts are also counted via the "root" disposition. M doc/manual.xml.head 2020-04-10 13:37:42 -0700 Kevin McCarthy (cc895ebc) * Clarify $imap_fetch_chunk_size is referring to headers. !81 was opened because the documentation was confusing. Hopefully this rewording will make it clear the "size" refers to number of headers per request. M init.h 2020-04-09 20:23:42 -0700 Kevin McCarthy (489a81ce) * Change default $background_format value. Move the status before the pid to more clearly separate it the from the subject. Increase the pid width. Thanks to Aaron Schrab for both suggestions. M init.h 2020-04-09 23:25:02 +0200 Olaf Hering (f1233d94) * refresh de.po Signed-off-by: Olaf Hering M po/de.po 2020-04-09 13:33:50 -0700 Kevin McCarthy (38ea4042) * Remove makedoc.c. The perl version seems to be working okay. So it's a good time to remove this file, before the next release. D doc/makedoc.c 2020-04-09 11:22:07 -0700 Kevin McCarthy (53a1b4ce) * Convert "non-fatal" handler errors to return 1 instead of -1. When displaying a message, display a mutt_error() to warn of incomplete rendering. Fix mutt_copy_message() to check for ferror and feof errors on partial decode too. Clean up _mutt_append_message() to not pass a partial-decode along as a success. Modify the crypt handlers to return 1 if any kind of state message is displayed. There is some fuzzyness about what a "fatal" error is, but for now just consider a handler error that notifies by state_attach_puts() as "non-fatal". M commands.c M copy.c M crypt-gpgme.c M handler.c M pgp.c M smime.c 2020-04-08 09:20:54 -0700 Kevin McCarthy (4fc97a20) * Display error if no imap authenticators are available. Without SASL enabled, and with an explicit value in $imap_authenticators not natively implemented by Mutt, no calls to authenticator->authenticate() were occuring. This resulted in the default r value of -1 passing through, which did not trigger the mutt_error() message after the loop. Without that message, an empty index would display with the "connecting" message still on the bottom, giving the appearance that Mutt is hung. M imap/auth.c 2020-04-07 19:30:46 -0700 Kevin McCarthy (4465a872) * Print progress meter when copying/saving tagged messages. When copying from local to IMAP, it would previously only display a percentage count for each individual message. Suppress that by passing MUTT_QUIET. Note, this is only for "regular" copies. IMAP server-side copies happen in a single command and can't display a progress meter. M commands.c 2020-04-06 15:58:58 -0700 Kevin McCarthy (8615cae9) * Add message/global to the list of known "message" types. This will allow Mutt to at least handle those messages the same as message/rfc822 body types. M mime.h M recvattach.c 2020-04-06 14:53:42 -0700 Kevin McCarthy (5df8b2a1) * Turn on READONLY flag for postpone count check. We don't manipulate the context, so I don't think this is fixing an actual bug. But better to be explicit about it. M postpone.c 2020-04-06 14:46:53 -0700 Kevin McCarthy (a8337951) * Turn off REOPEN flag after imap open and sync operations. Leaving a just opened imap mailbox with REOPEN set can cause all sorts of problems. Postpone.c had a memory corruption bug because of this. The background compose reply-flag setting code had to ensure it was turned off too. The main index worked around this by always ensuring mx_check_mailbox() was called right afterwards. But after researching I can't see any reason to leave it open. imap_sync_mailbox() also leaves the REOPEN set, and I can't see a good reason for doing this either. Both are memory corruption bugs just waiting to happen. With the flag turned off, remove the workaround calls to mx_check_mailbox() in postpone.c and send.c. M imap/imap.c M postpone.c M send.c 2020-04-02 20:05:01 -0700 Kevin McCarthy (ed2567d1) * Add "root" part logic for multipart/alternative counting Distinguish between the inline parts of a root multipart/alternative, which should also be considered as "root" parts, and those of a non-root multipart/alternative, which should be counted as "inline" parts. M mutt.h M parse.c 2020-04-02 14:30:08 -0700 Kevin McCarthy (3b9cc43f) * Add "root" disposition to attachments command. An initial inline part was previously always skipped, for the good reasons outlined by @dgc in #217. Unfortunately, some mail clients have started sending "attachments" as the root (and only) part, more and more lately. Although this may be bad practice, Mutt should support counting these as "attachments". To do so without breaking existing configs, add a "root" disposition argument to the attachments command. This will count an initial inline part in a message or multipart container. The existing code skipped counting for the "top-level" and recursive calls, so group both of these cases under "root". M doc/manual.xml.head M globals.h M init.c M parse.c 2020-04-03 14:11:13 -0700 Kevin McCarthy (434b55ee) * Change disabled crypto pattern op error message and return value. If mutt is compiled without crypto support, attempting to use one of the patterns ~g, ~G, ~k, ~V fails with the cryptic (pun intended) error message: "error: unknown op %d (report this error)." Since the op is known, just not enabled, and furthermore is an opaque number, it doesn't help the user understand what the problem is. Change the code to instead print out the pattern operator character that is disabled: "Pattern operator '~%c' is disabled." Almost all callers of mutt_pattern_exec() expect it to return 0 or 1. Returning -1 in the event of a disabled or bad op will lead to undesirable "matching" behavior. Change to return 0 in the event of one of these errors, since none of the callers do (or can) handle the error in a meaningful way. M pattern.c 2020-04-01 14:36:05 -0700 Kevin McCarthy (b54ccb54) * Simplify _smime_getkeys() The code is basically duplicated for whether a key is specified or falling back to SmimeDefaultKey. The calls to smime_void_passhphrase() can also be simplified to whenever the key changes. M smime.c 2020-03-31 19:26:53 -0700 Kevin McCarthy (98c1a45f) * Convert smime static key/cert variables to buffers. M smime.c 2020-03-31 16:19:00 -0700 Kevin McCarthy (0e71d0ee) * Create crypt glue cleanup method. Create stub classic smime and cleanup functions, which will be used in the next commit. M crypt-mod-pgp-classic.c M crypt-mod-pgp-gpgme.c M crypt-mod-smime-classic.c M crypt-mod-smime-gpgme.c M crypt-mod.h M cryptglue.c M main.c M mutt_crypt.h M smime.c M smime.h 2020-03-31 15:48:00 -0700 Kevin McCarthy (a9451f9d) * Convert LastSaveFolder to buffer. M commands.c M main.c M protos.h 2020-03-31 13:47:35 -0700 Kevin McCarthy (b94d291f) * Convert mutt_make_message_attach() to use buffer tempfile. This is the last caller of the old mutt_mktemp() function. M sendlib.c 2020-03-31 13:19:48 -0700 Kevin McCarthy (4e153adf) * Convert mutt_init() to use buffer pool for path operations. Convert getdnsdomainname(), called by mutt_init(), to accept a BUFFER parameter instead. M getdomain.c M init.c M protos.h 2020-03-31 12:23:51 -0700 Kevin McCarthy (e0dc7dec) * Add buffer.h as a dependency of hcversion.h. The recent BUFFER change needs to force a regeneration of hcversion.h. M Makefile.am 2020-03-30 19:46:12 -0700 Kevin McCarthy (0b6eb1ab) * Remove buffer->destroy. Fix backtick processing to append to tok instead of allocating and assigning to tok->data directly. M buffer.c M buffer.h M hcache.c M init.c 2020-03-30 19:00:38 -0700 Kevin McCarthy (b207c280) * Convert mutt_parse_rc_line() to use real buffer to hold the line. Previously, the parameter converted into a kind of read-only buffer, pointing to the char *line passed in. The problem is that mutt_extract_token() backtick processing allocates and assigns a new token->data. As a result, buffer->destroy was added, whose sole purpose is to keep track of the read-only token buffer being reallocated so that it can be properly freed inside mutt_parse_rc_line(). (The char *line is allocated and freed in source_rc()). Remove the token parameter, and convert line to a const char *. Copy that into a buffer-pool buffer, so the buffer can be modified "normally". Create a mutt_buffer_rc_buffer() function taking the line buffer parameter. To make the source_rc() just a tiny bit faster, have it directly manage and call mutt_parse_rc_buffer() itself. Other callers likely don't need the speed, so remove their cumbersome creation/free of that parameter. The next commit will deal with removing buffer->destroy and fixing up backtick handling. M commands.c M hook.c M imap/command.c M imap/imap.c M init.c M protos.h 2020-03-30 16:17:03 -0700 Kevin McCarthy (0d8257cb) * Ensure rc_line err BUFFER is always dynamic. The mailboxes command changes started using standard mutt_buffer_*() functions, which will attempt to realloc err->data if the size is too big. M imap/command.c M imap/imap.c 2020-03-30 13:22:16 -0700 Kevin McCarthy (e84cf897) * Convert built-in editor to use mutt_buffer_expand_path(). M edit.c 2020-03-30 11:21:20 -0700 Kevin McCarthy (18cef028) * Convert mutt_pipe_message() to use buffer pool. M commands.c 2020-03-30 11:11:39 -0700 Kevin McCarthy (ae5953a2) * Convert mutt_pipe_attachment_list() to use buffer pool. M recvattach.c 2020-03-29 15:17:32 -0700 Kevin McCarthy (1a0b525a) * Mention -nopoll in New Mail Detection manual section. Add a brief mention a couple times to help make more users aware of the flag. M doc/manual.xml.head 2020-03-29 14:49:41 -0700 Kevin McCarthy (3f0009f4) * Mention $status_format %B expando in background edit section. It's added to the default, but some users will have customized the value and may miss the new expando. M doc/manual.xml.head 2020-03-28 12:34:09 -0700 Kevin McCarthy (046a3cc1) * Merge branch 'stable' 2020-03-28 11:34:42 -0700 Kevin McCarthy (43f2270c) * automatic post-release commit for mutt-1.13.5 M ChangeLog M VERSION 2020-03-27 15:13:15 -0700 Kevin McCarthy (febed0bc) * Fix up mailboxes documentation synopsis. Specify the flags as type "option", instead of as parameters. M doc/manual.xml.head 2020-03-25 15:07:48 -0700 Kevin McCarthy (1487ea64) * Add -label and -nopoll arguments to mailboxes command -nopoll allows adding the mailbox to the sidebar, or the mailbox browser menu, without incurring polling costs. -poll can be used to re-enable polling for a previously disabled mailbox. -label allows specifying an alternative string to show in the sidebar and mailbox browser menu. -nolabel removes a label from an existing mailbox. Change $sidebar_sort_method so that "alpha" and "name" will sort by the label if specified. "path", however, will always sort by the actual mailbox path. M browser.c M buffy.c M buffy.h M doc/manual.xml.head M doc/muttrc.man.head M imap/browse.c M imap/imap.c M init.h M protos.h M sidebar.c 2020-03-24 19:42:43 -0700 Kevin McCarthy (1e9ab8b6) * Minor sidebar HilIndex and redraw cleanup. Ensure HilIndex is reset to -1 if all mailboxes are hidden, preventing from opening a hidden mailbox in that case. Previously, draw_sidebar() would still be triggered in that case, causing an empty loop to run and trailing space to be drawn. But with this change TopIndex and BottomIndex will still be -1 in that case. Change the prepare_sidebar() return value to check if HilIndex is set, and if mutt_sb_draw() to clear out in that case. M sidebar.c 2020-03-24 19:23:41 -0700 Kevin McCarthy (67acdd72) * Add sidebar-first and sidebar-last functions. M OPS.SIDEBAR M curs_main.c M functions.h M pager.c M sidebar.c 2020-03-24 10:12:58 -0700 Kevin McCarthy (87f5f3f0) * Merge branch 'stable' 2020-03-22 15:06:40 -0700 Kevin McCarthy (970fbcb0) * Clarify PGP Pseudo-header S duration. Due to the background edit changes, S values are now assigned to the send-context, not to $pgp_sign_as. The duration of the change is no longer permanent. M doc/manual.xml.head 2020-03-21 14:57:52 -0700 Kevin McCarthy (883ccfdf) * Fix typo "delimeter". M doc/manual.xml.head M pgp.c 2020-03-19 15:12:49 -0700 Kevin McCarthy (ab790a7d) * Add $fcc_delimiter, to allow multiple Fcc mailboxes. The variable defaults unset, to prevent breaking anyone's configuration. If set to a value, such as ",", $record and fcc-hook may list multiple mailboxes separated by the delimiter. Mutt will tokenize and expand/prettify each separate mailbox. At Fcc time, it will loop through trying to save to each mailbox. This patch introduces a bit more uglyness into init.c, which has to special-process for $record in a few places. I don't like that, but I believe the feature is important enough to allow for the one-off behavior hack, because we are constrained by backwards compatibility. Add documentation notes about the resulting issues with '<' mailbox shortcut expansion, and with fcc-save-hook processing. It is recommended to use fcc-hook to set multiple mailboxes in those cases instead. M compose.c M doc/manual.xml.head M globals.h M headers.c M hook.c M init.c M init.h M muttlib.c M postpone.c M protos.h M send.c 2020-03-16 14:59:43 -0700 Kevin McCarthy (0b971305) * Add $folder to send scope. It's hard to know where to draw the line on scope variables, but $folder seems likely to change across "account switches" and will affect Fcc pretty_mailbox and expansion. The user can also manually change Fcc from the compose menu. If spoolfile or infile complaints come in, I can add that, but I'm not convinced those will commonly be an issue for sending emails. M doc/manual.xml.head M send.c M send.h 2020-03-08 14:41:22 -0700 Kevin McCarthy (5cf8a042) * Convert progress and socket_poll millis to unsigned long long. 64-bit platforms should already be using a 64-bit tv_sec, so we should use the same for the millis values. M curs_lib.c M mutt_curses.h M mutt_socket.c 2020-03-06 14:35:19 -0800 Kevin McCarthy (3ac6f3ea) * Change mutt_FormatString() data parameter to type void *. All invocations pass a pointer parameter. Perhaps at one point this was like the init.h combined usage. But as with that, using an unsigned long is incorrect, and we've been lucky to get away with it. Since we don't need a union, just change it to void * to properly size the parameter. M addrbook.c M autocrypt/autocrypt_acct_menu.c M background.c M browser.c M compose.c M compress.c M crypt-gpgme.c M hdrline.c M history.c M muttlib.c M pgpinvoke.c M pgpkey.c M protos.h M query.c M recvattach.c M remailer.c M sidebar.c M smime.c M status.c 2020-03-06 13:51:49 -0800 Kevin McCarthy (435f0cdb) * Merge branch 'stable' 2020-03-05 17:06:26 +0000 Zero King (e13e84f0) * Remove unreachable code M pgpewrap.c 2020-03-03 11:10:22 -0800 Kevin McCarthy (862ed68b) * Fix for $recall part 2. Fix the sctx->flags check further below too. Now that SENDBACKGROUNDEDIT is added, a direct comparison is incorrect. M send.c 2020-03-03 10:18:45 -0800 Kevin McCarthy (63cb4e9f) * Fix $recall prompting. The background-edit added a flag for the operation, so the previous test for !flags now always fails. I don't see a more elegant fix, other than changing it to match SENDBACKGROUNDEDIT, plus the existing test for sctx->msg being NULL. Add a comment because the flag test is confusing otherwise. M send.c 2020-03-02 14:05:49 -0800 Kevin McCarthy (fa8702ff) * Add $status_format 'B' expando for backgrounded count. Add "%?B? Back:%B?" to the default $status_format. Rather than iterating ProcessList for each status bar refresh, just add a counter in background.c. M background.c M background.h M init.h M status.c 2020-03-01 18:07:02 -0800 Kevin McCarthy (86e18125) * Update send_ctx comment about the cur field. M send.h 2020-03-01 18:05:46 -0800 Kevin McCarthy (c045cbc9) * Add %i to $background_format. This will show the parent message id for replies and forwarded messages. M background.c M init.h 2020-03-01 14:22:26 -0800 Kevin McCarthy (c51e833a) * Refresh flag setting message. Despite MUTT_QUIET, there are still messages displayed by opening an IMAP mailbox, so refresh the message. M send.c 2020-03-01 14:20:39 -0800 Kevin McCarthy (1399257d) * Try to respect MUTT_QUIET for IMAP contexts too. There are still connection related messages, but at least reduce the number of messages. M imap/imap.c M imap/message.c 2020-03-01 12:09:17 -0800 Kevin McCarthy (14752ae2) * Use -1, not WAIT_ANY for waitpid() portability. M background.c 2020-02-27 13:00:49 -0800 Kevin McCarthy (48868326) * Add Background Editing sections to manual. M doc/manual.xml.head M init.h 2020-02-26 15:07:00 -0800 Kevin McCarthy (107f4334) * Add background flags to all other operations. - index and pager send operations. - query menu and resending. - recvattach operations. I initially thought there were complications, but the attachment menu decouples everything from the ATTACH_CONTEXT and doesn't free things before they are used. M background.c M curs_main.c M pager.c M query.c M recvattach.c M recvcmd.c M send.c 2020-02-26 19:45:18 -0800 Kevin McCarthy (d802c700) * Clean up background edit landing page. Try to get the OP_EXIT keybinding and print that instead. Manually center the strings, to avoid negative column computations. Allow overruns though - it's just a landing page. The message is more important than a possible sidebar overwrite due to a tiny window. M background.c 2020-02-26 14:35:44 -0800 Kevin McCarthy (1cc04929) * Set reply flags when backgrounded. Store security and message_id fields to deal with replies without access to cur in the resumable part. Reopen the correct mailbox if it has changed. Display a message when setting reply flags, in case there is a noticeable pause. M edit.c M postpone.c M send.c M send.h 2020-02-22 14:15:50 -0800 Kevin McCarthy (92322ccf) * Confirm exiting if background edit processes exist. This prompt is in addition to the $quit prompt. A bit annoying, but I believe necessary to combat muscle memory and avoid losing compose sessions. M background.c M background.h M curs_lib.c M curs_main.c M init.h M mutt.h 2020-02-19 19:30:41 -0800 Kevin McCarthy (d800ede1) * Pass sctx by reference to mutt_send_message_resume(). This makes it more noticable that the parameter may be freed, and also prevents a use after free. M background.c M send.c M send.h 2020-02-19 16:34:05 -0800 Kevin McCarthy (6fe9b1d5) * Add background compose menu and $background_format config var. List the backgrounded sessions. Allow the user to resume one, or exit the menu. Bind to 'B' by default in the index and pager menus. Remove the "" function autoresuming functionality, instead invoke the menu to resume backgrounded sessions. M OPS M background.c M background.h M curs_main.c M functions.h M globals.h M init.h M menu.c M mutt_menu.h M pager.c M send.h M signal.c 2020-02-17 14:40:57 -0800 Kevin McCarthy (33177255) * Save and restore a subset of config variables when backgrounding. Save all the booleans, quadoptions, along with: $record $postponed $envelope_from_address $from $sendmail $smtp_url $pgp_sign_as $smime_sign_as $smime_encrypt_with This is to prevent multiple background compose sessions from interfering with each other, along with account/folder changes made while in the index menu. M send.c M send.h 2020-02-16 12:30:54 -0800 Kevin McCarthy (0d66dd5f) * Add background edit landing page. The landing page waits for the $editor process to exit, or until the user presses , "q" by default. If they press exit they are returned to the index. If the $editor exits first, they are returned directly to the compose process. M background.c M compose.c M headers.c M send.c 2020-01-28 15:51:57 -0800 Kevin McCarthy (4af5c934) * Enable backgrounding a single function. Backgrounding exits to the index menu. Re-invoking will resume the backgrounded session, if one exists, otherwise start a new session. This is just to get basic support going. Multiple background edits, a landing page, a background compose menu list will be added next. M Makefile.am A background.c A background.h M compose.c M curs_main.c M edit.c M headers.c M init.h M main.c M mutt.h M protos.h M send.c M send.h 2020-02-03 13:25:30 -0800 Kevin McCarthy (9defa202) * Write out sctx sign_as values in mutt_write_fcc(). M compose.c M protos.h M send.c M sendlib.c 2020-02-02 15:10:34 -0800 Kevin McCarthy (d3d0f3a2) * Change send_menus to set sctx instead of globals. Add a "cleared" bit for smime_crypt_alg. Otherwise clearing the value in smime.c's menu would cause the compose menu and mutt_protect() to fall back to using SmimeCryptAlg. M compose.c M crypt-gpgme.c M crypt-gpgme.h M crypt-mod-pgp-classic.c M crypt-mod-pgp-gpgme.c M crypt-mod-smime-classic.c M crypt-mod-smime-gpgme.c M crypt-mod.h M crypt.c M cryptglue.c M mutt_crypt.h M pgp.c M pgp.h M send.h M smime.c M smime.h 2020-01-31 15:06:20 -0800 Kevin McCarthy (093cc268) * Change mutt_protect() to use sctx signas values. Pass the sctx into postpone_message() and save_fcc() to it can be passed to mutt_protect. Change compose menu to show the sctx values, but fall back to the globals. M compose.c M crypt.c M mutt_crypt.h M send.c 2020-01-30 16:12:10 -0800 Kevin McCarthy (88d3d6d4) * Use sctx->signas values in compose menu. todo: we need to fix the send_menus. We need to save/restore the globals in mutt_protect(). M compose.c M headers.c M mutt_crypt.h M postpone.c M send.c M send.h 2020-01-30 15:19:49 -0800 Kevin McCarthy (c33d2e8b) * Pass sctx to mutt_builtin_editor() and mutt_edit_headers(). This will be used to set the sctx signas instead of globals for header editing. M compose.c M edit.c M headers.c M protos.h M send.c 2020-01-30 15:06:36 -0800 Kevin McCarthy (3b3186c2) * Add send_ctx to compose menu and get_postponed(). This will be used to store and use sctx for sign_as values. M compose.c M mutt.h M postpone.c M protos.h M send.c M send.h 2020-01-29 19:43:37 -0800 Kevin McCarthy (2b6fc1b4) * Refactor mutt_send_message() into multiple functions. The functions are delineated by points of editing where we want to resume. Create SEND_CONTEXT to contain all the state logic. M send.c M send.h 2020-01-29 15:46:02 -0800 Kevin McCarthy (541c722f) * Rename ci_send_message() to mutt_send_message(). This fits the current naming conventions. There are a few other "ci_" prefixed functions, but there's no need to tackle all those changes right now. M compose.c M curs_main.c M main.c M mutt.h M pager.c M query.c M recvcmd.c M send.c M send.h 2020-01-29 15:35:28 -0800 Kevin McCarthy (d46745e5) * Rename send_message() to invoke_mta(). This will help distinguish mutt_send_message() and mutt_send_message_resume() from the actual invocation of the MTA. Otherwise the names are too similar and confusing. M send.c 2020-01-29 15:09:59 -0800 Kevin McCarthy (8bf37106) * Create send.h header. This will hold the send context, so we may as well pull the prototypes into the header file too. M Makefile.am M autocrypt/autocrypt.c M curs_main.c M group.c M main.c M pager.c M protos.h M query.c M recvcmd.c M send.c A send.h M sendlib.c M smime.c 2020-02-28 19:30:51 +0000 Zero King (9c1f1e48) * Fix use of uninitialized buffer in imap_open_connection() M imap/imap.c 2020-02-23 13:00:43 -0800 Kevin McCarthy (1464f842) * Merge branch 'stable' 2020-02-21 12:35:08 -0800 Kevin McCarthy (758d406e) * Limit recurse depth when parsing mime messages. Limit to 100 depth to prevent a crash due to stack overflow. If this turns out to be too large (or small), I'll adjust it. M handler.c M parse.c 2020-02-15 12:26:56 -0800 Kevin McCarthy (5f79e1c6) * Merge branch 'stable' 2020-02-12 18:21:36 -0800 Kevin McCarthy (f1808b6c) * Merge branch 'stable' 2020-02-08 19:16:33 -0800 Kevin McCarthy (83be183b) * Fix ~v tagging when switching to non-threaded sorting. Place num_hidden in all the collapsed thread messages, rather than just the visible ones (i.e. the root headers). This is a tweak to commit 0f8a079d, where I discovered the behavior inconsistent with the documentation. I'm making this change in master due to the (tiny) behavior change. M thread.c 2020-02-10 15:34:59 -0800 Kevin McCarthy (8d77022b) * Merge branch 'stable' 2020-02-10 14:58:20 -0800 Kevin McCarthy (f2b05d7c) * Merge branch 'stable' 2020-02-10 14:43:00 -0800 Kevin McCarthy (7a1a121e) * Merge branch 'stable' 2020-01-22 19:09:55 -0800 Kevin McCarthy (7e0886af) * Add move-up and move-down functions to compose menu. This adds the ability to rearrange the order of the attachments, including swapping the first attachment if desired. The compose menu doesn't support nested attachments, but since data structures and code are shared with recvattach, the new functions use the v2r and try to behave sensibly with respect to parent pointer adjustments. However, the functions do restrict movement to be between siblings. Adding code to support cross-tree movement would be more complicated for no current purpose. M OPS M compose.c M functions.h 2020-01-18 17:57:03 -0800 Kevin McCarthy (235c74a7) * Allow ~b ~B ~h patterns in send2-hook. This allows searching the message body or headers for making configuration settings. Right now, this only searches the primary message content. I don't think it would be useful to search attachments, but if I'm wrong we can add iteration later. M hook.c M mutt.h M pattern.c 2020-01-16 11:12:36 -0800 Kevin McCarthy (71c770ae) * Rename smime oppenc mode parameter to get_keys_by_addr(). Make it the same as with pgpkey.c and crypt-gpgme.c, to remove confusion in the future about this (as I had briefly). This is also needed because the $crypt_opportunistic_encrypt_strong_keys logic added to smime.c relies on the "may_ask" parameter being a reflection of oppenc mode, not just a "quiet" mode. M smime.c 2020-01-14 14:48:24 -0800 Kevin McCarthy (427d472d) * Add $crypt_opportunistic_encrypt_strong_keys config var. When set, this modifies $crypt_opportunistic_encrypt to only search for "strong" keys (fully valid keys according to the web of trust). S/MIME behavior depends on the backend. M crypt-gpgme.c M init.h M mutt.h M pgpkey.c M smime.c 2020-01-12 13:17:49 -0800 Kevin McCarthy (6470663e) * Merge branch 'stable' 2020-01-11 13:48:28 -0800 Kevin McCarthy (965d5b3a) * Merge branch 'stable' 2020-01-08 19:09:33 -0800 Kevin McCarthy (acd49f24) * Convert hcachever.sh.in to hcachever.pl. Use Digest::MD5 to remove build-time dependency on mutt_md5, for cross-compilation support. M .gitignore M Makefile.am M configure.ac A hcachever.pl D hcachever.sh.in 2019-12-28 15:53:11 -0800 Kevin McCarthy (46e1d670) * Merge branch 'stable' 2019-12-24 19:04:07 -0800 Kevin McCarthy (27fdc2f5) * Convert makedoc.c to makedoc.pl. This removes the build-time dependency on a compiled program, which doesn't work for cross-compilation. My perl is pretty rusty, and the result isn't super pretty. However, since perl is already a build dependency, it made the most sense to use that. The output of Muttrc, muttrc.man, and manual.xml match. There might be a few bugs, so I'm going to leave makedoc.c in for now as a reference. M doc/Makefile.am M doc/devel-notes.txt A doc/makedoc.pl M init.h M sort.h 2019-12-22 11:00:22 -0800 Kevin McCarthy (a83ab85d) * Merge branch 'stable' 2019-12-17 03:02:19 +0100 Marek Marczykowski-Górecki (162e6088) * Add protected-headers="v1" to Content-Type when protecting headers This is optional part of the draft RFC, marked with "FIXME": * FIXME: Enigmail adds "protected-headers="v1"" parameter to "payload" here. Is this necessary? The answer is: for Enigmail yes. Otherwise it ignores protected headers and use the envelope headers. This results in all the emails listed with "..." subject, which isn't very helpful. Since the user can disable protected headers while in the compose menu (after potentially failed send), remove the attribute if protected headers are disabled. M crypt.c 2019-12-19 17:15:21 +0000 Olaf Hering (b2c7aad8) * Update de.po Signed-off-by: Olaf Hering M po/de.po 2019-12-18 14:25:49 -0800 Kevin McCarthy (ddb33a0c) * Merge branch 'stable' 2019-12-18 14:14:01 -0800 Kevin McCarthy (0582f058) * Merge branch 'stable' 2019-12-17 14:53:25 -0800 Kevin McCarthy (2541fa8a) * Fix $imap_deflate reconnection issue. Restore connection methods and data on close, so the subsequent reopen succeeds. M mutt_zstrm.c 2019-12-14 12:52:24 -0800 Kevin McCarthy (aba16e60) * Merge branch 'stable' 2019-12-13 16:07:18 -0800 Kevin McCarthy (83e559b6) * Merge branch 'stable' 2019-12-13 11:00:47 -0800 Kevin McCarthy (47f855c4) * Merge branch 'stable' 2019-12-12 18:51:35 -0800 Kevin McCarthy (cc4092cc) * Merge branch 'stable' 2019-12-08 19:11:01 -0800 Kevin McCarthy (4977bb0a) * Fix trash_append to use ctx parameter instead of Context. In all current cases, an open context with deleted messages will be "Context", but it's incorrect to not use the parameter. M mx.c 2019-12-03 19:18:27 -0800 Kevin McCarthy (b33087d3) * Merge branch 'stable' 2019-12-03 19:04:40 -0800 Kevin McCarthy (60055cd0) * Merge branch 'stable' 2019-12-01 15:25:54 -0800 Kevin McCarthy (e18d3986) * Mention $imap_qresync and $imap_deflate in performance tuning. Leave some breadcrumbs for the brave. :-) M doc/manual.xml.head 2019-12-01 12:56:16 -0800 Kevin McCarthy (b2e2d6af) * Add mutt_zstrm.c to POTFILE.in There aren't any translations in the file, but it should be added just in case. M po/POTFILES.in 2019-12-01 12:46:36 -0800 Kevin McCarthy (d9453318) * Merge branch 'stable' 2019-12-01 10:20:38 -0800 Kevin McCarthy (060c6345) * Minor isodate fixes. Make sure the year isn't negative if they type something crazy. Don't use unitialized p for the month error message. Ideally we would either use %d or provide a better error message. But I think it's enough to just print out the full string for now. Non-iso dates do that for day-of-month for example. M pattern.c 2019-11-30 16:49:57 +0000 ed (9d8b9b99) * Adding ISO 8601 calendar date, closes #105. This adds support for date in YYYYMMDD, ISO8601 calendar date formatting. M doc/manual.xml.head M doc/muttrc.man.head M pattern.c 2019-12-01 07:44:05 -0800 Kevin McCarthy (d1d3a989) * Add USE_ZLIB to makedoc-defs.h so imap_deflate manual is generated. M doc/makedoc-defs.h 2019-12-01 07:31:41 -0800 Kevin McCarthy (ee220ca9) * Fix copyright header in mutt_zstrm.[ch] In Fabian noticed that he copied the header file as a template but forgot to adjust the copyright line at the top to himself. Also, adjust the formats in both to match the rest of mutt, so the copyright updater script will work properly. M mutt_zstrm.c M mutt_zstrm.h 2019-11-18 19:11:52 -0800 Kevin McCarthy (f2f6dd46) * Fixes and cleanup for imap deflate patch. Rework mutt_zstrm_read(): - Pass along the error if conn_read() returns < 0. - Separate out conn_eof and stream_eof flags so they can be dealt with differently. - Don't use Z_FINISH on conn_eof, because the passed in buf might not be big enough to hold the decompressed output. Instead continue looping until either Z_STREAM_END or Z_BUF_ERROR. - Remove recursive calls to retry, instead goto 'retry' target. - Remove op statements in malloc/free. - Bail on other rcs. Mutt doesn't check errno on a read error, so lump all other error codes into a -1 return value. Use default so we handle other weird stuff such as Z_NEED_DICT or Z_STREAM_ERROR too. Convert $imap_deflate to boolean, default unset. Configure.ac fixes: - Fix indentation - Remove unneeded AM_CONDITIONAL. - Don't restore LDFLAGS and CPPFLAGS. Save and restore LIBS instead. imap_conn_find() fixes: - Don't queue CAPABILITY command. (This mistake has been in there since UTF-8 and QRESYNC were added.). - Check imap_exec() returns 0 before wrapping. Even with FAIL_OK set, the imap_exec() can still return -1 on some errors. M configure.ac M imap/imap.c M init.h M mutt.h M mutt_zstrm.c 2019-11-11 08:34:49 +0100 Fabian Groffen (136ae0ad) * imap: add support for COMPRESS=DEFLATE, RFC 4978 - added mutt_zstrm which allows wrapping an existing connection with deflate/inflate (zlib compression) - call mutt_zstrm_wrap_conn when setting up an IMAP connection if the server supports COMPRESSION=DEFLATE and imap_deflate evaluates to yes - add config quad-option imap_deflate enable/disable use of (de)compression for IMAP connections, defaulting to yes - add configure check for zlib, --with-zlib to detect if mutt_zstrm can (or should) be built Tested against a Dovecot IMAP server, observed easily 7x compression rates on received data, and 5x on sent data for a normal session. Rates can be observed when the connection is closed on debug level 4 and higher. Bug: https://gitlab.com/muttmua/mutt/issues/92 M Makefile.am M configure.ac M imap/command.c M imap/imap.c M imap/imap_private.h M init.h M mutt.h A mutt_zstrm.c A mutt_zstrm.h 2020-03-28 11:20:21 -0700 Kevin McCarthy (f42ee069) * Update UPDATING for 1.13.5. M UPDATING 2020-03-24 10:01:07 -0700 Kevin McCarthy (0266f6e4) * Fix use-after-free in mutt_str_replace(). The Outlook content-type fix in commit 4cec4b63 inadvertantly introduced a use-after-free. Calling mutt_set_parameter() pointing to a different part of the same string ends up calling mutt_str_replace() with both parameters pointing to the same hunk of memory. Improve mutt_str_replace() to deal with that case, to fix this bug and prevent possible future bugs resulting from that mistake. Thank you to Vita Batrla for the excellent bug report and patch. I merely added a comment and removed the "SAFE_FREE comment" from his patch. M lib.c 2020-03-06 13:48:45 -0800 Kevin McCarthy (d7ab6a73) * Fix format string parameters. crypt-gpgme and pgpkey $pgp_entry_format optional expando processing passed the wrong function parameter. So did remailer for $mix_entry_format. M crypt-gpgme.c M pgpkey.c M remailer.c 2020-02-23 12:53:46 -0800 Kevin McCarthy (619cd6cf) * Ensure format string dest buffer is cleared for callback function. There is some variation in Mutt as to the behavior of an undefined expando. Some functions pass the op through, some output nothing. Unfortunately, a few callback functions also don't ensure the dest buffer is cleared if no expandos match the passed in op. This is mostly my fault - I think I added a few using addrbook as a template, which was unfortunately missing the default clear switch. Rather than adding it to the places a default is missing, just ensure it's cleared in mutt_FormatString() itself, which will prevent future mistakes too. M muttlib.c 2020-02-15 12:23:36 -0800 Kevin McCarthy (1adc3a5d) * automatic post-release commit for mutt-1.13.4 M ChangeLog M VERSION 2020-02-15 11:25:37 -0800 Kevin McCarthy (05a257e8) * Update UPDATING file 1.13.4. M UPDATING 2020-02-11 15:34:17 -0800 Kevin McCarthy (6051760c) * Fix crash when syncing large IMAP mailboxes. imap_sync_mailbox() and imap_exec_msgset() make a copy of the headers before resorting them to generate a message-set, to avoid context changes. I noticed the oddity in the past but didn't investigate deeply enough at the time. :-/ The code in imap_sync_mailbox() was wrong for four reasons: 1) Because IMAP_REOPEN_ALLOW is set, sync_helper() can trigger an imap_exec if the queue fills up, resulting in new messages being downloaded or expunges being triggered. 2) The copy was only allocating msgcount headers, instead of hdrmax. Downloading new messages could then attempt to append beyond the end of the array if hdrmax > msgcount. 3) New messages or expunges would disappear when the copy was restored afterwards. 4) The callers of mx_sync_mailbox() are prepared for context changes, and will adjust the cursor properly to avoid jumps. The same problems can occur in imap_exec_msgset() when reopen is set. Not all of its callers enable reopen, or are prepared to deal with context changes though, so the copy is needed when reopen is not set. An alternative solution tried converting to call mutt_sort_headers() when possible. However that solution turned out to visibly slow down syncs due to the double sorting. This commit instead turns off reopen for the duration of the msgset operations. While verifying all queued operations are flushed, I noticed the initial "quick delete" in imap_sync_mailbox() did not seem to be guaranteed to flush. Ensure the imap_exec() further below is triggered if either the quick delete or sync_helper calls generate changes. Change the quick delete to assign to "quickdel_rc" to make it clear the flush below is for both. Change the post sync/msgset check to look for both ((oldsort != Sort) || hdrs), just to make sure a memory leak doesn't occur. M imap/imap.c 2020-02-08 11:34:13 -0800 Kevin McCarthy (0f8a079d) * Speed up thread sort when many long threads exist. Merge request !75 reported a massive slowdown opening a mailbox with many long threads: on the order of an hour. This is because mutt_set_virtual() was iterating through the whole thread for each message. After taking a closer look at current Mutt behavior, it seems the num_hidden count is only needed in the root thread. Quoting my comment in the merge request: The index-format expando %M only applies to root level headers, so there are no issues there. The only concern is the pattern ~v. Limiting always resets collapsed and num_hidden, so there also can't be any issues there. Tagging and other pattern operators only work on visible messages. So tagging while threads are sorted will only tag the root messages of collapsed threads. However, if you sort by thread, collapse a thread, and then sort by date, the collapsed and num_hidden fields are not reset for each header. In theory this would allow us to tag ~v with date ordering. However, in master the num_hidden is only set (by mutt_set_virtual()) for visible messages with a virtual number. So even in master, switching to date-order and tagging ~v will only tag the root messages of each collapsed thread. This commit removes the num_hidden setting in mutt_set_virtual(), instead directly assigning that value in the roothdr during a collapse operation. A subsequent commit will fix the behavior of ~v, when switching sorting from threaded to something else, by putting num_hidden in every header in the thread. This is technically a change in behavior, so I will make that commit in the master branch. Thanks to Score_Under for the pull request and for testing my alternate solutions. M mutt.h M protos.h M thread.c 2020-02-10 14:52:32 -0800 Kevin McCarthy (376716eb) * Revert $ssl_force_tls to default unset. In theory it's a good idea encourage SSL usage everywhere. However ticket #210 showed that, in reality, that kind of change breaks configs and so is still not a good idea. $ssl_startls defaults set and will use STARTTLS if the server advertises it. M init.h 2020-02-10 11:38:51 +0100 Daniel Tameling (10a35e5d) * Fix rendering of replacement_char when Charset_is_utf8 Use mutt_addwch instead of addch to draw the replacement_char in pager.c. The line to draw the replacement char was addch (replacement_char ()) However, if Charset_is_utf8 is true, replacement_char returns 0xfffd, which is outside the range that addch can handle. Use mutt_addwch instead so that the pager displays the replacement char properly. M pager.c 2020-01-12 13:12:00 -0800 Kevin McCarthy (ad277fd1) * automatic post-release commit for mutt-1.13.3 M ChangeLog M VERSION 2020-01-12 13:01:58 -0800 Kevin McCarthy (f76b45e2) * Update UPDATING file for 1.13.3 release. M UPDATING 2020-01-11 13:47:56 -0800 Kevin McCarthy (be406ede) * Update copyrights to 2020. M COPYRIGHT M doc/manual.xml.head M doc/mutt.man M main.c 2019-12-28 15:43:07 -0800 Kevin McCarthy (edf5699c) * Fix crash when polling a closed ssl connection. Commit 8353407c enabled checking for buffered OpenSSL/GnuTLS data when polling, but neglected to check if the connection was already closed. This can be triggered during imap_logout() if the connection write of "LOGOUT" fails and closes the connection, before the poll. It's a bit tricky to trigger because imap_logout_all() checks for a closed connection, so the failure needs to take place at that last write. Thanks to Stefan Sperling for pointing out the problem, complete with a backtrace and patch. (This commit takes a different approach for a stable-branch fix.) M mutt_ssl.c M mutt_ssl_gnutls.c 2019-12-21 19:40:52 -0800 Kevin McCarthy (8914a1ba) * Turn off auto-clear outside of autocrypt initialization. The auto-clearing code was added in commit 01bc088c, for autocrypt initial prompting. It removed having to keep track of every place a browser or other menu might be displayed and having to remember to clear it out. However, clearing when mutt exits is a change of behavior for those who have turned off alternative screens. M autocrypt/autocrypt.c M menu.c M mutt.h 2019-12-18 14:22:17 -0800 Kevin McCarthy (bbe9bd1a) * automatic post-release commit for mutt-1.13.2 M ChangeLog M UPDATING M VERSION 2019-12-18 14:10:38 -0800 Kevin McCarthy (7aed228a) * Revert "Fixes unchecked return from link() in dotlock.c" This reverts commit 317b7f6b53d8a4272acf8ef1b56f3406e9bc2691. M dotlock.c 2019-12-14 12:49:23 -0800 Kevin McCarthy (60dd8986) * automatic post-release commit for mutt-1.13.1 M ChangeLog M VERSION 2019-12-14 11:33:51 -0800 Kevin McCarthy (fcfd5ee5) * Update UPDATING file for 1.13.1 release. M UPDATING 2019-12-13 15:58:20 -0800 Kevin McCarthy (3d9a1072) * Fix segv in IMAP postponed menu caused by reopen_allow. imap_open_mailbox() leaves IMAP_REOPEN_ALLOW set for the connection. I noticed this previously but didn't bother untangling the logic yet because the index always calls mx_check_mailbox() right away, which unsets the flag. However, when debugging the segv for commit 51729d8d I realized the postponed menu/context also suffers from the problem, leaving the menu ripe for segvs due to unmanaged expunges. I believe imap_read_headers() turns it off and back on to avoid goofing up imap_cmd_finish() when a reopen *is* allowed. The logic needs to be cleaned up and fixed. However for a stable branch fix, I'm am taking a conservative approach and just calling mx_check_mailbox() to turn it back off. M postpone.c 2019-12-12 17:58:11 -0800 Kevin McCarthy (d9dd1d51) * Fix imap postponed mailbox use-after-free error. mutt_get_postponed() was calling mx_close_mailbox(), but not checking the return value. Because the postponed context is an actual read-write, selected mailbox in a new connection, a failed close left a dangling pointer in connection->idata->ctx. imap_keepalive() traversed the connection list, finding the Postponed connection still there, and passed the dangling pointer to imap_check_mailbox. Change an empty postponed mailbox to just call fastclose. Change the other closes to retry on a postive return code "reopen" event and then finally just call fastclose. Outside the index and postponed menu, Mutt's code only uses append or readonly temporary contexts. Those are guaranteed to call mx_fastclose_mailbox() and return 0. M mx.c M postpone.c 2019-12-13 10:57:03 -0800 Kevin McCarthy (011cfc67) * Rename sidebar mailbox shortcuts option and default off. Rename to $sidebar_use_mailbox_shortcuts. The shortening wasn't that much shorter and made the name confusing. To prevent complaints in the future as others transition to 1.13, default off. M init.h 2019-12-07 13:47:37 -0800 Kevin McCarthy (bbfa9271) * Make shortpath/indent code guards explicit. In actuality, the parent_depth and indent_width won't ever be negative. But the new code for unset $sidebar_relative_shortpath_indent makes this much less obvious. Better to be explicit than have some small future code change result in a bug. M sidebar.c 2019-12-07 13:21:49 -0800 Kevin McCarthy (b09a0b80) * Create $sidebar_relative_shortpath_indent, default unset. When unset this option provides the pre-1.13.0 sidebar indentation and shortpath behavior. Setting the option will enable the new (relative to previous entries) indentation and shortening behavior. Note the mailbox shortcuts are controlled by $sidebar_use_mb_shortcuts, which defaults set. M init.h M mutt.h M sidebar.c 2019-12-03 19:16:33 -0800 Kevin McCarthy (8846480c) * Fix new option order in the manual. I actually intended to push commit abfaa0e0 to a remote branch, but accidentally ended up pushing it to stable. :-O Anyway, I think the option is okay, but may have to tweek it a bit. This fixes a mistake where it was placed out of order in init.h. M init.h 2019-12-03 18:55:49 -0800 Kevin McCarthy (abfaa0e0) * Add $sidebar_use_mb_shortcuts to turn off shortcuts. If unset, Mutt will revert to pre-1.13 display behavior, matching and removing a literal $folder prefix, without using mailbox shortcuts. M init.h M mutt.h M sidebar.c 2019-12-01 12:44:36 -0800 Kevin McCarthy (ba1b595c) * Minor documentation fixes. M doc/manual.xml.head 2019-11-30 10:19:26 -0800 Kevin McCarthy (1dd65e6b) * automatic post-release commit for mutt-1.13.0 M ChangeLog M VERSION M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2019-11-30 10:08:44 -0800 Kevin McCarthy (b1d99670) * Set UPDATING file release date for 1.13.0. M UPDATING 2019-11-30 09:56:16 -0800 Kevin McCarthy (0950403f) * Change "Prf Enc" to "Prf Encr". Make the abbreviation a bit clearer, that it means Encryption instead of Encoding. Thanks to Morten Bo Johansen for the suggestion. M autocrypt/autocrypt_acct_menu.c M po/ca.po M po/cs.po M po/da.po M po/de.po M po/ja.po M po/ru.po M po/uk.po 2019-11-29 18:22:49 +0100 Olaf Hering (c6845bd1) * Update de.po Sync from mutt.pot after 'make update-po' Signed-off-by: Olaf Hering M po/de.po 2019-11-28 07:13:47 +0000 Tamotsu TAKAHASHI (e8214c87) * Update copyright year M po/ja.po 2019-11-28 06:59:47 +0000 Tamotsu TAKAHASHI (be4801f8) * Update ja.po M po/ja.po 2019-11-25 15:36:48 -0800 Kevin McCarthy (220a4c91) * Clarify $write_bcc documentation. The wording was ambiguous, and could give the impression that a message, if fcc'ed, would contain the Bcc header when sent too. M init.h 2019-11-23 19:45:20 -0800 Kevin McCarthy (54aa06f7) * Add a bit more documentation about sending. Although the behavior has now been fixed, add $write_bcc references to $record, $sendmail, and $smtp_url to make users more aware of the behavior. M doc/manual.xml.head M init.h 2019-11-23 18:33:28 -0800 Kevin McCarthy (acca75f2) * Minor UPDATING file edits. M UPDATING 2019-11-23 18:22:24 -0800 Ivan Vilata i Balaguer (b302a3e7) * Updated Catalan translation. M po/ca.po 2019-11-20 13:23:00 -0800 Petr Pisar (2e3f535a) * Updated Czech translation. M po/cs.po 2019-11-20 12:21:24 -0800 Vsevolod Volkov (2e3e9556) * Updated Russian translation. M po/ru.po 2019-11-20 12:19:47 -0800 Vsevolod Volkov (0c0f4518) * Updated Ukrainian translation. M po/uk.po 2019-11-18 12:54:26 -0800 Morten Bo Johansen (f84c1fba) * Updated Danish translation. M po/da.po 2019-11-16 21:40:27 +0100 Olaf Hering (40e7c914) * Update de.po Signed-off-by: Olaf Hering M po/de.po 2019-11-14 20:10:35 -0800 Kevin McCarthy (33604971) * Add initial UPDATING file entries for 1.13.0. This is just an initial version, complete with typos and other mistakes. Committing now so translators can refer to it. M UPDATING 2019-11-13 20:09:37 -0800 Kevin McCarthy (24ca73ae) * Fix $fcc_attach to not prompt in batch mode. Include attachments if it is 'yes' or 'ask-yes', like $copy and $send_multipart_alternative. M send.c 2019-11-13 19:28:11 -0800 Kevin McCarthy (06698649) * Change $send_multipart_alternative to run in batch mode on ask-yes. Emulate the behavior of $copy, which performs fcc for 'yes' or 'ask-yes' values. M send.c 2019-11-13 17:51:04 +0000 madroach (e850e89f) * allow autoview preview of multipart/alternative content add view-alt function, so now we have * view-alt "v" * view-alt-text "Esc v" * view-alt-mailcap "V" M OPS M compose.c M doc/manual.xml.head M functions.h 2019-11-13 00:27:28 +0000 David Champion (20c7b0d8) * Fix __attribute__((warn_unused_result)) issue in query.c Changing to mutt_read_line() avoids -Wunused-result warning while reading the ignored line in query protocol response. M query.c 2019-11-13 00:27:27 +0000 David Champion (f098ac2d) * Fix __attribute__((warn_unused_result)) issue in help.c M help.c 2019-11-13 00:27:27 +0000 David Champion (09dfed3f) * Fix __attribute__((warn_unused_result)) warning in enter.c M enter.c 2019-11-13 00:27:25 +0000 David Champion (317b7f6b) * Fixes unchecked return from link() in dotlock.c M dotlock.c 2019-11-11 10:06:44 +0000 David Champion (afb14d62) * Update copyrights M COPYRIGHT 2019-11-11 10:06:44 +0000 David Champion (d8b9f793) * Update patchlist.sh to support `guilt' patch queues M patchlist.sh 2019-11-10 19:58:43 -0800 Kevin McCarthy (88f26048) * Add gcc comments for fallthrough case statements. Most of these were already commented. Change a few of them to a format gcc will recognize. In the future, we'll want to change to whatever is standardized. M addrbook.c M autocrypt/autocrypt_gpgme.c M browser.c M compose.c M curs_main.c M doc/makedoc.c M enter.c M handler.c M hdrline.c M pager.c M pattern.c M pgppacket.c M query.c M recvattach.c M signal.c M smime.c 2019-11-10 18:50:41 -0800 Kevin McCarthy (aae2d87a) * Add $count_alternatives to count attachments inside alternatives. Some mail clients (*cough* Apple Mail) have started to put email attachments in one of the multipart/alternative branches. The config changes the searching to recurse inside alternatives when performing attachment counting. M doc/manual.xml.head M init.h M mutt.h M parse.c 2019-11-10 15:09:54 -0800 Kevin McCarthy (5835f4c0) * Remove nonreentrant calls from exit_handler() _() can invoke malloc, so remove l10n translations. printf() is not safe either, so use write(). I'm not sure at this point about curs_set() and endwin(), but they seem important enough for proper terminal cleanup to risk leaving in. Thanks to Oswald Buddenhagen for pointing out the problem, and the old trac ticket from Vincent at: M signal.c 2019-11-09 13:43:11 -0800 Kevin McCarthy (183c4687) * Add markdown2html contrib script. This was contributed by martin f. kraft, to give an example script for the new $send_multipart_alternative_filter funtionality. M contrib/Makefile.am A contrib/markdown2html 2019-11-09 13:29:16 -0800 Kevin McCarthy (202ec2c8) * Remove input buffer flush on sigwinch in index. I recall seeing a message on IRC, where someone reported their macro suddenly aborting after invoking an editor or something similar. At the time, I wasn't sure of the problem, but this seems a likely culprit, if the event caused a sigwinch. Neither the menu.c nor the pager.c SigWinch handlers do such a thing. The line was part of the initial import 21 years ago, so there is no justification given. M curs_main.c 2019-11-08 08:07:21 -0800 Kevin McCarthy (ef7e5e42) * Fix sigwinch race in the index and menu processor. Reset the SigWinch flag before the screen resize/reflow, not afterwards. M curs_main.c M menu.c 2019-11-07 19:33:31 -0800 Kevin McCarthy (c64baf93) * Change $write_bcc to default off. Change Fcc'ing to always write a Bcc header regardless of the setting. Update the variable documentation to note the difference when Fcc'ing. M init.h M mutt.h M sendlib.c 2019-11-07 15:06:53 -0800 Kevin McCarthy (29167ecf) * Block multipart type alternatives generation. Since generating multipart types using $send_multipart_alternative_filter will not send properly, display an error message and block alternatives of that type. M sendlib.c 2019-11-07 02:14:05 +0000 David Champion (127bcc3c) * s/Mercurial/Git/ in INSTALL M INSTALL 2019-11-06 10:43:09 -0800 Kevin McCarthy (ab9b7b08) * Ensure APP_PGP flag is enabled for autocrypt. There was no code that explicitly enabled APP_PGP mode when either the recommendation engine or autocrypt menu were invoked. This would cause the actual encryption to fail when sending. This was hidden by the $crypt_opportunistic_encrypt config, which does ensure it gets turned on. I can only guess that this variable is popular with the autocrypt early adopters too. Also explicity enable APP_PGP for $autocrypt_reply. We can't rely on $crypt_autopgp to turn this on. M compose.c M send.c 2019-10-29 13:53:20 +0800 Kevin McCarthy (0e566a03) * Add ability to generate multipart/alternative using a filter script. Create config variables $send_multipart_alternative (a quadoption) and $send_multipart_alternative_filter. The filter script expects output to be the mime type, a blank line, then the content. Add ability to preview alternative from compose menu. forces viewing as text. forces using the mailcap. Bind them to 'v' and 'V', respectively. Improve so a multipart/alternative is stripped out, which would just confuse the compose menu. Currently this preserves the first alternative. Allow alternative generation in batch mode, as long as the quadoption is set to 'yes'. M OPS M compose.c M doc/manual.xml.head M functions.h M globals.h M init.h M mutt.h M postpone.c M protos.h M send.c M sendlib.c 2019-10-29 14:58:57 +0800 Kevin McCarthy (3f911681) * Create multipart/mixed helpers. Since we will be dealing with multipart/alternative, we need the helpers to be a bit more specific. We need to distinguish a top-level multipart/alternative from a multipart/mixed created because of attachments. M compose.c M main.c M postpone.c M protos.h M send.c M sendlib.c 2019-10-31 13:58:22 +0100 Fabian Groffen (4cec4b63) * mutt_parse_content_type: work around annoying charset behaviour from Outlook MS Outlook seems to add charset=charset=utf-8 to Content-Type, which results in charset_utf-8 inside Mutt, which in turn confuses others. Strip a leading charset= from charset, so we work around this odd behaviour. Signed-off-by: Fabian Groffen M parse.c 2019-10-29 13:21:51 +0800 Kevin McCarthy (e9ab7539) * Convert smime_decrypt_mime() to use buffer pool. M smime.c 2019-10-28 18:59:02 +0800 Kevin McCarthy (ccf3f493) * Convert smime_handle_entity() to use buffers. Because of the mutt_body_handler() invocation, we avoid using the buffer pool. M smime.c 2019-10-28 12:36:29 +0800 Kevin McCarthy (05805ddd) * Convert smime_verify_one() to use buffer pool. M smime.c 2019-10-28 12:22:45 +0800 Kevin McCarthy (56856d8e) * Convert smime_sign_message() to use buffer pool. M smime.c 2019-10-27 19:29:41 +0800 Kevin McCarthy (ce55dbbf) * Convert smime_build_smime_entity() to use buffer pool. M smime.c 2019-10-27 15:47:55 +0800 Kevin McCarthy (07e32b7a) * Convert smime_invoke_import() and helpers to use buffer pool. M smime.c 2019-10-27 13:28:59 +0800 Kevin McCarthy (d4c00c67) * Convert smime_verify_sender() and helpers to use buffer pool. M smime.c 2019-10-27 11:09:00 +0800 Kevin McCarthy (7c81cd61) * Convert smime_get_candidates() to use buffer pool. M smime.c 2019-10-26 19:36:33 +0800 Kevin McCarthy (7e29eb23) * Convert mutt_write_fcc() to use buffer pool. M sendlib.c 2019-10-25 19:29:56 +0800 Kevin McCarthy (58a81897) * Convert _mutt_bounce_message to use buffer pool. M sendlib.c 2019-10-25 19:13:50 +0800 Kevin McCarthy (8de05d5f) * Convert send_msg() $sendmail_wait to use buffer pool. M sendlib.c 2019-10-25 15:55:49 +0800 Kevin McCarthy (3565f686) * Convert transform_to_7bit() to use buffer pool. M sendlib.c 2019-10-25 15:28:25 +0800 Kevin McCarthy (671e653c) * Convert mutt_message_to_7bit() to use buffer. Clean up the error handling a bit. Because of the recursive invocation, avoid the buffer pool in this case. M sendlib.c 2019-10-24 14:46:06 +0800 Kevin McCarthy (c5d770ea) * Convert fcc to a buffer. This affects the send.c flow (ci_send_message()), the compose menu, and various helper functions. M compose.c M edit.c M headers.c M hook.c M postpone.c M protos.h M send.c M sendlib.c 2019-10-24 11:23:20 +0800 Kevin McCarthy (2fcde005) * Convert send_message() to use buffer pool. M send.c 2019-10-23 19:17:09 +0800 Kevin McCarthy (12cd2d52) * Add typelen parameter to rfc1524_mailcap_lookup(). Because of mime_lookup commands, the call to mutt_check_lookup_list() inside the function can modify the passed in type. Add an explicit length parameter to the function, rather than assume the parameter size. This also makes it more evident the type parameter can be modified to callers. Change the len parameter to mutt_check_lookup_list() to type size_t, just to be correct about it. M attach.c M handler.c M protos.h M recvattach.c M rfc1524.c M rfc1524.h 2019-10-23 19:01:17 +0800 Kevin McCarthy (8997c55f) * Convert rfc1524_mailcap_lookup() to use buffer pool for path. Adjust the rfc1524_mailcap_parse() and get_field_text() filename and type parameters to be const. Note that the sizeof(type) needs to be passed to rfc1524_mailcap_lookup(). I'll fix that next. M rfc1524.c 2019-10-23 16:03:56 +0800 Kevin McCarthy (6380cbd6) * Convert mutt_attach_reply() to use buffer pool. M recvcmd.c 2019-10-23 15:36:59 +0800 Kevin McCarthy (8d12d900) * Convert attach_forward_msgs() to use buffer pool. M recvcmd.c 2019-10-23 15:04:49 +0800 Kevin McCarthy (0b59dc75) * Convert attach_forward_bodies to use buffer pool. M recvcmd.c 2019-10-23 14:44:47 +0800 Kevin McCarthy (1f71fad9) * Convert attach_fmt %f to use buffer pool. M recvattach.c 2019-10-23 14:33:09 +0800 Kevin McCarthy (80bc61db) * Convert mutt_num_postponed() maildir check to use buffer pool. M postpone.c 2019-10-23 13:53:26 +0800 Kevin McCarthy (d8b6f94e) * Convert pop_fetch_message() to use buffer pool. M pop.c 2019-10-23 11:39:22 +0800 Kevin McCarthy (08480fa8) * Convert pop_read_header() to use buffer pool. M pop.c 2019-10-20 15:52:22 +0800 Kevin McCarthy (5b53290a) * Convert pgp_find_hash to use buffer pool. M pgpmicalg.c 2019-10-20 15:27:10 +0800 Kevin McCarthy (26e89164) * Convert pgp_make_key_attachment() to use buffer pool. M pgpkey.c 2019-10-20 14:06:24 +0800 Kevin McCarthy (15f89f8e) * Remove make_key_attachment parameter. The parameter is not actually used anywhere. The next commit will convert the classic pgp implementation to use the buffer pool. This change will simplify the logic. M compose.c M crypt-gpgme.c M crypt-gpgme.h M crypt-mod-pgp-classic.c M crypt-mod-pgp-gpgme.c M crypt-mod.h M cryptglue.c M mutt_crypt.h M pgp.h M pgpkey.c M send.c 2019-10-20 13:41:30 +0800 Kevin McCarthy (e3408a00) * Convert pgp_select_key() to use buffer pool. M pgpkey.c 2019-10-19 15:50:22 +0800 Kevin McCarthy (782bcd7d) * Convert pgp_traditional_encryptsign() to use buffer pool. M pgp.c 2019-10-19 15:35:06 +0800 Kevin McCarthy (978cdaf7) * Convert pgp_encrypt_message() to use buffer pool. M pgp.c 2019-10-19 15:07:53 +0800 Kevin McCarthy (38291748) * Convert pgp_sign_message to use buffer pool. M pgp.c 2019-10-19 14:48:17 +0800 Kevin McCarthy (48a34377) * Convert pgp_encrypted_handler() to use buffer pool. M pgp.c 2019-10-18 15:05:33 +0800 Kevin McCarthy (aa66b414) * Convert pgp_decrypt_mime() to use buffer pool. M pgp.c 2019-10-18 14:41:06 +0800 Kevin McCarthy (e383f5c9) * Convert pgp_decrypt_part() to use buffer pool. M pgp.c 2019-10-18 14:29:56 +0800 Kevin McCarthy (f3bfb7d1) * Convert pgp_extract_keys_from_attachment() to use buffer pool. M pgp.c 2019-10-18 14:21:19 +0800 Kevin McCarthy (e2722551) * Convert pgp_verify_one() to use buffer pool. M pgp.c 2019-10-18 14:02:02 +0800 Kevin McCarthy (c1f9f00f) * Convert pgp_check_traditional_one_body() to use buffer pool. M pgp.c 2019-10-17 18:34:55 +0800 Kevin McCarthy (e750e39c) * Clean up pager change folder aborts to return to pager. Changing folder from within the pager behaved inconsistently when aborting, or upon a normal error. It would sometimes return the pager and other times return to the index. Ensure it returns to the pager, except in the case where mx_close_mailbox() fails due to a new mail or reopen event. In that case we likely want to be in the index - the message we were viewing could have disappeared or relocated. M curs_main.c 2019-10-17 17:30:03 +0800 Kevin McCarthy (b15e8659) * Remove menu->menu hack when redirecting pager ops through index. As noted in commit a327386c, this causes problems when redirecting ops that open new menus. There is no need to change the menu->menu type, as a flag works perfectly well with no such side effects. This also removes the need for comments explaning the hack before mutt_folder_hooks() when changing folders, or before displaying a message in the pager. M curs_main.c 2019-10-17 16:01:11 +0800 Kevin McCarthy (e5f24ca8) * Merge branch 'stable' 2019-10-17 15:48:31 +0800 Kevin McCarthy (a327386c) * Stable branch quick fix for pager change-mailbox push/exec bug. The menu functions mutt_push/pop_current_menu() keep track of the menu stack, automatically setting CurrentMenu when exiting menus. The only gotcha was the function sharing between the index and pager menus. The index uses a hack, setting menu->menu to MENU_PAGER for operations redirecting through the index and back to the pager afterwards. I thought this was covered by the restoration of the menu before returning to the pager, or when exiting the index switch. However it is not: invoking other menus, such as the browser, will result in CurrentMenu being set to the Pager when exiting those (by mutt_pop_current_menu()). This can result in folder hooks failing for unshared functions. A better fix is to remove the hack of using menu->menu, because this can easily cause a problem in the future in other situations. (I will make this fix in master next.) For the stable branch, I am explicitly setting/restoring CurrentMenu before invoking the folder hooks. M curs_main.c 2019-10-16 15:42:54 +0800 Kevin McCarthy (30b1ff48) * Convert pgp_app_handler to use buffer pool. Rename the pgp_copy_checksig() and mutt_wait_filter() return code variables to provide more clarity, and to make the purpose and assignment of rc more obvious. Change tmpfname creation failure to be like pgpoutfile and pgperrfile, by going to the cleanup point. M pgp.c 2019-10-16 14:41:04 +0800 Kevin McCarthy (f566f734) * Convert msg_search to use buffer. Avoid the buffer pool because of the long life cycle (across the invocation of mutt_body_handler(). M pattern.c 2019-10-16 14:13:05 +0800 Kevin McCarthy (23bfc45f) * Convert mx_close_mailbox() to use buffer pool. M mx.c 2019-10-15 15:26:20 +0800 Kevin McCarthy (9506db1e) * Reduce line buffer size in mx_get_magic(). tmp is only used for mbox and mmdf iniital line examination. That only needs to look at 6 characters from the first line. M mx.c 2019-10-15 14:52:26 +0800 Kevin McCarthy (0944e898) * Convert mutt_save_confirm() to use buffer pool. These are prompts, so don't really need the larger, dynamic capability, but it might not hurt for a larger path. M muttlib.c 2019-10-15 14:38:07 +0800 Kevin McCarthy (48847904) * Removed unused mutt_expand_link() M muttlib.c M protos.h 2019-10-15 14:33:02 +0800 Kevin McCarthy (140cd885) * Change ssl_init to use buffer pool for rand filename. M mutt_ssl.c 2019-10-15 13:48:59 +0800 Kevin McCarthy (5572a302) * Convert mbox_sync_mailbox() to use buffer pool. Rewrite return(-1) to a new fatal target to ensure cleanup. Remove some repetitive unlink(tempfile) operations by adding a new flag pointing when to start and stop that during a bail. M mbox.c 2019-10-13 16:25:54 +0800 Kevin McCarthy (71d6dbea) * Update mime fields when piping a message with $pipe_decode set. Programs that process the message may get confused if the original mime fields are in the output. Add the CH_MIME flag to strip mime headers and CH_TXTPLAIN to add decoded text mime headers in their place, just as does. However, make sure not to add the flags when printing, as printers highly likely won't care and users probably don't want to see those headers in their printout. M commands.c 2019-10-11 19:31:58 +0800 Kevin McCarthy (9a1b08bf) * Merge branch 'stable' 2019-10-11 19:17:58 +0800 Beck, Andre (937a1eb1) * Clear connection input buffer when closing. An RFC-violating reply from the Dovecot SMTP submission service uncovered a bug in Mutt. Mutt was not clearing out the input buffer when closing the connection. Dovecot was including an extra 250 response after data submission: DATA 354 OK Subject: Test 3 Test 3 . 250 2.0.0 223 byte chunk, total 223 250 2.0.0 OK id=1iIqT1-0004wS-Ac quit 221 2.0.0 Bye The multiline 250 reply requires a hyphen in the first response. Mutt closes the connection after the quit, but ends up leaving the unexpected second line in the input buffer. This causes an error in the next usage of the connection. Clean out bufpos and available when closing the socket. M mutt_socket.c 2019-10-10 15:03:05 +0800 Kevin McCarthy (0e32b977) * Add new browse-mailboxes function in index and pager. This allows direct access to the mailboxes list in the folder menu. This is useful, for instance, if $browser_sticky_cursor is set and the current directory does not contain the open mailbox. The macro version will lose the current mailbox while toggling to the mailboxes list. M OPS M curs_main.c M doc/Muttrc.head M functions.h 2019-10-09 12:59:41 +0800 Kevin McCarthy (e4c176b3) * Convert main() to use buffers for paths. Convert fpath (used for checking and creating $folder. Convert expanded_infile and tempfile which are used for the -i,-H, and -E options. We allocate buffers, rather than use the pool, because they are used for the duration of the compose/send operation. M main.c M protos.h M send.c 2019-10-09 08:36:59 +0800 Kevin McCarthy (fe69e4d1) * Add sticky browser behavior for sorting. The menu isn't rebuilt after sorting, so the selected mailbox was not sticky for that operation. Refactor the sticky cursor setting out so it can be explicitly called after sorting too. M browser.c 2019-10-08 15:22:27 +0800 Kevin McCarthy (46223bc9) * Convert start_debug() to use buffer pool. M init.c 2019-10-08 15:21:44 +0800 Kevin McCarthy (fb2487c2) * Convert set/reset and source_rc to use buffers for paths. M init.c 2019-10-08 13:07:40 +0800 Kevin McCarthy (49c97808) * Convert parse_path_(un)list to use buffer pool for path. Don't use the buf parameter to avoid stretching it out, as it's used for the entire rc parsing, and typically just holds command names. M init.c 2019-10-08 12:28:30 +0800 Kevin McCarthy (d430f372) * Change message cache id to use SHORT_STRING. Even that is too big, but it doesn't make make sense to use _POSIX_PATH_MAX for the id string. M imap/message.c 2019-10-08 11:24:38 +0800 Kevin McCarthy (f055ff54) * Convert imap_cachepath() and callers to use buffers. M imap/imap_private.h M imap/message.c M imap/util.c 2019-10-07 10:39:44 +0800 Kevin McCarthy (dcdbdfee) * Convert imap fetch_new and fetch_message tempfiles to buffer pool. M imap/message.c 2019-10-07 09:55:39 +0800 Kevin McCarthy (2e0fc335) * Convert imap_open_new_message() to use buffer pool. M imap/imap.c 2019-10-06 16:32:42 +0800 Kevin McCarthy (3f5b0220) * Convert save-hook and fcc-hook to use buffer pool internally. The hook parameters still need to be converted, but I'm working towards it slowly. M hook.c M muttlib.c M protos.h 2019-10-06 13:37:14 +0800 Kevin McCarthy (8351c060) * Convert mutt_parse_hook() to use buffer pool. Remove the path variable, as this is not needed: mutt_buffer_expand_path() and mutt_check_simple() can operate directly on the pattern/command buffers. M hook.c 2019-10-05 14:10:04 +0800 Kevin McCarthy (43bc959c) * Convert shrink_histfile() tempfile to use buffer pool. M history.c 2019-10-05 13:59:57 +0800 Kevin McCarthy (bb62f172) * Convert mutt_help() to use buffer for tempfile. M help.c 2019-10-05 13:52:50 +0800 Kevin McCarthy (dafb1f38) * Convert mutt_edit_headers() to use buffer pool. M headers.c 2019-10-04 15:29:03 +0800 Kevin McCarthy (48cf1092) * Fix built-in pager checks for help and attachments. Mutt uses the built-in pager when $pager is unset too. Fix a few checks to also handle that case. M help.c M muttlib.c 2019-09-30 18:50:27 -0700 Kevin McCarthy (a6bccbe1) * Memcpy header cache fetch values to ensure alignment. While testing the hcache buffer pool changes, I noticed a misaligned pointer warning when using LMDB. The other header cache backends must ensure alignment of the pointer they return, but LMDB apparently does not. Instead of directly assigning and dereferencing the pointer fetched, use memcpy to the appropriate type, just as the header cache restore operation does. M imap/imap.c M imap/message.c M imap/util.c M mh.c 2019-09-28 14:08:39 -0700 Kevin McCarthy (fb1686b6) * Convert hcache delete and open calls to use buffer pool. M hcache.c 2019-09-27 19:21:26 -0700 Kevin McCarthy (36ee8d39) * Convert hcache fetch and store raw to use buffer pool. M hcache.c 2019-09-27 18:12:27 -0700 Kevin McCarthy (a736d4a4) * Convert hcache_open to use buffer pool. Change the namer function and mutt_hcache_per_folder to operate on a buffer parameter. M hcache.c M hcache.h M imap/util.c M pop.c 2019-09-27 15:46:49 -0700 Kevin McCarthy (84c1b646) * Convert hcache db4 lockfile to buffer. M hcache.c 2019-09-27 14:42:45 -0700 Kevin McCarthy (34ad2134) * Convert run_decode_and_handler() to use buffer pool. M handler.c 2019-09-27 14:28:01 -0700 Kevin McCarthy (a4f99230) * Convert edit_one_message() to use buffer pool. M editmsg.c 2019-09-26 15:23:14 -0700 Kevin McCarthy (44349c11) * Convert mutt_error_history to use buffer pool. M curs_lib.c 2019-09-25 18:44:50 -0700 Kevin McCarthy (13965f79) * Convert crypt_extract_keys and signed handler to use buffers. M crypt-mod-smime-classic.c M crypt-mod.h M crypt.c M cryptglue.c M mutt_crypt.h M smime.c M smime.h 2019-09-25 15:28:30 -0700 Kevin McCarthy (fc0c2bee) * Convert crypt-gpgme to use BUFFER for tempfiles. Use the pool where possible, but when the function calls other long-running functions (such as mutt_body_handler() or mutt_do_pager()), allocate the buffer. smime_gpgme_decrypt_mime() was not freeing the "cur" BODY generated on error. Add a call to mutt_free_body(cur) in the error handling. M crypt-gpgme.c 2019-09-22 15:59:27 -0700 Kevin McCarthy (4d2f645a) * Fix memory leak in compose write-fcc function. The outer multipart was not being freed after writing. M compose.c 2019-09-22 15:58:58 -0700 Kevin McCarthy (0637998b) * Convert compress setup_paths() to use buffer. M compress.c 2019-09-22 14:54:14 -0700 Kevin McCarthy (1ae6e10f) * Remove nonull check from _mutt_enter_fname() It was a mistake to add the check when converting to use buffers in commit 70ef4e9e. The buf must be non-null in the original version, and in this version we are copying results back to it afterwards. M curs_lib.c 2019-09-22 14:38:03 -0700 Kevin McCarthy (b4cd9852) * Convert compose menu fname variable to buffer. M compose.c 2019-09-22 14:16:56 -0700 Kevin McCarthy (5da50b4d) * Convert buffer callers of mutt_get_field() to use buffer version. M browser.c M curs_lib.c M muttlib.c M pattern.c M recvattach.c 2019-09-22 14:11:43 -0700 Kevin McCarthy (ecd0d6ed) * Create mutt_buffer_get_field(). This will reduce the buffer->dptr fiddling all over the place into one spot until mutt_enter_string() can be converted. M curs_lib.c M protos.h 2019-09-21 19:41:28 -0700 Kevin McCarthy (4f89f530) * Convert compose check_attachments() to use buffer pool. Modify error message so that the filename comes last, to prevent a long path from hiding the error message or prompt. M compose.c 2019-09-21 18:34:51 -0700 Kevin McCarthy (4050cc43) * Fix mutt_save_message() "enter_fname()" to use buffer version. Commit be632f11 converted this function to use the buffer pool, but accidentally used the non-buffer prompt when there was already a buffer-converted version. M commands.c 2019-09-21 12:41:10 -0700 Kevin McCarthy (7ca52826) * Merge branch 'stable' 2019-09-21 12:36:56 -0700 Kevin McCarthy (34cd43c3) * automatic post-release commit for mutt-1.12.2 M ChangeLog M VERSION 2019-09-19 18:52:24 -0700 Kevin McCarthy (192a6d0e) * Convert mutt_complete() to use the buffer pool. Add helper functions mutt_buffer_substrcpy() and mutt_buffer_concatn_path(). Remove mutt_concatn_path() because mutt_complete() was the only caller. M buffer.c M buffer.h M complete.c M imap/imap.c M imap/imap.h M lib.c M lib.h M muttlib.c M protos.h 2019-09-15 15:41:42 -0700 Kevin McCarthy (a4b53e19) * Improve sidebar indentation and shortpath behavior. The previous implementation only enabled $sidebar_folder_indent for mailboxes underneath $folder. Change indentation to be based upon the previous common-path mailbox in the list. Indent one more than the common-path mailbox, rather than the number of delimiters after $folder. Change $sidebar_short_path to shorten based on the previous mailbox in the list too. Invoke mutt_buffer_pretty_mailbox() to prefix the mailbox with '~' or '=' characters. This changes the output for the case where mailbox equals $folder, but provides uniform display behavior across mutt. Thanks to Christopher Zimmermann (@madroach) for the original patch, which this commit is based upon. M sidebar.c 2019-09-11 19:47:13 -0700 Kevin McCarthy (fa965230) * Convert print_attachment_list to use buffer pool. M recvattach.c 2019-09-11 19:40:48 -0700 Kevin McCarthy (70bb4fad) * Convert query_pipe_attachment to use buffer pool. M attach.c M protos.h M recvattach.c 2019-09-11 19:10:02 -0700 Kevin McCarthy (4142e2e5) * Convert recvattach save_attachment functions to use buffer pool. Convert utility functions prepend_curdir() and mutt_check_overwrite() to use BUFFER, as they are only used by those two functions. M muttlib.c M protos.h M recvattach.c 2019-09-11 16:23:46 -0700 Kevin McCarthy (be632f11) * Convert mutt_save_message() to use buffer pool. Change imap_copy_messages() dest parameter to const char *. mutt_default_save() will be converted to use a buffer next, removing the dptr fixups. M commands.c M imap/imap.h M imap/message.c 2019-09-11 15:55:01 -0700 Kevin McCarthy (67f4d1d0) * Convert mutt_display_message() to buffer pool. Remove an unused mime-type string generation at the top of the function too. The code using the mime type was removed a long time ago in commit 246198ae. M commands.c 2019-09-09 18:39:19 -0700 Kevin McCarthy (f8e93908) * Merge branch 'stable' 2019-09-09 18:19:03 -0700 Kevin McCarthy (773166e9) * Change browser to show full_path. Prior to the introduction of display_name/full_path, it showed "name", which was the full IMAP URL but the shortname for folder/mailbox view. Now that the full_path is available, it makes sense to show that for all cases. M browser.c 2019-09-09 14:06:31 -0700 Kevin McCarthy (2e6d4903) * Convert remaining mutt_encode_path() call to use BUFFER. Then rename the other uses of mutt_buffer_encode_path() to mutt_encode_path(). M bcache.c M hcache.c M muttlib.c M protos.h 2019-09-09 18:07:16 -0700 Kevin McCarthy (616b2063) * Merge branch 'stable' 2019-09-08 10:49:37 -0700 Kevin McCarthy (0fa71030) * Add $browser_sticky_cursor default set. This option attempts to keep the browser cursor on the same mailbox. It does this by keeping track of the current selected mailbox and comparing that when regenerating the menu. Modify imap_mailbox_create() and imap_mailbox_rename() to return the new mailbox name so it can be automatically selected. M browser.c M imap/browse.c M imap/imap.h M imap/imap_private.h M imap/util.c M init.h M mutt.h 2019-09-08 12:09:51 -0700 Kevin McCarthy (1600dd18) * Rename browser fields to display_name and full_path. Mailbox and Folder view don't make use of the desc field. They store an abbreviated version in the name field and expand it when selecting or testing it. IMAP stores the full URL in name, and stores an abbreviated version (possibly with a trailing slash) in the desc field. The asymetricity makes it awkward, and interferes with a smart-cursor option in the next commit. So instead rename the fields to "display_name" and "full_path". In Mailfox and Folder view, store the fully expanded path, which we have while iterating, in "full_path", and the shortened version in "display_name". Likewise in IMAP, store the full URL in "full_path" and the shortened version in "display_name". Simplify the code in browser.c to use the full_path instead of concatenating and expanding. M browser.c M browser.h M imap/browse.c 2019-09-06 16:14:08 -0700 Kevin McCarthy (ad72ec6c) * Convert bcache to use buffer pools. M bcache.c M muttlib.c M protos.h 2019-09-01 19:10:23 -0700 Kevin McCarthy (c28cba77) * Fix memory leak when attaching messages. Setting actx->idx[]->content->parts to NULL causes a memory leak, because message attachments store a BODY there that needs to be freed. I looked through the various use cases of ci_send_message() and actually believe content->parts will be NULL for all other cases except message attachments. From the comment added to delete_attachment(): Other ci_send_message() message constructors are careful to free any body->parts, removing depth: - mutt_prepare_template() used by postponed, resent, and draft files - mutt_copy_body() used by the recvattach menu and $forward_attachments. I believe it is safe to completely remove the "content->parts = NULL" statement. But for safety, am doing so only for the case it must be avoided: message attachments. M compose.c 2019-09-01 13:25:06 -0700 Kevin McCarthy (aafe98ba) * Reuse the static space_stuff function for unstuffing. M rfc3676.c 2019-08-31 14:17:22 -0700 Kevin McCarthy (7949149a) * Remove manual note about space-stuffing only once. Stuffing is now performed each time. M doc/manual.xml.head 2019-08-31 13:37:16 -0700 Kevin McCarthy (4959e8d4) * Re-enable and cleanup format-flowed space stuffing. Commit 04cb5bde tried to fix re-stuffing a postponed message more than once, but unfortunately broke the normal case of composing a new message. So actually, space-stuffing has been turned off the past 7 years. Move format=flowed parameter setting below the standard message pre-processing block. It shouldn't be performed for draft-files even with $resume_draft_files set. Moving out of the block makes that clearer. Create mutt_rfc3676_space_(un)stuff() functions, which check the content type and stuff/unstuff apprpropriately. Note that the stuff/unstuff does not depend on $text_flowed, which is only in charge of setting the format=flowed parameter. This parameter can also come from resumed/resent/draft messages and should still be respected. Add unstuffing to mutt_prepare_template(). This is called by postponed, resent, and draft files. This will prevent double-stuffing in those cases. Unstuff/restuff around editing the message in the compose menu, to keep everything transparent to the user. I originally put the stuffing *after* the compose menu, but previewing the messages in the compose menu did not work properly in that case. It's cleaner this way too. Change the stuff/unstuff functions to preserve the original hdr->content->filename. The "hack" previously used would interact poorly with editable body files (mutt -i -E). Fortunately space stuffing was pretty much disabled except in unusual cases before. M compose.c M doc/manual.xml.head M init.h M postpone.c M rfc3676.c M rfc3676.h M send.c 2019-08-31 13:36:28 -0700 Kevin McCarthy (af47e694) * Properly revert on an autocrypt postpone failure. M send.c 2019-08-28 14:47:15 -0700 Kevin McCarthy (aa6d4663) * Merge branch 'stable' 2019-08-28 20:22:10 +0000 Olaf Hering (2b8dc129) * de.po: proper translation for term collapse The intention of the term "collapse" is something like opening and closing an item. The initial translation which was added two decades ago means something like "breaks by weakness", which does not fit in the context of mutt. Use a term which means literally "opening and closing an item, like a book". Signed-off-by: Olaf Hering M po/de.po 2019-08-20 15:37:06 -0700 Kevin McCarthy (c8ec78e1) * Clean up the autocrypt doc a bit more. M doc/manual.xml.head 2019-08-20 15:17:31 -0700 Kevin McCarthy (f7c70a02) * Update autocrypt keyring documentation. Recommend setting $autocrypt_dir to your normal keyring directory if you want to use your existing key. Trying to copy it over leads to signature verification issues. Even if I reversed the order (which is much less clean), that would just lead to missing key signature errors for Autocrypt messages instead. M doc/manual.xml.head 2019-08-20 14:57:29 -0700 Kevin McCarthy (577d5d14) * Fix --with-sqlite3 test for autocrypt. Since $with_sqlite3 can contain a path, we want to check if it is "no", not that it isn't "yes". M configure.ac 2019-08-17 15:38:34 -0700 Kevin McCarthy (d4ec818a) * Add $ssl_use_tlsv1_3 config variable, default set. M init.h M mutt.h M mutt_ssl.c M mutt_ssl_gnutls.c 2019-06-28 15:09:51 -0700 Kevin McCarthy (be684ef2) * Add size display configuration variables. Although it would be nice to "open this up" more, performance and security/stability issues would arise. Based on the thread in mutt-dev, I hope these vars will satisfy most customization needs: $size_show_bytes $size_show_mb $size_show_fractions $size_units_on_left M doc/manual.xml.head M init.h M mutt.h M muttlib.c 2019-08-13 21:03:51 -0700 Kevin McCarthy (342b91cf) * Fix LibreSSL build. Apparently LibreSSL doesn't implement SSL_has_pending(), even for newer versions. M mutt_ssl.c 2019-08-13 15:14:37 -0700 Kevin McCarthy (536353c7) * Update POTFILES.in. The file was missing a few files with translation strings: copy.c, imap/auth_oauth.c, and safe_asprintf.c. M po/POTFILES.in 2019-07-28 07:54:32 -0700 Kevin McCarthy (8353407c) * Add checks for buffered OpenSSL or GnuTLS data when polling. I don't believe this has had an actual effect, because Mutt doesn't support renegotiation, and we are only polling immediately after sending NOOP. However, it looks like checking is technically the correct thing to do to avoid polling waiting for data that is already buffered. M mutt_ssl.c M mutt_ssl_gnutls.c 2019-08-13 14:20:33 -0700 Kevin McCarthy (fdfda1b7) * Mention base64 keydata being stored in the autocrypt database. M doc/manual.xml.head 2019-08-11 14:35:07 -0700 Kevin McCarthy (c79c769f) * Move LIBAUTOCRYPT before MUTTLIBS to fix building issues. M Makefile.am 2019-08-11 14:17:50 -0700 Kevin McCarthy (456737cd) * Add autocrypt and sqlite3 to .gitlab-ci.yml. M .gitlab-ci.yml 2019-08-09 14:15:18 -0700 Kevin McCarthy (ae332f72) * Add L10N comment about autocrypt menu help line abbreviations. M autocrypt/autocrypt_acct_menu.c 2019-08-09 13:58:55 -0700 Kevin McCarthy (9f692bd3) * Add a note about autocrypt first-run and macros. M doc/manual.xml.head 2019-08-09 13:37:08 -0700 Kevin McCarthy (b8e9dfc1) * Add autocrypt documentation about shared key and keyring strategies. M doc/manual.xml.head 2019-08-08 20:49:32 -0700 Kevin McCarthy (38f06669) * Minor autocrypt manual section updates. Mention key selection during account creation and $autocrypt_reply for controlling autocrypt mode setting during replies. M doc/manual.xml.head 2019-08-08 09:18:53 -0700 Kevin McCarthy (d0ef8c32) * Enabled writing protected subject with autocrypt too. M crypt.c 2019-08-07 18:34:58 -0700 Kevin McCarthy (1de46058) * Turn off macro processing during autocrypt initialization. The muttrc can push events into the macro buffer, with the assumption that mailbox will be opened next. This will interfere with the prompts uses during first run. The only issue is that macros won't work inside the folder browser, if invoked. M autocrypt/autocrypt.c 2019-08-07 18:24:15 -0700 Kevin McCarthy (41d9d9cf) * Allow nested setting of OPTIGNOREMACROEVENTS. This will be needed for the first-run of autocrypt initialization. The initialization involves a number of prompts, and can even use the folder browser. The browser could in turn connect to IMAP which might invoke a certificate prompt, login prompt, etc. M curs_lib.c M mutt_ssl.c M mutt_ssl_gnutls.c 2019-08-07 14:31:53 -0700 Kevin McCarthy (04817c00) * Add $autocrypt_reply. This allows turning off the force-autocrypt mode when replying to an autocrypt email. M init.h M mutt.h M send.c 2019-08-07 14:17:28 -0700 Kevin McCarthy (01bc088c) * Automatically clear screen when popping the last menu. This removes the need to manually clear the screen during pre-menu operations, such as autocrypt first run initialization. M autocrypt/autocrypt.c M menu.c 2019-08-07 14:12:43 -0700 Kevin McCarthy (d55b0390) * Add ability to create autocrypt account from an existing key. This is useful when adding accounts, or for users who want to use an existing key from the keyring during initial account creation. M autocrypt/autocrypt.c M autocrypt/autocrypt_gpgme.c M autocrypt/autocrypt_private.h M crypt-gpgme.c M crypt-gpgme.h 2019-08-04 07:55:26 -0700 Kevin McCarthy (769a7765) * Don't try to decrypt autocrypt messages if the option is off. M cryptglue.c 2019-08-04 07:52:19 -0700 Kevin McCarthy (da54c660) * Manual typo fix. Thanks to Petr Pisar for pointing out the error. M doc/manual.xml.head 2019-08-03 13:53:40 -0700 Kevin McCarthy (1089deb0) * Add autocrypt README file M autocrypt/Makefile.am A autocrypt/README 2019-08-02 09:03:41 -0700 Kevin McCarthy (128127cb) * Add documentation for the autocrypt feature. M doc/manual.xml.head M init.h 2019-07-31 18:56:29 -0700 Kevin McCarthy (2822b4eb) * Add option to scan mailboxes during first run. The scanner will disable the header cache, allowing scanning all messages in the mailbox. M autocrypt/autocrypt.c M autocrypt/autocrypt_db.c M autocrypt/autocrypt_private.h 2019-07-31 15:42:09 -0700 Kevin McCarthy (e01b3f02) * Add more translation string comments for autocrypt. M autocrypt/autocrypt.c M autocrypt/autocrypt_acct_menu.c M autocrypt/autocrypt_db.c M autocrypt/autocrypt_gpgme.c M compose.c 2019-07-28 19:24:11 -0700 Kevin McCarthy (85bd11b0) * Basic autocrypt account menu. Provide ability to create, delete, and toggle the prefer-encrypt and enabled flag for an account. Hook into the index via 'A' . M OPS M autocrypt/Makefile.am M autocrypt/autocrypt.c M autocrypt/autocrypt.h A autocrypt/autocrypt_acct_menu.c M autocrypt/autocrypt_db.c M autocrypt/autocrypt_private.h M curs_main.c M doc/manual.xml.tail M functions.h M globals.h M init.h M keymap.c M keymap.h M po/POTFILES.in 2019-07-30 19:14:56 -0700 Kevin McCarthy (36115604) * Convert peer_update to just pass the peer object. Unlike get and insert, there is no need for an addres parameter that needs to be normalized, since the address is already in the peer object. M autocrypt/autocrypt.c M autocrypt/autocrypt_db.c M autocrypt/autocrypt_private.h 2019-07-28 19:23:12 -0700 Kevin McCarthy (71e881a6) * Improve gen-map-doc work on multi-word maps. M doc/gen-map-doc 2019-07-27 15:34:51 -0700 Kevin McCarthy (e5463f57) * Add account->enabled checks. Add to ui recommendation, keylist generator, and autocrypt header writing routines. M autocrypt/autocrypt.c 2019-07-27 15:11:38 -0700 Kevin McCarthy (a7a5abe4) * Add prefer-encrypt prompt during account creation. M autocrypt/autocrypt.c 2019-07-27 13:44:36 -0700 Kevin McCarthy (ec6953f5) * Add AUTOCRYPT header to imap fetch list. If $autocrypt is set, add the header to make IMAP behave the same as other formats (parsing on initial mailbox opening). This will also be useful if we perform an initial scan during account creation, to make that work for IMAP too. M imap/message.c 2019-07-26 16:27:04 -0700 Kevin McCarthy (0d94a3dc) * Add L10N translation message comments. M autocrypt/autocrypt.c M autocrypt/autocrypt_db.c M autocrypt/autocrypt_gpgme.c M compose.c 2019-07-26 16:00:22 -0700 Kevin McCarthy (43c57659) * Add autocrypt source files to POTFILES.in M po/POTFILES.in 2019-07-26 15:59:47 -0700 Kevin McCarthy (baac6d68) * Print an error message if an autocrypt key can't be found. M autocrypt/autocrypt.c 2019-07-26 13:55:46 -0700 Kevin McCarthy (2aec979b) * Handle autocrypt message decryption. Try autocrypt first for crypt_pgp_decrypt_mime() and pgp_gpgme_encrypted_handler(). Propagate the autocrypt bit if successful. This is used when replying to an autocrypt message, to force a reply using autocrypt. M crypt-gpgme.c M crypt.c M cryptglue.c M handler.c M mutt.h 2019-07-25 19:12:32 -0700 Kevin McCarthy (d0a56a14) * Slightly improve the gossip header key update. Don't set an empty peer.gossip_keydata with a value that matches the current peer.keydata. This just wastes space. M autocrypt/autocrypt.c 2019-07-24 18:59:07 -0700 Kevin McCarthy (78d028d7) * Fix process_gossip_headers() to look at the right envelope. M autocrypt/autocrypt.c M autocrypt/autocrypt.h M commands.c 2019-07-21 15:15:06 -0700 Kevin McCarthy (963fc1ba) * Autocrypt outgoing emails. Change crypt_get_keys() to query autocrypt. When oppenc_mode is set, we still query the original keyring regardless, because the compose menu can still run oppenc even if autocrypt is on. Since mutt_autocrypt_ui_recommendation() checks each key as part of making the recommendation, add a keylist parameter and use that function. Add gpgme changes to use the autocrypt context for encryption. Postpone work: * Change mutt_protect() to have a postpone parameter. Remove the manual toggling of the SIGN bit outside the call when postponing. * Since autocrypt doesn't set the SIGN bit, this allows us to turn off signing inside mutt_protect() for both normal and autocrypt mode. * Set the autocrypt postpone key in AutocryptDefaultKey. Write autocrypt and gossip headers in outgoing emails. M autocrypt/autocrypt.c M autocrypt/autocrypt.h M compose.c M crypt-gpgme.c M crypt.c M cryptglue.c M globals.h M mutt.h M mutt_crypt.h M postpone.c M send.c M sendlib.c 2019-07-19 12:54:32 -0700 Kevin McCarthy (959628d0) * Add autocrypt line to the compose menu. Remove the hardcoded HDR_ATTACH offset calcuation, and add an explicit enum for the "-- Attachments" line to make loops and padding array sizes easier. Add security and recommendataion fields on the line. Add mutt_autocrypt_ui_recommendation, following the autocrypt spec guidelines. M OPS M autocrypt/autocrypt.c M autocrypt/autocrypt.h M autocrypt/autocrypt_gpgme.c M autocrypt/autocrypt_private.h M compose.c M functions.h M mutt.h M mutt_crypt.h 2019-07-20 14:48:06 -0700 Kevin McCarthy (009b62c9) * Add another HEADER security bit for autocrypt. M mutt.h M mutt_crypt.h 2019-07-18 13:22:52 -0700 Kevin McCarthy (7c183407) * Change gossip header address comparison to use normalized addresses. M autocrypt/autocrypt.c 2019-07-18 13:19:47 -0700 Kevin McCarthy (8f0f0da2) * Change autocrypt_db normalization to return ADDRESS. This makes reusing the code in autocrypt.c easier. M autocrypt/autocrypt_db.c M autocrypt/autocrypt_private.h 2019-07-15 18:36:57 -0700 Kevin McCarthy (a2a2e885) * Add gossip header processing. M autocrypt/autocrypt.c M autocrypt/autocrypt.h M autocrypt/autocrypt_db.c M autocrypt/autocrypt_private.h M commands.c M mutt.h M muttlib.c M parse.c 2019-07-14 18:59:28 -0700 Kevin McCarthy (f0946c86) * Convert to use sqllite3_prepare_v3(). The documentation suggests the SQLITE_PREPARE_PERSISTENT flag is helpful for long-lived prepared statements, and Mutt is using. M autocrypt/autocrypt_db.c 2019-07-11 18:45:45 -0700 Kevin McCarthy (c7d4b019) * Process autocrypt headers. Create/update peer database accounts and gpg keys based on the headers. M autocrypt/autocrypt.c M autocrypt/autocrypt.h M autocrypt/autocrypt_db.c M autocrypt/autocrypt_gpgme.c M autocrypt/autocrypt_private.h M mutt.h M parse.c M protos.h 2019-07-11 18:06:56 -0700 Kevin McCarthy (7fd50ddd) * Add autocrypt header parsing to mutt_parse_rfc822_line(). Convert parse_parameters() for autocrypt header usage: * change to use a BUFFER to accomodate large autocrypt keydata attribute values. * Autocrypt header parameters are not rfc2231 compliant. Rather than rolling another very similar function, just change the existing one to allow space separation. M mutt.h M muttlib.c M parse.c M protos.h 2019-07-08 20:58:32 -0700 Kevin McCarthy (f92049e9) * Add initial autocrypt account setup. Generate gpg key and add account record to the database. M autocrypt/autocrypt.c M autocrypt/autocrypt.h M autocrypt/autocrypt_db.c M autocrypt/autocrypt_gpgme.c M autocrypt/autocrypt_private.h M main.c 2019-07-08 15:23:44 -0700 Kevin McCarthy (4586444c) * Factor out mutt_edit_address() in send.c. For reuse by autocrypt for address prompts. M protos.h M send.c 2019-07-07 14:37:52 -0700 Kevin McCarthy (715a50a8) * Start autocrypt gpgme. Add a basic init function. Bump up the required gpgme version to 1.8.0 if autocrypt is enabled. M autocrypt/Makefile.am M autocrypt/autocrypt.c A autocrypt/autocrypt_gpgme.c M autocrypt/autocrypt_private.h M configure.ac 2019-07-06 14:01:13 -0700 Kevin McCarthy (be89dc7b) * Add database and schema initialization. Add mutt_mkdir() library function supporting recursive mkdir. M autocrypt/Makefile.am M autocrypt/autocrypt.c M autocrypt/autocrypt.h A autocrypt/autocrypt_db.c A autocrypt/autocrypt_private.h A autocrypt/autocrypt_schema.c M lib.c M lib.h M main.c 2019-07-06 11:35:22 -0700 Kevin McCarthy (e9668902) * Add autocrypt config vars. M doc/makedoc-defs.h M globals.h M init.h M mutt.h 2019-07-03 19:51:09 -0700 Kevin McCarthy (1fe2980d) * Initial autoconf and makefile setup for autocrypt. M .gitignore M Makefile.am A autocrypt/Makefile.am A autocrypt/autocrypt.c A autocrypt/autocrypt.h M check_sec.sh M configure.ac M main.c 2019-07-28 10:13:22 -0700 Kevin McCarthy (6f1e5196) * Add a comment to the OPTIGNOREMACROEVENTS km_dokey() change. The option was added in commit 53900afa, and its actual purpose was to separate out an "unget" event buffer from the "macro" buffer, to solve a problem with certificate prompts. The safest approach in a low-level function like km_dokey() was to return an error if new macros were generated when the option is set. However, this results in an unbuffered username/password prompt being aborted. Currently the only users of unbuffered input are the SSL certificate prompts, which use menu->dialog mode (and thus mutt_getch() directly) and username/password prompts. So the only affected cases are editor-menu prompts, and returning the pressed keys is likely less surprising than aborting the prompt. If other unbuffered menus are created in the future, we may want to add a check for which menu mode is being used. M keymap.c 2019-07-26 13:54:12 +0200 Oneric (a173719c) * Change OPTIGNOREMACROEVENTS to actuallly ignore macros instead of throwing errors on macros M keymap.c 2019-07-25 18:23:38 -0700 Kevin McCarthy (6d4107c8) * Merge branch 'stable' 2019-07-05 08:44:21 -0700 Andrew Marks (53d5550b) * Added * option to unattachments command The * option clears all previous attachments settings. A list_free_generic method is added to muttlib to enable generic freeing of specific LIST structures. free_attachments_data is used with list_free_generic to clear four LISTs which manage allowed and excluded inline and attached "attachments" refs #1 M doc/manual.xml.head M init.c M mutt.h M muttlib.c 2019-07-18 16:16:15 -0400 Drew DeVault (70d879c4) * Add builds.sr.ht CI manifests For Alpine Linux (musl libc), Debian (glibc), and FreeBSD. A .builds/alpine.yml A .builds/debian.yml A .builds/freebsd.yml 2019-07-18 13:44:19 -0700 Kevin McCarthy (ba7116d4) * Fix a reference to HeaderCachePageSize. Commit 4c728278 converted the config far to type DT_LNUM, but embarrassingly I missed a usage. M hcache.c 2019-07-13 21:49:05 -0400 Daniel Kahn Gillmor (82973a6e) * Omit User-Agent: header by default The User-Agent: header can be fun and interesting and useful for debugging, but it also leaks quite a bit of information about the user and their software stack. This represents a potential security risk (attackers can target the particular stack) and also an anonymity risk (a user trying to preserve their anonymity by sending mail from a non-associated account might reveal quite a lot of information if their choice of mail user agent is exposed). Users who want to configure `user_agent` to `yes` can still do so, but it makes sense to have safer defaults. Closes: #159 M init.h 2019-06-28 13:00:57 -0700 Kevin McCarthy (7f8642d4) * Merge branch 'stable' 2019-06-27 15:35:12 -0700 Kevin McCarthy (8768e10f) * Remove unnecessary "" checks for DT_STR and DT_PATH MuttVars. MuttVars of those types are set via safe_strdup(), which returns NULL if the original is "". Thus Var implies *Var. A good portion of the code relies on that axiom, but over the years some (Var && *Var) checks have crept in, including from me. This was partially because of the INITVAL("") that were in the code, which implied (incorrectly) the initial value could be "". Commit 2f91d43e removed those to make it more clear. This commit removes the *Var checks to make it even clearer, and help avoid them creeping back in again. M alias.c M bcache.c M charset.c M commands.c M compose.c M crypt-gpgme.c M crypt.c M curs_main.c M handler.c M hcache.c M hook.c M imap/auth.c M imap/auth_oauth.c M init.c M mutt_socket.c M muttlib.c M parse.c M pgpinvoke.c M pop_auth.c M rfc1524.c M rfc2047.c M rfc2231.c M send.c M sendlib.c M smime.c M smtp.c 2019-06-27 11:06:19 -0700 Kevin McCarthy (4c728278) * Convert $header_cache_pagesize to type DT_LNUM. Prior to commit 4bc76c2f there was no LNUM type, and so the workaround was to store it as a string, converting in the hcache_open_gdbm() call. This will not affect the user interface or config file, because DT_NUM and DT_LNUM read in a string from the config file and convert to a number. Quotes are used for escaping style, not passed through to the variable setter. So essentially this simply moves the conversion to parse_set(), and provides feedback for a non-numeric type immediately. M globals.h M hcache.c M init.h 2019-06-25 14:25:33 -0700 Kevin McCarthy (793e0fc2) * Convert Commands to use the union pointer_long_t too. As with MuttVars, Commands was using an unsigned long to hold pointers as well as enums. Convert to use the same union type of MuttVars. Adjust command functions data parameter type to the union. Since these are used outside init.c, relocate the union definition to mutt.h. Although the number of functions affected was long, most of them did not need much adjustment. Many of them made no use of the parameter. Those that did were easily cast into an added "data" variable at the top. M buffy.c M color.c M hook.c M init.c M init.h M keymap.c M mutt.h M protos.h M score.c 2019-06-24 19:41:30 -0700 Kevin McCarthy (0d53c86e) * Fix the makedoc program to cope with the new MuttVars format. Add '=' to token delimiter, to make the parsing more robust if someone decides to add spaces between a designator and value. M doc/makedoc.c 2019-06-24 18:07:54 -0700 Kevin McCarthy (5bf53035) * Convert MuttVars.data and .init to use a union type. They were using an "unsigned long" and casting to a pointer when needed. Obviously this has "worked" for a long time, but it's not correct to assume a pointer can fit in unsigned long. Replace with a union contain "void *p" and "long l". Fortunately, the only parts making direct use of MuttVars are in init.h and init.c, so we just need to update those manipulation functions. In general I don't like single letter variables, but brevity is worth it in this case. M init.c M init.h 2019-06-23 02:05:43 +0200 Vincent Lefevre (6a74e24e) * Detail the documentation of %l for index_format. M init.h 2019-06-22 16:13:46 -0700 Kevin McCarthy (5e49cbf2) * Add NULL checks to rfc1524_free_entry(). The existing code was fine, but make it robust like other free functions in mutt, so the behavior isn't surprising. M attach.c M rfc1524.c 2019-06-22 16:01:19 -0700 Kevin McCarthy (aea4a689) * Clean up mutt_print_attachment() cleanup. Check if mutt_save_attachment() fails and abort the print in that case. M attach.c 2019-06-22 15:00:59 -0700 Kevin McCarthy (cf05da7b) * Merge branch 'stable' 2019-06-22 13:33:11 -0700 Kevin McCarthy (6b44b8e3) * Remove mutt_rfc1524_expand_filename() return value and checks. The return value was of dubious value. It returned 0 only for the case that a nametemplate was specified and it already matched the supplied oldfile. However, just because the nametemplate matched does not mean attachment handling in send-mode should skip the mutt_adv_mktemp() conversion, which includes a call to mutt_sanitize_filename(). We didn't do so if *no* nametemplate was supplied. Remove the return value from the function, and remove the checks and "special handing" in attach.c calls. M attach.c M rfc1524.c M rfc1524.h 2019-06-22 12:54:40 -0700 Kevin McCarthy (03f6a9cb) * Remove unnecessary strcmp for mutt_view_attachment(). mutt_rfc1524_expand_filename() runs the result through mutt_adv_mktemp(), which will sanitize and relocate the filename under $tmpdir. The strcmp() is unneeded and distracting to the program logic; none of the other routines perform or need this check. M attach.c 2019-06-22 12:39:50 -0700 Kevin McCarthy (a3d38b9e) * Merge branch 'stable' 2019-06-22 10:25:04 -0700 Kevin McCarthy (2f44aa05) * Merge branch 'stable' 2019-06-21 13:40:52 -0700 Kevin McCarthy (05d31caa) * Remove NULL and 0 INITVAL declarataions. The C standard says static storage duration variables will be initialized to NULL/0. M buffy.h M globals.h M lib.h M monitor.h 2019-06-21 13:36:09 -0700 Kevin McCarthy (6c01b284) * Combine DT_STR and DT_PATH in mutt_set_default(). 19 years ago, they briefly performed different things, but the mutt_pretty_mailbox() has been commented out since then. M init.c 2019-06-21 13:28:11 -0700 Kevin McCarthy (2f91d43e) * Remove UL "" initialization from init.h. mutt_init() calls mutt_set_default() followed by mutt_restore_default(). The mutt_restore_default() calls mutt_str_replace(), which translates "" into 0. Therefore assigning "" to the option->init field simply wastes space and (incorrectly) implies the option->data will be non-NULL by default. M init.h 2019-06-15 09:15:25 -0700 Kevin McCarthy (078654a4) * Merge branch 'stable' 2019-06-13 18:29:29 -0700 Kevin McCarthy (a621eaed) * Merge branch 'stable' 2019-06-13 17:58:56 -0700 Kevin McCarthy (ea3999ba) * Merge branch 'stable' 2019-06-10 14:51:50 -0700 Kevin McCarthy (ab457327) * Allow imap_cmd_finish() to both expunge and fetch new mail. Since commit dd327606 changed check_status setting to use bit operators, and imap_check_mailbox() can call imap_cmd_finish() twice, there is no reason to delay the processing of new mail until a second call. imap_read_headers() deals with msn_end < msg_begin, so remove the (count > idata->max_msn) check. This will allow the reopen flag to be reset if somehow it's not the case. M imap/command.c 2019-06-09 11:12:23 -0700 Kevin McCarthy (c64084e5) * Merge branch 'stable' 2019-06-07 14:20:02 -0700 Kevin McCarthy (77c2a92a) * Merge branch 'stable' 2019-06-06 16:22:18 -0700 Kevin McCarthy (a8f9368f) * Merge branch 'stable' 2019-06-06 13:48:23 -0700 Kevin McCarthy (151c5711) * Merge branch 'stable' 2019-06-04 15:47:57 -0700 Kevin McCarthy (16bbafe6) * Check for GNU Make to allow version.h FORCE target. If we're using GNU Make, the FORCE target allows automatically updating the version number after each commit. See commit 22c6df82 M Makefile.am M configure.ac 2019-06-05 14:28:20 -0700 Kevin McCarthy (cf94a879) * Merge branch 'stable' 2019-06-03 19:08:21 -0700 Kevin McCarthy (9bacbaa9) * Change --disable-doc to only skip manual generation. Instead of skipping the entire doc directory building, just skip the manual.html, manual.txt, and mutt.info generation. Generate and install the other files in the doc directory, which don't have the same involved dependencies as the DocBook generated files. M Makefile.am M doc/Makefile.am 2019-05-31 09:41:53 -0700 Kevin McCarthy (84124dd3) * Merge branch 'stable' 2019-05-30 09:29:35 -0700 Kevin McCarthy (ee0aebab) * Merge branch 'stable' 2019-05-28 09:38:38 -0700 Kevin McCarthy (79dd54c4) * Remove EXTRACT_MACROS check from EXTRACT_NUMBER in regex. Commit 367b1135 converted EXTRACT_NUMBER to always call a function, to enable the use of parameter types and local variables. In doing this it removed the separate DEBUG implementation. The EXTRACT_MACROS check was accidentally left in, but no longer makes sense outside of the DEBUG. M regex.c 2019-05-27 19:45:58 -0700 Kevin McCarthy (b4b47e1c) * Rename --with-regex to --with-bundled-regex. This makes the configuration option purpose clearer. Previously, some distros enabled the option thinking it turned on a "regex" option that should be enabled. Closes #89. M configure.ac 2019-05-27 19:36:34 -0700 Kevin McCarthy (367b1135) * Remove undefined left-shift on negative value from regex.c. Replace with a bitwise-or of the byte 1, byte 22, and a mask to extend the sign bit. Change the dest parameter type to unsigned int just to make sure the compiler doesn't do anything tricky or get offended somehow. See #89. M regex.c 2019-05-26 16:03:40 -0700 Kevin McCarthy (cd30526c) * Change mutt_addr_is_user() to no for a NULL address. See ticket #140. The behavior is generating a false 'F' flag for a spam message with an unparsable From address. After reviewing the callers, I can't see a reason returning 'yes' in this case. Commit 690c2945 fixed a potential segv issue, but the other callers seem robust against this change in behavior. M alias.c 2019-05-26 14:34:42 -0700 Kevin McCarthy (c186d379) * Turn on $ssl_force_tls by default. Ticket #135 suggests that these days, it's better to force encryption over all connections. RFC8314 is recommending MUA's move in that direction (actually even directing towards implicit TLS over STARTTLS). I'm enabling this at the beginning of the 1.13 development cycle to give others time to chime in with any objections. Personally, I've had this option set myself for years. The only place it could become an issue is for a localhost IMAP server with no cert. In that case, it's easy enough to have an account hook unset if needed, and I think a better idea that the user be forced to turn it off. M init.h 2019-05-26 18:52:47 +0200 Sebastian Stark (035bd727) * make OP_HALF_{UP,DOWN} behave symmetric. - the calculation of number of lines to scroll up/down should not depend on whether the number of rows in the pager/index/terminal is odd or even. - this patch will make the behaviour symmetric such that in both cases (even/odd number of rows) scrolling up and down by half a page (or the other way round) will get you back to the exact same line as before. M pager.c 2019-09-21 12:27:57 -0700 Kevin McCarthy (6931c1ad) * Update UPDATING file for 1.12.2 release. M UPDATING 2019-09-09 18:32:59 -0700 Kevin McCarthy (c65c12be) * Fix mutt_write_mime_body() application/pgp-encrypted handling. It would blindly overwrite any attachment with that type, as if it were the version label part of a multipart/encrypted message. However attachments with extenstion .gpg are labeled that type if $mime_type_query_command is set to "xdg-mime query filetype". This would cause the attachment to be overwritten too. Add a check for a missing body->filename, which should only be the case for the manually constructed part. M sendlib.c 2019-09-01 16:58:46 +0200 Gero Treuner (472324f8) * add fallback for inotify_init1 M configure.ac M monitor.c M monitor.h 2019-08-28 14:41:26 -0700 Kevin McCarthy (4c2f7c70) * Fix inotify configure test. AC_CHECK_FUNCS executes "action-if-found" or "action-if-not-found" for each function in the list. If a system has some but not all of the functions, both will end up being executed. This caused a build failure on an older system with exactly that situation. Change to only define USE_INOTIFY if all functions exist. M configure.ac 2019-07-25 18:18:08 -0700 Kevin McCarthy (588f8d69) * Fix accidental fall-through for if aborted. If was aborted, it was falling through to the function. This problem was introduced 19 years when the case was moved below . Previously it fell through to the default case which beeped. M enter.c 2019-06-28 12:57:24 -0700 Kevin McCarthy (f3ec740d) * Don't read or save history if $history_file isn't set. M history.c 2019-06-22 14:57:36 -0700 Kevin McCarthy (840b813f) * Make sure mailcap test %s is sanitized. It's not clear to me if %s is allowed as part of a test field. However since we are passing the attachment filename, we should sanitize it first. M rfc1524.c 2019-06-22 12:35:58 -0700 Kevin McCarthy (a99a75b7) * Fix compose and edit attachment symlink failure code. In the case where safe_symlink() fail, mutt prompts to continue, but did not properly reset the filename to be operated on. Fix up mutt_view_attachment() to use the same flow as the others, to allow for easier comparison. M attach.c 2019-06-22 10:09:02 -0700 Kevin McCarthy (2fd320a8) * Fix send-mode printing when expand_filename() returns 1. It will return this when a nametemplate entry already matched the passed in filename. So this bug required both a print entry and an already matching nametemplate entry to trigger. M attach.c 2019-06-15 09:12:15 -0700 Kevin McCarthy (38e7c257) * automatic post-release commit for mutt-1.12.1 M ChangeLog M VERSION 2019-06-15 09:02:36 -0700 Kevin McCarthy (e299de25) * Update UPDATING file for 1.12.1 release. M UPDATING 2019-06-11 13:15:22 -0700 Kevin McCarthy (dc662474) * Add $fcc_before_send, defaulting unset. When set, the message will be Fcc'ed the same as sent. $fcc_clear and $fcc_attach will be ignored. This is because of the difficulty of unwinding changes, notably Protected Headers, without potentially breaking signatures. M doc/manual.xml.head M init.h M mutt.h M send.c 2019-06-13 17:56:38 -0700 Kevin McCarthy (81fb9dd8) * Improve $reverse_realname documentation. Make it clear that, even if set, a missing realname part of the matching address will be filled in by $realname. M init.h 2019-06-09 11:07:16 -0700 Kevin McCarthy (0727d324) * Mention sources for ~p and ~P patterns. The manual only mentioned alternates. Add $from and local account/hostname to the list. The man page implied the only source was alternates. Change to the same wording as the manual. Thanks to @rear1019 for pointing out the misleading man page. M doc/manual.xml.head M doc/muttrc.man.head 2019-06-07 13:43:36 -0700 Kevin McCarthy (6f5e6bbb) * Improve imap_append_message() error message handling. If the rc is IMAP_CMD_BAD, then either idata->buf is stale or an error message has already been printed (in cmd_handle_untagged()). Use imap_next_word() to skip over the next two words instead of directly skipping over SEQLEN, in case the buffer is in a different format. We don't want to jump over the end of string. Skip the mutt_error() if there is nothing to print. M imap/message.c 2019-06-06 16:03:42 -0700 Kevin McCarthy (dd327606) * Enable the idata->check_status using bit operations. Commit e3f66d7e fixed dropped new mail notications, removing the unsetting of idata->reopen IMAP_NEWMAIL_PENDING in imap_cmd_finish() when an EXPUNGE was processed. However, imap_cmd_finish() can be called twice by imap_check_mailbox(). First as part of the imap_exec(), and manually again just below. Now that the IMAP_NEWMAIL_PENDING still exists, a second call could overwrite idata->check_status if both reopen flags were set. This unfortunately affects update_index(), which behaves differently for MUTT_REOPENED. I need to change the return value of mx_check_mailbox() in master to preserve all the bits, so the index can both notify of new mail and update_index() properly. For stable, the best fix is to use bit operators to enable the check_status flags in imap_cmd_finish() (and cmd_parse_fetch for flags), and keep the imap_check_mailbox() priority of setting its return value (it prioritizes IMAP_EXCHANGE_PENDING). M imap/command.c 2019-06-06 13:38:03 -0700 Kevin McCarthy (4d95b2cf) * Improve robustness of imap_append_message(). First, check the imap_cmd_step() return value instead of looking at idata->buf for "OK". If the connection bombed and imap_cmd_step() returned IMAP_CMD_BAD, the value of idata->buf is stale. If the server returned "+ OK" for the command continuation request response, the call to imap_code(idata->buf) would even end up returning true, despite that the append failed! (See #110, although at the time of commit I can only hypothesize this is what is happening.) Second, check the status of the writes. flush_buffer() was not passing the rc from mutt_socket_write_n(), which was further making the above disaster scenerio possible. M imap/message.c 2019-06-05 14:04:55 -0700 Kevin McCarthy (e3f66d7e) * Fix dropped new mail notifications when an EXPUNGE_PENDING is set. Prior to the fetch_headers rework and introduction of idata->max_msn (starting around e0376c75), cmd_handle_untagged() was looking directly at ctx->msgcount, which isn't fixed up until imap_expunge_mailbox(). At that time, more care had to be taken inbetween handling the EXPUNGE message and the actual expunge of the mailbox because of the discrepency between server state and mailbox context state. idata->max_msn is now decremented during the processing of EXPUNGE and VANISHED notices from the server, so reflect "current" state. So, when we receive an EXISTS notice, we no longer need the checks for expunge state and can always set the NEWMAIL_PENDING flag. Additionally, fix imap_cmd_finish() to retain the IMAP_NEWMAIL_PENDING flag after handling an expunge. The expunge does not grab new messages so dropping the flag would cause mutt to forget the new mail status until another EXISTS command. Since this is a stable branch fix, I'm leaving the either/or processing of expunge versus new mail in imap_cmd_finish(). However, I don't see why this has to be done in two calls. I may rework that in master to process an expunge and then the new mail one after the other. M imap/command.c 2019-05-31 09:37:38 -0700 Kevin McCarthy (22c6df82) * Remove FORCE prerequisite on version.h. This is causing package build issues on OpenBSD because of a difference in make behavior. In GNU make, it always invoke the 'version.h' target, but then checks to see if version.h changed before retriggering targets with that prerequisite. On OpenBSD, invoking the version.h target always retriggers targets with that prerequisite. This means that updating the version information now requires a 'make clean' or manual removal of version.h. M Makefile.am 2019-05-30 09:27:15 -0700 Kevin McCarthy (dd1601a1) * Minor documentation correction. M doc/manual.xml.head 2019-05-25 14:26:08 -0700 Kevin McCarthy (8ae8394f) * Disable state messages for attachments when forwarding. First, option(OPTVIEWATTACH) is only set for (s->flags & DISPLAY), so that check can be ignored. With that removed, all this is doing is printing [-- This is an attachment ...] with no context in the middle of non-display rendering for the case $honor_disposition is set with a handler. This makes no sense and I believe is a logic error. Perhaps this never took effect, but with $forward_attachments it now affects forwarding in that case. M handler.c 2019-05-25 13:12:04 -0700 Kevin McCarthy (b00a06e5) * Have $forward_attachments look at attachment disposition. If $honor_disposition is set, an "attachment" disposition decodable attachment won't be included in the body, so we want it to be added as an attachment to the forwarded email. M send.c 2019-05-25 09:18:22 -0700 Kevin McCarthy (ee9983f0) * automatic post-release commit for mutt-1.12.0 M ChangeLog M VERSION M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2019-05-25 09:08:33 -0700 Kevin McCarthy (7d8db3e2) * Set UPDATING file release date for 1.12.0. M UPDATING 2019-05-20 12:32:37 -0700 Kevin McCarthy (8f739fbe) * Make mutt.texi and mutt.info generation continue on failure. Add warning messages, noting the appropriate packages to install. Note: mutt.texi won't normally be built unless configure finds one of the possible expected conversion program names. Unfortunately, the canonical name, "docbook2texi", is used by both the docbook2x and docbook-utils projects. So on Arch, the canonical name is what we need, while on Debian and Red Hat/Fedora it isn't. We search for the alternative names first, but it's still possible to invoke the wrong program if the needed package is not installed. M doc/Makefile.am 2019-05-20 06:59:18 -0700 TAKAHASHI Tamotsu (be42d1a0) * Updated Japanese translation. M po/ja.po 2019-05-19 14:40:08 -0700 Kevin McCarthy (0e78280a) * Adjust docbook2texi program search. Look for db2x_docbook2texi first, because Fedora/Red Hat has their own version of "docbook2texi": db2x_docbook2texi. I'm not sure what to do if they have don't have that installed but have docbook2texi installed, since this is a terrible name collision. Thanks to Moritz Barsnick for pointing out the different binary (and package) names on Fedora. M configure.ac 2019-05-19 10:14:09 -0700 Kevin McCarthy (7bef99de) * Update gpgme and gpg-error automake checks. Pull updated autoconf files from the GPGME 1.13.0 release and use those new macros. Add a call to AM_PATH_GPG_ERROR() and include $(GPG_ERROR_LIBS) in the libraries. Thanks to Eike Rathke for finding the build problem, and for his patch fixing the issue. I opted for just grabbing the newest autoconf files from gpgme instead, but his fixed worked great too. M Makefile.am M configure.ac A m4/gpg-error.m4 M m4/gpgme.m4 2019-05-15 09:09:25 -0700 Ivan Vilata i Balaguer (cc8a201f) * Updated Catalan translation. M po/ca.po 2019-05-15 13:05:09 +0200 Vincent Lefevre (3b6f6b82) * Avoid undefined behavior on huge integer in a RFC 2231 header. The atoi() function was called on the index, which can potentially be huge in an invalid message and can yield undefined behavior. The mutt_atoi() function is now used for error detection. M rfc2231.c 2019-05-14 09:26:38 -0700 Kevin McCarthy (e8d057a9) * Add a "backticks in double quotes" example to the manual. M doc/manual.xml.head 2019-05-14 09:00:46 -0700 Kevin McCarthy (14bc2fc0) * Fix sample muttrc to use better quoting practices. Use single quotes in the password encryption example. For password decryption, put the backquotes inside double quotes to avoid special characters being re-interpreted. M contrib/sample.muttrc-starter 2019-05-13 12:53:58 +0200 Vincent Lefevre (79563636) * fr.po: updated Project-Id-Version for the 1.12 release M po/fr.po 2019-05-12 13:59:16 -0700 Petr Pisar (f3eb92f0) * Updated Czech translation. M po/cs.po 2019-05-11 06:45:10 -0700 lilydjwg (74447017) * Updated Simplified Chinese translation. M po/zh_CN.po 2019-05-10 13:18:46 -0700 Morten Bo Johansen (831ea9c5) * Updated Danish translation. M po/da.po 2019-05-10 11:09:45 -0700 Vsevolod Volkov (7e713495) * Updated Russian translation M po/ru.po 2019-05-10 11:07:41 -0700 Vsevolod Volkov (33eeaeec) * Updated Ukrainian translation M po/uk.po 2019-05-10 14:03:48 +0000 Olaf Hering (ce6e1db0) * Update de.po Unwrap lines, because it is 2019. Signed-off-by: Olaf Hering M po/de.po 2019-05-09 19:21:34 -0700 Kevin McCarthy (690c2945) * Check for NULL addresses in mutt_addrcmp(). While looking into ticket #140, I noticed default_to() could pass a NULL env->from to mutt_addrcmp() if $reply_self is set and there is a reply_to address. M send.c 2019-05-09 13:48:44 -0700 Kevin McCarthy (f5687827) * Add note about %r for the pgp_list_*_command vars. In this case %r is the list of search strings. M init.h 2019-05-09 13:25:25 -0700 Kevin McCarthy (471fc11a) * Change sample muttrc path to match other manual references. The other parts of the manual refer to /usr/local/share/doc in their examples. For consistency, change the starter muttrc and manual entry to do the same. In the future, we may wish to have a config variable instead, so users don't have to worry about system vs locally installed paths when sourcing the gpg.rc, for instance. M contrib/sample.muttrc-starter M doc/manual.xml.head 2019-05-08 19:28:21 -0700 Kevin McCarthy (80eac184) * Add sample starter muttrc to contrib. Add a mini-section with a link to the manual instead, under "Configuration". M contrib/Makefile.am A contrib/sample.muttrc-starter M doc/manual.xml.head 2019-05-07 15:59:40 -0700 Kevin McCarthy (988e06b2) * Fix typo in manual. M doc/manual.xml.head 2019-05-06 15:35:38 -0700 Kevin McCarthy (089d7cee) * Add a quick-starter config section to the manual. M doc/manual.xml.head 2019-05-06 12:37:04 -0700 Kevin McCarthy (2f8bc797) * Add a test for NULL parameter attribute too. Just to be sure we don't have any issues with the new continuation code. The mutt_set_parameter() code doesn't actively prevent a null attribute. M sendlib.c 2019-05-05 13:26:59 -0700 Kevin McCarthy (a9cbf67c) * Add a manual section on OpenPGP and S/MIME configuration. Talk about the required config variables, GPGME and classic mode, agents, pinentry programs, and smime_keys. M doc/manual.xml.head 2019-05-02 12:31:29 -0700 Kevin McCarthy (6898c083) * Write rfc2231 parameter continuations for long parameters. Previously, Mutt would truncate long attachment filenames, to avoid writing an illegal length header line. This commit is a followup to 4dcb3ba1, where I reverted an incorrect fix for the problem. rfc2231_encode_string() now returns a list of continuations, with encoding and continuation number suffixes already appended to the attribute. The function tries to keep the line length less than 78 characters, but the code is a bit imprecise as a trade off for simplicity and readability. Modify mutt_write_mime_header() to loop through the continuations. M rfc2231.c M rfc2231.h M sendlib.c 2019-05-02 15:44:16 +0200 Vincent Lefevre (861a7e47) * Missing word in UPDATING file. M UPDATING 2019-05-01 15:23:04 -0700 Kevin McCarthy (629e6e36) * Minor UPDATING file fix. M UPDATING 2019-05-01 06:52:37 -0700 Kevin McCarthy (01f1832f) * UPDATING file cleanups. Second quick pass. M UPDATING 2019-04-30 20:04:12 -0700 Kevin McCarthy (aa2985a3) * Update UPDATING file. This is a first pass to get something out quickly to testers. M UPDATING 2019-04-29 13:03:44 +0200 Vincent Lefevre (98b3493a) * Updated French translation. M po/fr.po 2019-04-29 12:49:22 +0200 Vincent Lefevre (c8eeb0d9) * Corrected minor errors in text related to $forward_attachments. M doc/manual.xml.head M send.c 2019-04-28 15:48:33 -0700 Kevin McCarthy (92d7c484) * Fix mailbox search to not recompile for a repeated search. The LastSearchExpn was being compared, but was never set to the expanded search value. This was causing the search to be recompiled even if it were for the same previous expanded search string. M pattern.c 2019-04-28 14:59:13 -0700 Kevin McCarthy (9008e23b) * Note the other parts of generated message-ids in the manual. M doc/manual.xml.head 2019-04-25 19:41:04 -0700 Kevin McCarthy (24965a7d) * Add $forward_attachments quadoption for inline-forward mode. When set or answered yes, non text-decodable parts will be attached to the new message. The default value is "ask-yes", because I believe this is something people will want to use, and should be made aware of the new possible behavior. The option presents a nice middle ground between previous inline-forwarding behavior (where all the non-text parts were dropped), and $mime_forward where the entire email was included as an attachment. This was previously difficult to achieve, but after the recv-attachment refactoring: (a19e5266^..faabd621) it became possible to use the ATTACH_CONTEXT and the recvattach.c helper mutt_generate_recvattach_list() to properly deal with nesting and multiple file-handles. M attach.h M doc/manual.xml.head M init.h M mutt.h M recvattach.c M send.c 2019-04-25 09:26:43 -0700 Kevin McCarthy (f706c235) * Add note about IMAP browser and trailing delimiters. This is the same behavior as the regular browser, but I think still deserves a quick mention. Thanks to Charles for pointing out this section of the manual and suggesting the addition. M doc/manual.xml.head 2019-04-23 19:06:11 -0700 Kevin McCarthy (6e90579f) * Add RECURSIVEMATCH LIST-EXTENDED selection option to query. LSUB is required to include mailboxes with subscribed children, but the just added "LIST (SUBSCRIBED)" by default does not do that. To match previous behavior, add RECURSIVEMATCH to make sure the children are included. Fix the parser to trim off the CHILDINFO suffix in the response. Parse \NonExistent LIST attribute the same as \NoSelect. M imap/browse.c M imap/command.c 2019-04-23 22:15:31 +0100 Jeremy Sowden (e1bc4339) * Enable the use of toggle-write from the pager. Signed-off-by: Jeremy Sowden M curs_main.c M functions.h 2019-04-24 03:04:05 +1000 Naveen Nathan (82b759e8) * Improve hierarchy information accuracy in IMAP browser Currently the IMAP browser relies on LIST and LSUB (for listing subscribed folders) which may not provide the required hierarchy information. RFC3348 section 3 goes as far as stating that a client mustn't rely on LSUB for hierarchy information. This patch implements the LIST command extensions specified in RFC5258 requiring that a server must respond with hierarchy information for listed folders (whether or not filtering on subscribed folders). M imap/browse.c M imap/command.c M imap/imap_private.h 2018-08-19 09:25:53 -0700 Kevin McCarthy (ba55d5df) * Add $imap_fetch_chunk_size to allow FETCHing new headers in chunks. For extremely large mailboxes, some implementations will time out just while fetching the new headers, because the client doesn't send any commands for 30 minutes while downloading the large number of headers. Rewrite imap_fetch_msn_seqset() to return chunks of size $imap_fetch_chunk_size. The change requires trusting the server will follow the RFC and not send an EXPUNGE during or between the FETCH chunks; otherwise we'll miss MSNs between the chunks because the shift. We could in theory continue to set "msn_begin = idata->max_msn + 1", but that makes the assumption there are no holes in the header cache that we are filling in during a chunk. Personally I am dubious about "header cache holes", but the IMAP code has explicitly mentioned and handled them since prior to my involvement. Since the RFC forbids the interleaving EXPUNGE I believe it's safe enough to set "msn_begin = fetch_msn_end + 1" until proven otherwise. M globals.h M imap/message.c M init.h 2019-04-22 11:02:28 -0700 Kevin McCarthy (905c1fff) * Add note about $mailcap_path generation to the documentation. M init.h 2019-04-21 20:05:13 -0700 Kevin McCarthy (6975aad8) * Convert mutt_parse_adrlist() to use BUFFER for simple parsing. M parse.c 2019-04-21 19:45:49 -0700 Kevin McCarthy (caeed0c5) * Change mutt_parse_mailboxes() to use the path BUFFER argument. Instead of copying to a buf[] variable, since the various utility methods are now available to BUFFER too. M buffy.c 2019-04-18 16:30:38 +0100 Julian Gilbey (9351dd01) * Handle the same secret key appearing in multiple public keyrings Allow for S/MIME keys and the possibility of missing subkeys M crypt-gpgme.c 2019-04-21 11:00:23 -0700 Kevin McCarthy (9da6bde1) * Fix unistring library configure test. The "action-if-found" argument of AC_SEARCH_LIBS is run even if the result is "none required" (i.e. the test function is already in LIBS, in this case -lidn2). This was causing "-lunistring" to be appended on a system without the library installed, generating a build error. Fix the test to not append the library for the "none required" case. Thanks to Fabrice Fontaine for reporting this issue and helping me test the fix. M configure.ac 2019-04-20 15:43:59 -0700 Kevin McCarthy (4dcb3ba1) * Revert "Fix truncation of long filenames in attachments." This reverts commit f476d0aecd6f88db5291427fced21a8e834ca181. The commit allowed the generation of illegal length header lines. A correct fix needs to implement parameter continuations. I will work on that, but in case I don't get it in before 1.12, preserve the hard truncation. M sendlib.c 2019-04-20 13:00:28 -0700 Kevin McCarthy (9865e90e) * Convert remailer to use BUFFER for Mixmaster invocation. M remailer.c 2019-04-20 12:34:35 -0700 Kevin McCarthy (20bedeac) * Convert compress to use mutt_buffer_quote_filename(). Because the compress expandos operate differently than the rest of mutt, requiring manual outer quoting, add a parameter to the function to toggle outer quoting off. Remove the now unused escape_path() function. M compress.c M muttlib.c M protos.h 2019-04-20 11:11:07 -0700 Kevin McCarthy (bc776fad) * Update po headers. Add missing Language header. Make the Project-Id-Version header consistent. M po/bg.po M po/ca.po M po/cs.po M po/de.po M po/el.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/ga.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2019-04-19 16:06:43 -0700 Kevin McCarthy (3eb82b30) * Increase mutt_pgpring path size to silence warning. This is an independent binary, and doesn't have access to the BUFFER functions. The binary is used by very few (if any) people at this point, so just make the minimum fix to silence the warning. M pgppubring.c 2019-04-19 15:04:43 -0700 Kevin McCarthy (44037a53) * Convert pager help string to use BUFFER. Remove the awkward string truncation warnings, and remove helpstr and tmphelp char arrays from the stack. Because the pager is fairly long lived, allocate the helpstr instead of using the pool. M pager.c 2019-04-19 14:25:05 -0700 Kevin McCarthy (14a68f8f) * Convert certficate prompts to use menu dialog helper and BUFFER. M mutt_ssl.c M mutt_ssl_gnutls.c 2019-04-19 13:14:54 -0700 Kevin McCarthy (04257603) * Add menu dialog helper to add rows. Remove the manual max calculation and dialog row allocation. Add a NONULL check because the helper uses safe_strdup() to add a row. M menu.c M mutt_menu.h 2019-04-18 18:42:57 -0700 Kevin McCarthy (16818f75) * Convert migrated lib.c functions to use BUFFER. Fix mutt_getcwd() to return NULL on failure. Change mutt_rmtree(), mutt_mkwrapdir(), safe_open(), and safe_symlink() to use BUFFER so they don't have filename length limitations. M muttlib.c M protos.h 2019-04-18 15:35:22 -0700 Kevin McCarthy (92a5f7bb) * Relocate lib.c functions to muttlib.c to enable BUFFER use. Relocate safe_symlink(), safe_open(), mutt_rmtree() and their dependent functions. This rearrangement is a bit awkward. Another approach for the future might be to convert lib.c into a muttlib.c aware file, and just copy the functions pgppubring.c uses inside itself. M lib.c M lib.h M muttlib.c M protos.h 2019-04-17 16:07:05 -0700 Kevin McCarthy (098272e0) * Increase prompt size to remove warning. M commands.c 2019-04-16 20:22:08 -0700 Kevin McCarthy (3c6bdc90) * Convert change folder operations to use BUFFER. Store the folder name inside a BUFFER and use the various BUFFER enhanced functions. M curs_main.c 2019-04-16 19:25:36 -0700 Kevin McCarthy (70ef4e9e) * Add mutt_buffer_enter_fname(). M curs_lib.c M protos.h 2019-04-16 18:11:35 -0700 Kevin McCarthy (940bdaa1) * Convert other users of BUFFY->pathbuf to use BUFFERS. A few functions in browser.c, buffy.c, and monitor.c were using BUFFY->pathbuf but were potentially truncating via fixed size buffers. Convert those to use BUFFERS too. buffy_get() was creating epath and expanding it, apparently to match against expanded BUFFY list entries, was wasn't using the epath. I believe this is a bug, and have switched the comparison to epath. M browser.c M buffy.c M monitor.c 2019-04-16 13:41:10 -0700 Kevin McCarthy (797d16a3) * Convert BUFFER->path to a BUFFER. Rename to BUFFER->pathbuf to make it clear the field is a BUFFER, and to make sure to catch and review all usages. There are still uses of pathbuf that are truncating and need to be fixed, for example in browser.c and buffy.c. Fix up sidebar usage in one place, that was pointing inside the BUFFY->path with a char *. At the same time, change their "short folder" computation to also use a BUFFER. M browser.c M buffy.c M buffy.h M imap/browse.c M imap/command.c M imap/imap.c M mh.c M sidebar.c 2019-04-16 12:23:42 -0700 Kevin McCarthy (6317a303) * Change BUFFY->realpath to be const char *. BUFFY->path is a fixed array (which will be converted to a BUFFER in the next commit). This is needed to call mutt_expand_path(). However, BUFFY->realpath has no such need, and so it is a bit wasteful (not to mention not big enough) to store as such. M buffy.c M buffy.h 2019-04-15 18:43:49 -0700 Kevin McCarthy (4084bda4) * Add a note about $prompt_after to the $pager documentation. M init.h 2019-04-14 15:38:15 -0700 Kevin McCarthy (e8c8d559) * Rename mutt_buffer_rfc1524_expand_command() Remove buffer prefix now that all callers are converted. M attach.c M handler.c M rfc1524.c M rfc1524.h 2019-04-14 13:34:37 -0700 Kevin McCarthy (d6e373b7) * Convert rfc1524_expand_command() implementation to use BUFFER. Add mutt_buffer_sanitize_filename() helper. Add a few end-of-buffer checks while iterating over command. Convert the parameter name, paramater value, and types to use BUFFER instead of fixed size strings. M muttlib.c M protos.h M rfc1524.c 2019-04-14 11:38:49 -0700 Kevin McCarthy (574395d2) * Convert last rfc1524_expand_command caller to use a BUFFER. M rfc1524.c 2019-04-14 10:46:36 -0700 Kevin McCarthy (205ac654) * Rename mutt_buffer_adv_mktemp(). Remove buffer prefix since all callers now use this version. M attach.c M muttlib.c M postpone.c M protos.h M rfc1524.c 2019-04-14 09:20:46 -0700 Kevin McCarthy (052b7c24) * Convert remaining mutt_adv_mktemp() calls to use buffer version. M muttlib.c M postpone.c 2019-04-14 10:22:12 +0200 Fabrice Fontaine (c53b3669) * configure.ac: fix static build with idn2 and unistring Commit 78db40f25c6479b14da5a73adf7207bfbec5ccc5 did not fix static build failure AC_SEARCH_LIBS prepends the library to LIBS as a result -lunistring is added before -lidn2. To fix static build, we must set -lunistring after -lidn2 Fixes: - http://autobuild.buildroot.org/results/c9544b4f1a0252e260a2ed19218fa950f4dc2d2d Signed-off-by: Fabrice Fontaine M configure.ac 2019-04-10 19:44:46 -0400 Aaron Schrab (a7e1572d) * Generate version string during make not configure Switch to generating the version string during make process rather than at configure time. This makes it easier to keep the detailed version string accurate when doing development which doesn't require that the configure script be rerun. M .gitignore M Makefile.am M commands.c M compose.c M configure.ac M dotlock.c M init.c M muttlib.c M sendlib.c M status.c 2019-04-09 18:54:20 -0700 Kevin McCarthy (03004467) * Rename to mutt_rfc1524_expand_filename(). Now that all callers pass a BUFFER, the buffer prefix is not needed to distinguish the parameter. M attach.c M handler.c M rfc1524.c M rfc1524.h 2019-04-09 17:52:14 -0700 Kevin McCarthy (47d318be) * Convert mutt_expand_fmt() and rfc1524_expand_filename() to BUFFER. These two functions were tied together and so are converted at the same time. Note that rfc1524_expand_filename() had an off-by-one error for the left hand size of the name template. It was only copying i-1 instead of the i characters before %s. M muttlib.c M pattern.c M protos.h M rfc1524.c M rfc1524.h 2019-04-09 15:20:51 -0700 Kevin McCarthy (44b89779) * Convert mutt_expand_file_fmt() to accept BUFFER dest parameter. mutt_expand_fmt() will be converted in the next commit, at the same time as rfc1524_expand_filename(). M curs_lib.c M muttlib.c M protos.h M query.c M sendlib.c 2019-04-09 14:04:36 -0700 Kevin McCarthy (78ff38d6) * Add mutt_buffer_quote_filename(). Convert almost all the callers to use the new function. alias.c usage is a bit involved, so leave that for now. Remove unneeded index while converting from mutt_quote_filename(). M muttlib.c M mx.c M pgpinvoke.c M protos.h M remailer.c M rfc1524.c M smime.c 2019-04-08 19:51:01 -0700 Kevin McCarthy (5d491c1b) * Convert mutt_check_simple() to accept a BUFFER parameter. M color.c M hook.c M pattern.c M protos.h 2019-04-08 09:51:34 -0700 Kevin McCarthy (8aad07e5) * Change autoview_handler() to use BUFFER. This will allow the full conversion of rfc1524_expand_filename(), and thereafter mutt_adv_mktemp() too. M handler.c 2019-04-08 10:01:16 -0700 Kevin McCarthy (b51cbf27) * Fix undeclared function warning for mutt_buffy(). Not sure why gcc didn't give me the warning, but add buffy.h to pager.c. status.c already includes mx.h (which includes buffy.h), but add it explicitly in any case. M pager.c M status.c 2019-04-07 18:49:07 -0700 Kevin McCarthy (46b4c0aa) * Change main() folder to be BUFFER. This affects the -f, -y, and -Z options directly. M main.c 2019-04-07 16:02:02 -0700 Kevin McCarthy (bcda4240) * Create mutt_buffer_buffy() buffer function. Relocate some of the buffy function declarations to buffy.h while adding the new declaration. M buffy.c M buffy.h M enter.c M protos.h 2019-04-07 15:56:07 -0700 Kevin McCarthy (a69a853f) * Fix mutt_buffer_select_file() macro to call correct function. M protos.h 2019-04-07 15:55:16 -0700 Kevin McCarthy (a2a6cad6) * Change mutt_folder_hook() parameter to const char *. M hook.c M protos.h 2019-04-03 14:07:14 -0700 Kevin McCarthy (74226f36) * Add a note about spam and the header cache in the manual. M doc/manual.xml.head 2019-04-02 12:43:55 -0700 Kevin McCarthy (270a0523) * Restore active flag in imap_fetch_message() on error. M imap/message.c 2019-04-02 10:58:34 -0700 Kevin McCarthy (f4e79297) * Remove h->active hack in imap_sync_message_for_copy(). Commit 285baf9a improved FLAGS parsing such that "spurious" FLAGS updates won't cause a mailbox reopen. Remove the h->active=0 hack because it isn't needed now and makes reasoning about deletes, purges, and message set generation more difficult. M imap/imap.c 2019-03-29 15:29:27 -0700 Kevin McCarthy (8fa442d6) * Merge branch 'stable' 2019-03-29 15:21:02 -0700 Kevin McCarthy (70805eef) * Change IMAP to try oauthbearer first. $imap_authenticators says if it is unset, the authenticators from most-secure to secure will be tried. It makes sense for oauthbearer to come first, like with POP. To make this change backwards compatible, it depends on the previous commit, which changed imap_auth_oauth() to return IMAP_AUTH_UNAVAIL if oauth is not configured or explictily requested. M imap/auth.c 2019-03-24 09:45:31 +0800 Kevin McCarthy (728f1fa8) * Fail oauth quietly if it was not configured. Don't report an error unless they explicitly put "oauthbearer" in the authenticator list or configured the oauth_refresh_command. M imap/auth_oauth.c M pop_auth.c 2019-03-21 18:42:38 +0800 Kevin McCarthy (aae3e555) * Fix typo in documentation. M doc/manual.xml.head 2019-03-21 18:35:34 +0800 Kevin McCarthy (912c06d6) * Add documentation on thread tree characters and config vars. M doc/manual.xml.head 2019-03-12 14:25:42 +0800 Kevin McCarthy (515287b9) * browser.c: Convert f parameter to BUFFER. M browser.c M protos.h 2019-03-12 13:56:51 +0800 Kevin McCarthy (011b108a) * browser.c: Convert other browser local variables to BUFFER. M browser.c M muttlib.c M protos.h 2019-03-12 13:26:37 +0800 Kevin McCarthy (7db1ad91) * browser.c: Convert buf to BUFFER. M browser.c 2019-03-12 12:46:56 +0800 Kevin McCarthy (e0622c4d) * browser.c: Convert prefix to BUFFER. M browser.c 2019-03-11 19:08:52 +0800 Kevin McCarthy (2af2e7be) * browser.c: Convert LastDir and LastDirBackup to BUFFER. Add a cleanup method call to main to free the BUFFERS. Add mutt_buffer_concat_path() buffer helper function. M browser.c M imap/browse.c M imap/imap.h M main.c M muttlib.c M protos.h 2019-03-11 17:38:58 +0800 Kevin McCarthy (3fab5d58) * Add mutt_getcwd(). M muttlib.c M protos.h 2019-03-11 17:38:18 +0800 Kevin McCarthy (72b2c327) * Add mutt_buffer_strcpy_n(). M buffer.c M buffer.h 2019-03-11 17:04:28 +0800 Kevin McCarthy (48cdde47) * Fixes to mutt_buffer_expand_path(). Create _mutt_buffer_expand_path() with the rx argument. Use mutt_b2s() instead of derefencing buffer->data in mutt_buffer_expand_path(). The p->data uses were safe, but the src->data was potentially not. M muttlib.c M protos.h 2019-03-13 13:47:18 +0800 Kevin McCarthy (2404d09e) * Merge branch 'stable' 2019-03-13 13:41:00 +0800 Kevin McCarthy (207b9306) * automatic post-release commit for mutt-1.11.4 M ChangeLog M UPDATING M VERSION 2019-03-13 12:39:13 +0800 Kevin McCarthy (66bdb753) * Merge branch 'stable' 2019-03-10 13:27:11 +0800 Kevin McCarthy (af3859f5) * Add mutt_buffer_expand_path(). TODO: '@' expansion using mutt_default_save() is still using a fixed size string parameter. Convert imap_expand_path() and mutt_rx_sanitize_string() to use BUFFERS instead. Add url_ciss_tobuffer(). M imap/imap.h M imap/util.c M muttlib.c M protos.h M url.c M url.h 2019-03-10 20:05:12 +0800 Kevin McCarthy (716c0222) * Fix imap_pretty_mailbox() call to url_ciss_tostring(). Pass the correct buffer size through, so the strfcpy added in the next commit doesn't write past the end of the buffer. M imap/imap.h M imap/util.c M muttlib.c 2019-03-10 13:35:26 +0800 Kevin McCarthy (d8d9c505) * Move mutt_rx_sanitize_string() to muttlib.c So it can be converted to use BUFFER. M lib.c M lib.h M muttlib.c M protos.h 2019-03-10 10:03:52 +0800 Kevin McCarthy (34f77eab) * Improve imap uid seqset hcache buffer usage. mutt_buffer_increase_size() terminates the buffer, so there is no need to explicitly check for an empty buffer after the imap_msn_index_to_uid_seqset() call. M imap/util.c 2019-03-10 09:58:07 +0800 Kevin McCarthy (5be5ad46) * Minor buffer handling code cleanup. Use mutt_buffer_len() and mutt_buffer_clear() to make the code a bit clearer. There are still places in the code that manipulate the buffers directly (pattern.c, for example), but that doesn't mean we shouldn't abstract the buffer where we can. Add comments in a couple places where unusual buffer manipulation is occurring. M base64.c M imap/command.c M imap/imap.c M imap/message.c M init.c M muttlib.c M parse.c 2019-03-09 19:12:19 +0800 Kevin McCarthy (e5483434) * Add "Message Composition Flow" section to manual. This provides a brief overview of the steps during message composition, and shows when the various hooks are executed. M doc/manual.xml.head 2019-03-09 15:03:00 +0800 Kevin McCarthy (6fe1f31e) * Expand a couple of the comments about charset. Make it clearer what BODY->charset is used for, and why we are checking for !noconv during mailcap charset parameter expansion. M mutt.h M rfc1524.c 2019-03-08 19:48:41 +0800 Kevin McCarthy (09d4f384) * Check noconv for mailcap %{charset} send mode expansion. Improve the previous commit by checking to make sure a->noconv also isn't set. If noconv is set, we ignore any value a->charset might have picked up during previous encoding checks. M rfc1524.c 2019-03-08 18:06:52 +0800 Kevin McCarthy (be790372) * Fix mailcap %{charset} expansion in send mode. Use the current charset of the file for the parameter, since the file hasn't been converted yet. M rfc1524.c 2019-03-04 15:05:50 +0800 Kevin McCarthy (2366e3d6) * Use gpgme recipient strings for encryption when available. For gpgme >= 1.11.0, use gpgme_op_encrypt_ext() and gpgme_op_encrypt_sign_ext() to specify recipients as a string. This allows '!' to specify forcing a subkey, as is the case in classic gpg and from the command line. Remove the '!' "force valid" usage for the newer version. M crypt-gpgme.c 2019-02-22 13:50:52 -0800 Kevin McCarthy (67bdfa31) * Add $include_encrypted config to prevent reply-decryption attack. @jensvoid, in cooperation with Ruhr-Uni Bochum and FH Münster, Germany, reported a possible "Oracle decryption" attack on various mail clients. An attacker could include previously encrypted contents they obtained access to, and include it in a message. Replying without trimming would include the decrypted contents. This attack relies on several "ifs", and is more dangerous for clients that compose HTML mail. However, it is still an issue that an unwary/busy Mutt user could fall for. Add a new config $include_encrytped, defaulting off, to reduce the possibility of the user being unaware of previously encrypted parts in the reply. Only the main initial encrypted part will be included in the reply. M handler.c M init.h M mutt.h 2019-02-23 12:12:36 -0800 Kevin McCarthy (128baa52) * Add additional search names for docbook texi conversion program. On Arch, it is called docbook2text M configure.ac M doc/Makefile.am 2019-02-21 16:37:05 +0300 Andrey Skvortsov (f476d0ae) * Fix truncation of long filenames in attachments. Currently mutt truncates long filenames in attachments and doesn't take into account UTF-8 character size. If filename is truncated in the middle of multi-byte UTF-8 character (last character is bad), then some mail clients assume whole attachment name bad and don't display its name (use 'Noname' instead). Filenames can be up to 255 *characters* long depending on used filesystem. ReiserFS, NFTS, FAT, APFS and some other supports up to 255 characters. In the worst case 255 characters in UTF-8 will take 255*4 = 1020 bytes. Every non-ascii byte in the filename will be encoded using 3 bytes (for example, %8D). So 'Content-Disposition' will take in the worst case up to: 1020*3 = 3060 bytes. Therefore even LONG_STRING (1024) isn't enough. M sendlib.c 2019-02-12 19:04:28 -0800 Kevin McCarthy (b404e7fb) * Check the base64 decoding retval in auth_gss. Abort if the value is not decodable. M imap/auth_gss.c 2019-02-12 16:41:07 -0800 Kevin McCarthy (3dd3eee4) * Change auth_gss to to use buffers and the buffer pool. Ticket #100 revealed that even a bufsize of 8192 isn't guaranteed to be big enough. Convert those large buffers to use the buffer pool instead. M imap/auth_gss.c 2019-02-12 15:58:13 -0800 Kevin McCarthy (7689f11d) * Add mutt_buffer helpers for base64 conversion. Add mutt_buffer_from_base64() mutt_buffer_to_base64() to help with transitioning to buffers. M base64.c M protos.h 2019-02-12 15:48:09 -0800 Kevin McCarthy (912e02a3) * Add mutt_buffer_len() helper. M buffer.c M buffer.h 2019-02-07 23:48:09 +0100 Vincent Lefevre (c483d3c3) * Updated French translation. M po/fr.po 2019-02-06 14:29:42 -0800 Kevin McCarthy (d97bbddf) * Create function. This function differs from only in that it preserves To recipients in the original email as To recipients in the reply. The merits of this function aren't without controversy; therefore it is left unbound by default. Those who care about such things are free to bind it. Combine reply operation handlers in the pager and curs_main, since the code was the same with the exception of the flags used. M OPS M curs_main.c M doc/manual.xml.head M functions.h M mutt.h M pager.c M recvattach.c M send.c 2019-02-06 13:58:42 +0100 Vincent Lefevre (d79cb6b7) * Updated French translation. M po/fr.po 2019-02-06 13:53:30 +0100 Vincent Lefevre (f03088ea) * corrected typo from dad0eb255fddbef5f14772b85b32acf6f2ca7996 M OPS 2019-02-02 15:35:34 -0800 Kevin McCarthy (140b7ae3) * Add an error message for . Don't allow the operation on a non-directory. Print a message indicating it's not a directory. M browser.c 2019-02-02 15:03:03 -0800 Kevin McCarthy (8a763976) * Separate out op variable in the browser. The i variable is used in several places and scopes as a temporary index variable, but is also used to record the current operation. Separate them out to make the code less confusing. M browser.c 2019-02-01 12:52:58 -0800 Kevin McCarthy (c66d021f) * Merge branch 'stable' 2019-01-31 17:57:57 -0600 Corey Minyard (dad0eb25) * Allow descending into maildir and mh directories in file browser Some (maybe most) IMAP mail systems allow folders to be nested inside folders, so you can have, say, an Inbox with more folders inside it. However, in the file browser, mutt will only open a maildir/mh directory as a mailbox, there is no way to get to the child mailboxes. This change adds a function that forces mutt to descend into the directory. It is unbound by default. Signed-off-by: Corey Minyard M OPS M browser.c M doc/manual.xml.head M functions.h 2019-01-24 18:51:55 -0800 Kevin McCarthy (f0be14c2) * Merge branch 'stable' 2019-01-24 15:19:36 -0800 Kevin McCarthy (bd7b8f0d) * Simplify nested smime handling in the attachment menu. Since changeset 2fd6f99b allows nested encryption handling, there is no need to deal with the nesting directly. Instead, just recursive as with other nested handling. M recvattach.c 2019-01-24 15:07:36 -0800 Kevin McCarthy (160d4503) * Merge branch 'stable' 2019-01-21 19:45:28 -0800 Kevin McCarthy (be40128c) * Merge branch 'stable' 2019-01-21 15:34:46 -0800 Kevin McCarthy (f4f9e5bb) * Merge branch 'stable' 2019-01-21 14:16:13 -0800 Kevin McCarthy (143ea851) * Remove mutt_socket_read(). It is not used anywhere in the code. Additionally, it does not interact correctly with mutt_socket_readchar() and mutt_socket_readln_d(), which use an internal input buffer: conn->inbuf. If reading a specific chunksize is needed in future, the function can be easily recreated to use the inbuf. M mutt_socket.c M mutt_socket.h 2019-01-21 12:11:27 -0800 Kevin McCarthy (44b6e55f) * Merge branch 'stable' 2019-01-21 12:02:54 -0800 Kevin McCarthy (2c57d68a) * Merge branch 'stable' 2019-01-19 15:23:32 -0800 Kevin McCarthy (c764b995) * Change $pgp_use_gpg_agent to default set. GnuPG 2.1.0, released in 2014-11-06, automatically spawns an agent. After 4+ years, it has reached wide enough usage to merit changing the default. M init.h 2019-01-18 21:01:09 -0800 Kevin McCarthy (3119b5a1) * Merge branch 'stable' 2019-01-18 19:46:33 -0800 Kevin McCarthy (d2f64a54) * Merge branch 'stable' 2019-01-18 13:59:05 +0100 Vincent Lefevre (4e6744dc) * Updated date of the mutt(1) man page. M doc/mutt.man 2019-01-18 13:57:20 +0100 Vincent Lefevre (564fd57b) * Updated date of the muttrc(5) man page. M doc/muttrc.man.head 2019-01-15 01:17:02 -0500 Muh Muhten (8117a33e) * Add attributes support on color declarations color now accepts zero or more attributes words before the foreground. Also more or less resolves the issue that setting the color of an object which defaults to underline/reverse is irreversible. M color.c M doc/manual.xml.head M doc/muttrc.man.head 2019-01-10 09:45:13 -0800 Kevin McCarthy (42e2d07a) * Merge branch 'stable' 2019-01-08 13:10:06 -0800 Kevin McCarthy (0613422e) * Merge branch 'stable' 2019-01-08 21:18:38 +0200 Stefan Strogin (9c9bea5e) * Fix compilation with LibreSSL <2.7.0. (closes #112) M mutt_ssl.c 2019-01-07 17:49:27 -0800 Kevin McCarthy (9920de1b) * Merge branch 'stable' 2019-01-05 22:54:26 +0100 Eike Rathke (9b965fac) * Fix mkdtemp() random signedness time_t return of time() may be signed 32-bit and in that case probably will roll over in the year 2038 and yield a negative value; signedness was propagated in the XOR operation to the 'value' and then 'v' variables. The 'v % 62' operation then would had resulted in a negative value and LETTER[v%62] would had accessed an arbitrary data location. The same could had happened if the static long 'value' variable after a very long run time contained a sufficiently large value to which the time^pid value added resulted in a wrap / roll-over to a negative value. Using unsigned long types for 'value' and 'v' and casting time_t to unsigned long cures all this. M mkdtemp.c 2019-01-05 13:29:11 -0800 Kevin McCarthy (9a3b8a7c) * Merge branch 'stable' 2019-01-05 12:37:16 -0800 Kevin McCarthy (177f12ac) * Fix a few indenting issues. These are mostly the result of making the formatting changes commit after the indent changes commit. M attach.c M browser.c M mime.h M pager.c M pgp.c 2019-01-04 18:45:01 -0800 Kevin McCarthy (efa3afb5) * Clean up formatting. Add spaces after if, else, while, for, switch. Unify the brace placement style. The vast majority of the code uses Allman style so convert the relatively few K&R braces over. M alias.c M attach.c M browser.c M buffy.c M charset.c M color.c M commands.c M compose.c M copy.c M crypt-gpgme.c M crypt.c M curs_lib.c M curs_main.c M doc/makedoc.c M dotlock.c M edit.c M enter.c M gnupgparse.c M handler.c M hcache.c M hdrline.c M headers.c M help.c M history.c M hook.c M imap/auth_sasl.c M imap/browse.c M imap/command.c M imap/imap.c M imap/message.c M imap/util.c M init.c M keymap.c M lib.c M lib.h M main.c M mbox.c M mh.c M mutt_sasl.c M mutt_socket.c M mutt_ssl.c M mutt_ssl_gnutls.c M muttlib.c M mx.c M pager.c M parse.c M pattern.c M pgp.c M pgpewrap.c M pgppubring.c M pop_lib.c M postpone.c M query.c M recvattach.c M rfc1524.c M rfc3676.c M score.c M send.c M sendlib.c M smime.c M smtp.c M snprintf.c M url.c M wcwidth.c 2019-01-03 19:58:18 -0800 Kevin McCarthy (248c2ee8) * Clean up code indentation. These are mostly automated changes corresponding to the emacs settings: (c-set-style "linux") (setq c-basic-offset 2) (c-set-offset 'case-label '+) Most of the code follows the convention: (add-to-list 'c-cleanup-list 'space-before-funcall) but this is not enforced by this indentation cleanup. Also, I personally dislike tabs, so I have: (setq-default indent-tabs-mode nil) in my own configuration. However I have no desire to change every line just for that effect. So this cleanup does nothing about the mix issue. Some of the secondary files (e.g. regex.c) have been skipped. I've also skipped crypt-gpgme.c, because I need to think about that file. Werner Koch and the GnuPG team contributed most it, and it follows the Gnu indentation settings. It should probably be made uniform with Mutt, but I don't want to discourage future GnuPG contribution to the file. I manually reverted a few unsightly cleanups, and added a few tweeks when I saw things that could be improved. M account.c M addrbook.c M alias.c M attach.c M bcache.c M browser.c M buffer.c M buffy.c M color.c M commands.c M complete.c M compose.c M compress.c M copy.c M crypt-mod-pgp-classic.c M crypt-mod-pgp-gpgme.c M crypt-mod-smime-classic.c M crypt-mod-smime-gpgme.c M crypt.c M cryptglue.c M curs_lib.c M curs_main.c M date.c M doc/makedoc.c M dotlock.c M edit.c M editmsg.c M enter.c M gnupgparse.c M handler.c M hash.c M hash.h M hcache.c M hcache.h M hdrline.c M headers.c M help.c M hook.c M imap/auth_anon.c M imap/auth_cram.c M imap/auth_gss.c M imap/auth_login.c M imap/auth_sasl.c M imap/browse.c M imap/command.c M imap/imap.c M imap/imap_private.h M imap/message.c M imap/utf7.c M imap/util.c M init.c M init.h M keymap.c M lib.c M main.c M mbox.c M mbyte.c M menu.c M mh.c M mime.h M mkdtemp.c M mutt.h M mutt_crypt.h M mutt_idna.c M mutt_sasl.c M mutt_socket.c M mutt_ssl.c M mutt_ssl_gnutls.c M muttlib.c M mx.c M pager.c M parse.c M pattern.c M pgp.c M pgp.h M pgpewrap.c M pgpinvoke.c M pgpkey.c M pgplib.c M pgpmicalg.c M pgppacket.c M pgppubring.c M pop.c M pop_auth.c M pop_lib.c M postpone.c M protos.h M query.c M recvattach.c M recvcmd.c M remailer.c M rfc1524.c M rfc2047.c M rfc2047.h M rfc2231.c M rfc822.c M send.c M sendlib.c M setenv.c M sidebar.c M smime.c M smtp.c M sort.c M status.c M thread.c M txt2c.c M utf8.c 2019-01-04 11:22:18 -0800 Kevin McCarthy (085a6f74) * Merge branch 'stable' 2019-01-01 11:24:11 -0800 Kevin McCarthy (6f28e57d) * Sleep $sleep_time after displaying "mail sent" message. In case returning the index displays some kind of error right away, to give time to see the success message. M send.c 2018-12-31 16:06:53 -0800 Kevin McCarthy (443295ee) * Remove trailing whitespace. The result of find . -name "*.[ch]" -exec emacs -batch {} \ --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \; M account.c M account.h M addrbook.c M alias.c M ascii.c M ascii.h M attach.c M attach.h M base64.c M browser.c M browser.h M buffy.c M buffy.h M charset.c M color.c M commands.c M complete.c M compose.c M compress.c M copy.c M copy.h M crypt.c M curs_lib.c M date.c M doc/makedoc.c M dotlock.c M dotlock.h M edit.c M editmsg.c M enter.c M extlib.c M filter.c M flags.c M from.c M functions.h M getdomain.c M globals.h M gnupgparse.c M group.c M handler.c M hash.c M hash.h M hcache.c M hdrline.c M headers.c M help.c M history.c M history.h M hook.c M imap/auth.c M imap/auth.h M imap/auth_anon.c M imap/auth_cram.c M imap/auth_gss.c M imap/auth_login.c M imap/auth_oauth.c M imap/auth_sasl.c M imap/browse.c M imap/command.c M imap/imap_private.h M imap/message.h M imap/utf7.c M imap/util.c M init.c M intl/bindtextdom.c M keymap.c M keymap.h M lib.c M lib.h M mailbox.h M main.c M mapping.h M mbox.c M mbyte.c M menu.c M mh.c M mime.h M mutt.h M mutt_crypt.h M mutt_curses.h M mutt_idna.c M mutt_idna.h M mutt_menu.h M mutt_regex.h M mutt_sasl.c M mutt_sasl.h M mutt_socket.c M mutt_socket.h M mutt_ssl.h M muttlib.c M mx.c M mx.h M pager.c M pager.h M parse.c M pattern.c M pgp.c M pgp.h M pgpinvoke.c M pgpkey.c M pgplib.c M pgplib.h M pgpmicalg.c M pgppacket.c M pgppacket.h M pgppubring.c M pop.c M pop.h M pop_auth.c M pop_lib.c M protos.h M query.c M recvattach.c M recvcmd.c M regex.c M remailer.c M remailer.h M resize.c M rfc1524.c M rfc1524.h M rfc2047.c M rfc2047.h M rfc2231.c M rfc2231.h M rfc3676.c M rfc3676.h M rfc822.c M rfc822.h M safe_asprintf.c M score.c M send.c M signal.c M smime.c M smime.h M smtp.c M snprintf.c M sort.c M sort.h M status.c M strcasecmp.c M strdup.c M system.c M thread.c M url.c M url.h M utf8.c 2018-12-31 15:39:04 -0800 Kevin McCarthy (1c59c271) * Remove unused MUTT_FORMAT_MAKEPRINT flag. The code in mutt_FormatString() that was using it was commented out 19 years ago. M commands.c M curs_main.c M mutt.h M muttlib.c M pager.c M recvattach.c 2018-12-31 14:19:44 -0800 Kevin McCarthy (3aa8d8a0) * Remove dead code. Most of these have been "#if 0" out for 10-20 years. Any utility in keeping them around is miniscule at this point. There are a few other "#if 0" in the code, but I've kept them for now. Some are utility functions that are not used, but I think still may have some documentation value. M compose.c M copy.c M crypt-gpgme.c M crypt.c M init.c M mutt.h M pager.c M pattern.c M pgp.c M recvattach.c M sendlib.c 2018-12-29 15:13:15 -0800 Kevin McCarthy (86db373c) * Fix config variable order. M init.h 2018-12-29 13:50:00 -0800 Kevin McCarthy (0917da96) * Respect ignore for the protected subject display. M crypt.c 2018-12-29 13:20:03 -0800 Kevin McCarthy (f3f98bd6) * Color protected subject as a header in the pager. M crypt.c M globals.h M init.c M mutt.h M muttlib.c M pager.c 2018-12-27 12:05:43 -0800 Kevin McCarthy (333312c2) * Add $crypt_protected_headers_save. Setting this option will save the protected header back into the clear-text message headers. This improves usability (searching/limiting/replying) when reopening a mailbox without header cache. However, it is a security trade-off, so defaults off and strongly warns about what it is doing in the documentation. M commands.c M copy.c M copy.h M init.h M mutt.h 2018-12-25 19:52:53 -0800 Kevin McCarthy (2817372f) * Change x-label editing flag to be in the envelope. Handle like In-Reply-To and References editing. Change the flag setting to be inside mutt_copy_header(). The resetting of the changed flag occurs explicitly in the imap and maildir/mh sync_mailbox code. It occurs for mbox in the mx_update_tables() call in mx_sync_mailbox(). M copy.c M headers.c M imap/imap.c M mh.c M mutt.h M muttlib.c 2018-12-25 19:24:08 -0800 Kevin McCarthy (7f603dd6) * Create envelope->changed to mark all field changes. In subsequent commits, we're going to add the x-label and subject headers changed flags into the envelope. To avoid the list of checks exploding everywhere, just use a single field to check and reset those values. Several places in the code are checking for a null header->env. I wasn't aware this was possible, so I've added todo notes to track down when this occurs. M copy.c M imap/imap.c M mh.c M mutt.h M muttlib.c M mx.c M thread.c 2018-12-29 20:08:26 +0100 Vincent Lefevre (a5b64f6c) * Light colors: do not do the + 8 on negative values, such as COLOR_DEFAULT. M color.c 2018-12-29 19:37:57 +0100 Vincent Lefevre (7af70af5) * Added support for the "light" color prefix (in addition to "bright"). At the same time, restrict the advance by 8 to colors in the range 0-7 and no longer use the blink attribute to emulate light background colors in some terminals (e.g. linux console and rxvt), as this is really blink in other terminals (e.g. xterm); light background colors can still be obtained by choosing a proper $TERM value (tested with linux console, using TERM=linux-16color, and rxvt). M color.c M doc/manual.xml.head 2018-12-29 18:17:43 +0100 Vincent Lefevre (3f13b257) * Updated French translation. M po/fr.po 2018-12-29 18:03:27 +0100 Vincent Lefevre (23bc5ed0) * spelling consistency M send.c 2018-12-28 15:53:15 -0800 Kevin McCarthy (915006b9) * Merge branch 'stable' 2018-12-27 16:27:24 -0800 Kevin McCarthy (a6ef7758) * Merge branch 'stable' 2018-12-27 16:16:04 -0800 Kevin McCarthy (5f08b9ff) * Merge branch 'stable' 2018-12-27 15:52:52 -0800 Kevin McCarthy (4afae79a) * Merge branch 'stable' 2018-12-24 16:22:07 -0800 Kevin McCarthy (9366cd7f) * Free pgpkeylist if the send fails. M send.c 2018-12-24 15:11:09 -0800 Kevin McCarthy (4b0c8a6d) * Read in protected headers when resuming a postponed message. M postpone.c 2018-12-23 16:32:52 -0800 Kevin McCarthy (66e09584) * Finish protected header write support. Write out the protected headers when writing the mime header part. Hide protected subjects with $crypt_protected_headers_subject, for outgoing, postponed, and fcc'ed messages. Don't hide in postponed and fcc'ed if $crypt_protected_headers_read isn't set. Add a few missing cases where mime_headers needed to be cleaned up on error. Remove the protected headers for $fcc_clear. M crypt.c M headers.c M main.c M mutt_crypt.h M protos.h M send.c M sendlib.c 2018-12-23 16:23:02 -0800 Kevin McCarthy (f1431b15) * Add a new mode for mutt_write_rfc822_header(). Convert the mode parameter to an enum, to make the code a bit more readable. M headers.c M main.c M mutt.h M protos.h M send.c M sendlib.c 2018-12-16 13:15:05 -0800 Kevin McCarthy (167bf96e) * Add config and data structure for protected header write support. Add config vars $crypt_protected_headers_write (unset by default), and $crypt_protected_headers_subject. Store the protected headers during mime_protect(). M crypt.c M globals.h M init.h M mutt.h 2018-12-21 10:13:17 -0800 Kevin McCarthy (450de463) * Handle improperly encoded pgp/mime octetstream part. Some clients (or even mail servers) improperly encode the octetstream part. Thanks to Riccardo Schirone for the original merge request patch. This commit also handles the attachment menu, and makes the decoding conditional so it's not done if it isn't necessary. M crypt-gpgme.c M handler.c M pgp.c 2018-12-21 09:42:26 -0800 Kevin McCarthy (f9a6082c) * Display mail sent message after Fcc finishes. For the case of IMAP, the uploading message would otherwise stay on the screen. In any case, it's best to show that message as the last thing before returning to the index. Thanks to chdiza for reporting the issue! M send.c 2018-12-20 19:52:20 -0800 Kevin McCarthy (cc7afb89) * Merge branch 'stable' 2018-12-20 18:54:25 -0800 Kevin McCarthy (ccfbe996) * Merge branch 'stable' 2018-12-19 18:48:04 -0800 Kevin McCarthy (a2f5faea) * Fix flags if mutt_get_postponed() has no messages. Flags needs to be reset so memory cleanup is done at the end. M send.c 2018-12-19 18:36:19 -0800 Kevin McCarthy (755a72f7) * More postpone cleanup. Provide an error message if $postponed is not set. Make sure the clear content is freed for encrypted messages. If the write_fcc() fails, make sure to restore the clear content. M send.c 2018-12-19 17:43:26 -0800 Kevin McCarthy (1850f4cd) * When postponing, encode descriptions before encrypting. This matches the behavior of the normal send process. I don't think there is actually an issue here since nothing is sent, but it makes sense to be consistent. M send.c 2018-12-19 16:20:23 -0800 Kevin McCarthy (c5d970ee) * Refactor postpone_message(). M send.c 2018-12-19 15:42:24 -0800 Kevin McCarthy (9b9e3e8b) * Prompt when mutt_write_fcc() fails. Allow the user to retry, specify an alternate mailbox, or skip. M send.c 2018-12-19 14:35:22 -0800 Kevin McCarthy (e106487b) * Move fcc after send. M send.c 2018-12-19 14:24:46 -0800 Kevin McCarthy (f8ef4af9) * Refactor save_fcc() function. M send.c 2018-12-16 14:23:54 -0800 Kevin McCarthy (04a08e2d) * Add rfc2047_encode_envelope helper. M rfc2047.c M rfc2047.h M sendlib.c 2018-12-11 14:11:30 -0800 Kevin McCarthy (cac6705a) * Add protected header received email support. Add $crypt_protected_headers_read config variable to enable reading and updating the index/header cache. Print protected Subject header in the pager as parts are rendered. Once opened, update the index, subject hash, and header cache. M commands.c M crypt-gpgme.c M crypt.c M handler.c M init.h M mutt.h M mutt_crypt.h M pgp.c M smime.c 2018-12-15 14:49:55 -0800 Kevin McCarthy (09dd4a5d) * Add mx operation save_to_header_cache. This will be used when reading protected headers, to store the encrypted subject in the header cache so it can be searched with. M compress.c M imap/imap.c M mailbox.h M mbox.c M mh.c M mutt.h M mx.c M pop.c 2018-12-09 17:41:58 -0800 Kevin McCarthy (d8a623bf) * Parse and store mime headers in the BODY. Don't store the field in the header cache though. M hcache.c M mutt.h M muttlib.c M parse.c 2018-12-09 19:52:21 -0800 Kevin McCarthy (67077f0d) * Factor out rfc2047_decode_envelope(). M parse.c M rfc2047.c M rfc2047.h M sendlib.c M url.c 2018-12-12 16:14:48 -0800 Kevin McCarthy (02252dac) * Merge branch 'stable' 2018-12-12 12:41:53 -0800 Kevin McCarthy (706644ed) * Merge branch 'stable' 2018-12-11 18:41:37 -0800 Kevin McCarthy (7a7d06fd) * Fix possible smime crash if the read mime header p is NULL. M smime.c 2018-12-11 15:29:57 -0800 Kevin McCarthy (625fada3) * Fix memory leak in smime.c. smime_application_smime_handler() was not freeing the BODY returned by smime_handle_entity(). M smime.c 2018-12-09 12:32:24 -0800 Kevin McCarthy (caf97ae9) * Fix mutt_parse_rfc822_line() if lastp parameter is NULL. It checked at the beginning before dereferencing, but not at the end. Since lastp is only used for the user_hdrs case, move the local variable and assignment inside that block to make it clear. M parse.c 2018-12-08 15:15:56 -0800 Kevin McCarthy (e525bc08) * Add $auto_subscribe variable. When set, it automatically subscribes to mailing lists found in List-Post headers. This commit is based on Michael Elkins's patch from the thread . I've added an opt-in variable $auto_subscribe and a hash table cache to speed up reading headers when the variable is set. M doc/manual.xml.head M globals.h M hcache.c M init.c M init.h M mutt.h M parse.c M protos.h 2018-12-07 13:18:04 -0800 Kevin McCarthy (7f1febf6) * Add note about the second --with-fingerprint to gpg.rc. M contrib/gpg.rc 2018-12-06 19:29:22 -0800 Kevin McCarthy (d10eec45) * Merge branch 'stable' 2018-12-06 13:08:29 +0100 Vincent Lefevre (5b464361) * Updated French translation. M po/fr.po 2018-12-05 09:31:34 -0800 Kevin McCarthy (f9abf056) * Adjust version number comment in gpgme. M crypt-gpgme.c 2018-12-03 08:41:56 +0100 Werner Koch (382355a5) * Improve the console output for extract-keys and speed up import. The listing of imported keys to the console must have stopped working on 2014-12-31 due to a fix for bug #3698, commit bbc5acb6de0ca56d7e8366402d68a1a919ca9b23 which was needed due to a not fully working stub code introduced in 2008 with commit a4b3a60dd63bc7af7927025b2d1344530ca89aa9. The latter commit also introduced a bug in the import code which listed all keys in the keyring to a temporary file and copied that one to stdout. The former commit avoided the output to stdout. The fix here is to use pgp_gpgme_extract_keys only for extracting information about the key and don't re-use the same code for importing keys. We now import the keys directly in pgp_gpgme_invoke_import and we print the fingerprint and status flags for all imported keys. That information available from GPGME for ages (0.3.1 from 2003). The user id is unfortunately not printed; that would require a lookup of the newly imported key. Can be done with another patch. M crypt-gpgme.c 2018-12-03 08:41:55 +0100 Werner Koch (55c18b7e) * Try to avoid creation of temp. directory for key import. Since gpgme 1.9.0 it is possible to list keys directly from a file without importing it into gpg' own keyring. This patch implements this in a backward compatible way. Unfortunately we need to check for a suitable gpgme version at build time and also for a suitable gpg version at runtime. This is implemented by a version check which requires to call or include code taken from libgpg-error (aka gpgrt). However this library is anyway a dependency of gpgme and thus does not pose any extra burden. The functions parse_version_number, parse_version_string, and cmp_version_strings are taken from libgpg-error's repo at 2018-11-20. Libgpg-error is distributed under the LGPL-2.1-or-later. M crypt-gpgme.c 2018-12-03 08:41:54 +0100 Werner Koch (bf4a65ee) * Always use the gpgme_new wrapper in crypt-gpgme. The wrapper is much more convenient and there is no need to sometimes use gpgme_new directly. The perceived advantage on not bailing out in an out-of-core condition is not realistic because other small amounts of memory are allocated all over mutt anyway and thus function will terminate the process as well. This patch also changes the minimum version of gpgme to 1.4.0. This is so that we can always pass NULL to functions like gpgme_release. Further 1.4.0 has new functions which we may soon like to use. M configure.ac M crypt-gpgme.c 2018-12-03 08:41:53 +0100 Werner Koch (0725e71e) * Require GPGME version 1.2.0 and drop useless HAVE macros. GPGME 1.2.0 was released nearly 10 years ago and thus we can really demand this version. For various reasons it would be advisable to require a decent version but that is a different thing and needs to be done in a separate patch. HAVE_GPGME_OP_EXPORT_KEYS and HAVE_GPGME_PKA_TRUST are not anymore needed because they are supported by that GPGME version. Signed-off-by: Werner Koch M configure.ac M crypt-gpgme.c M crypt-mod-pgp-classic.c M crypt-mod-pgp-gpgme.c 2018-12-03 08:41:52 +0100 Werner Koch (125c955d) * Nuke trailing white space from the crypt-* files. M crypt-gpgme.c M crypt-gpgme.h M crypt-mod-pgp-classic.c M crypt-mod-pgp-gpgme.c M crypt-mod-smime-classic.c M crypt-mod-smime-gpgme.c M crypt-mod.c M crypt-mod.h M crypt.c M cryptglue.c 2018-12-02 21:39:55 -0800 Kevin McCarthy (26bba6f9) * Improve rfc2047_decode to deal with improperly split words. Some non-compliant MUAs split rfc2047 words inside a multibyte character. Deal with this by accumulating decoded words sharing the same character set, and then perform character conversion all at once. It is not clear to me that the $ignore_linear_white_space option is functional or properly coded, but I've gone through the effort of trying to preserve its calls. M rfc2047.c 2018-11-24 21:03:26 -0800 Kevin McCarthy (9426c7dd) * Convert rfc2047_decode() to use buffers. Rework the loop so it's centered on the find_encoded_word() call. It appears only the last text chunk was run through character conversion with AssumedCharset. I've changed it to run for each text chunk. M rfc2047.c 2018-12-02 20:26:27 -0800 Kevin McCarthy (56098c84) * Add mutt_buffer_addstr_n(). M buffer.c M buffer.h 2018-12-03 07:47:17 -0800 Kevin McCarthy (c775d044) * Merge branch 'stable' 2018-12-03 07:30:34 -0800 Kevin McCarthy (1ecea97e) * Fix typo in Finnish translation. Thanks to @Petteri3 for the patch. M po/fi.po 2018-12-03 15:55:53 +0100 Vincent Lefevre (dd05edee) * Added configure.lineno to .gitignore as this file is left by configure: https://lists.gnu.org/archive/html/autoconf/2004-01/msg00034.html M .gitignore 2018-12-02 18:38:03 -0800 Kevin McCarthy (b6d9c755) * Fix next release number in UPDATING file. M UPDATING 2018-12-02 16:46:28 -0800 Rosen Penev (26b84329) * Fix compilation without deprecated OpenSSL 1.1 APIs M mutt_ssl.c 2018-12-02 22:32:35 +0000 Sam Pablo Kuper (80f64b70) * Enhance docs re security of SSL/TLS version vars M init.h 2018-12-02 22:31:19 +0000 Sam Pablo Kuper (8960e637) * Deprecate TLS 1.0 and 1.1 by default Fixes #101. Minor digit of version number has been bumped per [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) §7: > Minor version Y (x.Y.z | x > 0) MUST be incremented if ... any public > API functionality is marked as deprecated. M UPDATING M init.h 2018-12-01 11:46:03 -0800 Kevin McCarthy (b07a3661) * Merge branch 'stable' 2018-11-30 15:12:47 -0800 Kevin McCarthy (f34cb1fb) * Convert to use gitlab registry image ubuntu:18.04. The gitlab registry image is built using the Dockerfile in muttmua/docker-images/tree/master/ubuntu/18.04/ Turn off the scan-build-5.0. I never look at those reports and they run very slowly. Also, for now just compile for gnutls, to speed up the check further. M .gitlab-ci.yml 2018-11-30 15:03:11 -0800 Kevin McCarthy (657c078b) * Merge branch 'stable' 2018-11-29 12:36:08 -0800 Kevin McCarthy (1daffc9b) * Add SENDER to default list of IMAP headers. This header is matched by the ~e and ~L patterns. Those patterns should work without the user having to know to add Sender to the list of $imap_headers. This was probably just an oversight. M imap/message.c 2018-11-28 12:27:44 +0100 Vincent Lefevre (758d452d) * Updated French translation. M po/fr.po 2018-11-27 19:06:42 -0800 Kevin McCarthy (2017ebcc) * Improve pgp error message for translation. The past tense phrase makes it unclear whether the error is about a failed action or the state of the message. Thanks to Vincent Lefèvre for the improved wording suggestion. M pgp.c 2018-11-28 00:19:38 +0100 Adam Golebiowski (3c89922f) * Updated Polish translation. M po/pl.po 2018-11-27 14:05:10 -0800 Kevin McCarthy (67dc9c44) * Merge branch 'stable' 2018-11-25 19:48:49 -0800 Kevin McCarthy (55fd5122) * Prevent trying to match a failing color body regex repeatedly. Emails with really long lines (e.g. spam), can suffer performance if a complicated regex is matched to no effect over and over. If the regex failed at the beginning, it won't match at the end of another's regex match range, so turn it off. M mutt_curses.h M pager.c 2018-11-18 19:13:20 -0800 Kevin McCarthy (f4f20e5d) * Switch color chunk matching to use bsearch. Emails with extremely long lines, combined with a large number of color matches, can cause a performance hit so severe that mutt appears to have hung. Switching out to using a binary search speeds things up noticably. The for loops being replaced were a bit strange. resolve_types() ensures there are no overlaps, and that they are ordered. A match is defined by (first <= cnt < last). I can't see any reason for the strange comparison of (cnt > last) follow by (cnt != last). Perhaps at one time it made sense. M pager.c 2019-03-13 12:06:11 +0800 Kevin McCarthy (fedb91e2) * Fix incorrect IMAP message purging bug. Thanks to Ivan Middleton @imiddle for the awesome bug report and suggested fix. The bug is most easily generated using Gmail with the $trash variable set. Deleted messages are first copied to the $trash folder. If this is set to "[Gmail]/Trash", then Gmail inteprets the copy as a "delete" and sends EXPUNGE messages back for the messages. cmd_parse_expunge() and cmd_parse_vanished() set the hdr->index to INT_MAX, which subsequently an imap_expunge_mailbox() will use to remove the messages from the local mailbox. If we close the mailbox instead of sync it, Mutt will end up executing the 'Deleted' flag setting before processing the expunge (because "imap_check_mailbox() -> imap_cmd_finish()' doesn't set check_status when we are closing). The expunged messages will then be included in the set of 'Deleted' flags. Unfortunately, because the messages are sorted by *index* before msgset generation, an incorrect range of UIDs will be sent, which could easily include messages that should not be deleted. This fix is a minimal fix for a stable bug fix excluding messages with the index set to INT_MAX from all msg sets. Other things that should be investigated in master are: - sorting by UID instead of index before msgset generation - unsetting the 'active' flag in cmd_parse_expunge() and cmd_parse_vanished() instead of waiting until imap_expunge_mailbox() to do so. M imap/imap.c 2019-02-01 12:41:23 -0800 Kevin McCarthy (eeed901d) * automatic post-release commit for mutt-1.11.3 M ChangeLog M VERSION 2019-02-01 12:34:19 -0800 Kevin McCarthy (cd5db026) * Update UPDATING file for 1.11.3 release. M UPDATING 2019-01-24 18:28:27 -0800 Kevin McCarthy (1041fb4f) * Show top-level decoded smime text/plain parts. Commit 331d9d5a attempted to fix a problem with an attachment having extension .p7m. The attachment menu tried to decode and failed, and the part ended up being replaced by a bogus text/plain part. The problem is that crypt_smime_decrypt_mime() returns a text/plain part if the decode fails, meaning we can't distinguish failure from success in this case. As a compromise, only use a text/plain resulting from a single top-level application_smime part. This will allow for the case of an text/plain encoded email, but won't end up hiding attachments that were not decoded. M recvattach.c 2019-01-24 14:15:33 -0800 Kevin McCarthy (331d9d5a) * Improve attachment menu for s/mime parts. (closes #113) Don't prompt for passphrase or getkeys, or set the ENCRYPT flag, for OPAQUE types. Don't recurse on "text" output from decrypt_mime(). There is no reason to recurse on a text type. Additionally, the mutt_read_mime_header() will return an empty text type even if the decode doesn't generate mime output. In those cases, we want to show the original attachment. M recvattach.c 2019-01-21 19:43:08 -0800 Kevin McCarthy (caf5db85) * Fix tunnels to also retry and write full buffer. Change the tunnel_socket_read() and tunnel_socket_write() as the raw sockets were adjusted in the previous commit. Retry on EINTR, and complete a full write so all the implementations have the same behavior. M mutt_tunnel.c 2019-01-21 15:19:08 -0800 Kevin McCarthy (688e27a9) * Fix raw socket read/write to follow expected behavior. The mutt_sasl.c code expects conn_write() to write the entire buffer. This is inconsistent with mutt_socket.c, but since other conn_write() implementations guarantee this, change raw_socket_write() to do so too for now. Also, update reading and writing to loop on EINTR, as gnutls does. They won't return EAGAIN or EWOULDBLOCK because we don't mark sockets as non-blocking. M mutt_socket.c 2018-11-30 15:12:47 -0800 Kevin McCarthy (ae8bb261) * Convert to use gitlab registry image ubuntu:18.04. The gitlab registry image is built using the Dockerfile in muttmua/docker-images/tree/master/ubuntu/18.04/ Turn off the scan-build-5.0. I never look at those reports and they run very slowly. Also, for now just compile for gnutls, to speed up the check further. (cherry picked from commit f34cb1fb8468f74894818343dd8d95da5c0c640d) M .gitlab-ci.yml 2019-01-21 11:56:04 -0800 Kevin McCarthy (73b3151e) * Fix gnutls tls_socket_write() to properly retry. Retry on GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED. This prevents an aborted send due to a SIGWINCH, for instance. Change tls_socket_read() to follow the same flow. Don't bother checking gnutls_error_is_fatal() because return codes besides AGAIN and INTERRUPTED end up closing the connection regardless. (We don't handle handshakes and negotations during send/receive). M mutt_ssl_gnutls.c 2019-01-18 20:46:07 -0800 Kevin McCarthy (1b2dcb31) * Update the muttrc man page with added commands. Add the "color compose", index-format-hook, and echo commands. Add the HMS relative date units. M doc/muttrc.man.head 2019-01-10 09:56:41 -0800 Kevin McCarthy (78ea05f7) * Wrap ssl init calls for LibreSSL too. It looks like LibreSSL does not perform automatic initialization of the library and error strings. Since LibreSSL defines OPENSSL_VERSION_NUMBER as a "version 2", add a check if LIBRESSL_VERSION_NUMBER is defined and call the initialization functions for that case. M mutt_ssl.c 2019-01-10 16:03:02 +0100 Fabian Groffen (42101583) * mx_open_mailbox: provide output buffer to realpath(3) Starting with POSIX.1.2008 resolved_path can be NULL. Systems implementing a standard before that crash. Example of such system is Mac OS X 10.5, the last version running on PowerPC hardware. Since this is the only occurrance of the realpath(3) function in Mutt, instead of wrapping it, just adjust this invocation. Signed-off-by: Fabian Groffen M mx.c 2019-01-08 21:18:38 +0200 Stefan Strogin (83585f9b) * Fix compilation with LibreSSL <2.7.0. (closes #112) (cherry picked from commit 9c9bea5e04e2a562017af0ac7a27b1b0e00e8907) M mutt_ssl.c 2019-01-07 17:39:19 -0800 Kevin McCarthy (df3f2aee) * automatic post-release commit for mutt-1.11.2 M ChangeLog M VERSION 2019-01-07 17:26:53 -0800 Kevin McCarthy (5f1f14e2) * Add UPDATING notes for 1.11.2 release. M UPDATING 2019-01-05 13:25:38 -0800 Kevin McCarthy (ae3587cf) * Update copyright for the next stable release. M COPYRIGHT M doc/manual.xml.head M doc/mutt.man M main.c 2019-01-04 11:20:05 -0800 Kevin McCarthy (853e48bf) * Fix mkdtemp.c implementation. Two statements were indented on the same line under a for statement. The second one would not be included in the loop, only being executed after the loop finishes. This is obviously an error, as it modifies the LETTERS entry being used. M mkdtemp.c 2018-12-28 15:43:51 -0800 Kevin McCarthy (63f05d96) * Make a copy of x_label before encoding it for updates. This isn't actually a bug. Context->label_hash strdups the keys, so we are safe from dangling references. However, the subj_hash uses direct references, so to keep things consistent and safe, make a copy and encode that. M copy.c 2018-12-27 16:24:27 -0800 Kevin McCarthy (8bb10956) * Restore the xlabel_changed reset. The cherry pick accidentally obliterated the reset. That flag is now located in hdr->env->changed in the branch and is reset properly elsewhere. Keep it in place in the stable branch. M copy.c 2018-12-27 16:08:36 -0800 Kevin McCarthy (75f2445c) * Rfc2047 encode and fold X-Label when writing updates. Also, add a missing "skip" in mutt_copy_hdr() for the non-simple case. These fixes were backported from the kevin/mutt_protected_header branch. M copy.c 2018-12-21 10:13:17 -0800 Kevin McCarthy (eb444e63) * Handle improperly encoded pgp/mime octetstream part. Some clients (or even mail servers) improperly encode the octetstream part. Thanks to Riccardo Schirone for the original merge request patch. This commit also handles the attachment menu, and makes the decoding conditional so it's not done if it isn't necessary. (cherry picked from commit 450de4637f6590487a073b250da342a1400a3ac3) M crypt-gpgme.c M handler.c M pgp.c 2018-12-20 19:39:39 -0800 Kevin McCarthy (e104135e) * Backport postpone-encrypt cleanups from master. Free the clear content after successfully postponing. If the fcc fails, properly restore the clear content before returning to the compose menu. M send.c 2018-12-02 16:46:28 -0800 Rosen Penev (671417dd) * Fix compilation without deprecated OpenSSL 1.1 APIs M mutt_ssl.c 2018-12-12 16:10:23 -0800 Kevin McCarthy (101e05d6) * Fix imap_sync_mailbox() hcache leak. Uploading changed messages to the server ends up overwriting the hcache. Add a straightforward fix and a longish explanation comment for the stable branch fix. Add a TODO noting a better fix should be done in the master branch in the future. M imap/imap.c 2018-12-11 18:41:37 -0800 Kevin McCarthy (29da7c2a) * Fix possible smime crash if the read mime header p is NULL. M smime.c 2018-12-11 15:29:57 -0800 Kevin McCarthy (74a09f41) * Fix memory leak in smime.c. smime_application_smime_handler() was not freeing the BODY returned by smime_handle_entity(). M smime.c 2018-12-09 12:32:24 -0800 Kevin McCarthy (37320beb) * Fix mutt_parse_rfc822_line() if lastp parameter is NULL. It checked at the beginning before dereferencing, but not at the end. Since lastp is only used for the user_hdrs case, move the local variable and assignment inside that block to make it clear. M parse.c 2018-12-06 19:22:59 -0800 Kevin McCarthy (59625f54) * Fix classic gpg date parsing in list-keys. GnuPG changed the format of their --with-colons output in 2.0.10. Dates are now seconds since epoch. Update the parse_pub_line() code to detect the new format. The GnuPG changes also separated pub and the first uid. Since mutt allows an empty uid field, the output is a bit less friendly now, with an initial key without an uid. I think that's acceptable, but eventually we'll want to change the parsing behavior. M gnupgparse.c 2018-12-03 07:30:34 -0800 Kevin McCarthy (2cb34544) * Fix typo in Finnish translation. Thanks to @Petteri3 for the patch. M po/fi.po 2018-12-01 11:38:36 -0800 Kevin McCarthy (991c018e) * automatic post-release commit for mutt-1.11.1 M ChangeLog M UPDATING M VERSION 2018-12-01 11:27:20 -0800 Kevin McCarthy (bf2f59d4) * Document Sender header as a default in $imap_headers. M init.h 2018-11-29 12:36:08 -0800 Kevin McCarthy (42983686) * Add SENDER to default list of IMAP headers. This header is matched by the ~e and ~L patterns. Those patterns should work without the user having to know to add Sender to the list of $imap_headers. This was probably just an oversight. M imap/message.c 2018-11-28 00:19:38 +0100 Adam Golebiowski (b4ade8a7) * Updated Polish translation. M po/pl.po 2018-11-27 13:55:04 -0800 Kevin McCarthy (41816374) * Fix QRESYNC crash after a large number of VANISHED messages. When handling QRESYNC vanished, imap_expunge_mailbox() was called to empty out the messages. Various counters, including vcount are updated by the mx_update_tables() after the expunge. These counters need to be reset, because mx_update_context() will do so once again at the end of reading new headers. This can cause an out of bounds access in v2r. M imap/message.c 2018-11-25 09:50:23 -0800 Kevin McCarthy (3b75515c) * automatic post-release commit for mutt-1.11.0 M ChangeLog M VERSION M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fi.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2018-11-25 09:33:53 -0800 Kevin McCarthy (6de8a20e) * Bump release date. M UPDATING 2018-11-24 10:10:24 -0800 Morten Bo Johansen (69035fa3) * Updated Danish translation. M po/da.po 2018-11-24 10:06:55 -0800 Vsevolod Volkov (8b99eb9c) * Updated Russian translation. M po/ru.po 2018-11-24 10:04:00 -0800 Vsevolod Volkov (ff51ac67) * Updated Ukrainian translation. M po/uk.po 2018-11-23 09:05:49 +0100 Olaf Hering (a287a1c4) * Update de.po Unwrap lines, because it is almost 2019. Signed-off-by: Olaf Hering M po/de.po 2018-11-22 09:10:48 -0800 TAKAHASHI Tamotsu (edd749b9) * Updated Japanese translation. M po/ja.po 2018-11-18 10:05:30 -0800 TAKAHASHI Tamotsu (2a919856) * Add L10N comments to several unclear messages. Updating Japanese translation, I found that some of the updated messages were a little hard to understand without reading the code. Add comments to some messages I nearly translated in a wrong way. M account.c M crypt-gpgme.c M pgp.c M recvcmd.c 2018-11-17 14:55:58 +0100 Petr PísaÅ™ (5c1af7a4) * Czech translation update for Mutt 1.11.0 M po/cs.po 2018-11-17 02:28:01 +0100 Vincent Lefevre (e9846f41) * Updated fr.po for Mutt 1.11.0. M po/fr.po 2018-11-15 09:29:15 -0800 Kevin McCarthy (78a60fc9) * Minor fixes to UPDATING. M UPDATING 2018-11-14 14:13:47 -0800 Kevin McCarthy (1b5caef3) * Update $index_format cross-references in manual. Add index-format-hook to the list of hooks. Add the list of configuration variables that use the expandos. Add a note to $post_index_string that it uses the expandos. M init.h 2018-11-13 15:01:53 -0800 Kevin McCarthy (eb69b2ed) * Update the UPDATING file for 1.11.0 release. M UPDATING 2018-11-10 06:51:34 -0800 lilydjwg (1fd77395) * Updated Simplified Chinese translation. M po/zh_CN.po 2018-11-07 14:19:25 -0800 Kevin McCarthy (39444350) * Minor edits to the README. M README 2018-11-07 13:38:53 -0800 Kevin McCarthy (f8153009) * Add some brief documentation on OAUTH support. These are just pulled from Brandon's commit message. M doc/manual.xml.head M init.h 2018-11-06 15:54:45 -0800 Kevin McCarthy (c9ab8553) * Add monitor.h to extra_sources list. M Makefile.am 2018-11-06 13:21:20 -0800 Kevin McCarthy (762c0c43) * Allow relative date hour/min/sec offsets. These might be useful for index-format-hook pattern matching for some people. M doc/manual.xml.head M pattern.c 2018-11-06 11:02:01 -0800 Kevin McCarthy (79741a49) * Fix a few memory leaks for idna conversion. M alias.c M init.c M sendlib.c 2018-11-05 17:44:20 -0800 Kevin McCarthy (fec121b2) * Document send-hooks are not executed for resumed messages. M doc/manual.xml.head 2018-11-05 16:19:03 -0800 Kevin McCarthy (1681a2ab) * Prevent $charset from having multiple values. Mutt relies on it being a single character set, but failed to make sure of that in check_charset(). Thanks to Hans-Peter Jansen for reporting the problem, and to Mel Gorman for working with me to track down the issue in his configuration. M init.c 2018-10-31 12:19:56 -0700 Kevin McCarthy (e6059484) * Always print mutt_buffer_pool_free() size debug output. So I can easily see the resulting size of the pool at the end of a run. M buffer.c 2018-10-30 11:53:37 -0700 Kevin McCarthy (5de55f85) * Add a flag for dynamic date range evaluation in patterns. By default, Mutt evaluates relative date patterns, such as "~d<1d" against the date when the pattern is compiled. For index-format-hook, we need to pattern match against a message based on the current date/time, so that for example, conditional date format patterns correctly match after Mutt has been open for many days/weeks. Add a flag, MUTT_PATTERN_DYNAMIC, that changes ~d and ~r evaluation to reevaluate the min/max range with each match. This will of course be slower, but for the index, where a screenful of messages at a time are evaluated, is an acceptable tradeoff against accurate pattern matching. M hook.c M mutt.h M pattern.c 2018-10-29 13:45:02 -0700 Kevin McCarthy (7ebb6205) * Add index-format-hook and expando. index-format-hook is used to allow dynamic insertion/evaluation of format strings into $index_format. It can be used, for example, to implement date formatting based on the age of the message. Add a new %@name@ expando to $index_format, which evaluates the matching index-format-hooks with "name". M doc/manual.xml.head M hdrline.c M hook.c M init.c M init.h M mutt.h M protos.h 2018-10-30 08:55:52 -0700 Kevin McCarthy (5cfbcf52) * Fix memory leak on error in eat_regexp() and eat_date(). M pattern.c 2018-10-23 12:29:26 +0200 Peter Wu (7c6d3851) * Fix memleaks of saslconn on error paths If mutt_sasl_client_new returns an error, the callers would ignore the allocated saslconn resource from sasl_client_new. Be sure to release these with sasl_dispose as documented in sasl.h. Likewise, let callers (POP/IMAP) dispose the resource on their error paths. SMTP was already taken care of. Found with LeakSanitizer in IMAP. M imap/auth_sasl.c M mutt_sasl.c M pop_auth.c 2018-10-16 17:42:35 -0700 Kevin McCarthy (420226ce) * Minor syntactic cleanup in mutt_print_attachment(). Converting a return to a rc assignment accidentally left an extra parenthesis. M attach.c 2018-10-16 17:35:54 -0700 Kevin McCarthy (42481bda) * Ensure a resized empty buffer is null-terminated. The new buffer code is using the pool, which ensures its buffers are null-terminated. However, if a "new" buffer from another part of the code were passed to one of the temporary interfaces that resizes the buffer, it's possible a non-terminated string might end up being passed through. It's reasonable to expect mutt_b2s() for a "new" buffer should be the same as after it is resized larger. So ensure the resulting buf->data is properly terminated to avoid surprises. M buffer.c 2018-10-16 16:04:57 -0700 Kevin McCarthy (dd1e0ea4) * Remove conversion of nbsp to space. Keep the behavior of it not line-breaking, but don't change it to a space character when displaying. This is so copy-paste from the pager will preserve the nbsp, which is semantically important in some locales. M pager.c 2018-10-14 14:35:21 -0700 Kevin McCarthy (b02a9d75) * Convert mutt_print_attachment to use BUFFER. M attach.c 2018-10-14 14:02:20 -0700 Kevin McCarthy (fde5478c) * Convert mutt_view_attachment to use BUFFER. M attach.c M protos.h 2018-10-14 13:02:20 -0700 Kevin McCarthy (162e7cc6) * Convert mutt_edit_attachment to use BUFFER. M attach.c 2018-10-14 16:18:53 -0700 Kevin McCarthy (ffdf38d7) * Convert mutt_compose_attachment to use BUFFER. M attach.c M rfc1524.c M rfc1524.h 2018-10-14 12:52:30 -0700 Kevin McCarthy (c619d5cb) * Convert mutt_get_tmp_attachment to use BUFFER. M attach.c 2018-10-14 19:02:47 -0700 Kevin McCarthy (57caae48) * Add mutt_buffer_adv_mktemp() transition function. M muttlib.c M protos.h 2018-10-14 18:36:08 -0700 Kevin McCarthy (f6d9a980) * Add mutt_buffer_mktemp() transition function. This is self-contained and easy to translate, so instead just create an alternate implementation using BUFFER. M muttlib.c M protos.h 2018-10-14 15:48:07 -0700 Kevin McCarthy (4781461c) * Add rfc1524 buffer function interfaces for attach.c conversion. The rfc1524 functions call, and are called by, many functions that need to be converted. But to keep the conversion manageable, install helper interface functions that pass the buffer->data and buffer->dsize in and adjust the buffer->dptr afterwards. M buffer.c M buffer.h M rfc1524.c M rfc1524.h 2018-10-10 13:08:27 -0700 Kevin McCarthy (b231f15a) * Convert the rest of mh.c to use BUFFER for file paths. * mh_read_sequences * mh_sequences_changed * mh_already_notified * mh_mkstemp * mh_update_sequences * mh_sequences_add_one * maildir_update_time * maildir_delayed_parsing * maildir_open_mailbox_append * mh_open_mailbox_append * maildir_mh_open_message * maildir_open_new_message * _mh_commit_message * mh_rewrite_message * mh_sync_mailbox * mh_check_mailbox * maildir_check_empty * mx_is_maildir * mx_is_mh() M mh.c 2018-10-10 12:50:15 -0700 Kevin McCarthy (14b0178d) * Add a comment about gnutls date bits in certstat. It's easy to miss the call disabling date checking and wonder why the certstat bits are not set. M mutt_ssl_gnutls.c 2018-10-09 14:39:09 -0700 Kevin McCarthy (d6581efc) * Change gnutls certificate_file processing and interactive prompts. Accept a saved cert at any point in the chain, except for those revoked or with invalid dates. The INSECUREALG processing was a bit goofed up. It was skipping the prompt for every chain except the host, and was only displaying an error for entry 1 (the host being 0, root being len-1). Instead prompt at any point, and display a warning as with the other errors. Add a CERTERR_OTHER type to capture other bits. Recently GnuTLS has added additional certificate_status_t types. We may want to improve the prompts in the future for those, but for now at least make sure it's recorded in certerr. M mutt_ssl_gnutls.c 2018-10-09 13:28:15 -0700 Kevin McCarthy (ea1ea1e5) * Fix gnutls (a)lways to properly save for all certerr values. For the case of SIGNERNOTCA, INSECUREALG, or a newer unhandled value, the "(a)ccept always" prompt was allowed, but the cert saving was prevented by a check only against NOTTRUSTED. This ended up giving a strange error message saying the cert was not saved. Fix to save the cert for all errors except HOSTNAME (which is handled separately). M mutt_ssl_gnutls.c 2018-10-07 19:08:42 -0700 Kevin McCarthy (85ac2c1d) * Convert maildir_canon_filename() and callers to use BUFFER. Callers are maildir_check_mailbox(), _maildir_open_find_message(), and maildir_open_find_message(). M mh.c 2018-10-07 16:17:36 -0700 Kevin McCarthy (112f81d8) * Convert maildir_sync_message to use BUFFERs. M mh.c 2018-10-07 15:48:17 -0700 Kevin McCarthy (766e76ee) * Convert _maildir_commit_message to use BUFFER. M mh.c 2018-10-07 15:31:40 -0700 Kevin McCarthy (de6d6180) * Convert maildir_parse_dir to use BUFFER. Note: the uses of buf and tmp don't overlap, so we only use a single BUFFER. M mh.c 2018-10-07 15:18:34 -0700 Kevin McCarthy (90a53062) * Convert buffy_maildir_check_dir to use BUFFER. M buffy.c 2018-10-08 10:36:13 -0700 Kevin McCarthy (3405aeee) * Convert mix_send_message to use buffer pool. M remailer.c 2018-10-08 10:48:29 -0700 Kevin McCarthy (1e1d7b7a) * Create mutt_buffer_add_printf(). Change mutt_buffer_printf() to overwrite the buffer contents, like mutt_buffer_strcpy(). mutt_buffer_add*() functions append to the buffer contents. M buffer.c M buffer.h M imap/command.c M imap/imap.c M imap/message.c M imap/util.c M pattern.c 2018-10-06 15:07:27 -0700 Kevin McCarthy (2d373eba) * Convert imap_rename and pgp_invoke_list_keys to use buffer pool. M imap/imap.c M pgpinvoke.c 2018-10-06 13:53:33 -0700 Kevin McCarthy (619fe069) * Add buffer pool functions. Also add a few helper functions: mutt_buffer_clear(), mutt_buffer_strcpy(), and a macro mutt_b2s to grab the buffer data as a const char *. M buffer.c M buffer.h M init.c M main.c 2018-10-06 13:08:13 -0700 Kevin McCarthy (563afcc1) * Rearrange and clean up buffer functions. M buffer.c M buffer.h 2018-10-06 12:43:17 -0700 Kevin McCarthy (f3c70b58) * Break buffer functions into separate source file. M Makefile.am A buffer.c A buffer.h M mutt.h M muttlib.c M protos.h 2018-10-05 10:04:27 -0700 Kevin McCarthy (caeda713) * Improve info install/uninstall checks. Make sure install-info exists before using it. Make sure target mutt.info exists before calling `install-info --delete`. Add a few missing '-f' force flags to removals during uninstall. M doc/Makefile.am 2018-10-04 12:06:27 -0700 Kevin McCarthy (95c4c5c2) * Build info file documentation. If docbook2x-texi and makeinfo are installed, convert the docbook file to info and install as another source for the manual. M .gitignore M configure.ac M doc/Makefile.am M doc/manual.xml.head 2018-10-03 22:36:32 +0200 Max Görner (8a0d03d9) * Adapt translation of "Subject" in help text In the help text, "Subject" was not translated. Since it is translated by "Betreff" at other locations, this was adapted. M po/de.po 2018-10-03 22:32:44 +0200 Max Görner (17f58246) * Translate ERROR by FEHLER M po/de.po 2018-10-03 22:28:57 +0200 Max Görner (1fd2c85b) * Add several "Durchkopplungsbindestrich" to some German translations While up to personal taste to a certain extent, in general it is more appropriate to use dashes instead of spaces to to combine related but distinct terms. This commit introduces dashes, so called Durchkopplungsbindestriche, to some of the terms, were found more suiting. M po/de.po 2018-10-03 22:20:30 +0200 Max Görner (fb34e79c) * Fix typos in German translation There were some typos in the German translation. Those found by a brief inspection are fixed now. M po/de.po 2018-09-28 15:08:19 -0700 Kevin McCarthy (f3e0742a) * Convert pgp_invoke_list_keys and mix_send_message to use BUFFERs. Both repetitively perform a lot of copying back in forth, which is much cleaner with a BUFFER. Note that in pgp_invoke_list_keys, if there are no hints uids->data would be NULL. However, the pgp_invoke() checks and wraps all the format substitutions with NONULL. M pgpinvoke.c M remailer.c 2018-09-28 14:22:09 -0700 Kevin McCarthy (a97543c3) * Change imap_rename_mailbox to use a BUFFER. M imap/imap.c 2018-09-27 17:29:16 -0700 Kevin McCarthy (51efb726) * Increase buffer sizes for some IMAP commands. Use to ensure assembled IMAP commands fit in the resultant buffer to be imap_exec()'ed. RFC2683 suggested a limit of 1000, but asked servers to accept up to 8000. Furthermore, RFC7162 bumped the client limit suggestion up to 8192. So I don't believe any issues will be caused by this. Most of these are increases are just to remove theoretical truncation warned about by the compiler; I don't believe we've had reports of actual command truncation due to a mailbox 1024 characters long. M imap/browse.c M imap/imap.c M imap/message.c M lib.h 2018-09-27 15:03:40 -0700 Kevin McCarthy (b181996c) * Add regfree to configure regex test. This allows to run the system regex lib even when compiling with ASAN. Previously, ASAN would report the regex_t leak and change the exit code. M configure.ac 2018-09-25 19:03:56 -0700 Kevin McCarthy (999d85c6) * Fix non-threaded $sort_aux "reverse-" sorting. The secondary sort was looking at (Sort & SORT_REVERSE) instead of (SortAux & SORT_REVERSE), so wasn't even performing the reverse based on the correct flag. Additionally, afterwards, the primary sort was improperly applying a reverse when the secondary sort returned non-zero. Change SORTCODE() to look at SortAux when we are inside a secondary sort. Change AUXSORT() to return the result if the secondary sort returns non-zero. It is ugly to put a return inside the macro, but the check for non-zero needs to be performed inside the AUXSORT if branch. If the secondary sort returns 0, then the primary sort can still compare index and apply a reverse as needed. M init.h M sort.c 2018-09-22 09:57:30 -0700 Kevin McCarthy (f8196e20) * Merge branch 'stable' 2018-09-22 09:53:55 -0700 Kevin McCarthy (f9293d64) * Increase user/pass field sizes in auth_login. account.pass was previously increased to 256 in cd421c13. Also, the buf should be bigger than the user+pass+"LOGIN", so bump it up too. M imap/auth_login.c 2018-09-21 17:13:02 -0700 Kevin McCarthy (8ac10368) * Add output during smime_keys purpose flag checking. M smime_keys.pl 2018-09-17 19:40:22 -0700 Kevin McCarthy (4350694b) * Send imap keepalives for interactive filters. When viewing attachments externally with a (non-copiousoutput) mailcap entry missing %s, the command is invoked as a filter, with the attachment piped into stdin. However, unlike a filter, the user interacts with the command, instead of just displaying the output in the pager. Just as with the mutt_system() command, Mutt needs to send imap keepalives to keep those connections from closing during the potentially extended invocation. Thanks to John Hawkinson for the bug report, and his suggested patch, which this commit is based upon. M attach.c M filter.c M protos.h 2018-09-14 14:23:04 -0700 Kevin McCarthy (668b76f2) * Remove purpose checks in smime_keys.pl verify step. The purpose checks are subsequently performed, and added as a field to the .index. In any case, it turns out passing multiple '-purpose' arguments isn't even correct: openssl appears to just use the last one. Thanks to David J. Weller-Fahy for reporting the problem, and for including a possible patch. M smime_keys.pl 2018-09-14 14:21:04 -0700 Kevin McCarthy (2a0afe07) * Free queries and alias_queries before exiting. M main.c 2018-09-12 18:23:00 -0700 Kevin McCarthy (488e9cd7) * Change imap_conn_find() to always return an authenticated conn. With the flag MUTT_IMAP_CONN_NONEW, it was already ensured the connection would be authenticated. However, without that flag, an error in opening the connection or authentication would still return an idata. The callers that didn't bother to check the state were still assuming authenticated, because they were all subseqeuently issuing an "authenticated state" command to the server. Rather than add state checks to every caller, just change the function to return NULL if the idata did not end up in an authenticated state. Remove the now redundant state checks in imap_open_mailbox() and imap_get_mailbox(). M imap/imap.c 2018-09-02 14:43:04 -0700 Kevin McCarthy (9ed4bf53) * Change compress examples to type "example" rather than "sect4". M doc/manual.xml.head 2018-09-02 14:22:09 -0700 Kevin McCarthy (34ea7e4c) * Clean up documentation link targets. Move link targets for iconv-hook and sidebar_whitelist to the beginning of a section, rather than a link embedded inside a command. M doc/manual.xml.head 2018-09-02 20:53:41 +0200 Vincent Lefevre (c8112503) * Updated French translation. M po/fr.po 2018-09-01 09:47:07 -0700 Cody Brownstein (daf66918) * Fix typo M init.h 2018-08-31 15:50:00 -0700 Kevin McCarthy (1b4860a5) * Convert certificate prompts to show sha-256 instead of md5. Due to the length of the sha-256 fingerprint, split the output into two lines. Note that this change now requires OpenSSL 0.9.8+ [2005-07-05], and GnuTLS 1.7.4+ [2007-02-05]. M mutt_ssl.c M mutt_ssl_gnutls.c 2018-08-29 15:08:19 -0700 Kevin McCarthy (a2b28936) * Rename pgpring to mutt_pgpring. pgpring is used by another common package, signing-party. At the request of ArchLinux, I am renaming our version to be prefixed by "mutt_" in order to remove a naming conflict. This is a minor inconvenience for pgp2, pgp5, and pgp6 users, but I believe this constitutes an extremely small number of users at this point. I am keeping pgpewrap as-is because it is also used by GnuPG, and has no such naming conflict. M .gitignore M Makefile.am M configure.ac M contrib/pgp2.rc M contrib/pgp5.rc M contrib/pgp6.rc M doc/Makefile.am M doc/PGP-Notes.txt M doc/mutt.man M doc/pgpring.man M init.h 2018-08-29 13:00:14 -0700 Kevin McCarthy (6216a753) * Remove extra lstats() in safe_rename() upon link success. I originally kept the lstat()'s in order to make as few changes as possible to the function. However, Derek Martin argues correctly that if we are trusting the link() 0-retval, the lstats are unnecessary and in fact can cause a performance impact over NFS. M lib.c 2018-08-26 18:43:20 -0700 Kevin McCarthy (2d889227) * Add additional error handling to safe_rename(). It is apparently possible for link() to return an error but the link to still be created. Add a double check for that case. If the files match, unlink the src and return success. M lib.c 2018-08-28 17:43:46 +0200 Tommi A Pirinen (462710bd) * new Finnish translation M configure.ac A po/fi.po 2018-08-28 14:07:31 +0200 Vincent Lefevre (22d20f50) * Updated French translation. M po/fr.po 2018-08-28 13:59:40 +0200 Vincent Lefevre (39e1eb86) * Updated French translation. M po/fr.po 2018-08-26 16:10:13 -0700 Kevin McCarthy (426a6c12) * Merge branch 'stable' 2018-08-26 16:08:06 -0700 Kevin McCarthy (c7695a40) * Fix alias documentation examples. Thanks to Cody Brownstein for pointing out the problem. M doc/manual.xml.head 2018-08-24 15:49:49 -0700 Kevin McCarthy (c041375c) * Change $query_format to use mutt_format_s. Use the character-cell width functions so that multibyte output is properly formatted. M query.c 2018-08-24 12:56:54 -0700 Kevin McCarthy (fa620776) * Display an error message if syncing fails. Ticket 36 reported an issue where a maildir was removed while the mailbox was opened. Later, attempting to sync displayed the message "Writing xxx...", which remained on the screen. The reporter actually thought mutt was frozen, but it was simply that on a sync error Mutt wasn't clearing or updating the message window. There is some error message handling for mbox.c check_mailbox, but I don't think that is the right place to further propogate messages. Instead, add an error to the same place the initial "Writing..." message is created. M mx.c 2018-08-22 15:07:45 -0700 Kevin McCarthy (32734a9f) * Add compose-to-sender functionality. This patch is loosely based on the NeoMutt feature, but adds in support for the attach menu, reuses functionality in send.c, and has proper mode checks. Thanks to Enno for the opening the ticket requesting the port. M OPS M attach.h M curs_main.c M functions.h M mutt.h M pager.c M recvattach.c M recvcmd.c M send.c 2018-08-21 15:51:09 -0700 Kevin McCarthy (1d3b82b7) * Fix nested macro warning. Pull the #if/#else outside of the snprintf in imap.c. On some platforms, snprintf is a macro itself, which leads to a warning about undefined behavior. Thanks to Charles Diza for pointing out the problem. M imap/imap.c 2018-08-14 14:31:34 -0700 Kevin McCarthy (38647ab9) * Remove compare_stat() call in safe_rename(). Some filesystems, such as sshfs, implement hard links strangely. The hard link is created, but is represented by a different inode number by the sshfs layer. The current maildir code goes into an infinite loop in this case. Remove the compare_stat() and trust that a link() return code of 0 means the link really did get created. Still, keep the stats just as a minor check. M lib.c 2018-08-21 15:18:24 -0700 Kevin McCarthy (ec9098a4) * Merge branch 'stable' 2018-08-21 15:00:23 -0700 Kevin McCarthy (78db40f2) * Add autoconf check for libunistring when checking for idn2. -lunistring is only explicitly needed when compiling statically, so add a AC_SEARCH_LIBS to add it to LIBS if it is found. Thanks to Fabrice Fontaine for the heads-up about the problem and the merge request. M configure.ac 2018-08-16 11:49:13 +0200 Vincent Lefevre (b1a9ccad) * Updated French translation. M po/fr.po 2018-08-15 16:13:45 -0700 Kevin McCarthy (7ca3b14b) * Allow ctrl-c to interrupt initial IMAP header download. Once the mailbox is open, it is significantly more complicated to abort and keep Mutt from crashing. But during the initial open/download Mutt is prepared to close the mailbox cleanly on failure. M imap/message.c 2018-08-14 14:04:05 -0700 Kevin McCarthy (5ce9030c) * Remove legacy trim_incomplete_mbyte() in the pager. Commit 4b1deb57 added the trim_incomplete_mbyte() call, but at that time, the function was using fgets() into a fixed-sized buffer. The function was passing in "blen - 1" to the size parameter of fgets, so the check for blen-2 was to see if the buffer was completely filled by the fgets. Commit d39d9c0c converted to use a dynamic buffer, but the trim_incomplete_mbyte() was left in. It now serves no purpose because the entire line will be read in. Presumably the buggy regexp lib should have been fixed by now too. M pager.c 2018-08-13 19:02:32 -0700 Kevin McCarthy (e8b626bc) * Don't match $abort_noattach_regexp on quoted lines. M send.c 2018-08-13 18:56:37 -0700 Kevin McCarthy (a1cf2012) * Refactor out mutt_is_quote_line(). This makes resolve_types() a tiny bit clearer, and will be usable by $abort_noattach. M pager.c M protos.h 2018-08-13 18:22:58 -0700 Kevin McCarthy (f721883d) * Convert abort_noattach scan to use mutt_read_line(). I should have fixed this up before committing the patch. M send.c 2018-08-13 09:43:55 -0700 Kevin McCarthy (fe455d5f) * Only sync CONDSTORE and QRESYNC on the initial download. In the midst of the imap_read_headers() refactor, I forgot to put this guard on the /MODSEQ and /UIDSEQSET storage. Because we don't deal with flag sync issues while the mailbox is open, or when it closes, we only want to write those values to the header cache during the initial download. It makes no sense to perform all the header cache work if new messages come into an open empty mailbox, so add a parameter to flag the initial download, rather than check for msn_begin==1. M imap/command.c M imap/imap.c M imap/imap_private.h M imap/message.c 2018-08-12 22:02:38 +0200 Vincent Lefevre (289e5c8e) * Updated French translation. M po/fr.po 2018-08-11 19:14:10 -0700 Kevin McCarthy (b88aaeb3) * Add more doc for the $imap_condstore and $imap_qresync options. M init.h 2018-08-11 17:59:54 -0700 Kevin McCarthy (a056404c) * Always check UID vs MSN when handling FETCH. Ensure the UID vs MSN check is always done before flags are processed, not just if the UID happened to appear before the FLAGS. Improve the debug messages to make it clearer why a fetch response is being skipped. M imap/command.c 2018-05-26 16:02:04 -0700 Kevin McCarthy (3865d043) * Add QRESYNC support. Refactor imap_read_headers() to break into functions for the different queries. Move uid_hash population to the same place msn_index is populated. Change the VANISHED handler to not decrement MSNs for EARLIER. FastMail, at least, does assume there are no gaps, and really it makes no sense for there to be. Further testing will be needed. M imap/command.c M imap/imap.c M imap/imap_private.h M imap/message.c M imap/util.c M init.h M mutt.h 2018-05-24 13:26:35 -0700 Kevin McCarthy (868aaa48) * Add utility functions for QRESYNC support. * Add function to generate uid_seqset for header cache. This will be used by QREFRESH to reconstruct the msn_index state. * Add seqset data structure and iterator functions. * Add cmd_parse_vanished, for QRESYNC support. * Add and enable QRESYNC capability. * Create helper functions to store and retrieve the uid_seqset. M imap/command.c M imap/imap.c M imap/imap_private.h M imap/message.c M imap/util.c 2018-05-14 18:12:39 -0700 Kevin McCarthy (9079c2a8) * Add basic CONDSTORE support when fetching initial messages. Store MODSEQ in the header cache, and use that to perform a "FETCH CHANGEDSINCE" for header updates when initially downloading messages. Further improvements could be made to add support when syncing. Handling MODSEQ for FLAG updates while the mailbox is open would be complicated by the fact that Mutt supports locally modified headers, so we couldn't accept the new (or subsequent) MODSEQ. However, this initial step may at least provide some benefit when opening the mailbox, which is generally the most time and data intensive. M imap/command.c M imap/imap.c M imap/imap_private.h M imap/message.c M imap/message.h M init.h M lib.c M lib.h M mutt.h 2018-05-26 14:46:16 -0700 Kevin McCarthy (b13a4ba6) * Create mutt_buffer_increase_size() function. This will allow preallocating buffers that we know are going to be big for qresync support. This will also be useful for buffer pools later on. M muttlib.c M protos.h 2018-07-28 18:43:31 -0700 Kevin McCarthy (10c1ac4b) * Move exit cleanup in main() to end of function. Route exits to the same place to ensure uniform cleanup. Message printing is a bit of a mess, but for now, try to keep the exact same behavior. M main.c 2018-07-28 15:26:34 -0700 Kevin McCarthy (911df435) * Fix -z and -Z options to work with IMAP. -Z did not work if $imap_passive was set (the default). I think using the option implies the desire to open a new connection and check buffy at startup, so temporarily turn it off during the buffy. -z was not hooked up for IMAP. Change it to call imap_status(). This also requires $imap_passive be unset, so temporarily turn the option off too. M imap/imap.c M imap/imap.h M main.c M mx.c 2018-07-28 13:16:50 -0700 Kevin McCarthy (6db2f9d1) * Add a note about doc/manual.tex generation. The invocation doesn't work for me, but does work for Ken. I'm reluctant to touch and break it for existing users, so instead add a note to the Makefile.am. Perhaps someone with more knowledge of those tools can make it portable. M doc/Makefile.am 2018-07-28 12:59:35 -0700 Kevin McCarthy (8a81930d) * Fix AUXSORT usage in compare_spam. AUXSORT already checks if the first parameter is zero. Additionally, the macro expands into more than one statement, so putting inside an unbracketed if is misleading and generates a warning on the latest gcc. Fortunately, both statements checked if the first parameter was zero, so no actual bug resulted. M sort.c 2018-07-26 15:34:50 -0700 Ken Moffat (2af6caa1) * Fix manual.pdf toc page numbers. When TeX engines are not run sufficient times there are undefined references - for manual.tex the page numbers in the Table of Contents and the List of Tables render as '??'. In this case: Then shalt thou count to three, no more, no less. M doc/Makefile.am 2018-07-25 18:16:34 -0700 Kevin McCarthy (5f5dc70f) * Add message padding to ctx->vsize computation. Use the mx_msg_padding_size() from the previous commit to be more precise about the correct vsize. This avoids strange situations where all the message are displayed in a limit, but the vsize is not equal to the size. M curs_main.c M mx.c M pattern.c M thread.c 2018-07-25 17:52:40 -0700 Kevin McCarthy (9806d249) * Add mx_ops.msg_padding_size to return the padding for a mx type. Mbox pads with a 1 byte, while mmdf pads with 10. Because compress depends on the child type, we create a mx_ops, which allows compress.c to delegate to the child ops. M compress.c M mailbox.h M mbox.c M mutt.h M mx.c 2018-07-24 18:23:25 -0700 Kevin McCarthy (7b998416) * Skip sort in mbox_sync_mailbox() when new/reopen occurs. Callers of mx_sync_mailbox() and mx_close_mailbox() already check for those cases and call update_index(). So remove the need_sort flag setting when mbox_check_mailbox() returns new/reopen inside mbox_sync_mailbox(). M mbox.c 2018-07-24 18:12:20 -0700 Kevin McCarthy (1147aed6) * Handle reopen/new_mail when closing mailbox in . Other callers, such as OP_QUIT, OP_MAIN_CHANGE_FOLDER, and OP_MAIN_SYNC_FOLDER handle the case where a sync or close_mailbox fails due to new mail or a reopen. OP_MAIN_LOGOUT_ALL appears to have been accidentally missed. Add a call to update_index() to properly sort and update vcounts. M curs_main.c 2018-07-24 03:52:41 +0200 Vincent Lefevre (2030998e) * Add ctx->vsize = 0 in a couple of places. It is not clear whether this is needed, but in both cases, the old value (if not 0) is obsolete. If there is a bug somewhere else about vsize, it will be easier to notice it. M mbox.c M sort.c 2018-07-22 02:57:32 +0200 Vincent Lefevre (1f3a9df8) * Improved limit-to-all detection by skipping leading spaces of the pattern. There are many equivalent limit-to-all patterns, but in practice, one may want to limit to " ~A" in order to prevent the pattern from being recorded in the history. Thus it is important to detect at least this pattern and similar ones. M pattern.c 2018-07-22 01:46:03 +0200 Vincent Lefevre (9a314f02) * Bug fix: reset ctx->vsize in update_index_unthreaded on reopened mailbox. This fixes a bug observed when doing the following: 1. Start Mutt on some mailbox. 2. Limit the view. 3. Set sort by date (thus unthreaded). 4. Set $status_format to display the size of the messages shown (%L). 5. Copy a message matching the limit pattern to this mailbox. 6. With another Mutt instance, remove this message from this mailbox. 7. Move the cursor to update the view. Result: one was getting a value equal to twice the initial size. M curs_main.c 2018-07-22 01:35:32 +0200 Vincent Lefevre (b9eddeab) * Cleanup: avoid an ugly local preprocessor macro. Note: This macro was also hiding the use of a variable, making the code difficult to read. M curs_main.c M pattern.c 2018-07-19 20:28:38 -0700 Kevin McCarthy (1d41321a) * Display matching new messages in a thread-limited index. Previously, the index performed pattern matching first, and then resorted new mail. The problem was that thread-limiting patterns, e.g. ~(pattern), require threading data to properly match against the new messages. We already save new messages for the purposes of uncollapsing threads. To keep the code cleaner, split off update_index() into update_index_threaded()/unthreaded(). Then for threaded mode, save the new messages first. We can then sort (before pattern matching), and use the save_new array to pattern match the new messages afterwards. The $uncollapse_new loop was unnecessarily performing a n^2 search. Simplify to just iteratate over the save_new instead. M curs_main.c 2018-07-17 10:04:24 -0700 Kevin McCarthy (f0772c95) * Minor documentation fix. M doc/manual.xml.head 2018-07-17 17:06:45 +0200 Vincent Lefevre (644699c8) * Updated French translation. M po/fr.po 2018-06-26 15:42:08 -0700 Brandon Long (98cc4236) * Improve OAUTHBEARER support. Move token refresh commands to their own config variables. Consolidate code for refreshing tokens and generating the SASL OAUTHBEARER argument in account.c. Add support for OAUTHBEARER to pop. Fix pop_auth_oauth() mutt_from_base64() call from 1.10.1 release. M account.c M account.h M globals.h M imap/auth_oauth.c M init.h M pop_auth.c M smtp.c 2018-07-16 09:58:43 -0700 Kevin McCarthy (363c3a95) * Merge branch 'stable' 2018-07-16 09:52:23 -0700 Kevin McCarthy (ed9d7727) * automatic post-release commit for mutt-1.10.1 M ChangeLog M UPDATING M VERSION 2018-07-07 19:34:32 -0700 Kevin McCarthy (594f111b) * Merge branch 'stable' 2018-07-07 19:18:55 -0700 Kevin McCarthy (97e5c358) * Merge branch 'stable' 2018-07-02 12:39:14 +0200 Vincent Lefevre (686fb81e) * Updated French translation. M po/fr.po 2018-07-02 12:25:13 +0200 Vincent Lefevre (b3e41194) * Add dependencies for keymap_alldefs.h in po/Makefile.in.in These dependencies are based on those from Makefile.am and are needed so that "make update-po" gets the new strings from OPS, etc. M po/Makefile.in.in 2018-07-01 20:43:24 -0700 Kevin McCarthy (f472eebd) * smime_handle_entity() cleanup. Remove redundant NULL assignments after safe_fclose() calls. Remove some trailing spaces. smimeout can't be NULL, so remove the check around the output translation block. M smime.c 2018-07-01 20:13:11 -0700 Kevin McCarthy (099f4dd4) * Void passphrase on s/mime decryption error. Model this after pgp's pgp_decrypt_part(), which checks if fpout is empty. M smime.c 2018-06-28 20:17:23 -0700 Anton Lindqvist (ac7e2890) * Add check-stats function to calculate mailbox statistics. This allows the statistics to be updated without setting $mail_check_stats or before $mail_check_stats_interval has passed. M OPS M buffy.c M buffy.h M commands.c M curs_main.c M doc/manual.xml.head M functions.h M init.h M menu.c M pager.c M protos.h 2018-06-27 09:45:10 -0700 Kevin McCarthy (0e34a489) * Add a reference to $copy in the $record documentation. M init.h 2018-06-27 09:27:05 -0700 Kevin McCarthy (68d0e90f) * Reset all MonitorContext state on context removal. Reset both the descriptor and changed flag when the current context is removed. Don't make this dependent on the context being valid or being found by monitor_resolve(), in case the context was closed due to some type of error condition. M monitor.c 2018-06-26 19:48:25 -0700 Kevin McCarthy (d28fe351) * Fix MonitorContextDescriptor update on removal. Reset the context descriptor before checking for the monitor being shared by another mailbox. Technically, it would be set properly during the next add, but it shouldn't be left incorrect. M monitor.c 2018-06-25 17:54:43 -0700 Kevin McCarthy (550771fd) * Work around open mailbox monitor code check issue. The monitor code is too fast, and can result in all the changes for a single directory stat update being missed. Work around this issue by not recording stat time updates when the check_mailbox() is triggered by the monitor. This will cause the next subsequent check to take another look. M mh.c M monitor.c M monitor.h 2018-06-25 13:13:55 -0700 Kevin McCarthy (fc040a5b) * Generate error if makedoc is missing a type. Add a comment in init.h to remind devs to update makedoc.c when adding a new type. Change makedoc to fail on a missing type. Otherwise it's too easy to miss the resulting problem in the documentation. Credit goes to Eike Rathke for noting that it was too easy to forget to do this, and something should be fixed. I found his solution a bit too complicated though, and opted for just adding comment and program failure. M doc/makedoc.c M init.h 2018-06-23 10:25:15 +0200 Eike Rathke (f24a1bca) * Make make ctags actually work make ctags broke with Making ctags in po make[1]: Entering directory '.../mutt/po' make[1]: *** No rule to make target 'ctags'. Stop. make[1]: Leaving directory '.../mutt/po' Makefile:867: recipe for target 'ctags-recursive' failed make: *** [ctags-recursive] Error 1 and once fixed the same in intl/ Note that this ctags target scatters tags files over directories. If you use exuberant ctags then simply run ctags -R once in mutt's root dir instead. M intl/Makefile.in M po/Makefile.in.in 2018-06-21 20:42:55 -0700 Kevin McCarthy (6e113ba7) * Remove uninitialized warning for mutt_get_stat_timespec(). The switch covers all the types, but in some cases the compiler still complains. Explicitly set tv_sec = 0 to silence the warning. M muttlib.c 2018-06-19 15:16:33 +0000 Zero King (ef19f486) * Updated Simplified Chinese translation. M po/zh_CN.po 2018-06-19 09:45:29 +0200 Vincent Lefevre (9cdd8847) * mutt_atol: better error handling. * Detect overflow on negative numbers too (< LONG_MIN). * Distinguish between format error and number overflow as already expected (e.g. for pgp_timeout and smime_timeout). M lib.c 2018-06-19 09:37:56 +0200 Vincent Lefevre (1e3473ec) * Reset errno to 0 before calling strtol and testing it in mutt_atol. Otherwise providing LONG_MAX+1 then LONG_MAX gave an error for LONG_MAX too. M lib.c 2018-06-18 22:04:47 +0200 Eike Rathke (4bc76c2f) * Allow larger passphrase timeout values This came up in the comp.mail.mutt newsgroup where a user wasn't satisfied with the SHORT_MAX seconds ~9 hours limit on passphrase timeouts. For the first time made it necessary for the options parser to be able to parse numbers as long values. Also, introduced mutt_add_timeout() to detect possible overflow before adding a timeout to a time_t value and truncate to TIME_T_MAX instead. M date.c M doc/makedoc.c M doc/manual.xml.head M globals.h M init.c M init.h M pgp.c M protos.h M smime.c 2018-06-18 17:19:31 +0200 Vincent Lefevre (508ff237) * Updated French translation. M po/fr.po 2018-06-18 19:35:24 +0800 Kevin McCarthy (e26e5664) * Merge branch 'stable' 2018-06-14 16:17:56 +0800 Kevin McCarthy (120f63a9) * Convert context and buffy to use nanosecond timestamps. The inotify interface has an unfortunate side effect of making Mutt react too quickly to new mail. Sometimes, the mail is only half-delivered when the mailbox is checked. Because Mutt is using the stat mtime - seconds resolution - this means it won't realize there are more messages delivered during the same second. Nanosecond resolution fields were standardized in POSIX.1-2008, so check for and use those if they are available. M buffy.c M buffy.h M configure.ac M mbox.c M mh.c M mutt.h M muttlib.c M mx.c M protos.h 2018-06-14 09:10:51 +0200 Vincent Lefevre (7ec17b81) * Updated French translation. M po/fr.po 2018-06-12 14:11:47 -0700 Brandon Long (fcd33398) * Support for using OAUTHBEARER for smtp. This also means a bunch of smtp auth stuff is now compiled in by default (with --enable-smtp) without having sasl M init.h M smtp.c 2018-06-11 10:39:49 -0700 Brandon Long (798f749e) * Initial support for OAUTHBEARER for IMAP. Gmail supports RFC 7628 for using OAUTH with IMAP, and they really don't like you using password based auth. You can still enable "less secure apps" and then generate an application specific password, but I figured it was time to support it. Being mutt, I punted on some of the "hard" work to an external script, ie getting/refreshing the OAUTH tokens. This avoids the issue of how do you have a client-id and client-secret for an open source project, and the fact that OAUTH discovery is still nascent, so you'd likely need separate things for each of the providers. At least for Gmail, you can use the oauth2.py script from Google's gmail-oauth2-tools: https://github.com/google/gmail-oauth2-tools/blob/master/python/oauth2.py You'd need to get your own oauth client credentials for Gmail here: https://console.developers.google.com/apis/credentials Then, you'd use oauth2.py with --generate_oauth2_token to get a refresh token, and configure mutt with: set imap_authenticators="oauthbearer" set imap_user="" set imap_pass=`/path/to/oauth2.py --quiet --user= --client_id= --client_secret= --refresh_token=` For this patch, I didn't add any new configuration, but I'm open to suggestions on that. The patch also only support SASL-IR to reduce round-trips to the server, but it's certainly possible to change that if we think there are OAUTHBEARER IMAP servers that don't support SASL-IR. It also requires the connection to be encrypted as the access token is re-usable for an hour or so. Again, Gmail only allows encrypted IMAP connections, not sure if any OAUTHBEARER services allow non-encrypted. Turns out that auth failure leaves you in SASL mode, so I have a hack to issue a noop command on error. Not sure if that's just OAUTHBEARER oddness, or whether I should be using lower level mutt imap functions. M imap/Makefile.am M imap/auth.c M imap/auth.h A imap/auth_oauth.c M imap/command.c M imap/imap_private.h 2018-06-10 08:51:30 +0800 Kevin McCarthy (1acb708b) * Move mutt_getch() timeout value into curs_lib.c Change monitor.c to reference the curs_lib value, instead of vice-versa. We need to store the value for both monitor.c's poll and for mutt_monitor_ch() to perform an initial non-blocking check of ncurses' getch() buffer. M curs_lib.c M monitor.c M monitor.h M mutt_curses.h 2018-06-08 14:04:16 +0200 Vincent Lefevre (96b1449f) * Spelling mistake in debug message. M monitor.c 2018-06-08 13:53:46 +0200 Vincent Lefevre (ebdcfa2d) * Missing void in mutt_set_current_menu_redraw_full prototype M mutt_menu.h 2018-06-08 13:49:32 +0200 Vincent Lefevre (99dee3bb) * Give a prototype for mutt_monitor_poll M monitor.c M monitor.h 2018-06-05 17:38:44 -0700 Kevin McCarthy (a2a0aaa5) * Quick fix for ncurses buffering issue with inotify polling. Ncurses does its own buffering for some character sequences, notable Esc-prefixed input. Add a non-blocking check for getch() before performing the mutt_monitor_poll() call. This is a quick fix, which I'll clean up more later. M curs_lib.c M monitor.c M monitor.h 2018-06-04 21:43:41 -0700 Kevin McCarthy (8c99b1f3) * Merge branch 'stable' 2018-06-04 15:51:25 -0700 Kevin McCarthy (71263490) * Merge branch 'stable' 2018-06-03 18:34:21 -0700 Kevin McCarthy (3d2cef4a) * Add new timeout functions to work with inotify monitors. The ncurses timeout() function doesn't affect the new poll inside mutt_monitor_poll(). This meant that $imap_keepalive and $timeout were not being respected when the monitor was used. Create mutt_getch_timeout(), which delegates to timeout() and sets a timeout value mutt_monitor_poll() uses too. M curs_lib.c M keymap.c M monitor.c M monitor.h M mutt_curses.h 2018-06-03 14:54:41 -0700 Kevin McCarthy (5ada2f51) * Merge branch 'stable' 2018-06-03 14:42:41 -0700 Kevin McCarthy (1eb7b895) * Merge branch 'stable' 2018-06-03 14:05:13 -0700 Kevin McCarthy (0182dc85) * Change direct mutt_getch() callers to handle new mail event. The inotify handler now returns -2 (timeout) on a new mail event. Change the direct callers to ignore, so prompts aren't strangely aborted. Also, fix mutt_change_flag() to call mutt_refresh() before the prompt. Apparently ncurses getch() was doing this for us, but now that we are polling STDIN instead, the prompt wasn't displaying. M curs_lib.c M enter.c M flags.c M menu.c 2018-06-03 20:23:57 +0000 GT (f495b84d) * add feature file monitoring with Linux inotify M Makefile.am M buffy.c M configure.ac M curs_lib.c M curs_main.c M doc/manual.xml.head M keymap.c M main.c A monitor.c A monitor.h 2018-06-01 10:46:34 +0100 Edward Betts (479241fe) * Correct spelling mistakes. M buffy.c M contrib/sample.muttrc M crypt-mod.h M crypt.c M doc/manual.xml.head M hcache.c M init.c M intl/dcigettext.c M intl/libgettext.h M mh.c M mutt.h M mutt_ssl.c M pager.c M postpone.c M send.c M sendlib.c M smime_keys.pl M thread.c 2018-05-28 14:29:45 -0700 Kevin McCarthy (b286ea60) * Merge branch 'stable' 2018-05-21 15:12:47 -0700 Kevin McCarthy (63cb8a0a) * Remove mutt_buffer_new() NULL retval checks. It will fail, rather than return NULL. Further clean up imap_new_data() since it also had NULL checks for safe_calloc() that shouldn't happen. M imap/imap.c M imap/util.c M mbyte.c 2018-05-21 13:33:14 -0700 Kevin McCarthy (a001b1d3) * Fix mutt_strncmp size comparison for 'uncolor header'. Thanks to Fabian Groffen for pointing out the discrepancy. mutt_extract_token() null-terminates the token,, so actually there is no need to use "strncmp" for the comparison in this case. However, since the token is being checked against Fields there is no potential harm of a prefix match, so we should fix the number to be consistent with the other token comparisons. M color.c 2018-07-13 14:25:28 -0700 Kevin McCarthy (3d9028fe) * Check outbuf length in mutt_from_base64() The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c. Thanks to Jeriko One for the bug report. M base64.c M imap/auth_cram.c M imap/auth_gss.c M protos.h 2018-07-13 13:05:22 -0700 Kevin McCarthy (6962328c) * Check destlen and truncate in url_pct_encode(). Thanks to Jeriko One for the patch, which this commit is based upon. M url.c 2018-07-13 12:35:50 -0700 Kevin McCarthy (e57a8602) * Verify IMAP status mailbox literal count size. Ensure the length isn't bigger than the idata->buf. Thanks to Jeriko One fo the bug report and patch, which this commit is based upon. M imap/command.c 2018-07-13 12:24:58 -0700 JerikoOne (9347b5c0) * Handle NO response without message properly M imap/command.c 2018-07-13 12:15:00 -0700 Kevin McCarthy (3287534d) * Don't overflow tmp in msg_parse_fetch. Ensure INTERNALDATE and RFC822.SIZE field sizes fit temp buffer. Thanks to Jeriko One for the bug report and patch, which this patch is based upon. M imap/message.c 2018-07-13 11:33:16 -0700 Richard Russon (31eef6c7) * Selectively cache headers. Thanks to NeoMutt and Jeriko One for the patch, which was slightly modified to apply to the Mutt code. M imap/util.c 2018-07-13 11:16:33 -0700 Kevin McCarthy (6aed28b4) * Sanitize POP bcache paths. Protect against bcache directory path traversal for UID values. Thanks for Jeriko One for the bug report and patch, which this commit is based upon. M pop.c 2018-07-13 10:47:11 -0700 JerikoOne (e154cba1) * Ensure UID in fetch_uidl. M pop.c 2018-07-12 21:41:17 -0700 Kevin McCarthy (4d0cd265) * Fix buffer size check in cmd_parse_lsub. The size parameter to url_ciss_tostring() was off by one. M imap/command.c 2018-07-12 20:46:37 -0700 Kevin McCarthy (e0131852) * Fix imap_quote_string() length check errors. The function wasn't properly checking for dlen<2 before quoting, and wasn't properly pre-adjusting dlen to include the initial quote. Thanks to Jeriko One for reporting these issues. M imap/util.c 2018-07-07 19:32:57 -0700 Kevin McCarthy (4ff007ca) * Mention $pgp_decode_command for $pgp_check_gpg_decrypt_status_fd It scans $pgp_decode_command for inline and application/pgp mime types. M init.h 2018-07-07 19:03:44 -0700 Kevin McCarthy (18515281) * Properly quote IMAP mailbox names when (un)subscribing. When handling automatic subscription (via $imap_check_subscribed), or manual subscribe/unsubscribe commands, mutt generating a "mailboxes" command but failed to properly escape backquotes. Thanks to Jeriko One for the detailed bug report and patch, which this commit is based upon. M imap/command.c M imap/imap.c M imap/imap_private.h M imap/util.c 2018-06-18 11:21:38 +0200 Philipp Gesang (df4affd1) * crypt-gpgme: prevent crash on bad S/MIME signature Inform the user about the fingerprint being unavailable instead of crashing if the S/MIME signature is bad. M crypt-gpgme.c 2018-06-04 21:31:33 -0700 Kevin McCarthy (edb4ec84) * Add GnuPG status fd checks for inline pgp. The difficulty is that "BEGIN PGP MESSAGE" could be a signed and armored part, so we can't fail hard if it isn't encrypted. Change pgp_check_decryption_okay() to return more status codes, with >=0 indicating an actual decryption; -2 and -1 indicating plaintext found; and -3 indicating an actual DECRYPTION_FAILED status code seen. Fail hard on -3, but change the message for -2 and -1 to indicate the message was not encrypted. M pgp.c 2018-06-04 15:40:57 -0700 Kevin McCarthy (8ec6d766) * Add $pgp_check_gpg_decrypt_status_fd. If set (the default) mutt performs more thorough checking of the $pgp_decrypt_command status output for GnuPG result codes. Ticket #39 revealed that GnuPG (currently) does not protect against messages that have been manipulated to contain an empty encryption packet followed by a plaintext packet. A huge thanks to Marcus Brinkmann for researching this issue, taking the time to report it to us (and the GnuPG team), and taking even more time to clarify exactly what needed to be checked for.   M contrib/gpg.rc M contrib/pgp2.rc M contrib/pgp5.rc M contrib/pgp6.rc M init.h M mutt.h M pgp.c 2018-06-03 14:52:37 -0700 Kevin McCarthy (cb2329ae) * Revert showing real size for small files in mutt_pretty_size(). I thought the change made in 0fa64ba9 was small enough not to matter, but at least one long-time user took the time to track down the change and request it be reverted. M muttlib.c 2018-06-03 14:40:31 -0700 Kevin McCarthy (33290d12) * Switch build scripts to use `` instead of $() This is for older systems running Bourne shell as /bin/sh. M mkchangelog.sh M mkreldate.sh M version.sh 2013-01-06 19:24:18 +0100 Oswald Buddenhagen (ec96f5f5) * fix inappropriate use of FREE() in ssl init error path OpenSSL structures need to be freed with dedicated functions. M mutt_ssl.c 2018-05-19 10:57:10 -0700 Kevin McCarthy (d55950a8) * automatic post-release commit for mutt-1.10.0 M ChangeLog M VERSION M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2018-05-17 12:24:31 -0700 Ivan Vilata i Balaguer (70c9c89b) * Updated Catalan translation. M po/ca.po 2018-05-17 10:10:52 -0700 TAKAHASHI Tamotsu (5c717661) * Updated Japanese translation. M po/ja.po 2018-05-17 12:45:39 +0200 Vincent Lefevre (30778c5e) * fr.po: updated Project-Id-Version and removed old translations. M po/fr.po 2018-05-14 09:12:11 +0200 Olaf Hering (f77b641d) * Updated German translation. Signed-off-by: Olaf Hering M po/de.po 2018-05-10 09:12:19 -0700 Kevin McCarthy (400b44a1) * Note that $pgp/smime_self_encrypt now default to set. M UPDATING 2018-05-10 09:00:21 -0700 Kevin McCarthy (2364c059) * Add note about libidn2 v2.0.0 or greater to UPDATING file. M UPDATING 2018-05-09 09:32:48 -0700 Vsevolod Volkov (435ca12e) * Updated Russian translation. M po/ru.po 2018-05-09 09:30:55 -0700 Vsevolod Volkov (c4559f92) * Updated Ukrainian translation. M po/uk.po 2018-05-08 19:32:12 -0700 Kevin McCarthy (16a581cf) * Add declaration checks for libidn2. The libidn compatibilty layer was only added in version 2.0.0 (2017-03-29). idn2.h defines macros, so use AC_CHECK_DECL instead of AC_CHECK_FUNC. $with_idn2 doesn't have an "auto" state, so remove a few unneeded copy/paste checks from idn. M configure.ac 2018-05-08 10:11:17 -0700 Petr Pisar (249a6f6c) * Updated Czech translation. M po/cs.po 2018-05-05 07:35:59 -0700 Kevin McCarthy (0e9f0bed) * Update the UPDATING file for 1.10.0. M UPDATING 2018-05-06 09:43:25 -0700 Morten Bo Johansen (cd981cd0) * Updated Danish translation. M po/da.po 2018-05-05 07:39:36 -0700 lilydjwg (3d9b2704) * Updated Simplified Chinese translation. M po/zh_CN.po 2018-05-04 02:43:56 +0200 Vincent Lefevre (643e31c3) * Updated French translation. M po/fr.po 2018-04-29 15:10:21 -0700 Kevin McCarthy (97bc33dc) * Add echo command. Prints messages using mutt_message(). Sets OPTFORCEREFRESH to allow updates in the middle of a macro. Calls mutt_sleep(0) to pause for $sleep_time seconds after displaying the message. M doc/manual.xml.head M init.c M init.h 2018-05-03 12:24:55 +0200 Vincent Lefevre (92ae6db7) * Missing comma. M doc/manual.xml.head 2018-05-01 15:13:51 -0700 Kevin McCarthy (9e8ee145) * Update copyright notices. M COPYRIGHT M doc/manual.xml.head M doc/mutt.man M doc/smime_keys.man M main.c 2018-04-28 13:21:42 -0700 Kevin McCarthy (e4557546) * Update pattern documentation. Note that ~b, ~B, ~h, ~M, and ~X read the message in, and that this can be much slower. Change =b, =B, =h table rows to document just the IMAP behavior. The "=" simple string behavior is already covered below, and makes it less obvious whether "***)" should be added to those entries in the table. Break up the simple string and imap server-side matching explanation into two paragraphs. Add ~M to the list of patterns you can't use message scoring with. Add equivalent, if briefer, explanations to the muttrc.man page. M doc/manual.xml.head M doc/muttrc.man.head 2018-04-26 18:00:00 -0700 Ammon Riley (974235c7) * Add ~M pattern to match mime Content-Types. M doc/manual.xml.head M doc/muttrc.man.head M mutt.h M pattern.c 2018-04-30 16:17:52 -0700 Kevin McCarthy (c9f5498c) * Add more explanation of known vs subscribed lists to manual. Mention in both the "Mailing Lists" and "Handling Mailing Lists" sections the difference between known and subscribed mailing lists. Note that the Mail-Followup-To header is generated if any of the recipients are known mailing lists. If any of those are subscribed mailing lists, the sender's address will not be in the header. If all of them are known (but not subscribed), the sender's address will be added to the header. M doc/manual.xml.head 2018-04-23 23:48:33 +0200 Vincent Lefevre (d12c361c) * Updated French translation. M po/fr.po 2018-04-22 13:02:06 -0700 Kevin McCarthy (26b82202) * Add Error History function and config var. , by default unbound, shows a list of the recent error messages displayed by Mutt via mutt_message() or mutt_error(). $error_history sets the size of the history ring. For now, I've decided to include mutt_message() messages too. If this is too chatty, we can restrict it to mutt_error() easily in the future. M OPS M curs_lib.c M curs_main.c M functions.h M globals.h M init.c M init.h M menu.c M pager.c M protos.h 2018-04-20 17:28:47 +0200 Vincent Lefevre (f2e8392f) * Updated French translation. M po/fr.po 2018-04-19 15:40:35 -0700 Kevin McCarthy (3ec02fbc) * Add $sort_browser options for count and unread. M browser.c M init.h 2018-04-19 13:51:07 -0700 Kevin McCarthy (69959820) * Add $browser_abbreviate_mailboxes. This allows '=' and '~' mailboxes shortcuts to be turned off in the browser mailbox list. The default $sort_browser value of "alpha" uses strcoll(3), which ignores some punctuation. When using multiple accounts with dynamically changing values of $folder, this can lead to an unintuitive sorting order. (See issue #22 for an example.) This problem came about because of commit 8328ce68, which enabled mutt_pretty_mailbox() calls for IMAP and POP mailboxes too. The commit had a valid point about consistency and too-wide mailbox listings, so I don't really want to revert it. This option provides an alternative to completely enable/disable the shortcuts for those who run into an issue. M browser.c M init.h M mutt.h 2018-04-16 16:32:33 -0700 Kevin McCarthy (4e4574c4) * Fix mkreldate.sh in master to use [-r] test too. M mkreldate.sh 2018-04-16 16:31:08 -0700 Kevin McCarthy (8da2e090) * Merge branch 'stable' 2018-04-16 16:29:08 -0700 Kevin McCarthy (296ccab5) * Switch to using [ -r ] in version.sh for Bourne shell compatibility. Thanks to Paul Keusemann for pointing out the issue. M version.sh 2018-04-15 15:57:28 -0700 Kevin McCarthy (79939350) * Add a comment in auth_gss about RFCs and null-termination. M imap/auth_gss.c 2018-04-09 13:46:42 +0200 Matej Muzila (13a2f614) * Add libidn2 support M configure.ac M doc/makedoc-defs.h M init.h M main.c M mutt.h M mutt_idna.c M mutt_idna.h M mutt_socket.c M mutt_ssl.c 2018-04-14 13:28:11 -0700 Kevin McCarthy (a21fb60e) * Merge branch 'stable' 2018-04-14 13:22:48 -0700 Kevin McCarthy (bf161cf5) * automatic post-release commit for mutt-1.9.5 M ChangeLog M UPDATING M VERSION 2018-04-13 20:48:28 -0700 Kevin McCarthy (2e8f6e3f) * Merge branch 'stable' 2018-04-13 19:17:24 -0700 Kevin McCarthy (13a8f660) * Merge branch 'stable' 2018-04-09 15:39:08 -0700 Kevin McCarthy (29d6f261) * Merge branch 'stable' 2018-04-02 11:36:05 -0700 Kevin McCarthy (9bb76cce) * Merge branch 'stable' 2018-04-02 10:28:12 -0700 Grzegorz Szymaszek (1e9df3c8) * Updated Polish translation. M po/pl.po 2018-03-30 13:37:54 +0100 Christian Ebert (e56d30e5) * pager specifc "show incoming mailboxes list" macro Exiting the pager before change-folder avoids 'Not available in this menu' error when selecting a different entry in some circumstances. M doc/Muttrc.head 2018-03-24 15:10:13 -0700 Kevin McCarthy (ed3f8b6a) * Increase account.user/login size to 128. Like the pass field in commit 52949004, the existing size was insufficient for the reporter of issue #18. For now, just bump up the size, but I'll move up looking into making these dynamically sized. M account.h 2018-03-22 20:23:46 -0700 Kevin McCarthy (3ffc0ec4) * Remove dead code in pgp.c pgp_extract_keys_from_messages() has been subsumed by crypt_extract_keys_from_messages(). The function had incorrect multi-bit flag comparisons, but since it's dead code, remove it instead. M pgp.c 2018-03-22 20:04:46 -0700 Kevin McCarthy (47e6c5aa) * Fix comparison of flags with multiple bits set. PGPENCRYPT, PGPKEY, SMIMEENCRYPT, and SMIMEOPAQUE are all combination flags, with multiple bits set. In a few places these flags were bitwise-and'ed incorrectly: expecting a non-zero result to indicate all the bits in the flag were set. Change those to explicitly compare the result against the original flag. M hdrline.c M pattern.c M recvattach.c M sendlib.c 2018-03-23 02:59:38 +0100 Vincent Lefevre (66063c45) * Updated French translation. M po/fr.po 2018-03-22 12:29:59 -0700 Kevin McCarthy (94b9549e) * Change prompt string for $crypt_verify_sig Thanks to Michael Tatge for pointing out that the prompt is used for both PGP and S/MIME. M commands.c 2018-03-22 09:39:49 -0700 Kevin McCarthy (e275bb06) * Merge branch 'stable' 2018-03-15 10:24:35 -0700 Kevin McCarthy (e250c602) * Change mutt_error call in mutt_gpgme_set_sender() to dprint. The message is not an error message, and flies by so quickly it has little informative content. Change it to use dprint instead. Thanks to Darac Marjal for reporting the issue. M crypt-gpgme.c 2018-03-14 04:28:20 +0100 Vincent Lefevre (2ddd541e) * Updated French translation. M po/fr.po 2018-03-13 19:09:45 -0700 Kevin McCarthy (a0b3740b) * Improve the error message when a signature is missing. Thanks to Vincent Lefèvre for reporting the issue and for the wording suggestion! M crypt.c 2018-03-12 12:24:24 +0100 Vincent Lefevre (f6232a25) * Updated French translation. M po/fr.po 2018-03-11 12:48:46 -0700 Kevin McCarthy (f47a159b) * Add $abort_noattach and $abort_noattach_regexp options. $abort_noattach_regexp is matched against the body of a message. If so, the $abort_noattach quadoption is used to prompt whether to abort sending. Thanks to Antonio Radici for bringing the original version of the patch to our attention, which he pulled from https://github.com/tlvince/pkgbuild/blob/master/mutt-kiss/mutt-attach.patch This version was rewritten to use a regexp, to fix a few issues, and to better fit in with Mutt styles and conventions. M init.h M mutt.h M mutt_regex.h M send.c 2018-03-03 13:44:12 -0800 Kevin McCarthy (6829c390) * Merge branch 'stable' 2018-02-28 15:21:50 -0800 Kevin McCarthy (7561d7bc) * Merge branch 'stable' 2018-02-21 18:32:12 -0800 Kevin McCarthy (338019b3) * Merge branch 'stable' 2018-02-20 19:09:16 -0800 Kevin McCarthy (2d4081ac) * Improve index color cache flushing behavior. Flush when redefining the colors for an existing color line, in addition to when defining a new color line. Flush only when uncoloring the index. M color.c 2018-02-14 10:33:41 +0100 Vincent Lefevre (ebd93b50) * Avoid a potential integer overflow if a Content-Length value is huge. M mbox.c 2018-02-08 12:20:02 +0100 Vincent Lefevre (088e1903) * Change mkreldate.sh to use the UTC date with git, so that it is increasing. M mkreldate.sh 2018-02-06 14:42:40 -0800 Kevin McCarthy (02d571c2) * Fix document version and date for git build. Change mkreldate.sh to output just the date, so it can be used in the manual too. M Makefile.am M doc/Makefile.am M mkreldate.sh 2018-02-05 18:43:12 -0800 Kevin McCarthy (fefbd81f) * Use git to generate the release date if available. For now, fall back to the ChangeLog. Perhaps the release date should be generated from a file, similar to VERSION, for those cases instead. M Makefile.am A mkreldate.sh 2018-02-06 01:57:48 +0100 Vincent Lefevre (65e1f5c8) * Add a blank line between the compile options and the contact info for mutt -v M main.c 2018-02-05 13:19:40 +0100 Vincent Lefevre (731629e2) * Updated French translation. M po/fr.po 2018-02-04 15:24:59 -0800 Kevin McCarthy (e82c9ce2) * Put gitlab issues url on a separate line. This removes the need to use brackets, and makes it easier for translations to fit within 80 columns. Thanks to Derek Martin for the suggested wording, and to Vincent Lefèvre for proofreading and noticing a small error. M main.c 2018-02-04 15:15:55 -0800 Kevin McCarthy (1fe6318b) * Fix history menu title. Remove an accidental leading space. Thanks to Vincent Lefèvre for noticing the problem and providing a patch! M history.c M po/fr.po 2018-02-04 18:29:52 +0100 Vincent Lefevre (f57e5171) * Updated French translation. M po/fr.po 2018-02-03 18:08:28 -0800 Kevin McCarthy (aa6903c9) * Add history-search function, bound to ctrl-r. Create a very basic "search history" functionality in the line editor. It uses the current input, and searches backward through history. If there is one match, it immediately uses that otherwise it pops up a simple menu of matches. M OPS M doc/manual.xml.head M enter.c M functions.h M history.c M history.h 2018-02-01 11:14:11 -0800 Kevin McCarthy (d5544ef6) * Merge branch 'stable' 2018-01-31 15:01:18 -0800 Kevin McCarthy (22e1e87c) * Merge branch 'stable' 2018-01-31 14:22:07 -0800 Kevin McCarthy (fea9f7db) * Merge branch 'stable' 2018-01-27 11:58:12 -0800 Kevin McCarthy (eca744f5) * Merge branch 'stable' 2018-01-21 19:41:47 -0800 Kevin McCarthy (9ee1f84d) * Remove useless assignments in add_to_list functions. The code was probably pulled from some of the header processing functions, which were in a loop. In those versions, "last" pointed to a collection of new entries appended, but in these two functions, updating last just obfuscates the code. M init.c 2018-01-21 18:56:12 -0800 Kevin McCarthy (8dd14816) * Add a blurb about $new_mail_command in the mailboxes section. M doc/manual.xml.head 2018-01-21 18:34:45 -0800 Kevin McCarthy (18701782) * Merge branch 'stable' 2018-01-17 19:20:04 -0800 Kevin McCarthy (95c7ff2b) * Merge branch 'stable' 2018-01-17 19:00:50 -0800 Kevin McCarthy (fb3593b3) * Merge branch 'stable' 2018-01-17 18:18:20 -0800 Kevin McCarthy (49c0d177) * Merge branch 'stable' 2018-01-16 09:40:11 +0100 Olaf Hering (8fac7a94) * Update po Followup for untranslate Copyright list. Signed-off-by: Olaf Hering M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2018-01-16 09:40:06 +0100 Olaf Hering (18894e9c) * Split Copyright and Thanks in help output. The Copyright string is changing often, and its content is obvious. It does not need translation. The remaining string can be translated. This change avoids a stale translation once one of the years change. Signed-off-by: Olaf Hering M main.c 2018-01-16 09:39:57 +0100 Olaf Hering (34267ed4) * Update po Preparation for following changes. Signed-off-by: Olaf Hering M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2018-01-15 20:20:17 -0800 Brendan Cully (38d106c6) * add clang static analysis to builds M .gitlab-ci.yml 2018-01-15 18:40:20 -0800 Brendan Cully (4e2b370c) * gitlab-ci: build against openssl and gnutls M .gitlab-ci.yml 2018-01-15 16:06:30 -0800 Kevin McCarthy (3e9647b9) * Add pgp_default_key and smime_sign_as info to contrib rc files. Explain $pgp_default_key vs $pgp_sign_as in gpg.rc. Explain $smime_default_key vs $smime_sign_as in smime.rc. M contrib/gpg.rc M contrib/smime.rc 2018-01-15 14:20:28 -0800 Kevin McCarthy (ee28581a) * Add pages to .gitlab-ci.yml Use this to regenerate the manual and store it in the pages for the project. M .gitlab-ci.yml 2018-01-15 14:43:53 +0000 Konstantin Stephan (6bd130cf) * Update smime.rc: Typo fix, consistent headings M contrib/smime.rc 2018-01-14 15:50:34 -0800 Brendan Cully (d1724851) * use mutt/ubuntu build image, build with everything on M .gitlab-ci.yml 2018-01-13 14:49:35 -0800 Brendan Cully (797a9e38) * skeleton .gitlab-ci.yml to compile commits A .gitlab-ci.yml 2018-01-13 21:21:35 +0100 Grzegorz Szymaszek (7ddb1ae3) * Fixed GPGME translations that weren’t shown but affected the keyboard M po/pl.po 2018-01-13 20:27:11 +0100 Grzegorz Szymaszek (637d4229) * Update pl.po M po/pl.po 2018-01-13 09:47:09 +0100 Olaf Hering (6c271bc4) * Fix typo in de.po Signed-off-by: Olaf Hering M po/de.po 2013-12-03 16:42:39 +0100 Olaf Hering (5619de2b) * examine_directory: set directory/symlink size to zero The size of a directory or symlink in the folder browser is not meaningful. For directories it means just how many blocks were allocated to hold all entries. It does not mean that the entries are still present in the directory. For symlinks its the size of the target. Set both to zero to simplify the folder browser output. Signed-off-by: Olaf Hering M browser.c 2013-12-03 16:43:49 +0100 Olaf Hering (0fa64ba9) * mutt_pretty_size: show real number for small files If a file is smaller than a certain size it is unfriendly to print 0K or 0,1K as number of mails or as file size. Instead use the real number. Signed-off-by: Olaf Hering M muttlib.c 2018-01-11 15:16:07 -0800 Kevin McCarthy (4fa32548) * Merge branch 'stable' 2018-01-11 13:24:30 -0800 Kevin McCarthy (db252e61) * Create pgp and s/mime default and sign_as key vars. (see #3983) The $postpone_encrypt and $(pgp/smime)_self_encrypt configuration variables have created a somewhat messier situation for users. Many of them now have to specify their keys across multiple configuration variables. (Trac) Ticket #3983 had a reasonable request: "if my encrypt and signing keys are the same, why can't I just specify my key once in my .muttrc?" The problem currently is that $smime_default_key and $pgp_sign_as are both used to specify signing keys, and are set by the "sign (a)s" security menu choice. So we can't store encryption keys there because some users have separate sign-only capability keys. Create $pgp_default_key to store the default encryption key. Change signing to use $pgp_default_key, unless overridden by $pgp_sign_as. The pgp "sign (a)s" will continue setting $pgp_sign_as. Create $smime_sign_as. Change signing to use $smime_default_key unless overridden by $smime_sign_as. Change s/mime "sign (a)s" menu to set $smime_sign_as instead. Change $postpone_encrypt and $(pgp/smime)_self_encrypt to use $(pgp/smime)_default_key by default. Mark $(pgp/smime)_self_encrypt_as deprecated. They are now aliases for the $(pgp/smime)_default_key config vars. Change $(pgp/smime)_self_encrypt default to set. The intent is that most users now need only set $(pgp/smime)_default_key. If they have a sign-only key, or have separate signing and encryption keys, they can put that in $(pgp/smime)_sign_as. This also enables to default self_encrypt on and solve a very common request. Thanks to Michele Marcionelli and Vincent Lefèvre for gently pushing me towards a solution. M compose.c M crypt-gpgme.c M crypt.c M doc/manual.xml.head M globals.h M init.h M pgpinvoke.c M postpone.c M send.c M sendlib.c M smime.c 2018-01-09 04:09:11 +0100 Vincent Lefevre (be68a00c) * Updated French translation. M po/fr.po 2018-01-08 18:07:24 -0800 Kevin McCarthy (2d2665d4) * Change the default of NewMailCmd to 0. This is so the documentation is generated consistently for unset strings. M init.h 2018-01-07 14:49:45 +0100 Yoshiki Vázquez Baeza (2f39cf2a) * NewMailCmd: optionally execute a command upon new mail arrival This setting allows to run any external program to e.g. produce a notification on the desktop when Mutt finds new mail. Signed-off-by: Fabian Groffen M curs_main.c M globals.h M init.h 2018-01-07 13:06:56 +0100 Fabian Groffen (5d5dce99) * cmd_handle_fatal: make error message a bit more descriptive When there are multiple IMAP connections available, "Mailbox closed" doesn't give a hint as to which one. Use account info to identify which mailbox was closed. M imap/command.c 2018-01-07 12:18:37 -0800 Kevin McCarthy (0df23207) * Merge branch 'stable' 2018-01-06 16:15:39 -0800 Kevin McCarthy (e0229b87) * Merge branch 'stable' 2018-01-04 17:59:20 +0100 Vincent Lefevre (2f510d60) * Updated French translation. M po/fr.po 2017-12-30 19:10:16 -0800 Kevin McCarthy (561e106c) * Disable message security if the backend is not available. Gitlab issue #3 exposed an awkward corner case: if mutt is configured without PGP or S/MIME, and with GPGME, but $crypt_use_gpgme is unset. In this case, no backend will be available, but WithCrypto will be set with both APPLICATION_PGP and APPLICATION_SMIME bits. That will allow various config vars to enable encryption or signing, even though there will be no backend available to perform them. The message security flag might then be set, but when the user hits send, will end up back at the compose menu due to the error. The pgp or smime menu might not even be available to clear the security setting! Add a check in send.c before the compose menu is invoked, and give a warning message for the menu ops inside the compose menu. I believe this should prevent the issue. However this is a corner case combined with user misconfiguration, so I don't believe is worth a large effort to completely eradicate. M compose.c M cryptglue.c M mutt_crypt.h M send.c 2017-12-29 15:20:38 +0100 Grzegorz Szymaszek (521e45e7) * Converted po/pl.po from ISO-8859-2 to UTF-8 I’ve converted the Polish translation file to UTF-8 using iconv 2.25. M po/pl.po 2017-12-28 13:07:21 -0800 Kevin McCarthy (8b77d84d) * Mention self_encrypt options in the documentation. (closes #3983) Add a paragraph to the "Sending Cryptographically Signed/Encrypted Messages" section of the manual. M doc/manual.xml.head 2017-12-26 15:09:28 -0800 Kevin McCarthy (e7addcf0) * Merge branch 'stable' 2017-12-18 13:02:17 -0800 Kevin McCarthy (248e9972) * Merge branch 'stable' 2017-12-18 03:01:07 +0100 Vincent Lefevre (3b142cea) * Fixed git repo detection: for worktrees, .git is a plain file. M version.sh 2017-12-17 13:36:21 +0100 Adam Borowski (489a1c39) * manually touch atime when reading a mbox file The only common use of atime left is local mail agents leaving a mark on mbox file after the mail has been read. And, since POSIX-2008, it is possible to use futimens() to alter atime even on filesystems mounted with noatime. There's no extra cost for doing this on when atime updates are enabled: the inode will be dirty already. M configure.ac M main.c M mbox.c M muttlib.c M protos.h 2017-12-17 12:16:10 -0800 Kevin McCarthy (f030bd36) * Add config.cache to .gitignore file. M .gitignore 2017-12-15 15:56:39 -0800 Kevin McCarthy (89e44318) * Merge branch 'stable' 2017-12-15 12:18:12 -0800 Kevin McCarthy (8b17d880) * Merge branch 'stable' 2017-12-14 16:21:04 -0800 Kevin McCarthy (35850181) * Merge branch 'stable' 2017-12-12 18:27:24 -0800 Kevin McCarthy (e290a8fc) * Merge branch 'stable' 2017-12-10 20:06:05 -0800 Kevin McCarthy (f9ca5cda) * Merge branch 'stable' 2017-12-03 18:15:21 -0800 Kevin McCarthy (50f85f3b) * Merge branch 'stable' 2017-12-02 19:27:14 -0800 Kevin McCarthy (56be6f0a) * Convert to .gitignore file. A .gitignore D .hgignore 2017-11-29 04:21:26 +0100 Vincent Lefevre (376280bf) * Updated French translation. M po/fr.po 2017-11-28 19:01:15 -0800 Kevin McCarthy (8b3d4db4) * Update copyright notices. M COPYRIGHT M bcache.c M buffy.c M imap/imap.c M imap/imap.h M main.c M sidebar.c 2017-11-21 18:22:26 -0800 Kevin McCarthy (20f5519e) * Enable full address matching during message scoring. (closes #2179) (see #3243) The tickets are old, but it seems reasonable to expect the pattern matching to behave the same in scoring as when applying limits or searching. I don't foresee a huge performance hit, and there are no arguments against the change in the tickets. Thanks to the muttng devs (noted in ticket 2179) and Kornilios Kourtis (from the Debian ticket referenced in ticket 3243). M score.c 2017-11-19 15:47:45 -0800 Anton Lindqvist (117f7de1) * Add NONULL to debug statement in fold_one_header(). M sendlib.c 2017-11-18 19:13:08 -0800 Kevin McCarthy (3ccd1990) * Fix ansi escape sequences with both reset and color parameters. (closes #3689) The initial 0 "reset/normal" was setting attr = ANSI_OFF, which was subsequently being or'ed with ANSI_COLOR. The color resolution was then checking for the ANSI_OFF bit and turning all coloring off, even though ANSI_COLOR was also set. Change the color resolution to check for "attr == ANSI_OFF" instead, so the color isn't reset unless the reset occurs last in the sequence. M pager.c 2017-11-15 14:53:24 -0800 Kevin McCarthy (78d2c197) * Remove useless else branch in the $smart_wrap code. (see #3857) Thanks to Vincent Lefèvre for noticing the nested else was redundant, since buf_ptr is already set to "buf + cnt" after the format_line() call. This allows us to merge the inner and outer if statement, resulting in simpler code. M pager.c 2017-11-15 14:53:19 -0800 Kevin McCarthy (b3940ed4) * Fix $smart_wrap to not be disabled by whitespace-prefixed lines. (closes #3857) changeset:737102af74eb fixed a folded header display issue with $smart_wrap by disabling $smart_wrap for lines beginning with whitespace. Unfortunately, this turns off smart wrapping in the body of an email too, even when the line has other whitespace breaks in it. An earlier commit, changeset:125076e0fdfa added an infinite loop fix when MUTT_PAGER_NSKIP is set, by disabling the smart_wrap if the space backtracking went to the beginning of the line. That is, a line beginning with 1+ whitespace followed by a single long word. Extend this second commit by always disabling the smart_wrap in that case, not just when MUTT_PAGER_NSKIP is set. This also solves the folded header issue without other side effects. M pager.c 2017-11-11 15:49:15 -0800 Kevin McCarthy (610c6b0a) * Add $change_folder_next option to control mailbox suggestion order. This patch is out of the Gentoo package maintained by Fabian Groffen. From the link below, it appears the original author was Simon Burge. I made some minor changes to get it to apply correctly, and cleaned up the documentation a bit. Original patch description: This patch brings back the original behaviour of change-folder, which some people find more useful. It suggests the next folder in your mailboxes list that has new mail measured from the current folder, instead of the first folder from your mailboxes list in any case. This prevents starvation of folders defined at the back of your list ;) See discussion: http://thread.gmane.org/gmane.mail.mutt.devel/12457 M curs_main.c M init.h M mutt.h 2017-11-11 19:13:40 +0100 Vincent Lefevre (11a10487) * Updated French translation. M po/fr.po 2017-11-11 18:59:31 +0100 Vincent Lefevre (14e37771) * Add %R (number of read messages) for $status_format. M init.h M status.c 2017-11-10 13:06:43 -0800 Kevin McCarthy (d1659601) * Add message count to $move quadoption prompt. Display the number of messages that will be moved in the quadoption prompt, which might prove helpful for some people. Thank you to Daan van Rossum for suggesting the improvement. M mx.c 2017-11-09 15:06:19 +0100 Vincent Lefevre (6db8d16a) * Make sure that fgets and fgetc are undefined before their redefinition. This fixes a potential issue from changeset e0a103845344. M mutt.h 2017-11-08 13:40:34 -0800 David Wilson (829db35b) * Use fgets_unlocked and fgetc_unlocked if available. Since mutt does not use threads, there is no reason it should use the locked variants of the FILE* IO functions. This checks if the unlocked functions are available, and if so enables them globally via mutt.h. Cuts load time for a 56k message, 1.8GB /var/mail mailbox from 14 seconds to ~6 seconds, since we avoid acquiring and releasing a mutex for every character of input read. Before: 0m14.376s 74.98% mutt libc-2.18.so [.] _IO_getc 11.87% mutt mutt [.] mbox_parse_mailbox 0.94% mutt [kernel.kallsyms] [k] copy_user_generic_string 0.83% mutt libc-2.18.so [.] __strchr_sse2 0.53% mutt libc-2.18.so [.] __memcpy_sse2 0.44% mutt libc-2.18.so [.] _int_malloc After: 6 seconds 68.92% mutt mutt [.] mbox_parse_mailbox 2.25% mutt [kernel.kallsyms] [k] copy_user_generic_string 1.73% mutt libc-2.18.so [.] __strchr_sse2 1.24% mutt libc-2.18.so [.] __memcpy_sse2 1.17% mutt libc-2.18.so [.] _int_malloc 0.87% mutt libc-2.18.so [.] __strspn_sse42 M configure.ac M mutt.h 2017-11-08 12:57:50 -0800 Kevin McCarthy (d2262ccb) * Note which ssl config vars are GnuTLS or OpenSSL only. (closes #3781) It was not obvious that the ssl_ca_certificates_file was only for GnuTLS, or that the ssl_usesystemcerts was only for OpenSSL. M init.h 2017-10-15 15:13:18 +0800 Kevin McCarthy (336f7d88) * Add polling for the IDLE command. (closes #3957) Add $imap_poll_timeout poll for IDLE, since this is also a command that will freeze after waking if $imap_idle is set. M imap/command.c 2017-09-30 19:16:56 -0700 Kevin McCarthy (d7e84d75) * merge stable 2017-09-28 11:57:56 -0700 Roger Pau Monne (cfcd8787) * Enable $reply_self for group-reply, even with $metoo unset. For a (r)eply, the $metoo variable does not have any effect because there is a single recipient. However with (g)roup reply, the To was initially set to the sender, but subsequently removed my $nometoo. The empty To line is then replaced with the Cc line, resulting in a (logically correct but) surprising outcome. Change the behavior such that $nometoo will not strip a single To recipient when $reply_self is set. M send.c 2017-09-27 13:45:36 -0700 Kevin McCarthy (285baf9a) * Make cmd_parse_fetch() more precise about setting reopen/check flags. Previously any FETCH with FLAGS would result in either idata->reopen |= IMAP_EXPUNGE_PENDING; -or- idata->check_status = IMAP_FLAGS_PENDING; being set. This is unnecessary in the case of responses to FLAGS.SILENT updates sent by mutt (which seem to commonly happen now-a-days). Change imap_set_flags() to compare the old server flags against the new ones, and report when _those_ updates would/did result in a local header flag change. Only set one of the reopen/check_status flags in the event of an actual change (or potential change if a local change has been made to the header.) M imap/command.c M imap/imap_private.h M imap/message.c 2017-09-26 19:45:23 -0700 Kevin McCarthy (1099795d) * merge stable 2017-09-25 18:40:32 -0700 Kevin McCarthy (bf34a038) * Change maildir and mh check_mailbox to use dynamic sized hash. (closes #3973) The original patch is by Matt Fleming, originally posted at http://www.codeblueprint.co.uk/2017/01/15/a-kernel-devs-approach-to-improving2 The comments there indicate Matt tried to submit to trac and mutt-dev, but ran into registration problems. Thank you for the patch, and sorry for those problems, Matt. I modified the patch by making the same change to the mh_check_mailbox() code too. M mh.c 2017-09-23 11:41:25 -0700 Kevin McCarthy (f5935f3d) * merge stable 2017-09-22 11:26:19 -0700 Kevin McCarthy (fa79d68e) * merge stable 2017-09-22 17:52:16 +0200 Vincent Lefevre (83d23fd9) * Updated French translation. M po/fr.po 2017-09-20 10:43:33 -0700 Kevin McCarthy (56729e32) * Display an error message when delete mailbox fails. (see #3968) M browser.c 2017-09-14 12:48:26 -0700 Kevin McCarthy (bd906764) * merge stable 2017-09-13 15:54:31 -0700 Kevin McCarthy (baffaa68) * merge stable 2017-09-05 17:33:45 +0200 Vincent Lefevre (e5515a9c) * Updated French translation. M po/fr.po 2017-09-04 15:51:07 -0700 Kevin McCarthy (03b0bec0) * Remove 'really' from the purge-message help description. This made it sound to the translators like a question. M OPS 2017-09-04 15:34:32 -0700 Kevin McCarthy (563143f8) * Add L10N comment to generated keymap_defs.h files. Make it clearer to translators that the strings are for the help screen. M gen_defs 2017-09-04 13:26:55 -0700 Kevin McCarthy (f2216024) * Add warning about using inline pgp with format=flowed. (closes #3963) The reporter noted that when trying to use inline signing with format=flowed, the flowed was turned off. After some research, this appears to be deliberate, probably because of strange interactions between inline PGP and format=flowed. In fact the RFC strongly discourages their combined use: https://tools.ietf.org/html/rfc3676#section-4.6 Add a warning and prompt to use PGP/MIME in mutt_protect(). M crypt.c 2017-09-04 09:47:26 -0700 Kevin McCarthy (61c7e548) * merge stable 2018-04-13 20:39:35 -0700 Kevin McCarthy (ceb0534d) * Improve gss debug printing of status_string. Commit f52ee2f7 ensured the debug strings were properly '\0' terminated. However, it did not prevent the strncpy from reading past the end of the status_string.value data; it simply capped it afterwards. Improve the code so it only reads up to status_string.length without overwriting the buffer. M imap/auth_gss.c 2018-04-13 19:03:29 -0700 Kevin McCarthy (f52ee2f7) * Remove trailing null count from gss_buffer_desc.length field. RFC 2744 section 3.2.2 clearly states that trailing NULL characters are not to be included in the length field, and are not to be assumed to be present in the value field. Thanks to Greg Hudson, who recently debugged this same issue with fetchmail, and kindly took the time to look at Mutt's code too. M imap/auth_gss.c 2018-04-08 15:37:09 -0700 Kevin McCarthy (a550d535) * Rename _regex.h to _mutt_regex.h to avoid name collision on Macs. On Macs, includes <_regex.h>. Because Mutt defines '-I .' during compilation, our bundled version of _regex.h was being used instead of the system one. I have no idea how it managed to work before, but starting in Xcode 9.3, the differences in struct size and fields started to produce a crash and other strange behavior. The real issue is our use of '-I .' during compilation, which allows our local headers to override system ones. An easier fix for now is to rename the header. Many thanks to Charles Diza, Christian Ebert, and Fabian Groffen for their help trying things out and helping to debug the problem. Also, a huge thanks to Steve Karmeinsky for allowing me to ssh in to his Mac so I could track down the underlying issue. M Makefile.am R100 _regex.h _mutt_regex.h M mutt_regex.h M regex.c 2018-04-02 11:30:31 -0700 Kevin McCarthy (4fe6cfeb) * configure: check for tinfo matching ncurses When we selected ncursesw, look for tinfow as well. Since ncurses-6.1 the binary compatibility between tinfo and tinfow disappeared, resulting in crashes and other odd behaviour. This change checks for tinfo or tinfow based on which ncurses we found to continue with. https://bugs.gentoo.org/651552 [Thanks to Fabian Groffen for the patch. I made a minor modification to fall back to tinfo because pre-6.1 systems may not have a tinfow but still need tinfo to compile.] M configure.ac 2018-03-22 09:32:31 -0700 Kevin McCarthy (eeba9a9b) * Fix s/mime non-detached signature handling. This fix is based on stbuehler's patch from https://dev.gnupg.org/T2919. Recent versions of gpgme seem to terminate the connection for a protocol error. stbuehler's analysis is that this is actually a gpgme bug, but recreating the context works around the problem. M crypt-gpgme.c 2018-03-03 13:40:27 -0800 Kevin McCarthy (9eeb406b) * automatic post-release commit for mutt-1.9.4 M ChangeLog M UPDATING M VERSION 2018-02-28 15:20:59 -0800 Kevin McCarthy (65068235) * Add subjectrx section to the muttrc man page. M doc/muttrc.man.head 2018-02-28 15:20:19 -0800 Kevin McCarthy (27758af2) * Fix subjectrx example in the manual. M doc/manual.xml.head 2018-02-14 10:33:41 +0100 Vincent Lefevre (476ea0ac) * Avoid a potential integer overflow if a Content-Length value is huge. M mbox.c 2018-02-21 18:25:37 -0800 Kevin McCarthy (2a857f63) * Fix is_from() year parsing to abort on year overflow. Unlike mutt_parse_date(), is_from() was not checking for overflow, and could end up passing a negative year to mutt_mktime(). It should perhaps be changed to use mutt_atoi(), which does better range checking, but that requires mutt_atoi() being changed to allow trailing characters and its callers return value checks being updated. I'll put that on the todo list. M from.c 2018-02-21 18:18:53 -0800 Kevin McCarthy (189e52d5) * Cap parsed years at 9999 when converting to time_t. Large year values, even those less than INT_MAX, apparently can cause gmtime() and localtime() to return NULL. Mutt needs larger changes checking and handling those errors, but this will prevent the immediately triggerable issue. M date.c 2018-02-01 11:10:01 -0800 Kevin McCarthy (b2dbdce0) * Add stub flea and muttbug scripts back. It was rightfully pointed out that the removal was too abrupt. These programs have been around for a long time, and many internet searches still say to use them for reporting bugs. Add stub versions which inform to use the gitlab url instead. M .gitignore M Makefile.am A muttbug 2018-01-31 14:57:57 -0800 Kevin McCarthy (9103f4f5) * Add more delimiters for gitlab url in the po files. Some of them hid from me in my wgrep session because they were marked as binary. M po/bg.po M po/el.po M po/es.po M po/et.po M po/ga.po M po/hu.po M po/ko.po M po/lt.po 2018-01-31 14:13:42 -0800 Kevin McCarthy (01dee39d) * Add delimiters around gitlab issues URL. Without the delimiters, the period can be easily inadvertantly copied as part of the URL. M main.c M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2018-01-27 11:20:21 -0800 Kevin McCarthy (788b732f) * automatic post-release commit for mutt-1.9.3 M ChangeLog M UPDATING M VERSION 2018-01-21 18:33:16 -0800 Kevin McCarthy (45b15d3d) * Fix the ftp site url in the manual. Also fix the urlview link to point to sigpipe's github account. M doc/manual.xml.head 2018-01-17 19:19:01 -0800 Kevin McCarthy (ffdda7e6) * Fix one more dev site reference in the manual. M doc/manual.xml.head 2018-01-17 18:57:49 -0800 Kevin McCarthy (e9ef2a16) * Fix a couple memory leaks in pattern.c BUFFER.data was not being freed in a couple cases. The pattern and simple search were not being freed if imap_search() failed. M pattern.c 2018-01-17 18:05:28 -0800 Kevin McCarthy (f1307ce5) * Change bug reporting URL to gitlab issues. M doc/manual.xml.head M doc/mutt.man M main.c M po/bg.po M po/ca.po M po/cs.po M po/da.po M po/de.po M po/el.po M po/eo.po M po/es.po M po/et.po M po/eu.po M po/fr.po M po/ga.po M po/gl.po M po/hu.po M po/id.po M po/it.po M po/ja.po M po/ko.po M po/lt.po M po/nl.po M po/pl.po M po/pt_BR.po M po/ru.po M po/sk.po M po/sv.po M po/tr.po M po/uk.po M po/zh_CN.po M po/zh_TW.po 2018-01-17 18:01:31 -0800 Kevin McCarthy (c041535f) * Pull latest Polish translation from master. M po/pl.po 2018-01-17 16:21:53 -0800 Kevin McCarthy (32ce9f35) * Update manual to point to gitlab.com as development site. M doc/manual.xml.head 2018-01-17 16:16:10 -0800 Kevin McCarthy (eff9dfbf) * Remove muttbug and flea. We have pretty much transitioned over to gitlab.com. M .gitignore M Makefile.am M configure.ac M doc/Makefile.am D doc/muttbug.man M init.c D muttbug D muttbug.sh.in 2018-01-11 15:08:30 -0800 Kevin McCarthy (667a4710) * Add missing setup calls when resuming encrypted drafts. Calls to get the passphrase were missing for app/pgp and app/smime. App/smime was also missing a call to crypt_smime_getkeys(). If a failure occurs, report it back, rather than just continuing. Otherwise, postponed messages could be completely lost. M postpone.c 2018-01-07 12:12:42 -0800 Kevin McCarthy (a37a2c4d) * Fix imap status count range check. The strtoul() call for parsing the STATUS count wasn't checking the range properly, because it was assigning to an unsigned int. Change to assign to a unsigned long, and also add the conversion check from mutt_atoui(). Thanks to Charles (@chdiza) for quickly noticing the problem! M imap/command.c 2018-01-06 15:55:17 -0800 Kevin McCarthy (8fcf8eda) * Change imap literal counts to parse and store unsigned ints. IMAP literals are of type number. Change imap_get_literal_count() to use mutt_atoui() instead of atoi(). Change the return type variables used to store the count to type unsigned int. It's doubtful this was a real issue, but as long as we're cleaning up incorrect atoi() usage, we should fix this too. M imap/command.c M imap/imap.c M imap/imap_private.h M imap/message.c M imap/util.c 2018-01-05 20:39:50 -0800 Kevin McCarthy (b8190ef3) * Fix improper signed int conversion of IMAP uid and msn values. Several places in the imap code, when parsing "number" and "nz-number" values from the IMAP data, use atoi() and strtol(). This is incorrect, and can result in failures when a uid value happens to be larger than 2^31. Create a helper function, mutt_atoui() and use that instead. One place was using strtol() and relying on the endptr parameter, and so was changed to use strtoul() instead. Thanks to Paul Saunders for the bug report and original patch, which this commit is based on. M imap/command.c M imap/imap.c M imap/message.c M lib.c M lib.h 2017-12-26 15:09:07 -0800 Kevin McCarthy (363f12a3) * Update wiki link in manual. M doc/manual.xml.head 2017-12-18 12:55:20 -0800 Kevin McCarthy (80d06b0c) * Determine latest tag using git describe. Commit 8648db83 relies on `sort -V` which is unavailable on some platforms. Instead just use `git describe` with --abbrev=0 to only output the tag. We still manually compute the distance to avoid the problem mentioned in that commit. Additionally, add Vincent's fix from commit 3b142cea to the stable branch. M mkchangelog.sh M version.sh 2017-12-15 15:31:23 -0800 Kevin McCarthy (8e0d8616) * automatic post-release commit for mutt-1.9.2 M ChangeLog M UPDATING M VERSION 2017-12-15 12:09:42 -0800 Kevin McCarthy (9eedfd4e) * Fix s/mime certificate deletion bug. (closes #3982) Commit c1bcf4ba exposed a bug in the s/mime encryption code. It was errorneously calling unlink on the list of generated cert files to use. Prior to that commit, the list had an initial space, which apparently made the unlink fail. After that commit, encrypting to a single certificate would end up deleting the certificate. Remove the calls to unlink the cert file. Add some missing cleanup if the call to openssl fails. M smime.c 2017-12-14 16:16:27 -0800 Kevin McCarthy (841f7101) * Update mkchangelog.sh to use git. The output isn't quite as nice as the hg generated version, but is close. With Mercurial, and now Git, I'm not sure of the usefulness of maintaining a ChangeLog file in the repos, but that is another discussion. D hg-changelog-map M mkchangelog.sh 2017-12-12 19:09:42 -0800 Kevin McCarthy (ecbd86c9) * Remove hg-commit and Makefile commit target. I haven't ever used this script, and we only update the ChangeLog during releases now. doc/devel-notes already mentions running check_sec.sh. Add a mention of the 'make validate' target too. M Makefile.am M doc/devel-notes.txt D hg-commit 2017-12-12 18:17:10 -0800 Kevin McCarthy (a4d08d25) * Minor tweaks to the version.sh fixes from last commit. Add back a check for whether the git program exists. Don't show distance if it is zero. Remove the dirty flag. Remove the initial "g" prefix from the commitid. This is added by git describe, but I don't think we need to preserve it. M version.sh 2017-12-11 21:46:30 -0500 Aaron Schrab (8648db83) * Change version.sh to manually compute version and distance. In some cases `git describe` gives bizarre results (see URL below), instead get the highest version-numbered tag contained in HEAD then count the number of commits that aren't included in it. https://public-inbox.org/git/20161205232712.GA23868@pug.qqx.org/ M version.sh 2017-12-10 20:03:30 -0800 Kevin McCarthy (7b65f780) * Update some of the documentation to refer to git. Also update the repos URL. M COPYRIGHT M README M doc/devel-notes.txt 2017-12-03 17:55:59 -0800 Kevin McCarthy (6df931c8) * Convert version.sh to work with git. Use the built-in `git describe` to get the tag, distance, and revision id. M version.sh 2017-12-02 19:27:14 -0800 Kevin McCarthy (0ad4c11d) * Convert to .gitignore file. A .gitignore D .hgignore 2017-09-30 19:15:08 -0700 Kevin McCarthy (1f4a6c67) * Fix address group terminator "exact address" printing to display trailing semicolon. The exact-address handling for comma and colon are different because those are added outside the exact-address printing. The semicolon needs to be inside the address->val field of the address group terminator. M rfc822.c 2017-09-26 19:44:11 -0700 Kevin McCarthy (0bcb77a6) * Fix uses of context->changed as a counter. The first was in mx_update_tables(), but only when "not committing". This is used by mh/maildir during an "occult" update, and in imap when expunging the mailbox. It meant to simply turn on changed when a single changed header is seen. The second use was in imap_sync_message_for_copy(). Previously this was used for a server side copy/save, but is now also used for fast-trash copying. Remove the code that was trying to decrement the counter: this function is not capable of properly setting a status bit. M imap/imap.c M mx.c 2017-09-23 11:40:44 -0700 Kevin McCarthy (b333df6d) * mutt-1.9.1 signed M .hgsigs 2017-09-23 11:39:54 -0700 Kevin McCarthy (5e007dac) * Added tag mutt-1-9-1-rel for changeset 869633ef393e M .hgtags 2017-09-23 11:39:45 -0700 Kevin McCarthy (8473efa7) * automatic post-release commit for mutt-1.9.1 M ChangeLog M UPDATING M VERSION 2017-09-22 11:14 -0700 Kevin McCarthy (19c81a140c6e) * imap/imap.c: Add missing IMAP_CMD_POLL flag in imap buffy check. I missed adding the flag to one of the imap_exec() calls inside the loop, when a different server is encountered in the mailboxes list. 2017-09-22 11:12 -0700 Kevin McCarthy (9e53c623d102) * imap/command.c: Close the imap socket for the selected mailbox on error. The new $imap_poll_timeout calls the cmd_handle_fatal() error handler on timeout, which is supposed to close and cleanup. However, for the currently selected mailbox, the error handler was not closing the socket after closing up the mailbox. This left extra SSL/GnuTLS data around and was causing errors on an attempt to reconnect. Thanks to Fabian Groffen for reporting the issue. 2017-09-22 11:07 -0700 Kevin McCarthy (7155392ed28b) * imap/imap.c: Fix imap sync segfault due to inactive headers during an expunge. (closes #3971) Mutt has several places where it turns off h->active as a hack. For example to avoid FLAG updates, or to exclude from imap_exec_msgset. Unfortunately, when a reopen is allowed and the IMAP_EXPUNGE_PENDING flag becomes set (e.g. a flag update to a modified header), imap_expunge_mailbox() will be called by imap_cmd_finish(). The mx_update_tables() would free and remove these "inactive" headers, despite that an EXPUNGE was not received for them. This would result in memory leaks and segfaults due to dangling pointers in the msn_index and uid_hash. There should probably be a more elegant solution, removing the initial hacks. However, this is causing a segfault, and the best solution right now is to turn active back on for non-expunged messages in imap_expunge_mailbox(). Extra thanks to chdiza, who bravely runs tip and found this issue quickly. 2017-09-14 12:43 -0700 Kevin McCarthy (12d3714d8bfa) * imap/command.c, imap/message.c: Improve imap fetch handler to accept an initial UID. (closes #3969) Gmail sends flag updates with a UID before the FLAGS. The handler was very simple, and so ignored the flag update in that case. Pull the code from msg_parse_fetch(), paring down to just UID and FLAGS. This will handle arbitrary order data items. 2017-09-13 15:48 -0700 Kevin McCarthy (f90712538cd9) * imap/imap.c, imap/imap_private.h, imap/message.c: Change imap copy/save and trash to sync flags, excluding deleted. (closes #3966) (closes #3860) imap_copy_messages() uses a helper to sync the flags before performing a server-side copy. However, it had a bug that the "deleted" flag on a local message, if set, will be propagated to the copy too. Change the copy sync helper to ignore the deleted flag. Then, change the imap trash function to use the same helper. Thanks to Anton Lindqvist for his excellent bug report, suggested fixes, and help testing. 2017-09-13 15:48 -0700 Kevin McCarthy (19597bb7baa6) * imap/imap.c: Remove \Seen flag setting for imap trash. (see #3966) (see #3860) Commit 323e3d6e5e4c has a side effect where spurious FETCH flag updates after setting the \Seen flag can cause a sync to abort. Remove manually setting \Seen for all trashed message before copying. The next commit will change the imap trash function to use the same code as the imap copy/save function for syncing the message before server-side copying. 2017-09-04 09:40 -0700 Kevin McCarthy (3c6f3ca07807) * curs_lib.c: Fix rv assignment in mutt_window_mvprintw(). (closes #3964) Mutt doesn't check the return value, so this wasn't causing a bug, but was incorrect. Thanks to dcb314 for reporting the issue. 2017-09-04 09:20 -0700 Kevin McCarthy (f2298b3e6b93) * mutt_ssl_gnutls.c: Fix fp resource leak. (closes #3965) Thanks to dcb314 for reporting the issue. 2017-09-02 12:20 -0700 Kevin McCarthy (ed024cc919fe) * setenv.c: merge default into stable 2017-09-02 12:12 -0700 Kevin McCarthy (a586abf3c62d) * .hgsigs: mutt-1.9.0 signed 2017-09-02 12:11 -0700 Kevin McCarthy (b050efec0ed4) * .hgtags: Added tag mutt-1-9-rel for changeset 549821ba69e5 2017-09-02 11:32 -0700 Kevin McCarthy (549821ba69e5) * ChangeLog, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.9.0 2017-09-02 09:36 -0700 Kevin McCarthy (3cd63d517453) * po/cs.po, po/eo.po, po/nl.po: Fix the new certificate prompt translations. The Esperanto, Dutch, and Czech po files weren't updated in time for 1.9. Fix the certificate prompt translations by adding a "(s)kip" choice. Otherwise the prompts would not be functional. 2017-08-29 09:19 -0700 TAKAHASHI Tamotsu (52ba6fd58607) * po/ja.po: Updated Japanese translation. 2017-08-27 09:28 -0700 Ivan Vilata i Balaguer (2666f4de9eb8) * po/ca.po: Updated Catalan translation. 2017-08-22 19:22 -0700 Kevin McCarthy (b506fa3e7aab) * UPDATING: Add 1.9.0 entries to the UPDATING file. 2017-08-22 13:51 -0700 Morten Bo Johansen (f1638434cb43) * po/da.po: Updated Danish translation. 2017-08-22 10:59 -0700 Morten Bo Johansen (cce15c0169af) * po/da.po: Updated Danish translation. 2017-08-22 10:28 -0700 Olaf Hering (3606d018ea75) * po/de.po: Updated German translation. 2017-08-20 09:39 -0700 Vsevolod Volkov (584cc7ee5016) * po/ru.po: Updated Russian translation. 2017-08-20 09:31 -0700 Vsevolod Volkov (ed0fff2be143) * po/uk.po: Updated Ukrainian translation. 2017-08-19 08:33 -0700 Kevin McCarthy (190e778db4d6) * doc/manual.xml.head, globals.h, init.h, mutt.h, sendlib.c: Add option to run command to query attachment mime type. (closes #2933) (closes #3959) Add $mime_type_query_command to specify a command to run if the attachment extension is not in the mime.types file. Add $mime_type_query_first to allow the query command to be run before the mime.types lookup. 2017-08-12 22:17 +0200 Vincent Lefevre (69e3bde9f83d) * po/fr.po: Updated French translation. 2017-08-11 09:04 -0700 Kevin McCarthy (1306ee5f4bf7) * recvcmd.c: Fix parent_hdr usage in mutt_attach_reply(). (see #3728) If the selected attachments are not messages and no (common) parent is found, parent_hdr is set to the passed in hdr. In that case, parent will still be NULL, but parent_hdr and parent_fp will be set. Change the test to parent_hdr being NULL, not parent, to check for this case. 2017-08-10 18:18 -0700 Kevin McCarthy (052ad4fcdd6b) * commands.c, protos.h, recvattach.c: Add edit-content-type helper and warning for decrypted attachments. (closes #3728) Regenerating the actx index will overwrite any changes made to a decrypted attachment. Change the mutt_edit_content_type() function to return 1 when a structural change is made. Add a warning message when that is the case and a decrypted message was edited, so the user is not surprised. Note: mutt_edit_content_type() appeared to regenerate multipart subparts every time, leading to a memory leak. I believe this was an oversite, and it should have regenerated only when there were no subparts, so have "fixed" this. 2017-08-10 18:18 -0700 Kevin McCarthy (38855dc0a02a) * crypt-gpgme.c, crypt-gpgme.h, crypt-mod-pgp-classic.c, crypt-mod- pgp-gpgme.c, crypt-mod.h, cryptglue.c, mutt_crypt.h, pgp.c, recvattach.c: Fix attachment check_traditional and extract_keys operations. (see #3728) Add helpers and iterate over the actx->idx instead of the BODY structure. 2017-08-10 18:18 -0700 Kevin McCarthy (e6e8b2f1fae3) * attach.h, compose.c, pager.c, recvattach.c, recvcmd.c: Fix shared attachment functions. (see #3728) With nested decryption, the correct FP is associated with the ATTACHPTR entry. Also, the BODY entries are not continguous, so the functions need to iterate over the actx index, not the BODY structure. 2017-08-10 18:18 -0700 Kevin McCarthy (26e06bd4f29d) * recvattach.c: Fix the expand/collapse code to use the virtual index. (see #3728) Fix the init code to respect OPTDIGESTCOLLAPSE. 2017-08-10 18:18 -0700 Kevin McCarthy (c7fe290bc3a3) * attach.c, attach.h, compose.c, recvattach.c: Add virtual index to actx. (see #3728) The virtual index is modeled after the CONTEXT. Add a CURATTACH helper to reduce code verbosity. Store the actx as menu->data. Simplify and consolidate the recvattach and compose menu update code inside a function. Because compose and recvattach share so much code, change compose to use the virtual index even though it has no collapse/expand functionality. 2017-08-10 18:18 -0700 Kevin McCarthy (23ce88ed8961) * attach.c, attach.h, compose.c, protos.h, recvattach.c: Change recvattach to allow nested encryption. (see #3728) * Add a FP and BODY array to the actx. These are used to allow proper cleanup. * Add HEADER and root_fp entries, to allow for index regeneration. * Separate out the compose and recvattach index generation functions. * Change the recvattach index generator to decrypt as encrypted parts are found. 2017-08-10 18:18 -0700 Kevin McCarthy (ee1fd4a71a8a) * attach.c, attach.h, compose.c, recvattach.c: Add helpers to add and remove actx entries. (see #3728) Use the helper in compose update_idx(), to consolidate the resize logic and simplify the code. Separate out the actx "free" routine from a routine to empty out the idx. The index regeneration routines should flush and rebuild the index without having to renerate the actx structure. 2017-08-10 18:18 -0700 Kevin McCarthy (b8bbccd98632) * attach.c, attach.h, browser.c, compose.c, pager.c, pager.h, recvattach.c, recvcmd.c: Change helpers functions to pass actx. (see #3728) Change the pager, compose, recvattach and recvcmd to pass the actx instead of the individual idx and idxlen parameters. Separate out the compose menu exit logic to first free the BODY data and then call the shared actx free function at the bottom. 2017-08-10 18:18 -0700 Kevin McCarthy (278b6efc6bba) * attach.c, attach.h, compose.c, recvattach.c: Create ATTACH_CONTEXT to hold attachment index. (see #3728) Move the idx and idxlen into ATTACH_CONTEXT. In subsequence patches, this structure will hold more useful items, such as the virtual index. The swap out is straightforward, except for: * update_idx() in compose.c, which post-increments the idxlen in the call and again in the function. * mutt_gen_attach_list() which doesn't need to returns the new values. 2017-08-09 08:08 -0700 lilydjwg (5f034395e53d) * po/zh_CN.po: Updated Simplified Chinese translation. 2017-08-08 09:13 -0700 Olaf Hering (86f709e4be55) * po/de.po: Updated German translation. 2017-08-06 10:22 -0700 Kevin McCarthy (f8df8c43e5c0) * pager.c: Handle error if REGCOMP in pager fails when resizing. Thanks to JiaZhouyang for finding this issue and supplying the original patch. 2017-08-04 09:29 -0700 Olaf Hering (ac2fda8bc9c4) * po/de.po: Updated German translation. 2017-07-28 10:54 -0700 Kevin McCarthy (f83de1e03e08) * configure.ac, mutt_socket.c: Convert raw_socket_poll() to use gettimeofday(). As long as gettimeofday() is supported, it's better to be consistent within mutt and ensure greater portability. Change the raw_socket_poll() wait timer to count milliseconds, like the mutt_progess_update() code. Thanks to Vincent Lefèvre for his, as always, invaluable advice. 2017-07-27 00:20 +0100 Vincent Lefevre (eeb5ff58ab14) * po/fr.po: Updated French translation. 2017-07-24 11:19 -0700 Kevin McCarthy (f94a97422cd0) * configure.ac, mutt_socket.c: Add autoconf search for clock_gettime. It appears to be specified in POSIX.1-2001, so just abort if it's not found. Add a missing time.h include in mutt_socket.c 2017-07-22 19:48 -0700 Kevin McCarthy (4a1390537a29) * globals.h, imap/command.c, imap/imap.c, imap/imap_private.h, init.h: Add $imap_poll_timeout to allow mailbox polling to time out. Enable the polling flag for the NOOP in imap_check_mailbox(), the STATUS command in imap_buffy_check(), and the LOGOUT command. This is not intended to handle all blocking-IO related issues. However, the periodic NOOP and STATUS are the most frequent places for mutt to freeze up, especially after a laptop is sleep/woken. Since these are quick operations with little data, this is a good place to check if the connection is still working before hanging on a read. 2017-07-22 19:48 -0700 Kevin McCarthy (908bea74acef) * imap/imap.c, mutt_sasl.c, mutt_sasl.h, mutt_socket.c, mutt_socket.h, mutt_tunnel.c: Add timeout parameter to mutt_socket_poll. This will be used in the next commit to add a timeout when polling for new mail. 2017-07-20 17:30 -0700 Kevin McCarthy (a533c22715c8) * mutt.h, sendlib.c: When guessing an attachment type, don't allow text/plain if there is a null character. (see #2933) Type text/plain should not contain any null characters. Slightly improve the type guesser by forcing an attachment with any null characters to be application/octet-stream. Note the type guesser could use much more improvement, but this is an easy and obvious fix. 2017-07-19 14:12 -0700 Kevin McCarthy (2204d7ed4d94) * imap/command.c, imap/imap.c, menu.c: merge stable 2017-07-19 14:04 -0700 Kevin McCarthy (78cc40b6ba9e) * imap/command.c, imap/imap.c: Change imap_cmd_start() to return OK when the cmd_queue is finished. (closes #3956) Some response handlers can end up recursively calling imap_cmd_start(), processing all the command completions. If the outer call was an imap_exec(), this would result in the loop never being terminated (or just blocking reading a server that has already finished all the commands). Change the callers that are simply using it to read a response, without having called cmd_start(), to check for IMAP_CMD_OK instead. Currently this is just the open connection function. 2017-07-19 14:04 -0700 Kevin McCarthy (cf98f5d606a3) * menu.c: Fix menu color calls to occur before positioning the cursor. (see #3956) It is possible for menu->color() to end up fetching an imap message, and therefore generating a status message. Because of this, we need to make those calls before we position the cursor. 2017-07-14 15:19 -0700 Kevin McCarthy (c4e507003aa0) * regex.c: Decrease regex failure stack limit. (closes #3955) When using alloca(), the built-in regexp library limited the failure stack to 20,000 entries. This value is too large, and causes alloca() to segfault in the example provided in the ticket. Decrease the limit to 8000. Thanks to Thorsten Wißmann for the excellent bug report, which made debugging this much easier. 2017-07-13 22:05 -0700 Brendan Cully (9430d2357bc2) * imap/imap.c, imap/imap.h, mx.c: drop unused flags argument from imap_access We are not using an actual interface so it is pointless. 2017-07-12 21:20 -0700 Brendan Cully (742c96078159) * bcache.c: bcache: cast to avoid implicit signed/unsigned comparison in bcache_path 2017-07-12 12:39 -0700 Kevin McCarthy (51d22025190a) * imap/imap.c: merge stable 2017-07-12 12:38 -0700 Kevin McCarthy (02c6dd3a30cc) * imap/imap.c: Fix crash when $postponed is on another server. imap_mxcmp() translates NULL to "INBOX". When $postponed points to a URL with an empty or "INBOX" path, this will end up matching against a NULL idata->mailbox in imap_status(). This resulted in a crash because idata->ctx is also NULL. Thanks to Olaf Hering for the detailed bug report and suggested fix. 2017-07-08 16:35 -0700 Brendan Cully (952e4fcf1e2b) * imap/imap.c: fix signed/unsigned comparison in longest_common_prefix 2017-07-05 19:09 -0700 Kevin McCarthy (428e36fb2262) * doc/manual.xml.head, doc/muttrc.man.head, mutt.h, pattern.c: Add ~<() and ~>() immediate parent/children patterns. (closes #3144) Thanks to Jeremie Le Hen for the original patch, and for his persistence in getting this feature merged. 2017-07-03 19:22 -0700 Kevin McCarthy (c87d2a88308a) * po/bg.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ko.po, po/lt.po, po/pl.po, po/pt_BR.po, po/sk.po, po/sv.po, po/tr.po, po/zh_CN.po, po/zh_TW.po: Remove stale certificate prompt translations. With the OpenSSL changes, unmaintained translation prompts will not function properly. Clear out the translation strings for those using different action keys. This changeset does not touch the translation files that are actively maintained. They will be properly updated before the 1.9.0 release. 2017-07-03 19:22 -0700 Kevin McCarthy (752f3e879d50) * po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: Update po files. 2017-07-03 19:22 -0700 Kevin McCarthy (b90d818b768c) * mutt_ssl_gnutls.c: Add L10N comments to the GNUTLS certificate prompt. The prompts are shared with OpenSSL, and so the prompts end up being separate from the action key strings. 2017-07-02 17:53 -0700 Kevin McCarthy (680300397f3d) * init.h: Add more description for the %S and %Z $index_format characters. 2017-07-01 19:32 -0700 Kevin McCarthy (c45291f87137) * globals.h, init.h, protos.h, recvcmd.c, send.c: Add config vars for forwarded message attribution intro/trailer. Add $forward_attribution_intro and $forward_attribution_trailer to allow the default strings to be overridden. 2017-06-26 15:54 -0700 Antonio Radici (88602d33a49a) * init.h: Fix typo in smime_self_encrypt_as documentation. (closes #3953) 2017-06-26 15:47 -0700 Kevin McCarthy (c50abea2ec80) * init.h: merge stable 2017-06-26 15:44 -0700 Regid Ichira (826efa89631f) * init.h: Minor documentation fixes. The muttrc man page doesn't contain the "Format Strings" section in the manual, so add a pointer to the explanation of conditionals in $status_format. 2017-06-20 15:09 -0700 Kevin McCarthy (219b9064cf28) * mutt_socket.c: Block SIGWINCH during connect(). (closes #3941) FreeBSD's connect() does not respect SA_RESTART, so a SIGWINCH will end up interrupting the connect. If this code is needed in other places, it should be moved into signal.c. For this one place, inlining the sigprocmask() seemed okay. 2017-06-18 10:58 -0700 Kevin McCarthy (d56fd3f91de9) * compose.c: Improve the L10N comment about Sign as. Make it clearer what the indentation behavior is, and add suggestions about the width. Thanks to TAKAHASHI Tamotsu for the original patch suggesting changes to the L10N comments. 2017-06-18 10:58 -0700 TAKAHASHI Tamotsu (0efae3363358) * po/ja.po: Updated Japanese translation. 2017-06-14 19:21 -0700 Kevin McCarthy (7dc8a6a3592a) * crypt-gpgme.c: Auto-pad translation for the GPGME key selection "verify key" headers. Remove the ridiculous need for the translators to pad the translation strings themselves. 2017-06-14 15:23 -0700 Morten Bo Johansen (2188de087f35) * po/da.po: Updated Danish translation. 2017-06-14 15:12 -0700 Kevin McCarthy (e8368cedbd95) * compose.c, init.h, send.c: Enable all header fields in the compose menu to be translated. While it is suggested they need not be, for some locales it might be preferable to be able to localize the fields. For instance, fr_FR may want to change the punctuation to have a space in front of the colon. ja_JP may be more comfortable with a native character set description of the field when using it every day. 2017-06-12 18:29 -0700 Kevin McCarthy (0e3730ed2c3c) * sendlib.c: Force hard redraw after $sendmail instead of calling mutt_endwin. (closes #3952) (see #3948) Adding a mutt_endwin() seemed like a clean solution to allowing ncurses pinentry for $sendmail, but it leaves other users watching a blank screen. This change is extremely likely to generate a large number of complaints and bug reports. So instead, force a hard refresh afterwards. 2017-06-12 17:57 -0700 Kevin McCarthy (26cbf2cac701) * crypt-gpgme.c: Make GPGME key selection behavior the same as classic-PGP. (see #3950) Classic-PGP key selection auto-selected a match if there was a single strong, valid, address-match result, even if there were other weak matches. GPGME was prompting in the same situation, if there were other weak matches. Change GPGME to match the classic behavior, as this is more useful and matches the manual description. 2017-06-09 11:31 -0700 Consus (dd0208f13983) * compose.c: Rename 'sign as' to 'Sign as'; makes compose menu more consistent. 2017-06-09 11:31 -0700 Kevin McCarthy (b4d0bb558636) * compose.c: Change the compose menu fields to be dynamically padded. Pad based on the maximum width of the fields. Note that this is a bit of a mess, because some of the fields are translated while others are not. 2017-06-08 13:26 -0700 Kevin McCarthy (966f08249216) * init.c, pgp.c: Backout 02ff4277259e (see #3948) Vincent expressed some legitimate concerns about exporting this to all programs lauched by mutt. The user can always set GPG_TTY in their .bashrc if needed for $sendmail. cf90bf5989f3 should resolve the refresh issue. 2017-06-06 18:38 -0700 Kevin McCarthy (cf90bf5989f3) * sendlib.c: Add a mutt_endwin() before invoking $sendmail. (closes #3948) This is to support invoking a program such as msmtp that can use gpg to decrypt a password. The ncurses pinentry can corrupt the screen unless we exit curses. 2017-06-06 18:38 -0700 Kevin McCarthy (02ff4277259e) * init.c, pgp.c: Move setting of GPG_TTY to mutt_init(). (see #3948) This allows other programs mutt runs to use the ncurses pinentry if needed. 2017-06-06 18:38 -0700 Kevin McCarthy (915ba3928d49) * configure.ac, m4/gettext.m4, pgp.c, protos.h, setenv.c: Restore setenv function. Partially revert fa1192803257, restoring setenv. It turns out we still need the function. 2017-06-02 13:17 -0700 TAKAHASHI Tamotsu (a11770c2137b) * po/ja.po: Updated Japanese translation. 2017-06-01 15:17 -0700 Kevin McCarthy (f26adb2b0543) * curs_main.c, menu.c: Fix tag-prefix to not abort on $timeout. If $timeout is set very low, then it can cancel the tag-prefix before the user has time to press the desired command. Change the code to set the tag flag, and then recontinue with normal event processing instead. Cancel on an abort, but continue with a timeout. Thanks to Lauri Tirkkonen for reporting the issue. 2017-06-01 15:17 -0700 Kevin McCarthy (ec6530cb0a5a) * curs_main.c, enter.c, keymap.c, menu.c, pager.c: Change km_dokey() to return -2 on a timeout/sigwinch. In some cases, such as tag-prefix or _mutt_enter_string(), it is desirable to be able to distinguish between a timeout/sigwinch event and an input error/abort/ctrl-g. 2017-06-01 13:55 -0700 TAKAHASHI Tamotsu (152d548c1bcf) * main.c: Enable TEXTDOMAINDIR override to make translation testing easier. If set, TEXTDOMAINDIR will point to a translation directory instead of using the mutt installation directory. 2017-06-01 13:33 -0700 TAKAHASHI Tamotsu (4e29b337e967) * crypt-gpgme.c, hook.c, init.c, main.c, mutt_ssl.c, pattern.c, pop.c, pop_auth.c: Fix "format string is not a string literal" warnings. (closes #3949) Mutt calls msgfmt with '-c' to verify that translation format strings match, but it is still safer to indirect strings with no formatting through %s. 2017-05-31 16:19 -0700 Kevin McCarthy (093b0c6c6d86) * doc/manual.xml.head: merge stable 2017-05-31 16:18 -0700 Kevin McCarthy (d3922568a777) * doc/manual.xml.head: Add note about message scoring and thread patterns. (see #3947) Because scoring occurs before the mailbox is sorted, thread patterns don't work. Document a suggested workaround of pushing the score command in a folder hook. Also, fix the link target for the score command synopsis. 2017-05-30 12:49 -0700 Kevin McCarthy (35fba390b1f3) * merge stable 2017-05-30 12:48 -0700 Kevin McCarthy (fff7d4bb459a) * .hgsigs: mutt-1.8.3 signed 2017-05-30 12:47 -0700 Kevin McCarthy (6a54fbc38fa4) * .hgtags: Added tag mutt-1-8-3-rel for changeset fe5275246e13 2017-05-30 12:47 -0700 Kevin McCarthy (fe5275246e13) * ChangeLog, UPDATING, VERSION: automatic post-release commit for mutt-1.8.3 2017-05-29 11:48 -0700 Kevin McCarthy (228364e8abb7) * init.h, send.c: Change $postpone_encrypt to use self-encrypt variables first. The concept of postpone encryption is similar to self-encrypting on send. The problem is the $postpone_encrypt_as option doesn't take into account whether PGP or S/MIME is being used. Since we need to add the new options for self-encryption, modify $postpone_encrypt to use them by default instead, falling back to $postpone_encrypt_as if they are unset. Note $postpone_encrypt_as is deprecated in the documentation. 2017-05-29 11:48 -0700 Kevin McCarthy (ca95f3e38355) * crypt.c, globals.h, init.h, mutt.h: Add self-encrypt options for PGP and S/MIME. Add $pgp_self_encrypt, $pgp_self_encrypt_as, $smime_self_encrypt, $smime_self_encrypt_as. $pgp_sign_as and $smime_default_key are inappropriate to use, as they specify signing key/certs. In some cases, this is a different value than the encryption key/cert. 2017-05-29 11:48 -0700 Kevin McCarthy (085fc55029d8) * smime.c: Convert classic s/mime to space delimit findKeys output. Unlike gpgme and classic pgp, smime used a "cert\ncert\n" pattern. Convert to use a space-delimited format, so the self-encrypt option code can be uniform across pgp, s/mime, and gpgme. 2017-05-24 15:46 -0700 Kevin McCarthy (a636bc4a4940) * imap/message.c: Change imap body cache cleanup to use the uid_hash. This should speed up $message_cache_clean cleanup when syncing. 2017-05-23 15:54 -0700 Kevin McCarthy (8904261ed212) * merge stable 2017-05-23 15:53 -0700 Kevin McCarthy (fa0c2155ab8f) * mx.c: Fix memory leak when closing mailbox and using the sidebar. The code updating the sidebar counts decremented the msgcount, but did not set it back to the original value. Which means fastclose was not freeing all the headers. Update the sidebar only when something is deleted, since I don't believe it's required otherwise and the code is a bit cleaner that way. 2017-05-22 18:30 -0700 Kevin McCarthy (407100d15766) * imap/imap.c: Don't clean up msn idata when closing an open-append mailbox. (see #3942) This is a continuation of commit 59a2125b49f2 with changes made in the default branch. Thanks again to Will Yardley for helping test the imap read-headers changes and discovering this bug. 2017-05-22 18:25 -0700 Kevin McCarthy (aec6b48e8ea5) * imap/imap.c: merge stable 2017-05-22 18:18 -0700 Kevin McCarthy (59a2125b49f2) * imap/imap.c: Don't clean up idata when closing an open-append mailbox. open-append borrows the idata just for the connection. The "mailbox specific" part of the idata may be being used by a normal open- mailbox. Don't free the idata "mailbox specific" part when closing an open- append mailbox. Thanks to Will Yardley for discovering the bug as part of testing the revised IMAP fetch_headers code (in the default branch). 2017-05-22 05:14 -0700 Kevin McCarthy (e614fb00459b) * merge stable 2017-05-22 05:08 -0700 TAKAHASHI Tamotsu (1ddf2641f369) * mx.c: Fix potential segv if mx_open_mailbox is passed an empty string. (closes #3945) If path is "", ctx->path will be NULL. realpath() generally will segv if the first parameter is NULL. 2017-05-22 04:43 -0700 Kevin McCarthy (4ab3a8a2e321) * imap/message.c: Fix mfc overflow check and uninitialized variable. The check borrowed from mx_alloc_memory() works because it is incremented 25 at a time. I don't believe it will work for the direct set case used in imap_alloc_msn_index(). Instead, use a more conservative check. In imap_read_headers(), make sure mfhrc is initialized. It would be tested without being set if imap_cmd_step() returned OK right away. 2017-05-21 18:45 -0700 Kevin McCarthy (5904c6376f77) * imap/message.c: Don't abort header cache evaluation when there is a hole. (see #3942) Instead, find the first missing MSN and generate a more complicated sequence set specifying the missing ranges. This removes the assumption that the header cache query returned results in MSN order. 2017-05-21 18:45 -0700 Kevin McCarthy (1658ab70377b) * imap/message.c: Small imap fetch fixes. (see #3942) Add an integer overflow test, pulled from mx_alloc_memory(), since the count comes from a potentially hostile server. After reviewing the RFC a bit, it turns out the server is not supposed to send EXPUNGE responses during a FETCH. Change the comment, but keep the conservative code. 2017-05-21 10:51 -0700 Kevin McCarthy (f87c679e508f) * imap/message.c: Properly adjust fetch ranges when handling new mail. (see #3942) When pulling down headers, it is possible for expunge responses to happen too. If we get a new mail count, we need to take into account changes to the max_msn due to the expunges. 2017-05-20 18:52 -0700 Kevin McCarthy (77d3173aecff) * imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c: Add msn_index and max_msn to find and check boundaries by MSN. (see #3942) Since there can be gaps in MSNs, the largest MSN in the context is not necessarily ctx->msgcount. Use max_msn instead of ctx->msgcount for: - the starting MSN of new mail header fetching - boundary checking in fetch, expunge, and other places Use msn_index to efficiently look up headers by MSN. This makes the expunge code slightly more efficient. It also makes FETCH handling, and duplicate FETCH FLAG handling efficient. 2017-05-20 18:52 -0700 Kevin McCarthy (5289d2caadbb) * imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c: Start fixing imap_read_headers() to account for MSN gaps. (see #3942) Change the parameters to pass MSN instead of index, to make a bit simpler. Change header cache evaluation to look at the largest MSN retrieved instead of ctx->msgcount for the next fetch start point. This still depends on the assumption that MSNs are retrieved in ascending order, which needs to be fixed. Simplify the header cache inner loop termination and memory cleanup logic. Fix a memory leak if a hole in the header cache occured. Fix the header retrieval logic to take into account MSN gaps in the results. Loop only as long as we get IMAP_CMD_CONTINUE instead of over a fixed count. Simplify the inner loop termination and memory cleanup logic too. Simplify the "new mail while fetching" logic by creating a third outer loop to handle re-fetches. Fix msg_fetch_header() to return -2 if msg_parse_fetch() encounters a corrupt FETCH response. Previously it would pass on the rc of msg_parse_fetch(), meaning it would return -1 even though the response was corrupt. 2017-05-20 18:52 -0700 Kevin McCarthy (b85bf6466c79) * imap/command.c: Fix cmd_parse_fetch() to match against MSN. (see #3942) 2017-05-20 18:52 -0700 Kevin McCarthy (ab3595fbb698) * imap/command.c, imap/imap.c: Fix imap expunge to match msn and fix index. (see #3942) The expunge needs to match against the MSN now. Since cmd_parse_expunge() does not automatically fix h->index anymore, change imap_expunge_mailbox() to fix up the h->index values. 2017-05-20 18:52 -0700 Kevin McCarthy (27bb55faa024) * imap/message.c, imap/message.h: Move the IMAP msn field to IMAP_HEADER_DATA. (see #3942) Ticket 3942 revealed that it is possible for a FETCH to have gaps in the MSN numbers of the results. The code makes many assumptions that equate context index counts and MSN. This is the first in a series of commits fixing that assumption. The header->index field is supposed to hold the SORT_ORDER index number of the message. If there are gaps in the MSN, than the highext MSN can in fact be out of the range 0..ctx->msgcount-1. After studying the code, I believe curs_main.c would actually work with header->index values out of the range, at least for IMAP. But some other parts of the code, such as mutt_reopen_mailbox(), do rely on the values being a valid index to ctx->hdrs[]. And the intertwining of menu->oldcurrent with header->index values makes me nervous about future changes. So, to be safe, move the MSN to its own field in IMAP_HEADER_DATA. The next commit will fix the EXPUNGE behavior. 2017-05-13 09:48 -0700 Kevin McCarthy (4bffaa6d189a) * history.c: Don't filter new entries when compacting history save file. If new entries are added between the two passes, they won't be in the dup_hash. The original intent was to filter added duplicates, but the check would also filter brand new entries. 2017-05-12 18:31 -0700 Kevin McCarthy (7a4cc1750940) * doc/manual.xml.head, history.c, init.h: Also remove duplicates from the history file. When $history_remove_dups is set, remove duplicates from the history file when it is periodically compacted. 2017-05-12 18:31 -0700 Kevin McCarthy (e66c6c0e8cc6) * doc/manual.xml.head, history.c, init.h, mutt.h: Add $history_remove_dups option to remove dups from history ring. When set, duplicate entries will be removed from the history ring when a new entry is added. The duplicate removal rearranges the history ring such that created empty slots are right after the "last" position in the ring, preserving the most history. Rewrite the next/prev functions to take into account that blank slots can now be in the middle of the array. 2017-05-12 09:16 -0700 Kevin McCarthy (149f842ed1d0) * merge stable 2017-05-12 09:15 -0700 Kevin McCarthy (a97afb72d892) * imap/imap.c: Turn IMAP_EXPUNGE_EXPECTED back off when syncing. (closes #3940). imap_sync_mailbox() turned on IMAP_EXPUNGE_EXPECTED when issuing a EXPUNGE command during a sync. However, it forgot to turn it back off. That meant that an unexpected EXPUNGE that occurred during a mx_check_mailbox -> imap_check_mailbox() -> imap_cmd_finish() call was not setting idata->check_status = IMAP_EXPUNGE_PENDING; and so imap_check_mailbox() was not returning MUTT_REOPENED. This meant that although the Context had been changed, the index did not run update_index(), resulting in a possible segfault. Thanks to UroÅ¡ Juvan for reporting the issue, and his invaluable description of how to reproduce the problem. 2017-05-09 16:07 -0700 Kevin McCarthy (7f95b4c993b2) * init.c, init.h, menu.c, mutt_menu.h, pager.c: Create R_PAGER_FLOW config variable flag. Use this for $header_color_partial, $markers, and $smart_wrap. When these options are changed in the pager, this flag will force a recalculation of lineInfo. Remove the manual checks in OP_ENTER_COMMAND for $markers and $smart_wrap, and instead use the same REDRAW_FLOW processing used for a SigWinch. 2017-05-09 16:07 -0700 Kevin McCarthy (3fd8c4af4658) * curs_lib.c, mutt_menu.h, pager.c: Rename REDRAW_SIGWINCH to REDRAW_FLOW. The next patch will attach this redraw flag to pager settings. The former name becomes somewhat confusing with the expanded usage, so rename it to something more relevant to what is being redrawn. 2017-05-08 18:48 -0700 Kevin McCarthy (92d9db08a35e) * doc/manual.xml.head, init.h, mutt.h, pager.c: Add $header_color_partial to allow partial coloring of headers. When set, a regexp match will color only the matched text in the header. When unset (the default), the entire header will have color applied. With appropriate regexps, this allows coloring of just the header field name. Of course, it can also be used to highlight arbitrary phrases in the headers too. 2017-05-07 15:11 -0700 Kevin McCarthy (5006a0a36405) * mh.c: Improve maildir and mh to report flag changes in mx_check_mailbox() (closes #3865) mx_check_mailbox() would update the header flags, but was not returning MUTT_FLAGS back to the index loop. That meant a screen redraw was needed to be notified of externally modified flags. Change maildir_update_flags() to return 1 if the flags were actually changed. Change maildir_check_mailbox() and mh_check_mailbox() to return MUTT_FLAGS when that happens. Thanks to jcdenton and mike-burns for the original patch. 2017-05-05 14:03 -0700 Kevin McCarthy (161d5f18cae5) * curs_main.c: merge stable 2017-05-05 13:55 -0700 Kevin McCarthy (71cb68efe98e) * curs_main.c: Don't modify LastFolder/CurrentFolder upon aborting a change folder operation. Set LastFolder and CurrentFolder after mx_close_mailbox() has successfully completed. Otherwise, if the close is aborted, they will have incorrect values. 2017-05-05 12:46 -0700 Kevin McCarthy (6d4ceb8c5b9e) * curs_main.c, menu.c, pager.c, postpone.c: Change message modifying operations to additively set redraw flags. With the ability to set redraw flags with the menu stack operations, some operations internally modify the current menu redraw flag. For instance, _mutt_set_flag() can now set REDRAW_SIDEBAR. Change the ops that modify messages to use 'redraw |= REDRAW_X' instead of overwriting the flag value. 2017-05-04 18:11 -0700 Kevin McCarthy (c8ac1df1dcc9) * merge stable 2017-05-04 18:05 -0700 Kevin McCarthy (c08c72a0e24c) * mx.c: Fix sidebar count updates when closing mailbox. (closes #3938) The context unread and flagged counts were being updated too early in mx_close_mailbox(). Cancelling at any of the following prompts would leave them in an incorrect state. Additionally, $move could increase the delete count (for flagged messages), and $delete, if answered no, could turn off message deletion. Move all the sidebar buffy stat updating to the bottom of the function, after all the prompts and processing. 2017-05-03 18:52 -0700 Kevin McCarthy (a6db4750f675) * color.c, compose.c, doc/manual.xml.head, mutt_curses.h: Add color commands for the compose menu headers and security status. (closes #3915). Add "color compose header" to color the From/To/Subject/etc fields in the compose menu. Add "color compose security_encrypt/sign/both/none" to color the security status of the message. 2017-04-30 15:56 -0700 Kevin McCarthy (7e1edf6a7ed7) * sendlib.c: Remove glibc-specific execvpe() call in sendlib.c. (see #3937) Changeset fa1192803257 converted all exec calls to use mutt_envlist(). Unfortunately, the call in sendlib.c, execvpe(), is a glibc extension. Convert back to execvp() for now, to fix the build on MacOS. 2017-04-30 15:21 -0700 Kevin McCarthy (7dd3de416a54) * merge stable 2017-04-30 15:20 -0700 Kevin McCarthy (829584614fd6) * headers.c: Refresh header color when updating label. (closes #3935) color index with a '~y' pattern were not being updated after adding/removing labels. 2017-04-30 14:25 -0700 Kevin McCarthy (84acb1832fa9) * init.c, init.h: merge stable 2017-04-30 14:24 -0700 Kevin McCarthy (c54ac874a32b) * init.c, init.h: Fix unused function warnings when sidebar is disabled. (closes #3936) parse_path_list/unlist are currently only used by the un/sidebar_whitelist commands. Add an ifdef around them to stop an unused function warning. Add a comment too, so it's clear why they are ifdef'ed. 2017-04-30 13:32 -0700 Kevin McCarthy (b3d9d7a2f677) * merge stable 2017-04-30 13:32 -0700 Kevin McCarthy (deb66bd24b9d) * doc/manual.xml.head: Note that mbox-hooks are dependent on $move. Add a note to the "Using Multiple Spool Mailboxes" section. 2017-04-30 12:25 -0700 Vincent Lefevre (fa1192803257) * configure.ac, m4/gettext.m4, mutt_tunnel.c, pgp.c, protos.h, sendlib.c, setenv.c: Convert all exec calls to use mutt_envlist(), remove setenv function. The documentation implies that all children processes will be affected by the setenv command, so convert all the exec calls to use mutt_envlist(). The setenv("GPG_TTY") call is no longer needed so remove it. With that removed, there are no other setenv calls in mutt, so remove the autoconf check and replacement function. 2017-04-27 21:23 -0700 Kevin McCarthy (c65d0c23c142) * curs_lib.c, keymap.c, mutt_curses.h: merge stable 2017-04-27 21:22 -0700 Kevin McCarthy (b8952095b583) * curs_lib.c, keymap.c, mutt_curses.h: Fix km_error_key() infinite loop and unget buffer pollution. 'bind pager \Ch help' produces an infinite loop when an unbound key is pressed in the pager. The reason is because km_error_key() tries to verify that the key sequence is really bound to the OP_HELP operation. It does this by using km_expand_key(), tokenize_unget_string() on the resulting buffer, then checking if the next km_dokey() returns OP_HELP. The problem is that km_expand_key() does not always produce a string that is properly reparsed by tokenize_unget_string(). Control-h sequences are expanded to ^H. tokenize_unget_string() recognizes this as two characters '^' and 'H'. km_error_key() checks the OP returned, which is OP_PAGER_TOP for the '^'. This is not OP_HELP, so it prints a generic error and returns. This leaves the 'H' in the input buffer! Since 'H' (by default) is unbound in the pager, it retriggers km_error_key(), resulting in an infinite loop. The same issues can occur without control sequences: bind generic ? noop bind generic dq help In the index, hitting an unbound key will end up leaving 'q' in the unget buffer, because 'd' is bound in the index menu and will be read by km_dokey(). A simple approach to fix this would be to just use the same code as in mutt_make_help(), which has no double-check. This would be no worse than the help menu, but can generate an inaccurate error message (e.g if '?' were bound to noop) This patch instead uses OP_END_COND as a barrier in the unget buffer. It directly inserts the keys in the OP_HELP keymap, instead of using km_expand_key() + tokenize_unget_string(). After calling km_dokey() it flushes the unget buffer to the OP_END_COND barrier. Thanks to Walter Alejandro Iglesias for reporting the bug. 2017-04-26 15:43 -0700 Kevin McCarthy (92671c9c17bd) * merge stable 2017-04-26 15:40 -0700 Roger Cornelius (9a0afe7815d1) * mx.c: Fix error message when opening a mailbox with no read permission. (closes #3934) ctx->mx_ops ends up being NULL for both the case that ctx->magic is 0 and -1. This meant the mutt_perror() error message was never being printed, because the check for ctx->mx_ops == NULL was taking place first. Move the "ctx->magic == -1" check first, so mutt will print out an appropriate perror message in that case. 2017-04-18 16:18 -0700 Kevin McCarthy (69df899cdfa9) * merge stable 2017-04-18 16:15 -0700 Kevin McCarthy (2c57a7b4dc0b) * .hgsigs: mutt-1.8.2 signed 2017-04-18 16:14 -0700 Kevin McCarthy (455a698f274b) * .hgtags: Added tag mutt-1-8-2-rel for changeset c6ea4aed6bec 2017-04-18 16:14 -0700 Kevin McCarthy (c6ea4aed6bec) * ChangeLog, UPDATING, VERSION: automatic post-release commit for mutt-1.8.2 2017-04-18 13:13 -0700 Kevin McCarthy (385ba6449c30) * commands.c: Revert sort prompt labels. (see #3930) Using the (s)ort style may look a bit better, but it makes the prompt over 80 columns. The multichoice prompt supports multiple lines now, but it is better to have it fit on one line if possible. Revert back to the "capital letter" method, but leave the ticket open, to explore other ideas that Vincent and chdiza have for better ways to present a long choice like this. 2017-04-18 12:25 -0700 Kevin McCarthy (67677bca06fe) * init.c, pgp.c, protos.h: merge stable 2017-04-18 12:25 -0700 Kevin McCarthy (33995363e723) * filter.c, init.c, pgp.c, protos.h: Fix GPG_TTY to be added to envlist. (closes #3931) Changeset 37209157e33c converted filters to use the envlist. Unfortunately, I missed that pgp.c sets GPG_TTY when using the GnuPG agent. Convert to add GPG_TTY to the envlist too. 2017-04-17 17:40 -0700 Kevin McCarthy (851a7ec95399) * pager.c: Handle the pager sort prompt inside the pager. Display the prompt in the pager, so a multiline prompt or resize doesn't refresh the index menu. Then, bounce back through the index to handle resorting and status line updates. This also fixes cancelling to stay in the pager. 2017-04-17 17:40 -0700 Kevin McCarthy (979f1e669c16) * commands.c: Change the sort prompt to use (s)ort style prompts. This is consistent with the rest of mutt, and in my opinion, more readable. 2017-04-16 14:38 -0700 Kevin McCarthy (61295113f7ab) * curs_lib.c: Add multiline and sigwinch handling to mutt_yesorno. (closes #3877) Most of the yes/no and query_quadoption prompts are pretty short, but for completeness add handling for those too. 2017-04-15 12:56 -0700 Kevin McCarthy (2be3dd383c35) * curs_lib.c, pager.c: Set pager's REDRAW_SIGWINCH when reflowing windows. So that all external reflow handling functions don't have to remember to set the flag too. 2017-04-15 12:56 -0700 Kevin McCarthy (5849d1a052bb) * curs_lib.c: Add multiline and sigwinch handling to mutt_multi_choice. (see #3877) Resize the message window up to three lines to fix wide prompts. Enable sigwinch processing and redraw the current menu as needed. 2017-04-15 12:56 -0700 Kevin McCarthy (24e38e932693) * curs_lib.c, enter.c: Add ifdefs around new mutt_resize_screen calls. Changeset 231fa2eff206 added sigwinch handling to _mutt_enter_string() but neglected to add an ifdef check. 2017-04-12 18:00 -0700 Kevin McCarthy (39bf12dccf0c) * merge stable 2017-04-12 17:45 -0700 Kevin McCarthy (feccc2ac1b9a) * .hgsigs: mutt-1.8.1 signed 2017-04-12 17:44 -0700 Kevin McCarthy (491f7cfa03d9) * .hgtags: Added tag mutt-1-8-1-rel for changeset f44974c10990 2017-04-12 17:43 -0700 Kevin McCarthy (f44974c10990) * ChangeLog, UPDATING, VERSION: automatic post-release commit for mutt-1.8.1 2017-04-11 12:15 -0700 Kevin McCarthy (3c46ef05dca9) * compose.c: merge stable 2017-04-11 12:14 -0700 Kevin McCarthy (b825cbcaf6b5) * compose.c: Fix memleak when attaching files. 2017-04-08 14:21 -0700 Kevin McCarthy (29239b1a6d50) * commands.c: Ensure mutt stays in endwin during calls to pipe_msg() (closes #3929) The previous commit solved the problem reported in #3929: progressbar output while downloading a message via IMAP was refreshing the mutt ncurses session after launching the pipe program. To ensure another place in the code doesn't inadvertantly generate output, wrap OPTKEEPQUIET around the calls to pipe_msg()/mutt_wait_filter() too. 2017-04-08 14:21 -0700 Kevin McCarthy (0bf83c2fbbf2) * merge stable 2017-04-08 14:18 -0700 Kevin McCarthy (a8b1017a4cc1) * imap/message.c: Silence imap progress messages for pipe-message. (see #3929) _mutt_pipe_message() calls endwin(), and then calls pipe_msg(). If an imap message body hasn't already been downloaded, this can end up calling imap_fetch_message(). The progress messages in imap_fetch_message() were restoring curses, just after extract_url was running. This was leading to a condition where mutt curses didn't think the screen had changed after extract_url exited. There was already a check for isendwin() inside imap_fetch_message(), but it wasn't wrapped around the progressbar creation/usage. Add a check for those places too. 2017-04-05 16:09 -0700 Kevin McCarthy (303fc058692f) * query.c: Don't create query menu until after initial prompt. (see #3877) A resize in the prompt will trigger a redraw, but the data won't be loaded yet, displaying a blank screen instead of the previous menu. Once the query is done, the data is loaded, but the menu->redraw state has been changed by the resize. We could manually flag a redraw, but it makes more sense visually logically to just create the menu after the query and results are loaded. 2017-04-05 16:09 -0700 Kevin McCarthy (86848e5932b0) * curs_lib.c, pager.c: Separate out the pager menu redrawing. (see #3877) The pager relies on REDRAW_SIGWINCH, so add that to _mutt_get_field(). 2017-04-05 16:09 -0700 Kevin McCarthy (dcc95921c3c5) * pager.c: Prepare for pager redraw separation. (see #3877) Move some of the code inside SigWinch handling into the REDRAW part of the code. SigInt is handled by mutt_getch(), so remove the redundant code from inside the pager. 2017-04-05 16:09 -0700 Kevin McCarthy (178bd8b53cab) * curs_main.c: Separate out the index menu redrawing. (see #3877) 2017-04-05 16:09 -0700 Kevin McCarthy (c651b528f958) * compose.c, menu.c, mutt_menu.h: Separate out the compose menu redrawing. (see #3877) Add a custom_menu_redraw to the menu and change menu_redraw() to call that instead if set. 2017-04-05 16:09 -0700 Kevin McCarthy (231fa2eff206) * curs_lib.c, enter.c, keymap.c, menu.c, mutt_menu.h: Change km_dokey() to pass SigWinch on for the MENU_EDITOR. (see #3877) Change _mutt_enter_string() to pass the SigWinch through for _mutt_get_field() or mutt_enter_string() to handle. Add a call to mutt_current_menu() in _mutt_get_field() to properly redisplay the screen in that case. 2017-04-05 16:09 -0700 Kevin McCarthy (7f6ff45a7f59) * init.c: Remove redraw flag setting after mutt_endwin(). There is no need to set a redraw flag in this case. The screen will automatically be properly redrawn on the next refresh(). Remove, lest it get propagated. 2017-03-31 18:15 -0700 Kevin McCarthy (8b9bbd983b1a) * commands.c, compose.c, curs_lib.c, curs_main.c, pager.c, protos.h: Remove refresh parameter from mutt_enter_fname(). Also remove it from mutt_save_message(), which used it to pass through to mutt_enter_fname(). The callers of this already had redraw logic, to which REDRAW_STATUS merely needed to be added. 2017-03-31 18:15 -0700 Kevin McCarthy (68bbc47c8498) * init.c, init.h: Create R_MENU redraw option. Previously, the R_INDEX option meant both the index as well as all other menus. The removal of the OPTFORCEREDRAWINDEX option caused problems with redrawing other menus for options such as arrow_cursor. One solution would be change R_INDEX back to meaning "everything" except pager, but there are only a handful of options that affect other menus. Instead, create R_MENU to indicate options that affect either all menus or one of the other menus beside the index and pager. 2017-03-31 18:15 -0700 Kevin McCarthy (7f47e330bd72) * curs_lib.c, curs_main.c, init.h, pager.c: Change reflow_windows() to set full redraw. A full redraw should always be set in this case. This also enables us to remove redraw flags for some options. 2017-03-31 18:15 -0700 Kevin McCarthy (b36e4918d1d9) * buffy.c, curs_main.c, flags.c, globals.h, imap/command.c, init.c, menu.c, pager.c, sidebar.c: Remove SidebarNeedsRedraw. The menu stack can be used to flag a redraw of the sidebar window. 2017-03-31 18:15 -0700 Kevin McCarthy (06553f524887) * color.c, curs_lib.c, curs_main.c, init.c, menu.c, mutt.h, mutt_menu.h, pager.c, score.c: Remove the OPTFORCEREDRAW options. Use the menu stack to flag redraws for the index and pager. 2017-03-31 17:29 +0200 Vincent Lefevre (6fb6021389c8) * mbyte.c: Filter other directional markers that corrupt the screen. 2017-03-27 11:46 -0700 Kevin McCarthy (4c7881c441e7) * init.h: merge stable 2017-03-27 11:39 -0700 Kevin McCarthy (77032036c642) * init.c, init.h: Fix (un)sidebar_whitelist to expand paths. Thanks to Arturo for reporting the issue. 2017-03-26 18:31 -0700 Kevin McCarthy (4d06d85a4dd7) * curs_main.c: Don't full redraw the index when handling a command from the pager. This causes a noticable flicker when moving through messages from the pager. 2017-03-26 18:31 -0700 Kevin McCarthy (cb57cd88846b) * compose.c, crypt-gpgme.c, crypt-gpgme.h, crypt-mod-pgp-classic.c, crypt-mod-pgp-gpgme.c, crypt-mod-smime-classic.c, crypt-mod-smime- gpgme.c, crypt-mod.h, cryptglue.c, mutt_crypt.h, pgp.c, pgp.h, smime.c, smime.h: Remove redraw parameter from crypt send_menus. The parameter was used to notify the caller if the sign (a)s menu was invoked, which displayed the key selection menu. This is no longer necessary with the menu stack pop operation. 2017-03-26 18:31 -0700 Kevin McCarthy (7cced4378ed5) * addrbook.c, browser.c, commands.c, compose.c, crypt-gpgme.c, curs_lib.c, curs_main.c, enter.c, menu.c, mutt.h, mutt_curses.h, mutt_menu.h, mutt_ssl.c, pager.c, pgpkey.c, protos.h, query.c, remailer.c, remailer.h, smime.c: Set refresh when popping the menu stack. This removes the need for the OPTNEEDREDRAW option and MAYBE_REDRAW macro previously used to communicate back the need to refresh after exiting a menu. Remove the redraw parameter from ci_bounce_message() and mix_make_chain() which served the same purpose. 2017-03-26 18:31 -0700 Kevin McCarthy (dbb9fbe9b3de) * curs_main.c, menu.c, pager.c: Change CurrentMenu to be controlled by the menu stack. The pager menu is a bit tricky with respect to the menu->menu and CurrentMenu, so add a few comments. 2017-03-26 18:31 -0700 Kevin McCarthy (6551825f99fa) * addrbook.c, browser.c, compose.c, crypt-gpgme.c, curs_main.c, menu.c, mutt_menu.h, mutt_ssl.c, mutt_ssl_gnutls.c, pager.c, pgpkey.c, postpone.c, query.c, recvattach.c, remailer.c, smime.c: Add a menu stack to track current and past menus. Change the pager to use a MENU, right now just to hold the refresh state. 2017-03-26 12:27 -0700 Kevin McCarthy (b8519ee6bd74) * merge stable 2017-03-26 12:27 -0700 Kevin McCarthy (9da67ea88f25) * curs_lib.c: Fix mutt_refresh() pausing during macro events. Changeset a07e8215a0ef split input buffering into two pools. Unfortunately, the mutt_refresh() was not changed to check the correct buffer count, resulting in unnecessary refreshes during macros. The SSL interactive certificate prompts set OPTIGNOREMACROEVENTS and then put up a confirmation menu. Perhaps we've just been lucky, but it seems we should refresh the screen in those cases if we're in the middle of a macro. Add a check for this option in mutt_refresh() too. 2017-03-20 10:18 -0700 Kevin McCarthy (c875e6f4785d) * merge stable 2017-03-20 10:16 -0700 Kevin McCarthy (7cefa378ab7e) * init.c: Fix setenv overwriting to not truncate the envlist. (see #3922) The refactor in 2b9c40f13e13 exposed a bug I hadn't noticed. The match loop performed a FREE() on the slot. Then, below, it was checking if (*envp) to see whether it was overwriting or creating a new slot. However, FREE() nulls out *envp. This would end up truncating the envlist just after the set slot! Move the free down, using a mutt_str_replace(), when overwriting the slot. 2017-03-18 14:47 -0700 Kevin McCarthy (741865dfc052) * merge stable 2017-03-18 14:39 -0700 Kevin McCarthy (2b9c40f13e13) * init.c: Fix mutt_envlist_set() for the case that envlist is null. (see #3922) 2017-03-18 13:48 -0700 Kevin McCarthy (37209157e33c) * filter.c, init.c, protos.h, system.c: Pass envlist to filter children too. (closes #3922) The new setenv patch neglected to pass the envlist for filters too. Unfortunately, the filter code was already set up to pass COLUMNS to children, so it needed to be changed to add this to the envlist instead. Factor out mutt_envlist_set() from the parse_setenv() function, which the filter code can then use to set COLUMNS after forking. 2017-03-18 13:38 -0700 Kevin McCarthy (f09b8b2454c9) * main.c: Fix conststrings type mismatches. (closes #3926) The generation programs for conststrings.c: txt2c.c and txt2c.sh, specified the resultant types as "unsigned char[]" while main.c declared them as "const char[]". txt2.c generates 0xXX hex codes for each individual character, thus the "unsigned" definition. With link-time optimization, some versions of gcc notice the mismatch and emit a warning. Change the declarations to match the definitions and cast to char[] when they are used. 2017-03-13 18:38 -0700 Kevin McCarthy (23c00b71f653) * mutt_ssl.c: Change OpenSSL to use SHA-256 for cert comparison. (closes #3924) Note the GnuTLS code compares the certs directly to check if they are in the certfile. 2017-03-13 01:38 +0100 Vincent Lefevre (00cef7557f38) * po/fr.po: Updated French translation. 2017-03-12 10:54 -0700 Dmitri Vereshchagin (fc4beb8e0d56) * browser.c: Add shortcuts for IMAP and POP mailboxes in the file browser Mailbox list may not be properly displayed in a standard 80-column terminal window if the $folder variable contains a long URL. In such a case only left part of each entry name can be visible with the default value of $folder_format. What's worse, this visible part may not be enough to distinguish between the entries. Thus in this case mutt_pretty_mailbox() will be just as useful as for local mailboxes. 2017-03-09 13:38 -0800 Kevin McCarthy (5f65f3bcc066) * mutt_ssl_gnutls.c: Add SNI support for GnuTLS. (closes #3923) 2017-03-09 13:00 -0800 Kevin McCarthy (9d3d80dd963a) * mutt_ssl.c: Add SNI support for OpenSSL. (see #3923) The original patch for this is by Phil Pennock at: https://people.spodhuis.org/phil.pennock/software/mutt-patches/ I have removed the OpenSSL version check and defined(OPENSSL_NO_TLSEXT) check because: * SSL_set_tlsext_host_name() was added in 0.9.8f [11 Oct 2007] * OpenSSL 1.1 no longer has the OPENSSL_NO_TLSEXT compilation option * https://rt.openssl.org/Ticket/Display.html?id=2788&user=guest&pass=g uest shows that the no-tlsext compilation option has been broken for some time. * Going forward, I'd like to minimize and start removing cruft required to support ancient/insecure versions of libraries. 2017-03-09 11:59 -0800 Kevin McCarthy (be5d02a8e782) * mutt_ssl.c: OpenSSL: Don't offer (a)ccept always choice for hostname mismatches. (closes #3914) On a hostname mismatch, saving the certificate is pointless because mutt will ask the user no matter if the certificate is saved or not. The only invocation allowing "accept always" is guarded by a call to check_certificate_digest(), which means the check_certificate_file() check is redundant. Therefore remove that check and add a comment noting why. Thanks to Matthias Andree for the original version of this patch. 2017-03-09 10:56 -0800 Kevin McCarthy (f949694ea461) * mutt_ssl.c: Prevent skipped certs from showing a second time. (see #3916) OpenSSL sometimes passes a skipped certificate to ssl_verify_callback() a second time, with preverify_ok=1. From OpenSSL's viewpoint there is nothing wrong with this, but mutt will end up showing the certificate in the interactive prompt again. Cache the last cert and position, and compare with the latest when skip_mode and preverify_ok are both set. 2017-03-07 18:26 -0800 Kevin McCarthy (2a0d3c4a9b0f) * mutt_ssl.c: Don't allow storing duplicate certs for OpenSSL interactive prompt. (closes #3914) Check to make sure the certificate is not already in the $certificate_file before offering the (a)ccept always option. To allow a cert with a new validity timespan to be added to the file, check the expiration dates when comparing certificates in the certficate file. 2017-03-07 18:26 -0800 Kevin McCarthy (4cb6408b5fef) * configure.ac, doc/makedoc-defs.h, init.h, mutt.h, mutt_ssl.c: Move the OpenSSL partial chain support check inside configure.ac. (see #3916) Instead of directly checking whether X509_V_FLAG_PARTIAL_CHAIN is defined everywhere, do it once inside configure. This will allow better support in the future if the test needs to change. 2017-03-07 18:26 -0800 Matthias Andree (5a04f3797f03) * doc/makedoc-defs.h, init.h, mutt.h, mutt_ssl.c: Add $ssl_verify_partial_chains option for OpenSSL. (closes #3916) The reworked OpenSSL certificate validation took away a "feature" of the previous implementation: the ability to reject a node in the chain and yet continue to the next node. If this new option is set to 'yes', enables OpenSSL's X509_V_FLAG_PARTIAL_CHAIN flag to reinstate the functionality and permit to use a non-root certificate as the trust anchor. This option is only available if OpenSSL offers the X509_V_FLAG_PARTIAL_CHAIN macro, which should be the case as of 1.0.2b or later. Code written by Kevin McCarthy and Matthias Andree. 2017-03-05 15:26 -0800 Kevin McCarthy (daa9111c1f42) * merge stable 2017-03-05 15:24 -0800 Kevin McCarthy (f0e3b2875065) * account.h: Increase ACCOUNT.pass field size. (closes #3921) #3921 reported his password token used for Google XOAUTH2 is size 129. The ACCOUNT structure currently uses a size 128 buffer. Who knew a password field would ever be bigger than that? Since the ACCOUNT structure has no allocation/dellocation routines, the easiest fix is to increase the size. Bump the size up to 256. 2017-03-02 15:54 -0800 Kevin McCarthy (d15de76f7123) * merge stable 2017-03-02 15:53 -0800 Matthias Andree (5fc3c0729a07) * mutt_ssl.c: SSL: Fix memory leak in subject alternative name code. (closes #3920) 2017-03-02 14:58 -0800 Kevin McCarthy (9ede6c95d3d5) * merge stable 2017-03-02 14:53 -0800 Kevin McCarthy (e3e47b2f1370) * mbox.c: Prevent segv if open-appending to an mbox fails. (closes #3918) If mbox_open_mailbox_append() fails, ctx->fp will be null. Add a check in mbox_close_mailbox(), to prevent a segv from passing null to fileno(). 2017-03-02 13:17 -0800 Kevin McCarthy (28d7872d0646) * merge stable 2017-03-02 13:11 -0800 Kevin McCarthy (e82253beaa9f) * mutt_ssl.c: Clear out extraneous errors before SSL_connect() (see #3916) Call ERR_clear_error() just before the call to SSL_connect() to make sure the error queue doesn't have any old errors in it. PEM_read_X509() sets an error PEM_R_NO_START_LINE on end-of-file. Clear that out so it doesn't show up as the SSL_connect() error message. 2017-02-24 11:00 -0800 Kevin McCarthy (f85c3eb8d065) * merge default into stable 2017-02-24 10:55 -0800 Kevin McCarthy (7cc47d82cac4) * .hgsigs: mutt-1.8.0 signed 2017-02-24 10:50 -0800 Kevin McCarthy (1672b430cbc3) * .hgtags: Added tag mutt-1-8-rel for changeset d897983752f9 2017-02-24 10:50 -0800 Kevin McCarthy (d897983752f9) * ChangeLog, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.8.0 2017-05-23 15:53 -0700 Kevin McCarthy (fa0c2155ab8f) * mx.c: Fix memory leak when closing mailbox and using the sidebar. The code updating the sidebar counts decremented the msgcount, but did not set it back to the original value. Which means fastclose was not freeing all the headers. Update the sidebar only when something is deleted, since I don't believe it's required otherwise and the code is a bit cleaner that way. 2017-05-22 18:18 -0700 Kevin McCarthy (59a2125b49f2) * imap/imap.c: Don't clean up idata when closing an open-append mailbox. open-append borrows the idata just for the connection. The "mailbox specific" part of the idata may be being used by a normal open- mailbox. Don't free the idata "mailbox specific" part when closing an open- append mailbox. Thanks to Will Yardley for discovering the bug as part of testing the revised IMAP fetch_headers code (in the default branch). 2017-05-22 05:08 -0700 TAKAHASHI Tamotsu (1ddf2641f369) * mx.c: Fix potential segv if mx_open_mailbox is passed an empty string. (closes #3945) If path is "", ctx->path will be NULL. realpath() generally will segv if the first parameter is NULL. 2017-05-12 09:15 -0700 Kevin McCarthy (a97afb72d892) * imap/imap.c: Turn IMAP_EXPUNGE_EXPECTED back off when syncing. (closes #3940). imap_sync_mailbox() turned on IMAP_EXPUNGE_EXPECTED when issuing a EXPUNGE command during a sync. However, it forgot to turn it back off. That meant that an unexpected EXPUNGE that occurred during a mx_check_mailbox -> imap_check_mailbox() -> imap_cmd_finish() call was not setting idata->check_status = IMAP_EXPUNGE_PENDING; and so imap_check_mailbox() was not returning MUTT_REOPENED. This meant that although the Context had been changed, the index did not run update_index(), resulting in a possible segfault. Thanks to UroÅ¡ Juvan for reporting the issue, and his invaluable description of how to reproduce the problem. 2017-05-05 13:55 -0700 Kevin McCarthy (71cb68efe98e) * curs_main.c: Don't modify LastFolder/CurrentFolder upon aborting a change folder operation. Set LastFolder and CurrentFolder after mx_close_mailbox() has successfully completed. Otherwise, if the close is aborted, they will have incorrect values. 2017-05-04 18:05 -0700 Kevin McCarthy (c08c72a0e24c) * mx.c: Fix sidebar count updates when closing mailbox. (closes #3938) The context unread and flagged counts were being updated too early in mx_close_mailbox(). Cancelling at any of the following prompts would leave them in an incorrect state. Additionally, $move could increase the delete count (for flagged messages), and $delete, if answered no, could turn off message deletion. Move all the sidebar buffy stat updating to the bottom of the function, after all the prompts and processing. 2017-04-30 15:20 -0700 Kevin McCarthy (829584614fd6) * headers.c: Refresh header color when updating label. (closes #3935) color index with a '~y' pattern were not being updated after adding/removing labels. 2017-04-30 14:24 -0700 Kevin McCarthy (c54ac874a32b) * init.c, init.h: Fix unused function warnings when sidebar is disabled. (closes #3936) parse_path_list/unlist are currently only used by the un/sidebar_whitelist commands. Add an ifdef around them to stop an unused function warning. Add a comment too, so it's clear why they are ifdef'ed. 2017-04-30 13:32 -0700 Kevin McCarthy (deb66bd24b9d) * doc/manual.xml.head: Note that mbox-hooks are dependent on $move. Add a note to the "Using Multiple Spool Mailboxes" section. 2017-04-27 21:22 -0700 Kevin McCarthy (b8952095b583) * curs_lib.c, keymap.c, mutt_curses.h: Fix km_error_key() infinite loop and unget buffer pollution. 'bind pager \Ch help' produces an infinite loop when an unbound key is pressed in the pager. The reason is because km_error_key() tries to verify that the key sequence is really bound to the OP_HELP operation. It does this by using km_expand_key(), tokenize_unget_string() on the resulting buffer, then checking if the next km_dokey() returns OP_HELP. The problem is that km_expand_key() does not always produce a string that is properly reparsed by tokenize_unget_string(). Control-h sequences are expanded to ^H. tokenize_unget_string() recognizes this as two characters '^' and 'H'. km_error_key() checks the OP returned, which is OP_PAGER_TOP for the '^'. This is not OP_HELP, so it prints a generic error and returns. This leaves the 'H' in the input buffer! Since 'H' (by default) is unbound in the pager, it retriggers km_error_key(), resulting in an infinite loop. The same issues can occur without control sequences: bind generic ? noop bind generic dq help In the index, hitting an unbound key will end up leaving 'q' in the unget buffer, because 'd' is bound in the index menu and will be read by km_dokey(). A simple approach to fix this would be to just use the same code as in mutt_make_help(), which has no double-check. This would be no worse than the help menu, but can generate an inaccurate error message (e.g if '?' were bound to noop) This patch instead uses OP_END_COND as a barrier in the unget buffer. It directly inserts the keys in the OP_HELP keymap, instead of using km_expand_key() + tokenize_unget_string(). After calling km_dokey() it flushes the unget buffer to the OP_END_COND barrier. Thanks to Walter Alejandro Iglesias for reporting the bug. 2017-04-26 15:40 -0700 Roger Cornelius (9a0afe7815d1) * mx.c: Fix error message when opening a mailbox with no read permission. (closes #3934) ctx->mx_ops ends up being NULL for both the case that ctx->magic is 0 and -1. This meant the mutt_perror() error message was never being printed, because the check for ctx->mx_ops == NULL was taking place first. Move the "ctx->magic == -1" check first, so mutt will print out an appropriate perror message in that case. 2017-04-18 16:15 -0700 Kevin McCarthy (2c57a7b4dc0b) * .hgsigs: mutt-1.8.2 signed 2017-04-18 16:14 -0700 Kevin McCarthy (455a698f274b) * .hgtags: Added tag mutt-1-8-2-rel for changeset c6ea4aed6bec 2017-04-18 16:14 -0700 Kevin McCarthy (c6ea4aed6bec) * ChangeLog, UPDATING, VERSION: automatic post-release commit for mutt-1.8.2 2017-04-18 12:25 -0700 Kevin McCarthy (33995363e723) * filter.c, init.c, pgp.c, protos.h: Fix GPG_TTY to be added to envlist. (closes #3931) Changeset 37209157e33c converted filters to use the envlist. Unfortunately, I missed that pgp.c sets GPG_TTY when using the GnuPG agent. Convert to add GPG_TTY to the envlist too. 2017-04-12 17:45 -0700 Kevin McCarthy (feccc2ac1b9a) * .hgsigs: mutt-1.8.1 signed 2017-04-12 17:44 -0700 Kevin McCarthy (491f7cfa03d9) * .hgtags: Added tag mutt-1-8-1-rel for changeset f44974c10990 2017-04-12 17:43 -0700 Kevin McCarthy (f44974c10990) * ChangeLog, UPDATING, VERSION: automatic post-release commit for mutt-1.8.1 2017-04-11 12:14 -0700 Kevin McCarthy (b825cbcaf6b5) * compose.c: Fix memleak when attaching files. 2017-04-08 14:18 -0700 Kevin McCarthy (a8b1017a4cc1) * imap/message.c: Silence imap progress messages for pipe-message. (see #3929) _mutt_pipe_message() calls endwin(), and then calls pipe_msg(). If an imap message body hasn't already been downloaded, this can end up calling imap_fetch_message(). The progress messages in imap_fetch_message() were restoring curses, just after extract_url was running. This was leading to a condition where mutt curses didn't think the screen had changed after extract_url exited. There was already a check for isendwin() inside imap_fetch_message(), but it wasn't wrapped around the progressbar creation/usage. Add a check for those places too. 2017-03-27 11:39 -0700 Kevin McCarthy (77032036c642) * init.c, init.h: Fix (un)sidebar_whitelist to expand paths. Thanks to Arturo for reporting the issue. 2017-03-26 12:27 -0700 Kevin McCarthy (9da67ea88f25) * curs_lib.c: Fix mutt_refresh() pausing during macro events. Changeset a07e8215a0ef split input buffering into two pools. Unfortunately, the mutt_refresh() was not changed to check the correct buffer count, resulting in unnecessary refreshes during macros. The SSL interactive certificate prompts set OPTIGNOREMACROEVENTS and then put up a confirmation menu. Perhaps we've just been lucky, but it seems we should refresh the screen in those cases if we're in the middle of a macro. Add a check for this option in mutt_refresh() too. 2017-03-20 10:16 -0700 Kevin McCarthy (7cefa378ab7e) * init.c: Fix setenv overwriting to not truncate the envlist. (see #3922) The refactor in 2b9c40f13e13 exposed a bug I hadn't noticed. The match loop performed a FREE() on the slot. Then, below, it was checking if (*envp) to see whether it was overwriting or creating a new slot. However, FREE() nulls out *envp. This would end up truncating the envlist just after the set slot! Move the free down, using a mutt_str_replace(), when overwriting the slot. 2017-03-18 14:39 -0700 Kevin McCarthy (2b9c40f13e13) * init.c: Fix mutt_envlist_set() for the case that envlist is null. (see #3922) 2017-03-18 13:48 -0700 Kevin McCarthy (37209157e33c) * filter.c, init.c, protos.h, system.c: Pass envlist to filter children too. (closes #3922) The new setenv patch neglected to pass the envlist for filters too. Unfortunately, the filter code was already set up to pass COLUMNS to children, so it needed to be changed to add this to the envlist instead. Factor out mutt_envlist_set() from the parse_setenv() function, which the filter code can then use to set COLUMNS after forking. 2017-03-05 15:24 -0800 Kevin McCarthy (f0e3b2875065) * account.h: Increase ACCOUNT.pass field size. (closes #3921) #3921 reported his password token used for Google XOAUTH2 is size 129. The ACCOUNT structure currently uses a size 128 buffer. Who knew a password field would ever be bigger than that? Since the ACCOUNT structure has no allocation/dellocation routines, the easiest fix is to increase the size. Bump the size up to 256. 2017-03-02 15:53 -0800 Matthias Andree (5fc3c0729a07) * mutt_ssl.c: SSL: Fix memory leak in subject alternative name code. (closes #3920) 2017-03-02 14:53 -0800 Kevin McCarthy (e3e47b2f1370) * mbox.c: Prevent segv if open-appending to an mbox fails. (closes #3918) If mbox_open_mailbox_append() fails, ctx->fp will be null. Add a check in mbox_close_mailbox(), to prevent a segv from passing null to fileno(). 2017-03-02 13:11 -0800 Kevin McCarthy (e82253beaa9f) * mutt_ssl.c: Clear out extraneous errors before SSL_connect() (see #3916) Call ERR_clear_error() just before the call to SSL_connect() to make sure the error queue doesn't have any old errors in it. PEM_read_X509() sets an error PEM_R_NO_START_LINE on end-of-file. Clear that out so it doesn't show up as the SSL_connect() error message. 2017-02-24 11:00 -0800 Kevin McCarthy (f85c3eb8d065) * merge default into stable 2017-02-24 10:55 -0800 Kevin McCarthy (7cc47d82cac4) * .hgsigs: mutt-1.8.0 signed 2017-02-24 10:50 -0800 Kevin McCarthy (1672b430cbc3) * .hgtags: Added tag mutt-1-8-rel for changeset d897983752f9 2017-02-24 10:50 -0800 Kevin McCarthy (d897983752f9) * ChangeLog, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.8.0 2017-02-23 08:56 -0800 TAKAHASHI Tamotsu (43e312cee971) * po/ja.po: Updated Japanese translation. 2017-02-22 15:58 -0800 Benno Schulenberg (3e1d26df748e) * po/nl.po: Updated Dutch translation. 2017-02-22 12:58 -0800 Benno Schulenberg (4b445c73fc77) * po/eo.po: Updated Esperanto translation. 2017-02-22 12:50 -0800 Kevin McCarthy (5b68a3022b82) * UPDATING, doc/manual.xml.head, init.h: Minor touchups to documentation and UPDATING file. 2017-02-19 18:51 -0800 Kevin McCarthy (715c276641c6) * doc/manual.xml.head: Mention $XDG_CONFIG_HOME/mutt/ in the manual. 2017-02-19 18:30 -0800 Kevin McCarthy (1575671b3c60) * UPDATING: Reword some of the UPDATING entries. Thanks to Matthias Andree for his feedback and suggestions! 2017-02-18 15:15 -0800 Kevin McCarthy (e4a5d1913e42) * UPDATING: Add 1.8.0 entries to the UPDATING file. 2017-02-18 21:30 +0000 Athanasios Douitsis (943b281abfbb) * getdomain.c: Prevent null pointer exception for h->ai_canonname The getaddrinfo call in line 54 sets &h to a struct addrinfo. If a canonical name cannot be found for the node argument of getaddrinfo, h->ai_canonname is set to NULL. In that case, the strchr call in line 58 can lead to segfault. This behavior was observed on a macos sierra while the hostname was 192.168.1.3 (unfortunately this happens quite often in macos). The fix is simple, just check h->ai_canonname for the NULL value. 2017-02-17 20:02 -0800 Ivan Vilata i Balaguer (9b7780b48f47) * po/ca.po: Updated Catalan translation. 2017-02-16 12:44 -0800 Vsevolod Volkov (27ee126fb9c5) * po/ru.po: Updated Russian translation. 2017-02-16 12:41 -0800 Vsevolod Volkov (ed569b004aef) * po/uk.po: Updated Ukrainian translation. 2017-02-16 11:22 -0800 Morten Bo Johansen (20eccc63e008) * po/da.po: Updated Danish translation. 2017-02-13 12:26 -0800 Petr Pisar (519a8c8cc55c) * po/cs.po: Updated Czech translation. 2017-02-12 13:03 -0800 Matthias Andree (cec61c6926ea) * mutt_ssl.c: Show SHA1 fp in interactive cert check menu. While here, fix a few compiler warnings about sign mismatch in comparison. 2017-02-12 12:24 -0800 Kevin McCarthy (2350d7d61b34) * mutt_ssl.c: Fix potential cert memory leak in check_certificate_by_digest(). Thanks to Matthias Andree's debugging, it appears the cert is not freed when PEM_read_X509() encounters EOF. Change the return value check to not overwrite cert. It is already updated via the second parameter. 2017-02-12 09:59 -0800 Matthias Andree (48a1f145c269) * mutt_ssl.c: Plug memory leak in weed-expired-certs code. X509_STORE_add_cert() creates a copy of the certificate we're offering, so we need to free our copy afterwards. This isn't documented, but from observed behaviour in OpenSSL 1.0.2 and its master branch source code. Change PEM_read_X509() call to reuse cert to avoid free/reallocation overhead. 2017-02-12 09:59 -0800 Kevin McCarthy (2632bc4f5b20) * mutt_ssl.c: Filter expired local certs for OpenSSL verification. OpenSSL has trouble establishing the chain and verifying when duplicate expired certs are loaded in from $certificate_file. A warning about this is mentioned in SSL_CTX_load_verify_locations(3SSL). Filter out expired certs when loading verify certs. Note that the full certicates file is still used for verification in check_certificate_by_digest(). 2017-02-10 13:01 -0800 Kevin McCarthy (7c97a8af8718) * alias.c, group.c, hash.c, hash.h, headers.c, imap/message.c, init.c, mh.c, mx.c, pop.c, thread.c: Change "allow_dups" into a flag at hash creation. Instead of having an "allow_dups" parameter for hash_insert(), add a flag, MUTT_HASH_ALLOW_DUPS, to hash_create(). Currently ReverseAlias, subj_hash, and thread_hash allow duplicate keys. Change those hashes to pass the flag at creation, and remove the last parameter from all callers of hash_insert(). 2017-02-10 12:56 -0800 Petr Pisar (e2b186a92390) * po/cs.po: Updated Czech translation. 2017-02-10 12:51 +0100 Vincent Lefevre (a4449ebfb5f4) * po/fr.po: Updated French translation. 2017-02-08 07:48 -0800 Kevin McCarthy (d215a36fd8ee) * hcache.c: Fix build for bdb. Changeset fca7e504ab6a removed #else/#endif around two blocks of code that won't compile with bdb enabled. Restore those directives. Thanks to Richard Russon for pointing out the problem and saving me from having egg all over my face with the 1.8 release! 2017-02-07 19:36 -0800 Kevin McCarthy (09bb4a62ceb1) * hcache.c, hcache.h, imap/imap.c, imap/message.c, imap/util.c, mh.c, pop.c: Create function to free header cache data. Kyoto Cabinet documents that data from it should be freed via kcfree(). LMDB claims ownership of the data returned, so convert its free operation to be a noop and remove the malloc from its fetch function. 2017-02-07 19:36 -0800 Kevin McCarthy (52481ceb6c6e) * configure.ac, doc/manual.xml.head, hcache.c, init.h, mutt.h: Add Kyoto Cabinet support to the header cache. Retain the defaults as they are, although we might switch to Kyoto Cabinet for the next major release. 2017-02-04 12:53 -0800 Kevin McCarthy (fca7e504ab6a) * hcache.c: Fixes to the LMDB header cache. (closes #3691) Use mdb_txn_abort() to free up readonly/reset transactions, and avoid leaking memory. Fix hcache_delete() key generation - looks like this was an incorrect copy/paste from the bdb code. Use dprint, not fprintf, for debugging messages. Remove strange blending of enum and bitfield logic for the txn_mode state. Remove some duplicate code from store/fetch raw. 2017-02-04 12:53 -0800 Kevin McCarthy (42aa8b19da95) * configure.ac, hcache.c: Add LMDB backend support for header cache. (see #3691) Based on the original from JP Mens: https://gist.github.com/jpmens/15969d9d678a3d450e4e The following performance patch was manually applied on top of the original patch: https://github.com/neomutt/neomutt/commit/7e5380cd4c 40d119ff83b2cf5f51f2cdb8a95ab3 A variant of this patch was added to handle larger mailboxes: https: //github.com/neomutt/neomutt/commit/6d337642e701b1dde4b5d0812e01c85f 41ba65ca Thanks to all the developers and contributors to this patch, and to Fabian Groffen for bundling and posting this to mutt-dev. 2017-01-31 15:02 -0800 Kevin McCarthy (142a87f0c855) * enter.c: Minor fix to ~y completion. Make sure the entire ~y is before curpos when enabling completion. 2017-01-31 14:27 -0800 Kevin McCarthy (82034c72b6da) * enter.c, init.c, protos.h: Simplify mutt_label_complete(). It was derived from mutt_command_complete(), which had more complex requirements. For labels, we just need to skip whitespace and complete based on the passed in buffer. Therefore, we don't need the pos parameter, or to work backwards from the end of the buffer. 2017-01-31 14:27 -0800 Kevin McCarthy (298654f1d70c) * enter.c: Permit tab completion of pattern expressions with ~y (labels). Thanks to David Champion for the original patch. This version is slightly different, as I couldn't get the original patch working. This version simply scans backward for the first ~, and if it is ~y, invokes completion. 2017-01-31 14:27 -0800 Kevin McCarthy (9ca99f2b1205) * enter.c: Fix the mutt_label_complete() pos parameter. i is the state->wbuf index, not the end of the buf. It was "working" only because the contents of buf past the null were not "space" most of the time. 2017-01-29 11:02 -0800 Kevin McCarthy (ab2f8882633b) * copy.c: Fix the x-label update code check location. The x-label comparison was outside the "beginning of header" block. This meant that it could theoretically match a continuation line. Additionally, the continuation lines of x-labels would not be stripped, because the comparison was after the ignore variable was reset. Move the comparison inside the block and before the ignore reset. 2017-01-28 18:48 -0800 Kevin McCarthy (d0909785d945) * curs_main.c, globals.h, headers.c, init.c, main.c, mbox.c, mutt.h, mx.c, pop.c, protos.h: Improve the label completion hash table usage. Move the hash table inside the Context. Hook message arrival/deletion to update the label hash. Change the label hash to strdup keys. Use hash_find_elem when updating the counter, to reduce unnecessary add/delete operations. 2017-01-28 18:47 -0800 David Champion (66cc205ea76a) * curs_main.c, doc/manual.xml.head, enter.c, globals.h, headers.c, init.c, main.c, mutt.h, protos.h: Adds label completion. A global label hash is added, to which labels are added as they're parsed from a mailbox file or edited manually by the user. Reference counts are kept in the hash table so that unused labels are removed from available completions. Completion is available in the label editor only, but it may be feasible to add for search expressions if the preceding text ends with '~y'. 2017-01-28 18:47 -0800 Kevin McCarthy (51c5e574a082) * hash.c, hash.h: Add hash_find_elem to get the hash element. This will be used in the following patch for directly manipulating the label counter. 2017-01-28 18:47 -0800 David Champion (169b67b5b666) * hash.c, hash.h: Add reentrant hash_walk() function for iterating down a hash table. 2017-01-28 18:47 -0800 Kevin McCarthy (95b892b3f856) * commands.c, copy.c, curs_main.c, functions.h, headers.c, pager.c: Minor fixes to the x-label patch from David. Add L10N comment to sort menu. Mark a couple strings for localization. Use ascii_strncasecmp() for the X-Label header comparison. Simplify label_message() using mutt library routines. Bind label editing to "Y" instead of "y". "y" is already used in the default sample muttrc to display mailboxes. 2017-01-28 18:47 -0800 David Champion (67525605640e) * OPS, commands.c, copy.c, copy.h, curs_main.c, doc/manual.xml.head, functions.h, headers.c, imap/imap.c, init.h, mh.c, mutt.h, pager.c, protos.h, sort.c, sort.h: Adds capability to edit x-labels inside mutt, and to sort by label. 2017-01-24 15:33 -0800 Kevin McCarthy (e4ad1dc9bfbd) * doc/manual.xml.head, init.c: Allow "unsubjectrc *" to remove all patterns. Thanks to Aaron Schrab for the original patch. 2017-01-23 19:01 -0800 David Champion (9e876d64d3c8) * doc/manual.xml.head, globals.h, hdrline.c, init.c, init.h, mutt.h, muttlib.c: Add subjectrx command to replace matching subjects with something else. This lets you define regular expressions-replacement pairs for subject display. When a Subject: matches the regular expression, the replacement value will be displayed instead in the message index. Backreferences are supported. This is especially nice for simplifying subjects that are overly wordy, such as mailing list posts (with [Listname] tags, etc), mail from ticketing systems or bug trackers, etc. It lets you reduce clutter in your mutt display without altering the messages themselves. 2017-01-23 19:01 -0800 David Champion (f05df6b258f3) * globals.h, hcache.c, init.c, mutt.h, muttlib.c, protos.h: Abstract the SPAM_LIST as a generic REPLACE_LIST REPLACE_LIST can be used more generally as a list of pattern match- replace settings. SPAM_LIST was a special case of this, so spam handling has been been changed to use REPLACE_LIST instead, and SPAM_LIST was removed. A generic function for performing a REPLACE_LIST replacement has been added in mutt_apply_replace(). Commited by Kevin McCarthy with some buffer overflow fixes in mutt_apply_replace(). 2017-01-23 18:46 -0800 Kevin McCarthy (7a8ea1bb09f0) * send.c: Improve Reply-to vs From comparison when replying. (closes #3909) Prior to this patch, if the Reply-to mailbox matched the From mailbox, mutt would always use the From address. This was probably done to preserve the display name, as the Reply-to address is often missing one. Unfortunately, there are circumstances where the Reply-to display- name has significance, such as in ticket 3909. Change mutt so that it only uses the From address if the Reply-To has no display-name. 2017-01-19 14:58 -0800 Kevin McCarthy (b57c695b7923) * doc/manual.xml.head, init.h, sidebar.c, sort.h: Fix sidebar references to the "new count" to be "unread". (closes #3908) %N in $sidebar_format and "new"in $sidebar_sort_method actually use the unread message count. Update the documentation to mention that. Add an "unread" method to $sidebar_sort_method, but preserve "new" for compatibility. Change the SORT_COUNT_NEW constant to SORT_UNREAD, so the code is also consistent with the meaning. Thanks to cri for reporting the problem and suggesting where to fix it in the code. 2017-01-17 16:09 -0800 Kevin McCarthy (a555ada578b8) * addrbook.c, alias.c, init.c: Fix several alias hashtable issues. Convert to use the strdup keys hash. Addresses can be converted back and forth from intl to local forms. This frees and recreates a new addr->mailbox string, resulting in the hash table key being a dangling pointer. Change alias hash table insert/remove to ensure the address is in intl form. The alias menu (previously) converted address entries to local form when performing a completion. Even with the pointer issue fixed, the entries may not be removed from the hash if the intl and local forms are different. Lastly, there is no reason for the alias menu to manually convert to local form before writing the address to the output buffer. rfc822_write_address() has a display parameter that will call mutt_addr_for_display() instead when set. Change to set the display parameter and remove the conversion calls. This last change obviates the first two changes, but they are a good idea in any case. 2017-01-17 16:09 -0800 Kevin McCarthy (fc6990144167) * hash.c, hash.h, init.c: Add casecmp and strdup_key flags to hash_create() Aliases and (in the future), X-Label hashes will require a hash that strdups the key. Convert the casecmp parameter of hash_create() to a flags parameter, and add a flag to strdup the keys. 2017-01-15 10:00 -0800 Kevin McCarthy (ac1a2af3aff4) * mx.c: Improve error handling in mbox magic detection. Thanks to Simon Ruderich for pointing out several small issues with the previous commit. 2017-01-14 19:18 -0800 David Champion (945a3f4b15c7) * mx.c: Allow initial blank lines in local mailboxes. Some mailbox-creation tools erroneously append a blank line to a file before appending a UNIXv7-format mail message, resulting in mailboxes that are intended to be valid "mbox" folders but are not. Notably old versions of Mailman do this, making archive files that cannot be read by mutt. This patch causes mutt to skip leading NLs and CRs when detecting magic. 2017-01-10 14:48 -0800 Simon Ruderich (79306170e367) * doc/manual.xml.head, doc/muttrc.man.head: Fix minor documentation issues. manual.xml: Wrap line for clarity. muttrc.man: Remove superfluous spaces in brackets. Add missing error object in color command. Sort the prompt object. Add sidebar color objects. 2017-01-06 14:37 -0800 Kevin McCarthy (7c0e7a0769e4) * imap/command.c: Convert cmd_parse_search to use the uid hash. (closes #3905) Replace the linear scan for each result with a hash lookup. This should greatly improve performance for large mailboxes. 2017-01-06 14:23 -0800 Kevin McCarthy (1ad1013cbf5b) * imap/imap.c, imap/imap_private.h, imap/message.c: Create a uid hash for imap. (see #3905) This hash will allow for more efficient UID SEARCH processing, replacing a linear scan with a hash lookup. 2017-01-06 14:17 -0800 Kevin McCarthy (ebb93147aec7) * hash.c, hash.h, thread.c: Convert HASH to be indexable by unsigned int. (see #3905) Convert the HASH to be usable for either string or unsigned int keys, so that a uid hash can be added for imap. To keep hash-usage code disruption to a minimum, this introduces new create/insert/find/delete functions for the int hash, but keeps the old function names for string keys. This implementation makes the key a union. It may have been a better idea to introduce a whole new structure, but this way allows minimum changes to and maximum reuse of the existing hash code. 2017-01-04 19:45 -0800 Kevin McCarthy (4f0a84b954ef) * imap/command.c: Fix imap server-side search to call uid2msgno() only once. (see #3905) After performing a UID SEARCH, the results are parsed in cmd_parse_search(). This was accidentally calling uid2msgno() twice. Since that function does a linear search, this has a noticable impact on large search results. 2017-01-02 18:08 -0800 Kevin McCarthy (23b02a482bde) * curs_main.c, hook.c, mutt.h, pattern.c, protos.h, score.c: Add a pattern_cache_t to speed up a few repeated matches. Vincent Lefèvre reported experiencing an index display performance issue. This occurred with messages containing many recipients. He had many index color lines containing ~l. The ~l ended up being run over and over on these messages, resulting in a noticable slowdown displaying the index. This patch adds caching for just a few of the pattern operations (~l, ~u, ~p, ~P) that are potentially expensive and also don't have arguments. The caching is only enabled for operations repeatedly matching against the same message: color, hooks, scoring. The caching is fairly targeted, but isn't that invasive or complicated. 2016-12-31 19:57 -0800 Kevin McCarthy (2bc2ec9ac664) * crypt-gpgme.c: Canonicalize line endings for GPGME S/MIME encryption. (closes #3904) This matches the behavior for S/MIME classic mode: OpenSSL converts the line endings to cr/lf before encrypting. Although Mutt always canonicalizes the line endings before verifying the signature, some clients do not do this for encrypted messages. Thanks to cooler for the patch! 2016-12-27 15:23 -0800 Kevin McCarthy (4cb0cd767af2) * globals.h, hdrline.c, init.h, status.c: Make to_chars and status_chars accept mulitibyte characters. (closes #3024) Change Tochars and StChars to use the mbchars_table type introduced in the last commit. 2016-12-27 15:23 -0800 Kevin McCarthy (1d054932abfb) * doc/makedoc.c, init.c, init.h, mutt.h: Create mbchar_table type for multibyte character arrays. (see #3024) This type is to allow multibyte characters in to_chars and status_chars while preserving efficient indexing to each character. The arrays are tokenized during initialization, and are re-tokenized as the values are unset, reset, and set. 2016-12-25 23:31 +0100 Vincent Lefevre (1303567a6ad1) * doc/manual.xml.head: In the manual, replaced 2 para by example (similar to the first example). 2016-12-13 12:19 -0800 David Champion (b112fd7061fb) * curs_main.c, init.h, mutt.h: Add option to control whether threads uncollapse when new mail arrives. Adds $uncollapse_new: when set, the default, a collapsed thread into which a new message arrives will be uncollapsed to reveal the new message. 2016-12-13 12:02 -0800 Richard Russon (1f04f9145eb1) * OPS: Remove unused OPS OP_MAIN_FIRST_MESSAGE and OP_MAIN_LAST_MESSAGE were added to the code 19 years ago. They weren't used then; they haven't been used since. 2016-12-13 11:16 -0800 MichaÅ‚ KÄ™pieÅ„ (b985c324932b) * mutt_ssl.c: Rework OpenSSL certificate verification to support alternative chains. (closes #3903) The way Mutt currently verifies SSL certificates using OpenSSL does not support alternative chains, which may cause confusion when some popular mail providers (e.g. Gmail) are used with specific sets of trusted CA certificates. Replace the "manual" verification done by mutt in check_certificate_by_signer() with SSL_set_verify() using a callback. OpenSSL then does the certificate verification, including properly looking at alternative chains. The callback still provides the opportunity to override using ~/.mutt_certificates or an interactive prompt. 2016-12-11 18:56 -0800 David Champion (8a23708d978b) * doc/manual.xml.head, init.c, init.h, main.c, system.c: Add setenv/unsetenv commands. These can be used to add and remove environment variables passed to children via mutt_system(). Commited by Kevin McCarthy with some cleanup. 2016-12-06 19:07 -0800 Kevin McCarthy (df1d1e379477) * doc/manual.xml.head: Move '@' pattern modifier documentation to the right section. Somehow, the patch got out of date and the documentation shifted to another section. Relocate back to the "Pattern Modifier" section. 2016-12-04 16:04 -0800 Kevin McCarthy (d930e39ec095) * merge stable 2016-12-04 16:03 -0800 Kevin McCarthy (b9d34372a940) * .hgsigs: mutt-1.7.2 signed 2016-12-04 16:01 -0800 Kevin McCarthy (954f9049e4b3) * .hgtags: Added tag mutt-1-7-2-rel for changeset 99f5624d1f52 2016-12-04 16:01 -0800 Kevin McCarthy (99f5624d1f52) * ChangeLog, UPDATING, VERSION: automatic post-release commit for mutt-1.7.2 2016-12-04 15:41 -0800 Kevin McCarthy (a17189b58284) * crypt-gpgme.c, mutt_ssl.c: merge stable 2016-11-26 00:57 +0100 Vincent Lefevre (a0a970530a8b) * crypt-gpgme.c, crypt-gpgme.h, crypt-mod-pgp-gpgme.c: Fix build failure with GPGME 1.8: do not steal the gpgme_ prefix. 2016-11-19 19:35 -0800 Kevin McCarthy (10c4761cea89) * mutt_ssl.c: More openssl1.1 fixes: remove uses of X509->name in debugging. (closes #3870) X509->name was a shortcut for the longer name = X509_NAME_oneline (X509_get_subject_name (cert), buf, sizeof (buf)); invocation. Change the debugging to print the cert name and chain names in the ssl_check_certificate() loop instead. 2016-09-07 20:00 -0700 TAKAHASHI Tamotsu (2c1d79d3edd5) * configure.ac, mutt_ssl.c: Fix openssl 1.1 compilation issues. (closes #3870) With these changes, Mutt will no longer compile for versions less than 0.9.6. 2016-12-03 15:24 -0800 Kevin McCarthy (d6c10244793f) * sidebar.c: Change sidebar_spoolfile coloring to be lower precedence. Give sidebar_new and sidebar_flagged higher precedence than sidebar_spoolfile, so that new and flagged message colors will show up for the spoolfile in the sidebar. Thanks to Till Smejkal for the original patch. 2016-11-29 17:48 -0800 Kevin McCarthy (d72caeecf4af) * curs_main.c: Return to pager upon aborting a jump operation. (closes #3901) 2016-11-29 17:44 -0800 Kevin McCarthy (1196c859942e) * lib.h, mutt_ssl.c: Add mutt_array_size macro, change interactive_check_cert() to use it. (see #3899) While I have reservations about the construct, it does make the interactive_check_cert() menu->max and part loop less fragile. 2016-11-29 17:44 -0800 Kevin McCarthy (1a2dc7b21b5b) * mutt_ssl.c: Improve openssl interactive_check_cert. (closes #3899) Don't use X509_NAME_oneline() with a fixed size buffer, which could truncate the string, perhaps leaving off the CN field entirely. Instead, work directly off the X509_NAME. Rather than use strstr to tokenize it, call X509_NAME_get_text_by_NID() with the nid types. Although X509_NAME_get_text_by_NID() is "legacy", it is the most directly useful for mutt in this simple interactive prompt. The function was set up to include the ST and C fields in the prompt, but the loop limit was too low. I believe this was an oversight, so increase the loop to include those two fields. 2016-11-26 00:57 +0100 Vincent Lefevre (84ad86e8b8ab) * crypt-gpgme.c, crypt-gpgme.h, crypt-mod-pgp-gpgme.c: Fix build failure with GPGME 1.8: do not steal the gpgme_ prefix. 2016-11-22 03:48 +0100 Vincent Lefevre (b22c5d0e299d) * mutt_ssl.c: Corrected comment. 2016-11-21 18:03 -0800 Kevin McCarthy (65f180f2904f) * mutt_ssl.c: Revert db13010a2e8d but add a comment. (see #3870) X509_NAME_oneline() always NULL-terminates the string, even when it has to truncate the data to fit in buf. 2016-11-21 23:10 +0100 Vincent Lefevre (db13010a2e8d) * mutt_ssl.c: Make sure that the output of X509_NAME_oneline is null- terminated. 2016-11-20 16:19 -0800 Kevin McCarthy (c770d2fa615b) * mutt_tunnel.c: Minor resource and error logic cleanup in tunnel_socket_open() Free the conn->sockdata on failure. conn->fd is not set until the bottom, and before it is set, conn->conn_close() will not be called. Close the pin pipe if the pout pipe fails. Call mutt_perror first on a fork failure. Calling after the close() may cause errno to be changed on a close failure. 2016-11-20 16:19 -0800 Kevin McCarthy (b319ec2dc93a) * mutt_tunnel.c: Don't close stderr when opening a tunnel. (closes #3726) Instead of closing stderr, redirect it to /dev/null in tunnel_socket_open(). Otherwise a program can accidentally open a file into handle 2 and then unknowingly use that when trying to print to stderr. Thanks to lotheac for the original patch, which I just modified slightly. 2016-11-19 19:35 -0800 Kevin McCarthy (695243ba6374) * mutt_ssl.c: More openssl1.1 fixes: remove uses of X509->name in debugging. (closes #3870) X509->name was a shortcut for the longer name = X509_NAME_oneline (X509_get_subject_name (cert), buf, sizeof (buf)); invocation. Change the debugging to print the cert name and chain names in the ssl_check_certificate() loop instead. 2016-11-20 01:41 +0100 Vincent Lefevre (d14ffd58d976) * po/fr.po: Updated French translation. 2016-11-18 15:54 -0800 Kevin McCarthy (4bed0172c27b) * OPS, curs_main.c, functions.h: Fix mark-message translation and keybind menu. Move the OP_MARK_MESSAGE and hotkey macro from MENU_GENERIC to the MENU_MAIN keymap. Putting the macro under generic prevents it from overriding a keybinding in the index (even if the function is bound to noop). Additionally, the macro can only be executed from the index, so it doesn't make sense as a generic keybinding. Use the term "hotkey" in both the OPS and km_bind description. Mark the km_bind description translatable. Add L10N messages for the new translation strings. 2016-11-18 14:20 -0800 Kevin McCarthy (46194ca48b2f) * compress.c: Improve two compress translation messages. Change the "Error executing" to "Error running", which is used in multiple places elsewhere in mutt. This also removes the unnecessary newline. Remove the leading space in the "Error compressing" message, and change it to match the error message in editmsg.c. 2016-11-18 18:17 +0100 Vincent Lefevre (174062d0abed) * po/fr.po: Updated French translation. 2016-11-18 17:00 +0100 Vincent Lefevre (8fa4965beb62) * curs_main.c: Make a string translatable. 2016-11-18 16:59 +0100 Vincent Lefevre (c15cacbfabe5) * smime.c: Make a string translatable. Add a missing space at the end. 2016-11-18 13:07 +0100 Vincent Lefevre (c1befb06b4bd) * po/fr.po: Updated French translation (except for 1 string). 2016-11-18 12:32 +0100 Vincent Lefevre (211afb39a22a) * INSTALL: Updated requirement on the C compiler. 2016-11-17 17:54 -0800 Kevin McCarthy (fa32396b5e26) * init.c: Revert changes made to mutt_find_cfg() in 3c6d322912e3 The usage of MUTT_VERSION in mutt_find_cfg() was fine before the commit: it wasn't using MUTT_VERSION inlined into a string with format string substitution. Revert to the version of mutt_find_cfg() before that changeset. 2016-11-17 15:57 -0800 David Champion (022b604bc46d) * OPS, curs_main.c, doc/manual.xml.head, functions.h, globals.h, init.h: Adds binding to create "hotkeys" for messages. foo will create a new macro "'foo" which will return to the current message by searching for that message's message id. The initial character of the macro is defined by $mark_macro_prefix, and defaults to "'" for verisimilitude vs. vi. Pushed by Kevin McCarthy with a minor fix. 2016-11-17 15:07 -0800 Kevin McCarthy (3c6d322912e3) * commands.c, compose.c, dotlock.c, init.c, muttlib.c, status.c: Backout inlining of MUTT_VERSION in 42fee7585fae. If MUTT_VERSION contains a %, this will result in problems. 2016-11-16 16:05 -0800 David Champion (91b3449f426b) * doc/manual.xml.head, mutt.h, pattern.c: Adds the '@' pattern modifier to limit matches to known aliases. Example: ~f joe matches messages from joe. @~f joe matches messages from any joe who is defined as an alias. Pushed by Kevin McCarthy with two minor cosmetic fixes. 2016-11-16 15:43 -0800 David Champion (03aa03293c1d) * flags.c, init.h, mh.c, mutt.h: When $flag_safe is set, flagged messages cannot be deleted. This saves them from bulk operations on threads and tagged messages. To remove a flagged message, first unflag it. 2016-11-15 12:04 -0800 Kevin McCarthy (5382e1e4cee1) * muttbug.sh.in: Fix muttbug to check $XDG_CONFIG_HOME. Fall back to $HOME/.config if $XDG_CONFIG_HOME is not set. 2016-11-15 12:03 -0800 Kevin McCarthy (0ef0f4d15f75) * init.c: Fix loop terminator in in mutt_find_cfg(). Keep searching even if home is NULL. 2016-11-14 11:02 -0800 Kevin McCarthy (c78753f98e34) * doc/makedoc-defs.h: Ensure the compressed documentation is always built. Add USE_COMPRESSED to makedoc-defs.h so any conditional documentation will always be built. 2016-11-13 20:02 -0800 Kevin McCarthy (99a3ff6555d9) * compress.c: Compress: check mailbox type if possible when appending. If an append hook isn't defined, then mutt has to decompress the mailbox. In that case, we can check the type of the decompressed mailbox instead of defaulting to DefaultMagic. 2016-11-13 20:02 -0800 Kevin McCarthy (cad0051417eb) * compress.c, doc/manual.xml.head: Compress: escape single quotes when invoking the compress/decompress commands. The format strings are placed in single quotes. mutt_system() invokes sh, so escape the single quotes using bourne-shell syntax: '\'' 2016-11-13 20:02 -0800 Kevin McCarthy (a51f1c8a038a) * compress.c: Compress: fix check_mailbox and sync_mailbox. Change check_mailbox to delegate to the child_ops->check_mailbox if the compressed mailbox has changed. This allows the mailbox to properly recover if both the decompressed mailbox and compressed file have changed. Change sync_mailbox to call check_mailbox before attempting to sync. This will prevent overwriting external changes to the compressed mailbox. 2016-11-13 20:02 -0800 Kevin McCarthy (0a7054904b5b) * compress.c, compress.h, imap/imap.c, mbox.c, mh.c, mutt.h, mx.c, mx.h, pop.c, pop.h: Create mx_ops.sync operation. Refactor compress to use the mx_ops.sync. Change compress.sync_mailbox() to lock the compressed mailbox around both the tempfile sync and compress operations. This will prevent changes made inbetween the two syncs from being overwritten. Thanks to Damien Riegel for his original patch refactoring mx_ops.sync, which this patch is partially based upon. 2016-11-13 20:02 -0800 Kevin McCarthy (05f6bd8532ea) * compress.c: Compress: pull the lock/unlock operations into the open,close,sync operations. Some operations, such as open_append and sync, need an exclusive lock across a longer period than a single compress/decompress. Remove it from the execute_command and pull into the outer callers. Store lock information inside compress_info. Sync and check_mailbox need more fixes, which will be addressed in subsequent patches. 2016-11-13 20:02 -0800 Kevin McCarthy (b1366f49c7b7) * compress.c: Compress: safe_fopen() the tempfile, to prevent tempfile attacks. 2016-11-13 20:02 -0800 Kevin McCarthy (7c055cc893dc) * compress.c: Compress: add delegate calls to open_append and close mx_ops functions. The open_append and close were partially duplicating mbox open_append and close operations internally. Change it to call the actual delegate functions instead. Inline the open_read() function inside open_mailbox(). Having it split improved nothing and just complicated the code (i.e. added error-handling checks in open_mailbox() that in reality could not fail). 2016-11-13 20:02 -0800 Kevin McCarthy (d1ff983c9bcb) * compress.c, compress.h, mx.c: Compress: fix several logic and memory bugs. setup_paths leaks memory: realpath is already set in mx_open_mailbox() restore_paths is unneeded. mx_fastclose_mailbox() will free stuff, and nothing is looking at the path once we are closing or aborting. Make a copy of the hooks. Otherwise 'unhook *' will leave dangling pointers. Add compress_info freeing inside mx_fastclose_mailbox(). Only free inside compress.c when we want to prevent close() from doing anything. close_mailbox() didn't preserve ctx->path on error. execute_command() didn't return an error if the mutt_system() command failed. mx_open_mailbox_append() should check mutt_comp_can_append() only for the case that the mailbox doesn't exist. When it exists, mx_get_magic() has already looked at the file contents before checking for matching open_hooks. In open_append_mailbox() if no append hook is defined, it should't call ci->open() if the mailbox doesn't exist. It should act just like append and create a temporary file. check_mailbox() needs more work. For now, at least have it properly close the mailbox on error. 2016-11-13 20:02 -0800 Kevin McCarthy (c9c120d988a8) * commands.c: Compress: remove buffy stats "improvisation". Mutt doesn't support polling compressed mailboxes. This code creates a false impression and dirties mutt_save_message() in the process. I don't like it, so am taking it out. 2016-11-13 20:02 -0800 Kevin McCarthy (290631db373e) * compress.c, compress.h, hook.c, mx.c: Compress: prefix external functions with "mutt_" Also, include compress.h in compress.c so the mx_comp_ops doesn't need to be redeclared. 2016-11-13 20:02 -0800 Kevin McCarthy (ad519d4b356c) * Makefile.am, commands.c, compress.c, compress.h, configure.ac, contrib/Makefile.am, contrib/sample.muttrc-compress, curs_main.c, doc/Muttrc.head, doc/manual.xml.head, doc/muttrc.man.head, hook.c, init.h, main.c, mutt.h, mx.c, mx.h, po/POTFILES.in, po/de.po, status.c: Compress patch from the neomutt repository. With the following changes: - po/de.po changes trimmed to just the compress additions. - Move the sample muttrc to contrib, and add it to the Makefile.am so it is distributed. Remove the sample vimrc. - Remove extra fluff from manual. Thanks to Roland Rosenfeld for the original patch, and to the NeoMutt team for their work cleaning up the patch. 2016-11-13 18:45 -0800 Damien Riegel (42fee7585fae) * commands.c, compose.c, dotlock.c, init.c, muttbug.sh.in, muttlib.c, status.c: search muttrc file according to XDG Base Specification (closes #3207) First of all, the MUTT_VERSION symbol is now concatenated (when possible) at compile time. Then, the logic to find the config file has been changed a bit to remove unnecessary calls to access(), so now each possible locations for the config file is only tested once, and it stops as soon as a valid one has been found. So instead of: access("/home/dkc/.muttrc-1.7.1", F_OK) = -1 ENOENT (No such file or directory) access("/home/dkc/.muttrc", F_OK) = 0 access("/home/dkc/.muttrc", F_OK) = 0 access("/home/dkc/.muttrc", F_OK) = 0 [... Tests for Muttrc ... ] access("/home/dkc/.muttrc", F_OK) = 0 We now have: access("/home/dkc/.muttrc-1.7+13 (f658e517960e)", F_OK) = -1 ENOENT (No such file or directory) access("/home/dkc/.muttrc", F_OK) = 0 It also cleans up the case where -F is passed on the command line but points to a non-existent file by moving the error path closer to the actual fail condition. Finally, it adds partial support for the XDG Base Directory Specification. mutt will now try to locate its config at: $XDG_CONFIG_HOME/mutt/muttrc-MUTT_VERSION $XDG_CONFIG_HOME/mutt/muttrc. If XDG_CONFIG_HOME is not set, it will use '~/.config' as a default. 2016-11-08 12:42 -0800 Kevin McCarthy (d18482f6641e) * mbox.c, mx.c: Move mbox close-append logic inside mbox_close_mailbox(). The mx_fastclose_mailbox() calls mx_ops->close(), which invokes mbox_close_mailbox(). Also, close the ctx->fp inside mbox_close_mailbox(). This way, the (to be added) compress logic can call the mx_ops->close() instead of "knowing" to close the fp before recompressing. mx_fastclose_mailbox() will safe_fclose() the fp again, but I'm leaving it there just in case I missed a usage of the fp in some other part of the code. Thanks to Damien Riegel for the original patch. 2016-11-07 18:10 -0800 Kevin McCarthy (d0078268768d) * recvattach.c: Chain %d->%F->%f in the attachment menu. Previously, %d would use %f if there was no description set. Place the new %F option in between %d and %f. This way, %d will fall back on %F, which will fall back on %f. This allows the standard attachment menu to show d_filename. This is useful for forwarding attachments or editing draft files with attachments. In these cases the actual filename is sanitized but the attachment name is preserved in d_filename. 2016-11-07 18:10 -0800 Damien Riegel (82e566d393cf) * OPS, compose.c, functions.h: compose: add operation to rename an attachment As opposed to rename-file, which actually renames the underlying file of the attachment, rename-attachment puts a value in d_filename, which is used in the Content-Disposition header. 2016-11-07 18:06 -0800 Damien Riegel (a9e7402af4de) * init.h, recvattach.c: attach_format: add new %F placeholder This new placeholder allows to print the attachment name as it will be seen on the recipient side. 2016-11-03 15:49 -0700 Kevin McCarthy (45023e44c92c) * mutt.h: Define PATH_MAX, it's missing on the GNU Hurd. (closes #3815) I believe this patch originally came from Debian. Modified based on a suggestion from Fabian Groffen. 2016-11-03 10:17 +0100 Vincent Lefevre (ce07aa118214) * configure.ac: Fixed issue from changeset 4da647a80c55. (closes #3892) Shell variables cannot be used in the first argument of AC_CHECK_HEADERS. 2016-11-02 18:54 -0700 Kevin McCarthy (0e0d54b5a384) * date.c: Attempt to silence a clang range warning. (closes #3891) When TM_YEAR_MAX > INT_MAX, clang complains the comparison is always false. Note that this is really a compiler bug, which was fixed by gcc 9 years ago. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12963 Thanks to Vincent Lefèvre for the suggested fix and the gcc bug reference. 2016-11-02 18:27 -0700 Kevin McCarthy (4da647a80c55) * configure.ac: Make ncurses and ncursesw header checking the same. Previously, ncurses.h wasn't searched for directly in the include directory for ncursesw. Also, fix a test in case $withval is empty. Thanks to Sylvain Bertrand for the original patch. 2016-10-31 20:30 -0700 Kevin McCarthy (b45bfce1bb0e) * Makefile.am, configure.ac: Add a --disable-doc configuration option. This allows mutt to be built without the documentation. Thanks to Sylvain Bertrand for the original patch. 2016-10-23 15:11 -0700 Kevin McCarthy (f46ed1718cb4) * attach.c, recvattach.c: Perform charset conversion on text attachments when piping. (closes #3773) (see #3886) When piping a text attachment, there is no reliable way to know the charset used. Vincent Lefèvre says: It was decided in the past that when there is no information on the charset in a transmission to an external command (e.g. as for mail composing), texts are expected to be transmitted in the local charset. Add a MUTT_CHARSET flag to enable charset conversion on text attachments for both when $attach_split is set and unset. 2016-10-23 14:49 -0700 Kevin McCarthy (688ecc6d5a8d) * pager.c: merge stable 2016-10-23 14:46 -0700 Kevin McCarthy (c6704c7f8e23) * pager.c: Fix pager segfault when lineInfo.chunks overflows. (closes #3888) The reporter had an html attachment with extremely long lines, combined with a color pattern of "color body default default ." This overflowed the lineInfo.chunks, causing a segfault. Abort the body color patterns if this happens. 2016-10-23 13:47 -0700 Kevin McCarthy (40cf141c7383) * merge stable 2016-10-23 13:43 -0700 Kevin McCarthy (a8203b4463c1) * date.c: Prevent an integer overflow in mutt_mktime() (closes #3880) Check to make sure the year passed in isn't bigger than can be represented using time_t on the platform. Also add a (time_t) cast to an intermediate "years * 365" calculation to prevent an overflow there. Thanks to TAKAHASHI Tamotsu for his patch, and to Vincent Lefèvre for his improvement. I merely took their code and commited it. 2016-10-20 10:30 +0200 Vincent Lefevre (8e270c698bfb) * po/fr.po: Updated French translation. 2016-10-19 13:21 -0700 Kevin McCarthy (77de473642cb) * OPS, curs_main.c, functions.h, protos.h, thread.c: Add root-message function to jump to root message in thread. This seems like a useful feature that was brought up for discussion on mutt-users. Proposed solutions involved collapsing/uncollapsing threads, but it's not hard to modify the mutt_parent_message() function to return the root instead. 2016-10-17 11:23 -0700 Kevin McCarthy (1acabd35d9a3) * crypt-gpgme.c: merge stable 2016-10-17 11:22 -0700 Kevin McCarthy (113b73b0b616) * crypt-gpgme.c: Actually fix gpgme segfault in create_recipient_set(). Changeset 6e44bfa16096 did not fix the segv. (Sorry, I made the fix based off a report on IRC but didn't trigger the segv myself: it was caused by an out-of-tree patch). The actual problem was that the rset was only resized on a successful gpgme_get_key(). However, on error, the array still needs to be NULL-terminated before calling free_recipient_set(). Move the resize so it always takes place. This obviates the need for the NULL check added in 6e44bfa16096. 2016-10-16 15:44 -0700 Kevin McCarthy (18c3db1aa8c4) * sidebar.c: Change sidebar to only match $folder prefix on a $sidebar_divider_char. (closes #3887) The reporter had a $spoolfile of ~/Mailbox and a $folder of ~/Mail. The sidebar was truncating the spoolfile to "ox" because it only looked at a substring prefix match. 2016-10-16 15:14 -0700 Kevin McCarthy (7e174b2fcbe1) * merge stable 2016-10-16 15:12 -0700 Kevin McCarthy (783dce6dfcd4) * sidebar.c: Use mutt_strlen and mutt_strncmp in sidebar.c. This prevents a segv if folder is unset. 2016-10-16 14:17 -0700 Kevin McCarthy (023181b27fb6) * crypt-gpgme.c: merge stable 2016-10-16 14:16 -0700 Kevin McCarthy (6e44bfa16096) * crypt-gpgme.c: Fix gpgme segfault in create_recipient_set(). If gpgme_get_key() errors on the first key, the rset will not be allocated yet. Attempting to null-terminate (and then free) the array causes a segfault. 2016-10-15 14:45 -0700 Kevin McCarthy (2a6bfdb9f869) * url.c: Allow IPv6 literal addresses in URLs. (closes #3681) RFCs 2732 and 3986 specify a literal IPv6 address be surrounded by "[]". This patch removes the "[]" delimiters when parsing the URL, but adds them back in url_ciss_tostring() if the host name contains a ':'. Thanks to Evgeni Golov for the original patch. 2016-10-12 18:10 -0700 Kevin McCarthy (a3e35631b503) * init.h, sendlib.c: Handle presence of '--' delimiter in $sendmail. (closes #3168) If the delimiter exists, additional sendmail flags will be inserted before the delimiter. Any arguments after the delimiter will be preserved as recipients. 2016-10-11 19:42 -0700 TAKAHASHI Tamotsu (7c0995a61268) * crypt-gpgme.c: Fix GPGME signature zero timestamp and locale awareness issues. (closes #3882) GPGME signature information has two minor problems. [-- Begin signature information --] *BAD* signature from: Name aka: Name created: Thu Jan 1 09:00:00 1970 [-- End signature information --] First, the created timestamp is incorrect when the message is not verified successfully. Second, as the code itself has some "TODO" comments, "aka" and "created" lines are not properly-aligned when LC_MESSAGES != English. 2016-10-10 18:09 -0700 Kevin McCarthy (33d16ccba4cf) * pop_auth.c: Add a few explanatory comments to pop_auth_sasl(). (see #3862) 2016-10-10 16:33 -0700 (a9764761b692) * pop_auth.c: Fix POP3 SASL authentication mechanism DIGEST-MD5. (closes #3862) sasl_client_step() returns SASL_OK after the fourth step: server auth confirmation. However, the protocol requires the client send one more blank line to the server, to which the server then replies with "+OK". See https://tools.ietf.org/html/rfc5034#section-6. The code currently only sends a final response if sasl_client_step returns data to send. Change it to always send a final client message after the SASL_OK. 2016-10-08 13:24 -0700 Kevin McCarthy (4bcc3a12cc4d) * po/cs.po: merge stable 2016-10-08 12:57 -0700 Kevin McCarthy (58f4b38312bf) * .hgsigs: mutt-1.7.1 signed 2016-10-08 12:56 -0700 Kevin McCarthy (e8d9ae6f41d3) * .hgtags: Added tag mutt-1-7-1-rel for changeset 0ce5f9bff1fd 2016-10-08 12:56 -0700 Kevin McCarthy (0ce5f9bff1fd) * ChangeLog, UPDATING, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.7.1 2016-10-06 12:35 -0700 Kevin McCarthy (323e3d6e5e4c) * imap/imap.c: Mark IMAP fast-trash'ed messages as read before copying. (see #3860) Regular copying/saving messages in mutt via a UID COPY first calls imap_sync_message(). However that function is designed to sync all flags (including deleted), and so isn't useful for the fast-trash code. As an easier solution, instead add a UID STORE to set \\Seen for the same msgset as the trashed messages. 2016-10-05 15:04 -0700 Petr Pisar (227211e0e84c) * po/cs.po: Updated Czech translation. 2016-10-04 11:18 -0700 Kevin McCarthy (8262503d1991) * muttlib.c: merge stable 2016-10-04 11:13 -0700 Kevin McCarthy (5c5848dfa4ea) * muttlib.c: Preserve forwarded attachment names in d_filename. When forwarding an attachment with an non-ascii name, mutt_copy_body() mangles the filename when calling mutt_adv_mktemp. Preserve the original attachment filename in d_filename. Remove the double copy of b->filename, which is a memory leak. 2016-10-01 16:21 -0700 Kevin McCarthy (8963e77577ad) * crypt-gpgme.c: Ensure signatures exist when verifying multipart/signed emails. (closes #3881). TAKAHASHI Tamotsu reported that when gpg2 isn't in PATH, the gpgme_op_verify() won't return an error, but instead will return a result with no signatures. verify_one() was only returning an error if a signature actually failed, so in this case the function was defaulting to returning success. Other callers of gpgme_op_verify() check to make sure the result->signatures exist before processing signatures. Add a check for verify_one() too. 2016-10-01 13:58 -0700 Kevin McCarthy (e0c0a2820b8b) * url.c: RFC2047-decode mailto url headers after RFC2822 parsing. (closes #3879) Commit 55819a7e6169 performed the RFC2047 decode before the parsing. This works okay for headers such as subject, but for others such as address fields could lead to parsing errors. Change to perform a decode on envelope headers after all the calls to mutt_parse_rfc822_line(), using the same list of fields as mutt_read_rfc822_header(). Change the do_2047 parameter of mutt_read_rfc822_line() to true, so that user headers are decoded if needed. 2016-09-27 18:15 -0700 Kevin McCarthy (55819a7e6169) * url.c: RFC2047-decode mailto header values. (closes #3879) RFC 6068 specifies that the header values (with the exception of body) may contain RFC 2047-encoded values. 2016-09-25 13:26 -0700 Kevin McCarthy (efb8c7808715) * merge stable 2016-09-25 13:11 -0700 Kevin McCarthy (586dad383893) * parse.c: Reset invalid parsed received dates to 0. (closes #3878) The actual problem in the ticket would be solved by d3f31cf9239e (see #3798). However there is still the bug that Mutt considers a (hdr->received != 0) to be set and usable, despite not checking the return value of mutt_parse_date(). Change mutt_read_rfc822_header() to unset an invalid received value back to 0. We don't do this inside mutt_read_rfc822_line() because that would cause the next received line to be parsed. 2016-09-23 16:07 -0700 Kevin McCarthy (ca8a3451b707) * pager.c: Clear pager position when toggling headers. It doesn't make sense to try to preserve the pager position when toggling headers: the purpose of toggling headers is to see the headers in full or weeded state. So, reset the position back to the top. 2016-09-22 14:07 -0700 Kevin McCarthy (87911ba95dae) * curs_lib.c, keymap.c: Don't abort the menu editor on sigwinch. (closes #3875) getch() will return ERR on sigwinch when timeout() is called with a positive value. mutt_getch() will therefore return ch==-2 for both a timeout and a sigwinch in this case. The imap code in km_dokey() exits out of the ImapKeepalive loop for a SigWinch, and was skipping past the check for MENU_EDITOR and tmp.ch==-2. Move this check below the gotkey: label so the ImapKeepalive loop behaves the same as the Timeout code. Thanks to nicop for reporting the problem and for the initial patch! 2016-09-21 18:11 -0700 Kevin McCarthy (f2ae8a2d6e1b) * merge stable 2016-09-21 18:10 -0700 Antonio Radici (ee0fe5834195) * po/de.po, po/es.po, po/it.po: Mark some gpgme pgp menu keybinding translations as fuzzy. (closes #3874) Some translations for crypt-gpgme.c are marked as fuzzy but the keybindings attached to these translations are not, this creates confusions for the users who see the english message but have the keybindings for a message in their own language available. As long as the translations are fuzzy, the keybindings should stay fuzzy. 2016-09-21 17:52 -0700 Kevin McCarthy (ccd543466b9f) * merge stable 2016-09-21 22:51 +0200 Kevin McCarthy (9f6e08ba6ff3) * mx.c: Check for NULL mx_ops in mx.c Eike Rathke reported this happening when in an IMAP index view the underlying connection was terminated, ctx->mx_ops was NULL and thus accessing ctx->mx_ops->check segfaulted. Thanks also to Eike Rathke for the initial patch, for which I expanded the checks to other functions. 2016-09-20 15:51 -0700 Antonio Radici (405cbc43c3ac) * crypt-gpgme.c: Use body color for gpgme output. (closes #3872) When switching from pgp_* commands to crypt_use_gpgme=yes, Peter Colberg noticed that the output was colored 'brightyellow'. The issue is that crypt-gpgme.c uses state_attach_puts in various places where it should use state_puts to maintain compatibility with the previous behavior in pgp.c. 2016-09-20 14:01 -0700 Kevin McCarthy (c41562a8118b) * crypt-gpgme.c: merge stable 2016-09-20 13:58 -0700 Antonio Radici (8ed017079800) * crypt-gpgme.c: Fix gpgme segfault when querying candidates with a '+' in the address. (closes #3873) list_to_pattern() was not allocating enough space for the '+' to '%2B' transformation. 2016-09-07 20:00 -0700 TAKAHASHI Tamotsu (821022f6c78c) * configure.ac, mutt_ssl.c: Fix openssl 1.1 compilation issues. (closes #3870) With these changes, Mutt will no longer compile for versions less than 0.9.6. 2016-09-07 19:12 -0700 Kevin McCarthy (a60f7d09c386) * doc/manual.xml.head, init.h: Add unsidebar_whitelist command. This pairs with the sidebar_whitelist command, and operates like the other "un..." list commands. 2016-09-07 18:56 -0700 Kevin McCarthy (485ac2438e0f) * doc/manual.xml.head, init.h: merge stable 2016-09-07 18:54 -0700 Kevin McCarthy (a431c7618def) * doc/manual.xml.head, init.h: Fix sidebar documentation a bit. (closes #3859) Sidebar_whitelist is a command, not a variable. Also add a blurb about what it does. Fix the sort order for $sidebar_divider_char and $sidebar_delim_chars. 2016-09-05 19:04 -0700 Kevin McCarthy (3ae51b075826) * merge stable 2016-09-05 18:50 -0700 Kevin McCarthy (cd127a968399) * contrib/Makefile.am: Add missing sidebar contrib sample files to dist tarball. I previously added the files, but neglected to add them to the contrib/Makefile.am file. Thanks to isdtor for pointing out the problem and for the original patch. 2016-09-05 12:44 -0700 Kevin McCarthy (2b9689daf902) * merge stable 2016-09-05 12:35 -0700 Kevin McCarthy (bb25613ce8a4) * getdomain.c: Stub out getdnsdomainname() unless HAVE_GETADDRINFO. It seems unlikely there are systems without it (given that this mistake has been in since 1.6.0), but for correctness we should stub out the function for those without it. 2016-09-05 12:22 -0700 Kevin McCarthy (90c1b756d87d) * configure.ac: Autoconf: always check for getaddrinfo(). The getdnsdomainname() function introduced in 1.6.0 uses getaddrinfo(). Pull the dependency checks for libnsl, libsocket, and getaddrinfo() outside of the "need_socket" block, so they are always checked for. 2016-09-04 18:57 -0700 Kevin McCarthy (8d7f4bea8820) * merge stable 2016-09-04 18:50 -0700 Guilhem Moulin (b082bcd5d5e2) * pgppubring.c: Fix pgpring reporting of DSA and Elgamal key lengths. (closes #3867) Patch provided by Guilhem Moulin from an original idea of Fabrizio Tarizzo. The key length is always the length of the first MPI for RSA, DSA, and Elgamal. 2016-09-03 16:19 -0700 Kevin McCarthy (a9757cff92da) * postpone.c: Preserve message-id and mft headers for recalled messages. (closes #3081) Git patch creates a patch series mailbox, including the Message-ID. Using this as draft files was removing the Message-ID, and thus breaking the threaded structure. The second part of the ticket has already been addressed by 95a2230ef889 (for ticket 3653). Thanks to Chris Webb for the original patch. 2016-09-02 19:33 -0700 Kevin McCarthy (7a53de8c9251) * doc/manual.xml.head: merge stable 2016-09-02 19:32 -0700 Kevin McCarthy (ba5d900a90db) * doc/manual.xml.head, pattern.c: Disable ~X when message scoring. (closes #3861) mutt_score_message() purposely passes a NULL context to mutt_pattern_exec(). The idea was to block slow patterns, and the scoring documentation notes this by saying: "For efficiency reasons, patterns which scan information not available in the index, such as ~b, ~B or ~h, may not be used" ~X needs the context to parse the messages (during message scoring at least), and thus isn't suitable for message scoring either. Block ~X from being used when the context is NULL. Add ~X to the list of patterns noted as unusable in the message scoring documentation. 2016-09-02 16:24 -0700 Kevin McCarthy (95e9357ca697) * browser.c: merge stable 2016-09-02 16:20 -0700 Kevin McCarthy (eef1e8abc46f) * browser.c: Increase date buffer size for $folder_format. (closes #3863) The buffer size of 16 was sufficient to hold the %d format, but not for using %D. Change to use a SHORT_STRING. Thanks to Ian Zimmerman for the original patch, and to Antonio Radici for forwarding it on to us. 2016-08-30 18:43 -0700 David Champion (efccbd9bc6f6) * mutt_ssl.c: Redraw screen after an SSL cert prompt 2016-08-30 16:30 -0700 David Champion (121fa0badf9e) * muttlib.c, send.c: Moves mutt_copy_list to muttlib.c, where it belongs. 2016-08-30 16:11 -0700 David Champion (ab403fd7e600) * sort.h: Update a confusing and obsolete comment. This 2004 comment in sort.h predicted what has recently come to pass, so I'm reframing it just to document for future devs what's going on with this oddball flag. 2016-08-23 13:32 +0200 Vincent Lefevre (768b430f3dca) * mbyte.c: Filter out zero width no-break space (U+FEFF). 2016-08-22 20:34 -0700 Kevin McCarthy (d500c2fd861d) * edit.c, send.c: Add missing include to send.c and edit.c. 2016-08-22 20:04 -0700 Kevin McCarthy (0ae083fb719c) * doc/manual.xml.head, edit.c, globals.h, init.h, send.c: Add $attribution_locale configuration variable. $attribution_locale replaces the just removed $locale, but is only used for customizing the LC_TIME locale used for dates in $attribution. This could be useful in conjunction with folder or send-hooks for recipients in different locales. 2016-08-22 20:04 -0700 Kevin McCarthy (d1ddea6099cd) * browser.c, crypt-gpgme.c, crypt.c, globals.h, hdrline.c, init.h, main.c, pgpkey.c: Remove the $locale configuration variable. $locale was only used to set the LC_TIME locale. Unfortunately, Mutt previously defaulted to using "C". This overrode the user's locale setting and forced them to re-specify their locale inside their .muttrc. Remove $locale and instead use the locale specified by the environment. Mutt still allows "C locale" dates by using a leading "!" in $date_format, ${}, etc. Another use of $locale was to customize attribution dates using hooks. The next commit will introduce $attribution_locale, which can be used for this instead. Thanks to Derek Martin for the original patch! 2016-08-17 20:17 -0700 Kevin McCarthy (328e1a32034b) * sys_socket.h: merge default into stable 2016-08-17 20:14 -0700 Kevin McCarthy (e5fcfc5f9c2e) * .hgsigs: mutt-1.7.0 signed 2016-08-17 20:12 -0700 Kevin McCarthy (be1a70b1c080) * .hgtags: Added tag mutt-1-7-rel for changeset a4e83f60e42f 2016-08-17 20:12 -0700 Kevin McCarthy (a4e83f60e42f) * ChangeLog, UPDATING, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.7.0 2016-11-26 00:57 +0100 Vincent Lefevre (a0a970530a8b) * crypt-gpgme.c, crypt-gpgme.h, crypt-mod-pgp-gpgme.c: Fix build failure with GPGME 1.8: do not steal the gpgme_ prefix. 2016-11-19 19:35 -0800 Kevin McCarthy (10c4761cea89) * mutt_ssl.c: More openssl1.1 fixes: remove uses of X509->name in debugging. (closes #3870) X509->name was a shortcut for the longer name = X509_NAME_oneline (X509_get_subject_name (cert), buf, sizeof (buf)); invocation. Change the debugging to print the cert name and chain names in the ssl_check_certificate() loop instead. 2016-09-07 20:00 -0700 TAKAHASHI Tamotsu (2c1d79d3edd5) * configure.ac, mutt_ssl.c: Fix openssl 1.1 compilation issues. (closes #3870) With these changes, Mutt will no longer compile for versions less than 0.9.6. 2016-10-23 14:46 -0700 Kevin McCarthy (c6704c7f8e23) * pager.c: Fix pager segfault when lineInfo.chunks overflows. (closes #3888) The reporter had an html attachment with extremely long lines, combined with a color pattern of "color body default default ." This overflowed the lineInfo.chunks, causing a segfault. Abort the body color patterns if this happens. 2016-10-23 13:43 -0700 Kevin McCarthy (a8203b4463c1) * date.c: Prevent an integer overflow in mutt_mktime() (closes #3880) Check to make sure the year passed in isn't bigger than can be represented using time_t on the platform. Also add a (time_t) cast to an intermediate "years * 365" calculation to prevent an overflow there. Thanks to TAKAHASHI Tamotsu for his patch, and to Vincent Lefèvre for his improvement. I merely took their code and commited it. 2016-10-17 11:22 -0700 Kevin McCarthy (113b73b0b616) * crypt-gpgme.c: Actually fix gpgme segfault in create_recipient_set(). Changeset 6e44bfa16096 did not fix the segv. (Sorry, I made the fix based off a report on IRC but didn't trigger the segv myself: it was caused by an out-of-tree patch). The actual problem was that the rset was only resized on a successful gpgme_get_key(). However, on error, the array still needs to be NULL-terminated before calling free_recipient_set(). Move the resize so it always takes place. This obviates the need for the NULL check added in 6e44bfa16096. 2016-10-16 15:12 -0700 Kevin McCarthy (783dce6dfcd4) * sidebar.c: Use mutt_strlen and mutt_strncmp in sidebar.c. This prevents a segv if folder is unset. 2016-10-16 14:16 -0700 Kevin McCarthy (6e44bfa16096) * crypt-gpgme.c: Fix gpgme segfault in create_recipient_set(). If gpgme_get_key() errors on the first key, the rset will not be allocated yet. Attempting to null-terminate (and then free) the array causes a segfault. 2016-10-08 12:57 -0700 Kevin McCarthy (58f4b38312bf) * .hgsigs: mutt-1.7.1 signed 2016-10-08 12:56 -0700 Kevin McCarthy (e8d9ae6f41d3) * .hgtags: Added tag mutt-1-7-1-rel for changeset 0ce5f9bff1fd 2016-10-08 12:56 -0700 Kevin McCarthy (0ce5f9bff1fd) * ChangeLog, UPDATING, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.7.1 2016-10-04 11:13 -0700 Kevin McCarthy (5c5848dfa4ea) * muttlib.c: Preserve forwarded attachment names in d_filename. When forwarding an attachment with an non-ascii name, mutt_copy_body() mangles the filename when calling mutt_adv_mktemp. Preserve the original attachment filename in d_filename. Remove the double copy of b->filename, which is a memory leak. 2016-09-25 13:11 -0700 Kevin McCarthy (586dad383893) * parse.c: Reset invalid parsed received dates to 0. (closes #3878) The actual problem in the ticket would be solved by d3f31cf9239e (see #3798). However there is still the bug that Mutt considers a (hdr->received != 0) to be set and usable, despite not checking the return value of mutt_parse_date(). Change mutt_read_rfc822_header() to unset an invalid received value back to 0. We don't do this inside mutt_read_rfc822_line() because that would cause the next received line to be parsed. 2016-09-21 18:10 -0700 Antonio Radici (ee0fe5834195) * po/de.po, po/es.po, po/it.po: Mark some gpgme pgp menu keybinding translations as fuzzy. (closes #3874) Some translations for crypt-gpgme.c are marked as fuzzy but the keybindings attached to these translations are not, this creates confusions for the users who see the english message but have the keybindings for a message in their own language available. As long as the translations are fuzzy, the keybindings should stay fuzzy. 2016-09-21 22:51 +0200 Kevin McCarthy (9f6e08ba6ff3) * mx.c: Check for NULL mx_ops in mx.c Eike Rathke reported this happening when in an IMAP index view the underlying connection was terminated, ctx->mx_ops was NULL and thus accessing ctx->mx_ops->check segfaulted. Thanks also to Eike Rathke for the initial patch, for which I expanded the checks to other functions. 2016-09-20 13:58 -0700 Antonio Radici (8ed017079800) * crypt-gpgme.c: Fix gpgme segfault when querying candidates with a '+' in the address. (closes #3873) list_to_pattern() was not allocating enough space for the '+' to '%2B' transformation. 2016-09-07 18:54 -0700 Kevin McCarthy (a431c7618def) * doc/manual.xml.head, init.h: Fix sidebar documentation a bit. (closes #3859) Sidebar_whitelist is a command, not a variable. Also add a blurb about what it does. Fix the sort order for $sidebar_divider_char and $sidebar_delim_chars. 2016-09-05 18:50 -0700 Kevin McCarthy (cd127a968399) * contrib/Makefile.am: Add missing sidebar contrib sample files to dist tarball. I previously added the files, but neglected to add them to the contrib/Makefile.am file. Thanks to isdtor for pointing out the problem and for the original patch. 2016-09-05 12:35 -0700 Kevin McCarthy (bb25613ce8a4) * getdomain.c: Stub out getdnsdomainname() unless HAVE_GETADDRINFO. It seems unlikely there are systems without it (given that this mistake has been in since 1.6.0), but for correctness we should stub out the function for those without it. 2016-09-05 12:22 -0700 Kevin McCarthy (90c1b756d87d) * configure.ac: Autoconf: always check for getaddrinfo(). The getdnsdomainname() function introduced in 1.6.0 uses getaddrinfo(). Pull the dependency checks for libnsl, libsocket, and getaddrinfo() outside of the "need_socket" block, so they are always checked for. 2016-09-04 18:50 -0700 Guilhem Moulin (b082bcd5d5e2) * pgppubring.c: Fix pgpring reporting of DSA and Elgamal key lengths. (closes #3867) Patch provided by Guilhem Moulin from an original idea of Fabrizio Tarizzo. The key length is always the length of the first MPI for RSA, DSA, and Elgamal. 2016-09-02 19:32 -0700 Kevin McCarthy (ba5d900a90db) * doc/manual.xml.head, pattern.c: Disable ~X when message scoring. (closes #3861) mutt_score_message() purposely passes a NULL context to mutt_pattern_exec(). The idea was to block slow patterns, and the scoring documentation notes this by saying: "For efficiency reasons, patterns which scan information not available in the index, such as ~b, ~B or ~h, may not be used" ~X needs the context to parse the messages (during message scoring at least), and thus isn't suitable for message scoring either. Block ~X from being used when the context is NULL. Add ~X to the list of patterns noted as unusable in the message scoring documentation. 2016-09-02 16:20 -0700 Kevin McCarthy (eef1e8abc46f) * browser.c: Increase date buffer size for $folder_format. (closes #3863) The buffer size of 16 was sufficient to hold the %d format, but not for using %D. Change to use a SHORT_STRING. Thanks to Ian Zimmerman for the original patch, and to Antonio Radici for forwarding it on to us. 2016-08-17 20:17 -0700 Kevin McCarthy (328e1a32034b) * sys_socket.h: merge default into stable 2016-08-17 20:14 -0700 Kevin McCarthy (e5fcfc5f9c2e) * .hgsigs: mutt-1.7.0 signed 2016-08-17 20:12 -0700 Kevin McCarthy (be1a70b1c080) * .hgtags: Added tag mutt-1-7-rel for changeset a4e83f60e42f 2016-08-17 20:12 -0700 Kevin McCarthy (a4e83f60e42f) * ChangeLog, UPDATING, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.7.0 2016-08-17 18:07 -0700 TAKAHASHI Tamotsu (c513c311026f) * po/ja.po: Updated Japanese translation. 2016-08-15 10:17 -0700 Morten Bo Johansen (83d0f5383325) * po/da.po: Updated Danish translation. 2016-08-15 09:15 -0700 Benno Schulenberg (f02122b5eeeb) * po/eo.po: Updated Esperanto translation. 2016-08-15 09:09 -0700 Benno Schulenberg (7e54c1fe55b4) * po/nl.po: Updated Dutch translation. 2016-08-10 09:29 -0700 Ivan Vilata i Balaguer (2de6949a0f08) * po/ca.po: Updated Catalan translation. 2016-08-10 02:20 +0200 Vincent Lefevre (53b4b412dd79) * po/fr.po: Updated French translation. 2016-08-09 14:34 -0700 Vsevolod Volkov (8847b913432a) * po/ru.po: Updated Russian translation. 2016-08-09 14:32 -0700 Vsevolod Volkov (08251fb01f90) * po/uk.po: Updated Ukrainian translation. 2016-08-08 13:13 -0700 Kevin McCarthy (7abc19ad2d10) * curs_main.c, pager.c, protos.h: Clear pager position upon returning to the index menu. This fixes a bug where opening a message sometimes shows it scrolled down. The easiest way to trigger this is to open a long message in a mailbox with no new messages, scroll down, hit and then reopen the message. The pager will "remember" the position and scroll down. If you simply exit the message and re- enter it, the position is not saved. More annoyingly, once in a very great while I will open a new message and have the message scrolled down partway. I believe this is due to OldHdr happening to point to the same address as the Header of the new message. This is somewhat easily triggered on a mailbox with one message, which you open, scroll down in, hit to exit, and then delete/sync. In another mutt instance, copy the same messsage back to the mailbox, then open the message in the original mutt instance. At least some of the time, the OldHdr pointer matches the new message, and so it opens scrolled down. This patch solves the problem by clearing the pager position once all redirections through the index menu are done. 2016-08-06 23:35 +0200 Vincent Lefevre (15c4c16bed07) * po/fr.po: Updated French translation. 2016-08-05 14:33 -0700 Kevin McCarthy (108ad5dcf194) * rfc2047.c: Remove nonsensical size check in mutt_choose_charset() The charsets parameter is being tokenized by the : delimeter. The checks against ENCWORD_LEN_MAX and ENCWORD_LEN_MIN make no sense, and appear to be the result of a large merge a very long time ago (changeset cb27682966d5). I can only guess where this check was supposed to be, but it certainly doesn't belong here. 2016-08-05 13:43 -0700 Kevin McCarthy (a39c8bdca361) * rfc2047.c: Fix memory leak in mutt_choose_charset(). 2016-08-05 13:43 -0700 Kevin McCarthy (1ef5734f6593) * mh.c: Fix memleak in mh_read_dir() when sequence parsing fails. 2016-08-05 11:02 -0700 Kevin McCarthy (f6b5f533f9ce) * COPYRIGHT, buffy.c, getdomain.c, globals.h, init.c, init.h, main.c, sidebar.c: Update copyright notices. 2016-08-02 19:18 -0700 Kevin McCarthy (f9a4023b86ad) * pop.c: Explicitly NULL unimplemented pop mx_ops functions. The struct initialization already does this for unlisted fields, but I'd rather be explicit about unimplemented operations. 2016-08-02 19:18 -0700 Kevin McCarthy (01541185e6f4) * mx.c: Use the ctx->mx_ops instead of calling mx_get_ops() With mx_open_mailbox_append() setting the ctx->mx_ops, all contexts should have mx_ops set. Remove calls to mx_get_ops() and instead directly use ctx->mx_ops. 2016-08-01 18:25 -0700 Kevin McCarthy (e778db6e693c) * mailbox.h, mh.c, mx.c: Use a different flag in mx_open_mailbox_append() when mailbox doesn't exist. The previous commit re-used MUTT_NEWFOLDER, but the meaning of that flag is slightly different: it causes mbox to use fopen with mode "w", and is used only for the case of a brand-new mktemp-generated mbox. Setting it for other non-existing mbox files leads to a race condition between the stat and the fopen/lock, and so could end up truncating an existing mailbox created in-between! Create a different flag, MUTT_APPENDNEW to notify the open_append() functions that the mailbox doesn't exist. Change maildir and mh to check for that flag to create their directory structures. 2016-08-01 15:04 -0700 Kevin McCarthy (2b9d6165b8b7) * imap/imap.c, imap/imap.h, mbox.c, mh.c, mutt.h, mx.c, pop.c: Convert mx_open_mailbox_append() to use ctx->mx_ops. Set the flag MUTT_NEWFOLDER to signal Maildir and MH to create the directory structure. Distribute the "open append" code to mbox, mh, and imap/imap.c. Set pop's mx_ops handler to NULL to signal it is not supported. 2016-07-31 18:42 -0700 Kevin McCarthy (3834da0c024e) * mbox.c, mx.c: Move fflush and fsync to the mbox and mmdf commit_msg functions. The case statement in mx_commit_message() was previously distributed to the various ops->commit_msg() handlers, but the fflush and fsync were not. 2016-07-30 11:11 -0700 Kevin McCarthy (27b77b5c97cf) * browser.c, browser.h, imap/browse.c, imap/imap.h, init.h: Add unread and total message count format strings to $folder_format. %n will show the unread message count in the mailbox. %m will show total message count. Except for %n with IMAP, these both require $mail_check_stats to be set, which puts these counts inside BUFFY. Since the imap_mboxcache is never fresher than the value in BUFFY, remove the special imap_mailbox_state() call. Instead, just update from the current Context for all mailboxes. Remove the logic that overrode the %N format string to show unread count for IMAP mailboxes. If they want to see unread count, they will have to change the $folder_format. Although it doesn't look possible to reuse browser_state.entry slots, change the OP_DELETE_MAILBOX to memset(0) the deleted slot. Then, we can change to logic in add_folder() so it doesn't need to zero-out unset values. 2016-07-25 12:25 -0700 Richard Russon (4f4c258ab95c) * imap/command.c: Fix imap buffy msg_count overwrite issue. The sidebar updates the buffy->msg_count with the context. This can cause it to become out of sync with the imap_mboxcache. If the imap_buffy doesn't request MESSAGES, don't overwrite the buffy->msg_count with a stale value. 2016-07-22 14:55 -0700 Kevin McCarthy (7b9763564598) * buffy.c, mx.c: Convert buffy_mbox_check() and trash_append() to use local context. buffy_mbox_check() was leaking the dynamically allocated context. Rather than add a call to free, just convert it to use a local variable. Make the same change to trash_append(), which doesn't need the dynamically allocated context either. 2016-07-21 14:00 -0700 Kevin McCarthy (81ecc31f8197) * mx.c: Fix memleak in the new trash folder code. Free the context in opened in trash_append() 2016-07-21 12:49 +0200 Vincent Lefevre (2d1279b26e22) * po/fr.po: Updated French translation. 2016-07-20 16:29 -0700 Kevin McCarthy (89b266256a85) * mbyte.c, mbyte.h, pager.c: Filter directional markers that corrupt the screen. (closes #3854) Thanks to Vincent Lefèvre for working on these utf-8 screen display issues. 2016-07-19 18:56 -0700 Anton Lindqvist (69bbe4da959f) * curs_lib.c: Fix arithmetic exception due to menu->pagelen being negative. Resizing the terminal window down to two lines when in an empty mailbox causes mutt to crash due to division by zero since menu->max equals 0 and menu->pagelen < 0 in status.c:205. Fixing the problem at this specific line felt wrong since I did notice menu->pagelen being negative. The pagelen is inherited from the rows calculation in mutt_reflow_windows. Since the number of lines can potentially be smaller than the accumulated number of rows acquired by the status, help and message window, make sure the calculation does not turn negative. 2016-07-17 19:31 -0700 Kevin McCarthy (f1d5a884ffed) * imap/imap.c, imap/imap.h, mutt.h, mx.c: Add imap-fast-trash patch. This is based on the patch by Paul Miller. Modifications are: * Create a new flag, MUTT_TRASH for imap_make_msg_set(), rather than use MUTT_EXPIRED. * Change imap_make_msg_set(MUTT_TRASH) to only look at hdrs[n]->deleted && !hdrs[n]->purge, behaving like MUTT_TAG, rather than looking at the HEADER_DATA. * Reimplement imap_fast_trash() based on imap_copy_message(). It looks the old version was too, but it lacked handling of TRYCREATE and also queued the UID COPY but didn't exec it. (Presumably this happened in the subsequent sync). * Move the Context magic and mx_is_imap() checks outside of imap_fast_trash() 2016-07-17 19:31 -0700 Kevin McCarthy (280f9b195192) * OPS, curs_main.c, functions.h, pager.c: Add purge-message patch. This is based on the patch by Cedric Duval. Modifications are: * Use the exising M_PURGE flag from the trash folder patch, rather than adding a separate flag. * Undelete operations are already handled by the trash folder patch. 2016-07-17 19:31 -0700 Kevin McCarthy (20499921a4e5) * commands.c, curs_main.c, editmsg.c, flags.c, globals.h, imap/message.c, init.h, mbox.c, mutt.h, mx.c, pager.c, pattern.c, postpone.c: Add the trash folder patch. This is based on the trash folder patch by Cedric Duval. Modifications to the original patch are: * Use a flag called M_PURGE instead of M_APPENDED. The same flag is then used in the following "purge" patch instead of adding a different flag. * Removed the counter in context. The existing context->deleted is all that's needed. * Removed the "auto unset M_PURGE" when M_DELETED is unset inside _mutt_set_flag(), although this is convenient, it easily leads to header->purge not being reset in a few situations. * Reset purge flag along with the deleted flag if $delete is answered no. * Set M_PURGE on an edited message. (edit_one_message()) * Preserve purge flag in mutt_reopen_mailbox() * Turn off OPTCONFIRMAPPEND when saving to the trash, rather than hardcoding it off in mutt_save_confirm(). That way, normal save to the folder will respect the option. 2016-07-16 14:04 -0700 Will Fiveash (b2cb7a38c1ed) * mutt_sasl.c: Fix memory leak in mutt_sasl_cb_pass. SASL doesn't free the sasl_secret_t, so this was leaking. Instead, keep our own pointer to it, and safe_realloc() each time. sasl_secret_t doesn't need the data field null terminated, so memcpy the password over. 2016-07-12 18:04 -0700 Kevin McCarthy (488f91a85115) * muttlib.c, sendlib.c: Fix BODY->d_filename memory leaks. mutt_message_to_7bit() and transform_to_7bit() were overwriting d_filename without freeing the previous value. mutt_free_body() was not freeing the d_filename pointer. 2016-07-12 17:46 -0700 Kevin McCarthy (b4de6941bbb9) * muttlib.c, sendlib.c: Fix BODY->charset memory leaks. mutt_get_content_info() was directly setting charset without freeing the previous value. mutt_free_body() was not freeing the charset. 2016-07-11 18:36 -0700 Kevin McCarthy (9378d21fc7fe) * curs_lib.c, main.c: Initialize mutt windows even in batch mode. (closes #3853) mutt_select_fcc() calls mutt_addr_hook() -> mutt_make_string() which refers to MuttIndexWindow->cols when calling mutt_FormatString(). In batch mode, MuttIndexWindow hasn't been initialized, leading to a segfault. This might be the only overlap, but it seems wiser to just initialize the mutt windows in case there are other references (now or in the future) when processing format strings in batch mode. 2016-07-08 19:08 -0700 rich burridge (89ae904a6b30) * Makefile.am: Fix conststrings compiler version string generation. (closes #3852) The Makefile.am tries compiler flags -v, --version, and -V but neglected to filter error messages if these flags aren't recognized. 2016-07-08 18:52 -0700 Kevin McCarthy (ec4c113a3d2b) * sidebar.c: Change sidebar highlighted mailbox behavior. Delay selecting the highlighted mailbox until prepare_mailbox(), to avoid a hidden mailbox being selected during the Buffy list population (in mutt_sb_notify_mailbox()). Change update_entries_visibility() to not automatically make the highlighted mailbox visible. Change prepare_sidebar() to (re)set the highlighted mailbox when the current highlighted mailbox is hidden. 2016-07-08 18:52 -0700 Kevin McCarthy (5fb53b95afa7) * sidebar.c: Fix sidebar pagedown/up when mailboxes on the end are hidden. The pageup/pagedown code was setting the highlighted mailbox to the top and bottom index without checking if those were hidden. 2016-07-08 18:47 -0700 Kevin McCarthy (4dc1831fd6d7) * imap/message.c: Don't overwrite imap_status->uidnext with a lower value. (closes #3771) imap_read_headers() updates the idata and imap_status uidnext after reading through all the new headers. The idata is updated properly (only if its uidnext is below maxuid+1), but the imap_status was always being set to maxuid. This causes a problem with new mail checking if the most recent messages are deleted. Then the uidnext will be greater than maxuid+1 in the mailbox, and if there are any other unread messages it will *always* report new mail even if $mail_check_recent is set. 2016-07-07 12:00 -0700 Kevin McCarthy (6f2fe8f32dab) * sidebar.c: Fix the sidebar TopIndex and BotIndex when $sidebar_new_mail_only is set. When set, some of the entries can be hidden, so a simple division by page_size to find the correct top/bottom isn't correct. Instead, manually partition into groups of page_size visible entries and set top and bottom based on the interval around the highlighted entry. 2016-07-07 09:21 -0700 Kevin McCarthy (5229c7fbc37e) * mbyte.c, pager.c: Filter soft hypen from pager and headers. (closes #3848) Add U+00AD SOFT HYPHEN to the filtered characters in headers and the pager. In some terminals and situations it causes major display problems. 2016-07-06 12:31 -0700 Richard Russon (81e9c352e5d7) * sidebar.c: Fix sidebar crash for non-existent mailbox If you to a non-existent mailbox, there will be no Context. 2016-07-06 10:43 -0700 Kevin McCarthy (88793198dfcb) * po/fr.po: merge stable 2016-07-02 12:32 -0700 Kevin McCarthy (bf1c73de2b7c) * doc/manual.xml.head, init.h: Fix the documented sort methods for sidebar_sort_method. Remove references to unused "date" and "size", and add "flagged". 2016-07-02 12:25 -0700 Kevin McCarthy (20089a780e8e) * init.c, init.h: Add R_SIDEBAR to redraw sidebar when its settings change. Add to the sidebar settings that control formatting of the sidebar. 2016-07-02 12:24 -0700 Kevin McCarthy (d404059a7619) * sidebar.c: Fix sidebar "unsorted" order to match Buffy list order. Since the previous commit decoupled the sidebar from the Buffy list, we can now restore the order to match the buffy list when sidebar_sort_method is set (back) to "unsorted". 2016-07-02 12:22 -0700 Kevin McCarthy (b05c170b4c91) * buffy.h, sidebar.c: Decouple the sidebar from the Buffy list. Change the sidebar to use an array of SBENTRY* instead. Move the "is_hidden" into SBENTRY. Remove the added "prev" pointer from BUFFY. This way, sorting the sidebar doesn't affect the BUFFY list order, and we don't need elements inside BUFFY just for the sidebar presentation. Fix sidebar-next for the case where the mailboxes are unsorted and $sidebar_new_mail_only is set. Change sorting not to clump hidden mailboxes at the bottom, instead simply skip over hidden mailboxes in sidebar-next/prev. 2016-07-01 13:39 -0700 Kevin McCarthy (c62f5cd3c8e4) * send.c: merge stable 2016-06-30 12:57 -0700 Kevin McCarthy (6b147a411f68) * doc/makedoc-defs.h: Fix missing sidebar documentation links. (closes #3847) USE_SIDEBAR needed to be set in doc/makedoc-defs.h so that the sidebar option documentation is generated whether mutt is configured with the sidebar or not. 2016-06-29 18:58 -0700 Kevin McCarthy (4b6829229176) * m4/gssapi.m4: Fix cppflags and muttlibs duplication with --with-gss. When krb5-config was found, MUTT_AM_PATH_GSSAPI included CFLAGS in GSSAPI_CFLAGS and MUTTLIBS in GSSAPI_LIBS. However, configure.ac afterwards sets: CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS" MUTTLIBS="$MUTTLIBS $GSSAPI_LIBS" This caused the flags and libs to be duplicated. 2016-06-29 18:58 -0700 Kevin McCarthy (c84aa0d62ce3) * configure.ac: Include ncurses tinfo library if found. Thanks to Fabian Groffen for reporting this issue and providing a couple possible patches. From Fabian's report: For some time now, ncurses can be built in a mode where the low level terminfo functionality lives in a separate lib called libtinfo. Because some people do, this means Mutt needs to include this library in that case to avoid linking errors [...] 2016-06-29 12:25 -0700 Kevin McCarthy (b62483975c94) * init.h: Clarify oppenc option documention. (closes #3846) Rephrase the option description to try and make it clearer what the option does, and how to enable/disable it within a message. 2016-06-28 16:06 -0700 Kevin McCarthy (2baed7154180) * init.h, sidebar.c, sort.h: Remove unused SORT_DESC. This came over with the sidebar patch, but I believe is only used by the notmuch extension. 2016-06-28 15:59 -0700 Fahri Cihan Demirci (5bac9dacae1d) * contrib/sample.muttrc-sidebar: Remove $sidebar_refresh_time from Sample Sidebar Config The $sidebar_refresh_time option was removed with the changeset 1f840760e6e0. Remove it from the sample sidebar configuration as well, so that anyone using that file in its entirety won't have to deal with "unknown variable" errors. 2016-06-23 12:38 -0700 Kevin McCarthy (b45c8ec1e54c) * buffy.c, buffy.h, curs_main.c, imap/imap.c, main.c, mutt.h, mx.c, pop.c, sidebar.c, sidebar.h: Change sidebar to consistently use realpath for context and buffy comparison. The original sidebar patch contained a half-implemented attempt to use realpath() mailbox paths for comparison. (Presumably so the open mailbox remains highlighted despite symlink issues). Add realpath to the Context, and set it when opening a mailbox. Remove sidebar ifdef for the buffy member, and always set it there too. Change the sidebar to use the realpath for comparison everywhere. mutt_buffy_check() is using stat device and inode for comparison. Perhaps this can be changed to use realpath instead, but that's beyond the scope of this patch. 2016-06-22 09:20 -0700 Kevin McCarthy (c8613259dc38) * sidebar.c: Change sidebar next/prev-new to look at buffy->new too. Look at new in addition to msg_unread count, to account for when $mail_check_stats is unset or when the sidebar only shows the %n status flag. 2016-06-20 20:09 -0700 Kevin McCarthy (3d87b0521a45) * doc/manual.xml.head, init.h: Add documentation to the "New Mail Detection" section of the manual. Mention the behavior change with $mail_check_recent. Add a section about $mail_check_stats. 2016-06-20 10:11 +0200 Vincent Lefevre (069c7a655ad5) * po/fr.po: Updated French translation. 2016-06-18 13:36 -0700 Damien Riegel (91af19866bbd) * imap/imap.c, imap/imap.h, imap/imap_private.h, mbox.c, mh.c, mutt.h, mx.c, mx.h: add commit_msg to struct mx_ops 2016-06-18 13:36 -0700 Damien Riegel (28688fee52a5) * mbox.c, mx.c, mx.h: add mmdf_commit_message function Move MMDF operations that were done in mx_commit_message to a dedicated mmdf_commit_message function. 2016-06-18 13:36 -0700 Damien Riegel (4c6539a88f0a) * mbox.c, mx.c, mx.h: add mbox_commit_message function Move mbox operations that were done in mx_commit_message to a dedicated mbox_commit_message function. 2016-06-18 13:36 -0700 Damien Riegel (16bfe31ef8b3) * imap/imap.h, imap/message.c, mx.c: add imap_commit_message function Move IMAP operations that were done in mx_commit_message to a dedicated imap_commit_message function. 2016-06-18 13:36 -0700 Damien Riegel (37140981e746) * mh.c, mx.c, mx.h: add maildir_commit_message function This commit adds a maildir_commit_message with a prototype consistent with other kind of mailboxes, to simplify upcoming refactoring. 2016-06-18 13:36 -0700 Damien Riegel (93d4169b0886) * mh.c, mx.c, mx.h: prepend maildir_commit_message function name with an underscore Basically, rename maildir_commit_message to _maildir_commit_message. This commit is preparatory to make the maildir_commit_message symbol available for further use. Symbols starting with underscore should be avoided but this one is long enough to prevent collision. 2016-06-18 13:36 -0700 Damien Riegel (e5d87ebe0f5b) * mh.c, mx.c, mx.h: remove unused HEADER parameter in mh_commit_message mh_commit_message is only called in one place with the header parameter set to NULL. To make the commit function consistent with other mailboxes, which only takes ctx and msg as parameters, remove this unused parameter. 2016-06-18 12:41 -0700 Damien Riegel (ce2e5caf4339) * imap/imap.c, imap/imap_private.h, imap/message.c, mbox.c, mh.c, mutt.h, mx.c, pop.c: add close_msg to struct mx_ops 2016-06-18 12:41 -0700 Damien Riegel (4bab14a24dbe) * mailbox.h, mx.c: Remove magic member in MESSAGE structure The "magic" was copied from the context to the message structure to be able to determine which close function had to be called in mx_close_message. Now that this function is context aware, there is no need to store the magic in the MESSAGE structure and it can be safely removed. 2016-06-18 12:41 -0700 Damien Riegel (3ec6c133641c) * attach.c, commands.c, copy.c, editmsg.c, mailbox.h, mh.c, mx.c, parse.c, pattern.c, pop.c, postpone.c, recvattach.c, sendlib.c: pass context in mx_close_message The mx_close_message is one of the few mx_* functions that don't have a context as parameter. To make them more consistent, pass the context. 2016-06-17 19:01 -0700 Damien Riegel (70eb7e0dbb58) * imap/imap.c, imap/imap.h, imap/imap_private.h, imap/message.c, mbox.c, mh.c, mutt.h, mx.c, pop.c, pop.h: Add open_msg to struct mx_ops Add the callback to open an existing message to struct mx_ops. For mbox, mmdf, maildir, and mh, the code was implemented directly into mx_open_message, so it is moved in their respective source files. For imap and pop, there were already _fetch_message functions, but their argument order has been changed to pass the context as a first argument. 2016-06-17 10:33 -0700 Olaf Hering (d83239fd794a) * browser.c, browser.h: folder_file: remove struct stat Add and use new flag to indicate the folder is on local filesystem. Add and use new gid, uid and nlink member. Use existing ->mode member instead of stat->st_mode. Use existing ->size member instead of stat->st_size. Use existing ->mtime member instead of stat->st_mtime. Remove struct stat, the used values were already duplicated in the struct. This reduces memory usage. 2016-06-17 10:33 -0700 Olaf Hering (8e671bbe094d) * regex.c: Add real prototype for re_match_2_internal in regex.c Fixes compilation warning with -Wunprototyped-calls 2016-06-17 10:30 -0700 Kevin McCarthy (5817d3d93b7a) * buffy.c, buffy.h, mh.c, mx.h: Combine the basic and extended buffy functions. Add a check_stats parameter to the mbox, maildir, and mh buffy functions. Use that parameter to determine whether to also count total, new, and flagged messages. This makes the functions a bit more complicated, but improves efficiency (for maildir and mh). Also includes the following cleanup/fixes: * Move the orig-value counter reset to the beginnining of the loop, (before tmp->new is set to 0). * Change trashed maildir messages to not be counted in msg_count * Remove an incorrect setting of mailbox->new based on msg_count in maildir. (I missed this one for 1f840760e6e0) * Change mbox to use the context->mtime for stats_last_checked, removing a race condition. * Fix mh to actually count the messages in order to generate msg_count. mh_sequences only covers the range of messages with some sort of flag. 2016-06-15 11:09 +0200 Vincent Lefevre (c29c521eec0a) * po/fr.po: Updated French translation. 2016-06-14 13:11 -0700 Kevin McCarthy (5ad82360c6ea) * imap/imap.c: Reset buffy->new for the current mailbox in IMAP. 1f840760e6e0 moved the buffy->new reset inside the STATUS processor. Since the current mailbox is not STATUS'ed, it needs to be reset in imap_buffy_check(). Thanks to Aaron Schrab for reporting this issue (and for helping test tip). 2016-06-12 13:49 -0700 Kevin McCarthy (f447c67f511b) * OPS.MIX, OPS.SIDEBAR: Fix the case of messages in OPS.MIX and OPS.SIDEBAR Thanks to Vincent Lefèvre for spotting the discrepancy. 2016-06-07 15:02 -0700 Kevin McCarthy (1f840760e6e0) * buffy.c, buffy.h, contrib/sample.muttrc-sidebar, doc/manual.xml.head, globals.h, imap/command.c, imap/imap.c, imap/imap.h, init.h, mailbox.h, mbox.c, mh.c, mutt.h, mx.c, mx.h, sidebar.c, sidebar.h: Make extended buffy independent of the sidebar. Add new boolean option $mail_check_stats (default off) and $mail_check_stats_interval. The first turns extended buffy on. The second sets the amount of time in between extended buffy checks (defaulting to 60 seconds). Remove the option $sidebar_refresh_time. Change mutt_buffy_check() to only notify the sidebar to redraw if a mailbox buffy value changes. Remove the #ifdefs around the extended buffy functions. The next patch will merge these functions with the basic functions and pass a parameter instead. Imap is a special case, because it sends out the status in one batch. Change this to perform the comparisons inside cmd_parse_status() and flag the sidebar there. It was previously directly assigning the status counters (unsigned int) to the buffy->new (short). Change this to assign 1/0. 2016-06-08 14:43 -0700 Kevin McCarthy (4be8b077c81f) * doc/manual.xml.head, init.h: Change the default for sidebar_format to use %n. The next series of patches is going to create a new option, $mail_check_stats defaulting off. When off, the extended buffy which calculates total/new/flagged messages won't be run. To help reduce "sidebar is broken" bug reports, this changes the default format to something not requiring extended buffy. The previous default is documented in the option and preserved in the sample sidebar muttrc in contrib. 2016-06-08 13:16 -0700 Kevin McCarthy (594137a8ea12) * init.h, sidebar.c: Add sidebar_format flag '%n' to display 'N' on new mail. 2016-06-11 17:59 +0200 Vincent Lefevre (123e36398eea) * po/fr.po: Updated French translation. 2016-06-09 12:06 -0700 Richard Russon (93c4ae03689e) * compose.c: Fix alignment in the compose menu. Several of the compose-panel labels didn't use the TITLE_FMT to align themselves. This causes formatting problems when the width is changed, e.g. by the NNTP patch. 2016-06-08 13:28 +0200 Vincent Lefevre (1fad3bfd4aab) * Makefile.am: Corrected OPS.SIDEBAR filename in EXTRA_DIST. 2016-06-07 13:40 -0700 Richard Russon (fc33b34d637b) * sidebar.c: Setting $sidebar_width to more than 128 would cause bad things to happen. First, give the users more than enough space. Second, don't pad out short strings beyond the buffer --- sidebar.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 2016-06-07 13:27 -0700 Kevin McCarthy (9937540dab42) * commands.c, hdrline.c, pager.c, protos.h, status.c: Fix columns used for $status_format and $pager_format in the pager. The code was hardcoding use of MuttIndexWindow->cols in mutt_make_string_info() and MuttStatusWindow->cols in menu_status_line(). Add a parameter to mutt_make_info_string(). Change menu_status_line() to use menu->statuswin->cols, falling back to MuttStatusWindow if no menu is passed in. Set menu->statuswin appropriately inside pager.c. Thanks to Richard Russon for tracking down this problem, and for the initial patch. 2016-06-05 18:30 -0700 Kevin McCarthy (5270cd795043) * doc/makedoc.c: Add warning in makedoc for unexpected prefices. (see #3845) In case other types get renamed again in the future, add a warning message to makedoc.c. 2016-06-05 18:05 -0700 Kevin McCarthy (91608dca6f12) * mx.c: Fix sidebar buffy stats updating on mailbox close. Move the mutt_sb_set_buffystats() call from mx_fastclose_mailbox() to the bottom of mx_close_mailbox(). Append-only mailboxes don't have msgcount set, so fastclose was the wrong place to be doing these updates. 2016-06-04 11:32 -0700 Kevin McCarthy (8e342d73159b) * buffy.c, mh.c: Start to fix sidebar buffy modifications. The extended buffy for mh had incorrect placement of the loop brackets. The counters weren't being incremented in the loop. Fix extended buffy for maildir to count a maildir message as new if it doesn't have the info delimeter. Remove shortcircuits added to the basic buffy stating there is new mail when (msg_unread > 0). This is not necessarily true, depending on $mail_check_recent. Note: the extended buffy still needs more fixes, which will be done when it is refactored into its own option. 2016-06-04 11:32 -0700 Kevin McCarthy (5d117fd810a9) * sidebar.c: Various fixes to the sidebar logic. Use strfcpy instead of strncpy. The current logic could write past the end of the buffer. Don't mess with BUFFY next pointers during removal. The mutt_parse_mailboxes() is fine, but this is still not something that should be done inside sidebar.c. On removal, set next->prev since we can. Fix unmailboxes logic: * only fix the prev pointers once. * if we unmailbox the open mailbox, set it to NULL. Lastly, flag a redraw on mailboxes/unmailboxes. 2016-06-04 11:32 -0700 Kevin McCarthy (b542812c262e) * buffy.c, curs_main.c, main.c, menu.c, mx.c, pager.c, sidebar.c, sidebar.h: Add "mutt_" prefix to global sidebar functions. Also, remove unused sb_init declaration. 2016-06-04 11:32 -0700 Kevin McCarthy (cb23ed20d035) * doc/manual.xml.head, init.h: Clean up the sidebar manual. Remove the introduction section. It's a nice effort, but reads more like a tutorial than something that belongs in section 2. Will probably put in on the website instead. Remove references to a "patch", neomutt, and the history. Remove the sample muttrc from the manual. Fix validation errors for the documentation. 2016-06-04 11:32 -0700 Kevin McCarthy (517d4f0debab) * sidebar.c: Re-indent and style sidebar.c. 2016-06-04 11:32 -0700 Kevin McCarthy (39639dc7e9e7) * sidebar.c: Fix sidebar check_sec.sh warnings. Use safe_malloc, FREE, and the safe_strcat functions. 2016-06-04 11:32 -0700 Kevin McCarthy (08f9ba9efab9) * Makefile.am, buffy.c, configure.ac, curs_main.c, flags.c, globals.h, keymap.c, menu.c, mutt_menu.h, pager.c, sidebar.c: Sidebar clean up: building and drawing logic. Fix the autoconf/makefile.am changes to be consistent. Create a global SidebarNeedsRedraw to indicate a redraw is needed, instead of putting sb_draw() everywhere in the code. Create a menu_redraw_sidebar() function and use the REDRAW_SIDEBAR flag instead of piggy-backing it inside the index loop. Fix curs_main.c and pager.c to be a bit cleaner by using the global and REDRAW_SIDEBAR. Start to clean up some of the buffy code, but this needs to refactored and fixed. 2016-06-04 11:31 -0700 Richard Russon (8ad6090903db) * Makefile.am, OPS.SIDEBAR, buffy.c, buffy.h, color.c, configure.ac, contrib/sample.muttrc-sidebar, contrib/sample.vimrc-sidebar, curs_main.c, doc/manual.xml.head, flags.c, functions.h, globals.h, imap/command.c, imap/imap.c, init.c, init.h, keymap.c, mailbox.h, main.c, mbox.c, menu.c, mh.c, mutt.h, mutt_curses.h, mutt_menu.h, mx.c, mx.h, pager.c, sidebar.c, sidebar.h, sort.h: Add neomutt version of sidebar patch. (closes #3829) This is the patch from neomutt; branch 'devel/win-sidebar'; commit c796fa85f9cacefb69b8f7d8545fc9ba71674180 with the following changes: - move the sample muttrc and vimrc to contrib. - remove the README.sidebar. - empty out the PATCHES file. 2016-05-31 13:20 -0700 Kevin McCarthy (52f48b083cc0) * doc/makedoc.c: Fix documentation for DT_MAGIC types. (closes #3845) With the rename of M_ to MUTT_, the documentation generator in makedoc.c needed to be adjusted for the new prefix size. Thanks to Damien Riegel for the suggested fix. 2016-05-26 14:45 -0700 Kevin McCarthy (cd316a555bd7) * copy.h, group.h, mailbox.h, mutt.h, mutt_curses.h, pager.h: Fix header file indentation after M_ prefix renaming. The use of tabs caused misalignment of various macro definitions. 2016-05-26 14:05 -0700 Damien Riegel (2821e77c1a54) * imap/imap.c, imap/imap.h, mbox.c, mh.c, mutt.h, mx.c, mx.h, pop.c, pop.h: add check operation to struct mx_ops In mx_check_mailbox switch case, we simply call _check_mailbox, so this operation can be move into the mx_ops structure pretty easily. This commit adds a mandatory "check" operation to struct mx_ops and change all mailboxes to use it. Check functions are made static as they are only used in their respective source files now. 2016-05-26 14:05 -0700 Damien Riegel (a28ed1c725c6) * curs_main.c, mailbox.h, mx.c: mx_check_mailbox: remove lock argument in function call This function is only called in one place with lock = 0. Basically, all code under if (lock) is dead code, so we can remove it, making the function simpler to factorize. 2016-05-26 14:05 -0700 Damien Riegel (0ae29df8a81a) * imap/imap.c, imap/imap.h, mx.c: add function imap_check_mailbox_reopen In mx_check_mailbox, imap mailbox is the only function with a different prototype: it has an extra force argument. In order to move the check operation to the mx_ops structure, we need that all mailboxes have the same prototype. To do so, a new function imap_check_mailbox_reopen is added. 2016-05-25 15:58 -0700 Kevin McCarthy (261939e71d80) * mx.c: Add a TODO to mx_open_new_message() to use mx_ops in the future. We can't use it until mx_open_mailbox_append() is converted to set mx_ops. 2016-05-25 15:53 -0700 Damien Riegel (63cb99b46c34) * imap/imap.c, mailbox.h, mbox.c, mh.c, mutt.h, mx.c, mx.h: add open_new_msg operation to struct mx_ops The code was already using a function pointer to do this operation. This commit moves this function pointer to the mx_ops structure and the open_new_message functions to their respective source files if it needs to. 2016-05-24 12:45 -0700 Kevin McCarthy (79c379cb0c21) * keymap.c: merge stable 2016-05-12 12:41 -0700 Damien Riegel (ae203b2c56a6) * imap/imap.c, imap/imap.h, mbox.c, mh.c, mutt.h, mx.c, mx.h, pop.c, pop.h: Start decoupling mailbox operations. Introduce a dedicated structure for mailbox operations: struct mx_ops. Move the open and close operations into that structure. Assign this structure to the context in mx_open_mailbox. This is currently based on the "magic" for the mailbox type, but may be refactored in the future. Add a stub mbox_close_mailbox function. This function does nothing, the main purpose is to introduce a mx_ops structure for mbox, so its usage is similar to mh/imap/pop. We reuse the name that was made available by the previous commmit. Note that the actual closing of the descriptor is done in mx.c. To be more consistent with other mailboxes, introduce functions mh_open_mailbox and maildir_open_mailbox, and create a dedicated structure for mmdf. 2016-05-12 12:41 -0700 Damien Riegel (6356f1068fe2) * mbox.c, mx.c, mx.h: rename mbox_close_mailbox to mx_close_mailbox_append and move it mbox_close_mailbox was used as the counterpart of mx_open_mailbox_append. To make things clearer, rename it mx_close_mailbox_append. As it is only used in mx.c, move it there and make it static. 2016-05-10 09:42 -0700 Kevin McCarthy (391492f27fef) * doc/manual.xml.head, filter.c: Set COLUMNS to MuttIndexWindow->cols in mutt_create_filter_fd. (closes #3837) This allows filters to automatically (or via a command line argument) adjust to the width of the pager/index. This is even more important with the sidebar, since the width of the pager is smaller than the terminal width. Thanks to Vincent Lefèvre for his helpful information and suggestions, and to Richard Russon for the initial patches. 2016-05-09 14:06 -0700 Kevin McCarthy (d18cd04e3f5a) * Makefile.am, getdomain.c, mutt_sasl.c, mutt_socket.c, mutt_tunnel.c, sys_socket.h: Back out wrapper sys_socket.h workaround (23334e967dd7) After renaming all internal macros from M_* to MUTT_*, the sys_socket.h workaround is no longer necessary. 2016-05-09 14:06 -0700 Derek Martin (59b77d5c73e0) * account.c, account.h, addrbook.c, alias.c, attach.c, browser.c, buffy.c, buffy.h, charset.c, charset.h, color.c, commands.c, compose.c, copy.c, copy.h, crypt-gpgme.c, crypt.c, curs_lib.c, curs_main.c, doc/makedoc.c, editmsg.c, enter.c, flags.c, functions.h, group.h, handler.c, hcache.c, hcache.h, hdrline.c, help.c, hook.c, imap/browse.c, imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c, imap/util.c, init.c, init.h, keymap.c, lib.c, lib.h, mailbox.h, main.c, mbox.c, menu.c, mh.c, mutt.h, mutt_curses.h, mutt_menu.h, mutt_sasl.c, mutt_socket.c, mutt_socket.h, mutt_ssl.c, mutt_ssl_gnutls.c, muttlib.c, mx.c, mx.h, pager.c, pager.h, parse.c, pattern.c, pgp.c, pgpinvoke.c, pgpkey.c, pop.c, pop_auth.c, pop_lib.c, postpone.c, protos.h, query.c, recvattach.c, recvcmd.c, remailer.c, rfc1524.c, rfc2047.c, rfc2231.c, rfc3676.c, score.c, send.c, sendlib.c, smime.c, smtp.c, status.c, system.c, thread.c: Change M_* symbols to MUTT_* Changeset 23334e967dd7 created a workaround for a namespace conflict with Solaris and derivatives. After some discussion, the team decided it would be best to move away from using the "M_" prefix for macros. This patch was automatically generated by running: perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print` with the exception that sys_socket.h was exempted. (That file will be backed out subsequent to this commit.) Thanks to Andras Salamon for supplying the perl script used to make this change. 2016-05-03 13:21 -0700 Kevin McCarthy (b74dfb9fa901) * mbyte.c, pager.c: Skip bidi markers in the pager and index. (closes #3827) Curses and slang don't support them, so there's little point in showing them or attempting to somehow deal with them. This patch adds filtering in the pager, and changes the filtering added in 6e0aca94cdb0 for the index to completely skip the marker. 2016-05-03 09:46 -0700 Kevin McCarthy (9dfe211355b6) * curs_lib.c: Change mutt_window_getyx() to accept NULL *y/*x params. Thanks to Vincent Lefèvre for suggesting this nice cleanup. Previously, _mutt_get_field() was employing an ugly hack to avoid an unused var warning. 2016-04-30 14:39 -0700 Kevin McCarthy (fb68199318ae) * po/fr.po: merge stable 2016-04-30 13:05 -0700 Kevin McCarthy (e1cec1a958e9) * pager.c: Fix pager mini-index drawing when $pager_index_lines = 1 and $status_on_top. When $pager_index_lines is 1, there is room for the index status line, but not for any actual index entries. The index redraw part was always calling menu_redraw_current() which doesn't actually check if there is room for the current row. This bug only shows up with $status_on_top, due to the order things are redrawn. 2016-04-30 10:50 -0700 Kevin McCarthy (d0746905cb3f) * pager.c: Fix pager layout when $status_on_top with no mini-index. (closes #3836) The pager_window->row_offset should only be adjusted when we have a mini-index. Pull common window initialization above, and adjust only when the mini-index is enabled. The pager_window rows and row_offset code could be further consolidated (since the status line is always a height of one), but I think the code reads a bit more clearly when the adjustments are explicitly stated. 2016-04-29 18:00 -0700 Kevin McCarthy (e369be9d490b) * pager.c: Remove newline insertion from pager. (closes #3835) The window patches commited now manually move to the next line, so there is no need to insert newlines for that purpose. The newlines also goof windows placed to the right of the pager, as is the case for the (currently external) sidebar-on-the-right functionality. Thanks to Richard Russon for the original patch and help testing the revised patch. 2016-04-27 17:56 -0700 Kevin McCarthy (efa6f7910c94) * addrbook.c, browser.c, compose.c, crypt-gpgme.c, hdrline.c, muttlib.c, pgpinvoke.c, pgpkey.c, protos.h, query.c, recvattach.c, remailer.c, smime.c, status.c: Add cols parameter to mutt_FormatString() Continuing with the conversion to using windows for screen drawing, mutt_FormatString() was directly using COLS for right justification and similar formatting. Instead pass in a parameter, cols. This change involved seeding the parameter through callback functions too, as many of them call mutt_FormatString() back. 2016-04-27 17:56 -0700 Kevin McCarthy (04f1846c56c1) * buffy.c, commands.c, flags.c, handler.c, help.c, init.c, keymap.c, mutt_curses.h, muttlib.c, recvattach.c, recvcmd.c, sendlib.c: Fix remaining direct usages of COLS/LINES to use mutt window functions. Most of these were just message update/clearing. 2016-04-27 17:56 -0700 Kevin McCarthy (9f9bcde2d0ff) * remailer.c: Change remailer to use mutt windows. 2016-04-27 17:56 -0700 Kevin McCarthy (8ad6164d9fe4) * edit.c: Modify the built-in editor to use windows. This only involved changing to use the MuttMessageWindow. 2016-04-27 17:56 -0700 Kevin McCarthy (0989f9d01b5c) * compose.c: Modify the compose screen to use windows. The header field positions enum is now started at 0: the windows compute the relative positioning as needed. A small improvement from this is that the headers now align with the top: there isn't a gap if $help is turned off. 2016-04-27 17:56 -0700 Kevin McCarthy (fd3fe386c24a) * copy.c, mutt_curses.h, pager.c, rfc3676.c: Modify the pager to use windows. The pager view is somewhat complex, due to the "mini-index" and the positioning of the index_status vs pager_status changes depending on $status_on_top as well as $pager_index_lines and $help. To make things simpler, it creates four "pager windows": index_status_window, index_window, pager_status_window, pager_window. mutt_term_width() is renamed to mutt_window_wrap_cols() and a mutt_window_t parameter passed in. Also, the pager drawing loop calling display_line() has a mutt_window_move() added to move to the beginning of the next line each time. This is in case the pager_window isn't flush with the left side of the terminal. 2016-04-27 17:56 -0700 Kevin McCarthy (4e20ab8ebf42) * curs_main.c: Modify the index to use windows. Change the index screen to use MuttIndexWindow and MuttStatusWindow. 2016-04-27 17:56 -0700 Kevin McCarthy (1b8abb069c37) * curs_lib.c, edit.c, enter.c, protos.h: Modify enter.c routines to use windows. This modifies the mutt_enter_string() functions to use MuttMessageWindow. Thanks to Richard Russon for pointing out slang doesn't support getcurx. 2016-04-27 17:56 -0700 Kevin McCarthy (47e9732b3a3c) * curs_lib.c: Modify the curs_lib.c to use windows. This changes some of the "prompting" routines to use the MuttMessageWindow. 2016-04-27 17:56 -0700 Kevin McCarthy (48676eb3e400) * menu.c, mutt_curses.h, mutt_menu.h: Modify the menu code to use windows. Change menu.c to use the mutt_window_t structures and functions. The index/stats/help/message window pointers are stored inside the menu_t. This is useful for the pager, where the "index" we want to use is a mini-index. 2016-04-27 17:56 -0700 Kevin McCarthy (ac4f746e614f) * curs_lib.c, init.c, init.h, main.c, mutt_curses.h, resize.c: Add window structures to use for screen layout. This is a series of 11 patches, centralizing Mutt screen drawing inside windows (mutt_window_t structures). Currently, the screen drawing and cursor positioning logic is distributed all over the code, resulting in many files having the same logic of where the help, status, message windows are. Additionally, the code directly uses move and mvadd*/mvprint* functions, which means if the layouts are changed, the row/column computation logic needs to be changed all over the place. The patch creates a (very simple) mutt_window_t structure and functions for moving, addch/str/printw, along with clearing the line. The windows keep track of where they are on the screen, allowing the Mutt code to simply position elements relative to the window. During curses initalization, and when the window is resized, the window sizes and positions and recomputed. Also, a new option flags, R_REFLOW is added for options that need to force a reflow when they are changed. Thanks to Richard Russon for pointing out the slang compilation issue. 2016-04-27 13:21 -0700 Kevin McCarthy (8083387557d9) * merge stable 2016-04-14 12:35 -0700 Kevin McCarthy (9a9c515e09d3) * muttlib.c: Fix soft-padding available columns computation. If arrow_cursor is set, it's possible that COLS < offset. Compute avail_cols, floored at 0, and use that instead. 2016-04-14 12:35 -0700 Kevin McCarthy (ca1af57e1855) * muttlib.c: Fix right justify buffer-truncated pad calculation in mutt_FormatString() Vincent Lefèvre noted that the computation had implementation defined behavior and was potentially incorrect. Change to make sure the subtraction won't lead to a wrap-around, and set pad to 0 in that case. 2016-04-14 12:35 -0700 Kevin McCarthy (92bbc02fdf9c) * muttlib.c: Pre-space softfill multi-column padding. Similar to the previous patch, this deals with multi-column padding characters and soft-fill. This will add spacing so the padding and content after padding aligns with the right side. You can see the effect by setting set index_format="%s %*我[ooooo]" and resizing the terminal. The right hand side will be jagged without the patch. 2016-04-14 12:35 -0700 Kevin McCarthy (fef5b5ed0f44) * muttlib.c: Add spacing to truncated multi-column characters when using soft-fill. First, fix the left-hand side column truncation calculation: "col + pad*pw -offset" pad = (COLS - col - wid) / pw, so this becomes "col + COLS - col - wid - offset" => "COLS - wid - offset" The problem is that pad was calculated *before* the right side was mutt_wstr_trunc() truncated, which may adjust wid! We want that calculation, with correct values, so instead just use the final reduction directly. (Note, the reduction ignores integer truncation, but pad shouldn't be used here in any case, because it's negative: there is no padding occuring). Second, when the left-hand side is truncated, multi-column characters may get chopped in the middle. Truncated characters are not included in the wlen and col values returned. Add spaces until the number of columns lines up (checking to make sure we don't run out of space too). 2016-04-11 12:45 -0700 Kevin McCarthy (eb94f64ad81a) * mutt_ssl.c: Add null-terminator to BIO_get_mem_data() output. It turns out the output isn't necessarily null-terminated. 2016-04-11 21:17 +0200 Vincent Lefevre (46f37be4afef) * po/fr.po: Updated French translation. 2016-04-11 11:55 -0700 Kevin McCarthy (0b66f6fd3d44) * mutt_ssl.c: Add an error message and debugging if SSL_CTX_new() fails. (closes #3831) Generate a mutt_error(). Add a debugging function ssl_dprint_err_stack() to dprint the ssl error stack. 2016-04-11 11:28 +0200 Vincent Lefevre (78aa3a1db632) * po/fr.po: Updated French translation. 2016-04-10 19:10 -0700 Kevin McCarthy (00c0c155d992) * mutt_ssl.c: Check for SSL_CTX_new returning NULL in ssl_sock_open(). (closes #3831) Thanks to Yuan Kang and the security researchers at Columbia University and the University of Virginia for reporting the bug. 2016-04-10 18:30 -0700 Kevin McCarthy (5464329344cd) * merge stable 2016-04-10 14:14 -0700 Kevin McCarthy (685b9dfba297) * imap/browse.c: Add error message string for imap_mailbox_rename() on root folder. This was fixed just before 1.6.0, but due to the string freeze, could not add an error message. 2016-04-08 18:38 -0700 Kevin McCarthy (b8240918eded) * rfc2047.c: Fix potential memory leak in rfc2047_encode. (closes #3825) If convert_string() has nonreversible characters, the allocated output buffer would be overwritten (and not freed) in rfc2047_encode(). Thanks to Richard Russon for the bug report and initial patch, and to TAKAHASHI Tamotsu for the analysis and revised fix suggestion. 2016-04-08 15:27 -0700 Kevin McCarthy (180a90d05ed4) * pager.c: Fix pager.c format_line() to use size_t for mbrtowc() retvals. While fixing up the error checking for mbrtowc(), I noticed the uses in pager.c format_line() were assigning the retval to an int. The cleanup for this was a little tricky, because it was making use of possible negative values for (k1 - k). The backspace detection loop condition was a bit heavy, so this patch first pulled the initialization and first call above, and put the second call inside the loop. Note that k1 previously included k, but this patch changes it to be just the retval of mbrtowc. This means the second mbrtowc() arguments are changed to include k, as is the ch increment at the bottom of the loop. 2016-04-08 15:20 -0700 Kevin McCarthy (a8bc75e7c4e1) * alias.c, curs_lib.c, help.c, pager.c: Reset mbstate for other mbrtowc() calls returning -1 Continue the cleanup started in changesets c8c76a6a1e61 and a3450fd50d11. In those changesets, a bug was occurring due to the mbstate not being reset when mbrtowc() returned -1. This patch fixes other callers of mbrtowc() to reset mbstate when it returns -1. 2016-07-06 10:43 -0700 Kevin McCarthy (88793198dfcb) * po/fr.po: merge stable 2016-07-06 10:41 -0700 Kevin McCarthy (88030069f94d) * .hgsigs: mutt-1.6.2 signed 2016-07-06 10:40 -0700 Kevin McCarthy (592270259a8e) * .hgtags: Added tag mutt-1-6-2-rel for changeset 7ccd4417bd70 2016-07-06 10:40 -0700 Kevin McCarthy (7ccd4417bd70) * ChangeLog, UPDATING, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.6.2 2016-07-01 13:33 -0700 Kevin McCarthy (7e817890913c) * send.c: Check $pgp_autoinline and $pgp_replyinline if oppenc is set. (closes #3846) The first oppenc call takes place after the initial checks of $pgp_autoline and $pgp_replyinline, and doesn't go through the pgp menu. Therefore, check for $pgp_autoline and $pgp_replyinline if oppenc is set too, to avoid oppenc enabling encryption without INLINE being set in those cases. a6a4d6ed0f19 previously cleaned things up so that it is safe to set INLINE even if encryption isn't enabled. 2016-05-24 12:08 -0700 Kevin McCarthy (f1f1af650910) * keymap.c: Fix infinite loop when help is bound to a named key combination. Commit a07e8215a0ef introduced a bug in km_error_key, which is called when an unbound key is pressed. If help is bound to a sequence containing named keys (e.g. ), the raw (untokenized) string would be pushed back into the unget buffer. This could lead to an infinite loop of unbound key presses triggering more unbound keys being put into the unget buffer. Change km_error_key to tokenize the string before putting it in the unget buffer. Much thanks to Jiri Bohac for his bug report, analysis, and initial patch! 2016-04-30 14:21 -0700 Kevin McCarthy (1ef1e39a7218) * ChangeLog, UPDATING, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.6.1 2016-04-30 14:23 -0700 Kevin McCarthy (2822cefa33d6) * .hgtags: Added tag mutt-1-6-1-rel for changeset 1ef1e39a7218 2016-04-30 14:25 -0700 Kevin McCarthy (e3bc23cbe3d1) * .hgsigs: mutt-1.6.1 signed 2016-04-27 13:08 -0700 Kevin McCarthy (23334e967dd7) * Makefile.am, getdomain.c, mutt_sasl.c, mutt_socket.c, mutt_tunnel.c, sys_socket.h: Create a wrapper sys_socket.h to work around Solaris namespace issues. (closes #3833) Solaris includes "sys/stream.h" inside their "sys/socket.h". This include file adds many non-reserved macros to Mutt's namespace, two of which conflict with existing Mutt macros. The simplest fix would be to rename those macros in Mutt, however this will cause difficulty with out-of-tree patches. This fix creates a wrapper include file that preserves those existing macros and prevents the Solaris values from entering Mutt's namespace. 2016-04-10 16:02 -0700 Kevin McCarthy (a6a4d6ed0f19) * crypt.c, send.c: Fix mutt_protect() when INLINE is set. (closes #3828) The oppenc changes allow security bits to be set even when not encrypting or signing (for instance, OPPENCRYPT and INLINE). mutt_protect() assumed that if INLINE is set, then either ENCRYPT or SIGN must also be set. Specifically, it would end up inline-signing the message even though neither was set. Ensure mutt_protect() is a noop if neither SIGN or ENCRYPT are set. In ci_send_message(), check for sign or encrypt before calling the crypt_get_keys() / mutt_protect() block, and also in the fcc section (since clear_content would be NULL if not). The second change to the fcc part is somewhat redundant, but better to be explicit and avoid the case where the subtype is somehow "encrypted" or "signed" even though msg->security wasn't set thus. 2016-04-05 14:31 -0700 Kevin McCarthy (f7db9cefd3b0) * Makefile.am, configure.ac, mutt_idna.h: Fix IDNA functions for systems without iconv. The IDNA changes for SMTPUTF8 support introduced a bug for systems without iconv. For those systems, the local<->intl functions would return an error due to the charset conversion failing. Change mutt_idna.c back to being conditionally compiled, but this time based on HAVE_ICONV. If there is no iconv, stub out the functions in mutt_idna.h. 2016-04-02 13:04 -0700 Kevin McCarthy (b983eb6c1a04) * merge default into stable 2016-04-02 11:55 -0700 Kevin McCarthy (b81408b02cbb) * .hgsigs: mutt-1.6.0 signed 2016-04-02 11:18 -0700 Kevin McCarthy (349f9cb71427) * .hgtags: Added tag mutt-1-6-rel for changeset be82a2fde82f 2016-04-02 11:18 -0700 Kevin McCarthy (be82a2fde82f) * ChangeLog, UPDATING, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.6.0 2016-04-01 09:38 -0700 Kevin McCarthy (503bd3a3c818) * Makefile.am: Fix hcversion.h generation error when using included gettext. When configuring mutt with --enable-hcache and --with-included-gettext, there is an automake ordering issue: BUILT_SOURCES are processed before SUBDIRS. Therefore, the 'hcversion.h' target is run before the included gettext (intl) is built. The hcversion.h target runs the cpp over config.h and mutt.h, but mutt.h includes lib.h which tries to #include . Unfortunately, libintl.h (in this configuration) is generated by the intl subdir build and so doesn't exist yet. While the build doesn't completely fail, the resulting hcversion.h is incorrect: it's just the md5sum of the initial value of BASEVERSION. This fix is somewhat of a hack but is cleaner than trying to change automake's behavior. It inserts a '#undef ENABLE_NLS' in between the config.h and mutt.h sent to the cpp. Since hcachever.sh is just scanning the data structures used by mutt, this shouldn't affect the hash generated. Thanks to Will Yardley for reporting this issue. 2016-03-30 13:16 -0700 Kevin McCarthy (6e0aca94cdb0) * mbyte.c: Filter out bidi marks in rfc2047 and rfc2231 encoding. (see #3827) Filter out U+200F RIGHT-TO-LEFT MARK and U+200E LEFT-TO-RIGHT MARK in rfc2047 and 2231 encoded fields. GNU Screen has a bug that corrupts the display, and can cause the wrong email to appear to be selected in the index. Until screen fixes the issue, filter it out in mutt. 2016-03-29 14:07 -0700 Kevin McCarthy (96b7714fef87) * doc/manual.xml.head: Fix documentation: mime_lookup (not mime- lookup). 2016-03-29 15:06 +0200 Vincent Lefevre (47aeb87ce9cd) * doc/manual.xml.head: Fix typo. 2016-03-26 15:45 -0700 Kevin McCarthy (62e478a3f1c8) * imap/imap.c: Fix error handling in sync_helper() and imap_sync_mailbox(). (closes #3817) This patch is based on the one Richard Russon found in the Fedora package. If an error occurs during one of the imap_exec() calls in imap_sync_mailbox(), the mailbox could end up being closed. This would cause idata->ctx to be NULL. Add a check in sync_helper() for the case where idata->ctx == NULL. In imap_sync_mailbox(), check the return value of sync_helper(). To keep the code simple, change rc from being the sum of the calls to the bitwise-OR of the calls. (We only need to know if a single flag needs to be updated, and bitwise-OR will detect negatives.) Below the calls to sync_helper(), if the call to imap_exec() fails, make sure rc is set to -1. 2016-03-26 13:30 -0700 TAKAHASHI Tamotsu (0b1f1daba437) * po/ja.po: Updated Japanese translation. 2016-03-24 12:07 -0700 Benno Schulenberg (484b34e23f2a) * po/eo.po: Updated Esperanto translation. 2016-03-23 15:28 -0700 Kevin McCarthy (55a389b96d0b) * imap/browse.c: Prevent renaming root folder in imap. The root folder results in mx.mbox being NULL, which causes a segfault. This can be triggered by entering a subfolder and trying to rename the ".." entry. Due to the translation string freeze, no visible error message is displayed. Add a TODO note about this for post-1.6 release. 2016-03-23 14:20 -0700 Kevin McCarthy (27cde0a2fe32) * imap/browse.c: Fix uninitialized prompt buffer in imap_mailbox_rename(). (closes #3819) This is a patch from OpenBSD to initialize the newname buffer in imap_mailbox_rename(). Previously it would generate random garbage in the prompt. This version of the patch initializes the prompt to the old mailbox name. Thanks to TAKAHASHI Tamotsu for finding this patch. 2016-03-23 13:17 -0700 Kevin McCarthy (789500dae762) * doc/manual.xml.head: Add "-d" command-line option to manual. (closes #3816) Thanks to Richard Russon for finding this patch in the Fedora package. 2016-03-23 13:06 -0700 Ivan Vilata i Balaguer (180380cd9119) * po/ca.po: Updated Catalan translation. 2016-03-22 18:00 -0700 Kevin McCarthy (a3450fd50d11) * curs_lib.c, protos.h: Clean up mutt_wstr_trunc() some more. * Change return type to size_t. The return value is the cumulation of values from mbrtowc(), which returns size_t. All callers already assign the return value to a size_t, requiring no external changes. * Change the local variables n, w, l, and cl to size_t. n is the strlen of the src parameter. l and cl are used for the return value. w is assigned to the *width parameter, which is size_t. cw is kept as an int, because wcwidth returns type int. * Change error handling of mbrtowc to be the same as other functions in mutt: only reset mbstate when the retval==-1. When retvat==-2, set cl=n to break out of the loop. Also, set wc to replacement_char and allow the logic below to determine the width instead of hardcoding to 1. 2016-03-20 17:06 -0700 Karel Zak (c8c76a6a1e61) * curs_lib.c: Improve error handling in mutt_wstr_trunc(). This is Karel Zak's patch to fix handling of (illegal) multi-byte chars. * mutt_wstr_trunc(): Reset mbstate after error in mbrtowc(). Set wc=0 if wcwidth returns < 0. Addresses: https://github.com/karelzak/mutt-kz/issues/58 Thanks to Richard Russon for bringing this patch to our attention. 2016-03-22 12:35 -0700 Benno Schulenberg (b302f9868d78) * po/nl.po: Updated Dutch translation. 2016-03-21 01:31 +0100 Vincent Lefevre (b3703e907d83) * po/fr.po: Updated French translation. 2016-03-20 15:38 -0700 Vsevolod Volkov (2a73a6e7c6e7) * po/ru.po: Updated Russian translation. 2016-03-20 15:36 -0700 Vsevolod Volkov (b3504a7b6cc2) * po/uk.po: Updated Ukrainian translation. 2016-03-20 15:30 -0700 Morten Bo Johansen (1f8e728ac6af) * po/da.po: Updated Danish translation. 2016-03-19 17:25 -0700 Kevin McCarthy (7992020e522d) * sendlib.c: Turn off asserts in sendlib.c. The Doctor reported triggering an assertion in convert_file_to(), due to an unexpected errno from iconv(). According to the comments, the assertions were only enabled for debugging and should have been turned off. We certainly don't want to abort mutt for this case, so just disable them as the comment indicates. 2016-03-19 16:19 -0700 Petr Pisar (36bf3b7ebd2c) * po/cs.po: Updated Czech translation. 2016-03-19 06:08 -0700 Kevin McCarthy (36f855a4a2cc) * crypt-gpgme.c, init.c, mutt_ssl.c, pgp.c: Fix a few typos in translation messages. Thanks to Moritz Barsnick for reporting these. 2016-03-18 12:12 +0100 Vincent Lefevre (fb13f458ad16) * po/fr.po: Updated French translation. 2016-03-18 10:15 +0100 Vincent Lefevre (6630c196ecd8) * mutt_ssl.c: Fix typo in debug message. 2016-03-17 17:33 -0700 Richard Russon (cbf073e5e0d7) * recvattach.c: Fix typo picked up by Debian's QA. This was allegedly fixed 5 years ago (see #3493). 2016-03-17 17:22 -0700 Richard Russon (1fb2a924a7c0) * Makefile.am: Use '$(PACKAGE).pot' instead of 'mutt.pot' in Makefile.am 2016-03-17 17:12 -0700 Richard Russon (80926cec6d41) * hcache.c, imap/auth_gss.c: Fix three build warnings when DEBUG isn't defined. 2016-03-16 14:15 -0700 Kevin McCarthy (cc1af19c0763) * hcache.c: Fix tcbdb error reporting to use ecode, not errno. After committing aff8d62ebddb and taking a closer look at the tcbdb documentation, I realized those functions don't set errno. Change the error handling messages to instead get the ecode and message using tcbdbecode() and tcbdberrmsg(). 2016-03-16 13:33 -0700 Kevin McCarthy (aff8d62ebddb) * hcache.c: Fix crash in hcache_open_tc() when open fails and debug is on. (closes #3813) When the hcache open fails, it was trying to dprint. The dprint had a %s where it was passing errno, leading to a crash in strlen. Unify the dprint messages for tcdbopen and tcdbclose to report the path, strerror, and errno. Thanks to Will Yardley for capturing the stack trace! 2016-03-15 18:04 -0700 Kevin McCarthy (29b254ac7c12) * mbox.c: Prevent ctx->fp from being closed twice in the event of an error. The previous patch from Vincent exposed a crash if ftruncate() fails in mbox_sync_mailbox(). Change fclose() to safe_fclose(), to avoid it being called twice. 2016-03-15 18:01 -0700 Vincent Lefevre (2a152212cd9a) * mbox.c: Check return value of ftruncate() in mbox_sync_mailbox(). Generate an error in the event that ftruncate() fails. 2016-03-13 19:04 -0700 Kevin McCarthy (73c8c033e184) * init.h: Update the $hostname documentation. Change to reflect the updates in changeset ce71d168c819. 2016-03-13 18:18 -0700 Kevin McCarthy (ad14066bf6c1) * UPDATING: Update the UPDATING file for 1.6.0 2016-03-13 11:19 -0700 Kevin McCarthy (90d0935c3142) * rfc2231.c: Fix RFC2231 continuation join order. (closes #3811) (closes #3741) The function generating a list of parts to join had incorrect sorting logic. It was comparing values, not attributes. Additionally, the order logic wasn't correct. Thanks to TAKAHASHI Tamotsu for pointing out the value vs attribute comparison bug. 2016-03-11 13:47 +0100 Vincent Lefevre (bd0e695f627e) * po/fr.po: Updated French translation. 2016-03-10 15:52 -0800 Kevin McCarthy (b5f170446e14) * doc/manual.xml.head: Improve the mailto_allow documentation. Add to the commands list. Document unmailto_allow. Mention the new behavior in the Security Considerations section about mailto: links. 2016-03-10 14:59 -0800 Michael Elkins (ad94dd58966b) * doc/manual.xml.head, doc/muttrc.man.head, globals.h, init.c, init.h, url.c: Restrict mailto header fields using mailto_allow. By default, only the body and subject fields are allowed. These can be changed with the mailto_allow and unmailto_allow commands. 2016-03-10 14:20 -0800 Kevin McCarthy (b46ee6523400) * configure.ac: Check stat return value in configure.ac. (closes #3810) 2016-03-08 15:57 -0800 Kevin McCarthy (d07d2e9f1e34) * init.h, main.c, mutt.h: Add $resume_edited_draft_files option. This adds an extra header when saving edited draft files (-E -H on the command line). With this header, the next time they are edited, they are automatically "resumed" (by setting $resume_draft_files). The idea is to prevent multiple user-defined headers and signatures from being added to the draft message by avoiding processing it as a brand new message after the first time. 2016-03-08 15:57 -0800 Kevin McCarthy (24b4f14e9538) * init.h, mutt.h, send.c: Add $resume_draft_files option. When set, draft files are processed the same as when resuming postponed messages. One use of this option is to avoid multiple user-defined headers and signatures being added to the message. (e.g. when -E is used repeatedly on the draft files). 2016-03-08 13:12 -0800 Derek Martin (ce71d168c819) * getdomain.c, init.c: Improve method of determining FQDN. (closes #3298) Rather than reading /etc/resolv.conf, use gethostname() and getaddrinfo() to get the canonical domain. Thanks to Vincent Lefèvre for the memory leak fix. 2016-03-02 15:08 -0800 Kevin McCarthy (8e77637a1a69) * init.h: Document that GPGME doesn't support creating inline PGP messages. 2016-03-02 15:08 -0800 Kevin McCarthy (6034900d1636) * crypt-gpgme.c: Add hard redraw for the gpgme application/pgp handler. Will Yardley reported display artifacts and keyboard issues after decrypting a traditional pgp message using gpgme. It turns out the gpgpme code path was missing a hard_redraw() to repaint the screen after pinentry. 2016-02-28 19:42 -0800 Kevin McCarthy (d11b6776532f) * main.c, mutt.h, send.c: Draft file tweeks: rename flag, don't auto- abort on no change. Rename the flag to SENDDRAFTFILE since it will be used in contexts other than the body allocation. Don't automatically abort if the message was unchanged; it seems possible the draft files could be used as the entire message reply. 2016-02-15 19:44 -0800 Kevin McCarthy (909cf6dd067c) * contrib/gpg.rc, crypt-gpgme.c, globals.h, init.h, pgp.c: Add $pgp_decryption_okay to verify multipart/encrypted are actually encrypted. (closes #3770) In pgp classic mode, if the $pgp_decrypt_command generated output, it assumed the content was encrypted. However, gpg will generate output even if the block is simply signed and armored text. The problem is that mutt was then printing mime headers labelling the output as encrypted text in the ui. Add a new option, and suggested value of: set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY" If set, the output from the decrypt command will be scanned for this regexp to confirm an actual decryption occurred. Note that gpgme already correctly rejects this form of spoofed message. 2016-02-11 15:12 -0800 Kevin McCarthy (b55c6a64a07b) * crypt-gpgme.c: Update the status message after decryption using gpgpme. Change gpgme to behave the same as classic pgp mode: after a decryption, update the status message to overwrite the initial "Invoking PGP..." message. 2016-02-11 02:15 +0100 Vincent Lefevre (3b59ef2bf032) * po/fr.po: Updated French translation. 2016-02-07 10:15 -0800 Kevin McCarthy (87c46e1f6f8c) * postpone.c: Fix pgp and smime decryption in mutt_prepare_template(). Change the "combined" multipart decryption block to only work for pgp, since mutt_is_multipart_encrypted() currently only checks for pgp headers and it therefore only worked for pgp in the first place. Fix the newhdr->security to be based on what that function returns, instead of the "context" hdr passed in. Add a smime decryption block below when iterating through the content. Fix the application/pgp decryption block to assign to hdr->security using the type of the app/pgp part instead of hdr->content. 2016-02-07 10:15 -0800 Kevin McCarthy (a4d885bb36ab) * compose.c, doc/manual.xml.head, doc/mutt.man, main.c, mutt.h, protos.h, send.c: Add new flag -E to modify draft/include file. (closes #3799) Specifying -E with -i will cause mutt to directly edit the include file. Specifying -E with -H will cause the draft file to be regenerated from the latest version of the email on exit. Improve -H so that it will read (and write) multipart messages. 2016-01-26 13:46 -0800 Kevin McCarthy (e8f7a08cb7ac) * doc/manual.xml.head: Mention under the key bindings documentation. 2016-01-23 12:30 -0800 Kevin McCarthy (df42596d08fe) * lib.h: Increase HUGE_STRING size to 8192. (see #3804) The interface for editing a large number of recipients is poor and perhaps shouldn't be using a fixed buffer size. Until a redesign can be thought about, this will help. 2016-01-19 14:05 -0800 Kevin McCarthy (b315c4d4ede7) * imap/auth_sasl.c, pop_auth.c, smtp.c: Make sasl authentication buffers dynamically sized. (see #3804) The reporter found that the current buffer of HUGE_STRING was insufficient in his case to encode the clientout response back to the server in imap_auth_sasl(). Since sasl gives us the size of "clientout", we can dynamically malloc and resize the buffer as needed. This patch uses max(LONG_STRING, (clientoutlen*2)). This is sufficient to hold the base64 encoded value plus additional prefix/suffix needed in each protocol. The size is rechecked after each sasl_client_step() and resized as needed. Similar code is in pop_auth_sasl() and smtp_auth_sasl(), so convert all three to use a dynamic buffer. 2016-01-05 18:08 -0800 Kevin McCarthy (7c0bd34546f4) * smime.c: Allow tab as a delimiter in smime .index files. (closes #3802) The old parsing code used fscanf, and so happened to allow a tab as a delimiter. Even though smime_keys.pl uses a space, some users maintain their own .index files by hand (using tab delimiters), so continue to allow that delimiter. Thanks to Andre for the bug report and patch. 2016-01-04 16:28 -0800 Kevin McCarthy (cf4c1c21e58d) * compose.c: Add a couple missing ATTACHPTR->tree frees. While working on ticket 3800, I noticed the tree wasn't being freed inside OP_COMPOSE_EDIT_HEADERS. Add a free there, and in the cleanup at the end of mutt_compose_menu(). A few other sections in mutt_compose_menu() are performing a free- on-error where the tree isn't allocated yet, so skip it for those. I believe this is actually not fixing a memory leak: all attachments are always at level 0 in the compose menu (as far as I know); so nothing is ever allocated in the tree pointer. However since other parts of the code in compose.c clean this up, it make sense to add them here too. 2016-01-04 13:57 -0800 S. Gilles (960017a249f7) * color.c: Prefer bright versions (8-15) of colors for brightXXX backgrounds. When a bright color is specified as a background, try to use the bright version of that color, falling back to the A_BLINK method only on terms which do not support enough colors. 2016-01-01 12:24 -0800 Kevin McCarthy (d3f31cf9239e) * parse.c: Use strrchr to search for Received date separator. (closes #3798) Sample email provided by the submitter showed a Received header with a ";" at the end of each line, instead of a single ";" in front of the date. The emails are obviously not RFC compliant, but the fix is simple enough: find the last ";" using strrchr instead of the first. 2016-01-01 12:16 -0800 Kevin McCarthy (cec45c0a405e) * doc/manual.xml.head: Update manual copyright too. 2016-01-01 12:07 -0800 Kevin McCarthy (b74ce90c7ba1) * account.c, account.h, ascii.h, bcache.c, bcache.h, commands.c, crypt-gpgme.c, crypt.c, cryptglue.c, curs_lib.c, curs_main.c, enter.c, globals.h, imap/auth.c, imap/auth.h, imap/auth_sasl.c, imap/browse.c, imap/command.c, imap/imap.c, imap/imap.h, imap/imap_private.h, imap/message.c, imap/message.h, imap/util.c, init.h, keymap.c, lib.c, mutt_idna.c, mutt_sasl.c, mutt_sasl.h, pager.c, parse.c, pattern.c, pgp.c, pgp.h, pgpkey.c, pgplib.h, pgppacket.c, pop.c, postpone.c, rfc3676.c, rfc822.c, send.c, smime.c, smime.h, smime_keys.pl, smtp.c, url.c: Convert copyright years to all use 4 digit years. Vincent Lefèvre pointed out the common shortcut, e.g 1996-9, is actually not allowed for copyright years. Convert all the copyright years (for mutt files) to use 4 digits. 2016-01-01 12:07 -0800 Kevin McCarthy (fdd3fdd6f708) * COPYRIGHT, account.h, attach.c, bcache.c, browser.c, buffy.c, buffy.h, color.c, compose.c, copy.c, crypt-gpgme.c, curs_lib.c, curs_main.c, enter.c, from.c, handler.c, headers.c, imap/auth_login.c, imap/command.c, imap/imap.c, imap/imap_private.h, imap/util.c, init.c, init.h, keymap.c, keymap.h, lib.c, lib.h, main.c, mbox.c, mh.c, mime.h, mutt.h, mutt_curses.h, mutt_idna.c, mutt_sasl.c, muttlib.c, mx.c, mx.h, pager.c, parse.c, pattern.c, pgp.c, pop.c, postpone.c, protos.h, query.c, recvattach.c, rfc1524.c, rfc2047.c, rfc822.c, send.c, sendlib.c, signal.c, smime_keys.pl, system.c: Update copyright notices. This patch only updates existing copyright notices in the source files, using commit dates since the last copyright update in commits e3af935cdb1a and f8fd60d8d3f2. Add a notice to the COPYRIGHT file to refer to our mercurial repository for the full commit history. Add myself to the COPYRIGHT file and smime_keys.pl file. 2016-01-01 09:52 -0800 Kevin McCarthy (c6471322c68f) * compose.c: merge stable 2016-01-01 09:48 -0800 Kevin McCarthy (f99561e22a99) * compose.c: Fix segfault when deleting and reusing attachment slots. (closes #3800) When attachments are deleted, delete_attachment() slides the entries down in the idx array, but forgets to NULL out the last vacated slot. If more attachments are added later on via OP_COMPOSE_EDIT_HEADERS and the Attach: pseudo-header, mutt_gen_attach_list() will attempt to re-use the ATTACHPTR in that last slot because it wasn't set to NULL. This will be pointing to freed memory and likely segfault (at best). 2015-12-17 12:25 -0800 Kevin McCarthy (9480a363a68a) * init.h: Add missing "yes" to $recall option documentation. Also add a blurb about the function. 2015-12-17 07:37 -0800 Kevin McCarthy (52df4013b0b7) * doc/manual.xml.head: Reword new f=f documentation. Reword a couple parts, as Oswald Buddenhagen suggested the original wording was somewhat confusing. 2015-12-15 15:29 -0800 Kevin McCarthy (e52d3e9c83d8) * doc/manual.xml.head, init.h, mutt.h, rfc3676.c: Add $reflow_space_quotes option. (closes #3309) When viewing and replying to a flowed email, add spacing between the quotes to improve readability and interoperability with non-flowed replies. Add a section to the documentation discussing support for viewing and non-flowed replies to flowed emails. 2015-12-08 09:12 -0800 Kevin McCarthy (02bc14ed1569) * merge stable 2015-12-08 09:11 -0800 Kevin McCarthy (f542783e257d) * mh.c: Fix hash table key "use after free" in mh_check_mailbox(). (closes #3797) The fnames hash uses the maildir->header->path as the key. As matches are found, the headers are freed. This inadvertantly also freed the key to the hashtable entry; the next hash_find() going to the same bucket might end up comparing keys with a freed string. This patch stores the path in the struct maildir canon_fname field (just as maildir_check_mailbox() does) and uses that as the hash key instead. This field isn't used outside of maildir_check_mailbox(), and is automatically freed for us in the maildir_move_to_context() call at the bottom of both functions. Note there are other ways to fix this problem: - Add a new mode to the hash table, causing it to strdup the keys and free them itself. - Delete the entries in the fnames hash, rather leaving them there. The first seems the cleanest, but would end up touching much more code. The second is also clean, but might have a negative performance impact. Additionally, peeking back in history to changeset 1d45a50b6f9b, it looks like the canon_fname used to be used by mh too, so perhaps removing the strdup may have been a mistake during refactoring at some point. 2015-12-07 12:22 +0100 Vincent Lefevre (72fbf15cd9a1) * po/fr.po: Updated French translation. 2015-12-03 15:23 -0800 Kevin McCarthy (bce2a0e71bf6) * crypt.c: Provide a better prompt and error for inline PGP with attachments. (closes #3738) Change mutt_protect() to check for text/plain before trying to invoke crypt_pgp_traditional_encryptsign(). This way, mutt can provide a bit more specific prompt and error message. Since pgp_mime_auto says it will prompt in the event of any failure, keep the more generic prompt after the encryptsign call too. 2015-12-01 18:20 -0800 Kevin McCarthy (5e5aff1782dc) * crypt.c: Loosen mutt_signed_handler() protocol value consistency check. (closes #3639) Apparently, for S/MIME, some MUAs mismatch the protocol value of the multipart/signed and the content-type of the signature: putting "pkcs7-signature" in one and "x-pkcs7-signature" in the other. Change mutt_signed_handler() to independently verify the values of the protocol and the content-type. This still checks for correct values but doesn't ensure they match between the two (for S/MIME). 2015-11-30 15:52 -0800 Kevin McCarthy (428a92464d5b) * contrib/smime.rc, globals.h, init.h, smime.c: smime: allow signing message digest algorithm to be specified. Currently, Mutt hardcodes micalg=sha1 for signed messages. Unfortunately, the actual message digest algorithm used defaults to the value in the "Signature Algorithm" field in the signing key's certificate. Add a new configuration option $smime_sign_digest_alg, defaulting to sha256. Add a new printf format string, %d, to be used in the signing command to specify the digest algorithm. Modify the sample $smime_sign_command to include "-md %d". Note: This solution requires using the modified $smime_sign_command, or else the micalg parameter again may not match the algorithm used. An alternative solution would be to query the certificate "Signature Algorithm" field and try to change the micalg to match it, but this method is easier to implement and provides better control for the user to configure, in any case. 2015-11-26 11:01 -0800 Kevin McCarthy (ff560d1f3f7a) * smtp.c: Clean up address_uses_unicode() (closes #3794) Pull the null check out of the loop. Use a bit comparison to detect if the high bit is set: this avoids a warning for platforms where char is implicitly signed (where comparing < 128 is always true). 2015-11-24 21:45 -0800 Kevin McCarthy (94186a96ca17) * mutt_idna.c: Fix bad idn error on local mailboxes. (closes #3795) Commit 831abf39d53a pulled the mbox_to_udomain() call inside the conversion functions. Unfortunately, this causes local (user only) mailboxes to be considered conversion errors instead of just skipping them. Revert mbox_to_udomain() back to using a static buffer and pull back into the mutt_addrlist_to_local/intl() functions. Pass the user and domain into the conversion functions instead of the address. 2015-11-24 15:49 -0800 Kevin McCarthy (0d7ce56bbafd) * mutt_idna.c: Add user reversibility check in intl_to_local. This ensures we don't lose information by converting to the local charset. 2015-11-24 15:49 -0800 Kevin McCarthy (935c779db0ea) * smtp.c: Implement SMTPUTF8 capability support in smtp.c This is patch 4 of 4 implementing support for SMTPUTF8 (RFC 6531). RFC6532 support already worked: rfc822*.c already parsed messages in exactly the way RFC6532 wants. Thanks for Arnt Gulbrandsen for the original patch. 2015-11-24 15:49 -0800 Kevin McCarthy (151ff413e21a) * init.h, mutt.h, mutt_idna.c: Add option 'idn_encode'; rename option 'use_idn' to 'idn_decode'. This is patch 3 of 4 implementing support for SMTPUTF8 (RFC 6531). Add an option to control whether international domains are encoded with IDN or not. This defaults to set, for backward compatibility. Rename the use_idn option to idn_decode, since that more properly reflects its purpose. 2015-11-24 15:49 -0800 Kevin McCarthy (831abf39d53a) * mutt_idna.c: Rewrite address local-to-intl conversion functions. This is patch 2 of 4 implementing support for SMTPUTF8 (RFC 6531). Perform charset conversion from local to UTF-8 for both the user and domain parts of the address. If IDN is enabled and the options (added in the next patch) are turned on, encode/decode the domain part. Use the intl_checked and is_intl status bits to record the intl/local status of the ADDRESS mailbox part. 2015-11-24 15:49 -0800 Kevin McCarthy (814ece9689cc) * Makefile.am, alias.c, commands.c, compose.c, configure.ac, edit.c, init.c, main.c, mutt_idna.c, mutt_idna.h, query.c, recvcmd.c, rfc822.c, rfc822.h, send.c, sendlib.c: Rename idna functions and bits for smtputf8 changes. This is patch 1 of 4 implementing support for SMTPUTF8 (RFC 6531). Change mutt_idna.c to be always compiled. Remove the stub functions in mutt_idna.h. Instead, put #ifdefs around the idna function calls. The conversion functions will be fixed up in the next patch. Rename the conversion functions to mutt_addrlist_to_intl() and mutt_env_to_intl(). Rename the ADDRESS idna status bits to "intl" status bits. 2015-11-21 15:28 -0800 Kevin McCarthy (e635ce43b001) * imap/browse.c: Remove redundant mbox delimiter check in imap_browse(). (closes #3646) imap_fix_path() removes duplicate and trailing delimiters, so the check below it was redundant. This also made it appear list.delim could be used uninitialized. Remove the check, but add a check to make sure the "fixed" path has len>0, to prevent oob accesses of mbox[n-1] below. Lastly, remove a redundant n=strlen(mbox) inside the initial LIST processing loop. The mbox isn't changed from above, so there is no need to rerun strlen. 2015-11-18 16:14 -0800 Kevin McCarthy (444f1f013f1b) * enter.c: Fix memcpy buf=NULL/len=0 issue in replace_part(). (closes #3790) Calling memcpy with src or dest=NULL is technically illegal, even if len=0. Recent compilers seem to now be generating warnings/errors with this. replace_part() is currently the only place we are getting bug reports, so for now just fix the problem in this one place. 2015-11-09 18:53 -0800 Kevin McCarthy (c799162691b2) * pattern.c: Improve error messages for eat_date() and eat_regexp(). After calling mutt_extract_token(), s->dptr will typically be at the end of the string if an error occurred. Save a pointer to the beginning of the expression, so it can be properly displayed in the error message. Convert eat_date() and eat_regexp() to use the same iconv strings for the error message. 2015-11-09 15:40 -0800 Kevin McCarthy (1c151d8800de) * curs_lib.c, lib.h, pattern.c, rfc2047.c, rfc822.c: Fix possible unintentional '\0' strchr matches. After fixing the ticket 3787 strchr issue, this patch cleans up other potentially incorrect uses of strchr for the '\0' case. In mutt_multi_choice(), mutt_getch() can technically return 0. Although it seems the user would have to try quite hard to do this, it's incorrect to return that index into letters. Change "ch.ch==0" to be considered the same as an abort. is_email_wsp() is used in a couple places where it wasn't obvious whether '\0' was being accounted for, so add an explicit check to the function. Inside eat_date(), if mutt_extract_token() had no input and returned "", the strchr ("<>=", buffer.data[0]) below would return a pointer. In actuality, this is prevented by an empty parameter check inside mutt_pattern_comp(), but it doesn't hurt to make it the same as eat_regexp() and have the check explicitly done here too. rfc2047_encode() was another borderline case for adding a check. The convert_string() sets a length, so it seems highly unlikely that *t could be 0, but doesn't hurt to add the check. The find_encoded_word() fix looks necessary. If the passed in s was something like "=?charset?" (followed by EOS, '\0'), the strchr("BbQq", q[1]) would in fact return a pointer and the following q[2] would read past the end of string. If q[2] happened to be '?', it might even continue reading in the for loop below. Lastly, in parse_mailboxdomain(), the potential overread was already fixed in changeset:a6919571eb59, but although the nonspecial and special strchr() line happens to "work" for the case of '\0', it's pretty fragile to leave as is. It's better to be explicit and just return if we hit EOS without calling next_token(). 2015-10-20 17:59 +0200 Vincent Lefevre (17991330c086) * po/fr.po: Updated French translation. 2015-10-18 20:05 +0800 Kevin McCarthy (41af5a753d6f) * merge stable 2015-10-18 19:45 +0800 Kevin McCarthy (a6919571eb59) * rfc822.c: Fix next_token() oob read. (closes #3787) With specially crafted input to 'mutt -H', the line "Return-Path:<() " is read and passed to mutt_parse_rfc822_line(). "<() " is then passed through to rfc822_parse_adrlist(). Eventually, inside next_token(), is_special(*s) is called when s points to the end of the string ('\0'). This macro calls strchr, which will actually match and return a pointer to the trailing '\0' in RFC822Specials! This causes "s + 1" to be returned, skipping past the end of string inside parse_mailboxdomain(). This patch adds a check to make sure *s is non-null before calling is_special(*s). 2015-10-17 11:15 +0800 Kevin McCarthy (19c3406fbad9) * compose.c: Fix error message for attach-message. (closes #3785) Currently if mx_open_mailbox() fails when trying to attach a message, mutt_perror() is called. Change this to call mutt_error() instead, since errno isn't set for all failure cases. 2015-10-08 13:17 +0200 Vincent Lefevre (7aa4e6fc6884) * po/fr.po: Updated French translation. 2015-10-04 10:08 +0800 Kevin McCarthy (a07e8215a0ef) * browser.c, commands.c, curs_lib.c, curs_main.c, keymap.c, menu.c, mutt.h, mutt_curses.h, mutt_ssl.c, mutt_ssl_gnutls.c: Create a separate macro/push/exec event buffer. (closes #3779) Currently, the SSL and TLS certficate prompts turn on OPTUNBUFFEREDINPUT, (to prevent macros and such from running right through the dialog). Unfortunately, the menu dialog processing in menu_dialog_dokey() is using mutt_ungetch() to forward non-dialog keys on to standard menu processing. With OPTUNBUFFEREDINPUT set, those keys never make it to the menu and are buffered until after the menu dialog. This patch creates a new event buffer, separate from the standard "unget" buffer, for use by macros, exec, and push events. These events can be temporarily ignored by setting OPTIGNOREMACROEVENTS (renamed from OPTUNBUFFEREDINPUT), while continuing to allow unget events to be processed. Since the "push" and "unget" functions now go to different buffers, function names were slightly renamed, to make it less easy to unintentionally use the wrong function at the wrong time. 2015-10-04 10:08 +0800 Kevin McCarthy (ac156dcc2c54) * menu.c, mutt_ssl.c, mutt_ssl_gnutls.c: Fix menu type in certificate prompt. (see #3779) The menu type is used in several places as a direct index into Keymaps[], so passing in -1 to mutt_new_menu() was leading to illegal memory accesses later on. Add a range check in mutt_new_menu(), defaulting to MENU_GENERIC, to prevent this problem in the future. 2015-10-01 15:38 +0800 Kevin McCarthy (9de2f1c6da87) * compose.c: Improve prompt when switching between PGP and S/MIME. (closes #3777) Only prompt when encrypt or sign is enabled. Also, improve oppenc to run and refresh the status when switching. 2015-09-30 11:25 +0800 Kevin McCarthy (909dfe9878ff) * smime.c: Fix chomp in smime_handle_cert_email. During a review of the previous patch, Oswald Buddenhagen noticed two of the fixed oob reads had another problem: they were "chomping" (the newline) without verifying there actually was a newline at the end of the string. 2015-09-30 11:25 +0800 Kevin McCarthy (d9142ca37afb) * smime.c: merge stable 2015-09-30 11:21 +0800 Kevin McCarthy (590ff6eebe1a) * parse.c, smime.c, smtp.c: Fix oob reads when fgets returns "\0". (closes #3776) The ticket reported an out of bounds read in mutt_read_rfc822_line() when a '\0' was embedded on its own line in the headers. The function assumed if fgets() didn't return NULL, then the string would have at least one character. I scanned the rest of the code and found three other places making the same assumption for fgets. Thanks to hanno for finding this with the "american fuzzy lop" tool. 2015-09-20 20:37 -0400 Derek Schrock (aec82c4dd826) * UPDATING, hdrline.c, init.h, send.c: Add new optional index_format expandos %r and %R. These generate a comma separated list of all the To and Cc recipients. Also, increase the attribution buffer size to accommodate these new expandos. 2015-09-21 10:28 +0800 bat guano (93c6ae1ef01b) * po/de.po: German translation fix. (closes #3701) 2015-09-20 19:05 +0800 TAKAHASHI Tamotsu (2fdec286cfb7) * po/ja.po: Updated Japanese translation. 2015-09-20 18:58 +0800 Kevin McCarthy (61c754a8effd) * pager.c: Translation improvements. Thanks to TAKAHASHI Tamotsu for pointing out these ones I missed. 2015-09-13 14:41 +0800 Kevin McCarthy (e85eda4ee425) * po/Makefile.in.in, po/bg.po, po/hu.po, po/ko.po, po/pt_BR.po, po/uk.po: Enable msgfmt translation check flag -c. Fix discovered translation format string errors. 2015-09-13 11:47 +0800 Kevin McCarthy (6eb6b41f5d45) * compose.c, crypt-gpgme.c, curs_main.c, edit.c, editmsg.c, imap/message.c, mutt_ssl.c, muttlib.c, pgp.c, send.c, smime.c: Add translation comments and improvements. These were suggested by TAKAHASHI Tamotsu. 2015-09-12 11:25 +0800 Kevin McCarthy (1a281a527cb7) * crypt-gpgme.c: Improve translation string in crypt-gpgme.c Combine into a single buffer to make the translation easier. Also, mark a couple todos for alignment problems. 2015-09-06 16:31 -0700 Kevin McCarthy (2dac9fa02842) * imap/browse.c: Fix double-decode during IMAP browse. cmd_parse_list() already calls imap_unmunge_mbox_name() on the mailbox names returned from the server. However, browse_add_list_result() was taking those mailbox names and passing them to imap_add_folder(), which was calling imap_unmunge_mbox_name() yet again. The reason is that imap_browse() was directly calling imap_add_folder() too, passing in a previously encoded "mbox" name. After looking carefully at the code, I could find no reason that mbox needed to be encoded outside of the LIST commands.. Therefore I changed imap_browse() to call imap_munge_mbox_name() on mbox for the two LIST commands generated from it instead, and removed the imap_unmunge_mbox_name() call inside imap_add_folder(). 2015-09-06 07:41 -0700 Kevin McCarthy (c6a6b7d3b83d) * merge stable 2015-09-06 07:40 -0700 Kevin McCarthy (40c47fcc9d17) * mx.c: Fix use after free of ctx->last_tag. (closes #3775) When using imap to access gmail, tagging and saving messages to "all mail" and pressing can result in the call path: mx_check_mailbox() imap_check_mailbox() imap_cmd_finish() imap_expunge_mailbox() mx_update_tables() followed by: mx_sync_mailbox() The HEADER pointed to by ctx->last_tag will be removed and FREE'ed in mx_update_tables(), but will subsequently be accessed in mx_sync_mailbox(). This patch simply sets ctx->last_tag=NULL if it is freed inside mx_update_tables(). Thanks to Peter Lekensteyn for the bug report and ASAN report. 2015-09-05 19:55 -0700 Morten Bo Johansen (58cbc3235db6) * po/da.po: Updated Danish translation. 2014-07-17 16:05 +0200 Kevin McCarthy (bd2c2a6058a7) * imap/browse.c, imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c, imap/utf7.c, imap/util.c: Add support for utf-8 mailboxes in imap. This adds support for RFC6855 to imap/*.c. Thanks to Arnt Gulbrandsen for the original patch. 2015-09-02 18:14 -0700 Kevin McCarthy (5700b43f1e5b) * crypt-gpgme.c: merge stable 2015-09-02 18:11 -0700 Kevin McCarthy (f675e853af12) * crypt-gpgme.c: Add time_t conversion to fix gpgme segfault on OpenBSD. time_t isn't the same size as gpgme_subkey_t->timestamp on OpenBSD. Passing &subkey->timestamp to localtime was therefore passing an address to the wrong size int and was causing a segfault. Thanks to Hannes Wenzel for reporting the bug and providing a patch. 2015-09-02 15:02 -0700 Kevin McCarthy (8bbcfa2af7b6) * crypt-gpgme.c, pgp.c, smime.c: Add L10N messages for the pgp/smime send menus. This documents the 'f' "forget it" choice for translators. Thanks to Benno Schulenberg for pointing this out and for the original patch. 2015-09-02 14:43 -0700 Kevin McCarthy (f7859d96006c) * alias.c, curs_main.c, doc/devel-notes.txt, po/Makefile.in.in: Flag translator comments using L10N. Add comment to devel-notes.txt documentation. 2015-08-31 09:32 -0700 Kevin McCarthy (62730ecbc17d) * mkinstalldirs: merge default into stable 2015-08-30 10:27 -0700 Kevin McCarthy (2f0d516fc638) * .hgsigs: mutt-1.5.24 signed 2015-08-30 10:26 -0700 Kevin McCarthy (a494c8f932fa) * .hgtags: Added tag mutt-1-5-24-rel for changeset 08e81162482f 2015-08-30 10:26 -0700 Kevin McCarthy (08e81162482f) * ChangeLog, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.5.24 2015-08-30 10:21 -0700 Benno Schulenberg (d9b1c4b6662f) * po/eo.po: Partially updated Esperanto translation. 2015-08-30 10:18 -0700 Benno Schulenberg (b9864644b6a2) * commands.c: Minor translation fixes. This makes two equivalent translation messages the exact same so they only need to be translated once. It also adds a missing translation marker (for the same string). This same string is used in recvcmd.c so does not generate a new translation string. 2015-08-30 10:08 -0700 Kevin McCarthy (934fbd272ce6) * UPDATING: Set release date. Minor fixes to release notes. 2015-08-29 12:51 -0700 Ivan Vilata i Balaguer (faa85ed8a7c9) * po/ca.po: Updated Catalan translation. 2015-08-29 12:40 -0700 Benno Schulenberg (14a2ad40e954) * po/nl.po: Updated Dutch translation. 2015-08-29 07:40 -0700 Benno Schulenberg (0d346dc8dccb) * smime.c: Minor translation fix. This makes two equivalent translation messages the exact same so they only need to be translated once. 2015-08-28 07:35 -0700 TAKAHASHI Tamotsu (e33ba8f72a40) * po/ja.po: Updated Japanese translation. 2015-08-20 11:18 -0700 Vsevolod Volkov (b3c095648df6) * po/ru.po: Updated Russian translation. 2015-08-19 09:41 -0700 Petr Pisar (83760f05bb46) * po/cs.po: Updated Czech translation 2015-08-17 14:51 -0700 Kevin McCarthy (c0180991c352) * configure.ac: Add idn to MUTTLIBS instead of LIBS (see #3638) Currently, -lidn is included while linking all the mutt binaries. Add it to MUTTLIBS instead so it's only used for the mutt linking. Also, add $LIBICONV to $LIBS before checking for some of the idna functions. On some sytems, there are apparently issues when using static linking. (Thanks to grarpamp for reporting). 2015-08-17 12:31 -0700 Kevin McCarthy (356443232291) * muttlib.c, protos.h: Change mutt_adv_mktemp to call mutt_mktemp instead of mktemp. (see #3638). mutt_mktemp is currently called in 95% of the cases in mutt, and is already our "own rolled" version of mktemp. The "insecure mktemp warning" discussion keeps coming up, so instead add prefix and suffix functionality to mutt_mktemp() and call that. All other uses of Tempdir in the mutt source did not call mutt_expand_path() first, so remove that from mutt_adv_mktemp(). 2015-08-17 12:26 -0700 Kevin McCarthy (8b2fe6a4db79) * configure.ac: Enable C99 mode for compiler. (See #3638). This is already the default for clang (FreeBSD) so shouldn't cause any issues. Enabling this will increase the allowed static string length and remove the Copyright length warning. 2015-08-11 11:20 -0700 Kevin McCarthy (55ea6e829b46) * Makefile.am: Compile txt2c using automake rules. The compilation rule used $< which isn't portable for ordinary make rules. 2015-08-11 11:20 -0700 David Champion (eb4aaf4581ac) * txt2c.sh: Fix txt2c.sh sed invocations to use posix syntax. 2015-08-07 03:38 +0200 Vincent Lefevre (711708700602) * po/fr.po: Updated French translation. 2015-07-29 09:26 -0700 Kevin McCarthy (34ca1c5fdd45) * doc/manual.xml.head: Minor documentation fix. In one place, the documentation mentioned 'alternative-order' instead of 'alternative_order'. 2015-07-29 09:07 -0700 Kevin McCarthy (75e398daa94c) * doc/manual.xml.head, hook.c: Add error handling for ^ and other empty mailbox shortcuts. (closes #2402) (closes #3735) Explicitly mention the ^ example in the documentation added in 6d733cab6b45. Add an error message for ^ when CurrentFolder is not set. Add checks for other mailbox shortcuts that expand to the empty string. This could happen if the @alias shortcut was accidentally used, or the value referenced by a shortcut isn't set yet. 2015-07-27 14:09 -0700 Kevin McCarthy (6d733cab6b45) * doc/manual.xml.head: Add "Mailbox Matching in Hooks" section to manual. Folder-hook and mbox-hook perform mailbox shortcut expansion on the regexp parameter. Add a section to the manual to give examples and make the behavior clearer. 2015-07-26 14:48 -0700 Kevin McCarthy (21a08f9abc80) * crypt-gpgme.c, crypt.c, handler.c, mutt_crypt.h, pgp.c, recvattach.c: Handle malformed ms-exchange pgp-encrypted block. (closes #3742) In certain circumstances, Exchange corrupts a multipart/encrypted block into: [BASE64-encoded] [BASE64-encoded] This patch pulls the full detection of valid/invalid multiparts into mutt_body_handler(). It extracts a run_decode_and_handler() function, which is reused by new intermediate handlers to decode the application/octet-stream part before passing it directly to crypt_pgp_encrypted_handler. These intermediate handlers then check and set any GOODSIG flags back into the parent part. This change may result in less error messages for invalid multipart/encrypted parts. Instead, mutt will default to the multipart_handler if it isn't fully "correct". Viewing attachments uses crypt_pgp_decrypt_mime() which bypasses the handler mechanism. Add decoding to the decrypt_mime() functions for pgp and gpgme. Thanks to Vincent Brillault for his analysis and initial patch. 2015-07-18 18:40 +0200 Martin Sandsmark (e40e3e0391ea) * UPDATING, buffy.c, init.h, mutt.h: Add support for checking cur/ in Maildir for unread mails in buffy. Also skip messages with the S flag when checking for unread mails. 2015-07-24 13:36 -0700 Kevin McCarthy (fdafc56a854f) * doc/Makefile.am: Set AUTOMAKE_OPTIONS in doc/Makefile.am. (closes #3766) Add the "foreign" option to silence warnings generated by flymake.am. 2015-07-24 13:15 -0700 Kevin McCarthy (cbae8642cb3d) * UPDATING: Update the UPDATING file with changes since 1.5.23. 2015-07-23 14:57 -0700 Kevin McCarthy (8c16206f50a1) * hcache.c, help.c, imap/util.c, protos.h, sendlib.c: Fix compiler type warnings. (closes #3765) The output of mutt_local_tz() was being passed to abs(). Technically the return type is time_t, but it represents a small value: the timezone offset in seconds. Add a safe explicit cast to int. Change the txt parameter of mutt_make_help() to type const char *. Typically all calls run the txt parameter through _(), which accepts const char * and returns a char *. However, if NLS is not enabled, _() is a noop, simply returning the parameter itself. In mutt_compile_help(), items[i].name is const char *, so it will generate a warning when passed as the txt parameter of mutt_make_help(). On some systems, e.g. OS X, snprintf is defined as a macro. One call in hcache.c was embedding directives inside the snprintf call. This is apparently undefined behavior, so duplicate the call instead. 2015-07-22 19:23 -0700 Kevin McCarthy (c60fed102d79) * imap/message.c, keymap.c, pop_lib.c: Fix a few small compiler warnings. (See #3638) In certain configurations, unused variables and labels were causing warnings. Add a missing "#include " to pop_lib.c. 2015-07-21 12:41 -0700 Kevin McCarthy (704e0622cc67) * imap/imap.c: merge stable 2015-07-21 12:34 -0700 Kevin McCarthy (e5fe2f80e797) * imap/imap.c: Imap: Fix flag caching after sync. The flags cached in IMAP_HEADER_DATA were not updated to match the HEADER flags after a sync. This means if a flag were toggled and synced twice, the second sync was not sending the flag update. Thanks to Noah Misch for the patch. 2015-07-19 15:55 -0700 Kevin McCarthy (100835c4a8ac) * init.h: Add note about gpg fixed-list-mode. (closes #3763). Thanks to Gregor Zattler for the original patch. 2015-07-11 14:36 -0700 Kevin McCarthy (2ca89bed6448) * main.c: Fix batch mode lockup. (closes #3761) (closes #3760) The new TS capability check was also running when curses wasn't initialized. Move check inside the !OPTNOCURSES block. 2015-07-09 14:50 -0700 Kevin McCarthy (7e91a8855dc3) * Makefile.am, doc/Makefile.am, imap/Makefile.am: Use $(VAR) instead of @VAR@ in Makefile.am files. (closes #3664) The @VAR@ form is not overridable, such as the case for #3664 where the reporter wanted to override DOTLOCK_GROUP. It's doubtful targets need to be overriden, but it makes sense to be consistent in the usage of automake substituted variables unless there is a particular reason/bug to work around. 2015-07-05 13:38 -0700 Kevin McCarthy (79cd2f34961d) * crypt-gpgme.c: Remove 'hit enter' prompt for GPGME initialization errors. Older GPGMEs are missing CMS (S/MIME) support. Don't force the poor users to hit enter every time they start mutt. 2015-07-02 11:21 -0700 Kevin McCarthy (39422ec14f60) * .hgignore, mkinstalldirs: Remove the automake mkinstalldirs script. Add to .hgignore so it doesn't accidentally get added again. 2015-07-02 11:21 -0700 Kevin McCarthy (97ef326274e7) * Makefile.am, configure.ac, contrib/Makefile.am, doc/Makefile.am, intl/Makefile.in, m4/gettext.m4, po/Makefile.in.in: Convert from using mkinstalldirs to $(MKDIR_P). The automake mkinstalldirs script is now deprecated. "install-sh -d" can be used in place. Configure.ac already includes AC_PROG_INSTALL, which will ensure install-sh is bundled. Add AC_PROG_MKDIR_P, which will set $(MKDIR_P) to either a thread-safe "mkdir -p" or will fall back to using install-sh. 2015-07-02 11:18 -0700 Kevin McCarthy (67d945e38074) * build-release: Fix build-release to always update automake tools. (closes #3671) 1.5.22 and 1.5.23 include a version of "missing" older than the version of automake/aclocal used to generate configure. Fix the build-release script to always copy and force update of the automake tools. 2015-06-29 14:35 -0700 Kevin McCarthy (9802a6172edf) * doc/manual.xml.head: Add note to manual clarifying push/exec and folder-hook order. Folder-hooks are executed in the order declared. However, push/exec commands will simply prepend to the keyboard buffer. If there are multiple push/exec commands, each will prepend to the earlier one. The result is that they will end up being "run" in reverse order once keyboard buffer processing starts. 2015-06-26 12:23 -0700 Kevin McCarthy (3bbb1f569eb1) * imap/auth_sasl.c, imap/imap.c: Fix IMAP segfault due to NULL capstr. After a failed login, the connection is left open but capstr is freed. If a second login attempt is made, imap_auth_sasl was trying to strstr using the NULL capstr. Add a NONULL around the capstr parameter to strstr. Change imap_conn_find() to keep the capstr around until a successful authentication occurs. 2015-06-26 11:38 -0700 Kevin McCarthy (b4be5796a458) * crypt-gpgme.c, pgp.c, smime.c: Add comment about "(f)orget it" choice in pgp/smime send menus. 2015-06-26 12:28 +0200 Vincent Lefevre (b640b23e64a8) * po/fr.po: Updated French translation. 2015-06-07 13:59 -0700 Kevin McCarthy (17a4f92e4a95) * smime.c, smime.h: Rewrite S/MIME key searching. Add purpose checking. Model the smime.c searching off of classic pgp searching. Create smime_get_key_by_hash()/addr()/str() functions that use a single smime_get_candidates() function to search the index. Use the new smime_keys generated purpose flag in the index to filter by KEYFLAG_CANENCRYPT and KEYFLAG_CANSIGN. Old style indices fall back to all-inclusive behavior. 2015-06-07 13:59 -0700 Kevin McCarthy (106914bc9406) * smime_keys.pl: smime_keys: Add refresh command. Refresh verifies the trust of each certificate and adds the purpose flag if it is missing. It pushes those values to the private keys' index file too. 2015-06-07 13:59 -0700 Kevin McCarthy (aabd030b25cb) * smime_keys.pl: smime_keys: Add purpose flag to index. A subsequent patch will change smime.c to use the purpose to filter certs and keys that can't be used for signing or encryption. Issuer, trust, and purpose flags were also added to the keys index file, to keep parsing simpler in smime_keys as well as smime.c. The trust and purpose are derived from the cert. Issuer is set to '?' as this should never be needed for keys. 2015-05-25 10:59 -0700 Kevin McCarthy (0255b37be491) * smime_keys.pl: smime_keys: Handle certificate chains in add_cert. (closes #3339) (closes #3559) Find all chains in the certificate provided. For each chain create a separate leaf and intermediate certificate file. Because Mutt controls the label prompt, use a single label for all chains. Also, loosen up cert file parsing to allow attributes even if they aren't delimited by a "Bag Attributes" header. Thanks to David J. Weller-Fahy for his testing and feedback! 2015-05-18 13:27 -0700 Kevin McCarthy (577987ca2d02) * smime_keys.pl: smime_keys: Convert openssl execution to use open("-|",...). (see #3575) (see #2456) This does a fork/exec, bypassing the shell, and so handles spaces, quotes, and other shell-characters problems better than the simple fix in changeset:c66a6bd5d0d5 This also fixes the "verify with crl" bug in #2456: the grep is now done in perl. Thank you Vincent Lefevre for your review and feedback! 2015-05-18 03:25 +0200 Vincent Lefevre (82d43abf2a37) * po/fr.po: Updated French translation (related to PGP & S/MIME, with corrections). 2015-05-15 14:09 -0700 Kevin McCarthy (c66a6bd5d0d5) * smime_keys.pl: smime_keys: quote filenames. (closes #3575) (see #2456) Wrap the various filename parameters in single quotes in case there are spaces in the filename. 2015-05-15 10:47 -0700 Kevin McCarthy (babc30377614) * smime_keys.pl: Start cleaning up and fixing smime_keys.pl (closes #3324) (see #2456) * Convert to using File::Temp (#3324). This was also suggested at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775199 * Use File::Temp for add_p12 temp file. (#2456) * Make the query_label() method a bit more robust with empty strings, ctrl-d, and leading spaces. * Clean up openssl_do_verify() logic. Mark cert as invalid rather that die'ing if an openssl verify command fails. * General cleanup: - Clearly separate op handler, certificate management, and helper functions by section and using prefixes. - Create openssl helper functions to reduce copy/paste invocations and make the code clearer. - Make indentation consistent at 2 spaces. - Change handle_add_pem() to re-use handle_add_chain() once the correct files are identified. - Change openssl_parse_pem() to return a single array of data structures representing the parsed certs/keys. 2015-05-03 16:25 -0700 Kevin McCarthy (c46dfbdb5eff) * globals.h, init.h, mutt_ssl.c, mutt_ssl_gnutls.c: Provide SSL cipher selection option. (closes #3167) Creates a $ssl_ciphers option that allows direct selection of the ciphers for OpenSSL (via SSL_CTX_set_cipher_list) and GnuTLS (via gnutls_priority_set_direct). Thank you Sergio Gelato for the patch. 2015-04-25 19:00 -0700 Seth Forshee (755a18da99bc) * handler.c: Fix performance regression for ~b/~B searching. (closes #3743) In mutt_is_autoview(), changeset b58cdfacfb89 introduced a call to rfc1524_mailcap_lookup() before checking if the MIME type should be autoviewed based on the user's preferences. This caused a major performance regression for ~b/~B searching. Rearrange mutt_is_autoview() to check the user preferences first, then search for a mailcap entry only if the MIME type should be autoviewed. In order to preserve correct mime_lookup behavior, re-add a call to mutt_check_lookup_list() before scanning the AutoViewList. 2015-04-19 13:15 -0700 Kevin McCarthy (067a3ac42c3b) * crypt-gpgme.c, doc/manual.xml.head, init.h, mutt.h, pgp.c: Add $crypt_confirmhook option. (see #3727) Allow the confirmation prompt for crypt-hooks to be disabled. This is useful for multiple crypt-hook users (e.g. encrypted mailing lists), or just for people who are certain of their crypt-hooks and don't want to be prompted every time. Thanks to Dale Woolridge for the original patch. 2015-04-19 13:15 -0700 Kevin McCarthy (b4c57d3fd7e8) * crypt-gpgme.c, doc/manual.xml.head, doc/muttrc.man.head, hook.c, pgp.c, protos.h: Allow multiple crypt-hooks with the same regexp. (closes #3727). Changes the crypt-hook to accumulate a LIST of hooks with the same regexp, as opposed to replacing the hook data. This is useful for the case of encrypted mailing lists. Update pgp classic and gpgme to process a LIST of crypt-hook values instead of just one. This version of the patch creates a new _mutt_list_hook() function that (in theory) other hooks could use if they were changed to return a list. It also changes the behavior when a crypt-hook is declined: previously it would immediately use the original recipient for key selection. Now it will only do that if all crypt-hooks for a recipient are declined. This allows all, a subset, or none of the hooks to be used. Thanks to Rejo Zenger, Remco Rijnders, and Dale Woolridge for their work on various versions of this patch. 2015-04-15 19:25 -0700 Kevin McCarthy (1e26a962ab7a) * doc/manual.xml.head: Fix a few more incorrect documentation lines for hooks. Hopefully this finishes up aac979f8b529 and ca5aff2a4b6e. 2015-04-15 18:57 -0700 Kevin McCarthy (d12cb775b779) * crypt-gpgme.c, doc/manual.xml.head, init.h, pgp.c, pgp.h, pgpkey.c: Use fingerprints instead of keyIDs internally. (see #3695) Add a helper function, pgp_fpr_or_lkeyid(), that returns the fingerprint if available, otherwise falls back to the long key id. Convert Mutt to use that value for pgp command invocation. Change gpgme to use an equivalent crypt_fpr_or_lkeyid() function in a couple places too (for keylist generation and sign-as key selection). Update documentation to mention fingerprints and the --with- fingerprint option for gpg invocation. Change pgp_long_ids to default: yes, but add a note mentioning it's only used for the display of key IDs in a few places. 2015-03-12 14:48 -0700 Kevin McCarthy (bd21cff208c4) * recvattach.c: Allow attachments from unencrypted emails to be deleted. Print a warning if the message is signed or partly signed. Thanks to David Haguenauer for the original patch! 2015-04-06 18:39 -0700 Kevin McCarthy (ca5aff2a4b6e) * doc/muttrc.man.head: Clarify hook pattern vs regexp in muttrc.man page. Updates to the muttrc.man page were inadvertently not included in changeset:aac979f8b529. Fix mbox-hook and crypt-hook to show they accept a regexp, not a pattern. 2015-04-05 13:52 -0700 Kevin McCarthy (e3e6febd8240) * contrib/smime.rc: Fix smime.rc typos and spacing issues. (closes #3745) Thanks to David J. Weller-Fahy for that patch. 2015-03-30 15:45 -0700 Kevin McCarthy (1bd26d871d76) * crypt-gpgme.c: Fix const errors caused by find_keys() changes. Part 4 of the oppenc series changed the keyID type to const as part of some cleanup changes. At the time, that only propagated to crypt_getkeybystr(), but with the fingerprint changes, this is starting to propagate too far. Create a separate non-const variable to deal with the crypt hook value and revert crypt_getkeybystr()'s parameter to non-const. 2015-03-30 15:45 -0700 Kevin McCarthy (b8ead28d8e84) * compose.c, crypt-gpgme.c, pgp.c, smime.c: Add ui elements for oppenc mode. Add a status message to the Security line when oppenc is enabled. For each send menu, add the ability to toggle it on or off. When enabled, the menus won't show the (e)ncrypt or (b)oth options, and the (c)lear function only clears the SIGN bit when it is active. Change the gpgme_send_menu() to directly use the ENCRYPT and SIGN flags instead of the PGPENCRYPT/SIGN and SMIMEENCRYPT/SMIME flags. Using the latter sometimes resulted in the APPLICATION bit unset, which made oppenc unhappy. The send_menus previously used a switch statement using choice numbers. Since the menus now vary based on the oppenc option and message bit being set, these were all changed to convert the numbers back to a choice letter. 2015-03-30 15:45 -0700 Kevin McCarthy (2ec6a8d91de4) * crypt.c, mutt.h, mutt_crypt.h, postpone.c, send.c, sendlib.c: Add a security bit to the message for oppenc mode. This allows oppenc to be enabled/disabled on a message level. If something initially enables encryption, such as crypt_autoencrypt or crypt_replyencrypt, oppenc is turned off for the message. Change the postpone/resume code to persist the oppenc bit. Also change resend message to enable and invoke oppenc if the option is set. 2015-03-30 15:45 -0700 Kevin McCarthy (b38c4838976f) * compose.c, crypt.c, init.h, mutt.h, send.c: Add the crypt_opportunistic_encrypt option and calls. This patch creates the OPTCRYPTOPPORTUNISTICENCRYPT option and documentation. It also adds calls to crypt_opportunistic_encrypt() during initial message composition, after updating to, cc, or bcc, and after editing the message (if edit_headers is enabled). 2015-03-30 15:45 -0700 Kevin McCarthy (b10d0a945623) * crypt.c, mutt_crypt.h, send.c: Implement crypt_opportunistic_encrypt(). This function will be called to flip encryption on and off based on message recipients. 2015-03-30 15:45 -0700 Kevin McCarthy (db2abe57adb5) * crypt-gpgme.c, pgp.c, pgp.h, pgpkey.c, smime.c: Implement oppenc_mode in the find_keys methods. oppenc_mode is used by crypt_opportunistic_encrypt to determine whether there are valid keys for all recipients of a message, without prompting the user. The patch wraps around prompts, and makes getkeybyaddr methods return a valid address-matching key without prompting. The patch also fixes a small problem with gpgme's getkeybyaddr. When determining if there were multiple strong matches, it was comparing the crypt_key_t instead of its kobj member (gpgme_key_t). The patch also enables a call to crypt_is_numerical_keyid() in find_keys(), so that crypt-hooks can actually be checked without prompting when gpgme is enabled. (The addition was patterned off of the pgp_findKeys() function). 2015-03-30 15:45 -0700 Kevin McCarthy (80b963ff82d3) * crypt.c, mutt_crypt.h, pgp.c: Pull is_numerical_keyid() into crypt.c. A subsequent patch (re?)-introduces a call to is_numerical_keyid inside find_keys(). Rather than duplicate the function, this patch pulls it into crypt.c, where find_keys() and pgp_findKeys() can both call it. 2015-03-30 15:45 -0700 Kevin McCarthy (04eb395d80a7) * crypt-gpgme.c, crypt-gpgme.h, crypt-mod-pgp-classic.c, crypt-mod- pgp-gpgme.c, crypt-mod-smime-classic.c, crypt-mod-smime-gpgme.c, crypt-mod.h, crypt.c, cryptglue.c, mutt_crypt.h, pgp.c, pgp.h, smime.c, smime.h: Introduce an oppenc_mode parameter It's added to the parameter lists through the call stack down to the find_keys calls. No functionality is implemented yet. This patch is separated just to keep other patches more readable. 2015-03-30 15:45 -0700 Kevin McCarthy (5b443e7da81b) * crypt-gpgme.c, crypt-gpgme.h, crypt-mod-pgp-classic.c, crypt-mod- pgp-gpgme.c, crypt-mod-smime-classic.c, crypt-mod-smime-gpgme.c, crypt-mod.h, crypt.c, cryptglue.c, mutt_crypt.h, pgp.c, pgp.h, smime.c, smime.h: Refactor the address list generation out of the find_keys routines. All four find_keys routines have a similar set up code for generating a single address list out of the to, cc, bcc lists. This patch pulls all the code into crypt_get_keys. This is done to simplify the functions before later patches make them more complicated (with the oppenc_mode parameter). 2015-03-17 16:28 -0700 Kevin McCarthy (59bd9030e898) * doc/manual.xml.head: Document limitation of color index and server- side searches. (see #3723) 2015-03-17 16:28 -0700 Kevin McCarthy (ab101844dc07) * doc/manual.xml.head: Add entries for =B and =h in pattern modifier table. Since these operate differently for IMAP, it's worth adding explicit entries to the table for these two. 2015-03-17 16:28 -0700 Kevin McCarthy (aac979f8b529) * doc/manual.xml.head: Clarify hook documentation to specify regexp instead of pattern. Account-hook, crypt-hook, and mbox-hook accept a regexp parameter, not a pattern. 2015-03-04 19:24 -0800 Kevin McCarthy (09be71b645a7) * pgp.c: Fix pgp_application_pgp_handler to remove all tempfiles. If multiple PGP blocks are present in an email, Mutt only cleans up the tempfiles for the last block. Thanks to Dennis Preiser for the patch and sample mbox file demonstrating the problem. This patch also fixes the argument to mutt_perror for the pgpout tempfile. 2015-02-19 11:00 -0800 Kevin McCarthy (71f12fef8c6f) * sendlib.c: merge stable 2015-02-10 18:29 +0100 Peter Wu (70b85d8b232b) * sendlib.c: Fix buffer underread for empty header values. (closes #3736) When a header has no value (*p == '\0' so l == 0), do not read outside the buffer but print the newline anyway when a tag is already printed (col != 0). Caught by ASAN while opening a draft with no Subject. 2015-02-11 21:38 +0100 Eike Rathke (f5b1b75c5958) * crypt-gpgme.c, crypt.c, mutt_crypt.h, pgpkey.c: Allow fingerprint user input for key selection. (see #3695) Accept and check input of a fingerprint and find the matching key. Note that for both to work, match against and display of fingerprint, the pgp_list_pubring_command and pgp_list_secring_command need to contain the --with-fingerprint option, or have with-fingerprint in ~/.gnupg/gpg.conf. 2015-02-15 10:09 -0800 Kevin McCarthy (af5951f5d81c) * contrib/gpg.rc, gnupgparse.c: Add fingerprint record parsing for pgp list keys. (see #3695) Modify parse_pub_line to parse fpr records and add the fingerprint to the pgp_key_t's fingerprint field. Add "--with-fingerprint --with-fingerprint" to the pgp_list_pubring_command and pgp_list_secring_command commands in contrib/gpg.rc. The second invocation generates fpr records for subkeys too. 2015-02-15 10:08 -0800 Kevin McCarthy (47b4e57b2f1c) * pgplib.c, pgplib.h, pgppubring.c: Convert pgp_key_t fingerprint to a char* (see #3695) Currently only pgppubring.c is using the fingerprint field, and is using it to store a binary version of the fingerprint. Convert the field to store a null-terminated string. Modify pgppubring.c to use to use the new field. 2015-02-10 12:14 -0800 Kevin McCarthy (385d7434c9d6) * pgpkey.c: Protect addr with NONULL in pgp_getkeybyaddr. This was introduced by bb3b01f41ed2, but wasn't included in the NONULL checks added in 9a75aa4bd69e. 2015-02-08 14:19 -0800 Kevin McCarthy (addd7cea01d4) * crypt-gpgme.c: Cache uid validity in crypt_key_t. In order to find the validity for a crypt_key_t, the code has to loop through the key->kobj->uids list up to the correct index. This is a bit silly since the uid is available when the crypt_key_t is created in get_candidates(). This patch adds a validity field, and changes the various places to use that instead of looping. Also fix a bug in _crypt_compare_trust(): it was using the validity of the first uid instead of the corresponding uid's validity. 2015-02-08 13:44 -0800 Kevin McCarthy (7162033d1fb8) * crypt-gpgme.c: Fix pgp-gpgme to set revoke/expired/disabled flags. The code wasn't settings those flags in get_candidates(). This patch adds it to the pgp path. I don't know if these flags apply to SMIME so am leaving them out for the smime branch. Fix up crypt_select_key() to follow the same logic as pgp_select_key(). 2015-02-03 15:39 -0800 Kevin McCarthy (2fd1b9f17b80) * contrib/smime.rc, init.h: Change the smime_encrypt_with default to aes256. Openssl supports -aes256 at least since 2004, and it's a stronger algorithm than des3. Also: - Remove the incorrect documentation comment about defaulting to 3des if unset. - Change the default set in contrib/smime.rc. 2015-02-04 11:04 -0800 Kevin McCarthy (d2f5832a9e68) * send.c: Protect SmimeDefaultKey for postpone/resume. PgpSignAs is saved and restored in ci_send_message(), but SmimeDefaultKey was not. Also, fix a bug where an empty PgpSignAs was not restored back to empty if the postponed email contained a SignAs value. 2015-02-02 13:25 -0800 Kevin McCarthy (3f4dc0ce66ae) * postpone.c: Fix mutt_parse_crypt_hdr() sign_as behavior. Currently, if a message is postponed with only the E encryption flag, when it is resumed, pgp_sign_as will be overwritten (with an empty string). This intention of the behavior was probably to restore the exact state of pgp_sign_as upon resuming. However, if the message wasn't marked for signing, the state of pgp_sign_as is not known. This patch changes the mutt_parse_crypt_hdr() to only set an empty pgp_sign_as if there is an S flag (and if set_empty_signas is true). mutt_edit_headers() also uses the function, but it doesn't want to overwrite pgp_sign_as with just an S flag. The set_signas parameter is renamed to (a hopefully clearer) "set_empty_signas". 2015-01-31 20:05 -0800 Kevin McCarthy (1235dd48ef3f) * contrib/smime.rc, init.h: Update smime_encrypt_with documentation to list all algorithms. Thanks to Michael Schwipps for the patch! 2015-01-15 14:18 -0800 Kevin McCarthy (688d66ae6014) * imap/message.c, mailbox.h, mx.c, sendlib.c: Send the IMAP \Draft flag when postponing a message. This patch adds a mx_open_new_message() flag, M_SET_DRAFT. It also adds a MESSAGE->flags.draft flag. mutt_write_fcc() passes the M_SET_DRAFT flag to mx_open_new_message(), which then sets MESSAGE->flags.draft. Then, imap_append_message() is able to see this flag and so adds the \Draft flag. The imap_append_message() function started to have a bit too many flags, so this version of the patch separates out the flag generating code into a simpler version. 2015-01-31 11:53 -0800 Brendan Cully (200185ed86bc) * crypt-mod-pgp-gpgme.c: gpgme: typo in previous commit 2015-01-31 11:21 -0800 Brendan Cully (20e46d7bc453) * configure.ac, crypt-gpgme.c, crypt-mod-pgp-gpgme.c: gpgme: guard mail-key on presence of gpgme_op_export_keys This function is too new to be assumed present. 2015-01-30 14:17 +0100 Vincent Lefevre (b804f2daca31) * po/fr.po: Updated French translation. 2015-01-29 15:40 -0800 Kevin McCarthy (282832c0329a) * mutt_sasl.c: Clean up sasl warnings. These were caused by assigning callback functions to the sasl_callback_t.proc member. The callback type doesn't list any parameters, because parameters vary by callback. The fix was simply assigning a cast. Cyrus-sasl2 has a sasl_callback_ft typedef that their sample code uses for this purpose, but it is in a different header, saslplug.h, and isn't in their 1.5 tree. Since this is probably not portable to other implementations, I just added an equivalent cast. 2015-01-27 16:15 -0800 Kevin McCarthy (73b97b986e0d) * configure.ac, mutt_ssl_gnutls.c: Clean up gnutls warnings. Most of the warning were caused by deprecated types: gnutls_certificate_credentials gnutls_certificate_status gnutls_datum gnutls_digest_algorithm gnutls_session gnutls_transport_ptr gnutls_x509_crt Even though I believe the replacements have been around for a while, the patch adds autoconf checks and fallback typedefs. One warning was caused by casting an int to a pointer for the second parameter to gnutls_transport_set_ptr(). Recent gnutls has a replacement gnutls_transport_set_int() macro, but this macro simply (eventually) casts the parameter using "(gnutls_transport_ptr_t)(long)". So this patch just does the same. 2015-01-25 18:09 -0800 Kevin McCarthy (df55f14f4585) * crypt-gpgme.c, init.h, pgp.c: Remove GPG_AGENT_INFO check for GnuPG 2.1 compatibility. (closes #3715) GnuPG version 2.1 stops exporting the GPG_AGENT_INFO environment variable, so mutt can't check for the presence of that to ensure the agent is running. For GPGME, we can check for the OpenPGP protocol being present. For classic pgp, we have to trust the user setting. This patch is based on the patches sent by CustaiCo and muffins. Thank you both for reporting the problem and creating a patch. 2015-01-27 00:52 +0100 Vincent Lefevre (a0a5e505463e) * po/fr.po: Updated French translation. 2015-01-26 13:07 +0100 Vincent Lefevre (aa67709a73ce) * INSTALL, README.SECURITY, README.SSL, TODO, configure.ac, curs_lib.c, help.c, imap/message.c, lib.c, mh.c: Corrected various spelling mistakes (most of them reported by codespell). 2015-01-23 10:33 -0800 Kevin McCarthy (ec93761e3e12) * crypt-gpgme.c, crypt-mod-pgp-gpgme.c: Implement mail-key, Esc-K, for gpgme. (closes #3488) This patch implements the make-key-attachment function for gpgme, modeled after the pgp version. It also adds an optional tempf parameter to data_object_to_tempfile() so the function can be reused for make- key-attachment. 2015-01-19 15:58 -0800 Kevin McCarthy (b39219ffe75b) * pgpkey.c: pgp_getkeybystr: Pull key matching out of the address match loop. Since the key is invariant inside the address loop, there is no need to match against it with each address. All the keys should have at least one address record (see bb3b01f41ed2), but in case a record was malformed, add a check for that to keep the same logic. 2015-01-21 10:14 +0100 Eike Rathke (5d7345b4c516) * doc/devel-notes.txt: HEAD is dead, remove wrong instruction from doc /devel-notes.txt Branch HEAD was closed over a year ago. If one was following the instruction to update -C HEAD you'd end up with an empty source tree and had to checkout the default branch again. 2015-01-18 17:50 +0100 Eike Rathke (6e5a62946141) * crypt-gpgme.c: Allow short and long key ID user input in crypt_getkeybystr() The following did not work, e.g. when leaving a key list, and at the "Sign as" or "Encrypt to" prompt attempting to enter a key ID: * set pgp_long_ids=no * enter a long key ID, with or without leading 0x * set pgp_long_ids=yes * enter a short key ID without leading 0x Specifically entering a long key ID should always be possible as evil32.com has shown. This also cleans up the logic used to determine the matching condition, which was quite convoluted.. it even slightly speeds up the loop as less string operations are involved in the inner condition. This only changes how the result obtained from the crypt_* gpgme interface is filtered. 2015-01-18 17:45 +0100 Eike Rathke (63ad7cf0d0de) * pgp.c, pgp.h, pgpkey.c: Allow short and long key ID user input in pgp_getkeybystr() The following did not work, e.g. when leaving a key list, and at the "Sign as" or "Encrypt to" prompt attempting to enter a key ID: * set pgp_long_ids=no * enter a long key ID, with or without leading 0x * set pgp_long_ids=yes * enter a short key ID without leading 0x Specifically entering a long key ID should always be possible as evil32.com has shown. This also cleans up the logic used to determine the matching condition, which was quite convoluted.. it even slightly speeds up the loop as less string operations are involved in the inner condition. This only changes how the result obtained from the pgp_* command line interface is filtered. 2015-01-17 14:34 -0800 Kevin McCarthy (58a9dbfd0d25) * crypt-gpgme.c: Fix some context, data, and key memory leaks in gpgme. The context and data cleanup just involved adding missing gpgme_release() and gpgme_data_release() calls in a few places. The key usage was a little more involved: * Fix crypt_free_key(). It wasn't freeing the key passed in, and didn't work properly if multiple keys were passed in. It also was missing a call to gpgme_key_unref(). * Add free_recipient_set() to properly unref all the keys before freeing the array. * Fix get_candidates() to ref keys added to the crypt_key_t list, and unref the keys returned by gpgme_op_keylist_next(). * Change usages of gpgme_key_release() to gpgme_key_unref(). The former was deprecated in gpgme version 0.4.1 (2003-06-06). 2015-01-17 14:42 -0800 Kevin McCarthy (cc7903944687) * hcache.c: Fix the hcache type punning warning. This patch fixes the type punning warning by switching from (safe but perhaps not elegant) casting to using a union. Thanks to Vincent Lefevre for his input and suggestion to use the union as a better solution to the problem! 2015-01-15 13:19 +0100 Vincent Lefevre (d732298789f2) * curs_lib.c: Also colorize the initial mutt_enter_fname prompt. Note: the new prompt obtained after a key is typed was already colorized. 2014-08-12 14:04 -0700 Kevin McCarthy (4ba366bc7c45) * doc/manual.xml.head, enter.c, history.c, history.h: Add a scratch buffer to the history ring. (closes #3082) This patch creates an extra slot in the history ring for a scratch buffer (at h->last). If you are editing inside that buffer, it is preserved when you scroll up/down through the history. Editing while in other places in history are *not* preserved with this patch. Another behavior change worth noting with this patch: the position in history is now reset to the scratch buffer after each input entry. Before, the position would be stay wherever it was - you didn't restart at the "bottom" each time. 2013-11-06 13:07 -0800 Kevin McCarthy (8a2d9d352e2c) * globals.h, init.h, mutt.h, send.c: Add option to encrypt postponed messages. (closes #3665) This patch is based on Christian Brabandt's patch sent to mutt- users. Add two new configuration variables: $postpone_encrypt and $postpone_encrypt_as. When $postpone_encrypt is set and a message is marked for encryption, the message will be encrypted using the key specified in $postpone_encrypt_as before saving the message. In this patch, $postpone_encrypt_as must be specified. I experimented with passing safe_strdup( NONULL (PostponeEncryptAs)) when unspecified, but although gpg.conf has a default-key setting, I could not get it to work properly. (pgpclassic gave an error message and gpgme sefaulted.) Although not necessary, this patch turns off signing during encryption of the postponed message (and turns it back on before saving), since there is no need to sign the message yet. 2015-01-09 14:22 -0800 Kevin McCarthy (25430a489665) * color.c, contrib/colors.default, contrib/colors.linux, curs_lib.c, doc/manual.xml.head, doc/muttrc.man.head, mutt_curses.h: Add color type for prompts. This adds a new color type, MT_COLOR_PROMPT, that can be used to colorize prompts (fields, yes/no, multi_choice). Thanks to Ben Boeckel for the patch! 2013-10-29 18:25 -0700 Kevin McCarthy (789501922727) * crypt-gpgme.c, pgp.c: Add gpg signature name. (closes #3478) Some mail clients display "noname" for the gpg signature attachment. This patch sets the mime name to "signature.asc". The patch is based on http://dev.mutt.org/trac/attachment/ticket/347 8/gpg_signature_name.patch with the changes: - removes the configuration options - removes mime description 2015-01-06 14:38 -0800 Kevin McCarthy (cd57f8893b43) * configure.ac, globals.h: merge stable 2014-12-31 20:35 -0800 Kevin McCarthy (31ce789af3df) * crypt-gpgme.c: Fix segfault of extract-keys (^K) under gpgme. (closes #3698) This patch is based on the patch by Ben Price, which relocated the safe_fclose (&in) after its use by keydata in pgp_gpgme_extract_keys. Thank you for the patch! In addition, this patch: * removes spurious (debug?) output when the extract keys is finished. * adds a gpgme_data_release() call to free the keydata. 2014-10-10 14:17 +0800 Kevin McCarthy (e7a77a6bfb84) * query.c: Fix a memory leak in mutt_query_complete. When a single result was returned, it was written to the buffer and returned, but the query result was never freed. This patch creates a free_query function and changes the code to use that everywhere. 2014-08-14 20:12 -0700 Kevin McCarthy (c7f116b6dc20) * configure.ac: Fix variable name in configure.ac. $ac_cv_search_STRINGPREP_CHECK_VERSION should be $ac_cv_search_stringprep_check_version, to match the first parameter of the AC_SEARCH_LIBS([stringprep_check_version] above. Running configure was giving a "test: =: unary operator expected" error. 2014-12-28 09:41 -0800 Kevin McCarthy (8a981dce369e) * globals.h: Remove duplicate SmimeCryptAlg declaration in globals.h Thank you Elias Diem for the patch. 2015-01-06 14:31 -0800 Kevin McCarthy (59c2c4be08a7) * pgpkey.c: merge stable 2014-12-01 14:19 -0800 Kevin McCarthy (0aebf1df4359) * sendlib.c: Revert write_one_header() to skip space and tab. (closes #3716) This patch fixes CVE-2014-9116 in the stable branch. It reverts write_one_header() to the pre [f251d523ca5a] code for skipping whitespace. Thanks to Antonio Radici and Tomas Hoger for their analysis and patches to mutt, which this patch is based off of. 2015-01-05 18:28 -0800 Kevin McCarthy (5a86319adad0) * pgpkey.c: Fix segv in pgp_getkeybystr(). (closes #3725) When searching for keys, and the user supplies "" to match against, pgp_getkeybystr will have values: p = ""; l = 0; After returning from pgp_select_key(), it will try to assign to p[l-1]. (As a note, the function is chopping off and restoring the trailing "!" character because of ticket #1928.) 2015-01-03 11:33 -0800 Kevin McCarthy (79ea10b2d81c) * commands.c: Change bounce to use mutt_parse_adrlist() for address parsing. When prompting for recipients, forwarding, replying, and mailing all use mutt_parse_adrlist() to parse the addresses. This allows for addresses to be separated by spaces. Bounce message currently uses rfc822_parse_adrlist(), which doesn't allow the spaces. This one-line patch simply changes bounce to behave the same as mail, reply, and forwarding for the address prompt. Thanks to Roger Cornelius for the patch! 2014-12-31 20:35 -0800 Kevin McCarthy (5530e9fb17d9) * crypt-gpgme.c: Fix segfault of extract-keys (^K) under gpgme. (closes #3698) This patch is based on the patch by Ben Price, which relocated the safe_fclose (&in) after its use by keydata in pgp_gpgme_extract_keys. Thank you for the patch! In addition, this patch: * removes spurious (debug?) output when the extract keys is finished. * adds a gpgme_data_release() call to free the keydata. 2014-08-12 14:33 -0700 Kevin McCarthy (9a75aa4bd69e) * gnupgparse.c, pgpkey.c: Wrap pgp_uid_t->addr in NONULL(). (closes #3564) The previous patch introduced the possibility for addr to be null. Mutt is surprisingly robust against null strings, but there are a few places that should be wrapped in NONULL(). 2014-08-12 14:33 -0700 Kevin McCarthy (bb3b01f41ed2) * gnupgparse.c: Fix parse_pub_line to allow an empty User-ID field for a pub record. (see #3564) A key whose primary uid record has an empty User-ID will result in the user being unable to use the key to encrypt an email in mutt. This is because the mutt functions for key selection iterate through the address fields of a key for matching against and for displaying to the user. This change allows a pgp_uid_t record to be created for a pub record whose User-ID field is blank. So the key will have one address record, albeit with a null addr field. 2013-11-02 20:12 -0700 Kevin McCarthy (4909bd9c9149) * main.c: Override draft headers with arguments. (closes #3580) Currently, if the -H option is used, it is not possible to redefine the recipient addresses with positional argument. This patch fixes it as well as CC, Bcc, and Subject headers. This patch is based on the patch by Petr PísaÅ™ at http://dev.mutt.or g/trac/attachment/ticket/3580/override_draft_headers_with_arguments. patch This version of the patch merges the To, Cc, and Bcc commandline arguments into the template, and fixes a few small problems with the previous patch. This patch also moves the fin close outside the "if (tempfile)" block, since it is opened outside that block. 2014-06-21 13:51 -0700 Kevin McCarthy (daf61444d454) * pgpinvoke.c: Enable %a format string for all pgp command configs. (closes #3699) Currently, the documentation states that, with the exception of pgp_getkeys_command, all the PGP format commands should be available to the pgp_*_command configuration variables. However, the %a format is actually only enabled for pgp_clearsign_command, pgp_encrypt_sign_command, and pgp_sign_command. Philip Rinn discovered this problem when he was trying to add a "--encrypt-to %a" to pgp_encrypt_only_command. Rather than just fix the one configuration he was having the problem with, this patch enables %a usage for all of them. (With the exception of the documented pgp_getkeys_command.) 2013-12-18 19:19 -0800 Kevin McCarthy (630bbc147022) * doc/manual.xml.head: Note correct usage of $edit_headers. (closes #3673) Ticket 3673 shows that it isn't necessarily obvious a blank line is needed between the headers and body of a message when using $edit_headers. This patch adds a small note to the documentation, indicating the blank line should be preserved between the headers and body. Thank you Sinan Kaan Yerli for the patch. 2014-08-13 13:46 -0700 Kevin McCarthy (89b17d3cd510) * doc/mutt.man, doc/pgpring.man: Clarify PGPPATH usage in manpages. Make more clear that, when used with the original PGP program, mutt and pgpring rely on this being set. 2014-10-10 14:17 +0800 Kevin McCarthy (45fbc40193aa) * query.c: Fix a memory leak in mutt_query_complete. When a single result was returned, it was written to the buffer and returned, but the query result was never freed. This patch creates a free_query function and changes the code to use that everywhere. 2014-08-21 18:41 -0700 Kevin McCarthy (b1ef16f25425) * init.c: Remove unused variable t in start_debug(). t was set but never used. This was generating a compiler warning. 2014-08-14 20:12 -0700 Kevin McCarthy (80186ee6eb57) * configure.ac: Fix variable name in configure.ac. $ac_cv_search_STRINGPREP_CHECK_VERSION should be $ac_cv_search_stringprep_check_version, to match the first parameter of the AC_SEARCH_LIBS([stringprep_check_version] above. Running configure was giving a "test: =: unary operator expected" error. 2014-12-28 09:41 -0800 Kevin McCarthy (1630cee66057) * globals.h: Remove duplicate SmimeCryptAlg declaration in globals.h Thank you Elias Diem for the patch. 2014-11-04 23:40 -0600 David Champion (39d3ddb56d34) * init.h: Disable SSLv3 by default. Since Oct. 14 2014 SSLv3 is no longer considered safe. See POODLE: https://en.wikipedia.org/wiki/Transport_Layer_Security#POODLE_attack 2014-10-11 13:20 -0700 Brendan Cully (3a46874d5845) * hcache.c: hcache tcdb debug logging 2014-10-11 11:05 -0700 Brendan Cully (85393e522337) * Makefile.am, doc/Makefile.am, flymake.am, imap/Makefile.am: add check-syntax target for flymake 2014-10-11 10:59 -0700 Brendan Cully (bb7f59864d47) * .hgignore: ignore generated pgpewrap/pgpring man pages 2014-10-11 10:58 -0700 Brendan Cully (0dc2dafab53a) * .hgignore: ignore gnu global tags 2014-09-07 12:00 -0700 Brendan Cully (4a814b05874f) * merge stable 2014-09-07 11:04 -0700 Brendan Cully (1b583341d5ad) * mutt_sasl.c: mutt_sasl: fix double negative in iptostring result check (fixes #3705) 2014-09-07 10:52 -0700 Brendan Cully (769905e66205) * mutt_sasl.c: mutt_sasl: whitespace only 2014-09-07 10:36 -0700 Brendan Cully (c81c93e64af8) * UPDATING, po/nl.po: merge stable 2014-07-25 20:43 +0200 Vincent Lefevre (b8bebc2f9a55) * po/fr.po: Updated French translation. 2014-03-13 23:37 +0000 Ivan Vilata i Balaguer (375ba5ce358c) * po/ca.po: Updated Catalan translation. 2014-03-13 17:41 +0000 Vsevolod Volkov (99dda89b7685) * po/uk.po: Updated Ukrainian translation. 2014-03-13 17:41 +0000 Vsevolod Volkov (061217dd31ef) * po/ru.po: Updated Russian translation. 2014-03-13 17:36 +0000 Jonathan Wakely (fd531fc9188c) * doc/mutt.man: fix typo in man page. 2014-03-13 03:56 +0000 Petr Pisar (67673770fb96) * po/cs.po: Updated Czech translation 2014-03-12 09:44 -0700 Brendan Cully (d9f45fa9458c) * .hgsigs: mutt-1.5.23 signed 2014-03-12 09:28 -0700 Brendan Cully (4790aa52f0f2) * .hgtags: Added tag mutt-1-5-23-rel for changeset b8a63730c848 2014-03-12 09:28 -0700 Brendan Cully (b8a63730c848) * ChangeLog, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.5.23 2014-03-12 09:25 -0700 Brendan Cully (07556816c588) * build-release: build-release: make sure version is picked up by autoconf * mkchangelog.sh: mkchangelog: only show log entries on current branch * build-release: No more devel 2014-03-11 10:04 -0700 Michael Elkins (3c13c4188912) * UPDATING: add user visible changes since 1.5.22 release. * copy.c: Fix buffer overrun caused by not updating a string length after address expansion. 2013-10-24 09:55 -0700 Michael Elkins (3d5e23a66a1a) * init.h: remove trailing period from documentation for $pgp_list_secring_command * init.h: remove trailing period from documentation for $pgp_list_pubring_command 2013-04-26 12:10 -0700 Kevin McCarthy (914e13a3694d) * postpone.c: Fix postpone/resume to not remove a Mail-Followup-To header (closes #3070) This solution changes mutt_prepare_template() to check whether the message_id field is NULL to decide whether to wipe the message-id and mail-followup-to headers when instantiating the message. If we are resending a message, we don't want the previous message-id and mail-followup-to headers. If we are resuming a postponed message, however, we want to keep the mail-followup-to header if any was set before the postpone. (grafted from d7d83298011a6e7aa31bde49e0b6b21209a85fd2) 2013-10-22 15:12 -0500 Aaron Schrab (4a24e6233a5f) * version.sh: version.sh: step back from $() to ``. closes #3661 (grafted from 01cf5814dfe5e79b65b1d950aab1276d19a9f031) 2013-07-14 19:48 -0700 Kevin McCarthy (b5c894182719) * muttlib.c: Allow filename prompt when saving multiple attachments to a directory. (closes #3083) Currently, if you specify a directory when saving multiple attachments and choose (a)ll, the first attachment is saved without confirming the filename. Subsequent attachments prompt for the filename. 2013-10-04 18:22 +0000 Michael Elkins (95a2230ef889) * mutt.h, postpone.c, send.c: When recalling a postponed message that does not have a x-mutt-fcc header field, generate a default FCC just as we do for new messages. If x-mutt-fcc is present but empty, we assume that means the user does not want a copy. closes #3653 2013-10-23 11:11 -0700 Michael Elkins (331d48da153b) * crypt-gpgme.c: Ensure that at least one signature was generated to catch the case where $pgp_sign_as is unset and no default key is specified in ~/.gnupg/gpg.conf closes #3658 2013-10-06 09:15 -0700 Michael Elkins (99d913f46eb9) * handler.c, smime.c: use LOFF_T as the type for variables used in fseeko() closes #3487 2013-10-04 18:04 +0000 Michael Elkins (dd67e8649ea4) * crypt-gpgme.c: Display the KeyID when the pubkey is not found in the user's keyring during signature verification. closes #3654 2013-10-23 11:11 -0700 Michael Elkins (db3028e34ce0) * mutt_ssl_gnutls.c: return 0 if import of cert failed to match other error conditions. 2013-10-23 11:11 -0700 Michael Elkins (4dde4bcda519) * mutt_ssl_gnutls.c: only terminate the write-half of the TLS connection to avoid hanging if the remote doesn't respond. RFC5246 section 7.2.4 states that the initiator of the closure need not wait for the remote to response before closing the read-half. closes #3633 2013-10-22 21:11 -0700 Brendan Cully (2ab618f4f6b0) * create stable branch 2013-10-21 11:58 -0700 Michael Elkins (0d9d7c486331) * doc/manual.xml.head: add note about use of ! ~Q in send-hook when paired with reply-hook. 2013-10-19 11:23 -0700 Michael Elkins (84acf5f0ce92) * crypt-gpgme.c: remove and use "1" instead of "true". closes #3657 see #3642 for the change that caused this bug. 2013-10-18 14:12 -0700 Michael Elkins (b9693e10f431) * UPDATING: update UPDATING with 1.5.22 release date 2013-10-17 22:55 -0700 Brendan Cully (6f5fe49fdf64) * .hgsigs: mutt-1.5.22 signed 2013-10-17 22:43 -0700 Brendan Cully (941ba77040a8) * .hgtags: Added tag mutt-1-5-22-rel for changeset 8c5ea668e7e0 2013-10-17 22:43 -0700 Brendan Cully (8c5ea668e7e0) * ChangeLog, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.5.22 2013-10-16 16:04 +0000 Michael Elkins (5648f4b2ed44) * rfc822.c: Rework logic to avoid advancing list pointer inside the for loop. closes #3531 2013-10-15 15:41 +0000 Ivan Vilata i Balaguer (20954d6af1b1) * po/ca.po: updated Catalan translation 2013-10-11 15:51 +0000 Vsevolod Volkov (d60465c5ee6a) * po/uk.po: updated Ukranian translation 2013-10-11 15:49 +0000 Tamotsu TAKAHASHI (b9ba481ed72a) * po/ja.po: updated Japanese translation 2013-10-07 17:32 +0000 Michael Elkins (804e46bc366e) * doc/pgpewrap.man, doc/pgpring.man: add missing files that were supposed to be included with [76f8df0ac80396559aa80e7f145be6f235a6db51] 2013-10-07 17:21 +0000 hhorak (76f8df0ac803) * doc/Makefile.am, doc/PGP-Notes.txt: adds some missing options in doc and adds man pages for binaries pgpewrap and pgpring. closes #3643 2013-10-07 17:09 +0000 esr (8d888e4d4f0b) * doc/makedoc.c, doc/muttrc.man.head: Problems with muttrc.5: Ambiguous or invalid backslash. This doesn't cause groff a problem. but it confuses doclifter and may confuse older troff implementations. Unknown or invalid macro. That is, one that does not fit in the macro set that the man page seems to be using. This is a serious error; it often means part of your text is being lost or rendered incorrectly. Use local definitions of .EX/.EE or .DS/.DE to avoid low-level troff requests in the page body. There are plans to add these to groff man; in the interim, this patch adds a compatible definition to your page. 2013-10-07 16:10 +0000 esr (02234de89d2a) * doc/mutt.man: Problems with mutt.1: Ambiguous or invalid backslash. This doesn't cause groff a problem. but it confuses doclifter and may confuse older troff implementations. Spelling error or typo. 2013-10-06 09:31 -0700 nihilhill (24bb691dcde7) * crypt-gpgme.c: include for definition 'true' closes #3642 2013-10-05 15:57 +0800 Kevin McCarthy (035306822940) * attach.c: Fix segfault when viewing text attachments in compose menu. (closes #3644) The segfault was introduced in changeset b9f9e3147eb4. Since decoding and charset conversion aren't needed for attachments when composing a message, this patch reverts to just using mutt_save_attachment() to view "raw data" for text attachments in the compose/send case. This patch is based on Michael Elkins' patch at http://dev.mutt.org/ trac/attachment/ticket/3644/view_attach_compose_segfault with just a missing return value check added. 2013-10-06 14:32 +0000 Aaron Schrab (6bcde5f1c7a7) * commands.c, hook.c, imap/command.c, imap/imap.c: Ensure that BUFFER variables are initialized to prevent later attempts to traverse an uninitialized pointer. 2013-10-05 19:25 +0000 Aaron Schrab (132861c8b4e9) * commands.c, hook.c, imap/command.c, imap/imap.c, imap/message.c, init.c, keymap.c, pattern.c, score.c: Consistently use mutt_buffer_init function Despite the existence of the mutt_buffer_init function, most initializations were instead done with memset. Use the specific function instead to make it easier if later changes are made to how the initialization should be done. 2013-10-04 16:47 +0000 Michael Elkins (0beba37c336b) * crypt-gpgme.c, handler.c, init.c, pop_auth.c: fix more comment typos 2013-07-23 14:07 +0200 OndÅ™ej Bílka (bc7e7cf0fed3) * compose.c, crypt-gpgme.c, crypt-mod.h, curs_lib.c, date.c, doc/makedoc.c, editmsg.c, handler.c, imap/util.c, init.c, intl/gettextP.h, intl/plural.c, keymap.c, lib.c, mbox.c, mkdtemp.c, mutt.h, mutt_menu.h, mutt_ssl.c, mutt_ssl_gnutls.c, muttlib.c, mx.c, parse.c, pattern.c, pop.c, pop_auth.c, pop_lib.c, recvcmd.c, regex.c, send.c, signal.c, smime.c, snprintf.c, sort.h, thread.c: fix typos in comments 2013-04-16 20:12 -0700 Kevin McCarthy (d3096e8796e7) * pager.c: Don't exit pager if quit=ask is answered "no". This patch addresses ticket 2788. Currently if you quit ('Q') from inside the pager, with quit=ask-yes or quit=ask-no, and you respond "no", mutt leaves you back in the index menu. This patch changes it so that mutt does not exit the pager. 2013-04-11 02:17 +0000 Michael Elkins (4c5163272b9c) * browser.c, enter.c, imap/message.c, init.c, mbox.c, muttlib.c, mx.c, pop.c, query.c, smime.c, system.c: backout c1371176ea45 2013-04-11 01:59 +0000 Michael Elkins (f99e91980f0f) * getdomain.c, init.c: Backed out changeset 1142ed8974fa 2013-04-10 23:40 +0000 Michael Elkins (1142ed8974fa) * getdomain.c, init.c: use gethostname() to determine the system host name use getaddrinfo() to look up canonical DNS name, and fall back to hinting from /etc/resolv.conf see #3298 2013-04-10 22:38 +0000 Michael Elkins (c1371176ea45) * browser.c, enter.c, imap/message.c, init.c, mbox.c, muttlib.c, mx.c, pop.c, query.c, smime.c, system.c: fix various compiler warnings; most were due to unchecked return values from system calls. 2013-03-04 04:14 +0000 is (d498f0e91914) * lib.c: use mkdtemp() to create temporary directory rather than mktemp() followed by mkdir() closes #3637 2013-02-23 03:12 +0000 Michael Elkins (4c16c0d1ba9e) * pop.c, pop_lib.c: use of sscanf() had undefined behavior, replace with simple parsing instead see #3636 2013-02-22 18:31 +0000 Michael Elkins (c7eff98bb299) * smime.c: increase string size by one byte to accomodate the terminating null character in fscanf() since the maximum field width does not include it closes #3636 hat tip: Will Fiveash 2013-02-22 16:30 +0000 john beck (14596ac2b323) * rfc1524.c, sendlib.c: fix potential buffer overflow in off-by-one bounds checking error closes #3635 2013-02-08 17:06 +0000 Michael Elkins (302044b4ed3f) * curs_lib.c: explicitly call mutt_refresh() prior to endwin() to force a screen redraw. [4903e80356d3] removed the call, but some environments (screen+xterm under SuSE11/12) don't properly flush without it prior to the endwin() call 2013-01-31 05:06 +0000 Michael Elkins (2a1c5d3dd72e) * curs_lib.c: do not use mutt_message() to display prompt in mutt_yesorno(). properly calculate screen width of prompt string by using mutt_strwidth() rather than strlen() use safe_asprintf() return the formatted yes/no string since specifying COLS+1 is wrong when dealing with multibyte characters closes #3412 closes #3352 2013-01-23 21:52 +0000 Michael Elkins (b86b154f3988) * buffy.c, buffy.h, mh.c, mx.h: add support for $mail_check_recent to mh mailbox driver closes #3629 2013-01-23 19:52 +0000 Michael Elkins (4903e80356d3) * curs_lib.c: do not explicitly reset the terminal attributes and move the cursor in mutt_endwin(). endwin() itself should handle this. closes #3627 2013-01-22 02:02 +0000 Michael Elkins (acc8b2afdf29) * configure.ac: remove PKG_CHECK_MODULE() check and always use AC_CHECK_HEADERS() only check for when isn't found closes #3626 2013-01-20 21:45 +0000 Michael Elkins (98e031cd81d4) * configure.ac, main.c, mutt_idna.h: use pkg-config to look for libidn if available. checking rather than including -I/usr/include/idn for Solaris 11. closes #3624 2013-01-17 23:04 +0000 Michael Elkins (7fcc0049f250) * attach.c: backout [392e945dfba7] closes #3293 see #3234 2013-01-17 23:03 +0000 Michael Elkins (b9f9e3147eb4) * attach.c: when falling back to viewing an attachment as text in the internal pager, perform charset conversion this change is meant to replace [392e945dfba7] see #3234 see #3293 2013-01-17 02:43 +0000 Michael Elkins (571e945d6544) * hcache.c, hcache.h, imap/util.c, mh.c, pop.c: use a separate flag for mutt_hcache_store() to signal that the gettimeofday() value should be substituted, so that a 0 uidvalidity can be used by the imap driver. closes #3501 2013-01-17 02:10 +0000 Michael Elkins (b58cdfacfb89) * attach.c, handler.c, protos.h: change semantics of mutt_is_autoview() to return 1 if there is a matching mailcap entry and either $implicit_autoview is set or the MIME type matches the user's auto_view list. closes #3496 closes #3426 2013-01-14 20:39 -0800 Michael Elkins (1a75c9e477b4) * from.c: detect pipermail-style obscured return path in mbox From lines see #1200 2013-01-14 19:23 -0800 Michael Elkins (8c75478735a3) * curs_main.c: allow use of sync-mailbox when the current limit has no visible messages closes #3538 2013-01-14 08:50 -0800 Michael Elkins (05cd8d0d1450) * handler.c: avoid debug warning about trailing whitespace in a base64 encoded attachment closes #3558 2013-01-04 04:05 +0000 Michael Elkins (90f7869decec) * Makefile.am: When "make install" fails to chgrp or chmod the mutt_dotlock binary, add the reason why we are doing this so the user knows what to look for. 2013-01-03 16:12 -0800 Michael Elkins (d7d26c40e1e5) * pager.c: Fix regression introduced by [10cc06eff52b] where the CLEARLINE() removal was not replaced by a move() to position the cursor at the correct location to draw the status bar. closes #3619 2013-01-03 19:04 +0000 Michael Elkins (7fe92ce1cfc1) * parse.c: Remove unused variable `matched'. 2013-01-03 19:04 +0000 Michael Elkins (6f4ce8ce80a7) * parse.c: Fix memory leak when multiple x-label or supersedes header fields exist in the header. In order to keep the current behavior where the value of the last header field present is the one used, free any previous value. 2013-01-03 08:03 -0800 Michael Elkins (21457574a9b6) * main.c: Backed out changeset bf84f24e512d 2013-01-02 23:43 +0000 Michael Elkins (bf84f24e512d) * main.c: display +/-NCURSES_WIDECHAR when displaying ncurses version to show whether we are linked against -lncurses or -lncursesw 2013-01-01 21:39 +0100 Matthias Andree (ea52317444ef) * hcache.c: Drop unneeded variable HEADER_CACHE that causes clang warnings. The variable was unused and clang warned that it was not emitted to the .o file. 2012-12-31 23:29 +0000 Michael Elkins (32ec63debe52) * init.h: fix xml validation error in manual.xml in auto-generated content due to missing paragraph mark in the $editor docstring 2012-12-31 15:03 -0800 guns (474e9e809054) * rfc822.c: Fix accidental var redeclation with --enable-exact-address closes #3615 2012-12-31 14:54 -0800 Michael Elkins (bf6bf2a80c35) * merge 2012-12-31 14:52 -0800 Michael Elkins (5196c3d6c5d0) * curs_lib.c: reset to color normal before clearing to end of line when printing a message/error string closes #3617 2012-12-31 19:06 +0000 Michael Elkins (ca67a3dad949) * doc/gen-map-doc: update regexp to include const keyword. The auto generated documentation of functions was failing due to a change in the source code format. 2012-12-30 19:48 -0800 Antonio Radici (b1b49019fec0) * headers.c: Ensure that the in-reply-to header field was actually present before deciding it was removed. closes #3378 2012-12-30 19:17 -0800 Michael Elkins (a90f57e0adbd) * ChangeLog: update ChangeLog 2012-12-30 19:14 -0800 Michael Elkins (c03ba94d8750) * imap/message.c: add __FREE_CHECKED__ 2012-12-30 19:12 -0800 Michael Elkins (f7247ad288e7) * UPDATING: document the TLS changes since 1.5.21 2012-12-30 18:49 -0800 Michael Elkins (10cc06eff52b) * color.c, compose.c, curs_lib.c, curs_main.c, menu.c, mutt_curses.h, pager.c, remailer.c: make the SETCOLOR() macro use bkgdset() on systems which have it, and attrset() when we don't. closes #3005 2012-12-30 09:26 -0800 Michael Elkins (8c0b9ddee11f) * configure.ac: remove m4_translit because it generates a warning with newer versions of autoconf when used in AC_INIT. Instead, use tr -d to output the version string without a trailing newline. 2012-12-27 21:04 -0800 Michael Elkins (b0265d385207) * version.sh: restore ability for version.sh to cope with a repository directory with a space in it. 2012-12-27 20:33 -0800 Aaron Schrab (13c9a5d820f2) * configure.ac, version.sh: Use the directory where the version.sh script is located as the directory where it is run. Since this will be run in a separate shell anyway, there's no need to worry about changing current directory. This eliminates the need for the caller to specify where the source directory is located, and doesn't require that the code take special care to use the appropriate directory. The fallback method of using `cat VERSION` was broken in this respect, it would not work when run from a different directory. --- configure.ac | 2 +- version.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 2012-12-27 17:37 -0800 Michael Elkins (0f281c548d69) * configure.ac: use [] around body of AC_CHECK_HEADER to avoid problems with older versions of autoconf 2012-12-27 18:56 -0800 Michael Elkins (8728418605fd) * configure.ac: avoid using m4_esyscmd_s() since it is not available in older versions of autoconf. use m4_esyscmd() and m4_translit() to whack the newline instead. see #3613 2012-12-22 18:00 -0800 Michael Elkins (de974f67eba3) * configure.ac, init.h, mutt_ssl.c: Uses SSLv23_client_method() in mutt_ssl_starttls() because TLSv1_2_client_method() does not honor the SSL_OP_NO_TLS* flags. closes #3612 2012-12-22 15:04 -0800 Michael Elkins (d07c9ee9a92b) * configure.ac: If neither --with-idn nor --without-idn are given, use -I/usr/include/idn when checking for the libidn header files, if present (needed for Solaris 11). Don't bother checking for the idna_* functions if we didn't find -lidn 2012-12-21 11:17 +0100 Matthias Andree (7d55bad3b11f) * patchlist.sh: Fix VPATH-based generation of non-hg-mq based patchlists. Note: Makefile.am runs patchlist.sh with $(srcdir)/PATCHES provided on stdin. 2012-12-21 11:07 +0100 Matthias Andree (759dd53302a0) * version.sh: Fix VPATH build outside Mercurial repositories. 2012-12-21 12:37 -0800 Michael Elkins (494af2a964cb) * Makefile.am: add version.sh and check_sec.sh to EXTRA_DIST so they are including in the "make dist" output. 2012-12-20 21:13 -0800 Michael Elkins (5554d811eb99) * imap/util.c: fix forgotten RETSIGTYPE change id [18a724e9eba0] 2012-12-20 20:49 -0800 Michael Elkins (18a724e9eba0) * configure.ac, sendlib.c, signal.c: remove deprecated check for signal() return type 2012-12-20 20:45 -0800 Michael Elkins (6de2578088ab) * configure.ac: update configure.ac with autoupdate 2012-12-20 20:34 -0800 Michael Elkins (fe28a8bdd598) * configure.ac: change AM_CONFIG_HEADER to AC_CONFIG_HEADERS and move it after the AM_INIT_AUTOMAKE. config.h was not being generated from the dist package. 2012-12-20 17:09 -0800 Michael Elkins (21c085ae6e8f) * configure.ac: modernize intialization of configure.ac 2012-12-21 00:38 +0100 Matthias Andree (0703095bf52d) * Makefile.am: Fix 'make distcheck': missing txt2c* and po/mutt.pot cleanup 2012-12-20 14:44 -0800 Michael Elkins (f8774119c433) * menu.c: remove redundant #include statements 2012-12-20 14:40 -0800 Michael Elkins (489031af8fdd) * menu.c: remove extern decl for Charset_is_utf8 since menu.c includes mbyte.h which has the same decl. 2012-12-20 11:20 -0800 Michael Elkins (6674c087fd4f) * configure.ac: backout out changeset 36b0cc717ecc 2012-12-19 15:26 -0800 Michael Elkins (879c9516154c) * crypt-gpgme.c: allow for CRLF line endings when comparing for the OpenPGP block identifiers adapted from http://svnweb.freebsd.org/ports/head/mail/mutt/files /patch-pgp?revision=301308&view=markup 2012-12-19 14:52 -0800 Michael Elkins (41089c2982e3) * pager.c: support nbsp in the pager. imported from http://svnweb.freebsd.org/ports/head/mail/mutt/files /patch-nbsp?revision=301308&view=markup 2012-12-19 14:40 -0800 Michael Elkins (fd2d94a0eb20) * configure.ac: detect newer BDB versions up to 5.2 imported from http://svnweb.freebsd.org/ports/head/mail/mutt/files /patch-bdb?revision=301308&view=markup 2010-07-22 20:06 +0200 Fabian Groffen (bc39bac75ea8) * regex.c: http://thread.gmane.org/gmane.mail.mutt.devel/15710 Interix doesn't have btowc, but it does have mbtowc. Linux manpage also discourages the use of btowc. 2012-12-19 13:29 -0800 Petr Pisar (f7bd9642217f) * po/cs.po: updated cs.po 2012-12-19 11:56 -0800 Michael Elkins (73900ca5db9a) * menu.c: use WACS_* macros for printing wide versions of the line drawing characters when linking against ncursesw. This patch is based on http://prefix.gentooexperimental.org:8000 /mutt-patches/file/fea851a2808f/solaris-ncurses-chars.patch 2012-12-19 11:08 -0800 Michael Elkins (36b0cc717ecc) * configure.ac: make configure define _POSIX_C_SOURCE, _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED to comply with POSIX.1-2008 and XSI conforming applications. 2012-12-19 06:57 -0800 Vsevolod Volkov (52219fecdac8) * po/ru.po: update ru.po 2012-12-19 06:55 -0800 Vincent Lefevre (caf64f14142d) * charset.c: remove duplicate const keyword 2012-12-18 20:46 -0800 Michael Elkins (940e528ef852) * mutt_ssl.c: disable tls v1.1/1.2 in mutt_ssl_starttls() based on $ssl_use_tlsv1_* see #3571 2012-12-18 20:38 -0800 Michael Elkins (6bdd35fb3378) * mutt_ssl_gnutls.c: add support for TLSv1.1/1.2 when using GNUTLS. see #3571 2012-12-18 19:44 -0800 hncaldwell (fab920f01ca7) * init.h, mutt.h, mutt_ssl.c: add variables for disabling TLSv1.1/1.2 when compiled against OpenSSL 1.0.1 see #3571 2012-12-18 13:50 -0800 Michael Elkins (f251d523ca5a) * headers.c, lib.h, mutt_crypt.h, parse.c, pop_lib.c, postpone.c, rfc1524.c, rfc822.c, send.c, sendlib.c, url.c: rename iswsp() to is_email_wsp() add new inline funtion skip_email_wsp() to be used in lieu of SKIPWS() when parsing ASCII protocols rather than user input. change use of SKIPWS() to skip_email_wsp() in places where it is likely to be a problem. 2012-12-18 02:21 -0800 Michael Elkins (897dcc62e4aa) * sendlib.c: fix problem where mutt_substrdup() was called with the start pointer > end pointer, as a result of using SKIPWS(). This occurred because the header field had an empty body, so the trailing newline was skipped over. The fix is to just skip over ascii space and htab. closes #3609 2012-12-18 01:53 -0800 Honza Horak (d7f4b2e2b09a) * mutt_ssl_gnutls.c: if the peer's x.509 cert is not valid, we need to allow the user to inspect it even if the digital signatures are valid closes #3506 2012-12-17 20:42 -0800 Vincent Lefevre (722c47f6ede9) * po/fr.po: updated fr.po 2012-12-17 17:09 -0800 Honza Horak (ca4747442189) * pop.c: fix segfault in pop driver. when rereading the message header, the ENVELOPE* struct is freed, but ctx->subj_hash retains a pointer to env->real_subj, so the hash table entry must be deleted prior to calling mutt_free_envelope() http://pkgs.fedoraproject.org/cgit/mutt.git/tree/mutt-1.5.21-pophash .patch?h=f18 2012-12-17 16:47 -0800 Petr Pisar (9f8e41dd4e1d) * crypt-gpgme.c: Fix NULL pointer dereference in notation name closes #3574 2012-12-17 10:39 -0800 Michael Elkins (e6b271ed1d7f) * configure.ac, mutt_ssl.c: use TLSv1.2 if available in the system OpenSSL when using starttls 2012-12-17 10:09 -0800 Michael Elkins (d77d81a69999) * mutt_ssl.c: use SSL_get_version() to display the actual SSL protocol used rather than the fixed string SSL. 2012-12-16 20:23 -0800 Andrew Gaul (ed06326ae8a8) * doc/dotlock.man, doc/makedoc.c, doc/smime_keys.man, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, rfc1524.c: Correct typos 2012-12-16 19:33 -0800 Michael Elkins (5e745e37fe6e) * init.h: update documentation for $pgp_getkeys_command to note that %r is replaced with the email address, not the public key ID closes #1208 2012-12-16 13:28 -0800 Michael Elkins (1cc05de753c2) * rfc822.c, rfc822.h: use new function iswsp() in place of isspace() when testing for whitespace. closes #3608 closes #2956 2012-12-15 07:48 -0800 Michael Elkins (8aee8497cc2b) * imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c, imap/util.c: make imap_private.h include message.h for IMAP_HEADER_DATA definition cast &ctx->data to IMAP_HEADER_DATA** to fix compiler warning imap_free_header_data should check for *data being NULL, rather than "data" 2012-09-09 19:54 -0700 Andrew Gaul (d39813193f27) * imap/imap_private.h, imap/message.c: Make imap_free_header_data type-safe Also push conditional into function for safety and consistency with other free functions. 2012-12-08 12:31 +0100 Matthias Andree (c4c65eadeb71) * Makefile.am: Fix VPATH build by running txt2c.sh from ${srcdir} rather than ".". 2012-12-07 09:51 -0800 Michael Elkins (d626fb87c489) * crypt-gpgme.c: invoke gpgme_check_version() as required to initialize the library. move locale code to initialization function. closes #3300 2012-12-06 07:56 -0800 Michael Elkins (ed5ad234aeed) * init.h: additional documentation for $editor. closes #3602 2012-12-01 14:48 -0800 Michael Elkins (dace74dd904a) * doc/manual.xml.head: list-reply documentation should mention its behavior wrt the List-Post header field. closes #3599 2012-12-01 14:32 -0800 Michael Elkins (109ebf6d4e53) * send.c: don't perform rfc3676 space stuffing when recalling a postponed message where it has already been done. closes #3600 2012-12-01 14:31 -0800 Michael Elkins (2bf065dd23d6) * ascii.c: make ascii_strcasecmp properly handle unequal length strings with the same prefix closes #3601 2012-10-16 18:13 -0500 David Champion (d414971f0c48) * .hgignore, Makefile.am, main.c, muttbug.sh.in, txt2c.c, txt2c.sh: Add compiler and configure info to mutt -v output (closes #3537) Makefile(.am) updated to produce conststrings.c, which contains C strings representing: * the compiler's own version information; * the CFLAGS value from the Make environment * the ./configure options main.c is updated to print them when running 'mutt -v'. txt2c.sh is added to produce conststrings.c. txt2c.sh uses a compiled txt2c binary if possible, for complete fidelity to the source strings in whatever encoding they may use. If txt2c is not available (could not be compiled, or was not compiled natively) it falls back on a shell function to approximate the output using sed and tr. 2012-07-22 11:15 -0700 Brendan Cully (70810a88ce9f) * muttlib.c: mutt_buffer_init: just memset the buffer (closes #3588) This was meant to be part of the previous commit. 2012-07-21 19:51 -0700 Brendan Cully (99dbd23ce78f) * imap/imap.c, imap/util.c, mbyte.c, muttlib.c, parse.c, protos.h: Split mutt_buffer_new out of mutt_buffer_init. Currently, no callers were providing a non-NULL buffer to mutt_buffer_init, and splitting it will allow more sane semantics for buffer allocation, initialization, and destruction in a later patch. 2012-07-20 12:32 -0700 Brendan Cully (6d6df167185c) * commands.c, hook.c, init.c, pattern.c: Do not use stack-allocated space for BUFFERs It will cause mutt_buffer_* to segfault if it needs to grow the space. Thanks to Steve Losh for discovering the issue. I have done some simple grepping to find other cases, but some may remain. 2012-07-08 22:40 -0700 Dan Fandrich (2f2ebc24920d) * send.c: Set text_flowed after send-hook has been applied (closes #3550) 2012-07-08 22:27 -0700 Brendan Cully (5bf02605d988) * mutt_ssl_gnutls.c: silence some style warnings 2012-07-08 17:34 -0700 Antonio Radici (33415ca7d976) * copy.c, crypt.c, edit.c, enter.c, init.c: Fix some spelling errors (closes #3493) 2012-07-08 17:25 -0700 Brendan Cully (243710db60e0) * mutt_ssl_gnutls.c: gnutls:tls_compare_certificates: check strstr for failure (closes #3547) A malformed certificate file could cause strstr to return an unhandled NULL. Thanks to hhorak for the proposed patch. This one is similar but avoids using memmem for the first time (I am not sure about its portability). 2012-07-07 21:57 -0700 Antonio Radici (8fabaffc2c00) * init.c: check_charset: check for NULL before calling strtok_r (closes #3326) Otherwise, if strtok_r cannot handle NULL an empty *charset setting will segfault 2012-07-07 15:50 -0700 Brendan Cully (c6a44f4f6a99) * imap/auth_sasl.c: Do not use SASL for login unless AUTH=LOGIN is advertised (closes #3556) 2012-05-25 22:30 +0200 Marco Paolone (e452440f92a4) * po/it.po: Update Italian translation 2012-05-24 22:02 -0700 Brendan Cully (0488deb39a35) * configure.ac: Remove AM_C_PROTOTYPES from configure.ac (closes #3579) I doubt we have any users of that macro nowadays. It will be interesting to hear about it if we do. 2012-05-23 23:29 -0400 Brendan Cully (0fb6d7579fd1) * account.h: Support passwords of up to 127 characters. I received a report on IRC of a failure due to a 64-byte password. 2012-04-29 22:15 -0700 Brendan Cully (41a8d7dceb6c) * mutt_ssl_gnutls.c: gnutls: catch gnutls_init failures I haven't actually experienced these, but it seems like a good idea. 2012-04-29 22:14 -0700 Brendan Cully (aadaeb69cbd0) * mutt_sasl.c: give user time to read SASL init error message 2011-12-20 22:24 -0800 TAKAHASHI Tamotsu (c26dbc7021f4) * po/ja.po: Updated Japanese translation 2011-12-03 11:13 -0800 Dan Fandrich (9e756d1adb76) * addrbook.c, browser.c, charset.c, color.c, compose.c, crypt-gpgme.c, curs_lib.c, curs_main.c, date.c, enter.c, functions.h, globals.h, handler.c, help.c, imap/auth.c, imap/command.c, imap/message.c, imap/utf7.c, imap/util.c, init.c, init.h, keymap.c, keymap.h, lib.c, mapping.h, mime.h, mutt_ssl.c, pager.c, parse.c, pattern.c, pgpkey.c, pgpmicalg.c, pop_auth.c, postpone.c, protos.h, query.c, recvattach.c, remailer.c, rfc2047.c, rfc822.c, rfc822.h, sendlib.c, url.c: Declare many structures const (closes #3552) Many structs used in mutt are actually constant but are defined without the 'const' keyword. This can slow initialization (slightly) in some environments due to extra copying and increases the amount of writable RAM required at run-time, which can be significant on non-MMU systems. Using const can also increase the opportunities for compiler optimization. The attached patch marks many such structures as const. On my test x86 build, this reduces the size of .data by over 50%. 2011-12-03 11:07 -0800 Dan Fandrich (1ed2657f6e24) * ascii.c: Inline some small, often-used functions (closes #3551) When I first sent this patch to the mailing list in 2008, my benchmarking found a reduction in startup time of 15%. 2011-11-26 20:41 -0800 Vincent Lefevre (d7b14ea9f708) * po/fr.po: Updated French translation 2011-11-28 09:46 -0800 Michael Elkins (6f65f6d7d4c9) * enter.c: make kill-eow and kill-word consistent in considering words to consist only of alphanumeric characters. closes #3549. 2011-11-25 12:52 -0800 Michael Elkins (ab1b84289213) * sendlib.c: Check that $sendmail is set to avoid potential segfault. Closes #3548. 2011-07-13 11:05 -0500 David Champion (b01d63af6fea) * hcache.c: Invalidate header caches when spam rules change. closes #3473 User 'exg' on #mutt reported a problem when using header cache with IMAP and spam rules. Spam tags are retrieved from cache and not updated when spam rules change. 1. Enable header caching in muttrc 2. Set spam rules in muttrc 3. Use IMAP (or POP or Maildir). Your spam rules store spam tags into your message headers, and these get cached. 4. Quit mutt 5. Change your spam rules in muttrc 6. Relaunch mutt 7. Because of header caching, the rfc822 headers are not reparsed, and spam rules are not reapplied. User has outdated spam tags. Spam rules are applied during rfc822 header parsing because it's the only time we get a full and unadulterated view of all headers. Once header parse is done we have only processed headers and 'user headers' (X-headers). We might do spam rule matching against the struct HEADER copy of headers, except that: a. the header might not be in HEADER if it's non-standard and not an X-header; b. spam rules are regular expressions matching any arbitrary header line, and we would need to map these regexps to the header used to create the HEADER fields. This would change the syntax and behavior of spam rules dramatically. One solution, perhaps stopgap, is to invalidate the header cache when spam rules change. That's what this patch does. It alters the hcache versioning algorithm so that in addition to using the compiled-in checksum of mutt's structures definitions, we also mix in the user's runtime spam rules. Any time spam rules change the hcachever hash value changes, causing the hcache to be rewritten. 2011-07-01 18:21 -0700 Brendan Cully (54a454492bd0) * ChangeLog: Update ChangeLog 2011-07-01 17:23 -0700 Brendan Cully (94eee9410f7a) * version.sh: version.sh: fix(?) failure due to bizarre sh quoting rules I have not checked POSIX, and sh quoting always makes my head hurt, but this seems to suffice for my sh (actually bash in sh mode) when HGROOT contains a space. 2011-05-23 13:22 +0200 Olaf Hering (81a7c41040bf) * browser.c, browser.h: folder_file: change type of new from short to int As requested by Rocco Rutte in bug #2421 increase the type to int. Signed-off-by: Olaf Hering * pgppubring.c: fix gcc 4.6 warning -Wunused-but-set-variable in pgppubring.c pgppubring.c: In function 'pgp_parse_pgp3_sig': pgppubring.c:424:17: warning: variable 'hashalg' set but not used [-Wunused-but-set- variable] pgppubring.c:423:17: warning: variable 'pkalg' set but not used [-Wunused-but-set-variable] Signed-off-by: Olaf Hering 2011-06-29 12:01 -0500 David Champion (8b5e41c6a517) * version.sh: version.sh: 1003.1 "-k" instead of obsolete "+" syntax (closes: #3528) * configure.ac, version.sh: version.sh: support building outside of source directory Reported by Emanuele Giaquinta . Thanks also to Michael Elkins . 2011-06-25 20:07 -0700 Brendan Cully (b477d7c5733e) * imap/command.c: Parentheses suggested * imap/command.c: Do not subscribe to \noselect mailboxes. Closes #3445 2011-06-25 15:42 -0700 Honza Horak (0e4f1782ea2e) * imap/message.c: Avoid creating sparse ctx array when fetch responses are ignored. Closes #3288. 2011-06-25 15:23 -0700 Brendan Cully (53dcb3a21da4) * compose.c, muttlib.c: Silence some eclipse warnings 2011-06-20 16:39 -0700 Michael Elkins (b574d6f9f532) * sendlib.c: rfc2047 encode recipient list in resent-to header field. closes #3512 * rfc822.c: copy idn status when duplicating address object 2011-06-20 16:07 -0700 antonio (1bb9002567c4) * doc/manual.xml.head: fix regexp example in documentation 2011-06-18 21:29 -0700 antonio (b9856206eee4) * mutt_ssl_gnutls.c: Remove the deprecated gnutls_certificate_verify_peers() in favour of the new gnutls_certificate_veirfy_peers2() Reported on http://bugs.debian.org/624085 closes #3516 2011-06-18 21:07 -0700 Michael Elkins (beebe6a4d25d) * imap/auth_login.c: clear logging in message when login succeeded. closes #3524 2011-05-23 12:59 +0200 Olaf Hering (8570f8a10572) * smime.c: fix gcc 4.6 warning -Wunused-but-set-variable in smime.c smime.c: In function 'smime_handle_entity': smime.c:1663:8: warning: variable 'last_pos' set but not used [-Wunused-but-set-variable] Signed-off-by: Olaf Hering * pgp.c: fix gcc 4.6 warning -Wunused-but-set-variable in pgp.c pgp.c: In function 'pgp_application_pgp_handler': pgp.c:254:8: warning: variable 'start_pos' set but not used [-Wunused-but-set- variable] Signed-off-by: Olaf Hering * crypt-gpgme.c: fix gcc 4.6 warning -Wunused-but-set-variable in crypt-gpgme.c crypt-gpgme.c: In function 'show_one_sig_status': crypt- gpgme.c:1311:21: warning: variable 'uid' set but not used [-Wunused- but-set-variable] crypt-gpgme.c: In function 'pgp_gpgme_application_handler': crypt-gpgme.c:2285:27: warning: variable 'anywarn' set but not used [-Wunused-but-set-variable] crypt-gpgme.c:2159:8: warning: variable 'start_pos' set but not used [-Wunused-but-set-variable] crypt-gpgme.c: In function 'crypt_getkeybystr': crypt-gpgme.c:4094:7: warning: variable 'match' set but not used [-Wunused-but-set-variable] Signed-off-by: Olaf Hering * rfc1524.c: fix gcc 4.6 warning -Wunused-but-set-variable in rfc1524.c rfc1524.c: In function 'rfc1524_expand_filename': rfc1524.c:453:20: warning: variable 'r' set but not used [-Wunused-but-set-variable] Signed-off-by: Olaf Hering * compose.c: fix gcc 4.6 warning -Wunused-but-set-variable in compose.c compose.c: In function 'redraw_crypt_lines': compose.c:113:7: warning: variable 'off' set but not used [-Wunused-but-set-variable] Signed-off-by: Olaf Hering * imap/imap.c: fix gcc 4.6 warning -Wunused-but-set-variable in imap.c imap.c: In function 'imap_open_mailbox': imap.c:558:15: warning: variable 'conn' set but not used [-Wunused-but-set-variable] imap.c: In function 'imap_open_mailbox_append': imap.c:777:15: warning: variable 'conn' set but not used [-Wunused-but-set-variable] imap.c: In function 'imap_subscribe': imap.c:1816:15: warning: variable 'conn' set but not used [-Wunused-but-set-variable] imap.c: In function 'imap_complete': imap.c:1944:15: warning: variable 'conn' set but not used [-Wunused-but-set-variable] Signed-off-by: Olaf Hering 2011-05-22 22:13 -0700 Brendan Cully (1fc2afbf9e3a) * keymap.c, mbox.c: Fix some minor warnings 2011-03-30 07:52 -0700 Michael Elkins (f7160c94ff70) * keymap.c: fix bug where SIGWICH is ignored when $imap_keepalive < $timeout closes #3507 2011-03-07 10:17 -0600 David Champion (8d0281f79b21) * configure.ac, dotlock.c, mutt.h, version.sh: Extra information in mutt version string, redux. Restores [f1b4d1d17200] functionality with a slight change to keep 'make dist' working (see backout in [6b38124a5b81]). Automake is too much voodoo for me at this time, so I let it keep VERSION. mutt.h defined MUTT_VERSION as VERSION and the code used that, so I removed MUTT_VERSION from mutt.h and put it into config.h via configure.ac. A couple of tweaks were needed elsewhere. This restores the fancy-versioning feature within mutt and keeps 'make dist' happy. 2011-03-06 07:31 -0800 Brendan Cully (6b38124a5b81) * configure.ac, version.sh: Back out f1b4d1d17200. It is nice, but it breaks make dist. 2011-01-03 13:19 -0600 David Champion (b107737c415c) * patchlist.sh: Include mq-based patches in the mutt patch list. This augments the contents of the PATCHES file, so that mq-based builds do not need to maintain that file. * configure.ac, version.sh: Include extra information in mutt version string for developer builds. When a build is based on an hg clone, include extra information about the changeset node, distance from a tagged release, and mq applied patch count. For example, after this patch is applied my mutt build identifies itself (in mutt -v and in ) as: Mutt 1.5.21+26,mq+22 (7edc2073390d) (2010-09-15) I have applied 26 changesets applied since 1.5.21 was tagged, 22 of which are in my mq patch series. A 1.5.21 release build that is not mercurial-based would still appear simply as "1.5.21". 2011-02-21 23:12 -0800 Brendan Cully (047bd501d6db) * UPDATING, init.h: Lower $imap_keepalive default to 300 seconds 2010-12-30 10:09 -0800 Brendan Cully (f01b306ebe0e) * sendlib.c: Handle missing : in write_one_header debug statement. Closes #3483 2010-10-13 07:38 -0700 Ralf Wildenhues (57568da7d9aa) * thread.c: fix a minor logic error in thread.c, and a dead code line 2010-10-11 07:56 -0700 Michael Elkins (033acdc0a947) * pager.c: Backed out changeset 11399121296a 2010-10-07 14:43 -0700 Michael Elkins (11399121296a) * pager.c: support non-breakable space character in the pager 2010-10-01 07:14 -0700 Michael Elkins (1a4c43138685) * muttlib.c: fix segfault when $message_cachedir is set and opening a POP3 mailbox. fixes #3457 2010-09-30 18:11 -0700 Roman Kagan (c10f8863e979) * crypt-gpgme.c: use gpgme_strerror() in lieu of gpg_strerror() 2010-09-29 14:17 -0700 Michael Elkins (a23835db228d) * globals.h, handler.c, init.h, mutt.h, rfc3676.c: Add $reflow_text boolean, and $reflow_wrap variables to control display of format=flowed text parts. * rfc3676.c: fix typoh in comment * rfc3676.c: fix handling of format=flowed when $wrap is 0. 2010-09-23 11:06 -0700 Michael Elkins (f2452f1f1fef) * rfc2047.c: RFC2047 encode/decode the group name in an address list. closes #3317 2010-09-23 06:56 -0700 Ivan Vilata i Balaguer (51ee8e8a56bb) * po/ca.po: updated Catalan translation 2010-09-20 14:04 +0100 Emanuele Giaquinta (d2f10c550d90) * mbox.c: Fix typo 2010-09-16 07:19 -0700 Vsevolod Volkov (0ca7ed91fe7f) * po/ru.po: update ru.po for 1.5.21 2010-09-15 11:47 -0700 me (59aad6c21703) * regex.c: fix compile error with --with-regex and --without-wc-funcs 2010-09-15 10:53 -0700 Brendan Cully (bd0afbb35c65) * UPDATING: Belatedly update UPDATING 2010-09-15 10:21 -0700 Brendan Cully (b42be44bb41a) * .hgsigs: mutt-1.5.21 signed 2010-09-15 10:10 -0700 Brendan Cully (9c7bd63635de) * .hgtags: Added tag mutt-1-5-21-rel for changeset 25a7f8f7d50d 2010-09-15 10:10 -0700 Brendan Cully (25a7f8f7d50d) * VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.5.21 2010-09-15 10:05 -0700 Michael Elkins (54e3139a0362) * safe_asprintf.c: suppress check_sec errors 2010-09-13 17:25 -0700 Michael Elkins (20b2d496349f) * init.h: make $mail_check_recent set by default 2010-09-13 19:00 +0100 Emanuele Giaquinta (fea3860ff672) * imap/command.c: Restore the previous behaviour of checking for new messages in imap folders when mail_check_recent is set. 2010-09-12 19:54 -0700 Michael Elkins (a51df78218e8) * buffy.c, buffy.h, imap/command.c, init.h, mbox.c, mutt.h: add $mail_check_recent boolean to control whether Mutt will notify about all new mail, or just new mail received since the last visit to a mailbox closes #3271 partly addresses #3310 * smime.c: fix crash when index contains 0 keys 2010-09-11 07:34 -0700 Michael Elkins (0f962f1a6bbb) * send.c: Allow setting message security in send2-hook This patch delays checking the message security options until after the user has an initial chance to edit the message. This allows the security options to be set in a send2-hook when using $edit_headers. Without this patch, the user has no way of automatically setting security based on recipients since the to/cc prompts are bypassed. The other change in behavior is if the user happened to use a send2-hook to see if the message had security applied *prior* to editing the message, that no longer works. * keymap.c, keymap.h, main.c: support for ncurses extension allowing binding to function keys with modifiers * keymap.c: allow octal codes with more than three digits * crypt-gpgme.c, mime.h, pgp.c, recvattach.c, sendlib.c: add DISPNONE to mean no preferred Content-Disposition; make pgp-signature parts DISPNONE for multipart/signed * recvcmd.c: fix problem with reply-hook not working when a message/rfc822 attachment is selected * rfc2047.c: more lenient RFC2047 decoding: accept illegal spaces and bare question marks in encoded words * curs_main.c, mx.c: fix crash when new mail is received during IMAP IDLE closes #3335 2010-08-25 00:30 +0100 Emanuele Giaquinta (5302767aa6aa) * rfc2047.c: Use mutt_substrdup in rfc2047_decode_word 2010-08-24 16:40 -0700 Michael Elkins (92b02f77e780) * rfc2047.c: detect failure to decode word and copy raw string instead; avoids calling strlen() on uninitialized memory closes #2923 2010-08-24 18:39 +0100 Emanuele Giaquinta (ebd4beafe5eb) * mutt_ssl.c: Fix typo. * browser.c, hook.c, init.c, menu.c, mutt_ssl_gnutls.c, pager.c: Do not call regfree if regcomp fails. The content of the regex_t structure is undefined in this case. * curs_lib.c, mutt_ssl_gnutls.c: use REGCOMP() macro 2010-08-24 10:03 -0700 Michael Elkins (5d59c8b737ba) * init.c: add REG_ICASE accidentally removed in changeset 1a35f096c8cb * muttlib.c: do not print debug message on ENOENT 2010-08-14 09:18 -0700 Michael Elkins (04fd8ddea579) * url.c: avoid c99 syntax for backwards compat 2010-08-06 21:52 +0200 Matthias Andree (24a7b1aa2e55) * buffy.c: Fix comparison signedness warnings. 2010-08-12 16:04 -0700 Michael Elkins (ced5d3dca974) * imap/util.c: Fix bug in imap_keepalive() which erroneously free Context when the IMAP connection is shut down by the server. Closes #3410 * url.c: url_parse_mailto should return 0 on success fix memory leak errors when unable to parse mailto: URL closes #3441 * mh.c: always update message body size when parsing a maildir message * safe_asprintf.c: call va_end() even when vasprintf returns <0 2010-08-09 20:48 -0700 Michael Elkins (6572e8bcd723) * Makefile.am, imap/message.c, lib.c, lib.h, safe_asprintf.c: rename mutt_sprintf() to safe_asprintf() to match the GNU extension that performs a similar task 2010-08-09 10:27 -0700 Vincent Lefevre (e86ee9991dc3) * postpone.c: In postpone.c, function mutt_num_postponed, the old {{{OldPostponed}}} is never freed. closes #3442 2010-08-09 09:38 -0700 Michael Elkins (8051fc8b631c) * send.c: clear the real name when $reverse_realname is unset and a match is hit so that $realname can be set in a reply- or send-hook closes #3427 * doc/manual.xml.head: fix example of mailto: use on the command line * pager.c: fix buffer underrun when processing ANSI escape sequences closes #3371 2010-08-08 12:29 -0700 Michael Elkins (4dcf19c58139) * doc/manual.xml.head, doc/mutt.man: document support for mailto: URLs on the command line closes #3400 * imap/message.c: avoid error when the user has requested many extra headers via IMAP closes #3435 * lib.c, lib.h: add a malloc+sprintf combo function 2010-08-08 10:21 -0700 Fabian Groffen (d4d703e21cdd) * pattern.c: fix crash in limit when user enters invalid regexp closes #3417 2010-08-07 06:44 -0700 Michael Elkins (cc881d855f05) * mutt_ssl.c: Fix comparison signedness warnings * pop_lib.c: add comment about safety of cast 2010-08-06 21:58 +0200 Matthias Andree (55f50b2db1f8) * pop_lib.c: Fix comparison signedness warning. * status.c: Fix signedness warning. * .hgignore: Ignore backup files ending in a tilde character. * url.c: Fix comparison signedness warnings. * gnupgparse.c, pop_auth.c: Fix comparison signedness warnings. * lib.h: Resolve if/else empty body ambiguity/warnings when compiling without DEBUG. 2010-08-06 17:08 -0700 Michael Elkins (5b15d4d96277) * configure.ac, init.c, protos.h: detect availablity of 'long long' cast time_t to 'long long' prior to bitshifting since it can be a float value according to POSIX.1-2008 closes #3439 2010-08-06 21:22 +0200 Matthias Andree (bf13863e682e) * md5.c: Drop declaration for unused argv/argc parameters. Fixes GCC warning with -Wextra. 2010-08-06 13:11 -0700 Michael Elkins (998ca956b41b) * init.c, muttlib.c: use a 64-bit random value in temporary filenames. closes #3158 * browser.c: avoid using C99 bool * browser.c, init.h: add %D format string to $folder_format to expand the time based on $date_format. properly set the locale for LC_TIME prior to calling strftime() closes #1734 closes #3406 * mutt_ssl.c: fix compiler warning about wrong type for SslSessionCerts 2010-08-06 09:58 +0200 Matthias Andree (473fbe29f626) * mutt_ssl.c: Unbreak X.509 SubjAltName checks, regression in 6016:dc09812e63a3 that calls strlen on an SSL sk rather than its string payload. closes #3426 2010-08-06 07:12 -0700 Michael Elkins (4ae33a8a1391) * configure.ac: properly set _XOPEN_SOURCE to 600 (POSIX.1-2004) when detecting th wc*() functions closes #3341 2010-08-05 21:57 -0700 Michael Elkins (bc5fb152e2ba) * mbox.c: when parsing From_ lines in mmdf/mbox, the TZ should be computed based on the time in the string rather than the current time, otherwise DST issues cause the computed time to be wrong. closes #2177 * thread.c: explanatory comments 2010-08-05 17:03 -0700 andreas (0666d9588eac) * curs_main.c, functions.h: do not leave pager when changing sort order. closes #2143 2010-08-05 16:47 -0700 Michael Elkins (57d4b3839172) * curs_main.c: do not leave pager when using read-thread and read- subthread closes #2137 2010-08-04 17:04 -0700 Petr PísaÅ™ (59ca5d7b1656) * ChangeLog, po/cs.po: Updated Czech translation 2010-08-04 06:37 -0700 Vincent Lefevre (a7f05f29d9bc) * po/fr.po: updated French translation 2010-08-03 10:10 -0700 Michael Elkins (2c42f4760c8f) * browser.c: add locale.h for compililng with -std=c99 * main.c: adjust help for -a to make it clearer that -- is required terminator 2010-07-31 08:21 -0700 Michael Elkins (7cd85c18bfaf) * muttlib.c: Fix buffer underflow in expansion of format pipes. Add better error detection. Closes #3432. 2010-07-18 14:24 -0700 Michael Elkins (1a35f096c8cb) * init.c: use REGCOMP() macro 2010-07-18 22:09 +0100 Emanuele Giaquinta (d0e0d174d620) * init.c: Skip 'attachments' directive if minor type is not a valid regexp 2010-07-09 11:07 -0700 Joel Dahl (6b13e8319c1f) * po/sv.po: fix misspelling in Swedish translation 2010-05-18 08:39 -0700 Michael Elkins (29e37994a536) * send.c: Consider any negative return value from send_message() to be an error and allow the user to resend. Closes #3411. 2010-04-24 16:10 -0700 Brendan Cully (4cd2daafd03b) * mutt_ssl.c: openssl: only call SSL_shutdown during clean shutdown (closes #3407) 2010-04-22 09:14 -0700 Vincent Lefevre (6ebdfd09abc1) * po/fr.po: updated French translation 2010-04-14 15:47 -0700 Michael Elkins (15b9d6f3284f) * pgp.c: remove toggle and replace with format in pgp-menu 2010-04-12 15:13 -0500 David Champion (41a46373ddd9) * compose.c: Improve clarity/uniformity in compose menu's crypto display Incorporates feedback on "Security: None" key hints. 2010-04-13 06:49 -0700 Michael Elkins (4d798ee2898e) * muttlib.c: fix bug handling wide pad char in soft-fill mode 2010-04-11 20:00 -0700 Michael Elkins (2cd62f40d840) * compose.c: increase size of buffer used for displaying addresses in the compose menu to avoid truncating on widescreen displays * curs_lib.c: clear prompt when user cancels with ^G from a yes/no prompt * muttlib.c: Fix bug in soft-fill (%*) in $index_format not accounting for 'set arrow_cursor' * pgp.c: Remove the (i) option from the PGP-menu when encryption or signing is not yet selected. The toggle between PGP/MIME and Traditional doesn't make sense unless some type of security has been requested. Closes #3402. 2010-04-06 09:47 -0700 Michael Elkins (889aa698cc49) * configure.ac, muttlib.c: fix for compiling Mutt with clang: check for wchar_h prior to wctype_h in check for wc funcs 2010-04-05 11:12 -0700 Michael Elkins (844174efa648) * doc/manual.xml.head: [doc] Remove bogus -group parameter from unlists and unsubscribe commands; add links to address group section for context. 2010-04-03 20:34 -0700 Michael Elkins (cf97505addf8) * init.c: prevent user from setting $charset to an empty string since other code requires it to be set to a valid string closes #3326 * pager.c: allow regexps to match on continuation header lines in 'color header' commands. closes #3373 * pattern.c: Fix crash on invalid regexp in search string due to uninitialized BUFFER variable. Closes #3401 2010-04-01 10:10 -0700 Simon Ruderich (b9baa0234846) * attach.c, commands.c, filter.c, muttlib.c, send.c: fix comment typos 2010-04-01 09:59 -0700 Michael Elkins (96ed7cdacdc6) * init.h: Improve documentation for $query_command to note that Mutt automatically adds quotes according to shell quoting rules (thx: Simon Ruderich). * doc/manual.xml.head: Clarify the documentation on what the line- editor is (thx: Simon Ruderich) 2010-03-31 08:50 -0700 Michael Elkins (7e9e31b1bd7b) * muttlib.c: avoid buffer overflow when expanding the format string associated with a 'spam' command. closes #3397 2010-03-23 16:03 -0700 Michael Elkins (fe29d691deff) * doc/muttrc.man.head: remove errant commands in secton on setting alternates 2010-03-22 22:16 -0700 Brendan Cully (69e9a1a0ba2f) * sendlib.c: Fix a format string warning 2010-03-22 20:02 -0700 Marcel Telka (f544730656c1) * compose.c: redraw entire screen when exiting editor after re-editing the message body in the send menu. closes #3393. 2010-03-21 09:52 -0700 Michael Elkins (0a29e3f4f4b9) * sendlib.c: Do not assume whitespace follows the colon in a header field. Closes #3385. 2010-03-08 15:13 -0800 Brendan Cully (ad6d799951cb) * configure.ac: Comment about search libsasl for sasl2 functions 2010-03-08 14:04 -0600 Will Fiveash (b92b9c6a1c85) * configure.ac: OpenSolaris sasl fix for configure.ac 2010-03-08 15:00 -0800 Brendan Cully (05cec973f0d9) * pattern.c: When regexp compilation fails, report actual pattern along with error. * muttlib.c: mutt_buffer_printf: NULL dptr means use data * pattern.c: If regcomp fails, assume rx has not been allocated. Fixes a core dump for save-hook '~f foo\.bar@(something|other)\.com' =foo. 2010-03-02 11:31 -0800 TAKAHASHI Tamotsu (fec2720ff6ef) * rfc822.c: Fix #2014. Thanks to Vincent Lefevre for help with this one. 2010-03-02 11:16 -0800 Brendan Cully (41cf44ddbb4c) * copy.c: Fix thinko in [cc02f079b1b9] 2010-03-01 22:40 -0800 Brendan Cully (cc02f079b1b9) * copy.c: Guard dequote with NULL check on personal field * copy.c, rfc822.c, rfc822.h: Another attempt to dequote RFC2047-encoded address comments (see #2014) * rfc822.c: Backed out changeset 2a4ca6917fd0. It is incompatible with $assumed_charset (see #2014). 2010-02-28 23:03 -0800 Brendan Cully (2a4ca6917fd0) * rfc822.c: RFC-2047 decode address text before dequoting it (see #2014) * doc/manual.xml.head: Fix next-unread-mailbox name in documentation. Closes #3319. 2010-02-28 17:23 -0800 Antonio Radici (25459cbb132a) * po/de.po: Fix German translation of "No undeleted messages." (closes #3372) * pop_lib.c: pop: allow user-specified port to override default in URL. Closes #3322. 2010-02-28 17:00 -0800 ludwig (2c78b28027cc) * crypt-gpgme.c: GPGME: Sender verification should be canse- insensitive for domain names. Closes #2180 2010-02-26 18:18 -0800 Brendan Cully (40eca68c394a) * UPDATING, init.h: Make $thorough_search default to yes (closes #3386) 2010-02-23 12:42 -0800 Brendan Cully (57124ea5592e) * commands.c: Don't use freed ctx.path when updating utime of target mailbox in save-message. Thanks to Sean Boudreau for the bug report. 2010-02-22 23:01 -0800 Vincent Lefevre (f17302c10229) * po/fr.po: Updated French translation. 2010-02-21 13:16 -0800 Brendan Cully (a6fddecdc5f5) * curs_lib.c: Make mutt_yesorno use mutt_message to print query. Closes #3352. 2010-02-20 21:56 -0800 Gregory Shapiro (f723e07c8e6d) * OPS, UPDATING, curs_main.c, functions.h: Add imap-logout- all to log out of all IMAP connections. Closes #2880. 2010-02-17 00:47 -0800 Simon Ruderich (260d39279161) * doc/manual.xml.head: Document 'n' and 'o' flags in index * doc/devel-notes.txt, doc/muttrc.man.head, init.h, rfc1524.c: Spelling fixes 2010-02-10 23:29 -0800 Brendan Cully (b7ec848af36b) * doc/manual.xml.head: Fix a typo (closes #3379) 2010-02-01 23:40 -0800 Antonio Radici (e9965b78e92d) * po/sv.po: The Swedish translation has a suboptimal translation of the word "Bad" in several places. The proposed patch substitutes DÃ¥lig (which implies bad "as in quality", and not bad "as in error") for Felaktig (erroneous). Closes #3370. * init.h: Small fix to the muttrc manpage. Closes #3374 2010-01-13 19:12 +0100 Matthias Andree (e2c60de29015) * configure.ac: Fix hcache build on systems with $(EXEEXT), include it in mutt_md5. 2009-12-29 00:33 -0500 Brendan Cully (31881f38ca1e) * curs_lib.c: Hack mutt_wstr_trunc to treat M_TREE characters as 1 cell. Closes #3364. 2009-12-28 22:13 -0500 Brendan Cully (359de549b2d1) * doc/manual.xml.head: Remove spurious quotes from query_command example. Closes #3365. 2009-12-14 10:24 -0800 Brendan Cully (736b6af3c5f1) * rfc1524.c: Fix off-by-one errors in mailcap parser. Closes #3362 2009-12-10 22:52 -0800 Daniel Jacobowitz (b7d2cb7c7ce1) * hcache.c: Do not store header color in hcache. If the color directive is removed from muttrc, the cached value from the last directive would otherwise still be in effect. 2009-12-07 23:08 -0800 Patrick Welche (1cf34ea1f128) * mutt_ssl.c: STACK* is not defined with newer SSL, use STACK_OF instead. Closes #3356. 2009-12-07 22:46 -0800 Peter Rosin (fc9563de3dcb) * snprintf.c: Output %p as unsigned in the bundled snprintf 2009-11-14 14:31 -0800 Brendan Cully (6928f522ac48) * curs_main.c: Back out e67f4c347bb4. I could not reproduce the problem, and the change makes it impossible to change to a real folder when no folder is currently open. 2009-10-28 23:03 -0700 Brendan Cully (89fb586edda2) * sendlib.c: Unfold headers to wrap length in pager, when weed is set. From Rocco's patch queue. 2009-09-22 23:29 -0700 Antonio Radici (5037c59a589e) * po/it.po: Correct Italian translation of y/n/a prompt. Closes #3336 2009-08-27 22:10 -0700 Petr PísaÅ™ (605559e4f88f) * po/cs.po: Updated Czech translation. 2009-08-20 11:34 +0200 René Clerc (6b48ff4e69a3) * doc/manual.xml.head: No-brain documentation typo fix 2009-08-20 11:33 +0200 Rocco Rutte (e196cfc00105) * doc/manual.xml.head: Backed out changeset c9dd93b09ce7 2009-08-20 11:25 +0200 René Clerc (c9dd93b09ce7) * doc/manual.xml.head: No-brain documentation typo fix Hi Rocco, Attached a patch for the documentation that fixes a small typo I stumbled upon. If you'd rather have me opening a trac ticket, please say so; since this is such a no-brainer I figured I'd e-mail you directly. 2009-08-17 17:07 +0200 Rocco Rutte (d0fce0eec0b3) * doc/manual.xml.head, doc/muttrc.man.head, init.h: Doc: fix more typos * doc/Makefile.am, doc/mutt.pwl: Doc: fix aspell calls, add custom mutt-only wordlist * curs_main.c: Require already opened folder when using templates for change-folder. For example, start with -y and type a wrong IMAP password so that no mailbox is open. Trying to change folders resulted in a crash. 2009-08-14 21:29 +0200 Rocco Rutte (6a08a5244d60) * pattern.c: Clear last search pattern if it's invalid. Closes #3315. We keep both, the string version and compiled version around for search-next; however, in case of parsing errors we dropped only the compiled version and not the string one making the code attempting to perform a search using a NULL pattern. * pattern.c: Bail on missing pattern modifiers at end of pattern. Closes #3314. 2009-08-13 23:49 +0200 Rocco Rutte (f8d50e968853) * doc/Muttrc.head, doc/manual.xml.head, init.h: Docs: fix typos/style 2009-08-11 12:22 -0700 Tomas Hoger (dc09812e63a3) * mutt_ssl.c: Catch SSL null prefix attach (openssl) 2009-08-09 14:45 -0700 Brendan Cully (002b4676d502) * buffy.c: Add buffy_new and buffy_free abstractions. 2009-08-09 14:53 +0200 Christian Ebert (0153dbc12dc4) * doc/manual.xml.head: manual: fix wrong spell checker assumptions 2009-08-09 14:35 +0200 Rocco Rutte (59b4c73e7254) * doc/manual.xml.head: Manual: Fix typos, consequently use en_US spelling 2009-08-08 22:50 -0700 Brendan Cully (d4ea7f571f10) * buffy.c: Split out mailbox-specific code in mutt_buffy_check * buffy.c, muttlib.c, mx.c, mx.h, status.c: Unconditionally define M_IMAP, M_POP. These aren't bloat, and not having them creates a lot of #ifdef clutter. * curs_lib.c: Abort prompt on ^C, as was the case prior to 12a6de725483 2009-08-04 10:47 -0700 Vincent Lefevre (15a695678b7b) * po/fr.po: Updated French translation. 2009-08-04 12:34 +0200 Rocco Rutte (25c2d70f2f00) * doc/manual.xml.head: Manual: Add some words of warning to really remove IRT header when intended * doc/manual.xml.head: Manual: Put mailbox shortcuts into table for readability * doc/manual.xml.head: Manual: Fix docs for push/exec 2009-08-04 12:08 +0200 Johan D (14bb498c6a1c) * mh.c: Fix MH parsing, fixes [0698e8195545]. Closes #3312 2009-08-01 15:16 +0200 Rocco Rutte (29727d19634a) * doc/manual.xml.head: Manual: use full names for é and è entities. Closes #3286. This is necessary because we want to install a us-ascii manual.txt that would contain only "e" instead of accented characters. 2009-07-30 17:56 +0200 Rocco Rutte (4a572310c3b5) * main.c: Fix mutt -h output for -a/-- options 2009-07-29 13:26 -0700 Brendan Cully (a2a4286491b4) * hcache.c, hcache.h, imap/util.c: Harmonize hcache uidvalidity size to unsigned int (per IMAP RFC). Closes #3296. 2009-07-28 23:16 +0200 Rocco Rutte (153eac9e03e7) * Makefile.am: Add group.h to distribution * group.c, group.h, init.c, rfc822.c: Fix some issues with ungroup [...] * 2009-07-27 21:14 -0700 Kees Cook (2fc9348684fe) * mh.c: Properly propagate mh_read_sequences result. Closes #3308. 2009-07-27 20:49 -0700 Brendan Cully (5c076ed18883) * configure.ac: Do not overwrite docdir unless --with- docdir was explicitly given. This allows --docdir from autoconf 2.60+ to work, though if given --with-docdir will silently override --docdir. Closes #3282. 2009-07-24 14:30 +0200 Rocco Rutte (86e066a206ac) * po/de.po: Update German translation * init.c: Fix check_sec.sh warning 2009-07-23 23:36 -0400 Aron Griffis (0ee27568ad09) * init.c: fix :reset to work with empty strings Signed-off-by: Aron Griffis 2009-07-23 23:32 -0700 Vincent Lefevre (223020f50cb7) * po/fr.po: Updated French translation. 2009-07-23 23:51 +0200 Matthias Andree (1e77b368ef55) * charset.h, rfc2047.c: Use proper prototype for mutt_get_default_charset(), fix fallout. * bcache.c, charset.c: Fix two warnings "the address of 'foo' will always evaluate as 'true'". 2009-07-23 17:28 +0200 Rocco Rutte (1597c2074a52) * doc/manual.xml.head: Manual: better document what address groups are (for) * group.c, group.h, init.c, init.h, pattern.c, protos.h, rfc822.c, rfc822.h: Implement ungroup command. Closes #3304. * init.c, mutt.h, muttlib.c: Move remove_from_rx_list() to muttlib.c, name it mutt_remove_from_rx_list() 2009-07-22 15:25 +0200 Fabian Groffen (d41e043fa775) * keymap.c: Use CRYPT_BACKEND_GPGME instead of non-existent HAVE_GPGME 2009-07-22 14:43 +0200 kees (848f08512bf3) * hcache.c, rfc822.h: Properly restore addresses from hcache using rfc822_new_address(). Closes #3302. * mh.c: Don't leak mhs flags in mh_buffy(). Closes #3303. 2009-07-17 17:57 -0400 Aron Griffis (a3c4b605cfad) * UPDATING: add batch mode send-hooks note to UPDATING 2009-07-14 20:25 -0700 Aron Griffis (084fb086a0e7) * send.c: Make send-hooks work for batch mode. Closes #3219. Handle SENDBATCH inline with the normal sending code, instead of handling it separately. This allows send-hooks to run, along with removing a number of unnecessarily lines of code. 2009-07-11 14:52 +0200 Rocco Rutte (6f942afe60b5) * charset.c, mbyte.c: Recognize charset extensions, see #3150. With utf-8//TRANSLIT, we internally didn't recognize it as utf-8. This leads to badly broken behaviour if --without-wc-funcs is used for some reason. In that case, if we have utf-8 as charset, we implement our own wide char functions; for all other charsets, we use the system single-byte locale functions. And using these with utf-8 is broken. * curs_lib.c: Render blanks to spaces in index, fixes [298194c414f0] wcwidth() returns -1 so 'foobar' was rendered to 'foobar', and now to 'foo bar'. Closes #3270 again. 2009-07-08 13:37 +0200 Rocco Rutte (f22b71d8005a) * mbyte.c: Fix compiler warning 2009-07-07 15:03 +0200 Rocco Rutte (d5e03a46518c) * TODO: Update TODO 2009-07-07 10:49 +0200 Matthias Andree (cc4d6044b31e) * INSTALL: GNU-make based VPATH builds work. 2009-07-07 13:16 +0200 Rocco Rutte (f161c2f00d84) * UPDATING, bcache.c, doc/manual.xml.head, hcache.c, muttlib.c, protos.h: Make hcache+bcache paths always UTF-8. Closes #3284. * UPDATING, globals.h, init.h, sendlib.c: Add $wrap_headers. Closes #3135 * doc/manual.xml.head: Manual: mention terminal setup for charsets, more unicode pros. Closes #3292. 2009-07-06 15:28 +0200 Rocco Rutte (ccab6c56b557) * doc/manual.xml.head: Manual: Add a note about when/why to use utf-8 2009-07-05 18:36 -0700 Brendan Cully (118b8fef8aae) * buffy.c, buffy.h, mx.c: Suppress new mail notification from mailbox just left. Closes #3290. 2009-07-02 20:42 +0200 Rocco Rutte (042f2ce0b870) * doc/manual.xml.head: Manual: minor fixes * doc/manual.xml.head, doc/mutt.css: Manual: Render comments in examples a lighter for readability * doc/manual.xml.head, doc/manual.xml.tail: Manual: Reformat paragraphs, fix ˜ -> ~ breakage * doc/manual.xml.head: Manual: rework MIME chapter a bit * doc/gen-map-doc, doc/manual.xml.tail, functions.h: Manual: Generate more pretty titles/ids for key binding tables * doc/manual.xml.head: Manual: fix supported version numbers for mixmaster 2009-07-02 00:06 -0700 Brendan Cully (029ba140fb48) * curs_main.c: Handle keepalive failure when changing folders. There are probably many other places where this kind of thing could happen though. See #3028. 2009-07-01 18:13 -0700 Rocco Rutte (f6c6066a5925) * account.c, mutt_sasl.c, smtp.c: Make getuser/pass abort if input is required in batch mode. Replaces [0a3de4d9a009]. See #3289. * doc/manual.xml.head: Manual: Add detailed section on charset handling * smtp.c: SMTP: use $smtp_pass in batch mode. Closes #3289. mutt_account_getpass() copying the password from $smtp_pass into the account structure is only called from the SASL callback we only use if we're sure we don't need curses (i.e. have the pass already). 2009-06-30 17:32 +0200 Rocco Rutte (f4baa2f1251a) * pgpewrap.c: Add missing config.h include to pgpewrap.c It technically doesn't need it, but pgpewrap should be rebuilt after configure ran, too. * doc/Makefile.am: Manual: Run lynx with --display_charset =us-ascii, see #3286. 2009-06-29 18:20 +0000 Rocco Rutte (03c65df651e0) * UPDATING, doc/manual.xml.head: Manual: Move new mail detection into its own section This also updates some parts of docs and adds missing ones. It also adds a note about the recent changes, also to UPDATING. 2009-06-29 18:03 +0200 Rocco Rutte (d3a7e0334e5d) * url.c, url.h: Revert URL path encoding for now It breaks gmail url display and makes bcache use different paths. Still we need to think about whether we want to allow any character in bcache paths (possibly multibyte, possibly depending on $charset). 2009-06-28 20:49 -0700 Brendan Cully (298194c414f0) * configure.ac, curs_lib.c: Allow tabs in index subject. Closes #3270. * imap/util.c: Allow ImapDelimChars to be unset * mutt.h: Rename struct thread to struct mutt_thread. Closes #3279. * imap/command.c: Not being able to start an IMAP command is a fatal error. Closes #3155. * imap/auth_login.c: IMAP LOGIN does not support separate user and login accounts. Use the user account for both. Closes #3240. 2009-06-28 22:40 +0200 Rocco Rutte (71a84cf22c42) * url.c, url.h: Fix URL parser to encode paths 2009-06-28 15:42 +0200 Deng Xiyue (fe688db8099a) * po/zh_CN.po: Update Simplified Chinese translation. Closes #3281. 2009-06-27 17:07 +0200 Rocco Rutte (7ca8d09f7d2c) * hg-commit: hg-commit: drop changelog entries from hg log * doc/makedoc.c, doc/manual.xml.head: Manual: stop using DocBook entities mapping to ascii chars There's no real benefit, it only makes reading/writing the manual harder. All entities that potentially map to non-ascii characters (&mdash, ä, etc.) are left so that manual.xml remains pure ascii. 2009-06-26 21:47 -0700 Brendan Cully (b2b97c7a2ae6) * imap/imap_private.h, imap/message.c, imap/util.c: Set internaldate of messages appended to IMAP mailboxes 2009-06-26 20:27 +0200 Rocco Rutte (156e6d6e34fc) * doc/manual.xml.head: Manual: try to explain that and why copiousoutput should come last * po/de.po: Update German translation 2009-06-25 21:46 +0200 Rocco Rutte (c5d0252e8f72) * rfc3676.c: Fix f=f corner case with DelSp=yes abuse * sendlib.c: header folding: treat From_ specially, never wrap on sending side * sendlib.c: Add Date: header to postponed messages * sendlib.c: Only add Status: header (fcc/postpone) when saving to mbox/mmdf * compose.c: Treat messages written with as fcc, not postponed. 2009-06-23 10:13 -0700 Vincent Lefevre (bc2463863c15) * po/fr.po: Updated French translation. 2009-06-23 16:56 +0200 Rocco Rutte (d152033cf967) * doc/manual.xml.head: Manual: Simply type conversion section wording. * Makefile.am, configure.ac: Don't build hcversion.h and mutt_md5 without hcache * handler.c, mutt.h, muttlib.c: Implement state_putws() and state_putwc(), see #3148. This is needed to unbreak text/enriched rendering on Linux. * commands.c: Only use keypad() when curses is running 2009-06-23 00:28 -0700 Vincent Lefevre (642987450d83) * curs_lib.c: Only beep when displaying error messages (unbreaks [54bc1ef602e7]) 2009-06-23 00:20 -0700 Brendan Cully (f5849c72a274) * crypt-gpgme.c: Update crypt-gpgme for mutt_mktemp change in [ed7eb5de7536] 2009-06-22 17:36 +0200 Rocco Rutte (54bc1ef602e7) * curs_lib.c: Make mutt_curses_(error|message) format message to COLS chars. Closes #3278. While I'm at it, fold both functions into one. 2009-06-22 17:21 +0200 Alexey Tourbin (e378bbdc3f0f) * smime_keys.pl: smime_keys: use Time::Local module. Closes #3277. 2009-06-22 17:17 +0200 Rocco Rutte (4899f140ec25) * mbyte.c: Fix included iswupper(). Closes #3276. * lib.c: Catch range errors when converting to long. 2009-06-21 21:57 +0200 Rocco Rutte (ed7eb5de7536) * attach.c, commands.c, crypt.c, editmsg.c, handler.c, headers.c, help.c, history.c, imap/message.c, main.c, mbox.c, muttlib.c, mx.c, pattern.c, pgp.c, pgpkey.c, pgpmicalg.c, pop.c, protos.h, recvattach.c, recvcmd.c, rfc3676.c, send.c, sendlib.c, smime.c: Pass buffer size to mutt_mktemp() * handler.c, rfc3676.c: Port f=f and text/plain handlers to mutt_read_line() * lib.c: mutt_read_line(): make line counting ptr optional * sendlib.c: Silently drop headers not in "key: value" format. Fixes out-of-memory exits. 2009-06-20 23:09 +0200 Rocco Rutte (6447ebe80797) * handler.c: f=f: Don't kill signature separator when stripping trailing spaces. Closes #3275. * curs_main.c: Disallow breaking threads for messages not part of a thread 2009-06-20 15:22 +0200 Rocco Rutte (580ab0256c49) * doc/manual.xml.head: Manual: Clarify and extend variable type conversion section 2009-06-19 19:56 -0400 Aron Griffis (ee3d174297bb) * rfc822.c: remove bogus FREE It's impossible for cur->personal to be non-NULL at this point, since cur was calloc'd just a couple lines prior. Signed-off-by: Aron Griffis 2009-06-19 22:49 +0200 Rocco Rutte (9ae13dedb5ed) * mbox.c, mx.c, mx.h: Fixup atime for mbox/mmdf also when mailbox is unchanged but has new mail. See #1362. * mbox.c: Don't mangle atime/mtime for mbox folders without new mail upon sync. Closes #1362, #3271. * doc/manual.xml.head: Manual: Add note and example for type conversions with my_vars * sendlib.c: Enforce 998 char length limit on header lines when sending. 2009-06-18 15:06 +0200 Antonio Radici (c6fe0bb8cf11) * doc/Makefile.am, doc/smime_keys.man: Provide smime_keys(1). Closes #3272. 2009-06-18 14:56 +0200 Rocco Rutte (508bfe4a2e23) * mbox.c: Backout experimental patch * UPDATING, mbox.c: UPDATING: add note about -a and -- 2009-06-17 16:19 -0700 Antonio Radici (25e46aad362b) * buffy.c: Do not free statically-allocated buffy buffer. Unbreaks unmailboxes, closes #3273. 2009-06-17 15:23 -0700 Petr PísaÅ™ (fe94f01b369a) * ChangeLog, po/cs.po: Updated Czech translation. 2009-06-17 13:58 -0700 Ivan Vilata i Balaguer (ef9b67c7ebc4) * po/ca.po: Updated Catalan translation. 2009-06-17 13:57 -0700 Vincent Lefevre (62471a5d3186) * po/fr.po: Updated French translation. 2009-06-17 20:42 +0200 Rocco Rutte (33376ae23d8f) * doc/devel-notes.txt: Mention check_sec.sh in doc/devel-notes.txt 2009-06-17 11:09 -0700 Brendan Cully (7f37d0a57d83) * crypt-gpgme.c, pgp.c: Display unsigned part of traditional PGP messages. Unbreaks [e2780a423d96], closes #3269 2009-06-17 19:29 +0200 Antonio Radici (a2a868fc40ea) * mx.c: Leave error handling of mx_get_magic() up to the caller. Closes #3268. 2009-06-17 18:02 +0200 Rocco Rutte (4b5326d8d2ee) * UPDATING, muttlib.c: Always display text/* parts inline, overrideable by auto_view. Closes #3246. 2009-06-15 22:05 +0200 Rocco Rutte (f40de578e8ed) * handler.c: Unbreak header weeding for message/rfc822 parts. Closes #3265. * init.c, lib.c, lib.h: Print timestamps in debug files. Closes #3263. * doc/manual.xml.head, doc/muttrc.man.head: bind: Clarify function argument usage * doc/manual.xml.head, init.h, url.c: Fixup URL parser The fixes are: 1) allow / in usernames for IMAP (by %-encoding /, : and % when pretty-printing urls), 2) for POP/SMTP the trailing / is no longer mandatory, 3) more strict %-decoding to avoid unexpected results 2009-06-15 17:49 +0200 Bertrand Janin (abc8fa0abeee) * UPDATING: Fix UPDATING 2009-06-15 17:06 +0200 Rocco Rutte (d6f88fbf8387) * url.c: Don't parse URL port as signed short, but to int and cast to unsigned short. Closes #3264. * doc/manual.xml.head: Manual: Add a short note about new header folding ...so we don't get bug reports for tab folding. * init.h: Clarify what $wrap=0 does * doc/mutt.css: CSS update for newer docbook xslt versions * pager.c: pager: intermediate fix for wrapping long header lines with $smart_wrap set The header folding algorithm outputs a word without spaces and longer than $wrap as-is. The pager however tries to break it. With $smart_wrap unset, it simply breaks at $wrap regardless if there's a space or not. With $smart_wrap set it tried to find a space and break if the next word is too long. This logic doesn't work for folded header lines which always start with space. Thus, the output would always contain the folding whitespace on a line by itself detaching the header value from the header name. As an intermediate fix we don't try to be smart if the line begins with space or tab. * pager.c, sendlib.c: pager: Ignore $wrap for attachment markers 2009-06-14 20:57 -0700 Brendan Cully (d2e0b495b148) * build-release: Remove duplicate update-changelog call. 2009-06-14 20:51 -0700 Antonio Radici (fef17099376d) * doc/mutt.man: Escape hyphens in man page. Closes #1937 again. 2009-06-14 12:29 -0700 Brendan Cully (7f8a2ba64516) * UPDATING: Update UPDATING * VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.5.20 * imap/imap.c: Save a dereference, and close #3226 with voodoo. * sendlib.c: Initialize pointer before use under -d4 2009-06-13 19:52 -0700 Brendan Cully (83ffb5593bc6) * curs_main.c: Adjust menu position after sync more carefully. Closes #3092. * init.h: Force status to redraw when $postponed changes. * postpone.c: Fix check for changed $postponed. The pointer-based check fails when the new $postponed string is stored in the same location. 2009-06-13 01:08 +0200 Rocco Rutte (536771b4e085) * commands.c, copy.c, copy.h, handler.c, protos.h, send.c, sendlib.c: Rewrite header folding We now distinct between sending and display case. For display, we always use tabs for folding for readability; for sending we now correctly fold using whitespace found in the header. Closes #2995. Closes #3080. 2009-06-12 23:10 +0200 Rocco Rutte (23de0e3c81f8) * UPDATING, init.h, mutt.h, send.c: Turn $fcc_attach into a quadoption. Closes #2528. * handler.c: Don't insert Content-Description/form name into reply. Closes #3164. * pgpkey.c: Allow ! suffix for pgp keys via $pgp_sign_as and prompt. Closes #1928. * commands.c, recvcmd.c: Warn before bouncing messages without From: header. Closes #3180. * smtp.c: SMTP: don't block but print CRLF for last line if it's not terminated 2009-06-11 18:34 +0200 Rocco Rutte (f60eb41ef63c) * UPDATING: Mention maildir mtime use in browser * send.c: Don't allow setting Return-Path: header via my_hdr Mutt has use_envelope_from/envelope_from_address for that purpose. Closes #1840. * browser.c: Use only latest mtime of new/cur for browser, not whole stat() info * copy.c: Don't reformat Return-Path (angle brackets are not optional). Closes #1702. 2009-06-10 17:44 +0200 Rocco Rutte (0721c3f6320d) * mbox.c, mx.c: Only print messages about CONTEXT when quiet flag not set 2009-06-09 22:09 -0700 Brendan Cully (dc9ec900c657) * mutt_ssl.c: Improve host checking for SSL with intermediate certificates. * mutt_ssl.c: Whitespace. * imap/imap.c: Skip comparison against current mailbox for idle connections. Closes #3216. * imap/util.c: Revert accidental change * imap/util.c: Remove trailing whitespace. 2009-06-08 23:55 -0700 Brendan Cully (15c662a95b91) * configure.ac, m4/libgnutls.m4: Test for libgnutls by hand rather than relying on deprecated libgnutls-config script. Closes #3239. 2009-06-07 10:55 -0700 Brendan Cully (9831d4c2c3f9) * imap/message.c: Do not display error message when user declines to create target mailbox. * imap/message.c: Minor cleanup in imap_copy_messages. 2009-06-07 08:14 +0200 Miroslav Lichvar (16592f0dfdaf) * configure.ac, mutt_ssl_gnutls.c: Disable checking certificate activation/expiration times in gnutls as we do the checks ourselves. 2009-06-06 22:31 -0700 Brendan Cully (e5c2befbf0f5) * imap/message.c: Do not treat already-seen headers as if they are new. See #2935. 2009-06-07 02:09 +0200 Rocco Rutte (a786b0e8627c) * doc/dotlock.man, doc/makedoc.c, doc/mbox.man, doc/mmdf.man, doc/mutt.man, init.h: Fix hyphens in manpages. Closes #1937 2009-06-04 17:07 +0200 Rocco Rutte (4f1ceaae93dc) * rfc3676.c: Fix pretty quoting for f=f by resetting space count when flushing paragraph 2009-06-03 22:35 +0200 Rocco Rutte (386f2ce6b872) * rfc3676.c: Fix several f=f bugs It fixes problems with space-handling in general (trailing spaces for display, un-space-stuffing), fixes quote prefix for replies and lowers FLOWED_MAX so we don't run into line length trouble too early. * UPDATING, globals.h, init.h, pager.c: Don't abuse $pager_context for searches, add $search_context. See #976. * pattern.c: Fix compiler warning 2009-06-02 20:25 +0200 Miroslav Lichvar (d1d0481d1ca1) * mutt_ssl_gnutls.c: Add support for GNUTLS_CERT_INSECURE_ALGORITHM error code * mutt_ssl_gnutls.c: Don't ignore certificate verification errors on saved signer certs 2009-06-02 10:18 -0700 René Clerc (761bc678b23e) * po/nl.po: Updated Dutch translation. 2009-06-02 17:24 +0200 Rocco Rutte (8b2af5b64981) * buffy.c: Fix duplicate mailbox detection for remote folders * smtp.c: Fix array size * buffy.c: Thoroughly check for duplicates when parsing 'mailboxes' command. Closes #1428. 2009-06-01 14:50 +0200 Rocco Rutte (7a277ba306c9) * gnupgparse.c: Use mutt_atoi() when parsing GnuPG output. Closes #3145 * hcache.c, mh.c: More atoi() fixes * smtp.c: SMTP: Use mutt_atoi() to parse server responses * curs_main.c, edit.c, init.c, main.c, menu.c, mh.c, parse.c, resize.c, score.c, url.c: Use strtol() wrappers for most atoi() calls * lib.c, lib.h: Add mutt_atos(), mutt_atoi() and mutt_atol() (strtol() wrappers) * send.c: Treat address groups as no recipients When sending with Sendmail or SMTP we exclude address groups anyway, so treat these addresses as not present when checking for valid recipients before sending in the compose menu. * smtp.c: Weed out address groups for SMTP the same way we do for sendmail 2009-05-31 19:19 -0700 Brendan Cully (0024860ab03e) * doc/Makefile.am: Allow chunked and unchunked manuals to build in parallel. * mutt_ssl_gnutls.c: Remove trailing whitespace 2009-05-31 14:46 +0200 Rocco Rutte (8e591e80cd48) * smtp.c: SMTP: Don't send "undisclosed-recipients" in RCPT TO This happened for Bcc only messages. "undisclosed-recipients" is added in To: as guard against MTAs that leak BCCs if no To:/Cc: header is given. See Debian #529090. * init.h: Document that $pager_context affects searching, too * UPDATING: Update UPDATING * handler.c: Turn trailing \r\n to \n for qp-encoded messages. RFC2045 (sect. 6.7, (1) general 8bit representation) states that neither CR nor LF of the trailing CRLF may be qp-encoded. So we ignore trailing qp-encoded CRs. See #2898 though this is a partial fix only. * pager.c: Give $pager_context lines of context when searching page-based menus. Closes #976. * handler.c, init.h, rfc3676.c: f=f: Strip trailing spaces for interoperability. Closes #3001. If we make a fixed reply to a flowed message we remove trailing spaces and can now safely allow $indent_string to be used which is what users expect. Second, if we make a flowed reply to a fixed message we also strip trailing spaces since from format=fixed we assume all lines are fixed (i.e. we don't want to errorneously make fixed lines flowed). * handler.c, init.h, mutt.h: Add $honor_disposition to not display attachments inline. Closes #3170. Previously all MIME parts were displayed inline regardless of the Content-Disposition header (if present). With $honor_disposition set, only inline parts are displayed inline, attachments can only be viewed from the attachments menu. 2009-04-25 01:56 -0400 Dan Loewenherz (c1b947f60ea6) * init.h: Disables the insecure SSLv2 protocol. Closes #3192. 2009-05-30 19:37 +0200 Rocco Rutte (b080ae086a62) * ChangeLog, mbox.c: Keep new mail flag for mbox/mmdf folders after closing. Closes #1362. 2009-05-30 10:23 -0700 Vincent Lefevre (be7b3d349725) * po/fr.po: Updated French translation. 2009-05-30 00:24 +0200 Rocco Rutte (f65a1eb8abce) * smtp.c: Fix logic in f260f5836284 2009-05-29 21:33 +0200 Rocco Rutte (c4d86d4ea260) * pager.c: Drop modified version of and use mutt_read_line() in pager, too * history.c, init.c, lib.c, lib.h, mh.c, mutt_ssl_gnutls.c, pgp.c, query.c, rfc1524.c, smime.c: Add flags to mutt_read_line() for EOL-stripping and continuation support We use these to stop supporting EOL-escaping with \ which was wrong in most cases (e.g. $history_file), support is kept for reading config and mailcap files. Leaving CRLF in will be used for the pager. * menu.c, pager.c, pattern.c: Fall back to search if no query exists for search-(next|opposite) The pager had the fall-through to search, so for consistency do that in other menues as well. * pager.c: Fix pager search prompt for reverse search When doing a reverse search for the first time after switching to the pager, SearchBack is always 0 and thus gave the wrong prompt, change to using op directly. While I'm at it, unify search prompts. * doc/manual.xml.head: Manual: Fix markup of environment variables 2009-05-28 16:37 +0200 Rocco Rutte (f260f5836284) * smtp.c: SMTP: don't interactively authenticate without a password in batch/mailx mode Otherwise, if we don't have a password and curses is not running, the SASL authentication callback will crash mutt. We now abort if the password wasn't given in $smtp_url. * doc/mutt.css: Manual: vertical-align table cells at the top * doc/manual.xml.head, doc/mutt.css: Manual: Wrap muttrc commands in 2009-05-27 23:14 -0700 Brendan Cully (5502fb790bab) * mutt_ssl_gnutls.c: gnutls: do not ignore certificate problems. Specifically, do not allow revoked certificates or those signed by non-CAs unless they have been explicitly stored in the trusted certificate file. Thanks to Miroslav Lichvar. 2009-05-27 22:55 -0700 Miroslav Lichvar (85f41efec6bf) * ChangeLog, mutt_ssl_gnutls.c: Don't prompt to save certificates that are already saved but invalid. 2009-05-27 22:52 -0700 Brendan Cully (90ef283c103e) * mutt_ssl_gnutls.c: Don't leak gnutls certs on preauth validation failure. Thanks to Miroslav Lichvar. * mutt_ssl.c: Fix TLS certificate chain validation for openssl. 2009-05-25 17:31 -0700 Brendan Cully (8f11dd00c770) * mutt_ssl_gnutls.c: Fix a serious oversight validating TLS certificates. If any certificate in a chain presented by a server was accepted, the connection was allowed without verifying that the presented certificate was actually signed by the certificate in the chain. 2009-05-27 22:13 -0700 Petr PísaÅ™ (05bc65d6ae70) * po/cs.po: Updated Czech translation. 2009-05-27 10:13 +0200 Rocco Rutte (97305eeb91ce) * doc/manual.xml.head, doc/mutt.man: Document that -- is always mandatory after -a. Closes #3235. * init.h: Mention account-hook in the docs for $tunnel. Closes #3237. 2009-05-26 17:57 +0200 Rocco Rutte (392e945dfba7) * attach.c: Use charset parameter to view text attachments using . Closes #3234. 2009-05-25 15:57 +0200 Rocco Rutte (3f0963dd9257) * pager.c: pager: print progress percentage for attachments, too * attach.c: Mark strings for translation 2009-05-18 20:48 -0700 Vincent Lefevre (6d810c5cf4fc) * po/fr.po: Updated French translation. 2009-05-15 15:03 +0200 Takahashi Tamotsu (c665bdf5ff5f) * pop.c: POP: Notify user when messages are lost. Closes #2226. * pop.c: POP: Ignore already-deleted messages while syncing. Closes #2225. 2009-05-13 18:03 +0200 Rocco Rutte (0563c88ad6f0) * attach.c, recvattach.c: Don't loose error message when attachment saving fails. Closes #3156. 2009-05-15 12:46 +0200 Seth Arnold (1cea1ecf9f79) * UPDATING, color.c, doc/manual.xml.head: Make "uncolor" also work header and body objects. Closes #1046. 2009-05-13 14:20 +0200 Rocco Rutte (f96a176bb14c) * send.c: Don't set 'replied' flag if user changes References/IRT. Closes #2044. * mutt.h, muttlib.c: Add mutt_find_list() to lookup data in lists * alias.c, crypt-gpgme.c, group.c, mbox.c, pgp.c, query.c, rfc822.c, rfc822.h, send.c, smime.c: Prune empty address groups when preparing replies. Closes #2875. * mbox.c: Actually reopen mbox/mmdf files in case we find modifications. Closes #2725. Since the file is changed while we have it open in ctx->fp, we likely get wrong information when parsing the mailbox. Now we explicitely close and (re)open it. 2009-05-12 16:26 +0200 Rocco Rutte (06e318bfe8f2) * mbox.c: Backout errorneously commited mbox atime fix * OPS, mbox.c: Fix description for 2009-04-29 14:49 +0200 Rocco Rutte (335e6f782862) * browser.c: Fix maildir times in mailboxes browser. Closes #626. Instead of using the (pointless) mtime of the top-level maildir folder, use the latest mtime of the "new" and "cur" subdirectories. Maildir folders in the mailboxes list can now be properly sorted by date. This does not affect the directory browser. Also see #2421. * mailbox.h, mh.c, mx.c: Move Maildir/MH folder detection from mx.c to mh.c 2009-04-28 15:12 +0200 Rocco Rutte (4d9685be5987) * sendlib.c: Fold References: header so we never run into line length problems * headers.c: Fix comment typo 2009-04-28 14:18 +0200 Bertram Felgenhauer (6b20a3545f03) * doc/manual.xml.head, headers.c: Drop References header if In-Reply- To is modified by user. Closes #3221. 2009-04-28 13:05 +0200 Rocco Rutte (a13d8fd40094) * send.c: Don't generate References: for reply to multiple messages All parent Message-Ids are present in In-Reply-To already. Also, RfC2822, section 3.6.4 discourages its generation. * sendlib.c: Don't trim In-Reply-To with $edit_headers set In case of a tagged reply to several messages, we want In-Reply-To to contain all parent Message-Ids. * imap/imap.c: Only sync changed messages back to hcache on mailbox sync * doc/manual.xml.head: For spam detection, mention $imap_headers. Closes #3223. * doc/manual.xml.head: Manual: Fix typo and reword paragraph 2009-04-26 21:09 +0200 Rocco Rutte (9fa4a3e74355) * UPDATING, doc/manual.xml.head, pop.c: POP: Support hcache updating, too. This also allows us to use hcache to manage "flagged" and "replied" message flags. * imap/imap.c, mh.c: Sync header to hcache when synching MH/Maildir/IMAP folders. Closes #2942. * pager.c: Use dynamic buffer for displaying pager lines. Closes #3162. With too small fixed-size buffers we can't color/find certain words that span buffers. This needs to duplicate mutt_read_line with the adjustment to leave line termination in and not support breaking long lines using \ at EOL. Other callers may want to use this one instead, too as we support \-escaping in too many places. * init.h: Document suffixes for %f in $folder_format 2009-04-22 23:29 +0200 Bertram Felgenhauer (0aa313a3bf20) * headers.c: Fix memory leak in mutt_edit_headers(). Closes #3220. 2009-04-25 10:51 +0200 Thomas Wiegner (8da22400a48d) * configure.ac, mkdtemp.c, protos.h: Add mkdtemp() from xfce to unbreak gpgme build on Solaris. Closes #3217. 2009-04-25 10:35 +0200 Rocco Rutte (c6de4f51b8c7) * ChangeLog, configure.ac, protos.h, strcasestr.c: Add strcasestr() from uclibc to unbreak (Open)Solaris build. Closes #3222. 2009-04-21 15:10 -0400 Aron Griffis (3d89eddb2d9a) * buffy.c: Equivalent mutt_buffy, but readable code * buffy.c, buffy.h: Call mutt_expand_path() from mutt_buffy to fix imap separator. Closes #3208 and #3218 * buffy.c: Use slen instead of assuming _POSIX_PATH_MAX 2009-04-23 12:51 -0700 Vincent Lefevre (b5b4e652e4b1) * ChangeLog, po/fr.po: Updated French translation. 2009-04-20 18:36 +0200 Christoph Berg (39fee3a9d034) * doc/manual.xml.head, init.h: Better document that some send-hooks can't work with $autoedit. Closes #1834. 2009-04-20 18:26 +0200 Rocco Rutte (6cc887ccd229) * init.h: Fix typo for $imap_pass 2009-04-17 18:05 +0200 Rocco Rutte (7d44a83efcc6) * pgp.c: Support the Charset: armor header for inline PGP. Closes #3039. The header is defined as optional by RfC4880. This is based on patch-1.5.9.tamo.pgp_charsetchack.1. We only support reading this header and, if present, recode the PGP output from the given charset to $charset if we find it valid; otherwise fall back to UTF-8. Certain clients make use of the header when sending mail, so mutt should respect it because some messages are otherwise unreadable. The sending side is not touched, we unconditionally send UTF-8. 2009-04-17 15:45 +0200 Michael Elkins (61a0c67ed727) * sendlib.c: Make sure Recent-From: consults $realname. Closes #1721. 2009-04-17 15:37 +0200 Rocco Rutte (3a7ecc3f8aeb) * UPDATING, functions.h, pager.c: Make and work in the pager, too. Closes #3212. * pager.c: Don't consider \n part of a line for body coloring. Closes #2363. * attach.c: Enlarge buffer size for parsing mailcap files We really need code for dynamic buffers which would solve a few other bugs, too. Closes #2205. 2009-04-16 19:23 +0200 Rocco Rutte (a4f66ae72dc5) * ChangeLog, pop_lib.c: POP: Default to using getservbyname() as we do for IMAP and SMTP * doc/manual.xml.head: Manual: Improve docs on URL syntax, add examples * doc/manual.xml.head: Manual: Add user-defined variables to variable types 2009-04-11 10:35 +0200 Rocco Rutte (7d7976cd4fc4) * ChangeLog, buffy.c, buffy.h, commands.c, sendlib.c: Don't raise new mail flag on mbox/mmdf Fcc mailboxes. Closes #1896. 2009-04-08 16:25 +0200 Rocco Rutte (5b631ee33281) * hdrline.c: For %F, display Bcc recipient if no other recipients found. Closes #3157. * UPDATING, doc/manual.xml.head, doc/muttrc.man.head, pattern.c: Make ~x match In-Reply-To, too. Closes #771. 2009-04-07 19:57 +0200 Rocco Rutte (667b0006b586) * sendlib.c: Fix b5cbd0dab863, closes #3215. Still valgrind reports 'fromcode' as leaking. 2009-04-07 11:32 +0200 Erik Hovland (d344c6429a48) * sendlib.c: Try to correct usage of tempfile and *tempfile Since tempfile is a double pointer checking for tempfile and then dereferencing with *tempfile is not correct. 2009-04-06 22:05 +0200 Rocco Rutte (d639baaf57fb) * doc/manual.xml.head: Manual: Fix typo 2009-04-06 19:10 +0200 Erik Hovland (4fe35e9984ba) * sendlib.c: mutt_message_to_7bit(): Only close file pointer if we opened it The pointer is to be managed outside the function and provided. Only close it we opened it ourself using fopen(). 2009-04-06 19:07 +0200 Erik Hovland (b5cbd0dab863) * sendlib.c: Plug memory leaks in sendlib.c 2009-04-05 13:41 +0200 Rocco Rutte (5d393e716c51) * init.h, sendlib.c: Backed out changeset 23c7b469ff20 This requires more thought: if the user has -- in $sendmail, we need to add our arguments for 8BITMIME/DSN/etc. before it and not after. See #3168. * doc/manual.xml.head: Manual: Make sure every rc command has a synopsis in its describing section * doc/manual.xml.head: Manual: Fold consecutive into just one This make it visually easier to spot what belongs together. * doc/manual.xml.head: Manual: More entities and as appropriate 2009-04-04 16:23 +0200 Rocco Rutte (a4b635e96b30) * doc/Makefile.am: Manual: Improve 'sortcheck' target Don't call up diff+pager if all is sorted and remove the temp files for diffing we created. * doc/gen-map-doc, doc/manual.xml.head, doc/manual.xml.tail: Manual: Capitalize headlines * doc/manual.xml.head: Manual: Move section on mixmaster support to Optional Features * doc/manual.xml.head: Manual: Remove duplicate section on mailcap use from security chapter We already have a more detailed section on secure mailcap usage, so link to it. * doc/manual.xml.head: Manual: Minor improvements and fixes * doc/Makefile.am, doc/manual.xml.head: Manual: Add a short chapter summarizing security considerations * doc/manual.xml.head: Manual: Use — in text rather than -- * doc/manual.xml.head: Manual: Add section on padding for format strings * doc/manual.xml.head: Manual: Mention reply types in "Sending Mail" section * doc/manual.xml.head: Manual: Add table with navigation keys for page-based menus * doc/mutt.css: mutt.css: Add left+right margins to screen, note and examples * doc/manual.xml.head: Manual: Add section on screens and menus with short descriptions. Mostly stolen from old mutt-ng docs with adjustments. 2009-04-02 13:11 +0200 Steve Kemp (23c7b469ff20) * init.h, sendlib.c: Only append -- to $sendmail if not present. Closes #3168. This allows users to add custom recipients via $sendmail. 2009-04-02 12:57 +0200 Rocco Rutte (bfb12cf02417) * init.h: Clarify what $attach_charset does, closes #3165. * doc/Makefile.am: Add 'sortcheck' target to doc/Makefile.am This should be used from time to time to check if vars are sorted. Closes #3191. * init.h: Sort $pgp_* and $crypt_* vars, see #3191. * init.h: Sort $smime_* vars, see #3191. 2009-04-01 14:33 +0200 Miroslav Lichvar (8205a12329d3) * hcache.c, muttlib.c: Use PATH_MAX for buffers passed to realpath(3) as we're supposed to 2009-04-01 13:16 +0200 Rocco Rutte (47c64fd9ac70) * doc/gen-map-doc, doc/manual.xml.head: Manual: Fix openjade warnings * doc/makedoc.c, doc/mutt.css: makedoc: Render description lists as This looks better and is more compact (except missing column headers.) 2009-03-31 16:03 +0200 Rocco Rutte (22f21b558f57) * doc/manual.xml.head: Manual: Add an example of how to manage multiple accounts using folder-hook * UPDATING, doc/manual.xml.head, mutt.h, pattern.c: Perform case insensitive string search if pattern is lower case ...since we do that for regex patterns already. It doesn't work for IMAP server-side searches. * doc/manual.xml.head: Manual: Fix markup of ".muttrc" * doc/manual.xml.head: Manual: Always spell mutt as "Mutt" * doc/manual.xml.head: Manual: Replace netscape with firefox * doc/manual.xml.head: Manual: use instead of " quotes * doc/manual.xml.head: Manual: Lots of minor improvements (markup consistency, wording) 2009-03-30 14:58 +0200 Rocco Rutte (318748f3962b) * doc/manual.xml.head: For mailbox formats, add some more verbose pros and cons * doc/manual.xml.head: Manual: Add section about zeroprinting format strings to format string section 2009-03-28 22:37 +0100 Thomas Roessler (be9fb07730c6) * mutt_idna.c: Make IDNA code more readable 2009-03-28 16:11 +0100 Rocco Rutte (77cfe8016930) * doc/manual.xml.head: Manual: Add section roughly explaining config option types * doc/makedoc.c: makedoc: make output slightly more readable Add using HTML which save lots of vertical space. Also, drop the newline before to save some space. 2009-03-27 18:02 +0100 Rocco Rutte (a06a2a4c5ebc) * rfc3676.c: f=f: Fix debug messages 2009-03-19 17:19 +0100 Rocco Rutte (754ea0f091fc) * doc/manual.xml.head: Improve section on patterns * curs_lib.c: Fix progress update debug message * doc/manual.xml.head, doc/muttrc.man.head: Document kilo and mega suffixes for range patterns Document it only for ~z (message size) as they don't make much sense for other patterns like message score or number of attachments. 2009-03-18 17:40 +0100 Rocco Rutte (8528b8e715da) * init.h: Properly initialize more structs 2009-03-19 13:38 +0100 Erik Hovland (a802b5127f09) * pgp.c: Remove unused variable 2009-03-19 10:36 +0100 Roman Kraevskiy (6fac57b97bf1) * mutt_sasl.c: Restore connection polling callback when closing SASL connection. Closes #3206. 2009-03-18 14:48 +0100 Erik Hovland (17d770ae41e4) * smime.c: S/MIME: Don't leak intermediate cert key * buffy.c: Properly initialize struct stats in buffy check 2009-03-17 20:04 +0100 Rocco Rutte (903b3cee5485) * addrbook.c, browser.c, compose.c, curs_main.c, imap/auth.c, mx.c, pattern.c, pop_auth.c, postpone.c, query.c, recvattach.c, remailer.c: Fix some warnings with -W about missing initializers in structs 2009-03-17 16:44 +0100 Todd Zullinger (bb9b845800f6) * pgp.c: Ensure display is redrawn for application/pgp When using gpg-agent, a hard redraw is needed after the pinentry program is called. Otherwise, the screen is garbled and key bindings are screwed up. Closes #3196. 2009-03-15 16:44 +0100 Rocco Rutte (bc7c64ff3e48) * configure.ac, protos.h, wcscasecmp.c: Add wcscasecmp() compatibility function (for OS X) * doc/mutt.man: mutt.1: Mention that -a should be last in option list. Closes #3202 * alias.c: Only define min() if not present. Closes #3199 2009-03-15 14:25 +0100 Erik Hovland (3c154fcdad4c) * rfc822.c: The assigned value of dom is never used. Remove assignment * alias.c: The file handle will leak if fread fails 2009-03-12 15:16 -0700 Erik Hovland (53bea026a2a2) * curs_main.c: resort_index will use menu->current as a index into an array. If menu->current is negative, bad things can happen. So check it before calling resort_index * recvcmd.c: 'last' is assigned but never used. Remove assignment. 2009-03-15 13:46 +0100 Rocco Rutte (1238dff54a15) * alias.c, attach.c, buffy.c, check_sec.sh, commands.c, compose.c, copy.c, crypt-gpgme.c, crypt.c, edit.c, editmsg.c, gnupgparse.c, handler.c, headers.c, help.c, history.c, imap/message.c, init.c, lib.c, main.c, mbox.c, mh.c, mutt_ssl.c, mutt_ssl_gnutls.c, muttlib.c, pager.c, pattern.c, pgp.c, pgpkey.c, pgppubring.c, pop.c, postpone.c, query.c, recvattach.c, recvcmd.c, rfc1524.c, rfc3676.c, send.c, sendlib.c, smime.c, smtp.c: Use safe_fclose() instead of fclose(), add fclose() to check_sec.sh 2009-03-10 18:39 +0100 NONAKA Kimihiro (cc6fede605d4) * mh.c: Fix crashes with 64bit time_t. Closes #3184. 2009-03-09 12:04 +0100 Vincent Lefevre (4ce562b7f5d7) * mbyte.h: Unbreak compilation on OS X with --with-regex/--without-wc- funcs. Closes #3149. 2009-03-09 11:58 +0100 Rocco Rutte (f3a33b77dc90) * mutt.h, regex.c: Unbreak compilation with --without-wc- funcs on OS X 10.5.*, see #3149. * init.h: Fix 11cd72da743a * init.h: Sort SSL-related variables, see #3191. * hash.c, hash.h, init.c, mh.c, thread.c: Restore $reverse_alias feature by using case-insensitive hash keys The fix is implemented as callbacks in the hash table so we can avoid working with copies of the mailbox keys but work on the originals instead and don't pollute the code with lower-case conversions all over the place. While I'm at it, turn int hashes into unsigned values since the hash function returns unsigned values now, too. Closes #3185. 2009-03-07 13:49 +0100 Rocco Rutte (ff1906f70b1b) * init.h: Sort most variables (except crypto), see #3191. * doc/manual.xml.head: Fix typo, see #2430. 2009-02-20 22:14 +0100 Rocco Rutte (35fbea209c6e) * doc/manual.xml.head: Manual: verbosely document how the initial folder is determined, see #3189. * doc/manual.xml.head: Document address normalization. Closes #2430. * headers.c: Simplify and fix Attach: header parsing With ee5e696a9d08 we would skip beyond the filename to look for a description. This changeset fixes it. * main.c: Set magic from -m before processing queries (-Q) or dumping variables (-D) * doc/mutt.man, init.h: Better document how the initial folder is determined. Closes #3189. 2009-02-15 16:09 +0100 Rocco Rutte (ee5e696a9d08) * doc/manual.xml.head, headers.c: Support spaces in Attach: pseudoheader. Closes #3179. 2009-02-10 13:05 +0100 Rocco Rutte (a21f8bf84149) * init.h: Fix documentation typos. Closes #3178. 2009-01-27 12:58 -0800 Brendan Cully (7ddf1d1cc490) * imap/imap.c: Move socket close into imap_logout from imap_logout_all * imap/imap.c: IMAP: only close socket when not already disconnected. 2009-01-27 18:48 +0100 Rocco Rutte (d7e44862a08a) * help.c, main.c, mh.c: Update copyright years * help.c: Fix help alignment for escape sequences at screen boundary. Closes #3146. * mh.c: Unconditionally inode-sort Maildir and MH folders. Closes #3166. 2009-01-26 12:32 -0800 Brendan Cully (da94a92c3ba0) * bcache.c: Remove old bcache tmpfile before trying to create new one. Closes #3163. 2009-01-20 12:34 -0800 René Clerc (2006526d1d26) * po/nl.po: Updated Dutch translation 2009-01-19 20:39 -0800 Ivan Vilata i Balaguer (038f1e5cdaea) * po/ca.po: Updated Catalan translation 2009-01-14 20:04 +0000 Emanuele Giaquinta (ddf48761aacf) * imap/browse.c: Use imap_utf7_encode instead of imap_munge_mbox_name+imap_unquote_string. 2009-01-14 11:45 -0800 Brendan Cully (cd0b17c80372) * doc/manual.xml.head: Add missing hooks to manual section 4 2009-01-13 06:51 -0800 Brendan Cully (10e224e86f0b) * hook.c: Do not allow a command in an account-hook to trigger another account-hook. Recent changes in the IMAP path canonifier mean that account-hooks that set variables to URLs (eg folder, spoolfile) can trigger a recursive account-hook. Now we just bail out of account- hook early if we are called recursively, but perhaps we should warn the user to use a folder-hook instead. Thanks to Kyle Wheeler for finding this one. 2009-01-12 10:27 -0800 Brendan Cully (6976aca75d04) * init.h: Correct defaults for new ssl options (fixes manual generation) 2009-01-11 21:47 -0800 Brendan Cully (ff74e612f790) * mutt_ssl_gnutls.c: GNUTLS: check all available certs noninteractively before presenting any menus * UPDATING, init.h, mutt.h, mutt_ssl.c, mutt_ssl_gnutls.c: Add $ssl_verify_dates option to relax certificate date validation * UPDATING, init.h, mutt.h, mutt_ssl.c, mutt_ssl_gnutls.c: Add $ssl_verify_host to allow skipping host name validation 2009-01-10 22:09 -0800 Brendan Cully (db3a61fcde35) * imap/util.c: Assume INBOX for ""/NULL in imap_mxcmp * imap/util.c: Use known connection delimiter in imap_expand_path * imap/util.c: Guard against NULL pointers in imap_mxcmp * imap/imap_private.h, imap/util.c: Canonicalize IMAP mailboxes before comparing them. * imap/util.c: Fix last commit * imap/util.c: Prioritize the entered IMAP folder delimiter. First priority is the connection delimiter. Second priority is the user's delimiter if it is in imap_delim_chars. We no longer use the first character in imap_delim_chars. 2009-01-06 18:34 -0800 Vsevolod Volkov (4032dfd52118) * po/ru.po: Updated Russian translation 2009-01-05 16:43 -0800 Brendan Cully (0d81ef9d40fd) * build-release: Sign tagged revision, not the one after * .hgsigs: mutt-1.5.19 signed * .hgtags: Added tag mutt-1-5-19-rel for changeset a4b47ac32d32 * VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po: automatic post-release commit for mutt-1.5.19 * build-release: Fall back to vi if VISUAL is unset in build-release * UPDATING: Update UPDATING * imap/command.c, imap/imap.c, imap/imap_private.h: Report CREATE failures * browser.c: Style fixes * browser.c: Leave error message on screen if imap_mailbox_create fails * doc/mutt.man: Add pointer to the full manual to the front of mutt.1 2009-01-05 09:16 -0800 Petr PísaÅ™ (990f1e841dd4) * po/cs.po: Updated Czech translation 2009-01-04 22:36 -0800 Vincent Lefevre (9af288ee9e91) * po/fr.po: Updated French translation 2009-01-04 18:32 -0800 Emanuele Giaquinta (e47d05dc2633) * imap/util.c: Indentation fix 2009-01-04 18:12 -0800 Brendan Cully (1947c370fcd9) * Makefile.am: Remove obsolete make target * doc/manual.xml.head: Update copyright in manual 2009-01-04 17:07 -0800 Vincent Lefevre (bbe8694acc33) * po/fr.po: Updated French translation 2009-01-04 17:04 -0800 Brendan Cully (d98ab9a591e5) * pgpkey.c: Remove dead code. Thanks to Ingo Schwarze. * COPYRIGHT: Update copyrights * addrbook.c, ascii.h, attach.c, bcache.c, bcache.h, browser.c, browser.h, charset.c, charset.h, commands.c, complete.c, compose.c, crypt-gpgme.c, crypt.c, curs_main.c, dotlock.c, editmsg.c, enter.c, functions.h, gnupgparse.c, handler.c, hdrline.c, hook.c, init.h, lib.c, lib.h, menu.c, mh.c, mutt_idna.c, mutt_idna.h, mutt_sasl.h, mutt_socket.c, muttlib.c, mx.c, pager.c, pattern.c, pgp.c, pgp.h, pgpinvoke.c, pgpkey.c, pgplib.c, pgplib.h, pgppacket.c, pgppubring.c, pop.c, postpone.c, protos.h, query.c, recvattach.c, recvcmd.c, remailer.c, rfc1524.c, rfc2047.c, rfc2231.c, rfc3676.h, send.c, setenv.c, status.c, url.c: Update copyrights. Closes #3016. I went through the logs of each file with a copyright header and updated the years for the authors in the headers for any non-comment changes they introduced. What a pain! * imap/auth_anon.c, imap/auth_cram.c, imap/auth_login.c, imap/auth_sasl.c, imap/browse.c, imap/imap.h, imap/message.h, imap/utf7.c: IMAP copyright header updates * imap/auth_gss.c, imap/command.c, imap/imap.c, imap/message.c: Updated copyrights * smtp.c: SMTP: complain when authentication fails. Closes #2117. Now each failed attempt emits an error before mutt tries the next method. Possibly we should just fail immediately? * parse.c, snprintf.c: Use ! instead of testing pointers against 0. Closes #3125. 2009-01-04 20:12 +0100 Rocco Rutte (33fa1ca4b6af) * doc/gen-map-doc, init.h: Documentation: Minor fixes and improvements 2009-01-03 21:02 -0800 Brendan Cully (5a80ee54a05f) * imap/command.c, imap/imap.c, init.c, muttlib.c, postpone.c: Raise debug level for several messages * imap/auth_gss.c: Guard against unused variable warning. Thanks to Ingo Schwarze. * doc/Makefile.am: Remove obsolete reference to ChangeLog.old. Thanks to Ingo Schwarze. * imap/message.c: Ignore unexpected FETCH responses during imap_read_headers. Thanks to Chris Li for the excellent bug report in #3041. See #2902, #2935, #2985, #3028, #3041, #3143. With luck, this may close them. In truth, imap_read_headers is still a horrible kludge of duct tape and chicken wire. * hash.c, hash.h: Make hash_string work in unsigned domain * main.c: Another copyright update * main.c, smtp.c: Update some copyrights 2009-01-02 23:13 -0800 Brendan Cully (87ef3e3550e4) * smtp.c: SMTP: Use Hostname if Fqdn is bogus. Closes #3142. * init.h: More tyops * doc/manual.xml.head: Tyops * mutt_ssl_gnutls.c: Add SSL intermediate certificate support for gnutls * mutt_ssl.c: Simplify intermediate certificate handling. Return immediately if a certificate is interactively accepted. Display index of current certificate in chain in menu title. 2009-01-02 12:46 -0800 TAKAHASHI Tamotsu (5db868a874b6) * globals.h, mutt_ssl.c: Add support for intermediate certificates to openssl code. Gnutls support is not included in this patch. 2009-01-01 17:02 -0800 Marcel Telka (532f695b4352) * smtp.c: SMTP: Require SP after AUTH response (strict RFC conformance). Closes #3141. 2009-01-01 16:55 -0800 Brendan Cully (859009a507d8) * smtp.c: SMTP: guard against short server responses 2008-12-30 00:58 +0100 Rocco Rutte (ac870203179d) * doc/manual.xml.head: Manual: Add missing maps to bind command docs * doc/TODO: Documentation: Update TODO 2008-12-26 14:36 +0100 Rocco Rutte (4917897ac9b1) * init.c: Ignore NULL/empty lines in rc parser, fixes mutt -e '' crashing 2008-12-20 15:33 -0800 TAKAHASHI Tamotsu (349986b1af09) * po/ja.po: Updated Japanese translation. 2008-12-20 15:31 -0800 Brendan Cully (a715dca3610c) * main.c: Cosmetics for mutt -v 2008-11-26 01:15 +0000 Peter Collingbourne (2fefd56f440c) * sendlib.c: Disable line wrapping for Message-ID header 2008-12-16 20:19 -0800 Erik Hovland (f6ae8dc70850) * imap/util.c: Remove unused #include directives * crypt.c, curs_main.c, flags.c, group.c, hcache.c, mh.c, pager.c, pgpmicalg.c, pgppacket.c, postpone.c, query.c, recvattach.c, recvcmd.c, send.c: Remove unused #include directives * sendlib.c: mutt_gen_msgid() allocates the msgid off of the heap. Since mutt_gen_msgid() allocates the msgid string with strdup, it is getting it off of the heap. When the fprintf writes the msgid, the string is no longer tracked and that string is leaked. * parse.c: Match variable type to getch return type * alias.c: Fix fread rc check * hash.c: Remove redundant int clamping * smime.c: Remove check that always succeeds * pattern.c: fclose correct fp * rfc822.c: buflen cannot be 0 here 2008-12-16 12:36 -0800 Brendan Cully (bbf4dfc2aa41) * ChangeLog.old, Makefile.am: Remove ChangeLog.old * imap/Makefile.am: Remove imap/BUGS from Makefile.am 2008-12-15 23:45 -0800 Erik Hovland (adaf24e4117d) * mh.c: Fix bad parentheses in stat rc * bcache.c: snprintf returns int, not size_t * muttlib.c: Always va_end(ap_retry) in mutt_buffer_printf 2008-12-15 23:11 -0800 Brendan Cully (101a8bcba613) * imap/BUGS: imap/BUGS is superseded by the BTS 2008-12-10 20:00 +0100 Rocco Rutte (817e5987633b) * doc/manual.xml.head: Manual: Fix typos found by by Vincent Lefevre, see #3109. * doc/manual.xml.head: Manual: trim into chapter, add notes about contributing * doc/mutt.css: Make mutt.css apply for all media types * doc/manual.xml.head, doc/mutt.css: Manual: Wrap important notes in * doc/Makefile.am, doc/chunk.xsl, doc/html.xsl, doc/mutt.xsl: Move common XSLT params to mutt.xsl imported into (chunk|html).xsl * doc/gen-map-doc, doc/makedoc.c, doc/manual.xml.head, doc/manual.xml.tail, init.h: Manual: Only wrap real text paragraphs in Elements such as lists, tables, synopsis don't need it and produce hundreds of warnings in tidy because of empty paragraphs. With this change, the manual should be fully XHTML 1.0 Transitional and validate without warnings and errors. * hg-commit: hg-commit: Work even in subdirectories * doc/chunk.xsl, doc/html.xsl: Manual: Use right XSLT-way to embed CSS to avoid invalid xmlns="" attributes on

The Mutt E-Mail Client

Michael Elkins

version 2.3.2 (31864ba9) (2026-04-26)

Abstract

“All mail clients suck. This one just sucks less.†— me, circa 1995


Table of Contents

1. Introduction
1. Mutt Home Page
2. Mailing Lists
3. Getting Mutt
4. Mutt Online Resources
5. Contributing to Mutt
6. Typographical Conventions
7. Copyright
2. Getting Started
1. Core Concepts
2. Screens and Menus
2.1. Index
2.2. Pager
2.3. File Browser
2.4. Sidebar
2.5. Help
2.6. Compose Menu
2.7. Alias Menu
2.8. Attachment Menu
2.9. List Menu
3. Moving Around in Menus
4. Editing Input Fields
4.1. Introduction
4.2. Buffy Cycle
4.3. History
5. Reading Mail
5.1. The Message Index
5.2. The Pager
5.3. Threaded Mode
5.4. Miscellaneous Functions
6. Sending Mail
6.1. Introduction
6.2. Editing the Message Header
6.3. Sending Cryptographically Signed/Encrypted Messages
6.4. Sending Format=Flowed Messages
6.5. Background Editing
7. Forwarding and Bouncing Mail
8. Postponing Mail
9. Encryption and Signing
9.1. OpenPGP Configuration
9.2. S/MIME Configuration
3. Configuration
1. Location of Initialization Files
2. Starter Muttrc
3. Syntax of Initialization Files
4. Address Groups
5. Defining/Using Aliases
6. Changing the Default Key Bindings
6.1. Terminal Keybindings
6.2. Enter versus Return
7. Changing the current working directory
8. Defining Aliases for Character Sets
9. Setting Variables Based Upon Mailbox
10. Keyboard Macros
11. Using Color and Mono Video Attributes
12. Message Header Display
12.1. Header Display
12.2. Selecting Headers
12.3. Ordering Displayed Headers
13. Alternative Addresses
14. Mailing Lists
15. Using Multiple Spool Mailboxes
16. Monitoring Incoming Mail
17. User-Defined Headers
18. Specify Default Save Mailbox
19. Specify Default Fcc: Mailbox When Composing
20. Specify Default Save Filename and Default Fcc: Mailbox at Once
21. Change Settings Based Upon Message Recipients
22. Change Settings Before Formatting a Message
23. Choosing the Cryptographic Key of the Recipient
24. Dynamically Changing $index_format using Patterns
25. Adding Key Sequences to the Keyboard Buffer
26. Executing Functions
27. Message Scoring
28. Spam Detection
29. Setting and Querying Variables
29.1. Variable Types
29.2. Commands
29.3. User-Defined Variables
29.4. Type Conversions
30. Reading Initialization Commands From Another File
31. Removing Hooks
32. Format Strings
32.1. Basic usage
32.2. Conditionals
32.3. Filters
32.4. Padding
32.5. Bytes size display
33. Control allowed header fields in a mailto: URL
4. Advanced Usage
1. Character Set Handling
2. Regular Expressions
3. Patterns: Searching, Limiting and Tagging
3.1. Pattern Modifier
3.2. Simple Searches
3.3. Nesting and Boolean Operators
3.4. Searching by Date
4. Marking Messages
5. Using Tags
6. Using Hooks
6.1. Message Matching in Hooks
6.2. Mailbox Matching in Hooks
7. Managing the Environment
8. External Address Queries
9. Mailbox Formats
10. Mailbox Shortcuts
11. Handling Mailing Lists
12. Display Munging
13. New Mail Detection
13.1. How New Mail Detection Works
13.2. Polling For New Mail
13.3. Monitoring New Mail
13.4. Calculating Mailbox Message Counts
14. Editing Threads
14.1. Linking Threads
14.2. Breaking Threads
15. Delivery Status Notification (DSN) Support
16. Start a WWW Browser on URLs
17. Echoing Text
18. Message Composition Flow
19. Batch Composition Flow
20. Using MuttLisp (EXPERIMENTAL)
20.1. Running a command generated by MuttLisp
20.2. Interpolating MuttLisp in a Command Argument
20.3. MuttLisp Syntax
20.4. MuttLisp Functions
20.5. Examples
21. Miscellany
5. Mutt's MIME Support
1. Using MIME in Mutt
1.1. MIME Overview
1.2. Viewing MIME Messages in the Pager
1.3. The Attachment Menu
1.4. The Compose Menu
2. MIME Type Configuration with mime.types
3. MIME Viewer Configuration with Mailcap
3.1. The Basics of the Mailcap File
3.2. Secure Use of Mailcap
3.3. Advanced Mailcap Usage
3.4. Example Mailcap Files
4. MIME Autoview
5. MIME Multipart/Alternative
6. Attachment Searching and Counting
7. MIME Lookup
6. Optional Features
1. General Notes
1.1. Enabling/Disabling Features
1.2. URL Syntax
2. SSL/TLS Support
2.1. STARTTLS
2.2. Tunnel
3. POP3 Support
4. IMAP Support
4.1. The IMAP Folder Browser
4.2. Authentication
5. SMTP Support
6. OAUTHBEARER Support
6.1. XOAUTH2 Support
7. Managing Multiple Accounts
8. Local Caching
8.1. Header Caching
8.2. Body Caching
8.3. Cache Directories
8.4. Maintenance
9. Exact Address Generation
10. Sending Anonymous Messages via Mixmaster
11. Sidebar
11.1. Introduction
11.2. Variables
11.3. Functions
11.4. Commands
11.5. Colors
11.6. Sort
11.7. See Also
12. Compressed Folders Feature
12.1. Introduction
12.2. Commands
13. Autocrypt
13.1. Requirements
13.2. First Run
13.3. Compose Menu
13.4. Account Management
13.5. Alternative Key and Keyring Strategies
7. Security Considerations
1. Passwords
2. Temporary Files
3. Information Leaks
3.1. mailto:-style Links
4. External Applications
8. Performance Tuning
1. Reading and Writing Mailboxes
2. Reading Messages from Remote Folders
3. Searching and Limiting
9. Reference
1. Command-Line Options
2. Configuration Commands
3. Configuration Variables
4. Functions
4.1. Generic Menu
4.2. Index Menu
4.3. Pager Menu
4.4. Alias Menu
4.5. Query Menu
4.6. Attachment Menu
4.7. Compose Menu
4.8. Postpone Menu
4.9. Browser Menu
4.10. Pgp Menu
4.11. Smime Menu
4.12. Mixmaster Menu
4.13. Editor Menu
4.14. Autocrypt Account Menu
4.15. List Menu
10. Miscellany
1. Acknowledgements
2. About This Document

Chapter 1. Introduction

Mutt is a small but very powerful text-based MIME mail client. Mutt is highly configurable, and is well suited to the mail power user with advanced features like key bindings, keyboard macros, mail threading, regular expression searches and a powerful pattern matching language for selecting groups of messages.

1. Mutt Home Page

The official homepage can be found at http://www.mutt.org/.

2. Mailing Lists

To subscribe to one of the following mailing lists, send a message with the word subscribe in the body to list-name-request@mutt.org.

All messages posted to mutt-announce are automatically forwarded to mutt-users, so you do not need to be subscribed to both lists.

NOTE: You MUST be subscribed to a list in order to post to it. This is not to make your life harder, but to reduce SPAM and/or UCE. The mailing list software being used is GNU Mailman, with its implied deficiencies.

3. Getting Mutt

Mutt releases can be downloaded from ftp://ftp.mutt.org/pub/mutt/. For a list of mirror sites, please refer to http://www.mutt.org/download.html.

For version control access, please refer to the Mutt development site.

4. Mutt Online Resources

Bug Tracking System

The official Mutt bug tracking system (not for feature requests) can be found at https://gitlab.com/muttmua/mutt/issues

Wiki

An (unofficial) wiki can be found at https://gitlab.com/muttmua/mutt/wikis/home.

IRC

For the IRC user community, visit channel #mutt on irc.libera.chat.

USENET

For USENET, see the newsgroup comp.mail.mutt.

5. Contributing to Mutt

There are various ways to contribute to the Mutt project.

Especially for new users it may be helpful to meet other new and experienced users to chat about Mutt, talk about problems and share tricks.

Since translations of Mutt into other languages are highly appreciated, the Mutt developers always look for skilled translators that help improve and continue to maintain stale translations.

For contributing code patches for new features and bug fixes, please refer to the developer pages at https://gitlab.com/muttmua/mutt for more details.

6. Typographical Conventions

This section lists typographical conventions followed throughout this manual. See table Table 1.1, “Typographical conventions for special terms†for typographical conventions for special terms.

Table 1.1. Typographical conventions for special terms

ItemRefers to...
printf(3)UNIX manual pages, execute man 3 printf
<PageUp>named keys
<create-alias>named Mutt function
^GControl+G key combination
$mail_checkMutt configuration option
$HOMEenvironment variable

Examples are presented as:

mutt -v

Within command synopsis, curly brackets (“{}â€) denote a set of options of which one is mandatory, square brackets (“[]â€) denote optional arguments, three dots denote that the argument may be repeated arbitrary times.

7. Copyright

Mutt is Copyright © 1996-2026 Michael R. Elkins and others.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Chapter 2. Getting Started

This section is intended as a brief overview of how to use Mutt. There are many other features which are described elsewhere in the manual. There is even more information available in the Mutt FAQ and various web pages. See the Mutt homepage for more details.

The keybindings described in this section are the defaults as distributed. Your local system administrator may have altered the defaults for your site. You can always type “?†in any menu to display the current bindings.

The first thing you need to do is invoke Mutt, simply by typing mutt at the command line. There are various command-line options, see either the Mutt man page or the reference.

1. Core Concepts

Mutt is a text-based application which interacts with users through different menus which are mostly line-/entry-based or page-based. A line-based menu is the so-called “index†menu (listing all messages of the currently opened folder) or the “alias†menu (allowing you to select recipients from a list). Examples for page-based menus are the “pager†(showing one message at a time) or the “help†menu listing all available key bindings.

The user interface consists of a context sensitive help line at the top, the menu's contents followed by a context sensitive status line and finally the command line. The command line is used to display informational and error messages as well as for prompts and for entering interactive commands.

Mutt is configured through variables which, if the user wants to permanently use a non-default value, are written to configuration files. Mutt supports a rich config file syntax to make even complex configuration files readable and commentable.

Because Mutt allows for customizing almost all key bindings, there are so-called “functions†which can be executed manually (using the command line) or in macros. Macros allow the user to bind a sequence of commands to a single key or a short key sequence instead of repeating a sequence of actions over and over.

Many commands (such as saving or copying a message to another folder) can be applied to a single message or a set of messages (so-called “tagged†messages). To help selecting messages, Mutt provides a rich set of message patterns (such as recipients, sender, body contents, date sent/received, etc.) which can be combined into complex expressions using the boolean and and or operations as well as negating. These patterns can also be used to (for example) search for messages or to limit the index to show only matching messages.

Mutt supports a “hook†concept which allows the user to execute arbitrary configuration commands and functions in certain situations such as entering a folder, starting a new message or replying to an existing one. These hooks can be used to highly customize Mutt's behavior including managing multiple identities, customizing the display for a folder or even implementing auto-archiving based on a per-folder basis and much more.

Besides an interactive mode, Mutt can also be used as a command-line tool to send messages. It also supports a mailx(1)-compatible interface, see Table 9.1, “Command line options†for a complete list of command-line options.

2. Screens and Menus

2.1. Index

The index is the screen that you usually see first when you start Mutt. It gives an overview over your emails in the currently opened mailbox. By default, this is your system mailbox. The information you see in the index is a list of emails, each with its number on the left, its flags (new email, important email, email that has been forwarded or replied to, tagged email, ...), the date when email was sent, its sender, the email size, and the subject. Additionally, the index also shows thread hierarchies: when you reply to an email, and the other person replies back, you can see the other person's email in a "sub-tree" below. This is especially useful for personal email between a group of people or when you've subscribed to mailing lists.

2.2. Pager

The pager is responsible for showing the email content. On the top of the pager you have an overview over the most important email headers like the sender, the recipient, the subject, and much more information. How much information you actually see depends on your configuration, which we'll describe below.

Below the headers, you see the email body which usually contains the message. If the email contains any attachments, you will see more information about them below the email body, or, if the attachments are text files, you can view them directly in the pager.

To give the user a good overview, it is possible to configure Mutt to show different things in the pager with different colors. Virtually everything that can be described with a regular expression can be colored, e.g. URLs, email addresses or smileys.

2.3. File Browser

The file browser is the interface to the local or remote file system. When selecting a mailbox to open, the browser allows custom sorting of items, limiting the items shown by a regular expression and a freely adjustable format of what to display in which way. It also allows for easy navigation through the file system when selecting file(s) to attach to a message, select multiple files to attach and many more.

Some mail systems can nest mail folders inside other mail folders. The normal open entry commands in mutt will open the mail folder and you can't see the sub-folders. If you instead use the <descend-directory> function it will go into the directory and not open it as a mail directory.

2.4. Sidebar

The Sidebar shows a list of all your mailboxes. The list can be turned on and off, it can be themed and the list style can be configured.

2.5. Help

The help screen is meant to offer a quick help to the user. It lists the current configuration of key bindings and their associated commands including a short description, and currently unbound functions that still need to be associated with a key binding (or alternatively, they can be called via the Mutt command prompt).

2.6. Compose Menu

The compose menu features a split screen containing the information which really matter before actually sending a message by mail: who gets the message as what (recipients and who gets what kind of copy). Additionally, users may set security options like deciding whether to sign, encrypt or sign and encrypt a message with/for what keys. Also, it's used to attach messages, to re-edit any attachment including the message itself.

2.7. Alias Menu

The alias menu is used to help users finding the recipients of messages. For users who need to contact many people, there's no need to remember addresses or names completely because it allows for searching, too. The alias mechanism and thus the alias menu also features grouping several addresses by a shorter nickname, the actual alias, so that users don't have to select each single recipient manually.

2.8. Attachment Menu

As will be later discussed in detail, Mutt features a good and stable MIME implementation, that is, it supports sending and receiving messages of arbitrary MIME types. The attachment menu displays a message's structure in detail: what content parts are attached to which parent part (which gives a true tree structure), which type is of what type and what size. Single parts may saved, deleted or modified to offer great and easy access to message's internals.

2.9. List Menu

The list menu assists with operations on mailing lists. RFC 2369 defines several interactions with mailing lists and list memberships that can be specified within the email message: subscribe, unsubscribe, contact the list owner, etc. When you invoke the list menu, these interactions are made accessible as menu options.

3. Moving Around in Menus

The most important navigation keys common to line- or entry-based menus are shown in Table 2.1, “Most common navigation keys in entry-based menus†and in Table 2.2, “Most common navigation keys in page-based menus†for page-based menus.

Table 2.1. Most common navigation keys in entry-based menus

KeyFunctionDescription
j or <Down><next-entry>move to the next entry
k or <Up><previous-entry>move to the previous entry
z or <PageDn><page-down>go to the next page
Z or <PageUp><page-up>go to the previous page
= or <Home><first-entry>jump to the first entry
* or <End><last-entry>jump to the last entry
q<quit>exit the current menu
?<help>list all keybindings for the current menu

Table 2.2. Most common navigation keys in page-based menus

KeyFunctionDescription
J or <Return><next-line>scroll down one line
<Backspace><previous-line>scroll up one line
K, <Space> or <PageDn><next-page>move to the next page
- or <PageUp><previous-page>move the previous page
<Home><top>move to the top
<End><bottom>move to the bottom

4. Editing Input Fields

4.1. Introduction

Mutt has a built-in line editor for inputting text, e.g. email addresses or filenames. The keys used to manipulate text input are very similar to those of Emacs. See Section 4.13, “Editor Menu†for a full reference of available functions, their default key bindings, and short descriptions.

Table 2.3. Most common line editor keys

KeyFunctionDescription
^A or <Home><bol>move to the start of the line
^B or <Left><backward-char>move back one char
Esc B<backward-word>move back one word
<Space><buffy-cycle>cycle among incoming mailboxes
^D or <Delete><delete-char>delete the char under the cursor
^E or <End><eol>move to the end of the line
^F or <Right><forward-char>move forward one char
Esc F<forward-word>move forward one word
<Tab><complete>complete filename, alias, or label
^T<complete-query>complete address with query
^K<kill-eol>delete to the end of the line
Esc d<kill-eow>delete to the end of the word
^W<kill-word>kill the word in front of the cursor
^U<kill-line>delete entire line
^V<quote-char>quote the next typed key
<Up><history-up>recall previous string from history
<Down><history-down>recall next string from history
^R<history-search>use current input to search history
<BackSpace><backspace>kill the char in front of the cursor
Esc u<upcase-word>convert word to upper case
Esc l<downcase-word>convert word to lower case
Esc c<capitalize-word>capitalize the word
^Gn/aabort
<Return>n/afinish editing

^G is the generic “abort†key in Mutt. In addition to the line editor, it can also be used to abort prompts. Generally, typing ^G at a confirmation prompt or line editor should abort the entire action.

You can remap the editor functions using the bind command. For example, to make the <Delete> key delete the character in front of the cursor rather than under, you could use:

bind editor <delete> backspace

4.2. Buffy Cycle

The <buffy-cycle> function key binding is enabled in the prompt for <change-folder> or <change-folder-readonly>. Typing the key will cycle through mailboxes with new mail.

In other prompts for a mailbox or a file (such as for saving an attachment), the key binding instead invokes the <complete> function.

In either case, if you need to type the key literally (e.g. you need to enter a file name with a space in it), use the <quote-char> function. For example, with the default key bindings, by typing “^V†and then “<Space>â€.

In all other input fields, the <buffy-cycle> key binding is ignored; typing the key simply adds it to the input field text.

4.3. History

Mutt maintains a history for the built-in editor. The number of items is controlled by the $history variable and can be made persistent using an external file specified using $history_file and $save_history. You may cycle through them at an editor prompt by using the <history-up> and/or <history-down> commands. Mutt will remember the currently entered text as you cycle through history, and will wrap around to the initial entry line.

Mutt maintains several distinct history lists, one for each of the following categories:

  • .muttrc commands

  • addresses and aliases

  • shell commands

  • filenames

  • mailboxes

  • patterns

  • everything else

Mutt automatically filters out consecutively repeated items from the history. If $history_remove_dups is set, all repeated items are removed from the history. It also mimics the behavior of some shells by ignoring items starting with a space. The latter feature can be useful in macros to not clobber the history's valuable entries with unwanted entries.

5. Reading Mail

Similar to many other mail clients, there are two modes in which mail is read in Mutt. The first is a list of messages in the mailbox, which is called the “index†menu in Mutt. The second mode is the display of the message contents. This is called the “pager.â€

The next few sections describe the functions provided in each of these modes.

5.1. The Message Index

Common keys used to navigate through and manage messages in the index are shown in Table 2.4, “Most common message index keysâ€. How messages are presented in the index menu can be customized using the $index_format variable.

Table 2.4. Most common message index keys

KeyDescription
cchange to a different mailbox
Esc cchange to a folder in read-only mode
Ccopy the current message to another mailbox
Esc Cdecode a message and copy it to a folder
Esc sdecode a message and save it to a folder
Ddelete messages matching a pattern
ddelete the current message
Fmark as important
lshow messages matching a pattern
Nmark message as new
ochange the current sort method
Oreverse sort the mailbox
qsave changes and exit
ssave-message
Ttag messages matching a pattern
ttoggle the tag on a message
Esc ttoggle tag on entire message thread
Uundelete messages matching a pattern
uundelete-message
vview-attachments
xabort changes and exit
<Return>display-message
<Tab>jump to the next new or unread message
@show the author's full e-mail address
$save changes to mailbox
/search
Esc /search-reverse
^Lclear and redraw the screen
^Tuntag messages matching a pattern

In addition to who sent the message and the subject, a short summary of the disposition of each message is printed beside the message number. Zero or more of the “flags†in Table 2.5, “Message status flags†may appear, some of which can be turned on or off using these functions: <set-flag> and <clear-flag> bound by default to “w†and “W†respectively.

Furthermore, the flags in Table 2.6, “Message recipient flags†reflect who the message is addressed to. They can be customized with the $to_chars variable.

Table 2.5. Message status flags

FlagDescription
Dmessage is deleted (is marked for deletion)
dmessage has attachments marked for deletion
Kcontains a PGP public key
Nmessage is new
Omessage is old
Pmessage is PGP encrypted
rmessage has been replied to
Smessage is signed, and the signature is successfully verified
smessage is signed
!message is flagged
*message is tagged
nthread contains new messages (only if collapsed)
othread contains old messages (only if collapsed)

Table 2.6. Message recipient flags

FlagDescription
+message is to you and you only
Tmessage is to you, but also to or CC'ed to others
Cmessage is CC'ed to you
Fmessage is from you
Lmessage is sent to a subscribed mailing list

5.2. The Pager

By default, Mutt uses its built-in pager to display the contents of messages (an external pager such as less(1) can be configured, see $pager variable). The pager is very similar to the Unix program less(1) though not nearly as featureful.

Table 2.7. Most common pager keys

KeyDescription
<Return>go down one line
<Space>display the next page (or next message if at the end of a message)
-go back to the previous page
nsearch for next match
Sskip beyond quoted text
Ttoggle display of quoted text
?show keybindings
/regular expression search
Esc /backward regular expression search
\toggle highlighting of search matches
^jump to the top of the message

In addition to key bindings in Table 2.7, “Most common pager keysâ€, many of the functions from the index menu are also available in the pager, such as <delete-message> or <copy-message> (this is one advantage over using an external pager to view messages).

Also, the internal pager supports a couple other advanced features. For one, it will accept and translate the “standard†nroff sequences for bold and underline. These sequences are a series of either the letter, backspace (“^Hâ€), the letter again for bold or the letter, backspace, “_†for denoting underline. Mutt will attempt to display these in bold and underline respectively if your terminal supports them. If not, you can use the bold and underline color objects to specify a color or mono attribute for them.

Additionally, the internal pager supports the ANSI escape sequences for character attributes. Mutt translates them into the correct color and character settings. The sequences Mutt supports are:

\e[Ps;Ps;..Ps;m

where Ps can be one of the codes shown in Table 2.8, “ANSI escape sequencesâ€.

Table 2.8. ANSI escape sequences

Escape codeDescription
0All attributes off
1Bold on
4Underline on
5Blink on
7Reverse video on
3<color>Foreground color is <color> (see Table 2.9, “Color sequencesâ€)
4<color>Background color is <color> (see Table 2.9, “Color sequencesâ€)
38;5;<color>Foreground color is an 8-bit <color>
48;5;<color>Background color is an 8-bit <color>

Table 2.9. Color sequences

Color codeColor
0Black
1Red
2Green
3Yellow
4Blue
5Magenta
6Cyan
7White

Mutt uses these attributes for handling text/enriched messages, and they can also be used by an external autoview script for highlighting purposes.

Note

If you change the colors for your display, for example by changing the color associated with color2 for your xterm, then that color will be used instead of green.

Note

Note that the search commands in the pager take regular expressions, which are not quite the same as the more complex patterns used by the search command in the index. This is because patterns are used to select messages by criteria whereas the pager already displays a selected message.

5.3. Threaded Mode

So-called “threads†provide a hierarchy of messages where replies are linked to their parent message(s). This organizational form is extremely useful in mailing lists where different parts of the discussion diverge. Mutt displays threads as a tree structure.

In Mutt, when a mailbox is sorted by threads, there are a few additional functions available in the index and pager modes as shown in Table 2.10, “Most common thread mode keysâ€.

Table 2.10. Most common thread mode keys

KeyFunctionDescription
^D<delete-thread>delete all messages in the current thread
^U<undelete-thread>undelete all messages in the current thread
^N<next-thread>jump to the start of the next thread
^P<previous-thread>jump to the start of the previous thread
^R<read-thread>mark the current thread as read
Esc d<delete-subthread>delete all messages in the current subthread
Esc u<undelete-subthread>undelete all messages in the current subthread
Esc n<next-subthread>jump to the start of the next subthread
Esc p<previous-subthread>jump to the start of the previous subthread
Esc r<read-subthread>mark the current subthread as read
Esc t<tag-thread>toggle the tag on the current thread
Esc v<collapse-thread>toggle collapse for the current thread
Esc V<collapse-all>toggle collapse for all threads
P<parent-message>jump to parent message in thread

In the index, the subject of threaded children messages will be prepended with thread tree characters. By default, the subject itself will not be duplicated unless $hide_thread_subject is unset. Special characters will be added to the thread tree as detailed in Table 2.11, “Special Thread Charactersâ€.

Table 2.11. Special Thread Characters

CharacterDescriptionNotes
&hidden messagesee $hide_limited and $hide_top_limited
?missing messagesee $hide_missing and $hide_top_missing
*pseudo threadsee $strict_threads; not displayed when $narrow_tree is set
=duplicate threadsee $duplicate_threads; not displayed when $narrow_tree is set

Collapsing a thread displays only the first message in the thread and hides the others. This is useful when threads contain so many messages that you can only see a handful of threads on the screen. See %M in $index_format. For example, you could use “%?M?(#%03M)&(%4l)?†in $index_format to optionally display the number of hidden messages if the thread is collapsed. The %?<char>?<if-part>&<else-part>? syntax is explained in detail in format string conditionals.

Technically, every reply should contain a list of its parent messages in the thread tree, but not all do. In these cases, Mutt groups them by subject which can be controlled using the $strict_threads variable.

5.4. Miscellaneous Functions

In addition, the index and pager menus have these interesting functions:

<check-stats>

Calculate statistics for all monitored mailboxes declared using the mailboxes command. It will calculate statistics despite $mail_check_stats being unset.

<create-alias> (default: a)

Creates a new alias based upon the current message (or prompts for a new one). Once editing is complete, an alias command is added to the file specified by the $alias_file variable for future use

Note

Mutt does not read the $alias_file upon startup so you must explicitly source the file.

<check-traditional-pgp> (default: Esc P)

This function will search the current message for content signed or encrypted with PGP the “traditional†way, that is, without proper MIME tagging. Technically, this function will temporarily change the MIME content types of the body parts containing PGP data; this is similar to the <edit-type> function's effect.

<edit> (default: e)

This command (available in the index and pager) allows you to edit the raw current message as it's present in the mail folder. After you have finished editing, the changed message will be appended to the current folder, and the original message will be marked for deletion; if the message is unchanged it won't be replaced.

<edit-type> (default: ^E on the attachment menu, and in the pager and index menus; ^T on the compose menu)

This command is used to temporarily edit an attachment's content type to fix, for instance, bogus character set parameters. When invoked from the index or from the pager, you'll have the opportunity to edit the top-level attachment's content type. On the attachment menu, you can change any attachment's content type. These changes are not persistent, and get lost upon changing folders.

Note that this command is also available on the compose menu. There, it's used to fine-tune the properties of attachments you are going to send.

<enter-command> (default: “:â€)

This command is used to execute any command you would normally put in a configuration file. A common use is to check the settings of variables, or in conjunction with macros to change settings on the fly.

<extract-keys> (default: ^K)

This command extracts PGP public keys from the current or tagged message(s) and adds them to your PGP public key ring.

<forget-passphrase> (default: ^F)

This command wipes the passphrase(s) from memory. It is useful, if you misspelled the passphrase.

<list-reply> (default: L)

Reply to the current or tagged message(s) by extracting any addresses which match the regular expressions given by the lists or subscribe commands, but also honor any Mail-Followup-To header(s) if the $honor_followup_to configuration variable is set. In addition, the List-Post header field is examined for mailto: URLs specifying a mailing list address. Using this when replying to messages posted to mailing lists helps avoid duplicate copies being sent to the author of the message you are replying to.

<pipe-message> (default: |)

Asks for an external Unix command and pipes the current or tagged message(s) to it. The variables $pipe_decode, $pipe_decode_weed, $pipe_split, $pipe_sep and $wait_key control the exact behavior of this function.

<resend-message> (default: Esc e)

Mutt takes the current message as a template for a new message. This function is best described as "recall from arbitrary folders". It can conveniently be used to forward MIME messages while preserving the original mail structure. Note that the amount of headers included here depends on the value of the $weed variable.

This function is also available from the attachment menu. You can use this to easily resend a message which was included with a bounce message as a message/rfc822 body part.

<shell-escape> (default: !)

Asks for an external Unix command and executes it. The $wait_key can be used to control whether Mutt will wait for a key to be pressed when the command returns (presumably to let the user read the output of the command), based on the return status of the named command. If no command is given, an interactive shell is executed.

<skip-headers> (default: H)

This function will skip past the headers of the current message.

<skip-quoted> (default: S)

This function will go to the next line of non-quoted text which comes after a line of quoted text in the internal pager.

<toggle-quoted> (default: T)

The pager uses the $quote_regexp variable to detect quoted text when displaying the body of the message. This function toggles the display of the quoted material in the message. It is particularly useful when being interested in just the response and there is a large amount of quoted text in the way.

6. Sending Mail

6.1. Introduction

The bindings shown in Table 2.12, “Most common mail sending keys†are available in the index and pager to start a new message.

Table 2.12. Most common mail sending keys

KeyFunctionDescription
m<mail>compose a new message
r<reply>reply to sender
g<group-reply>reply to all recipients
 <group-chat-reply>reply to all recipients preserving To/Cc
L<list-reply>reply to mailing list address
f<forward>forward message
b<bounce>bounce (remail) message
Esc k<mail-key>mail a PGP public key to someone

Bouncing a message sends the message as-is to the recipient you specify. Forwarding a message allows you to add comments or modify the message you are forwarding. These items are discussed in greater detail in the next section “Forwarding and Bouncing Mail.â€

Mutt will then enter the compose menu and prompt you for the recipients to place on the “To:†header field when you hit m to start a new message. Next, it will ask you for the “Subject:†field for the message, providing a default if you are replying to or forwarding a message. You again have the chance to adjust recipients, subject, and security settings right before actually sending the message. See also $askcc, $askbcc, $autoedit, $bounce, $fast_reply, and $include for changing how and if Mutt asks these questions.

When replying, Mutt fills these fields with proper values depending on the reply type. The types of replying supported are:

Simple reply

Reply to the author directly.

Group reply

Reply to the author; cc all other recipients; consults alternates and excludes you.

Group Chat reply

Reply to the author and other recipients in the To list; cc other recipients in the Cc list; consults alternates and excludes you.

List reply

Reply to all mailing list addresses found, either specified via configuration or auto-detected. See Section 14, “Mailing Lists†for details.

After getting recipients for new messages, forwards or replies, Mutt will then automatically start your $editor on the message body. If the $edit_headers variable is set, the headers will be at the top of the message in your editor; the message body should start on a new line after the existing blank line at the end of headers. Any messages you are replying to will be added in sort order to the message, with appropriate $attribution, $indent_string and $post_indent_string. When forwarding a message, if the $mime_forward variable is unset, a copy of the forwarded message will be included. If you have specified a $signature, it will be appended to the message.

Once you have finished editing the body of your mail message, you are returned to the compose menu providing the functions shown in Table 2.13, “Most common compose menu keys†to modify, send or postpone the message.

Table 2.13. Most common compose menu keys

KeyFunctionDescription
a<attach-file>attach a file
A<attach-message>attach message(s) to the message
Esc k<attach-key>attach a PGP public key
d<edit-description>edit description on attachment
D<detach-file>detach a file
t<edit-to>edit the To field
Esc f<edit-from>edit the From field
r<edit-reply-to>edit the Reply-To field
c<edit-cc>edit the Cc field
b<edit-bcc>edit the Bcc field
y<send-message>send the message
s<edit-subject>edit the Subject
S<smime-menu>select S/MIME options
f<edit-fcc>specify an “Fcc†mailbox
p<pgp-menu>select PGP options
P<postpone-message>postpone this message until later
q<quit>quit (abort) sending the message
w<write-fcc>write the message to a folder
i<ispell>check spelling (if available on your system)
^F<forget-passphrase>wipe passphrase(s) from memory

The compose menu is also used to edit the attachments for a message which can be either files or other messages. The <attach-message> function to will prompt you for a folder to attach messages from. You can now tag messages in that folder and they will be attached to the message you are sending.

Note

Note that certain operations like composing a new mail, replying, forwarding, etc. are not permitted when you are in that folder. The %r in $status_format will change to a “A†to indicate that you are in attach-message mode.

After exiting the compose menu via <send-message>, the message will be sent. If configured and enabled, this can happen via mixmaster or $smtp_url. Otherwise $sendmail will be invoked. Prior to version 1.13, Mutt enabled $write_bcc by default, assuming the MTA would automatically remove a Bcc: header as part of delivery. Starting with 1.13, the option is unset by default, but no longer affects the fcc copy of the message.

6.2. Editing the Message Header

When editing the header because of $edit_headers being set, there are a several pseudo headers available which will not be included in sent messages but trigger special Mutt behavior.

6.2.1. Fcc: Pseudo Header

If you specify

Fcc: filename

as a header, Mutt will pick up filename just as if you had used the <edit-fcc> function in the compose menu. It can later be changed from the compose menu.

6.2.2. Attach: Pseudo Header

You can also attach files to your message by specifying

Attach: filename [ description ]

where filename is the file to attach and description is an optional string to use as the description of the attached file. Spaces in filenames have to be escaped using backslash (“\â€). The file can be removed as well as more added from the compose menu.

6.2.3. Pgp: Pseudo Header

If you want to use PGP, you can specify

Pgp: [ E | S | S<id> ]

“E†selects encryption, “S†selects signing and “S<id>†selects signing with the given key, setting $pgp_sign_as for the duration of the message composition session. The selection can later be changed in the compose menu.

6.2.4. In-Reply-To: Header

When replying to messages, the In-Reply-To: header contains the Message-Id of the message(s) you reply to. If you remove or modify its value, Mutt will not generate a References: field, which allows you to create a new message thread, for example to create a new message to a mailing list without having to enter the mailing list's address.

If you intend to start a new thread by replying, please make really sure you remove the In-Reply-To: header in your editor. Otherwise, though you'll produce a technically valid reply, some netiquette guardians will be annoyed by this so-called “thread hijackingâ€.

6.3. Sending Cryptographically Signed/Encrypted Messages

If you have told Mutt to PGP or S/MIME encrypt a message, it will guide you through a key selection process when you try to send the message. Mutt will not ask you any questions about keys which have a certified user ID matching one of the message recipients' mail addresses. However, there may be situations in which there are several keys, weakly certified user ID fields, or where no matching keys can be found.

In these cases, you are dropped into a menu with a list of keys from which you can select one. When you quit this menu, or Mutt can't find any matching keys, you are prompted for a user ID. You can, as usually, abort this prompt using ^G. When you do so, Mutt will return to the compose screen.

Once you have successfully finished the key selection, the message will be encrypted using the selected public keys when sent out.

To ensure you can view encrypted messages you have sent, you may wish to set $pgp_self_encrypt and $pgp_default_key for PGP, or $smime_self_encrypt and $smime_default_key for S/MIME.

Most fields of the entries in the key selection menu (see also $pgp_entry_format) have obvious meanings. But some explanations on the capabilities, flags, and validity fields are in order.

The flags sequence (“%fâ€) will expand to one of the flags in Table 2.14, “PGP key menu flagsâ€.

Table 2.14. PGP key menu flags

FlagDescription
RThe key has been revoked and can't be used.
XThe key is expired and can't be used.
dYou have marked the key as disabled.
cThere are unknown critical self-signature packets.

The capabilities field (“%câ€) expands to a two-character sequence representing a key's capabilities. The first character gives the key's encryption capabilities: A minus sign (“-â€) means that the key cannot be used for encryption. A dot (“.â€) means that it's marked as a signature key in one of the user IDs, but may also be used for encryption. The letter “e†indicates that this key can be used for encryption.

The second character indicates the key's signing capabilities. Once again, a “-†implies “not for signingâ€, “.†implies that the key is marked as an encryption key in one of the user-ids, and “s†denotes a key which can be used for signing.

Finally, the validity field (“%tâ€) indicates how well-certified a user-id is. A question mark (“?â€) indicates undefined validity, a minus character (“-â€) marks an untrusted association, a space character means a partially trusted association, and a plus character (“+â€) indicates complete validity.

6.4. Sending Format=Flowed Messages

6.4.1. Concept

format=flowed-style messages (or f=f for short) are text/plain messages that consist of paragraphs which a receiver's mail client may reformat to its own needs which mostly means to customize line lengths regardless of what the sender sent. Technically this is achieved by letting lines of a “flowable†paragraph end in spaces except for the last line.

While for text-mode clients like Mutt it's the best way to assume only a standard 80x25 character cell terminal, it may be desired to let the receiver decide completely how to view a message.

6.4.2. Mutt Support

Mutt only supports setting the required format=flowed MIME parameter on outgoing messages if the $text_flowed variable is set, specifically it does not add the trailing spaces.

After editing, Mutt properly space-stuffs the message. Space-stuffing is required by RfC3676 defining format=flowed and means to prepend a space to:

  • all lines starting with a space

  • lines starting with the word “From†followed by space

  • all lines starting with “>†which is not intended to be a quote character

Note

Mutt only supports space-stuffing for the first two types of lines but not for the third: It is impossible to safely detect whether a leading > character starts a quote or not.

All leading spaces are to be removed by receiving clients to restore the original message prior to further processing.

6.4.3. Editor Considerations

As Mutt provides no additional features to compose f=f messages, it's completely up to the user and his editor to produce proper messages. Please consider your editor's documentation if you intend to send f=f messages.

For example, vim provides the w flag for its formatoptions setting to assist in creating f=f messages, see :help fo-table for details.

6.4.4. Reformatting

Mutt has some support for reformatting when viewing and replying to format=flowed messages. In order to take advantage of these, $reflow_text must be set.

  • Paragraphs are automatically reflowed and wrapped at a width specified by $reflow_wrap.

  • In its original format, the quoting style of format=flowed messages can be difficult to read, and doesn't intermix well with non-flowed replies. Setting $reflow_space_quotes adds spaces after each level of quoting when in the pager and replying in a non-flowed format (i.e. with $text_flowed unset).

  • If $reflow_space_quotes is unset, mutt will still add one trailing space after all the quotes in the pager (but not when replying).

6.5. Background Editing

If $editor is set to a graphical editor, or a script such as contrib/bgedit-screen-tmux.sh if running inside GNU Screen or tmux, you can run the editor in the background by setting $background_edit.

If set, Mutt will display a landing page while the editor runs. When the editor exits, message composition will resume automatically. Alternatively, you can <exit> from the landing page, which will return you to the message index. This allows viewing other messages, changing mailboxes, even starting a new message composition session - all while the first editor session is still running.

Backgrounded message composition sessions can be viewed via <background-compose-menu> in the index and pager, by default bound to “Bâ€. If there is only a single backgrounded session, which has already exited, that session will automatically resume. Otherwise the list will be displayed, and a particular session can be selected. $background_format controls the format string used for the menu.

In case the open mailbox is changed while a reply is backgrounded, Mutt keeps track of the original mailbox. After sending, Mutt will attempt to reopen the original mailbox, if needed, and set reply flags appropriately. This won't affect your currently open mailbox, but may make setting flags a bit slower due to the need to reopen the original mailbox behind the scenes.

One complication with backgrounded compose sessions is the config changes caused by send, reply, and folder hooks. These can get triggered by a new message composition session, or by changing folders during a backgrounded session. To help lessen these problems, Mutt takes a snapshot of certain configuration variables and stores them with each editing session when it is backgrounded. When the session is resumed, those stored settings will temporarily be restored, and removed again when the session finishes (or is backgrounded again).

Mutt will save all boolean and quadoption configuration variables, the current folder (which will be used for ^ mailbox shortcut expansion), along with: $folder, $record, $postponed, $envelope_from_address, $from, $sendmail, $smtp_url, $pgp_sign_as, $smime_sign_as, and $smime_encrypt_with. It's not feasible to backup all variables, but if you believe we've missed an important setting, please let the developers know.

To help prevent forgetting about backgrounded sessions, $background_confirm_quit will prompt before exiting, in addition to $quit. Additionally, the %B expando in $status_format displays the number of backgrounded compose sessions.

Background editing is available for most, but not all, message composition in Mutt. Sending from the command line disables background editing, because there is no index to return to.

7. Forwarding and Bouncing Mail

Bouncing and forwarding let you send an existing message to recipients that you specify. Bouncing a message sends a verbatim copy of a message to alternative addresses as if they were the message's original recipients specified in the Bcc header. Forwarding a message, on the other hand, allows you to modify the message before it is resent (for example, by adding your own comments). Bouncing is done using the <bounce> function and forwarding using the <forward> function bound to “b†and “f†respectively.

Forwarding can be done by including the original message in the new message's body (surrounded by indicating lines: see $forward_attribution_intro and $forward_attribution_trailer) or including it as a MIME attachment, depending on the value of the $mime_forward variable. Decoding of attachments, like in the pager, can be controlled by the $forward_decode and $mime_forward_decode variables, respectively. The desired forwarding format may depend on the content, therefore $mime_forward is a quadoption which, for example, can be set to “ask-noâ€.

Mutt's default ($mime_forward=“no†and $forward_decode=“yesâ€) is to use standard inline forwarding. In that mode all text-decodable parts are included in the new message body. Other attachments from the original email can also be attached to the new message, based on the quadoption $forward_attachments.

The inclusion of headers is controlled by the current setting of the $weed variable, unless $mime_forward is set. The subject of the email is controlled by $forward_format.

Editing the message to forward follows the same procedure as sending or replying to a message does, but can be disabled via the quadoption $forward_edit.

8. Postponing Mail

At times it is desirable to delay sending a message that you have already begun to compose. When the <postpone-message> function is used in the compose menu, the body of your message and attachments are stored in the mailbox specified by the $postponed variable. This means that you can recall the message even if you exit Mutt and then restart it at a later time.

Once a message is postponed, there are several ways to resume it. From the command line you can use the “-p†option, or if you compose a new message from the index or pager you will be prompted if postponed messages exist. If multiple messages are currently postponed, the postponed menu will pop up and you can select which message you would like to resume.

Note

If you postpone a reply to a message, the reply setting of the message is only updated when you actually finish the message and send it. Also, you must be in the same folder with the message you replied to for the status of the message to be updated.

See also the $postpone quad-option.

9. Encryption and Signing

Mutt supports encrypting and signing emails when used interactively. In batch mode, cryptographic operations are disabled, so these options can't be used to sign an email sent via a cron job, for instance.

OpenPGP and S/MIME are enabled in one of two ways: “classic mode†or GPGME. The former invokes external programs to perform the various operations; it is better tested and more flexible, but requires some configuration. The latter uses the GnuPG project's GPGME library.

To enable “classic modeâ€, ensure GPGME is disabled and use the gpg.rc or smime.rc files that come with mutt. These are typically installed under /usr/local/share/doc/mutt/samples/. Source them, either directly or by copying them to your .mutt directory and sourcing them. Sourcing them directly from /usr/local/share/doc/mutt/samples/ has the benefit of automatically using fixes and security improvements to the command invocations, and is recommended.

unset crypt_use_gpgme
source /usr/local/share/doc/mutt/samples/gpg.rc
source /usr/local/share/doc/mutt/samples/smime.rc

To use GPGME instead, simply ensure the option is enabled in your .muttrc:

set crypt_use_gpgme

9.1. OpenPGP Configuration

The two most important settings are $pgp_default_key and $pgp_sign_as. To perform encryption, you must set the first variable. If you have a separate signing key, or only have a signing key, then set the second. Most people will only need to set $pgp_default_key.

Starting with version 2.1.0, GnuPG automatically uses an agent to prompt for your passphrase. If you are using a version older than that, you'll need to ensure an agent is running (alternatively, you can unset $pgp_use_gpg_agent and Mutt will prompt you for your passphrase). The agent in turn uses a pinentry program to display the prompt. There are many different kinds of pinentry programs that can be used: qt, gtk2, gnome3, fltk, and curses. However, Mutt does not work properly with the tty pinentry program. Please ensure you have one of the GUI or curses pinentry programs installed and configured to be the default for your system.

9.2. S/MIME Configuration

As with OpenPGP, the two most important settings are $smime_default_key and $smime_sign_as. To perform encryption and decryption, you must set the first variable. If you have a separate signing key, or only have a signing key, then set the second. Most people will only need to set $smime_default_key.

In “classic modeâ€, keys and certificates are managed by the smime_keys program that comes with Mutt. By default they are stored under ~/.smime/. (This is set by the smime.rc file with $smime_certificates and $smime_keys.) To initialize this directory, use the command “smime_keys init†from a shell prompt. The program can be then be used to import and list certificates. You may also want to periodically run “smime_keys refresh†to update status flags for your certificates.

Chapter 3. Configuration

1. Location of Initialization Files

While the default configuration (or “preferencesâ€) make Mutt usable right out of the box, it is often desirable to tailor Mutt to suit your own tastes. When Mutt is first invoked, it will attempt to read the “system†configuration file (defaults set by your local system administrator), unless the “-n†command line option is specified. This file is typically /usr/local/share/mutt/Muttrc or /etc/Muttrc. Mutt will next look for a file named .muttrc in your home directory. If this file does not exist and your home directory has a subdirectory named .mutt, Mutt tries to load a file named .mutt/muttrc. If still not found, Mutt will try $XDG_CONFIG_HOME/mutt/muttrc.

.muttrc is the file where you will usually place your commands to configure Mutt.

In addition, Mutt supports version specific configuration files that are parsed instead of the default files as explained above. For instance, if your system has a Muttrc-0.88 file in the system configuration directory, and you are running version 0.88 of Mutt, this file will be sourced instead of the Muttrc file. The same is true of the user configuration file, if you have a file .muttrc-0.88.6 in your home directory, when you run Mutt version 0.88.6, it will source this file instead of the default .muttrc file. The version number is the same which is visible using the “-v†command line switch or using the show-version key (default: V) from the index menu.

2. Starter Muttrc

Mutt is highly configurable because it's meant to be customized to your needs and preferences. However, this configurability can make it difficult when just getting started. A few sample muttrc files come with mutt, under doc/mutt/samples/. Among them, sample.muttrc-starter is a basic example config with a few suggested settings and pointers to useful programs.

3. Syntax of Initialization Files

An initialization file consists of a series of commands. Each line of the file may contain one or more commands. When multiple commands are used, they must be separated by a semicolon (“;â€).

Example 3.1. Multiple configuration commands per line

set realname='Mutt user' ; ignore x-

The hash mark, or pound sign (“#â€), is used as a “comment†character. You can use it to annotate your initialization file. All text after the comment character to the end of the line is ignored.

Example 3.2. Commenting configuration files

my_hdr X-Disclaimer: Why are you listening to me? # This is a comment

Single quotes (“'â€) and double quotes (“"â€) can be used to quote strings which contain spaces or other special characters. The difference between the two types of quotes is similar to that of many popular shell programs, namely that a single quote is used to specify a literal string (one that is not interpreted for shell variables or quoting with a backslash [see next paragraph]), while double quotes indicate a string for which should be evaluated. For example, backticks are evaluated inside of double quotes, but not for single quotes.

“\†quotes the next character, just as in shells such as bash and zsh. For example, if want to put quotes “"†inside of a string, you can use “\†to force the next character to be a literal instead of interpreted character.

Example 3.3. Escaping quotes in configuration files

set realname="Michael \"MuttDude\" Elkins"

“\\†means to insert a literal “\†into the line. “\n†and “\r†have their usual C meanings of linefeed and carriage-return, respectively.

A “\†at the end of a line can be used to split commands over multiple lines as it “escapes†the line end, provided that the split points don't appear in the middle of command names. Lines are first concatenated before interpretation so that a multi-line can be commented by commenting out the first line only.

Example 3.4. Splitting long configuration commands over several lines

set status_format="some very \
long value split \
over several lines"

It is also possible to substitute the output of a Unix command in an initialization file. This is accomplished by enclosing the command in backticks (``). In Example 3.5, “Using external command's output in configuration filesâ€, the output of the Unix command “uname -a†will be substituted before the line is parsed. Since initialization files are line oriented, only the first line of output from the Unix command will be substituted.

Example 3.5. Using external command's output in configuration files

my_hdr X-Operating-System: `uname -a`

To avoid the output of backticks being parsed, place them inside double quotes. In Example 3.6, “Preventing the output of backticks from being parsedâ€, the output of the gpg decryption is assigned directly to $imap_pass, so that special characters in the password (e.g.“'â€, “#â€, “$â€) are not parsed and interpreted specially by mutt.

Example 3.6. Preventing the output of backticks from being parsed

set imap_pass="`gpg --batch -q --decrypt ~/.mutt/account.gpg`"

Both environment variables and Mutt variables can be accessed by prepending “$†to the name of the variable. For example,

Example 3.7. Using environment variables in configuration files

set record=+sent_on_$HOSTNAME

will cause Mutt to save outgoing messages to a folder named “sent_on_kremvax†if the environment variable $HOSTNAME is set to “kremvax.†(See $record for details.)

Mutt expands the variable when it is assigned, not when it is used. If the value of a variable on the right-hand side of an assignment changes after the assignment, the variable on the left-hand side will not be affected.

If $muttlisp_inline_eval is set, an unquoted parenthesis-enclosed expression will be evaluated as MuttLisp. See the Using MuttLisp section for more details.

Example 3.8. Using MuttLisp expressions

set signature = \
  (if (equal $my_name "Kevin McCarthy") ~/kevin.sig ~/other.sig)

The commands understood by Mutt are explained in the next paragraphs. For a complete list, see the command reference.

All configuration files are expected to be in the current locale as specified by the $charset variable which doesn't have a default value since it's determined by Mutt at startup. If a configuration file is not encoded in the same character set the $config_charset variable should be used: all lines starting with the next are recoded from $config_charset to $charset.

This mechanism should be avoided if possible as it has the following implications:

  • These variables should be set early in a configuration file with $charset preceding $config_charset so Mutt knows what character set to convert to.

  • If $config_charset is set, it should be set in each configuration file because the value is global and not per configuration file.

  • Because Mutt first recodes a line before it attempts to parse it, a conversion introducing question marks or other characters as part of errors (unconvertable characters, transliteration) may introduce syntax errors or silently change the meaning of certain tokens (e.g. inserting question marks into regular expressions).

4. Address Groups

Usage:

group [ -group name ...] { -rx expr ... | -addr expr ... }
ungroup [ -group name ...] { * | -rx expr ... | -addr expr ... }

Mutt supports grouping addresses logically into named groups. An address or address pattern can appear in several groups at the same time. These groups can be used in patterns (for searching, limiting and tagging) and in hooks by using group patterns. This can be useful to classify mail and take certain actions depending on in what groups the message is. For example, the mutt user's mailing list would fit into the categories “mailing list†and “mutt-relatedâ€. Using send-hook, the sender can be set to a dedicated one for writing mailing list messages, and the signature could be set to a mutt-related one for writing to a mutt list — for other lists, the list sender setting still applies but a different signature can be selected. Or, given a group only containing recipients known to accept encrypted mail, “auto-encryption†can be achieved easily.

The group command is used to directly add either addresses or regular expressions to the specified group or groups. The different categories of arguments to the group command can be in any order. The flags -rx and -addr specify what the following strings (that cannot begin with a hyphen) should be interpreted as: either a regular expression or an email address, respectively.

These address groups can also be created implicitly by the alias, lists, subscribe and alternates commands by specifying the optional -group option. For example,

alternates -group me address1 address2
alternates -group me -group work address3

would create a group named “me†which contains all your addresses and a group named “work†which contains only your work address address3. Besides many other possibilities, this could be used to automatically mark your own messages in a mailing list folder as read or use a special signature for work-related messages.

The ungroup command is used to remove addresses or regular expressions from the specified group or groups. The syntax is similar to the group command, however the special character * can be used to empty a group of all of its contents. As soon as a group gets empty because all addresses and regular expressions have been removed, it'll internally be removed, too (i.e. there cannot be an empty group). When removing regular expressions from a group, the pattern must be specified exactly as given to the group command or -group argument.

5. Defining/Using Aliases

Usage:

alias [ -group name ...] key address [ address ...]
unalias [ -group name ...] { * | key ... }

It's usually very cumbersome to remember or type out the address of someone you are communicating with. Mutt allows you to create “aliases†which map a short string to a full address.

Note

If you want to create an alias for more than one address, you must separate the addresses with a comma (“,â€).

The optional -group argument to alias causes the aliased address(es) to be added to the named group.

To add an alias:

alias muttdude me@cs.hmc.edu (Michael Elkins)
alias theguys manny, moe, jack

To remove an alias or aliases (“*†means all aliases):

unalias muttdude
unalias *

Note: The alias key is matched case insensitively when creating (checking for duplicates), removing, or expanding aliases.

Unlike other mailers, Mutt doesn't require aliases to be defined in a special file. The alias command can appear anywhere in a configuration file, as long as this file is sourced. Consequently, you can have multiple alias files, or you can have all aliases defined in your .muttrc.

On the other hand, the <create-alias> function can use only one file, the one pointed to by the $alias_file variable (which is ~/.muttrc by default). This file is not special either, in the sense that Mutt will happily append aliases to any file, but in order for the new aliases to take effect you need to explicitly source this file too.

Example 3.9. Configuring external alias files

source /usr/local/share/Mutt.aliases
source ~/.mail_aliases
set alias_file=~/.mail_aliases

To use aliases, you merely use the alias at any place in Mutt where Mutt prompts for addresses, such as the To: or Cc: prompt. You can also enter aliases in your editor at the appropriate headers if you have the $edit_headers variable set.

In addition, at the various address prompts, you can use the tab character to expand a partial alias to the full alias. If there are multiple matches, Mutt will bring up a menu with the matching aliases. In order to be presented with the full list of aliases, you must hit tab without a partial alias, such as at the beginning of the prompt or after a comma denoting multiple addresses.

In the alias menu, you can select as many aliases as you want with the tag-entry key (default: <Space> or t), and use the exit key (default: q) to return to the address prompt.

6. Changing the Default Key Bindings

Usage:

bind map key function

This command allows you to change the default key bindings (operation invoked when pressing a key).

map specifies in which menu the binding belongs. Multiple maps may be specified by separating them with commas (no additional whitespace is allowed). The currently defined maps are:

generic

This is not a real menu, but is used as a fallback for all of the other menus except for the pager and editor modes. If a key is not defined in another menu, Mutt will look for a binding to use in this menu. This allows you to bind a key to a certain function in multiple menus instead of having multiple bind statements to accomplish the same task.

alias

The alias menu is the list of your personal aliases as defined in your .muttrc. It is the mapping from a short alias name to the full email address(es) of the recipient(s).

attach

The attachment menu is used to access the attachments on received messages.

browser

The browser is used for both browsing the local directory structure, and for listing all of your incoming mailboxes.

editor

The editor is used to allow the user to enter a single line of text, such as the To or Subject prompts in the compose menu.

index

The index is the list of messages contained in a mailbox.

compose

The compose menu is the screen used when sending a new message.

pager

The pager is the mode used to display message/attachment data, and help listings.

pgp

The pgp menu is used to select the OpenPGP keys used to encrypt outgoing messages.

smime

The smime menu is used to select the OpenSSL certificates used to encrypt outgoing messages.

postpone

The postpone menu is similar to the index menu, except is used when recalling a message the user was composing, but saved until later.

query

The query menu is the browser for results returned by $query_command.

mix

The mixmaster screen is used to select remailer options for outgoing messages (if Mutt is compiled with Mixmaster support).

key is the key (or key sequence) you wish to bind. To specify a control character, use the sequence \Cx, where x is the letter of the control character (for example, to specify control-A use “\Caâ€). Note that the case of x as well as \C is ignored, so that \CA, \Ca, \cA and \ca are all equivalent. An alternative form is to specify the key as a three digit octal number prefixed with a “\†(for example \177 is equivalent to \c?). You can also use the form <177>, which allows octal numbers with an arbitrary number of digits. In addition, key may be a symbolic name as shown in Table 3.1, “Symbolic key namesâ€.

Table 3.1. Symbolic key names

Symbolic nameMeaning
\ttab
<tab>tab
<backtab>backtab / shift-tab
\rcarriage return
\nnewline
\eescape
<esc>escape
<up>up arrow
<down>down arrow
<left>left arrow
<right>right arrow
<pageup>Page Up
<pagedown>Page Down
<backspace>Backspace
<delete>Delete
<insert>Insert
<enter>Enter
<return>Return
<keypadenter>Enter key on numeric keypad
<home>Home
<end>End
<space>Space bar
<f1>function key 1
<f10>function key 10

The <what-key> function can be used to explore keycode and symbolic names for other keys on your keyboard. Executing this function will display information about each key pressed, until terminated by ^G.

key does not need to be enclosed in quotes unless it contains a space (“ â€) or semi-colon (“;â€).

function specifies which action to take when key is pressed. For a complete list of functions, see the reference. Note that the bind expects function to be specified without angle brackets.

The special function <noop> unbinds the specified key sequence.

6.1. Terminal Keybindings

Some key bindings are controlled by the terminal, and so by default can't be bound inside Mutt. These may include ^C, ^\, ^Q, ^S, ^Z, and on BSD/Mac ^Y. These terminal settings can be viewed and changed using the stty program.

“stty -a†will list the bound characters (not all of them affect Mutt), and what actions they take when pressed. For example, you may see “intr = ^C†in its output. This means typing ^C will send an interrupt signal. “quit = ^\†means typing ^\ (commonly also ^4) will send a quit signal.

To unbind a key from an action, you invoke “stty action undefâ€. For example, “stty quit undef†will unbind ^\ (and ^4) from sending the quit signal. Once unbound (e.g, by placing that line in your .bashrc, or in a Mutt wrapper script/function) you can use the key sequence in your Mutt bindings.

6.2. Enter versus Return

Prior to version 2.2, Mutt used a default ncurses mode (“nl()â€). This mode maps keyboard input of either <Enter> or <Return> to the same value, which Mutt interpreted as <Return> internally.

However, starting in version 2.2, this mode is turned off, allowing <Return> and <Enter> to be mapped separately, if desired. The default keyboard mappings set both, but you can override this or create new bindings with one or the other (or both).

Note that in terminal application, such as Mutt, <Enter> is the same as “\n†and ^J; while <Return> is the same as “\r†and ^M.

7. Changing the current working directory

Usage:

cd directory

The cd command changes Mutt's current working directory. This affects commands and functions like source, change-folder, and save-entry that use relative paths. Using cd without directory changes to your home directory.

8. Defining Aliases for Character Sets

Usage:

charset-hook alias charset
iconv-hook charset local-charset

The charset-hook command defines an alias for a character set. This is useful to properly display messages which are tagged with a character set name not known to Mutt.

The iconv-hook command defines a system-specific name for a character set. This is helpful when your systems character conversion library insists on using strange, system-specific names for character sets.

9. Setting Variables Based Upon Mailbox

Usage:

folder-hook [!]regexp command

It is often desirable to change settings based on which mailbox you are reading. The folder-hook command provides a method by which you can execute any configuration command. regexp is a regular expression specifying in which mailboxes to execute command before loading. If a mailbox matches multiple folder-hooks, they are executed in the order given in the .muttrc.

The regexp parameter has mailbox shortcut expansion performed on the first character. See Mailbox Matching in Hooks for more details.

Note

If you use the “!†shortcut for $spoolfile at the beginning of the pattern, you must place it inside of double or single quotes in order to distinguish it from the logical not operator for the expression.

Note

Settings are not restored when you leave the mailbox. For example, a command action to perform is to change the sorting method based upon the mailbox being read:

folder-hook mutt "set sort=threads"

However, the sorting method is not restored to its previous value when reading a different mailbox. To specify a default command, use the pattern “.†before other folder-hooks adjusting a value on a per-folder basis because folder-hooks are evaluated in the order given in the configuration file.

Note

The keyboard buffer will not be processed until after all hooks are run; multiple push or exec commands will end up being processed in reverse order.

The following example will set the sort variable to date-sent for all folders but to threads for all folders containing “mutt†in their name.

Example 3.10. Setting sort method based on mailbox name

folder-hook . "set sort=date-sent"
folder-hook mutt "set sort=threads"

10. Keyboard Macros

Usage:

macro menu key sequence [ description ]

Macros are useful when you would like a single key to perform a series of actions. When you press key in menu menu, Mutt will behave as if you had typed sequence. So if you have a common sequence of commands you type, you can create a macro to execute those commands with a single key or fewer keys.

menu is the map which the macro will be bound in. Multiple maps may be specified by separating multiple menu arguments by commas. Whitespace may not be used in between the menu arguments and the commas separating them.

key and sequence are expanded by the same rules as the key bindings with some additions. The first is that control characters in sequence can also be specified as ^x. In order to get a caret (“^â€) you need to use ^^. Secondly, to specify a certain key such as up or to invoke a function directly, you can use the format <key name> and <function name>. For a listing of key names see the section on key bindings. Functions are listed in the reference.

The advantage with using function names directly is that the macros will work regardless of the current key bindings, so they are not dependent on the user having particular key definitions. This makes them more robust and portable, and also facilitates defining of macros in files used by more than one user (e.g., the system Muttrc).

Optionally you can specify a descriptive text after sequence, which is shown in the help screens if they contain a description.

Note

Macro definitions (if any) listed in the help screen(s), are silently truncated at the screen width, and are not wrapped.

11. Using Color and Mono Video Attributes

Usage:

color object [ attribute ...] foreground background
color { header | body } [ attribute ...] foreground background regexp
color index [ attribute ...] foreground background pattern
color compose composeobject [ attribute ...] foreground background
uncolor { index | header | body } { * | pattern ... }

If your terminal supports color, you can spice up Mutt by creating your own color scheme. To define the color of an object (type of information), you must specify both a foreground color and a background color (it is not possible to only specify one or the other).

header and body match regexp in the header/body of a message, index matches pattern in the message index. Note that IMAP server-side searches (=b, =B, =h) are not supported for color index patterns.

When $header_color_partial is unset (the default), a header matched by regexp will have color applied to the entire header. When set, color is applied only to the exact text matched by regexp.

object can be one of:

  • attachment

  • bold (highlighting bold patterns in the body of messages)

  • error (error messages printed by Mutt)

  • hdrdefault (default color of the message header in the pager)

  • indicator (arrow or bar used to indicate the current item in a menu)

  • markers (the “+†markers at the beginning of wrapped lines in the pager)

  • message (informational messages)

  • normal

  • prompt

  • quoted (text matching $quote_regexp in the body of a message)

  • quoted1, quoted2, ..., quotedN (higher levels of quoting)

  • search (highlighting of words in the pager)

  • signature

  • status (mode lines used to display info about the mailbox or message)

  • tilde (the “~†used to pad blank lines in the pager)

  • tree (thread tree drawn in the message index and attachment menu)

  • underline (highlighting underlined patterns in the body of messages)

composeobject can be one of:

  • header

  • security_encrypt

  • security_sign

  • security_both

  • security_none

attribute can be one of the following:

  • none

  • bold

  • underline

  • reverse

  • standout

foreground and background can be one of the following:

  • white

  • black

  • green

  • magenta

  • blue

  • cyan

  • yellow

  • red

  • default

  • colorx

The color name can optionally be prefixed with the keyword bright or light to make the color boldfaced or light (e.g., brightred). The precise behavior depends on the terminal and its configuration. In particular, the boldfaced/light difference and such background colors may be available only for terminals configured with at least 16 colors, as specified by the $TERM environment variable.

If your terminal supports it, the special keyword default can be used as a transparent color. The value brightdefault is also valid. If Mutt is linked against the S-Lang library, you also need to set the $COLORFGBG environment variable to the default colors of your terminal for this to work; for example (for Bourne-like shells):

set COLORFGBG="green;black"
export COLORFGBG

Note

The S-Lang library requires you to use the lightgray and brown keywords instead of white and yellow when setting this variable.

Note

The uncolor command can be applied to the index, header and body objects only. It removes entries from the list. You must specify the same pattern specified in the color command for it to be removed. The pattern “*†is a special token which means to clear the color list of all entries.

Mutt also recognizes the keywords color0, color1, ..., colorN-1 (N being the number of colors supported by your terminal). This is useful when you remap the colors for your display (for example by changing the color associated with color2 for your xterm), since color names may then lose their normal meaning.

If your terminal does not support color, it is still possible change the video attributes through the use of the “mono†command. Usage:

mono object attribute
mono { header | body } attribute regexp
mono index attribute pattern
mono compose composeobject attribute
unmono { index | header | body } { * | pattern ... }

For object, composeobject, and attribute, see the color command.

12. Message Header Display

12.1. Header Display

When displaying a message in the pager, Mutt folds long header lines at $wrap columns. Though there're precise rules about where to break and how, Mutt always folds headers using a tab for readability. (Note that the sending side is not affected by this, Mutt tries to implement standards compliant folding.)

Despite not being a real header, Mutt will also display an mbox "From_" line in the pager along with other headers. This line can be manipulated with ignore/unignore and hdr_order/unhdr_order commands.

12.2. Selecting Headers

Usage:

ignore pattern [ pattern ...]
unignore { * | pattern ... }

Messages often have many header fields added by automatic processing systems, or which may not seem useful to display on the screen. This command allows you to specify header fields which you don't normally want to see in the pager.

You do not need to specify the full header field name. For example, “ignore content-†will ignore all header fields that begin with the pattern “content-â€. “ignore *†will ignore all headers.

To remove a previously added token from the list, use the “unignore†command. The “unignore†command will make Mutt display headers with the given pattern. For example, if you do “ignore x-†it is possible to “unignore x-mailerâ€.

“unignore *†will remove all tokens from the ignore list.

Example 3.11. Header weeding

# Sven's draconian header weeding
ignore *
unignore from date subject to cc
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
unignore posted-to:

The above example will show "From:" headers as well as mbox "From_" lines. To hide the latter, instead use "unignore from: date subject to cc" on the second line.

12.3. Ordering Displayed Headers

Usage:

hdr_order header [ header ...]
unhdr_order { * | header ... }

With the hdr_order command you can specify an order in which Mutt will attempt to present these headers to you when viewing messages.

“unhdr_order *†will clear all previous headers from the order list, thus removing the header order effects set by the system-wide startup file.

Example 3.12. Configuring header display order

hdr_order From Date: From: To: Cc: Subject:

13. Alternative Addresses

Usage:

alternates [ -group name ...] regexp [ regexp ...]
unalternates [ -group name ...] { * | regexp ... }

With various functions, Mutt will treat messages differently, depending on whether you sent them or whether you received them from someone else. For instance, when replying to a message that you sent to a different party, Mutt will automatically suggest to send the response to the original message's recipients — responding to yourself won't make much sense in many cases. (See $reply_to.)

Many users receive e-mail under a number of different addresses. To fully use Mutt's features here, the program must be able to recognize what e-mail addresses you receive mail under. That's the purpose of the alternates command: It takes a list of regular expressions, each of which can identify an address under which you receive e-mail.

As addresses are matched using regular expressions and not exact strict comparisons, you should make sure you specify your addresses as precise as possible to avoid mismatches. For example, if you specify:

alternates user@example

Mutt will consider “some-user@example†as being your address, too which may not be desired. As a solution, in such cases addresses should be specified as:

alternates '^user@example$'

The -group flag causes all of the subsequent regular expressions to be added to the named group.

The unalternates command can be used to write exceptions to alternates patterns. If an address matches something in an alternates command, but you nonetheless do not think it is from you, you can list a more precise pattern under an unalternates command.

To remove a regular expression from the alternates list, use the unalternates command with exactly the same regexp. Likewise, if the regexp for an alternates command matches an entry on the unalternates list, that unalternates entry will be removed. If the regexp for unalternates is “*â€, all entries on alternates will be removed.

14. Mailing Lists

Usage:

lists [ -group name ...] regexp [ regexp ...]
unlists { * | regexp ... }
subscribe [ -group name ...] regexp [ regexp ...]
unsubscribe { * | regexp ... }

Mutt has a few nice features for handling mailing lists. In order to take advantage of them, you must specify which addresses belong to mailing lists, and which mailing lists you are subscribed to. Mutt also has limited support for auto-detecting mailing lists: it supports parsing mailto: links in the common List-Post: header which has the same effect as specifying the list address via the lists command (except the group feature). Once you have done this, the <list-reply> function will work for all known lists. Additionally, when you send a message to a known list and $followup_to is set, Mutt will add a Mail-Followup-To header. For unsubscribed lists, this will include your personal address, ensuring you receive a copy of replies. For subscribed mailing lists, the header will not, telling other users' mail user agents not to send copies of replies to your personal address.

Note

The Mail-Followup-To header is a non-standard extension which is not supported by all mail user agents. Adding it is not bullet-proof against receiving personal CCs of list messages. Also note that the generation of the Mail-Followup-To header is controlled by the $followup_to configuration variable since it's common practice on some mailing lists to send Cc upon replies (which is more a group- than a list-reply).

More precisely, Mutt maintains lists of patterns for the addresses of known and subscribed mailing lists. Every subscribed mailing list is known. To mark a mailing list as known, use the list command. To mark it as subscribed, use subscribe.

You can use regular expressions with both commands. To mark all messages sent to a specific bug report's address on Debian's bug tracking system as list mail, for instance, you could say

subscribe [0-9]+.*@bugs.debian.org

as it's often sufficient to just give a portion of the list's e-mail address.

Specify as much of the address as you need to remove ambiguity. For example, if you've subscribed to the Mutt mailing list, you will receive mail addressed to mutt-users@mutt.org. So, to tell Mutt that this is a mailing list, you could add lists mutt-users@ to your initialization file. To tell Mutt that you are subscribed to it, add subscribe mutt-users to your initialization file instead. If you also happen to get mail from someone whose address is mutt-users@example.com, you could use lists ^mutt-users@mutt\\.org$ or subscribe ^mutt-users@mutt\\.org$ to match only mail from the actual list.

The -group flag adds all of the subsequent regular expressions to the named address group in addition to adding to the specified address list.

The “unlists†command is used to remove a token from the list of known and subscribed mailing-lists. Use “unlists *†to remove all tokens.

To remove a mailing list from the list of subscribed mailing lists, but keep it on the list of known mailing lists, use unsubscribe.

All of the mailing list configuration options described so far govern mutt's knowledge of your list subscriptions and how it presents list information to you. If you have a message from a mailing list, you can also use the list menu (bound to "ESC L" by default) to interact with the message's list's list server. This makes it easy to subscribe, unsubscribe, and so on.

15. Using Multiple Spool Mailboxes

Usage:

mbox-hook [!]regexp mailbox

This command is used to move read messages from a specified mailbox to a different mailbox automatically when you quit or change folders. regexp is a regular expression specifying the mailbox to treat as a “spool†mailbox and mailbox specifies where mail should be saved when read.

The regexp parameter has mailbox shortcut expansion performed on the first character. See Mailbox Matching in Hooks for more details.

Note that execution of mbox-hooks is dependent on the $move configuration variable. If set to “no†(the default), mbox-hooks will not be executed.

Unlike some of the other hook commands, only the first matching regexp is used (it is not possible to save read mail in more than a single mailbox).

16. Monitoring Incoming Mail

Usage:

mailboxes [ [ -notify | -nonotify ] [ -poll | -nopoll ] [ -label label | -nolabel ] mailbox ] [...]
unmailboxes { * | mailbox ... }

This command specifies folders which can receive mail and which will be checked for new messages periodically.

Use -nonotify to disable notifying when new mail arrives. The -notify argument can be used to reenable notifying for an existing mailbox. If unspecified: a new mailbox will notify by default, while an existing mailbox will be unchanged.

To disable polling, specify -nopoll before the mailbox name. The -poll argument can be used to reenable polling for an existing mailbox. If unspecified: a new mailbox will poll by default, while an existing mailbox will be unchanged.

The -label argument can be used to specify an alternative label to print in the sidebar or mailbox browser instead of the mailbox path. A label may be removed via the -nolabel argument. If unspecified, an existing mailbox label will be unchanged.

mailbox can either be a local file or directory (Mbox/Mmdf or Maildir/Mh). If Mutt was built with POP and/or IMAP support, mailbox can also be a POP/IMAP folder URL. The URL syntax is described in Section 1.2, “URL Syntaxâ€, POP and IMAP are described in Section 3, “POP3 Support†and Section 4, “IMAP Support†respectively.

Mutt provides a number of advanced features for handling (possibly many) folders and new mail within them, please refer to Section 13, “New Mail Detection†for details (including in what situations and how often Mutt checks for new mail). Additionally, $new_mail_command can be used to run a command when new mail is detected.

The “unmailboxes†command is used to remove a token from the list of folders which receive mail. Use “unmailboxes *†to remove all tokens.

Note

The folders in the mailboxes command are resolved when the command is executed, so if these names contain shortcut characters (such as “=†and “!â€), any variable definition that affects these characters (like $folder and $spoolfile) should be set before the mailboxes command. If none of these shortcuts are used, a local path should be absolute as otherwise Mutt tries to find it relative to the directory from where Mutt was started which may not always be desired.

17. User-Defined Headers

Usage:

my_hdr string
unmy_hdr { * | field ... }

The my_hdr command allows you to add custom header fields to every message you send. It can also be used as an alternate way to set some standard envelope header fields, see below for more details.

Custom header fields will be added to every message you send and appear in the editor if $edit_headers is set.

For example, if you would like to add an “Organization:†header field to all of your outgoing messages, you can put the command something like shown in Example 3.13, “Defining custom headers†in your .muttrc.

Example 3.13. Defining custom headers

my_hdr Organization: A Really Big Company, Anytown, USA

The standard envelope header fields To, Cc, Bcc, Subject, From, Reply-To, and Message-ID can also be set via my_hdr. For more details about when those are processed, see Section 18, “Message Composition Flowâ€. Note that trying to set the value of other Mutt generated header fields is not supported, and may result in an invalid email being generated.

Note

Space characters are not allowed between the keyword and the colon (“:â€). The standard for electronic mail (RFC2822) says that space is illegal there, so Mutt enforces the rule.

If you would like to add a header field to a single message, you should either set the $edit_headers variable, or use the <edit-headers> function (default: “Eâ€) in the compose menu so that you can edit the header of your message along with the body.

To remove user defined header fields, use the unmy_hdr command. You may specify an asterisk (“*â€) to remove all header fields, or the fields to remove. For example, to remove all “To†and “Cc†header fields, you could use:

unmy_hdr to cc

18. Specify Default Save Mailbox

Usage:

save-hook [!]pattern mailbox

This command is used to override the default mailbox used when saving messages. mailbox will be used as the default if the message matches pattern, see Message Matching in Hooks for information on the exact format.

To provide more flexibility and good defaults, Mutt applies the expandos of $index_format to mailbox after it was expanded.

Example 3.14. Using %-expandos in save-hook

# default: save all to ~/Mail/<author name>
save-hook . ~/Mail/%F

# save from me@turing.cs.hmc.edu and me@cs.hmc.edu to $folder/elkins
save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins

# save from aol.com to $folder/spam
save-hook aol\\.com$ +spam

Also see the fcc-save-hook command.

19. Specify Default Fcc: Mailbox When Composing

Usage:

fcc-hook [!]pattern mailbox

This command is used to save outgoing mail in a mailbox other than $record. Mutt searches the initial list of message recipients for the first matching pattern and uses mailbox as the default Fcc: mailbox. If no match is found the message will be saved to $record mailbox.

To provide more flexibility and good defaults, Mutt applies the expandos of $index_format to mailbox after it was expanded.

See Message Matching in Hooks for information on the exact format of pattern.

fcc-hook [@.]aol\\.com$ +spammers

...will save a copy of all messages going to the aol.com domain to the `+spammers' mailbox by default. Also see the fcc-save-hook command.

Multiple mailboxes may be specified by separating them with $fcc_delimiter, if set:

  set fcc_delimiter = ','
  fcc-hook 'foo@example\.com$' '+one,+two'

20. Specify Default Save Filename and Default Fcc: Mailbox at Once

Usage:

fcc-save-hook [!]pattern mailbox

This command is a shortcut, almost equivalent to doing both a fcc-hook and a save-hook with its arguments, including %-expansion on mailbox according to $index_format.

Note, however that the fcc-save-hook is not designed to take advantage of multiple mailboxes, as fcc-hook is. For correct behavior, you should use separate fcc and save hooks in that case.

21. Change Settings Based Upon Message Recipients

Usage:

reply-hook [!]pattern command
send-hook [!]pattern command
send2-hook [!]pattern command

These commands can be used to execute arbitrary configuration commands based upon recipients of the message. pattern is used to match the message, see Message Matching in Hooks for details. command is executed when pattern matches.

reply-hook is matched against the message you are replying to, instead of the message you are sending. send-hook is matched against all messages, both new and replies.

Note

reply-hooks are matched before the send-hook, regardless of the order specified in the user's configuration file. However, you can inhibit send-hook in the reply case by using the pattern '! ~Q' (not replied, see Message Matching in Hooks) in the send-hook to tell when reply-hook have been executed.

send2-hook is matched every time a message is changed, either by editing it, or by using the compose menu to change its recipients or subject. send2-hook is executed after send-hook, and can, e.g., be used to set parameters such as the $sendmail variable depending on the message's sender address.

For each type of send-hook or reply-hook, when multiple matches occur, commands are executed in the order they are specified in the .muttrc (for that type of hook).

Example: send-hook mutt "set mime_forward signature=''"

Another typical use for this command is to change the values of the $attribution, $attribution_locale, and $signature variables in order to change the language of the attributions and signatures based upon the recipients.

Note

send-hook's are only executed once after getting the initial list of recipients. They are not executed when resuming a postponed draft. Adding a recipient after replying or editing the message will not cause any send-hook to be executed, similarly if $autoedit is set (as then the initial list of recipients is empty). Also note that my_hdr commands which modify recipient headers, or the message's subject, don't have any effect on the current message when executed from a send-hook.

22. Change Settings Before Formatting a Message

Usage:

message-hook [!]pattern command

This command can be used to execute arbitrary configuration commands before viewing or formatting a message based upon information about the message. command is executed if the pattern matches the message to be displayed. When multiple matches occur, commands are executed in the order they are specified in the .muttrc.

See Message Matching in Hooks for information on the exact format of pattern.

Example:

message-hook ~A 'set pager=builtin'
message-hook '~f freshmeat-news' 'set pager="less \"+/^  subject: .*\""'

23. Choosing the Cryptographic Key of the Recipient

Usage:

crypt-hook regexp keyid

When encrypting messages with PGP/GnuPG or OpenSSL, you may want to associate a certain key with a given e-mail address automatically, either because the recipient's public key can't be deduced from the destination address, or because, for some reasons, you need to override the key Mutt would normally use. The crypt-hook command provides a method by which you can specify the ID of the public key to be used when encrypting messages to a certain recipient. You may use multiple crypt-hooks with the same regexp; multiple matching crypt-hooks result in the use of multiple keyids for a recipient. During key selection, Mutt will confirm whether each crypt-hook is to be used (unless the $crypt_confirmhook option is unset). If all crypt-hooks for a recipient are declined, Mutt will use the original recipient address for key selection instead.

The meaning of keyid is to be taken broadly in this context: You can either put a numerical key ID or fingerprint here, an e-mail address, or even just a real name.

24. Dynamically Changing $index_format using Patterns

Usage:

index-format-hook name [!]pattern format-string

This command is used to inject format strings dynamically into $index_format based on pattern matching against the current message.

The $index_format expando %@name@ specifies a placeholder for the injection. Index-format-hooks with the same name are matched using pattern against the current message. Matching is done in the order specified in the .muttrc, with the first match being used. The hook's format-string is then substituted and evaluated.

Because the first match is used, best practice is to put a catch-all ~A pattern as the last hook. Here is an example showing how to implement dynamic date formatting:

set index_format="%4C %-6@date@ %-15.15F %Z (%4c) %s"

index-format-hook  date  "~d<1d"    "%[%H:%M]"
index-format-hook  date  "~d<1m"    "%[%a %d]"
index-format-hook  date  "~d<1y"    "%[%b %d]"
index-format-hook  date  "~A"       "%[%m/%y]"

Another example, showing a way to prepend to the subject. Note that without a catch-all ~A pattern, no match results in the expando being replaced with an empty string.

set index_format="%4C %@subj_flags@%s"

index-format-hook  subj_flags  "~f boss@example.com"    "** BOSS ** "
index-format-hook  subj_flags  "~f spouse@example.com"  ":-) "

25. Adding Key Sequences to the Keyboard Buffer

Usage:

push string

This command adds the named string to the beginning of the keyboard buffer. The string may contain control characters, key names and function names like the sequence string in the macro command. You may use it to automatically run a sequence of commands at startup, or when entering certain folders. For example, Example 3.15, “Embedding push in folder-hook†shows how to automatically collapse all threads when entering a folder.

Example 3.15. Embedding push in folder-hook

folder-hook . 'push <collapse-all>'

For using functions like shown in the example, it's important to use angle brackets (“<†and “>â€) to make Mutt recognize the input as a function name. Otherwise it will simulate individual just keystrokes, i.e. “push collapse-all†would be interpreted as if you had typed “câ€, followed by “oâ€, followed by “lâ€, ..., which is not desired and may lead to very unexpected behavior.

Keystrokes can be used, too, but are less portable because of potentially changed key bindings. With default bindings, this is equivalent to the above example:

folder-hook . 'push \eV'

because it simulates that Esc+V was pressed (which is the default binding of <collapse-all>).

26. Executing Functions

Usage:

exec function [ function ...]

This command can be used to execute any function. Functions are listed in the function reference. “exec function†is equivalent to “push <function>â€.

27. Message Scoring

Usage:

score pattern value
unscore { * | pattern ... }

The score commands adds value to a message's score if pattern matches it. pattern is a string in the format described in the patterns section (note: For efficiency reasons, patterns which scan information not available in the index, such as ~b, ~B, ~h, ~M, or ~X may not be used). value is a positive or negative integer. A message's final score is the sum total of all matching score entries. However, you may optionally prefix value with an equal sign (“=â€) to cause evaluation to stop at a particular entry if there is a match. Negative final scores are rounded up to 0.

The unscore command removes score entries from the list. You must specify the same pattern specified in the score command for it to be removed. The pattern “*†is a special token which means to clear the list of all score entries.

Scoring occurs as the messages are read in, before the mailbox is sorted. Because of this, patterns which depend on threading, such as ~=, ~$, and ~(), will not work by default. A workaround is to push the scoring command in a folder hook. This will cause the mailbox to be rescored after it is opened and input starts being processed:

folder-hook . 'push "<enter-command>score ~= 10<enter>"'

28. Spam Detection

Usage:

spam pattern format
nospam { * | pattern }

Mutt has generalized support for external spam-scoring filters. By defining your spam patterns with the spam and nospam commands, you can limit, search, and sort your mail based on its spam attributes, as determined by the external filter. You also can display the spam attributes in your index display using the %H selector in the $index_format variable. (Tip: try %?H?[%H] ? to display spam tags only when they are defined for a given message.)

Note: the value displayed by %H and searched by ~H is stored in the header cache. Mutt isn't smart enough to invalidate a header cache entry based on changing spam rules, so if you aren't seeing correct %H values, try temporarily turning off the header cache. If that fixes the problem, then once your spam rules are set to your liking, remove your stale header cache files and turn the header cache back on.

Your first step is to define your external filter's spam patterns using the spam command. pattern should be a regular expression that matches a header in a mail message. If any message in the mailbox matches this regular expression, it will receive a “spam tag†or “spam attribute†(unless it also matches a nospam pattern — see below.) The appearance of this attribute is entirely up to you, and is governed by the format parameter. format can be any static text, but it also can include back-references from the pattern expression. (A regular expression “back-reference†refers to a sub-expression contained within parentheses.) %1 is replaced with the first back-reference in the regex, %2 with the second, etc.

To match spam tags, mutt needs the corresponding header information which is always the case for local and POP folders but not for IMAP in the default configuration. Depending on the spam header to be analyzed, $imap_headers may need to be adjusted.

If you're using multiple spam filters, a message can have more than one spam-related header. You can define spam patterns for each filter you use. If a message matches two or more of these patterns, and the $spam_separator variable is set to a string, then the message's spam tag will consist of all the format strings joined together, with the value of $spam_separator separating them.

For example, suppose one uses DCC, SpamAssassin, and PureMessage, then the configuration might look like in Example 3.16, “Configuring spam detectionâ€.

Example 3.16. Configuring spam detection

spam "X-DCC-.*-Metrics:.*(....)=many"         "90+/DCC-%1"
spam "X-Spam-Status: Yes"                     "90+/SA"
spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
set spam_separator=", "

If then a message is received that DCC registered with “many†hits under the “Fuz2†checksum, and that PureMessage registered with a 97% probability of being spam, that message's spam tag would read 90+/DCC-Fuz2, 97/PM. (The four characters before “=many†in a DCC report indicate the checksum used — in this case, “Fuz2â€.)

If the $spam_separator variable is unset, then each spam pattern match supersedes the previous one. Instead of getting joined format strings, you'll get only the last one to match.

The spam tag is what will be displayed in the index when you use %H in the $index_format variable. It's also the string that the ~H pattern-matching expression matches against for <search> and <limit> functions. And it's what sorting by spam attribute will use as a sort key.

That's a pretty complicated example, and most people's actual environments will have only one spam filter. The simpler your configuration, the more effective Mutt can be, especially when it comes to sorting.

Generally, when you sort by spam tag, Mutt will sort lexically — that is, by ordering strings alphanumerically. However, if a spam tag begins with a number, Mutt will sort numerically first, and lexically only when two numbers are equal in value. (This is like UNIX's sort -n.) A message with no spam attributes at all — that is, one that didn't match any of your spam patterns — is sorted at lowest priority. Numbers are sorted next, beginning with 0 and ranging upward. Finally, non-numeric strings are sorted, with “a†taking lower priority than “zâ€. Clearly, in general, sorting by spam tags is most effective when you can coerce your filter to give you a raw number. But in case you can't, Mutt can still do something useful.

The nospam command can be used to write exceptions to spam patterns. If a header pattern matches something in a spam command, but you nonetheless do not want it to receive a spam tag, you can list a more precise pattern under a nospam command.

If the pattern given to nospam is exactly the same as the pattern on an existing spam list entry, the effect will be to remove the entry from the spam list, instead of adding an exception. Likewise, if the pattern for a spam command matches an entry on the nospam list, that nospam entry will be removed. If the pattern for nospam is “*â€, all entries on both lists will be removed. This might be the default action if you use spam and nospam in conjunction with a folder-hook.

You can have as many spam or nospam commands as you like. You can even do your own primitive spam detection within Mutt — for example, if you consider all mail from MAILER-DAEMON to be spam, you can use a spam command like this:

spam "^From: .*MAILER-DAEMON"       "999"

29. Setting and Querying Variables

29.1. Variable Types

Mutt supports these types of configuration variables:

boolean

A boolean expression, either “yes†or “noâ€.

number

A signed integer number in the range -32768 to 32767.

number (long)

A signed integer number in the range -2147483648 to 2147483647.

string

Arbitrary text.

path

A specialized string for representing paths including support for mailbox shortcuts (see Section 10, “Mailbox Shortcutsâ€) as well as tilde (“~â€) for a user's home directory and more.

quadoption

Like a boolean but triggers a prompt when set to “ask-yes†or “ask-no†with “yes†and “no†preselected respectively.

sort order

A specialized string allowing only particular words as values depending on the variable.

regular expression

A regular expression, see Section 2, “Regular Expressions†for an introduction.

folder magic

Specifies the type of folder to use: mbox, mmdf, mh or maildir. Currently only used to determine the type for newly created folders.

e-mail address

An e-mail address either with or without realname. The older “user@example.org (Joe User)†form is supported but strongly deprecated.

user-defined

Arbitrary text, see Section 29.3, “User-Defined Variables†for details.

29.2. Commands

The following commands are available to manipulate and query variables:

Usage:

set { [ no | inv ] variable | variable=value } [...]
toggle variable [ variable ...]
unset variable [ variable ...]
reset variable [ variable ...]

This command is used to set (and unset) configuration variables. There are four basic types of variables: boolean, number, string and quadoption. boolean variables can be set (true) or unset (false). number variables can be assigned a positive integer value. string variables consist of any number of printable characters and must be enclosed in quotes if they contain spaces or tabs. You may also use the escape sequences “\n†and “\t†for newline and tab, respectively. quadoption variables are used to control whether or not to be prompted for certain actions, or to specify a default action. A value of yes will cause the action to be carried out automatically as if you had answered yes to the question. Similarly, a value of no will cause the action to be carried out as if you had answered “no.†A value of ask-yes will cause a prompt with a default answer of “yes†and ask-no will provide a default answer of “no.â€

Prefixing a variable with “no†will unset it. Example: set noaskbcc.

For boolean variables, you may optionally prefix the variable name with inv to toggle the value (on or off). This is useful when writing macros. Example: set invsmart_wrap.

The toggle command automatically prepends the inv prefix to all specified variables.

The unset command automatically prepends the no prefix to all specified variables.

Using the <enter-command> function in the index menu, you can query the value of a variable by prefixing the name of the variable with a question mark:

set ?allow_8bit

The question mark is actually only required for boolean and quadoption variables.

The reset command resets all given variables to the compile time defaults (hopefully mentioned in this manual). If you use the command set and prefix the variable with “&†this has the same behavior as the reset command.

With the reset command there exists the special variable “allâ€, which allows you to reset all variables to their system defaults.

29.3. User-Defined Variables

29.3.1. Introduction

Along with the variables listed in the Configuration variables section, Mutt supports user-defined variables with names starting with my_ as in, for example, my_cfgdir.

The set command either creates a custom my_ variable or changes its value if it does exist already. The unset and reset commands remove the variable entirely.

Since user-defined variables are expanded in the same way that environment variables are (except for the shell-escape command and backtick expansion), this feature can be used to make configuration files more readable.

29.3.2. Examples

The following example defines and uses the variable my_cfgdir to abbreviate the calls of the source command:

Example 3.17. Using user-defined variables for config file readability

set my_cfgdir = $HOME/mutt/config

source $my_cfgdir/hooks
source $my_cfgdir/macros
# more source commands...

A custom variable can also be used in macros to backup the current value of another variable. In the following example, the value of the $delete is changed temporarily while its original value is saved as my_delete. After the macro has executed all commands, the original value of $delete is restored.

Example 3.18. Using user-defined variables for backing up other config option values

macro pager ,x '\
<enter-command>set my_delete=$delete<enter>\
<enter-command>set delete=yes<enter>\
...\
<enter-command>set delete=$my_delete<enter>'

Since Mutt expands such values already when parsing the configuration file(s), the value of $my_delete in the last example would be the value of $delete exactly as it was at that point during parsing the configuration file. If another statement would change the value for $delete later in the same or another file, it would have no effect on $my_delete. However, the expansion can be deferred to runtime, as shown in the next example, when escaping the dollar sign.

Example 3.19. Deferring user-defined variable expansion to runtime

macro pager <PageDown> "\
<enter-command> set my_old_pager_stop=\$pager_stop pager_stop<Enter>\
<next-page>\
<enter-command> set pager_stop=\$my_old_pager_stop<Enter>\
<enter-command> unset my_old_pager_stop<Enter>"

Note that there is a space between <enter-command> and the set configuration command, preventing Mutt from recording the macro's commands into its history.

29.4. Type Conversions

Variables are always assigned string values which Mutt parses into its internal representation according to the type of the variable, for example an integer number for numeric types. For all queries (including $-expansion) the value is converted from its internal type back into string. As a result, any variable can be assigned any value given that its content is valid for the target. This also counts for custom variables which are of type string. In case of parsing errors, Mutt will print error messages. Example 3.20, “Type conversions using variables†demonstrates type conversions.

Example 3.20. Type conversions using variables

set my_lines = "5"                # value is string "5"
set pager_index_lines = $my_lines # value is integer 5

set my_sort = "date-received"     # value is string "date-received"
set sort = "last-$my_sort"        # value is sort last-date-received

set my_inc = $read_inc            # value is string "10" (default of $read_inc)
set my_foo = $my_inc              # value is string "10"

These assignments are all valid. If, however, the value of $my_lines would have been “five†(or something else that cannot be parsed into a number), the assignment to $pager_index_lines would have produced an error message.

Type conversion applies to all configuration commands which take arguments. But please note that every expanded value of a variable is considered just a single token. A working example is:

set my_pattern = "~A"
set my_number = "10"

# same as: score ~A +10
score $my_pattern +$my_number

What does not work is:

set my_mx = "+mailbox1 +mailbox2"
mailboxes $my_mx +mailbox3

because the value of $my_mx is interpreted as a single mailbox named “+mailbox1 +mailbox2†and not two distinct mailboxes.

30. Reading Initialization Commands From Another File

Usage:

source filename

This command allows the inclusion of initialization commands from other files. For example, I place all of my aliases in ~/.mail_aliases so that I can make my ~/.muttrc readable and keep my aliases private.

If the filename begins with a tilde (“~â€), it will be expanded to the path of your home directory.

If the filename ends with a vertical bar (“|â€), then filename is considered to be an executable program from which to read input (e.g. source ~/bin/myscript|).

31. Removing Hooks

Usage:

unhook { * | hook-type }

This command permits you to flush hooks you have previously defined. You can either remove all hooks by giving the “*†character as an argument, or you can remove all hooks of a specific type by saying something like unhook send-hook.

32. Format Strings

32.1. Basic usage

Format strings are a general concept you'll find in several locations through the Mutt configuration, especially in the $index_format, $pager_format, $status_format, and other related variables. These can be very straightforward, and it's quite possible you already know how to use them.

The most basic format string element is a percent symbol followed by another character. For example, %s represents a message's Subject: header in the $index_format variable. The “expandos†available are documented with each format variable, but there are general modifiers available with all formatting expandos, too. Those are our concern here.

Some of the modifiers are borrowed right out of C (though you might know them from Perl, Python, shell, or another language). These are the [-]m.n modifiers, as in %-12.12s. As with such programming languages, these modifiers allow you to specify the minimum and maximum size of the resulting string, as well as its justification. If the “-†sign follows the percent, the string will be left-justified instead of right-justified. If there's a number immediately following that, it's the minimum amount of space the formatted string will occupy — if it's naturally smaller than that, it will be padded out with spaces. If a decimal point and another number follow, that's the maximum space allowable — the string will not be permitted to exceed that width, no matter its natural size. Each of these three elements is optional, so that all these are legal format strings: %-12s, %4c, %.15F and %-12.15L.

Mutt adds some other modifiers to format strings. If you use an equals symbol (=) as a numeric prefix (like the minus above), it will force the string to be centered within its minimum space range. For example, %=14y will reserve 14 characters for the %y expansion — that's the X-Label: header, in $index_format. If the expansion results in a string less than 14 characters, it will be centered in a 14-character space. If the X-Label for a message were “testâ€, that expansion would look like “     test     â€.

There are two very little-known modifiers that affect the way that an expando is replaced. If there is an underline (“_â€) character between any format modifiers (as above) and the expando letter, it will expands in all lower case. And if you use a colon (“:â€), it will replace all decimal points with underlines.

32.2. Conditionals

Depending on the format string variable, some of its sequences can be used to optionally print a string if their value is nonzero. For example, you may only want to see the number of flagged messages if such messages exist, since zero is not particularly meaningful. To optionally print a string based upon one of the above sequences, the following construct is used:

%?<sequence_char>?<optional_string>?

where sequence_char is an expando, and optional_string is the string you would like printed if sequence_char is nonzero. optional_string may contain other sequences as well as normal text, but you may not nest optional strings.

Here is an example illustrating how to optionally print the number of new messages in a mailbox in $status_format:

%?n?%n new messages.?

You can also switch between two strings using the following construct:

%?<sequence_char>?<if_string>&<else_string>?

If the value of sequence_char is non-zero, if_string will be expanded, otherwise else_string will be expanded.

32.3. Filters

Any format string ending in a vertical bar (“|â€) will be expanded and piped through the first word in the string, using spaces as separator. The string returned will be used for display. If the returned string ends in %, it will be passed through the formatter a second time. This allows the filter to generate a replacement format string including % expandos.

All % expandos in a format string are expanded before the script is called so that:

Example 3.21. Using external filters in format strings

set status_format="script.sh '%r %f (%L)'|"

will make Mutt expand %r, %f and %L before calling the script. The example also shows that arguments can be quoted: the script will receive the expanded string between the single quotes as the only argument.

A practical example is the mutt_xtitle script installed in the samples subdirectory of the Mutt documentation: it can be used as filter for $status_format to set the current terminal's title, if supported.

32.4. Padding

In most format strings, Mutt supports different types of padding using special %-expandos:

%|X

When this occurs, Mutt will fill the rest of the line with the character X. For example, filling the rest of the line with dashes is done by setting:

set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-"
%>X

Since the previous expando stops at the end of line, there must be a way to fill the gap between two items via the %>X expando: it puts as many characters X in between two items so that the rest of the line will be right-justified. For example, to not put the version string and hostname the above example on the left but on the right and fill the gap with spaces, one might use (note the space after %>):

set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)"
%*X

Normal right-justification will print everything to the left of the %>, displaying padding and whatever lies to the right only if there's room. By contrast, “soft-fill†gives priority to the right-hand side, guaranteeing space to display it and showing padding only if there's still room. If necessary, soft-fill will eat text leftwards to make room for rightward text. For example, to right-justify the subject making sure as much as possible of it fits on screen, one might use (note two spaces after %* : the second ensures there's a space between the truncated right-hand side and the subject):

set index_format="%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?)%*  %s"

32.5. Bytes size display

Various format strings contain expandos that display the size of messages in bytes. This includes %s in $attach_format, %l in $compose_format, %s in $folder_format, %c in $index_format, and %l and %L in $status_format. There are four configuration variables that can be used to customize how the numbers are displayed.

$size_show_bytes will display the number of bytes when the size is < 1 kilobyte. When unset, kilobytes will be displayed instead.

$size_show_mb will display the number of megabytes when the size is >= 1 megabyte. When unset, kilobytes will be displayed instead (which could be a large number).

$size_show_fractions, will display numbers with a single decimal place for values from 0 to 10 kilobytes, and 1 to 10 megabytes.

$size_units_on_left will display the unit (“K†or “Mâ€) to the left of the number, instead of the right if unset.

These variables also affect size display in a few other places, such as progress indicators and attachment delimiters in the pager.

33. Control allowed header fields in a mailto: URL

Usage:

mailto_allow { * | header-field ... }
unmailto_allow { * | header-field ... }

As a security measure, Mutt will only add user-approved header fields from a mailto: URL. This is necessary since Mutt will handle certain header fields, such as Attach:, in a special way. The mailto_allow and unmailto_allow commands allow the user to modify the list of approved headers.

Mutt initializes the default list to contain the Subject and Body header fields, which are the only requirement specified by the mailto: specification in RFC2368, along with Cc, In-Reply-To, and References, to support mailing list URLs.

Chapter 4. Advanced Usage

1. Character Set Handling

A “character set†is basically a mapping between bytes and glyphs and implies a certain character encoding scheme. For example, for the ISO 8859 family of character sets, an encoding of 8bit per character is used. For the Unicode character set, different character encodings may be used, UTF-8 being the most popular. In UTF-8, a character is represented using a variable number of bytes ranging from 1 to 4.

Since Mutt is a command-line tool run from a shell, and delegates certain tasks to external tools (such as an editor for composing/editing messages), all of these tools need to agree on a character set and encoding. There exists no way to reliably deduce the character set a plain text file has. Interoperability is gained by the use of well-defined environment variables. The full set can be printed by issuing locale on the command line.

Upon startup, Mutt determines the character set on its own using routines that inspect locale-specific environment variables. Therefore, it is generally not necessary to set the $charset variable in Mutt. It may even be counter-productive as Mutt uses system and library functions that derive the character set themselves and on which Mutt has no influence. It's safest to let Mutt work out the locale setup itself.

If you happen to work with several character sets on a regular basis, it's highly advisable to use Unicode and an UTF-8 locale. Unicode can represent nearly all characters in a message at the same time. When not using a Unicode locale, it may happen that you receive messages with characters not representable in your locale. When displaying such a message, or replying to or forwarding it, information may get lost possibly rendering the message unusable (not only for you but also for the recipient, this breakage is not reversible as lost information cannot be guessed).

A Unicode locale makes all conversions superfluous which eliminates the risk of conversion errors. It also eliminates potentially wrong expectations about the character set between Mutt and external programs.

The terminal emulator used also must be properly configured for the current locale. Terminal emulators usually do not derive the locale from environment variables, they need to be configured separately. If the terminal is incorrectly configured, Mutt may display random and unexpected characters (question marks, octal codes, or just random glyphs), format strings may not work as expected, you may not be abled to enter non-ascii characters, and possible more. Data is always represented using bytes and so a correct setup is very important as to the machine, all character sets “look†the same.

Warning: A mismatch between what system and library functions think the locale is and what Mutt was told what the locale is may make it behave badly with non-ascii input: it will fail at seemingly random places. This warning is to be taken seriously since not only local mail handling may suffer: sent messages may carry wrong character set information the receiver has too deal with. The need to set $charset directly in most cases points at terminal and environment variable setup problems, not Mutt problems.

A list of officially assigned and known character sets can be found at IANA, a list of locally supported locales can be obtained by running locale -a.

2. Regular Expressions

All string patterns in Mutt including those in more complex patterns must be specified using regular expressions (regexp) in the “POSIX extended†syntax (which is more or less the syntax used by egrep and GNU awk). For your convenience, we have included below a brief description of this syntax.

The search is case sensitive if the pattern contains at least one upper case letter, and case insensitive otherwise.

Note

“\†must be quoted if used for a regular expression in an initialization command: “\\â€.

A regular expression is a pattern that describes a set of strings. Regular expressions are constructed analogously to arithmetic expressions, by using various operators to combine smaller expressions.

Note

The regular expression can be enclosed/delimited by either " or ' which is useful if the regular expression includes a white-space character. See Syntax of Initialization Files for more information on " and ' delimiter processing. To match a literal " or ' you must preface it with \ (backslash).

The fundamental building blocks are the regular expressions that match a single character. Most characters, including all letters and digits, are regular expressions that match themselves. Any metacharacter with special meaning may be quoted by preceding it with a backslash.

The period “.†matches any single character. The caret “^†and the dollar sign “$†are metacharacters that respectively match the empty string at the beginning and end of a line.

A list of characters enclosed by “[†and “]†matches any single character in that list; if the first character of the list is a caret “^†then it matches any character not in the list. For example, the regular expression [0123456789] matches any single digit. A range of ASCII characters may be specified by giving the first and last characters, separated by a hyphen “-â€. Most metacharacters lose their special meaning inside lists. To include a literal “]†place it first in the list. Similarly, to include a literal “^†place it anywhere but first. Finally, to include a literal hyphen “-†place it last.

Certain named classes of characters are predefined. Character classes consist of “[:â€, a keyword denoting the class, and “:]â€. The following classes are defined by the POSIX standard in Table 4.1, “POSIX regular expression character classesâ€

Table 4.1. POSIX regular expression character classes

Character classDescription
[:alnum:]Alphanumeric characters
[:alpha:]Alphabetic characters
[:blank:]Space or tab characters
[:cntrl:]Control characters
[:digit:]Numeric characters
[:graph:]Characters that are both printable and visible. (A space is printable, but not visible, while an “a†is both)
[:lower:]Lower-case alphabetic characters
[:print:]Printable characters (characters that are not control characters)
[:punct:]Punctuation characters (characters that are not letter, digits, control characters, or space characters)
[:space:]Space characters (such as space, tab and formfeed, to name a few)
[:upper:]Upper-case alphabetic characters
[:xdigit:]Characters that are hexadecimal digits

A character class is only valid in a regular expression inside the brackets of a character list.

Note

Note that the brackets in these class names are part of the symbolic names, and must be included in addition to the brackets delimiting the bracket list. For example, [[:digit:]] is equivalent to [0-9].

Two additional special sequences can appear in character lists. These apply to non-ASCII character sets, which can have single symbols (called collating elements) that are represented with more than one character, as well as several characters that are equivalent for collating or sorting purposes:

Collating Symbols

A collating symbol is a multi-character collating element enclosed in “[.†and “.]â€. For example, if “ch†is a collating element, then [[.ch.]] is a regexp that matches this collating element, while [ch] is a regexp that matches either “c†or “hâ€.

Equivalence Classes

An equivalence class is a locale-specific name for a list of characters that are equivalent. The name is enclosed in “[=†and “=]â€. For example, the name “e†might be used to represent all of “e†with grave (“èâ€), “e†with acute (“éâ€) and “eâ€. In this case, [[=e=]] is a regexp that matches any of: “e†with grave (“èâ€), “e†with acute (“éâ€) and “eâ€.

A regular expression matching a single character may be followed by one of several repetition operators described in Table 4.2, “Regular expression repetition operatorsâ€.

Table 4.2. Regular expression repetition operators

OperatorDescription
?The preceding item is optional and matched at most once
*The preceding item will be matched zero or more times
+The preceding item will be matched one or more times
{n}The preceding item is matched exactly n times
{n,}The preceding item is matched n or more times
{,m}The preceding item is matched at most m times
{n,m}The preceding item is matched at least n times, but no more than m times

Two regular expressions may be concatenated; the resulting regular expression matches any string formed by concatenating two substrings that respectively match the concatenated subexpressions.

Two regular expressions may be joined by the infix operator “|â€; the resulting regular expression matches any string matching either subexpression.

Repetition takes precedence over concatenation, which in turn takes precedence over alternation. A whole subexpression may be enclosed in parentheses to override these precedence rules.

Note

If you compile Mutt with the included regular expression engine, the following operators may also be used in regular expressions as described in Table 4.3, “GNU regular expression extensionsâ€.

Table 4.3. GNU regular expression extensions

ExpressionDescription
\\yMatches the empty string at either the beginning or the end of a word
\\BMatches the empty string within a word
\\<Matches the empty string at the beginning of a word
\\>Matches the empty string at the end of a word
\\wMatches any word-constituent character (letter, digit, or underscore)
\\WMatches any character that is not word-constituent
\\`Matches the empty string at the beginning of a buffer (string)
\\'Matches the empty string at the end of a buffer

Please note however that these operators are not defined by POSIX, so they may or may not be available in stock libraries on various systems.

3. Patterns: Searching, Limiting and Tagging

3.1. Pattern Modifier

Many of Mutt's commands allow you to specify a pattern to match (limit, tag-pattern, delete-pattern, etc.). Table 4.4, “Pattern modifiers†shows several ways to select messages.

Table 4.4. Pattern modifiers

Pattern modifierDescription
~Aall messages
~b EXPRmessages which contain EXPR in the message body ***)
=b STRINGIf IMAP is enabled, like ~b but searches for STRING on the server, rather than downloading each message and searching it locally.
~B EXPRmessages which contain EXPR in the whole message ***)
=B STRINGIf IMAP is enabled, like ~B but searches for STRING on the server, rather than downloading each message and searching it locally.
~c EXPRmessages carbon-copied to EXPR
%c GROUPmessages carbon-copied to any member of GROUP
~C EXPRmessages either to: or cc: EXPR
%C GROUPmessages either to: or cc: to any member of GROUP
~d [MIN]-[MAX]messages with “date-sent†in a Date range
~Ddeleted messages
~e EXPRmessages which contains EXPR in the “Sender†field
%e GROUPmessages which contain a member of GROUP in the “Sender†field
~Eexpired messages
~Fflagged messages
~f EXPRmessages originating from EXPR
%f GROUPmessages originating from any member of GROUP
~gcryptographically signed messages
~Gcryptographically encrypted messages
~h EXPRmessages which contain EXPR in the message header ***)
=h STRINGIf IMAP is enabled, like ~h but searches for STRING on the server, rather than downloading each message and searching it locally; STRING must be of the form “header: substring†(see below).
~H EXPRmessages with a spam attribute matching EXPR
~i EXPRmessages which match EXPR in the “Message-ID†field
~kmessages which contain PGP key material
~L EXPRmessages either originated or received by EXPR
%L GROUPmessage either originated or received by any member of GROUP
~lmessages addressed to a known mailing list
~m [MIN]-[MAX]messages in the range MIN to MAX *)
~M EXPRmessages which contain a mime Content-Type matching EXPR ***)
~n [MIN]-[MAX]messages with a score in the range MIN to MAX *)
~Nnew messages
~Oold messages
~pmessages addressed to you (consults $from, alternates, and local account/hostname information)
~Pmessages from you (consults $from, alternates, and local account/hostname information)
~Qmessages which have been replied to
~r [MIN]-[MAX]messages with “date-received†in a Date range
~Rread messages
~s EXPRmessages having EXPR in the “Subject†field.
~Ssuperseded messages
~t EXPRmessages addressed to EXPR
~Ttagged messages
~umessages addressed to a subscribed mailing list
~Uunread messages
~vmessages part of a collapsed thread.
~Vcryptographically verified messages
~x EXPRmessages which contain EXPR in the “References†or “In-Reply-To†field
~X [MIN]-[MAX]messages with MIN to MAX attachments *) ***)
~y EXPRmessages which contain EXPR in the “X-Label†field
~z [MIN]-[MAX]messages with a size in the range MIN to MAX *) **)
~=duplicated messages (see $duplicate_threads)
~$unreferenced messages (requires threaded view)
~(PATTERN)messages in threads containing messages matching PATTERN, e.g. all threads containing messages from you: ~(~P)
~<(PATTERN)messages whose immediate parent matches PATTERN, e.g. replies to your messages: ~<(~P)
~>(PATTERN)messages having an immediate child matching PATTERN, e.g. messages you replied to: ~>(~P)

Where EXPR is a regular expression, and GROUP is an address group.

*) The forms “<[MAX]â€, “>[MIN]â€, “[MIN]-†and “-[MAX]†are allowed, too.

**) The suffixes “K†and “M†are allowed to specify kilobyte and megabyte respectively.

***) These patterns read each message in, and can therefore be much slower. Over IMAP this will entail downloading each message. They can not be used for message scoring, and it is recommended to avoid using them for index coloring.

Special attention has to be paid when using regular expressions inside of patterns. Specifically, Mutt's parser for these patterns will strip one level of backslash (“\â€), which is normally used for quoting. If it is your intention to use a backslash in the regular expression, you will need to use two backslashes instead (“\\â€).

You can force Mutt to treat EXPR as a simple string instead of a regular expression by using = instead of ~ in the pattern name. For example, =b *.* will find all messages that contain the literal string “*.*â€. Simple string matches are less powerful than regular expressions but can be considerably faster.

For IMAP folders, string matches =b, =B, and =h will be performed on the server instead of by fetching every message. IMAP treats =h specially: it must be of the form “header: substring†and will not partially match header names. The substring part may be omitted if you simply wish to find messages containing a particular header without regard to its value.

Patterns matching lists of addresses (notably c, C, p, P and t) match if there is at least one match in the whole list. If you want to make sure that all elements of that list match, you need to prefix your pattern with “^â€. This example matches all mails which only has recipients from Germany.

Example 4.1. Matching all addresses in address lists

^~C \.de$

You can restrict address pattern matching to aliases that you have defined with the "@" modifier. This example matches messages whose recipients are all from Germany, and who are known to your alias list.

Example 4.2. Matching restricted to aliases

^@~C \.de$

To match any defined alias, use a regular expression that matches any string. This example matches messages whose senders are known aliases.

Example 4.3. Matching any defined alias

@~f .

3.2. Simple Searches

Mutt supports two versions of so called “simple searchesâ€. These are issued if the query entered for searching, limiting and similar operations does not seem to contain a valid pattern modifier (i.e. it does not contain one of these characters: “~â€, “=†or “%â€). If the query is supposed to contain one of these special characters, they must be escaped by prepending a backslash (“\â€).

The first type is by checking whether the query string equals a keyword case-insensitively from Table 4.5, “Simple search keywordsâ€: If that is the case, Mutt will use the shown pattern modifier instead. If a keyword would conflict with your search keyword, you need to turn it into a regular expression to avoid matching the keyword table. For example, if you want to find all messages matching “flag†(using $simple_search) but don't want to match flagged messages, simply search for “[f]lagâ€.

Table 4.5. Simple search keywords

KeywordPattern modifier
all~A
.~A
^~A
del~D
flag~F
new~N
old~O
repl~Q
read~R
tag~T
unread~U

The second type of simple search is to build a complex search pattern using $simple_search as a template. Mutt will insert your query properly quoted and search for the composed complex query.

3.3. Nesting and Boolean Operators

Logical AND is performed by specifying more than one criterion. For example:

~t mutt ~f elkins

would select messages which contain the word “mutt†in the list of recipients and that have the word “elkins†in the “From†header field.

Mutt also recognizes the following operators to create more complex search patterns:

  • ! — logical NOT operator

  • | — logical OR operator

  • () — logical grouping operator

Here is an example illustrating a complex search pattern. This pattern will select all messages which do not contain “mutt†in the “To†or “Cc†field and which are from “elkinsâ€.

Example 4.4. Using boolean operators in patterns

!(~t mutt|~c mutt) ~f elkins

Here is an example using white space in the regular expression (note the “'†and “"†delimiters). For this to match, the mail's subject must match the “^Junk +From +Me$†and it must be from either “Jim +Somebody†or “Ed +SomeoneElseâ€:

'~s "^Junk +From +Me$" ~f ("Jim +Somebody"|"Ed +SomeoneElse")'

Note

If a regular expression contains parenthesis, or a vertical bar ("|"), you must enclose the expression in double or single quotes since those characters are also used to separate different parts of Mutt's pattern language. For example: ~f "me@(mutt\.org|cs\.hmc\.edu)" Without the quotes, the parenthesis wouldn't end. This would be separated to two OR'd patterns: ~f me@(mutt\.org and cs\.hmc\.edu). They are never what you want.

3.4. Searching by Date

Mutt supports two types of dates, absolute and relative.

3.4.1. Absolute Dates

Dates must be in DD/MM/YY format (month and year are optional, defaulting to the current month and year) or YYYYMMDD. An example of a valid range of dates is:

Limit to messages matching: ~d 20/1/95-31/10
Limit to messages matching: ~d 19950120-19951031

If you omit the minimum (first) date, and just specify “-DD/MM/YY†or “-YYYYMMDDâ€, all messages before the given date will be selected. If you omit the maximum (second) date, and specify “DD/MM/YY-â€, all messages after the given date will be selected. If you specify a single date with no dash (“-â€), only messages sent on the given date will be selected.

You can add error margins to absolute dates. An error margin is a sign (+ or -), followed by a digit, followed by one of the units in Table 4.6, “Date unitsâ€. As a special case, you can replace the sign by a “*†character, which is equivalent to giving identical plus and minus error margins.

Table 4.6. Date units

UnitDescription
yYears
mMonths
wWeeks
dDays

Example: To select any messages two weeks around January 15, 2001, you'd use the following pattern:

Limit to messages matching: ~d 15/1/2001*2w

3.4.2. Relative Dates

This type of date is relative to the current date, and may be specified as:

  • >offset for messages older than offset units

  • <offset for messages newer than offset units

  • =offset for messages exactly offset units old

offset is specified as a positive number with one of the units from Table 4.7, “Relative date unitsâ€.

Table 4.7. Relative date units

UnitDescription
yYears
mMonths
wWeeks
dDays
HHours
MMinutes
SSeconds

Example: to select messages less than 1 month old, you would use

Limit to messages matching: ~d <1m

Note

All dates used when searching are relative to the local time zone, so unless you change the setting of your $index_format to include a %[...] format, these are not the dates shown in the main index.

4. Marking Messages

There are times that it's useful to ask Mutt to "remember" which message you're currently looking at, while you move elsewhere in your mailbox. You can do this with the “mark-message†operator, which is bound to the “~†key by default. Press this key to enter an identifier for the marked message. When you want to return to this message, press “'†and the name that you previously entered.

(Message marking is really just a shortcut for defining a macro that returns you to the current message by searching for its Message-ID. You can choose a different prefix by setting the $mark_macro_prefix variable.)

5. Using Tags

Sometimes it is desirable to perform an operation on a group of messages all at once rather than one at a time. An example might be to save messages to a mailing list to a separate folder, or to delete all messages with a given subject. To tag all messages matching a pattern, use the <tag-pattern> function, which is bound to “shift-T†by default. Or you can select individual messages by hand using the <tag-message> function, which is bound to “t†by default. See patterns for Mutt's pattern matching syntax.

Once you have tagged the desired messages, you can use the “tag-prefix†operator, which is the “;†(semicolon) key by default. When the “tag-prefix†operator is used, the next operation will be applied to all tagged messages if that operation can be used in that manner. If the $auto_tag variable is set, the next operation applies to the tagged messages automatically, without requiring the “tag-prefixâ€.

In macros or push commands, you can use the <tag-prefix-cond> operator. If there are no tagged messages, Mutt will “eat†the rest of the macro to abort it's execution. Mutt will stop “eating†the macro when it encounters the <end-cond> operator; after this operator the rest of the macro will be executed as normal.

6. Using Hooks

A hook is a concept found in many other programs which allows you to execute arbitrary commands before performing some operation. For example, you may wish to tailor your configuration based upon which mailbox you are reading, or to whom you are sending mail. In the Mutt world, a hook consists of a regular expression or pattern along with a configuration option/command. See:

for specific details on each type of hook available. Also see Message Composition Flow for an overview of the composition process.

Note

If a hook changes configuration settings, these changes remain effective until the end of the current Mutt session. As this is generally not desired, a “default†hook needs to be added before all other hooks of that type to restore configuration defaults.

Example 4.5. Specifying a “default†hook

send-hook . 'unmy_hdr From:'
send-hook ~C'^b@b\.b$' my_hdr from: c@c.c

In Example 4.5, “Specifying a “default†hookâ€, by default the value of $from and $realname is not overridden. When sending messages either To: or Cc: to <b@b.b>, the From: header is changed to <c@c.c>.

6.1. Message Matching in Hooks

Hooks that act upon messages (message-hook, reply-hook, send-hook, send2-hook, save-hook, fcc-hook, index-format-hook) are evaluated in a slightly different manner. For the other types of hooks, a regular expression is sufficient. But in dealing with messages a finer grain of control is needed for matching since for different purposes you want to match different criteria.

Mutt allows the use of the search pattern language for matching messages in hook commands. This works in exactly the same way as it would when limiting or searching the mailbox, except that you are restricted to those operators which match information Mutt extracts from the header of the message (i.e., from, to, cc, date, subject, etc.).

For example, if you wanted to set your return address based upon sending mail to a specific address, you could do something like:

send-hook '~t ^me@cs\.hmc\.edu$' 'my_hdr From: Mutt User <user@host>'

which would execute the given command when sending mail to me@cs.hmc.edu.

However, it is not required that you write the pattern to match using the full searching language. You can still specify a simple regular expression like the other hooks, in which case Mutt will translate your pattern into the full language, using the translation specified by the $default_hook variable. The pattern is translated at the time the hook is declared, so the value of $default_hook that is in effect at that time will be used.

6.2. Mailbox Matching in Hooks

Hooks that match against mailboxes (folder-hook, mbox-hook) apply both regular expression syntax as well as mailbox shortcut expansion on the regexp parameter. There is some overlap between these, so special attention should be paid to the first character of the regexp.

# Here, ^ will expand to "the current mailbox" not "beginning of string":
folder-hook ^/home/user/Mail/bar "set sort=threads"

# If you want ^ to be interpreted as "beginning of string", one workaround
# is to enclose the regexp in parenthesis:
folder-hook (^/home/user/Mail/bar) "set sort=threads"

# This will expand to the default save folder for the alias "imap.example.com", which
# is probably not what you want:
folder-hook @imap.example.com "set sort=threads"

# A workaround is to use parenthesis or a backslash:
folder-hook (@imap.example.com) "set sort=threads"
folder-hook '\@imap.example.com' "set sort=threads"

Keep in mind that mailbox shortcut expansion on the regexp parameter takes place when the hook is initially parsed, not when the hook is matching against a mailbox. When Mutt starts up and is reading the .muttrc, some mailbox shortcuts may not be usable. For example, the "current mailbox" shortcut, ^, will expand to an empty string because no mailbox has been opened yet. Mutt will issue an error for this case or if the mailbox shortcut results in an empty regexp.

7. Managing the Environment

You can alter the environment that Mutt passes on to its child processes using the “setenv†and “unsetenv†operators. (N.B. These follow Mutt-style syntax, not shell-style!) You can also query current environment values by prefixing a “?†character.

setenv TERM vt100
setenv ORGANIZATION "The Mutt Development Team"
unsetenv DISPLAY
setenv ?LESS

8. External Address Queries

Mutt supports connecting to external directory databases such as LDAP, ph/qi, bbdb, or NIS through a wrapper script which connects to Mutt using a simple interface. Using the $query_command variable, you specify the wrapper command to use. For example:

set query_command = "mutt_ldap_query.pl %s"

The wrapper script should accept the query on the command-line. It should return a one line message, then each matching response on a single line, each line containing a tab separated address then name then some other optional information. On error, or if there are no matching addresses, return a non-zero exit code and a one line error message.

An example multiple response output:

Searching database ... 20 entries ... 3 matching:
me@cs.hmc.edu           Michael Elkins  mutt dude
blong@fiction.net       Brandon Long    mutt and more
roessler@does-not-exist.org        Thomas Roessler mutt pgp

There are two mechanisms for accessing the query function of Mutt. One is to do a query from the index menu using the <query> function (default: Q). This will prompt for a query, then bring up the query menu which will list the matching responses. From the query menu, you can select addresses to create aliases, or to mail. You can tag multiple addresses to mail, start a new query, or have a new query appended to the current responses.

The other mechanism for accessing the query function is for address completion, similar to the alias completion. In any prompt for address entry, you can use the <complete-query> function (default: ^T) to run a query based on the current address you have typed. Like aliases, Mutt will look for what you have typed back to the last space or comma. If there is a single response for that query, Mutt will expand the address in place. If there are multiple responses, Mutt will activate the query menu. At the query menu, you can select one or more addresses to be added to the prompt.

9. Mailbox Formats

Mutt supports reading and writing of four different local mailbox formats: mbox, MMDF, MH and Maildir. The mailbox type is auto detected, so there is no need to use a flag for different mailbox types. When creating new mailboxes, Mutt uses the default specified with the $mbox_type variable. A short description of the formats follows.

mbox. This is a widely used mailbox format for UNIX. All messages are stored in a single file. Each message has a line of the form:

From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST

to denote the start of a new message (this is often referred to as the “From_†line). The mbox format requires mailbox locking, is prone to mailbox corruption with concurrently writing clients or misinterpreted From_ lines. Depending on the environment, new mail detection can be unreliable. Mbox folders are fast to open and easy to archive.

MMDF. This is a variant of the mbox format. Each message is surrounded by lines containing “^A^A^A^A†(four times control-A's). The same problems as for mbox apply (also with finding the right message separator as four control-A's may appear in message bodies).

MH. A radical departure from mbox and MMDF, a mailbox consists of a directory and each message is stored in a separate file. The filename indicates the message number (however, this is may not correspond to the message number Mutt displays). Deleted messages are renamed with a comma (“,â€) prepended to the filename. Mutt detects this type of mailbox by looking for either .mh_sequences or .xmhcache files (needed to distinguish normal directories from MH mailboxes). MH is more robust with concurrent clients writing the mailbox, but still may suffer from lost flags; message corruption is less likely to occur than with mbox/mmdf. It's usually slower to open compared to mbox/mmdf since many small files have to be read (Mutt provides Section 8.1, “Header Caching†to greatly speed this process up). Depending on the environment, MH is not very disk-space efficient.

Maildir. The newest of the mailbox formats, used by the Qmail MTA (a replacement for sendmail). Similar to MH, except that it adds three subdirectories of the mailbox: tmp, new and cur. Filenames for the messages are chosen in such a way they are unique, even when two programs are writing the mailbox over NFS, which means that no file locking is needed and corruption is very unlikely. Maildir maybe slower to open without caching in Mutt, it too is not very disk-space efficient depending on the environment. Since no additional files are used for metadata (which is embedded in the message filenames) and Maildir is locking-free, it's easy to sync across different machines using file-level synchronization tools.

10. Mailbox Shortcuts

There are a number of built in shortcuts which refer to specific mailboxes. These shortcuts can be used anywhere you are prompted for a file or mailbox path or in path-related configuration variables. Note that these only work at the beginning of a string.

Table 4.8. Mailbox shortcuts

ShortcutRefers to...
!your $spoolfile (incoming) mailbox
>your $mbox file
<your $record file
^the current mailbox
- or !!the file you've last visited
~your home directory
= or +your $folder directory
@aliasto the default save folder as determined by the address of the alias

For example, to store a copy of outgoing messages in the folder they were composed in, a folder-hook can be used to set $record:

  folder-hook . 'set record=^'

Note: the current mailbox shortcut, “^â€, has no value in some cases. No mailbox is opened when Mutt is invoked to send an email from the command-line. In interactive mode, Mutt reads the muttrc before opening the mailbox, so immediate expansion won't work as expected either. This can be an issue when trying to directly assign to $record, but also affects the fcc-hook mailbox, which is expanded immediately too. The folder-hook example above works because the command is executed later, when the folder-hook fires.

Note: the $record shortcut “<†is substituted without any regard to multiple mailboxes and $fcc_delimiter. If you use multiple Fcc mailboxes, and also want to use the “<†mailbox shortcut, it might be better to set $record to the primary mailbox and use a fcc-hook to set all mailboxes during message composition.

11. Handling Mailing Lists

Mutt has a few configuration options that make dealing with large amounts of mail easier. The first thing you must do is to let Mutt know what addresses you consider to be mailing lists (technically this does not have to be a mailing list, but that is what it is most often used for), and what lists you are subscribed to. This is accomplished through the use of the lists and subscribe commands in your .muttrc. Alternatively or additionally, you can set $auto_subscribe to automatically subscribe addresses found in a List-Post header.

Now that Mutt knows what your mailing lists are, it can do several things, the first of which is the ability to show the name of a list through which you received a message (i.e., of a subscribed list) in the index menu display. This is useful to distinguish between personal and list mail in the same mailbox. In the $index_format variable, the expando “%L†will print the string “To <list>†when “list†appears in the “To†field, and “Cc <list>†when it appears in the “Cc†field (otherwise it prints the name of the author).

Often times the “To†and “Cc†fields in mailing list messages tend to get quite large. Most people do not bother to remove the author of the message they reply to from the list, resulting in two or more copies being sent to that person. The <list-reply> function, which by default is bound to “L†in the index menu and pager, helps reduce the clutter by only replying to the known mailing list addresses instead of all recipients (except as specified by Mail-Followup-To, see below).

Mutt also supports the Mail-Followup-To header. When you send a message to a list of recipients which includes one or several known mailing lists, and if the $followup_to option is set, Mutt will generate a Mail-Followup-To header. If any of the recipients are subscribed mailing lists, this header will contain all the recipients to whom you send this message, but not your address. This indicates that group-replies or list-replies (also known as “followupsâ€) to this message should only be sent to the original recipients of the message, and not separately to you - you'll receive your copy through one of the mailing lists you are subscribed to. If none of the recipients are subscribed mailing lists, the header will also contain your address, ensuring you receive a copy of replies.

Conversely, when group-replying or list-replying to a message which has a Mail-Followup-To header, Mutt will respect this header if the $honor_followup_to configuration variable is set. Using list-reply will in this case also make sure that the reply goes to the mailing list, even if it's not specified in the list of recipients in the Mail-Followup-To.

Note

When header editing is enabled, you can create a Mail-Followup-To header manually. Mutt will only auto-generate this header if it doesn't exist when you send the message.

The other method some mailing list admins use is to generate a “Reply-To†field which points back to the mailing list address rather than the author of the message. This can create problems when trying to reply directly to the author in private, since most mail clients will automatically reply to the address given in the “Reply-To†field. Mutt uses the $reply_to variable to help decide which address to use. If set to ask-yes or ask-no, you will be prompted as to whether or not you would like to use the address given in the “Reply-To†field, or reply directly to the address given in the “From†field. When set to yes, the “Reply-To†field will be used when present.

While looking at an email message from a mailing list in the index or pager, you can interact with the list server in the ways defined by RFC 2369, provided the email message specifies how to do so. Invoke the list menu (bound to "ESC L" by default) to see what options are available for a given message. Common options are:

  • Post to the list

  • Contact the list owner

  • Subscribe to the list

  • Unsubscribe from the list

  • Get help from the list server

  • Get list archive information

Note that many list servers only specify some of these options.

The “X-Label:†header field can be used to further identify mailing lists or list subject matter (or just to annotate messages individually). The $index_format variable's “%y†and “%Y†expandos can be used to expand “X-Label:†fields in the index, and Mutt's pattern-matcher can match regular expressions to “X-Label:†fields with the “~y†selector. “X-Label:†is not a standard message header field, but it can easily be inserted by procmail and other mail filtering agents.

You can change or delete the “X-Label:†field within Mutt using the “edit-label†command, bound to the “y†key by default. This works for tagged messages, too. While in the edit-label function, pressing the <complete> binding (TAB, by default) will perform completion against all labels currently in use.

Lastly, Mutt has the ability to sort the mailbox into threads. A thread is a group of messages which all relate to the same subject. This is usually organized into a tree-like structure where a message and all of its replies are represented graphically. If you've ever used a threaded news client, this is the same concept. It makes dealing with large volume mailing lists easier because you can easily delete uninteresting threads and quickly find topics of value.

12. Display Munging

Working within the confines of a console or terminal window, it is often useful to be able to modify certain information elements in a non-destructive way -- to change how they display, without changing the stored value of the information itself. This is especially so of message subjects, which may often be polluted with extraneous metadata that either is reproduced elsewhere, or is of secondary interest.

subjectrx pattern replacement
unsubjectrx { * | pattern }

subjectrx specifies a regular expression “pattern†which, if detected in a message subject, causes the subject to be replaced with the “replacement†value. The replacement is subject to substitutions in the same way as for the spam command: %L for the text to the left of the match, %R for text to the right of the match, and %1 for the first subgroup in the match (etc). If you simply want to erase the match, set it to “%L%Râ€. Any number of subjectrx commands may coexist.

Note this well: the “replacement†value replaces the entire subject, not just the match!

unsubjectrx removes a given subjectrx from the substitution list. If * is used as the pattern, all substitutions will be removed.

Example 4.6. Subject Munging

# Erase [rt #12345] tags from Request Tracker (RT) e-mails
subjectrx '\[rt #[0-9]+\] *' '%L%R'

# Servicedesk is another RT that sends more complex subjects.
# Keep the ticket number.
subjectrx '\[servicedesk #([0-9]+)\] ([^.]+)\.([^.]+) - (new|open|pending|update) - ' '%L[#%1] %R'

# Strip out annoying [listname] prefixes in subjects
subjectrx '\[[^]]*\]:? *' '%L%R'

13. New Mail Detection

Mutt supports setups with multiple folders, allowing all of them to be monitored for new mail (see Section 16, “Monitoring Incoming Mail†for details).

13.1. How New Mail Detection Works

For Mbox and Mmdf folders, new mail is detected by comparing access and/or modification times of files: Mutt assumes a folder has new mail if it wasn't accessed after it was last modified. Utilities like biff or frm or any other program which accesses the mailbox might cause Mutt to never detect new mail for that mailbox if they do not properly reset the access time. Other possible causes of Mutt not detecting new mail in these folders are backup tools (updating access times) or filesystems mounted without access time update support (for Linux systems, see the relatime option).

Note

Contrary to older Mutt releases, it now maintains the new mail status of a folder by properly resetting the access time if the folder contains at least one message which is neither read, nor deleted, nor marked as old.

In cases where new mail detection for Mbox or Mmdf folders appears to be unreliable, the $check_mbox_size option can be used to make Mutt track and consult file sizes for new mail detection instead which won't work for size-neutral changes.

New mail for Maildir is assumed if there is one message in the new/ subdirectory which is not marked deleted (see $maildir_trash). For MH folders, a mailbox is considered having new mail if there's at least one message in the “unseen†sequence as specified by $mh_seq_unseen.

Mutt does not poll POP3 folders for new mail, it only periodically checks the currently opened folder (if it's a POP3 folder).

For IMAP, by default Mutt uses recent message counts provided by the server to detect new mail. If the $imap_idle option is set, it'll use the IMAP IDLE extension if advertised by the server.

The $mail_check_recent option changes whether Mutt will notify you of new mail in an already visited mailbox. When set (the default) it will only notify you of new mail received since the last time you opened the mailbox. When unset, Mutt will notify you of any new mail in the mailbox.

13.2. Polling For New Mail

When in the index menu and being idle (also see $timeout), Mutt periodically checks for new mail in all folders which have been configured via the mailboxes command (excepting those specified with the -nopoll flag). The interval depends on the folder type: for local/IMAP folders it consults $mail_check and $pop_checkinterval for POP folders.

Outside the index menu the directory browser supports checking for new mail using the <check-new> function which is unbound by default. Pressing TAB will bring up a menu showing the files specified by the mailboxes command, and indicate which contain new messages. Mutt will automatically enter this mode when invoked from the command line with the -y option, or from the index/pager via the <browse-mailboxes> function.

For the pager, index and directory browser menus, Mutt contains the <buffy-list> function (bound to “.†by default) which will print a list of folders with new mail in the command line at the bottom of the screen.

For the index, by default Mutt displays the number of mailboxes with new mail in the status bar, please refer to the $status_format variable for details.

When changing folders, Mutt fills the prompt with the first folder from the mailboxes list containing new mail (if any), pressing <Space> will cycle through folders with new mail. The (by default unbound) function <next-unread-mailbox> in the index can be used to immediately open the next folder with unread mail (if any).

13.3. Monitoring New Mail

When the Inotify mechanism for monitoring of files is supported (Linux only) and not disabled at compilation time, Mutt immediately notifies about new mail for all folders configured via the mailboxes command (excepting those specified with the -nopoll flag). Dependent on mailbox format also added old mails are tracked (not for Maildir).

No configuration variables are available. Trace output is given when debugging is enabled via command line option -d3. The lower level 2 only shows errors, the higher level 5 all including raw Inotify events.

Note

Getting events about new mail is limited to the capabilities of the underlying mechanism. Inotify only reports local changes, i. e. new mail notification works for mails delivered by an agent on the same machine as Mutt, but not when delivered remotely on a network file system as NFS. Also the monitoring handles might fail in rare conditions, so you better don't completely rely on this feature.

13.4. Calculating Mailbox Message Counts

If $mail_check_stats is set, Mutt will periodically calculate the unread, flagged, and total message counts for each mailbox watched by the mailboxes command. (Note: IMAP mailboxes only support unread and total counts). This calculation takes place at the same time as new mail polling, but is controlled by a separate timer: $mail_check_stats_interval.

The sidebar can display these message counts. See $sidebar_format.

14. Editing Threads

Mutt has the ability to dynamically restructure threads that are broken either by misconfigured software or bad behavior from some correspondents. This allows to clean your mailboxes from these annoyances which make it hard to follow a discussion.

14.1. Linking Threads

Some mailers tend to “forget†to correctly set the “In-Reply-To:†and “References:†headers when replying to a message. This results in broken discussions because Mutt has not enough information to guess the correct threading. You can fix this by tagging the reply, then moving to the parent message and using the <link-threads> function (bound to & by default). The reply will then be connected to this parent message.

You can also connect multiple children at once, tagging them and using the <tag-prefix> command (“;â€) or the $auto_tag option.

14.2. Breaking Threads

On mailing lists, some people are in the bad habit of starting a new discussion by hitting “reply†to any message from the list and changing the subject to a totally unrelated one. You can fix such threads by using the <break-thread> function (bound by default to #), which will turn the subthread starting from the current message into a whole different thread.

15. Delivery Status Notification (DSN) Support

RFC1894 defines a set of MIME content types for relaying information about the status of electronic mail messages. These can be thought of as “return receipts.â€

To support DSN, there are two variables. $dsn_notify is used to request receipts for different results (such as failed message, message delivered, etc.). $dsn_return requests how much of your message should be returned with the receipt (headers or full message).

When using $sendmail for mail delivery, you need to use either Berkeley sendmail 8.8.x (or greater) a MTA supporting DSN command line options compatible to Sendmail: The -N and -R options can be used by the mail client to make requests as to what type of status messages should be returned. Please consider your MTA documentation whether DSN is supported.

For SMTP delivery using $smtp_url, it depends on the capabilities announced by the server whether Mutt will attempt to request DSN or not.

16. Start a WWW Browser on URLs

If a message contains URLs, it is efficient to get a menu with all the URLs and start a WWW browser on one of them. This functionality is provided by the external urlview program which can be retrieved at https://github.com/sigpipe/urlview and the configuration commands:

macro index \cb |urlview\n
macro pager \cb |urlview\n

17. Echoing Text

Usage:

echo message

You can print messages to the message window using the "echo" command. This might be useful after a macro finishes executing. After printing the message, echo will pause for the number of seconds specified by $sleep_time.

echo "Sourcing muttrc file"

unset confirmappend
macro index ,a "<save-message>=archive<enter><enter-command>echo 'Saved to archive'<enter>"

18. Message Composition Flow

This is a brief overview of the steps Mutt takes during message composition. It also shows the order and timing of hook execution.

  • Reply envelope settings. $reverse_name processing. To, Cc, Subject, References header defaults.

  • my_hdr processing for To, Cc, Bcc, Subject headers.

  • Prompts for To, Cc, Bcc, Subject headers. See $askcc, $askbcc, $fast_reply.

  • From header setting. Note: this is so send-hooks below can match ~P, but From is re-set further below in case a send-hook changes the value.

  • reply-hook

  • send-hook

  • From header setting.

  • my_hdr processing for From, Reply-To, Message-ID and user-defined headers. The To, Cc, Bcc, and Subject headers are ignored at this stage.

  • Message body and signature generation.

  • send2-hook

  • $realname part of From header setting.

  • $editor invocation for the message.

  • send2-hook

  • Cryptographic settings.

  • fcc-hook. Fcc setting.

  • Compose menu. Note: send2-hook is evaluated each time the headers are changed.

  • $send_multipart_alternative generation.

  • Message encryption and signing. Key selection.

  • Fcc saving if $fcc_before_send is set. (Note the variable documentation for caveats of Fcc'ing before sending.)

  • Message sending.

  • Fcc saving if $fcc_before_send is unset (the default). Note: prior to version 1.12, the Fcc was saved before sending the message. It is now by default saved afterwards, but if the saving fails, the user is prompted.

19. Batch Composition Flow

In batch mode, Mutt performs less steps than interactive mode. Encryption and Signing are not supported.

  • my_hdr processing for To, Cc, Bcc headers. (Subject is not processed.)

  • From header setting. Note: this is so send-hooks below can match ~P, but From is re-set further below in case a send-hook changes the value.

  • send-hook

  • From header setting.

  • my_hdr processing for From, Reply-To, Message-ID and user-defined headers. The To, Cc, Bcc, Subject, and Return-Path headers are ignored at this stage.

  • Message body is copied from stdin. $signature is not appended in batch mode.

  • send2-hook

  • $realname part of From header setting.

  • fcc-hook. Fcc setting.

  • $send_multipart_alternative generation.

  • Fcc saving if $fcc_before_send is set. (Note the variable documentation for caveats of Fcc'ing before sending.)

  • Message sending.

  • Fcc saving if $fcc_before_send is unset (the default). Note: prior to version 1.12, the Fcc was saved before sending the message. It is now by default saved afterwards, but if the saving fails, the user is prompted.

20. Using MuttLisp (EXPERIMENTAL)

MuttLisp is a Lisp-like enhancement for the Mutt configuration file. It is currently experimental, meaning new releases may change or break syntax. MuttLisp is not a real language, and is not meant to be an alternative to macros. The features are purposely minimal, with the actual work still being done by Mutt commands.

There are two ways to invoke MuttLisp: via the run command, or interpolated as a command argument.

20.1. Running a command generated by MuttLisp

Usage:

run MuttLisp

The run command evaluates the MuttLisp argument. The output of the MuttLisp is then executed as a Mutt command, as if it were typed in the muttrc instead.

run (concat "set my_name = '" \
      (or $ENV_NAME "Test User") "'")

  ==> generates and runs the line:
      set my_name = 'Test User'

This will set the Mutt User-Defined Variable $my_name to either the environment variable $ENV_NAME, if defined, or else "Test User".

20.2. Interpolating MuttLisp in a Command Argument

The second way of running is directly as a command argument. An unquoted parenthesis expression will be evaluated, and the result substituted as the argument.

To avoid breaking existing configurations, this is disabled by default. It can be enabled by setting $muttlisp_inline_eval. Before doing so, you should review your Mutt configuration to ensure you don't have any bare parenthesis expressions elsewhere, such as the regexp parameter of a folder-hook. These can typically be surrounded by single or double-quotes to prevent being evaluated as MuttLisp.

set my_name = (or $ENV_NAME "Test User")

The result of the MuttLisp is directly assigned as the argument. It isn't reinterpreted, so there is no need for the outer quotes. This is in contrast with the run command, where the output is reinterpreted by the muttrc parser.

20.3. MuttLisp Syntax

MuttLisp was inspired by Lisp, and so follows the same basic syntax. All statements are surrounded by parenthesis. The first argument inside the parenthesis is a function to invoke. The remaining arguments are passed as parameters.

The arguments to functions are read and evaluated using muttrc syntax. This means Mutt variables or environment variables can be passed directly, or interpolated inside a double-quoted string.

Although the arguments to a function are evaluated, the result of the function call is not.

echo (concat '$' 'spoolfile')
  ==> $spoolfile

MuttLisp has no types - everything is stored and evaluated as a string, just as with the muttrc. True is defined as a non-empty string, and false as the empty string.

The muttrc is evaluated line by line, and MuttLisp is similarly constrained. Input can be continued on more than one line by placing a backslash at the end of the line.

20.4. MuttLisp Functions

20.4.1. concat

Combines all arguments into a single string.

echo (concat one two three)
  ==> onetwothree

20.4.2. quote

Prevents interpretation of the list. Note that the list must still obey MuttLisp syntax: single quotes, double quotes, backticks, and parenthesis are still parsed prior to quote running and must be matching.

echo (quote one two three)
  ==> one two three

echo (quote $spoolfile)
  ==> $spoolfile

echo (quote (one two three))
  ==> (one two three)

20.4.3. equal

Performs a case-sensitive comparison of each argument. Stops evaluating arguments when it finds the first one that is not equal. Returns "t" if they are all equal, and the empty string if not.

echo (equal one one)
  ==> "t"

echo (equal one `echo one`)
  ==> "t"

echo (equal one one two `echo three`)
  ==> ""
  note: `echo three` does not execute.

echo (equal "one two" `echo one two`)
  ==> ""
  note: backticks generate two arguments "one" and "two"

echo (equal "one two" "`echo one two`")
  ==> "t"
  note: backticks inside double quotes generates a single argument: "one two"

20.4.4. not

Accepts a single argument only. Returns "t" if the argument evaluates to the empty string. Otherwise returns the empty string.

echo (not one)
  ==> ""

echo (not "")
  ==> "t"

echo (not (equal one two))
  ==> "t"

20.4.5. and

Returns the first argument that evaluates to the empty string. Otherwise returns the last argument, or "t" if there are no arguments.

echo (and one two)
  ==> "two"

echo (and "" two `echo three`)
  ==> ""
  note: `echo three` does not execute.

echo (and)
  ==> "t"

20.4.6. or

Returns the first argument that evaluates to a non-empty string. Otherwise returns the empty string.

echo (or one two)
  ==> "one"

echo (or "" two `echo three`)
  ==> "two"
  note: `echo three` does not execute.

echo (or)
  ==> ""

20.4.7. if

Requires 2 or 3 arguments. The first is a conditional. If it evaluates to "true" (a non-empty string), the second argument is evaluated and returned. Otherwise the third argument is evaluated and returned.

echo (if a one two)
  ==> "one"

echo (if "" one two)
  ==> "two"

set spoolfile = "/var/mail/user"
echo (if (equal $spoolfile "/var/mail/user") yes no)
  ==> "yes"

Note that boolean configuration variables evaluate to the strings "yes" or "no". You can see the value of other kinds of configuration variables using the echo command.

unset allow_ansi
echo $allow_ansi
  ===> "no"

# the correct way to test a boolean:
echo (if (equal $allow_ansi "yes") "set" "unset")
  ===> "unset"

# the incorrect way to test a boolean:
echo (if $allow_ansi "set" "unset")
  ===> "set"

20.5. Examples

It's important to remember that function arguments are evaluated, but the result is not. Also, the result of an interpolated command argument is used directly, and needs no quoting.

# A three-way toggle of $index_format:

set muttlisp_inline_eval
set my_idx1 = "one"
set my_idx2 = "two"
set my_idx3 = "three"
set index_format = $my_idx1

macro index i '<enter-command>set index_format =  \
  (or                                             \
    (if (equal $index_format $my_idx1) $my_idx2)  \
    (if (equal $index_format $my_idx2) $my_idx3)  \
    $my_idx1) \
<enter>'

The output of the run command is re-evaluated by the muttrc parser. So it's important to pay more attention to quoting issues when generating the command string below.

# Conditionally set up background editing in tmux or GNU Screen:

run \
  (if (or $STY $TMUX)                             \
    (concat                                       \
      'set background_edit;'                      \
      'set editor = "bgedit-screen-tmux.sh vim"') \
    (concat                                       \
      'unset background_edit;'                    \
      'set editor = "vim"'))

Because backticks are evaluated by MuttLisp too, we need to use the run command below and pay close attention to quoting.

# Use a Mutt variable inside backticks.

set spoolfile = "/var/mail/testuser"

# This will generate and then run the command string:
#   set my_var = "`~/bin/myscript.sh /var/mail/testuser`"
run                                       \
  (concat                                 \
     'set my_var = "`~/bin/myscript.sh '  \
     $spoolfile                           \
     '`"')

21. Miscellany

This section documents various features that fit nowhere else.

Address normalization

Mutt normalizes all e-mail addresses to the simplest form possible. If an address contains a realname, the form Joe User <joe@example.com> is used and the pure e-mail address without angle brackets otherwise, i.e. just joe@example.com.

This normalization affects all headers Mutt generates including aliases.

Initial folder selection

The folder Mutt opens at startup is determined as follows: the folder specified in the $MAIL environment variable if present. Otherwise, the value of $MAILDIR is taken into account. If that isn't present either, Mutt takes the user's mailbox in the mailspool as determined at compile-time (which may also reside in the home directory). The $spoolfile setting overrides this selection. Highest priority has the mailbox given with the -f command line option.

Chapter 5. Mutt's MIME Support

Quite a bit of effort has been made to make Mutt the premier text-mode MIME MUA. Every effort has been made to provide the functionality that the discerning MIME user requires, and the conformance to the standards wherever possible. When configuring Mutt for MIME, there are two extra types of configuration files which Mutt uses. One is the mime.types file, which contains the mapping of file extensions to IANA MIME types. The other is the mailcap file, which specifies the external commands to use for handling specific MIME types.

1. Using MIME in Mutt

1.1. MIME Overview

MIME is short for “Multipurpose Internet Mail Extension†and describes mechanisms to internationalize and structure mail messages. Before the introduction of MIME, messages had a single text part and were limited to us-ascii header and content. With MIME, messages can have attachments (and even attachments which itself have attachments and thus form a tree structure), nearly arbitrary characters can be used for sender names, recipients and subjects.

Besides the handling of non-ascii characters in message headers, to Mutt the most important aspect of MIME are so-called MIME types. These are constructed using a major and minor type separated by a forward slash. These specify details about the content that follows. Based upon these, Mutt decides how to handle this part. The most popular major type is “text†with minor types for plain text, HTML and various other formats. Major types also exist for images, audio, video and of course general application data (e.g. to separate cryptographically signed data with a signature, send office documents, and in general arbitrary binary data). There's also the multipart major type which represents the root of a subtree of MIME parts. A list of supported MIME types can be found in Table 5.1, “Supported MIME typesâ€.

MIME also defines a set of encoding schemes for transporting MIME content over the network: 7bit, 8bit, quoted-printable, base64 and binary. There're some rules when to choose what for encoding headers and/or body (if needed), and Mutt will in general make a good choice.

Mutt does most of MIME encoding/decoding behind the scenes to form messages conforming to MIME on the sending side. On reception, it can be flexibly configured as to how what MIME structure is displayed (and if it's displayed): these decisions are based on the content's MIME type. There are three areas/menus in dealing with MIME: the pager (while viewing a message), the attachment menu and the compose menu.

1.2. Viewing MIME Messages in the Pager

When you select a message from the index and view it in the pager, Mutt decodes as much of a message as possible to a text representation. Mutt internally supports a number of MIME types, including the text major type (with all minor types), the message/rfc822 (mail messages) type and some multipart types. In addition, it recognizes a variety of PGP MIME types, including PGP/MIME and application/pgp.

Mutt will denote attachments with a couple lines describing them. These lines are of the form:

[-- Attachment #1: Description --]
[-- Type: text/plain, Encoding: 7bit, Size: 10000 --]

Where the Description is the description or filename given for the attachment, and the Encoding is one of the already mentioned content encodings.

If Mutt cannot deal with a MIME type, it will display a message like:

[-- image/gif is unsupported (use 'v' to view this part) --]

1.3. The Attachment Menu

The default binding for <view-attachments> is “vâ€, which displays the attachment menu for a message. The attachment menu displays a list of the attachments in a message. From the attachment menu, you can save, print, pipe, delete, and view attachments. You can apply these operations to a group of attachments at once, by tagging the attachments and by using the <tag-prefix> operator. You can also reply to the current message from this menu, and only the current attachment (or the attachments tagged) will be quoted in your reply. You can view attachments as text, or view them using the mailcap viewer definition (the mailcap mechanism is explained later in detail).

Finally, you can apply the usual message-related functions (like <resend-message>, and the <reply> and <forward> functions) to attachments of type message/rfc822.

See table Table 9.7, “Default Attachment Menu Bindings†for all available functions.

1.3.1. Viewing Attachments

There are four(!) ways of viewing attachments, so the functions deserve some extra explanation.

<view-mailcap> (default keybinding: m)

This will use the first matching mailcap entry.

If no matching mailcap entries are found, it will abort with an error message.

<view-attach> (default keybinding: <Enter>)

Mutt will display internally supported MIME types (see Section 1.2, “Viewing MIME Messages in the Pagerâ€) in the pager. This will respect auto_view settings, to determine whether to use a copiousoutput mailcap entry or just directly display the attachment.

Other MIME types will use the first matching mailcap entry.

If no matching mailcap entries are found, the attachment will be displayed in the pager as raw text.

<view-pager>

Mutt will use the first matching copiousoutput mailcap entry to display the attachment in the pager (regardless of auto_view settings).

If no matching mailcap entries are found, the attachment will be displayed in the pager as raw text.

<view-text> (default keybinding: T)

The attachment will always be displayed in the pager as raw text.

1.4. The Compose Menu

The compose menu is the menu you see before you send a message. It allows you to edit the recipient list, the subject, and other aspects of your message. It also contains a list of the attachments of your message, including the main body. From this menu, you can print, copy, filter, pipe, edit, compose, review, and rename an attachment or a list of tagged attachments. You can also modifying the attachment information, notably the type, encoding and description.

Attachments appear as follows by default:

- 1 [text/plain, 7bit, 1K]           /tmp/mutt-euler-8082-0 <no description>
  2 [applica/x-gunzip, base64, 422K] ~/src/mutt-0.85.tar.gz <no description>

The “-†denotes that Mutt will delete the file after sending (or postponing, or canceling) the message. It can be toggled with the <toggle-unlink> command (default: u). The next field is the MIME content-type, and can be changed with the <edit-type> command (default: ^T). The next field is the encoding for the attachment, which allows a binary message to be encoded for transmission on 7bit links. It can be changed with the <edit-encoding> command (default: ^E). The next field is the size of the attachment, rounded to kilobytes or megabytes. The next field is the filename, which can be changed with the <rename-file> command (default: R). The final field is the description of the attachment, and can be changed with the <edit-description> command (default: d). See $attach_format for a full list of available expandos to format this display to your needs.

2. MIME Type Configuration with mime.types

To get most out of MIME, it's important that a MIME part's content type matches the content as closely as possible so that the recipient's client can automatically select the right viewer for the content. However, there's no reliable way for Mutt to know how to detect every possible file type. Instead, it uses a simple plain text mapping file that specifies what file extension corresponds to what MIME type. This file is called mime.types.

When you add an attachment to your mail message, Mutt searches your personal mime.types file at $HOME/.mime.types, and then the system mime.types file at /usr/local/share/mutt/mime.types or /etc/mime.types

Each line starts with the full MIME type, followed by a space and space-separated list of file extensions. For example you could use:

Example 5.1. mime.types

application/postscript          ps eps
application/pgp                 pgp
audio/x-aiff                    aif aifc aiff

A sample mime.types file comes with the Mutt distribution, and should contain most of the MIME types you are likely to use.

If Mutt can not determine the MIME type by the extension of the file you attach, it will run the command specified in $mime_type_query_command. If that command is not specified, Mutt will look at the file. If the file is free of binary information, Mutt will assume that the file is plain text, and mark it as text/plain. If the file contains binary information, then Mutt will mark it as application/octet-stream. You can change the MIME type that Mutt assigns to an attachment by using the <edit-type> command from the compose menu (default: ^T), see Table 5.1, “Supported MIME types†for supported major types. Mutt recognizes all of these if the appropriate entry is found in the mime.types file. Non-recognized mime types should only be used if the recipient of the message is likely to be expecting such attachments.

Table 5.1. Supported MIME types

MIME major typeStandardDescription
applicationyesGeneral application data
audioyesAudio data
imageyesImage data
messageyesMail messages, message status information
modelyesVRML and other modeling data
multipartyesContainer for other MIME parts
textyesText data
videoyesVideo data
chemicalnoMostly molecular data

MIME types are not arbitrary, they need to be assigned by IANA.

3. MIME Viewer Configuration with Mailcap

Mutt supports RFC 1524 MIME Configuration, in particular the Unix specific format specified in Appendix A of RFC 1524. This file format is commonly referred to as the “mailcap†format. Many MIME compliant programs utilize the mailcap format, allowing you to specify handling for all MIME types in one place for all programs. Programs known to use this format include Firefox, lynx and metamail.

In order to handle various MIME types that Mutt doesn't have built-in support for, it parses a series of external configuration files to find an external handler. The default search string for these files is a colon delimited list containing the following files:

  1. $HOME/.mailcap

  2. $PKGDATADIR/mailcap

  3. $SYSCONFDIR/mailcap

  4. /etc/mailcap

  5. /usr/etc/mailcap

  6. /usr/local/etc/mailcap

where $HOME is your home directory. The $PKGDATADIR and the $SYSCONFDIR directories depend on where Mutt is installed: the former is the default for shared data, the latter for system configuration files.

The default search path can be obtained by running the following command:

mutt -nF /dev/null -Q mailcap_path

In particular, the metamail distribution will install a mailcap file, usually as /usr/local/etc/mailcap, which contains some baseline entries.

3.1. The Basics of the Mailcap File

A mailcap file consists of a series of lines which are comments, blank, or definitions.

A comment line consists of a # character followed by anything you want.

A blank line is blank.

A definition line consists of a content type, a view command, and any number of optional fields. Each field of a definition line is divided by a semicolon “;†character.

The content type is specified in the MIME standard “type/subtype†notation. For example, text/plain, text/html, image/gif, etc. In addition, the mailcap format includes two formats for wildcards, one using the special “*†subtype, the other is the implicit wild, where you only include the major type. For example, image/*, or video will match all image types and video types, respectively.

The view command is a Unix command for viewing the type specified. There are two different types of commands supported. The default is to send the body of the MIME message to the command on stdin. You can change this behavior by using %s as a parameter to your view command. This will cause Mutt to save the body of the MIME message to a temporary file, and then call the view command with the %s replaced by the name of the temporary file. In both cases, Mutt will turn over the terminal to the view program until the program quits, at which time Mutt will remove the temporary file if it exists. This means that mailcap does not work out of the box with programs which detach themselves from the terminal right after starting, like open on Mac OS X. In order to nevertheless use these programs with mailcap, you probably need custom shell scripts.

So, in the simplest form, you can send a text/plain message to the external pager more on standard input:

text/plain; more

Or, you could send the message as a file:

text/plain; more %s

Perhaps you would like to use lynx to interactively view a text/html message:

text/html; lynx %s

In this case, lynx does not support viewing a file from standard input, so you must use the %s syntax.

Note

Some older versions of lynx contain a bug where they will check the mailcap file for a viewer for text/html. They will find the line which calls lynx, and run it. This causes lynx to continuously spawn itself to view the object.

On the other hand, maybe you don't want to use lynx interactively, you just want to have it convert the text/html to text/plain, then you can use:

text/html; lynx -dump %s | more

Perhaps you wish to use lynx to view text/html files, and a pager on all other text formats, then you would use the following:

text/html; lynx %s
text/*; more

3.2. Secure Use of Mailcap

The interpretation of shell meta-characters embedded in MIME parameters can lead to security problems in general. Mutt tries to quote parameters in expansion of %s syntaxes properly, and avoids risky characters by substituting them, see the $mailcap_sanitize variable.

Although Mutt's procedures to invoke programs with mailcap seem to be safe, there are other applications parsing mailcap, maybe taking less care of it. Therefore you should pay attention to the following rules:

Keep the %-expandos away from shell quoting. Don't quote them with single or double quotes. Mutt does this for you, the right way, as should any other program which interprets mailcap. Don't put them into backtick expansions. Be highly careful with evil statements, and avoid them if possible at all. Trying to fix broken behavior with quotes introduces new leaks — there is no alternative to correct quoting in the first place.

If you have to use the %-expandos' values in context where you need quoting or backtick expansions, put that value into a shell variable and reference the shell variable where necessary, as in the following example (using $charset inside the backtick expansion is safe, since it is not itself subject to any further expansion):

text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
        && test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1

3.3. Advanced Mailcap Usage

3.3.1. Optional Fields

In addition to the required content-type and view command fields, you can add semi-colon “;†separated fields to set flags and other options. Mutt recognizes the following optional fields:

copiousoutput

This flag tells Mutt that the command passes possibly large amounts of text on standard output. This causes Mutt to invoke a pager (either the internal pager or the external pager defined by the pager variable) on the output of the view command. Without this flag, Mutt assumes that the command is interactive. One could use this to replace the pipe to more in the lynx -dump example in the Basic section:

text/html; lynx -dump %s ; copiousoutput

This will cause lynx to format the text/html output as text/plain and Mutt will use your standard pager to display the results.

Mutt will set the COLUMNS environment variable to the width of the pager. Some programs make use of this environment variable automatically. Others provide a command line argument that can use this to set the output width:

text/html; lynx -dump -width ${COLUMNS:-80} %s; copiousoutput

Note that when using the built-in pager, only entries with this flag will be considered a handler for a MIME type — all other entries will be ignored.

needsterminal

Mutt uses this flag when viewing attachments with auto_view, in order to decide whether it should honor the setting of the $wait_key variable or not. When an attachment is viewed using an interactive program, and the corresponding mailcap entry has a needsterminal flag, Mutt will use $wait_key and the exit status of the program to decide if it will ask you to press a key after the external program has exited. In all other situations it will not prompt you for a key.

compose=<command>

This flag specifies the command to use to create a new attachment of a specific MIME type. Mutt supports this from the compose menu.

composetyped=<command>

This flag specifies the command to use to create a new attachment of a specific MIME type. This command differs from the compose command in that Mutt will expect standard MIME headers on the data. This can be used to specify parameters, filename, description, etc. for a new attachment. Mutt supports this from the compose menu.

print=<command>

This flag specifies the command to use to print a specific MIME type. Mutt supports this from the attachment and compose menus.

edit=<command>

This flag specifies the command to use to edit a specific MIME type. Mutt supports this from the compose menu, and also uses it to compose new attachments. Mutt will default to the defined $editor for text attachments.

nametemplate=<template>

This field specifies the format for the file denoted by %s in the command fields. Certain programs will require a certain file extension, for instance, to correctly view a file. For instance, lynx will only interpret a file as text/html if the file ends in .html. So, you would specify lynx as a text/html viewer with a line in the mailcap file like:

text/html; lynx %s; nametemplate=%s.html
test=<command>

This field specifies a command to run to test whether this mailcap entry should be used. The command is defined with the command expansion rules defined in the next section. If the command returns 0, then the test passed, and Mutt uses this entry. If the command returns non-zero, then the test failed, and Mutt continues searching for the right entry. Note that the content-type must match before Mutt performs the test. For example:

text/html; firefox -remote 'openURL(%s)' ; test=RunningX
text/html; lynx %s

In this example, Mutt will run the program RunningX which will return 0 if the X Window manager is running, and non-zero if it isn't. If RunningX returns 0, then Mutt will run firefox to display the text/html object. If RunningX doesn't return 0, then Mutt will go on to the next entry and use lynx to display the text/html object.

3.3.2. Search Order

When searching for an entry in the mailcap file, Mutt will search for the most useful entry for its purpose. For instance, if you are attempting to print an image/gif, and you have the following entries in your mailcap file, Mutt will search for an entry with the print command:

image/*;        xv %s
image/gif;      ; print= anytopnm %s | pnmtops | lpr; \
                nametemplate=%s.gif

Mutt will skip the image/* entry and use the image/gif entry with the print command.

In addition, you can use this with auto_view to denote two commands for viewing an attachment, one to be viewed automatically, the other to be viewed interactively from the attachment menu using the <view-mailcap> function (bound to “m†by default). In addition, you can then use the test feature to determine which viewer to use interactively depending on your environment.

text/html;      firefox -remote 'openURL(%s)' ; test=RunningX
text/html;      lynx %s; nametemplate=%s.html
text/html;      lynx -dump %s; nametemplate=%s.html; copiousoutput

For auto_view, Mutt will choose the third entry because of the copiousoutput tag. For interactive viewing, Mutt will run the program RunningX to determine if it should use the first entry. If the program returns non-zero, Mutt will use the second entry for interactive viewing. The last entry is for inline display in the pager and the <view-attach> function in the attachment menu.

Entries with the copiousoutput tag should always be specified as the last one per type. For non-interactive use, the last entry will then actually be the first matching one with the tag set. For non-interactive use, only copiousoutput-tagged entries are considered. For interactive use, Mutt ignores this tag and treats all entries equally. Therefore, if not specified last, all following entries without this tag would never be considered for <view-attach> because the copiousoutput before them matched already.

3.3.3. Command Expansion

The various commands defined in the mailcap files are passed to the /bin/sh shell using the system(3) function. Before the command is passed to /bin/sh -c, it is parsed to expand various special parameters with information from Mutt. The keywords Mutt expands are:

%s

As seen in the basic mailcap section, this variable is expanded to a filename specified by the calling program. This file contains the body of the message to view/print/edit or where the composing program should place the results of composition. In addition, the use of this keyword causes Mutt to not pass the body of the message to the view/print/edit program on stdin.

%t

Mutt will expand %t to the text representation of the content type of the message in the same form as the first parameter of the mailcap definition line, i.e. text/html or image/gif.

%{<parameter>}

Mutt will expand this to the value of the specified parameter from the Content-Type: line of the mail message. For instance, if your mail message contains:

Content-Type: text/plain; charset=iso-8859-1

then Mutt will expand %{charset} to “iso-8859-1â€. The default metamail mailcap file uses this feature to test the charset to spawn an xterm using the right charset to view the message.

\%

This will be replaced by a literal %.

Mutt does not currently support the %F and %n keywords specified in RFC 1524. The main purpose of these parameters is for multipart messages, which is handled internally by Mutt.

3.4. Example Mailcap Files

This mailcap file is fairly simple and standard:

# I'm always running X :)
video/*;        xanim %s > /dev/null
image/*;        xv %s > /dev/null

# I'm always running firefox (if my computer had more memory, maybe)
text/html;      firefox -remote 'openURL(%s)'

This mailcap file shows quite a number of examples:

# Use xanim to view all videos   Xanim produces a header on startup,
# send that to /dev/null so I don't see it
video/*;        xanim %s > /dev/null

# Send html to a running firefox by remote
text/html;      firefox -remote 'openURL(%s)'; test=RunningFirefox

# If I'm not running firefox but I am running X, start firefox on the
# object
text/html;      firefox %s; test=RunningX

# Else use lynx to view it as text
text/html;      lynx %s

# This version would convert the text/html to text/plain
text/html;      lynx -dump %s; copiousoutput

# I use enscript to print text in two columns to a page
text/*;         more %s; print=enscript -2Gr %s

# Firefox adds a flag to tell itself to view jpegs internally
image/jpeg;xv %s; x-mozilla-flags=internal

# Use xv to view images if I'm running X
# In addition, this uses the \ to extend the line and set my editor
# for images
image/*;xv %s; test=RunningX; \
        edit=xpaint %s

# Convert images to text using the netpbm tools
image/*;  (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | pgmtopbm |
pbmtoascii -1x2 ) 2>&1 ; copiousoutput

# Send excel spreadsheets to my NT box
application/ms-excel; open.pl %s

4. MIME Autoview

Usage:

auto_view mimetype [ mimetype ...]
unauto_view { * | mimetype ... }

In addition to explicitly telling Mutt to view an attachment with the MIME viewer defined in the mailcap file from the attachments menu, Mutt has support for automatically viewing MIME attachments while in the pager.

For this to work, you must define a viewer in the mailcap file which uses the copiousoutput option to denote that it is non-interactive. Usually, you also use the entry to convert the attachment to a text representation which you can view in the pager.

You then use the auto_view configuration command to list the content-types that you wish to view automatically. For instance, if you set it to:

auto_view text/html application/x-gunzip \
  application/postscript image/gif application/x-tar-gz

...Mutt would try to find corresponding entries for rendering attachments of these types as text. A corresponding mailcap could look like:

text/html;      lynx -dump %s; copiousoutput; nametemplate=%s.html
image/*;        anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | \
                pgmtopbm | pbmtoascii ; copiousoutput
application/x-gunzip;   gzcat; copiousoutput
application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
application/postscript; ps2ascii %s; copiousoutput

unauto_view can be used to remove previous entries from the auto_view list. This can be used with message-hook to autoview messages based on size, etc. “unauto_view *†will remove all previous entries.

5. MIME Multipart/Alternative

The multipart/alternative container type only has child MIME parts which represent the same content in an alternative way. This is often used to send HTML messages which contain an alternative plain text representation.

Mutt has some heuristics for determining which attachment of a multipart/alternative type to display:

  1. First, Mutt will check the alternative_order list to determine if one of the available types is preferred. It consists of a number of MIME types in order, including support for implicit and explicit wildcards. For example:

    alternative_order text/enriched text/plain text \
      application/postscript image/*
    
  2. Next, Mutt will check if any of the types have a defined auto_view, and use that.

  3. Failing that, Mutt will look first for text/enriched, followed by text/plain, and finally text/html.

  4. As a last attempt, Mutt will look for any type it knows how to handle.

To remove a MIME type from the alternative_order list, use the unalternative_order command.

Generating multipart/alternative content is supported via the $send_multipart_alternative quadoption and $send_multipart_alternative_filter filter script. The composed text/plain content will be piped to the filter script's stdin. The output from the filter script should be the generated mime type of the content, a blank line, and the content. For example:

text/html

<html>
<body>
Content in html format
</body>
</html>

A preview of the alternative can be viewed in the compose menu using the functions <view-alt> (bound to "v"), <view-alt-text> (bound to "Esc v"), <view-alt-mailcap> (bound to "V"), and <view-alt-pager> (unbound). See Section 1.3.1, “Viewing Attachments†for a discussion of the differences between these viewing functions.

6. Attachment Searching and Counting

If you ever lose track of attachments in your mailboxes, Mutt's attachment-counting and -searching support might be for you. You can make your message index display the number of qualifying attachments in each message, or search for messages by attachment count. You also can configure what kinds of attachments qualify for this feature with the attachments and unattachments commands.

In order to provide this information, Mutt needs to fully MIME-parse all messages affected first. This can slow down operation especially for remote mail folders such as IMAP because all messages have to be downloaded first regardless whether the user really wants to view them or not though using Section 8.2, “Body Caching†usually means to download the message just once.

By default, Mutt will not search inside multipart/alternative containers. This can be changed via the $count_alternatives configuration variable.

The syntax is:

attachments { + | - }disposition mime-type
unattachments { + | - }disposition mime-type
attachments ?
unattachments *

disposition is the attachment's Content-Disposition type — either inline or attachment. You can abbreviate this to I or A.

The first part of a message or multipart group, if inline, is counted separately than other inline parts. Specify root or R for disposition to count these as attachments. If this first part is of type multipart/alternative, note that its top-level inline parts are also counted via root disposition (if $count_alternatives is set).

Disposition is prefixed by either a “+†symbol or a “-†symbol. If it's a “+â€, you're saying that you want to allow this disposition and MIME type to qualify. If it's a “-â€, you're saying that this disposition and MIME type is an exception to previous “+†rules. There are examples below of how this is useful.

mime-type is the MIME type of the attachment you want the command to affect. A MIME type is always of the format major/minor, where major describes the broad category of document you're looking at, and minor describes the specific type within that category. The major part of mime-type must be literal text (or the special token “*â€), but the minor part may be a regular expression. (Therefore, “*/.*†matches any MIME type.)

The MIME types you give to the attachments directive are a kind of pattern. When you use the attachments directive, the patterns you specify are added to a list. When you use unattachments, the pattern is removed from the list. The patterns are not expanded and matched to specific MIME types at this time — they're just text in a list. They're only matched when actually evaluating a message.

Some examples might help to illustrate. The examples that are not commented out define the default configuration of the lists.

Example 5.2. Attachment counting


# Removing a pattern from a list removes that pattern literally. It
# does not remove any type matching the pattern.
#
#  attachments   +A */.*
#  attachments   +A image/jpeg
#  unattachments +A */.*
#
# This leaves "attached" image/jpeg files on the allowed attachments
# list. It does not remove all items, as you might expect, because the
# second */.* is not a matching expression at this time.
#
# Remember: "unattachments" only undoes what "attachments" has done!
# It does not trigger any matching on actual messages.

# Qualify any MIME part with an "attachment" disposition, EXCEPT for
# text/x-vcard and application/pgp parts. (PGP parts are already known
# to mutt, and can be searched for with ~g, ~G, and ~k.)
#
# I've added x-pkcs7 to this, since it functions (for S/MIME)
# analogously to PGP signature attachments. S/MIME isn't supported
# in a stock mutt build, but we can still treat it specially here.
#

attachments   +A */.*
attachments   -A text/x-vcard application/pgp.*
attachments   -A application/x-pkcs7-.*


# Discount all MIME parts with an "inline" disposition, unless they're
# text/plain. (Why inline a text/plain part unless it's external to the
# message flow?)

attachments   +I text/plain


# These two lines make Mutt qualify MIME containers.  (So, for example,
# a message/rfc822 forward will count as an attachment.)  The first
# line is unnecessary if you already have "attach-allow */.*", of
# course.  These are off by default!  The MIME elements contained
# within a message/* or multipart/* are still examined, even if the
# containers themselves don't qualify.

#attachments  +A message/.* multipart/.*
#attachments  +I message/.* multipart/.*


## You probably don't really care to know about deleted attachments.
attachments   -A message/external-body
attachments   -I message/external-body

Entering the command “attachments ?†as a command will list your current settings in Muttrc format, so that it can be pasted elsewhere.

Entering the command “unattachments *†as a command will Clear all attachment settings.

7. MIME Lookup

Usage:

mime_lookup mimetype [ mimetype ...]
unmime_lookup { * | mimetype ... }

Mutt's mime_lookup list specifies a list of MIME types that should not be treated according to their mailcap entry. This option is designed to deal with binary types such as application/octet-stream. When an attachment's MIME type is listed in mime_lookup, then the extension of the filename will be compared to the list of extensions in the mime.types file. The MIME type associated with this extension will then be used to process the attachment according to the rules in the mailcap file and according to any other configuration options (such as auto_view) specified. Common usage would be:

mime_lookup application/octet-stream application/X-Lotus-Manuscript

In addition, the unmime_lookup command may be used to disable this feature for any particular MIME type if it had been set, for example, in a global .muttrc.

Chapter 6. Optional Features

1. General Notes

1.1. Enabling/Disabling Features

Mutt supports several of optional features which can be enabled or disabled at compile-time by giving the configure script certain arguments. These are listed in the “Optional features†section of the configure --help output.

Which features are enabled or disabled can later be determined from the output of mutt -v. If a compile option starts with “+†it is enabled and disabled if prefixed with “-â€. For example, if Mutt was compiled using GnuTLS for encrypted communication instead of OpenSSL, mutt -v would contain:

-USE_SSL_OPENSSL +USE_SSL_GNUTLS

1.2. URL Syntax

Mutt optionally supports the IMAP, POP3 and SMTP protocols which require to access servers using URLs. The canonical syntax for specifying URLs in Mutt is (an item enclosed in [] means it is optional and may be omitted):

proto[s]://[username[:password]@]server[:port][/path]

proto is the communication protocol: imap for IMAP, pop for POP3 and smtp for SMTP. If “s†for “secure communication†is appended, Mutt will attempt to establish an encrypted communication using SSL or TLS.

Since all protocols supported by Mutt support/require authentication, login credentials may be specified in the URL. This has the advantage that multiple IMAP, POP3 or SMTP servers may be specified (which isn't possible using, for example, $imap_user). The username may contain the “@†symbol being used by many mail systems as part of the login name. The special characters “/†(%2F), “:†(%3A) and “%†(%25) have to be URL-encoded in usernames using the %-notation.

A password can be given, too but is not recommended if the URL is specified in a configuration file on disk.

If no port number is given, Mutt will use the system's default for the given protocol (usually consulting /etc/services).

The optional path is only relevant for IMAP and ignored elsewhere.

Example 6.1. URLs

pops://host/
imaps://user@host/INBOX/Sent
smtp://user@host:587/

2. SSL/TLS Support

If Mutt is compiled with IMAP, POP3 and/or SMTP support, it can also be compiled with support for SSL or TLS using either OpenSSL or GnuTLS ( by running the configure script with the --enable-ssl=... option for OpenSSL or --enable-gnutls=... for GnuTLS). Mutt can then attempt to encrypt communication with remote servers if these protocols are suffixed with “s†for “secure communicationâ€.

2.1. STARTTLS

When non-secure URL protocols imap://, pop://, and smtp:// are used, the initial connection to the server will be unencrypted. STARTTLS can be used to negotiate an encrypted connection after the initial unencrypted connection and exchange.

Two configuration variables control Mutt's behavior with STARTTLS. $ssl_starttls will initiate STARTTLS if the server advertises support for it. $ssl_force_tls will always try to initiate it, whether the server advertises support or not.

Mutt highly recommends setting $ssl_force_tls unless you need to connect to an unencrypted server. It's possible for an attacker to spoof interactions during the initial connection and hide support for STARTTLS. The only way to prevent these attacks is by forcing STARTTLS with the $ssl_force_tls configuration variable.

2.2. Tunnel

When connecting through a $tunnel and $tunnel_is_secure is set (the default), Mutt will assume the connection to the server through the pipe is already secured. Mutt will ignore $ssl_starttls and $ssl_force_tls, behaving as if TLS has already been negotiated.

When $tunnel_is_secure is unset, Mutt will respect the values of $ssl_starttls and $ssl_force_tls. It is highly recommended to set $ssl_force_tls in this case, to force STARTTLS negotiation. Note that doing so will prevent connection to an IMAP server configured for preauthentication (PREAUTH). If you use this configuration, it is recommended to use a secure tunnel.

3. POP3 Support

If Mutt is compiled with POP3 support (by running the configure script with the --enable-pop flag), it has the ability to work with mailboxes located on a remote POP3 server and fetch mail for local browsing.

Remote POP3 servers can be accessed using URLs with the pop protocol for unencrypted and pops for encrypted communication, see Section 1.2, “URL Syntax†for details.

Polling for new mail is more expensive over POP3 than locally. For this reason the frequency at which Mutt will check for mail remotely can be controlled by the $pop_checkinterval variable, which defaults to every 60 seconds.

POP is read-only which doesn't allow for some features like editing messages or changing flags. However, using Section 8.1, “Header Caching†and Section 8.2, “Body Caching†Mutt simulates the new/old/read flags as well as flagged and replied. Mutt applies some logic on top of remote messages but cannot change them so that modifications of flags are lost when messages are downloaded from the POP server (either by Mutt or other tools).

Another way to access your POP3 mail is the <fetch-mail> function (default: G). It allows to connect to $pop_host, fetch all your new mail and place it in the local $spoolfile. After this point, Mutt runs exactly as if the mail had always been local.

Note

If you only need to fetch all messages to a local mailbox you should consider using a specialized program, such as fetchmail(1), getmail(1) or similar.

4. IMAP Support

If Mutt was compiled with IMAP support (by running the configure script with the --enable-imap flag), it has the ability to work with folders located on a remote IMAP server.

You can access the remote inbox by selecting the folder by its URL (see Section 1.2, “URL Syntax†for details) using the imap or imaps protocol. Alternatively, a pine-compatible notation is also supported, i.e. {[username@]imapserver[:port][/ssl]}path/to/folder

Note that not all servers use “/†as the hierarchy separator. Mutt should correctly notice which separator is being used by the server and convert paths accordingly.

When browsing folders on an IMAP server, you can toggle whether to look at only the folders you are subscribed to, or all folders with the toggle-subscribed command. See also the $imap_list_subscribed variable.

Polling for new mail on an IMAP server can cause noticeable delays. So, you'll want to carefully tune the $mail_check and $timeout variables. Reasonable values are:

set mail_check=90
set timeout=15

with relatively good results even over slow modem lines.

Note

Note that if you are using mbox as the mail store on UW servers prior to v12.250, the server has been reported to disconnect a client if another client selects the same folder.

4.1. The IMAP Folder Browser

As of version 1.2, Mutt supports browsing mailboxes on an IMAP server. This is mostly the same as the local file browser, with the following differences:

  • In lieu of file permissions, Mutt displays the string “IMAPâ€, possibly followed by the symbol “+â€, indicating that the entry contains both messages and subfolders. On Cyrus-like servers folders will often contain both messages and subfolders. A mailbox name with a trailing delimiter (usually “/†or “.â€) indicates subfolders.

  • For the case where an entry can contain both messages and subfolders, the selection key (bound to enter by default) will choose to descend into the subfolder view. If you wish to view the messages in that folder, you must use view-file instead (bound to space by default).

  • You can create, delete and rename mailboxes with the <create-mailbox>, <delete-mailbox>, and <rename-mailbox> commands (default bindings: C, d and r, respectively). You may also <subscribe> and <unsubscribe> to mailboxes (normally these are bound to s and u, respectively).

4.2. Authentication

Mutt supports four authentication methods with IMAP servers: SASL, GSSAPI, CRAM-MD5, and LOGIN (there is a patch by Grant Edwards to add NTLM authentication for you poor exchange users out there, but it has yet to be integrated into the main tree). There is also support for the pseudo-protocol ANONYMOUS, which allows you to log in to a public IMAP server without having an account. To use ANONYMOUS, simply make your username blank or “anonymousâ€.

SASL is a special super-authenticator, which selects among several protocols (including GSSAPI, CRAM-MD5, ANONYMOUS, and DIGEST-MD5) the most secure method available on your host and the server. Using some of these methods (including DIGEST-MD5 and possibly GSSAPI), your entire session will be encrypted and invisible to those teeming network snoops. It is the best option if you have it. To use it, you must have the Cyrus SASL library installed on your system and compile Mutt with the --with-sasl flag.

Mutt will try whichever methods are compiled in and available on the server, in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.

There are a few variables which control authentication:

  • $imap_user - controls the username under which you request authentication on the IMAP server, for all authenticators. This is overridden by an explicit username in the mailbox path (i.e. by using a mailbox name of the form {user@host}).

  • $imap_pass - a password which you may preset, used by all authentication methods where a password is needed.

  • $imap_authenticators - a colon-delimited list of IMAP authentication methods to try, in the order you wish to try them. If specified, this overrides Mutt's default (attempt everything, in the order listed above).

5. SMTP Support

Besides supporting traditional mail delivery through a sendmail-compatible program, Mutt supports delivery through SMTP if it was configured and built with --enable-smtp.

If the configuration variable $smtp_url is set, Mutt will contact the given SMTP server to deliver messages; if it is unset, Mutt will use the program specified by $sendmail.

For details on the URL syntax, please see Section 1.2, “URL Syntaxâ€.

The built-in SMTP support supports encryption (the smtps protocol using SSL or TLS) as well as SMTP authentication using SASL. The authentication mechanisms for SASL are specified in $smtp_authenticators defaulting to an empty list which makes Mutt try all available methods from most-secure to least-secure.

6. OAUTHBEARER Support

Preliminary OAUTH support for IMAP, POP, and SMTP is provided via external scripts.

At least for Gmail, you can use the oauth2.py script from Google's gmail-oauth2-tools: https://github.com/google/gmail-oauth2-tools/blob/master/python/oauth2.py

You'll need to get your own oauth client credentials for Gmail here: https://console.developers.google.com/apis/credentials

Then, you'd use oauth2.py with --generate_oauth2_token to get a refresh token, and configure mutt with:

set imap_authenticators="oauthbearer"
set imap_oauth_refresh_command="/path/to/oauth2.py --quiet --user=[email_address]\
    --client_id=[client_id] --client_secret=[client_secret]\
    --refresh_token=[refresh_token]"

Substitute pop or smtp for imap in the above example to configure for those.

An alternative script is contrib/mutt_oauth2.py script. For more details see contrib/mutt_oauth2.py.README.

6.1. XOAUTH2 Support

Support for the deprecated XOAUTH2 protocol is also available. To enable this, add “xoauth2†to the $imap_authenticators, $pop_authenticators, or $smtp_authenticators config variables. XOAUTH2 uses the same refresh command configuration variables as OAUTHBEARER: $imap_oauth_refresh_command, $pop_oauth_refresh_command, and $smtp_oauth_refresh_command. Those will need to be set to a script to generate the appropriate XOAUTH2 token.

7. Managing Multiple Accounts

Usage:

account-hook regexp command

If you happen to have accounts on multiple IMAP, POP and/or SMTP servers, you may find managing all the authentication settings inconvenient and error-prone. The account-hook command may help. This hook works like folder-hook but is invoked whenever Mutt needs to access a remote mailbox (including inside the folder browser), not just when you open the mailbox. This includes (for example) polling for new mail, storing Fcc messages and saving messages to a folder. As a consequence, account-hook should only be used to set connection-related settings such as passwords or tunnel commands but not settings such as sender address or name (because in general it should be considered unpredictable which account-hook was last used).

Some examples:

account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
account-hook smtp://user@host3/ 'set tunnel="ssh host3 /usr/libexec/smtpd"'

To manage multiple accounts with, for example, different values of $record or sender addresses, folder-hook has to be used together with the mailboxes command.

Example 6.2. Managing multiple accounts

mailboxes imap://user@host1/INBOX
folder-hook imap://user@host1/ 'set folder=imap://host1/ ; set record=+INBOX/Sent'

mailboxes imap://user@host2/INBOX
folder-hook imap://user@host2/ 'set folder=imap://host2/ ; set record=+INBOX/Sent'

In example Example 6.2, “Managing multiple accounts†the folders are defined using mailboxes so Mutt polls them for new mail. Each folder-hook triggers when one mailbox below each IMAP account is opened and sets $folder to the account's root folder. Next, it sets $record to the INBOX/Sent folder below the newly set $folder. Please notice that the value the “+†mailbox shortcut refers to depends on the current value of $folder and therefore has to be set separately per account. Setting other values like $from or $signature is analogous to setting $record.

8. Local Caching

Mutt contains two types of local caching: (1) the so-called “header caching†and (2) the so-called “body caching†which are both described in this section.

Header caching is optional as it depends on external libraries, body caching is always enabled if Mutt is compiled with POP and/or IMAP support as these use it (body caching requires no external library).

8.1. Header Caching

Mutt provides optional support for caching message headers for the following types of folders: IMAP, POP, Maildir and MH. Header caching greatly speeds up opening large folders because for remote folders, headers usually only need to be downloaded once. For Maildir and MH, reading the headers from a single file is much faster than looking at possibly thousands of single files (since Maildir and MH use one file per message.)

Header caching can be enabled via the configure script and the --enable-hcache option. It's not turned on by default because external database libraries are required: one of tokyocabinet, kyotocabinet, lmdb, qdbm, gdbm or bdb must be present.

If enabled, $header_cache can be used to either point to a file or a directory. If set to point to a file, one database file for all folders will be used (which may result in lower performance), but one file per folder if it points to a directory. When pointing to a directory, be sure to create the directory in advance, or Mutt will interpret it as a file to be created.

8.2. Body Caching

Both cache methods can be combined using the same directory for storage (and for IMAP/POP even provide meaningful file names) which simplifies manual maintenance tasks.

In addition to caching message headers only, Mutt can also cache whole message bodies. This results in faster display of messages for POP and IMAP folders because messages usually have to be downloaded only once.

For configuration, the variable $message_cachedir must point to a directory. There, Mutt will create a hierarchy of subdirectories named like the account and mailbox path the cache is for.

8.3. Cache Directories

For using both, header and body caching, $header_cache and $message_cachedir can be safely set to the same value.

In a header or body cache directory, Mutt creates a directory hierarchy named like: proto:user@hostname where proto is either “pop†or “imap.†Within there, for each folder, Mutt stores messages in single files and header caches in files with the “.hcache†extension. All files can be removed as needed if the consumed disk space becomes an issue as Mutt will silently fetch missing items again. Pathnames are always stored in UTF-8 encoding.

For Maildir and MH, the header cache files are named after the MD5 checksum of the path.

8.4. Maintenance

Mutt does not (yet) support maintenance features for header cache database files so that files have to be removed in case they grow too big. It depends on the database library used for header caching whether disk space freed by removing messages is re-used.

For body caches, Mutt can keep the local cache in sync with the remote mailbox if the $message_cache_clean variable is set. Cleaning means to remove messages from the cache which are no longer present in the mailbox which only happens when other mail clients or instances of Mutt using a different body cache location delete messages (Mutt itself removes deleted messages from the cache when syncing a mailbox). As cleaning can take a noticeable amount of time, it should not be set in general but only occasionally.

9. Exact Address Generation

Mutt supports the “Name <user@host>†address syntax for reading and writing messages, the older “user@host (Name)†syntax is only supported when reading messages. The --enable-exact-address switch can be given to configure to build it with write-support for the latter syntax. EXACT_ADDRESS in the output of mutt -v indicates whether it's supported.

Note: If the full address contains non-ascii characters, or sequences that require RFC 2047 encoding, Mutt reverts to writing out the normalized “Name <user@host>†form, in order to generate legal output.

10. Sending Anonymous Messages via Mixmaster

You may also have compiled Mutt to co-operate with Mixmaster, an anonymous remailer. Mixmaster permits you to send your messages anonymously using a chain of remailers. Mixmaster support in Mutt is for mixmaster version 2.04 or later.

To use it, you'll have to obey certain restrictions. Most important, you cannot use the Cc and Bcc headers. To tell Mutt to use mixmaster, you have to select a remailer chain, using the mix function on the compose menu.

The chain selection screen is divided into two parts. In the (larger) upper part, you get a list of remailers you may use. In the lower part, you see the currently selected chain of remailers.

You can navigate in the chain using the <chain-prev> and <chain-next> functions, which are by default bound to the left and right arrows and to the h and l keys (think vi keyboard bindings). To insert a remailer at the current chain position, use the <insert> function. To append a remailer behind the current chain position, use <select-entry> or <append>. You can also delete entries from the chain, using the corresponding function. Finally, to abandon your changes, leave the menu, or <accept> them pressing (by default) the Return key.

Note that different remailers do have different capabilities, indicated in the %c entry of the remailer menu lines (see $mix_entry_format). Most important is the “middleman†capability, indicated by a capital “Mâ€: This means that the remailer in question cannot be used as the final element of a chain, but will only forward messages to other mixmaster remailers. For details on the other capabilities, please have a look at the mixmaster documentation.

11. Sidebar

Overview of mailboxes

11.1. Introduction

The Sidebar shows a list of all your mailboxes. The list can be turned on and off, it can be themed and the list style can be configured.

11.2. Variables

Table 6.1. Sidebar Variables

NameTypeDefault
sidebar_delim_charsstring/.
sidebar_divider_charstring|
sidebar_folder_indentbooleanno
sidebar_formatstring%B%* %n
sidebar_indent_stringstring   (two spaces)
sidebar_new_mail_onlybooleanno
sidebar_next_new_wrapbooleanno
sidebar_short_pathbooleanno
sidebar_sort_methodenumunsorted
sidebar_visiblebooleanno
sidebar_widthnumber20

11.3. Functions

Sidebar adds the following functions to Mutt. By default, none of them are bound to keys.

Table 6.2. Sidebar Functions

MenusFunctionDescription
index,pager<sidebar-next>Move the highlight to next mailbox
index,pager<sidebar-next-new>Move the highlight to next mailbox with new mail
index,pager<sidebar-open>Open highlighted mailbox
index,pager<sidebar-page-down>Scroll the Sidebar down 1 page
index,pager<sidebar-page-up>Scroll the Sidebar up 1 page
index,pager<sidebar-prev>Move the highlight to previous mailbox
index,pager<sidebar-prev-new>Move the highlight to previous mailbox with new mail
index,pager<sidebar-toggle-visible>Make the Sidebar (in)visible

11.4. Commands

sidebar_whitelist mailbox [ mailbox ...]
unsidebar_whitelist { * | mailbox ... }

This command specifies mailboxes that will always be displayed in the sidebar, even if $sidebar_new_mail_only is set and the mailbox does not contain new mail.

The “unsidebar_whitelist†command is used to remove a mailbox from the list of whitelisted mailboxes. Use “unsidebar_whitelist *†to remove all mailboxes.

11.5. Colors

Table 6.3. Sidebar Colors

NameDefault ColorDescription
sidebar_dividerdefaultThe dividing line between the Sidebar and the Index/Pager panels
sidebar_flaggeddefaultMailboxes containing flagged mail
sidebar_highlightunderlineCursor to select a mailbox
sidebar_indicatormutt indicatorThe mailbox open in the Index panel
sidebar_newdefaultMailboxes containing new mail
sidebar_spoolfiledefaultMailbox that receives incoming mail

If the sidebar_indicator color isn't set, then the default Mutt indicator color will be used (the color used in the index panel).

11.6. Sort

Table 6.4. Sidebar Sort

SortDescription
alphaAlphabetically by path or label
countTotal number of messages
flaggedNumber of flagged messages
nameAlphabetically by path or label
newNumber of unread messages
pathAlphabetically by path (ignores label)
unreadNumber of unread messages
unsortedDo not resort the paths

12. Compressed Folders Feature

Read from/write to compressed mailboxes

12.1. Introduction

The Compressed Folder patch allows Mutt to read mailbox files that are compressed. But it isn't limited to compressed files. It works well with encrypted files, too. In fact, if you can create a program/script to convert to and from your format, then Mutt can read it.

The patch adds three hooks to Mutt: open-hook, close-hook and append-hook. They define commands to: uncompress a file; compress a file; append messages to an already compressed file.

There are some examples of both compressed and encrypted files, later. For now, the documentation will just concentrate on compressed files.

12.2. Commands

open-hook pattern shell-command
close-hook pattern shell-command
append-hook pattern shell-command

The shell-command must contain two placeholders for filenames: %f and %t. These represent “from†and “to†filenames. These placeholders should be placed inside single-quotes to prevent unintended shell expansions.

If you need the exact string “%f†or “%t†in your command, simply double up the “%†character, e.g. “%%f†or “%%tâ€.

Table 6.5. Not all Hooks are Required

OpenCloseAppendEffectUseful if
Open--Folder is readonlyThe folder is just a backup
OpenClose-Folder is read/write, but the entire folder must be written if anything is changedYour compression format doesn't support appending
OpenCloseAppendFolder is read/write and emails can be efficiently added to the endYour compression format supports appending
Open-AppendFolder is readonly, but can be appended toYou want to store emails, but never change them

Note

The command:

  • should return a non-zero exit status on failure

  • should not delete any files

12.2.1. Read from compressed mailbox

open-hook regexp shell-command

If Mutt is unable to open a file, it then looks for open-hook that matches the filename.

If your compression program doesn't have a well-defined extension, then you can use . as the regexp.

Example 6.3. Example of open-hook

open-hook '\.gz$' "gzip -cd '%f' > '%t'"
  • Mutt finds a file, “example.gzâ€, that it can't read

  • Mutt has an open-hook whose regexp matches the filename: \.gz$

  • Mutt uses the command gzip -cd to create a temporary file that it can read


12.2.2. Write to a compressed mailbox

close-hook regexp shell-command

When Mutt has finished with a compressed mail folder, it will look for a matching close-hook to recompress the file. This hook is optional.

Note

If the folder has not been modified, the close-hook will not be called.

Example 6.4. Example of close-hook

close-hook '\.gz$' "gzip -c '%t' > '%f'"
  • Mutt has finished with a folder, “example.gzâ€, that it opened with open-hook

  • The folder has been modified

  • Mutt has a close-hook whose regexp matches the filename: \.gz$

  • Mutt uses the command gzip -c to create a new compressed file


12.2.3. Append to a compressed mailbox

append-hook regexp shell-command

When Mutt wants to append an email to a compressed mail folder, it will look for a matching append-hook. This hook is optional.

Using the append-hook will save time, but Mutt won't be able to determine the type of the mail folder inside the compressed file.

Mutt will assume the type to be that of the $mbox_type variable. Mutt also uses this type for temporary files.

Mutt will only use the append-hook for existing files. The close-hook will be used for empty, or missing files.

Note

If your command writes to stdout, it is vital that you use >> in the “append-hookâ€. If not, data will be lost.

Example 6.5. Example of append-hook

append-hook '\.gz$' "gzip -c '%t' >> '%f'"
  • Mutt wants to append an email to a folder, “example.gzâ€, that it opened with open-hook

  • Mutt has an append-hook whose regexp matches the filename: \.gz$

  • Mutt knows the mailbox type from the $mbox variable

  • Mutt uses the command gzip -c to append to an existing compressed file


12.2.4. Empty Files

Mutt assumes that an empty file is not compressed. In this situation, unset $save_empty, so that the compressed file will be removed if you delete all of the messages.

12.2.5. Security

Encrypted files are decrypted into temporary files which are stored in the $tmpdir directory. This could be a security risk.

13. Autocrypt

Mutt can be compiled with Autocrypt support by running configure with the --enable-autocrypt flag. Autocrypt provides easy to use, passive protection against data collection. Keys are distributed via an Autocrypt: header added to emails. It does not protect against active adversaries, and so should not be considered a substitute for normal encryption via your keyring, using key signing and the web of trust to verify identities. With an understanding of these limitations, Autocrypt still provides an easy way to minimize cleartext emails sent between common correspondents, without having to explicitly exchange keys. More information can be found at https://autocrypt.org/.

13.1. Requirements

Autocrypt requires support for ECC cryptography, and Mutt by default will generate ECC keys. Therefore GnuPG 2.1 or greater is required. Additionally, Mutt's Autocrypt implementation uses GPGME and requires at least version 1.8.0.

Account and peer information is stored in a sqlite3 database, and so Mutt must be configured with the --with-sqlite3 flag when autocrypt is enabled.

It is highly recommended Mutt be configured --with-idn or --with-idn2 so that Autocrypt can properly deal with international domain names.

While Mutt uses GPGME for Autocrypt, normal keyring operations can still be performed via classic mode (i.e. with $crypt_use_gpgme unset). However, to avoid unnecessary prompts, it is recommended gpg not be configured in loopback pinentry mode, and that $pgp_use_gpg_agent remain set (the default).

13.2. First Run

To enable Autocrypt, set $autocrypt, and if desired change the value of $autocrypt_dir in your muttrc. The first time Mutt is run after that, you will be prompted to create $autocrypt_dir. Mutt will then automatically create an sqlite3 database and GPG keyring in that directory. Note since these files should be considered private, Mutt will create this directory with mode 700. If you create the directory manually, you should do the same.

Mutt recommends keeping the $autocrypt_dir directory set differently from your GnuPG keyring directory (e.g. ~/.gnupg). Keys are automatically imported into the keyring from Autocrypt: headers. Compared to standard “web of trust†keys, Autocrypt keys are somewhat ephemeral, and the autocrypt database is used to track when keys change or fall out of use. Having these keys mixed in with your normal keyring will make it more difficult to use features such as $crypt_opportunistic_encrypt and Autocrypt at the same time.

The $autocrypt_dir variable is not designed to be changed while Mutt is running. The database is created (if necessary) and connected to during startup. Changing the variable can result in a situation where Mutt is looking in one place for the database and a different place for the GPG keyring, resulting in strange behavior.

Once the directory, keyring, and database are created, Mutt will ask whether you would like to create an account. In order to use Autocrypt, each sending address needs an account. As a convenience you can create an account during the first run. If you would like to add additional accounts later, this can be done via the <autocrypt-acct-menu> function in the index, by default bound to A.

Account creation will first ask you for an email address. Next, it will ask whether you want to create a new key or select an existing key. (Note key selection takes place from the $autocrypt_dir keyring, which will normally be empty during first run). Finally, it will ask whether this address should prefer encryption or not. Autocrypt 1.1 allows automatically enabling encryption if both sender and receiver have set “prefer encryptionâ€. Otherwise, you will need to manually enable autocrypt encryption in the compose menu. For more details, see the compose menu section below.

After optionally creating an account, Mutt will prompt you to scan mailboxes for Autocrypt headers. This step occurs because header cached messages are not re-scanned for Autocrypt headers. Scanning during this step will temporarily disable the header cache while opening each mailbox. If you wish to do this manually later, you can simulate the same thing by unsetting $header_cache and opening a mailbox.

A final technical note: the first run process takes place between reading the muttrc and opening the initial mailbox. Some muttrc files will push macros to be run after opening the mailbox. To prevent this from interfering with the first run prompts, Mutt disables all macros during the first run.

13.3. Compose Menu

When enabled, Autocrypt will add a line to the compose menu with two fields: Autocrypt: and Recommendation:.

The Autocrypt: field shows whether the message will be encrypted by Autocrypt when sent. It has two values: Encrypt and Off. Encrypt can be enabled using the <autocrypt-menu> function, by default bound to o.

The Recommendation: field shows the output of the Autocrypt recommendation engine. This can have one of five values:

  • Off means the engine is disabled. This can happen if the From address doesn't have an autocrypt account, or if the account has been manually disabled.

  • No means one or more recipients are missing an autocrypt key, or the key found is unusable (i.e. expired, revoked, disabled, invalid, or not usable for encryption.)

  • Discouraged means a key was found for every recipient, but the engine is not confident the message will be decryptable by the recipient. This can happen if the key hasn't been used recently (compared to their last seen email).

    It can also happen if the key wasn't seen first-hand from the sender. Autocrypt has a feature where recipient keys can be included in group-encrypted emails. This allows you to reply to a conversation where you don't have a key first-hand from one of the other recipients. However, those keys are not trusted as much as from first-hand emails, so the engine warns you with a Discouraged status.

  • Available means a key was found for every recipient, and the engine believes all keys are recent and seen from the recipient first hand. However, either you or one of the recipients chose not to specify “prefer encryptionâ€.

  • Yes is the same as Available, with the addition that you and all recipients have specified “prefer encryptionâ€. This value will automatically enable encryption, unless you have manually switched it off or enabled regular encryption or signing via the <pgp-menu>.

As mentioned above the <autocrypt-menu> function, by default bound to o, can be used to change the Encrypt: field value. (e)ncrypt will toggle encryption on. (c)lear will toggle encryption off. If either of these are chosen, the field will remain in that state despite what the Recommendation: field shows. Lastly, (a)utomatic will set the value based on the recommendation engine's output.

Autocrypt encryption defers to normal encryption or signing. Anything that enables normal encryption or signing will cause autocrypt encryption to turn off. The only exception is when replying to an autocrypt-encrypted email (i.e. an email decrypted from the $autocrypt_dir keyring). Then, if $autocrypt_reply is set, autocrypt mode will be forced on, overriding the settings $crypt_autosign, $crypt_autoencrypt, $crypt_replyencrypt, $crypt_replysign, $crypt_replysignencrypted, and $crypt_opportunistic_encrypt.

When postponing a message, autocrypt will respect $postpone_encrypt, but will use the autocrypt account key to encrypt the message. Be sure to set $postpone_encrypt to ensure postponed messages marked for autocrypt encryption are encrypted.

13.4. Account Management

The Autocrypt Account Menu is available from the index via <autocrypt-acct-menu>, by default bound to A. See Autocrypt Account Menu for the list of functions and their default keybindings.

In this menu, you can create new accounts, delete accounts, toggle an account active/inactive, and toggle the “prefer encryption†flag for an account.

Deleting an account only removes the account from the database. The GPG key is kept, to ensure you still have the ability to read past encrypted emails.

The Autocrypt 1.1 “Setup Message†feature is not available yet, but will be added in the future.

13.5. Alternative Key and Keyring Strategies

Mutt by default partitions Autocrypt from normal keyring encryption/signing. It does this by using a separate GPG keyring (in $autocrypt_dir) and creating a new ECC key in that keyring for accounts. There are good reasons for doing this by default. It keeps random keys found inside email headers out of your normal keyring. ECC keys are compact and better suited for email headers. Autocrypt key selection is completely different from “web of trust†key selection, based on last-seen rules as opposed to trust and validity. It also allows Mutt to distinguish Autocrypt encrypted emails from regular encrypted emails, and set the mode appropriately when replying to each type of email.

Still, some users may want to use an existing key from their normal keyring for Autocrypt too. There are two ways this can be accomplished. The recommended way is to set $autocrypt_dir to your normal keyring directory (e.g. ~/.gnupg). During account creation, choosing “(s)elect existing GPG key†will then list and allow selecting your existing key for the new account.

An alternative is to copy your key over to the Autocrypt keyring, but there is a severe downside. Mutt first tries to decrypt messages using the Autocrypt keyring, and if that fails tries the normal keyring second. This means all encrypted emails to that key will be decrypted, and have signatures verified from, the Autocrypt keyring. Keys signatures and web of trust from your normal keyring will no longer show up in signatures when decrypting.

For that reason, if you want to use an existing key from your normal keyring, it is recommended to just set $autocrypt_dir to ~/.gnupg. This allows “web of trust†to show an appropriate signature message for verified messages. Autocrypt header keys will be imported into your keyring, but if you don't want them mixed you should strongly consider using a separate autocrypt key and keyring instead.

Both methods have a couple additional caveats:

  • Replying to an Autocrypt decrypted message by default forces Autocrypt mode on. By sharing the same key, all replies will then start in Autocrypt mode, even if a message wasn't sent by one of your Autocrypt peers. $autocrypt_reply can be unset to allow manual control of the mode when replying.

  • When Mutt creates an account from a GPG key, it exports the public key, base64 encodes it, and stores that value in the sqlite3 database. The value is then used in the Autocrypt header added to outgoing emails. The ECC keys Mutt creates don't change, but if you use external keys that expire, when you resign to extend the expiration you will need to recreate the Autocrypt account using the account menu. Otherwise the Autocrypt header will contain the old expired exported keydata.

Chapter 7. Security Considerations

First of all, Mutt contains no security holes included by intention but may contain unknown security holes. As a consequence, please run Mutt only with as few permissions as possible. Especially, do not run Mutt as the super user.

When configuring Mutt, there're some points to note about secure setups so please read this chapter carefully.

1. Passwords

Although Mutt can be told the various passwords for accounts, please never store passwords in configuration files. Besides the fact that the system's operator can always read them, you could forget to mask it out when reporting a bug or asking for help via a mailing list. Even worse, your mail including your password could be archived by internet search engines, mail-to-news gateways etc. It may already be too late before you notice your mistake.

2. Temporary Files

Mutt uses many temporary files for viewing messages, verifying digital signatures, etc. As long as being used, these files are visible by other users and maybe even readable in case of misconfiguration. Also, a different location for these files may be desired which can be changed via the $tmpdir variable.

3. Information Leaks

3.1. mailto:-style Links

As Mutt be can be set up to be the mail client to handle mailto: style links in websites, there're security considerations, too. Arbitrary header fields can be embedded in these links which could override existing header fields or attach arbitrary files using the Attach: pseudoheader. This may be problematic if the $edit-headers variable is unset, i.e. the user doesn't want to see header fields while editing the message and doesn't pay enough attention to the compose menu's listing of attachments.

For example, following a link like

mailto:joe@host?Attach=~/.gnupg/secring.gpg

will send out the user's private gnupg keyring to joe@host if the user doesn't follow the information on screen carefully enough.

To prevent these issues, Mutt by default only accepts the Subject, Body, Cc, In-Reply-To, and References headers. Allowed headers can be adjusted with the mailto_allow and unmailto_allow commands.

4. External Applications

Mutt in many places has to rely on external applications or for convenience supports mechanisms involving external applications.

One of these is the mailcap mechanism as defined by RfC1524. Details about a secure use of the mailcap mechanisms is given in Section 3.2, “Secure Use of Mailcapâ€.

Besides the mailcap mechanism, Mutt uses a number of other external utilities for operation, for example to provide crypto support, in backtick expansion in configuration files or format string filters. The same security considerations apply for these as for tools involved via mailcap.

Chapter 8. Performance Tuning

1. Reading and Writing Mailboxes

Mutt's performance when reading mailboxes can be improved in two ways:

  1. For remote folders (IMAP and POP) as well as folders using one-file-per message storage (Maildir and MH), Mutt's performance can be greatly improved using header caching. using a single database per folder.

  2. Mutt provides the $read_inc and $write_inc variables to specify at which rate to update progress counters. If these values are too low, Mutt may spend more time on updating the progress counter than it spends on actually reading/writing folders.

    For example, when opening a maildir folder with a few thousand messages, the default value for $read_inc may be too low. It can be tuned on a folder-basis using folder-hooks:

    # use very high $read_inc to speed up reading hcache'd maildirs
    folder-hook . 'set read_inc=1000'
    # use lower value for reading slower remote IMAP folders
    folder-hook ^imap 'set read_inc=100'
    # use even lower value for reading even slower remote POP folders
    folder-hook ^pop 'set read_inc=1'

These settings work on a per-message basis. However, as messages may greatly differ in size and certain operations are much faster than others, even per-folder settings of the increment variables may not be desirable as they produce either too few or too much progress updates. Thus, Mutt allows to limit the number of progress updates per second it'll actually send to the terminal using the $time_inc variable.

2. Reading Messages from Remote Folders

Reading messages from remote folders such as IMAP an POP can be slow especially for large mailboxes since Mutt only caches a very limited number of recently viewed messages (usually 10) per session (so that it will be gone for the next session.)

To improve performance and permanently cache whole messages and headers, please refer to body caching and header caching for details.

Additionally, it may be worth trying some of Mutt's experimental features. $imap_qresync (which requires header caching) can provide a huge speed boost opening mailboxes if your IMAP server supports it. $imap_deflate enables compression, which can also noticeably reduce download time for large mailboxes and messages.

3. Searching and Limiting

When searching mailboxes either via a search or a limit action, for some patterns Mutt distinguishes between regular expression and string searches. For regular expressions, patterns are prefixed with “~†and with “=†for string searches.

Even though a regular expression search is fast, it's several times slower than a pure string search which is noticeable especially on large folders. As a consequence, a string search should be used instead of a regular expression search if the user already knows enough about the search pattern.

For example, when limiting a large folder to all messages sent to or by an author, it's much faster to search for the initial part of an e-mail address via =Luser@ instead of ~Luser@. This is especially true for searching message bodies since a larger amount of input has to be searched.

As for regular expressions, a lower case string search pattern makes Mutt perform a case-insensitive search except for IMAP (because for IMAP Mutt performs server-side searches which don't support case-insensitivity).

Chapter 9. Reference

1. Command-Line Options

Running mutt with no arguments will make Mutt attempt to read your spool mailbox. However, it is possible to read other mailboxes and to send messages from the command line as well.

Table 9.1. Command line options

OptionDescription
-Aexpand an alias
-aattach a file to a message
-bspecify a blind carbon-copy (BCC) address
-cspecify a carbon-copy (Cc) address
-dlog debugging output to ~/.muttdebug0 if mutt was compiled with +DEBUG; it can range from -5 to 5 and affects verbosity. A value of 0 disables debugging. A value less than zero disables automatic log file rotation. A value of 2 is recommended for most diagnostics.
-Dprint the value of all Mutt variables to stdout
-Eedit the draft (-H) or include (-i) file
-especify a config command to be run after initialization files are read
-fspecify a mailbox to load
-Fspecify an alternate file to read initialization commands
-hprint help on command line options
-Hspecify a draft file from which to read a header and body
-ispecify a file to include in a message composition
-mspecify a default mailbox type
-ndo not read the system Muttrc
-precall a postponed message
-Qquery a configuration variable
-Ropen mailbox in read-only mode
-sspecify a subject (enclose in quotes if it contains spaces)
-vshow version number and compile-time definitions
-xsimulate the mailx(1) compose mode
-yshow a menu containing the files specified by the mailboxes command
-zexit immediately if there are no messages in the mailbox
-Zopen the first folder with new message, exit immediately if none

To read messages in a mailbox

mutt [-nz] [-F muttrc ] [-m type ] [-f mailbox ]

To compose a new message

mutt [-En] [-F muttrc ] [-c address ] [-Hi filename ] [-s subject ] [ -a file [...] -- ] address | mailto_url ...

Mutt also supports a “batch†mode to send prepared messages. Simply redirect input from the file you wish to send. For example,

mutt -s "data set for run #2" professor@bigschool.edu < ~/run2.dat

will send a message to <professor@bigschool.edu> with a subject of “data set for run #2â€. In the body of the message will be the contents of the file “~/run2.datâ€.

An include file passed with -i will be used as the body of the message. When combined with -E, the include file will be directly edited during message composition. The file will be modified regardless of whether the message is sent or aborted.

A draft file passed with -H will be used as the initial header and body for the message. Multipart messages can be used as a draft file, and are processed the same in interactive and batch mode; they are not passed through untouched. For example, encrypted draft files will be decrypted. When combined with -E, the draft file will be updated to the final state of the message after composition, regardless of whether the message is sent, aborted, or even postponed. Note that if the message is sent encrypted or signed, the draft file will be saved that way too.

All files passed with -a file will be attached as a MIME part to the message. To attach a single or several files, use “--†to separate files and recipient addresses:

mutt -a image.png -- some@one.org

or

mutt -a *.png -- some@one.org

Note

The -a option must be last in the option list.

In addition to accepting a list of email addresses, Mutt also accepts a URL with the mailto: schema as specified in RFC2368. This is useful when configuring a web browser to launch Mutt when clicking on mailto links.

mutt mailto:some@one.org?subject=test&cc=other@one.org

2. Configuration Commands

The following are the commands understood by Mutt:

3. Configuration Variables

3.1. abort_noattach

Type: quadoption
Default: no

When the body of the message matches $abort_noattach_regexp and there are no attachments, this quadoption controls whether to abort sending the message.

3.2. abort_noattach_regexp

Type: regular expression
Default: “attachâ€

Specifies a regular expression to match against the body of the message, to determine if an attachment was mentioned but mistakenly forgotten. If it matches, $abort_noattach will be consulted to determine if message sending will be aborted.

Like other regular expressions in Mutt, the search is case sensitive if the pattern contains at least one upper case letter, and case insensitive otherwise.

3.3. abort_nosubject

Type: quadoption
Default: ask-yes

If set to yes, when composing messages and no subject is given at the subject prompt, composition will be aborted. If set to no, composing messages with no subject given at the subject prompt will never be aborted.

3.4. abort_unmodified

Type: quadoption
Default: yes

If set to yes, composition will automatically abort after editing the message body if no changes are made to the file (this check only happens after the first edit of the file). When set to no, composition will never be aborted.

3.5. alias_file

Type: path
Default: “~/.muttrcâ€

The default file in which to save aliases created by the <create-alias> function. Entries added to this file are encoded in the character set specified by $config_charset if it is set or the current character set otherwise.

Note: Mutt will not automatically source this file; you must explicitly use the “source†command for it to be executed in case this option points to a dedicated alias file.

The default for this option is the currently used muttrc file, or “~/.muttrc†if no user muttrc was found.

3.6. alias_format

Type: string
Default: “%4n %2f %t %-10a   %râ€

Specifies the format of the data displayed for the “alias†menu. The following printf(3)-style sequences are available:

%a alias name
%f flags - currently, a “d†for an alias marked for deletion
%n index number
%r address which alias expands to
%t character which indicates if the alias is tagged for inclusion

3.7. allow_8bit

Type: boolean
Default: yes

Controls whether 8-bit data is converted to 7-bit using either Quoted- Printable or Base64 encoding when sending mail.

3.8. allow_ansi

Type: boolean
Default: no

Controls whether ANSI color codes in messages (and color tags in rich text messages) are to be interpreted. Messages containing these codes are rare, but if this option is set, their text will be colored accordingly. Note that this may override your color choices, and even present a security problem, since a message could include a line like

[-- PGP output follows ...

and give it the same color as your attachment color (see also $crypt_timestamp).

3.9. arrow_cursor

Type: boolean
Default: no

When set, an arrow (“->â€) will be used to indicate the current entry in menus instead of highlighting the whole line. On slow network or modem links this will make response faster because there is less that has to be redrawn on the screen when moving to the next or previous entries in the menu.

3.10. ascii_chars

Type: boolean
Default: no

If set, Mutt will use plain ASCII characters when displaying thread and attachment trees, instead of the default ACS characters.

3.11. askbcc

Type: boolean
Default: no

If set, Mutt will prompt you for blind-carbon-copy (Bcc) recipients before editing an outgoing message.

3.12. askcc

Type: boolean
Default: no

If set, Mutt will prompt you for carbon-copy (Cc) recipients before editing the body of an outgoing message.

3.13. assumed_charset

Type: string
Default: (empty)

This variable is a colon-separated list of character encoding schemes for messages without character encoding indication. Header field values and message body content without character encoding indication would be assumed that they are written in one of this list. By default, all the header fields and message body without any charset indication are assumed to be in “us-asciiâ€.

For example, Japanese users might prefer this:

set assumed_charset="iso-2022-jp:euc-jp:shift_jis:utf-8"

However, only the first content is valid for the message body.

3.14. attach_charset

Type: string
Default: (empty)

This variable is a colon-separated list of character encoding schemes for text file attachments. Mutt uses this setting to guess which encoding files being attached are encoded in to convert them to a proper character set given in $send_charset.

If unset, the value of $charset will be used instead. For example, the following configuration would work for Japanese text handling:

set attach_charset="iso-2022-jp:euc-jp:shift_jis:utf-8"

Note: for Japanese users, “iso-2022-*†must be put at the head of the value as shown above if included.

3.15. attach_format

Type: string
Default: “%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] â€

This variable describes the format of the “attachment†menu. The following printf(3)-style sequences are understood:

%C charset
%c requires charset conversion (“n†or “câ€)
%D deleted flag
%d description (if none, falls back to %F)
%e MIME content-transfer-encoding
%F filename in content-disposition header (if none, falls back to %f)
%f filename
%I disposition (“I†for inline, “A†for attachment)
%m major MIME type
%M MIME subtype
%n attachment number
%Q “Qâ€, if MIME part qualifies for attachment counting
%s size (see formatstrings-size)
%t tagged flag
%T graphic tree characters
%u unlink (=to delete) flag
%X number of qualifying MIME parts in this part and its children (please see the “attachments†section for possible speed effects)
%>X right justify the rest of the string and pad with character “Xâ€
%|X pad to the end of the line with character “Xâ€
%*X soft-fill with character “X†as pad

For an explanation of “soft-fillâ€, see the $index_format documentation.

3.16. attach_save_charset_convert

Type: quadoption
Default: ask-yes

When saving received text-type attachments, this quadoption prompts to convert the character set if the encoding of the attachment (or $assumed_charset if none is specified) differs from charset.

3.17. attach_save_dir

Type: path
Default: (empty)

The default directory to save attachments from the “attachment†menu. If it doesn't exist, Mutt will prompt to create the directory before saving.

If the path is invalid (e.g. not a directory, or cannot be chdir'ed to), Mutt will fall back to using the current directory.

3.18. attach_sep

Type: string
Default: “\nâ€

The separator to add between attachments when operating (saving, printing, piping, etc) on a list of tagged attachments.

3.19. attach_split

Type: boolean
Default: yes

If this variable is unset, when operating (saving, printing, piping, etc) on a list of tagged attachments, Mutt will concatenate the attachments and will operate on them as a single attachment. The $attach_sep separator is added after each attachment. When set, Mutt will operate on the attachments one by one.

3.20. attribution

Type: string (localized)
Default: “On %d, %n wrote:â€

This is the string that will precede a message which has been included in a reply. For a full listing of defined printf(3)-like sequences see the section on $index_format.

3.21. attribution_locale

Type: string
Default: (empty)

The locale used by strftime(3) to format dates in the attribution string. Legal values are the strings your system accepts for the locale environment variable $LC_TIME.

This variable is to allow the attribution date format to be customized by recipient or folder using hooks. By default, Mutt will use your locale environment, so there is no need to set this except to override that default.

3.22. auto_subscribe

Type: boolean
Default: no

When set, Mutt assumes the presence of a List-Post header means the recipient is subscribed to the list. Unless the mailing list is in the “unsubscribe†or “unlist†lists, it will be added to the “subscribe†list. Parsing and checking these things slows header reading down, so this option is disabled by default.

3.23. auto_tag

Type: boolean
Default: no

When set, functions in the index menu which affect a message will be applied to all tagged messages (if there are any). When unset, you must first use the <tag-prefix> function (bound to “;†by default) to make the next function apply to all tagged messages.

3.24. autocrypt

Type: boolean
Default: no

When set, enables autocrypt, which provides passive encryption protection with keys exchanged via headers. See “autocryptdoc†for more details. (Autocrypt only)

3.25. autocrypt_acct_format

Type: string
Default: “%4n %-30a %20p %10sâ€

This variable describes the format of the “autocrypt account†menu. The following printf(3)-style sequences are understood

%a email address
%k gpg keyid
%n current entry number
%p prefer-encrypt flag
%s status flag (active/inactive)

(Autocrypt only)

3.26. autocrypt_dir

Type: path
Default: “~/.mutt/autocryptâ€

This variable sets where autocrypt files are stored, including the GPG keyring and sqlite database. See “autocryptdoc†for more details. (Autocrypt only)

3.27. autocrypt_reply

Type: boolean
Default: yes

When set, replying to an autocrypt email automatically enables autocrypt in the reply. You may want to unset this if you're using the same key for autocrypt as normal web-of-trust, so that autocrypt isn't forced on for all encrypted replies. (Autocrypt only)

3.28. autoedit

Type: boolean
Default: no

When set along with $edit_headers, Mutt will skip the initial send-menu (prompting for subject and recipients) and allow you to immediately begin editing the body of your message. The send-menu may still be accessed once you have finished editing the body of your message.

Note: when this option is set, you cannot use send-hooks that depend on the recipients when composing a new (non-reply) message, as the initial list of recipients is empty.

Also see $fast_reply.

3.29. background_edit

Type: boolean
Default: no

When set, Mutt will run $editor in the background during message composition. A landing page will display, waiting for the $editor to exit. The landing page may be exited, allowing perusal of the mailbox, or even for other messages to be composed. Backgrounded sessions may be returned to via the <background-compose-menu> function.

For background editing to work properly, $editor must be set to an editor that does not try to use the Mutt terminal: for example a graphical editor, or a script launching (and waiting for) the editor in another Gnu Screen window.

For more details, see “bgedit†("Background Editing" in the manual).

3.30. background_confirm_quit

Type: boolean
Default: yes

When set, if there are any background edit sessions, you will be prompted to confirm exiting Mutt, in addition to the $quit prompt.

3.31. background_format

Type: string
Default: “%10S %7p %sâ€

This variable describes the format of the “background compose†menu. The following printf(3)-style sequences are understood:

%i parent message id (for replies and forwarded messages)
%n the running number on the menu
%p pid of the $editor process
%r comma separated list of “To:†recipients
%R comma separated list of “Cc:†recipients
%s subject of the message
%S status of the $editor process: running/finished

3.32. beep

Type: boolean
Default: yes

When this variable is set, mutt will beep when an error occurs.

3.33. beep_new

Type: boolean
Default: no

When this variable is set, mutt will beep whenever it prints a message notifying you of new mail. This is independent of the setting of the $beep variable.

3.34. bounce

Type: quadoption
Default: ask-yes

Controls whether you will be asked to confirm bouncing messages. If set to yes you don't get asked if you want to bounce a message. Setting this variable to no is not generally useful, and thus not recommended, because you are unable to bounce messages.

3.35. bounce_delivered

Type: boolean
Default: yes

When this variable is set, mutt will include Delivered-To headers when bouncing messages. Postfix users may wish to unset this variable.

3.36. braille_friendly

Type: boolean
Default: no

When this variable is set, mutt will place the cursor at the beginning of the current line in menus, even when the $arrow_cursor variable is unset, making it easier for blind persons using Braille displays to follow these menus. The option is unset by default because many visual terminals don't permit making the cursor invisible.

3.37. browser_abbreviate_mailboxes

Type: boolean
Default: yes

When this variable is set, mutt will abbreviate mailbox names in the browser mailbox list, using '~' and '=' shortcuts.

The default "alpha" setting of $sort_browser uses locale-based sorting (using strcoll(3)), which ignores some punctuation. This can lead to some situations where the order doesn't make intuitive sense. In those cases, it may be desirable to unset this variable.

3.38. browser_sticky_cursor

Type: boolean
Default: yes

When this variable is set, the browser will attempt to keep the cursor on the same mailbox when performing various functions. These include moving up a directory, toggling between mailboxes and directory listing, creating/renaming a mailbox, toggling subscribed mailboxes, and entering a new mask.

3.39. certificate_file

Type: path
Default: “~/.mutt_certificatesâ€

This variable specifies the file where the certificates you trust are saved. When an unknown certificate is encountered, you are asked if you accept it or not. If you accept it, the certificate can also be saved in this file and further connections are automatically accepted.

You can also manually add CA certificates in this file. Any server certificate that is signed with one of these CA certificates is also automatically accepted.

Example:

set certificate_file=~/.mutt/certificates

(OpenSSL and GnuTLS only)

3.40. change_folder_next

Type: boolean
Default: no

When this variable is set, the <change-folder> function mailbox suggestion will start at the next folder in your “mailboxes†list, instead of starting at the first folder in the list.

3.41. charset

Type: string
Default: (empty)

Character set your terminal uses to display and enter textual data. It is also the fallback for $send_charset.

Upon startup Mutt tries to derive this value from environment variables such as $LC_CTYPE or $LANG.

Note: It should only be set in case Mutt isn't able to determine the character set used correctly.

3.42. check_mbox_size

Type: boolean
Default: no

When this variable is set, mutt will use file size attribute instead of access time when checking for new mail in mbox and mmdf folders.

This variable is unset by default and should only be enabled when new mail detection for these folder types is unreliable or doesn't work.

Note that enabling this variable should happen before any “mailboxes†directives occur in configuration files regarding mbox or mmdf folders because mutt needs to determine the initial new mail status of such a mailbox by performing a fast mailbox scan when it is defined. Afterwards the new mail status is tracked by file size changes.

3.43. check_new

Type: boolean
Default: yes

Note: this option only affects maildir and MH style mailboxes.

When set, Mutt will check for new mail delivered while the mailbox is open. Especially with MH mailboxes, this operation can take quite some time since it involves scanning the directory and checking each file to see if it has already been looked at. If this variable is unset, no check for new mail is performed while the mailbox is open.

3.44. collapse_unread

Type: boolean
Default: yes

When unset, Mutt will not collapse a thread if it contains any unread messages.

3.45. compose_confirm_detach_first

Type: boolean
Default: yes

When set, Mutt will prompt for confirmation when trying to use <detach-file> on the first entry in the compose menu. This is to help prevent irreversible loss of the typed message by accidentally hitting 'D' in the menu.

Note: Mutt only prompts for the first entry. It doesn't keep track of which message is the typed message if the entries are reordered, or if the first entry was already deleted.

3.46. compose_format

Type: string (localized)
Default: “-- Mutt: Compose  [Approx. msg size: %l   Atts: %a]%>-â€

Controls the format of the status line displayed in the “compose†menu. This string is similar to $status_format, but has its own set of printf(3)-like sequences:

%a total number of attachments
%h local hostname
%l approximate size (in bytes) of the current message (see formatstrings-size)
%v Mutt version string

See the text describing the $status_format option for more information on how to set $compose_format.

3.47. config_charset

Type: string
Default: (empty)

When defined, Mutt will recode commands in rc files from this encoding to the current character set as specified by $charset and aliases written to $alias_file from the current character set.

Please note that if setting $charset it must be done before setting $config_charset.

Recoding should be avoided as it may render unconvertable characters as question marks which can lead to undesired side effects (for example in regular expressions).

3.48. confirmappend

Type: boolean
Default: yes

When set, Mutt will prompt for confirmation when appending messages to an existing mailbox.

3.49. confirmcreate

Type: boolean
Default: yes

When set, Mutt will prompt for confirmation when saving messages to a mailbox which does not yet exist before creating it.

3.50. connect_timeout

Type: number
Default: 30

Causes Mutt to timeout a network connection (for IMAP, POP or SMTP) after this many seconds if the connection is not able to be established. A negative value causes Mutt to wait indefinitely for the connection attempt to succeed.

3.51. content_type

Type: string
Default: “text/plainâ€

Sets the default Content-Type for the body of newly composed messages.

3.52. copy

Type: quadoption
Default: yes

This variable controls whether or not copies of your outgoing messages will be saved for later references. Also see $record, $save_name, $force_name and “fcc-hookâ€.

3.53. copy_decode_weed

Type: boolean
Default: no

Controls whether Mutt will weed headers when invoking the <decode-copy> or <decode-save> functions.

3.54. count_alternatives

Type: boolean
Default: no

When set, Mutt will recurse inside multipart/alternatives while performing attachment searching and counting (see attachments).

Traditionally, multipart/alternative parts have simply represented different encodings of the main content of the email. Unfortunately, some mail clients have started to place email attachments inside one of alternatives. Setting this will allow Mutt to find and count matching attachments hidden there, and include them in the index via %X or through ~X pattern matching.

3.55. cursor_overlay

Type: boolean
Default: no

When set, Mutt will overlay the indicator, tree, sidebar_highlight, and sidebar_indicator colors onto the currently selected line. This will allow default colors in those to be overridden, and for attributes to be merged between the layers.

3.56. crypt_autoencrypt

Type: boolean
Default: no

Setting this variable will cause Mutt to always attempt to PGP encrypt outgoing messages. This is probably only useful in connection to the “send-hook†command. It can be overridden by use of the pgp menu, when encryption is not required or signing is requested as well. If $smime_is_default is set, then OpenSSL is used instead to create S/MIME messages and settings can be overridden by use of the smime menu instead. (Crypto only)

3.57. crypt_autopgp

Type: boolean
Default: yes

This variable controls whether or not mutt may automatically enable PGP encryption/signing for messages. See also $crypt_autoencrypt, $crypt_replyencrypt, $crypt_autosign, $crypt_replysign and $smime_is_default.

3.58. crypt_autosign

Type: boolean
Default: no

Setting this variable will cause Mutt to always attempt to cryptographically sign outgoing messages. This can be overridden by use of the pgp menu, when signing is not required or encryption is requested as well. If $smime_is_default is set, then OpenSSL is used instead to create S/MIME messages and settings can be overridden by use of the smime menu instead of the pgp menu. (Crypto only)

3.59. crypt_autosmime

Type: boolean
Default: yes

This variable controls whether or not mutt may automatically enable S/MIME encryption/signing for messages. See also $crypt_autoencrypt, $crypt_replyencrypt, $crypt_autosign, $crypt_replysign and $smime_is_default.

3.60. crypt_confirmhook

Type: boolean
Default: yes

If set, then you will be prompted for confirmation of keys when using the crypt-hook command. If unset, no such confirmation prompt will be presented. This is generally considered unsafe, especially where typos are concerned.

3.61. crypt_opportunistic_encrypt

Type: boolean
Default: no

Setting this variable will cause Mutt to automatically enable and disable encryption, based on whether all message recipient keys can be located by Mutt.

When this option is enabled, Mutt will enable/disable encryption each time the TO, CC, and BCC lists are edited. If $edit_headers is set, Mutt will also do so each time the message is edited.

While this is set, encryption can't be manually enabled/disabled. The pgp or smime menus provide a selection to temporarily disable this option for the current message.

If $crypt_autoencrypt or $crypt_replyencrypt enable encryption for a message, this option will be disabled for that message. It can be manually re-enabled in the pgp or smime menus. (Crypto only)

3.62. crypt_opportunistic_encrypt_strong_keys

Type: boolean
Default: no

When set, this modifies the behavior of $crypt_opportunistic_encrypt to only search for "strong keys", that is, keys with full validity according to the web-of-trust algorithm. A key with marginal or no validity will not enable opportunistic encryption.

For S/MIME, the behavior depends on the backend. Classic S/MIME will filter for certificates with the 't' (trusted) flag in the .index file. The GPGME backend will use the same filters as with OpenPGP, and depends on GPGME's logic for assigning the GPGME_VALIDITY_FULL and GPGME_VALIDITY_ULTIMATE validity flag.

3.63. crypt_protected_headers_read

Type: boolean
Default: yes

When set, Mutt will display protected headers in the pager, and will update the index and header cache with revised headers. Protected headers are stored inside the encrypted or signed part of an an email, to prevent disclosure or tampering. For more information see https://github.com/autocrypt/protected-headers. Currently Mutt only supports the Subject header.

Encrypted messages using protected headers often substitute the exposed Subject header with a dummy value (see $crypt_protected_headers_subject). Mutt will update its concept of the correct subject after the message is opened, i.e. via the <display-message> function. If you reply to a message before opening it, Mutt will end up using the dummy Subject header, so be sure to open such a message first. (Crypto only)

3.64. crypt_protected_headers_save

Type: boolean
Default: no

When $crypt_protected_headers_read is set, and a message with a protected Subject is opened, Mutt will save the updated Subject into the header cache by default. This allows searching/limiting based on the protected Subject header if the mailbox is re-opened, without having to re-open the message each time. However, for mbox/mh mailbox types, or if header caching is not set up, you would need to re-open the message each time the mailbox was reopened before you could see or search/limit on the protected subject again.

When this variable is set, Mutt additionally saves the protected Subject back in the clear-text message headers. This provides better usability, but with the tradeoff of reduced security. The protected Subject header, which may have previously been encrypted, is now stored in clear-text in the message headers. Copying the message elsewhere, via Mutt or external tools, could expose this previously encrypted data. Please make sure you understand the consequences of this before you enable this variable. (Crypto only)

3.65. crypt_protected_headers_subject

Type: string
Default: “...â€

When $crypt_protected_headers_write is set, and the message is marked for encryption, this will be substituted into the Subject field in the message headers. To prevent a subject from being substituted, unset this variable, or set it to the empty string. (Crypto only)

3.66. crypt_protected_headers_write

Type: boolean
Default: no

When set, Mutt will generate protected headers for signed and encrypted emails. Protected headers are stored inside the encrypted or signed part of an an email, to prevent disclosure or tampering. For more information see https://github.com/autocrypt/protected-headers. Currently Mutt only supports the Subject header. (Crypto only)

3.67. crypt_replyencrypt

Type: boolean
Default: yes

If set, automatically PGP or OpenSSL encrypt replies to messages which are encrypted. (Crypto only)

3.68. crypt_replysign

Type: boolean
Default: no

If set, automatically PGP or OpenSSL sign replies to messages which are signed.

Note: this does not work on messages that are encrypted and signed! (Crypto only)

3.69. crypt_replysignencrypted

Type: boolean
Default: no

If set, automatically PGP or OpenSSL sign replies to messages which are encrypted. This makes sense in combination with $crypt_replyencrypt, because it allows you to sign all messages which are automatically encrypted. This works around the problem noted in $crypt_replysign, that mutt is not able to find out whether an encrypted message is also signed. (Crypto only)

3.70. crypt_timestamp

Type: boolean
Default: yes

If set, mutt will include a time stamp in the lines surrounding PGP or S/MIME output, so spoofing such lines is more difficult. If you are using colors to mark these lines, and rely on these, you may unset this setting. (Crypto only)

3.71. crypt_use_gpgme

Type: boolean
Default: no

This variable controls the use of the GPGME-enabled crypto backends. If it is set and Mutt was built with gpgme support, the gpgme code for S/MIME and PGP will be used instead of the classic code. Note that you need to set this option in .muttrc; it won't have any effect when used interactively.

Note that the GPGME backend does not support creating old-style inline (traditional) PGP encrypted or signed messages (see $pgp_autoinline).

3.72. crypt_use_pka

Type: boolean
Default: no

Controls whether mutt uses PKA (see http://www.g10code.de/docs/pka-intro.de.pdf) during signature verification (only supported by the GPGME backend).

3.73. crypt_verify_sig

Type: quadoption
Default: yes

If “yesâ€, always attempt to verify PGP or S/MIME signatures. If “ask-*â€, ask whether or not to verify the signature. If “noâ€, never attempt to verify cryptographic signatures. (Crypto only)

3.74. date_format

Type: string
Default: “!%a, %b %d, %Y at %I:%M:%S%p %Zâ€

This variable controls the format of the date printed by the “%d†sequence in $index_format. This is passed to the strftime(3) function to process the date, see the man page for the proper syntax.

Unless the first character in the string is a bang (“!â€), the month and week day names are expanded according to the locale. If the first character in the string is a bang, the bang is discarded, and the month and week day names in the rest of the string are expanded in the C locale (that is in US English).

3.75. default_hook

Type: string
Default: “~f %s !~P | (~P ~C %s)â€

This variable controls how “message-hookâ€, “reply-hookâ€, “send-hookâ€, “send2-hookâ€, “save-hookâ€, and “fcc-hook†will be interpreted if they are specified with only a simple regexp, instead of a matching pattern. The hooks are expanded when they are declared, so a hook will be interpreted according to the value of this variable at the time the hook is declared.

The default value matches if the message is either from a user matching the regular expression given, or if it is from you (if the from address matches “alternatesâ€) and is to or cc'ed to a user matching the given regular expression.

3.76. delete

Type: quadoption
Default: ask-yes

Controls whether or not messages are really deleted when closing or synchronizing a mailbox. If set to yes, messages marked for deleting will automatically be purged without prompting. If set to no, messages marked for deletion will be kept in the mailbox.

This option is ignored for maildir-style mailboxes when $maildir_trash is set.

3.77. delete_untag

Type: boolean
Default: yes

If this option is set, mutt will untag messages when marking them for deletion. This applies when you either explicitly delete a message, or when you save it to another folder.

3.78. digest_collapse

Type: boolean
Default: yes

If this option is set, mutt's received-attachments menu will not show the subparts of individual messages in a multipart/digest. To see these subparts, press “v†on that menu.

3.79. display_filter

Type: path
Default: (empty)

When set, specifies a command used to filter messages. When a message is viewed it is passed as standard input to $display_filter, and the filtered message is read from the standard output.

3.80. dotlock_program

Type: path
Default: “/usr/local/bin/mutt_dotlockâ€

Contains the path of the mutt_dotlock(1) binary to be used by mutt.

3.81. dsn_notify

Type: string
Default: (empty)

This variable sets the request for when notification is returned. The string consists of a comma separated list (no spaces!) of one or more of the following: never, to never request notification, failure, to request notification on transmission failure, delay, to be notified of message delays, success, to be notified of successful transmission.

Example:

set dsn_notify="failure,delay"

Note: when using $sendmail for delivery, you should not enable this unless you are either using Sendmail 8.8.x or greater or a MTA providing a sendmail(1)-compatible interface supporting the -N option for DSN. For SMTP delivery, DSN support is auto-detected so that it depends on the server whether DSN will be used or not.

3.82. dsn_return

Type: string
Default: (empty)

This variable controls how much of your message is returned in DSN messages. It may be set to either hdrs to return just the message header, or full to return the full message.

Example:

set dsn_return=hdrs

Note: when using $sendmail for delivery, you should not enable this unless you are either using Sendmail 8.8.x or greater or a MTA providing a sendmail(1)-compatible interface supporting the -R option for DSN. For SMTP delivery, DSN support is auto-detected so that it depends on the server whether DSN will be used or not.

3.83. duplicate_threads

Type: boolean
Default: yes

This variable controls whether mutt, when $sort is set to threads, threads messages with the same Message-Id together. If it is set, it will indicate that it thinks they are duplicates of each other with an equals sign in the thread tree.

3.84. edit_headers

Type: boolean
Default: no

This option allows you to edit the header of your outgoing messages along with the body of your message.

Although the compose menu may have localized header labels, the labels passed to your editor will be standard RFC 2822 headers, (e.g. To:, Cc:, Subject:). Headers added in your editor must also be RFC 2822 headers, or one of the pseudo headers listed in “edit-headerâ€. Mutt will not understand localized header labels, just as it would not when parsing an actual email.

Note that changes made to the References: and Date: headers are ignored for interoperability reasons.

3.85. editor

Type: path
Default: (empty)

This variable specifies which editor is used by mutt. It defaults to the value of the $VISUAL, or $EDITOR, environment variable, or to the string “vi†if neither of those are set.

The $editor string may contain a %s escape, which will be replaced by the name of the file to be edited. If the %s escape does not appear in $editor, a space and the name to be edited are appended.

The resulting string is then executed by running

sh -c 'string'

where string is the expansion of $editor described above.

3.86. encode_from

Type: boolean
Default: no

When set, mutt will quoted-printable encode messages when they contain the string “From †(note the trailing space) in the beginning of a line. This is useful to avoid the tampering certain mail delivery and transport agents tend to do with messages (in order to prevent tools from misinterpreting the line as a mbox message separator).

3.87. entropy_file

Type: path
Default: (empty)

The file which includes random data that is used to initialize SSL library functions. (OpenSSL only)

3.88. envelope_from_address

Type: e-mail address
Default: (empty)

Manually sets the envelope sender for outgoing messages. This value is ignored if $use_envelope_from is unset.

3.89. error_history

Type: number
Default: 30

This variable controls the size (in number of strings remembered) of the error messages displayed by mutt. These can be shown with the <error-history> function. The history is cleared each time this variable is set.

3.90. escape

Type: string
Default: “~â€

Escape character to use for functions in the built-in editor.

3.91. fast_reply

Type: boolean
Default: no

When set, the initial prompt for recipients and subject are skipped when replying to messages, and the initial prompt for subject is skipped when forwarding messages.

Note: this variable has no effect when the $autoedit variable is set.

3.92. fcc_attach

Type: quadoption
Default: yes

This variable controls whether or not attachments on outgoing messages are saved along with the main body of your message.

Note: $fcc_before_send forces the default (set) behavior of this option.

3.93. fcc_before_send

Type: boolean
Default: no

When this variable is set, FCCs will occur before sending the message. Before sending, the message cannot be manipulated, so it will be stored the exact same as sent: $fcc_attach and $fcc_clear will be ignored (using their default values).

When unset, the default, FCCs will occur after sending. Variables $fcc_attach and $fcc_clear will be respected, allowing it to be stored without attachments or encryption/signing if desired.

3.94. fcc_clear

Type: boolean
Default: no

When this variable is set, FCCs will be stored unencrypted and unsigned, even when the actual message is encrypted and/or signed.

Note: $fcc_before_send forces the default (unset) behavior of this option. (PGP only)

See also $pgp_self_encrypt, $smime_self_encrypt.

3.95. fcc_delimiter

Type: string
Default: (empty)

When specified, this allows the ability to Fcc to more than one mailbox. The fcc value will be split by this delimiter and Mutt will evaluate each part as a mailbox separately.

See $record, “fcc-hookâ€, and “fcc-save-hookâ€.

3.96. flag_safe

Type: boolean
Default: no

If set, flagged messages cannot be deleted.

3.97. folder

Type: path
Default: “~/Mailâ€

Specifies the default location of your mailboxes. A “+†or “=†at the beginning of a pathname will be expanded to the value of this variable. Note that if you change this variable (from the default) value you need to make sure that the assignment occurs before you use “+†or “=†for any other variables since expansion takes place when handling the “mailboxes†command.

3.98. folder_format

Type: string
Default: “%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %fâ€

This variable allows you to customize the file browser display to your personal taste. This string is similar to $index_format, but has its own set of printf(3)-like sequences:

%C current file number
%d date/time folder was last modified
%D date/time folder was last modified using $date_format.
%f filename (“/†is appended to directory names, “@†to symbolic links and “*†to executable files)
%F file permissions
%g group name (or numeric gid, if missing)
%l number of hard links
%m number of messages in the mailbox *
%n number of unread messages in the mailbox *
%N N if mailbox has new mail, blank otherwise
%s size in bytes (see formatstrings-size)
%t “*†if the file is tagged, blank otherwise
%u owner name (or numeric uid, if missing)
%>X right justify the rest of the string and pad with character “Xâ€
%|X pad to the end of the line with character “Xâ€
%*X soft-fill with character “X†as pad

For an explanation of “soft-fillâ€, see the $index_format documentation.

* = can be optionally printed if nonzero

%m, %n, and %N only work for monitored mailboxes. %m requires $mail_check_stats to be set. %n requires $mail_check_stats to be set (except for IMAP mailboxes).

3.99. followup_to

Type: boolean
Default: yes

Controls whether or not the “Mail-Followup-To:†header field is generated when sending mail. When set, Mutt will generate this field when you are replying to a known mailing list, specified with the “subscribe†or “lists†commands.

This field has two purposes. First, preventing you from receiving duplicate copies of replies to messages which you send to mailing lists, and second, ensuring that you do get a reply separately for any messages sent to known lists to which you are not subscribed.

The header will contain only the list's address for subscribed lists, and both the list address and your own email address for unsubscribed lists. Without this header, a group reply to your message sent to a subscribed list will be sent to both the list and your address, resulting in two copies of the same email for you.

3.100. force_name

Type: boolean
Default: no

This variable is similar to $save_name, except that Mutt will store a copy of your outgoing message by the username of the address you are sending to even if that mailbox does not exist.

Also see the $record variable.

3.101. forward_attachments

Type: quadoption
Default: ask-yes

When forwarding inline (i.e. $mime_forward unset or answered with “no†and $forward_decode set), attachments which cannot be decoded in a reasonable manner will be attached to the newly composed message if this quadoption is set or answered with “yesâ€.

3.102. forward_attribution_intro

Type: string (localized)
Default: “----- Forwarded message from %f -----â€

This is the string that will precede a message which has been forwarded in the main body of a message (when $mime_forward is unset). For a full listing of defined printf(3)-like sequences see the section on $index_format. See also $attribution_locale.

3.103. forward_attribution_trailer

Type: string (localized)
Default: “----- End forwarded message -----â€

This is the string that will follow a message which has been forwarded in the main body of a message (when $mime_forward is unset). For a full listing of defined printf(3)-like sequences see the section on $index_format. See also $attribution_locale.

3.104. forward_decode

Type: boolean
Default: yes

Controls the decoding of complex MIME messages into text/plain when forwarding a message. The message header is also RFC2047 decoded. This variable is only used, if $mime_forward is unset, otherwise $mime_forward_decode is used instead.

3.105. forward_decrypt

Type: quadoption
Default: yes

This quadoption controls the handling of encrypted messages when forwarding or attaching a message. When set to or answered “yesâ€, the outer layer of encryption is stripped off.

This variable is used if $mime_forward is set and $mime_forward_decode is unset. It is also used when attaching a message via <attach-message> in the compose menu. (PGP only)

3.106. forward_edit

Type: quadoption
Default: yes

This quadoption controls whether or not the user is automatically placed in the editor when forwarding messages. For those who always want to forward with no modification, use a setting of “noâ€.

3.107. forward_format

Type: string
Default: “[%a: %s]â€

This variable controls the default subject when forwarding a message. It uses the same format sequences as the $index_format variable.

3.108. forward_quote

Type: boolean
Default: no

When set, forwarded messages included in the main body of the message (when $mime_forward is unset) will be quoted using $indent_string.

3.109. from

Type: e-mail address
Default: (empty)

When set, this variable contains a default from address. It can be overridden using “my_hdr†(including from a “send-hookâ€) and $reverse_name. This variable is ignored if $use_from is unset.

This setting defaults to the contents of the environment variable $EMAIL.

3.110. gecos_mask

Type: regular expression
Default: “^[^,]*â€

A regular expression used by mutt to parse the GECOS field of a password entry when expanding the alias. The default value will return the string up to the first “,†encountered. If the GECOS field contains a string like “lastname, firstname†then you should set it to “.*â€.

This can be useful if you see the following behavior: you address an e-mail to user ID “stevef†whose full name is “Steve Franklinâ€. If mutt expands “stevef†to “"Franklin" stevef@foo.bar†then you should set the $gecos_mask to a regular expression that will match the whole name so mutt will expand “Franklin†to “Franklin, Steveâ€.

3.111. hdrs

Type: boolean
Default: yes

When unset, the header fields normally added by the “my_hdr†command are not created. This variable must be unset before composing a new message or replying in order to take effect. If set, the user defined header fields are added to every new message.

3.112. header

Type: boolean
Default: no

When set, this variable causes Mutt to include the header of the message you are replying to into the edit buffer. The $weed setting applies.

3.113. header_cache

Type: path
Default: (empty)

This variable points to the header cache database. If pointing to a directory Mutt will contain a header cache database file per folder, if pointing to a file that file will be a single global header cache. By default it is unset so no header caching will be used. If pointing to a directory, it must be created in advance.

Header caching can greatly improve speed when opening POP, IMAP MH or Maildir folders, see “caching†for details.

3.114. header_cache_compress

Type: boolean
Default: yes

When mutt is compiled with qdbm, tokyocabinet, or kyotocabinet as header cache backend, this option determines whether the database will be compressed. Compression results in database files roughly being one fifth of the usual diskspace, but the decompression can result in a slower opening of cached folder(s) which in general is still much faster than opening non header cached folders.

3.115. header_cache_pagesize

Type: number (long)
Default: 16384

When mutt is compiled with either gdbm or bdb4 as the header cache backend, this option changes the database page size. Too large or too small values can waste space, memory, or CPU time. The default should be more or less optimal for most use cases.

3.116. header_color_partial

Type: boolean
Default: no

When set, color header regexps behave like color body regexps: color is applied to the exact text matched by the regexp. When unset, color is applied to the entire header.

One use of this option might be to apply color to just the header labels.

See “color†for more details.

3.117. help

Type: boolean
Default: yes

When set, help lines describing the bindings for the major functions provided by each menu are displayed on the first line of the screen.

Note: The binding will not be displayed correctly if the function is bound to a sequence rather than a single keystroke. Also, the help line may not be updated if a binding is changed while Mutt is running. Since this variable is primarily aimed at new users, neither of these should present a major problem.

3.118. hidden_host

Type: boolean
Default: no

When set, mutt will skip the host name part of $hostname variable when adding the domain part to addresses. This variable does not affect the generation of Message-IDs, and it will not lead to the cut-off of first-level domains.

3.119. hide_limited

Type: boolean
Default: no

When set, mutt will not show the presence of messages that are hidden by limiting, in the thread tree.

3.120. hide_missing

Type: boolean
Default: yes

When set, mutt will not show the presence of missing messages in the thread tree.

3.121. hide_thread_subject

Type: boolean
Default: yes

When set, mutt will not show the subject of messages in the thread tree that have the same subject as their parent or closest previously displayed sibling.

3.122. hide_top_limited

Type: boolean
Default: no

When set, mutt will not show the presence of messages that are hidden by limiting, at the top of threads in the thread tree. Note that when $hide_limited is set, this option will have no effect.

3.123. hide_top_missing

Type: boolean
Default: yes

When set, mutt will not show the presence of missing messages at the top of threads in the thread tree. Note that when $hide_missing is set, this option will have no effect.

3.124. history

Type: number
Default: 10

This variable controls the size (in number of strings remembered) of the string history buffer per category. The buffer is cleared each time the variable is set.

3.125. history_file

Type: path
Default: “~/.mutthistoryâ€

The file in which Mutt will save its history.

Also see $save_history.

3.126. history_remove_dups

Type: boolean
Default: no

When set, all of the string history will be scanned for duplicates when a new entry is added. Duplicate entries in the $history_file will also be removed when it is periodically compacted.

3.127. honor_disposition

Type: boolean
Default: no

When set, Mutt will not display attachments with a disposition of “attachment†inline even if it could render the part to plain text. These MIME parts can only be viewed from the attachment menu.

If unset, Mutt will render all MIME parts it can properly transform to plain text.

3.128. honor_followup_to

Type: quadoption
Default: yes

This variable controls whether or not a Mail-Followup-To header is honored when group-replying to a message.

3.129. hostname

Type: string
Default: (empty)

Specifies the fully-qualified hostname of the system mutt is running on containing the host's name and the DNS domain it belongs to. It is used as the domain part (after “@â€) for local email addresses as well as Message-Id headers.

Its value is determined at startup as follows: the node's hostname is first determined by the uname(3) function. The domain is then looked up using the gethostname(2) and getaddrinfo(3) functions. If those calls are unable to determine the domain, the full value returned by uname is used. Optionally, Mutt can be compiled with a fixed domain name in which case a detected one is not used.

Starting in Mutt 2.0, the operations described in the previous paragraph are performed after the muttrc is processed, instead of beforehand. This way, if the DNS operations are creating delays at startup, you can avoid those by manually setting the value in your muttrc.

Also see $use_domain and $hidden_host.

3.130. idn_decode

Type: boolean
Default: yes

When set, Mutt will show you international domain names decoded. Note: You can use IDNs for addresses even if this is unset. This variable only affects decoding. (IDN only)

3.131. idn_encode

Type: boolean
Default: yes

When set, Mutt will encode international domain names using IDN. Unset this if your SMTP server can handle newer (RFC 6531) UTF-8 encoded domains. (IDN only)

3.132. ignore_linear_white_space

Type: boolean
Default: no

This option replaces linear-white-space between encoded-word and text to a single space to prevent the display of MIME-encoded “Subject:†field from being divided into multiple lines.

3.133. ignore_list_reply_to

Type: boolean
Default: no

Affects the behavior of the <reply> function when replying to messages from mailing lists (as defined by the “subscribe†or “lists†commands). When set, if the “Reply-To:†field is set to the same value as the “To:†field, Mutt assumes that the “Reply-To:†field was set by the mailing list to automate responses to the list, and will ignore this field. To direct a response to the mailing list when this option is set, use the <list-reply> function; <group-reply> will reply to both the sender and the list.

3.134. imap_authenticators

Type: string
Default: (empty)

This is a colon-delimited list of authentication methods mutt may attempt to use to log in to an IMAP server, in the order mutt should try them. Authentication methods are either “login†or the right side of an IMAP “AUTH=xxx†capability string, e.g. “digest-md5â€, “gssapi†or “cram-md5â€. This option is case-insensitive. If it's unset (the default) mutt will try all available methods, in order from most-secure to least-secure.

Example:

set imap_authenticators="gssapi:cram-md5:login"

Note: Mutt will only fall back to other authentication methods if the previous methods are unavailable. If a method is available but authentication fails, mutt will not connect to the IMAP server.

3.135. imap_check_subscribed

Type: boolean
Default: no

When set, mutt will fetch the set of subscribed folders from your server on connection, and add them to the set of mailboxes it polls for new mail just as if you had issued individual “mailboxes†commands.

3.136. imap_condstore

Type: boolean
Default: no

When set, mutt will use the CONDSTORE extension (RFC 7162) if advertised by the server. Mutt's current implementation is basic, used only for initial message fetching and flag updates.

For some IMAP servers, enabling this will slightly speed up downloading initial messages. Unfortunately, Gmail is not one those, and displays worse performance when enabled. Your mileage may vary.

3.137. imap_deflate

Type: boolean
Default: no

When set, mutt will use the COMPRESS=DEFLATE extension (RFC 4978) if advertised by the server.

In general a good compression efficiency can be achieved, which speeds up reading large mailboxes also on fairly good connections.

3.138. imap_delim_chars

Type: string
Default: “/.â€

This contains the list of characters which you would like to treat as folder separators for displaying IMAP paths. In particular it helps in using the “=†shortcut for your folder variable.

3.139. imap_fetch_chunk_size

Type: number (long)
Default: 0

When set to a value greater than 0, new headers will be downloaded in groups of this many headers per request. If you have a very large mailbox, this might prevent a timeout and disconnect when opening the mailbox, by sending a FETCH per set of this many headers, instead of a single FETCH for all new headers.

3.140. imap_headers

Type: string
Default: (empty)

Mutt requests these header fields in addition to the default headers (“Date:â€, “From:â€, “Sender:â€, “Subject:â€, “To:â€, “Cc:â€, “Message-Id:â€, “References:â€, “Content-Type:â€, “Content-Description:â€, “In-Reply-To:â€, “Reply-To:â€, “Lines:â€, “List-Post:â€, “X-Label:â€) from IMAP servers before displaying the index menu. You may want to add more headers for spam detection.

Note: This is a space separated list, items should be uppercase and not contain the colon, e.g. “X-BOGOSITY X-SPAM-STATUS†for the “X-Bogosity:†and “X-Spam-Status:†header fields.

3.141. imap_idle

Type: boolean
Default: no

When set, mutt will attempt to use the IMAP IDLE extension to check for new mail in the current mailbox. Some servers (dovecot was the inspiration for this option) react badly to mutt's implementation. If your connection seems to freeze up periodically, try unsetting this.

3.142. imap_keepalive

Type: number
Default: 300

This variable specifies the maximum amount of time in seconds that mutt will wait before polling open IMAP connections, to prevent the server from closing them before mutt has finished with them. The default is well within the RFC-specified minimum amount of time (30 minutes) before a server is allowed to do this, but in practice the RFC does get violated every now and then. Reduce this number if you find yourself getting disconnected from your IMAP server due to inactivity.

3.143. imap_list_subscribed

Type: boolean
Default: no

This variable configures whether IMAP folder browsing will look for only subscribed folders or all folders. This can be toggled in the IMAP browser with the <toggle-subscribed> function.

3.144. imap_login

Type: string
Default: (empty)

Your login name on the IMAP server.

This variable defaults to the value of $imap_user.

3.145. imap_oauth_refresh_command

Type: string
Default: (empty)

The command to run to generate an OAUTH refresh token for authorizing your connection to your IMAP server. This command will be run on every connection attempt that uses the OAUTHBEARER authentication mechanism. See “oauth†for details.

3.146. imap_pass

Type: string
Default: (empty)

Specifies the password for your IMAP account. If unset, Mutt will prompt you for your password when you invoke the <imap-fetch-mail> function or try to open an IMAP folder.

Warning: you should only use this option when you are on a fairly secure machine, because the superuser can read your muttrc even if you are the only one who can read the file.

3.147. imap_passive

Type: boolean
Default: yes

When set, mutt will not open new IMAP connections to check for new mail. Mutt will only check for new mail over existing IMAP connections. This is useful if you don't want to be prompted for user/password pairs on mutt invocation, or if opening the connection is slow.

3.148. imap_peek

Type: boolean
Default: yes

When set, mutt will avoid implicitly marking your mail as read whenever you fetch a message from the server. This is generally a good thing, but can make closing an IMAP folder somewhat slower. This option exists to appease speed freaks.

3.149. imap_pipeline_depth

Type: number
Default: 15

Controls the number of IMAP commands that may be queued up before they are sent to the server. A deeper pipeline reduces the amount of time mutt must wait for the server, and can make IMAP servers feel much more responsive. But not all servers correctly handle pipelined commands, so if you have problems you might want to try setting this variable to 0.

Note: Changes to this variable have no effect on open connections.

3.150. imap_poll_timeout

Type: number
Default: 15

This variable specifies the maximum amount of time in seconds that mutt will wait for a response when polling IMAP connections for new mail, before timing out and closing the connection. Set to 0 to disable timing out.

3.151. imap_qresync

Type: boolean
Default: no

When set, mutt will use the QRESYNC extension (RFC 7162) if advertised by the server. Mutt's current implementation is basic, used only for initial message fetching and flag updates.

Note: this feature is currently experimental. If you experience strange behavior, such as duplicate or missing messages please file a bug report to let us know.

3.152. imap_reconnect_sleep

Type: number
Default: 5

When mutt fails to reconnect to a lost IMAP server connection, it will sleep this many seconds before trying again.

3.153. imap_reconnect_tries

Type: number
Default: 3

When mutt loses its connection with the IMAP server, it will try to reconnect this many times before giving up and closing the connection.

3.154. imap_servernoise

Type: boolean
Default: yes

When set, mutt will display warning messages from the IMAP server as error messages. Since these messages are often harmless, or generated due to configuration problems on the server which are out of the users' hands, you may wish to suppress them at some point.

3.155. imap_user

Type: string
Default: (empty)

The name of the user whose mail you intend to access on the IMAP server.

This variable defaults to your user name on the local machine.

3.156. implicit_autoview

Type: boolean
Default: no

If set to “yesâ€, mutt will look for a mailcap entry with the “copiousoutput†flag set for every MIME attachment it doesn't have an internal viewer defined for. If such an entry is found, mutt will use the viewer defined in that entry to convert the body part to text form.

3.157. include

Type: quadoption
Default: ask-yes

Controls whether or not a copy of the message(s) you are replying to is included in your reply.

3.158. include_encrypted

Type: boolean
Default: no

Controls whether or not Mutt includes separately encrypted attachment contents when replying.

This variable was added to prevent accidental exposure of encrypted contents when replying to an attacker. If a previously encrypted message were attached by the attacker, they could trick an unwary recipient into decrypting and including the message in their reply.

3.159. include_onlyfirst

Type: boolean
Default: no

Controls whether or not Mutt includes only the first attachment of the message you are replying.

3.160. indent_string

Type: string
Default: “> â€

Specifies the string to prepend to each line of text quoted in a message to which you are replying. You are strongly encouraged not to change this value, as it tends to agitate the more fanatical netizens.

The value of this option is ignored if $text_flowed is set, because the quoting mechanism is strictly defined for format=flowed.

This option is a format string, please see the description of $index_format for supported printf(3)-style sequences.

3.161. index_format

Type: string
Default: “%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %sâ€

This variable allows you to customize the message index display to your personal taste.

“Format strings†are similar to the strings used in the C function printf(3) to format output (see the man page for more details). For an explanation of the %? construct, see the $status_format description. The following sequences are defined in Mutt:

%a address of the author
%A reply-to address (if present; otherwise: address of author)
%b filename of the original message folder (think mailbox)
%B the list to which the letter was sent, or else the folder name (%b).
%c number of characters (bytes) in the message (see formatstrings-size)
%C current message number
%d date and time of the message in the format specified by $date_format converted to sender's time zone
%D date and time of the message in the format specified by $date_format converted to the local time zone
%e current message number in thread
%E number of messages in current thread
%f sender (address + real name), either From: or Return-Path:
%F author name, or recipient name if the message is from you
%H spam attribute(s) of this message
%i message-id of the current message
%l number of lines in the unprocessed message (may not work with maildir, mh, and IMAP folders)
%L If an address in the “To:†or “Cc:†header field matches an address defined by the users “subscribe†command, this displays "To <list-name>", otherwise the same as %F.
%m total number of message in the mailbox
%M number of hidden messages if the thread is collapsed.
%N message score
%n author's real name (or address if missing)
%O original save folder where mutt would formerly have stashed the message: list name or recipient name if not sent to a list
%P progress indicator for the built-in pager (how much of the file has been displayed)
%r comma separated list of “To:†recipients
%R comma separated list of “Cc:†recipients
%s subject of the message
%S single character status of the message (“Nâ€/“Oâ€/“Dâ€/“dâ€/“!â€/“râ€/“*â€)
%t “To:†field (recipients)
%T the appropriate character from the $to_chars string
%u user (login) name of the author
%v first name of the author, or the recipient if the message is from you
%X number of attachments (please see the “attachments†section for possible speed effects)
%y “X-Label:†field, if present
%Y “X-Label:†field, if present, and (1) not at part of a thread tree, (2) at the top of a thread, or (3) “X-Label:†is different from preceding message's “X-Label:â€.
%Z a three character set of message status flags. the first character is new/read/replied flags (“nâ€/“oâ€/“râ€/“Oâ€/“Nâ€). the second is deleted or encryption flags (“Dâ€/“dâ€/“Sâ€/“Pâ€/“sâ€/“Kâ€). the third is either tagged/flagged (“*â€/“!â€), or one of the characters listed in $to_chars.
%@name@ insert and evaluate format-string from the matching “index-format-hook†command
%{fmt} the date and time of the message is converted to sender's time zone, and “fmt†is expanded by the library function strftime(3); a leading bang disables locales
%[fmt] the date and time of the message is converted to the local time zone, and “fmt†is expanded by the library function strftime(3); a leading bang disables locales
%(fmt) the local date and time when the message was received. “fmt†is expanded by the library function strftime(3); a leading bang disables locales
%<fmt> the current local time. “fmt†is expanded by the library function strftime(3); a leading bang disables locales.
%>X right justify the rest of the string and pad with character “Xâ€
%|X pad to the end of the line with character “Xâ€
%*X soft-fill with character “X†as pad

Note that for mbox/mmdf, “%l†applies to the unprocessed message, and for maildir/mh, the value comes from the “Lines:†header field when present (the meaning is normally the same). Thus the value depends on the encodings used in the different parts of the message and has little meaning in practice.

“Soft-fill†deserves some explanation: Normal right-justification will print everything to the left of the “%>â€, displaying padding and whatever lies to the right only if there's room. By contrast, soft-fill gives priority to the right-hand side, guaranteeing space to display it and showing padding only if there's still room. If necessary, soft-fill will eat text leftwards to make room for rightward text.

Note that these expandos are supported in “save-hookâ€, “fcc-hookâ€, “fcc-save-hookâ€, and “index-format-hookâ€.

They are also supported in the configuration variables $attribution, $forward_attribution_intro, $forward_attribution_trailer, $forward_format, $indent_string, $message_format, $pager_format, and $post_indent_string.

3.162. ispell

Type: path
Default: “ispellâ€

How to invoke ispell (GNU's spell-checking software).

3.163. keep_flagged

Type: boolean
Default: no

If set, read messages marked as flagged will not be moved from your spool mailbox to your $mbox mailbox, or as a result of a “mbox-hook†command.

3.164. local_date_header

Type: boolean
Default: yes

If set, the date in the Date header of emails that you send will be in your local timezone. If unset a UTC date will be used instead to avoid leaking information about your current location.

3.165. mail_check

Type: number
Default: 5

This variable configures how often (in seconds) mutt should look for new mail. Also see the $timeout variable.

3.166. mail_check_recent

Type: boolean
Default: yes

When set, Mutt will only notify you about new mail that has been received since the last time you opened the mailbox. When unset, Mutt will notify you if any new mail exists in the mailbox, regardless of whether you have visited it recently.

3.167. mail_check_stats

Type: boolean
Default: no

When set, mutt will periodically calculate message statistics of a mailbox while polling for new mail. It will check for unread, flagged, and total message counts. (Note: IMAP mailboxes only support unread and total counts).

Because this operation is more performance intensive, it defaults to unset, and has a separate option, $mail_check_stats_interval, to control how often to update these counts.

Message statistics can also be explicitly calculated by invoking the <check-stats> function.

3.168. mail_check_stats_interval

Type: number
Default: 60

When $mail_check_stats is set, this variable configures how often (in seconds) mutt will update message counts.

3.169. mailcap_path

Type: string
Default: (empty)

This variable specifies which files to consult when attempting to display MIME bodies not directly supported by Mutt. The default value is generated during startup: see the “mailcap†section of the manual.

3.170. mailcap_sanitize

Type: boolean
Default: yes

If set, mutt will restrict possible characters in mailcap % expandos to a well-defined set of safe characters. This is the safe setting, but we are not sure it doesn't break some more advanced MIME stuff.

DON'T CHANGE THIS SETTING UNLESS YOU ARE REALLY SURE WHAT YOU ARE DOING!

3.171. maildir_header_cache_verify

Type: boolean
Default: yes

Check for Maildir unaware programs other than mutt having modified maildir files when the header cache is in use. This incurs one stat(2) per message every time the folder is opened (which can be very slow for NFS folders).

3.172. maildir_trash

Type: boolean
Default: no

If set, messages marked as deleted will be saved with the maildir trashed flag instead of unlinked. Note: this only applies to maildir-style mailboxes. Setting it will have no effect on other mailbox types.

3.173. maildir_check_cur

Type: boolean
Default: no

If set, mutt will poll both the new and cur directories of a maildir folder for new messages. This might be useful if other programs interacting with the folder (e.g. dovecot) are moving new messages to the cur directory. Note that setting this option may slow down polling for new messages in large folders, since mutt has to scan all cur messages.

3.174. mark_macro_prefix

Type: string
Default: “'â€

Prefix for macros created using mark-message. A new macro automatically generated with <mark-message>a will be composed from this prefix and the letter a.

3.175. mark_old

Type: boolean
Default: yes

Controls whether or not mutt marks new unread messages as old if you exit a mailbox without reading them. With this option set, the next time you start mutt, the messages will show up with an “O†next to them in the index menu, indicating that they are old.

3.176. markers

Type: boolean
Default: yes

Controls the display of wrapped lines in the internal pager. If set, a “+†marker is displayed at the beginning of wrapped lines.

Also see the $smart_wrap variable.

3.177. mask

Type: regular expression
Default: “!^\\.[^.]â€

A regular expression used in the file browser, optionally preceded by the not operator “!â€. Only files whose names match this mask will be shown. The match is always case-sensitive.

3.178. mbox

Type: path
Default: “~/mboxâ€

This specifies the folder into which read mail in your $spoolfile folder will be appended.

Also see the $move variable.

3.179. mbox_type

Type: folder magic
Default: mbox

The default mailbox type used when creating new folders. May be any of “mboxâ€, “MMDFâ€, “MH†and “Maildirâ€. This is overridden by the -m command-line option.

3.180. menu_context

Type: number
Default: 0

This variable controls the number of lines of context that are given when scrolling through menus. (Similar to $pager_context.)

3.181. menu_move_off

Type: boolean
Default: yes

When unset, the bottom entry of menus will never scroll up past the bottom of the screen, unless there are less entries than lines. When set, the bottom entry may move off the bottom.

3.182. menu_scroll

Type: boolean
Default: no

When set, menus will be scrolled up or down one line when you attempt to move across a screen boundary. If unset, the screen is cleared and the next or previous page of the menu is displayed (useful for slow links to avoid many redraws).

3.183. message_cache_clean

Type: boolean
Default: no

If set, mutt will clean out obsolete entries from the message cache when the mailbox is synchronized. You probably only want to set it every once in a while, since it can be a little slow (especially for large folders).

3.184. message_cachedir

Type: path
Default: (empty)

Set this to a directory and mutt will cache copies of messages from your IMAP and POP servers here. You are free to remove entries at any time.

When setting this variable to a directory, mutt needs to fetch every remote message only once and can perform regular expression searches as fast as for local folders.

Also see the $message_cache_clean variable.

3.185. message_format

Type: string
Default: “%sâ€

This is the string displayed in the “attachment†menu for attachments of type message/rfc822. For a full listing of defined printf(3)-like sequences see the section on $index_format.

3.186. message_id_format

Type: string
Default: “<%z@%f>â€

This variable describes the format of the Message-ID generated when sending messages. Mutt 2.0 introduced a more compact format, but this variable allows the ability to choose your own format. The value may end in “|†to invoke an external filter. See formatstrings-filters.

Please note that the Message-ID value follows a strict syntax, and you are responsible for ensuring correctness if you change this from the default. In particular, the value must follow the syntax in RFC 5322: “"<" id-left "@" id-right ">"â€. No spaces are allowed, and id-left should follow the dot-atom-text syntax in the RFC. The id-right should generally be left at %f.

The old Message-ID format can be used by setting this to: “<%Y%02m%02d%02H%02M%02S.G%c%p@%f>â€

The following printf(3)-style sequences are understood:

%c step counter looping from “A†to “Zâ€
%d current day of the month (GMT)
%f $hostname
%H current hour using a 24-hour clock (GMT)
%m current month number (GMT)
%M current minute of the hour (GMT)
%p pid of the running mutt process
%r 3 bytes of pseudorandom data encoded in Base64
%S current second of the minute (GMT)
%x 1 byte of pseudorandom data hex encoded (example: '1b')
%Y current year using 4 digits (GMT)
%z 4 byte timestamp + 8 bytes of pseudorandom data encoded in Base64

3.187. meta_key

Type: boolean
Default: no

If set, forces Mutt to interpret keystrokes with the high bit (bit 8) set as if the user had pressed the Esc key and whatever key remains after having the high bit removed. For example, if the key pressed has an ASCII value of 0xf8, then this is treated as if the user had pressed Esc then “xâ€. This is because the result of removing the high bit from 0xf8 is 0x78, which is the ASCII character “xâ€.

3.188. metoo

Type: boolean
Default: no

If unset, Mutt will remove your address (see the “alternates†command) from the list of recipients when replying to a message.

3.189. mh_purge

Type: boolean
Default: no

When unset, mutt will mimic mh's behavior and rename deleted messages to ,<old file name> in mh folders instead of really deleting them. This leaves the message on disk but makes programs reading the folder ignore it. If the variable is set, the message files will simply be deleted.

This option is similar to $maildir_trash for Maildir folders.

3.190. mh_seq_flagged

Type: string
Default: “flaggedâ€

The name of the MH sequence used for flagged messages.

3.191. mh_seq_replied

Type: string
Default: “repliedâ€

The name of the MH sequence used to tag replied messages.

3.192. mh_seq_unseen

Type: string
Default: “unseenâ€

The name of the MH sequence used for unseen messages.

3.193. mime_forward

Type: quadoption
Default: no

When set, the message you are forwarding will be attached as a separate message/rfc822 MIME part instead of included in the main body of the message. This is useful for forwarding MIME messages so the receiver can properly view the message as it was delivered to you. If you like to switch between MIME and not MIME from mail to mail, set this variable to “ask-no†or “ask-yesâ€.

Also see $forward_decode and $mime_forward_decode.

3.194. mime_forward_decode

Type: boolean
Default: no

Controls the decoding of complex MIME messages into text/plain when forwarding a message while $mime_forward is set. Otherwise $forward_decode is used instead.

3.195. mime_forward_rest

Type: quadoption
Default: yes

When forwarding multiple attachments of a MIME message from the attachment menu, attachments which cannot be decoded in a reasonable manner will be attached to the newly composed message if this option is set.

3.196. mime_type_query_command

Type: string
Default: (empty)

This specifies a command to run, to determine the mime type of a new attachment when composing a message. Unless $mime_type_query_first is set, this will only be run if the attachment's extension is not found in the mime.types file.

The string may contain a “%sâ€, which will be substituted with the attachment filename. Mutt will add quotes around the string substituted for “%s†automatically according to shell quoting rules, so you should avoid adding your own. If no “%s†is found in the string, Mutt will append the attachment filename to the end of the string.

The command should output a single line containing the attachment's mime type.

Suggested values are “xdg-mime query filetype†or “file -biâ€.

3.197. mime_type_query_first

Type: boolean
Default: no

When set, the $mime_type_query_command will be run before the mime.types lookup.

3.198. mix_entry_format

Type: string
Default: “%4n %c %-16s %aâ€

This variable describes the format of a remailer line on the mixmaster chain selection screen. The following printf(3)-like sequences are supported:

%n The running number on the menu.
%c Remailer capabilities.
%s The remailer's short name.
%a The remailer's e-mail address.

(Mixmaster only)

3.199. mixmaster

Type: path
Default: “mixmasterâ€

This variable contains the path to the Mixmaster binary on your system. It is used with various sets of parameters to gather the list of known remailers, and to finally send a message through the mixmaster chain. (Mixmaster only)

3.200. move

Type: quadoption
Default: no

Controls whether or not Mutt will move read messages from your spool mailbox to your $mbox mailbox, or as a result of a “mbox-hook†command.

3.201. muttlisp_inline_eval

Type: boolean
Default: no

If set, Mutt will evaluate bare parenthesis arguments to commands as MuttLisp expressions.

3.202. narrow_tree

Type: boolean
Default: no

This variable, when set, makes the thread tree narrower, allowing deeper threads to fit on the screen.

3.203. net_inc

Type: number
Default: 10

Operations that expect to transfer a large amount of data over the network will update their progress every $net_inc kilobytes. If set to 0, no progress messages will be displayed.

See also $read_inc, $write_inc and $net_inc.

3.204. new_mail_command

Type: path
Default: (empty)

If set, Mutt will call this command after a new message is received. See the $status_format documentation for the values that can be formatted into this command.

3.205. pager

Type: path
Default: “builtinâ€

This variable specifies which pager you would like to use to view messages. The value “builtin†means to use the built-in pager, otherwise this variable should specify the pathname of the external pager you would like to use.

The string may contain a “%sâ€, which will be substituted with the generated message filename. Mutt will add quotes around the string substituted for “%s†automatically according to shell quoting rules, so you should avoid adding your own. If no “%s†is found in the string, Mutt will append the message filename to the end of the string.

Using an external pager may have some disadvantages: Additional keystrokes are necessary because you can't call mutt functions directly from the pager, and screen resizes cause lines longer than the screen width to be badly formatted in the help menu.

When using an external pager, also see $prompt_after which defaults set.

3.206. pager_context

Type: number
Default: 0

This variable controls the number of lines of context that are given when displaying the next or previous page in the internal pager. By default, Mutt will display the line after the last one on the screen at the top of the next page (0 lines of context).

This variable also specifies the amount of context given for search results. If positive, this many lines will be given before a match, if 0, the match will be top-aligned.

3.207. pager_format

Type: string
Default: “-%Z- %C/%m: %-20.20n   %s%*  -- (%P)â€

This variable controls the format of the one-line message “status†displayed before each message in either the internal or an external pager. The valid sequences are listed in the $index_format section.

3.208. pager_index_lines

Type: number
Default: 0

Determines the number of lines of a mini-index which is shown when in the pager. The current message, unless near the top or bottom of the folder, will be roughly one third of the way down this mini-index, giving the reader the context of a few messages before and after the message. This is useful, for example, to determine how many messages remain to be read in the current thread. One of the lines is reserved for the status bar from the index, so a setting of 6 will only show 5 lines of the actual index. A value of 0 results in no index being shown. If the number of messages in the current folder is less than $pager_index_lines, then the index will only use as many lines as it needs.

3.209. pager_skip_quoted_context

Type: number
Default: 0

Determines the number of lines of context to show before the unquoted text when using <skip-quoted>. When set to a positive number at most that many lines of the previous quote are displayed. If the previous quote is shorter the whole quote is displayed.

3.210. pager_stop

Type: boolean
Default: no

When set, the internal-pager will not move to the next message when you are at the end of a message and invoke the <next-page> function.

3.211. pattern_format

Type: string
Default: “%2n %-15e  %dâ€

This variable describes the format of the “pattern completion†menu. The following printf(3)-style sequences are understood:

%d pattern description
%e pattern expression
%n index number

3.212. pgp_auto_decode

Type: boolean
Default: no

If set, mutt will automatically attempt to decrypt traditional PGP messages whenever the user performs an operation which ordinarily would result in the contents of the message being operated on. For example, if the user displays a pgp-traditional message which has not been manually checked with the <check-traditional-pgp> function, mutt will automatically check the message for traditional pgp.

3.213. pgp_autoinline

Type: boolean
Default: no

This option controls whether Mutt generates old-style inline (traditional) PGP encrypted or signed messages under certain circumstances. This can be overridden by use of the pgp menu, when inline is not required. The GPGME backend does not support this option.

Note that Mutt might automatically use PGP/MIME for messages which consist of more than a single MIME part. Mutt can be configured to ask before sending PGP/MIME messages when inline (traditional) would not work.

Also see the $pgp_mime_auto variable.

Also note that using the old-style PGP message format is strongly deprecated. (PGP only)

3.214. pgp_check_exit

Type: boolean
Default: yes

If set, mutt will check the exit code of the PGP subprocess when signing or encrypting. A non-zero exit code means that the subprocess failed. (PGP only)

3.215. pgp_check_gpg_decrypt_status_fd

Type: boolean
Default: yes

If set, mutt will check the status file descriptor output of $pgp_decrypt_command and $pgp_decode_command for GnuPG status codes indicating successful decryption. This will check for the presence of DECRYPTION_OKAY, absence of DECRYPTION_FAILED, and that all PLAINTEXT occurs between the BEGIN_DECRYPTION and END_DECRYPTION status codes.

If unset, mutt will instead match the status fd output against $pgp_decryption_okay. (PGP only)

3.216. pgp_clearsign_command

Type: string
Default: (empty)

This format is used to create an old-style “clearsigned†PGP message. Note that the use of this format is strongly deprecated.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.217. pgp_decode_command

Type: string
Default: (empty)

This format strings specifies a command which is used to decode application/pgp attachments.

The PGP command formats have their own set of printf(3)-like sequences:

%p Expands to PGPPASSFD=0 when a pass phrase is needed, to an empty string otherwise. Note: This may be used with a %? construct.
%f Expands to the name of a file containing a message.
%s Expands to the name of a file containing the signature part of a multipart/signed attachment when verifying it.
%a The value of $pgp_sign_as if set, otherwise the value of $pgp_default_key.
%r One or more key IDs (or fingerprints if available).

For examples on how to configure these formats for the various versions of PGP which are floating around, see the pgp and gpg sample configuration files in the samples/ subdirectory which has been installed on your system alongside the documentation. (PGP only)

3.218. pgp_decrypt_command

Type: string
Default: (empty)

This command is used to decrypt a PGP encrypted message.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.219. pgp_decryption_okay

Type: regular expression
Default: (empty)

If you assign text to this variable, then an encrypted PGP message is only considered successfully decrypted if the output from $pgp_decrypt_command contains the text. This is used to protect against a spoofed encrypted message, with multipart/encrypted headers but containing a block that is not actually encrypted. (e.g. simply signed and ascii armored text).

Note that if $pgp_check_gpg_decrypt_status_fd is set, this variable is ignored. (PGP only)

3.220. pgp_default_key

Type: string
Default: (empty)

This is the default key-pair to use for PGP operations. It will be used for encryption (see $postpone_encrypt and $pgp_self_encrypt).

It will also be used for signing unless $pgp_sign_as is set.

The (now deprecated) pgp_self_encrypt_as is an alias for this variable, and should no longer be used. (PGP only)

3.221. pgp_encrypt_only_command

Type: string
Default: (empty)

This command is used to encrypt a body part without signing it.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.222. pgp_encrypt_sign_command

Type: string
Default: (empty)

This command is used to both sign and encrypt a body part.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.223. pgp_entry_format

Type: string
Default: “%4n %t%f %4l/0x%k %-4a %2c %uâ€

This variable allows you to customize the PGP key selection menu to your personal taste. This string is similar to $index_format, but has its own set of printf(3)-like sequences:

%n number
%k key id
%u user id
%a algorithm
%l key length
%f flags
%c capabilities
%t trust/validity of the key-uid association
%[<s>] date of the key where <s> is an strftime(3) expression

(PGP only)

3.224. pgp_export_command

Type: string
Default: (empty)

This command is used to export a public key from the user's key ring.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.225. pgp_getkeys_command

Type: string
Default: (empty)

This command is invoked whenever Mutt needs to fetch the public key associated with an email address. Of the sequences supported by $pgp_decode_command, %r is the only printf(3)-like sequence used with this format. Note that in this case, %r expands to the email address, not the public key ID (the key ID is unknown, which is why Mutt is invoking this command). (PGP only)

3.226. pgp_good_sign

Type: regular expression
Default: (empty)

If you assign a text to this variable, then a PGP signature is only considered verified if the output from $pgp_verify_command contains the text. Use this variable if the exit code from the command is 0 even for bad signatures. (PGP only)

3.227. pgp_ignore_subkeys

Type: boolean
Default: yes

Setting this variable will cause Mutt to ignore OpenPGP subkeys. Instead, the principal key will inherit the subkeys' capabilities. Unset this if you want to play interesting key selection games. (PGP only)

3.228. pgp_import_command

Type: string
Default: (empty)

This command is used to import a key from a message into the user's public key ring.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.229. pgp_list_pubring_command

Type: string
Default: (empty)

This command is used to list the public key ring's contents. The output format must be analogous to the one used by

gpg --list-keys --with-colons --with-fingerprint

This format is also generated by the mutt_pgpring utility which comes with mutt.

Note: gpg's fixed-list-mode option should not be used. It produces a different date format which may result in mutt showing incorrect key generation dates.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. Note that in this case, %r expands to the search string, which is a list of one or more quoted values such as email address, name, or keyid. (PGP only)

3.230. pgp_list_secring_command

Type: string
Default: (empty)

This command is used to list the secret key ring's contents. The output format must be analogous to the one used by:

gpg --list-keys --with-colons --with-fingerprint

This format is also generated by the mutt_pgpring utility which comes with mutt.

Note: gpg's fixed-list-mode option should not be used. It produces a different date format which may result in mutt showing incorrect key generation dates.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. Note that in this case, %r expands to the search string, which is a list of one or more quoted values such as email address, name, or keyid. (PGP only)

3.231. pgp_long_ids

Type: boolean
Default: yes

If set, use 64 bit PGP key IDs, if unset use the normal 32 bit key IDs. NOTE: Internally, Mutt has transitioned to using fingerprints (or long key IDs as a fallback). This option now only controls the display of key IDs in the key selection menu and a few other places. (PGP only)

3.232. pgp_mime_auto

Type: quadoption
Default: ask-yes

This option controls whether Mutt will prompt you for automatically sending a (signed/encrypted) message using PGP/MIME when inline (traditional) fails (for any reason).

Also note that using the old-style PGP message format is strongly deprecated. (PGP only)

3.233. pgp_replyinline

Type: boolean
Default: no

Setting this variable will cause Mutt to always attempt to create an inline (traditional) message when replying to a message which is PGP encrypted/signed inline. This can be overridden by use of the pgp menu, when inline is not required. This option does not automatically detect if the (replied-to) message is inline; instead it relies on Mutt internals for previously checked/flagged messages.

Note that Mutt might automatically use PGP/MIME for messages which consist of more than a single MIME part. Mutt can be configured to ask before sending PGP/MIME messages when inline (traditional) would not work.

Also see the $pgp_mime_auto variable.

Also note that using the old-style PGP message format is strongly deprecated. (PGP only)

3.234. pgp_retainable_sigs

Type: boolean
Default: no

If set, signed and encrypted messages will consist of nested multipart/signed and multipart/encrypted body parts.

This is useful for applications like encrypted and signed mailing lists, where the outer layer (multipart/encrypted) can be easily removed, while the inner multipart/signed part is retained. (PGP only)

3.235. pgp_self_encrypt

Type: boolean
Default: yes

When set, PGP encrypted messages will also be encrypted using the key in $pgp_default_key. (PGP only)

3.236. pgp_show_unusable

Type: boolean
Default: yes

If set, mutt will display non-usable keys on the PGP key selection menu. This includes keys which have been revoked, have expired, or have been marked as “disabled†by the user. (PGP only)

3.237. pgp_sign_as

Type: string
Default: (empty)

If you have a different key pair to use for signing, you should set this to the signing key. Most people will only need to set $pgp_default_key. It is recommended that you use the keyid form to specify your key (e.g. 0x00112233). (PGP only)

3.238. pgp_sign_command

Type: string
Default: (empty)

This command is used to create the detached PGP signature for a multipart/signed PGP/MIME body part.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.239. pgp_sort_keys

Type: sort order
Default: address

Specifies how the entries in the pgp menu are sorted. The following are legal values:

address sort alphabetically by user id
keyid sort alphabetically by key id
date sort by key creation date
trust sort by the trust of the key

If you prefer reverse order of the above values, prefix it with “reverse-â€. (PGP only)

3.240. pgp_strict_enc

Type: boolean
Default: yes

If set, Mutt will automatically encode PGP/MIME signed messages as quoted-printable. Please note that unsetting this variable may lead to problems with non-verifyable PGP signatures, so only change this if you know what you are doing. (PGP only)

3.241. pgp_timeout

Type: number (long)
Default: 300

The number of seconds after which a cached passphrase will expire if not used. (PGP only)

3.242. pgp_use_gpg_agent

Type: boolean
Default: yes

If set, mutt expects a gpg-agent(1) process will handle private key passphrase prompts. If unset, mutt will prompt for the passphrase and pass it via stdin to the pgp command.

Note that as of version 2.1, GnuPG automatically spawns an agent and requires the agent be used for passphrase management. Since that version is increasingly prevalent, this variable now defaults set.

Mutt works with a GUI or curses pinentry program. A TTY pinentry should not be used.

If you are using an older version of GnuPG without an agent running, or another encryption program without an agent, you will need to unset this variable. (PGP only)

3.243. pgp_verify_command

Type: string
Default: (empty)

This command is used to verify PGP signatures.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.244. pgp_verify_key_command

Type: string
Default: (empty)

This command is used to verify key information from the key selection menu.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.245. pipe_decode

Type: boolean
Default: no

Used in connection with the <pipe-message> function. When unset, Mutt will pipe the messages without any preprocessing. When set, Mutt will attempt to decode the messages first.

Also see $pipe_decode_weed, which controls whether headers will be weeded when this is set.

3.246. pipe_decode_weed

Type: boolean
Default: yes

For <pipe-message>, when $pipe_decode is set, this further controls whether Mutt will weed headers.

3.247. pipe_sep

Type: string
Default: “\nâ€

The separator to add between messages when piping a list of tagged messages to an external Unix command.

3.248. pipe_split

Type: boolean
Default: no

Used in connection with the <pipe-message> function following <tag-prefix>. If this variable is unset, when piping a list of tagged messages Mutt will concatenate the messages and will pipe them all concatenated. When set, Mutt will pipe the messages one by one. In both cases the messages are piped in the current sorted order, and the $pipe_sep separator is added after each message.

3.249. pop_auth_try_all

Type: boolean
Default: yes

If set, Mutt will try all available authentication methods. When unset, Mutt will only fall back to other authentication methods if the previous methods are unavailable. If a method is available but authentication fails, Mutt will not connect to the POP server.

3.250. pop_authenticators

Type: string
Default: (empty)

This is a colon-delimited list of authentication methods mutt may attempt to use to log in to an POP server, in the order mutt should try them. Authentication methods are either “userâ€, “apop†or any SASL mechanism, e.g. “digest-md5â€, “gssapi†or “cram-md5â€. This option is case-insensitive. If this option is unset (the default) mutt will try all available methods, in order from most-secure to least-secure.

Example:

set pop_authenticators="digest-md5:apop:user"

3.251. pop_checkinterval

Type: number
Default: 60

This variable configures how often (in seconds) mutt should look for new mail in the currently selected mailbox if it is a POP mailbox.

3.252. pop_delete

Type: quadoption
Default: ask-no

If set, Mutt will delete successfully downloaded messages from the POP server when using the <fetch-mail> function. When unset, Mutt will download messages but also leave them on the POP server.

3.253. pop_host

Type: string
Default: (empty)

The name of your POP server for the <fetch-mail> function. You can also specify an alternative port, username and password, i.e.:

[pop[s]://][username[:password]@]popserver[:port]

where “[...]†denotes an optional part.

3.254. pop_last

Type: boolean
Default: no

If this variable is set, mutt will try to use the “LAST†POP command for retrieving only unread messages from the POP server when using the <fetch-mail> function.

3.255. pop_oauth_refresh_command

Type: string
Default: (empty)

The command to run to generate an OAUTH refresh token for authorizing your connection to your POP server. This command will be run on every connection attempt that uses the OAUTHBEARER authentication mechanism. See “oauth†for details.

3.256. pop_pass

Type: string
Default: (empty)

Specifies the password for your POP account. If unset, Mutt will prompt you for your password when you open a POP mailbox.

Warning: you should only use this option when you are on a fairly secure machine, because the superuser can read your muttrc even if you are the only one who can read the file.

3.257. pop_reconnect

Type: quadoption
Default: ask-yes

Controls whether or not Mutt will try to reconnect to the POP server if the connection is lost.

3.258. pop_user

Type: string
Default: (empty)

Your login name on the POP server.

This variable defaults to your user name on the local machine.

3.259. post_indent_string

Type: string
Default: (empty)

Similar to the $attribution variable, Mutt will append this string after the inclusion of a message which is being replied to. For a full listing of defined printf(3)-like sequences see the section on $index_format.

3.260. postpone

Type: quadoption
Default: ask-yes

Controls whether or not messages are saved in the $postponed mailbox when you elect not to send immediately.

Also see the $recall variable.

3.261. postponed

Type: path
Default: “~/postponedâ€

Mutt allows you to indefinitely “postpone sending a message†which you are editing. When you choose to postpone a message, Mutt saves it in the mailbox specified by this variable.

Also see the $postpone variable.

3.262. postpone_encrypt

Type: boolean
Default: no

When set, postponed messages that are marked for encryption will be self-encrypted. Mutt will first try to encrypt using the value specified in $pgp_default_key or $smime_default_key. If those are not set, it will try the deprecated $postpone_encrypt_as. (Crypto only)

3.263. postpone_encrypt_as

Type: string
Default: (empty)

This is a deprecated fall-back variable for $postpone_encrypt. Please use $pgp_default_key or $smime_default_key. (Crypto only)

3.264. preconnect

Type: string
Default: (empty)

If set, a shell command to be executed if mutt fails to establish a connection to the server. This is useful for setting up secure connections, e.g. with ssh(1). If the command returns a nonzero status, mutt gives up opening the server. Example:

set preconnect="ssh -f -q -L 1234:mailhost.net:143 mailhost.net \
sleep 20 < /dev/null > /dev/null"

Mailbox “foo†on “mailhost.net†can now be reached as “{localhost:1234}fooâ€.

Note: For this example to work, you must be able to log in to the remote machine without having to enter a password.

3.265. print

Type: quadoption
Default: ask-no

Controls whether or not Mutt really prints messages. This is set to “ask-no†by default, because some people accidentally hit “p†often.

3.266. print_command

Type: path
Default: “lprâ€

This specifies the command pipe that should be used to print messages.

3.267. print_decode

Type: boolean
Default: yes

Used in connection with the <print-message> function. If this option is set, the message is decoded before it is passed to the external command specified by $print_command. If this option is unset, no processing will be applied to the message when printing it. The latter setting may be useful if you are using some advanced printer filter which is able to properly format e-mail messages for printing.

Also see $print_decode_weed, which controls whether headers will be weeded when this is set.

3.268. print_decode_weed

Type: boolean
Default: yes

For <print-message>, when $print_decode is set, this further controls whether Mutt will weed headers.

3.269. print_split

Type: boolean
Default: no

Used in connection with the <print-message> function. If this option is set, the command specified by $print_command is executed once for each message which is to be printed. If this option is unset, the command specified by $print_command is executed only once, and all the messages are concatenated, with a form feed as the message separator.

Those who use the enscript(1) program's mail-printing mode will most likely want to set this option.

3.270. prompt_after

Type: boolean
Default: yes

If you use an external $pager, setting this variable will cause Mutt to prompt you for a command when the pager exits rather than returning to the index menu. If unset, Mutt will return to the index menu when the external pager exits.

3.271. query_command

Type: path
Default: (empty)

This specifies the command Mutt will use to make external address queries. The string may contain a “%sâ€, which will be substituted with the query string the user types. Mutt will add quotes around the string substituted for “%s†automatically according to shell quoting rules, so you should avoid adding your own. If no “%s†is found in the string, Mutt will append the user's query to the end of the string. See “query†for more information.

3.272. query_format

Type: string
Default: “%4c %t %-25.25a %-25.25n %?e?(%e)?â€

This variable describes the format of the “query†menu. The following printf(3)-style sequences are understood:

%a destination address
%c current entry number
%e extra information *
%n destination name
%t “*†if current entry is tagged, a space otherwise
%>X right justify the rest of the string and pad with “Xâ€
%|X pad to the end of the line with “Xâ€
%*X soft-fill with character “X†as pad

For an explanation of “soft-fillâ€, see the $index_format documentation.

* = can be optionally printed if nonzero, see the $status_format documentation.

3.273. quit

Type: quadoption
Default: yes

This variable controls whether “quit†and “exit†actually quit from mutt. If this option is set, they do quit, if it is unset, they have no effect, and if it is set to ask-yes or ask-no, you are prompted for confirmation when you try to quit.

3.274. quote_regexp

Type: regular expression
Default: “^([ \t]*[|>:}#])+â€

A regular expression used in the internal pager to determine quoted sections of text in the body of a message. Quoted text may be filtered out using the <toggle-quoted> command, or colored according to the “color quoted†family of directives.

Higher levels of quoting may be colored differently (“color quoted1â€, “color quoted2â€, etc.). The quoting level is determined by removing the last character from the matched text and recursively reapplying the regular expression until it fails to produce a match.

Match detection may be overridden by the $smileys regular expression.

3.275. read_inc

Type: number
Default: 10

If set to a value greater than 0, Mutt will display which message it is currently on when reading a mailbox or when performing search actions such as search and limit. The message is printed after this many messages have been read or searched (e.g., if set to 25, Mutt will print a message when it is at message 25, and then again when it gets to message 50). This variable is meant to indicate progress when reading or searching large mailboxes which may take some time. When set to 0, only a single message will appear before the reading the mailbox.

Also see the $write_inc, $net_inc and $time_inc variables and the “tuning†section of the manual for performance considerations.

3.276. read_only

Type: boolean
Default: no

If set, all folders are opened in read-only mode.

3.277. realname

Type: string
Default: (empty)

This variable specifies what “real†or “personal†name should be used when sending messages.

By default, this is the GECOS field from /etc/passwd. Note that this variable will not be used when the user has set a real name in the $from variable.

3.278. recall

Type: quadoption
Default: ask-yes

Controls whether or not Mutt recalls postponed messages when composing a new message.

Setting this variable to yes is not generally useful, and thus not recommended. Note that the <recall-message> function can be used to manually recall postponed messages.

Also see $postponed variable.

3.279. record

Type: path
Default: “~/sentâ€

This specifies the file into which your outgoing messages should be appended. (This is meant as the primary method for saving a copy of your messages, but another way to do this is using the “my_hdr†command to create a “Bcc:†field with your email address in it.)

The value of $record is overridden by the $force_name and $save_name variables, and the “fcc-hook†command. Also see $copy and $write_bcc.

Multiple mailboxes may be specified if $fcc_delimiter is set to a string delimiter.

3.280. reflow_space_quotes

Type: boolean
Default: yes

This option controls how quotes from format=flowed messages are displayed in the pager and when replying (with $text_flowed unset). When set, this option adds spaces after each level of quote marks, turning ">>>foo" into "> > > foo".

Note: If $reflow_text is unset, this option has no effect. Also, this option does not affect replies when $text_flowed is set.

3.281. reflow_text

Type: boolean
Default: yes

When set, Mutt will reformat paragraphs in text/plain parts marked format=flowed. If unset, Mutt will display paragraphs unaltered from how they appear in the message body. See RFC3676 for details on the format=flowed format.

Also see $reflow_wrap, and $wrap.

3.282. reflow_wrap

Type: number
Default: 78

This variable controls the maximum paragraph width when reformatting text/plain parts when $reflow_text is set. When the value is 0, paragraphs will be wrapped at the terminal's right margin. A positive value sets the paragraph width relative to the left margin. A negative value set the paragraph width relative to the right margin.

Also see $wrap.

3.283. reply_regexp

Type: regular expression (localized)
Default: “^(re)(\\[[0-9]+\\])*:[ \t]*â€

A regular expression used to recognize reply messages when threading and replying. The default value corresponds to the standard Latin "Re:" prefix.

This value may have been localized by the translator for your locale, adding other prefixes that are common in the locale. You can add your own prefixes by appending inside "^(re)". For example: "^(re|se)" or "^(re|aw|se)".

The second parenthesized expression matches zero or more bracketed numbers following the prefix, such as "Re[1]: ". The initial "\\[" means a literal left-bracket character. Note the backslash must be doubled when used inside a double quoted string in the muttrc. "[0-9]+" means one or more numbers. "\\]" means a literal right-bracket. Finally the whole parenthesized expression has a "*" suffix, meaning it can occur zero or more times.

The last part matches a colon followed by an optional space or tab. Note "\t" is converted to a literal tab inside a double quoted string. If you use a single quoted string, you would have to type an actual tab character, and would need to convert the double-backslashes to single backslashes.

Note: the result of this regexp match against the subject is stored in the header cache. Mutt isn't smart enough to invalidate a header cache entry based on changing $reply_regexp, so if you aren't seeing correct values in the index, try temporarily turning off the header cache. If that fixes the problem, then once the variable is set to your liking, remove your stale header cache files and turn the header cache back on.

3.284. reply_self

Type: boolean
Default: no

If unset and you are replying to a message sent by you, Mutt will assume that you want to reply to the recipients of that message rather than to yourself.

Also see the “alternates†command.

3.285. reply_to

Type: quadoption
Default: ask-yes

If set, when replying to a message, Mutt will use the address listed in the Reply-to: header as the recipient of the reply. If unset, it will use the address in the From: header field instead. This option is useful for reading a mailing list that sets the Reply-To: header field to the list address and you want to send a private message to the author of a message.

3.286. resolve

Type: boolean
Default: yes

When set, the cursor will be automatically advanced to the next (possibly undeleted) message whenever a command that modifies the current message is executed.

3.287. resume_draft_files

Type: boolean
Default: no

If set, draft files (specified by -H on the command line) are processed similarly to when resuming a postponed message. Recipients are not prompted for; send-hooks are not evaluated; no alias expansion takes place; user-defined headers and signatures are not added to the message.

3.288. resume_edited_draft_files

Type: boolean
Default: yes

If set, draft files previously edited (via -E -H on the command line) will have $resume_draft_files automatically set when they are used as a draft file again.

The first time a draft file is saved, mutt will add a header, X-Mutt-Resume-Draft to the saved file. The next time the draft file is read in, if mutt sees the header, it will set $resume_draft_files.

This option is designed to prevent multiple signatures, user-defined headers, and other processing effects from being made multiple times to the draft file.

3.289. reverse_alias

Type: boolean
Default: no

This variable controls whether or not Mutt will display the “personal†name from your aliases in the index menu if it finds an alias that matches the message's sender. For example, if you have the following alias:

alias juser abd30425@somewhere.net (Joe User)

and then you receive mail which contains the following header:

From: abd30425@somewhere.net

It would be displayed in the index menu as “Joe User†instead of “abd30425@somewhere.net.†This is useful when the person's e-mail address is not human friendly.

3.290. reverse_name

Type: boolean
Default: no

It may sometimes arrive that you receive mail to a certain machine, move the messages to another machine, and reply to some the messages from there. If this variable is set, the default From: line of the reply messages is built using the address where you received the messages you are replying to if that address matches your “alternatesâ€. If the variable is unset, or the address that would be used doesn't match your “alternatesâ€, the From: line will use your address on the current machine.

Also see the “alternates†command and $reverse_realname.

3.291. reverse_realname

Type: boolean
Default: yes

This variable fine-tunes the behavior of the $reverse_name feature.

When it is unset, Mutt will remove the real name part of a matching address. This allows the use of the email address without having to also use what the sender put in the real name field.

When it is set, Mutt will use the matching address as-is.

In either case, a missing real name will be filled in afterwards using the value of $realname.

3.292. rfc2047_parameters

Type: boolean
Default: yes

When this variable is set, Mutt will decode RFC2047-encoded MIME parameters. You want to set this variable when mutt suggests you to save attachments to files named like:

=?iso-8859-1?Q?file=5F=E4=5F991116=2Ezip?=

When this variable is set interactively, the change won't be active until you change folders.

Note that this use of RFC2047's encoding is explicitly prohibited by the standard, but nevertheless encountered in the wild.

Also note that setting this parameter will not have the effect that mutt generates this kind of encoding. Instead, mutt will unconditionally use the encoding specified in RFC2231.

3.293. save_address

Type: boolean
Default: no

If set, mutt will take the sender's full address when choosing a default folder for saving a mail. If $save_name or $force_name is set too, the selection of the Fcc folder will be changed as well.

3.294. save_empty

Type: boolean
Default: yes

When unset, mailboxes which contain no saved messages will be removed when closed (the exception is $spoolfile which is never removed). If set, mailboxes are never removed.

Note: This only applies to mbox and MMDF folders, Mutt does not delete MH and Maildir directories.

3.295. save_history

Type: number
Default: 0

This variable controls the size of the history (per category) saved in the $history_file file.

3.296. save_name

Type: boolean
Default: no

This variable controls how copies of outgoing messages are saved. When set, a check is made to see if a mailbox specified by the recipient address exists (this is done by searching for a mailbox in the $folder directory with the username part of the recipient address). If the mailbox exists, the outgoing message will be saved to that mailbox, otherwise the message is saved to the $record mailbox.

Also see the $force_name variable.

3.297. score

Type: boolean
Default: yes

When this variable is unset, scoring is turned off. This can be useful to selectively disable scoring for certain folders when the $score_threshold_delete variable and related are used.

3.298. score_threshold_delete

Type: number
Default: -1

Messages which have been assigned a score equal to or lower than the value of this variable are automatically marked for deletion by mutt. Since mutt scores are always greater than or equal to zero, the default setting of this variable will never mark a message for deletion.

3.299. score_threshold_flag

Type: number
Default: 9999

Messages which have been assigned a score greater than or equal to this variable's value are automatically marked "flagged".

3.300. score_threshold_read

Type: number
Default: -1

Messages which have been assigned a score equal to or lower than the value of this variable are automatically marked as read by mutt. Since mutt scores are always greater than or equal to zero, the default setting of this variable will never mark a message read.

3.301. search_context

Type: number
Default: 0

For the pager, this variable specifies the number of lines shown before search results. By default, search results will be top-aligned.

3.302. send_charset

Type: string
Default: “us-ascii:iso-8859-1:utf-8â€

A colon-delimited list of character sets for outgoing messages. Mutt will use the first character set into which the text can be converted exactly. If your $charset is not “iso-8859-1†and recipients may not understand “UTF-8â€, it is advisable to include in the list an appropriate widely used standard character set (such as “iso-8859-2â€, “koi8-r†or “iso-2022-jpâ€) either instead of or after “iso-8859-1â€.

In case the text cannot be converted into one of these exactly, mutt uses $charset as a fallback.

3.303. send_multipart_alternative

Type: quadoption
Default: no

If set, Mutt will generate a multipart/alternative container and an alternative part using the filter script specified in $send_multipart_alternative_filter. See the section “MIME Multipart/Alternative†(alternative-order).

Note that enabling multipart/alternative is not compatible with inline PGP encryption. Mutt will prompt to use PGP/MIME in that case.

3.304. send_multipart_alternative_filter

Type: path
Default: (empty)

This specifies a filter script, which will convert the main (composed) message of the email to an alternative format. The message will be piped to the filter's stdin. The expected output of the filter is the generated mime type, e.g. text/html, followed by a blank line, and then the converted content. See the section “MIME Multipart/Alternative†(alternative-order).

3.305. sendmail

Type: path
Default: “/usr/bin/sendmail -oem -oiâ€

Specifies the program and arguments used to deliver mail sent by Mutt. Mutt expects that the specified program interprets additional arguments as recipient addresses. Mutt appends all recipients after adding a -- delimiter (if not already present). Additional flags, such as for $use_8bitmime, $use_envelope_from, $dsn_notify, or $dsn_return will be added before the delimiter.

Note: This command is invoked differently from most other commands in Mutt. It is tokenized by space, and invoked directly via execvp(3) with an array of arguments - so commands or arguments with spaces in them are not supported. The shell is not used to run the command, so shell quoting is also not supported.

See also: $write_bcc.

3.306. sendmail_wait

Type: number
Default: 0

Specifies the number of seconds to wait for the $sendmail process to finish before giving up and putting delivery in the background.

Mutt interprets the value of this variable as follows:

>0 number of seconds to wait for sendmail to finish before continuing
0 wait forever for sendmail to finish
<0 always put sendmail in the background without waiting

Note that if you specify a value other than 0, the output of the child process will be put in a temporary file. If there is some error, you will be informed as to where to find the output.

3.307. shell

Type: path
Default: (empty)

Command to use when spawning a subshell. By default, the user's login shell from /etc/passwd is used.

3.308. sidebar_delim_chars

Type: string
Default: “/.â€

This contains the list of characters which you would like to treat as folder separators for displaying paths in the sidebar.

Local mail is often arranged in directories: `dir1/dir2/mailbox'.

set sidebar_delim_chars='/'

IMAP mailboxes are often named: `folder1.folder2.mailbox'.

set sidebar_delim_chars='.'

See also: $sidebar_short_path, $sidebar_folder_indent, $sidebar_indent_string.

3.309. sidebar_divider_char

Type: string
Default: “|â€

This specifies the characters to be drawn between the sidebar (when visible) and the other Mutt panels. ASCII and Unicode line-drawing characters are supported.

3.310. sidebar_folder_indent

Type: boolean
Default: no

Set this to indent mailboxes in the sidebar.

See also: $sidebar_short_path, $sidebar_indent_string, $sidebar_delim_chars.

3.311. sidebar_format

Type: string
Default: “%B%*  %nâ€

This variable allows you to customize the sidebar display. This string is similar to $index_format, but has its own set of printf(3)-like sequences:

%B Name of the mailbox
%S * Size of mailbox (total number of messages)
%N * Number of unread messages in the mailbox
%n N if mailbox has new mail, blank otherwise
%F * Number of Flagged messages in the mailbox
%! “!†: one flagged message; “!!†: two flagged messages; “n!†: n flagged messages (for n > 2). Otherwise prints nothing.
%d * @ Number of deleted messages
%L * @ Number of messages after limiting
%t * @ Number of tagged messages
%>X right justify the rest of the string and pad with “Xâ€
%|X pad to the end of the line with “Xâ€
%*X soft-fill with character “X†as pad

* = Can be optionally printed if nonzero @ = Only applicable to the current folder

In order to use %S, %N, %F, and %!, $mail_check_stats must be set. When thus set, a suggested value for this option is "%B%?F? [%F]?%* %?N?%N/?%S".

3.312. sidebar_indent_string

Type: string
Default: “  â€

This specifies the string that is used to indent mailboxes in the sidebar. It defaults to two spaces.

See also: $sidebar_short_path, $sidebar_folder_indent, $sidebar_delim_chars.

3.313. sidebar_new_mail_only

Type: boolean
Default: no

When set, the sidebar will only display mailboxes containing new, or flagged, mail.

See also: sidebar_whitelist.

3.314. sidebar_next_new_wrap

Type: boolean
Default: no

When set, the <sidebar-next-new> command will not stop and the end of the list of mailboxes, but wrap around to the beginning. The <sidebar-prev-new> command is similarly affected, wrapping around to the end of the list.

3.315. sidebar_relative_shortpath_indent

Type: boolean
Default: no

When set, this option changes how $sidebar_short_path and $sidebar_folder_indent perform shortening and indentation: both will look at the previous sidebar entries and shorten/indent relative to the most recent parent.

An example of this option set/unset for mailboxes listed in this order, with $sidebar_short_path=yes, $sidebar_folder_indent=yes, and $sidebar_indent_string="→":

mailbox set unset
=a.b =a.b →b
=a.b.c.d →c.d →→→d
=a.b.e →e →→e

The second line illustrates most clearly. With this option set, =a.b.c.d is shortened relative to =a.b, becoming c.d; it is also indented one place relative to =a.b. With this option unset =a.b.c.d is always shortened to the last part of the mailbox, d and is indented three places, with respect to $folder (represented by '=').

When set, the third line will also be indented and shortened relative to the first line.

3.316. sidebar_short_path

Type: boolean
Default: no

By default the sidebar will show the mailbox's path, relative to the $folder variable. Setting sidebar_shortpath=yes will shorten the names relative to the previous name. Here's an example:

shortpath=no shortpath=yes shortpath=yes, folderindent=yes, indentstr=".."
fruit fruit fruit
fruit.apple apple ..apple
fruit.banana banana ..banana
fruit.cherry cherry ..cherry

See also: $sidebar_delim_chars, $sidebar_folder_indent, $sidebar_indent_string.

3.317. sidebar_sort_method

Type: sort order
Default: unsorted

Specifies how to sort mailbox entries in the sidebar. By default, the entries are sorted alphabetically. Valid values:

  • alpha (alphabetically)

  • count (all message count)

  • flagged (flagged message count)

  • name (alphabetically)

  • new (unread message count)

  • path (alphabetically)

  • unread (unread message count)

  • unsorted

You may optionally use the “reverse-†prefix to specify reverse sorting order (example: “set sidebar_sort_method=reverse-alphaâ€).

3.318. sidebar_use_mailbox_shortcuts

Type: boolean
Default: no

When set, sidebar mailboxes will be displayed with mailbox shortcut prefixes "=" or "~".

When unset, the sidebar will trim off a matching $folder prefix but otherwise not use mailbox shortcuts.

3.319. sidebar_visible

Type: boolean
Default: no

This specifies whether or not to show sidebar. The sidebar shows a list of all your mailboxes.

See also: $sidebar_format, $sidebar_width

3.320. sidebar_width

Type: number
Default: 30

This controls the width of the sidebar. It is measured in screen columns. For example: sidebar_width=20 could display 20 ASCII characters, or 10 Chinese characters.

3.321. sig_dashes

Type: boolean
Default: yes

If set, a line containing “-- †(note the trailing space) will be inserted before your $signature. It is strongly recommended that you not unset this variable unless your signature contains just your name. The reason for this is because many software packages use “-- \n†to detect your signature. For example, Mutt has the ability to highlight the signature in a different color in the built-in pager.

3.322. sig_on_top

Type: boolean
Default: no

If set, the signature will be included before any quoted or forwarded text. It is strongly recommended that you do not set this variable unless you really know what you are doing, and are prepared to take some heat from netiquette guardians.

3.323. signature

Type: path
Default: “~/.signatureâ€

Specifies the filename of your signature, which is appended to all outgoing messages. If the filename ends with a pipe (“|â€), it is assumed that filename is a shell command and input should be read from its standard output.

3.324. simple_search

Type: string
Default: “~f %s | ~s %sâ€

Specifies how Mutt should expand a simple search into a real search pattern. A simple search is one that does not contain any of the “~†pattern modifiers. See “patterns†for more information on search patterns.

For example, if you simply type “joe†at a search or limit prompt, Mutt will automatically expand it to the value specified by this variable by replacing “%s†with the supplied string. For the default value, “joe†would be expanded to: “~f joe | ~s joeâ€.

3.325. size_show_bytes

Type: boolean
Default: no

If set, message sizes will display bytes for values less than 1 kilobyte. See formatstrings-size.

3.326. size_show_fractions

Type: boolean
Default: yes

If set, message sizes will be displayed with a single decimal value for sizes from 0 to 10 kilobytes and 1 to 10 megabytes. See formatstrings-size.

3.327. size_show_mb

Type: boolean
Default: yes

If set, message sizes will display megabytes for values greater than or equal to 1 megabyte. See formatstrings-size.

3.328. size_units_on_left

Type: boolean
Default: no

If set, message sizes units will be displayed to the left of the number. See formatstrings-size.

3.329. sleep_time

Type: number
Default: 1

Specifies time, in seconds, to pause while displaying certain informational messages, while moving from folder to folder and after expunging messages from the current folder. The default is to pause one second, so a value of zero for this option suppresses the pause.

3.330. smart_wrap

Type: boolean
Default: yes

Controls the display of lines longer than the screen width in the internal pager. If set, long lines are wrapped at a word boundary. If unset, lines are simply wrapped at the screen edge. Also see the $markers variable.

3.331. smileys

Type: regular expression
Default: “(>From )|(:[-^]?[][)(><}{|/DP])â€

The pager uses this variable to catch some common false positives of $quote_regexp, most notably smileys and not consider a line quoted text if it also matches $smileys. This mostly happens at the beginning of a line.

3.332. smime_ask_cert_label

Type: boolean
Default: yes

This flag controls whether you want to be asked to enter a label for a certificate about to be added to the database or not. It is set by default. (S/MIME only)

3.333. smime_ca_location

Type: path
Default: (empty)

This variable contains the name of either a directory, or a file which contains trusted certificates for use with OpenSSL. (S/MIME only)

3.334. smime_certificates

Type: path
Default: (empty)

Since for S/MIME there is no pubring/secring as with PGP, mutt has to handle storage and retrieval of keys by itself. This is very basic right now, and keys and certificates are stored in two different directories, both named as the hash-value retrieved from OpenSSL. There is an index file which contains mailbox-address keyid pairs, and which can be manually edited. This option points to the location of the certificates. (S/MIME only)

3.335. smime_decrypt_command

Type: string
Default: (empty)

This format string specifies a command which is used to decrypt application/x-pkcs7-mime attachments.

The OpenSSL command formats have their own set of printf(3)-like sequences similar to PGP's:

%f Expands to the name of a file containing a message.
%s Expands to the name of a file containing the signature part of a multipart/signed attachment when verifying it.
%k The key-pair specified with $smime_default_key
%c One or more certificate IDs.
%a The algorithm used for encryption.
%d The message digest algorithm specified with $smime_sign_digest_alg.
%C CA location: Depending on whether $smime_ca_location points to a directory or file, this expands to “-CApath $smime_ca_location†or “-CAfile $smime_ca_locationâ€.

For examples on how to configure these formats, see the smime.rc in the samples/ subdirectory which has been installed on your system alongside the documentation. (S/MIME only)

3.336. smime_decrypt_use_default_key

Type: boolean
Default: yes

If set (default) this tells mutt to use the default key for decryption. Otherwise, if managing multiple certificate-key-pairs, mutt will try to use the mailbox-address to determine the key to use. It will ask you to supply a key, if it can't find one. (S/MIME only)

3.337. smime_default_key

Type: string
Default: (empty)

This is the default key-pair to use for S/MIME operations, and must be set to the keyid (the hash-value that OpenSSL generates) to work properly.

It will be used for encryption (see $postpone_encrypt and $smime_self_encrypt). If GPGME is enabled, this is the key id displayed by gpgsm.

It will be used for decryption unless $smime_decrypt_use_default_key is unset.

It will also be used for signing unless $smime_sign_as is set.

The (now deprecated) smime_self_encrypt_as is an alias for this variable, and should no longer be used. (S/MIME only)

3.338. smime_encrypt_command

Type: string
Default: (empty)

This command is used to create encrypted S/MIME messages.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.339. smime_encrypt_with

Type: string
Default: “aes256â€

This sets the algorithm that should be used for encryption. Valid choices are “aes128â€, “aes192â€, “aes256â€, “desâ€, “des3â€, “rc2-40â€, “rc2-64â€, “rc2-128â€. (S/MIME only)

3.340. smime_get_cert_command

Type: string
Default: (empty)

This command is used to extract X509 certificates from a PKCS7 structure.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.341. smime_get_cert_email_command

Type: string
Default: (empty)

This command is used to extract the mail address(es) used for storing X509 certificates, and for verification purposes (to check whether the certificate was issued for the sender's mailbox).

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.342. smime_get_signer_cert_command

Type: string
Default: (empty)

This command is used to extract only the signers X509 certificate from a S/MIME signature, so that the certificate's owner may get compared to the email's “From:†field.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.343. smime_import_cert_command

Type: string
Default: (empty)

This command is used to import a certificate via smime_keys.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.344. smime_is_default

Type: boolean
Default: no

The default behavior of mutt is to use PGP on all auto-sign/encryption operations. To override and to use OpenSSL instead this must be set. However, this has no effect while replying, since mutt will automatically select the same application that was used to sign/encrypt the original message. (Note that this variable can be overridden by unsetting $crypt_autosmime.) (S/MIME only)

3.345. smime_keys

Type: path
Default: (empty)

Since for S/MIME there is no pubring/secring as with PGP, mutt has to handle storage and retrieval of keys/certs by itself. This is very basic right now, and stores keys and certificates in two different directories, both named as the hash-value retrieved from OpenSSL. There is an index file which contains mailbox-address keyid pair, and which can be manually edited. This option points to the location of the private keys. (S/MIME only)

3.346. smime_pkcs7_default_smime_type

Type: string
Default: “signedâ€

The application/pkcs7-mime “.p7m†type can contain EnvelopedData (encrypted) or SignedData. Senders should add a “smime-type†parameter to the content type, to help receiving MUAs correctly handle the data. Unfortunately, some clients (e.g. Outlook) don't add this parameter.

This option is used to determine which type to assume when the “smime-type†parameter is missing for “.p7m†file types.

Accepted values are “enveloped†and “signedâ€.

3.347. smime_pk7out_command

Type: string
Default: (empty)

This command is used to extract PKCS7 structures of S/MIME signatures, in order to extract the public X509 certificate(s).

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.348. smime_self_encrypt

Type: boolean
Default: yes

When set, S/MIME encrypted messages will also be encrypted using the certificate in $smime_default_key. (S/MIME only)

3.349. smime_sign_as

Type: string
Default: (empty)

If you have a separate key to use for signing, you should set this to the signing key. Most people will only need to set $smime_default_key. (S/MIME only)

3.350. smime_sign_command

Type: string
Default: (empty)

This command is used to created S/MIME signatures of type multipart/signed, which can be read by all mail clients.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. NOTE: %c and %k will default to $smime_sign_as if set, otherwise $smime_default_key. (S/MIME only)

3.351. smime_sign_digest_alg

Type: string
Default: “sha256â€

This sets the algorithm that should be used for the signature message digest. Valid choices are “md5â€, “sha1â€, “sha224â€, “sha256â€, “sha384â€, “sha512â€. (S/MIME only)

3.352. smime_sign_opaque_command

Type: string
Default: (empty)

This command is used to created S/MIME signatures of type application/x-pkcs7-signature, which can only be handled by mail clients supporting the S/MIME extension.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.353. smime_timeout

Type: number (long)
Default: 300

The number of seconds after which a cached passphrase will expire if not used. (S/MIME only)

3.354. smime_verify_command

Type: string
Default: (empty)

This command is used to verify S/MIME signatures of type multipart/signed.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.355. smime_verify_opaque_command

Type: string
Default: (empty)

This command is used to verify S/MIME signatures of type application/x-pkcs7-mime.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.356. smtp_authenticators

Type: string
Default: (empty)

This is a colon-delimited list of authentication methods mutt may attempt to use to log in to an SMTP server, in the order mutt should try them. Authentication methods are any SASL mechanism, e.g. “digest-md5â€, “gssapi†or “cram-md5â€. This option is case-insensitive. If it is “unset†(the default) mutt will try all available methods, in order from most-secure to least-secure.

Example:

set smtp_authenticators="digest-md5:cram-md5"

3.357. smtp_oauth_refresh_command

Type: string
Default: (empty)

The command to run to generate an OAUTH refresh token for authorizing your connection to your SMTP server. This command will be run on every connection attempt that uses the OAUTHBEARER authentication mechanism. See “oauth†for details.

3.358. smtp_pass

Type: string
Default: (empty)

Specifies the password for your SMTP account. If unset, Mutt will prompt you for your password when you first send mail via SMTP. See $smtp_url to configure mutt to send mail via SMTP.

Warning: you should only use this option when you are on a fairly secure machine, because the superuser can read your muttrc even if you are the only one who can read the file.

3.359. smtp_url

Type: string
Default: (empty)

Defines the SMTP smarthost where sent messages should relayed for delivery. This should take the form of an SMTP URL, e.g.:

smtp[s]://[user[:pass]@]host[:port]

where “[...]†denotes an optional part. Setting this variable overrides the value of the $sendmail variable.

Also see $write_bcc.

3.360. socket_receive_timeout

Type: number
Default: 0

Causes Mutt to timeout any socket read operation (e.g. SSL_read) after this many seconds. A zero (default) or negative value causes Mutt to wait indefinitely for the read to complete.

3.361. socket_send_timeout

Type: number
Default: 0

Causes Mutt to timeout any socket write operation (e.g. SSL_write) after this many seconds. A zero (default) or negative value causes Mutt to wait indefinitely for the write to complete.

3.362. sort

Type: sort order
Default: date

Specifies how to sort messages in the “index†menu. Valid values are:

  • date or date-sent

  • date-received

  • from

  • mailbox-order (unsorted)

  • score

  • size

  • spam

  • subject

  • threads

  • to

You may optionally use the “reverse-†prefix to specify reverse sorting order (example: “set sort=reverse-date-sentâ€).

For values except “threadsâ€, this provides the primary sort method. When two message sort values are equal, $sort_aux will be used for a secondary sort.

When set to “threadsâ€, Mutt threads messages in the index. It uses the variable $sort_thread_groups to sort between threads (at the top/root level), and $sort_aux to sort sub-threads and children.

3.363. sort_alias

Type: sort order
Default: alias

Specifies how the entries in the “alias†menu are sorted. The following are legal values:

  • address (sort alphabetically by email address)

  • alias (sort alphabetically by alias name)

  • unsorted (leave in order specified in .muttrc)

3.364. sort_aux

Type: sort order
Default: date

For non-threaded mode, this provides a secondary sort for messages in the “index†menu, used when the $sort value is equal for two messages.

When sorting by threads, this variable controls how the branches of the thread trees are sorted. This can be set to any value that $sort can, except “threads†(in that case, mutt will just use “date-sentâ€). You can also specify the “last-†prefix in addition to the “reverse-†prefix, but “last-†must come after “reverse-â€. The “last-†prefix causes messages to be sorted against its siblings by which has the last descendant, using the rest of $sort_aux as an ordering. For instance,

set sort_aux=last-date-received

would mean that if a new message is received in a sub-thread, that sub-thread becomes the last one displayed.

Note: For reversed-threads $sort order, $sort_aux is reversed again (which is not the right thing to do, but kept to not break any existing configuration setting).

3.365. sort_browser

Type: sort order
Default: alpha

Specifies how to sort entries in the file browser. By default, the entries are sorted alphabetically. Valid values:

  • alpha (alphabetically)

  • count

  • date

  • size

  • unread

  • unsorted

You may optionally use the “reverse-†prefix to specify reverse sorting order (example: “set sort_browser=reverse-dateâ€).

3.366. sort_browser_mailboxes

Type: sort order
Default: unsorted

Specifies how to sort entries in the mailbox browser. By default, the entries are unsorted, displayed in the same order as listed in the “mailboxes†command. Valid values:

  • alpha (alphabetically)

  • count

  • date

  • size

  • unread

  • unsorted

You may optionally use the “reverse-†prefix to specify reverse sorting order (example: “set sort_browser_mailboxes=reverse-alphaâ€).

3.367. sort_re

Type: boolean
Default: yes

This variable is only useful when sorting by threads with $strict_threads unset. In that case, it changes the heuristic mutt uses to thread messages by subject. With $sort_re set, mutt will only attach a message as the child of another message by subject if the subject of the child message starts with a substring matching the setting of $reply_regexp. With $sort_re unset, mutt will attach the message whether or not this is the case, as long as the non-$reply_regexp parts of both messages are identical.

3.368. sort_thread_groups

Type: sort order
Default: aux

When sorting by threads, this variable controls how threads are sorted in relation to other threads (at the top/root level). This can be set to any value that $sort can, except “threadsâ€. You can also specify the “last-†prefix in addition to the “reverse-†prefix, but “last-†must come after “reverse-â€. The “last-†prefix causes messages to be sorted against its siblings by which has the last descendant, using the rest of $sort_thread_groups as an ordering.

For backward compatibility, the default value is “auxâ€, which means to use $sort_aux for top-level thread sorting too. The value “aux†does not respect “last-†or “reverse-†prefixes, it simply delegates sorting directly to $sort_aux.

Note: For reversed-threads $sort order, $sort_thread_groups is reversed again (which is not the right thing to do, but kept to not break any existing configuration setting).

3.369. spam_separator

Type: string
Default: “,â€

This variable controls what happens when multiple spam headers are matched: if unset, each successive header will overwrite any previous matches value for the spam label. If set, each successive match will append to the previous, using this variable's value as a separator.

3.370. spoolfile

Type: path
Default: (empty)

If your default mailbox or spool file is in a non-default place where Mutt cannot find it, you can specify its location with this variable. Mutt will initially set this variable to the value of the environment variable $MAIL or $MAILDIR if either is defined.

Note: Despite the name, this can refer to a local or remote mailbox, e.g., "+INBOX".

3.371. ssl_ca_certificates_file

Type: path
Default: (empty)

This variable specifies a file containing trusted CA certificates. Any server certificate that is signed with one of these CA certificates is also automatically accepted. (GnuTLS only)

Example:

set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt

3.372. ssl_client_cert

Type: path
Default: (empty)

The file containing a client certificate and its associated private key.

3.373. ssl_force_tls

Type: boolean
Default: yes

If this variable is set, Mutt will require that all connections to remote servers be encrypted. Furthermore it will attempt to negotiate TLS even if the server does not advertise the capability, since it would otherwise have to abort the connection anyway. This option supersedes $ssl_starttls.

3.374. ssl_min_dh_prime_bits

Type: number
Default: 0

This variable specifies the minimum acceptable prime size (in bits) for use in any Diffie-Hellman key exchange. A value of 0 will use the default from the GNUTLS library. (GnuTLS only)

3.375. ssl_starttls

Type: quadoption
Default: yes

If set (the default), mutt will attempt to use STARTTLS on servers advertising the capability. When unset, mutt will not attempt to use STARTTLS regardless of the server's capabilities.

Note that STARTTLS is subject to many kinds of attacks, including the ability of a machine-in-the-middle to suppress the advertising of support. Setting $ssl_force_tls is recommended if you rely on STARTTLS.

3.376. ssl_use_sslv2

Type: boolean
Default: no

If set , Mutt will use SSLv2 when communicating with servers that request it. N.B. As of 2011, SSLv2 is considered insecure, and using is inadvisable. See https://tools.ietf.org/html/rfc6176 . (OpenSSL only)

3.377. ssl_use_sslv3

Type: boolean
Default: no

If set , Mutt will use SSLv3 when communicating with servers that request it. N.B. As of 2015, SSLv3 is considered insecure, and using it is inadvisable. See https://tools.ietf.org/html/rfc7525 .

3.378. ssl_use_tlsv1

Type: boolean
Default: no

If set , Mutt will use TLSv1.0 when communicating with servers that request it. N.B. As of 2015, TLSv1.0 is considered insecure, and using it is inadvisable. See https://tools.ietf.org/html/rfc7525 .

3.379. ssl_use_tlsv1_1

Type: boolean
Default: no

If set , Mutt will use TLSv1.1 when communicating with servers that request it. N.B. As of 2015, TLSv1.1 is considered insecure, and using it is inadvisable. See https://tools.ietf.org/html/rfc7525 .

3.380. ssl_use_tlsv1_2

Type: boolean
Default: yes

If set , Mutt will use TLSv1.2 when communicating with servers that request it.

3.381. ssl_use_tlsv1_3

Type: boolean
Default: yes

If set , Mutt will use TLSv1.3 when communicating with servers that request it.

3.382. ssl_usesystemcerts

Type: boolean
Default: yes

If set to yes, mutt will use CA certificates in the system-wide certificate store when checking if a server certificate is signed by a trusted CA. (OpenSSL only)

3.383. ssl_verify_dates

Type: boolean
Default: yes

If set (the default), mutt will not automatically accept a server certificate that is either not yet valid or already expired. You should only unset this for particular known hosts, using the <account-hook> function.

3.384. ssl_verify_host

Type: boolean
Default: yes

If set (the default), mutt will not automatically accept a server certificate whose host name does not match the host used in your folder URL. You should only unset this for particular known hosts, using the <account-hook> function.

3.385. ssl_verify_host_override

Type: string
Default: (empty)

Defines an alternate host name to verify the server certificate against. This should not be set unless you are sure what you are doing, but it might be useful for connection to a .onion host without a properly configured host name in the certificate. See $ssl_verify_host.

3.386. ssl_verify_partial_chains

Type: boolean
Default: no

This option should not be changed from the default unless you understand what you are doing.

Setting this variable to yes will permit verifying partial certification chains, i. e. a certificate chain where not the root, but an intermediate certificate CA, or the host certificate, are marked trusted (in $certificate_file), without marking the root signing CA as trusted.

(OpenSSL 1.0.2b and newer only).

3.387. ssl_ciphers

Type: string
Default: (empty)

Contains a colon-separated list of ciphers to use when using SSL. For OpenSSL, see ciphers(1) for the syntax of the string.

For GnuTLS, this option will be used in place of "NORMAL" at the start of the priority string. See gnutls_priority_init(3) for the syntax and more details. (Note: GnuTLS version 2.1.7 or higher is required.)

3.388. status_chars

Type: string
Default: “-*%Aâ€

Controls the characters used by the “%r†indicator in $status_format. The first character is used when the mailbox is unchanged. The second is used when the mailbox has been changed, and it needs to be resynchronized. The third is used if the mailbox is in read-only mode, or if the mailbox will not be written when exiting that mailbox (You can toggle whether to write changes to a mailbox with the <toggle-write> operation, bound by default to “%â€). The fourth is used to indicate that the current folder has been opened in attach- message mode (Certain operations like composing a new mail, replying, forwarding, etc. are not permitted in this mode).

3.389. status_format

Type: string (localized)
Default: “-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?B? Back:%B?%?l? %l?]---(%s/%?T?%T/?%S)-%>-(%P)---â€

Controls the format of the status line displayed in the “index†menu. This string is similar to $index_format, but has its own set of printf(3)-like sequences:

%b number of mailboxes with new mail *
%B number of backgrounded editing sessions *
%d number of deleted messages *
%f the full pathname of the current mailbox
%F number of flagged messages *
%h local hostname
%l size (in bytes) of the current mailbox (see formatstrings-size) *
%L size (in bytes) of the messages shown (i.e., which match the current limit) (see formatstrings-size) *
%m the number of messages in the mailbox *
%M the number of messages shown (i.e., which match the current limit) *
%n number of new messages in the mailbox *
%o number of old unread messages *
%p number of postponed messages *
%P percentage of the way through the index
%r modified/read-only/won't-write/attach-message indicator, according to $status_chars
%R number of read messages *
%s current sorting mode ($sort)
%S current aux sorting method ($sort_aux)
%t number of tagged messages *
%T current thread group sorting method ($sort_thread_groups) *
%u number of unread messages *
%v Mutt version string
%V currently active limit pattern, if any *
%>X right justify the rest of the string and pad with “Xâ€
%|X pad to the end of the line with “Xâ€
%*X soft-fill with character “X†as pad

For an explanation of “soft-fillâ€, see the $index_format documentation.

* = can be optionally printed if nonzero

Some of the above sequences can be used to optionally print a string if their value is nonzero. For example, you may only want to see the number of flagged messages if such messages exist, since zero is not particularly meaningful. To optionally print a string based upon one of the above sequences, the following construct is used:

%?<sequence_char>?<optional_string>?

where sequence_char is a character from the table above, and optional_string is the string you would like printed if sequence_char is nonzero. optional_string may contain other sequences as well as normal text, but you may not nest optional strings.

Here is an example illustrating how to optionally print the number of new messages in a mailbox:

%?n?%n new messages.?

You can also switch between two strings using the following construct:

%?<sequence_char>?<if_string>&<else_string>?

If the value of sequence_char is non-zero, if_string will be expanded, otherwise else_string will be expanded.

You can force the result of any printf(3)-like sequence to be lowercase by prefixing the sequence character with an underscore (“_â€) sign. For example, if you want to display the local hostname in lowercase, you would use: “%_hâ€.

If you prefix the sequence character with a colon (“:â€) character, mutt will replace any dots in the expansion by underscores. This might be helpful with IMAP folders that don't like dots in folder names.

3.390. status_on_top

Type: boolean
Default: no

Setting this variable causes the “status bar†to be displayed on the first line of the screen rather than near the bottom. If $help is set, too it'll be placed at the bottom.

3.391. strict_threads

Type: boolean
Default: no

If set, threading will only make use of the “In-Reply-To†and “References:†fields when you $sort by message threads. By default, messages with the same subject are grouped together in “pseudo threads.â€. This may not always be desirable, such as in a personal mailbox where you might have several unrelated messages with the subjects like “hi†which will get grouped together. See also $sort_re for a less drastic way of controlling this behavior.

3.392. suspend

Type: boolean
Default: yes

When unset, mutt won't stop when the user presses the terminal's susp key, usually “^Zâ€. This is useful if you run mutt inside an xterm using a command like “xterm -e muttâ€.

3.393. text_flowed

Type: boolean
Default: no

When set, mutt will generate “format=flowed†bodies with a content type of “text/plain; format=flowedâ€. This format is easier to handle for some mailing software, and generally just looks like ordinary text. To actually make use of this format's features, you'll need support in your editor.

The option only controls newly composed messages. Postponed messages, resent messages, and draft messages (via -H on the command line) will use the content-type of the source message.

Note that $indent_string is ignored when this option is set.

3.394. thorough_search

Type: boolean
Default: yes

Affects the ~b, ~B, and ~h search operations described in section “patternsâ€. If set, the headers and body/attachments of messages to be searched are decoded before searching. If unset, messages are searched as they appear in the folder.

Users searching attachments or for non-ASCII characters should set this value because decoding also includes MIME parsing/decoding and possible character set conversions. Otherwise mutt will attempt to match against the raw message received (for example quoted-printable encoded or with encoded headers) which may lead to incorrect search results.

3.395. thread_received

Type: boolean
Default: no

When set, mutt uses the date received rather than the date sent to thread messages by subject.

3.396. tilde

Type: boolean
Default: no

When set, the internal-pager will pad blank lines to the bottom of the screen with a tilde (“~â€).

3.397. time_inc

Type: number
Default: 0

Along with $read_inc, $write_inc, and $net_inc, this variable controls the frequency with which progress updates are displayed. It suppresses updates less than $time_inc milliseconds apart. This can improve throughput on systems with slow terminals, or when running mutt on a remote system.

Also see the “tuning†section of the manual for performance considerations.

3.398. timeout

Type: number
Default: 600

When Mutt is waiting for user input either idling in menus or in an interactive prompt, Mutt would block until input is present. Depending on the context, this would prevent certain operations from working, like checking for new mail or keeping an IMAP connection alive.

This variable controls how many seconds Mutt will at most wait until it aborts waiting for input, performs these operations and continues to wait for input.

A value of zero or less will cause Mutt to never time out.

3.399. tmpdir

Type: path
Default: (empty)

This variable allows you to specify where Mutt will place its temporary files needed for displaying and composing messages. If this variable is not set, the environment variable $TMPDIR is used. If $TMPDIR is not set then “/tmp†is used.

3.400. to_chars

Type: string
Default: “ +TCFLâ€

Controls the character used to indicate mail addressed to you. The first character is the one used when the mail is not addressed to your address. The second is used when you are the only recipient of the message. The third is when your address appears in the “To:†header field, but you are not the only recipient of the message. The fourth character is used when your address is specified in the “Cc:†header field, but you are not the only recipient. The fifth character is used to indicate mail that was sent by you. The sixth character is used to indicate when a mail was sent to a mailing-list you subscribe to.

3.401. trash

Type: path
Default: (empty)

If set, this variable specifies the path of the trash folder where the mails marked for deletion will be moved, instead of being irremediably purged.

NOTE: When you delete a message in the trash folder, it is really deleted, so that you have a way to clean the trash.

3.402. ts_icon_format

Type: string (localized)
Default: “M%?n?AIL&ail?â€

Controls the format of the icon title, as long as “$ts_enabled†is set. This string is identical in formatting to the one used by “$status_formatâ€.

3.403. ts_enabled

Type: boolean
Default: no

Controls whether mutt tries to set the terminal status line and icon name. Most terminal emulators emulate the status line in the window title.

3.404. ts_status_format

Type: string (localized)
Default: “Mutt with %?m?%m messages&no messages?%?n? [%n NEW]?â€

Controls the format of the terminal status line (or window title), provided that “$ts_enabled†has been set. This string is identical in formatting to the one used by “$status_formatâ€.

3.405. tunnel

Type: string
Default: (empty)

Setting this variable will cause mutt to open a pipe to a command instead of a raw socket. You may be able to use this to set up preauthenticated connections to your IMAP/POP3/SMTP server. Example:

set tunnel="ssh -q mailhost.net /usr/local/libexec/imapd"

Note: For this example to work you must be able to log in to the remote machine without having to enter a password.

When set, Mutt uses the tunnel for all remote connections. Please see “account-hook†in the manual for how to use different tunnel commands per connection.

3.406. tunnel_is_secure

Type: boolean
Default: yes

When set, Mutt will assume the $tunnel connection does not need STARTTLS to be enabled. It will also allow IMAP PREAUTH server responses inside a tunnel to proceed. This is appropriate if $tunnel uses ssh or directly invokes the server locally.

When unset, Mutt will negotiate STARTTLS according to the ssl_starttls and ssl_force_tls variables. If ssl_force_tls is set, Mutt will abort connecting if an IMAP server responds with PREAUTH. This setting is appropriate if $tunnel does not provide security and could be tampered with by attackers.

3.407. uncollapse_jump

Type: boolean
Default: no

When set, Mutt will jump to the next unread message, if any, when the current thread is uncollapsed.

3.408. uncollapse_new

Type: boolean
Default: yes

When set, Mutt will automatically uncollapse any collapsed thread that receives a newly delivered message. When unset, collapsed threads will remain collapsed. The presence of the newly delivered message will still affect index sorting, though.

3.409. use_8bitmime

Type: boolean
Default: no

Warning: do not set this variable unless you are using a version of sendmail which supports the -B8BITMIME flag (such as sendmail 8.8.x) or you may not be able to send mail.

When set, Mutt will invoke $sendmail with the -B8BITMIME flag when sending 8-bit messages to enable ESMTP negotiation.

3.410. use_domain

Type: boolean
Default: yes

When set, Mutt will qualify all local addresses (ones without the “@host†portion) with the value of $hostname. If unset, no addresses will be qualified.

3.411. use_envelope_from

Type: boolean
Default: no

When set, mutt will set the envelope sender of the message. If $envelope_from_address is set, it will be used as the sender address. If unset, mutt will attempt to derive the sender from the “From:†header.

Note that this information is passed to sendmail command using the -f command line switch. Therefore setting this option is not useful if the $sendmail variable already contains -f or if the executable pointed to by $sendmail doesn't support the -f switch.

3.412. use_from

Type: boolean
Default: yes

When set, Mutt will generate the “From:†header field when sending messages. If unset, no “From:†header field will be generated unless the user explicitly sets one using the “my_hdr†command.

3.413. use_ipv6

Type: boolean
Default: yes

When set, Mutt will look for IPv6 addresses of hosts it tries to contact. If this option is unset, Mutt will restrict itself to IPv4 addresses. Normally, the default should work.

3.414. user_agent

Type: boolean
Default: no

When set, mutt will add a “User-Agent:†header to outgoing messages, indicating which version of mutt was used for composing them.

3.415. visual

Type: path
Default: (empty)

Specifies the visual editor to invoke when the “~v†command is given in the built-in editor.

3.416. wait_key

Type: boolean
Default: yes

Controls whether Mutt will ask you to press a key after an external command has been invoked by these functions: <shell-escape>, <pipe-message>, <pipe-entry>, <print-message>, and <print-entry> commands.

It is also used when viewing attachments with “auto_viewâ€, provided that the corresponding mailcap entry has a needsterminal flag, and the external program is interactive.

When set, Mutt will always ask for a key. When unset, Mutt will wait for a key only if the external command returned a non-zero status.

3.417. weed

Type: boolean
Default: yes

When set, mutt will weed headers when displaying, forwarding, or replying to messages.

Also see $copy_decode_weed, $pipe_decode_weed, $print_decode_weed.

3.418. wrap

Type: number
Default: 0

When set to a positive value, mutt will wrap text at $wrap characters. When set to a negative value, mutt will wrap text so that there are $wrap characters of empty space on the right side of the terminal. Setting it to zero makes mutt wrap at the terminal width.

Also see $reflow_wrap.

3.419. wrap_headers

Type: number
Default: 78

This option specifies the number of characters to use for wrapping an outgoing message's headers. Allowed values are between 78 and 998 inclusive.

Note: This option usually shouldn't be changed. RFC5233 recommends a line length of 78 (the default), so please only change this setting when you know what you're doing.

3.420. wrap_search

Type: boolean
Default: yes

Controls whether searches wrap around the end.

When set, searches will wrap around the first (or last) item. When unset, incremental searches will not wrap.

3.421. wrapmargin

Type: number
Default: 0

(DEPRECATED) Equivalent to setting $wrap with a negative value.

3.422. write_bcc

Type: boolean
Default: no

Controls whether mutt writes out the “Bcc:†header when preparing messages to be sent. Some MTAs, such as Exim and Courier, do not strip the “Bcc:†header; so it is advisable to leave this unset unless you have a particular need for the header to be in the sent message.

If mutt is set to deliver directly via SMTP (see $smtp_url), this option does nothing: mutt will never write out the “Bcc:†header in this case.

Note this option only affects the sending of messages. Fcc'ed copies of a message will always contain the “Bcc:†header if one exists.

3.423. write_inc

Type: number
Default: 10

When writing a mailbox, a message will be printed every $write_inc messages to indicate progress. If set to 0, only a single message will be displayed before writing a mailbox.

Also see the $read_inc, $net_inc and $time_inc variables and the “tuning†section of the manual for performance considerations.

4. Functions

The following is the list of available functions listed by the mapping in which they are available. The default key setting is given, and an explanation of what the function does. The key bindings of these functions can be changed with the bind command.

4.1. Generic Menu

The generic menu is not a real menu, but specifies common functions (such as movement) available in all menus except for pager and editor. Changing settings for this menu will affect the default bindings for all menus (except as noted).

Table 9.2. Default Generic Menu Bindings

FunctionDefault keyDescription
<bottom-page>Lmove to the bottom of the page
<check-stats> calculate message statistics for all mailboxes
<current-bottom> move entry to bottom of screen
<current-middle> move entry to middle of screen
<current-top> move entry to top of screen
<end-cond> end of conditional execution (noop)
<enter-command>:enter a muttrc command
<error-history> display recent history of error messages
<exit>qexit this menu
<first-entry><Home>move to the first entry
<first-entry>=move to the first entry
<half-down>]scroll down 1/2 page
<half-up>[scroll up 1/2 page
<help>?this screen
<jump>1jump to an index number
<jump>2jump to an index number
<jump>3jump to an index number
<jump>4jump to an index number
<jump>5jump to an index number
<jump>6jump to an index number
<jump>7jump to an index number
<jump>8jump to an index number
<jump>9jump to an index number
<last-entry><End>move to the last entry
<last-entry>*move to the last entry
<middle-page>Mmove to the middle of the page
<next-entry><Down>move to the next entry
<next-entry>jmove to the next entry
<next-line>>scroll down one line
<next-page><Pagedown>move to the next page
<next-page><Right>move to the next page
<next-page>zmove to the next page
<previous-entry><Up>move to the previous entry
<previous-entry>kmove to the previous entry
<previous-line><scroll up one line
<previous-page><Left>move to the previous page
<previous-page><Pageup>move to the previous page
<previous-page>Zmove to the previous page
<refresh>^Lclear and redraw the screen
<search>/search for a regular expression
<search-next>nsearch for next match
<search-opposite> search for next match in opposite direction
<search-reverse>Esc /search backwards for a regular expression
<select-entry><Enter>select the current entry
<select-entry><Keypadenter>select the current entry
<select-entry><Return>select the current entry
<shell-escape>!invoke a command in a subshell
<tag-entry>ttag the current entry
<tag-prefix>;apply next function to tagged messages
<tag-prefix-cond> apply next function ONLY to tagged messages
<top-page>Hmove to the top of the page
<what-key> display the keycode for a key press

4.2. Index Menu

Table 9.3. Default Index Menu Bindings

FunctionDefault keyDescription
<autocrypt-acct-menu>Amanage autocrypt accounts
<background-compose-menu>Blist and select backgrounded compose sessions
<bounce-message>bremail a message to another user
<break-thread>#break the thread in two
<browse-mailboxes>yselect a new mailbox from the browser
<browse-mailboxes-readonly> select a new mailbox from the browser in read only mode
<buffy-list>.list mailboxes with new mail
<change-folder>copen a different folder
<change-folder-readonly>Esc copen a different folder in read only mode
<check-traditional-pgp>Esc Pcheck for classic PGP
<clear-flag>Wclear a status flag from a message
<collapse-all>Esc Vcollapse/uncollapse all threads
<collapse-thread>Esc vcollapse/uncollapse current thread
<compose-to-sender> compose new message to the current message sender
<copy-message>Ccopy a message to a file/mailbox
<create-alias>acreate an alias from a message sender
<decode-copy>Esc Cmake decoded (text/plain) copy
<decode-save>Esc smake decoded copy (text/plain) and delete
<decrypt-copy> make decrypted copy
<decrypt-save> make decrypted copy and delete
<delete-message>ddelete the current entry
<delete-pattern>Ddelete messages matching a pattern
<delete-subthread>Esc ddelete all messages in subthread
<delete-thread>^Ddelete all messages in thread
<display-address>@display full address of sender
<display-message><Enter>display a message
<display-message><Keypadenter>display a message
<display-message><Return>display a message
<display-message><Space>display a message
<display-toggle-weed>hdisplay message and toggle header weeding
<edit>eedit the raw message
<edit-label>Yadd, change, or delete a message's label
<edit-type>^Eedit attachment content type
<exit>xexit this menu
<extract-keys>^Kextract supported public keys
<fetch-mail>Gretrieve mail from POP server
<flag-message>Ftoggle a message's 'important' flag
<forget-passphrase>^Fwipe passphrase(s) from memory
<forward-message>fforward a message with comments
<group-chat-reply> reply to all recipients preserving To/Cc
<group-reply>greply to all recipients
<imap-fetch-mail> force retrieval of mail from IMAP server
<imap-logout-all> logout from all IMAP servers
<limit>lshow only messages matching a pattern
<link-threads>&link tagged message to the current one
<list-action>Esc Lperform mailing list action
<list-reply>Lreply to specified mailing list
<mail>mcompose a new mail message
<mail-key>Esc kmail a PGP public key
<mark-message>~create a hotkey macro for the current message
<next-entry>Jmove to the next entry
<next-new> jump to the next new message
<next-new-then-unread><Tab>jump to the next new or unread message
<next-subthread>Esc njump to the next subthread
<next-thread>^Njump to the next thread
<next-undeleted><Down>move to the next undeleted message
<next-undeleted>jmove to the next undeleted message
<next-unread> jump to the next unread message
<next-unread-mailbox> open next mailbox with new mail
<parent-message>Pjump to parent message in thread
<pipe-message>|pipe message/attachment to a shell command
<previous-entry>Kmove to the previous entry
<previous-new> jump to the previous new message
<previous-new-then-unread>Esc <Tab>jump to the previous new or unread message
<previous-subthread>Esc pjump to previous subthread
<previous-thread>^Pjump to previous thread
<previous-undeleted><Up>move to the previous undeleted message
<previous-undeleted>kmove to the previous undeleted message
<previous-unread> jump to the previous unread message
<print-message>pprint the current entry
<purge-message> delete the current entry, bypassing the trash folder
<query>Qquery external program for addresses
<quit>qsave changes to mailbox and quit
<read-subthread>Esc rmark the current subthread as read
<read-thread>^Rmark the current thread as read
<recall-message>Rrecall a postponed message
<reply>rreply to a message
<resend-message>Esc euse the current message as a template for a new one
<root-message> jump to root message in thread
<save-message>ssave message/attachment to a mailbox/file
<set-flag>wset a status flag on a message
<show-limit>Esc lshow currently active limit pattern
<show-version>Vshow the Mutt version number and date
<sidebar-first> move the highlight to the first mailbox
<sidebar-last> move the highlight to the last mailbox
<sidebar-next> move the highlight to next mailbox
<sidebar-next-new> move the highlight to next mailbox with new mail
<sidebar-open> open highlighted mailbox
<sidebar-page-down> scroll the sidebar down 1 page
<sidebar-page-up> scroll the sidebar up 1 page
<sidebar-prev> move the highlight to previous mailbox
<sidebar-prev-new> move the highlight to previous mailbox with new mail
<sidebar-toggle-visible> make the sidebar (in)visible
<sort-mailbox>osort messages
<sort-reverse>Osort messages in reverse order
<sync-mailbox>$save changes to mailbox
<tag-pattern>Ttag messages matching a pattern
<tag-subthread> tag the current subthread
<tag-thread>Esc ttag the current thread
<toggle-new>Ntoggle a message's 'new' flag
<toggle-write>%toggle whether the mailbox will be rewritten
<undelete-message>uundelete the current entry
<undelete-pattern>Uundelete messages matching a pattern
<undelete-subthread>Esc uundelete all messages in subthread
<undelete-thread>^Uundelete all messages in thread
<untag-pattern>^Tuntag messages matching a pattern
<view-attachments>vshow MIME attachments

4.3. Pager Menu

Table 9.4. Default Pager Menu Bindings

FunctionDefault keyDescription
<background-compose-menu>Blist and select backgrounded compose sessions
<bottom><End>jump to the bottom of the message
<bounce-message>bremail a message to another user
<break-thread>#break the thread in two
<browse-mailboxes>yselect a new mailbox from the browser
<browse-mailboxes-readonly> select a new mailbox from the browser in read only mode
<buffy-list>.list mailboxes with new mail
<change-folder>copen a different folder
<change-folder-readonly>Esc copen a different folder in read only mode
<check-stats> calculate message statistics for all mailboxes
<check-traditional-pgp>Esc Pcheck for classic PGP
<clear-flag>Wclear a status flag from a message
<compose-to-sender> compose new message to the current message sender
<copy-message>Ccopy a message to a file/mailbox
<create-alias>acreate an alias from a message sender
<decode-copy>Esc Cmake decoded (text/plain) copy
<decode-save>Esc smake decoded copy (text/plain) and delete
<decrypt-copy> make decrypted copy
<decrypt-save> make decrypted copy and delete
<delete-message>ddelete the current entry
<delete-subthread>Esc ddelete all messages in subthread
<delete-thread>^Ddelete all messages in thread
<display-address>@display full address of sender
<display-toggle-weed>hdisplay message and toggle header weeding
<edit>eedit the raw message
<edit-label>Yadd, change, or delete a message's label
<edit-type>^Eedit attachment content type
<enter-command>:enter a muttrc command
<error-history> display recent history of error messages
<exit>iexit this menu
<exit>qexit this menu
<exit>xexit this menu
<extract-keys>^Kextract supported public keys
<flag-message>Ftoggle a message's 'important' flag
<forget-passphrase>^Fwipe passphrase(s) from memory
<forward-message>fforward a message with comments
<group-chat-reply> reply to all recipients preserving To/Cc
<group-reply>greply to all recipients
<half-down> scroll down 1/2 page
<half-up> scroll up 1/2 page
<help>?this screen
<imap-fetch-mail> force retrieval of mail from IMAP server
<imap-logout-all> logout from all IMAP servers
<jump>1jump to an index number
<jump>2jump to an index number
<jump>3jump to an index number
<jump>4jump to an index number
<jump>5jump to an index number
<jump>6jump to an index number
<jump>7jump to an index number
<jump>8jump to an index number
<jump>9jump to an index number
<link-threads>&link tagged message to the current one
<list-action>Esc Lperform mailing list action
<list-reply>Lreply to specified mailing list
<mail>mcompose a new mail message
<mail-key>Esc kmail a PGP public key
<mark-as-new>Ntoggle a message's 'new' flag
<next-entry>Jmove to the next entry
<next-line><Enter>scroll down one line
<next-line><Keypadenter>scroll down one line
<next-line><Return>scroll down one line
<next-new> jump to the next new message
<next-new-then-unread><Tab>jump to the next new or unread message
<next-page><Pagedown>move to the next page
<next-page><Space>move to the next page
<next-subthread>Esc njump to the next subthread
<next-thread>^Njump to the next thread
<next-undeleted><Down>move to the next undeleted message
<next-undeleted><Right>move to the next undeleted message
<next-undeleted>jmove to the next undeleted message
<next-unread> jump to the next unread message
<next-unread-mailbox> open next mailbox with new mail
<parent-message>Pjump to parent message in thread
<pipe-message>|pipe message/attachment to a shell command
<previous-entry>Kmove to the previous entry
<previous-line><Backspace>scroll up one line
<previous-new> jump to the previous new message
<previous-new-then-unread> jump to the previous new or unread message
<previous-page><Pageup>move to the previous page
<previous-page>-move to the previous page
<previous-subthread>Esc pjump to previous subthread
<previous-thread>^Pjump to previous thread
<previous-undeleted><Left>move to the previous undeleted message
<previous-undeleted><Up>move to the previous undeleted message
<previous-undeleted>kmove to the previous undeleted message
<previous-unread> jump to the previous unread message
<print-message>pprint the current entry
<purge-message> delete the current entry, bypassing the trash folder
<quit>Qsave changes to mailbox and quit
<read-subthread>Esc rmark the current subthread as read
<read-thread>^Rmark the current thread as read
<recall-message>Rrecall a postponed message
<redraw-screen>^Lclear and redraw the screen
<reply>rreply to a message
<resend-message>Esc euse the current message as a template for a new one
<root-message> jump to root message in thread
<save-message>ssave message/attachment to a mailbox/file
<search>/search for a regular expression
<search-next>nsearch for next match
<search-opposite> search for next match in opposite direction
<search-reverse>Esc /search backwards for a regular expression
<search-toggle>\\toggle search pattern coloring
<set-flag>wset a status flag on a message
<shell-escape>!invoke a command in a subshell
<show-version>Vshow the Mutt version number and date
<sidebar-first> move the highlight to the first mailbox
<sidebar-last> move the highlight to the last mailbox
<sidebar-next> move the highlight to next mailbox
<sidebar-next-new> move the highlight to next mailbox with new mail
<sidebar-open> open highlighted mailbox
<sidebar-page-down> scroll the sidebar down 1 page
<sidebar-page-up> scroll the sidebar up 1 page
<sidebar-prev> move the highlight to previous mailbox
<sidebar-prev-new> move the highlight to previous mailbox with new mail
<sidebar-toggle-visible> make the sidebar (in)visible
<skip-headers>Hskip beyond headers
<skip-quoted>Sskip beyond quoted text
<sort-mailbox>osort messages
<sort-reverse>Osort messages in reverse order
<sync-mailbox>$save changes to mailbox
<tag-message>ttag the current entry
<toggle-quoted>Ttoggle display of quoted text
<toggle-write>%toggle whether the mailbox will be rewritten
<top><Home>jump to the top of the message
<top>^jump to the top of the message
<undelete-message>uundelete the current entry
<undelete-subthread>Esc uundelete all messages in subthread
<undelete-thread>^Uundelete all messages in thread
<view-attachments>vshow MIME attachments
<what-key> display the keycode for a key press

4.4. Alias Menu

Table 9.5. Default Alias Menu Bindings

FunctionDefault keyDescription
<delete-entry>ddelete the current entry
<tag-entry><Space>tag the current entry
<undelete-entry>uundelete the current entry

4.5. Query Menu

Table 9.6. Default Query Menu Bindings

FunctionDefault keyDescription
<create-alias>acreate an alias from a message sender
<mail>mcompose a new mail message
<query>Qquery external program for addresses
<query-append>Aappend new query results to current results

4.6. Attachment Menu

Table 9.7. Default Attachment Menu Bindings

FunctionDefault keyDescription
<bounce-message>bremail a message to another user
<check-traditional-pgp>Esc Pcheck for classic PGP
<collapse-parts>vToggle display of subparts
<compose-to-sender> compose new message to the current message sender
<delete-entry>ddelete the current entry
<display-toggle-weed>hdisplay message and toggle header weeding
<edit-type>^Eedit attachment content type
<extract-keys>^Kextract supported public keys
<forget-passphrase>^Fwipe passphrase(s) from memory
<forward-message>fforward a message with comments
<group-chat-reply> reply to all recipients preserving To/Cc
<group-reply>greply to all recipients
<list-reply>Lreply to specified mailing list
<pipe-entry>|pipe message/attachment to a shell command
<print-entry>pprint the current entry
<reply>rreply to a message
<resend-message>Esc euse the current message as a template for a new one
<save-entry>ssave message/attachment to a mailbox/file
<undelete-entry>uundelete the current entry
<view-attach><Enter>view attachment using mailcap entry if necessary
<view-attach><Keypadenter>view attachment using mailcap entry if necessary
<view-attach><Return>view attachment using mailcap entry if necessary
<view-mailcap>mforce viewing of attachment using mailcap
<view-pager> view attachment in pager using copiousoutput mailcap entry
<view-text>Tview attachment as text

4.7. Compose Menu

Table 9.8. Default Compose Menu Bindings

FunctionDefault keyDescription
<attach-file>aattach file(s) to this message
<attach-key>Esc kattach a PGP public key
<attach-message>Aattach message(s) to this message
<autocrypt-menu>oshow autocrypt compose menu options
<copy-file>Csave message/attachment to a mailbox/file
<detach-file>Ddelete the current entry
<display-toggle-weed>hdisplay message and toggle header weeding
<edit-bcc>bedit the BCC list
<edit-cc>cedit the CC list
<edit-description>dedit attachment description
<edit-encoding>^Eedit attachment transfer-encoding
<edit-fcc>fenter a file to save a copy of this message in
<edit-file>^X eedit the file to be attached
<edit-from>Esc fedit the from field
<edit-headers>Eedit the message with headers
<edit-message>eedit the message
<edit-mime>medit attachment using mailcap entry
<edit-reply-to>redit the Reply-To field
<edit-subject>sedit the subject of this message
<edit-to>tedit the TO list
<edit-type>^Tedit attachment content type
<filter-entry>Ffilter attachment through a shell command
<forget-passphrase>^Fwipe passphrase(s) from memory
<get-attachment>Gget a temporary copy of an attachment
<ispell>irun ispell on the message
<mix>Msend the message through a mixmaster remailer chain
<move-down> move attachment down in compose menu list
<move-up> move attachment up in compose menu list
<new-mime>ncompose new attachment using mailcap entry
<pgp-menu>pshow PGP options
<pipe-entry>|pipe message/attachment to a shell command
<postpone-message>Psave this message to send later
<print-entry>lprint the current entry
<rename-attachment>^Osend attachment with a different name
<rename-file>Rrename/move an attached file
<send-message>ysend the message
<smime-menu>Sshow S/MIME options
<tag-entry>Ttag the current entry
<toggle-disposition>^Dtoggle disposition between inline/attachment
<toggle-recode> toggle recoding of this attachment
<toggle-unlink>utoggle whether to delete file after sending it
<update-encoding>Uupdate an attachment's encoding info
<view-alt>vview multipart/alternative
<view-alt-mailcap>Vview multipart/alternative using mailcap
<view-alt-pager> view multipart/alternative in pager using copiousoutput mailcap entry
<view-alt-text>Esc vview multipart/alternative as text
<view-attach><Enter>view attachment using mailcap entry if necessary
<view-attach><Keypadenter>view attachment using mailcap entry if necessary
<view-attach><Return>view attachment using mailcap entry if necessary
<view-mailcap> force viewing of attachment using mailcap
<view-pager> view attachment in pager using copiousoutput mailcap entry
<view-text> view attachment as text
<write-fcc>wwrite the message to a folder

4.8. Postpone Menu

Table 9.9. Default Postpone Menu Bindings

FunctionDefault keyDescription
<delete-entry>ddelete the current entry
<undelete-entry>uundelete the current entry

4.9. Browser Menu

Table 9.10. Default Browser Menu Bindings

FunctionDefault keyDescription
<buffy-list>.list mailboxes with new mail
<change-dir>cchange directories
<check-new> check mailboxes for new mail
<create-mailbox>Ccreate a new mailbox (IMAP only)
<delete-mailbox>ddelete the current mailbox (IMAP only)
<descend-directory> descend into a directory
<display-filename>@display the currently selected file's name
<enter-mask>menter a file mask
<rename-mailbox>rrename the current mailbox (IMAP only)
<select-new>Nselect a new file in this directory
<sort>osort messages
<sort-reverse>Osort messages in reverse order
<subscribe>ssubscribe to current mailbox (IMAP only)
<toggle-mailboxes><Tab>toggle whether to browse mailboxes or all files
<toggle-subscribed>Ttoggle view all/subscribed mailboxes (IMAP only)
<unsubscribe>uunsubscribe from current mailbox (IMAP only)
<view-file><Space>view file

4.10. Pgp Menu

Table 9.11. Default Pgp Menu Bindings

FunctionDefault keyDescription
<verify-key>cverify a PGP public key
<view-name>%view the key's user id

4.11. Smime Menu

Table 9.12. Default Smime Menu Bindings

FunctionDefault keyDescription
<verify-key>cverify a PGP public key
<view-name>%view the key's user id

4.12. Mixmaster Menu

Table 9.13. Default Mixmaster Menu Bindings

FunctionDefault keyDescription
<accept><Enter>accept the chain constructed
<accept><Keypadenter>accept the chain constructed
<accept><Return>accept the chain constructed
<append>aappend a remailer to the chain
<chain-next><Right>select the next element of the chain
<chain-next>lselect the next element of the chain
<chain-prev><Left>select the previous element of the chain
<chain-prev>hselect the previous element of the chain
<delete>ddelete a remailer from the chain
<insert>iinsert a remailer into the chain
<select-entry><Space>select the current entry

4.13. Editor Menu

Table 9.14. Default Editor Menu Bindings

FunctionDefault keyDescription
<backspace><Backspace>delete the char in front of the cursor
<backspace><Delete>delete the char in front of the cursor
<backward-char><Left>move the cursor one character to the left
<backward-char>^Bmove the cursor one character to the left
<backward-word>Esc bmove the cursor to the beginning of the word
<bol><Home>jump to the beginning of the line
<bol>^Ajump to the beginning of the line
<buffy-cycle><Space>cycle among incoming mailboxes
<capitalize-word>Esc ccapitalize the word
<complete><Tab>complete filename or alias
<complete-query>^Tcomplete address with query
<delete-char>^Ddelete the char under the cursor
<downcase-word>Esc lconvert the word to lower case
<eol><End>jump to the end of the line
<eol>^Ejump to the end of the line
<forward-char><Right>move the cursor one character to the right
<forward-char>^Fmove the cursor one character to the right
<forward-word>Esc fmove the cursor to the end of the word
<history-down><Down>scroll down through the history list
<history-down>^Nscroll down through the history list
<history-search>^Rsearch through the history list
<history-up><Up>scroll up through the history list
<history-up>^Pscroll up through the history list
<kill-eol>^Kdelete chars from cursor to end of line
<kill-eow>Esc ddelete chars from the cursor to the end of the word
<kill-line>^Udelete all chars on the line
<kill-word>^Wdelete the word in front of the cursor
<quote-char>^Vquote the next typed key
<transpose-chars> transpose character under cursor with previous
<upcase-word>Esc uconvert the word to upper case

4.14. Autocrypt Account Menu

Table 9.15. Default Autocrypt Account Menu Bindings

FunctionDefault keyDescription
<create-account>ccreate a new autocrypt account
<delete-account>Ddelete the current account
<toggle-active>atoggle the current account active/inactive
<toggle-prefer-encrypt>ptoggle the current account prefer-encrypt flag

4.15. List Menu

Table 9.16. Default List Menu Bindings

FunctionDefault keyDescription
<list-archive>aretrieve list archive information
<list-help>hretrieve list help
<list-owner>ocontact list owner
<list-post>ppost to mailing list
<list-subscribe>ssubscribe to mailing list
<list-unsubscribe>uunsubscribe from mailing list

Chapter 10. Miscellany

1. Acknowledgements

Kari Hurtta co-developed the original MIME parsing code back in the ELM-ME days.

The following people have been very helpful to the development of Mutt:

2. About This Document

This document was written in DocBook, and then rendered using the Gnome XSLT toolkit.

mutt-2.3.2/doc/index.html0000644000175000017500000010337115173276637013463 0ustar00kjmkjm The Mutt E-Mail Client

The Mutt E-Mail Client

Michael Elkins

version 2.3.2 (31864ba9) (2026-04-26)

Abstract

“All mail clients suck. This one just sucks less.†— me, circa 1995


Table of Contents

1. Introduction
1. Mutt Home Page
2. Mailing Lists
3. Getting Mutt
4. Mutt Online Resources
5. Contributing to Mutt
6. Typographical Conventions
7. Copyright
2. Getting Started
1. Core Concepts
2. Screens and Menus
2.1. Index
2.2. Pager
2.3. File Browser
2.4. Sidebar
2.5. Help
2.6. Compose Menu
2.7. Alias Menu
2.8. Attachment Menu
2.9. List Menu
3. Moving Around in Menus
4. Editing Input Fields
4.1. Introduction
4.2. Buffy Cycle
4.3. History
5. Reading Mail
5.1. The Message Index
5.2. The Pager
5.3. Threaded Mode
5.4. Miscellaneous Functions
6. Sending Mail
6.1. Introduction
6.2. Editing the Message Header
6.3. Sending Cryptographically Signed/Encrypted Messages
6.4. Sending Format=Flowed Messages
6.5. Background Editing
7. Forwarding and Bouncing Mail
8. Postponing Mail
9. Encryption and Signing
9.1. OpenPGP Configuration
9.2. S/MIME Configuration
3. Configuration
1. Location of Initialization Files
2. Starter Muttrc
3. Syntax of Initialization Files
4. Address Groups
5. Defining/Using Aliases
6. Changing the Default Key Bindings
6.1. Terminal Keybindings
6.2. Enter versus Return
7. Changing the current working directory
8. Defining Aliases for Character Sets
9. Setting Variables Based Upon Mailbox
10. Keyboard Macros
11. Using Color and Mono Video Attributes
12. Message Header Display
12.1. Header Display
12.2. Selecting Headers
12.3. Ordering Displayed Headers
13. Alternative Addresses
14. Mailing Lists
15. Using Multiple Spool Mailboxes
16. Monitoring Incoming Mail
17. User-Defined Headers
18. Specify Default Save Mailbox
19. Specify Default Fcc: Mailbox When Composing
20. Specify Default Save Filename and Default Fcc: Mailbox at Once
21. Change Settings Based Upon Message Recipients
22. Change Settings Before Formatting a Message
23. Choosing the Cryptographic Key of the Recipient
24. Dynamically Changing $index_format using Patterns
25. Adding Key Sequences to the Keyboard Buffer
26. Executing Functions
27. Message Scoring
28. Spam Detection
29. Setting and Querying Variables
29.1. Variable Types
29.2. Commands
29.3. User-Defined Variables
29.4. Type Conversions
30. Reading Initialization Commands From Another File
31. Removing Hooks
32. Format Strings
32.1. Basic usage
32.2. Conditionals
32.3. Filters
32.4. Padding
32.5. Bytes size display
33. Control allowed header fields in a mailto: URL
4. Advanced Usage
1. Character Set Handling
2. Regular Expressions
3. Patterns: Searching, Limiting and Tagging
3.1. Pattern Modifier
3.2. Simple Searches
3.3. Nesting and Boolean Operators
3.4. Searching by Date
4. Marking Messages
5. Using Tags
6. Using Hooks
6.1. Message Matching in Hooks
6.2. Mailbox Matching in Hooks
7. Managing the Environment
8. External Address Queries
9. Mailbox Formats
10. Mailbox Shortcuts
11. Handling Mailing Lists
12. Display Munging
13. New Mail Detection
13.1. How New Mail Detection Works
13.2. Polling For New Mail
13.3. Monitoring New Mail
13.4. Calculating Mailbox Message Counts
14. Editing Threads
14.1. Linking Threads
14.2. Breaking Threads
15. Delivery Status Notification (DSN) Support
16. Start a WWW Browser on URLs
17. Echoing Text
18. Message Composition Flow
19. Batch Composition Flow
20. Using MuttLisp (EXPERIMENTAL)
20.1. Running a command generated by MuttLisp
20.2. Interpolating MuttLisp in a Command Argument
20.3. MuttLisp Syntax
20.4. MuttLisp Functions
20.5. Examples
21. Miscellany
5. Mutt's MIME Support
1. Using MIME in Mutt
1.1. MIME Overview
1.2. Viewing MIME Messages in the Pager
1.3. The Attachment Menu
1.4. The Compose Menu
2. MIME Type Configuration with mime.types
3. MIME Viewer Configuration with Mailcap
3.1. The Basics of the Mailcap File
3.2. Secure Use of Mailcap
3.3. Advanced Mailcap Usage
3.4. Example Mailcap Files
4. MIME Autoview
5. MIME Multipart/Alternative
6. Attachment Searching and Counting
7. MIME Lookup
6. Optional Features
1. General Notes
1.1. Enabling/Disabling Features
1.2. URL Syntax
2. SSL/TLS Support
2.1. STARTTLS
2.2. Tunnel
3. POP3 Support
4. IMAP Support
4.1. The IMAP Folder Browser
4.2. Authentication
5. SMTP Support
6. OAUTHBEARER Support
6.1. XOAUTH2 Support
7. Managing Multiple Accounts
8. Local Caching
8.1. Header Caching
8.2. Body Caching
8.3. Cache Directories
8.4. Maintenance
9. Exact Address Generation
10. Sending Anonymous Messages via Mixmaster
11. Sidebar
11.1. Introduction
11.2. Variables
11.3. Functions
11.4. Commands
11.5. Colors
11.6. Sort
11.7. See Also
12. Compressed Folders Feature
12.1. Introduction
12.2. Commands
13. Autocrypt
13.1. Requirements
13.2. First Run
13.3. Compose Menu
13.4. Account Management
13.5. Alternative Key and Keyring Strategies
7. Security Considerations
1. Passwords
2. Temporary Files
3. Information Leaks
3.1. mailto:-style Links
4. External Applications
8. Performance Tuning
1. Reading and Writing Mailboxes
2. Reading Messages from Remote Folders
3. Searching and Limiting
9. Reference
1. Command-Line Options
2. Configuration Commands
3. Configuration Variables
4. Functions
4.1. Generic Menu
4.2. Index Menu
4.3. Pager Menu
4.4. Alias Menu
4.5. Query Menu
4.6. Attachment Menu
4.7. Compose Menu
4.8. Postpone Menu
4.9. Browser Menu
4.10. Pgp Menu
4.11. Smime Menu
4.12. Mixmaster Menu
4.13. Editor Menu
4.14. Autocrypt Account Menu
4.15. List Menu
10. Miscellany
1. Acknowledgements
2. About This Document
mutt-2.3.2/doc/intro.html0000644000175000017500000002624615173276636013513 0ustar00kjmkjm Chapter 1. Introduction

Chapter 1. Introduction

Mutt is a small but very powerful text-based MIME mail client. Mutt is highly configurable, and is well suited to the mail power user with advanced features like key bindings, keyboard macros, mail threading, regular expression searches and a powerful pattern matching language for selecting groups of messages.

1. Mutt Home Page

The official homepage can be found at http://www.mutt.org/.

2. Mailing Lists

To subscribe to one of the following mailing lists, send a message with the word subscribe in the body to list-name-request@mutt.org.

All messages posted to mutt-announce are automatically forwarded to mutt-users, so you do not need to be subscribed to both lists.

NOTE: You MUST be subscribed to a list in order to post to it. This is not to make your life harder, but to reduce SPAM and/or UCE. The mailing list software being used is GNU Mailman, with its implied deficiencies.

3. Getting Mutt

Mutt releases can be downloaded from ftp://ftp.mutt.org/pub/mutt/. For a list of mirror sites, please refer to http://www.mutt.org/download.html.

For version control access, please refer to the Mutt development site.

4. Mutt Online Resources

Bug Tracking System

The official Mutt bug tracking system (not for feature requests) can be found at https://gitlab.com/muttmua/mutt/issues

Wiki

An (unofficial) wiki can be found at https://gitlab.com/muttmua/mutt/wikis/home.

IRC

For the IRC user community, visit channel #mutt on irc.libera.chat.

USENET

For USENET, see the newsgroup comp.mail.mutt.

5. Contributing to Mutt

There are various ways to contribute to the Mutt project.

Especially for new users it may be helpful to meet other new and experienced users to chat about Mutt, talk about problems and share tricks.

Since translations of Mutt into other languages are highly appreciated, the Mutt developers always look for skilled translators that help improve and continue to maintain stale translations.

For contributing code patches for new features and bug fixes, please refer to the developer pages at https://gitlab.com/muttmua/mutt for more details.

6. Typographical Conventions

This section lists typographical conventions followed throughout this manual. See table Table 1.1, “Typographical conventions for special terms†for typographical conventions for special terms.

Table 1.1. Typographical conventions for special terms

ItemRefers to...
printf(3)UNIX manual pages, execute man 3 printf
<PageUp>named keys
<create-alias>named Mutt function
^GControl+G key combination
$mail_checkMutt configuration option
$HOMEenvironment variable

Examples are presented as:

mutt -v

Within command synopsis, curly brackets (“{}â€) denote a set of options of which one is mandatory, square brackets (“[]â€) denote optional arguments, three dots denote that the argument may be repeated arbitrary times.

7. Copyright

Mutt is Copyright © 1996-2026 Michael R. Elkins and others.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

mutt-2.3.2/doc/gettingstarted.html0000644000175000017500000026753215173276637015416 0ustar00kjmkjm Chapter 2. Getting Started

Chapter 2. Getting Started

This section is intended as a brief overview of how to use Mutt. There are many other features which are described elsewhere in the manual. There is even more information available in the Mutt FAQ and various web pages. See the Mutt homepage for more details.

The keybindings described in this section are the defaults as distributed. Your local system administrator may have altered the defaults for your site. You can always type “?†in any menu to display the current bindings.

The first thing you need to do is invoke Mutt, simply by typing mutt at the command line. There are various command-line options, see either the Mutt man page or the reference.

1. Core Concepts

Mutt is a text-based application which interacts with users through different menus which are mostly line-/entry-based or page-based. A line-based menu is the so-called “index†menu (listing all messages of the currently opened folder) or the “alias†menu (allowing you to select recipients from a list). Examples for page-based menus are the “pager†(showing one message at a time) or the “help†menu listing all available key bindings.

The user interface consists of a context sensitive help line at the top, the menu's contents followed by a context sensitive status line and finally the command line. The command line is used to display informational and error messages as well as for prompts and for entering interactive commands.

Mutt is configured through variables which, if the user wants to permanently use a non-default value, are written to configuration files. Mutt supports a rich config file syntax to make even complex configuration files readable and commentable.

Because Mutt allows for customizing almost all key bindings, there are so-called “functions†which can be executed manually (using the command line) or in macros. Macros allow the user to bind a sequence of commands to a single key or a short key sequence instead of repeating a sequence of actions over and over.

Many commands (such as saving or copying a message to another folder) can be applied to a single message or a set of messages (so-called “tagged†messages). To help selecting messages, Mutt provides a rich set of message patterns (such as recipients, sender, body contents, date sent/received, etc.) which can be combined into complex expressions using the boolean and and or operations as well as negating. These patterns can also be used to (for example) search for messages or to limit the index to show only matching messages.

Mutt supports a “hook†concept which allows the user to execute arbitrary configuration commands and functions in certain situations such as entering a folder, starting a new message or replying to an existing one. These hooks can be used to highly customize Mutt's behavior including managing multiple identities, customizing the display for a folder or even implementing auto-archiving based on a per-folder basis and much more.

Besides an interactive mode, Mutt can also be used as a command-line tool to send messages. It also supports a mailx(1)-compatible interface, see Table 9.1, “Command line options†for a complete list of command-line options.

2. Screens and Menus

2.1. Index

The index is the screen that you usually see first when you start Mutt. It gives an overview over your emails in the currently opened mailbox. By default, this is your system mailbox. The information you see in the index is a list of emails, each with its number on the left, its flags (new email, important email, email that has been forwarded or replied to, tagged email, ...), the date when email was sent, its sender, the email size, and the subject. Additionally, the index also shows thread hierarchies: when you reply to an email, and the other person replies back, you can see the other person's email in a "sub-tree" below. This is especially useful for personal email between a group of people or when you've subscribed to mailing lists.

2.2. Pager

The pager is responsible for showing the email content. On the top of the pager you have an overview over the most important email headers like the sender, the recipient, the subject, and much more information. How much information you actually see depends on your configuration, which we'll describe below.

Below the headers, you see the email body which usually contains the message. If the email contains any attachments, you will see more information about them below the email body, or, if the attachments are text files, you can view them directly in the pager.

To give the user a good overview, it is possible to configure Mutt to show different things in the pager with different colors. Virtually everything that can be described with a regular expression can be colored, e.g. URLs, email addresses or smileys.

2.3. File Browser

The file browser is the interface to the local or remote file system. When selecting a mailbox to open, the browser allows custom sorting of items, limiting the items shown by a regular expression and a freely adjustable format of what to display in which way. It also allows for easy navigation through the file system when selecting file(s) to attach to a message, select multiple files to attach and many more.

Some mail systems can nest mail folders inside other mail folders. The normal open entry commands in mutt will open the mail folder and you can't see the sub-folders. If you instead use the <descend-directory> function it will go into the directory and not open it as a mail directory.

2.4. Sidebar

The Sidebar shows a list of all your mailboxes. The list can be turned on and off, it can be themed and the list style can be configured.

2.5. Help

The help screen is meant to offer a quick help to the user. It lists the current configuration of key bindings and their associated commands including a short description, and currently unbound functions that still need to be associated with a key binding (or alternatively, they can be called via the Mutt command prompt).

2.6. Compose Menu

The compose menu features a split screen containing the information which really matter before actually sending a message by mail: who gets the message as what (recipients and who gets what kind of copy). Additionally, users may set security options like deciding whether to sign, encrypt or sign and encrypt a message with/for what keys. Also, it's used to attach messages, to re-edit any attachment including the message itself.

2.7. Alias Menu

The alias menu is used to help users finding the recipients of messages. For users who need to contact many people, there's no need to remember addresses or names completely because it allows for searching, too. The alias mechanism and thus the alias menu also features grouping several addresses by a shorter nickname, the actual alias, so that users don't have to select each single recipient manually.

2.8. Attachment Menu

As will be later discussed in detail, Mutt features a good and stable MIME implementation, that is, it supports sending and receiving messages of arbitrary MIME types. The attachment menu displays a message's structure in detail: what content parts are attached to which parent part (which gives a true tree structure), which type is of what type and what size. Single parts may saved, deleted or modified to offer great and easy access to message's internals.

2.9. List Menu

The list menu assists with operations on mailing lists. RFC 2369 defines several interactions with mailing lists and list memberships that can be specified within the email message: subscribe, unsubscribe, contact the list owner, etc. When you invoke the list menu, these interactions are made accessible as menu options.

3. Moving Around in Menus

The most important navigation keys common to line- or entry-based menus are shown in Table 2.1, “Most common navigation keys in entry-based menus†and in Table 2.2, “Most common navigation keys in page-based menus†for page-based menus.

Table 2.1. Most common navigation keys in entry-based menus

KeyFunctionDescription
j or <Down><next-entry>move to the next entry
k or <Up><previous-entry>move to the previous entry
z or <PageDn><page-down>go to the next page
Z or <PageUp><page-up>go to the previous page
= or <Home><first-entry>jump to the first entry
* or <End><last-entry>jump to the last entry
q<quit>exit the current menu
?<help>list all keybindings for the current menu

Table 2.2. Most common navigation keys in page-based menus

KeyFunctionDescription
J or <Return><next-line>scroll down one line
<Backspace><previous-line>scroll up one line
K, <Space> or <PageDn><next-page>move to the next page
- or <PageUp><previous-page>move the previous page
<Home><top>move to the top
<End><bottom>move to the bottom

4. Editing Input Fields

4.1. Introduction

Mutt has a built-in line editor for inputting text, e.g. email addresses or filenames. The keys used to manipulate text input are very similar to those of Emacs. See Section 4.13, “Editor Menu†for a full reference of available functions, their default key bindings, and short descriptions.

Table 2.3. Most common line editor keys

KeyFunctionDescription
^A or <Home><bol>move to the start of the line
^B or <Left><backward-char>move back one char
Esc B<backward-word>move back one word
<Space><buffy-cycle>cycle among incoming mailboxes
^D or <Delete><delete-char>delete the char under the cursor
^E or <End><eol>move to the end of the line
^F or <Right><forward-char>move forward one char
Esc F<forward-word>move forward one word
<Tab><complete>complete filename, alias, or label
^T<complete-query>complete address with query
^K<kill-eol>delete to the end of the line
Esc d<kill-eow>delete to the end of the word
^W<kill-word>kill the word in front of the cursor
^U<kill-line>delete entire line
^V<quote-char>quote the next typed key
<Up><history-up>recall previous string from history
<Down><history-down>recall next string from history
^R<history-search>use current input to search history
<BackSpace><backspace>kill the char in front of the cursor
Esc u<upcase-word>convert word to upper case
Esc l<downcase-word>convert word to lower case
Esc c<capitalize-word>capitalize the word
^Gn/aabort
<Return>n/afinish editing

^G is the generic “abort†key in Mutt. In addition to the line editor, it can also be used to abort prompts. Generally, typing ^G at a confirmation prompt or line editor should abort the entire action.

You can remap the editor functions using the bind command. For example, to make the <Delete> key delete the character in front of the cursor rather than under, you could use:

bind editor <delete> backspace

4.2. Buffy Cycle

The <buffy-cycle> function key binding is enabled in the prompt for <change-folder> or <change-folder-readonly>. Typing the key will cycle through mailboxes with new mail.

In other prompts for a mailbox or a file (such as for saving an attachment), the key binding instead invokes the <complete> function.

In either case, if you need to type the key literally (e.g. you need to enter a file name with a space in it), use the <quote-char> function. For example, with the default key bindings, by typing “^V†and then “<Space>â€.

In all other input fields, the <buffy-cycle> key binding is ignored; typing the key simply adds it to the input field text.

4.3. History

Mutt maintains a history for the built-in editor. The number of items is controlled by the $history variable and can be made persistent using an external file specified using $history_file and $save_history. You may cycle through them at an editor prompt by using the <history-up> and/or <history-down> commands. Mutt will remember the currently entered text as you cycle through history, and will wrap around to the initial entry line.

Mutt maintains several distinct history lists, one for each of the following categories:

  • .muttrc commands

  • addresses and aliases

  • shell commands

  • filenames

  • mailboxes

  • patterns

  • everything else

Mutt automatically filters out consecutively repeated items from the history. If $history_remove_dups is set, all repeated items are removed from the history. It also mimics the behavior of some shells by ignoring items starting with a space. The latter feature can be useful in macros to not clobber the history's valuable entries with unwanted entries.

5. Reading Mail

Similar to many other mail clients, there are two modes in which mail is read in Mutt. The first is a list of messages in the mailbox, which is called the “index†menu in Mutt. The second mode is the display of the message contents. This is called the “pager.â€

The next few sections describe the functions provided in each of these modes.

5.1. The Message Index

Common keys used to navigate through and manage messages in the index are shown in Table 2.4, “Most common message index keysâ€. How messages are presented in the index menu can be customized using the $index_format variable.

Table 2.4. Most common message index keys

KeyDescription
cchange to a different mailbox
Esc cchange to a folder in read-only mode
Ccopy the current message to another mailbox
Esc Cdecode a message and copy it to a folder
Esc sdecode a message and save it to a folder
Ddelete messages matching a pattern
ddelete the current message
Fmark as important
lshow messages matching a pattern
Nmark message as new
ochange the current sort method
Oreverse sort the mailbox
qsave changes and exit
ssave-message
Ttag messages matching a pattern
ttoggle the tag on a message
Esc ttoggle tag on entire message thread
Uundelete messages matching a pattern
uundelete-message
vview-attachments
xabort changes and exit
<Return>display-message
<Tab>jump to the next new or unread message
@show the author's full e-mail address
$save changes to mailbox
/search
Esc /search-reverse
^Lclear and redraw the screen
^Tuntag messages matching a pattern

In addition to who sent the message and the subject, a short summary of the disposition of each message is printed beside the message number. Zero or more of the “flags†in Table 2.5, “Message status flags†may appear, some of which can be turned on or off using these functions: <set-flag> and <clear-flag> bound by default to “w†and “W†respectively.

Furthermore, the flags in Table 2.6, “Message recipient flags†reflect who the message is addressed to. They can be customized with the $to_chars variable.

Table 2.5. Message status flags

FlagDescription
Dmessage is deleted (is marked for deletion)
dmessage has attachments marked for deletion
Kcontains a PGP public key
Nmessage is new
Omessage is old
Pmessage is PGP encrypted
rmessage has been replied to
Smessage is signed, and the signature is successfully verified
smessage is signed
!message is flagged
*message is tagged
nthread contains new messages (only if collapsed)
othread contains old messages (only if collapsed)

Table 2.6. Message recipient flags

FlagDescription
+message is to you and you only
Tmessage is to you, but also to or CC'ed to others
Cmessage is CC'ed to you
Fmessage is from you
Lmessage is sent to a subscribed mailing list

5.2. The Pager

By default, Mutt uses its built-in pager to display the contents of messages (an external pager such as less(1) can be configured, see $pager variable). The pager is very similar to the Unix program less(1) though not nearly as featureful.

Table 2.7. Most common pager keys

KeyDescription
<Return>go down one line
<Space>display the next page (or next message if at the end of a message)
-go back to the previous page
nsearch for next match
Sskip beyond quoted text
Ttoggle display of quoted text
?show keybindings
/regular expression search
Esc /backward regular expression search
\toggle highlighting of search matches
^jump to the top of the message

In addition to key bindings in Table 2.7, “Most common pager keysâ€, many of the functions from the index menu are also available in the pager, such as <delete-message> or <copy-message> (this is one advantage over using an external pager to view messages).

Also, the internal pager supports a couple other advanced features. For one, it will accept and translate the “standard†nroff sequences for bold and underline. These sequences are a series of either the letter, backspace (“^Hâ€), the letter again for bold or the letter, backspace, “_†for denoting underline. Mutt will attempt to display these in bold and underline respectively if your terminal supports them. If not, you can use the bold and underline color objects to specify a color or mono attribute for them.

Additionally, the internal pager supports the ANSI escape sequences for character attributes. Mutt translates them into the correct color and character settings. The sequences Mutt supports are:

\e[Ps;Ps;..Ps;m

where Ps can be one of the codes shown in Table 2.8, “ANSI escape sequencesâ€.

Table 2.8. ANSI escape sequences

Escape codeDescription
0All attributes off
1Bold on
4Underline on
5Blink on
7Reverse video on
3<color>Foreground color is <color> (see Table 2.9, “Color sequencesâ€)
4<color>Background color is <color> (see Table 2.9, “Color sequencesâ€)
38;5;<color>Foreground color is an 8-bit <color>
48;5;<color>Background color is an 8-bit <color>

Table 2.9. Color sequences

Color codeColor
0Black
1Red
2Green
3Yellow
4Blue
5Magenta
6Cyan
7White

Mutt uses these attributes for handling text/enriched messages, and they can also be used by an external autoview script for highlighting purposes.

Note

If you change the colors for your display, for example by changing the color associated with color2 for your xterm, then that color will be used instead of green.

Note

Note that the search commands in the pager take regular expressions, which are not quite the same as the more complex patterns used by the search command in the index. This is because patterns are used to select messages by criteria whereas the pager already displays a selected message.

5.3. Threaded Mode

So-called “threads†provide a hierarchy of messages where replies are linked to their parent message(s). This organizational form is extremely useful in mailing lists where different parts of the discussion diverge. Mutt displays threads as a tree structure.

In Mutt, when a mailbox is sorted by threads, there are a few additional functions available in the index and pager modes as shown in Table 2.10, “Most common thread mode keysâ€.

Table 2.10. Most common thread mode keys

KeyFunctionDescription
^D<delete-thread>delete all messages in the current thread
^U<undelete-thread>undelete all messages in the current thread
^N<next-thread>jump to the start of the next thread
^P<previous-thread>jump to the start of the previous thread
^R<read-thread>mark the current thread as read
Esc d<delete-subthread>delete all messages in the current subthread
Esc u<undelete-subthread>undelete all messages in the current subthread
Esc n<next-subthread>jump to the start of the next subthread
Esc p<previous-subthread>jump to the start of the previous subthread
Esc r<read-subthread>mark the current subthread as read
Esc t<tag-thread>toggle the tag on the current thread
Esc v<collapse-thread>toggle collapse for the current thread
Esc V<collapse-all>toggle collapse for all threads
P<parent-message>jump to parent message in thread

In the index, the subject of threaded children messages will be prepended with thread tree characters. By default, the subject itself will not be duplicated unless $hide_thread_subject is unset. Special characters will be added to the thread tree as detailed in Table 2.11, “Special Thread Charactersâ€.

Table 2.11. Special Thread Characters

CharacterDescriptionNotes
&hidden messagesee $hide_limited and $hide_top_limited
?missing messagesee $hide_missing and $hide_top_missing
*pseudo threadsee $strict_threads; not displayed when $narrow_tree is set
=duplicate threadsee $duplicate_threads; not displayed when $narrow_tree is set

Collapsing a thread displays only the first message in the thread and hides the others. This is useful when threads contain so many messages that you can only see a handful of threads on the screen. See %M in $index_format. For example, you could use “%?M?(#%03M)&(%4l)?†in $index_format to optionally display the number of hidden messages if the thread is collapsed. The %?<char>?<if-part>&<else-part>? syntax is explained in detail in format string conditionals.

Technically, every reply should contain a list of its parent messages in the thread tree, but not all do. In these cases, Mutt groups them by subject which can be controlled using the $strict_threads variable.

5.4. Miscellaneous Functions

In addition, the index and pager menus have these interesting functions:

<check-stats>

Calculate statistics for all monitored mailboxes declared using the mailboxes command. It will calculate statistics despite $mail_check_stats being unset.

<create-alias> (default: a)

Creates a new alias based upon the current message (or prompts for a new one). Once editing is complete, an alias command is added to the file specified by the $alias_file variable for future use

Note

Mutt does not read the $alias_file upon startup so you must explicitly source the file.

<check-traditional-pgp> (default: Esc P)

This function will search the current message for content signed or encrypted with PGP the “traditional†way, that is, without proper MIME tagging. Technically, this function will temporarily change the MIME content types of the body parts containing PGP data; this is similar to the <edit-type> function's effect.

<edit> (default: e)

This command (available in the index and pager) allows you to edit the raw current message as it's present in the mail folder. After you have finished editing, the changed message will be appended to the current folder, and the original message will be marked for deletion; if the message is unchanged it won't be replaced.

<edit-type> (default: ^E on the attachment menu, and in the pager and index menus; ^T on the compose menu)

This command is used to temporarily edit an attachment's content type to fix, for instance, bogus character set parameters. When invoked from the index or from the pager, you'll have the opportunity to edit the top-level attachment's content type. On the attachment menu, you can change any attachment's content type. These changes are not persistent, and get lost upon changing folders.

Note that this command is also available on the compose menu. There, it's used to fine-tune the properties of attachments you are going to send.

<enter-command> (default: “:â€)

This command is used to execute any command you would normally put in a configuration file. A common use is to check the settings of variables, or in conjunction with macros to change settings on the fly.

<extract-keys> (default: ^K)

This command extracts PGP public keys from the current or tagged message(s) and adds them to your PGP public key ring.

<forget-passphrase> (default: ^F)

This command wipes the passphrase(s) from memory. It is useful, if you misspelled the passphrase.

<list-reply> (default: L)

Reply to the current or tagged message(s) by extracting any addresses which match the regular expressions given by the lists or subscribe commands, but also honor any Mail-Followup-To header(s) if the $honor_followup_to configuration variable is set. In addition, the List-Post header field is examined for mailto: URLs specifying a mailing list address. Using this when replying to messages posted to mailing lists helps avoid duplicate copies being sent to the author of the message you are replying to.

<pipe-message> (default: |)

Asks for an external Unix command and pipes the current or tagged message(s) to it. The variables $pipe_decode, $pipe_decode_weed, $pipe_split, $pipe_sep and $wait_key control the exact behavior of this function.

<resend-message> (default: Esc e)

Mutt takes the current message as a template for a new message. This function is best described as "recall from arbitrary folders". It can conveniently be used to forward MIME messages while preserving the original mail structure. Note that the amount of headers included here depends on the value of the $weed variable.

This function is also available from the attachment menu. You can use this to easily resend a message which was included with a bounce message as a message/rfc822 body part.

<shell-escape> (default: !)

Asks for an external Unix command and executes it. The $wait_key can be used to control whether Mutt will wait for a key to be pressed when the command returns (presumably to let the user read the output of the command), based on the return status of the named command. If no command is given, an interactive shell is executed.

<skip-headers> (default: H)

This function will skip past the headers of the current message.

<skip-quoted> (default: S)

This function will go to the next line of non-quoted text which comes after a line of quoted text in the internal pager.

<toggle-quoted> (default: T)

The pager uses the $quote_regexp variable to detect quoted text when displaying the body of the message. This function toggles the display of the quoted material in the message. It is particularly useful when being interested in just the response and there is a large amount of quoted text in the way.

6. Sending Mail

6.1. Introduction

The bindings shown in Table 2.12, “Most common mail sending keys†are available in the index and pager to start a new message.

Table 2.12. Most common mail sending keys

KeyFunctionDescription
m<mail>compose a new message
r<reply>reply to sender
g<group-reply>reply to all recipients
 <group-chat-reply>reply to all recipients preserving To/Cc
L<list-reply>reply to mailing list address
f<forward>forward message
b<bounce>bounce (remail) message
Esc k<mail-key>mail a PGP public key to someone

Bouncing a message sends the message as-is to the recipient you specify. Forwarding a message allows you to add comments or modify the message you are forwarding. These items are discussed in greater detail in the next section “Forwarding and Bouncing Mail.â€

Mutt will then enter the compose menu and prompt you for the recipients to place on the “To:†header field when you hit m to start a new message. Next, it will ask you for the “Subject:†field for the message, providing a default if you are replying to or forwarding a message. You again have the chance to adjust recipients, subject, and security settings right before actually sending the message. See also $askcc, $askbcc, $autoedit, $bounce, $fast_reply, and $include for changing how and if Mutt asks these questions.

When replying, Mutt fills these fields with proper values depending on the reply type. The types of replying supported are:

Simple reply

Reply to the author directly.

Group reply

Reply to the author; cc all other recipients; consults alternates and excludes you.

Group Chat reply

Reply to the author and other recipients in the To list; cc other recipients in the Cc list; consults alternates and excludes you.

List reply

Reply to all mailing list addresses found, either specified via configuration or auto-detected. See Section 14, “Mailing Lists†for details.

After getting recipients for new messages, forwards or replies, Mutt will then automatically start your $editor on the message body. If the $edit_headers variable is set, the headers will be at the top of the message in your editor; the message body should start on a new line after the existing blank line at the end of headers. Any messages you are replying to will be added in sort order to the message, with appropriate $attribution, $indent_string and $post_indent_string. When forwarding a message, if the $mime_forward variable is unset, a copy of the forwarded message will be included. If you have specified a $signature, it will be appended to the message.

Once you have finished editing the body of your mail message, you are returned to the compose menu providing the functions shown in Table 2.13, “Most common compose menu keys†to modify, send or postpone the message.

Table 2.13. Most common compose menu keys

KeyFunctionDescription
a<attach-file>attach a file
A<attach-message>attach message(s) to the message
Esc k<attach-key>attach a PGP public key
d<edit-description>edit description on attachment
D<detach-file>detach a file
t<edit-to>edit the To field
Esc f<edit-from>edit the From field
r<edit-reply-to>edit the Reply-To field
c<edit-cc>edit the Cc field
b<edit-bcc>edit the Bcc field
y<send-message>send the message
s<edit-subject>edit the Subject
S<smime-menu>select S/MIME options
f<edit-fcc>specify an “Fcc†mailbox
p<pgp-menu>select PGP options
P<postpone-message>postpone this message until later
q<quit>quit (abort) sending the message
w<write-fcc>write the message to a folder
i<ispell>check spelling (if available on your system)
^F<forget-passphrase>wipe passphrase(s) from memory

The compose menu is also used to edit the attachments for a message which can be either files or other messages. The <attach-message> function to will prompt you for a folder to attach messages from. You can now tag messages in that folder and they will be attached to the message you are sending.

Note

Note that certain operations like composing a new mail, replying, forwarding, etc. are not permitted when you are in that folder. The %r in $status_format will change to a “A†to indicate that you are in attach-message mode.

After exiting the compose menu via <send-message>, the message will be sent. If configured and enabled, this can happen via mixmaster or $smtp_url. Otherwise $sendmail will be invoked. Prior to version 1.13, Mutt enabled $write_bcc by default, assuming the MTA would automatically remove a Bcc: header as part of delivery. Starting with 1.13, the option is unset by default, but no longer affects the fcc copy of the message.

6.2. Editing the Message Header

When editing the header because of $edit_headers being set, there are a several pseudo headers available which will not be included in sent messages but trigger special Mutt behavior.

6.2.1. Fcc: Pseudo Header

If you specify

Fcc: filename

as a header, Mutt will pick up filename just as if you had used the <edit-fcc> function in the compose menu. It can later be changed from the compose menu.

6.2.2. Attach: Pseudo Header

You can also attach files to your message by specifying

Attach: filename [ description ]

where filename is the file to attach and description is an optional string to use as the description of the attached file. Spaces in filenames have to be escaped using backslash (“\â€). The file can be removed as well as more added from the compose menu.

6.2.3. Pgp: Pseudo Header

If you want to use PGP, you can specify

Pgp: [ E | S | S<id> ]

“E†selects encryption, “S†selects signing and “S<id>†selects signing with the given key, setting $pgp_sign_as for the duration of the message composition session. The selection can later be changed in the compose menu.

6.2.4. In-Reply-To: Header

When replying to messages, the In-Reply-To: header contains the Message-Id of the message(s) you reply to. If you remove or modify its value, Mutt will not generate a References: field, which allows you to create a new message thread, for example to create a new message to a mailing list without having to enter the mailing list's address.

If you intend to start a new thread by replying, please make really sure you remove the In-Reply-To: header in your editor. Otherwise, though you'll produce a technically valid reply, some netiquette guardians will be annoyed by this so-called “thread hijackingâ€.

6.3. Sending Cryptographically Signed/Encrypted Messages

If you have told Mutt to PGP or S/MIME encrypt a message, it will guide you through a key selection process when you try to send the message. Mutt will not ask you any questions about keys which have a certified user ID matching one of the message recipients' mail addresses. However, there may be situations in which there are several keys, weakly certified user ID fields, or where no matching keys can be found.

In these cases, you are dropped into a menu with a list of keys from which you can select one. When you quit this menu, or Mutt can't find any matching keys, you are prompted for a user ID. You can, as usually, abort this prompt using ^G. When you do so, Mutt will return to the compose screen.

Once you have successfully finished the key selection, the message will be encrypted using the selected public keys when sent out.

To ensure you can view encrypted messages you have sent, you may wish to set $pgp_self_encrypt and $pgp_default_key for PGP, or $smime_self_encrypt and $smime_default_key for S/MIME.

Most fields of the entries in the key selection menu (see also $pgp_entry_format) have obvious meanings. But some explanations on the capabilities, flags, and validity fields are in order.

The flags sequence (“%fâ€) will expand to one of the flags in Table 2.14, “PGP key menu flagsâ€.

Table 2.14. PGP key menu flags

FlagDescription
RThe key has been revoked and can't be used.
XThe key is expired and can't be used.
dYou have marked the key as disabled.
cThere are unknown critical self-signature packets.

The capabilities field (“%câ€) expands to a two-character sequence representing a key's capabilities. The first character gives the key's encryption capabilities: A minus sign (“-â€) means that the key cannot be used for encryption. A dot (“.â€) means that it's marked as a signature key in one of the user IDs, but may also be used for encryption. The letter “e†indicates that this key can be used for encryption.

The second character indicates the key's signing capabilities. Once again, a “-†implies “not for signingâ€, “.†implies that the key is marked as an encryption key in one of the user-ids, and “s†denotes a key which can be used for signing.

Finally, the validity field (“%tâ€) indicates how well-certified a user-id is. A question mark (“?â€) indicates undefined validity, a minus character (“-â€) marks an untrusted association, a space character means a partially trusted association, and a plus character (“+â€) indicates complete validity.

6.4. Sending Format=Flowed Messages

6.4.1. Concept

format=flowed-style messages (or f=f for short) are text/plain messages that consist of paragraphs which a receiver's mail client may reformat to its own needs which mostly means to customize line lengths regardless of what the sender sent. Technically this is achieved by letting lines of a “flowable†paragraph end in spaces except for the last line.

While for text-mode clients like Mutt it's the best way to assume only a standard 80x25 character cell terminal, it may be desired to let the receiver decide completely how to view a message.

6.4.2. Mutt Support

Mutt only supports setting the required format=flowed MIME parameter on outgoing messages if the $text_flowed variable is set, specifically it does not add the trailing spaces.

After editing, Mutt properly space-stuffs the message. Space-stuffing is required by RfC3676 defining format=flowed and means to prepend a space to:

  • all lines starting with a space

  • lines starting with the word “From†followed by space

  • all lines starting with “>†which is not intended to be a quote character

Note

Mutt only supports space-stuffing for the first two types of lines but not for the third: It is impossible to safely detect whether a leading > character starts a quote or not.

All leading spaces are to be removed by receiving clients to restore the original message prior to further processing.

6.4.3. Editor Considerations

As Mutt provides no additional features to compose f=f messages, it's completely up to the user and his editor to produce proper messages. Please consider your editor's documentation if you intend to send f=f messages.

For example, vim provides the w flag for its formatoptions setting to assist in creating f=f messages, see :help fo-table for details.

6.4.4. Reformatting

Mutt has some support for reformatting when viewing and replying to format=flowed messages. In order to take advantage of these, $reflow_text must be set.

  • Paragraphs are automatically reflowed and wrapped at a width specified by $reflow_wrap.

  • In its original format, the quoting style of format=flowed messages can be difficult to read, and doesn't intermix well with non-flowed replies. Setting $reflow_space_quotes adds spaces after each level of quoting when in the pager and replying in a non-flowed format (i.e. with $text_flowed unset).

  • If $reflow_space_quotes is unset, mutt will still add one trailing space after all the quotes in the pager (but not when replying).

6.5. Background Editing

If $editor is set to a graphical editor, or a script such as contrib/bgedit-screen-tmux.sh if running inside GNU Screen or tmux, you can run the editor in the background by setting $background_edit.

If set, Mutt will display a landing page while the editor runs. When the editor exits, message composition will resume automatically. Alternatively, you can <exit> from the landing page, which will return you to the message index. This allows viewing other messages, changing mailboxes, even starting a new message composition session - all while the first editor session is still running.

Backgrounded message composition sessions can be viewed via <background-compose-menu> in the index and pager, by default bound to “Bâ€. If there is only a single backgrounded session, which has already exited, that session will automatically resume. Otherwise the list will be displayed, and a particular session can be selected. $background_format controls the format string used for the menu.

In case the open mailbox is changed while a reply is backgrounded, Mutt keeps track of the original mailbox. After sending, Mutt will attempt to reopen the original mailbox, if needed, and set reply flags appropriately. This won't affect your currently open mailbox, but may make setting flags a bit slower due to the need to reopen the original mailbox behind the scenes.

One complication with backgrounded compose sessions is the config changes caused by send, reply, and folder hooks. These can get triggered by a new message composition session, or by changing folders during a backgrounded session. To help lessen these problems, Mutt takes a snapshot of certain configuration variables and stores them with each editing session when it is backgrounded. When the session is resumed, those stored settings will temporarily be restored, and removed again when the session finishes (or is backgrounded again).

Mutt will save all boolean and quadoption configuration variables, the current folder (which will be used for ^ mailbox shortcut expansion), along with: $folder, $record, $postponed, $envelope_from_address, $from, $sendmail, $smtp_url, $pgp_sign_as, $smime_sign_as, and $smime_encrypt_with. It's not feasible to backup all variables, but if you believe we've missed an important setting, please let the developers know.

To help prevent forgetting about backgrounded sessions, $background_confirm_quit will prompt before exiting, in addition to $quit. Additionally, the %B expando in $status_format displays the number of backgrounded compose sessions.

Background editing is available for most, but not all, message composition in Mutt. Sending from the command line disables background editing, because there is no index to return to.

7. Forwarding and Bouncing Mail

Bouncing and forwarding let you send an existing message to recipients that you specify. Bouncing a message sends a verbatim copy of a message to alternative addresses as if they were the message's original recipients specified in the Bcc header. Forwarding a message, on the other hand, allows you to modify the message before it is resent (for example, by adding your own comments). Bouncing is done using the <bounce> function and forwarding using the <forward> function bound to “b†and “f†respectively.

Forwarding can be done by including the original message in the new message's body (surrounded by indicating lines: see $forward_attribution_intro and $forward_attribution_trailer) or including it as a MIME attachment, depending on the value of the $mime_forward variable. Decoding of attachments, like in the pager, can be controlled by the $forward_decode and $mime_forward_decode variables, respectively. The desired forwarding format may depend on the content, therefore $mime_forward is a quadoption which, for example, can be set to “ask-noâ€.

Mutt's default ($mime_forward=“no†and $forward_decode=“yesâ€) is to use standard inline forwarding. In that mode all text-decodable parts are included in the new message body. Other attachments from the original email can also be attached to the new message, based on the quadoption $forward_attachments.

The inclusion of headers is controlled by the current setting of the $weed variable, unless $mime_forward is set. The subject of the email is controlled by $forward_format.

Editing the message to forward follows the same procedure as sending or replying to a message does, but can be disabled via the quadoption $forward_edit.

8. Postponing Mail

At times it is desirable to delay sending a message that you have already begun to compose. When the <postpone-message> function is used in the compose menu, the body of your message and attachments are stored in the mailbox specified by the $postponed variable. This means that you can recall the message even if you exit Mutt and then restart it at a later time.

Once a message is postponed, there are several ways to resume it. From the command line you can use the “-p†option, or if you compose a new message from the index or pager you will be prompted if postponed messages exist. If multiple messages are currently postponed, the postponed menu will pop up and you can select which message you would like to resume.

Note

If you postpone a reply to a message, the reply setting of the message is only updated when you actually finish the message and send it. Also, you must be in the same folder with the message you replied to for the status of the message to be updated.

See also the $postpone quad-option.

9. Encryption and Signing

Mutt supports encrypting and signing emails when used interactively. In batch mode, cryptographic operations are disabled, so these options can't be used to sign an email sent via a cron job, for instance.

OpenPGP and S/MIME are enabled in one of two ways: “classic mode†or GPGME. The former invokes external programs to perform the various operations; it is better tested and more flexible, but requires some configuration. The latter uses the GnuPG project's GPGME library.

To enable “classic modeâ€, ensure GPGME is disabled and use the gpg.rc or smime.rc files that come with mutt. These are typically installed under /usr/local/share/doc/mutt/samples/. Source them, either directly or by copying them to your .mutt directory and sourcing them. Sourcing them directly from /usr/local/share/doc/mutt/samples/ has the benefit of automatically using fixes and security improvements to the command invocations, and is recommended.

unset crypt_use_gpgme
source /usr/local/share/doc/mutt/samples/gpg.rc
source /usr/local/share/doc/mutt/samples/smime.rc

To use GPGME instead, simply ensure the option is enabled in your .muttrc:

set crypt_use_gpgme

9.1. OpenPGP Configuration

The two most important settings are $pgp_default_key and $pgp_sign_as. To perform encryption, you must set the first variable. If you have a separate signing key, or only have a signing key, then set the second. Most people will only need to set $pgp_default_key.

Starting with version 2.1.0, GnuPG automatically uses an agent to prompt for your passphrase. If you are using a version older than that, you'll need to ensure an agent is running (alternatively, you can unset $pgp_use_gpg_agent and Mutt will prompt you for your passphrase). The agent in turn uses a pinentry program to display the prompt. There are many different kinds of pinentry programs that can be used: qt, gtk2, gnome3, fltk, and curses. However, Mutt does not work properly with the tty pinentry program. Please ensure you have one of the GUI or curses pinentry programs installed and configured to be the default for your system.

9.2. S/MIME Configuration

As with OpenPGP, the two most important settings are $smime_default_key and $smime_sign_as. To perform encryption and decryption, you must set the first variable. If you have a separate signing key, or only have a signing key, then set the second. Most people will only need to set $smime_default_key.

In “classic modeâ€, keys and certificates are managed by the smime_keys program that comes with Mutt. By default they are stored under ~/.smime/. (This is set by the smime.rc file with $smime_certificates and $smime_keys.) To initialize this directory, use the command “smime_keys init†from a shell prompt. The program can be then be used to import and list certificates. You may also want to periodically run “smime_keys refresh†to update status flags for your certificates.

mutt-2.3.2/doc/configuration.html0000644000175000017500000042746215173276637015235 0ustar00kjmkjm Chapter 3. Configuration

Chapter 3. Configuration

1. Location of Initialization Files

While the default configuration (or “preferencesâ€) make Mutt usable right out of the box, it is often desirable to tailor Mutt to suit your own tastes. When Mutt is first invoked, it will attempt to read the “system†configuration file (defaults set by your local system administrator), unless the “-n†command line option is specified. This file is typically /usr/local/share/mutt/Muttrc or /etc/Muttrc. Mutt will next look for a file named .muttrc in your home directory. If this file does not exist and your home directory has a subdirectory named .mutt, Mutt tries to load a file named .mutt/muttrc. If still not found, Mutt will try $XDG_CONFIG_HOME/mutt/muttrc.

.muttrc is the file where you will usually place your commands to configure Mutt.

In addition, Mutt supports version specific configuration files that are parsed instead of the default files as explained above. For instance, if your system has a Muttrc-0.88 file in the system configuration directory, and you are running version 0.88 of Mutt, this file will be sourced instead of the Muttrc file. The same is true of the user configuration file, if you have a file .muttrc-0.88.6 in your home directory, when you run Mutt version 0.88.6, it will source this file instead of the default .muttrc file. The version number is the same which is visible using the “-v†command line switch or using the show-version key (default: V) from the index menu.

2. Starter Muttrc

Mutt is highly configurable because it's meant to be customized to your needs and preferences. However, this configurability can make it difficult when just getting started. A few sample muttrc files come with mutt, under doc/mutt/samples/. Among them, sample.muttrc-starter is a basic example config with a few suggested settings and pointers to useful programs.

3. Syntax of Initialization Files

An initialization file consists of a series of commands. Each line of the file may contain one or more commands. When multiple commands are used, they must be separated by a semicolon (“;â€).

Example 3.1. Multiple configuration commands per line

set realname='Mutt user' ; ignore x-

The hash mark, or pound sign (“#â€), is used as a “comment†character. You can use it to annotate your initialization file. All text after the comment character to the end of the line is ignored.

Example 3.2. Commenting configuration files

my_hdr X-Disclaimer: Why are you listening to me? # This is a comment

Single quotes (“'â€) and double quotes (“"â€) can be used to quote strings which contain spaces or other special characters. The difference between the two types of quotes is similar to that of many popular shell programs, namely that a single quote is used to specify a literal string (one that is not interpreted for shell variables or quoting with a backslash [see next paragraph]), while double quotes indicate a string for which should be evaluated. For example, backticks are evaluated inside of double quotes, but not for single quotes.

“\†quotes the next character, just as in shells such as bash and zsh. For example, if want to put quotes “"†inside of a string, you can use “\†to force the next character to be a literal instead of interpreted character.

Example 3.3. Escaping quotes in configuration files

set realname="Michael \"MuttDude\" Elkins"

“\\†means to insert a literal “\†into the line. “\n†and “\r†have their usual C meanings of linefeed and carriage-return, respectively.

A “\†at the end of a line can be used to split commands over multiple lines as it “escapes†the line end, provided that the split points don't appear in the middle of command names. Lines are first concatenated before interpretation so that a multi-line can be commented by commenting out the first line only.

Example 3.4. Splitting long configuration commands over several lines

set status_format="some very \
long value split \
over several lines"

It is also possible to substitute the output of a Unix command in an initialization file. This is accomplished by enclosing the command in backticks (``). In Example 3.5, “Using external command's output in configuration filesâ€, the output of the Unix command “uname -a†will be substituted before the line is parsed. Since initialization files are line oriented, only the first line of output from the Unix command will be substituted.

Example 3.5. Using external command's output in configuration files

my_hdr X-Operating-System: `uname -a`

To avoid the output of backticks being parsed, place them inside double quotes. In Example 3.6, “Preventing the output of backticks from being parsedâ€, the output of the gpg decryption is assigned directly to $imap_pass, so that special characters in the password (e.g.“'â€, “#â€, “$â€) are not parsed and interpreted specially by mutt.

Example 3.6. Preventing the output of backticks from being parsed

set imap_pass="`gpg --batch -q --decrypt ~/.mutt/account.gpg`"

Both environment variables and Mutt variables can be accessed by prepending “$†to the name of the variable. For example,

Example 3.7. Using environment variables in configuration files

set record=+sent_on_$HOSTNAME

will cause Mutt to save outgoing messages to a folder named “sent_on_kremvax†if the environment variable $HOSTNAME is set to “kremvax.†(See $record for details.)

Mutt expands the variable when it is assigned, not when it is used. If the value of a variable on the right-hand side of an assignment changes after the assignment, the variable on the left-hand side will not be affected.

If $muttlisp_inline_eval is set, an unquoted parenthesis-enclosed expression will be evaluated as MuttLisp. See the Using MuttLisp section for more details.

Example 3.8. Using MuttLisp expressions

set signature = \
  (if (equal $my_name "Kevin McCarthy") ~/kevin.sig ~/other.sig)

The commands understood by Mutt are explained in the next paragraphs. For a complete list, see the command reference.

All configuration files are expected to be in the current locale as specified by the $charset variable which doesn't have a default value since it's determined by Mutt at startup. If a configuration file is not encoded in the same character set the $config_charset variable should be used: all lines starting with the next are recoded from $config_charset to $charset.

This mechanism should be avoided if possible as it has the following implications:

  • These variables should be set early in a configuration file with $charset preceding $config_charset so Mutt knows what character set to convert to.

  • If $config_charset is set, it should be set in each configuration file because the value is global and not per configuration file.

  • Because Mutt first recodes a line before it attempts to parse it, a conversion introducing question marks or other characters as part of errors (unconvertable characters, transliteration) may introduce syntax errors or silently change the meaning of certain tokens (e.g. inserting question marks into regular expressions).

4. Address Groups

Usage:

group [ -group name ...] { -rx expr ... | -addr expr ... }
ungroup [ -group name ...] { * | -rx expr ... | -addr expr ... }

Mutt supports grouping addresses logically into named groups. An address or address pattern can appear in several groups at the same time. These groups can be used in patterns (for searching, limiting and tagging) and in hooks by using group patterns. This can be useful to classify mail and take certain actions depending on in what groups the message is. For example, the mutt user's mailing list would fit into the categories “mailing list†and “mutt-relatedâ€. Using send-hook, the sender can be set to a dedicated one for writing mailing list messages, and the signature could be set to a mutt-related one for writing to a mutt list — for other lists, the list sender setting still applies but a different signature can be selected. Or, given a group only containing recipients known to accept encrypted mail, “auto-encryption†can be achieved easily.

The group command is used to directly add either addresses or regular expressions to the specified group or groups. The different categories of arguments to the group command can be in any order. The flags -rx and -addr specify what the following strings (that cannot begin with a hyphen) should be interpreted as: either a regular expression or an email address, respectively.

These address groups can also be created implicitly by the alias, lists, subscribe and alternates commands by specifying the optional -group option. For example,

alternates -group me address1 address2
alternates -group me -group work address3

would create a group named “me†which contains all your addresses and a group named “work†which contains only your work address address3. Besides many other possibilities, this could be used to automatically mark your own messages in a mailing list folder as read or use a special signature for work-related messages.

The ungroup command is used to remove addresses or regular expressions from the specified group or groups. The syntax is similar to the group command, however the special character * can be used to empty a group of all of its contents. As soon as a group gets empty because all addresses and regular expressions have been removed, it'll internally be removed, too (i.e. there cannot be an empty group). When removing regular expressions from a group, the pattern must be specified exactly as given to the group command or -group argument.

5. Defining/Using Aliases

Usage:

alias [ -group name ...] key address [ address ...]
unalias [ -group name ...] { * | key ... }

It's usually very cumbersome to remember or type out the address of someone you are communicating with. Mutt allows you to create “aliases†which map a short string to a full address.

Note

If you want to create an alias for more than one address, you must separate the addresses with a comma (“,â€).

The optional -group argument to alias causes the aliased address(es) to be added to the named group.

To add an alias:

alias muttdude me@cs.hmc.edu (Michael Elkins)
alias theguys manny, moe, jack

To remove an alias or aliases (“*†means all aliases):

unalias muttdude
unalias *

Note: The alias key is matched case insensitively when creating (checking for duplicates), removing, or expanding aliases.

Unlike other mailers, Mutt doesn't require aliases to be defined in a special file. The alias command can appear anywhere in a configuration file, as long as this file is sourced. Consequently, you can have multiple alias files, or you can have all aliases defined in your .muttrc.

On the other hand, the <create-alias> function can use only one file, the one pointed to by the $alias_file variable (which is ~/.muttrc by default). This file is not special either, in the sense that Mutt will happily append aliases to any file, but in order for the new aliases to take effect you need to explicitly source this file too.

Example 3.9. Configuring external alias files

source /usr/local/share/Mutt.aliases
source ~/.mail_aliases
set alias_file=~/.mail_aliases

To use aliases, you merely use the alias at any place in Mutt where Mutt prompts for addresses, such as the To: or Cc: prompt. You can also enter aliases in your editor at the appropriate headers if you have the $edit_headers variable set.

In addition, at the various address prompts, you can use the tab character to expand a partial alias to the full alias. If there are multiple matches, Mutt will bring up a menu with the matching aliases. In order to be presented with the full list of aliases, you must hit tab without a partial alias, such as at the beginning of the prompt or after a comma denoting multiple addresses.

In the alias menu, you can select as many aliases as you want with the tag-entry key (default: <Space> or t), and use the exit key (default: q) to return to the address prompt.

6. Changing the Default Key Bindings

Usage:

bind map key function

This command allows you to change the default key bindings (operation invoked when pressing a key).

map specifies in which menu the binding belongs. Multiple maps may be specified by separating them with commas (no additional whitespace is allowed). The currently defined maps are:

generic

This is not a real menu, but is used as a fallback for all of the other menus except for the pager and editor modes. If a key is not defined in another menu, Mutt will look for a binding to use in this menu. This allows you to bind a key to a certain function in multiple menus instead of having multiple bind statements to accomplish the same task.

alias

The alias menu is the list of your personal aliases as defined in your .muttrc. It is the mapping from a short alias name to the full email address(es) of the recipient(s).

attach

The attachment menu is used to access the attachments on received messages.

browser

The browser is used for both browsing the local directory structure, and for listing all of your incoming mailboxes.

editor

The editor is used to allow the user to enter a single line of text, such as the To or Subject prompts in the compose menu.

index

The index is the list of messages contained in a mailbox.

compose

The compose menu is the screen used when sending a new message.

pager

The pager is the mode used to display message/attachment data, and help listings.

pgp

The pgp menu is used to select the OpenPGP keys used to encrypt outgoing messages.

smime

The smime menu is used to select the OpenSSL certificates used to encrypt outgoing messages.

postpone

The postpone menu is similar to the index menu, except is used when recalling a message the user was composing, but saved until later.

query

The query menu is the browser for results returned by $query_command.

mix

The mixmaster screen is used to select remailer options for outgoing messages (if Mutt is compiled with Mixmaster support).

key is the key (or key sequence) you wish to bind. To specify a control character, use the sequence \Cx, where x is the letter of the control character (for example, to specify control-A use “\Caâ€). Note that the case of x as well as \C is ignored, so that \CA, \Ca, \cA and \ca are all equivalent. An alternative form is to specify the key as a three digit octal number prefixed with a “\†(for example \177 is equivalent to \c?). You can also use the form <177>, which allows octal numbers with an arbitrary number of digits. In addition, key may be a symbolic name as shown in Table 3.1, “Symbolic key namesâ€.

Table 3.1. Symbolic key names

Symbolic nameMeaning
\ttab
<tab>tab
<backtab>backtab / shift-tab
\rcarriage return
\nnewline
\eescape
<esc>escape
<up>up arrow
<down>down arrow
<left>left arrow
<right>right arrow
<pageup>Page Up
<pagedown>Page Down
<backspace>Backspace
<delete>Delete
<insert>Insert
<enter>Enter
<return>Return
<keypadenter>Enter key on numeric keypad
<home>Home
<end>End
<space>Space bar
<f1>function key 1
<f10>function key 10

The <what-key> function can be used to explore keycode and symbolic names for other keys on your keyboard. Executing this function will display information about each key pressed, until terminated by ^G.

key does not need to be enclosed in quotes unless it contains a space (“ â€) or semi-colon (“;â€).

function specifies which action to take when key is pressed. For a complete list of functions, see the reference. Note that the bind expects function to be specified without angle brackets.

The special function <noop> unbinds the specified key sequence.

6.1. Terminal Keybindings

Some key bindings are controlled by the terminal, and so by default can't be bound inside Mutt. These may include ^C, ^\, ^Q, ^S, ^Z, and on BSD/Mac ^Y. These terminal settings can be viewed and changed using the stty program.

“stty -a†will list the bound characters (not all of them affect Mutt), and what actions they take when pressed. For example, you may see “intr = ^C†in its output. This means typing ^C will send an interrupt signal. “quit = ^\†means typing ^\ (commonly also ^4) will send a quit signal.

To unbind a key from an action, you invoke “stty action undefâ€. For example, “stty quit undef†will unbind ^\ (and ^4) from sending the quit signal. Once unbound (e.g, by placing that line in your .bashrc, or in a Mutt wrapper script/function) you can use the key sequence in your Mutt bindings.

6.2. Enter versus Return

Prior to version 2.2, Mutt used a default ncurses mode (“nl()â€). This mode maps keyboard input of either <Enter> or <Return> to the same value, which Mutt interpreted as <Return> internally.

However, starting in version 2.2, this mode is turned off, allowing <Return> and <Enter> to be mapped separately, if desired. The default keyboard mappings set both, but you can override this or create new bindings with one or the other (or both).

Note that in terminal application, such as Mutt, <Enter> is the same as “\n†and ^J; while <Return> is the same as “\r†and ^M.

7. Changing the current working directory

Usage:

cd directory

The cd command changes Mutt's current working directory. This affects commands and functions like source, change-folder, and save-entry that use relative paths. Using cd without directory changes to your home directory.

8. Defining Aliases for Character Sets

Usage:

charset-hook alias charset
iconv-hook charset local-charset

The charset-hook command defines an alias for a character set. This is useful to properly display messages which are tagged with a character set name not known to Mutt.

The iconv-hook command defines a system-specific name for a character set. This is helpful when your systems character conversion library insists on using strange, system-specific names for character sets.

9. Setting Variables Based Upon Mailbox

Usage:

folder-hook [!]regexp command

It is often desirable to change settings based on which mailbox you are reading. The folder-hook command provides a method by which you can execute any configuration command. regexp is a regular expression specifying in which mailboxes to execute command before loading. If a mailbox matches multiple folder-hooks, they are executed in the order given in the .muttrc.

The regexp parameter has mailbox shortcut expansion performed on the first character. See Mailbox Matching in Hooks for more details.

Note

If you use the “!†shortcut for $spoolfile at the beginning of the pattern, you must place it inside of double or single quotes in order to distinguish it from the logical not operator for the expression.

Note

Settings are not restored when you leave the mailbox. For example, a command action to perform is to change the sorting method based upon the mailbox being read:

folder-hook mutt "set sort=threads"

However, the sorting method is not restored to its previous value when reading a different mailbox. To specify a default command, use the pattern “.†before other folder-hooks adjusting a value on a per-folder basis because folder-hooks are evaluated in the order given in the configuration file.

Note

The keyboard buffer will not be processed until after all hooks are run; multiple push or exec commands will end up being processed in reverse order.

The following example will set the sort variable to date-sent for all folders but to threads for all folders containing “mutt†in their name.

Example 3.10. Setting sort method based on mailbox name

folder-hook . "set sort=date-sent"
folder-hook mutt "set sort=threads"

10. Keyboard Macros

Usage:

macro menu key sequence [ description ]

Macros are useful when you would like a single key to perform a series of actions. When you press key in menu menu, Mutt will behave as if you had typed sequence. So if you have a common sequence of commands you type, you can create a macro to execute those commands with a single key or fewer keys.

menu is the map which the macro will be bound in. Multiple maps may be specified by separating multiple menu arguments by commas. Whitespace may not be used in between the menu arguments and the commas separating them.

key and sequence are expanded by the same rules as the key bindings with some additions. The first is that control characters in sequence can also be specified as ^x. In order to get a caret (“^â€) you need to use ^^. Secondly, to specify a certain key such as up or to invoke a function directly, you can use the format <key name> and <function name>. For a listing of key names see the section on key bindings. Functions are listed in the reference.

The advantage with using function names directly is that the macros will work regardless of the current key bindings, so they are not dependent on the user having particular key definitions. This makes them more robust and portable, and also facilitates defining of macros in files used by more than one user (e.g., the system Muttrc).

Optionally you can specify a descriptive text after sequence, which is shown in the help screens if they contain a description.

Note

Macro definitions (if any) listed in the help screen(s), are silently truncated at the screen width, and are not wrapped.

11. Using Color and Mono Video Attributes

Usage:

color object [ attribute ...] foreground background
color { header | body } [ attribute ...] foreground background regexp
color index [ attribute ...] foreground background pattern
color compose composeobject [ attribute ...] foreground background
uncolor { index | header | body } { * | pattern ... }

If your terminal supports color, you can spice up Mutt by creating your own color scheme. To define the color of an object (type of information), you must specify both a foreground color and a background color (it is not possible to only specify one or the other).

header and body match regexp in the header/body of a message, index matches pattern in the message index. Note that IMAP server-side searches (=b, =B, =h) are not supported for color index patterns.

When $header_color_partial is unset (the default), a header matched by regexp will have color applied to the entire header. When set, color is applied only to the exact text matched by regexp.

object can be one of:

  • attachment

  • bold (highlighting bold patterns in the body of messages)

  • error (error messages printed by Mutt)

  • hdrdefault (default color of the message header in the pager)

  • indicator (arrow or bar used to indicate the current item in a menu)

  • markers (the “+†markers at the beginning of wrapped lines in the pager)

  • message (informational messages)

  • normal

  • prompt

  • quoted (text matching $quote_regexp in the body of a message)

  • quoted1, quoted2, ..., quotedN (higher levels of quoting)

  • search (highlighting of words in the pager)

  • signature

  • status (mode lines used to display info about the mailbox or message)

  • tilde (the “~†used to pad blank lines in the pager)

  • tree (thread tree drawn in the message index and attachment menu)

  • underline (highlighting underlined patterns in the body of messages)

composeobject can be one of:

  • header

  • security_encrypt

  • security_sign

  • security_both

  • security_none

attribute can be one of the following:

  • none

  • bold

  • underline

  • reverse

  • standout

foreground and background can be one of the following:

  • white

  • black

  • green

  • magenta

  • blue

  • cyan

  • yellow

  • red

  • default

  • colorx

The color name can optionally be prefixed with the keyword bright or light to make the color boldfaced or light (e.g., brightred). The precise behavior depends on the terminal and its configuration. In particular, the boldfaced/light difference and such background colors may be available only for terminals configured with at least 16 colors, as specified by the $TERM environment variable.

If your terminal supports it, the special keyword default can be used as a transparent color. The value brightdefault is also valid. If Mutt is linked against the S-Lang library, you also need to set the $COLORFGBG environment variable to the default colors of your terminal for this to work; for example (for Bourne-like shells):

set COLORFGBG="green;black"
export COLORFGBG

Note

The S-Lang library requires you to use the lightgray and brown keywords instead of white and yellow when setting this variable.

Note

The uncolor command can be applied to the index, header and body objects only. It removes entries from the list. You must specify the same pattern specified in the color command for it to be removed. The pattern “*†is a special token which means to clear the color list of all entries.

Mutt also recognizes the keywords color0, color1, ..., colorN-1 (N being the number of colors supported by your terminal). This is useful when you remap the colors for your display (for example by changing the color associated with color2 for your xterm), since color names may then lose their normal meaning.

If your terminal does not support color, it is still possible change the video attributes through the use of the “mono†command. Usage:

mono object attribute
mono { header | body } attribute regexp
mono index attribute pattern
mono compose composeobject attribute
unmono { index | header | body } { * | pattern ... }

For object, composeobject, and attribute, see the color command.

12. Message Header Display

12.1. Header Display

When displaying a message in the pager, Mutt folds long header lines at $wrap columns. Though there're precise rules about where to break and how, Mutt always folds headers using a tab for readability. (Note that the sending side is not affected by this, Mutt tries to implement standards compliant folding.)

Despite not being a real header, Mutt will also display an mbox "From_" line in the pager along with other headers. This line can be manipulated with ignore/unignore and hdr_order/unhdr_order commands.

12.2. Selecting Headers

Usage:

ignore pattern [ pattern ...]
unignore { * | pattern ... }

Messages often have many header fields added by automatic processing systems, or which may not seem useful to display on the screen. This command allows you to specify header fields which you don't normally want to see in the pager.

You do not need to specify the full header field name. For example, “ignore content-†will ignore all header fields that begin with the pattern “content-â€. “ignore *†will ignore all headers.

To remove a previously added token from the list, use the “unignore†command. The “unignore†command will make Mutt display headers with the given pattern. For example, if you do “ignore x-†it is possible to “unignore x-mailerâ€.

“unignore *†will remove all tokens from the ignore list.

Example 3.11. Header weeding

# Sven's draconian header weeding
ignore *
unignore from date subject to cc
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
unignore posted-to:

The above example will show "From:" headers as well as mbox "From_" lines. To hide the latter, instead use "unignore from: date subject to cc" on the second line.

12.3. Ordering Displayed Headers

Usage:

hdr_order header [ header ...]
unhdr_order { * | header ... }

With the hdr_order command you can specify an order in which Mutt will attempt to present these headers to you when viewing messages.

“unhdr_order *†will clear all previous headers from the order list, thus removing the header order effects set by the system-wide startup file.

Example 3.12. Configuring header display order

hdr_order From Date: From: To: Cc: Subject:

13. Alternative Addresses

Usage:

alternates [ -group name ...] regexp [ regexp ...]
unalternates [ -group name ...] { * | regexp ... }

With various functions, Mutt will treat messages differently, depending on whether you sent them or whether you received them from someone else. For instance, when replying to a message that you sent to a different party, Mutt will automatically suggest to send the response to the original message's recipients — responding to yourself won't make much sense in many cases. (See $reply_to.)

Many users receive e-mail under a number of different addresses. To fully use Mutt's features here, the program must be able to recognize what e-mail addresses you receive mail under. That's the purpose of the alternates command: It takes a list of regular expressions, each of which can identify an address under which you receive e-mail.

As addresses are matched using regular expressions and not exact strict comparisons, you should make sure you specify your addresses as precise as possible to avoid mismatches. For example, if you specify:

alternates user@example

Mutt will consider “some-user@example†as being your address, too which may not be desired. As a solution, in such cases addresses should be specified as:

alternates '^user@example$'

The -group flag causes all of the subsequent regular expressions to be added to the named group.

The unalternates command can be used to write exceptions to alternates patterns. If an address matches something in an alternates command, but you nonetheless do not think it is from you, you can list a more precise pattern under an unalternates command.

To remove a regular expression from the alternates list, use the unalternates command with exactly the same regexp. Likewise, if the regexp for an alternates command matches an entry on the unalternates list, that unalternates entry will be removed. If the regexp for unalternates is “*â€, all entries on alternates will be removed.

14. Mailing Lists

Usage:

lists [ -group name ...] regexp [ regexp ...]
unlists { * | regexp ... }
subscribe [ -group name ...] regexp [ regexp ...]
unsubscribe { * | regexp ... }

Mutt has a few nice features for handling mailing lists. In order to take advantage of them, you must specify which addresses belong to mailing lists, and which mailing lists you are subscribed to. Mutt also has limited support for auto-detecting mailing lists: it supports parsing mailto: links in the common List-Post: header which has the same effect as specifying the list address via the lists command (except the group feature). Once you have done this, the <list-reply> function will work for all known lists. Additionally, when you send a message to a known list and $followup_to is set, Mutt will add a Mail-Followup-To header. For unsubscribed lists, this will include your personal address, ensuring you receive a copy of replies. For subscribed mailing lists, the header will not, telling other users' mail user agents not to send copies of replies to your personal address.

Note

The Mail-Followup-To header is a non-standard extension which is not supported by all mail user agents. Adding it is not bullet-proof against receiving personal CCs of list messages. Also note that the generation of the Mail-Followup-To header is controlled by the $followup_to configuration variable since it's common practice on some mailing lists to send Cc upon replies (which is more a group- than a list-reply).

More precisely, Mutt maintains lists of patterns for the addresses of known and subscribed mailing lists. Every subscribed mailing list is known. To mark a mailing list as known, use the list command. To mark it as subscribed, use subscribe.

You can use regular expressions with both commands. To mark all messages sent to a specific bug report's address on Debian's bug tracking system as list mail, for instance, you could say

subscribe [0-9]+.*@bugs.debian.org

as it's often sufficient to just give a portion of the list's e-mail address.

Specify as much of the address as you need to remove ambiguity. For example, if you've subscribed to the Mutt mailing list, you will receive mail addressed to mutt-users@mutt.org. So, to tell Mutt that this is a mailing list, you could add lists mutt-users@ to your initialization file. To tell Mutt that you are subscribed to it, add subscribe mutt-users to your initialization file instead. If you also happen to get mail from someone whose address is mutt-users@example.com, you could use lists ^mutt-users@mutt\\.org$ or subscribe ^mutt-users@mutt\\.org$ to match only mail from the actual list.

The -group flag adds all of the subsequent regular expressions to the named address group in addition to adding to the specified address list.

The “unlists†command is used to remove a token from the list of known and subscribed mailing-lists. Use “unlists *†to remove all tokens.

To remove a mailing list from the list of subscribed mailing lists, but keep it on the list of known mailing lists, use unsubscribe.

All of the mailing list configuration options described so far govern mutt's knowledge of your list subscriptions and how it presents list information to you. If you have a message from a mailing list, you can also use the list menu (bound to "ESC L" by default) to interact with the message's list's list server. This makes it easy to subscribe, unsubscribe, and so on.

15. Using Multiple Spool Mailboxes

Usage:

mbox-hook [!]regexp mailbox

This command is used to move read messages from a specified mailbox to a different mailbox automatically when you quit or change folders. regexp is a regular expression specifying the mailbox to treat as a “spool†mailbox and mailbox specifies where mail should be saved when read.

The regexp parameter has mailbox shortcut expansion performed on the first character. See Mailbox Matching in Hooks for more details.

Note that execution of mbox-hooks is dependent on the $move configuration variable. If set to “no†(the default), mbox-hooks will not be executed.

Unlike some of the other hook commands, only the first matching regexp is used (it is not possible to save read mail in more than a single mailbox).

16. Monitoring Incoming Mail

Usage:

mailboxes [ [ -notify | -nonotify ] [ -poll | -nopoll ] [ -label label | -nolabel ] mailbox ] [...]
unmailboxes { * | mailbox ... }

This command specifies folders which can receive mail and which will be checked for new messages periodically.

Use -nonotify to disable notifying when new mail arrives. The -notify argument can be used to reenable notifying for an existing mailbox. If unspecified: a new mailbox will notify by default, while an existing mailbox will be unchanged.

To disable polling, specify -nopoll before the mailbox name. The -poll argument can be used to reenable polling for an existing mailbox. If unspecified: a new mailbox will poll by default, while an existing mailbox will be unchanged.

The -label argument can be used to specify an alternative label to print in the sidebar or mailbox browser instead of the mailbox path. A label may be removed via the -nolabel argument. If unspecified, an existing mailbox label will be unchanged.

mailbox can either be a local file or directory (Mbox/Mmdf or Maildir/Mh). If Mutt was built with POP and/or IMAP support, mailbox can also be a POP/IMAP folder URL. The URL syntax is described in Section 1.2, “URL Syntaxâ€, POP and IMAP are described in Section 3, “POP3 Support†and Section 4, “IMAP Support†respectively.

Mutt provides a number of advanced features for handling (possibly many) folders and new mail within them, please refer to Section 13, “New Mail Detection†for details (including in what situations and how often Mutt checks for new mail). Additionally, $new_mail_command can be used to run a command when new mail is detected.

The “unmailboxes†command is used to remove a token from the list of folders which receive mail. Use “unmailboxes *†to remove all tokens.

Note

The folders in the mailboxes command are resolved when the command is executed, so if these names contain shortcut characters (such as “=†and “!â€), any variable definition that affects these characters (like $folder and $spoolfile) should be set before the mailboxes command. If none of these shortcuts are used, a local path should be absolute as otherwise Mutt tries to find it relative to the directory from where Mutt was started which may not always be desired.

17. User-Defined Headers

Usage:

my_hdr string
unmy_hdr { * | field ... }

The my_hdr command allows you to add custom header fields to every message you send. It can also be used as an alternate way to set some standard envelope header fields, see below for more details.

Custom header fields will be added to every message you send and appear in the editor if $edit_headers is set.

For example, if you would like to add an “Organization:†header field to all of your outgoing messages, you can put the command something like shown in Example 3.13, “Defining custom headers†in your .muttrc.

Example 3.13. Defining custom headers

my_hdr Organization: A Really Big Company, Anytown, USA

The standard envelope header fields To, Cc, Bcc, Subject, From, Reply-To, and Message-ID can also be set via my_hdr. For more details about when those are processed, see Section 18, “Message Composition Flowâ€. Note that trying to set the value of other Mutt generated header fields is not supported, and may result in an invalid email being generated.

Note

Space characters are not allowed between the keyword and the colon (“:â€). The standard for electronic mail (RFC2822) says that space is illegal there, so Mutt enforces the rule.

If you would like to add a header field to a single message, you should either set the $edit_headers variable, or use the <edit-headers> function (default: “Eâ€) in the compose menu so that you can edit the header of your message along with the body.

To remove user defined header fields, use the unmy_hdr command. You may specify an asterisk (“*â€) to remove all header fields, or the fields to remove. For example, to remove all “To†and “Cc†header fields, you could use:

unmy_hdr to cc

18. Specify Default Save Mailbox

Usage:

save-hook [!]pattern mailbox

This command is used to override the default mailbox used when saving messages. mailbox will be used as the default if the message matches pattern, see Message Matching in Hooks for information on the exact format.

To provide more flexibility and good defaults, Mutt applies the expandos of $index_format to mailbox after it was expanded.

Example 3.14. Using %-expandos in save-hook

# default: save all to ~/Mail/<author name>
save-hook . ~/Mail/%F

# save from me@turing.cs.hmc.edu and me@cs.hmc.edu to $folder/elkins
save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins

# save from aol.com to $folder/spam
save-hook aol\\.com$ +spam

Also see the fcc-save-hook command.

19. Specify Default Fcc: Mailbox When Composing

Usage:

fcc-hook [!]pattern mailbox

This command is used to save outgoing mail in a mailbox other than $record. Mutt searches the initial list of message recipients for the first matching pattern and uses mailbox as the default Fcc: mailbox. If no match is found the message will be saved to $record mailbox.

To provide more flexibility and good defaults, Mutt applies the expandos of $index_format to mailbox after it was expanded.

See Message Matching in Hooks for information on the exact format of pattern.

fcc-hook [@.]aol\\.com$ +spammers

...will save a copy of all messages going to the aol.com domain to the `+spammers' mailbox by default. Also see the fcc-save-hook command.

Multiple mailboxes may be specified by separating them with $fcc_delimiter, if set:

  set fcc_delimiter = ','
  fcc-hook 'foo@example\.com$' '+one,+two'

20. Specify Default Save Filename and Default Fcc: Mailbox at Once

Usage:

fcc-save-hook [!]pattern mailbox

This command is a shortcut, almost equivalent to doing both a fcc-hook and a save-hook with its arguments, including %-expansion on mailbox according to $index_format.

Note, however that the fcc-save-hook is not designed to take advantage of multiple mailboxes, as fcc-hook is. For correct behavior, you should use separate fcc and save hooks in that case.

21. Change Settings Based Upon Message Recipients

Usage:

reply-hook [!]pattern command
send-hook [!]pattern command
send2-hook [!]pattern command

These commands can be used to execute arbitrary configuration commands based upon recipients of the message. pattern is used to match the message, see Message Matching in Hooks for details. command is executed when pattern matches.

reply-hook is matched against the message you are replying to, instead of the message you are sending. send-hook is matched against all messages, both new and replies.

Note

reply-hooks are matched before the send-hook, regardless of the order specified in the user's configuration file. However, you can inhibit send-hook in the reply case by using the pattern '! ~Q' (not replied, see Message Matching in Hooks) in the send-hook to tell when reply-hook have been executed.

send2-hook is matched every time a message is changed, either by editing it, or by using the compose menu to change its recipients or subject. send2-hook is executed after send-hook, and can, e.g., be used to set parameters such as the $sendmail variable depending on the message's sender address.

For each type of send-hook or reply-hook, when multiple matches occur, commands are executed in the order they are specified in the .muttrc (for that type of hook).

Example: send-hook mutt "set mime_forward signature=''"

Another typical use for this command is to change the values of the $attribution, $attribution_locale, and $signature variables in order to change the language of the attributions and signatures based upon the recipients.

Note

send-hook's are only executed once after getting the initial list of recipients. They are not executed when resuming a postponed draft. Adding a recipient after replying or editing the message will not cause any send-hook to be executed, similarly if $autoedit is set (as then the initial list of recipients is empty). Also note that my_hdr commands which modify recipient headers, or the message's subject, don't have any effect on the current message when executed from a send-hook.

22. Change Settings Before Formatting a Message

Usage:

message-hook [!]pattern command

This command can be used to execute arbitrary configuration commands before viewing or formatting a message based upon information about the message. command is executed if the pattern matches the message to be displayed. When multiple matches occur, commands are executed in the order they are specified in the .muttrc.

See Message Matching in Hooks for information on the exact format of pattern.

Example:

message-hook ~A 'set pager=builtin'
message-hook '~f freshmeat-news' 'set pager="less \"+/^  subject: .*\""'

23. Choosing the Cryptographic Key of the Recipient

Usage:

crypt-hook regexp keyid

When encrypting messages with PGP/GnuPG or OpenSSL, you may want to associate a certain key with a given e-mail address automatically, either because the recipient's public key can't be deduced from the destination address, or because, for some reasons, you need to override the key Mutt would normally use. The crypt-hook command provides a method by which you can specify the ID of the public key to be used when encrypting messages to a certain recipient. You may use multiple crypt-hooks with the same regexp; multiple matching crypt-hooks result in the use of multiple keyids for a recipient. During key selection, Mutt will confirm whether each crypt-hook is to be used (unless the $crypt_confirmhook option is unset). If all crypt-hooks for a recipient are declined, Mutt will use the original recipient address for key selection instead.

The meaning of keyid is to be taken broadly in this context: You can either put a numerical key ID or fingerprint here, an e-mail address, or even just a real name.

24. Dynamically Changing $index_format using Patterns

Usage:

index-format-hook name [!]pattern format-string

This command is used to inject format strings dynamically into $index_format based on pattern matching against the current message.

The $index_format expando %@name@ specifies a placeholder for the injection. Index-format-hooks with the same name are matched using pattern against the current message. Matching is done in the order specified in the .muttrc, with the first match being used. The hook's format-string is then substituted and evaluated.

Because the first match is used, best practice is to put a catch-all ~A pattern as the last hook. Here is an example showing how to implement dynamic date formatting:

set index_format="%4C %-6@date@ %-15.15F %Z (%4c) %s"

index-format-hook  date  "~d<1d"    "%[%H:%M]"
index-format-hook  date  "~d<1m"    "%[%a %d]"
index-format-hook  date  "~d<1y"    "%[%b %d]"
index-format-hook  date  "~A"       "%[%m/%y]"

Another example, showing a way to prepend to the subject. Note that without a catch-all ~A pattern, no match results in the expando being replaced with an empty string.

set index_format="%4C %@subj_flags@%s"

index-format-hook  subj_flags  "~f boss@example.com"    "** BOSS ** "
index-format-hook  subj_flags  "~f spouse@example.com"  ":-) "

25. Adding Key Sequences to the Keyboard Buffer

Usage:

push string

This command adds the named string to the beginning of the keyboard buffer. The string may contain control characters, key names and function names like the sequence string in the macro command. You may use it to automatically run a sequence of commands at startup, or when entering certain folders. For example, Example 3.15, “Embedding push in folder-hook†shows how to automatically collapse all threads when entering a folder.

Example 3.15. Embedding push in folder-hook

folder-hook . 'push <collapse-all>'

For using functions like shown in the example, it's important to use angle brackets (“<†and “>â€) to make Mutt recognize the input as a function name. Otherwise it will simulate individual just keystrokes, i.e. “push collapse-all†would be interpreted as if you had typed “câ€, followed by “oâ€, followed by “lâ€, ..., which is not desired and may lead to very unexpected behavior.

Keystrokes can be used, too, but are less portable because of potentially changed key bindings. With default bindings, this is equivalent to the above example:

folder-hook . 'push \eV'

because it simulates that Esc+V was pressed (which is the default binding of <collapse-all>).

26. Executing Functions

Usage:

exec function [ function ...]

This command can be used to execute any function. Functions are listed in the function reference. “exec function†is equivalent to “push <function>â€.

27. Message Scoring

Usage:

score pattern value
unscore { * | pattern ... }

The score commands adds value to a message's score if pattern matches it. pattern is a string in the format described in the patterns section (note: For efficiency reasons, patterns which scan information not available in the index, such as ~b, ~B, ~h, ~M, or ~X may not be used). value is a positive or negative integer. A message's final score is the sum total of all matching score entries. However, you may optionally prefix value with an equal sign (“=â€) to cause evaluation to stop at a particular entry if there is a match. Negative final scores are rounded up to 0.

The unscore command removes score entries from the list. You must specify the same pattern specified in the score command for it to be removed. The pattern “*†is a special token which means to clear the list of all score entries.

Scoring occurs as the messages are read in, before the mailbox is sorted. Because of this, patterns which depend on threading, such as ~=, ~$, and ~(), will not work by default. A workaround is to push the scoring command in a folder hook. This will cause the mailbox to be rescored after it is opened and input starts being processed:

folder-hook . 'push "<enter-command>score ~= 10<enter>"'

28. Spam Detection

Usage:

spam pattern format
nospam { * | pattern }

Mutt has generalized support for external spam-scoring filters. By defining your spam patterns with the spam and nospam commands, you can limit, search, and sort your mail based on its spam attributes, as determined by the external filter. You also can display the spam attributes in your index display using the %H selector in the $index_format variable. (Tip: try %?H?[%H] ? to display spam tags only when they are defined for a given message.)

Note: the value displayed by %H and searched by ~H is stored in the header cache. Mutt isn't smart enough to invalidate a header cache entry based on changing spam rules, so if you aren't seeing correct %H values, try temporarily turning off the header cache. If that fixes the problem, then once your spam rules are set to your liking, remove your stale header cache files and turn the header cache back on.

Your first step is to define your external filter's spam patterns using the spam command. pattern should be a regular expression that matches a header in a mail message. If any message in the mailbox matches this regular expression, it will receive a “spam tag†or “spam attribute†(unless it also matches a nospam pattern — see below.) The appearance of this attribute is entirely up to you, and is governed by the format parameter. format can be any static text, but it also can include back-references from the pattern expression. (A regular expression “back-reference†refers to a sub-expression contained within parentheses.) %1 is replaced with the first back-reference in the regex, %2 with the second, etc.

To match spam tags, mutt needs the corresponding header information which is always the case for local and POP folders but not for IMAP in the default configuration. Depending on the spam header to be analyzed, $imap_headers may need to be adjusted.

If you're using multiple spam filters, a message can have more than one spam-related header. You can define spam patterns for each filter you use. If a message matches two or more of these patterns, and the $spam_separator variable is set to a string, then the message's spam tag will consist of all the format strings joined together, with the value of $spam_separator separating them.

For example, suppose one uses DCC, SpamAssassin, and PureMessage, then the configuration might look like in Example 3.16, “Configuring spam detectionâ€.

Example 3.16. Configuring spam detection

spam "X-DCC-.*-Metrics:.*(....)=many"         "90+/DCC-%1"
spam "X-Spam-Status: Yes"                     "90+/SA"
spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
set spam_separator=", "

If then a message is received that DCC registered with “many†hits under the “Fuz2†checksum, and that PureMessage registered with a 97% probability of being spam, that message's spam tag would read 90+/DCC-Fuz2, 97/PM. (The four characters before “=many†in a DCC report indicate the checksum used — in this case, “Fuz2â€.)

If the $spam_separator variable is unset, then each spam pattern match supersedes the previous one. Instead of getting joined format strings, you'll get only the last one to match.

The spam tag is what will be displayed in the index when you use %H in the $index_format variable. It's also the string that the ~H pattern-matching expression matches against for <search> and <limit> functions. And it's what sorting by spam attribute will use as a sort key.

That's a pretty complicated example, and most people's actual environments will have only one spam filter. The simpler your configuration, the more effective Mutt can be, especially when it comes to sorting.

Generally, when you sort by spam tag, Mutt will sort lexically — that is, by ordering strings alphanumerically. However, if a spam tag begins with a number, Mutt will sort numerically first, and lexically only when two numbers are equal in value. (This is like UNIX's sort -n.) A message with no spam attributes at all — that is, one that didn't match any of your spam patterns — is sorted at lowest priority. Numbers are sorted next, beginning with 0 and ranging upward. Finally, non-numeric strings are sorted, with “a†taking lower priority than “zâ€. Clearly, in general, sorting by spam tags is most effective when you can coerce your filter to give you a raw number. But in case you can't, Mutt can still do something useful.

The nospam command can be used to write exceptions to spam patterns. If a header pattern matches something in a spam command, but you nonetheless do not want it to receive a spam tag, you can list a more precise pattern under a nospam command.

If the pattern given to nospam is exactly the same as the pattern on an existing spam list entry, the effect will be to remove the entry from the spam list, instead of adding an exception. Likewise, if the pattern for a spam command matches an entry on the nospam list, that nospam entry will be removed. If the pattern for nospam is “*â€, all entries on both lists will be removed. This might be the default action if you use spam and nospam in conjunction with a folder-hook.

You can have as many spam or nospam commands as you like. You can even do your own primitive spam detection within Mutt — for example, if you consider all mail from MAILER-DAEMON to be spam, you can use a spam command like this:

spam "^From: .*MAILER-DAEMON"       "999"

29. Setting and Querying Variables

29.1. Variable Types

Mutt supports these types of configuration variables:

boolean

A boolean expression, either “yes†or “noâ€.

number

A signed integer number in the range -32768 to 32767.

number (long)

A signed integer number in the range -2147483648 to 2147483647.

string

Arbitrary text.

path

A specialized string for representing paths including support for mailbox shortcuts (see Section 10, “Mailbox Shortcutsâ€) as well as tilde (“~â€) for a user's home directory and more.

quadoption

Like a boolean but triggers a prompt when set to “ask-yes†or “ask-no†with “yes†and “no†preselected respectively.

sort order

A specialized string allowing only particular words as values depending on the variable.

regular expression

A regular expression, see Section 2, “Regular Expressions†for an introduction.

folder magic

Specifies the type of folder to use: mbox, mmdf, mh or maildir. Currently only used to determine the type for newly created folders.

e-mail address

An e-mail address either with or without realname. The older “user@example.org (Joe User)†form is supported but strongly deprecated.

user-defined

Arbitrary text, see Section 29.3, “User-Defined Variables†for details.

29.2. Commands

The following commands are available to manipulate and query variables:

Usage:

set { [ no | inv ] variable | variable=value } [...]
toggle variable [ variable ...]
unset variable [ variable ...]
reset variable [ variable ...]

This command is used to set (and unset) configuration variables. There are four basic types of variables: boolean, number, string and quadoption. boolean variables can be set (true) or unset (false). number variables can be assigned a positive integer value. string variables consist of any number of printable characters and must be enclosed in quotes if they contain spaces or tabs. You may also use the escape sequences “\n†and “\t†for newline and tab, respectively. quadoption variables are used to control whether or not to be prompted for certain actions, or to specify a default action. A value of yes will cause the action to be carried out automatically as if you had answered yes to the question. Similarly, a value of no will cause the action to be carried out as if you had answered “no.†A value of ask-yes will cause a prompt with a default answer of “yes†and ask-no will provide a default answer of “no.â€

Prefixing a variable with “no†will unset it. Example: set noaskbcc.

For boolean variables, you may optionally prefix the variable name with inv to toggle the value (on or off). This is useful when writing macros. Example: set invsmart_wrap.

The toggle command automatically prepends the inv prefix to all specified variables.

The unset command automatically prepends the no prefix to all specified variables.

Using the <enter-command> function in the index menu, you can query the value of a variable by prefixing the name of the variable with a question mark:

set ?allow_8bit

The question mark is actually only required for boolean and quadoption variables.

The reset command resets all given variables to the compile time defaults (hopefully mentioned in this manual). If you use the command set and prefix the variable with “&†this has the same behavior as the reset command.

With the reset command there exists the special variable “allâ€, which allows you to reset all variables to their system defaults.

29.3. User-Defined Variables

29.3.1. Introduction

Along with the variables listed in the Configuration variables section, Mutt supports user-defined variables with names starting with my_ as in, for example, my_cfgdir.

The set command either creates a custom my_ variable or changes its value if it does exist already. The unset and reset commands remove the variable entirely.

Since user-defined variables are expanded in the same way that environment variables are (except for the shell-escape command and backtick expansion), this feature can be used to make configuration files more readable.

29.3.2. Examples

The following example defines and uses the variable my_cfgdir to abbreviate the calls of the source command:

Example 3.17. Using user-defined variables for config file readability

set my_cfgdir = $HOME/mutt/config

source $my_cfgdir/hooks
source $my_cfgdir/macros
# more source commands...

A custom variable can also be used in macros to backup the current value of another variable. In the following example, the value of the $delete is changed temporarily while its original value is saved as my_delete. After the macro has executed all commands, the original value of $delete is restored.

Example 3.18. Using user-defined variables for backing up other config option values

macro pager ,x '\
<enter-command>set my_delete=$delete<enter>\
<enter-command>set delete=yes<enter>\
...\
<enter-command>set delete=$my_delete<enter>'

Since Mutt expands such values already when parsing the configuration file(s), the value of $my_delete in the last example would be the value of $delete exactly as it was at that point during parsing the configuration file. If another statement would change the value for $delete later in the same or another file, it would have no effect on $my_delete. However, the expansion can be deferred to runtime, as shown in the next example, when escaping the dollar sign.

Example 3.19. Deferring user-defined variable expansion to runtime

macro pager <PageDown> "\
<enter-command> set my_old_pager_stop=\$pager_stop pager_stop<Enter>\
<next-page>\
<enter-command> set pager_stop=\$my_old_pager_stop<Enter>\
<enter-command> unset my_old_pager_stop<Enter>"

Note that there is a space between <enter-command> and the set configuration command, preventing Mutt from recording the macro's commands into its history.

29.4. Type Conversions

Variables are always assigned string values which Mutt parses into its internal representation according to the type of the variable, for example an integer number for numeric types. For all queries (including $-expansion) the value is converted from its internal type back into string. As a result, any variable can be assigned any value given that its content is valid for the target. This also counts for custom variables which are of type string. In case of parsing errors, Mutt will print error messages. Example 3.20, “Type conversions using variables†demonstrates type conversions.

Example 3.20. Type conversions using variables

set my_lines = "5"                # value is string "5"
set pager_index_lines = $my_lines # value is integer 5

set my_sort = "date-received"     # value is string "date-received"
set sort = "last-$my_sort"        # value is sort last-date-received

set my_inc = $read_inc            # value is string "10" (default of $read_inc)
set my_foo = $my_inc              # value is string "10"

These assignments are all valid. If, however, the value of $my_lines would have been “five†(or something else that cannot be parsed into a number), the assignment to $pager_index_lines would have produced an error message.

Type conversion applies to all configuration commands which take arguments. But please note that every expanded value of a variable is considered just a single token. A working example is:

set my_pattern = "~A"
set my_number = "10"

# same as: score ~A +10
score $my_pattern +$my_number

What does not work is:

set my_mx = "+mailbox1 +mailbox2"
mailboxes $my_mx +mailbox3

because the value of $my_mx is interpreted as a single mailbox named “+mailbox1 +mailbox2†and not two distinct mailboxes.

30. Reading Initialization Commands From Another File

Usage:

source filename

This command allows the inclusion of initialization commands from other files. For example, I place all of my aliases in ~/.mail_aliases so that I can make my ~/.muttrc readable and keep my aliases private.

If the filename begins with a tilde (“~â€), it will be expanded to the path of your home directory.

If the filename ends with a vertical bar (“|â€), then filename is considered to be an executable program from which to read input (e.g. source ~/bin/myscript|).

31. Removing Hooks

Usage:

unhook { * | hook-type }

This command permits you to flush hooks you have previously defined. You can either remove all hooks by giving the “*†character as an argument, or you can remove all hooks of a specific type by saying something like unhook send-hook.

32. Format Strings

32.1. Basic usage

Format strings are a general concept you'll find in several locations through the Mutt configuration, especially in the $index_format, $pager_format, $status_format, and other related variables. These can be very straightforward, and it's quite possible you already know how to use them.

The most basic format string element is a percent symbol followed by another character. For example, %s represents a message's Subject: header in the $index_format variable. The “expandos†available are documented with each format variable, but there are general modifiers available with all formatting expandos, too. Those are our concern here.

Some of the modifiers are borrowed right out of C (though you might know them from Perl, Python, shell, or another language). These are the [-]m.n modifiers, as in %-12.12s. As with such programming languages, these modifiers allow you to specify the minimum and maximum size of the resulting string, as well as its justification. If the “-†sign follows the percent, the string will be left-justified instead of right-justified. If there's a number immediately following that, it's the minimum amount of space the formatted string will occupy — if it's naturally smaller than that, it will be padded out with spaces. If a decimal point and another number follow, that's the maximum space allowable — the string will not be permitted to exceed that width, no matter its natural size. Each of these three elements is optional, so that all these are legal format strings: %-12s, %4c, %.15F and %-12.15L.

Mutt adds some other modifiers to format strings. If you use an equals symbol (=) as a numeric prefix (like the minus above), it will force the string to be centered within its minimum space range. For example, %=14y will reserve 14 characters for the %y expansion — that's the X-Label: header, in $index_format. If the expansion results in a string less than 14 characters, it will be centered in a 14-character space. If the X-Label for a message were “testâ€, that expansion would look like “     test     â€.

There are two very little-known modifiers that affect the way that an expando is replaced. If there is an underline (“_â€) character between any format modifiers (as above) and the expando letter, it will expands in all lower case. And if you use a colon (“:â€), it will replace all decimal points with underlines.

32.2. Conditionals

Depending on the format string variable, some of its sequences can be used to optionally print a string if their value is nonzero. For example, you may only want to see the number of flagged messages if such messages exist, since zero is not particularly meaningful. To optionally print a string based upon one of the above sequences, the following construct is used:

%?<sequence_char>?<optional_string>?

where sequence_char is an expando, and optional_string is the string you would like printed if sequence_char is nonzero. optional_string may contain other sequences as well as normal text, but you may not nest optional strings.

Here is an example illustrating how to optionally print the number of new messages in a mailbox in $status_format:

%?n?%n new messages.?

You can also switch between two strings using the following construct:

%?<sequence_char>?<if_string>&<else_string>?

If the value of sequence_char is non-zero, if_string will be expanded, otherwise else_string will be expanded.

32.3. Filters

Any format string ending in a vertical bar (“|â€) will be expanded and piped through the first word in the string, using spaces as separator. The string returned will be used for display. If the returned string ends in %, it will be passed through the formatter a second time. This allows the filter to generate a replacement format string including % expandos.

All % expandos in a format string are expanded before the script is called so that:

Example 3.21. Using external filters in format strings

set status_format="script.sh '%r %f (%L)'|"

will make Mutt expand %r, %f and %L before calling the script. The example also shows that arguments can be quoted: the script will receive the expanded string between the single quotes as the only argument.

A practical example is the mutt_xtitle script installed in the samples subdirectory of the Mutt documentation: it can be used as filter for $status_format to set the current terminal's title, if supported.

32.4. Padding

In most format strings, Mutt supports different types of padding using special %-expandos:

%|X

When this occurs, Mutt will fill the rest of the line with the character X. For example, filling the rest of the line with dashes is done by setting:

set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-"
%>X

Since the previous expando stops at the end of line, there must be a way to fill the gap between two items via the %>X expando: it puts as many characters X in between two items so that the rest of the line will be right-justified. For example, to not put the version string and hostname the above example on the left but on the right and fill the gap with spaces, one might use (note the space after %>):

set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)"
%*X

Normal right-justification will print everything to the left of the %>, displaying padding and whatever lies to the right only if there's room. By contrast, “soft-fill†gives priority to the right-hand side, guaranteeing space to display it and showing padding only if there's still room. If necessary, soft-fill will eat text leftwards to make room for rightward text. For example, to right-justify the subject making sure as much as possible of it fits on screen, one might use (note two spaces after %* : the second ensures there's a space between the truncated right-hand side and the subject):

set index_format="%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?)%*  %s"

32.5. Bytes size display

Various format strings contain expandos that display the size of messages in bytes. This includes %s in $attach_format, %l in $compose_format, %s in $folder_format, %c in $index_format, and %l and %L in $status_format. There are four configuration variables that can be used to customize how the numbers are displayed.

$size_show_bytes will display the number of bytes when the size is < 1 kilobyte. When unset, kilobytes will be displayed instead.

$size_show_mb will display the number of megabytes when the size is >= 1 megabyte. When unset, kilobytes will be displayed instead (which could be a large number).

$size_show_fractions, will display numbers with a single decimal place for values from 0 to 10 kilobytes, and 1 to 10 megabytes.

$size_units_on_left will display the unit (“K†or “Mâ€) to the left of the number, instead of the right if unset.

These variables also affect size display in a few other places, such as progress indicators and attachment delimiters in the pager.

33. Control allowed header fields in a mailto: URL

Usage:

mailto_allow { * | header-field ... }
unmailto_allow { * | header-field ... }

As a security measure, Mutt will only add user-approved header fields from a mailto: URL. This is necessary since Mutt will handle certain header fields, such as Attach:, in a special way. The mailto_allow and unmailto_allow commands allow the user to modify the list of approved headers.

Mutt initializes the default list to contain the Subject and Body header fields, which are the only requirement specified by the mailto: specification in RFC2368, along with Cc, In-Reply-To, and References, to support mailing list URLs.

mutt-2.3.2/doc/mimesupport.html0000644000175000017500000015370315173276637014744 0ustar00kjmkjm Chapter 5. Mutt's MIME Support

Chapter 5. Mutt's MIME Support

Quite a bit of effort has been made to make Mutt the premier text-mode MIME MUA. Every effort has been made to provide the functionality that the discerning MIME user requires, and the conformance to the standards wherever possible. When configuring Mutt for MIME, there are two extra types of configuration files which Mutt uses. One is the mime.types file, which contains the mapping of file extensions to IANA MIME types. The other is the mailcap file, which specifies the external commands to use for handling specific MIME types.

1. Using MIME in Mutt

1.1. MIME Overview

MIME is short for “Multipurpose Internet Mail Extension†and describes mechanisms to internationalize and structure mail messages. Before the introduction of MIME, messages had a single text part and were limited to us-ascii header and content. With MIME, messages can have attachments (and even attachments which itself have attachments and thus form a tree structure), nearly arbitrary characters can be used for sender names, recipients and subjects.

Besides the handling of non-ascii characters in message headers, to Mutt the most important aspect of MIME are so-called MIME types. These are constructed using a major and minor type separated by a forward slash. These specify details about the content that follows. Based upon these, Mutt decides how to handle this part. The most popular major type is “text†with minor types for plain text, HTML and various other formats. Major types also exist for images, audio, video and of course general application data (e.g. to separate cryptographically signed data with a signature, send office documents, and in general arbitrary binary data). There's also the multipart major type which represents the root of a subtree of MIME parts. A list of supported MIME types can be found in Table 5.1, “Supported MIME typesâ€.

MIME also defines a set of encoding schemes for transporting MIME content over the network: 7bit, 8bit, quoted-printable, base64 and binary. There're some rules when to choose what for encoding headers and/or body (if needed), and Mutt will in general make a good choice.

Mutt does most of MIME encoding/decoding behind the scenes to form messages conforming to MIME on the sending side. On reception, it can be flexibly configured as to how what MIME structure is displayed (and if it's displayed): these decisions are based on the content's MIME type. There are three areas/menus in dealing with MIME: the pager (while viewing a message), the attachment menu and the compose menu.

1.2. Viewing MIME Messages in the Pager

When you select a message from the index and view it in the pager, Mutt decodes as much of a message as possible to a text representation. Mutt internally supports a number of MIME types, including the text major type (with all minor types), the message/rfc822 (mail messages) type and some multipart types. In addition, it recognizes a variety of PGP MIME types, including PGP/MIME and application/pgp.

Mutt will denote attachments with a couple lines describing them. These lines are of the form:

[-- Attachment #1: Description --]
[-- Type: text/plain, Encoding: 7bit, Size: 10000 --]

Where the Description is the description or filename given for the attachment, and the Encoding is one of the already mentioned content encodings.

If Mutt cannot deal with a MIME type, it will display a message like:

[-- image/gif is unsupported (use 'v' to view this part) --]

1.3. The Attachment Menu

The default binding for <view-attachments> is “vâ€, which displays the attachment menu for a message. The attachment menu displays a list of the attachments in a message. From the attachment menu, you can save, print, pipe, delete, and view attachments. You can apply these operations to a group of attachments at once, by tagging the attachments and by using the <tag-prefix> operator. You can also reply to the current message from this menu, and only the current attachment (or the attachments tagged) will be quoted in your reply. You can view attachments as text, or view them using the mailcap viewer definition (the mailcap mechanism is explained later in detail).

Finally, you can apply the usual message-related functions (like <resend-message>, and the <reply> and <forward> functions) to attachments of type message/rfc822.

See table Table 9.7, “Default Attachment Menu Bindings†for all available functions.

1.3.1. Viewing Attachments

There are four(!) ways of viewing attachments, so the functions deserve some extra explanation.

<view-mailcap> (default keybinding: m)

This will use the first matching mailcap entry.

If no matching mailcap entries are found, it will abort with an error message.

<view-attach> (default keybinding: <Enter>)

Mutt will display internally supported MIME types (see Section 1.2, “Viewing MIME Messages in the Pagerâ€) in the pager. This will respect auto_view settings, to determine whether to use a copiousoutput mailcap entry or just directly display the attachment.

Other MIME types will use the first matching mailcap entry.

If no matching mailcap entries are found, the attachment will be displayed in the pager as raw text.

<view-pager>

Mutt will use the first matching copiousoutput mailcap entry to display the attachment in the pager (regardless of auto_view settings).

If no matching mailcap entries are found, the attachment will be displayed in the pager as raw text.

<view-text> (default keybinding: T)

The attachment will always be displayed in the pager as raw text.

1.4. The Compose Menu

The compose menu is the menu you see before you send a message. It allows you to edit the recipient list, the subject, and other aspects of your message. It also contains a list of the attachments of your message, including the main body. From this menu, you can print, copy, filter, pipe, edit, compose, review, and rename an attachment or a list of tagged attachments. You can also modifying the attachment information, notably the type, encoding and description.

Attachments appear as follows by default:

- 1 [text/plain, 7bit, 1K]           /tmp/mutt-euler-8082-0 <no description>
  2 [applica/x-gunzip, base64, 422K] ~/src/mutt-0.85.tar.gz <no description>

The “-†denotes that Mutt will delete the file after sending (or postponing, or canceling) the message. It can be toggled with the <toggle-unlink> command (default: u). The next field is the MIME content-type, and can be changed with the <edit-type> command (default: ^T). The next field is the encoding for the attachment, which allows a binary message to be encoded for transmission on 7bit links. It can be changed with the <edit-encoding> command (default: ^E). The next field is the size of the attachment, rounded to kilobytes or megabytes. The next field is the filename, which can be changed with the <rename-file> command (default: R). The final field is the description of the attachment, and can be changed with the <edit-description> command (default: d). See $attach_format for a full list of available expandos to format this display to your needs.

2. MIME Type Configuration with mime.types

To get most out of MIME, it's important that a MIME part's content type matches the content as closely as possible so that the recipient's client can automatically select the right viewer for the content. However, there's no reliable way for Mutt to know how to detect every possible file type. Instead, it uses a simple plain text mapping file that specifies what file extension corresponds to what MIME type. This file is called mime.types.

When you add an attachment to your mail message, Mutt searches your personal mime.types file at $HOME/.mime.types, and then the system mime.types file at /usr/local/share/mutt/mime.types or /etc/mime.types

Each line starts with the full MIME type, followed by a space and space-separated list of file extensions. For example you could use:

Example 5.1. mime.types

application/postscript          ps eps
application/pgp                 pgp
audio/x-aiff                    aif aifc aiff

A sample mime.types file comes with the Mutt distribution, and should contain most of the MIME types you are likely to use.

If Mutt can not determine the MIME type by the extension of the file you attach, it will run the command specified in $mime_type_query_command. If that command is not specified, Mutt will look at the file. If the file is free of binary information, Mutt will assume that the file is plain text, and mark it as text/plain. If the file contains binary information, then Mutt will mark it as application/octet-stream. You can change the MIME type that Mutt assigns to an attachment by using the <edit-type> command from the compose menu (default: ^T), see Table 5.1, “Supported MIME types†for supported major types. Mutt recognizes all of these if the appropriate entry is found in the mime.types file. Non-recognized mime types should only be used if the recipient of the message is likely to be expecting such attachments.

Table 5.1. Supported MIME types

MIME major typeStandardDescription
applicationyesGeneral application data
audioyesAudio data
imageyesImage data
messageyesMail messages, message status information
modelyesVRML and other modeling data
multipartyesContainer for other MIME parts
textyesText data
videoyesVideo data
chemicalnoMostly molecular data

MIME types are not arbitrary, they need to be assigned by IANA.

3. MIME Viewer Configuration with Mailcap

Mutt supports RFC 1524 MIME Configuration, in particular the Unix specific format specified in Appendix A of RFC 1524. This file format is commonly referred to as the “mailcap†format. Many MIME compliant programs utilize the mailcap format, allowing you to specify handling for all MIME types in one place for all programs. Programs known to use this format include Firefox, lynx and metamail.

In order to handle various MIME types that Mutt doesn't have built-in support for, it parses a series of external configuration files to find an external handler. The default search string for these files is a colon delimited list containing the following files:

  1. $HOME/.mailcap

  2. $PKGDATADIR/mailcap

  3. $SYSCONFDIR/mailcap

  4. /etc/mailcap

  5. /usr/etc/mailcap

  6. /usr/local/etc/mailcap

where $HOME is your home directory. The $PKGDATADIR and the $SYSCONFDIR directories depend on where Mutt is installed: the former is the default for shared data, the latter for system configuration files.

The default search path can be obtained by running the following command:

mutt -nF /dev/null -Q mailcap_path

In particular, the metamail distribution will install a mailcap file, usually as /usr/local/etc/mailcap, which contains some baseline entries.

3.1. The Basics of the Mailcap File

A mailcap file consists of a series of lines which are comments, blank, or definitions.

A comment line consists of a # character followed by anything you want.

A blank line is blank.

A definition line consists of a content type, a view command, and any number of optional fields. Each field of a definition line is divided by a semicolon “;†character.

The content type is specified in the MIME standard “type/subtype†notation. For example, text/plain, text/html, image/gif, etc. In addition, the mailcap format includes two formats for wildcards, one using the special “*†subtype, the other is the implicit wild, where you only include the major type. For example, image/*, or video will match all image types and video types, respectively.

The view command is a Unix command for viewing the type specified. There are two different types of commands supported. The default is to send the body of the MIME message to the command on stdin. You can change this behavior by using %s as a parameter to your view command. This will cause Mutt to save the body of the MIME message to a temporary file, and then call the view command with the %s replaced by the name of the temporary file. In both cases, Mutt will turn over the terminal to the view program until the program quits, at which time Mutt will remove the temporary file if it exists. This means that mailcap does not work out of the box with programs which detach themselves from the terminal right after starting, like open on Mac OS X. In order to nevertheless use these programs with mailcap, you probably need custom shell scripts.

So, in the simplest form, you can send a text/plain message to the external pager more on standard input:

text/plain; more

Or, you could send the message as a file:

text/plain; more %s

Perhaps you would like to use lynx to interactively view a text/html message:

text/html; lynx %s

In this case, lynx does not support viewing a file from standard input, so you must use the %s syntax.

Note

Some older versions of lynx contain a bug where they will check the mailcap file for a viewer for text/html. They will find the line which calls lynx, and run it. This causes lynx to continuously spawn itself to view the object.

On the other hand, maybe you don't want to use lynx interactively, you just want to have it convert the text/html to text/plain, then you can use:

text/html; lynx -dump %s | more

Perhaps you wish to use lynx to view text/html files, and a pager on all other text formats, then you would use the following:

text/html; lynx %s
text/*; more

3.2. Secure Use of Mailcap

The interpretation of shell meta-characters embedded in MIME parameters can lead to security problems in general. Mutt tries to quote parameters in expansion of %s syntaxes properly, and avoids risky characters by substituting them, see the $mailcap_sanitize variable.

Although Mutt's procedures to invoke programs with mailcap seem to be safe, there are other applications parsing mailcap, maybe taking less care of it. Therefore you should pay attention to the following rules:

Keep the %-expandos away from shell quoting. Don't quote them with single or double quotes. Mutt does this for you, the right way, as should any other program which interprets mailcap. Don't put them into backtick expansions. Be highly careful with evil statements, and avoid them if possible at all. Trying to fix broken behavior with quotes introduces new leaks — there is no alternative to correct quoting in the first place.

If you have to use the %-expandos' values in context where you need quoting or backtick expansions, put that value into a shell variable and reference the shell variable where necessary, as in the following example (using $charset inside the backtick expansion is safe, since it is not itself subject to any further expansion):

text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
        && test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1

3.3. Advanced Mailcap Usage

3.3.1. Optional Fields

In addition to the required content-type and view command fields, you can add semi-colon “;†separated fields to set flags and other options. Mutt recognizes the following optional fields:

copiousoutput

This flag tells Mutt that the command passes possibly large amounts of text on standard output. This causes Mutt to invoke a pager (either the internal pager or the external pager defined by the pager variable) on the output of the view command. Without this flag, Mutt assumes that the command is interactive. One could use this to replace the pipe to more in the lynx -dump example in the Basic section:

text/html; lynx -dump %s ; copiousoutput

This will cause lynx to format the text/html output as text/plain and Mutt will use your standard pager to display the results.

Mutt will set the COLUMNS environment variable to the width of the pager. Some programs make use of this environment variable automatically. Others provide a command line argument that can use this to set the output width:

text/html; lynx -dump -width ${COLUMNS:-80} %s; copiousoutput

Note that when using the built-in pager, only entries with this flag will be considered a handler for a MIME type — all other entries will be ignored.

needsterminal

Mutt uses this flag when viewing attachments with auto_view, in order to decide whether it should honor the setting of the $wait_key variable or not. When an attachment is viewed using an interactive program, and the corresponding mailcap entry has a needsterminal flag, Mutt will use $wait_key and the exit status of the program to decide if it will ask you to press a key after the external program has exited. In all other situations it will not prompt you for a key.

compose=<command>

This flag specifies the command to use to create a new attachment of a specific MIME type. Mutt supports this from the compose menu.

composetyped=<command>

This flag specifies the command to use to create a new attachment of a specific MIME type. This command differs from the compose command in that Mutt will expect standard MIME headers on the data. This can be used to specify parameters, filename, description, etc. for a new attachment. Mutt supports this from the compose menu.

print=<command>

This flag specifies the command to use to print a specific MIME type. Mutt supports this from the attachment and compose menus.

edit=<command>

This flag specifies the command to use to edit a specific MIME type. Mutt supports this from the compose menu, and also uses it to compose new attachments. Mutt will default to the defined $editor for text attachments.

nametemplate=<template>

This field specifies the format for the file denoted by %s in the command fields. Certain programs will require a certain file extension, for instance, to correctly view a file. For instance, lynx will only interpret a file as text/html if the file ends in .html. So, you would specify lynx as a text/html viewer with a line in the mailcap file like:

text/html; lynx %s; nametemplate=%s.html
test=<command>

This field specifies a command to run to test whether this mailcap entry should be used. The command is defined with the command expansion rules defined in the next section. If the command returns 0, then the test passed, and Mutt uses this entry. If the command returns non-zero, then the test failed, and Mutt continues searching for the right entry. Note that the content-type must match before Mutt performs the test. For example:

text/html; firefox -remote 'openURL(%s)' ; test=RunningX
text/html; lynx %s

In this example, Mutt will run the program RunningX which will return 0 if the X Window manager is running, and non-zero if it isn't. If RunningX returns 0, then Mutt will run firefox to display the text/html object. If RunningX doesn't return 0, then Mutt will go on to the next entry and use lynx to display the text/html object.

3.3.2. Search Order

When searching for an entry in the mailcap file, Mutt will search for the most useful entry for its purpose. For instance, if you are attempting to print an image/gif, and you have the following entries in your mailcap file, Mutt will search for an entry with the print command:

image/*;        xv %s
image/gif;      ; print= anytopnm %s | pnmtops | lpr; \
                nametemplate=%s.gif

Mutt will skip the image/* entry and use the image/gif entry with the print command.

In addition, you can use this with auto_view to denote two commands for viewing an attachment, one to be viewed automatically, the other to be viewed interactively from the attachment menu using the <view-mailcap> function (bound to “m†by default). In addition, you can then use the test feature to determine which viewer to use interactively depending on your environment.

text/html;      firefox -remote 'openURL(%s)' ; test=RunningX
text/html;      lynx %s; nametemplate=%s.html
text/html;      lynx -dump %s; nametemplate=%s.html; copiousoutput

For auto_view, Mutt will choose the third entry because of the copiousoutput tag. For interactive viewing, Mutt will run the program RunningX to determine if it should use the first entry. If the program returns non-zero, Mutt will use the second entry for interactive viewing. The last entry is for inline display in the pager and the <view-attach> function in the attachment menu.

Entries with the copiousoutput tag should always be specified as the last one per type. For non-interactive use, the last entry will then actually be the first matching one with the tag set. For non-interactive use, only copiousoutput-tagged entries are considered. For interactive use, Mutt ignores this tag and treats all entries equally. Therefore, if not specified last, all following entries without this tag would never be considered for <view-attach> because the copiousoutput before them matched already.

3.3.3. Command Expansion

The various commands defined in the mailcap files are passed to the /bin/sh shell using the system(3) function. Before the command is passed to /bin/sh -c, it is parsed to expand various special parameters with information from Mutt. The keywords Mutt expands are:

%s

As seen in the basic mailcap section, this variable is expanded to a filename specified by the calling program. This file contains the body of the message to view/print/edit or where the composing program should place the results of composition. In addition, the use of this keyword causes Mutt to not pass the body of the message to the view/print/edit program on stdin.

%t

Mutt will expand %t to the text representation of the content type of the message in the same form as the first parameter of the mailcap definition line, i.e. text/html or image/gif.

%{<parameter>}

Mutt will expand this to the value of the specified parameter from the Content-Type: line of the mail message. For instance, if your mail message contains:

Content-Type: text/plain; charset=iso-8859-1

then Mutt will expand %{charset} to “iso-8859-1â€. The default metamail mailcap file uses this feature to test the charset to spawn an xterm using the right charset to view the message.

\%

This will be replaced by a literal %.

Mutt does not currently support the %F and %n keywords specified in RFC 1524. The main purpose of these parameters is for multipart messages, which is handled internally by Mutt.

3.4. Example Mailcap Files

This mailcap file is fairly simple and standard:

# I'm always running X :)
video/*;        xanim %s > /dev/null
image/*;        xv %s > /dev/null

# I'm always running firefox (if my computer had more memory, maybe)
text/html;      firefox -remote 'openURL(%s)'

This mailcap file shows quite a number of examples:

# Use xanim to view all videos   Xanim produces a header on startup,
# send that to /dev/null so I don't see it
video/*;        xanim %s > /dev/null

# Send html to a running firefox by remote
text/html;      firefox -remote 'openURL(%s)'; test=RunningFirefox

# If I'm not running firefox but I am running X, start firefox on the
# object
text/html;      firefox %s; test=RunningX

# Else use lynx to view it as text
text/html;      lynx %s

# This version would convert the text/html to text/plain
text/html;      lynx -dump %s; copiousoutput

# I use enscript to print text in two columns to a page
text/*;         more %s; print=enscript -2Gr %s

# Firefox adds a flag to tell itself to view jpegs internally
image/jpeg;xv %s; x-mozilla-flags=internal

# Use xv to view images if I'm running X
# In addition, this uses the \ to extend the line and set my editor
# for images
image/*;xv %s; test=RunningX; \
        edit=xpaint %s

# Convert images to text using the netpbm tools
image/*;  (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | pgmtopbm |
pbmtoascii -1x2 ) 2>&1 ; copiousoutput

# Send excel spreadsheets to my NT box
application/ms-excel; open.pl %s

4. MIME Autoview

Usage:

auto_view mimetype [ mimetype ...]
unauto_view { * | mimetype ... }

In addition to explicitly telling Mutt to view an attachment with the MIME viewer defined in the mailcap file from the attachments menu, Mutt has support for automatically viewing MIME attachments while in the pager.

For this to work, you must define a viewer in the mailcap file which uses the copiousoutput option to denote that it is non-interactive. Usually, you also use the entry to convert the attachment to a text representation which you can view in the pager.

You then use the auto_view configuration command to list the content-types that you wish to view automatically. For instance, if you set it to:

auto_view text/html application/x-gunzip \
  application/postscript image/gif application/x-tar-gz

...Mutt would try to find corresponding entries for rendering attachments of these types as text. A corresponding mailcap could look like:

text/html;      lynx -dump %s; copiousoutput; nametemplate=%s.html
image/*;        anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | \
                pgmtopbm | pbmtoascii ; copiousoutput
application/x-gunzip;   gzcat; copiousoutput
application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
application/postscript; ps2ascii %s; copiousoutput

unauto_view can be used to remove previous entries from the auto_view list. This can be used with message-hook to autoview messages based on size, etc. “unauto_view *†will remove all previous entries.

5. MIME Multipart/Alternative

The multipart/alternative container type only has child MIME parts which represent the same content in an alternative way. This is often used to send HTML messages which contain an alternative plain text representation.

Mutt has some heuristics for determining which attachment of a multipart/alternative type to display:

  1. First, Mutt will check the alternative_order list to determine if one of the available types is preferred. It consists of a number of MIME types in order, including support for implicit and explicit wildcards. For example:

    alternative_order text/enriched text/plain text \
      application/postscript image/*
    
  2. Next, Mutt will check if any of the types have a defined auto_view, and use that.

  3. Failing that, Mutt will look first for text/enriched, followed by text/plain, and finally text/html.

  4. As a last attempt, Mutt will look for any type it knows how to handle.

To remove a MIME type from the alternative_order list, use the unalternative_order command.

Generating multipart/alternative content is supported via the $send_multipart_alternative quadoption and $send_multipart_alternative_filter filter script. The composed text/plain content will be piped to the filter script's stdin. The output from the filter script should be the generated mime type of the content, a blank line, and the content. For example:

text/html

<html>
<body>
Content in html format
</body>
</html>

A preview of the alternative can be viewed in the compose menu using the functions <view-alt> (bound to "v"), <view-alt-text> (bound to "Esc v"), <view-alt-mailcap> (bound to "V"), and <view-alt-pager> (unbound). See Section 1.3.1, “Viewing Attachments†for a discussion of the differences between these viewing functions.

6. Attachment Searching and Counting

If you ever lose track of attachments in your mailboxes, Mutt's attachment-counting and -searching support might be for you. You can make your message index display the number of qualifying attachments in each message, or search for messages by attachment count. You also can configure what kinds of attachments qualify for this feature with the attachments and unattachments commands.

In order to provide this information, Mutt needs to fully MIME-parse all messages affected first. This can slow down operation especially for remote mail folders such as IMAP because all messages have to be downloaded first regardless whether the user really wants to view them or not though using Section 8.2, “Body Caching†usually means to download the message just once.

By default, Mutt will not search inside multipart/alternative containers. This can be changed via the $count_alternatives configuration variable.

The syntax is:

attachments { + | - }disposition mime-type
unattachments { + | - }disposition mime-type
attachments ?
unattachments *

disposition is the attachment's Content-Disposition type — either inline or attachment. You can abbreviate this to I or A.

The first part of a message or multipart group, if inline, is counted separately than other inline parts. Specify root or R for disposition to count these as attachments. If this first part is of type multipart/alternative, note that its top-level inline parts are also counted via root disposition (if $count_alternatives is set).

Disposition is prefixed by either a “+†symbol or a “-†symbol. If it's a “+â€, you're saying that you want to allow this disposition and MIME type to qualify. If it's a “-â€, you're saying that this disposition and MIME type is an exception to previous “+†rules. There are examples below of how this is useful.

mime-type is the MIME type of the attachment you want the command to affect. A MIME type is always of the format major/minor, where major describes the broad category of document you're looking at, and minor describes the specific type within that category. The major part of mime-type must be literal text (or the special token “*â€), but the minor part may be a regular expression. (Therefore, “*/.*†matches any MIME type.)

The MIME types you give to the attachments directive are a kind of pattern. When you use the attachments directive, the patterns you specify are added to a list. When you use unattachments, the pattern is removed from the list. The patterns are not expanded and matched to specific MIME types at this time — they're just text in a list. They're only matched when actually evaluating a message.

Some examples might help to illustrate. The examples that are not commented out define the default configuration of the lists.

Example 5.2. Attachment counting


# Removing a pattern from a list removes that pattern literally. It
# does not remove any type matching the pattern.
#
#  attachments   +A */.*
#  attachments   +A image/jpeg
#  unattachments +A */.*
#
# This leaves "attached" image/jpeg files on the allowed attachments
# list. It does not remove all items, as you might expect, because the
# second */.* is not a matching expression at this time.
#
# Remember: "unattachments" only undoes what "attachments" has done!
# It does not trigger any matching on actual messages.

# Qualify any MIME part with an "attachment" disposition, EXCEPT for
# text/x-vcard and application/pgp parts. (PGP parts are already known
# to mutt, and can be searched for with ~g, ~G, and ~k.)
#
# I've added x-pkcs7 to this, since it functions (for S/MIME)
# analogously to PGP signature attachments. S/MIME isn't supported
# in a stock mutt build, but we can still treat it specially here.
#

attachments   +A */.*
attachments   -A text/x-vcard application/pgp.*
attachments   -A application/x-pkcs7-.*


# Discount all MIME parts with an "inline" disposition, unless they're
# text/plain. (Why inline a text/plain part unless it's external to the
# message flow?)

attachments   +I text/plain


# These two lines make Mutt qualify MIME containers.  (So, for example,
# a message/rfc822 forward will count as an attachment.)  The first
# line is unnecessary if you already have "attach-allow */.*", of
# course.  These are off by default!  The MIME elements contained
# within a message/* or multipart/* are still examined, even if the
# containers themselves don't qualify.

#attachments  +A message/.* multipart/.*
#attachments  +I message/.* multipart/.*


## You probably don't really care to know about deleted attachments.
attachments   -A message/external-body
attachments   -I message/external-body

Entering the command “attachments ?†as a command will list your current settings in Muttrc format, so that it can be pasted elsewhere.

Entering the command “unattachments *†as a command will Clear all attachment settings.

7. MIME Lookup

Usage:

mime_lookup mimetype [ mimetype ...]
unmime_lookup { * | mimetype ... }

Mutt's mime_lookup list specifies a list of MIME types that should not be treated according to their mailcap entry. This option is designed to deal with binary types such as application/octet-stream. When an attachment's MIME type is listed in mime_lookup, then the extension of the filename will be compared to the list of extensions in the mime.types file. The MIME type associated with this extension will then be used to process the attachment according to the rules in the mailcap file and according to any other configuration options (such as auto_view) specified. Common usage would be:

mime_lookup application/octet-stream application/X-Lotus-Manuscript

In addition, the unmime_lookup command may be used to disable this feature for any particular MIME type if it had been set, for example, in a global .muttrc.

mutt-2.3.2/doc/advancedusage.html0000644000175000017500000034241215173276637015147 0ustar00kjmkjm Chapter 4. Advanced Usage

Chapter 4. Advanced Usage

1. Character Set Handling

A “character set†is basically a mapping between bytes and glyphs and implies a certain character encoding scheme. For example, for the ISO 8859 family of character sets, an encoding of 8bit per character is used. For the Unicode character set, different character encodings may be used, UTF-8 being the most popular. In UTF-8, a character is represented using a variable number of bytes ranging from 1 to 4.

Since Mutt is a command-line tool run from a shell, and delegates certain tasks to external tools (such as an editor for composing/editing messages), all of these tools need to agree on a character set and encoding. There exists no way to reliably deduce the character set a plain text file has. Interoperability is gained by the use of well-defined environment variables. The full set can be printed by issuing locale on the command line.

Upon startup, Mutt determines the character set on its own using routines that inspect locale-specific environment variables. Therefore, it is generally not necessary to set the $charset variable in Mutt. It may even be counter-productive as Mutt uses system and library functions that derive the character set themselves and on which Mutt has no influence. It's safest to let Mutt work out the locale setup itself.

If you happen to work with several character sets on a regular basis, it's highly advisable to use Unicode and an UTF-8 locale. Unicode can represent nearly all characters in a message at the same time. When not using a Unicode locale, it may happen that you receive messages with characters not representable in your locale. When displaying such a message, or replying to or forwarding it, information may get lost possibly rendering the message unusable (not only for you but also for the recipient, this breakage is not reversible as lost information cannot be guessed).

A Unicode locale makes all conversions superfluous which eliminates the risk of conversion errors. It also eliminates potentially wrong expectations about the character set between Mutt and external programs.

The terminal emulator used also must be properly configured for the current locale. Terminal emulators usually do not derive the locale from environment variables, they need to be configured separately. If the terminal is incorrectly configured, Mutt may display random and unexpected characters (question marks, octal codes, or just random glyphs), format strings may not work as expected, you may not be abled to enter non-ascii characters, and possible more. Data is always represented using bytes and so a correct setup is very important as to the machine, all character sets “look†the same.

Warning: A mismatch between what system and library functions think the locale is and what Mutt was told what the locale is may make it behave badly with non-ascii input: it will fail at seemingly random places. This warning is to be taken seriously since not only local mail handling may suffer: sent messages may carry wrong character set information the receiver has too deal with. The need to set $charset directly in most cases points at terminal and environment variable setup problems, not Mutt problems.

A list of officially assigned and known character sets can be found at IANA, a list of locally supported locales can be obtained by running locale -a.

2. Regular Expressions

All string patterns in Mutt including those in more complex patterns must be specified using regular expressions (regexp) in the “POSIX extended†syntax (which is more or less the syntax used by egrep and GNU awk). For your convenience, we have included below a brief description of this syntax.

The search is case sensitive if the pattern contains at least one upper case letter, and case insensitive otherwise.

Note

“\†must be quoted if used for a regular expression in an initialization command: “\\â€.

A regular expression is a pattern that describes a set of strings. Regular expressions are constructed analogously to arithmetic expressions, by using various operators to combine smaller expressions.

Note

The regular expression can be enclosed/delimited by either " or ' which is useful if the regular expression includes a white-space character. See Syntax of Initialization Files for more information on " and ' delimiter processing. To match a literal " or ' you must preface it with \ (backslash).

The fundamental building blocks are the regular expressions that match a single character. Most characters, including all letters and digits, are regular expressions that match themselves. Any metacharacter with special meaning may be quoted by preceding it with a backslash.

The period “.†matches any single character. The caret “^†and the dollar sign “$†are metacharacters that respectively match the empty string at the beginning and end of a line.

A list of characters enclosed by “[†and “]†matches any single character in that list; if the first character of the list is a caret “^†then it matches any character not in the list. For example, the regular expression [0123456789] matches any single digit. A range of ASCII characters may be specified by giving the first and last characters, separated by a hyphen “-â€. Most metacharacters lose their special meaning inside lists. To include a literal “]†place it first in the list. Similarly, to include a literal “^†place it anywhere but first. Finally, to include a literal hyphen “-†place it last.

Certain named classes of characters are predefined. Character classes consist of “[:â€, a keyword denoting the class, and “:]â€. The following classes are defined by the POSIX standard in Table 4.1, “POSIX regular expression character classesâ€

Table 4.1. POSIX regular expression character classes

Character classDescription
[:alnum:]Alphanumeric characters
[:alpha:]Alphabetic characters
[:blank:]Space or tab characters
[:cntrl:]Control characters
[:digit:]Numeric characters
[:graph:]Characters that are both printable and visible. (A space is printable, but not visible, while an “a†is both)
[:lower:]Lower-case alphabetic characters
[:print:]Printable characters (characters that are not control characters)
[:punct:]Punctuation characters (characters that are not letter, digits, control characters, or space characters)
[:space:]Space characters (such as space, tab and formfeed, to name a few)
[:upper:]Upper-case alphabetic characters
[:xdigit:]Characters that are hexadecimal digits

A character class is only valid in a regular expression inside the brackets of a character list.

Note

Note that the brackets in these class names are part of the symbolic names, and must be included in addition to the brackets delimiting the bracket list. For example, [[:digit:]] is equivalent to [0-9].

Two additional special sequences can appear in character lists. These apply to non-ASCII character sets, which can have single symbols (called collating elements) that are represented with more than one character, as well as several characters that are equivalent for collating or sorting purposes:

Collating Symbols

A collating symbol is a multi-character collating element enclosed in “[.†and “.]â€. For example, if “ch†is a collating element, then [[.ch.]] is a regexp that matches this collating element, while [ch] is a regexp that matches either “c†or “hâ€.

Equivalence Classes

An equivalence class is a locale-specific name for a list of characters that are equivalent. The name is enclosed in “[=†and “=]â€. For example, the name “e†might be used to represent all of “e†with grave (“èâ€), “e†with acute (“éâ€) and “eâ€. In this case, [[=e=]] is a regexp that matches any of: “e†with grave (“èâ€), “e†with acute (“éâ€) and “eâ€.

A regular expression matching a single character may be followed by one of several repetition operators described in Table 4.2, “Regular expression repetition operatorsâ€.

Table 4.2. Regular expression repetition operators

OperatorDescription
?The preceding item is optional and matched at most once
*The preceding item will be matched zero or more times
+The preceding item will be matched one or more times
{n}The preceding item is matched exactly n times
{n,}The preceding item is matched n or more times
{,m}The preceding item is matched at most m times
{n,m}The preceding item is matched at least n times, but no more than m times

Two regular expressions may be concatenated; the resulting regular expression matches any string formed by concatenating two substrings that respectively match the concatenated subexpressions.

Two regular expressions may be joined by the infix operator “|â€; the resulting regular expression matches any string matching either subexpression.

Repetition takes precedence over concatenation, which in turn takes precedence over alternation. A whole subexpression may be enclosed in parentheses to override these precedence rules.

Note

If you compile Mutt with the included regular expression engine, the following operators may also be used in regular expressions as described in Table 4.3, “GNU regular expression extensionsâ€.

Table 4.3. GNU regular expression extensions

ExpressionDescription
\\yMatches the empty string at either the beginning or the end of a word
\\BMatches the empty string within a word
\\<Matches the empty string at the beginning of a word
\\>Matches the empty string at the end of a word
\\wMatches any word-constituent character (letter, digit, or underscore)
\\WMatches any character that is not word-constituent
\\`Matches the empty string at the beginning of a buffer (string)
\\'Matches the empty string at the end of a buffer

Please note however that these operators are not defined by POSIX, so they may or may not be available in stock libraries on various systems.

3. Patterns: Searching, Limiting and Tagging

3.1. Pattern Modifier

Many of Mutt's commands allow you to specify a pattern to match (limit, tag-pattern, delete-pattern, etc.). Table 4.4, “Pattern modifiers†shows several ways to select messages.

Table 4.4. Pattern modifiers

Pattern modifierDescription
~Aall messages
~b EXPRmessages which contain EXPR in the message body ***)
=b STRINGIf IMAP is enabled, like ~b but searches for STRING on the server, rather than downloading each message and searching it locally.
~B EXPRmessages which contain EXPR in the whole message ***)
=B STRINGIf IMAP is enabled, like ~B but searches for STRING on the server, rather than downloading each message and searching it locally.
~c EXPRmessages carbon-copied to EXPR
%c GROUPmessages carbon-copied to any member of GROUP
~C EXPRmessages either to: or cc: EXPR
%C GROUPmessages either to: or cc: to any member of GROUP
~d [MIN]-[MAX]messages with “date-sent†in a Date range
~Ddeleted messages
~e EXPRmessages which contains EXPR in the “Sender†field
%e GROUPmessages which contain a member of GROUP in the “Sender†field
~Eexpired messages
~Fflagged messages
~f EXPRmessages originating from EXPR
%f GROUPmessages originating from any member of GROUP
~gcryptographically signed messages
~Gcryptographically encrypted messages
~h EXPRmessages which contain EXPR in the message header ***)
=h STRINGIf IMAP is enabled, like ~h but searches for STRING on the server, rather than downloading each message and searching it locally; STRING must be of the form “header: substring†(see below).
~H EXPRmessages with a spam attribute matching EXPR
~i EXPRmessages which match EXPR in the “Message-ID†field
~kmessages which contain PGP key material
~L EXPRmessages either originated or received by EXPR
%L GROUPmessage either originated or received by any member of GROUP
~lmessages addressed to a known mailing list
~m [MIN]-[MAX]messages in the range MIN to MAX *)
~M EXPRmessages which contain a mime Content-Type matching EXPR ***)
~n [MIN]-[MAX]messages with a score in the range MIN to MAX *)
~Nnew messages
~Oold messages
~pmessages addressed to you (consults $from, alternates, and local account/hostname information)
~Pmessages from you (consults $from, alternates, and local account/hostname information)
~Qmessages which have been replied to
~r [MIN]-[MAX]messages with “date-received†in a Date range
~Rread messages
~s EXPRmessages having EXPR in the “Subject†field.
~Ssuperseded messages
~t EXPRmessages addressed to EXPR
~Ttagged messages
~umessages addressed to a subscribed mailing list
~Uunread messages
~vmessages part of a collapsed thread.
~Vcryptographically verified messages
~x EXPRmessages which contain EXPR in the “References†or “In-Reply-To†field
~X [MIN]-[MAX]messages with MIN to MAX attachments *) ***)
~y EXPRmessages which contain EXPR in the “X-Label†field
~z [MIN]-[MAX]messages with a size in the range MIN to MAX *) **)
~=duplicated messages (see $duplicate_threads)
~$unreferenced messages (requires threaded view)
~(PATTERN)messages in threads containing messages matching PATTERN, e.g. all threads containing messages from you: ~(~P)
~<(PATTERN)messages whose immediate parent matches PATTERN, e.g. replies to your messages: ~<(~P)
~>(PATTERN)messages having an immediate child matching PATTERN, e.g. messages you replied to: ~>(~P)

Where EXPR is a regular expression, and GROUP is an address group.

*) The forms “<[MAX]â€, “>[MIN]â€, “[MIN]-†and “-[MAX]†are allowed, too.

**) The suffixes “K†and “M†are allowed to specify kilobyte and megabyte respectively.

***) These patterns read each message in, and can therefore be much slower. Over IMAP this will entail downloading each message. They can not be used for message scoring, and it is recommended to avoid using them for index coloring.

Special attention has to be paid when using regular expressions inside of patterns. Specifically, Mutt's parser for these patterns will strip one level of backslash (“\â€), which is normally used for quoting. If it is your intention to use a backslash in the regular expression, you will need to use two backslashes instead (“\\â€).

You can force Mutt to treat EXPR as a simple string instead of a regular expression by using = instead of ~ in the pattern name. For example, =b *.* will find all messages that contain the literal string “*.*â€. Simple string matches are less powerful than regular expressions but can be considerably faster.

For IMAP folders, string matches =b, =B, and =h will be performed on the server instead of by fetching every message. IMAP treats =h specially: it must be of the form “header: substring†and will not partially match header names. The substring part may be omitted if you simply wish to find messages containing a particular header without regard to its value.

Patterns matching lists of addresses (notably c, C, p, P and t) match if there is at least one match in the whole list. If you want to make sure that all elements of that list match, you need to prefix your pattern with “^â€. This example matches all mails which only has recipients from Germany.

Example 4.1. Matching all addresses in address lists

^~C \.de$

You can restrict address pattern matching to aliases that you have defined with the "@" modifier. This example matches messages whose recipients are all from Germany, and who are known to your alias list.

Example 4.2. Matching restricted to aliases

^@~C \.de$

To match any defined alias, use a regular expression that matches any string. This example matches messages whose senders are known aliases.

Example 4.3. Matching any defined alias

@~f .

3.2. Simple Searches

Mutt supports two versions of so called “simple searchesâ€. These are issued if the query entered for searching, limiting and similar operations does not seem to contain a valid pattern modifier (i.e. it does not contain one of these characters: “~â€, “=†or “%â€). If the query is supposed to contain one of these special characters, they must be escaped by prepending a backslash (“\â€).

The first type is by checking whether the query string equals a keyword case-insensitively from Table 4.5, “Simple search keywordsâ€: If that is the case, Mutt will use the shown pattern modifier instead. If a keyword would conflict with your search keyword, you need to turn it into a regular expression to avoid matching the keyword table. For example, if you want to find all messages matching “flag†(using $simple_search) but don't want to match flagged messages, simply search for “[f]lagâ€.

Table 4.5. Simple search keywords

KeywordPattern modifier
all~A
.~A
^~A
del~D
flag~F
new~N
old~O
repl~Q
read~R
tag~T
unread~U

The second type of simple search is to build a complex search pattern using $simple_search as a template. Mutt will insert your query properly quoted and search for the composed complex query.

3.3. Nesting and Boolean Operators

Logical AND is performed by specifying more than one criterion. For example:

~t mutt ~f elkins

would select messages which contain the word “mutt†in the list of recipients and that have the word “elkins†in the “From†header field.

Mutt also recognizes the following operators to create more complex search patterns:

  • ! — logical NOT operator

  • | — logical OR operator

  • () — logical grouping operator

Here is an example illustrating a complex search pattern. This pattern will select all messages which do not contain “mutt†in the “To†or “Cc†field and which are from “elkinsâ€.

Example 4.4. Using boolean operators in patterns

!(~t mutt|~c mutt) ~f elkins

Here is an example using white space in the regular expression (note the “'†and “"†delimiters). For this to match, the mail's subject must match the “^Junk +From +Me$†and it must be from either “Jim +Somebody†or “Ed +SomeoneElseâ€:

'~s "^Junk +From +Me$" ~f ("Jim +Somebody"|"Ed +SomeoneElse")'

Note

If a regular expression contains parenthesis, or a vertical bar ("|"), you must enclose the expression in double or single quotes since those characters are also used to separate different parts of Mutt's pattern language. For example: ~f "me@(mutt\.org|cs\.hmc\.edu)" Without the quotes, the parenthesis wouldn't end. This would be separated to two OR'd patterns: ~f me@(mutt\.org and cs\.hmc\.edu). They are never what you want.

3.4. Searching by Date

Mutt supports two types of dates, absolute and relative.

3.4.1. Absolute Dates

Dates must be in DD/MM/YY format (month and year are optional, defaulting to the current month and year) or YYYYMMDD. An example of a valid range of dates is:

Limit to messages matching: ~d 20/1/95-31/10
Limit to messages matching: ~d 19950120-19951031

If you omit the minimum (first) date, and just specify “-DD/MM/YY†or “-YYYYMMDDâ€, all messages before the given date will be selected. If you omit the maximum (second) date, and specify “DD/MM/YY-â€, all messages after the given date will be selected. If you specify a single date with no dash (“-â€), only messages sent on the given date will be selected.

You can add error margins to absolute dates. An error margin is a sign (+ or -), followed by a digit, followed by one of the units in Table 4.6, “Date unitsâ€. As a special case, you can replace the sign by a “*†character, which is equivalent to giving identical plus and minus error margins.

Table 4.6. Date units

UnitDescription
yYears
mMonths
wWeeks
dDays

Example: To select any messages two weeks around January 15, 2001, you'd use the following pattern:

Limit to messages matching: ~d 15/1/2001*2w

3.4.2. Relative Dates

This type of date is relative to the current date, and may be specified as:

  • >offset for messages older than offset units

  • <offset for messages newer than offset units

  • =offset for messages exactly offset units old

offset is specified as a positive number with one of the units from Table 4.7, “Relative date unitsâ€.

Table 4.7. Relative date units

UnitDescription
yYears
mMonths
wWeeks
dDays
HHours
MMinutes
SSeconds

Example: to select messages less than 1 month old, you would use

Limit to messages matching: ~d <1m

Note

All dates used when searching are relative to the local time zone, so unless you change the setting of your $index_format to include a %[...] format, these are not the dates shown in the main index.

4. Marking Messages

There are times that it's useful to ask Mutt to "remember" which message you're currently looking at, while you move elsewhere in your mailbox. You can do this with the “mark-message†operator, which is bound to the “~†key by default. Press this key to enter an identifier for the marked message. When you want to return to this message, press “'†and the name that you previously entered.

(Message marking is really just a shortcut for defining a macro that returns you to the current message by searching for its Message-ID. You can choose a different prefix by setting the $mark_macro_prefix variable.)

5. Using Tags

Sometimes it is desirable to perform an operation on a group of messages all at once rather than one at a time. An example might be to save messages to a mailing list to a separate folder, or to delete all messages with a given subject. To tag all messages matching a pattern, use the <tag-pattern> function, which is bound to “shift-T†by default. Or you can select individual messages by hand using the <tag-message> function, which is bound to “t†by default. See patterns for Mutt's pattern matching syntax.

Once you have tagged the desired messages, you can use the “tag-prefix†operator, which is the “;†(semicolon) key by default. When the “tag-prefix†operator is used, the next operation will be applied to all tagged messages if that operation can be used in that manner. If the $auto_tag variable is set, the next operation applies to the tagged messages automatically, without requiring the “tag-prefixâ€.

In macros or push commands, you can use the <tag-prefix-cond> operator. If there are no tagged messages, Mutt will “eat†the rest of the macro to abort it's execution. Mutt will stop “eating†the macro when it encounters the <end-cond> operator; after this operator the rest of the macro will be executed as normal.

6. Using Hooks

A hook is a concept found in many other programs which allows you to execute arbitrary commands before performing some operation. For example, you may wish to tailor your configuration based upon which mailbox you are reading, or to whom you are sending mail. In the Mutt world, a hook consists of a regular expression or pattern along with a configuration option/command. See:

for specific details on each type of hook available. Also see Message Composition Flow for an overview of the composition process.

Note

If a hook changes configuration settings, these changes remain effective until the end of the current Mutt session. As this is generally not desired, a “default†hook needs to be added before all other hooks of that type to restore configuration defaults.

Example 4.5. Specifying a “default†hook

send-hook . 'unmy_hdr From:'
send-hook ~C'^b@b\.b$' my_hdr from: c@c.c

In Example 4.5, “Specifying a “default†hookâ€, by default the value of $from and $realname is not overridden. When sending messages either To: or Cc: to <b@b.b>, the From: header is changed to <c@c.c>.

6.1. Message Matching in Hooks

Hooks that act upon messages (message-hook, reply-hook, send-hook, send2-hook, save-hook, fcc-hook, index-format-hook) are evaluated in a slightly different manner. For the other types of hooks, a regular expression is sufficient. But in dealing with messages a finer grain of control is needed for matching since for different purposes you want to match different criteria.

Mutt allows the use of the search pattern language for matching messages in hook commands. This works in exactly the same way as it would when limiting or searching the mailbox, except that you are restricted to those operators which match information Mutt extracts from the header of the message (i.e., from, to, cc, date, subject, etc.).

For example, if you wanted to set your return address based upon sending mail to a specific address, you could do something like:

send-hook '~t ^me@cs\.hmc\.edu$' 'my_hdr From: Mutt User <user@host>'

which would execute the given command when sending mail to me@cs.hmc.edu.

However, it is not required that you write the pattern to match using the full searching language. You can still specify a simple regular expression like the other hooks, in which case Mutt will translate your pattern into the full language, using the translation specified by the $default_hook variable. The pattern is translated at the time the hook is declared, so the value of $default_hook that is in effect at that time will be used.

6.2. Mailbox Matching in Hooks

Hooks that match against mailboxes (folder-hook, mbox-hook) apply both regular expression syntax as well as mailbox shortcut expansion on the regexp parameter. There is some overlap between these, so special attention should be paid to the first character of the regexp.

# Here, ^ will expand to "the current mailbox" not "beginning of string":
folder-hook ^/home/user/Mail/bar "set sort=threads"

# If you want ^ to be interpreted as "beginning of string", one workaround
# is to enclose the regexp in parenthesis:
folder-hook (^/home/user/Mail/bar) "set sort=threads"

# This will expand to the default save folder for the alias "imap.example.com", which
# is probably not what you want:
folder-hook @imap.example.com "set sort=threads"

# A workaround is to use parenthesis or a backslash:
folder-hook (@imap.example.com) "set sort=threads"
folder-hook '\@imap.example.com' "set sort=threads"

Keep in mind that mailbox shortcut expansion on the regexp parameter takes place when the hook is initially parsed, not when the hook is matching against a mailbox. When Mutt starts up and is reading the .muttrc, some mailbox shortcuts may not be usable. For example, the "current mailbox" shortcut, ^, will expand to an empty string because no mailbox has been opened yet. Mutt will issue an error for this case or if the mailbox shortcut results in an empty regexp.

7. Managing the Environment

You can alter the environment that Mutt passes on to its child processes using the “setenv†and “unsetenv†operators. (N.B. These follow Mutt-style syntax, not shell-style!) You can also query current environment values by prefixing a “?†character.

setenv TERM vt100
setenv ORGANIZATION "The Mutt Development Team"
unsetenv DISPLAY
setenv ?LESS

8. External Address Queries

Mutt supports connecting to external directory databases such as LDAP, ph/qi, bbdb, or NIS through a wrapper script which connects to Mutt using a simple interface. Using the $query_command variable, you specify the wrapper command to use. For example:

set query_command = "mutt_ldap_query.pl %s"

The wrapper script should accept the query on the command-line. It should return a one line message, then each matching response on a single line, each line containing a tab separated address then name then some other optional information. On error, or if there are no matching addresses, return a non-zero exit code and a one line error message.

An example multiple response output:

Searching database ... 20 entries ... 3 matching:
me@cs.hmc.edu           Michael Elkins  mutt dude
blong@fiction.net       Brandon Long    mutt and more
roessler@does-not-exist.org        Thomas Roessler mutt pgp

There are two mechanisms for accessing the query function of Mutt. One is to do a query from the index menu using the <query> function (default: Q). This will prompt for a query, then bring up the query menu which will list the matching responses. From the query menu, you can select addresses to create aliases, or to mail. You can tag multiple addresses to mail, start a new query, or have a new query appended to the current responses.

The other mechanism for accessing the query function is for address completion, similar to the alias completion. In any prompt for address entry, you can use the <complete-query> function (default: ^T) to run a query based on the current address you have typed. Like aliases, Mutt will look for what you have typed back to the last space or comma. If there is a single response for that query, Mutt will expand the address in place. If there are multiple responses, Mutt will activate the query menu. At the query menu, you can select one or more addresses to be added to the prompt.

9. Mailbox Formats

Mutt supports reading and writing of four different local mailbox formats: mbox, MMDF, MH and Maildir. The mailbox type is auto detected, so there is no need to use a flag for different mailbox types. When creating new mailboxes, Mutt uses the default specified with the $mbox_type variable. A short description of the formats follows.

mbox. This is a widely used mailbox format for UNIX. All messages are stored in a single file. Each message has a line of the form:

From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST

to denote the start of a new message (this is often referred to as the “From_†line). The mbox format requires mailbox locking, is prone to mailbox corruption with concurrently writing clients or misinterpreted From_ lines. Depending on the environment, new mail detection can be unreliable. Mbox folders are fast to open and easy to archive.

MMDF. This is a variant of the mbox format. Each message is surrounded by lines containing “^A^A^A^A†(four times control-A's). The same problems as for mbox apply (also with finding the right message separator as four control-A's may appear in message bodies).

MH. A radical departure from mbox and MMDF, a mailbox consists of a directory and each message is stored in a separate file. The filename indicates the message number (however, this is may not correspond to the message number Mutt displays). Deleted messages are renamed with a comma (“,â€) prepended to the filename. Mutt detects this type of mailbox by looking for either .mh_sequences or .xmhcache files (needed to distinguish normal directories from MH mailboxes). MH is more robust with concurrent clients writing the mailbox, but still may suffer from lost flags; message corruption is less likely to occur than with mbox/mmdf. It's usually slower to open compared to mbox/mmdf since many small files have to be read (Mutt provides Section 8.1, “Header Caching†to greatly speed this process up). Depending on the environment, MH is not very disk-space efficient.

Maildir. The newest of the mailbox formats, used by the Qmail MTA (a replacement for sendmail). Similar to MH, except that it adds three subdirectories of the mailbox: tmp, new and cur. Filenames for the messages are chosen in such a way they are unique, even when two programs are writing the mailbox over NFS, which means that no file locking is needed and corruption is very unlikely. Maildir maybe slower to open without caching in Mutt, it too is not very disk-space efficient depending on the environment. Since no additional files are used for metadata (which is embedded in the message filenames) and Maildir is locking-free, it's easy to sync across different machines using file-level synchronization tools.

10. Mailbox Shortcuts

There are a number of built in shortcuts which refer to specific mailboxes. These shortcuts can be used anywhere you are prompted for a file or mailbox path or in path-related configuration variables. Note that these only work at the beginning of a string.

Table 4.8. Mailbox shortcuts

ShortcutRefers to...
!your $spoolfile (incoming) mailbox
>your $mbox file
<your $record file
^the current mailbox
- or !!the file you've last visited
~your home directory
= or +your $folder directory
@aliasto the default save folder as determined by the address of the alias

For example, to store a copy of outgoing messages in the folder they were composed in, a folder-hook can be used to set $record:

  folder-hook . 'set record=^'

Note: the current mailbox shortcut, “^â€, has no value in some cases. No mailbox is opened when Mutt is invoked to send an email from the command-line. In interactive mode, Mutt reads the muttrc before opening the mailbox, so immediate expansion won't work as expected either. This can be an issue when trying to directly assign to $record, but also affects the fcc-hook mailbox, which is expanded immediately too. The folder-hook example above works because the command is executed later, when the folder-hook fires.

Note: the $record shortcut “<†is substituted without any regard to multiple mailboxes and $fcc_delimiter. If you use multiple Fcc mailboxes, and also want to use the “<†mailbox shortcut, it might be better to set $record to the primary mailbox and use a fcc-hook to set all mailboxes during message composition.

11. Handling Mailing Lists

Mutt has a few configuration options that make dealing with large amounts of mail easier. The first thing you must do is to let Mutt know what addresses you consider to be mailing lists (technically this does not have to be a mailing list, but that is what it is most often used for), and what lists you are subscribed to. This is accomplished through the use of the lists and subscribe commands in your .muttrc. Alternatively or additionally, you can set $auto_subscribe to automatically subscribe addresses found in a List-Post header.

Now that Mutt knows what your mailing lists are, it can do several things, the first of which is the ability to show the name of a list through which you received a message (i.e., of a subscribed list) in the index menu display. This is useful to distinguish between personal and list mail in the same mailbox. In the $index_format variable, the expando “%L†will print the string “To <list>†when “list†appears in the “To†field, and “Cc <list>†when it appears in the “Cc†field (otherwise it prints the name of the author).

Often times the “To†and “Cc†fields in mailing list messages tend to get quite large. Most people do not bother to remove the author of the message they reply to from the list, resulting in two or more copies being sent to that person. The <list-reply> function, which by default is bound to “L†in the index menu and pager, helps reduce the clutter by only replying to the known mailing list addresses instead of all recipients (except as specified by Mail-Followup-To, see below).

Mutt also supports the Mail-Followup-To header. When you send a message to a list of recipients which includes one or several known mailing lists, and if the $followup_to option is set, Mutt will generate a Mail-Followup-To header. If any of the recipients are subscribed mailing lists, this header will contain all the recipients to whom you send this message, but not your address. This indicates that group-replies or list-replies (also known as “followupsâ€) to this message should only be sent to the original recipients of the message, and not separately to you - you'll receive your copy through one of the mailing lists you are subscribed to. If none of the recipients are subscribed mailing lists, the header will also contain your address, ensuring you receive a copy of replies.

Conversely, when group-replying or list-replying to a message which has a Mail-Followup-To header, Mutt will respect this header if the $honor_followup_to configuration variable is set. Using list-reply will in this case also make sure that the reply goes to the mailing list, even if it's not specified in the list of recipients in the Mail-Followup-To.

Note

When header editing is enabled, you can create a Mail-Followup-To header manually. Mutt will only auto-generate this header if it doesn't exist when you send the message.

The other method some mailing list admins use is to generate a “Reply-To†field which points back to the mailing list address rather than the author of the message. This can create problems when trying to reply directly to the author in private, since most mail clients will automatically reply to the address given in the “Reply-To†field. Mutt uses the $reply_to variable to help decide which address to use. If set to ask-yes or ask-no, you will be prompted as to whether or not you would like to use the address given in the “Reply-To†field, or reply directly to the address given in the “From†field. When set to yes, the “Reply-To†field will be used when present.

While looking at an email message from a mailing list in the index or pager, you can interact with the list server in the ways defined by RFC 2369, provided the email message specifies how to do so. Invoke the list menu (bound to "ESC L" by default) to see what options are available for a given message. Common options are:

  • Post to the list

  • Contact the list owner

  • Subscribe to the list

  • Unsubscribe from the list

  • Get help from the list server

  • Get list archive information

Note that many list servers only specify some of these options.

The “X-Label:†header field can be used to further identify mailing lists or list subject matter (or just to annotate messages individually). The $index_format variable's “%y†and “%Y†expandos can be used to expand “X-Label:†fields in the index, and Mutt's pattern-matcher can match regular expressions to “X-Label:†fields with the “~y†selector. “X-Label:†is not a standard message header field, but it can easily be inserted by procmail and other mail filtering agents.

You can change or delete the “X-Label:†field within Mutt using the “edit-label†command, bound to the “y†key by default. This works for tagged messages, too. While in the edit-label function, pressing the <complete> binding (TAB, by default) will perform completion against all labels currently in use.

Lastly, Mutt has the ability to sort the mailbox into threads. A thread is a group of messages which all relate to the same subject. This is usually organized into a tree-like structure where a message and all of its replies are represented graphically. If you've ever used a threaded news client, this is the same concept. It makes dealing with large volume mailing lists easier because you can easily delete uninteresting threads and quickly find topics of value.

12. Display Munging

Working within the confines of a console or terminal window, it is often useful to be able to modify certain information elements in a non-destructive way -- to change how they display, without changing the stored value of the information itself. This is especially so of message subjects, which may often be polluted with extraneous metadata that either is reproduced elsewhere, or is of secondary interest.

subjectrx pattern replacement
unsubjectrx { * | pattern }

subjectrx specifies a regular expression “pattern†which, if detected in a message subject, causes the subject to be replaced with the “replacement†value. The replacement is subject to substitutions in the same way as for the spam command: %L for the text to the left of the match, %R for text to the right of the match, and %1 for the first subgroup in the match (etc). If you simply want to erase the match, set it to “%L%Râ€. Any number of subjectrx commands may coexist.

Note this well: the “replacement†value replaces the entire subject, not just the match!

unsubjectrx removes a given subjectrx from the substitution list. If * is used as the pattern, all substitutions will be removed.

Example 4.6. Subject Munging

# Erase [rt #12345] tags from Request Tracker (RT) e-mails
subjectrx '\[rt #[0-9]+\] *' '%L%R'

# Servicedesk is another RT that sends more complex subjects.
# Keep the ticket number.
subjectrx '\[servicedesk #([0-9]+)\] ([^.]+)\.([^.]+) - (new|open|pending|update) - ' '%L[#%1] %R'

# Strip out annoying [listname] prefixes in subjects
subjectrx '\[[^]]*\]:? *' '%L%R'

13. New Mail Detection

Mutt supports setups with multiple folders, allowing all of them to be monitored for new mail (see Section 16, “Monitoring Incoming Mail†for details).

13.1. How New Mail Detection Works

For Mbox and Mmdf folders, new mail is detected by comparing access and/or modification times of files: Mutt assumes a folder has new mail if it wasn't accessed after it was last modified. Utilities like biff or frm or any other program which accesses the mailbox might cause Mutt to never detect new mail for that mailbox if they do not properly reset the access time. Other possible causes of Mutt not detecting new mail in these folders are backup tools (updating access times) or filesystems mounted without access time update support (for Linux systems, see the relatime option).

Note

Contrary to older Mutt releases, it now maintains the new mail status of a folder by properly resetting the access time if the folder contains at least one message which is neither read, nor deleted, nor marked as old.

In cases where new mail detection for Mbox or Mmdf folders appears to be unreliable, the $check_mbox_size option can be used to make Mutt track and consult file sizes for new mail detection instead which won't work for size-neutral changes.

New mail for Maildir is assumed if there is one message in the new/ subdirectory which is not marked deleted (see $maildir_trash). For MH folders, a mailbox is considered having new mail if there's at least one message in the “unseen†sequence as specified by $mh_seq_unseen.

Mutt does not poll POP3 folders for new mail, it only periodically checks the currently opened folder (if it's a POP3 folder).

For IMAP, by default Mutt uses recent message counts provided by the server to detect new mail. If the $imap_idle option is set, it'll use the IMAP IDLE extension if advertised by the server.

The $mail_check_recent option changes whether Mutt will notify you of new mail in an already visited mailbox. When set (the default) it will only notify you of new mail received since the last time you opened the mailbox. When unset, Mutt will notify you of any new mail in the mailbox.

13.2. Polling For New Mail

When in the index menu and being idle (also see $timeout), Mutt periodically checks for new mail in all folders which have been configured via the mailboxes command (excepting those specified with the -nopoll flag). The interval depends on the folder type: for local/IMAP folders it consults $mail_check and $pop_checkinterval for POP folders.

Outside the index menu the directory browser supports checking for new mail using the <check-new> function which is unbound by default. Pressing TAB will bring up a menu showing the files specified by the mailboxes command, and indicate which contain new messages. Mutt will automatically enter this mode when invoked from the command line with the -y option, or from the index/pager via the <browse-mailboxes> function.

For the pager, index and directory browser menus, Mutt contains the <buffy-list> function (bound to “.†by default) which will print a list of folders with new mail in the command line at the bottom of the screen.

For the index, by default Mutt displays the number of mailboxes with new mail in the status bar, please refer to the $status_format variable for details.

When changing folders, Mutt fills the prompt with the first folder from the mailboxes list containing new mail (if any), pressing <Space> will cycle through folders with new mail. The (by default unbound) function <next-unread-mailbox> in the index can be used to immediately open the next folder with unread mail (if any).

13.3. Monitoring New Mail

When the Inotify mechanism for monitoring of files is supported (Linux only) and not disabled at compilation time, Mutt immediately notifies about new mail for all folders configured via the mailboxes command (excepting those specified with the -nopoll flag). Dependent on mailbox format also added old mails are tracked (not for Maildir).

No configuration variables are available. Trace output is given when debugging is enabled via command line option -d3. The lower level 2 only shows errors, the higher level 5 all including raw Inotify events.

Note

Getting events about new mail is limited to the capabilities of the underlying mechanism. Inotify only reports local changes, i. e. new mail notification works for mails delivered by an agent on the same machine as Mutt, but not when delivered remotely on a network file system as NFS. Also the monitoring handles might fail in rare conditions, so you better don't completely rely on this feature.

13.4. Calculating Mailbox Message Counts

If $mail_check_stats is set, Mutt will periodically calculate the unread, flagged, and total message counts for each mailbox watched by the mailboxes command. (Note: IMAP mailboxes only support unread and total counts). This calculation takes place at the same time as new mail polling, but is controlled by a separate timer: $mail_check_stats_interval.

The sidebar can display these message counts. See $sidebar_format.

14. Editing Threads

Mutt has the ability to dynamically restructure threads that are broken either by misconfigured software or bad behavior from some correspondents. This allows to clean your mailboxes from these annoyances which make it hard to follow a discussion.

14.1. Linking Threads

Some mailers tend to “forget†to correctly set the “In-Reply-To:†and “References:†headers when replying to a message. This results in broken discussions because Mutt has not enough information to guess the correct threading. You can fix this by tagging the reply, then moving to the parent message and using the <link-threads> function (bound to & by default). The reply will then be connected to this parent message.

You can also connect multiple children at once, tagging them and using the <tag-prefix> command (“;â€) or the $auto_tag option.

14.2. Breaking Threads

On mailing lists, some people are in the bad habit of starting a new discussion by hitting “reply†to any message from the list and changing the subject to a totally unrelated one. You can fix such threads by using the <break-thread> function (bound by default to #), which will turn the subthread starting from the current message into a whole different thread.

15. Delivery Status Notification (DSN) Support

RFC1894 defines a set of MIME content types for relaying information about the status of electronic mail messages. These can be thought of as “return receipts.â€

To support DSN, there are two variables. $dsn_notify is used to request receipts for different results (such as failed message, message delivered, etc.). $dsn_return requests how much of your message should be returned with the receipt (headers or full message).

When using $sendmail for mail delivery, you need to use either Berkeley sendmail 8.8.x (or greater) a MTA supporting DSN command line options compatible to Sendmail: The -N and -R options can be used by the mail client to make requests as to what type of status messages should be returned. Please consider your MTA documentation whether DSN is supported.

For SMTP delivery using $smtp_url, it depends on the capabilities announced by the server whether Mutt will attempt to request DSN or not.

16. Start a WWW Browser on URLs

If a message contains URLs, it is efficient to get a menu with all the URLs and start a WWW browser on one of them. This functionality is provided by the external urlview program which can be retrieved at https://github.com/sigpipe/urlview and the configuration commands:

macro index \cb |urlview\n
macro pager \cb |urlview\n

17. Echoing Text

Usage:

echo message

You can print messages to the message window using the "echo" command. This might be useful after a macro finishes executing. After printing the message, echo will pause for the number of seconds specified by $sleep_time.

echo "Sourcing muttrc file"

unset confirmappend
macro index ,a "<save-message>=archive<enter><enter-command>echo 'Saved to archive'<enter>"

18. Message Composition Flow

This is a brief overview of the steps Mutt takes during message composition. It also shows the order and timing of hook execution.

  • Reply envelope settings. $reverse_name processing. To, Cc, Subject, References header defaults.

  • my_hdr processing for To, Cc, Bcc, Subject headers.

  • Prompts for To, Cc, Bcc, Subject headers. See $askcc, $askbcc, $fast_reply.

  • From header setting. Note: this is so send-hooks below can match ~P, but From is re-set further below in case a send-hook changes the value.

  • reply-hook

  • send-hook

  • From header setting.

  • my_hdr processing for From, Reply-To, Message-ID and user-defined headers. The To, Cc, Bcc, and Subject headers are ignored at this stage.

  • Message body and signature generation.

  • send2-hook

  • $realname part of From header setting.

  • $editor invocation for the message.

  • send2-hook

  • Cryptographic settings.

  • fcc-hook. Fcc setting.

  • Compose menu. Note: send2-hook is evaluated each time the headers are changed.

  • $send_multipart_alternative generation.

  • Message encryption and signing. Key selection.

  • Fcc saving if $fcc_before_send is set. (Note the variable documentation for caveats of Fcc'ing before sending.)

  • Message sending.

  • Fcc saving if $fcc_before_send is unset (the default). Note: prior to version 1.12, the Fcc was saved before sending the message. It is now by default saved afterwards, but if the saving fails, the user is prompted.

19. Batch Composition Flow

In batch mode, Mutt performs less steps than interactive mode. Encryption and Signing are not supported.

  • my_hdr processing for To, Cc, Bcc headers. (Subject is not processed.)

  • From header setting. Note: this is so send-hooks below can match ~P, but From is re-set further below in case a send-hook changes the value.

  • send-hook

  • From header setting.

  • my_hdr processing for From, Reply-To, Message-ID and user-defined headers. The To, Cc, Bcc, Subject, and Return-Path headers are ignored at this stage.

  • Message body is copied from stdin. $signature is not appended in batch mode.

  • send2-hook

  • $realname part of From header setting.

  • fcc-hook. Fcc setting.

  • $send_multipart_alternative generation.

  • Fcc saving if $fcc_before_send is set. (Note the variable documentation for caveats of Fcc'ing before sending.)

  • Message sending.

  • Fcc saving if $fcc_before_send is unset (the default). Note: prior to version 1.12, the Fcc was saved before sending the message. It is now by default saved afterwards, but if the saving fails, the user is prompted.

20. Using MuttLisp (EXPERIMENTAL)

MuttLisp is a Lisp-like enhancement for the Mutt configuration file. It is currently experimental, meaning new releases may change or break syntax. MuttLisp is not a real language, and is not meant to be an alternative to macros. The features are purposely minimal, with the actual work still being done by Mutt commands.

There are two ways to invoke MuttLisp: via the run command, or interpolated as a command argument.

20.1. Running a command generated by MuttLisp

Usage:

run MuttLisp

The run command evaluates the MuttLisp argument. The output of the MuttLisp is then executed as a Mutt command, as if it were typed in the muttrc instead.

run (concat "set my_name = '" \
      (or $ENV_NAME "Test User") "'")

  ==> generates and runs the line:
      set my_name = 'Test User'

This will set the Mutt User-Defined Variable $my_name to either the environment variable $ENV_NAME, if defined, or else "Test User".

20.2. Interpolating MuttLisp in a Command Argument

The second way of running is directly as a command argument. An unquoted parenthesis expression will be evaluated, and the result substituted as the argument.

To avoid breaking existing configurations, this is disabled by default. It can be enabled by setting $muttlisp_inline_eval. Before doing so, you should review your Mutt configuration to ensure you don't have any bare parenthesis expressions elsewhere, such as the regexp parameter of a folder-hook. These can typically be surrounded by single or double-quotes to prevent being evaluated as MuttLisp.

set my_name = (or $ENV_NAME "Test User")

The result of the MuttLisp is directly assigned as the argument. It isn't reinterpreted, so there is no need for the outer quotes. This is in contrast with the run command, where the output is reinterpreted by the muttrc parser.

20.3. MuttLisp Syntax

MuttLisp was inspired by Lisp, and so follows the same basic syntax. All statements are surrounded by parenthesis. The first argument inside the parenthesis is a function to invoke. The remaining arguments are passed as parameters.

The arguments to functions are read and evaluated using muttrc syntax. This means Mutt variables or environment variables can be passed directly, or interpolated inside a double-quoted string.

Although the arguments to a function are evaluated, the result of the function call is not.

echo (concat '$' 'spoolfile')
  ==> $spoolfile

MuttLisp has no types - everything is stored and evaluated as a string, just as with the muttrc. True is defined as a non-empty string, and false as the empty string.

The muttrc is evaluated line by line, and MuttLisp is similarly constrained. Input can be continued on more than one line by placing a backslash at the end of the line.

20.4. MuttLisp Functions

20.4.1. concat

Combines all arguments into a single string.

echo (concat one two three)
  ==> onetwothree

20.4.2. quote

Prevents interpretation of the list. Note that the list must still obey MuttLisp syntax: single quotes, double quotes, backticks, and parenthesis are still parsed prior to quote running and must be matching.

echo (quote one two three)
  ==> one two three

echo (quote $spoolfile)
  ==> $spoolfile

echo (quote (one two three))
  ==> (one two three)

20.4.3. equal

Performs a case-sensitive comparison of each argument. Stops evaluating arguments when it finds the first one that is not equal. Returns "t" if they are all equal, and the empty string if not.

echo (equal one one)
  ==> "t"

echo (equal one `echo one`)
  ==> "t"

echo (equal one one two `echo three`)
  ==> ""
  note: `echo three` does not execute.

echo (equal "one two" `echo one two`)
  ==> ""
  note: backticks generate two arguments "one" and "two"

echo (equal "one two" "`echo one two`")
  ==> "t"
  note: backticks inside double quotes generates a single argument: "one two"

20.4.4. not

Accepts a single argument only. Returns "t" if the argument evaluates to the empty string. Otherwise returns the empty string.

echo (not one)
  ==> ""

echo (not "")
  ==> "t"

echo (not (equal one two))
  ==> "t"

20.4.5. and

Returns the first argument that evaluates to the empty string. Otherwise returns the last argument, or "t" if there are no arguments.

echo (and one two)
  ==> "two"

echo (and "" two `echo three`)
  ==> ""
  note: `echo three` does not execute.

echo (and)
  ==> "t"

20.4.6. or

Returns the first argument that evaluates to a non-empty string. Otherwise returns the empty string.

echo (or one two)
  ==> "one"

echo (or "" two `echo three`)
  ==> "two"
  note: `echo three` does not execute.

echo (or)
  ==> ""

20.4.7. if

Requires 2 or 3 arguments. The first is a conditional. If it evaluates to "true" (a non-empty string), the second argument is evaluated and returned. Otherwise the third argument is evaluated and returned.

echo (if a one two)
  ==> "one"

echo (if "" one two)
  ==> "two"

set spoolfile = "/var/mail/user"
echo (if (equal $spoolfile "/var/mail/user") yes no)
  ==> "yes"

Note that boolean configuration variables evaluate to the strings "yes" or "no". You can see the value of other kinds of configuration variables using the echo command.

unset allow_ansi
echo $allow_ansi
  ===> "no"

# the correct way to test a boolean:
echo (if (equal $allow_ansi "yes") "set" "unset")
  ===> "unset"

# the incorrect way to test a boolean:
echo (if $allow_ansi "set" "unset")
  ===> "set"

20.5. Examples

It's important to remember that function arguments are evaluated, but the result is not. Also, the result of an interpolated command argument is used directly, and needs no quoting.

# A three-way toggle of $index_format:

set muttlisp_inline_eval
set my_idx1 = "one"
set my_idx2 = "two"
set my_idx3 = "three"
set index_format = $my_idx1

macro index i '<enter-command>set index_format =  \
  (or                                             \
    (if (equal $index_format $my_idx1) $my_idx2)  \
    (if (equal $index_format $my_idx2) $my_idx3)  \
    $my_idx1) \
<enter>'

The output of the run command is re-evaluated by the muttrc parser. So it's important to pay more attention to quoting issues when generating the command string below.

# Conditionally set up background editing in tmux or GNU Screen:

run \
  (if (or $STY $TMUX)                             \
    (concat                                       \
      'set background_edit;'                      \
      'set editor = "bgedit-screen-tmux.sh vim"') \
    (concat                                       \
      'unset background_edit;'                    \
      'set editor = "vim"'))

Because backticks are evaluated by MuttLisp too, we need to use the run command below and pay close attention to quoting.

# Use a Mutt variable inside backticks.

set spoolfile = "/var/mail/testuser"

# This will generate and then run the command string:
#   set my_var = "`~/bin/myscript.sh /var/mail/testuser`"
run                                       \
  (concat                                 \
     'set my_var = "`~/bin/myscript.sh '  \
     $spoolfile                           \
     '`"')

21. Miscellany

This section documents various features that fit nowhere else.

Address normalization

Mutt normalizes all e-mail addresses to the simplest form possible. If an address contains a realname, the form Joe User <joe@example.com> is used and the pure e-mail address without angle brackets otherwise, i.e. just joe@example.com.

This normalization affects all headers Mutt generates including aliases.

Initial folder selection

The folder Mutt opens at startup is determined as follows: the folder specified in the $MAIL environment variable if present. Otherwise, the value of $MAILDIR is taken into account. If that isn't present either, Mutt takes the user's mailbox in the mailspool as determined at compile-time (which may also reside in the home directory). The $spoolfile setting overrides this selection. Highest priority has the mailbox given with the -f command line option.

mutt-2.3.2/doc/optionalfeatures.html0000644000175000017500000023364015173276637015743 0ustar00kjmkjm Chapter 6. Optional Features

Chapter 6. Optional Features

1. General Notes

1.1. Enabling/Disabling Features

Mutt supports several of optional features which can be enabled or disabled at compile-time by giving the configure script certain arguments. These are listed in the “Optional features†section of the configure --help output.

Which features are enabled or disabled can later be determined from the output of mutt -v. If a compile option starts with “+†it is enabled and disabled if prefixed with “-â€. For example, if Mutt was compiled using GnuTLS for encrypted communication instead of OpenSSL, mutt -v would contain:

-USE_SSL_OPENSSL +USE_SSL_GNUTLS

1.2. URL Syntax

Mutt optionally supports the IMAP, POP3 and SMTP protocols which require to access servers using URLs. The canonical syntax for specifying URLs in Mutt is (an item enclosed in [] means it is optional and may be omitted):

proto[s]://[username[:password]@]server[:port][/path]

proto is the communication protocol: imap for IMAP, pop for POP3 and smtp for SMTP. If “s†for “secure communication†is appended, Mutt will attempt to establish an encrypted communication using SSL or TLS.

Since all protocols supported by Mutt support/require authentication, login credentials may be specified in the URL. This has the advantage that multiple IMAP, POP3 or SMTP servers may be specified (which isn't possible using, for example, $imap_user). The username may contain the “@†symbol being used by many mail systems as part of the login name. The special characters “/†(%2F), “:†(%3A) and “%†(%25) have to be URL-encoded in usernames using the %-notation.

A password can be given, too but is not recommended if the URL is specified in a configuration file on disk.

If no port number is given, Mutt will use the system's default for the given protocol (usually consulting /etc/services).

The optional path is only relevant for IMAP and ignored elsewhere.

Example 6.1. URLs

pops://host/
imaps://user@host/INBOX/Sent
smtp://user@host:587/

2. SSL/TLS Support

If Mutt is compiled with IMAP, POP3 and/or SMTP support, it can also be compiled with support for SSL or TLS using either OpenSSL or GnuTLS ( by running the configure script with the --enable-ssl=... option for OpenSSL or --enable-gnutls=... for GnuTLS). Mutt can then attempt to encrypt communication with remote servers if these protocols are suffixed with “s†for “secure communicationâ€.

2.1. STARTTLS

When non-secure URL protocols imap://, pop://, and smtp:// are used, the initial connection to the server will be unencrypted. STARTTLS can be used to negotiate an encrypted connection after the initial unencrypted connection and exchange.

Two configuration variables control Mutt's behavior with STARTTLS. $ssl_starttls will initiate STARTTLS if the server advertises support for it. $ssl_force_tls will always try to initiate it, whether the server advertises support or not.

Mutt highly recommends setting $ssl_force_tls unless you need to connect to an unencrypted server. It's possible for an attacker to spoof interactions during the initial connection and hide support for STARTTLS. The only way to prevent these attacks is by forcing STARTTLS with the $ssl_force_tls configuration variable.

2.2. Tunnel

When connecting through a $tunnel and $tunnel_is_secure is set (the default), Mutt will assume the connection to the server through the pipe is already secured. Mutt will ignore $ssl_starttls and $ssl_force_tls, behaving as if TLS has already been negotiated.

When $tunnel_is_secure is unset, Mutt will respect the values of $ssl_starttls and $ssl_force_tls. It is highly recommended to set $ssl_force_tls in this case, to force STARTTLS negotiation. Note that doing so will prevent connection to an IMAP server configured for preauthentication (PREAUTH). If you use this configuration, it is recommended to use a secure tunnel.

3. POP3 Support

If Mutt is compiled with POP3 support (by running the configure script with the --enable-pop flag), it has the ability to work with mailboxes located on a remote POP3 server and fetch mail for local browsing.

Remote POP3 servers can be accessed using URLs with the pop protocol for unencrypted and pops for encrypted communication, see Section 1.2, “URL Syntax†for details.

Polling for new mail is more expensive over POP3 than locally. For this reason the frequency at which Mutt will check for mail remotely can be controlled by the $pop_checkinterval variable, which defaults to every 60 seconds.

POP is read-only which doesn't allow for some features like editing messages or changing flags. However, using Section 8.1, “Header Caching†and Section 8.2, “Body Caching†Mutt simulates the new/old/read flags as well as flagged and replied. Mutt applies some logic on top of remote messages but cannot change them so that modifications of flags are lost when messages are downloaded from the POP server (either by Mutt or other tools).

Another way to access your POP3 mail is the <fetch-mail> function (default: G). It allows to connect to $pop_host, fetch all your new mail and place it in the local $spoolfile. After this point, Mutt runs exactly as if the mail had always been local.

Note

If you only need to fetch all messages to a local mailbox you should consider using a specialized program, such as fetchmail(1), getmail(1) or similar.

4. IMAP Support

If Mutt was compiled with IMAP support (by running the configure script with the --enable-imap flag), it has the ability to work with folders located on a remote IMAP server.

You can access the remote inbox by selecting the folder by its URL (see Section 1.2, “URL Syntax†for details) using the imap or imaps protocol. Alternatively, a pine-compatible notation is also supported, i.e. {[username@]imapserver[:port][/ssl]}path/to/folder

Note that not all servers use “/†as the hierarchy separator. Mutt should correctly notice which separator is being used by the server and convert paths accordingly.

When browsing folders on an IMAP server, you can toggle whether to look at only the folders you are subscribed to, or all folders with the toggle-subscribed command. See also the $imap_list_subscribed variable.

Polling for new mail on an IMAP server can cause noticeable delays. So, you'll want to carefully tune the $mail_check and $timeout variables. Reasonable values are:

set mail_check=90
set timeout=15

with relatively good results even over slow modem lines.

Note

Note that if you are using mbox as the mail store on UW servers prior to v12.250, the server has been reported to disconnect a client if another client selects the same folder.

4.1. The IMAP Folder Browser

As of version 1.2, Mutt supports browsing mailboxes on an IMAP server. This is mostly the same as the local file browser, with the following differences:

  • In lieu of file permissions, Mutt displays the string “IMAPâ€, possibly followed by the symbol “+â€, indicating that the entry contains both messages and subfolders. On Cyrus-like servers folders will often contain both messages and subfolders. A mailbox name with a trailing delimiter (usually “/†or “.â€) indicates subfolders.

  • For the case where an entry can contain both messages and subfolders, the selection key (bound to enter by default) will choose to descend into the subfolder view. If you wish to view the messages in that folder, you must use view-file instead (bound to space by default).

  • You can create, delete and rename mailboxes with the <create-mailbox>, <delete-mailbox>, and <rename-mailbox> commands (default bindings: C, d and r, respectively). You may also <subscribe> and <unsubscribe> to mailboxes (normally these are bound to s and u, respectively).

4.2. Authentication

Mutt supports four authentication methods with IMAP servers: SASL, GSSAPI, CRAM-MD5, and LOGIN (there is a patch by Grant Edwards to add NTLM authentication for you poor exchange users out there, but it has yet to be integrated into the main tree). There is also support for the pseudo-protocol ANONYMOUS, which allows you to log in to a public IMAP server without having an account. To use ANONYMOUS, simply make your username blank or “anonymousâ€.

SASL is a special super-authenticator, which selects among several protocols (including GSSAPI, CRAM-MD5, ANONYMOUS, and DIGEST-MD5) the most secure method available on your host and the server. Using some of these methods (including DIGEST-MD5 and possibly GSSAPI), your entire session will be encrypted and invisible to those teeming network snoops. It is the best option if you have it. To use it, you must have the Cyrus SASL library installed on your system and compile Mutt with the --with-sasl flag.

Mutt will try whichever methods are compiled in and available on the server, in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.

There are a few variables which control authentication:

  • $imap_user - controls the username under which you request authentication on the IMAP server, for all authenticators. This is overridden by an explicit username in the mailbox path (i.e. by using a mailbox name of the form {user@host}).

  • $imap_pass - a password which you may preset, used by all authentication methods where a password is needed.

  • $imap_authenticators - a colon-delimited list of IMAP authentication methods to try, in the order you wish to try them. If specified, this overrides Mutt's default (attempt everything, in the order listed above).

5. SMTP Support

Besides supporting traditional mail delivery through a sendmail-compatible program, Mutt supports delivery through SMTP if it was configured and built with --enable-smtp.

If the configuration variable $smtp_url is set, Mutt will contact the given SMTP server to deliver messages; if it is unset, Mutt will use the program specified by $sendmail.

For details on the URL syntax, please see Section 1.2, “URL Syntaxâ€.

The built-in SMTP support supports encryption (the smtps protocol using SSL or TLS) as well as SMTP authentication using SASL. The authentication mechanisms for SASL are specified in $smtp_authenticators defaulting to an empty list which makes Mutt try all available methods from most-secure to least-secure.

6. OAUTHBEARER Support

Preliminary OAUTH support for IMAP, POP, and SMTP is provided via external scripts.

At least for Gmail, you can use the oauth2.py script from Google's gmail-oauth2-tools: https://github.com/google/gmail-oauth2-tools/blob/master/python/oauth2.py

You'll need to get your own oauth client credentials for Gmail here: https://console.developers.google.com/apis/credentials

Then, you'd use oauth2.py with --generate_oauth2_token to get a refresh token, and configure mutt with:

set imap_authenticators="oauthbearer"
set imap_oauth_refresh_command="/path/to/oauth2.py --quiet --user=[email_address]\
    --client_id=[client_id] --client_secret=[client_secret]\
    --refresh_token=[refresh_token]"

Substitute pop or smtp for imap in the above example to configure for those.

An alternative script is contrib/mutt_oauth2.py script. For more details see contrib/mutt_oauth2.py.README.

6.1. XOAUTH2 Support

Support for the deprecated XOAUTH2 protocol is also available. To enable this, add “xoauth2†to the $imap_authenticators, $pop_authenticators, or $smtp_authenticators config variables. XOAUTH2 uses the same refresh command configuration variables as OAUTHBEARER: $imap_oauth_refresh_command, $pop_oauth_refresh_command, and $smtp_oauth_refresh_command. Those will need to be set to a script to generate the appropriate XOAUTH2 token.

7. Managing Multiple Accounts

Usage:

account-hook regexp command

If you happen to have accounts on multiple IMAP, POP and/or SMTP servers, you may find managing all the authentication settings inconvenient and error-prone. The account-hook command may help. This hook works like folder-hook but is invoked whenever Mutt needs to access a remote mailbox (including inside the folder browser), not just when you open the mailbox. This includes (for example) polling for new mail, storing Fcc messages and saving messages to a folder. As a consequence, account-hook should only be used to set connection-related settings such as passwords or tunnel commands but not settings such as sender address or name (because in general it should be considered unpredictable which account-hook was last used).

Some examples:

account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
account-hook smtp://user@host3/ 'set tunnel="ssh host3 /usr/libexec/smtpd"'

To manage multiple accounts with, for example, different values of $record or sender addresses, folder-hook has to be used together with the mailboxes command.

Example 6.2. Managing multiple accounts

mailboxes imap://user@host1/INBOX
folder-hook imap://user@host1/ 'set folder=imap://host1/ ; set record=+INBOX/Sent'

mailboxes imap://user@host2/INBOX
folder-hook imap://user@host2/ 'set folder=imap://host2/ ; set record=+INBOX/Sent'

In example Example 6.2, “Managing multiple accounts†the folders are defined using mailboxes so Mutt polls them for new mail. Each folder-hook triggers when one mailbox below each IMAP account is opened and sets $folder to the account's root folder. Next, it sets $record to the INBOX/Sent folder below the newly set $folder. Please notice that the value the “+†mailbox shortcut refers to depends on the current value of $folder and therefore has to be set separately per account. Setting other values like $from or $signature is analogous to setting $record.

8. Local Caching

Mutt contains two types of local caching: (1) the so-called “header caching†and (2) the so-called “body caching†which are both described in this section.

Header caching is optional as it depends on external libraries, body caching is always enabled if Mutt is compiled with POP and/or IMAP support as these use it (body caching requires no external library).

8.1. Header Caching

Mutt provides optional support for caching message headers for the following types of folders: IMAP, POP, Maildir and MH. Header caching greatly speeds up opening large folders because for remote folders, headers usually only need to be downloaded once. For Maildir and MH, reading the headers from a single file is much faster than looking at possibly thousands of single files (since Maildir and MH use one file per message.)

Header caching can be enabled via the configure script and the --enable-hcache option. It's not turned on by default because external database libraries are required: one of tokyocabinet, kyotocabinet, lmdb, qdbm, gdbm or bdb must be present.

If enabled, $header_cache can be used to either point to a file or a directory. If set to point to a file, one database file for all folders will be used (which may result in lower performance), but one file per folder if it points to a directory. When pointing to a directory, be sure to create the directory in advance, or Mutt will interpret it as a file to be created.

8.2. Body Caching

Both cache methods can be combined using the same directory for storage (and for IMAP/POP even provide meaningful file names) which simplifies manual maintenance tasks.

In addition to caching message headers only, Mutt can also cache whole message bodies. This results in faster display of messages for POP and IMAP folders because messages usually have to be downloaded only once.

For configuration, the variable $message_cachedir must point to a directory. There, Mutt will create a hierarchy of subdirectories named like the account and mailbox path the cache is for.

8.3. Cache Directories

For using both, header and body caching, $header_cache and $message_cachedir can be safely set to the same value.

In a header or body cache directory, Mutt creates a directory hierarchy named like: proto:user@hostname where proto is either “pop†or “imap.†Within there, for each folder, Mutt stores messages in single files and header caches in files with the “.hcache†extension. All files can be removed as needed if the consumed disk space becomes an issue as Mutt will silently fetch missing items again. Pathnames are always stored in UTF-8 encoding.

For Maildir and MH, the header cache files are named after the MD5 checksum of the path.

8.4. Maintenance

Mutt does not (yet) support maintenance features for header cache database files so that files have to be removed in case they grow too big. It depends on the database library used for header caching whether disk space freed by removing messages is re-used.

For body caches, Mutt can keep the local cache in sync with the remote mailbox if the $message_cache_clean variable is set. Cleaning means to remove messages from the cache which are no longer present in the mailbox which only happens when other mail clients or instances of Mutt using a different body cache location delete messages (Mutt itself removes deleted messages from the cache when syncing a mailbox). As cleaning can take a noticeable amount of time, it should not be set in general but only occasionally.

9. Exact Address Generation

Mutt supports the “Name <user@host>†address syntax for reading and writing messages, the older “user@host (Name)†syntax is only supported when reading messages. The --enable-exact-address switch can be given to configure to build it with write-support for the latter syntax. EXACT_ADDRESS in the output of mutt -v indicates whether it's supported.

Note: If the full address contains non-ascii characters, or sequences that require RFC 2047 encoding, Mutt reverts to writing out the normalized “Name <user@host>†form, in order to generate legal output.

10. Sending Anonymous Messages via Mixmaster

You may also have compiled Mutt to co-operate with Mixmaster, an anonymous remailer. Mixmaster permits you to send your messages anonymously using a chain of remailers. Mixmaster support in Mutt is for mixmaster version 2.04 or later.

To use it, you'll have to obey certain restrictions. Most important, you cannot use the Cc and Bcc headers. To tell Mutt to use mixmaster, you have to select a remailer chain, using the mix function on the compose menu.

The chain selection screen is divided into two parts. In the (larger) upper part, you get a list of remailers you may use. In the lower part, you see the currently selected chain of remailers.

You can navigate in the chain using the <chain-prev> and <chain-next> functions, which are by default bound to the left and right arrows and to the h and l keys (think vi keyboard bindings). To insert a remailer at the current chain position, use the <insert> function. To append a remailer behind the current chain position, use <select-entry> or <append>. You can also delete entries from the chain, using the corresponding function. Finally, to abandon your changes, leave the menu, or <accept> them pressing (by default) the Return key.

Note that different remailers do have different capabilities, indicated in the %c entry of the remailer menu lines (see $mix_entry_format). Most important is the “middleman†capability, indicated by a capital “Mâ€: This means that the remailer in question cannot be used as the final element of a chain, but will only forward messages to other mixmaster remailers. For details on the other capabilities, please have a look at the mixmaster documentation.

11. Sidebar

Overview of mailboxes

11.1. Introduction

The Sidebar shows a list of all your mailboxes. The list can be turned on and off, it can be themed and the list style can be configured.

11.2. Variables

Table 6.1. Sidebar Variables

NameTypeDefault
sidebar_delim_charsstring/.
sidebar_divider_charstring|
sidebar_folder_indentbooleanno
sidebar_formatstring%B%* %n
sidebar_indent_stringstring   (two spaces)
sidebar_new_mail_onlybooleanno
sidebar_next_new_wrapbooleanno
sidebar_short_pathbooleanno
sidebar_sort_methodenumunsorted
sidebar_visiblebooleanno
sidebar_widthnumber20

11.3. Functions

Sidebar adds the following functions to Mutt. By default, none of them are bound to keys.

Table 6.2. Sidebar Functions

MenusFunctionDescription
index,pager<sidebar-next>Move the highlight to next mailbox
index,pager<sidebar-next-new>Move the highlight to next mailbox with new mail
index,pager<sidebar-open>Open highlighted mailbox
index,pager<sidebar-page-down>Scroll the Sidebar down 1 page
index,pager<sidebar-page-up>Scroll the Sidebar up 1 page
index,pager<sidebar-prev>Move the highlight to previous mailbox
index,pager<sidebar-prev-new>Move the highlight to previous mailbox with new mail
index,pager<sidebar-toggle-visible>Make the Sidebar (in)visible

11.4. Commands

sidebar_whitelist mailbox [ mailbox ...]
unsidebar_whitelist { * | mailbox ... }

This command specifies mailboxes that will always be displayed in the sidebar, even if $sidebar_new_mail_only is set and the mailbox does not contain new mail.

The “unsidebar_whitelist†command is used to remove a mailbox from the list of whitelisted mailboxes. Use “unsidebar_whitelist *†to remove all mailboxes.

11.5. Colors

Table 6.3. Sidebar Colors

NameDefault ColorDescription
sidebar_dividerdefaultThe dividing line between the Sidebar and the Index/Pager panels
sidebar_flaggeddefaultMailboxes containing flagged mail
sidebar_highlightunderlineCursor to select a mailbox
sidebar_indicatormutt indicatorThe mailbox open in the Index panel
sidebar_newdefaultMailboxes containing new mail
sidebar_spoolfiledefaultMailbox that receives incoming mail

If the sidebar_indicator color isn't set, then the default Mutt indicator color will be used (the color used in the index panel).

11.6. Sort

Table 6.4. Sidebar Sort

SortDescription
alphaAlphabetically by path or label
countTotal number of messages
flaggedNumber of flagged messages
nameAlphabetically by path or label
newNumber of unread messages
pathAlphabetically by path (ignores label)
unreadNumber of unread messages
unsortedDo not resort the paths

12. Compressed Folders Feature

Read from/write to compressed mailboxes

12.1. Introduction

The Compressed Folder patch allows Mutt to read mailbox files that are compressed. But it isn't limited to compressed files. It works well with encrypted files, too. In fact, if you can create a program/script to convert to and from your format, then Mutt can read it.

The patch adds three hooks to Mutt: open-hook, close-hook and append-hook. They define commands to: uncompress a file; compress a file; append messages to an already compressed file.

There are some examples of both compressed and encrypted files, later. For now, the documentation will just concentrate on compressed files.

12.2. Commands

open-hook pattern shell-command
close-hook pattern shell-command
append-hook pattern shell-command

The shell-command must contain two placeholders for filenames: %f and %t. These represent “from†and “to†filenames. These placeholders should be placed inside single-quotes to prevent unintended shell expansions.

If you need the exact string “%f†or “%t†in your command, simply double up the “%†character, e.g. “%%f†or “%%tâ€.

Table 6.5. Not all Hooks are Required

OpenCloseAppendEffectUseful if
Open--Folder is readonlyThe folder is just a backup
OpenClose-Folder is read/write, but the entire folder must be written if anything is changedYour compression format doesn't support appending
OpenCloseAppendFolder is read/write and emails can be efficiently added to the endYour compression format supports appending
Open-AppendFolder is readonly, but can be appended toYou want to store emails, but never change them

Note

The command:

  • should return a non-zero exit status on failure

  • should not delete any files

12.2.1. Read from compressed mailbox

open-hook regexp shell-command

If Mutt is unable to open a file, it then looks for open-hook that matches the filename.

If your compression program doesn't have a well-defined extension, then you can use . as the regexp.

Example 6.3. Example of open-hook

open-hook '\.gz$' "gzip -cd '%f' > '%t'"
  • Mutt finds a file, “example.gzâ€, that it can't read

  • Mutt has an open-hook whose regexp matches the filename: \.gz$

  • Mutt uses the command gzip -cd to create a temporary file that it can read


12.2.2. Write to a compressed mailbox

close-hook regexp shell-command

When Mutt has finished with a compressed mail folder, it will look for a matching close-hook to recompress the file. This hook is optional.

Note

If the folder has not been modified, the close-hook will not be called.

Example 6.4. Example of close-hook

close-hook '\.gz$' "gzip -c '%t' > '%f'"
  • Mutt has finished with a folder, “example.gzâ€, that it opened with open-hook

  • The folder has been modified

  • Mutt has a close-hook whose regexp matches the filename: \.gz$

  • Mutt uses the command gzip -c to create a new compressed file


12.2.3. Append to a compressed mailbox

append-hook regexp shell-command

When Mutt wants to append an email to a compressed mail folder, it will look for a matching append-hook. This hook is optional.

Using the append-hook will save time, but Mutt won't be able to determine the type of the mail folder inside the compressed file.

Mutt will assume the type to be that of the $mbox_type variable. Mutt also uses this type for temporary files.

Mutt will only use the append-hook for existing files. The close-hook will be used for empty, or missing files.

Note

If your command writes to stdout, it is vital that you use >> in the “append-hookâ€. If not, data will be lost.

Example 6.5. Example of append-hook

append-hook '\.gz$' "gzip -c '%t' >> '%f'"
  • Mutt wants to append an email to a folder, “example.gzâ€, that it opened with open-hook

  • Mutt has an append-hook whose regexp matches the filename: \.gz$

  • Mutt knows the mailbox type from the $mbox variable

  • Mutt uses the command gzip -c to append to an existing compressed file


12.2.4. Empty Files

Mutt assumes that an empty file is not compressed. In this situation, unset $save_empty, so that the compressed file will be removed if you delete all of the messages.

12.2.5. Security

Encrypted files are decrypted into temporary files which are stored in the $tmpdir directory. This could be a security risk.

13. Autocrypt

Mutt can be compiled with Autocrypt support by running configure with the --enable-autocrypt flag. Autocrypt provides easy to use, passive protection against data collection. Keys are distributed via an Autocrypt: header added to emails. It does not protect against active adversaries, and so should not be considered a substitute for normal encryption via your keyring, using key signing and the web of trust to verify identities. With an understanding of these limitations, Autocrypt still provides an easy way to minimize cleartext emails sent between common correspondents, without having to explicitly exchange keys. More information can be found at https://autocrypt.org/.

13.1. Requirements

Autocrypt requires support for ECC cryptography, and Mutt by default will generate ECC keys. Therefore GnuPG 2.1 or greater is required. Additionally, Mutt's Autocrypt implementation uses GPGME and requires at least version 1.8.0.

Account and peer information is stored in a sqlite3 database, and so Mutt must be configured with the --with-sqlite3 flag when autocrypt is enabled.

It is highly recommended Mutt be configured --with-idn or --with-idn2 so that Autocrypt can properly deal with international domain names.

While Mutt uses GPGME for Autocrypt, normal keyring operations can still be performed via classic mode (i.e. with $crypt_use_gpgme unset). However, to avoid unnecessary prompts, it is recommended gpg not be configured in loopback pinentry mode, and that $pgp_use_gpg_agent remain set (the default).

13.2. First Run

To enable Autocrypt, set $autocrypt, and if desired change the value of $autocrypt_dir in your muttrc. The first time Mutt is run after that, you will be prompted to create $autocrypt_dir. Mutt will then automatically create an sqlite3 database and GPG keyring in that directory. Note since these files should be considered private, Mutt will create this directory with mode 700. If you create the directory manually, you should do the same.

Mutt recommends keeping the $autocrypt_dir directory set differently from your GnuPG keyring directory (e.g. ~/.gnupg). Keys are automatically imported into the keyring from Autocrypt: headers. Compared to standard “web of trust†keys, Autocrypt keys are somewhat ephemeral, and the autocrypt database is used to track when keys change or fall out of use. Having these keys mixed in with your normal keyring will make it more difficult to use features such as $crypt_opportunistic_encrypt and Autocrypt at the same time.

The $autocrypt_dir variable is not designed to be changed while Mutt is running. The database is created (if necessary) and connected to during startup. Changing the variable can result in a situation where Mutt is looking in one place for the database and a different place for the GPG keyring, resulting in strange behavior.

Once the directory, keyring, and database are created, Mutt will ask whether you would like to create an account. In order to use Autocrypt, each sending address needs an account. As a convenience you can create an account during the first run. If you would like to add additional accounts later, this can be done via the <autocrypt-acct-menu> function in the index, by default bound to A.

Account creation will first ask you for an email address. Next, it will ask whether you want to create a new key or select an existing key. (Note key selection takes place from the $autocrypt_dir keyring, which will normally be empty during first run). Finally, it will ask whether this address should prefer encryption or not. Autocrypt 1.1 allows automatically enabling encryption if both sender and receiver have set “prefer encryptionâ€. Otherwise, you will need to manually enable autocrypt encryption in the compose menu. For more details, see the compose menu section below.

After optionally creating an account, Mutt will prompt you to scan mailboxes for Autocrypt headers. This step occurs because header cached messages are not re-scanned for Autocrypt headers. Scanning during this step will temporarily disable the header cache while opening each mailbox. If you wish to do this manually later, you can simulate the same thing by unsetting $header_cache and opening a mailbox.

A final technical note: the first run process takes place between reading the muttrc and opening the initial mailbox. Some muttrc files will push macros to be run after opening the mailbox. To prevent this from interfering with the first run prompts, Mutt disables all macros during the first run.

13.3. Compose Menu

When enabled, Autocrypt will add a line to the compose menu with two fields: Autocrypt: and Recommendation:.

The Autocrypt: field shows whether the message will be encrypted by Autocrypt when sent. It has two values: Encrypt and Off. Encrypt can be enabled using the <autocrypt-menu> function, by default bound to o.

The Recommendation: field shows the output of the Autocrypt recommendation engine. This can have one of five values:

  • Off means the engine is disabled. This can happen if the From address doesn't have an autocrypt account, or if the account has been manually disabled.

  • No means one or more recipients are missing an autocrypt key, or the key found is unusable (i.e. expired, revoked, disabled, invalid, or not usable for encryption.)

  • Discouraged means a key was found for every recipient, but the engine is not confident the message will be decryptable by the recipient. This can happen if the key hasn't been used recently (compared to their last seen email).

    It can also happen if the key wasn't seen first-hand from the sender. Autocrypt has a feature where recipient keys can be included in group-encrypted emails. This allows you to reply to a conversation where you don't have a key first-hand from one of the other recipients. However, those keys are not trusted as much as from first-hand emails, so the engine warns you with a Discouraged status.

  • Available means a key was found for every recipient, and the engine believes all keys are recent and seen from the recipient first hand. However, either you or one of the recipients chose not to specify “prefer encryptionâ€.

  • Yes is the same as Available, with the addition that you and all recipients have specified “prefer encryptionâ€. This value will automatically enable encryption, unless you have manually switched it off or enabled regular encryption or signing via the <pgp-menu>.

As mentioned above the <autocrypt-menu> function, by default bound to o, can be used to change the Encrypt: field value. (e)ncrypt will toggle encryption on. (c)lear will toggle encryption off. If either of these are chosen, the field will remain in that state despite what the Recommendation: field shows. Lastly, (a)utomatic will set the value based on the recommendation engine's output.

Autocrypt encryption defers to normal encryption or signing. Anything that enables normal encryption or signing will cause autocrypt encryption to turn off. The only exception is when replying to an autocrypt-encrypted email (i.e. an email decrypted from the $autocrypt_dir keyring). Then, if $autocrypt_reply is set, autocrypt mode will be forced on, overriding the settings $crypt_autosign, $crypt_autoencrypt, $crypt_replyencrypt, $crypt_replysign, $crypt_replysignencrypted, and $crypt_opportunistic_encrypt.

When postponing a message, autocrypt will respect $postpone_encrypt, but will use the autocrypt account key to encrypt the message. Be sure to set $postpone_encrypt to ensure postponed messages marked for autocrypt encryption are encrypted.

13.4. Account Management

The Autocrypt Account Menu is available from the index via <autocrypt-acct-menu>, by default bound to A. See Autocrypt Account Menu for the list of functions and their default keybindings.

In this menu, you can create new accounts, delete accounts, toggle an account active/inactive, and toggle the “prefer encryption†flag for an account.

Deleting an account only removes the account from the database. The GPG key is kept, to ensure you still have the ability to read past encrypted emails.

The Autocrypt 1.1 “Setup Message†feature is not available yet, but will be added in the future.

13.5. Alternative Key and Keyring Strategies

Mutt by default partitions Autocrypt from normal keyring encryption/signing. It does this by using a separate GPG keyring (in $autocrypt_dir) and creating a new ECC key in that keyring for accounts. There are good reasons for doing this by default. It keeps random keys found inside email headers out of your normal keyring. ECC keys are compact and better suited for email headers. Autocrypt key selection is completely different from “web of trust†key selection, based on last-seen rules as opposed to trust and validity. It also allows Mutt to distinguish Autocrypt encrypted emails from regular encrypted emails, and set the mode appropriately when replying to each type of email.

Still, some users may want to use an existing key from their normal keyring for Autocrypt too. There are two ways this can be accomplished. The recommended way is to set $autocrypt_dir to your normal keyring directory (e.g. ~/.gnupg). During account creation, choosing “(s)elect existing GPG key†will then list and allow selecting your existing key for the new account.

An alternative is to copy your key over to the Autocrypt keyring, but there is a severe downside. Mutt first tries to decrypt messages using the Autocrypt keyring, and if that fails tries the normal keyring second. This means all encrypted emails to that key will be decrypted, and have signatures verified from, the Autocrypt keyring. Keys signatures and web of trust from your normal keyring will no longer show up in signatures when decrypting.

For that reason, if you want to use an existing key from your normal keyring, it is recommended to just set $autocrypt_dir to ~/.gnupg. This allows “web of trust†to show an appropriate signature message for verified messages. Autocrypt header keys will be imported into your keyring, but if you don't want them mixed you should strongly consider using a separate autocrypt key and keyring instead.

Both methods have a couple additional caveats:

  • Replying to an Autocrypt decrypted message by default forces Autocrypt mode on. By sharing the same key, all replies will then start in Autocrypt mode, even if a message wasn't sent by one of your Autocrypt peers. $autocrypt_reply can be unset to allow manual control of the mode when replying.

  • When Mutt creates an account from a GPG key, it exports the public key, base64 encodes it, and stores that value in the sqlite3 database. The value is then used in the Autocrypt header added to outgoing emails. The ECC keys Mutt creates don't change, but if you use external keys that expire, when you resign to extend the expiration you will need to recreate the Autocrypt account using the account menu. Otherwise the Autocrypt header will contain the old expired exported keydata.

mutt-2.3.2/doc/security.html0000644000175000017500000002031015173276637014212 0ustar00kjmkjm Chapter 7. Security Considerations

Chapter 7. Security Considerations

First of all, Mutt contains no security holes included by intention but may contain unknown security holes. As a consequence, please run Mutt only with as few permissions as possible. Especially, do not run Mutt as the super user.

When configuring Mutt, there're some points to note about secure setups so please read this chapter carefully.

1. Passwords

Although Mutt can be told the various passwords for accounts, please never store passwords in configuration files. Besides the fact that the system's operator can always read them, you could forget to mask it out when reporting a bug or asking for help via a mailing list. Even worse, your mail including your password could be archived by internet search engines, mail-to-news gateways etc. It may already be too late before you notice your mistake.

2. Temporary Files

Mutt uses many temporary files for viewing messages, verifying digital signatures, etc. As long as being used, these files are visible by other users and maybe even readable in case of misconfiguration. Also, a different location for these files may be desired which can be changed via the $tmpdir variable.

3. Information Leaks

3.1. mailto:-style Links

As Mutt be can be set up to be the mail client to handle mailto: style links in websites, there're security considerations, too. Arbitrary header fields can be embedded in these links which could override existing header fields or attach arbitrary files using the Attach: pseudoheader. This may be problematic if the $edit-headers variable is unset, i.e. the user doesn't want to see header fields while editing the message and doesn't pay enough attention to the compose menu's listing of attachments.

For example, following a link like

mailto:joe@host?Attach=~/.gnupg/secring.gpg

will send out the user's private gnupg keyring to joe@host if the user doesn't follow the information on screen carefully enough.

To prevent these issues, Mutt by default only accepts the Subject, Body, Cc, In-Reply-To, and References headers. Allowed headers can be adjusted with the mailto_allow and unmailto_allow commands.

4. External Applications

Mutt in many places has to rely on external applications or for convenience supports mechanisms involving external applications.

One of these is the mailcap mechanism as defined by RfC1524. Details about a secure use of the mailcap mechanisms is given in Section 3.2, “Secure Use of Mailcapâ€.

Besides the mailcap mechanism, Mutt uses a number of other external utilities for operation, for example to provide crypto support, in backtick expansion in configuration files or format string filters. The same security considerations apply for these as for tools involved via mailcap.

mutt-2.3.2/doc/tuning.html0000644000175000017500000002076715173276637013667 0ustar00kjmkjm Chapter 8. Performance Tuning

Chapter 8. Performance Tuning

1. Reading and Writing Mailboxes

Mutt's performance when reading mailboxes can be improved in two ways:

  1. For remote folders (IMAP and POP) as well as folders using one-file-per message storage (Maildir and MH), Mutt's performance can be greatly improved using header caching. using a single database per folder.

  2. Mutt provides the $read_inc and $write_inc variables to specify at which rate to update progress counters. If these values are too low, Mutt may spend more time on updating the progress counter than it spends on actually reading/writing folders.

    For example, when opening a maildir folder with a few thousand messages, the default value for $read_inc may be too low. It can be tuned on a folder-basis using folder-hooks:

    # use very high $read_inc to speed up reading hcache'd maildirs
    folder-hook . 'set read_inc=1000'
    # use lower value for reading slower remote IMAP folders
    folder-hook ^imap 'set read_inc=100'
    # use even lower value for reading even slower remote POP folders
    folder-hook ^pop 'set read_inc=1'

These settings work on a per-message basis. However, as messages may greatly differ in size and certain operations are much faster than others, even per-folder settings of the increment variables may not be desirable as they produce either too few or too much progress updates. Thus, Mutt allows to limit the number of progress updates per second it'll actually send to the terminal using the $time_inc variable.

2. Reading Messages from Remote Folders

Reading messages from remote folders such as IMAP an POP can be slow especially for large mailboxes since Mutt only caches a very limited number of recently viewed messages (usually 10) per session (so that it will be gone for the next session.)

To improve performance and permanently cache whole messages and headers, please refer to body caching and header caching for details.

Additionally, it may be worth trying some of Mutt's experimental features. $imap_qresync (which requires header caching) can provide a huge speed boost opening mailboxes if your IMAP server supports it. $imap_deflate enables compression, which can also noticeably reduce download time for large mailboxes and messages.

3. Searching and Limiting

When searching mailboxes either via a search or a limit action, for some patterns Mutt distinguishes between regular expression and string searches. For regular expressions, patterns are prefixed with “~†and with “=†for string searches.

Even though a regular expression search is fast, it's several times slower than a pure string search which is noticeable especially on large folders. As a consequence, a string search should be used instead of a regular expression search if the user already knows enough about the search pattern.

For example, when limiting a large folder to all messages sent to or by an author, it's much faster to search for the initial part of an e-mail address via =Luser@ instead of ~Luser@. This is especially true for searching message bodies since a larger amount of input has to be searched.

As for regular expressions, a lower case string search pattern makes Mutt perform a case-insensitive search except for IMAP (because for IMAP Mutt performs server-side searches which don't support case-insensitivity).

mutt-2.3.2/doc/reference.html0000644000175000017500000151657015173276637014324 0ustar00kjmkjm Chapter 9. Reference

Chapter 9. Reference

1. Command-Line Options

Running mutt with no arguments will make Mutt attempt to read your spool mailbox. However, it is possible to read other mailboxes and to send messages from the command line as well.

Table 9.1. Command line options

OptionDescription
-Aexpand an alias
-aattach a file to a message
-bspecify a blind carbon-copy (BCC) address
-cspecify a carbon-copy (Cc) address
-dlog debugging output to ~/.muttdebug0 if mutt was compiled with +DEBUG; it can range from -5 to 5 and affects verbosity. A value of 0 disables debugging. A value less than zero disables automatic log file rotation. A value of 2 is recommended for most diagnostics.
-Dprint the value of all Mutt variables to stdout
-Eedit the draft (-H) or include (-i) file
-especify a config command to be run after initialization files are read
-fspecify a mailbox to load
-Fspecify an alternate file to read initialization commands
-hprint help on command line options
-Hspecify a draft file from which to read a header and body
-ispecify a file to include in a message composition
-mspecify a default mailbox type
-ndo not read the system Muttrc
-precall a postponed message
-Qquery a configuration variable
-Ropen mailbox in read-only mode
-sspecify a subject (enclose in quotes if it contains spaces)
-vshow version number and compile-time definitions
-xsimulate the mailx(1) compose mode
-yshow a menu containing the files specified by the mailboxes command
-zexit immediately if there are no messages in the mailbox
-Zopen the first folder with new message, exit immediately if none

To read messages in a mailbox

mutt [-nz] [-F muttrc ] [-m type ] [-f mailbox ]

To compose a new message

mutt [-En] [-F muttrc ] [-c address ] [-Hi filename ] [-s subject ] [ -a file [...] -- ] address | mailto_url ...

Mutt also supports a “batch†mode to send prepared messages. Simply redirect input from the file you wish to send. For example,

mutt -s "data set for run #2" professor@bigschool.edu < ~/run2.dat

will send a message to <professor@bigschool.edu> with a subject of “data set for run #2â€. In the body of the message will be the contents of the file “~/run2.datâ€.

An include file passed with -i will be used as the body of the message. When combined with -E, the include file will be directly edited during message composition. The file will be modified regardless of whether the message is sent or aborted.

A draft file passed with -H will be used as the initial header and body for the message. Multipart messages can be used as a draft file, and are processed the same in interactive and batch mode; they are not passed through untouched. For example, encrypted draft files will be decrypted. When combined with -E, the draft file will be updated to the final state of the message after composition, regardless of whether the message is sent, aborted, or even postponed. Note that if the message is sent encrypted or signed, the draft file will be saved that way too.

All files passed with -a file will be attached as a MIME part to the message. To attach a single or several files, use “--†to separate files and recipient addresses:

mutt -a image.png -- some@one.org

or

mutt -a *.png -- some@one.org

Note

The -a option must be last in the option list.

In addition to accepting a list of email addresses, Mutt also accepts a URL with the mailto: schema as specified in RFC2368. This is useful when configuring a web browser to launch Mutt when clicking on mailto links.

mutt mailto:some@one.org?subject=test&cc=other@one.org

2. Configuration Commands

The following are the commands understood by Mutt:

3. Configuration Variables

3.1. abort_noattach

Type: quadoption
Default: no

When the body of the message matches $abort_noattach_regexp and there are no attachments, this quadoption controls whether to abort sending the message.

3.2. abort_noattach_regexp

Type: regular expression
Default: “attachâ€

Specifies a regular expression to match against the body of the message, to determine if an attachment was mentioned but mistakenly forgotten. If it matches, $abort_noattach will be consulted to determine if message sending will be aborted.

Like other regular expressions in Mutt, the search is case sensitive if the pattern contains at least one upper case letter, and case insensitive otherwise.

3.3. abort_nosubject

Type: quadoption
Default: ask-yes

If set to yes, when composing messages and no subject is given at the subject prompt, composition will be aborted. If set to no, composing messages with no subject given at the subject prompt will never be aborted.

3.4. abort_unmodified

Type: quadoption
Default: yes

If set to yes, composition will automatically abort after editing the message body if no changes are made to the file (this check only happens after the first edit of the file). When set to no, composition will never be aborted.

3.5. alias_file

Type: path
Default: “~/.muttrcâ€

The default file in which to save aliases created by the <create-alias> function. Entries added to this file are encoded in the character set specified by $config_charset if it is set or the current character set otherwise.

Note: Mutt will not automatically source this file; you must explicitly use the “source†command for it to be executed in case this option points to a dedicated alias file.

The default for this option is the currently used muttrc file, or “~/.muttrc†if no user muttrc was found.

3.6. alias_format

Type: string
Default: “%4n %2f %t %-10a   %râ€

Specifies the format of the data displayed for the “alias†menu. The following printf(3)-style sequences are available:

%a alias name
%f flags - currently, a “d†for an alias marked for deletion
%n index number
%r address which alias expands to
%t character which indicates if the alias is tagged for inclusion

3.7. allow_8bit

Type: boolean
Default: yes

Controls whether 8-bit data is converted to 7-bit using either Quoted- Printable or Base64 encoding when sending mail.

3.8. allow_ansi

Type: boolean
Default: no

Controls whether ANSI color codes in messages (and color tags in rich text messages) are to be interpreted. Messages containing these codes are rare, but if this option is set, their text will be colored accordingly. Note that this may override your color choices, and even present a security problem, since a message could include a line like

[-- PGP output follows ...

and give it the same color as your attachment color (see also $crypt_timestamp).

3.9. arrow_cursor

Type: boolean
Default: no

When set, an arrow (“->â€) will be used to indicate the current entry in menus instead of highlighting the whole line. On slow network or modem links this will make response faster because there is less that has to be redrawn on the screen when moving to the next or previous entries in the menu.

3.10. ascii_chars

Type: boolean
Default: no

If set, Mutt will use plain ASCII characters when displaying thread and attachment trees, instead of the default ACS characters.

3.11. askbcc

Type: boolean
Default: no

If set, Mutt will prompt you for blind-carbon-copy (Bcc) recipients before editing an outgoing message.

3.12. askcc

Type: boolean
Default: no

If set, Mutt will prompt you for carbon-copy (Cc) recipients before editing the body of an outgoing message.

3.13. assumed_charset

Type: string
Default: (empty)

This variable is a colon-separated list of character encoding schemes for messages without character encoding indication. Header field values and message body content without character encoding indication would be assumed that they are written in one of this list. By default, all the header fields and message body without any charset indication are assumed to be in “us-asciiâ€.

For example, Japanese users might prefer this:

set assumed_charset="iso-2022-jp:euc-jp:shift_jis:utf-8"

However, only the first content is valid for the message body.

3.14. attach_charset

Type: string
Default: (empty)

This variable is a colon-separated list of character encoding schemes for text file attachments. Mutt uses this setting to guess which encoding files being attached are encoded in to convert them to a proper character set given in $send_charset.

If unset, the value of $charset will be used instead. For example, the following configuration would work for Japanese text handling:

set attach_charset="iso-2022-jp:euc-jp:shift_jis:utf-8"

Note: for Japanese users, “iso-2022-*†must be put at the head of the value as shown above if included.

3.15. attach_format

Type: string
Default: “%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] â€

This variable describes the format of the “attachment†menu. The following printf(3)-style sequences are understood:

%C charset
%c requires charset conversion (“n†or “câ€)
%D deleted flag
%d description (if none, falls back to %F)
%e MIME content-transfer-encoding
%F filename in content-disposition header (if none, falls back to %f)
%f filename
%I disposition (“I†for inline, “A†for attachment)
%m major MIME type
%M MIME subtype
%n attachment number
%Q “Qâ€, if MIME part qualifies for attachment counting
%s size (see formatstrings-size)
%t tagged flag
%T graphic tree characters
%u unlink (=to delete) flag
%X number of qualifying MIME parts in this part and its children (please see the “attachments†section for possible speed effects)
%>X right justify the rest of the string and pad with character “Xâ€
%|X pad to the end of the line with character “Xâ€
%*X soft-fill with character “X†as pad

For an explanation of “soft-fillâ€, see the $index_format documentation.

3.16. attach_save_charset_convert

Type: quadoption
Default: ask-yes

When saving received text-type attachments, this quadoption prompts to convert the character set if the encoding of the attachment (or $assumed_charset if none is specified) differs from charset.

3.17. attach_save_dir

Type: path
Default: (empty)

The default directory to save attachments from the “attachment†menu. If it doesn't exist, Mutt will prompt to create the directory before saving.

If the path is invalid (e.g. not a directory, or cannot be chdir'ed to), Mutt will fall back to using the current directory.

3.18. attach_sep

Type: string
Default: “\nâ€

The separator to add between attachments when operating (saving, printing, piping, etc) on a list of tagged attachments.

3.19. attach_split

Type: boolean
Default: yes

If this variable is unset, when operating (saving, printing, piping, etc) on a list of tagged attachments, Mutt will concatenate the attachments and will operate on them as a single attachment. The $attach_sep separator is added after each attachment. When set, Mutt will operate on the attachments one by one.

3.20. attribution

Type: string (localized)
Default: “On %d, %n wrote:â€

This is the string that will precede a message which has been included in a reply. For a full listing of defined printf(3)-like sequences see the section on $index_format.

3.21. attribution_locale

Type: string
Default: (empty)

The locale used by strftime(3) to format dates in the attribution string. Legal values are the strings your system accepts for the locale environment variable $LC_TIME.

This variable is to allow the attribution date format to be customized by recipient or folder using hooks. By default, Mutt will use your locale environment, so there is no need to set this except to override that default.

3.22. auto_subscribe

Type: boolean
Default: no

When set, Mutt assumes the presence of a List-Post header means the recipient is subscribed to the list. Unless the mailing list is in the “unsubscribe†or “unlist†lists, it will be added to the “subscribe†list. Parsing and checking these things slows header reading down, so this option is disabled by default.

3.23. auto_tag

Type: boolean
Default: no

When set, functions in the index menu which affect a message will be applied to all tagged messages (if there are any). When unset, you must first use the <tag-prefix> function (bound to “;†by default) to make the next function apply to all tagged messages.

3.24. autocrypt

Type: boolean
Default: no

When set, enables autocrypt, which provides passive encryption protection with keys exchanged via headers. See “autocryptdoc†for more details. (Autocrypt only)

3.25. autocrypt_acct_format

Type: string
Default: “%4n %-30a %20p %10sâ€

This variable describes the format of the “autocrypt account†menu. The following printf(3)-style sequences are understood

%a email address
%k gpg keyid
%n current entry number
%p prefer-encrypt flag
%s status flag (active/inactive)

(Autocrypt only)

3.26. autocrypt_dir

Type: path
Default: “~/.mutt/autocryptâ€

This variable sets where autocrypt files are stored, including the GPG keyring and sqlite database. See “autocryptdoc†for more details. (Autocrypt only)

3.27. autocrypt_reply

Type: boolean
Default: yes

When set, replying to an autocrypt email automatically enables autocrypt in the reply. You may want to unset this if you're using the same key for autocrypt as normal web-of-trust, so that autocrypt isn't forced on for all encrypted replies. (Autocrypt only)

3.28. autoedit

Type: boolean
Default: no

When set along with $edit_headers, Mutt will skip the initial send-menu (prompting for subject and recipients) and allow you to immediately begin editing the body of your message. The send-menu may still be accessed once you have finished editing the body of your message.

Note: when this option is set, you cannot use send-hooks that depend on the recipients when composing a new (non-reply) message, as the initial list of recipients is empty.

Also see $fast_reply.

3.29. background_edit

Type: boolean
Default: no

When set, Mutt will run $editor in the background during message composition. A landing page will display, waiting for the $editor to exit. The landing page may be exited, allowing perusal of the mailbox, or even for other messages to be composed. Backgrounded sessions may be returned to via the <background-compose-menu> function.

For background editing to work properly, $editor must be set to an editor that does not try to use the Mutt terminal: for example a graphical editor, or a script launching (and waiting for) the editor in another Gnu Screen window.

For more details, see “bgedit†("Background Editing" in the manual).

3.30. background_confirm_quit

Type: boolean
Default: yes

When set, if there are any background edit sessions, you will be prompted to confirm exiting Mutt, in addition to the $quit prompt.

3.31. background_format

Type: string
Default: “%10S %7p %sâ€

This variable describes the format of the “background compose†menu. The following printf(3)-style sequences are understood:

%i parent message id (for replies and forwarded messages)
%n the running number on the menu
%p pid of the $editor process
%r comma separated list of “To:†recipients
%R comma separated list of “Cc:†recipients
%s subject of the message
%S status of the $editor process: running/finished

3.32. beep

Type: boolean
Default: yes

When this variable is set, mutt will beep when an error occurs.

3.33. beep_new

Type: boolean
Default: no

When this variable is set, mutt will beep whenever it prints a message notifying you of new mail. This is independent of the setting of the $beep variable.

3.34. bounce

Type: quadoption
Default: ask-yes

Controls whether you will be asked to confirm bouncing messages. If set to yes you don't get asked if you want to bounce a message. Setting this variable to no is not generally useful, and thus not recommended, because you are unable to bounce messages.

3.35. bounce_delivered

Type: boolean
Default: yes

When this variable is set, mutt will include Delivered-To headers when bouncing messages. Postfix users may wish to unset this variable.

3.36. braille_friendly

Type: boolean
Default: no

When this variable is set, mutt will place the cursor at the beginning of the current line in menus, even when the $arrow_cursor variable is unset, making it easier for blind persons using Braille displays to follow these menus. The option is unset by default because many visual terminals don't permit making the cursor invisible.

3.37. browser_abbreviate_mailboxes

Type: boolean
Default: yes

When this variable is set, mutt will abbreviate mailbox names in the browser mailbox list, using '~' and '=' shortcuts.

The default "alpha" setting of $sort_browser uses locale-based sorting (using strcoll(3)), which ignores some punctuation. This can lead to some situations where the order doesn't make intuitive sense. In those cases, it may be desirable to unset this variable.

3.38. browser_sticky_cursor

Type: boolean
Default: yes

When this variable is set, the browser will attempt to keep the cursor on the same mailbox when performing various functions. These include moving up a directory, toggling between mailboxes and directory listing, creating/renaming a mailbox, toggling subscribed mailboxes, and entering a new mask.

3.39. certificate_file

Type: path
Default: “~/.mutt_certificatesâ€

This variable specifies the file where the certificates you trust are saved. When an unknown certificate is encountered, you are asked if you accept it or not. If you accept it, the certificate can also be saved in this file and further connections are automatically accepted.

You can also manually add CA certificates in this file. Any server certificate that is signed with one of these CA certificates is also automatically accepted.

Example:

set certificate_file=~/.mutt/certificates

(OpenSSL and GnuTLS only)

3.40. change_folder_next

Type: boolean
Default: no

When this variable is set, the <change-folder> function mailbox suggestion will start at the next folder in your “mailboxes†list, instead of starting at the first folder in the list.

3.41. charset

Type: string
Default: (empty)

Character set your terminal uses to display and enter textual data. It is also the fallback for $send_charset.

Upon startup Mutt tries to derive this value from environment variables such as $LC_CTYPE or $LANG.

Note: It should only be set in case Mutt isn't able to determine the character set used correctly.

3.42. check_mbox_size

Type: boolean
Default: no

When this variable is set, mutt will use file size attribute instead of access time when checking for new mail in mbox and mmdf folders.

This variable is unset by default and should only be enabled when new mail detection for these folder types is unreliable or doesn't work.

Note that enabling this variable should happen before any “mailboxes†directives occur in configuration files regarding mbox or mmdf folders because mutt needs to determine the initial new mail status of such a mailbox by performing a fast mailbox scan when it is defined. Afterwards the new mail status is tracked by file size changes.

3.43. check_new

Type: boolean
Default: yes

Note: this option only affects maildir and MH style mailboxes.

When set, Mutt will check for new mail delivered while the mailbox is open. Especially with MH mailboxes, this operation can take quite some time since it involves scanning the directory and checking each file to see if it has already been looked at. If this variable is unset, no check for new mail is performed while the mailbox is open.

3.44. collapse_unread

Type: boolean
Default: yes

When unset, Mutt will not collapse a thread if it contains any unread messages.

3.45. compose_confirm_detach_first

Type: boolean
Default: yes

When set, Mutt will prompt for confirmation when trying to use <detach-file> on the first entry in the compose menu. This is to help prevent irreversible loss of the typed message by accidentally hitting 'D' in the menu.

Note: Mutt only prompts for the first entry. It doesn't keep track of which message is the typed message if the entries are reordered, or if the first entry was already deleted.

3.46. compose_format

Type: string (localized)
Default: “-- Mutt: Compose  [Approx. msg size: %l   Atts: %a]%>-â€

Controls the format of the status line displayed in the “compose†menu. This string is similar to $status_format, but has its own set of printf(3)-like sequences:

%a total number of attachments
%h local hostname
%l approximate size (in bytes) of the current message (see formatstrings-size)
%v Mutt version string

See the text describing the $status_format option for more information on how to set $compose_format.

3.47. config_charset

Type: string
Default: (empty)

When defined, Mutt will recode commands in rc files from this encoding to the current character set as specified by $charset and aliases written to $alias_file from the current character set.

Please note that if setting $charset it must be done before setting $config_charset.

Recoding should be avoided as it may render unconvertable characters as question marks which can lead to undesired side effects (for example in regular expressions).

3.48. confirmappend

Type: boolean
Default: yes

When set, Mutt will prompt for confirmation when appending messages to an existing mailbox.

3.49. confirmcreate

Type: boolean
Default: yes

When set, Mutt will prompt for confirmation when saving messages to a mailbox which does not yet exist before creating it.

3.50. connect_timeout

Type: number
Default: 30

Causes Mutt to timeout a network connection (for IMAP, POP or SMTP) after this many seconds if the connection is not able to be established. A negative value causes Mutt to wait indefinitely for the connection attempt to succeed.

3.51. content_type

Type: string
Default: “text/plainâ€

Sets the default Content-Type for the body of newly composed messages.

3.52. copy

Type: quadoption
Default: yes

This variable controls whether or not copies of your outgoing messages will be saved for later references. Also see $record, $save_name, $force_name and “fcc-hookâ€.

3.53. copy_decode_weed

Type: boolean
Default: no

Controls whether Mutt will weed headers when invoking the <decode-copy> or <decode-save> functions.

3.54. count_alternatives

Type: boolean
Default: no

When set, Mutt will recurse inside multipart/alternatives while performing attachment searching and counting (see attachments).

Traditionally, multipart/alternative parts have simply represented different encodings of the main content of the email. Unfortunately, some mail clients have started to place email attachments inside one of alternatives. Setting this will allow Mutt to find and count matching attachments hidden there, and include them in the index via %X or through ~X pattern matching.

3.55. cursor_overlay

Type: boolean
Default: no

When set, Mutt will overlay the indicator, tree, sidebar_highlight, and sidebar_indicator colors onto the currently selected line. This will allow default colors in those to be overridden, and for attributes to be merged between the layers.

3.56. crypt_autoencrypt

Type: boolean
Default: no

Setting this variable will cause Mutt to always attempt to PGP encrypt outgoing messages. This is probably only useful in connection to the “send-hook†command. It can be overridden by use of the pgp menu, when encryption is not required or signing is requested as well. If $smime_is_default is set, then OpenSSL is used instead to create S/MIME messages and settings can be overridden by use of the smime menu instead. (Crypto only)

3.57. crypt_autopgp

Type: boolean
Default: yes

This variable controls whether or not mutt may automatically enable PGP encryption/signing for messages. See also $crypt_autoencrypt, $crypt_replyencrypt, $crypt_autosign, $crypt_replysign and $smime_is_default.

3.58. crypt_autosign

Type: boolean
Default: no

Setting this variable will cause Mutt to always attempt to cryptographically sign outgoing messages. This can be overridden by use of the pgp menu, when signing is not required or encryption is requested as well. If $smime_is_default is set, then OpenSSL is used instead to create S/MIME messages and settings can be overridden by use of the smime menu instead of the pgp menu. (Crypto only)

3.59. crypt_autosmime

Type: boolean
Default: yes

This variable controls whether or not mutt may automatically enable S/MIME encryption/signing for messages. See also $crypt_autoencrypt, $crypt_replyencrypt, $crypt_autosign, $crypt_replysign and $smime_is_default.

3.60. crypt_confirmhook

Type: boolean
Default: yes

If set, then you will be prompted for confirmation of keys when using the crypt-hook command. If unset, no such confirmation prompt will be presented. This is generally considered unsafe, especially where typos are concerned.

3.61. crypt_opportunistic_encrypt

Type: boolean
Default: no

Setting this variable will cause Mutt to automatically enable and disable encryption, based on whether all message recipient keys can be located by Mutt.

When this option is enabled, Mutt will enable/disable encryption each time the TO, CC, and BCC lists are edited. If $edit_headers is set, Mutt will also do so each time the message is edited.

While this is set, encryption can't be manually enabled/disabled. The pgp or smime menus provide a selection to temporarily disable this option for the current message.

If $crypt_autoencrypt or $crypt_replyencrypt enable encryption for a message, this option will be disabled for that message. It can be manually re-enabled in the pgp or smime menus. (Crypto only)

3.62. crypt_opportunistic_encrypt_strong_keys

Type: boolean
Default: no

When set, this modifies the behavior of $crypt_opportunistic_encrypt to only search for "strong keys", that is, keys with full validity according to the web-of-trust algorithm. A key with marginal or no validity will not enable opportunistic encryption.

For S/MIME, the behavior depends on the backend. Classic S/MIME will filter for certificates with the 't' (trusted) flag in the .index file. The GPGME backend will use the same filters as with OpenPGP, and depends on GPGME's logic for assigning the GPGME_VALIDITY_FULL and GPGME_VALIDITY_ULTIMATE validity flag.

3.63. crypt_protected_headers_read

Type: boolean
Default: yes

When set, Mutt will display protected headers in the pager, and will update the index and header cache with revised headers. Protected headers are stored inside the encrypted or signed part of an an email, to prevent disclosure or tampering. For more information see https://github.com/autocrypt/protected-headers. Currently Mutt only supports the Subject header.

Encrypted messages using protected headers often substitute the exposed Subject header with a dummy value (see $crypt_protected_headers_subject). Mutt will update its concept of the correct subject after the message is opened, i.e. via the <display-message> function. If you reply to a message before opening it, Mutt will end up using the dummy Subject header, so be sure to open such a message first. (Crypto only)

3.64. crypt_protected_headers_save

Type: boolean
Default: no

When $crypt_protected_headers_read is set, and a message with a protected Subject is opened, Mutt will save the updated Subject into the header cache by default. This allows searching/limiting based on the protected Subject header if the mailbox is re-opened, without having to re-open the message each time. However, for mbox/mh mailbox types, or if header caching is not set up, you would need to re-open the message each time the mailbox was reopened before you could see or search/limit on the protected subject again.

When this variable is set, Mutt additionally saves the protected Subject back in the clear-text message headers. This provides better usability, but with the tradeoff of reduced security. The protected Subject header, which may have previously been encrypted, is now stored in clear-text in the message headers. Copying the message elsewhere, via Mutt or external tools, could expose this previously encrypted data. Please make sure you understand the consequences of this before you enable this variable. (Crypto only)

3.65. crypt_protected_headers_subject

Type: string
Default: “...â€

When $crypt_protected_headers_write is set, and the message is marked for encryption, this will be substituted into the Subject field in the message headers. To prevent a subject from being substituted, unset this variable, or set it to the empty string. (Crypto only)

3.66. crypt_protected_headers_write

Type: boolean
Default: no

When set, Mutt will generate protected headers for signed and encrypted emails. Protected headers are stored inside the encrypted or signed part of an an email, to prevent disclosure or tampering. For more information see https://github.com/autocrypt/protected-headers. Currently Mutt only supports the Subject header. (Crypto only)

3.67. crypt_replyencrypt

Type: boolean
Default: yes

If set, automatically PGP or OpenSSL encrypt replies to messages which are encrypted. (Crypto only)

3.68. crypt_replysign

Type: boolean
Default: no

If set, automatically PGP or OpenSSL sign replies to messages which are signed.

Note: this does not work on messages that are encrypted and signed! (Crypto only)

3.69. crypt_replysignencrypted

Type: boolean
Default: no

If set, automatically PGP or OpenSSL sign replies to messages which are encrypted. This makes sense in combination with $crypt_replyencrypt, because it allows you to sign all messages which are automatically encrypted. This works around the problem noted in $crypt_replysign, that mutt is not able to find out whether an encrypted message is also signed. (Crypto only)

3.70. crypt_timestamp

Type: boolean
Default: yes

If set, mutt will include a time stamp in the lines surrounding PGP or S/MIME output, so spoofing such lines is more difficult. If you are using colors to mark these lines, and rely on these, you may unset this setting. (Crypto only)

3.71. crypt_use_gpgme

Type: boolean
Default: no

This variable controls the use of the GPGME-enabled crypto backends. If it is set and Mutt was built with gpgme support, the gpgme code for S/MIME and PGP will be used instead of the classic code. Note that you need to set this option in .muttrc; it won't have any effect when used interactively.

Note that the GPGME backend does not support creating old-style inline (traditional) PGP encrypted or signed messages (see $pgp_autoinline).

3.72. crypt_use_pka

Type: boolean
Default: no

Controls whether mutt uses PKA (see http://www.g10code.de/docs/pka-intro.de.pdf) during signature verification (only supported by the GPGME backend).

3.73. crypt_verify_sig

Type: quadoption
Default: yes

If “yesâ€, always attempt to verify PGP or S/MIME signatures. If “ask-*â€, ask whether or not to verify the signature. If “noâ€, never attempt to verify cryptographic signatures. (Crypto only)

3.74. date_format

Type: string
Default: “!%a, %b %d, %Y at %I:%M:%S%p %Zâ€

This variable controls the format of the date printed by the “%d†sequence in $index_format. This is passed to the strftime(3) function to process the date, see the man page for the proper syntax.

Unless the first character in the string is a bang (“!â€), the month and week day names are expanded according to the locale. If the first character in the string is a bang, the bang is discarded, and the month and week day names in the rest of the string are expanded in the C locale (that is in US English).

3.75. default_hook

Type: string
Default: “~f %s !~P | (~P ~C %s)â€

This variable controls how “message-hookâ€, “reply-hookâ€, “send-hookâ€, “send2-hookâ€, “save-hookâ€, and “fcc-hook†will be interpreted if they are specified with only a simple regexp, instead of a matching pattern. The hooks are expanded when they are declared, so a hook will be interpreted according to the value of this variable at the time the hook is declared.

The default value matches if the message is either from a user matching the regular expression given, or if it is from you (if the from address matches “alternatesâ€) and is to or cc'ed to a user matching the given regular expression.

3.76. delete

Type: quadoption
Default: ask-yes

Controls whether or not messages are really deleted when closing or synchronizing a mailbox. If set to yes, messages marked for deleting will automatically be purged without prompting. If set to no, messages marked for deletion will be kept in the mailbox.

This option is ignored for maildir-style mailboxes when $maildir_trash is set.

3.77. delete_untag

Type: boolean
Default: yes

If this option is set, mutt will untag messages when marking them for deletion. This applies when you either explicitly delete a message, or when you save it to another folder.

3.78. digest_collapse

Type: boolean
Default: yes

If this option is set, mutt's received-attachments menu will not show the subparts of individual messages in a multipart/digest. To see these subparts, press “v†on that menu.

3.79. display_filter

Type: path
Default: (empty)

When set, specifies a command used to filter messages. When a message is viewed it is passed as standard input to $display_filter, and the filtered message is read from the standard output.

3.80. dotlock_program

Type: path
Default: “/usr/local/bin/mutt_dotlockâ€

Contains the path of the mutt_dotlock(1) binary to be used by mutt.

3.81. dsn_notify

Type: string
Default: (empty)

This variable sets the request for when notification is returned. The string consists of a comma separated list (no spaces!) of one or more of the following: never, to never request notification, failure, to request notification on transmission failure, delay, to be notified of message delays, success, to be notified of successful transmission.

Example:

set dsn_notify="failure,delay"

Note: when using $sendmail for delivery, you should not enable this unless you are either using Sendmail 8.8.x or greater or a MTA providing a sendmail(1)-compatible interface supporting the -N option for DSN. For SMTP delivery, DSN support is auto-detected so that it depends on the server whether DSN will be used or not.

3.82. dsn_return

Type: string
Default: (empty)

This variable controls how much of your message is returned in DSN messages. It may be set to either hdrs to return just the message header, or full to return the full message.

Example:

set dsn_return=hdrs

Note: when using $sendmail for delivery, you should not enable this unless you are either using Sendmail 8.8.x or greater or a MTA providing a sendmail(1)-compatible interface supporting the -R option for DSN. For SMTP delivery, DSN support is auto-detected so that it depends on the server whether DSN will be used or not.

3.83. duplicate_threads

Type: boolean
Default: yes

This variable controls whether mutt, when $sort is set to threads, threads messages with the same Message-Id together. If it is set, it will indicate that it thinks they are duplicates of each other with an equals sign in the thread tree.

3.84. edit_headers

Type: boolean
Default: no

This option allows you to edit the header of your outgoing messages along with the body of your message.

Although the compose menu may have localized header labels, the labels passed to your editor will be standard RFC 2822 headers, (e.g. To:, Cc:, Subject:). Headers added in your editor must also be RFC 2822 headers, or one of the pseudo headers listed in “edit-headerâ€. Mutt will not understand localized header labels, just as it would not when parsing an actual email.

Note that changes made to the References: and Date: headers are ignored for interoperability reasons.

3.85. editor

Type: path
Default: (empty)

This variable specifies which editor is used by mutt. It defaults to the value of the $VISUAL, or $EDITOR, environment variable, or to the string “vi†if neither of those are set.

The $editor string may contain a %s escape, which will be replaced by the name of the file to be edited. If the %s escape does not appear in $editor, a space and the name to be edited are appended.

The resulting string is then executed by running

sh -c 'string'

where string is the expansion of $editor described above.

3.86. encode_from

Type: boolean
Default: no

When set, mutt will quoted-printable encode messages when they contain the string “From †(note the trailing space) in the beginning of a line. This is useful to avoid the tampering certain mail delivery and transport agents tend to do with messages (in order to prevent tools from misinterpreting the line as a mbox message separator).

3.87. entropy_file

Type: path
Default: (empty)

The file which includes random data that is used to initialize SSL library functions. (OpenSSL only)

3.88. envelope_from_address

Type: e-mail address
Default: (empty)

Manually sets the envelope sender for outgoing messages. This value is ignored if $use_envelope_from is unset.

3.89. error_history

Type: number
Default: 30

This variable controls the size (in number of strings remembered) of the error messages displayed by mutt. These can be shown with the <error-history> function. The history is cleared each time this variable is set.

3.90. escape

Type: string
Default: “~â€

Escape character to use for functions in the built-in editor.

3.91. fast_reply

Type: boolean
Default: no

When set, the initial prompt for recipients and subject are skipped when replying to messages, and the initial prompt for subject is skipped when forwarding messages.

Note: this variable has no effect when the $autoedit variable is set.

3.92. fcc_attach

Type: quadoption
Default: yes

This variable controls whether or not attachments on outgoing messages are saved along with the main body of your message.

Note: $fcc_before_send forces the default (set) behavior of this option.

3.93. fcc_before_send

Type: boolean
Default: no

When this variable is set, FCCs will occur before sending the message. Before sending, the message cannot be manipulated, so it will be stored the exact same as sent: $fcc_attach and $fcc_clear will be ignored (using their default values).

When unset, the default, FCCs will occur after sending. Variables $fcc_attach and $fcc_clear will be respected, allowing it to be stored without attachments or encryption/signing if desired.

3.94. fcc_clear

Type: boolean
Default: no

When this variable is set, FCCs will be stored unencrypted and unsigned, even when the actual message is encrypted and/or signed.

Note: $fcc_before_send forces the default (unset) behavior of this option. (PGP only)

See also $pgp_self_encrypt, $smime_self_encrypt.

3.95. fcc_delimiter

Type: string
Default: (empty)

When specified, this allows the ability to Fcc to more than one mailbox. The fcc value will be split by this delimiter and Mutt will evaluate each part as a mailbox separately.

See $record, “fcc-hookâ€, and “fcc-save-hookâ€.

3.96. flag_safe

Type: boolean
Default: no

If set, flagged messages cannot be deleted.

3.97. folder

Type: path
Default: “~/Mailâ€

Specifies the default location of your mailboxes. A “+†or “=†at the beginning of a pathname will be expanded to the value of this variable. Note that if you change this variable (from the default) value you need to make sure that the assignment occurs before you use “+†or “=†for any other variables since expansion takes place when handling the “mailboxes†command.

3.98. folder_format

Type: string
Default: “%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %fâ€

This variable allows you to customize the file browser display to your personal taste. This string is similar to $index_format, but has its own set of printf(3)-like sequences:

%C current file number
%d date/time folder was last modified
%D date/time folder was last modified using $date_format.
%f filename (“/†is appended to directory names, “@†to symbolic links and “*†to executable files)
%F file permissions
%g group name (or numeric gid, if missing)
%l number of hard links
%m number of messages in the mailbox *
%n number of unread messages in the mailbox *
%N N if mailbox has new mail, blank otherwise
%s size in bytes (see formatstrings-size)
%t “*†if the file is tagged, blank otherwise
%u owner name (or numeric uid, if missing)
%>X right justify the rest of the string and pad with character “Xâ€
%|X pad to the end of the line with character “Xâ€
%*X soft-fill with character “X†as pad

For an explanation of “soft-fillâ€, see the $index_format documentation.

* = can be optionally printed if nonzero

%m, %n, and %N only work for monitored mailboxes. %m requires $mail_check_stats to be set. %n requires $mail_check_stats to be set (except for IMAP mailboxes).

3.99. followup_to

Type: boolean
Default: yes

Controls whether or not the “Mail-Followup-To:†header field is generated when sending mail. When set, Mutt will generate this field when you are replying to a known mailing list, specified with the “subscribe†or “lists†commands.

This field has two purposes. First, preventing you from receiving duplicate copies of replies to messages which you send to mailing lists, and second, ensuring that you do get a reply separately for any messages sent to known lists to which you are not subscribed.

The header will contain only the list's address for subscribed lists, and both the list address and your own email address for unsubscribed lists. Without this header, a group reply to your message sent to a subscribed list will be sent to both the list and your address, resulting in two copies of the same email for you.

3.100. force_name

Type: boolean
Default: no

This variable is similar to $save_name, except that Mutt will store a copy of your outgoing message by the username of the address you are sending to even if that mailbox does not exist.

Also see the $record variable.

3.101. forward_attachments

Type: quadoption
Default: ask-yes

When forwarding inline (i.e. $mime_forward unset or answered with “no†and $forward_decode set), attachments which cannot be decoded in a reasonable manner will be attached to the newly composed message if this quadoption is set or answered with “yesâ€.

3.102. forward_attribution_intro

Type: string (localized)
Default: “----- Forwarded message from %f -----â€

This is the string that will precede a message which has been forwarded in the main body of a message (when $mime_forward is unset). For a full listing of defined printf(3)-like sequences see the section on $index_format. See also $attribution_locale.

3.103. forward_attribution_trailer

Type: string (localized)
Default: “----- End forwarded message -----â€

This is the string that will follow a message which has been forwarded in the main body of a message (when $mime_forward is unset). For a full listing of defined printf(3)-like sequences see the section on $index_format. See also $attribution_locale.

3.104. forward_decode

Type: boolean
Default: yes

Controls the decoding of complex MIME messages into text/plain when forwarding a message. The message header is also RFC2047 decoded. This variable is only used, if $mime_forward is unset, otherwise $mime_forward_decode is used instead.

3.105. forward_decrypt

Type: quadoption
Default: yes

This quadoption controls the handling of encrypted messages when forwarding or attaching a message. When set to or answered “yesâ€, the outer layer of encryption is stripped off.

This variable is used if $mime_forward is set and $mime_forward_decode is unset. It is also used when attaching a message via <attach-message> in the compose menu. (PGP only)

3.106. forward_edit

Type: quadoption
Default: yes

This quadoption controls whether or not the user is automatically placed in the editor when forwarding messages. For those who always want to forward with no modification, use a setting of “noâ€.

3.107. forward_format

Type: string
Default: “[%a: %s]â€

This variable controls the default subject when forwarding a message. It uses the same format sequences as the $index_format variable.

3.108. forward_quote

Type: boolean
Default: no

When set, forwarded messages included in the main body of the message (when $mime_forward is unset) will be quoted using $indent_string.

3.109. from

Type: e-mail address
Default: (empty)

When set, this variable contains a default from address. It can be overridden using “my_hdr†(including from a “send-hookâ€) and $reverse_name. This variable is ignored if $use_from is unset.

This setting defaults to the contents of the environment variable $EMAIL.

3.110. gecos_mask

Type: regular expression
Default: “^[^,]*â€

A regular expression used by mutt to parse the GECOS field of a password entry when expanding the alias. The default value will return the string up to the first “,†encountered. If the GECOS field contains a string like “lastname, firstname†then you should set it to “.*â€.

This can be useful if you see the following behavior: you address an e-mail to user ID “stevef†whose full name is “Steve Franklinâ€. If mutt expands “stevef†to “"Franklin" stevef@foo.bar†then you should set the $gecos_mask to a regular expression that will match the whole name so mutt will expand “Franklin†to “Franklin, Steveâ€.

3.111. hdrs

Type: boolean
Default: yes

When unset, the header fields normally added by the “my_hdr†command are not created. This variable must be unset before composing a new message or replying in order to take effect. If set, the user defined header fields are added to every new message.

3.112. header

Type: boolean
Default: no

When set, this variable causes Mutt to include the header of the message you are replying to into the edit buffer. The $weed setting applies.

3.113. header_cache

Type: path
Default: (empty)

This variable points to the header cache database. If pointing to a directory Mutt will contain a header cache database file per folder, if pointing to a file that file will be a single global header cache. By default it is unset so no header caching will be used. If pointing to a directory, it must be created in advance.

Header caching can greatly improve speed when opening POP, IMAP MH or Maildir folders, see “caching†for details.

3.114. header_cache_compress

Type: boolean
Default: yes

When mutt is compiled with qdbm, tokyocabinet, or kyotocabinet as header cache backend, this option determines whether the database will be compressed. Compression results in database files roughly being one fifth of the usual diskspace, but the decompression can result in a slower opening of cached folder(s) which in general is still much faster than opening non header cached folders.

3.115. header_cache_pagesize

Type: number (long)
Default: 16384

When mutt is compiled with either gdbm or bdb4 as the header cache backend, this option changes the database page size. Too large or too small values can waste space, memory, or CPU time. The default should be more or less optimal for most use cases.

3.116. header_color_partial

Type: boolean
Default: no

When set, color header regexps behave like color body regexps: color is applied to the exact text matched by the regexp. When unset, color is applied to the entire header.

One use of this option might be to apply color to just the header labels.

See “color†for more details.

3.117. help

Type: boolean
Default: yes

When set, help lines describing the bindings for the major functions provided by each menu are displayed on the first line of the screen.

Note: The binding will not be displayed correctly if the function is bound to a sequence rather than a single keystroke. Also, the help line may not be updated if a binding is changed while Mutt is running. Since this variable is primarily aimed at new users, neither of these should present a major problem.

3.118. hidden_host

Type: boolean
Default: no

When set, mutt will skip the host name part of $hostname variable when adding the domain part to addresses. This variable does not affect the generation of Message-IDs, and it will not lead to the cut-off of first-level domains.

3.119. hide_limited

Type: boolean
Default: no

When set, mutt will not show the presence of messages that are hidden by limiting, in the thread tree.

3.120. hide_missing

Type: boolean
Default: yes

When set, mutt will not show the presence of missing messages in the thread tree.

3.121. hide_thread_subject

Type: boolean
Default: yes

When set, mutt will not show the subject of messages in the thread tree that have the same subject as their parent or closest previously displayed sibling.

3.122. hide_top_limited

Type: boolean
Default: no

When set, mutt will not show the presence of messages that are hidden by limiting, at the top of threads in the thread tree. Note that when $hide_limited is set, this option will have no effect.

3.123. hide_top_missing

Type: boolean
Default: yes

When set, mutt will not show the presence of missing messages at the top of threads in the thread tree. Note that when $hide_missing is set, this option will have no effect.

3.124. history

Type: number
Default: 10

This variable controls the size (in number of strings remembered) of the string history buffer per category. The buffer is cleared each time the variable is set.

3.125. history_file

Type: path
Default: “~/.mutthistoryâ€

The file in which Mutt will save its history.

Also see $save_history.

3.126. history_remove_dups

Type: boolean
Default: no

When set, all of the string history will be scanned for duplicates when a new entry is added. Duplicate entries in the $history_file will also be removed when it is periodically compacted.

3.127. honor_disposition

Type: boolean
Default: no

When set, Mutt will not display attachments with a disposition of “attachment†inline even if it could render the part to plain text. These MIME parts can only be viewed from the attachment menu.

If unset, Mutt will render all MIME parts it can properly transform to plain text.

3.128. honor_followup_to

Type: quadoption
Default: yes

This variable controls whether or not a Mail-Followup-To header is honored when group-replying to a message.

3.129. hostname

Type: string
Default: (empty)

Specifies the fully-qualified hostname of the system mutt is running on containing the host's name and the DNS domain it belongs to. It is used as the domain part (after “@â€) for local email addresses as well as Message-Id headers.

Its value is determined at startup as follows: the node's hostname is first determined by the uname(3) function. The domain is then looked up using the gethostname(2) and getaddrinfo(3) functions. If those calls are unable to determine the domain, the full value returned by uname is used. Optionally, Mutt can be compiled with a fixed domain name in which case a detected one is not used.

Starting in Mutt 2.0, the operations described in the previous paragraph are performed after the muttrc is processed, instead of beforehand. This way, if the DNS operations are creating delays at startup, you can avoid those by manually setting the value in your muttrc.

Also see $use_domain and $hidden_host.

3.130. idn_decode

Type: boolean
Default: yes

When set, Mutt will show you international domain names decoded. Note: You can use IDNs for addresses even if this is unset. This variable only affects decoding. (IDN only)

3.131. idn_encode

Type: boolean
Default: yes

When set, Mutt will encode international domain names using IDN. Unset this if your SMTP server can handle newer (RFC 6531) UTF-8 encoded domains. (IDN only)

3.132. ignore_linear_white_space

Type: boolean
Default: no

This option replaces linear-white-space between encoded-word and text to a single space to prevent the display of MIME-encoded “Subject:†field from being divided into multiple lines.

3.133. ignore_list_reply_to

Type: boolean
Default: no

Affects the behavior of the <reply> function when replying to messages from mailing lists (as defined by the “subscribe†or “lists†commands). When set, if the “Reply-To:†field is set to the same value as the “To:†field, Mutt assumes that the “Reply-To:†field was set by the mailing list to automate responses to the list, and will ignore this field. To direct a response to the mailing list when this option is set, use the <list-reply> function; <group-reply> will reply to both the sender and the list.

3.134. imap_authenticators

Type: string
Default: (empty)

This is a colon-delimited list of authentication methods mutt may attempt to use to log in to an IMAP server, in the order mutt should try them. Authentication methods are either “login†or the right side of an IMAP “AUTH=xxx†capability string, e.g. “digest-md5â€, “gssapi†or “cram-md5â€. This option is case-insensitive. If it's unset (the default) mutt will try all available methods, in order from most-secure to least-secure.

Example:

set imap_authenticators="gssapi:cram-md5:login"

Note: Mutt will only fall back to other authentication methods if the previous methods are unavailable. If a method is available but authentication fails, mutt will not connect to the IMAP server.

3.135. imap_check_subscribed

Type: boolean
Default: no

When set, mutt will fetch the set of subscribed folders from your server on connection, and add them to the set of mailboxes it polls for new mail just as if you had issued individual “mailboxes†commands.

3.136. imap_condstore

Type: boolean
Default: no

When set, mutt will use the CONDSTORE extension (RFC 7162) if advertised by the server. Mutt's current implementation is basic, used only for initial message fetching and flag updates.

For some IMAP servers, enabling this will slightly speed up downloading initial messages. Unfortunately, Gmail is not one those, and displays worse performance when enabled. Your mileage may vary.

3.137. imap_deflate

Type: boolean
Default: no

When set, mutt will use the COMPRESS=DEFLATE extension (RFC 4978) if advertised by the server.

In general a good compression efficiency can be achieved, which speeds up reading large mailboxes also on fairly good connections.

3.138. imap_delim_chars

Type: string
Default: “/.â€

This contains the list of characters which you would like to treat as folder separators for displaying IMAP paths. In particular it helps in using the “=†shortcut for your folder variable.

3.139. imap_fetch_chunk_size

Type: number (long)
Default: 0

When set to a value greater than 0, new headers will be downloaded in groups of this many headers per request. If you have a very large mailbox, this might prevent a timeout and disconnect when opening the mailbox, by sending a FETCH per set of this many headers, instead of a single FETCH for all new headers.

3.140. imap_headers

Type: string
Default: (empty)

Mutt requests these header fields in addition to the default headers (“Date:â€, “From:â€, “Sender:â€, “Subject:â€, “To:â€, “Cc:â€, “Message-Id:â€, “References:â€, “Content-Type:â€, “Content-Description:â€, “In-Reply-To:â€, “Reply-To:â€, “Lines:â€, “List-Post:â€, “X-Label:â€) from IMAP servers before displaying the index menu. You may want to add more headers for spam detection.

Note: This is a space separated list, items should be uppercase and not contain the colon, e.g. “X-BOGOSITY X-SPAM-STATUS†for the “X-Bogosity:†and “X-Spam-Status:†header fields.

3.141. imap_idle

Type: boolean
Default: no

When set, mutt will attempt to use the IMAP IDLE extension to check for new mail in the current mailbox. Some servers (dovecot was the inspiration for this option) react badly to mutt's implementation. If your connection seems to freeze up periodically, try unsetting this.

3.142. imap_keepalive

Type: number
Default: 300

This variable specifies the maximum amount of time in seconds that mutt will wait before polling open IMAP connections, to prevent the server from closing them before mutt has finished with them. The default is well within the RFC-specified minimum amount of time (30 minutes) before a server is allowed to do this, but in practice the RFC does get violated every now and then. Reduce this number if you find yourself getting disconnected from your IMAP server due to inactivity.

3.143. imap_list_subscribed

Type: boolean
Default: no

This variable configures whether IMAP folder browsing will look for only subscribed folders or all folders. This can be toggled in the IMAP browser with the <toggle-subscribed> function.

3.144. imap_login

Type: string
Default: (empty)

Your login name on the IMAP server.

This variable defaults to the value of $imap_user.

3.145. imap_oauth_refresh_command

Type: string
Default: (empty)

The command to run to generate an OAUTH refresh token for authorizing your connection to your IMAP server. This command will be run on every connection attempt that uses the OAUTHBEARER authentication mechanism. See “oauth†for details.

3.146. imap_pass

Type: string
Default: (empty)

Specifies the password for your IMAP account. If unset, Mutt will prompt you for your password when you invoke the <imap-fetch-mail> function or try to open an IMAP folder.

Warning: you should only use this option when you are on a fairly secure machine, because the superuser can read your muttrc even if you are the only one who can read the file.

3.147. imap_passive

Type: boolean
Default: yes

When set, mutt will not open new IMAP connections to check for new mail. Mutt will only check for new mail over existing IMAP connections. This is useful if you don't want to be prompted for user/password pairs on mutt invocation, or if opening the connection is slow.

3.148. imap_peek

Type: boolean
Default: yes

When set, mutt will avoid implicitly marking your mail as read whenever you fetch a message from the server. This is generally a good thing, but can make closing an IMAP folder somewhat slower. This option exists to appease speed freaks.

3.149. imap_pipeline_depth

Type: number
Default: 15

Controls the number of IMAP commands that may be queued up before they are sent to the server. A deeper pipeline reduces the amount of time mutt must wait for the server, and can make IMAP servers feel much more responsive. But not all servers correctly handle pipelined commands, so if you have problems you might want to try setting this variable to 0.

Note: Changes to this variable have no effect on open connections.

3.150. imap_poll_timeout

Type: number
Default: 15

This variable specifies the maximum amount of time in seconds that mutt will wait for a response when polling IMAP connections for new mail, before timing out and closing the connection. Set to 0 to disable timing out.

3.151. imap_qresync

Type: boolean
Default: no

When set, mutt will use the QRESYNC extension (RFC 7162) if advertised by the server. Mutt's current implementation is basic, used only for initial message fetching and flag updates.

Note: this feature is currently experimental. If you experience strange behavior, such as duplicate or missing messages please file a bug report to let us know.

3.152. imap_reconnect_sleep

Type: number
Default: 5

When mutt fails to reconnect to a lost IMAP server connection, it will sleep this many seconds before trying again.

3.153. imap_reconnect_tries

Type: number
Default: 3

When mutt loses its connection with the IMAP server, it will try to reconnect this many times before giving up and closing the connection.

3.154. imap_servernoise

Type: boolean
Default: yes

When set, mutt will display warning messages from the IMAP server as error messages. Since these messages are often harmless, or generated due to configuration problems on the server which are out of the users' hands, you may wish to suppress them at some point.

3.155. imap_user

Type: string
Default: (empty)

The name of the user whose mail you intend to access on the IMAP server.

This variable defaults to your user name on the local machine.

3.156. implicit_autoview

Type: boolean
Default: no

If set to “yesâ€, mutt will look for a mailcap entry with the “copiousoutput†flag set for every MIME attachment it doesn't have an internal viewer defined for. If such an entry is found, mutt will use the viewer defined in that entry to convert the body part to text form.

3.157. include

Type: quadoption
Default: ask-yes

Controls whether or not a copy of the message(s) you are replying to is included in your reply.

3.158. include_encrypted

Type: boolean
Default: no

Controls whether or not Mutt includes separately encrypted attachment contents when replying.

This variable was added to prevent accidental exposure of encrypted contents when replying to an attacker. If a previously encrypted message were attached by the attacker, they could trick an unwary recipient into decrypting and including the message in their reply.

3.159. include_onlyfirst

Type: boolean
Default: no

Controls whether or not Mutt includes only the first attachment of the message you are replying.

3.160. indent_string

Type: string
Default: “> â€

Specifies the string to prepend to each line of text quoted in a message to which you are replying. You are strongly encouraged not to change this value, as it tends to agitate the more fanatical netizens.

The value of this option is ignored if $text_flowed is set, because the quoting mechanism is strictly defined for format=flowed.

This option is a format string, please see the description of $index_format for supported printf(3)-style sequences.

3.161. index_format

Type: string
Default: “%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %sâ€

This variable allows you to customize the message index display to your personal taste.

“Format strings†are similar to the strings used in the C function printf(3) to format output (see the man page for more details). For an explanation of the %? construct, see the $status_format description. The following sequences are defined in Mutt:

%a address of the author
%A reply-to address (if present; otherwise: address of author)
%b filename of the original message folder (think mailbox)
%B the list to which the letter was sent, or else the folder name (%b).
%c number of characters (bytes) in the message (see formatstrings-size)
%C current message number
%d date and time of the message in the format specified by $date_format converted to sender's time zone
%D date and time of the message in the format specified by $date_format converted to the local time zone
%e current message number in thread
%E number of messages in current thread
%f sender (address + real name), either From: or Return-Path:
%F author name, or recipient name if the message is from you
%H spam attribute(s) of this message
%i message-id of the current message
%l number of lines in the unprocessed message (may not work with maildir, mh, and IMAP folders)
%L If an address in the “To:†or “Cc:†header field matches an address defined by the users “subscribe†command, this displays "To <list-name>", otherwise the same as %F.
%m total number of message in the mailbox
%M number of hidden messages if the thread is collapsed.
%N message score
%n author's real name (or address if missing)
%O original save folder where mutt would formerly have stashed the message: list name or recipient name if not sent to a list
%P progress indicator for the built-in pager (how much of the file has been displayed)
%r comma separated list of “To:†recipients
%R comma separated list of “Cc:†recipients
%s subject of the message
%S single character status of the message (“Nâ€/“Oâ€/“Dâ€/“dâ€/“!â€/“râ€/“*â€)
%t “To:†field (recipients)
%T the appropriate character from the $to_chars string
%u user (login) name of the author
%v first name of the author, or the recipient if the message is from you
%X number of attachments (please see the “attachments†section for possible speed effects)
%y “X-Label:†field, if present
%Y “X-Label:†field, if present, and (1) not at part of a thread tree, (2) at the top of a thread, or (3) “X-Label:†is different from preceding message's “X-Label:â€.
%Z a three character set of message status flags. the first character is new/read/replied flags (“nâ€/“oâ€/“râ€/“Oâ€/“Nâ€). the second is deleted or encryption flags (“Dâ€/“dâ€/“Sâ€/“Pâ€/“sâ€/“Kâ€). the third is either tagged/flagged (“*â€/“!â€), or one of the characters listed in $to_chars.
%@name@ insert and evaluate format-string from the matching “index-format-hook†command
%{fmt} the date and time of the message is converted to sender's time zone, and “fmt†is expanded by the library function strftime(3); a leading bang disables locales
%[fmt] the date and time of the message is converted to the local time zone, and “fmt†is expanded by the library function strftime(3); a leading bang disables locales
%(fmt) the local date and time when the message was received. “fmt†is expanded by the library function strftime(3); a leading bang disables locales
%<fmt> the current local time. “fmt†is expanded by the library function strftime(3); a leading bang disables locales.
%>X right justify the rest of the string and pad with character “Xâ€
%|X pad to the end of the line with character “Xâ€
%*X soft-fill with character “X†as pad

Note that for mbox/mmdf, “%l†applies to the unprocessed message, and for maildir/mh, the value comes from the “Lines:†header field when present (the meaning is normally the same). Thus the value depends on the encodings used in the different parts of the message and has little meaning in practice.

“Soft-fill†deserves some explanation: Normal right-justification will print everything to the left of the “%>â€, displaying padding and whatever lies to the right only if there's room. By contrast, soft-fill gives priority to the right-hand side, guaranteeing space to display it and showing padding only if there's still room. If necessary, soft-fill will eat text leftwards to make room for rightward text.

Note that these expandos are supported in “save-hookâ€, “fcc-hookâ€, “fcc-save-hookâ€, and “index-format-hookâ€.

They are also supported in the configuration variables $attribution, $forward_attribution_intro, $forward_attribution_trailer, $forward_format, $indent_string, $message_format, $pager_format, and $post_indent_string.

3.162. ispell

Type: path
Default: “ispellâ€

How to invoke ispell (GNU's spell-checking software).

3.163. keep_flagged

Type: boolean
Default: no

If set, read messages marked as flagged will not be moved from your spool mailbox to your $mbox mailbox, or as a result of a “mbox-hook†command.

3.164. local_date_header

Type: boolean
Default: yes

If set, the date in the Date header of emails that you send will be in your local timezone. If unset a UTC date will be used instead to avoid leaking information about your current location.

3.165. mail_check

Type: number
Default: 5

This variable configures how often (in seconds) mutt should look for new mail. Also see the $timeout variable.

3.166. mail_check_recent

Type: boolean
Default: yes

When set, Mutt will only notify you about new mail that has been received since the last time you opened the mailbox. When unset, Mutt will notify you if any new mail exists in the mailbox, regardless of whether you have visited it recently.

3.167. mail_check_stats

Type: boolean
Default: no

When set, mutt will periodically calculate message statistics of a mailbox while polling for new mail. It will check for unread, flagged, and total message counts. (Note: IMAP mailboxes only support unread and total counts).

Because this operation is more performance intensive, it defaults to unset, and has a separate option, $mail_check_stats_interval, to control how often to update these counts.

Message statistics can also be explicitly calculated by invoking the <check-stats> function.

3.168. mail_check_stats_interval

Type: number
Default: 60

When $mail_check_stats is set, this variable configures how often (in seconds) mutt will update message counts.

3.169. mailcap_path

Type: string
Default: (empty)

This variable specifies which files to consult when attempting to display MIME bodies not directly supported by Mutt. The default value is generated during startup: see the “mailcap†section of the manual.

3.170. mailcap_sanitize

Type: boolean
Default: yes

If set, mutt will restrict possible characters in mailcap % expandos to a well-defined set of safe characters. This is the safe setting, but we are not sure it doesn't break some more advanced MIME stuff.

DON'T CHANGE THIS SETTING UNLESS YOU ARE REALLY SURE WHAT YOU ARE DOING!

3.171. maildir_header_cache_verify

Type: boolean
Default: yes

Check for Maildir unaware programs other than mutt having modified maildir files when the header cache is in use. This incurs one stat(2) per message every time the folder is opened (which can be very slow for NFS folders).

3.172. maildir_trash

Type: boolean
Default: no

If set, messages marked as deleted will be saved with the maildir trashed flag instead of unlinked. Note: this only applies to maildir-style mailboxes. Setting it will have no effect on other mailbox types.

3.173. maildir_check_cur

Type: boolean
Default: no

If set, mutt will poll both the new and cur directories of a maildir folder for new messages. This might be useful if other programs interacting with the folder (e.g. dovecot) are moving new messages to the cur directory. Note that setting this option may slow down polling for new messages in large folders, since mutt has to scan all cur messages.

3.174. mark_macro_prefix

Type: string
Default: “'â€

Prefix for macros created using mark-message. A new macro automatically generated with <mark-message>a will be composed from this prefix and the letter a.

3.175. mark_old

Type: boolean
Default: yes

Controls whether or not mutt marks new unread messages as old if you exit a mailbox without reading them. With this option set, the next time you start mutt, the messages will show up with an “O†next to them in the index menu, indicating that they are old.

3.176. markers

Type: boolean
Default: yes

Controls the display of wrapped lines in the internal pager. If set, a “+†marker is displayed at the beginning of wrapped lines.

Also see the $smart_wrap variable.

3.177. mask

Type: regular expression
Default: “!^\\.[^.]â€

A regular expression used in the file browser, optionally preceded by the not operator “!â€. Only files whose names match this mask will be shown. The match is always case-sensitive.

3.178. mbox

Type: path
Default: “~/mboxâ€

This specifies the folder into which read mail in your $spoolfile folder will be appended.

Also see the $move variable.

3.179. mbox_type

Type: folder magic
Default: mbox

The default mailbox type used when creating new folders. May be any of “mboxâ€, “MMDFâ€, “MH†and “Maildirâ€. This is overridden by the -m command-line option.

3.180. menu_context

Type: number
Default: 0

This variable controls the number of lines of context that are given when scrolling through menus. (Similar to $pager_context.)

3.181. menu_move_off

Type: boolean
Default: yes

When unset, the bottom entry of menus will never scroll up past the bottom of the screen, unless there are less entries than lines. When set, the bottom entry may move off the bottom.

3.182. menu_scroll

Type: boolean
Default: no

When set, menus will be scrolled up or down one line when you attempt to move across a screen boundary. If unset, the screen is cleared and the next or previous page of the menu is displayed (useful for slow links to avoid many redraws).

3.183. message_cache_clean

Type: boolean
Default: no

If set, mutt will clean out obsolete entries from the message cache when the mailbox is synchronized. You probably only want to set it every once in a while, since it can be a little slow (especially for large folders).

3.184. message_cachedir

Type: path
Default: (empty)

Set this to a directory and mutt will cache copies of messages from your IMAP and POP servers here. You are free to remove entries at any time.

When setting this variable to a directory, mutt needs to fetch every remote message only once and can perform regular expression searches as fast as for local folders.

Also see the $message_cache_clean variable.

3.185. message_format

Type: string
Default: “%sâ€

This is the string displayed in the “attachment†menu for attachments of type message/rfc822. For a full listing of defined printf(3)-like sequences see the section on $index_format.

3.186. message_id_format

Type: string
Default: “<%z@%f>â€

This variable describes the format of the Message-ID generated when sending messages. Mutt 2.0 introduced a more compact format, but this variable allows the ability to choose your own format. The value may end in “|†to invoke an external filter. See formatstrings-filters.

Please note that the Message-ID value follows a strict syntax, and you are responsible for ensuring correctness if you change this from the default. In particular, the value must follow the syntax in RFC 5322: “"<" id-left "@" id-right ">"â€. No spaces are allowed, and id-left should follow the dot-atom-text syntax in the RFC. The id-right should generally be left at %f.

The old Message-ID format can be used by setting this to: “<%Y%02m%02d%02H%02M%02S.G%c%p@%f>â€

The following printf(3)-style sequences are understood:

%c step counter looping from “A†to “Zâ€
%d current day of the month (GMT)
%f $hostname
%H current hour using a 24-hour clock (GMT)
%m current month number (GMT)
%M current minute of the hour (GMT)
%p pid of the running mutt process
%r 3 bytes of pseudorandom data encoded in Base64
%S current second of the minute (GMT)
%x 1 byte of pseudorandom data hex encoded (example: '1b')
%Y current year using 4 digits (GMT)
%z 4 byte timestamp + 8 bytes of pseudorandom data encoded in Base64

3.187. meta_key

Type: boolean
Default: no

If set, forces Mutt to interpret keystrokes with the high bit (bit 8) set as if the user had pressed the Esc key and whatever key remains after having the high bit removed. For example, if the key pressed has an ASCII value of 0xf8, then this is treated as if the user had pressed Esc then “xâ€. This is because the result of removing the high bit from 0xf8 is 0x78, which is the ASCII character “xâ€.

3.188. metoo

Type: boolean
Default: no

If unset, Mutt will remove your address (see the “alternates†command) from the list of recipients when replying to a message.

3.189. mh_purge

Type: boolean
Default: no

When unset, mutt will mimic mh's behavior and rename deleted messages to ,<old file name> in mh folders instead of really deleting them. This leaves the message on disk but makes programs reading the folder ignore it. If the variable is set, the message files will simply be deleted.

This option is similar to $maildir_trash for Maildir folders.

3.190. mh_seq_flagged

Type: string
Default: “flaggedâ€

The name of the MH sequence used for flagged messages.

3.191. mh_seq_replied

Type: string
Default: “repliedâ€

The name of the MH sequence used to tag replied messages.

3.192. mh_seq_unseen

Type: string
Default: “unseenâ€

The name of the MH sequence used for unseen messages.

3.193. mime_forward

Type: quadoption
Default: no

When set, the message you are forwarding will be attached as a separate message/rfc822 MIME part instead of included in the main body of the message. This is useful for forwarding MIME messages so the receiver can properly view the message as it was delivered to you. If you like to switch between MIME and not MIME from mail to mail, set this variable to “ask-no†or “ask-yesâ€.

Also see $forward_decode and $mime_forward_decode.

3.194. mime_forward_decode

Type: boolean
Default: no

Controls the decoding of complex MIME messages into text/plain when forwarding a message while $mime_forward is set. Otherwise $forward_decode is used instead.

3.195. mime_forward_rest

Type: quadoption
Default: yes

When forwarding multiple attachments of a MIME message from the attachment menu, attachments which cannot be decoded in a reasonable manner will be attached to the newly composed message if this option is set.

3.196. mime_type_query_command

Type: string
Default: (empty)

This specifies a command to run, to determine the mime type of a new attachment when composing a message. Unless $mime_type_query_first is set, this will only be run if the attachment's extension is not found in the mime.types file.

The string may contain a “%sâ€, which will be substituted with the attachment filename. Mutt will add quotes around the string substituted for “%s†automatically according to shell quoting rules, so you should avoid adding your own. If no “%s†is found in the string, Mutt will append the attachment filename to the end of the string.

The command should output a single line containing the attachment's mime type.

Suggested values are “xdg-mime query filetype†or “file -biâ€.

3.197. mime_type_query_first

Type: boolean
Default: no

When set, the $mime_type_query_command will be run before the mime.types lookup.

3.198. mix_entry_format

Type: string
Default: “%4n %c %-16s %aâ€

This variable describes the format of a remailer line on the mixmaster chain selection screen. The following printf(3)-like sequences are supported:

%n The running number on the menu.
%c Remailer capabilities.
%s The remailer's short name.
%a The remailer's e-mail address.

(Mixmaster only)

3.199. mixmaster

Type: path
Default: “mixmasterâ€

This variable contains the path to the Mixmaster binary on your system. It is used with various sets of parameters to gather the list of known remailers, and to finally send a message through the mixmaster chain. (Mixmaster only)

3.200. move

Type: quadoption
Default: no

Controls whether or not Mutt will move read messages from your spool mailbox to your $mbox mailbox, or as a result of a “mbox-hook†command.

3.201. muttlisp_inline_eval

Type: boolean
Default: no

If set, Mutt will evaluate bare parenthesis arguments to commands as MuttLisp expressions.

3.202. narrow_tree

Type: boolean
Default: no

This variable, when set, makes the thread tree narrower, allowing deeper threads to fit on the screen.

3.203. net_inc

Type: number
Default: 10

Operations that expect to transfer a large amount of data over the network will update their progress every $net_inc kilobytes. If set to 0, no progress messages will be displayed.

See also $read_inc, $write_inc and $net_inc.

3.204. new_mail_command

Type: path
Default: (empty)

If set, Mutt will call this command after a new message is received. See the $status_format documentation for the values that can be formatted into this command.

3.205. pager

Type: path
Default: “builtinâ€

This variable specifies which pager you would like to use to view messages. The value “builtin†means to use the built-in pager, otherwise this variable should specify the pathname of the external pager you would like to use.

The string may contain a “%sâ€, which will be substituted with the generated message filename. Mutt will add quotes around the string substituted for “%s†automatically according to shell quoting rules, so you should avoid adding your own. If no “%s†is found in the string, Mutt will append the message filename to the end of the string.

Using an external pager may have some disadvantages: Additional keystrokes are necessary because you can't call mutt functions directly from the pager, and screen resizes cause lines longer than the screen width to be badly formatted in the help menu.

When using an external pager, also see $prompt_after which defaults set.

3.206. pager_context

Type: number
Default: 0

This variable controls the number of lines of context that are given when displaying the next or previous page in the internal pager. By default, Mutt will display the line after the last one on the screen at the top of the next page (0 lines of context).

This variable also specifies the amount of context given for search results. If positive, this many lines will be given before a match, if 0, the match will be top-aligned.

3.207. pager_format

Type: string
Default: “-%Z- %C/%m: %-20.20n   %s%*  -- (%P)â€

This variable controls the format of the one-line message “status†displayed before each message in either the internal or an external pager. The valid sequences are listed in the $index_format section.

3.208. pager_index_lines

Type: number
Default: 0

Determines the number of lines of a mini-index which is shown when in the pager. The current message, unless near the top or bottom of the folder, will be roughly one third of the way down this mini-index, giving the reader the context of a few messages before and after the message. This is useful, for example, to determine how many messages remain to be read in the current thread. One of the lines is reserved for the status bar from the index, so a setting of 6 will only show 5 lines of the actual index. A value of 0 results in no index being shown. If the number of messages in the current folder is less than $pager_index_lines, then the index will only use as many lines as it needs.

3.209. pager_skip_quoted_context

Type: number
Default: 0

Determines the number of lines of context to show before the unquoted text when using <skip-quoted>. When set to a positive number at most that many lines of the previous quote are displayed. If the previous quote is shorter the whole quote is displayed.

3.210. pager_stop

Type: boolean
Default: no

When set, the internal-pager will not move to the next message when you are at the end of a message and invoke the <next-page> function.

3.211. pattern_format

Type: string
Default: “%2n %-15e  %dâ€

This variable describes the format of the “pattern completion†menu. The following printf(3)-style sequences are understood:

%d pattern description
%e pattern expression
%n index number

3.212. pgp_auto_decode

Type: boolean
Default: no

If set, mutt will automatically attempt to decrypt traditional PGP messages whenever the user performs an operation which ordinarily would result in the contents of the message being operated on. For example, if the user displays a pgp-traditional message which has not been manually checked with the <check-traditional-pgp> function, mutt will automatically check the message for traditional pgp.

3.213. pgp_autoinline

Type: boolean
Default: no

This option controls whether Mutt generates old-style inline (traditional) PGP encrypted or signed messages under certain circumstances. This can be overridden by use of the pgp menu, when inline is not required. The GPGME backend does not support this option.

Note that Mutt might automatically use PGP/MIME for messages which consist of more than a single MIME part. Mutt can be configured to ask before sending PGP/MIME messages when inline (traditional) would not work.

Also see the $pgp_mime_auto variable.

Also note that using the old-style PGP message format is strongly deprecated. (PGP only)

3.214. pgp_check_exit

Type: boolean
Default: yes

If set, mutt will check the exit code of the PGP subprocess when signing or encrypting. A non-zero exit code means that the subprocess failed. (PGP only)

3.215. pgp_check_gpg_decrypt_status_fd

Type: boolean
Default: yes

If set, mutt will check the status file descriptor output of $pgp_decrypt_command and $pgp_decode_command for GnuPG status codes indicating successful decryption. This will check for the presence of DECRYPTION_OKAY, absence of DECRYPTION_FAILED, and that all PLAINTEXT occurs between the BEGIN_DECRYPTION and END_DECRYPTION status codes.

If unset, mutt will instead match the status fd output against $pgp_decryption_okay. (PGP only)

3.216. pgp_clearsign_command

Type: string
Default: (empty)

This format is used to create an old-style “clearsigned†PGP message. Note that the use of this format is strongly deprecated.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.217. pgp_decode_command

Type: string
Default: (empty)

This format strings specifies a command which is used to decode application/pgp attachments.

The PGP command formats have their own set of printf(3)-like sequences:

%p Expands to PGPPASSFD=0 when a pass phrase is needed, to an empty string otherwise. Note: This may be used with a %? construct.
%f Expands to the name of a file containing a message.
%s Expands to the name of a file containing the signature part of a multipart/signed attachment when verifying it.
%a The value of $pgp_sign_as if set, otherwise the value of $pgp_default_key.
%r One or more key IDs (or fingerprints if available).

For examples on how to configure these formats for the various versions of PGP which are floating around, see the pgp and gpg sample configuration files in the samples/ subdirectory which has been installed on your system alongside the documentation. (PGP only)

3.218. pgp_decrypt_command

Type: string
Default: (empty)

This command is used to decrypt a PGP encrypted message.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.219. pgp_decryption_okay

Type: regular expression
Default: (empty)

If you assign text to this variable, then an encrypted PGP message is only considered successfully decrypted if the output from $pgp_decrypt_command contains the text. This is used to protect against a spoofed encrypted message, with multipart/encrypted headers but containing a block that is not actually encrypted. (e.g. simply signed and ascii armored text).

Note that if $pgp_check_gpg_decrypt_status_fd is set, this variable is ignored. (PGP only)

3.220. pgp_default_key

Type: string
Default: (empty)

This is the default key-pair to use for PGP operations. It will be used for encryption (see $postpone_encrypt and $pgp_self_encrypt).

It will also be used for signing unless $pgp_sign_as is set.

The (now deprecated) pgp_self_encrypt_as is an alias for this variable, and should no longer be used. (PGP only)

3.221. pgp_encrypt_only_command

Type: string
Default: (empty)

This command is used to encrypt a body part without signing it.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.222. pgp_encrypt_sign_command

Type: string
Default: (empty)

This command is used to both sign and encrypt a body part.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.223. pgp_entry_format

Type: string
Default: “%4n %t%f %4l/0x%k %-4a %2c %uâ€

This variable allows you to customize the PGP key selection menu to your personal taste. This string is similar to $index_format, but has its own set of printf(3)-like sequences:

%n number
%k key id
%u user id
%a algorithm
%l key length
%f flags
%c capabilities
%t trust/validity of the key-uid association
%[<s>] date of the key where <s> is an strftime(3) expression

(PGP only)

3.224. pgp_export_command

Type: string
Default: (empty)

This command is used to export a public key from the user's key ring.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.225. pgp_getkeys_command

Type: string
Default: (empty)

This command is invoked whenever Mutt needs to fetch the public key associated with an email address. Of the sequences supported by $pgp_decode_command, %r is the only printf(3)-like sequence used with this format. Note that in this case, %r expands to the email address, not the public key ID (the key ID is unknown, which is why Mutt is invoking this command). (PGP only)

3.226. pgp_good_sign

Type: regular expression
Default: (empty)

If you assign a text to this variable, then a PGP signature is only considered verified if the output from $pgp_verify_command contains the text. Use this variable if the exit code from the command is 0 even for bad signatures. (PGP only)

3.227. pgp_ignore_subkeys

Type: boolean
Default: yes

Setting this variable will cause Mutt to ignore OpenPGP subkeys. Instead, the principal key will inherit the subkeys' capabilities. Unset this if you want to play interesting key selection games. (PGP only)

3.228. pgp_import_command

Type: string
Default: (empty)

This command is used to import a key from a message into the user's public key ring.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.229. pgp_list_pubring_command

Type: string
Default: (empty)

This command is used to list the public key ring's contents. The output format must be analogous to the one used by

gpg --list-keys --with-colons --with-fingerprint

This format is also generated by the mutt_pgpring utility which comes with mutt.

Note: gpg's fixed-list-mode option should not be used. It produces a different date format which may result in mutt showing incorrect key generation dates.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. Note that in this case, %r expands to the search string, which is a list of one or more quoted values such as email address, name, or keyid. (PGP only)

3.230. pgp_list_secring_command

Type: string
Default: (empty)

This command is used to list the secret key ring's contents. The output format must be analogous to the one used by:

gpg --list-keys --with-colons --with-fingerprint

This format is also generated by the mutt_pgpring utility which comes with mutt.

Note: gpg's fixed-list-mode option should not be used. It produces a different date format which may result in mutt showing incorrect key generation dates.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. Note that in this case, %r expands to the search string, which is a list of one or more quoted values such as email address, name, or keyid. (PGP only)

3.231. pgp_long_ids

Type: boolean
Default: yes

If set, use 64 bit PGP key IDs, if unset use the normal 32 bit key IDs. NOTE: Internally, Mutt has transitioned to using fingerprints (or long key IDs as a fallback). This option now only controls the display of key IDs in the key selection menu and a few other places. (PGP only)

3.232. pgp_mime_auto

Type: quadoption
Default: ask-yes

This option controls whether Mutt will prompt you for automatically sending a (signed/encrypted) message using PGP/MIME when inline (traditional) fails (for any reason).

Also note that using the old-style PGP message format is strongly deprecated. (PGP only)

3.233. pgp_replyinline

Type: boolean
Default: no

Setting this variable will cause Mutt to always attempt to create an inline (traditional) message when replying to a message which is PGP encrypted/signed inline. This can be overridden by use of the pgp menu, when inline is not required. This option does not automatically detect if the (replied-to) message is inline; instead it relies on Mutt internals for previously checked/flagged messages.

Note that Mutt might automatically use PGP/MIME for messages which consist of more than a single MIME part. Mutt can be configured to ask before sending PGP/MIME messages when inline (traditional) would not work.

Also see the $pgp_mime_auto variable.

Also note that using the old-style PGP message format is strongly deprecated. (PGP only)

3.234. pgp_retainable_sigs

Type: boolean
Default: no

If set, signed and encrypted messages will consist of nested multipart/signed and multipart/encrypted body parts.

This is useful for applications like encrypted and signed mailing lists, where the outer layer (multipart/encrypted) can be easily removed, while the inner multipart/signed part is retained. (PGP only)

3.235. pgp_self_encrypt

Type: boolean
Default: yes

When set, PGP encrypted messages will also be encrypted using the key in $pgp_default_key. (PGP only)

3.236. pgp_show_unusable

Type: boolean
Default: yes

If set, mutt will display non-usable keys on the PGP key selection menu. This includes keys which have been revoked, have expired, or have been marked as “disabled†by the user. (PGP only)

3.237. pgp_sign_as

Type: string
Default: (empty)

If you have a different key pair to use for signing, you should set this to the signing key. Most people will only need to set $pgp_default_key. It is recommended that you use the keyid form to specify your key (e.g. 0x00112233). (PGP only)

3.238. pgp_sign_command

Type: string
Default: (empty)

This command is used to create the detached PGP signature for a multipart/signed PGP/MIME body part.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.239. pgp_sort_keys

Type: sort order
Default: address

Specifies how the entries in the pgp menu are sorted. The following are legal values:

address sort alphabetically by user id
keyid sort alphabetically by key id
date sort by key creation date
trust sort by the trust of the key

If you prefer reverse order of the above values, prefix it with “reverse-â€. (PGP only)

3.240. pgp_strict_enc

Type: boolean
Default: yes

If set, Mutt will automatically encode PGP/MIME signed messages as quoted-printable. Please note that unsetting this variable may lead to problems with non-verifyable PGP signatures, so only change this if you know what you are doing. (PGP only)

3.241. pgp_timeout

Type: number (long)
Default: 300

The number of seconds after which a cached passphrase will expire if not used. (PGP only)

3.242. pgp_use_gpg_agent

Type: boolean
Default: yes

If set, mutt expects a gpg-agent(1) process will handle private key passphrase prompts. If unset, mutt will prompt for the passphrase and pass it via stdin to the pgp command.

Note that as of version 2.1, GnuPG automatically spawns an agent and requires the agent be used for passphrase management. Since that version is increasingly prevalent, this variable now defaults set.

Mutt works with a GUI or curses pinentry program. A TTY pinentry should not be used.

If you are using an older version of GnuPG without an agent running, or another encryption program without an agent, you will need to unset this variable. (PGP only)

3.243. pgp_verify_command

Type: string
Default: (empty)

This command is used to verify PGP signatures.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.244. pgp_verify_key_command

Type: string
Default: (empty)

This command is used to verify key information from the key selection menu.

This is a format string, see the $pgp_decode_command command for possible printf(3)-like sequences. (PGP only)

3.245. pipe_decode

Type: boolean
Default: no

Used in connection with the <pipe-message> function. When unset, Mutt will pipe the messages without any preprocessing. When set, Mutt will attempt to decode the messages first.

Also see $pipe_decode_weed, which controls whether headers will be weeded when this is set.

3.246. pipe_decode_weed

Type: boolean
Default: yes

For <pipe-message>, when $pipe_decode is set, this further controls whether Mutt will weed headers.

3.247. pipe_sep

Type: string
Default: “\nâ€

The separator to add between messages when piping a list of tagged messages to an external Unix command.

3.248. pipe_split

Type: boolean
Default: no

Used in connection with the <pipe-message> function following <tag-prefix>. If this variable is unset, when piping a list of tagged messages Mutt will concatenate the messages and will pipe them all concatenated. When set, Mutt will pipe the messages one by one. In both cases the messages are piped in the current sorted order, and the $pipe_sep separator is added after each message.

3.249. pop_auth_try_all

Type: boolean
Default: yes

If set, Mutt will try all available authentication methods. When unset, Mutt will only fall back to other authentication methods if the previous methods are unavailable. If a method is available but authentication fails, Mutt will not connect to the POP server.

3.250. pop_authenticators

Type: string
Default: (empty)

This is a colon-delimited list of authentication methods mutt may attempt to use to log in to an POP server, in the order mutt should try them. Authentication methods are either “userâ€, “apop†or any SASL mechanism, e.g. “digest-md5â€, “gssapi†or “cram-md5â€. This option is case-insensitive. If this option is unset (the default) mutt will try all available methods, in order from most-secure to least-secure.

Example:

set pop_authenticators="digest-md5:apop:user"

3.251. pop_checkinterval

Type: number
Default: 60

This variable configures how often (in seconds) mutt should look for new mail in the currently selected mailbox if it is a POP mailbox.

3.252. pop_delete

Type: quadoption
Default: ask-no

If set, Mutt will delete successfully downloaded messages from the POP server when using the <fetch-mail> function. When unset, Mutt will download messages but also leave them on the POP server.

3.253. pop_host

Type: string
Default: (empty)

The name of your POP server for the <fetch-mail> function. You can also specify an alternative port, username and password, i.e.:

[pop[s]://][username[:password]@]popserver[:port]

where “[...]†denotes an optional part.

3.254. pop_last

Type: boolean
Default: no

If this variable is set, mutt will try to use the “LAST†POP command for retrieving only unread messages from the POP server when using the <fetch-mail> function.

3.255. pop_oauth_refresh_command

Type: string
Default: (empty)

The command to run to generate an OAUTH refresh token for authorizing your connection to your POP server. This command will be run on every connection attempt that uses the OAUTHBEARER authentication mechanism. See “oauth†for details.

3.256. pop_pass

Type: string
Default: (empty)

Specifies the password for your POP account. If unset, Mutt will prompt you for your password when you open a POP mailbox.

Warning: you should only use this option when you are on a fairly secure machine, because the superuser can read your muttrc even if you are the only one who can read the file.

3.257. pop_reconnect

Type: quadoption
Default: ask-yes

Controls whether or not Mutt will try to reconnect to the POP server if the connection is lost.

3.258. pop_user

Type: string
Default: (empty)

Your login name on the POP server.

This variable defaults to your user name on the local machine.

3.259. post_indent_string

Type: string
Default: (empty)

Similar to the $attribution variable, Mutt will append this string after the inclusion of a message which is being replied to. For a full listing of defined printf(3)-like sequences see the section on $index_format.

3.260. postpone

Type: quadoption
Default: ask-yes

Controls whether or not messages are saved in the $postponed mailbox when you elect not to send immediately.

Also see the $recall variable.

3.261. postponed

Type: path
Default: “~/postponedâ€

Mutt allows you to indefinitely “postpone sending a message†which you are editing. When you choose to postpone a message, Mutt saves it in the mailbox specified by this variable.

Also see the $postpone variable.

3.262. postpone_encrypt

Type: boolean
Default: no

When set, postponed messages that are marked for encryption will be self-encrypted. Mutt will first try to encrypt using the value specified in $pgp_default_key or $smime_default_key. If those are not set, it will try the deprecated $postpone_encrypt_as. (Crypto only)

3.263. postpone_encrypt_as

Type: string
Default: (empty)

This is a deprecated fall-back variable for $postpone_encrypt. Please use $pgp_default_key or $smime_default_key. (Crypto only)

3.264. preconnect

Type: string
Default: (empty)

If set, a shell command to be executed if mutt fails to establish a connection to the server. This is useful for setting up secure connections, e.g. with ssh(1). If the command returns a nonzero status, mutt gives up opening the server. Example:

set preconnect="ssh -f -q -L 1234:mailhost.net:143 mailhost.net \
sleep 20 < /dev/null > /dev/null"

Mailbox “foo†on “mailhost.net†can now be reached as “{localhost:1234}fooâ€.

Note: For this example to work, you must be able to log in to the remote machine without having to enter a password.

3.265. print

Type: quadoption
Default: ask-no

Controls whether or not Mutt really prints messages. This is set to “ask-no†by default, because some people accidentally hit “p†often.

3.266. print_command

Type: path
Default: “lprâ€

This specifies the command pipe that should be used to print messages.

3.267. print_decode

Type: boolean
Default: yes

Used in connection with the <print-message> function. If this option is set, the message is decoded before it is passed to the external command specified by $print_command. If this option is unset, no processing will be applied to the message when printing it. The latter setting may be useful if you are using some advanced printer filter which is able to properly format e-mail messages for printing.

Also see $print_decode_weed, which controls whether headers will be weeded when this is set.

3.268. print_decode_weed

Type: boolean
Default: yes

For <print-message>, when $print_decode is set, this further controls whether Mutt will weed headers.

3.269. print_split

Type: boolean
Default: no

Used in connection with the <print-message> function. If this option is set, the command specified by $print_command is executed once for each message which is to be printed. If this option is unset, the command specified by $print_command is executed only once, and all the messages are concatenated, with a form feed as the message separator.

Those who use the enscript(1) program's mail-printing mode will most likely want to set this option.

3.270. prompt_after

Type: boolean
Default: yes

If you use an external $pager, setting this variable will cause Mutt to prompt you for a command when the pager exits rather than returning to the index menu. If unset, Mutt will return to the index menu when the external pager exits.

3.271. query_command

Type: path
Default: (empty)

This specifies the command Mutt will use to make external address queries. The string may contain a “%sâ€, which will be substituted with the query string the user types. Mutt will add quotes around the string substituted for “%s†automatically according to shell quoting rules, so you should avoid adding your own. If no “%s†is found in the string, Mutt will append the user's query to the end of the string. See “query†for more information.

3.272. query_format

Type: string
Default: “%4c %t %-25.25a %-25.25n %?e?(%e)?â€

This variable describes the format of the “query†menu. The following printf(3)-style sequences are understood:

%a destination address
%c current entry number
%e extra information *
%n destination name
%t “*†if current entry is tagged, a space otherwise
%>X right justify the rest of the string and pad with “Xâ€
%|X pad to the end of the line with “Xâ€
%*X soft-fill with character “X†as pad

For an explanation of “soft-fillâ€, see the $index_format documentation.

* = can be optionally printed if nonzero, see the $status_format documentation.

3.273. quit

Type: quadoption
Default: yes

This variable controls whether “quit†and “exit†actually quit from mutt. If this option is set, they do quit, if it is unset, they have no effect, and if it is set to ask-yes or ask-no, you are prompted for confirmation when you try to quit.

3.274. quote_regexp

Type: regular expression
Default: “^([ \t]*[|>:}#])+â€

A regular expression used in the internal pager to determine quoted sections of text in the body of a message. Quoted text may be filtered out using the <toggle-quoted> command, or colored according to the “color quoted†family of directives.

Higher levels of quoting may be colored differently (“color quoted1â€, “color quoted2â€, etc.). The quoting level is determined by removing the last character from the matched text and recursively reapplying the regular expression until it fails to produce a match.

Match detection may be overridden by the $smileys regular expression.

3.275. read_inc

Type: number
Default: 10

If set to a value greater than 0, Mutt will display which message it is currently on when reading a mailbox or when performing search actions such as search and limit. The message is printed after this many messages have been read or searched (e.g., if set to 25, Mutt will print a message when it is at message 25, and then again when it gets to message 50). This variable is meant to indicate progress when reading or searching large mailboxes which may take some time. When set to 0, only a single message will appear before the reading the mailbox.

Also see the $write_inc, $net_inc and $time_inc variables and the “tuning†section of the manual for performance considerations.

3.276. read_only

Type: boolean
Default: no

If set, all folders are opened in read-only mode.

3.277. realname

Type: string
Default: (empty)

This variable specifies what “real†or “personal†name should be used when sending messages.

By default, this is the GECOS field from /etc/passwd. Note that this variable will not be used when the user has set a real name in the $from variable.

3.278. recall

Type: quadoption
Default: ask-yes

Controls whether or not Mutt recalls postponed messages when composing a new message.

Setting this variable to yes is not generally useful, and thus not recommended. Note that the <recall-message> function can be used to manually recall postponed messages.

Also see $postponed variable.

3.279. record

Type: path
Default: “~/sentâ€

This specifies the file into which your outgoing messages should be appended. (This is meant as the primary method for saving a copy of your messages, but another way to do this is using the “my_hdr†command to create a “Bcc:†field with your email address in it.)

The value of $record is overridden by the $force_name and $save_name variables, and the “fcc-hook†command. Also see $copy and $write_bcc.

Multiple mailboxes may be specified if $fcc_delimiter is set to a string delimiter.

3.280. reflow_space_quotes

Type: boolean
Default: yes

This option controls how quotes from format=flowed messages are displayed in the pager and when replying (with $text_flowed unset). When set, this option adds spaces after each level of quote marks, turning ">>>foo" into "> > > foo".

Note: If $reflow_text is unset, this option has no effect. Also, this option does not affect replies when $text_flowed is set.

3.281. reflow_text

Type: boolean
Default: yes

When set, Mutt will reformat paragraphs in text/plain parts marked format=flowed. If unset, Mutt will display paragraphs unaltered from how they appear in the message body. See RFC3676 for details on the format=flowed format.

Also see $reflow_wrap, and $wrap.

3.282. reflow_wrap

Type: number
Default: 78

This variable controls the maximum paragraph width when reformatting text/plain parts when $reflow_text is set. When the value is 0, paragraphs will be wrapped at the terminal's right margin. A positive value sets the paragraph width relative to the left margin. A negative value set the paragraph width relative to the right margin.

Also see $wrap.

3.283. reply_regexp

Type: regular expression (localized)
Default: “^(re)(\\[[0-9]+\\])*:[ \t]*â€

A regular expression used to recognize reply messages when threading and replying. The default value corresponds to the standard Latin "Re:" prefix.

This value may have been localized by the translator for your locale, adding other prefixes that are common in the locale. You can add your own prefixes by appending inside "^(re)". For example: "^(re|se)" or "^(re|aw|se)".

The second parenthesized expression matches zero or more bracketed numbers following the prefix, such as "Re[1]: ". The initial "\\[" means a literal left-bracket character. Note the backslash must be doubled when used inside a double quoted string in the muttrc. "[0-9]+" means one or more numbers. "\\]" means a literal right-bracket. Finally the whole parenthesized expression has a "*" suffix, meaning it can occur zero or more times.

The last part matches a colon followed by an optional space or tab. Note "\t" is converted to a literal tab inside a double quoted string. If you use a single quoted string, you would have to type an actual tab character, and would need to convert the double-backslashes to single backslashes.

Note: the result of this regexp match against the subject is stored in the header cache. Mutt isn't smart enough to invalidate a header cache entry based on changing $reply_regexp, so if you aren't seeing correct values in the index, try temporarily turning off the header cache. If that fixes the problem, then once the variable is set to your liking, remove your stale header cache files and turn the header cache back on.

3.284. reply_self

Type: boolean
Default: no

If unset and you are replying to a message sent by you, Mutt will assume that you want to reply to the recipients of that message rather than to yourself.

Also see the “alternates†command.

3.285. reply_to

Type: quadoption
Default: ask-yes

If set, when replying to a message, Mutt will use the address listed in the Reply-to: header as the recipient of the reply. If unset, it will use the address in the From: header field instead. This option is useful for reading a mailing list that sets the Reply-To: header field to the list address and you want to send a private message to the author of a message.

3.286. resolve

Type: boolean
Default: yes

When set, the cursor will be automatically advanced to the next (possibly undeleted) message whenever a command that modifies the current message is executed.

3.287. resume_draft_files

Type: boolean
Default: no

If set, draft files (specified by -H on the command line) are processed similarly to when resuming a postponed message. Recipients are not prompted for; send-hooks are not evaluated; no alias expansion takes place; user-defined headers and signatures are not added to the message.

3.288. resume_edited_draft_files

Type: boolean
Default: yes

If set, draft files previously edited (via -E -H on the command line) will have $resume_draft_files automatically set when they are used as a draft file again.

The first time a draft file is saved, mutt will add a header, X-Mutt-Resume-Draft to the saved file. The next time the draft file is read in, if mutt sees the header, it will set $resume_draft_files.

This option is designed to prevent multiple signatures, user-defined headers, and other processing effects from being made multiple times to the draft file.

3.289. reverse_alias

Type: boolean
Default: no

This variable controls whether or not Mutt will display the “personal†name from your aliases in the index menu if it finds an alias that matches the message's sender. For example, if you have the following alias:

alias juser abd30425@somewhere.net (Joe User)

and then you receive mail which contains the following header:

From: abd30425@somewhere.net

It would be displayed in the index menu as “Joe User†instead of “abd30425@somewhere.net.†This is useful when the person's e-mail address is not human friendly.

3.290. reverse_name

Type: boolean
Default: no

It may sometimes arrive that you receive mail to a certain machine, move the messages to another machine, and reply to some the messages from there. If this variable is set, the default From: line of the reply messages is built using the address where you received the messages you are replying to if that address matches your “alternatesâ€. If the variable is unset, or the address that would be used doesn't match your “alternatesâ€, the From: line will use your address on the current machine.

Also see the “alternates†command and $reverse_realname.

3.291. reverse_realname

Type: boolean
Default: yes

This variable fine-tunes the behavior of the $reverse_name feature.

When it is unset, Mutt will remove the real name part of a matching address. This allows the use of the email address without having to also use what the sender put in the real name field.

When it is set, Mutt will use the matching address as-is.

In either case, a missing real name will be filled in afterwards using the value of $realname.

3.292. rfc2047_parameters

Type: boolean
Default: yes

When this variable is set, Mutt will decode RFC2047-encoded MIME parameters. You want to set this variable when mutt suggests you to save attachments to files named like:

=?iso-8859-1?Q?file=5F=E4=5F991116=2Ezip?=

When this variable is set interactively, the change won't be active until you change folders.

Note that this use of RFC2047's encoding is explicitly prohibited by the standard, but nevertheless encountered in the wild.

Also note that setting this parameter will not have the effect that mutt generates this kind of encoding. Instead, mutt will unconditionally use the encoding specified in RFC2231.

3.293. save_address

Type: boolean
Default: no

If set, mutt will take the sender's full address when choosing a default folder for saving a mail. If $save_name or $force_name is set too, the selection of the Fcc folder will be changed as well.

3.294. save_empty

Type: boolean
Default: yes

When unset, mailboxes which contain no saved messages will be removed when closed (the exception is $spoolfile which is never removed). If set, mailboxes are never removed.

Note: This only applies to mbox and MMDF folders, Mutt does not delete MH and Maildir directories.

3.295. save_history

Type: number
Default: 0

This variable controls the size of the history (per category) saved in the $history_file file.

3.296. save_name

Type: boolean
Default: no

This variable controls how copies of outgoing messages are saved. When set, a check is made to see if a mailbox specified by the recipient address exists (this is done by searching for a mailbox in the $folder directory with the username part of the recipient address). If the mailbox exists, the outgoing message will be saved to that mailbox, otherwise the message is saved to the $record mailbox.

Also see the $force_name variable.

3.297. score

Type: boolean
Default: yes

When this variable is unset, scoring is turned off. This can be useful to selectively disable scoring for certain folders when the $score_threshold_delete variable and related are used.

3.298. score_threshold_delete

Type: number
Default: -1

Messages which have been assigned a score equal to or lower than the value of this variable are automatically marked for deletion by mutt. Since mutt scores are always greater than or equal to zero, the default setting of this variable will never mark a message for deletion.

3.299. score_threshold_flag

Type: number
Default: 9999

Messages which have been assigned a score greater than or equal to this variable's value are automatically marked "flagged".

3.300. score_threshold_read

Type: number
Default: -1

Messages which have been assigned a score equal to or lower than the value of this variable are automatically marked as read by mutt. Since mutt scores are always greater than or equal to zero, the default setting of this variable will never mark a message read.

3.301. search_context

Type: number
Default: 0

For the pager, this variable specifies the number of lines shown before search results. By default, search results will be top-aligned.

3.302. send_charset

Type: string
Default: “us-ascii:iso-8859-1:utf-8â€

A colon-delimited list of character sets for outgoing messages. Mutt will use the first character set into which the text can be converted exactly. If your $charset is not “iso-8859-1†and recipients may not understand “UTF-8â€, it is advisable to include in the list an appropriate widely used standard character set (such as “iso-8859-2â€, “koi8-r†or “iso-2022-jpâ€) either instead of or after “iso-8859-1â€.

In case the text cannot be converted into one of these exactly, mutt uses $charset as a fallback.

3.303. send_multipart_alternative

Type: quadoption
Default: no

If set, Mutt will generate a multipart/alternative container and an alternative part using the filter script specified in $send_multipart_alternative_filter. See the section “MIME Multipart/Alternative†(alternative-order).

Note that enabling multipart/alternative is not compatible with inline PGP encryption. Mutt will prompt to use PGP/MIME in that case.

3.304. send_multipart_alternative_filter

Type: path
Default: (empty)

This specifies a filter script, which will convert the main (composed) message of the email to an alternative format. The message will be piped to the filter's stdin. The expected output of the filter is the generated mime type, e.g. text/html, followed by a blank line, and then the converted content. See the section “MIME Multipart/Alternative†(alternative-order).

3.305. sendmail

Type: path
Default: “/usr/bin/sendmail -oem -oiâ€

Specifies the program and arguments used to deliver mail sent by Mutt. Mutt expects that the specified program interprets additional arguments as recipient addresses. Mutt appends all recipients after adding a -- delimiter (if not already present). Additional flags, such as for $use_8bitmime, $use_envelope_from, $dsn_notify, or $dsn_return will be added before the delimiter.

Note: This command is invoked differently from most other commands in Mutt. It is tokenized by space, and invoked directly via execvp(3) with an array of arguments - so commands or arguments with spaces in them are not supported. The shell is not used to run the command, so shell quoting is also not supported.

See also: $write_bcc.

3.306. sendmail_wait

Type: number
Default: 0

Specifies the number of seconds to wait for the $sendmail process to finish before giving up and putting delivery in the background.

Mutt interprets the value of this variable as follows:

>0 number of seconds to wait for sendmail to finish before continuing
0 wait forever for sendmail to finish
<0 always put sendmail in the background without waiting

Note that if you specify a value other than 0, the output of the child process will be put in a temporary file. If there is some error, you will be informed as to where to find the output.

3.307. shell

Type: path
Default: (empty)

Command to use when spawning a subshell. By default, the user's login shell from /etc/passwd is used.

3.308. sidebar_delim_chars

Type: string
Default: “/.â€

This contains the list of characters which you would like to treat as folder separators for displaying paths in the sidebar.

Local mail is often arranged in directories: `dir1/dir2/mailbox'.

set sidebar_delim_chars='/'

IMAP mailboxes are often named: `folder1.folder2.mailbox'.

set sidebar_delim_chars='.'

See also: $sidebar_short_path, $sidebar_folder_indent, $sidebar_indent_string.

3.309. sidebar_divider_char

Type: string
Default: “|â€

This specifies the characters to be drawn between the sidebar (when visible) and the other Mutt panels. ASCII and Unicode line-drawing characters are supported.

3.310. sidebar_folder_indent

Type: boolean
Default: no

Set this to indent mailboxes in the sidebar.

See also: $sidebar_short_path, $sidebar_indent_string, $sidebar_delim_chars.

3.311. sidebar_format

Type: string
Default: “%B%*  %nâ€

This variable allows you to customize the sidebar display. This string is similar to $index_format, but has its own set of printf(3)-like sequences:

%B Name of the mailbox
%S * Size of mailbox (total number of messages)
%N * Number of unread messages in the mailbox
%n N if mailbox has new mail, blank otherwise
%F * Number of Flagged messages in the mailbox
%! “!†: one flagged message; “!!†: two flagged messages; “n!†: n flagged messages (for n > 2). Otherwise prints nothing.
%d * @ Number of deleted messages
%L * @ Number of messages after limiting
%t * @ Number of tagged messages
%>X right justify the rest of the string and pad with “Xâ€
%|X pad to the end of the line with “Xâ€
%*X soft-fill with character “X†as pad

* = Can be optionally printed if nonzero @ = Only applicable to the current folder

In order to use %S, %N, %F, and %!, $mail_check_stats must be set. When thus set, a suggested value for this option is "%B%?F? [%F]?%* %?N?%N/?%S".

3.312. sidebar_indent_string

Type: string
Default: “  â€

This specifies the string that is used to indent mailboxes in the sidebar. It defaults to two spaces.

See also: $sidebar_short_path, $sidebar_folder_indent, $sidebar_delim_chars.

3.313. sidebar_new_mail_only

Type: boolean
Default: no

When set, the sidebar will only display mailboxes containing new, or flagged, mail.

See also: sidebar_whitelist.

3.314. sidebar_next_new_wrap

Type: boolean
Default: no

When set, the <sidebar-next-new> command will not stop and the end of the list of mailboxes, but wrap around to the beginning. The <sidebar-prev-new> command is similarly affected, wrapping around to the end of the list.

3.315. sidebar_relative_shortpath_indent

Type: boolean
Default: no

When set, this option changes how $sidebar_short_path and $sidebar_folder_indent perform shortening and indentation: both will look at the previous sidebar entries and shorten/indent relative to the most recent parent.

An example of this option set/unset for mailboxes listed in this order, with $sidebar_short_path=yes, $sidebar_folder_indent=yes, and $sidebar_indent_string="→":

mailbox set unset
=a.b =a.b →b
=a.b.c.d →c.d →→→d
=a.b.e →e →→e

The second line illustrates most clearly. With this option set, =a.b.c.d is shortened relative to =a.b, becoming c.d; it is also indented one place relative to =a.b. With this option unset =a.b.c.d is always shortened to the last part of the mailbox, d and is indented three places, with respect to $folder (represented by '=').

When set, the third line will also be indented and shortened relative to the first line.

3.316. sidebar_short_path

Type: boolean
Default: no

By default the sidebar will show the mailbox's path, relative to the $folder variable. Setting sidebar_shortpath=yes will shorten the names relative to the previous name. Here's an example:

shortpath=no shortpath=yes shortpath=yes, folderindent=yes, indentstr=".."
fruit fruit fruit
fruit.apple apple ..apple
fruit.banana banana ..banana
fruit.cherry cherry ..cherry

See also: $sidebar_delim_chars, $sidebar_folder_indent, $sidebar_indent_string.

3.317. sidebar_sort_method

Type: sort order
Default: unsorted

Specifies how to sort mailbox entries in the sidebar. By default, the entries are sorted alphabetically. Valid values:

  • alpha (alphabetically)

  • count (all message count)

  • flagged (flagged message count)

  • name (alphabetically)

  • new (unread message count)

  • path (alphabetically)

  • unread (unread message count)

  • unsorted

You may optionally use the “reverse-†prefix to specify reverse sorting order (example: “set sidebar_sort_method=reverse-alphaâ€).

3.318. sidebar_use_mailbox_shortcuts

Type: boolean
Default: no

When set, sidebar mailboxes will be displayed with mailbox shortcut prefixes "=" or "~".

When unset, the sidebar will trim off a matching $folder prefix but otherwise not use mailbox shortcuts.

3.319. sidebar_visible

Type: boolean
Default: no

This specifies whether or not to show sidebar. The sidebar shows a list of all your mailboxes.

See also: $sidebar_format, $sidebar_width

3.320. sidebar_width

Type: number
Default: 30

This controls the width of the sidebar. It is measured in screen columns. For example: sidebar_width=20 could display 20 ASCII characters, or 10 Chinese characters.

3.321. sig_dashes

Type: boolean
Default: yes

If set, a line containing “-- †(note the trailing space) will be inserted before your $signature. It is strongly recommended that you not unset this variable unless your signature contains just your name. The reason for this is because many software packages use “-- \n†to detect your signature. For example, Mutt has the ability to highlight the signature in a different color in the built-in pager.

3.322. sig_on_top

Type: boolean
Default: no

If set, the signature will be included before any quoted or forwarded text. It is strongly recommended that you do not set this variable unless you really know what you are doing, and are prepared to take some heat from netiquette guardians.

3.323. signature

Type: path
Default: “~/.signatureâ€

Specifies the filename of your signature, which is appended to all outgoing messages. If the filename ends with a pipe (“|â€), it is assumed that filename is a shell command and input should be read from its standard output.

3.324. simple_search

Type: string
Default: “~f %s | ~s %sâ€

Specifies how Mutt should expand a simple search into a real search pattern. A simple search is one that does not contain any of the “~†pattern modifiers. See “patterns†for more information on search patterns.

For example, if you simply type “joe†at a search or limit prompt, Mutt will automatically expand it to the value specified by this variable by replacing “%s†with the supplied string. For the default value, “joe†would be expanded to: “~f joe | ~s joeâ€.

3.325. size_show_bytes

Type: boolean
Default: no

If set, message sizes will display bytes for values less than 1 kilobyte. See formatstrings-size.

3.326. size_show_fractions

Type: boolean
Default: yes

If set, message sizes will be displayed with a single decimal value for sizes from 0 to 10 kilobytes and 1 to 10 megabytes. See formatstrings-size.

3.327. size_show_mb

Type: boolean
Default: yes

If set, message sizes will display megabytes for values greater than or equal to 1 megabyte. See formatstrings-size.

3.328. size_units_on_left

Type: boolean
Default: no

If set, message sizes units will be displayed to the left of the number. See formatstrings-size.

3.329. sleep_time

Type: number
Default: 1

Specifies time, in seconds, to pause while displaying certain informational messages, while moving from folder to folder and after expunging messages from the current folder. The default is to pause one second, so a value of zero for this option suppresses the pause.

3.330. smart_wrap

Type: boolean
Default: yes

Controls the display of lines longer than the screen width in the internal pager. If set, long lines are wrapped at a word boundary. If unset, lines are simply wrapped at the screen edge. Also see the $markers variable.

3.331. smileys

Type: regular expression
Default: “(>From )|(:[-^]?[][)(><}{|/DP])â€

The pager uses this variable to catch some common false positives of $quote_regexp, most notably smileys and not consider a line quoted text if it also matches $smileys. This mostly happens at the beginning of a line.

3.332. smime_ask_cert_label

Type: boolean
Default: yes

This flag controls whether you want to be asked to enter a label for a certificate about to be added to the database or not. It is set by default. (S/MIME only)

3.333. smime_ca_location

Type: path
Default: (empty)

This variable contains the name of either a directory, or a file which contains trusted certificates for use with OpenSSL. (S/MIME only)

3.334. smime_certificates

Type: path
Default: (empty)

Since for S/MIME there is no pubring/secring as with PGP, mutt has to handle storage and retrieval of keys by itself. This is very basic right now, and keys and certificates are stored in two different directories, both named as the hash-value retrieved from OpenSSL. There is an index file which contains mailbox-address keyid pairs, and which can be manually edited. This option points to the location of the certificates. (S/MIME only)

3.335. smime_decrypt_command

Type: string
Default: (empty)

This format string specifies a command which is used to decrypt application/x-pkcs7-mime attachments.

The OpenSSL command formats have their own set of printf(3)-like sequences similar to PGP's:

%f Expands to the name of a file containing a message.
%s Expands to the name of a file containing the signature part of a multipart/signed attachment when verifying it.
%k The key-pair specified with $smime_default_key
%c One or more certificate IDs.
%a The algorithm used for encryption.
%d The message digest algorithm specified with $smime_sign_digest_alg.
%C CA location: Depending on whether $smime_ca_location points to a directory or file, this expands to “-CApath $smime_ca_location†or “-CAfile $smime_ca_locationâ€.

For examples on how to configure these formats, see the smime.rc in the samples/ subdirectory which has been installed on your system alongside the documentation. (S/MIME only)

3.336. smime_decrypt_use_default_key

Type: boolean
Default: yes

If set (default) this tells mutt to use the default key for decryption. Otherwise, if managing multiple certificate-key-pairs, mutt will try to use the mailbox-address to determine the key to use. It will ask you to supply a key, if it can't find one. (S/MIME only)

3.337. smime_default_key

Type: string
Default: (empty)

This is the default key-pair to use for S/MIME operations, and must be set to the keyid (the hash-value that OpenSSL generates) to work properly.

It will be used for encryption (see $postpone_encrypt and $smime_self_encrypt). If GPGME is enabled, this is the key id displayed by gpgsm.

It will be used for decryption unless $smime_decrypt_use_default_key is unset.

It will also be used for signing unless $smime_sign_as is set.

The (now deprecated) smime_self_encrypt_as is an alias for this variable, and should no longer be used. (S/MIME only)

3.338. smime_encrypt_command

Type: string
Default: (empty)

This command is used to create encrypted S/MIME messages.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.339. smime_encrypt_with

Type: string
Default: “aes256â€

This sets the algorithm that should be used for encryption. Valid choices are “aes128â€, “aes192â€, “aes256â€, “desâ€, “des3â€, “rc2-40â€, “rc2-64â€, “rc2-128â€. (S/MIME only)

3.340. smime_get_cert_command

Type: string
Default: (empty)

This command is used to extract X509 certificates from a PKCS7 structure.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.341. smime_get_cert_email_command

Type: string
Default: (empty)

This command is used to extract the mail address(es) used for storing X509 certificates, and for verification purposes (to check whether the certificate was issued for the sender's mailbox).

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.342. smime_get_signer_cert_command

Type: string
Default: (empty)

This command is used to extract only the signers X509 certificate from a S/MIME signature, so that the certificate's owner may get compared to the email's “From:†field.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.343. smime_import_cert_command

Type: string
Default: (empty)

This command is used to import a certificate via smime_keys.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.344. smime_is_default

Type: boolean
Default: no

The default behavior of mutt is to use PGP on all auto-sign/encryption operations. To override and to use OpenSSL instead this must be set. However, this has no effect while replying, since mutt will automatically select the same application that was used to sign/encrypt the original message. (Note that this variable can be overridden by unsetting $crypt_autosmime.) (S/MIME only)

3.345. smime_keys

Type: path
Default: (empty)

Since for S/MIME there is no pubring/secring as with PGP, mutt has to handle storage and retrieval of keys/certs by itself. This is very basic right now, and stores keys and certificates in two different directories, both named as the hash-value retrieved from OpenSSL. There is an index file which contains mailbox-address keyid pair, and which can be manually edited. This option points to the location of the private keys. (S/MIME only)

3.346. smime_pkcs7_default_smime_type

Type: string
Default: “signedâ€

The application/pkcs7-mime “.p7m†type can contain EnvelopedData (encrypted) or SignedData. Senders should add a “smime-type†parameter to the content type, to help receiving MUAs correctly handle the data. Unfortunately, some clients (e.g. Outlook) don't add this parameter.

This option is used to determine which type to assume when the “smime-type†parameter is missing for “.p7m†file types.

Accepted values are “enveloped†and “signedâ€.

3.347. smime_pk7out_command

Type: string
Default: (empty)

This command is used to extract PKCS7 structures of S/MIME signatures, in order to extract the public X509 certificate(s).

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.348. smime_self_encrypt

Type: boolean
Default: yes

When set, S/MIME encrypted messages will also be encrypted using the certificate in $smime_default_key. (S/MIME only)

3.349. smime_sign_as

Type: string
Default: (empty)

If you have a separate key to use for signing, you should set this to the signing key. Most people will only need to set $smime_default_key. (S/MIME only)

3.350. smime_sign_command

Type: string
Default: (empty)

This command is used to created S/MIME signatures of type multipart/signed, which can be read by all mail clients.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. NOTE: %c and %k will default to $smime_sign_as if set, otherwise $smime_default_key. (S/MIME only)

3.351. smime_sign_digest_alg

Type: string
Default: “sha256â€

This sets the algorithm that should be used for the signature message digest. Valid choices are “md5â€, “sha1â€, “sha224â€, “sha256â€, “sha384â€, “sha512â€. (S/MIME only)

3.352. smime_sign_opaque_command

Type: string
Default: (empty)

This command is used to created S/MIME signatures of type application/x-pkcs7-signature, which can only be handled by mail clients supporting the S/MIME extension.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.353. smime_timeout

Type: number (long)
Default: 300

The number of seconds after which a cached passphrase will expire if not used. (S/MIME only)

3.354. smime_verify_command

Type: string
Default: (empty)

This command is used to verify S/MIME signatures of type multipart/signed.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.355. smime_verify_opaque_command

Type: string
Default: (empty)

This command is used to verify S/MIME signatures of type application/x-pkcs7-mime.

This is a format string, see the $smime_decrypt_command command for possible printf(3)-like sequences. (S/MIME only)

3.356. smtp_authenticators

Type: string
Default: (empty)

This is a colon-delimited list of authentication methods mutt may attempt to use to log in to an SMTP server, in the order mutt should try them. Authentication methods are any SASL mechanism, e.g. “digest-md5â€, “gssapi†or “cram-md5â€. This option is case-insensitive. If it is “unset†(the default) mutt will try all available methods, in order from most-secure to least-secure.

Example:

set smtp_authenticators="digest-md5:cram-md5"

3.357. smtp_oauth_refresh_command

Type: string
Default: (empty)

The command to run to generate an OAUTH refresh token for authorizing your connection to your SMTP server. This command will be run on every connection attempt that uses the OAUTHBEARER authentication mechanism. See “oauth†for details.

3.358. smtp_pass

Type: string
Default: (empty)

Specifies the password for your SMTP account. If unset, Mutt will prompt you for your password when you first send mail via SMTP. See $smtp_url to configure mutt to send mail via SMTP.

Warning: you should only use this option when you are on a fairly secure machine, because the superuser can read your muttrc even if you are the only one who can read the file.

3.359. smtp_url

Type: string
Default: (empty)

Defines the SMTP smarthost where sent messages should relayed for delivery. This should take the form of an SMTP URL, e.g.:

smtp[s]://[user[:pass]@]host[:port]

where “[...]†denotes an optional part. Setting this variable overrides the value of the $sendmail variable.

Also see $write_bcc.

3.360. socket_receive_timeout

Type: number
Default: 0

Causes Mutt to timeout any socket read operation (e.g. SSL_read) after this many seconds. A zero (default) or negative value causes Mutt to wait indefinitely for the read to complete.

3.361. socket_send_timeout

Type: number
Default: 0

Causes Mutt to timeout any socket write operation (e.g. SSL_write) after this many seconds. A zero (default) or negative value causes Mutt to wait indefinitely for the write to complete.

3.362. sort

Type: sort order
Default: date

Specifies how to sort messages in the “index†menu. Valid values are:

  • date or date-sent

  • date-received

  • from

  • mailbox-order (unsorted)

  • score

  • size

  • spam

  • subject

  • threads

  • to

You may optionally use the “reverse-†prefix to specify reverse sorting order (example: “set sort=reverse-date-sentâ€).

For values except “threadsâ€, this provides the primary sort method. When two message sort values are equal, $sort_aux will be used for a secondary sort.

When set to “threadsâ€, Mutt threads messages in the index. It uses the variable $sort_thread_groups to sort between threads (at the top/root level), and $sort_aux to sort sub-threads and children.

3.363. sort_alias

Type: sort order
Default: alias

Specifies how the entries in the “alias†menu are sorted. The following are legal values:

  • address (sort alphabetically by email address)

  • alias (sort alphabetically by alias name)

  • unsorted (leave in order specified in .muttrc)

3.364. sort_aux

Type: sort order
Default: date

For non-threaded mode, this provides a secondary sort for messages in the “index†menu, used when the $sort value is equal for two messages.

When sorting by threads, this variable controls how the branches of the thread trees are sorted. This can be set to any value that $sort can, except “threads†(in that case, mutt will just use “date-sentâ€). You can also specify the “last-†prefix in addition to the “reverse-†prefix, but “last-†must come after “reverse-â€. The “last-†prefix causes messages to be sorted against its siblings by which has the last descendant, using the rest of $sort_aux as an ordering. For instance,

set sort_aux=last-date-received

would mean that if a new message is received in a sub-thread, that sub-thread becomes the last one displayed.

Note: For reversed-threads $sort order, $sort_aux is reversed again (which is not the right thing to do, but kept to not break any existing configuration setting).

3.365. sort_browser

Type: sort order
Default: alpha

Specifies how to sort entries in the file browser. By default, the entries are sorted alphabetically. Valid values:

  • alpha (alphabetically)

  • count

  • date

  • size

  • unread

  • unsorted

You may optionally use the “reverse-†prefix to specify reverse sorting order (example: “set sort_browser=reverse-dateâ€).

3.366. sort_browser_mailboxes

Type: sort order
Default: unsorted

Specifies how to sort entries in the mailbox browser. By default, the entries are unsorted, displayed in the same order as listed in the “mailboxes†command. Valid values:

  • alpha (alphabetically)

  • count

  • date

  • size

  • unread

  • unsorted

You may optionally use the “reverse-†prefix to specify reverse sorting order (example: “set sort_browser_mailboxes=reverse-alphaâ€).

3.367. sort_re

Type: boolean
Default: yes

This variable is only useful when sorting by threads with $strict_threads unset. In that case, it changes the heuristic mutt uses to thread messages by subject. With $sort_re set, mutt will only attach a message as the child of another message by subject if the subject of the child message starts with a substring matching the setting of $reply_regexp. With $sort_re unset, mutt will attach the message whether or not this is the case, as long as the non-$reply_regexp parts of both messages are identical.

3.368. sort_thread_groups

Type: sort order
Default: aux

When sorting by threads, this variable controls how threads are sorted in relation to other threads (at the top/root level). This can be set to any value that $sort can, except “threadsâ€. You can also specify the “last-†prefix in addition to the “reverse-†prefix, but “last-†must come after “reverse-â€. The “last-†prefix causes messages to be sorted against its siblings by which has the last descendant, using the rest of $sort_thread_groups as an ordering.

For backward compatibility, the default value is “auxâ€, which means to use $sort_aux for top-level thread sorting too. The value “aux†does not respect “last-†or “reverse-†prefixes, it simply delegates sorting directly to $sort_aux.

Note: For reversed-threads $sort order, $sort_thread_groups is reversed again (which is not the right thing to do, but kept to not break any existing configuration setting).

3.369. spam_separator

Type: string
Default: “,â€

This variable controls what happens when multiple spam headers are matched: if unset, each successive header will overwrite any previous matches value for the spam label. If set, each successive match will append to the previous, using this variable's value as a separator.

3.370. spoolfile

Type: path
Default: (empty)

If your default mailbox or spool file is in a non-default place where Mutt cannot find it, you can specify its location with this variable. Mutt will initially set this variable to the value of the environment variable $MAIL or $MAILDIR if either is defined.

Note: Despite the name, this can refer to a local or remote mailbox, e.g., "+INBOX".

3.371. ssl_ca_certificates_file

Type: path
Default: (empty)

This variable specifies a file containing trusted CA certificates. Any server certificate that is signed with one of these CA certificates is also automatically accepted. (GnuTLS only)

Example:

set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt

3.372. ssl_client_cert

Type: path
Default: (empty)

The file containing a client certificate and its associated private key.

3.373. ssl_force_tls

Type: boolean
Default: yes

If this variable is set, Mutt will require that all connections to remote servers be encrypted. Furthermore it will attempt to negotiate TLS even if the server does not advertise the capability, since it would otherwise have to abort the connection anyway. This option supersedes $ssl_starttls.

3.374. ssl_min_dh_prime_bits

Type: number
Default: 0

This variable specifies the minimum acceptable prime size (in bits) for use in any Diffie-Hellman key exchange. A value of 0 will use the default from the GNUTLS library. (GnuTLS only)

3.375. ssl_starttls

Type: quadoption
Default: yes

If set (the default), mutt will attempt to use STARTTLS on servers advertising the capability. When unset, mutt will not attempt to use STARTTLS regardless of the server's capabilities.

Note that STARTTLS is subject to many kinds of attacks, including the ability of a machine-in-the-middle to suppress the advertising of support. Setting $ssl_force_tls is recommended if you rely on STARTTLS.

3.376. ssl_use_sslv2

Type: boolean
Default: no

If set , Mutt will use SSLv2 when communicating with servers that request it. N.B. As of 2011, SSLv2 is considered insecure, and using is inadvisable. See https://tools.ietf.org/html/rfc6176 . (OpenSSL only)

3.377. ssl_use_sslv3

Type: boolean
Default: no

If set , Mutt will use SSLv3 when communicating with servers that request it. N.B. As of 2015, SSLv3 is considered insecure, and using it is inadvisable. See https://tools.ietf.org/html/rfc7525 .

3.378. ssl_use_tlsv1

Type: boolean
Default: no

If set , Mutt will use TLSv1.0 when communicating with servers that request it. N.B. As of 2015, TLSv1.0 is considered insecure, and using it is inadvisable. See https://tools.ietf.org/html/rfc7525 .

3.379. ssl_use_tlsv1_1

Type: boolean
Default: no

If set , Mutt will use TLSv1.1 when communicating with servers that request it. N.B. As of 2015, TLSv1.1 is considered insecure, and using it is inadvisable. See https://tools.ietf.org/html/rfc7525 .

3.380. ssl_use_tlsv1_2

Type: boolean
Default: yes

If set , Mutt will use TLSv1.2 when communicating with servers that request it.

3.381. ssl_use_tlsv1_3

Type: boolean
Default: yes

If set , Mutt will use TLSv1.3 when communicating with servers that request it.

3.382. ssl_usesystemcerts

Type: boolean
Default: yes

If set to yes, mutt will use CA certificates in the system-wide certificate store when checking if a server certificate is signed by a trusted CA. (OpenSSL only)

3.383. ssl_verify_dates

Type: boolean
Default: yes

If set (the default), mutt will not automatically accept a server certificate that is either not yet valid or already expired. You should only unset this for particular known hosts, using the <account-hook> function.

3.384. ssl_verify_host

Type: boolean
Default: yes

If set (the default), mutt will not automatically accept a server certificate whose host name does not match the host used in your folder URL. You should only unset this for particular known hosts, using the <account-hook> function.

3.385. ssl_verify_host_override

Type: string
Default: (empty)

Defines an alternate host name to verify the server certificate against. This should not be set unless you are sure what you are doing, but it might be useful for connection to a .onion host without a properly configured host name in the certificate. See $ssl_verify_host.

3.386. ssl_verify_partial_chains

Type: boolean
Default: no

This option should not be changed from the default unless you understand what you are doing.

Setting this variable to yes will permit verifying partial certification chains, i. e. a certificate chain where not the root, but an intermediate certificate CA, or the host certificate, are marked trusted (in $certificate_file), without marking the root signing CA as trusted.

(OpenSSL 1.0.2b and newer only).

3.387. ssl_ciphers

Type: string
Default: (empty)

Contains a colon-separated list of ciphers to use when using SSL. For OpenSSL, see ciphers(1) for the syntax of the string.

For GnuTLS, this option will be used in place of "NORMAL" at the start of the priority string. See gnutls_priority_init(3) for the syntax and more details. (Note: GnuTLS version 2.1.7 or higher is required.)

3.388. status_chars

Type: string
Default: “-*%Aâ€

Controls the characters used by the “%r†indicator in $status_format. The first character is used when the mailbox is unchanged. The second is used when the mailbox has been changed, and it needs to be resynchronized. The third is used if the mailbox is in read-only mode, or if the mailbox will not be written when exiting that mailbox (You can toggle whether to write changes to a mailbox with the <toggle-write> operation, bound by default to “%â€). The fourth is used to indicate that the current folder has been opened in attach- message mode (Certain operations like composing a new mail, replying, forwarding, etc. are not permitted in this mode).

3.389. status_format

Type: string (localized)
Default: “-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?B? Back:%B?%?l? %l?]---(%s/%?T?%T/?%S)-%>-(%P)---â€

Controls the format of the status line displayed in the “index†menu. This string is similar to $index_format, but has its own set of printf(3)-like sequences:

%b number of mailboxes with new mail *
%B number of backgrounded editing sessions *
%d number of deleted messages *
%f the full pathname of the current mailbox
%F number of flagged messages *
%h local hostname
%l size (in bytes) of the current mailbox (see formatstrings-size) *
%L size (in bytes) of the messages shown (i.e., which match the current limit) (see formatstrings-size) *
%m the number of messages in the mailbox *
%M the number of messages shown (i.e., which match the current limit) *
%n number of new messages in the mailbox *
%o number of old unread messages *
%p number of postponed messages *
%P percentage of the way through the index
%r modified/read-only/won't-write/attach-message indicator, according to $status_chars
%R number of read messages *
%s current sorting mode ($sort)
%S current aux sorting method ($sort_aux)
%t number of tagged messages *
%T current thread group sorting method ($sort_thread_groups) *
%u number of unread messages *
%v Mutt version string
%V currently active limit pattern, if any *
%>X right justify the rest of the string and pad with “Xâ€
%|X pad to the end of the line with “Xâ€
%*X soft-fill with character “X†as pad

For an explanation of “soft-fillâ€, see the $index_format documentation.

* = can be optionally printed if nonzero

Some of the above sequences can be used to optionally print a string if their value is nonzero. For example, you may only want to see the number of flagged messages if such messages exist, since zero is not particularly meaningful. To optionally print a string based upon one of the above sequences, the following construct is used:

%?<sequence_char>?<optional_string>?

where sequence_char is a character from the table above, and optional_string is the string you would like printed if sequence_char is nonzero. optional_string may contain other sequences as well as normal text, but you may not nest optional strings.

Here is an example illustrating how to optionally print the number of new messages in a mailbox:

%?n?%n new messages.?

You can also switch between two strings using the following construct:

%?<sequence_char>?<if_string>&<else_string>?

If the value of sequence_char is non-zero, if_string will be expanded, otherwise else_string will be expanded.

You can force the result of any printf(3)-like sequence to be lowercase by prefixing the sequence character with an underscore (“_â€) sign. For example, if you want to display the local hostname in lowercase, you would use: “%_hâ€.

If you prefix the sequence character with a colon (“:â€) character, mutt will replace any dots in the expansion by underscores. This might be helpful with IMAP folders that don't like dots in folder names.

3.390. status_on_top

Type: boolean
Default: no

Setting this variable causes the “status bar†to be displayed on the first line of the screen rather than near the bottom. If $help is set, too it'll be placed at the bottom.

3.391. strict_threads

Type: boolean
Default: no

If set, threading will only make use of the “In-Reply-To†and “References:†fields when you $sort by message threads. By default, messages with the same subject are grouped together in “pseudo threads.â€. This may not always be desirable, such as in a personal mailbox where you might have several unrelated messages with the subjects like “hi†which will get grouped together. See also $sort_re for a less drastic way of controlling this behavior.

3.392. suspend

Type: boolean
Default: yes

When unset, mutt won't stop when the user presses the terminal's susp key, usually “^Zâ€. This is useful if you run mutt inside an xterm using a command like “xterm -e muttâ€.

3.393. text_flowed

Type: boolean
Default: no

When set, mutt will generate “format=flowed†bodies with a content type of “text/plain; format=flowedâ€. This format is easier to handle for some mailing software, and generally just looks like ordinary text. To actually make use of this format's features, you'll need support in your editor.

The option only controls newly composed messages. Postponed messages, resent messages, and draft messages (via -H on the command line) will use the content-type of the source message.

Note that $indent_string is ignored when this option is set.

3.394. thorough_search

Type: boolean
Default: yes

Affects the ~b, ~B, and ~h search operations described in section “patternsâ€. If set, the headers and body/attachments of messages to be searched are decoded before searching. If unset, messages are searched as they appear in the folder.

Users searching attachments or for non-ASCII characters should set this value because decoding also includes MIME parsing/decoding and possible character set conversions. Otherwise mutt will attempt to match against the raw message received (for example quoted-printable encoded or with encoded headers) which may lead to incorrect search results.

3.395. thread_received

Type: boolean
Default: no

When set, mutt uses the date received rather than the date sent to thread messages by subject.

3.396. tilde

Type: boolean
Default: no

When set, the internal-pager will pad blank lines to the bottom of the screen with a tilde (“~â€).

3.397. time_inc

Type: number
Default: 0

Along with $read_inc, $write_inc, and $net_inc, this variable controls the frequency with which progress updates are displayed. It suppresses updates less than $time_inc milliseconds apart. This can improve throughput on systems with slow terminals, or when running mutt on a remote system.

Also see the “tuning†section of the manual for performance considerations.

3.398. timeout

Type: number
Default: 600

When Mutt is waiting for user input either idling in menus or in an interactive prompt, Mutt would block until input is present. Depending on the context, this would prevent certain operations from working, like checking for new mail or keeping an IMAP connection alive.

This variable controls how many seconds Mutt will at most wait until it aborts waiting for input, performs these operations and continues to wait for input.

A value of zero or less will cause Mutt to never time out.

3.399. tmpdir

Type: path
Default: (empty)

This variable allows you to specify where Mutt will place its temporary files needed for displaying and composing messages. If this variable is not set, the environment variable $TMPDIR is used. If $TMPDIR is not set then “/tmp†is used.

3.400. to_chars

Type: string
Default: “ +TCFLâ€

Controls the character used to indicate mail addressed to you. The first character is the one used when the mail is not addressed to your address. The second is used when you are the only recipient of the message. The third is when your address appears in the “To:†header field, but you are not the only recipient of the message. The fourth character is used when your address is specified in the “Cc:†header field, but you are not the only recipient. The fifth character is used to indicate mail that was sent by you. The sixth character is used to indicate when a mail was sent to a mailing-list you subscribe to.

3.401. trash

Type: path
Default: (empty)

If set, this variable specifies the path of the trash folder where the mails marked for deletion will be moved, instead of being irremediably purged.

NOTE: When you delete a message in the trash folder, it is really deleted, so that you have a way to clean the trash.

3.402. ts_icon_format

Type: string (localized)
Default: “M%?n?AIL&ail?â€

Controls the format of the icon title, as long as “$ts_enabled†is set. This string is identical in formatting to the one used by “$status_formatâ€.

3.403. ts_enabled

Type: boolean
Default: no

Controls whether mutt tries to set the terminal status line and icon name. Most terminal emulators emulate the status line in the window title.

3.404. ts_status_format

Type: string (localized)
Default: “Mutt with %?m?%m messages&no messages?%?n? [%n NEW]?â€

Controls the format of the terminal status line (or window title), provided that “$ts_enabled†has been set. This string is identical in formatting to the one used by “$status_formatâ€.

3.405. tunnel

Type: string
Default: (empty)

Setting this variable will cause mutt to open a pipe to a command instead of a raw socket. You may be able to use this to set up preauthenticated connections to your IMAP/POP3/SMTP server. Example:

set tunnel="ssh -q mailhost.net /usr/local/libexec/imapd"

Note: For this example to work you must be able to log in to the remote machine without having to enter a password.

When set, Mutt uses the tunnel for all remote connections. Please see “account-hook†in the manual for how to use different tunnel commands per connection.

3.406. tunnel_is_secure

Type: boolean
Default: yes

When set, Mutt will assume the $tunnel connection does not need STARTTLS to be enabled. It will also allow IMAP PREAUTH server responses inside a tunnel to proceed. This is appropriate if $tunnel uses ssh or directly invokes the server locally.

When unset, Mutt will negotiate STARTTLS according to the ssl_starttls and ssl_force_tls variables. If ssl_force_tls is set, Mutt will abort connecting if an IMAP server responds with PREAUTH. This setting is appropriate if $tunnel does not provide security and could be tampered with by attackers.

3.407. uncollapse_jump

Type: boolean
Default: no

When set, Mutt will jump to the next unread message, if any, when the current thread is uncollapsed.

3.408. uncollapse_new

Type: boolean
Default: yes

When set, Mutt will automatically uncollapse any collapsed thread that receives a newly delivered message. When unset, collapsed threads will remain collapsed. The presence of the newly delivered message will still affect index sorting, though.

3.409. use_8bitmime

Type: boolean
Default: no

Warning: do not set this variable unless you are using a version of sendmail which supports the -B8BITMIME flag (such as sendmail 8.8.x) or you may not be able to send mail.

When set, Mutt will invoke $sendmail with the -B8BITMIME flag when sending 8-bit messages to enable ESMTP negotiation.

3.410. use_domain

Type: boolean
Default: yes

When set, Mutt will qualify all local addresses (ones without the “@host†portion) with the value of $hostname. If unset, no addresses will be qualified.

3.411. use_envelope_from

Type: boolean
Default: no

When set, mutt will set the envelope sender of the message. If $envelope_from_address is set, it will be used as the sender address. If unset, mutt will attempt to derive the sender from the “From:†header.

Note that this information is passed to sendmail command using the -f command line switch. Therefore setting this option is not useful if the $sendmail variable already contains -f or if the executable pointed to by $sendmail doesn't support the -f switch.

3.412. use_from

Type: boolean
Default: yes

When set, Mutt will generate the “From:†header field when sending messages. If unset, no “From:†header field will be generated unless the user explicitly sets one using the “my_hdr†command.

3.413. use_ipv6

Type: boolean
Default: yes

When set, Mutt will look for IPv6 addresses of hosts it tries to contact. If this option is unset, Mutt will restrict itself to IPv4 addresses. Normally, the default should work.

3.414. user_agent

Type: boolean
Default: no

When set, mutt will add a “User-Agent:†header to outgoing messages, indicating which version of mutt was used for composing them.

3.415. visual

Type: path
Default: (empty)

Specifies the visual editor to invoke when the “~v†command is given in the built-in editor.

3.416. wait_key

Type: boolean
Default: yes

Controls whether Mutt will ask you to press a key after an external command has been invoked by these functions: <shell-escape>, <pipe-message>, <pipe-entry>, <print-message>, and <print-entry> commands.

It is also used when viewing attachments with “auto_viewâ€, provided that the corresponding mailcap entry has a needsterminal flag, and the external program is interactive.

When set, Mutt will always ask for a key. When unset, Mutt will wait for a key only if the external command returned a non-zero status.

3.417. weed

Type: boolean
Default: yes

When set, mutt will weed headers when displaying, forwarding, or replying to messages.

Also see $copy_decode_weed, $pipe_decode_weed, $print_decode_weed.

3.418. wrap

Type: number
Default: 0

When set to a positive value, mutt will wrap text at $wrap characters. When set to a negative value, mutt will wrap text so that there are $wrap characters of empty space on the right side of the terminal. Setting it to zero makes mutt wrap at the terminal width.

Also see $reflow_wrap.

3.419. wrap_headers

Type: number
Default: 78

This option specifies the number of characters to use for wrapping an outgoing message's headers. Allowed values are between 78 and 998 inclusive.

Note: This option usually shouldn't be changed. RFC5233 recommends a line length of 78 (the default), so please only change this setting when you know what you're doing.

3.420. wrap_search

Type: boolean
Default: yes

Controls whether searches wrap around the end.

When set, searches will wrap around the first (or last) item. When unset, incremental searches will not wrap.

3.421. wrapmargin

Type: number
Default: 0

(DEPRECATED) Equivalent to setting $wrap with a negative value.

3.422. write_bcc

Type: boolean
Default: no

Controls whether mutt writes out the “Bcc:†header when preparing messages to be sent. Some MTAs, such as Exim and Courier, do not strip the “Bcc:†header; so it is advisable to leave this unset unless you have a particular need for the header to be in the sent message.

If mutt is set to deliver directly via SMTP (see $smtp_url), this option does nothing: mutt will never write out the “Bcc:†header in this case.

Note this option only affects the sending of messages. Fcc'ed copies of a message will always contain the “Bcc:†header if one exists.

3.423. write_inc

Type: number
Default: 10

When writing a mailbox, a message will be printed every $write_inc messages to indicate progress. If set to 0, only a single message will be displayed before writing a mailbox.

Also see the $read_inc, $net_inc and $time_inc variables and the “tuning†section of the manual for performance considerations.

4. Functions

The following is the list of available functions listed by the mapping in which they are available. The default key setting is given, and an explanation of what the function does. The key bindings of these functions can be changed with the bind command.

4.1. Generic Menu

The generic menu is not a real menu, but specifies common functions (such as movement) available in all menus except for pager and editor. Changing settings for this menu will affect the default bindings for all menus (except as noted).

Table 9.2. Default Generic Menu Bindings

FunctionDefault keyDescription
<bottom-page>Lmove to the bottom of the page
<check-stats> calculate message statistics for all mailboxes
<current-bottom> move entry to bottom of screen
<current-middle> move entry to middle of screen
<current-top> move entry to top of screen
<end-cond> end of conditional execution (noop)
<enter-command>:enter a muttrc command
<error-history> display recent history of error messages
<exit>qexit this menu
<first-entry><Home>move to the first entry
<first-entry>=move to the first entry
<half-down>]scroll down 1/2 page
<half-up>[scroll up 1/2 page
<help>?this screen
<jump>1jump to an index number
<jump>2jump to an index number
<jump>3jump to an index number
<jump>4jump to an index number
<jump>5jump to an index number
<jump>6jump to an index number
<jump>7jump to an index number
<jump>8jump to an index number
<jump>9jump to an index number
<last-entry><End>move to the last entry
<last-entry>*move to the last entry
<middle-page>Mmove to the middle of the page
<next-entry><Down>move to the next entry
<next-entry>jmove to the next entry
<next-line>>scroll down one line
<next-page><Pagedown>move to the next page
<next-page><Right>move to the next page
<next-page>zmove to the next page
<previous-entry><Up>move to the previous entry
<previous-entry>kmove to the previous entry
<previous-line><scroll up one line
<previous-page><Left>move to the previous page
<previous-page><Pageup>move to the previous page
<previous-page>Zmove to the previous page
<refresh>^Lclear and redraw the screen
<search>/search for a regular expression
<search-next>nsearch for next match
<search-opposite> search for next match in opposite direction
<search-reverse>Esc /search backwards for a regular expression
<select-entry><Enter>select the current entry
<select-entry><Keypadenter>select the current entry
<select-entry><Return>select the current entry
<shell-escape>!invoke a command in a subshell
<tag-entry>ttag the current entry
<tag-prefix>;apply next function to tagged messages
<tag-prefix-cond> apply next function ONLY to tagged messages
<top-page>Hmove to the top of the page
<what-key> display the keycode for a key press

4.2. Index Menu

Table 9.3. Default Index Menu Bindings

FunctionDefault keyDescription
<autocrypt-acct-menu>Amanage autocrypt accounts
<background-compose-menu>Blist and select backgrounded compose sessions
<bounce-message>bremail a message to another user
<break-thread>#break the thread in two
<browse-mailboxes>yselect a new mailbox from the browser
<browse-mailboxes-readonly> select a new mailbox from the browser in read only mode
<buffy-list>.list mailboxes with new mail
<change-folder>copen a different folder
<change-folder-readonly>Esc copen a different folder in read only mode
<check-traditional-pgp>Esc Pcheck for classic PGP
<clear-flag>Wclear a status flag from a message
<collapse-all>Esc Vcollapse/uncollapse all threads
<collapse-thread>Esc vcollapse/uncollapse current thread
<compose-to-sender> compose new message to the current message sender
<copy-message>Ccopy a message to a file/mailbox
<create-alias>acreate an alias from a message sender
<decode-copy>Esc Cmake decoded (text/plain) copy
<decode-save>Esc smake decoded copy (text/plain) and delete
<decrypt-copy> make decrypted copy
<decrypt-save> make decrypted copy and delete
<delete-message>ddelete the current entry
<delete-pattern>Ddelete messages matching a pattern
<delete-subthread>Esc ddelete all messages in subthread
<delete-thread>^Ddelete all messages in thread
<display-address>@display full address of sender
<display-message><Enter>display a message
<display-message><Keypadenter>display a message
<display-message><Return>display a message
<display-message><Space>display a message
<display-toggle-weed>hdisplay message and toggle header weeding
<edit>eedit the raw message
<edit-label>Yadd, change, or delete a message's label
<edit-type>^Eedit attachment content type
<exit>xexit this menu
<extract-keys>^Kextract supported public keys
<fetch-mail>Gretrieve mail from POP server
<flag-message>Ftoggle a message's 'important' flag
<forget-passphrase>^Fwipe passphrase(s) from memory
<forward-message>fforward a message with comments
<group-chat-reply> reply to all recipients preserving To/Cc
<group-reply>greply to all recipients
<imap-fetch-mail> force retrieval of mail from IMAP server
<imap-logout-all> logout from all IMAP servers
<limit>lshow only messages matching a pattern
<link-threads>&link tagged message to the current one
<list-action>Esc Lperform mailing list action
<list-reply>Lreply to specified mailing list
<mail>mcompose a new mail message
<mail-key>Esc kmail a PGP public key
<mark-message>~create a hotkey macro for the current message
<next-entry>Jmove to the next entry
<next-new> jump to the next new message
<next-new-then-unread><Tab>jump to the next new or unread message
<next-subthread>Esc njump to the next subthread
<next-thread>^Njump to the next thread
<next-undeleted><Down>move to the next undeleted message
<next-undeleted>jmove to the next undeleted message
<next-unread> jump to the next unread message
<next-unread-mailbox> open next mailbox with new mail
<parent-message>Pjump to parent message in thread
<pipe-message>|pipe message/attachment to a shell command
<previous-entry>Kmove to the previous entry
<previous-new> jump to the previous new message
<previous-new-then-unread>Esc <Tab>jump to the previous new or unread message
<previous-subthread>Esc pjump to previous subthread
<previous-thread>^Pjump to previous thread
<previous-undeleted><Up>move to the previous undeleted message
<previous-undeleted>kmove to the previous undeleted message
<previous-unread> jump to the previous unread message
<print-message>pprint the current entry
<purge-message> delete the current entry, bypassing the trash folder
<query>Qquery external program for addresses
<quit>qsave changes to mailbox and quit
<read-subthread>Esc rmark the current subthread as read
<read-thread>^Rmark the current thread as read
<recall-message>Rrecall a postponed message
<reply>rreply to a message
<resend-message>Esc euse the current message as a template for a new one
<root-message> jump to root message in thread
<save-message>ssave message/attachment to a mailbox/file
<set-flag>wset a status flag on a message
<show-limit>Esc lshow currently active limit pattern
<show-version>Vshow the Mutt version number and date
<sidebar-first> move the highlight to the first mailbox
<sidebar-last> move the highlight to the last mailbox
<sidebar-next> move the highlight to next mailbox
<sidebar-next-new> move the highlight to next mailbox with new mail
<sidebar-open> open highlighted mailbox
<sidebar-page-down> scroll the sidebar down 1 page
<sidebar-page-up> scroll the sidebar up 1 page
<sidebar-prev> move the highlight to previous mailbox
<sidebar-prev-new> move the highlight to previous mailbox with new mail
<sidebar-toggle-visible> make the sidebar (in)visible
<sort-mailbox>osort messages
<sort-reverse>Osort messages in reverse order
<sync-mailbox>$save changes to mailbox
<tag-pattern>Ttag messages matching a pattern
<tag-subthread> tag the current subthread
<tag-thread>Esc ttag the current thread
<toggle-new>Ntoggle a message's 'new' flag
<toggle-write>%toggle whether the mailbox will be rewritten
<undelete-message>uundelete the current entry
<undelete-pattern>Uundelete messages matching a pattern
<undelete-subthread>Esc uundelete all messages in subthread
<undelete-thread>^Uundelete all messages in thread
<untag-pattern>^Tuntag messages matching a pattern
<view-attachments>vshow MIME attachments

4.3. Pager Menu

Table 9.4. Default Pager Menu Bindings

FunctionDefault keyDescription
<background-compose-menu>Blist and select backgrounded compose sessions
<bottom><End>jump to the bottom of the message
<bounce-message>bremail a message to another user
<break-thread>#break the thread in two
<browse-mailboxes>yselect a new mailbox from the browser
<browse-mailboxes-readonly> select a new mailbox from the browser in read only mode
<buffy-list>.list mailboxes with new mail
<change-folder>copen a different folder
<change-folder-readonly>Esc copen a different folder in read only mode
<check-stats> calculate message statistics for all mailboxes
<check-traditional-pgp>Esc Pcheck for classic PGP
<clear-flag>Wclear a status flag from a message
<compose-to-sender> compose new message to the current message sender
<copy-message>Ccopy a message to a file/mailbox
<create-alias>acreate an alias from a message sender
<decode-copy>Esc Cmake decoded (text/plain) copy
<decode-save>Esc smake decoded copy (text/plain) and delete
<decrypt-copy> make decrypted copy
<decrypt-save> make decrypted copy and delete
<delete-message>ddelete the current entry
<delete-subthread>Esc ddelete all messages in subthread
<delete-thread>^Ddelete all messages in thread
<display-address>@display full address of sender
<display-toggle-weed>hdisplay message and toggle header weeding
<edit>eedit the raw message
<edit-label>Yadd, change, or delete a message's label
<edit-type>^Eedit attachment content type
<enter-command>:enter a muttrc command
<error-history> display recent history of error messages
<exit>iexit this menu
<exit>qexit this menu
<exit>xexit this menu
<extract-keys>^Kextract supported public keys
<flag-message>Ftoggle a message's 'important' flag
<forget-passphrase>^Fwipe passphrase(s) from memory
<forward-message>fforward a message with comments
<group-chat-reply> reply to all recipients preserving To/Cc
<group-reply>greply to all recipients
<half-down> scroll down 1/2 page
<half-up> scroll up 1/2 page
<help>?this screen
<imap-fetch-mail> force retrieval of mail from IMAP server
<imap-logout-all> logout from all IMAP servers
<jump>1jump to an index number
<jump>2jump to an index number
<jump>3jump to an index number
<jump>4jump to an index number
<jump>5jump to an index number
<jump>6jump to an index number
<jump>7jump to an index number
<jump>8jump to an index number
<jump>9jump to an index number
<link-threads>&link tagged message to the current one
<list-action>Esc Lperform mailing list action
<list-reply>Lreply to specified mailing list
<mail>mcompose a new mail message
<mail-key>Esc kmail a PGP public key
<mark-as-new>Ntoggle a message's 'new' flag
<next-entry>Jmove to the next entry
<next-line><Enter>scroll down one line
<next-line><Keypadenter>scroll down one line
<next-line><Return>scroll down one line
<next-new> jump to the next new message
<next-new-then-unread><Tab>jump to the next new or unread message
<next-page><Pagedown>move to the next page
<next-page><Space>move to the next page
<next-subthread>Esc njump to the next subthread
<next-thread>^Njump to the next thread
<next-undeleted><Down>move to the next undeleted message
<next-undeleted><Right>move to the next undeleted message
<next-undeleted>jmove to the next undeleted message
<next-unread> jump to the next unread message
<next-unread-mailbox> open next mailbox with new mail
<parent-message>Pjump to parent message in thread
<pipe-message>|pipe message/attachment to a shell command
<previous-entry>Kmove to the previous entry
<previous-line><Backspace>scroll up one line
<previous-new> jump to the previous new message
<previous-new-then-unread> jump to the previous new or unread message
<previous-page><Pageup>move to the previous page
<previous-page>-move to the previous page
<previous-subthread>Esc pjump to previous subthread
<previous-thread>^Pjump to previous thread
<previous-undeleted><Left>move to the previous undeleted message
<previous-undeleted><Up>move to the previous undeleted message
<previous-undeleted>kmove to the previous undeleted message
<previous-unread> jump to the previous unread message
<print-message>pprint the current entry
<purge-message> delete the current entry, bypassing the trash folder
<quit>Qsave changes to mailbox and quit
<read-subthread>Esc rmark the current subthread as read
<read-thread>^Rmark the current thread as read
<recall-message>Rrecall a postponed message
<redraw-screen>^Lclear and redraw the screen
<reply>rreply to a message
<resend-message>Esc euse the current message as a template for a new one
<root-message> jump to root message in thread
<save-message>ssave message/attachment to a mailbox/file
<search>/search for a regular expression
<search-next>nsearch for next match
<search-opposite> search for next match in opposite direction
<search-reverse>Esc /search backwards for a regular expression
<search-toggle>\\toggle search pattern coloring
<set-flag>wset a status flag on a message
<shell-escape>!invoke a command in a subshell
<show-version>Vshow the Mutt version number and date
<sidebar-first> move the highlight to the first mailbox
<sidebar-last> move the highlight to the last mailbox
<sidebar-next> move the highlight to next mailbox
<sidebar-next-new> move the highlight to next mailbox with new mail
<sidebar-open> open highlighted mailbox
<sidebar-page-down> scroll the sidebar down 1 page
<sidebar-page-up> scroll the sidebar up 1 page
<sidebar-prev> move the highlight to previous mailbox
<sidebar-prev-new> move the highlight to previous mailbox with new mail
<sidebar-toggle-visible> make the sidebar (in)visible
<skip-headers>Hskip beyond headers
<skip-quoted>Sskip beyond quoted text
<sort-mailbox>osort messages
<sort-reverse>Osort messages in reverse order
<sync-mailbox>$save changes to mailbox
<tag-message>ttag the current entry
<toggle-quoted>Ttoggle display of quoted text
<toggle-write>%toggle whether the mailbox will be rewritten
<top><Home>jump to the top of the message
<top>^jump to the top of the message
<undelete-message>uundelete the current entry
<undelete-subthread>Esc uundelete all messages in subthread
<undelete-thread>^Uundelete all messages in thread
<view-attachments>vshow MIME attachments
<what-key> display the keycode for a key press

4.4. Alias Menu

Table 9.5. Default Alias Menu Bindings

FunctionDefault keyDescription
<delete-entry>ddelete the current entry
<tag-entry><Space>tag the current entry
<undelete-entry>uundelete the current entry

4.5. Query Menu

Table 9.6. Default Query Menu Bindings

FunctionDefault keyDescription
<create-alias>acreate an alias from a message sender
<mail>mcompose a new mail message
<query>Qquery external program for addresses
<query-append>Aappend new query results to current results

4.6. Attachment Menu

Table 9.7. Default Attachment Menu Bindings

FunctionDefault keyDescription
<bounce-message>bremail a message to another user
<check-traditional-pgp>Esc Pcheck for classic PGP
<collapse-parts>vToggle display of subparts
<compose-to-sender> compose new message to the current message sender
<delete-entry>ddelete the current entry
<display-toggle-weed>hdisplay message and toggle header weeding
<edit-type>^Eedit attachment content type
<extract-keys>^Kextract supported public keys
<forget-passphrase>^Fwipe passphrase(s) from memory
<forward-message>fforward a message with comments
<group-chat-reply> reply to all recipients preserving To/Cc
<group-reply>greply to all recipients
<list-reply>Lreply to specified mailing list
<pipe-entry>|pipe message/attachment to a shell command
<print-entry>pprint the current entry
<reply>rreply to a message
<resend-message>Esc euse the current message as a template for a new one
<save-entry>ssave message/attachment to a mailbox/file
<undelete-entry>uundelete the current entry
<view-attach><Enter>view attachment using mailcap entry if necessary
<view-attach><Keypadenter>view attachment using mailcap entry if necessary
<view-attach><Return>view attachment using mailcap entry if necessary
<view-mailcap>mforce viewing of attachment using mailcap
<view-pager> view attachment in pager using copiousoutput mailcap entry
<view-text>Tview attachment as text

4.7. Compose Menu

Table 9.8. Default Compose Menu Bindings

FunctionDefault keyDescription
<attach-file>aattach file(s) to this message
<attach-key>Esc kattach a PGP public key
<attach-message>Aattach message(s) to this message
<autocrypt-menu>oshow autocrypt compose menu options
<copy-file>Csave message/attachment to a mailbox/file
<detach-file>Ddelete the current entry
<display-toggle-weed>hdisplay message and toggle header weeding
<edit-bcc>bedit the BCC list
<edit-cc>cedit the CC list
<edit-description>dedit attachment description
<edit-encoding>^Eedit attachment transfer-encoding
<edit-fcc>fenter a file to save a copy of this message in
<edit-file>^X eedit the file to be attached
<edit-from>Esc fedit the from field
<edit-headers>Eedit the message with headers
<edit-message>eedit the message
<edit-mime>medit attachment using mailcap entry
<edit-reply-to>redit the Reply-To field
<edit-subject>sedit the subject of this message
<edit-to>tedit the TO list
<edit-type>^Tedit attachment content type
<filter-entry>Ffilter attachment through a shell command
<forget-passphrase>^Fwipe passphrase(s) from memory
<get-attachment>Gget a temporary copy of an attachment
<ispell>irun ispell on the message
<mix>Msend the message through a mixmaster remailer chain
<move-down> move attachment down in compose menu list
<move-up> move attachment up in compose menu list
<new-mime>ncompose new attachment using mailcap entry
<pgp-menu>pshow PGP options
<pipe-entry>|pipe message/attachment to a shell command
<postpone-message>Psave this message to send later
<print-entry>lprint the current entry
<rename-attachment>^Osend attachment with a different name
<rename-file>Rrename/move an attached file
<send-message>ysend the message
<smime-menu>Sshow S/MIME options
<tag-entry>Ttag the current entry
<toggle-disposition>^Dtoggle disposition between inline/attachment
<toggle-recode> toggle recoding of this attachment
<toggle-unlink>utoggle whether to delete file after sending it
<update-encoding>Uupdate an attachment's encoding info
<view-alt>vview multipart/alternative
<view-alt-mailcap>Vview multipart/alternative using mailcap
<view-alt-pager> view multipart/alternative in pager using copiousoutput mailcap entry
<view-alt-text>Esc vview multipart/alternative as text
<view-attach><Enter>view attachment using mailcap entry if necessary
<view-attach><Keypadenter>view attachment using mailcap entry if necessary
<view-attach><Return>view attachment using mailcap entry if necessary
<view-mailcap> force viewing of attachment using mailcap
<view-pager> view attachment in pager using copiousoutput mailcap entry
<view-text> view attachment as text
<write-fcc>wwrite the message to a folder

4.8. Postpone Menu

Table 9.9. Default Postpone Menu Bindings

FunctionDefault keyDescription
<delete-entry>ddelete the current entry
<undelete-entry>uundelete the current entry

4.9. Browser Menu

Table 9.10. Default Browser Menu Bindings

FunctionDefault keyDescription
<buffy-list>.list mailboxes with new mail
<change-dir>cchange directories
<check-new> check mailboxes for new mail
<create-mailbox>Ccreate a new mailbox (IMAP only)
<delete-mailbox>ddelete the current mailbox (IMAP only)
<descend-directory> descend into a directory
<display-filename>@display the currently selected file's name
<enter-mask>menter a file mask
<rename-mailbox>rrename the current mailbox (IMAP only)
<select-new>Nselect a new file in this directory
<sort>osort messages
<sort-reverse>Osort messages in reverse order
<subscribe>ssubscribe to current mailbox (IMAP only)
<toggle-mailboxes><Tab>toggle whether to browse mailboxes or all files
<toggle-subscribed>Ttoggle view all/subscribed mailboxes (IMAP only)
<unsubscribe>uunsubscribe from current mailbox (IMAP only)
<view-file><Space>view file

4.10. Pgp Menu

Table 9.11. Default Pgp Menu Bindings

FunctionDefault keyDescription
<verify-key>cverify a PGP public key
<view-name>%view the key's user id

4.11. Smime Menu

Table 9.12. Default Smime Menu Bindings

FunctionDefault keyDescription
<verify-key>cverify a PGP public key
<view-name>%view the key's user id

4.12. Mixmaster Menu

Table 9.13. Default Mixmaster Menu Bindings

FunctionDefault keyDescription
<accept><Enter>accept the chain constructed
<accept><Keypadenter>accept the chain constructed
<accept><Return>accept the chain constructed
<append>aappend a remailer to the chain
<chain-next><Right>select the next element of the chain
<chain-next>lselect the next element of the chain
<chain-prev><Left>select the previous element of the chain
<chain-prev>hselect the previous element of the chain
<delete>ddelete a remailer from the chain
<insert>iinsert a remailer into the chain
<select-entry><Space>select the current entry

4.13. Editor Menu

Table 9.14. Default Editor Menu Bindings

FunctionDefault keyDescription
<backspace><Backspace>delete the char in front of the cursor
<backspace><Delete>delete the char in front of the cursor
<backward-char><Left>move the cursor one character to the left
<backward-char>^Bmove the cursor one character to the left
<backward-word>Esc bmove the cursor to the beginning of the word
<bol><Home>jump to the beginning of the line
<bol>^Ajump to the beginning of the line
<buffy-cycle><Space>cycle among incoming mailboxes
<capitalize-word>Esc ccapitalize the word
<complete><Tab>complete filename or alias
<complete-query>^Tcomplete address with query
<delete-char>^Ddelete the char under the cursor
<downcase-word>Esc lconvert the word to lower case
<eol><End>jump to the end of the line
<eol>^Ejump to the end of the line
<forward-char><Right>move the cursor one character to the right
<forward-char>^Fmove the cursor one character to the right
<forward-word>Esc fmove the cursor to the end of the word
<history-down><Down>scroll down through the history list
<history-down>^Nscroll down through the history list
<history-search>^Rsearch through the history list
<history-up><Up>scroll up through the history list
<history-up>^Pscroll up through the history list
<kill-eol>^Kdelete chars from cursor to end of line
<kill-eow>Esc ddelete chars from the cursor to the end of the word
<kill-line>^Udelete all chars on the line
<kill-word>^Wdelete the word in front of the cursor
<quote-char>^Vquote the next typed key
<transpose-chars> transpose character under cursor with previous
<upcase-word>Esc uconvert the word to upper case

4.14. Autocrypt Account Menu

Table 9.15. Default Autocrypt Account Menu Bindings

FunctionDefault keyDescription
<create-account>ccreate a new autocrypt account
<delete-account>Ddelete the current account
<toggle-active>atoggle the current account active/inactive
<toggle-prefer-encrypt>ptoggle the current account prefer-encrypt flag

4.15. List Menu

Table 9.16. Default List Menu Bindings

FunctionDefault keyDescription
<list-archive>aretrieve list archive information
<list-help>hretrieve list help
<list-owner>ocontact list owner
<list-post>ppost to mailing list
<list-subscribe>ssubscribe to mailing list
<list-unsubscribe>uunsubscribe from mailing list

mutt-2.3.2/doc/miscellany.html0000644000175000017500000002545015173276637014515 0ustar00kjmkjm Chapter 10. Miscellany

Chapter 10. Miscellany

1. Acknowledgements

Kari Hurtta co-developed the original MIME parsing code back in the ELM-ME days.

The following people have been very helpful to the development of Mutt:

2. About This Document

This document was written in DocBook, and then rendered using the Gnome XSLT toolkit.

mutt-2.3.2/doc/mutt.info0000644000175000017500000255653615173276641013350 0ustar00kjmkjmThis is mutt.info, produced by makeinfo version 7.3 from mutt.texi. INFO-DIR-SECTION Email-software START-INFO-DIR-ENTRY * The Mutt E-Mail Client: (mutt). Text based mail reader END-INFO-DIR-ENTRY  File: mutt.info, Node: Top, Next: Introduction, Up: (dir) The Mutt E-Mail Client ********************** * Menu: * Introduction:: * Getting Started:: * Configuration:: * Advanced Usage:: * Mutt's MIME Support:: * Optional Features:: * Security Considerations:: * Performance Tuning:: * Reference:: * Miscellany: Miscellany <1>. — The Detailed Node Listing — Introduction * Mutt Home Page:: * Mailing Lists:: * Getting Mutt:: * Mutt Online Resources:: * Contributing to Mutt:: * Typographical Conventions:: * Copyright:: Getting Started * Core Concepts:: * Screens and Menus:: * Moving Around in Menus:: * Editing Input Fields:: * Reading Mail:: * Sending Mail:: * Forwarding and Bouncing Mail:: * Postponing Mail:: * Encryption and Signing:: Configuration * Location of Initialization Files:: * Starter Muttrc:: * Syntax of Initialization Files:: * Address Groups:: * Defining/Using Aliases:: * Changing the Default Key Bindings:: * Changing the current working directory:: * Defining Aliases for Character Sets:: * Setting Variables Based Upon Mailbox:: * Keyboard Macros:: * Using Color and Mono Video Attributes:: * Message Header Display:: * Alternative Addresses:: * Mailing Lists: Mailing Lists <1>. * Using Multiple Spool Mailboxes:: * Monitoring Incoming Mail:: * User-Defined Headers:: * Specify Default Save Mailbox:: * Specify Default Fcc; Mailbox When Composing:: * Specify Default Save Filename and Default Fcc; Mailbox at Once:: * Change Settings Based Upon Message Recipients:: * Change Settings Before Formatting a Message:: * Choosing the Cryptographic Key of the Recipient:: * Dynamically Changing $index_format using Patterns:: * Adding Key Sequences to the Keyboard Buffer:: * Executing Functions:: * Message Scoring:: * Spam Detection:: * Setting and Querying Variables:: * Reading Initialization Commands From Another File:: * Removing Hooks:: * Format Strings:: * Control allowed header fields in a mailto; URL:: Advanced Usage * Character Set Handling:: * Regular Expressions:: * Patterns; Searching, Limiting and Tagging: Patterns; Searching; Limiting and Tagging. * Marking Messages:: * Using Tags:: * Using Hooks:: * Managing the Environment:: * External Address Queries:: * Mailbox Formats:: * Mailbox Shortcuts:: * Handling Mailing Lists:: * Display Munging:: * New Mail Detection:: * Editing Threads:: * Delivery Status Notification (DSN) Support: Delivery Status Notification [DSN] Support. * Start a WWW Browser on URLs:: * Echoing Text:: * Message Composition Flow:: * Batch Composition Flow:: * Using MuttLisp (EXPERIMENTAL): Using MuttLisp [EXPERIMENTAL]. * Miscellany:: Mutt's MIME Support * Using MIME in Mutt:: * MIME Type Configuration with mime.types: MIME Type Configuration with mime_types. * MIME Viewer Configuration with Mailcap:: * MIME Autoview:: * MIME Multipart/Alternative:: * Attachment Searching and Counting:: * MIME Lookup:: Optional Features * General Notes:: * SSL/TLS Support:: * POP3 Support:: * IMAP Support:: * SMTP Support:: * OAUTHBEARER Support:: * Managing Multiple Accounts:: * Local Caching:: * Exact Address Generation:: * Sending Anonymous Messages via Mixmaster:: * Sidebar: Sidebar <1>. * Compressed Folders Feature:: * Autocrypt:: Security Considerations * Passwords:: * Temporary Files:: * Information Leaks:: * External Applications:: Performance Tuning * Reading and Writing Mailboxes:: * Reading Messages from Remote Folders:: * Searching and Limiting:: Reference * Command-Line Options:: * Configuration Commands:: * Configuration Variables:: * Functions: Functions <1>. Miscellany * Acknowledgements:: * About This Document::  File: mutt.info, Node: Introduction, Next: Getting Started, Prev: Top, Up: Top 1 Introduction ************** *Mutt* is a small but very powerful text-based MIME mail client. Mutt is highly configurable, and is well suited to the mail power user with advanced features like key bindings, keyboard macros, mail threading, regular expression searches and a powerful pattern matching language for selecting groups of messages. * Menu: * Mutt Home Page:: * Mailing Lists:: * Getting Mutt:: * Mutt Online Resources:: * Contributing to Mutt:: * Typographical Conventions:: * Copyright::  File: mutt.info, Node: Mutt Home Page, Next: Mailing Lists, Up: Introduction 1.1 Mutt Home Page ================== The official homepage can be found at http://www.mutt.org/ (http://www.mutt.org/).  File: mutt.info, Node: Mailing Lists, Next: Getting Mutt, Prev: Mutt Home Page, Up: Introduction 1.2 Mailing Lists ================= To subscribe to one of the following mailing lists, send a message with the word _subscribe_ in the body to _list-name_‘-request@mutt.org’. • — low traffic list for announcements • — users help users • — patches, bug reports, feature requests All messages posted to _mutt-announce_ are automatically forwarded to _mutt-users_, so you do not need to be subscribed to both lists. NOTE: You MUST be subscribed to a list in order to post to it. This is not to make your life harder, but to reduce SPAM and/or UCE. The mailing list software being used is GNU Mailman, with its implied deficiencies.  File: mutt.info, Node: Getting Mutt, Next: Mutt Online Resources, Prev: Mailing Lists, Up: Introduction 1.3 Getting Mutt ================ Mutt releases can be downloaded from ftp://ftp.mutt.org/pub/mutt/ (ftp://ftp.mutt.org/pub/mutt/). For a list of mirror sites, please refer to http://www.mutt.org/download.html (http://www.mutt.org/download.html). For version control access, please refer to the Mutt development site (https://gitlab.com/muttmua/mutt).  File: mutt.info, Node: Mutt Online Resources, Next: Contributing to Mutt, Prev: Getting Mutt, Up: Introduction 1.4 Mutt Online Resources ========================= Bug Tracking System The official Mutt bug tracking system (not for feature requests) can be found at https://gitlab.com/muttmua/mutt/issues (https://gitlab.com/muttmua/mutt/issues) Wiki An (unofficial) wiki can be found at https://gitlab.com/muttmua/mutt/wikis/home (https://gitlab.com/muttmua/mutt/wikis/home). IRC For the IRC user community, visit channel _#mutt_ on irc.libera.chat (https://libera.chat/). USENET For USENET, see the newsgroup comp.mail.mutt (news:comp.mail.mutt).  File: mutt.info, Node: Contributing to Mutt, Next: Typographical Conventions, Prev: Mutt Online Resources, Up: Introduction 1.5 Contributing to Mutt ======================== There are various ways to contribute to the Mutt project. Especially for new users it may be helpful to meet other new and experienced users to chat about Mutt, talk about problems and share tricks. Since translations of Mutt into other languages are highly appreciated, the Mutt developers always look for skilled translators that help improve and continue to maintain stale translations. For contributing code patches for new features and bug fixes, please refer to the developer pages at https://gitlab.com/muttmua/mutt (https://gitlab.com/muttmua/mutt) for more details.  File: mutt.info, Node: Typographical Conventions, Next: Copyright, Prev: Contributing to Mutt, Up: Introduction 1.6 Typographical Conventions ============================= This section lists typographical conventions followed throughout this manual. See table *note Typographical conventions for special terms:: for typographical conventions for special terms. *Typographical conventions for special terms* Item Refers to... ‘printf(3)’ UNIX manual pages, execute ‘man 3 printf’ ‘’ named keys ‘’ named Mutt function ‘^G’ Control+G key combination $mail_check Mutt configuration option ‘$HOME’ environment variable Examples are presented as: mutt -v Within command synopsis, curly brackets (‘{}’) denote a set of options of which one is mandatory, square brackets (‘[]’) denote optional arguments, three dots denote that the argument may be repeated arbitrary times.  File: mutt.info, Node: Copyright, Prev: Typographical Conventions, Up: Introduction 1.7 Copyright ============= Mutt is Copyright © 1996-2026 Michael R. Elkins and others. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  File: mutt.info, Node: Getting Started, Next: Configuration, Prev: Introduction, Up: Top 2 Getting Started ***************** This section is intended as a brief overview of how to use Mutt. There are many other features which are described elsewhere in the manual. There is even more information available in the Mutt FAQ and various web pages. See the Mutt homepage (http://www.mutt.org/) for more details. The keybindings described in this section are the defaults as distributed. Your local system administrator may have altered the defaults for your site. You can always type ‘?’ in any menu to display the current bindings. The first thing you need to do is invoke Mutt, simply by typing ‘mutt’ at the command line. There are various command-line options, see either the Mutt man page or the reference (*note Command-Line Options::). * Menu: * Core Concepts:: * Screens and Menus:: * Moving Around in Menus:: * Editing Input Fields:: * Reading Mail:: * Sending Mail:: * Forwarding and Bouncing Mail:: * Postponing Mail:: * Encryption and Signing::  File: mutt.info, Node: Core Concepts, Next: Screens and Menus, Up: Getting Started 2.1 Core Concepts ================= Mutt is a text-based application which interacts with users through different menus which are mostly line-/entry-based or page-based. A line-based menu is the so-called ‘index’ menu (listing all messages of the currently opened folder) or the ‘alias’ menu (allowing you to select recipients from a list). Examples for page-based menus are the ‘pager’ (showing one message at a time) or the ‘help’ menu listing all available key bindings. The user interface consists of a context sensitive help line at the top, the menu's contents followed by a context sensitive status line and finally the command line. The command line is used to display informational and error messages as well as for prompts and for entering interactive commands. Mutt is configured through variables which, if the user wants to permanently use a non-default value, are written to configuration files. Mutt supports a rich config file syntax to make even complex configuration files readable and commentable. Because Mutt allows for customizing almost all key bindings, there are so-called ‘functions’ which can be executed manually (using the command line) or in macros. Macros allow the user to bind a sequence of commands to a single key or a short key sequence instead of repeating a sequence of actions over and over. Many commands (such as saving or copying a message to another folder) can be applied to a single message or a set of messages (so-called ‘tagged’ messages). To help selecting messages, Mutt provides a rich set of message patterns (such as recipients, sender, body contents, date sent/received, etc.) which can be combined into complex expressions using the boolean _and_ and _or_ operations as well as negating. These patterns can also be used to (for example) search for messages or to limit the index to show only matching messages. Mutt supports a ‘hook’ concept which allows the user to execute arbitrary configuration commands and functions in certain situations such as entering a folder, starting a new message or replying to an existing one. These hooks can be used to highly customize Mutt's behavior including managing multiple identities, customizing the display for a folder or even implementing auto-archiving based on a per-folder basis and much more. Besides an interactive mode, Mutt can also be used as a command-line tool to send messages. It also supports a ‘mailx(1)’-compatible interface, see *note Command line options:: for a complete list of command-line options.  File: mutt.info, Node: Screens and Menus, Next: Moving Around in Menus, Prev: Core Concepts, Up: Getting Started 2.2 Screens and Menus ===================== * Menu: * Index:: * Pager:: * File Browser:: * Sidebar:: * Help:: * Compose Menu:: * Alias Menu:: * Attachment Menu:: * List Menu::  File: mutt.info, Node: Index, Next: Pager, Up: Screens and Menus 2.2.1 Index ----------- The index is the screen that you usually see first when you start Mutt. It gives an overview over your emails in the currently opened mailbox. By default, this is your system mailbox. The information you see in the index is a list of emails, each with its number on the left, its flags (new email, important email, email that has been forwarded or replied to, tagged email, ...), the date when email was sent, its sender, the email size, and the subject. Additionally, the index also shows thread hierarchies: when you reply to an email, and the other person replies back, you can see the other person's email in a "sub-tree" below. This is especially useful for personal email between a group of people or when you've subscribed to mailing lists.  File: mutt.info, Node: Pager, Next: File Browser, Prev: Index, Up: Screens and Menus 2.2.2 Pager ----------- The pager is responsible for showing the email content. On the top of the pager you have an overview over the most important email headers like the sender, the recipient, the subject, and much more information. How much information you actually see depends on your configuration, which we'll describe below. Below the headers, you see the email body which usually contains the message. If the email contains any attachments, you will see more information about them below the email body, or, if the attachments are text files, you can view them directly in the pager. To give the user a good overview, it is possible to configure Mutt to show different things in the pager with different colors. Virtually everything that can be described with a regular expression can be colored, e.g. URLs, email addresses or smileys.  File: mutt.info, Node: File Browser, Next: Sidebar, Prev: Pager, Up: Screens and Menus 2.2.3 File Browser ------------------ The file browser is the interface to the local or remote file system. When selecting a mailbox to open, the browser allows custom sorting of items, limiting the items shown by a regular expression and a freely adjustable format of what to display in which way. It also allows for easy navigation through the file system when selecting file(s) to attach to a message, select multiple files to attach and many more. Some mail systems can nest mail folders inside other mail folders. The normal open entry commands in mutt will open the mail folder and you can't see the sub-folders. If you instead use the ‘’ function it will go into the directory and not open it as a mail directory.  File: mutt.info, Node: Sidebar, Next: Help, Prev: File Browser, Up: Screens and Menus 2.2.4 Sidebar ------------- The Sidebar shows a list of all your mailboxes. The list can be turned on and off, it can be themed and the list style can be configured.  File: mutt.info, Node: Help, Next: Compose Menu, Prev: Sidebar, Up: Screens and Menus 2.2.5 Help ---------- The help screen is meant to offer a quick help to the user. It lists the current configuration of key bindings and their associated commands including a short description, and currently unbound functions that still need to be associated with a key binding (or alternatively, they can be called via the Mutt command prompt).  File: mutt.info, Node: Compose Menu, Next: Alias Menu, Prev: Help, Up: Screens and Menus 2.2.6 Compose Menu ------------------ The compose menu features a split screen containing the information which really matter before actually sending a message by mail: who gets the message as what (recipients and who gets what kind of copy). Additionally, users may set security options like deciding whether to sign, encrypt or sign and encrypt a message with/for what keys. Also, it's used to attach messages, to re-edit any attachment including the message itself.  File: mutt.info, Node: Alias Menu, Next: Attachment Menu, Prev: Compose Menu, Up: Screens and Menus 2.2.7 Alias Menu ---------------- The alias menu is used to help users finding the recipients of messages. For users who need to contact many people, there's no need to remember addresses or names completely because it allows for searching, too. The alias mechanism and thus the alias menu also features grouping several addresses by a shorter nickname, the actual alias, so that users don't have to select each single recipient manually.  File: mutt.info, Node: Attachment Menu, Next: List Menu, Prev: Alias Menu, Up: Screens and Menus 2.2.8 Attachment Menu --------------------- As will be later discussed in detail, Mutt features a good and stable MIME implementation, that is, it supports sending and receiving messages of arbitrary MIME types. The attachment menu displays a message's structure in detail: what content parts are attached to which parent part (which gives a true tree structure), which type is of what type and what size. Single parts may saved, deleted or modified to offer great and easy access to message's internals.  File: mutt.info, Node: List Menu, Prev: Attachment Menu, Up: Screens and Menus 2.2.9 List Menu --------------- The list menu assists with operations on mailing lists. RFC 2369 defines several interactions with mailing lists and list memberships that can be specified within the email message: subscribe, unsubscribe, contact the list owner, etc. When you invoke the list menu, these interactions are made accessible as menu options.  File: mutt.info, Node: Moving Around in Menus, Next: Editing Input Fields, Prev: Screens and Menus, Up: Getting Started 2.3 Moving Around in Menus ========================== The most important navigation keys common to line- or entry-based menus are shown in *note Most common navigation keys in entry-based menus:: and in *note Most common navigation keys in page-based menus:: for page-based menus. *Most common navigation keys in entry-based menus* Key Function Description j or ‘’ move to the next entry k or ‘’ move to the previous entry z or ‘’ go to the next page Z or ‘’ go to the previous page = or ‘’ jump to the first entry * or ‘’ jump to the last entry q ‘’ exit the current menu ? ‘’ list all keybindings for the current menu *Most common navigation keys in page-based menus* Key Function Description J or ‘’ scroll down one line ‘’ scroll up one line K, or ‘’ move to the next page - or ‘’ move the previous page ‘’ move to the top ‘’ move to the bottom  File: mutt.info, Node: Editing Input Fields, Next: Reading Mail, Prev: Moving Around in Menus, Up: Getting Started 2.4 Editing Input Fields ======================== * Menu: * Introduction: Introduction <1>. * Buffy Cycle:: * History::  File: mutt.info, Node: Introduction <1>, Next: Buffy Cycle, Up: Editing Input Fields 2.4.1 Introduction ------------------ Mutt has a built-in line editor for inputting text, e.g. email addresses or filenames. The keys used to manipulate text input are very similar to those of Emacs. See *note Editor Menu:: for a full reference of available functions, their default key bindings, and short descriptions. *Most common line editor keys* Key Function Description ^A or ‘’ move to the start of the line ^B or ‘’ move back one char Esc B ‘’ move back one word ‘’ cycle among incoming mailboxes ^D or ‘’ delete the char under the cursor ^E or ‘’ move to the end of the line ^F or ‘’ move forward one char Esc F ‘’ move forward one word ‘’ complete filename, alias, or label ^T ‘’ complete address with query ^K ‘’ delete to the end of the line Esc d ‘’ delete to the end of the word ^W ‘’ kill the word in front of the cursor ^U ‘’ delete entire line ^V ‘’ quote the next typed key ‘’ recall previous string from history ‘’ recall next string from history ^R ‘’ use current input to search history ‘’ kill the char in front of the cursor Esc u ‘’ convert word to upper case Esc l ‘’ convert word to lower case Esc c ‘’ capitalize the word ^G n/a abort n/a finish editing ‘^G’ is the generic ‘abort’ key in Mutt. In addition to the line editor, it can also be used to abort prompts. Generally, typing ‘^G’ at a confirmation prompt or line editor should abort the entire action. You can remap the _editor_ functions using the ‘bind’ (*note Changing the Default Key Bindings::) command. For example, to make the key delete the character in front of the cursor rather than under, you could use: bind editor backspace  File: mutt.info, Node: Buffy Cycle, Next: History, Prev: Introduction <1>, Up: Editing Input Fields 2.4.2 Buffy Cycle ----------------- The ‘’ function key binding is enabled in the prompt for ‘’ or ‘’. Typing the key will cycle through mailboxes with new mail. In other prompts for a mailbox or a file (such as for saving an attachment), the key binding instead invokes the ‘’ function. In either case, if you need to type the key literally (e.g. you need to enter a file name with a space in it), use the ‘’ function. For example, with the default key bindings, by typing ‘‘^V’’ and then ‘‘’’. In all other input fields, the ‘’ key binding is ignored; typing the key simply adds it to the input field text.  File: mutt.info, Node: History, Prev: Buffy Cycle, Up: Editing Input Fields 2.4.3 History ------------- Mutt maintains a history for the built-in editor. The number of items is controlled by the $history (*note history::) variable and can be made persistent using an external file specified using $history_file (*note history_file::) and $save_history (*note save_history::). You may cycle through them at an editor prompt by using the ‘’ and/or ‘’ commands. Mutt will remember the currently entered text as you cycle through history, and will wrap around to the initial entry line. Mutt maintains several distinct history lists, one for each of the following categories: • ‘.muttrc’ commands • addresses and aliases • shell commands • filenames • mailboxes • patterns • everything else Mutt automatically filters out consecutively repeated items from the history. If $history_remove_dups (*note history_remove_dups::) is set, all repeated items are removed from the history. It also mimics the behavior of some shells by ignoring items starting with a space. The latter feature can be useful in macros to not clobber the history's valuable entries with unwanted entries.  File: mutt.info, Node: Reading Mail, Next: Sending Mail, Prev: Editing Input Fields, Up: Getting Started 2.5 Reading Mail ================ Similar to many other mail clients, there are two modes in which mail is read in Mutt. The first is a list of messages in the mailbox, which is called the ‘index’ menu in Mutt. The second mode is the display of the message contents. This is called the ‘pager.’ The next few sections describe the functions provided in each of these modes. * Menu: * The Message Index:: * The Pager:: * Threaded Mode:: * Miscellaneous Functions::  File: mutt.info, Node: The Message Index, Next: The Pager, Up: Reading Mail 2.5.1 The Message Index ----------------------- Common keys used to navigate through and manage messages in the index are shown in *note Most common message index keys::. How messages are presented in the index menu can be customized using the $index_format (*note index_format::) variable. *Most common message index keys* Key Description c change to a different mailbox Esc c change to a folder in read-only mode C copy the current message to another mailbox Esc C decode a message and copy it to a folder Esc s decode a message and save it to a folder D delete messages matching a pattern d delete the current message F mark as important l show messages matching a pattern N mark message as new o change the current sort method O reverse sort the mailbox q save changes and exit s save-message T tag messages matching a pattern t toggle the tag on a message Esc t toggle tag on entire message thread U undelete messages matching a pattern u undelete-message v view-attachments x abort changes and exit display-message jump to the next new or unread message @ show the author's full e-mail address $ save changes to mailbox / search Esc / search-reverse ^L clear and redraw the screen ^T untag messages matching a pattern In addition to who sent the message and the subject, a short summary of the disposition of each message is printed beside the message number. Zero or more of the ‘flags’ in *note Message status flags:: may appear, some of which can be turned on or off using these functions: ‘’ and ‘’ bound by default to ‘w’ and ‘W’ respectively. Furthermore, the flags in *note Message recipient flags:: reflect who the message is addressed to. They can be customized with the $to_chars (*note to_chars::) variable. *Message status flags* Flag Description D message is deleted (is marked for deletion) d message has attachments marked for deletion K contains a PGP public key N message is new O message is old P message is PGP encrypted r message has been replied to S message is signed, and the signature is successfully verified s message is signed ! message is flagged * message is tagged n thread contains new messages (only if collapsed) o thread contains old messages (only if collapsed) *Message recipient flags* Flag Description + message is to you and you only T message is to you, but also to or CC'ed to others C message is CC'ed to you F message is from you L message is sent to a subscribed mailing list  File: mutt.info, Node: The Pager, Next: Threaded Mode, Prev: The Message Index, Up: Reading Mail 2.5.2 The Pager --------------- By default, Mutt uses its built-in pager to display the contents of messages (an external pager such as ‘less(1)’ can be configured, see $pager (*note pager::) variable). The pager is very similar to the Unix program ‘less(1)’ though not nearly as featureful. *Most common pager keys* Key Description go down one line display the next page (or next message if at the end of a message) - go back to the previous page n search for next match S skip beyond quoted text T toggle display of quoted text ? show keybindings / regular expression search Esc / backward regular expression search \ toggle highlighting of search matches ^ jump to the top of the message In addition to key bindings in *note Most common pager keys::, many of the functions from the index menu are also available in the pager, such as ‘’ or ‘’ (this is one advantage over using an external pager to view messages). Also, the internal pager supports a couple other advanced features. For one, it will accept and translate the ‘standard’ nroff sequences for bold and underline. These sequences are a series of either the letter, backspace (‘^H’), the letter again for bold or the letter, backspace, ‘_’ for denoting underline. Mutt will attempt to display these in bold and underline respectively if your terminal supports them. If not, you can use the bold and underline color (*note Using Color and Mono Video Attributes::) objects to specify a ‘color’ or mono attribute for them. Additionally, the internal pager supports the ANSI escape sequences for character attributes. Mutt translates them into the correct color and character settings. The sequences Mutt supports are: \e[Ps;Ps;..Ps;m where _Ps_ can be one of the codes shown in *note ANSI escape sequences::. *ANSI escape sequences* Escape code Description 0 All attributes off 1 Bold on 4 Underline on 5 Blink on 7 Reverse video on 3__ Foreground color is __ (see *note Color sequences::) 4__ Background color is __ (see *note Color sequences::) 38;5;__ Foreground color is an 8-bit __ 48;5;__ Background color is an 8-bit __ *Color sequences* Color code Color 0 Black 1 Red 2 Green 3 Yellow 4 Blue 5 Magenta 6 Cyan 7 White Mutt uses these attributes for handling ‘text/enriched’ messages, and they can also be used by an external autoview (*note MIME Autoview::) script for highlighting purposes. *Note* If you change the colors for your display, for example by changing the color associated with color2 for your xterm, then that color will be used instead of green. *Note* Note that the search commands in the pager take regular expressions, which are not quite the same as the more complex patterns (*note Patterns; Searching; Limiting and Tagging::) used by the search command in the index. This is because patterns are used to select messages by criteria whereas the pager already displays a selected message.  File: mutt.info, Node: Threaded Mode, Next: Miscellaneous Functions, Prev: The Pager, Up: Reading Mail 2.5.3 Threaded Mode ------------------- So-called ‘threads’ provide a hierarchy of messages where replies are linked to their parent message(s). This organizational form is extremely useful in mailing lists where different parts of the discussion diverge. Mutt displays threads as a tree structure. In Mutt, when a mailbox is sorted (*note sort::) by _threads_, there are a few additional functions available in the _index_ and _pager_ modes as shown in *note Most common thread mode keys::. *Most common thread mode keys* Key Function Description ^D ‘’ delete all messages in the current thread ^U ‘’ undelete all messages in the current thread ^N ‘’ jump to the start of the next thread ^P ‘’ jump to the start of the previous thread ^R ‘’ mark the current thread as read Esc d ‘’ delete all messages in the current subthread Esc u ‘’ undelete all messages in the current subthread Esc n ‘’ jump to the start of the next subthread Esc p ‘’ jump to the start of the previous subthread Esc r ‘’ mark the current subthread as read Esc t ‘’ toggle the tag on the current thread Esc v ‘’ toggle collapse for the current thread Esc V ‘’ toggle collapse for all threads P ‘’ jump to parent message in thread In the _index_, the subject of threaded children messages will be prepended with thread tree characters. By default, the subject itself will not be duplicated unless $hide_thread_subject (*note hide_thread_subject::) is unset. Special characters will be added to the thread tree as detailed in *note Special Thread Characters::. *Special Thread Characters* Character Description Notes & hidden message see $hide_limited (*note hide_limited::) and $hide_top_limited (*note hide_top_limited::) ? missing message see $hide_missing (*note hide_missing::) and $hide_top_missing (*note hide_top_missing::) * pseudo thread see $strict_threads (*note strict_threads::); not displayed when $narrow_tree (*note narrow_tree::) is set = duplicate thread see $duplicate_threads (*note duplicate_threads::); not displayed when $narrow_tree (*note narrow_tree::) is set Collapsing a thread displays only the first message in the thread and hides the others. This is useful when threads contain so many messages that you can only see a handful of threads on the screen. See %M in $index_format (*note index_format::). For example, you could use ‘%?M?(#%03M)&(%4l)?’ in $index_format (*note index_format::) to optionally display the number of hidden messages if the thread is collapsed. The ‘%??&?’ syntax is explained in detail in format string conditionals (*note Conditionals::). Technically, every reply should contain a list of its parent messages in the thread tree, but not all do. In these cases, Mutt groups them by subject which can be controlled using the $strict_threads (*note strict_threads::) variable.  File: mutt.info, Node: Miscellaneous Functions, Prev: Threaded Mode, Up: Reading Mail 2.5.4 Miscellaneous Functions ----------------------------- In addition, the _index_ and _pager_ menus have these interesting functions: ‘’ Calculate statistics for all monitored mailboxes declared using the ‘mailboxes’ command. It will calculate statistics despite $mail_check_stats (*note mail_check_stats::) being unset. ‘’(default: a) Creates a new alias based upon the current message (or prompts for a new one). Once editing is complete, an ‘alias’ (*note Defining/Using Aliases::) command is added to the file specified by the $alias_file (*note alias_file::) variable for future use *Note* Mutt does not read the $alias_file (*note alias_file::) upon startup so you must explicitly ‘source’ (*note Reading Initialization Commands From Another File::) the file. ‘’(default: Esc P) This function will search the current message for content signed or encrypted with PGP the ‘traditional’ way, that is, without proper MIME tagging. Technically, this function will temporarily change the MIME content types of the body parts containing PGP data; this is similar to the ‘’ (*note edit-type::) function's effect. ‘’(default: e) This command (available in the index and pager) allows you to edit the raw current message as it's present in the mail folder. After you have finished editing, the changed message will be appended to the current folder, and the original message will be marked for deletion; if the message is unchanged it won't be replaced. ‘’(default: ^E on the attachment menu, and in the pager and index menus; ^T on the compose menu) This command is used to temporarily edit an attachment's content type to fix, for instance, bogus character set parameters. When invoked from the index or from the pager, you'll have the opportunity to edit the top-level attachment's content type. On the attachment menu (*note The Attachment Menu::), you can change any attachment's content type. These changes are not persistent, and get lost upon changing folders. Note that this command is also available on the compose menu (*note The Compose Menu::). There, it's used to fine-tune the properties of attachments you are going to send. ‘’(default: ‘:’) This command is used to execute any command you would normally put in a configuration file. A common use is to check the settings of variables, or in conjunction with macros (*note Keyboard Macros::) to change settings on the fly. ‘’(default: ^K) This command extracts PGP public keys from the current or tagged message(s) and adds them to your PGP public key ring. ‘’(default: ^F) This command wipes the passphrase(s) from memory. It is useful, if you misspelled the passphrase. ‘’(default: L) Reply to the current or tagged message(s) by extracting any addresses which match the regular expressions given by the ‘lists’ or ‘subscribe’ (*note Mailing Lists <1>::) commands, but also honor any ‘Mail-Followup-To’ header(s) if the $honor_followup_to (*note honor_followup_to::) configuration variable is set. In addition, the ‘List-Post’ header field is examined for ‘mailto:’ URLs specifying a mailing list address. Using this when replying to messages posted to mailing lists helps avoid duplicate copies being sent to the author of the message you are replying to. ‘’(default: |) Asks for an external Unix command and pipes the current or tagged message(s) to it. The variables $pipe_decode (*note pipe_decode::), $pipe_decode_weed (*note pipe_decode_weed::), $pipe_split (*note pipe_split::), $pipe_sep (*note pipe_sep::) and $wait_key (*note wait_key::) control the exact behavior of this function. ‘’(default: Esc e) Mutt takes the current message as a template for a new message. This function is best described as "recall from arbitrary folders". It can conveniently be used to forward MIME messages while preserving the original mail structure. Note that the amount of headers included here depends on the value of the $weed (*note weed::) variable. This function is also available from the attachment menu. You can use this to easily resend a message which was included with a bounce message as a ‘message/rfc822’ body part. ‘’(default: !) Asks for an external Unix command and executes it. The $wait_key (*note wait_key::) can be used to control whether Mutt will wait for a key to be pressed when the command returns (presumably to let the user read the output of the command), based on the return status of the named command. If no command is given, an interactive shell is executed. ‘’(default: H) This function will skip past the headers of the current message. ‘’(default: S) This function will go to the next line of non-quoted text which comes after a line of quoted text in the internal pager. ‘’(default: T) The pager uses the $quote_regexp (*note quote_regexp::) variable to detect quoted text when displaying the body of the message. This function toggles the display of the quoted material in the message. It is particularly useful when being interested in just the response and there is a large amount of quoted text in the way.  File: mutt.info, Node: Sending Mail, Next: Forwarding and Bouncing Mail, Prev: Reading Mail, Up: Getting Started 2.6 Sending Mail ================ * Menu: * Introduction: Introduction <2>. * Editing the Message Header:: * Sending Cryptographically Signed/Encrypted Messages:: * Sending Format=Flowed Messages:: * Background Editing::  File: mutt.info, Node: Introduction <2>, Next: Editing the Message Header, Up: Sending Mail 2.6.1 Introduction ------------------ The bindings shown in *note Most common mail sending keys:: are available in the _index_ and _pager_ to start a new message. *Most common mail sending keys* Key Function Description m ‘’ compose a new message r ‘’ reply to sender g ‘’ reply to all recipients ‘’ reply to all recipients preserving To/Cc L ‘’ reply to mailing list address f ‘’ forward message b ‘’ bounce (remail) message Esc k ‘’ mail a PGP public key to someone _Bouncing_ a message sends the message as-is to the recipient you specify. _Forwarding_ a message allows you to add comments or modify the message you are forwarding. These items are discussed in greater detail in the next section ‘Forwarding and Bouncing Mail (*note Forwarding and Bouncing Mail::).’ Mutt will then enter the _compose_ menu and prompt you for the recipients to place on the ‘To:’ header field when you hit ‘m’ to start a new message. Next, it will ask you for the ‘Subject:’ field for the message, providing a default if you are replying to or forwarding a message. You again have the chance to adjust recipients, subject, and security settings right before actually sending the message. See also $askcc (*note askcc::), $askbcc (*note askbcc::), $autoedit (*note autoedit::), $bounce (*note bounce::), $fast_reply (*note fast_reply::), and $include (*note include::) for changing how and if Mutt asks these questions. When replying, Mutt fills these fields with proper values depending on the reply type. The types of replying supported are: Simple reply Reply to the author directly. Group reply Reply to the author; cc all other recipients; consults ‘alternates’ (*note Alternative Addresses::) and excludes you. Group Chat reply Reply to the author and other recipients in the To list; cc other recipients in the Cc list; consults ‘alternates’ (*note Alternative Addresses::) and excludes you. List reply Reply to all mailing list addresses found, either specified via configuration or auto-detected. See *note Mailing Lists: Mailing Lists <1>. for details. After getting recipients for new messages, forwards or replies, Mutt will then automatically start your $editor (*note editor::) on the message body. If the $edit_headers (*note edit_headers::) variable is set, the headers will be at the top of the message in your editor; the message body should start on a new line after the existing blank line at the end of headers. Any messages you are replying to will be added in sort order to the message, with appropriate $attribution (*note attribution::), $indent_string (*note indent_string::) and $post_indent_string (*note post_indent_string::). When forwarding a message, if the $mime_forward (*note mime_forward::) variable is unset, a copy of the forwarded message will be included. If you have specified a $signature (*note signature::), it will be appended to the message. Once you have finished editing the body of your mail message, you are returned to the _compose_ menu providing the functions shown in *note Most common compose menu keys:: to modify, send or postpone the message. *Most common compose menu keys* Key Function Description a ‘’ attach a file A ‘’ attach message(s) to the message Esc k ‘’ attach a PGP public key d ‘’ edit description on attachment D ‘’ detach a file t ‘’ edit the To field Esc f ‘’ edit the From field r ‘’ edit the Reply-To field c ‘’ edit the Cc field b ‘’ edit the Bcc field y ‘’ send the message s ‘’ edit the Subject S ‘’ select S/MIME options f ‘’ specify an ‘Fcc’ mailbox p ‘’ select PGP options P ‘’ postpone this message until later q ‘’ quit (abort) sending the message w ‘’ write the message to a folder i ‘’ check spelling (if available on your system) ^F ‘’ wipe passphrase(s) from memory The compose menu is also used to edit the attachments for a message which can be either files or other messages. The ‘’ function to will prompt you for a folder to attach messages from. You can now tag messages in that folder and they will be attached to the message you are sending. *Note* Note that certain operations like composing a new mail, replying, forwarding, etc. are not permitted when you are in that folder. The %r in $status_format (*note status_format::) will change to a ‘A’ to indicate that you are in attach-message mode. After exiting the compose menu via ‘’, the message will be sent. If configured and enabled, this can happen via mixmaster (*note Sending Anonymous Messages via Mixmaster::) or $smtp_url (*note SMTP Support::). Otherwise $sendmail (*note sendmail::) will be invoked. Prior to version 1.13, Mutt enabled $write_bcc (*note write_bcc::) by default, assuming the MTA would automatically remove a ‘Bcc:’ header as part of delivery. Starting with 1.13, the option is unset by default, but no longer affects the fcc copy of the message.  File: mutt.info, Node: Editing the Message Header, Next: Sending Cryptographically Signed/Encrypted Messages, Prev: Introduction <2>, Up: Sending Mail 2.6.2 Editing the Message Header -------------------------------- When editing the header because of $edit_headers (*note edit_headers::) being set, there are a several pseudo headers available which will not be included in sent messages but trigger special Mutt behavior. * Menu: * Fcc; Pseudo Header:: * Attach; Pseudo Header:: * Pgp; Pseudo Header:: * In-Reply-To; Header::  File: mutt.info, Node: Fcc; Pseudo Header, Next: Attach; Pseudo Header, Up: Editing the Message Header 2.6.2.1 Fcc: Pseudo Header .......................... If you specify ‘Fcc:’ _filename_ as a header, Mutt will pick up _filename_ just as if you had used the ‘’ function in the _compose_ menu. It can later be changed from the compose menu.  File: mutt.info, Node: Attach; Pseudo Header, Next: Pgp; Pseudo Header, Prev: Fcc; Pseudo Header, Up: Editing the Message Header 2.6.2.2 Attach: Pseudo Header ............................. You can also attach files to your message by specifying ‘Attach:’ _filename_ [ _description_ ] where _filename_ is the file to attach and _description_ is an optional string to use as the description of the attached file. Spaces in filenames have to be escaped using backslash (‘\’). The file can be removed as well as more added from the compose menu.  File: mutt.info, Node: Pgp; Pseudo Header, Next: In-Reply-To; Header, Prev: Attach; Pseudo Header, Up: Editing the Message Header 2.6.2.3 Pgp: Pseudo Header .......................... If you want to use PGP, you can specify ‘Pgp:’ [ ‘E’ | ‘S’ | ‘S’__ ] ‘E’ selects encryption, ‘S’ selects signing and ‘S’ selects signing with the given key, setting $pgp_sign_as (*note pgp_sign_as::) for the duration of the message composition session. The selection can later be changed in the compose menu.  File: mutt.info, Node: In-Reply-To; Header, Prev: Pgp; Pseudo Header, Up: Editing the Message Header 2.6.2.4 In-Reply-To: Header ........................... When replying to messages, the _In-Reply-To:_ header contains the Message-Id of the message(s) you reply to. If you remove or modify its value, Mutt will not generate a _References:_ field, which allows you to create a new message thread, for example to create a new message to a mailing list without having to enter the mailing list's address. If you intend to start a new thread by replying, please make really sure you remove the _In-Reply-To:_ header in your editor. Otherwise, though you'll produce a technically valid reply, some netiquette guardians will be annoyed by this so-called ‘thread hijacking’.  File: mutt.info, Node: Sending Cryptographically Signed/Encrypted Messages, Next: Sending Format=Flowed Messages, Prev: Editing the Message Header, Up: Sending Mail 2.6.3 Sending Cryptographically Signed/Encrypted Messages --------------------------------------------------------- If you have told Mutt to PGP or S/MIME encrypt a message, it will guide you through a key selection process when you try to send the message. Mutt will not ask you any questions about keys which have a certified user ID matching one of the message recipients' mail addresses. However, there may be situations in which there are several keys, weakly certified user ID fields, or where no matching keys can be found. In these cases, you are dropped into a menu with a list of keys from which you can select one. When you quit this menu, or Mutt can't find any matching keys, you are prompted for a user ID. You can, as usually, abort this prompt using ‘^G’. When you do so, Mutt will return to the compose screen. Once you have successfully finished the key selection, the message will be encrypted using the selected public keys when sent out. To ensure you can view encrypted messages you have sent, you may wish to set $pgp_self_encrypt (*note pgp_self_encrypt::) and $pgp_default_key (*note pgp_default_key::) for PGP, or $smime_self_encrypt (*note smime_self_encrypt::) and $smime_default_key (*note smime_default_key::) for S/MIME. Most fields of the entries in the key selection menu (see also $pgp_entry_format (*note pgp_entry_format::)) have obvious meanings. But some explanations on the capabilities, flags, and validity fields are in order. The flags sequence (‘%f’) will expand to one of the flags in *note PGP key menu flags::. *PGP key menu flags* Flag Description R The key has been revoked and can't be used. X The key is expired and can't be used. d You have marked the key as disabled. c There are unknown critical self-signature packets. The capabilities field (‘%c’) expands to a two-character sequence representing a key's capabilities. The first character gives the key's encryption capabilities: A minus sign (‘-’) means that the key cannot be used for encryption. A dot (‘.’) means that it's marked as a signature key in one of the user IDs, but may also be used for encryption. The letter ‘e’ indicates that this key can be used for encryption. The second character indicates the key's signing capabilities. Once again, a ‘-’ implies ‘not for signing’, ‘.’ implies that the key is marked as an encryption key in one of the user-ids, and ‘s’ denotes a key which can be used for signing. Finally, the validity field (‘%t’) indicates how well-certified a user-id is. A question mark (‘?’) indicates undefined validity, a minus character (‘-’) marks an untrusted association, a space character means a partially trusted association, and a plus character (‘+’) indicates complete validity.  File: mutt.info, Node: Sending Format=Flowed Messages, Next: Background Editing, Prev: Sending Cryptographically Signed/Encrypted Messages, Up: Sending Mail 2.6.4 Sending Format=Flowed Messages ------------------------------------ * Menu: * Concept:: * Mutt Support:: * Editor Considerations:: * Reformatting::  File: mutt.info, Node: Concept, Next: Mutt Support, Up: Sending Format=Flowed Messages 2.6.4.1 Concept ............... ‘format=flowed’-style messages (or ‘f=f’ for short) are ‘text/plain’ messages that consist of paragraphs which a receiver's mail client may reformat to its own needs which mostly means to customize line lengths regardless of what the sender sent. Technically this is achieved by letting lines of a ‘flowable’ paragraph end in spaces except for the last line. While for text-mode clients like Mutt it's the best way to assume only a standard 80x25 character cell terminal, it may be desired to let the receiver decide completely how to view a message.  File: mutt.info, Node: Mutt Support, Next: Editor Considerations, Prev: Concept, Up: Sending Format=Flowed Messages 2.6.4.2 Mutt Support .................... Mutt only supports setting the required ‘format=flowed’ MIME parameter on outgoing messages if the $text_flowed (*note text_flowed::) variable is set, specifically it does not add the trailing spaces. After editing, Mutt properly space-stuffs the message. _Space-stuffing_ is required by RfC3676 defining ‘format=flowed’ and means to prepend a space to: • all lines starting with a space • lines starting with the word ‘‘From’’ followed by space • all lines starting with ‘‘>’’ which is not intended to be a quote character *Note* Mutt only supports space-stuffing for the first two types of lines but not for the third: It is impossible to safely detect whether a leading ‘>’ character starts a quote or not. All leading spaces are to be removed by receiving clients to restore the original message prior to further processing.  File: mutt.info, Node: Editor Considerations, Next: Reformatting, Prev: Mutt Support, Up: Sending Format=Flowed Messages 2.6.4.3 Editor Considerations ............................. As Mutt provides no additional features to compose ‘f=f’ messages, it's completely up to the user and his editor to produce proper messages. Please consider your editor's documentation if you intend to send ‘f=f’ messages. For example, _vim_ provides the ‘w’ flag for its ‘formatoptions’ setting to assist in creating ‘f=f’ messages, see ‘:help fo-table’ for details.  File: mutt.info, Node: Reformatting, Prev: Editor Considerations, Up: Sending Format=Flowed Messages 2.6.4.4 Reformatting .................... Mutt has some support for reformatting when viewing and replying to ‘format=flowed’ messages. In order to take advantage of these, $reflow_text (*note reflow_text::) must be set. • Paragraphs are automatically reflowed and wrapped at a width specified by $reflow_wrap (*note reflow_wrap::). • In its original format, the quoting style of ‘format=flowed’ messages can be difficult to read, and doesn't intermix well with non-flowed replies. Setting $reflow_space_quotes (*note reflow_space_quotes::) adds spaces after each level of quoting when in the pager and replying in a non-flowed format (i.e. with $text_flowed (*note text_flowed::) unset). • If $reflow_space_quotes (*note reflow_space_quotes::) is unset, mutt will still add one trailing space after all the quotes in the pager (but not when replying).  File: mutt.info, Node: Background Editing, Prev: Sending Format=Flowed Messages, Up: Sending Mail 2.6.5 Background Editing ------------------------ If $editor (*note editor::) is set to a graphical editor, or a script such as contrib/bgedit-screen-tmux.sh (https://gitlab.com/muttmua/mutt/tree/master/contrib/bgedit-screen-tmux.sh) if running inside GNU Screen or tmux, you can run the editor in the background by setting $background_edit (*note background_edit::). If set, Mutt will display a landing page while the editor runs. When the editor exits, message composition will resume automatically. Alternatively, you can ‘’ from the landing page, which will return you to the message index. This allows viewing other messages, changing mailboxes, even starting a new message composition session - all while the first editor session is still running. Backgrounded message composition sessions can be viewed via ‘’ in the index and pager, by default bound to ‘‘B’’. If there is only a single backgrounded session, which has already exited, that session will automatically resume. Otherwise the list will be displayed, and a particular session can be selected. $background_format (*note background_format::) controls the format string used for the menu. In case the open mailbox is changed while a reply is backgrounded, Mutt keeps track of the original mailbox. After sending, Mutt will attempt to reopen the original mailbox, if needed, and set reply flags appropriately. This won't affect your currently open mailbox, but may make setting flags a bit slower due to the need to reopen the original mailbox behind the scenes. One complication with backgrounded compose sessions is the config changes caused by send, reply, and folder hooks (*note Using Hooks::). These can get triggered by a new message composition session, or by changing folders during a backgrounded session. To help lessen these problems, Mutt takes a snapshot of certain configuration variables and stores them with each editing session when it is backgrounded. When the session is resumed, those stored settings will temporarily be restored, and removed again when the session finishes (or is backgrounded again). Mutt will save all ‘boolean’ and ‘quadoption’ configuration variables, the current folder (which will be used for ‘^’ mailbox shortcut expansion), along with: $folder (*note folder::), $record (*note record::), $postponed (*note postponed::), $envelope_from_address (*note envelope_from_address::), $from (*note from::), $sendmail (*note sendmail::), $smtp_url (*note smtp_url::), $pgp_sign_as (*note pgp_sign_as::), $smime_sign_as (*note smime_sign_as::), and $smime_encrypt_with (*note smime_encrypt_with::). It's not feasible to backup all variables, but if you believe we've missed an important setting, please let the developers know. To help prevent forgetting about backgrounded sessions, $background_confirm_quit (*note background_confirm_quit::) will prompt before exiting, in addition to $quit (*note quit::). Additionally, the ‘%B’ expando in $status_format (*note status_format::) displays the number of backgrounded compose sessions. Background editing is available for most, but not all, message composition in Mutt. Sending from the command line disables background editing, because there is no index to return to.  File: mutt.info, Node: Forwarding and Bouncing Mail, Next: Postponing Mail, Prev: Sending Mail, Up: Getting Started 2.7 Forwarding and Bouncing Mail ================================ Bouncing and forwarding let you send an existing message to recipients that you specify. Bouncing a message sends a verbatim copy of a message to alternative addresses as if they were the message's original recipients specified in the Bcc header. Forwarding a message, on the other hand, allows you to modify the message before it is resent (for example, by adding your own comments). Bouncing is done using the ‘’ function and forwarding using the ‘’ function bound to ‘b’ and ‘f’ respectively. Forwarding can be done by including the original message in the new message's body (surrounded by indicating lines: see $forward_attribution_intro (*note forward_attribution_intro::) and $forward_attribution_trailer (*note forward_attribution_trailer::)) or including it as a MIME attachment, depending on the value of the $mime_forward (*note mime_forward::) variable. Decoding of attachments, like in the pager, can be controlled by the $forward_decode (*note forward_decode::) and $mime_forward_decode (*note mime_forward_decode::) variables, respectively. The desired forwarding format may depend on the content, therefore $mime_forward (*note mime_forward::) is a quadoption which, for example, can be set to ‘ask-no’. Mutt's default ($mime_forward (*note mime_forward::)=‘no’ and $forward_decode (*note forward_decode::)=‘yes’) is to use standard inline forwarding. In that mode all text-decodable parts are included in the new message body. Other attachments from the original email can also be attached to the new message, based on the quadoption $forward_attachments (*note forward_attachments::). The inclusion of headers is controlled by the current setting of the $weed (*note weed::) variable, unless $mime_forward (*note mime_forward::) is set. The subject of the email is controlled by $forward_format (*note forward_format::). Editing the message to forward follows the same procedure as sending or replying to a message does, but can be disabled via the quadoption $forward_edit (*note forward_edit::).  File: mutt.info, Node: Postponing Mail, Next: Encryption and Signing, Prev: Forwarding and Bouncing Mail, Up: Getting Started 2.8 Postponing Mail =================== At times it is desirable to delay sending a message that you have already begun to compose. When the ‘’ function is used in the _compose_ menu, the body of your message and attachments are stored in the mailbox specified by the $postponed (*note postponed::) variable. This means that you can recall the message even if you exit Mutt and then restart it at a later time. Once a message is postponed, there are several ways to resume it. From the command line you can use the ‘-p’ option, or if you compose a new message from the _index_ or _pager_ you will be prompted if postponed messages exist. If multiple messages are currently postponed, the _postponed_ menu will pop up and you can select which message you would like to resume. *Note* If you postpone a reply to a message, the reply setting of the message is only updated when you actually finish the message and send it. Also, you must be in the same folder with the message you replied to for the status of the message to be updated. See also the $postpone (*note postpone::) quad-option.  File: mutt.info, Node: Encryption and Signing, Prev: Postponing Mail, Up: Getting Started 2.9 Encryption and Signing ========================== Mutt supports encrypting and signing emails when used interactively. In batch mode, cryptographic operations are disabled, so these options can't be used to sign an email sent via a cron job, for instance. OpenPGP and S/MIME are enabled in one of two ways: ‘classic mode’ or GPGME. The former invokes external programs to perform the various operations; it is better tested and more flexible, but requires some configuration. The latter uses the GnuPG project's GPGME library. To enable ‘classic mode’, ensure GPGME is disabled and use the ‘gpg.rc’ or ‘smime.rc’ files that come with mutt. These are typically installed under ‘/usr/local/share/doc/mutt/samples/’. Source them, either directly or by copying them to your .mutt directory and sourcing them. Sourcing them directly from ‘/usr/local/share/doc/mutt/samples/’ has the benefit of automatically using fixes and security improvements to the command invocations, and is recommended. unset crypt_use_gpgme source /usr/local/share/doc/mutt/samples/gpg.rc source /usr/local/share/doc/mutt/samples/smime.rc To use GPGME instead, simply ensure the option is enabled in your .muttrc: set crypt_use_gpgme * Menu: * OpenPGP Configuration:: * S/MIME Configuration::  File: mutt.info, Node: OpenPGP Configuration, Next: S/MIME Configuration, Up: Encryption and Signing 2.9.1 OpenPGP Configuration --------------------------- The two most important settings are $pgp_default_key (*note pgp_default_key::) and $pgp_sign_as (*note pgp_sign_as::). To perform encryption, you must set the first variable. If you have a separate signing key, or only have a signing key, then set the second. Most people will only need to set $pgp_default_key (*note pgp_default_key::). Starting with version 2.1.0, GnuPG automatically uses an ‘agent’ to prompt for your passphrase. If you are using a version older than that, you'll need to ensure an agent is running (alternatively, you can unset $pgp_use_gpg_agent (*note pgp_use_gpg_agent::) and Mutt will prompt you for your passphrase). The agent in turn uses a ‘pinentry’ program to display the prompt. There are many different kinds of pinentry programs that can be used: qt, gtk2, gnome3, fltk, and curses. However, Mutt does _not_ work properly with the tty pinentry program. Please ensure you have one of the GUI or curses pinentry programs installed and configured to be the default for your system.  File: mutt.info, Node: S/MIME Configuration, Prev: OpenPGP Configuration, Up: Encryption and Signing 2.9.2 S/MIME Configuration -------------------------- As with OpenPGP, the two most important settings are $smime_default_key (*note smime_default_key::) and $smime_sign_as (*note smime_sign_as::). To perform encryption and decryption, you must set the first variable. If you have a separate signing key, or only have a signing key, then set the second. Most people will only need to set $smime_default_key (*note smime_default_key::). In ‘classic mode’, keys and certificates are managed by the ‘smime_keys’ program that comes with Mutt. By default they are stored under ‘~/.smime/’. (This is set by the ‘smime.rc’ file with $smime_certificates (*note smime_certificates::) and $smime_keys (*note smime_keys::).) To initialize this directory, use the command ‘‘smime_keys init’’ from a shell prompt. The program can be then be used to import and list certificates. You may also want to periodically run ‘‘smime_keys refresh’’ to update status flags for your certificates.  File: mutt.info, Node: Configuration, Next: Advanced Usage, Prev: Getting Started, Up: Top 3 Configuration *************** * Menu: * Location of Initialization Files:: * Starter Muttrc:: * Syntax of Initialization Files:: * Address Groups:: * Defining/Using Aliases:: * Changing the Default Key Bindings:: * Changing the current working directory:: * Defining Aliases for Character Sets:: * Setting Variables Based Upon Mailbox:: * Keyboard Macros:: * Using Color and Mono Video Attributes:: * Message Header Display:: * Alternative Addresses:: * Mailing Lists: Mailing Lists <1>. * Using Multiple Spool Mailboxes:: * Monitoring Incoming Mail:: * User-Defined Headers:: * Specify Default Save Mailbox:: * Specify Default Fcc; Mailbox When Composing:: * Specify Default Save Filename and Default Fcc; Mailbox at Once:: * Change Settings Based Upon Message Recipients:: * Change Settings Before Formatting a Message:: * Choosing the Cryptographic Key of the Recipient:: * Dynamically Changing $index_format using Patterns:: * Adding Key Sequences to the Keyboard Buffer:: * Executing Functions:: * Message Scoring:: * Spam Detection:: * Setting and Querying Variables:: * Reading Initialization Commands From Another File:: * Removing Hooks:: * Format Strings:: * Control allowed header fields in a mailto; URL::  File: mutt.info, Node: Location of Initialization Files, Next: Starter Muttrc, Up: Configuration 3.1 Location of Initialization Files ==================================== While the default configuration (or ‘preferences’) make Mutt usable right out of the box, it is often desirable to tailor Mutt to suit your own tastes. When Mutt is first invoked, it will attempt to read the ‘system’ configuration file (defaults set by your local system administrator), unless the ‘-n’ command line (*note Command-Line Options::) option is specified. This file is typically ‘/usr/local/share/mutt/Muttrc’ or ‘/etc/Muttrc’. Mutt will next look for a file named ‘.muttrc’ in your home directory. If this file does not exist and your home directory has a subdirectory named ‘.mutt’, Mutt tries to load a file named ‘.mutt/muttrc’. If still not found, Mutt will try ‘$XDG_CONFIG_HOME/mutt/muttrc’. ‘.muttrc’ is the file where you will usually place your commands (*note Configuration Commands::) to configure Mutt. In addition, Mutt supports version specific configuration files that are parsed instead of the default files as explained above. For instance, if your system has a ‘Muttrc-0.88’ file in the system configuration directory, and you are running version 0.88 of Mutt, this file will be sourced instead of the ‘Muttrc’ file. The same is true of the user configuration file, if you have a file ‘.muttrc-0.88.6’ in your home directory, when you run Mutt version 0.88.6, it will source this file instead of the default ‘.muttrc’ file. The version number is the same which is visible using the ‘-v’ command line (*note Command-Line Options::) switch or using the ‘show-version’ key (default: V) from the index menu.  File: mutt.info, Node: Starter Muttrc, Next: Syntax of Initialization Files, Prev: Location of Initialization Files, Up: Configuration 3.2 Starter Muttrc ================== Mutt is highly configurable because it's _meant_ to be customized to your needs and preferences. However, this configurability can make it difficult when just getting started. A few sample muttrc files come with mutt, under ‘doc/mutt/samples/’. Among them, sample.muttrc-starter (https://gitlab.com/muttmua/mutt/tree/master/contrib/sample.muttrc-starter) is a basic example config with a few suggested settings and pointers to useful programs.  File: mutt.info, Node: Syntax of Initialization Files, Next: Address Groups, Prev: Starter Muttrc, Up: Configuration 3.3 Syntax of Initialization Files ================================== An initialization file consists of a series of commands (*note Configuration Commands::). Each line of the file may contain one or more commands. When multiple commands are used, they must be separated by a semicolon (‘;’). *Multiple configuration commands per line* set realname='Mutt user' ; ignore x- The hash mark, or pound sign (‘#’), is used as a ‘comment’ character. You can use it to annotate your initialization file. All text after the comment character to the end of the line is ignored. *Commenting configuration files* my_hdr X-Disclaimer: Why are you listening to me? # This is a comment Single quotes (‘'’) and double quotes (‘"’) can be used to quote strings which contain spaces or other special characters. The difference between the two types of quotes is similar to that of many popular shell programs, namely that a single quote is used to specify a literal string (one that is not interpreted for shell variables or quoting with a backslash [see next paragraph]), while double quotes indicate a string for which should be evaluated. For example, backticks are evaluated inside of double quotes, but _not_ for single quotes. ‘\’ quotes the next character, just as in shells such as bash and zsh. For example, if want to put quotes ‘"’ inside of a string, you can use ‘\’ to force the next character to be a literal instead of interpreted character. *Escaping quotes in configuration files* set realname="Michael \"MuttDude\" Elkins" ‘\\’ means to insert a literal ‘\’ into the line. ‘\n’ and ‘\r’ have their usual C meanings of linefeed and carriage-return, respectively. A ‘\’ at the end of a line can be used to split commands over multiple lines as it ‘escapes’ the line end, provided that the split points don't appear in the middle of command names. Lines are first concatenated before interpretation so that a multi-line can be commented by commenting out the first line only. *Splitting long configuration commands over several lines* set status_format="some very \ long value split \ over several lines" It is also possible to substitute the output of a Unix command in an initialization file. This is accomplished by enclosing the command in backticks ("). In *note Using external command's output in configuration files::, the output of the Unix command ‘uname -a’ will be substituted before the line is parsed. Since initialization files are line oriented, only the first line of output from the Unix command will be substituted. *Using external command's output in configuration files* my_hdr X-Operating-System: `uname -a` To avoid the output of backticks being parsed, place them inside double quotes. In *note Preventing the output of backticks from being parsed::, the output of the gpg decryption is assigned directly to $imap_pass, so that special characters in the password (e.g.‘'’, ‘#’, ‘$’) are not parsed and interpreted specially by mutt. *Preventing the output of backticks from being parsed* set imap_pass="`gpg --batch -q --decrypt ~/.mutt/account.gpg`" Both environment variables and Mutt variables can be accessed by prepending ‘$’ to the name of the variable. For example, *Using environment variables in configuration files* set record=+sent_on_$HOSTNAME will cause Mutt to save outgoing messages to a folder named ‘sent_on_kremvax’ if the environment variable ‘$HOSTNAME’ is set to ‘kremvax.’ (See $record (*note record::) for details.) Mutt expands the variable when it is assigned, not when it is used. If the value of a variable on the right-hand side of an assignment changes after the assignment, the variable on the left-hand side will not be affected. If $muttlisp_inline_eval (*note muttlisp_inline_eval::) is set, an unquoted parenthesis-enclosed expression will be evaluated as MuttLisp. See the Using MuttLisp (*note Using MuttLisp [EXPERIMENTAL]::) section for more details. *Using MuttLisp expressions* set signature = \ (if (equal $my_name "Kevin McCarthy") ~/kevin.sig ~/other.sig) The commands understood by Mutt are explained in the next paragraphs. For a complete list, see the command reference (*note Configuration Commands::). All configuration files are expected to be in the current locale as specified by the $charset (*note charset::) variable which doesn't have a default value since it's determined by Mutt at startup. If a configuration file is not encoded in the same character set the $config_charset (*note config_charset::) variable should be used: all lines starting with the next are recoded from $config_charset (*note config_charset::) to $charset (*note charset::). This mechanism should be avoided if possible as it has the following implications: • These variables should be set early in a configuration file with $charset (*note charset::) preceding $config_charset (*note config_charset::) so Mutt knows what character set to convert to. • If $config_charset (*note config_charset::) is set, it should be set in each configuration file because the value is global and _not_ per configuration file. • Because Mutt first recodes a line before it attempts to parse it, a conversion introducing question marks or other characters as part of errors (unconvertable characters, transliteration) may introduce syntax errors or silently change the meaning of certain tokens (e.g. inserting question marks into regular expressions).  File: mutt.info, Node: Address Groups, Next: Defining/Using Aliases, Prev: Syntax of Initialization Files, Up: Configuration 3.4 Address Groups ================== Usage: group [ -group name ]… { -rx expr … | -addr expr …} ungroup [ -group name ]… { * | -rx expr … | -addr expr …} Mutt supports grouping addresses logically into named groups. An address or address pattern can appear in several groups at the same time. These groups can be used in patterns (*note Patterns; Searching; Limiting and Tagging::) (for searching, limiting and tagging) and in hooks by using group patterns. This can be useful to classify mail and take certain actions depending on in what groups the message is. For example, the mutt user's mailing list would fit into the categories ‘mailing list’ and ‘mutt-related’. Using ‘send-hook’ (*note Change Settings Based Upon Message Recipients::), the sender can be set to a dedicated one for writing mailing list messages, and the signature could be set to a mutt-related one for writing to a mutt list — for other lists, the list sender setting still applies but a different signature can be selected. Or, given a group only containing recipients known to accept encrypted mail, ‘auto-encryption’ can be achieved easily. The ‘group’ command is used to directly add either addresses or regular expressions to the specified group or groups. The different categories of arguments to the ‘group’ command can be in any order. The flags ‘-rx’ and ‘-addr’ specify what the following strings (that cannot begin with a hyphen) should be interpreted as: either a regular expression or an email address, respectively. These address groups can also be created implicitly by the ‘alias’ (*note Defining/Using Aliases::), ‘lists’ (*note Mailing Lists <1>::), ‘subscribe’ (*note Mailing Lists <1>::) and ‘alternates’ (*note Alternative Addresses::) commands by specifying the optional ‘-group’ option. For example, alternates -group me address1 address2 alternates -group me -group work address3 would create a group named ‘me’ which contains all your addresses and a group named ‘work’ which contains only your work address _address3_. Besides many other possibilities, this could be used to automatically mark your own messages in a mailing list folder as read or use a special signature for work-related messages. The ‘ungroup’ command is used to remove addresses or regular expressions from the specified group or groups. The syntax is similar to the ‘group’ command, however the special character ‘*’ can be used to empty a group of all of its contents. As soon as a group gets empty because all addresses and regular expressions have been removed, it'll internally be removed, too (i.e. there cannot be an empty group). When removing regular expressions from a group, the pattern must be specified exactly as given to the ‘group’ command or ‘-group’ argument.  File: mutt.info, Node: Defining/Using Aliases, Next: Changing the Default Key Bindings, Prev: Address Groups, Up: Configuration 3.5 Defining/Using Aliases ========================== Usage: alias [ -group name ]… key address [ address ]… unalias [ -group name ]… { * | key …} It's usually very cumbersome to remember or type out the address of someone you are communicating with. Mutt allows you to create ‘aliases’ which map a short string to a full address. *Note* If you want to create an alias for more than one address, you _must_ separate the addresses with a comma (‘,’). The optional ‘-group’ argument to ‘alias’ causes the aliased address(es) to be added to the named _group_. To add an alias: alias muttdude me@cs.hmc.edu (Michael Elkins) alias theguys manny, moe, jack To remove an alias or aliases (‘*’ means all aliases): unalias muttdude unalias * Note: The alias _key_ is matched case insensitively when creating (checking for duplicates), removing, or expanding aliases. Unlike other mailers, Mutt doesn't require aliases to be defined in a special file. The ‘alias’ command can appear anywhere in a configuration file, as long as this file is ‘source’d (*note Reading Initialization Commands From Another File::). Consequently, you can have multiple alias files, or you can have all aliases defined in your ‘.muttrc’. On the other hand, the ‘’ (*note create-alias::) function can use only one file, the one pointed to by the $alias_file (*note alias_file::) variable (which is ‘~/.muttrc’ by default). This file is not special either, in the sense that Mutt will happily append aliases to any file, but in order for the new aliases to take effect you need to explicitly ‘source’ (*note Reading Initialization Commands From Another File::) this file too. *Configuring external alias files* source /usr/local/share/Mutt.aliases source ~/.mail_aliases set alias_file=~/.mail_aliases To use aliases, you merely use the alias at any place in Mutt where Mutt prompts for addresses, such as the _To:_ or _Cc:_ prompt. You can also enter aliases in your editor at the appropriate headers if you have the $edit_headers (*note edit_headers::) variable set. In addition, at the various address prompts, you can use the tab character to expand a partial alias to the full alias. If there are multiple matches, Mutt will bring up a menu with the matching aliases. In order to be presented with the full list of aliases, you must hit tab without a partial alias, such as at the beginning of the prompt or after a comma denoting multiple addresses. In the alias menu, you can select as many aliases as you want with the ‘tag-entry’ key (default: or t), and use the _exit_ key (default: q) to return to the address prompt.  File: mutt.info, Node: Changing the Default Key Bindings, Next: Changing the current working directory, Prev: Defining/Using Aliases, Up: Configuration 3.6 Changing the Default Key Bindings ===================================== Usage: bind map key function This command allows you to change the default key bindings (operation invoked when pressing a key). _map_ specifies in which menu the binding belongs. Multiple maps may be specified by separating them with commas (no additional whitespace is allowed). The currently defined maps are: generic This is not a real menu, but is used as a fallback for all of the other menus except for the pager and editor modes. If a key is not defined in another menu, Mutt will look for a binding to use in this menu. This allows you to bind a key to a certain function in multiple menus instead of having multiple ‘bind’ statements to accomplish the same task. alias The alias menu is the list of your personal aliases as defined in your ‘.muttrc’. It is the mapping from a short alias name to the full email address(es) of the recipient(s). attach The attachment menu is used to access the attachments on received messages. browser The browser is used for both browsing the local directory structure, and for listing all of your incoming mailboxes. editor The editor is used to allow the user to enter a single line of text, such as the _To_ or _Subject_ prompts in the ‘compose’ menu. index The index is the list of messages contained in a mailbox. compose The compose menu is the screen used when sending a new message. pager The pager is the mode used to display message/attachment data, and help listings. pgp The pgp menu is used to select the OpenPGP keys used to encrypt outgoing messages. smime The smime menu is used to select the OpenSSL certificates used to encrypt outgoing messages. postpone The postpone menu is similar to the index menu, except is used when recalling a message the user was composing, but saved until later. query The query menu is the browser for results returned by $query_command (*note query_command::). mix The mixmaster screen is used to select remailer options for outgoing messages (if Mutt is compiled with Mixmaster support). _key_ is the key (or key sequence) you wish to bind. To specify a control character, use the sequence _\Cx_, where _x_ is the letter of the control character (for example, to specify control-A use ‘\Ca’). Note that the case of _x_ as well as _\C_ is ignored, so that _\CA_, _\Ca_, _\cA_ and _\ca_ are all equivalent. An alternative form is to specify the key as a three digit octal number prefixed with a ‘\’ (for example _\177_ is equivalent to _\c?_). You can also use the form _<177>_, which allows octal numbers with an arbitrary number of digits. In addition, _key_ may be a symbolic name as shown in *note Symbolic key names::. *Symbolic key names* Symbolic name Meaning \t tab tab backtab / shift-tab \r carriage return \n newline \e escape escape up arrow down arrow left arrow right arrow Page Up Page Down Backspace Delete Insert Enter Return Enter key on numeric keypad Home End Space bar function key 1 function key 10 The ‘’ function can be used to explore keycode and symbolic names for other keys on your keyboard. Executing this function will display information about each key pressed, until terminated by ‘^G’. _key_ does not need to be enclosed in quotes unless it contains a space (‘ ’) or semi-colon (‘;’). _function_ specifies which action to take when _key_ is pressed. For a complete list of functions, see the reference (*note Functions <1>::). Note that the ‘bind’ expects _function_ to be specified without angle brackets. The special function ‘’ unbinds the specified key sequence. * Menu: * Terminal Keybindings:: * Enter versus Return::  File: mutt.info, Node: Terminal Keybindings, Next: Enter versus Return, Up: Changing the Default Key Bindings 3.6.1 Terminal Keybindings -------------------------- Some key bindings are controlled by the terminal, and so by default can't be bound inside Mutt. These may include ‘^C’, ‘^\’, ‘^Q’, ‘^S’, ‘^Z’, and on BSD/Mac ‘^Y’. These terminal settings can be viewed and changed using the ‘stty’ program. ‘‘stty -a’’ will list the bound characters (not all of them affect Mutt), and what actions they take when pressed. For example, you may see ‘‘intr = ^C’’ in its output. This means typing ‘^C’ will send an interrupt signal. ‘‘quit = ^\’’ means typing ‘^\’ (commonly also ‘^4’) will send a quit signal. To unbind a key from an action, you invoke ‘stty action undef’. For example, ‘‘stty quit undef’’ will unbind ‘^\’ (and ‘^4’) from sending the quit signal. Once unbound (e.g, by placing that line in your .bashrc, or in a Mutt wrapper script/function) you can use the key sequence in your Mutt bindings.  File: mutt.info, Node: Enter versus Return, Prev: Terminal Keybindings, Up: Changing the Default Key Bindings 3.6.2 Enter versus Return ------------------------- Prior to version 2.2, Mutt used a default ncurses mode (‘‘nl()’’). This mode maps keyboard input of either ‘’ or ‘’ to the same value, which Mutt interpreted as ‘’ internally. However, starting in version 2.2, this mode is turned off, allowing ‘’ and ‘’ to be mapped separately, if desired. The default keyboard mappings set both, but you can override this or create new bindings with one or the other (or both). Note that in terminal application, such as Mutt, ‘’ is the same as ‘\n’ and ‘^J’; while ‘’ is the same as ‘\r’ and ‘^M’.  File: mutt.info, Node: Changing the current working directory, Next: Defining Aliases for Character Sets, Prev: Changing the Default Key Bindings, Up: Configuration 3.7 Changing the current working directory ========================================== Usage: cd directory The ‘cd’ command changes Mutt's current working directory. This affects commands and functions like ‘source’, ‘change-folder’, and ‘save-entry’ that use relative paths. Using ‘cd’ without directory changes to your home directory.  File: mutt.info, Node: Defining Aliases for Character Sets, Next: Setting Variables Based Upon Mailbox, Prev: Changing the current working directory, Up: Configuration 3.8 Defining Aliases for Character Sets ======================================= Usage: charset-hook alias charset iconv-hook charset local-charset The ‘charset-hook’ command defines an alias for a character set. This is useful to properly display messages which are tagged with a character set name not known to Mutt. The ‘iconv-hook’ command defines a system-specific name for a character set. This is helpful when your systems character conversion library insists on using strange, system-specific names for character sets.  File: mutt.info, Node: Setting Variables Based Upon Mailbox, Next: Keyboard Macros, Prev: Defining Aliases for Character Sets, Up: Configuration 3.9 Setting Variables Based Upon Mailbox ======================================== Usage: folder-hook [!]regexp command It is often desirable to change settings based on which mailbox you are reading. The ‘folder-hook’ command provides a method by which you can execute any configuration command. _regexp_ is a regular expression specifying in which mailboxes to execute _command_ before loading. If a mailbox matches multiple ‘folder-hook’s, they are executed in the order given in the ‘.muttrc’. The regexp parameter has mailbox shortcut (*note Mailbox Shortcuts::) expansion performed on the first character. See *note Mailbox Matching in Hooks:: for more details. *Note* If you use the ‘!’ shortcut for $spoolfile (*note spoolfile::) at the beginning of the pattern, you must place it inside of double or single quotes in order to distinguish it from the logical _not_ operator for the expression. *Note* Settings are _not_ restored when you leave the mailbox. For example, a command action to perform is to change the sorting method based upon the mailbox being read: folder-hook mutt "set sort=threads" However, the sorting method is not restored to its previous value when reading a different mailbox. To specify a _default_ command, use the pattern ‘.’ before other ‘folder-hook’s adjusting a value on a per-folder basis because ‘folder-hook’s are evaluated in the order given in the configuration file. *Note* The keyboard buffer will not be processed until after all hooks are run; multiple push (*note Adding Key Sequences to the Keyboard Buffer::) or exec (*note Executing Functions::) commands will end up being processed in reverse order. The following example will set the sort (*note sort::) variable to ‘date-sent’ for all folders but to ‘threads’ for all folders containing ‘mutt’ in their name. *Setting sort method based on mailbox name* folder-hook . "set sort=date-sent" folder-hook mutt "set sort=threads"  File: mutt.info, Node: Keyboard Macros, Next: Using Color and Mono Video Attributes, Prev: Setting Variables Based Upon Mailbox, Up: Configuration 3.10 Keyboard Macros ==================== Usage: macro menu key sequence [ description ] Macros are useful when you would like a single key to perform a series of actions. When you press _key_ in menu _menu_, Mutt will behave as if you had typed _sequence_. So if you have a common sequence of commands you type, you can create a macro to execute those commands with a single key or fewer keys. _menu_ is the map (*note maps::) which the macro will be bound in. Multiple maps may be specified by separating multiple menu arguments by commas. Whitespace may not be used in between the menu arguments and the commas separating them. _key_ and _sequence_ are expanded by the same rules as the key bindings (*note Changing the Default Key Bindings::) with some additions. The first is that control characters in _sequence_ can also be specified as _^x_. In order to get a caret (‘^’) you need to use _^^_. Secondly, to specify a certain key such as _up_ or to invoke a function directly, you can use the format __ and __. For a listing of key names see the section on key bindings (*note Changing the Default Key Bindings::). Functions are listed in the reference (*note Functions <1>::). The advantage with using function names directly is that the macros will work regardless of the current key bindings, so they are not dependent on the user having particular key definitions. This makes them more robust and portable, and also facilitates defining of macros in files used by more than one user (e.g., the system Muttrc). Optionally you can specify a descriptive text after _sequence_, which is shown in the help screens if they contain a description. *Note* Macro definitions (if any) listed in the help screen(s), are silently truncated at the screen width, and are not wrapped.  File: mutt.info, Node: Using Color and Mono Video Attributes, Next: Message Header Display, Prev: Keyboard Macros, Up: Configuration 3.11 Using Color and Mono Video Attributes ========================================== Usage: color object [ attribute ]… foreground background color { header | body } [ attribute ]… foreground background regexp color index [ attribute ]… foreground background pattern color compose composeobject [ attribute ]… foreground background uncolor { index | header | body } { * | pattern …} If your terminal supports color, you can spice up Mutt by creating your own color scheme. To define the color of an object (type of information), you must specify both a foreground color _and_ a background color (it is not possible to only specify one or the other). _header_ and _body_ match _regexp (*note Regular Expressions::)_ in the header/body of a message, _index_ matches _pattern (*note Patterns; Searching; Limiting and Tagging::)_ in the message index. Note that IMAP server-side searches (=b, =B, =h) are not supported for color index patterns. When $header_color_partial (*note header_color_partial::) is unset (the default), a _header_ matched by _regexp_ will have color applied to the entire header. When set, color is applied only to the exact text matched by _regexp_. _object_ can be one of: • attachment • bold (highlighting bold patterns in the body of messages) • error (error messages printed by Mutt) • hdrdefault (default color of the message header in the pager) • indicator (arrow or bar used to indicate the current item in a menu) • markers (the ‘+’ markers at the beginning of wrapped lines in the pager) • message (informational messages) • normal • prompt • quoted (text matching $quote_regexp (*note quote_regexp::) in the body of a message) • quoted1, quoted2, ..., quoted_N_ (higher levels of quoting) • search (highlighting of words in the pager) • signature • status (mode lines used to display info about the mailbox or message) • tilde (the ‘~’ used to pad blank lines in the pager) • tree (thread tree drawn in the message index and attachment menu) • underline (highlighting underlined patterns in the body of messages) _composeobject_ can be one of: • header • security_encrypt • security_sign • security_both • security_none _attribute_ can be one of the following: • none • bold • underline • reverse • standout _foreground_ and _background_ can be one of the following: • white • black • green • magenta • blue • cyan • yellow • red • default • color_x_ The color name can optionally be prefixed with the keyword ‘bright’ or ‘light’ to make the color boldfaced or light (e.g., ‘brightred’). The precise behavior depends on the terminal and its configuration. In particular, the boldfaced/light difference and such background colors may be available only for terminals configured with at least 16 colors, as specified by the ‘$TERM’ environment variable. If your terminal supports it, the special keyword _default_ can be used as a transparent color. The value _brightdefault_ is also valid. If Mutt is linked against the _S-Lang_ library, you also need to set the ‘$COLORFGBG’ environment variable to the default colors of your terminal for this to work; for example (for Bourne-like shells): set COLORFGBG="green;black" export COLORFGBG *Note* The _S-Lang_ library requires you to use the _lightgray_ and _brown_ keywords instead of _white_ and _yellow_ when setting this variable. *Note* The ‘uncolor’ command can be applied to the index, header and body objects only. It removes entries from the list. You _must_ specify the same pattern specified in the ‘color’ command for it to be removed. The pattern ‘*’ is a special token which means to clear the color list of all entries. Mutt also recognizes the keywords _color0_, _color1_, ..., _color__N-1_ (_N_ being the number of colors supported by your terminal). This is useful when you remap the colors for your display (for example by changing the color associated with _color2_ for your xterm), since color names may then lose their normal meaning. If your terminal does not support color, it is still possible change the video attributes through the use of the ‘mono’ command. Usage: mono object attribute mono { header | body } attribute regexp mono index attribute pattern mono compose composeobject attribute unmono { index | header | body } { * | pattern …} For _object_, _composeobject_, and _attribute_, see the ‘color’ command.  File: mutt.info, Node: Message Header Display, Next: Alternative Addresses, Prev: Using Color and Mono Video Attributes, Up: Configuration 3.12 Message Header Display =========================== * Menu: * Header Display:: * Selecting Headers:: * Ordering Displayed Headers::  File: mutt.info, Node: Header Display, Next: Selecting Headers, Up: Message Header Display 3.12.1 Header Display --------------------- When displaying a message in the pager, Mutt folds long header lines at $wrap (*note wrap::) columns. Though there're precise rules about where to break and how, Mutt always folds headers using a tab for readability. (Note that the sending side is not affected by this, Mutt tries to implement standards compliant folding.) Despite not being a real header, Mutt will also display an mbox "From_" line in the pager along with other headers. This line can be manipulated with ‘ignore/unignore’ and ‘hdr_order/unhdr_order’ commands.  File: mutt.info, Node: Selecting Headers, Next: Ordering Displayed Headers, Prev: Header Display, Up: Message Header Display 3.12.2 Selecting Headers ------------------------ Usage: ignore pattern [ pattern ]… unignore { * | pattern …} Messages often have many header fields added by automatic processing systems, or which may not seem useful to display on the screen. This command allows you to specify header fields which you don't normally want to see in the pager. You do not need to specify the full header field name. For example, ‘ignore content-’ will ignore all header fields that begin with the pattern ‘content-’. ‘ignore *’ will ignore all headers. To remove a previously added token from the list, use the ‘unignore’ command. The ‘unignore’ command will make Mutt display headers with the given pattern. For example, if you do ‘ignore x-’ it is possible to ‘unignore x-mailer’. ‘unignore *’ will remove all tokens from the ignore list. *Header weeding* # Sven's draconian header weeding ignore * unignore from date subject to cc unignore organization organisation x-mailer: x-newsreader: x-mailing-list: unignore posted-to: The above example will show "From:" headers as well as mbox "From_" lines. To hide the latter, instead use "‘unignore from: date subject to cc’" on the second line.  File: mutt.info, Node: Ordering Displayed Headers, Prev: Selecting Headers, Up: Message Header Display 3.12.3 Ordering Displayed Headers --------------------------------- Usage: hdr_order header [ header ]… unhdr_order { * | header …} With the ‘hdr_order’ command you can specify an order in which Mutt will attempt to present these headers to you when viewing messages. ‘‘unhdr_order’ *’ will clear all previous headers from the order list, thus removing the header order effects set by the system-wide startup file. *Configuring header display order* hdr_order From Date: From: To: Cc: Subject:  File: mutt.info, Node: Alternative Addresses, Next: Mailing Lists <1>, Prev: Message Header Display, Up: Configuration 3.13 Alternative Addresses ========================== Usage: alternates [ -group name ]… regexp [ regexp ]… unalternates [ -group name ]… { * | regexp …} With various functions, Mutt will treat messages differently, depending on whether you sent them or whether you received them from someone else. For instance, when replying to a message that you sent to a different party, Mutt will automatically suggest to send the response to the original message's recipients — responding to yourself won't make much sense in many cases. (See $reply_to (*note reply_to::).) Many users receive e-mail under a number of different addresses. To fully use Mutt's features here, the program must be able to recognize what e-mail addresses you receive mail under. That's the purpose of the ‘alternates’ command: It takes a list of regular expressions, each of which can identify an address under which you receive e-mail. As addresses are matched using regular expressions and not exact strict comparisons, you should make sure you specify your addresses as precise as possible to avoid mismatches. For example, if you specify: alternates user@example Mutt will consider ‘‘some-user@example’’ as being your address, too which may not be desired. As a solution, in such cases addresses should be specified as: alternates '^user@example$' The ‘-group’ flag causes all of the subsequent regular expressions to be added to the named group. The ‘unalternates’ command can be used to write exceptions to ‘alternates’ patterns. If an address matches something in an ‘alternates’ command, but you nonetheless do not think it is from you, you can list a more precise pattern under an ‘unalternates’ command. To remove a regular expression from the ‘alternates’ list, use the ‘unalternates’ command with exactly the same _regexp_. Likewise, if the _regexp_ for an ‘alternates’ command matches an entry on the ‘unalternates’ list, that ‘unalternates’ entry will be removed. If the _regexp_ for ‘unalternates’ is ‘*’, _all entries_ on ‘alternates’ will be removed.  File: mutt.info, Node: Mailing Lists <1>, Next: Using Multiple Spool Mailboxes, Prev: Alternative Addresses, Up: Configuration 3.14 Mailing Lists ================== Usage: lists [ -group name ]… regexp [ regexp ]… unlists { * | regexp …} subscribe [ -group name ]… regexp [ regexp ]… unsubscribe { * | regexp …} Mutt has a few nice features for handling mailing lists (*note Handling Mailing Lists::). In order to take advantage of them, you must specify which addresses belong to mailing lists, and which mailing lists you are subscribed to. Mutt also has limited support for auto-detecting mailing lists: it supports parsing ‘mailto:’ links in the common ‘List-Post:’ header which has the same effect as specifying the list address via the ‘lists’ command (except the group feature). Once you have done this, the ‘’ (*note list-reply::) function will work for all known lists. Additionally, when you send a message to a known list and $followup_to (*note followup_to::) is set, Mutt will add a Mail-Followup-To header. For unsubscribed lists, this will include your personal address, ensuring you receive a copy of replies. For subscribed mailing lists, the header will not, telling other users' mail user agents not to send copies of replies to your personal address. *Note* The Mail-Followup-To header is a non-standard extension which is not supported by all mail user agents. Adding it is not bullet-proof against receiving personal CCs of list messages. Also note that the generation of the Mail-Followup-To header is controlled by the $followup_to (*note followup_to::) configuration variable since it's common practice on some mailing lists to send Cc upon replies (which is more a group- than a list-reply). More precisely, Mutt maintains lists of patterns for the addresses of known and subscribed mailing lists. Every subscribed mailing list is known. To mark a mailing list as known, use the ‘list’ command. To mark it as subscribed, use ‘subscribe’. You can use regular expressions with both commands. To mark all messages sent to a specific bug report's address on Debian's bug tracking system as list mail, for instance, you could say subscribe [0-9]+.*@bugs.debian.org as it's often sufficient to just give a portion of the list's e-mail address. Specify as much of the address as you need to remove ambiguity. For example, if you've subscribed to the Mutt mailing list, you will receive mail addressed to ‘mutt-users@mutt.org’. So, to tell Mutt that this is a mailing list, you could add ‘lists mutt-users@’ to your initialization file. To tell Mutt that you are subscribed to it, add ‘‘subscribe’ mutt-users’ to your initialization file instead. If you also happen to get mail from someone whose address is ‘mutt-users@example.com’, you could use ‘‘lists’ ^mutt-users@mutt\\.org$’ or ‘‘subscribe’ ^mutt-users@mutt\\.org$’ to match only mail from the actual list. The ‘-group’ flag adds all of the subsequent regular expressions to the named address group (*note Address Groups::) in addition to adding to the specified address list. The ‘unlists’ command is used to remove a token from the list of known and subscribed mailing-lists. Use ‘unlists *’ to remove all tokens. To remove a mailing list from the list of subscribed mailing lists, but keep it on the list of known mailing lists, use ‘unsubscribe’. All of the mailing list configuration options described so far govern mutt's knowledge of your list subscriptions and how it presents list information to you. If you have a message from a mailing list, you can also use the list menu (*note Default List Menu Bindings::) (bound to "ESC L" by default) to interact with the message's list's list server. This makes it easy to subscribe, unsubscribe, and so on.  File: mutt.info, Node: Using Multiple Spool Mailboxes, Next: Monitoring Incoming Mail, Prev: Mailing Lists <1>, Up: Configuration 3.15 Using Multiple Spool Mailboxes =================================== Usage: mbox-hook [!]regexp mailbox This command is used to move read messages from a specified mailbox to a different mailbox automatically when you quit or change folders. _regexp_ is a regular expression specifying the mailbox to treat as a ‘spool’ mailbox and _mailbox_ specifies where mail should be saved when read. The regexp parameter has mailbox shortcut (*note Mailbox Shortcuts::) expansion performed on the first character. See *note Mailbox Matching in Hooks:: for more details. Note that execution of mbox-hooks is dependent on the $move (*note move::) configuration variable. If set to ‘no’ (the default), mbox-hooks will not be executed. Unlike some of the other _hook_ commands, only the _first_ matching regexp is used (it is not possible to save read mail in more than a single mailbox).  File: mutt.info, Node: Monitoring Incoming Mail, Next: User-Defined Headers, Prev: Using Multiple Spool Mailboxes, Up: Configuration 3.16 Monitoring Incoming Mail ============================= Usage: mailboxes [ [ -notify | -nonotify ] [ -poll | -nopoll ] [ -label label | -nolabel ] mailbox ] []… unmailboxes { * | mailbox …} This command specifies folders which can receive mail and which will be checked for new messages periodically. Use ‘-nonotify’ to disable notifying when new mail arrives. The ‘-notify’ argument can be used to reenable notifying for an existing mailbox. If unspecified: a new mailbox will notify by default, while an existing mailbox will be unchanged. To disable polling, specify ‘-nopoll’ before the mailbox name. The ‘-poll’ argument can be used to reenable polling for an existing mailbox. If unspecified: a new mailbox will poll by default, while an existing mailbox will be unchanged. The ‘-label’ argument can be used to specify an alternative label to print in the sidebar or mailbox browser instead of the mailbox path. A label may be removed via the ‘-nolabel’ argument. If unspecified, an existing mailbox label will be unchanged. _mailbox_ can either be a local file or directory (Mbox/Mmdf or Maildir/Mh). If Mutt was built with POP and/or IMAP support, _mailbox_ can also be a POP/IMAP folder URL. The URL syntax is described in *note URL Syntax::, POP and IMAP are described in *note POP3 Support:: and *note IMAP Support:: respectively. Mutt provides a number of advanced features for handling (possibly many) folders and new mail within them, please refer to *note New Mail Detection:: for details (including in what situations and how often Mutt checks for new mail). Additionally, $new_mail_command (*note new_mail_command::) can be used to run a command when new mail is detected. The ‘unmailboxes’ command is used to remove a token from the list of folders which receive mail. Use ‘unmailboxes *’ to remove all tokens. *Note* The folders in the ‘mailboxes’ command are resolved when the command is executed, so if these names contain shortcut characters (*note Mailbox Shortcuts::) (such as ‘=’ and ‘!’), any variable definition that affects these characters (like $folder (*note folder::) and $spoolfile (*note spoolfile::)) should be set before the ‘mailboxes’ command. If none of these shortcuts are used, a local path should be absolute as otherwise Mutt tries to find it relative to the directory from where Mutt was started which may not always be desired.  File: mutt.info, Node: User-Defined Headers, Next: Specify Default Save Mailbox, Prev: Monitoring Incoming Mail, Up: Configuration 3.17 User-Defined Headers ========================= Usage: my_hdr string unmy_hdr { * | field …} The ‘my_hdr’ command allows you to add custom header fields to every message you send. It can also be used as an alternate way to set some standard envelope header fields, see below for more details. Custom header fields will be added to every message you send and appear in the editor if $edit_headers (*note edit_headers::) is set. For example, if you would like to add an ‘Organization:’ header field to all of your outgoing messages, you can put the command something like shown in *note Defining custom headers:: in your ‘.muttrc’. *Defining custom headers* my_hdr Organization: A Really Big Company, Anytown, USA The standard envelope header fields To, Cc, Bcc, Subject, From, Reply-To, and Message-ID can also be set via ‘my_hdr’. For more details about when those are processed, see *note Message Composition Flow::. Note that trying to set the value of other Mutt generated header fields is not supported, and may result in an invalid email being generated. *Note* Space characters are _not_ allowed between the keyword and the colon (‘:’). The standard for electronic mail (RFC2822) says that space is illegal there, so Mutt enforces the rule. If you would like to add a header field to a single message, you should either set the $edit_headers (*note edit_headers::) variable, or use the ‘’ function (default: ‘E’) in the compose menu so that you can edit the header of your message along with the body. To remove user defined header fields, use the ‘unmy_hdr’ command. You may specify an asterisk (‘*’) to remove all header fields, or the fields to remove. For example, to remove all ‘To’ and ‘Cc’ header fields, you could use: unmy_hdr to cc  File: mutt.info, Node: Specify Default Save Mailbox, Next: Specify Default Fcc; Mailbox When Composing, Prev: User-Defined Headers, Up: Configuration 3.18 Specify Default Save Mailbox ================================= Usage: save-hook [!]pattern mailbox This command is used to override the default mailbox used when saving messages. _mailbox_ will be used as the default if the message matches _pattern_, see *note Message Matching in Hooks:: for information on the exact format. To provide more flexibility and good defaults, Mutt applies the expandos of $index_format (*note index_format::) to _mailbox_ after it was expanded. *Using %-expandos in save-hook* # default: save all to ~/Mail/ save-hook . ~/Mail/%F # save from me@turing.cs.hmc.edu and me@cs.hmc.edu to $folder/elkins save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins # save from aol.com to $folder/spam save-hook aol\\.com$ +spam Also see the ‘fcc-save-hook’ (*note Specify Default Save Filename and Default Fcc; Mailbox at Once::) command.  File: mutt.info, Node: Specify Default Fcc; Mailbox When Composing, Next: Specify Default Save Filename and Default Fcc; Mailbox at Once, Prev: Specify Default Save Mailbox, Up: Configuration 3.19 Specify Default Fcc: Mailbox When Composing ================================================ Usage: fcc-hook [!]pattern mailbox This command is used to save outgoing mail in a mailbox other than $record (*note record::). Mutt searches the initial list of message recipients for the first matching _pattern_ and uses _mailbox_ as the default Fcc: mailbox. If no match is found the message will be saved to $record (*note record::) mailbox. To provide more flexibility and good defaults, Mutt applies the expandos of $index_format (*note index_format::) to _mailbox_ after it was expanded. See *note Message Matching in Hooks:: for information on the exact format of _pattern_. fcc-hook [@.]aol\\.com$ +spammers ...will save a copy of all messages going to the aol.com domain to the '+spammers' mailbox by default. Also see the ‘fcc-save-hook’ (*note Specify Default Save Filename and Default Fcc; Mailbox at Once::) command. Multiple mailboxes may be specified by separating them with $fcc_delimiter (*note fcc_delimiter::), if set: set fcc_delimiter = ',' fcc-hook 'foo@example\.com$' '+one,+two'  File: mutt.info, Node: Specify Default Save Filename and Default Fcc; Mailbox at Once, Next: Change Settings Based Upon Message Recipients, Prev: Specify Default Fcc; Mailbox When Composing, Up: Configuration 3.20 Specify Default Save Filename and Default Fcc: Mailbox at Once =================================================================== Usage: fcc-save-hook [!]pattern mailbox This command is a shortcut, almost equivalent to doing both a ‘fcc-hook’ (*note Specify Default Fcc; Mailbox When Composing::) and a ‘save-hook’ (*note Specify Default Save Mailbox::) with its arguments, including %-expansion on _mailbox_ according to $index_format (*note index_format::). Note, however that the fcc-save-hook is not designed to take advantage of multiple mailboxes, as fcc-hook is. For correct behavior, you should use separate fcc and save hooks in that case.  File: mutt.info, Node: Change Settings Based Upon Message Recipients, Next: Change Settings Before Formatting a Message, Prev: Specify Default Save Filename and Default Fcc; Mailbox at Once, Up: Configuration 3.21 Change Settings Based Upon Message Recipients ================================================== Usage: reply-hook [!]pattern command send-hook [!]pattern command send2-hook [!]pattern command These commands can be used to execute arbitrary configuration commands based upon recipients of the message. _pattern_ is used to match the message, see *note Message Matching in Hooks:: for details. _command_ is executed when _pattern_ matches. ‘reply-hook’ is matched against the message you are _replying to_, instead of the message you are _sending_. ‘send-hook’ is matched against all messages, both _new_ and _replies_. *Note* ‘reply-hook’s are matched _before_ the ‘send-hook’, _regardless_ of the order specified in the user's configuration file. However, you can inhibit ‘send-hook’ in the reply case by using the pattern ‘'! ~Q'’ (_not replied_, see *note Message Matching in Hooks::) in the ‘send-hook’ to tell when ‘reply-hook’ have been executed. ‘send2-hook’ is matched every time a message is changed, either by editing it, or by using the compose menu to change its recipients or subject. ‘send2-hook’ is executed after ‘send-hook’, and can, e.g., be used to set parameters such as the $sendmail (*note sendmail::) variable depending on the message's sender address. For each type of ‘send-hook’ or ‘reply-hook’, when multiple matches occur, commands are executed in the order they are specified in the ‘.muttrc’ (for that type of hook). Example: ‘‘send-hook’ mutt "‘set’ mime_forward signature=''"’ Another typical use for this command is to change the values of the $attribution (*note attribution::), $attribution_locale (*note attribution_locale::), and $signature (*note signature::) variables in order to change the language of the attributions and signatures based upon the recipients. *Note* ‘send-hook’'s are only executed once after getting the initial list of recipients. They are not executed when resuming a postponed draft. Adding a recipient after replying or editing the message will not cause any ‘send-hook’ to be executed, similarly if $autoedit (*note autoedit::) is set (as then the initial list of recipients is empty). Also note that ‘my_hdr’ (*note User-Defined Headers::) commands which modify recipient headers, or the message's subject, don't have any effect on the current message when executed from a ‘send-hook’.  File: mutt.info, Node: Change Settings Before Formatting a Message, Next: Choosing the Cryptographic Key of the Recipient, Prev: Change Settings Based Upon Message Recipients, Up: Configuration 3.22 Change Settings Before Formatting a Message ================================================ Usage: message-hook [!]pattern command This command can be used to execute arbitrary configuration commands before viewing or formatting a message based upon information about the message. _command_ is executed if the _pattern_ matches the message to be displayed. When multiple matches occur, commands are executed in the order they are specified in the ‘.muttrc’. See *note Message Matching in Hooks:: for information on the exact format of _pattern_. Example: message-hook ~A 'set pager=builtin' message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject: .*\""'  File: mutt.info, Node: Choosing the Cryptographic Key of the Recipient, Next: Dynamically Changing $index_format using Patterns, Prev: Change Settings Before Formatting a Message, Up: Configuration 3.23 Choosing the Cryptographic Key of the Recipient ==================================================== Usage: crypt-hook regexp keyid When encrypting messages with PGP/GnuPG or OpenSSL, you may want to associate a certain key with a given e-mail address automatically, either because the recipient's public key can't be deduced from the destination address, or because, for some reasons, you need to override the key Mutt would normally use. The ‘crypt-hook’ command provides a method by which you can specify the ID of the public key to be used when encrypting messages to a certain recipient. You may use multiple crypt-hooks with the same regexp; multiple matching crypt-hooks result in the use of multiple keyids for a recipient. During key selection, Mutt will confirm whether each crypt-hook is to be used (unless the $crypt_confirmhook (*note crypt_confirmhook::) option is unset). If all crypt-hooks for a recipient are declined, Mutt will use the original recipient address for key selection instead. The meaning of _keyid_ is to be taken broadly in this context: You can either put a numerical key ID or fingerprint here, an e-mail address, or even just a real name.  File: mutt.info, Node: Dynamically Changing $index_format using Patterns, Next: Adding Key Sequences to the Keyboard Buffer, Prev: Choosing the Cryptographic Key of the Recipient, Up: Configuration 3.24 Dynamically Changing $index_format using Patterns ====================================================== Usage: index-format-hook name [!]pattern format-string This command is used to inject format strings dynamically into $index_format (*note index_format::) based on pattern matching against the current message. The $index_format (*note index_format::) expando _%@name@_ specifies a placeholder for the injection. Index-format-hooks with the same _name_ are matched using _pattern_ (*note Patterns; Searching; Limiting and Tagging::) against the current message. Matching is done in the order specified in the .muttrc, with the first match being used. The hook's _format-string_ is then substituted and evaluated. Because the first match is used, best practice is to put a catch-all _~A_ pattern as the last hook. Here is an example showing how to implement dynamic date formatting: set index_format="%4C %-6@date@ %-15.15F %Z (%4c) %s" index-format-hook date "~d<1d" "%[%H:%M]" index-format-hook date "~d<1m" "%[%a %d]" index-format-hook date "~d<1y" "%[%b %d]" index-format-hook date "~A" "%[%m/%y]" Another example, showing a way to prepend to the subject. Note that without a catch-all ~A pattern, no match results in the expando being replaced with an empty string. set index_format="%4C %@subj_flags@%s" index-format-hook subj_flags "~f boss@example.com" "** BOSS ** " index-format-hook subj_flags "~f spouse@example.com" ":-) "  File: mutt.info, Node: Adding Key Sequences to the Keyboard Buffer, Next: Executing Functions, Prev: Dynamically Changing $index_format using Patterns, Up: Configuration 3.25 Adding Key Sequences to the Keyboard Buffer ================================================ Usage: push string This command adds the named string to the beginning of the keyboard buffer. The string may contain control characters, key names and function names like the sequence string in the macro (*note Keyboard Macros::) command. You may use it to automatically run a sequence of commands at startup, or when entering certain folders. For example, *note Embedding push in folder-hook:: shows how to automatically collapse all threads when entering a folder. *Embedding push in folder-hook* folder-hook . 'push ' For using functions like shown in the example, it's important to use angle brackets (‘<’ and ‘>’) to make Mutt recognize the input as a function name. Otherwise it will simulate individual just keystrokes, i.e. ‘‘push collapse-all’’ would be interpreted as if you had typed ‘c’, followed by ‘o’, followed by ‘l’, ..., which is not desired and may lead to very unexpected behavior. Keystrokes can be used, too, but are less portable because of potentially changed key bindings. With default bindings, this is equivalent to the above example: folder-hook . 'push \eV' because it simulates that Esc+V was pressed (which is the default binding of ‘’).  File: mutt.info, Node: Executing Functions, Next: Message Scoring, Prev: Adding Key Sequences to the Keyboard Buffer, Up: Configuration 3.26 Executing Functions ======================== Usage: exec function [ function ]… This command can be used to execute any function. Functions are listed in the function reference (*note Functions <1>::). ‘‘exec’ ‘function’’ is equivalent to ‘‘push ’’.  File: mutt.info, Node: Message Scoring, Next: Spam Detection, Prev: Executing Functions, Up: Configuration 3.27 Message Scoring ==================== Usage: score pattern value unscore { * | pattern …} The ‘score’ commands adds _value_ to a message's score if _pattern_ matches it. _pattern_ is a string in the format described in the patterns (*note Patterns; Searching; Limiting and Tagging::) section (note: For efficiency reasons, patterns which scan information not available in the index, such as ‘~b’, ‘~B’, ‘~h’, ‘~M’, or ‘~X’ may not be used). _value_ is a positive or negative integer. A message's final score is the sum total of all matching ‘score’ entries. However, you may optionally prefix _value_ with an equal sign (‘=’) to cause evaluation to stop at a particular entry if there is a match. Negative final scores are rounded up to 0. The ‘unscore’ command removes score entries from the list. You _must_ specify the same pattern specified in the ‘score’ command for it to be removed. The pattern ‘*’ is a special token which means to clear the list of all score entries. Scoring occurs as the messages are read in, before the mailbox is sorted. Because of this, patterns which depend on threading, such as _~=_, _~$_, and _~()_, will not work by default. A workaround is to push the scoring command in a folder hook. This will cause the mailbox to be rescored after it is opened and input starts being processed: folder-hook . 'push "score ~= 10"'  File: mutt.info, Node: Spam Detection, Next: Setting and Querying Variables, Prev: Message Scoring, Up: Configuration 3.28 Spam Detection =================== Usage: spam pattern format nospam { * | pattern } Mutt has generalized support for external spam-scoring filters. By defining your spam patterns with the ‘spam’ and ‘nospam’ commands, you can _limit_, _search_, and _sort_ your mail based on its spam attributes, as determined by the external filter. You also can display the spam attributes in your index display using the ‘%H’ selector in the $index_format (*note index_format::) variable. (Tip: try ‘%?H?[%H] ?’ to display spam tags only when they are defined for a given message.) Note: the value displayed by ‘%H’ and searched by ‘~H’ is stored in the header cache (*note Local Caching::). Mutt isn't smart enough to invalidate a header cache entry based on changing ‘spam’ rules, so if you aren't seeing correct ‘%H’ values, try temporarily turning off the header cache. If that fixes the problem, then once your spam rules are set to your liking, remove your stale header cache files and turn the header cache back on. Your first step is to define your external filter's spam patterns using the ‘spam’ command. _pattern_ should be a regular expression that matches a header in a mail message. If any message in the mailbox matches this regular expression, it will receive a ‘spam tag’ or ‘spam attribute’ (unless it also matches a ‘nospam’ pattern — see below.) The appearance of this attribute is entirely up to you, and is governed by the _format_ parameter. _format_ can be any static text, but it also can include back-references from the _pattern_ expression. (A regular expression ‘back-reference’ refers to a sub-expression contained within parentheses.) ‘%1’ is replaced with the first back-reference in the regex, ‘%2’ with the second, etc. To match spam tags, mutt needs the corresponding header information which is always the case for local and POP folders but not for IMAP in the default configuration. Depending on the spam header to be analyzed, $imap_headers (*note imap_headers::) may need to be adjusted. If you're using multiple spam filters, a message can have more than one spam-related header. You can define ‘spam’ patterns for each filter you use. If a message matches two or more of these patterns, and the $spam_separator (*note spam_separator::) variable is set to a string, then the message's spam tag will consist of all the _format_ strings joined together, with the value of $spam_separator (*note spam_separator::) separating them. For example, suppose one uses DCC, SpamAssassin, and PureMessage, then the configuration might look like in *note Configuring spam detection::. *Configuring spam detection* spam "X-DCC-.*-Metrics:.*(....)=many" "90+/DCC-%1" spam "X-Spam-Status: Yes" "90+/SA" spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM" set spam_separator=", " If then a message is received that DCC registered with ‘many’ hits under the ‘Fuz2’ checksum, and that PureMessage registered with a 97% probability of being spam, that message's spam tag would read ‘90+/DCC-Fuz2, 97/PM’. (The four characters before ‘=many’ in a DCC report indicate the checksum used — in this case, ‘Fuz2’.) If the $spam_separator (*note spam_separator::) variable is unset, then each spam pattern match supersedes the previous one. Instead of getting joined _format_ strings, you'll get only the last one to match. The spam tag is what will be displayed in the index when you use ‘%H’ in the $index_format (*note index_format::) variable. It's also the string that the ‘~H’ pattern-matching expression matches against for ‘’ and ‘’ functions. And it's what sorting by spam attribute will use as a sort key. That's a pretty complicated example, and most people's actual environments will have only one spam filter. The simpler your configuration, the more effective Mutt can be, especially when it comes to sorting. Generally, when you sort by spam tag, Mutt will sort _lexically_ — that is, by ordering strings alphanumerically. However, if a spam tag begins with a number, Mutt will sort numerically first, and lexically only when two numbers are equal in value. (This is like UNIX's ‘sort -n’.) A message with no spam attributes at all — that is, one that didn't match _any_ of your ‘spam’ patterns — is sorted at lowest priority. Numbers are sorted next, beginning with 0 and ranging upward. Finally, non-numeric strings are sorted, with ‘a’ taking lower priority than ‘z’. Clearly, in general, sorting by spam tags is most effective when you can coerce your filter to give you a raw number. But in case you can't, Mutt can still do something useful. The ‘nospam’ command can be used to write exceptions to ‘spam’ patterns. If a header pattern matches something in a ‘spam’ command, but you nonetheless do not want it to receive a spam tag, you can list a more precise pattern under a ‘nospam’ command. If the _pattern_ given to ‘nospam’ is exactly the same as the _pattern_ on an existing ‘spam’ list entry, the effect will be to remove the entry from the spam list, instead of adding an exception. Likewise, if the _pattern_ for a ‘spam’ command matches an entry on the ‘nospam’ list, that nospam entry will be removed. If the _pattern_ for ‘nospam’ is ‘*’, _all entries on both lists_ will be removed. This might be the default action if you use ‘spam’ and ‘nospam’ in conjunction with a ‘folder-hook’. You can have as many ‘spam’ or ‘nospam’ commands as you like. You can even do your own primitive ‘spam’ detection within Mutt — for example, if you consider all mail from ‘MAILER-DAEMON’ to be spam, you can use a ‘spam’ command like this: spam "^From: .*MAILER-DAEMON" "999"  File: mutt.info, Node: Setting and Querying Variables, Next: Reading Initialization Commands From Another File, Prev: Spam Detection, Up: Configuration 3.29 Setting and Querying Variables =================================== * Menu: * Variable Types:: * Commands:: * User-Defined Variables:: * Type Conversions::  File: mutt.info, Node: Variable Types, Next: Commands, Up: Setting and Querying Variables 3.29.1 Variable Types --------------------- Mutt supports these types of configuration variables: boolean A boolean expression, either ‘yes’ or ‘no’. number A signed integer number in the range -32768 to 32767. number (long) A signed integer number in the range -2147483648 to 2147483647. string Arbitrary text. path A specialized string for representing paths including support for mailbox shortcuts (see *note Mailbox Shortcuts::) as well as tilde (‘~’) for a user's home directory and more. quadoption Like a boolean but triggers a prompt when set to ‘ask-yes’ or ‘ask-no’ with ‘yes’ and ‘no’ preselected respectively. sort order A specialized string allowing only particular words as values depending on the variable. regular expression A regular expression, see *note Regular Expressions:: for an introduction. folder magic Specifies the type of folder to use: _mbox_, _mmdf_, _mh_ or _maildir_. Currently only used to determine the type for newly created folders. e-mail address An e-mail address either with or without realname. The older ‘‘user@example.org (Joe User)’’ form is supported but strongly deprecated. user-defined Arbitrary text, see *note User-Defined Variables:: for details.  File: mutt.info, Node: Commands, Next: User-Defined Variables, Prev: Variable Types, Up: Setting and Querying Variables 3.29.2 Commands --------------- The following commands are available to manipulate and query variables: Usage: set { [no | inv] variable | variable=value } []… toggle variable [ variable ]… unset variable [ variable ]… reset variable [ variable ]… This command is used to set (and unset) configuration variables (*note Configuration Variables::). There are four basic types of variables: boolean, number, string and quadoption. _boolean_ variables can be _set_ (true) or _unset_ (false). _number_ variables can be assigned a positive integer value. _string_ variables consist of any number of printable characters and must be enclosed in quotes if they contain spaces or tabs. You may also use the escape sequences ‘\n’ and ‘\t’ for newline and tab, respectively. _quadoption_ variables are used to control whether or not to be prompted for certain actions, or to specify a default action. A value of _yes_ will cause the action to be carried out automatically as if you had answered yes to the question. Similarly, a value of _no_ will cause the action to be carried out as if you had answered ‘no.’ A value of _ask-yes_ will cause a prompt with a default answer of ‘yes’ and _ask-no_ will provide a default answer of ‘no.’ Prefixing a variable with ‘no’ will unset it. Example: ‘‘set’ noaskbcc’. For _boolean_ variables, you may optionally prefix the variable name with ‘inv’ to toggle the value (on or off). This is useful when writing macros. Example: ‘‘set’ invsmart_wrap’. The ‘toggle’ command automatically prepends the ‘inv’ prefix to all specified variables. The ‘unset’ command automatically prepends the ‘no’ prefix to all specified variables. Using the ‘’ function in the _index_ menu, you can query the value of a variable by prefixing the name of the variable with a question mark: set ?allow_8bit The question mark is actually only required for boolean and quadoption variables. The ‘reset’ command resets all given variables to the compile time defaults (hopefully mentioned in this manual). If you use the command ‘set’ and prefix the variable with ‘&’ this has the same behavior as the ‘reset’ command. With the ‘reset’ command there exists the special variable ‘all’, which allows you to reset all variables to their system defaults.  File: mutt.info, Node: User-Defined Variables, Next: Type Conversions, Prev: Commands, Up: Setting and Querying Variables 3.29.3 User-Defined Variables ----------------------------- * Menu: * Introduction: Introduction <3>. * Examples::  File: mutt.info, Node: Introduction <3>, Next: Examples, Up: User-Defined Variables 3.29.3.1 Introduction ..................... Along with the variables listed in the Configuration variables (*note Configuration Variables::) section, Mutt supports user-defined variables with names starting with ‘my_’ as in, for example, ‘my_cfgdir’. The ‘set’ command either creates a custom ‘my_’ variable or changes its value if it does exist already. The ‘unset’ and ‘reset’ commands remove the variable entirely. Since user-defined variables are expanded in the same way that environment variables are (except for the shell-escape (*note shell-escape::) command and backtick expansion), this feature can be used to make configuration files more readable.  File: mutt.info, Node: Examples, Prev: Introduction <3>, Up: User-Defined Variables 3.29.3.2 Examples ................. The following example defines and uses the variable ‘my_cfgdir’ to abbreviate the calls of the ‘source’ (*note Reading Initialization Commands From Another File::) command: *Using user-defined variables for config file readability* set my_cfgdir = $HOME/mutt/config source $my_cfgdir/hooks source $my_cfgdir/macros # more source commands... A custom variable can also be used in macros to backup the current value of another variable. In the following example, the value of the $delete (*note delete::) is changed temporarily while its original value is saved as ‘my_delete’. After the macro has executed all commands, the original value of $delete (*note delete::) is restored. *Using user-defined variables for backing up other config option values* macro pager ,x '\ set my_delete=$delete\ set delete=yes\ ...\ set delete=$my_delete' Since Mutt expands such values already when parsing the configuration file(s), the value of ‘$my_delete’ in the last example would be the value of $delete (*note delete::) exactly as it was at that point during parsing the configuration file. If another statement would change the value for $delete (*note delete::) later in the same or another file, it would have no effect on ‘$my_delete’. However, the expansion can be deferred to runtime, as shown in the next example, when escaping the dollar sign. *Deferring user-defined variable expansion to runtime* macro pager "\ set my_old_pager_stop=\$pager_stop pager_stop\ \ set pager_stop=\$my_old_pager_stop\ unset my_old_pager_stop" Note that there is a space between ‘’ and the ‘set’ configuration command, preventing Mutt from recording the ‘macro’'s commands into its history.  File: mutt.info, Node: Type Conversions, Prev: User-Defined Variables, Up: Setting and Querying Variables 3.29.4 Type Conversions ----------------------- Variables are always assigned string values which Mutt parses into its internal representation according to the type of the variable, for example an integer number for numeric types. For all queries (including $-expansion) the value is converted from its internal type back into string. As a result, any variable can be assigned any value given that its content is valid for the target. This also counts for custom variables which are of type string. In case of parsing errors, Mutt will print error messages. *note Type conversions using variables:: demonstrates type conversions. *Type conversions using variables* set my_lines = "5" # value is string "5" set pager_index_lines = $my_lines # value is integer 5 set my_sort = "date-received" # value is string "date-received" set sort = "last-$my_sort" # value is sort last-date-received set my_inc = $read_inc # value is string "10" (default of $read_inc) set my_foo = $my_inc # value is string "10" These assignments are all valid. If, however, the value of ‘$my_lines’ would have been ‘five’ (or something else that cannot be parsed into a number), the assignment to ‘$pager_index_lines’ would have produced an error message. Type conversion applies to all configuration commands which take arguments. But please note that every expanded value of a variable is considered just a single token. A working example is: set my_pattern = "~A" set my_number = "10" # same as: score ~A +10 score $my_pattern +$my_number What does _not_ work is: set my_mx = "+mailbox1 +mailbox2" mailboxes $my_mx +mailbox3 because the value of ‘$my_mx’ is interpreted as a single mailbox named ‘+mailbox1 +mailbox2’ and not two distinct mailboxes.  File: mutt.info, Node: Reading Initialization Commands From Another File, Next: Removing Hooks, Prev: Setting and Querying Variables, Up: Configuration 3.30 Reading Initialization Commands From Another File ====================================================== Usage: source filename This command allows the inclusion of initialization commands from other files. For example, I place all of my aliases in ‘~/.mail_aliases’ so that I can make my ‘~/.muttrc’ readable and keep my aliases private. If the filename begins with a tilde (‘~’), it will be expanded to the path of your home directory. If the filename ends with a vertical bar (‘|’), then _filename_ is considered to be an executable program from which to read input (e.g. ‘‘source’ ~/bin/myscript|’).  File: mutt.info, Node: Removing Hooks, Next: Format Strings, Prev: Reading Initialization Commands From Another File, Up: Configuration 3.31 Removing Hooks =================== Usage: unhook { * | hook-type } This command permits you to flush hooks you have previously defined. You can either remove all hooks by giving the ‘*’ character as an argument, or you can remove all hooks of a specific type by saying something like ‘‘unhook’ send-hook’.  File: mutt.info, Node: Format Strings, Next: Control allowed header fields in a mailto; URL, Prev: Removing Hooks, Up: Configuration 3.32 Format Strings =================== * Menu: * Basic usage:: * Conditionals:: * Filters:: * Padding:: * Bytes size display::  File: mutt.info, Node: Basic usage, Next: Conditionals, Up: Format Strings 3.32.1 Basic usage ------------------ Format strings are a general concept you'll find in several locations through the Mutt configuration, especially in the $index_format (*note index_format::), $pager_format (*note pager_format::), $status_format (*note status_format::), and other related variables. These can be very straightforward, and it's quite possible you already know how to use them. The most basic format string element is a percent symbol followed by another character. For example, ‘%s’ represents a message's Subject: header in the $index_format (*note index_format::) variable. The ‘expandos’ available are documented with each format variable, but there are general modifiers available with all formatting expandos, too. Those are our concern here. Some of the modifiers are borrowed right out of C (though you might know them from Perl, Python, shell, or another language). These are the ‘[-]m.n’ modifiers, as in ‘%-12.12s’. As with such programming languages, these modifiers allow you to specify the minimum and maximum size of the resulting string, as well as its justification. If the ‘-’ sign follows the percent, the string will be left-justified instead of right-justified. If there's a number immediately following that, it's the minimum amount of space the formatted string will occupy — if it's naturally smaller than that, it will be padded out with spaces. If a decimal point and another number follow, that's the maximum space allowable — the string will not be permitted to exceed that width, no matter its natural size. Each of these three elements is optional, so that all these are legal format strings: ‘%-12s’, ‘%4c’, ‘%.15F’ and ‘%-12.15L’. Mutt adds some other modifiers to format strings. If you use an equals symbol (‘=’) as a numeric prefix (like the minus above), it will force the string to be centered within its minimum space range. For example, ‘%=14y’ will reserve 14 characters for the %y expansion — that's the X-Label: header, in $index_format (*note index_format::). If the expansion results in a string less than 14 characters, it will be centered in a 14-character space. If the X-Label for a message were ‘test’, that expansion would look like ‘     test     ’. There are two very little-known modifiers that affect the way that an expando is replaced. If there is an underline (‘_’) character between any format modifiers (as above) and the expando letter, it will expands in all lower case. And if you use a colon (‘:’), it will replace all decimal points with underlines.  File: mutt.info, Node: Conditionals, Next: Filters, Prev: Basic usage, Up: Format Strings 3.32.2 Conditionals ------------------- Depending on the format string variable, some of its sequences can be used to optionally print a string if their value is nonzero. For example, you may only want to see the number of flagged messages if such messages exist, since zero is not particularly meaningful. To optionally print a string based upon one of the above sequences, the following construct is used: %??? where _sequence_char_ is an expando, and _optional_string_ is the string you would like printed if _sequence_char_ is nonzero. _optional_string_ may contain other sequences as well as normal text, but you may not nest optional strings. Here is an example illustrating how to optionally print the number of new messages in a mailbox in $status_format (*note status_format::): %?n?%n new messages.? You can also switch between two strings using the following construct: %??&? If the value of _sequence_char_ is non-zero, _if_string_ will be expanded, otherwise _else_string_ will be expanded.  File: mutt.info, Node: Filters, Next: Padding, Prev: Conditionals, Up: Format Strings 3.32.3 Filters -------------- Any format string ending in a vertical bar (‘|’) will be expanded and piped through the first word in the string, using spaces as separator. The string returned will be used for display. If the returned string ends in %, it will be passed through the formatter a second time. This allows the filter to generate a replacement format string including % expandos. All % expandos in a format string are expanded before the script is called so that: *Using external filters in format strings* set status_format="script.sh '%r %f (%L)'|" will make Mutt expand ‘%r’, ‘%f’ and ‘%L’ before calling the script. The example also shows that arguments can be quoted: the script will receive the expanded string between the single quotes as the only argument. A practical example is the ‘mutt_xtitle’ script installed in the ‘samples’ subdirectory of the Mutt documentation: it can be used as filter for $status_format (*note status_format::) to set the current terminal's title, if supported.  File: mutt.info, Node: Padding, Next: Bytes size display, Prev: Filters, Up: Format Strings 3.32.4 Padding -------------- In most format strings, Mutt supports different types of padding using special %-expandos: ‘%|X’ When this occurs, Mutt will fill the rest of the line with the character ‘X’. For example, filling the rest of the line with dashes is done by setting: set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-" ‘%>X’ Since the previous expando stops at the end of line, there must be a way to fill the gap between two items via the ‘%>X’ expando: it puts as many characters ‘X’ in between two items so that the rest of the line will be right-justified. For example, to not put the version string and hostname the above example on the left but on the right and fill the gap with spaces, one might use (note the space after ‘%>’): set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)" ‘%*X’ Normal right-justification will print everything to the left of the ‘%>’, displaying padding and whatever lies to the right only if there's room. By contrast, ‘soft-fill’ gives priority to the right-hand side, guaranteeing space to display it and showing padding only if there's still room. If necessary, soft-fill will eat text leftwards to make room for rightward text. For example, to right-justify the subject making sure as much as possible of it fits on screen, one might use (note two spaces after ‘%* ’: the second ensures there's a space between the truncated right-hand side and the subject): set index_format="%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?)%* %s"  File: mutt.info, Node: Bytes size display, Prev: Padding, Up: Format Strings 3.32.5 Bytes size display ------------------------- Various format strings contain expandos that display the size of messages in bytes. This includes ‘%s’ in $attach_format (*note attach_format::), ‘%l’ in $compose_format (*note compose_format::), ‘%s’ in $folder_format (*note folder_format::), ‘%c’ in $index_format (*note index_format::), and %l and %L in $status_format (*note status_format::). There are four configuration variables that can be used to customize how the numbers are displayed. $size_show_bytes (*note size_show_bytes::) will display the number of bytes when the size is < 1 kilobyte. When unset, kilobytes will be displayed instead. $size_show_mb (*note size_show_mb::) will display the number of megabytes when the size is >= 1 megabyte. When unset, kilobytes will be displayed instead (which could be a large number). $size_show_fractions (*note size_show_fractions::), will display numbers with a single decimal place for values from 0 to 10 kilobytes, and 1 to 10 megabytes. $size_units_on_left (*note size_units_on_left::) will display the unit (‘K’ or ‘M’) to the left of the number, instead of the right if unset. These variables also affect size display in a few other places, such as progress indicators and attachment delimiters in the pager.  File: mutt.info, Node: Control allowed header fields in a mailto; URL, Prev: Format Strings, Up: Configuration 3.33 Control allowed header fields in a mailto: URL =================================================== Usage: mailto_allow { * | header-field …} unmailto_allow { * | header-field …} As a security measure, Mutt will only add user-approved header fields from a ‘mailto:’ URL. This is necessary since Mutt will handle certain header fields, such as ‘Attach:’, in a special way. The ‘mailto_allow’ and ‘unmailto_allow’ commands allow the user to modify the list of approved headers. Mutt initializes the default list to contain the ‘Subject’ and ‘Body’ header fields, which are the only requirement specified by the ‘mailto:’ specification in RFC2368, along with ‘Cc’, ‘In-Reply-To’, and ‘References’, to support mailing list URLs.  File: mutt.info, Node: Advanced Usage, Next: Mutt's MIME Support, Prev: Configuration, Up: Top 4 Advanced Usage **************** * Menu: * Character Set Handling:: * Regular Expressions:: * Patterns; Searching, Limiting and Tagging: Patterns; Searching; Limiting and Tagging. * Marking Messages:: * Using Tags:: * Using Hooks:: * Managing the Environment:: * External Address Queries:: * Mailbox Formats:: * Mailbox Shortcuts:: * Handling Mailing Lists:: * Display Munging:: * New Mail Detection:: * Editing Threads:: * Delivery Status Notification (DSN) Support: Delivery Status Notification [DSN] Support. * Start a WWW Browser on URLs:: * Echoing Text:: * Message Composition Flow:: * Batch Composition Flow:: * Using MuttLisp (EXPERIMENTAL): Using MuttLisp [EXPERIMENTAL]. * Miscellany::  File: mutt.info, Node: Character Set Handling, Next: Regular Expressions, Up: Advanced Usage 4.1 Character Set Handling ========================== A ‘character set’ is basically a mapping between bytes and glyphs and implies a certain character encoding scheme. For example, for the ISO 8859 family of character sets, an encoding of 8bit per character is used. For the Unicode character set, different character encodings may be used, UTF-8 being the most popular. In UTF-8, a character is represented using a variable number of bytes ranging from 1 to 4. Since Mutt is a command-line tool run from a shell, and delegates certain tasks to external tools (such as an editor for composing/editing messages), all of these tools need to agree on a character set and encoding. There exists no way to reliably deduce the character set a plain text file has. Interoperability is gained by the use of well-defined environment variables. The full set can be printed by issuing ‘locale’ on the command line. Upon startup, Mutt determines the character set on its own using routines that inspect locale-specific environment variables. Therefore, it is generally not necessary to set the ‘$charset’ variable in Mutt. It may even be counter-productive as Mutt uses system and library functions that derive the character set themselves and on which Mutt has no influence. It's safest to let Mutt work out the locale setup itself. If you happen to work with several character sets on a regular basis, it's highly advisable to use Unicode and an UTF-8 locale. Unicode can represent nearly all characters in a message at the same time. When not using a Unicode locale, it may happen that you receive messages with characters not representable in your locale. When displaying such a message, or replying to or forwarding it, information may get lost possibly rendering the message unusable (not only for you but also for the recipient, this breakage is not reversible as lost information cannot be guessed). A Unicode locale makes all conversions superfluous which eliminates the risk of conversion errors. It also eliminates potentially wrong expectations about the character set between Mutt and external programs. The terminal emulator used also must be properly configured for the current locale. Terminal emulators usually do _not_ derive the locale from environment variables, they need to be configured separately. If the terminal is incorrectly configured, Mutt may display random and unexpected characters (question marks, octal codes, or just random glyphs), format strings may not work as expected, you may not be abled to enter non-ascii characters, and possible more. Data is always represented using bytes and so a correct setup is very important as to the machine, all character sets ‘look’ the same. Warning: A mismatch between what system and library functions think the locale is and what Mutt was told what the locale is may make it behave badly with non-ascii input: it will fail at seemingly random places. This warning is to be taken seriously since not only local mail handling may suffer: sent messages may carry wrong character set information the _receiver_ has too deal with. The need to set ‘$charset’ directly in most cases points at terminal and environment variable setup problems, not Mutt problems. A list of officially assigned and known character sets can be found at IANA (http://www.iana.org/assignments/character-sets), a list of locally supported locales can be obtained by running ‘locale -a’.  File: mutt.info, Node: Regular Expressions, Next: Patterns; Searching; Limiting and Tagging, Prev: Character Set Handling, Up: Advanced Usage 4.2 Regular Expressions ======================= All string patterns in Mutt including those in more complex patterns (*note Patterns; Searching; Limiting and Tagging::) must be specified using regular expressions (regexp) in the ‘POSIX extended’ syntax (which is more or less the syntax used by egrep and GNU awk). For your convenience, we have included below a brief description of this syntax. The search is case sensitive if the pattern contains at least one upper case letter, and case insensitive otherwise. *Note* ‘\’ must be quoted if used for a regular expression in an initialization command: ‘\\’. A regular expression is a pattern that describes a set of strings. Regular expressions are constructed analogously to arithmetic expressions, by using various operators to combine smaller expressions. *Note* The regular expression can be enclosed/delimited by either " or ' which is useful if the regular expression includes a white-space character. See *note Syntax of Initialization Files:: for more information on " and ' delimiter processing. To match a literal " or ' you must preface it with \ (backslash). The fundamental building blocks are the regular expressions that match a single character. Most characters, including all letters and digits, are regular expressions that match themselves. Any metacharacter with special meaning may be quoted by preceding it with a backslash. The period ‘.’ matches any single character. The caret ‘^’ and the dollar sign ‘$’ are metacharacters that respectively match the empty string at the beginning and end of a line. A list of characters enclosed by ‘[’ and ‘]’ matches any single character in that list; if the first character of the list is a caret ‘^’ then it matches any character _not_ in the list. For example, the regular expression _[0123456789]_ matches any single digit. A range of ASCII characters may be specified by giving the first and last characters, separated by a hyphen ‘-’. Most metacharacters lose their special meaning inside lists. To include a literal ‘]’ place it first in the list. Similarly, to include a literal ‘^’ place it anywhere but first. Finally, to include a literal hyphen ‘-’ place it last. Certain named classes of characters are predefined. Character classes consist of ‘[:’, a keyword denoting the class, and ‘:]’. The following classes are defined by the POSIX standard in *note POSIX regular expression character classes:: *POSIX regular expression character classes* Character class Description [:alnum:] Alphanumeric characters [:alpha:] Alphabetic characters [:blank:] Space or tab characters [:cntrl:] Control characters [:digit:] Numeric characters [:graph:] Characters that are both printable and visible. (A space is printable, but not visible, while an ‘a’ is both) [:lower:] Lower-case alphabetic characters [:print:] Printable characters (characters that are not control characters) [:punct:] Punctuation characters (characters that are not letter, digits, control characters, or space characters) [:space:] Space characters (such as space, tab and formfeed, to name a few) [:upper:] Upper-case alphabetic characters [:xdigit:] Characters that are hexadecimal digits A character class is only valid in a regular expression inside the brackets of a character list. *Note* Note that the brackets in these class names are part of the symbolic names, and must be included in addition to the brackets delimiting the bracket list. For example, _[[:digit:]]_ is equivalent to _[0-9]_. Two additional special sequences can appear in character lists. These apply to non-ASCII character sets, which can have single symbols (called collating elements) that are represented with more than one character, as well as several characters that are equivalent for collating or sorting purposes: Collating Symbols A collating symbol is a multi-character collating element enclosed in ‘[.’ and ‘.]’. For example, if ‘ch’ is a collating element, then _[[.ch.]]_ is a regexp that matches this collating element, while _[ch]_ is a regexp that matches either ‘c’ or ‘h’. Equivalence Classes An equivalence class is a locale-specific name for a list of characters that are equivalent. The name is enclosed in ‘[=’ and ‘=]’. For example, the name ‘e’ might be used to represent all of ‘e’ with grave (‘è’), ‘e’ with acute (‘é’) and ‘e’. In this case, _[[=e=]]_ is a regexp that matches any of: ‘e’ with grave (‘è’), ‘e’ with acute (‘é’) and ‘e’. A regular expression matching a single character may be followed by one of several repetition operators described in *note Regular expression repetition operators::. *Regular expression repetition operators* Operator Description ? The preceding item is optional and matched at most once * The preceding item will be matched zero or more times + The preceding item will be matched one or more times {n} The preceding item is matched exactly _n_ times {n,} The preceding item is matched _n_ or more times {,m} The preceding item is matched at most _m_ times {n,m} The preceding item is matched at least _n_ times, but no more than _m_ times Two regular expressions may be concatenated; the resulting regular expression matches any string formed by concatenating two substrings that respectively match the concatenated subexpressions. Two regular expressions may be joined by the infix operator ‘|’; the resulting regular expression matches any string matching either subexpression. Repetition takes precedence over concatenation, which in turn takes precedence over alternation. A whole subexpression may be enclosed in parentheses to override these precedence rules. *Note* If you compile Mutt with the included regular expression engine, the following operators may also be used in regular expressions as described in *note GNU regular expression extensions::. *GNU regular expression extensions* Expression Description \\y Matches the empty string at either the beginning or the end of a word \\B Matches the empty string within a word \\< Matches the empty string at the beginning of a word \\> Matches the empty string at the end of a word \\w Matches any word-constituent character (letter, digit, or underscore) \\W Matches any character that is not word-constituent \\' Matches the empty string at the beginning of a buffer (string) \\' Matches the empty string at the end of a buffer Please note however that these operators are not defined by POSIX, so they may or may not be available in stock libraries on various systems.  File: mutt.info, Node: Patterns; Searching; Limiting and Tagging, Next: Marking Messages, Prev: Regular Expressions, Up: Advanced Usage 4.3 Patterns: Searching, Limiting and Tagging ============================================= * Menu: * Pattern Modifier:: * Simple Searches:: * Nesting and Boolean Operators:: * Searching by Date::  File: mutt.info, Node: Pattern Modifier, Next: Simple Searches, Up: Patterns; Searching; Limiting and Tagging 4.3.1 Pattern Modifier ---------------------- Many of Mutt's commands allow you to specify a pattern to match (‘limit’, ‘tag-pattern’, ‘delete-pattern’, etc.). *note Pattern modifiers:: shows several ways to select messages. *Pattern modifiers* Pattern modifier Description ~A all messages ~b _EXPR_ messages which contain _EXPR_ in the message body ***) =b _STRING_ If IMAP is enabled, like ~b but searches for _STRING_ on the server, rather than downloading each message and searching it locally. ~B _EXPR_ messages which contain _EXPR_ in the whole message ***) =B _STRING_ If IMAP is enabled, like ~B but searches for _STRING_ on the server, rather than downloading each message and searching it locally. ~c _EXPR_ messages carbon-copied to _EXPR_ %c _GROUP_ messages carbon-copied to any member of _GROUP_ ~C _EXPR_ messages either to: or cc: _EXPR_ %C _GROUP_ messages either to: or cc: to any member of _GROUP_ ~d [_MIN_]-[_MAX_] messages with ‘date-sent’ in a Date range ~D deleted messages ~e _EXPR_ messages which contains _EXPR_ in the ‘Sender’ field %e _GROUP_ messages which contain a member of _GROUP_ in the ‘Sender’ field ~E expired messages ~F flagged messages ~f _EXPR_ messages originating from _EXPR_ %f _GROUP_ messages originating from any member of _GROUP_ ~g cryptographically signed messages ~G cryptographically encrypted messages ~h _EXPR_ messages which contain _EXPR_ in the message header ***) =h _STRING_ If IMAP is enabled, like ~h but searches for _STRING_ on the server, rather than downloading each message and searching it locally; _STRING_ must be of the form ‘header: substring’ (see below). ~H _EXPR_ messages with a spam attribute matching _EXPR_ ~i _EXPR_ messages which match _EXPR_ in the ‘Message-ID’ field ~k messages which contain PGP key material ~L _EXPR_ messages either originated or received by _EXPR_ %L _GROUP_ message either originated or received by any member of _GROUP_ ~l messages addressed to a known mailing list ~m [_MIN_]-[_MAX_] messages in the range _MIN_ to _MAX_ *) ~M _EXPR_ messages which contain a mime Content-Type matching _EXPR_ ***) ~n [_MIN_]-[_MAX_] messages with a score in the range _MIN_ to _MAX_ *) ~N new messages ~O old messages ~p messages addressed to you (consults $from (*note from::), ‘alternates’, and local account/hostname information) ~P messages from you (consults $from (*note from::), ‘alternates’, and local account/hostname information) ~Q messages which have been replied to ~r [_MIN_]-[_MAX_] messages with ‘date-received’ in a Date range ~R read messages ~s _EXPR_ messages having _EXPR_ in the ‘Subject’ field. ~S superseded messages ~t _EXPR_ messages addressed to _EXPR_ ~T tagged messages ~u messages addressed to a subscribed mailing list ~U unread messages ~v messages part of a collapsed thread. ~V cryptographically verified messages ~x _EXPR_ messages which contain _EXPR_ in the ‘References’ or ‘In-Reply-To’ field ~X [_MIN_]-[_MAX_] messages with _MIN_ to _MAX_ attachments *) ***) ~y _EXPR_ messages which contain _EXPR_ in the ‘X-Label’ field ~z [_MIN_]-[_MAX_] messages with a size in the range _MIN_ to _MAX_ *) **) ~= duplicated messages (see $duplicate_threads (*note duplicate_threads::)) ~$ unreferenced messages (requires threaded view) ~(_PATTERN_) messages in threads containing messages matching _PATTERN_, e.g. all threads containing messages from you: ~(~P) ~<(_PATTERN_) messages whose immediate parent matches _PATTERN_, e.g. replies to your messages: ~<(~P) ~>(_PATTERN_) messages having an immediate child matching _PATTERN_, e.g. messages you replied to: ~>(~P) Where _EXPR_ is a regular expression (*note Regular Expressions::), and _GROUP_ is an address group (*note Address Groups::). *) The forms ‘<[_MAX_]’, ‘>[_MIN_]’, ‘[_MIN_]-’ and ‘-[_MAX_]’ are allowed, too. **) The suffixes ‘K’ and ‘M’ are allowed to specify kilobyte and megabyte respectively. ***) These patterns read each message in, and can therefore be much slower. Over IMAP this will entail downloading each message. They can not be used for message scoring (*note Message Scoring::), and it is recommended to avoid using them for index coloring. Special attention has to be paid when using regular expressions inside of patterns. Specifically, Mutt's parser for these patterns will strip one level of backslash (‘\’), which is normally used for quoting. If it is your intention to use a backslash in the regular expression, you will need to use two backslashes instead (‘\\’). You can force Mutt to treat _EXPR_ as a simple string instead of a regular expression by using = instead of ~ in the pattern name. For example, ‘=b *.*’ will find all messages that contain the literal string ‘*.*’. Simple string matches are less powerful than regular expressions but can be considerably faster. For IMAP folders, string matches ‘=b’, ‘=B’, and ‘=h’ will be performed on the server instead of by fetching every message. IMAP treats ‘=h’ specially: it must be of the form ‘header: substring’ and will not partially match header names. The substring part may be omitted if you simply wish to find messages containing a particular header without regard to its value. Patterns matching lists of addresses (notably c, C, p, P and t) match if there is at least one match in the whole list. If you want to make sure that all elements of that list match, you need to prefix your pattern with ‘^’. This example matches all mails which only has recipients from Germany. *Matching all addresses in address lists* ^~C \.de$ You can restrict address pattern matching to aliases that you have defined with the "@" modifier. This example matches messages whose recipients are all from Germany, and who are known to your alias list. *Matching restricted to aliases* ^@~C \.de$ To match any defined alias, use a regular expression that matches any string. This example matches messages whose senders are known aliases. *Matching any defined alias* @~f .  File: mutt.info, Node: Simple Searches, Next: Nesting and Boolean Operators, Prev: Pattern Modifier, Up: Patterns; Searching; Limiting and Tagging 4.3.2 Simple Searches --------------------- Mutt supports two versions of so called ‘simple searches’. These are issued if the query entered for searching, limiting and similar operations does not seem to contain a valid pattern modifier (i.e. it does not contain one of these characters: ‘~’, ‘=’ or ‘%’). If the query is supposed to contain one of these special characters, they must be escaped by prepending a backslash (‘\’). The first type is by checking whether the query string equals a keyword case-insensitively from *note Simple search keywords::: If that is the case, Mutt will use the shown pattern modifier instead. If a keyword would conflict with your search keyword, you need to turn it into a regular expression to avoid matching the keyword table. For example, if you want to find all messages matching ‘flag’ (using $simple_search (*note simple_search::)) but don't want to match flagged messages, simply search for ‘‘[f]lag’’. *Simple search keywords* Keyword Pattern modifier all ~A . ~A ^ ~A del ~D flag ~F new ~N old ~O repl ~Q read ~R tag ~T unread ~U The second type of simple search is to build a complex search pattern using $simple_search (*note simple_search::) as a template. Mutt will insert your query properly quoted and search for the composed complex query.  File: mutt.info, Node: Nesting and Boolean Operators, Next: Searching by Date, Prev: Simple Searches, Up: Patterns; Searching; Limiting and Tagging 4.3.3 Nesting and Boolean Operators ----------------------------------- Logical AND is performed by specifying more than one criterion. For example: ~t mutt ~f elkins would select messages which contain the word ‘mutt’ in the list of recipients _and_ that have the word ‘elkins’ in the ‘From’ header field. Mutt also recognizes the following operators to create more complex search patterns: • ! — logical NOT operator • | — logical OR operator • () — logical grouping operator Here is an example illustrating a complex search pattern. This pattern will select all messages which do not contain ‘mutt’ in the ‘To’ or ‘Cc’ field and which are from ‘elkins’. *Using boolean operators in patterns* !(~t mutt|~c mutt) ~f elkins Here is an example using white space in the regular expression (note the ‘'’ and ‘"’ delimiters). For this to match, the mail's subject must match the ‘^Junk +From +Me$’ and it must be from either ‘Jim +Somebody’ or ‘Ed +SomeoneElse’: '~s "^Junk +From +Me$" ~f ("Jim +Somebody"|"Ed +SomeoneElse")' *Note* If a regular expression contains parenthesis, or a vertical bar ("|"), you _must_ enclose the expression in double or single quotes since those characters are also used to separate different parts of Mutt's pattern language. For example: ‘~f "me@(mutt\.org|cs\.hmc\.edu)"’ Without the quotes, the parenthesis wouldn't end. This would be separated to two OR'd patterns: _~f me@(mutt\.org_ and _cs\.hmc\.edu)_. They are never what you want.  File: mutt.info, Node: Searching by Date, Prev: Nesting and Boolean Operators, Up: Patterns; Searching; Limiting and Tagging 4.3.4 Searching by Date ----------------------- Mutt supports two types of dates, _absolute_ and _relative_. * Menu: * Absolute Dates:: * Relative Dates::  File: mutt.info, Node: Absolute Dates, Next: Relative Dates, Up: Searching by Date 4.3.4.1 Absolute Dates ...................... Dates _must_ be in DD/MM/YY format (month and year are optional, defaulting to the current month and year) or YYYYMMDD. An example of a valid range of dates is: Limit to messages matching: ~d 20/1/95-31/10 Limit to messages matching: ~d 19950120-19951031 If you omit the minimum (first) date, and just specify ‘-DD/MM/YY’ or ‘-YYYYMMDD’, all messages _before_ the given date will be selected. If you omit the maximum (second) date, and specify ‘DD/MM/YY-’, all messages _after_ the given date will be selected. If you specify a single date with no dash (‘-’), only messages sent on the given date will be selected. You can add error margins to absolute dates. An error margin is a sign (+ or -), followed by a digit, followed by one of the units in *note Date units::. As a special case, you can replace the sign by a ‘*’ character, which is equivalent to giving identical plus and minus error margins. *Date units* Unit Description y Years m Months w Weeks d Days Example: To select any messages two weeks around January 15, 2001, you'd use the following pattern: Limit to messages matching: ~d 15/1/2001*2w  File: mutt.info, Node: Relative Dates, Prev: Absolute Dates, Up: Searching by Date 4.3.4.2 Relative Dates ...................... This type of date is relative to the current date, and may be specified as: • >_offset_ for messages older than _offset_ units • <_offset_ for messages newer than _offset_ units • =_offset_ for messages exactly _offset_ units old _offset_ is specified as a positive number with one of the units from *note Relative date units::. *Relative date units* Unit Description y Years m Months w Weeks d Days H Hours M Minutes S Seconds Example: to select messages less than 1 month old, you would use Limit to messages matching: ~d <1m *Note* All dates used when searching are relative to the _local_ time zone, so unless you change the setting of your $index_format (*note index_format::) to include a ‘%[...]’ format, these are _not_ the dates shown in the main index.  File: mutt.info, Node: Marking Messages, Next: Using Tags, Prev: Patterns; Searching; Limiting and Tagging, Up: Advanced Usage 4.4 Marking Messages ==================== There are times that it's useful to ask Mutt to "remember" which message you're currently looking at, while you move elsewhere in your mailbox. You can do this with the ‘mark-message’ operator, which is bound to the ‘~’ key by default. Press this key to enter an identifier for the marked message. When you want to return to this message, press ‘'’ and the name that you previously entered. (Message marking is really just a shortcut for defining a macro that returns you to the current message by searching for its Message-ID. You can choose a different prefix by setting the $mark_macro_prefix (*note mark_macro_prefix::) variable.)  File: mutt.info, Node: Using Tags, Next: Using Hooks, Prev: Marking Messages, Up: Advanced Usage 4.5 Using Tags ============== Sometimes it is desirable to perform an operation on a group of messages all at once rather than one at a time. An example might be to save messages to a mailing list to a separate folder, or to delete all messages with a given subject. To tag all messages matching a pattern, use the ‘’ function, which is bound to ‘shift-T’ by default. Or you can select individual messages by hand using the ‘’ function, which is bound to ‘t’ by default. See patterns (*note Patterns; Searching; Limiting and Tagging::) for Mutt's pattern matching syntax. Once you have tagged the desired messages, you can use the ‘tag-prefix’ operator, which is the ‘;’ (semicolon) key by default. When the ‘tag-prefix’ operator is used, the _next_ operation will be applied to all tagged messages if that operation can be used in that manner. If the $auto_tag (*note auto_tag::) variable is set, the next operation applies to the tagged messages automatically, without requiring the ‘tag-prefix’. In ‘macro’s (*note Keyboard Macros::) or ‘push’ (*note Adding Key Sequences to the Keyboard Buffer::) commands, you can use the ‘’ operator. If there are no tagged messages, Mutt will ‘eat’ the rest of the macro to abort it's execution. Mutt will stop ‘eating’ the macro when it encounters the ‘’ operator; after this operator the rest of the macro will be executed as normal.  File: mutt.info, Node: Using Hooks, Next: Managing the Environment, Prev: Using Tags, Up: Advanced Usage 4.6 Using Hooks =============== A _hook_ is a concept found in many other programs which allows you to execute arbitrary commands before performing some operation. For example, you may wish to tailor your configuration based upon which mailbox you are reading, or to whom you are sending mail. In the Mutt world, a _hook_ consists of a regular expression (*note Regular Expressions::) or pattern (*note Patterns; Searching; Limiting and Tagging::) along with a configuration option/command. See: • ‘account-hook’ (*note Managing Multiple Accounts::) • ‘charset-hook’ (*note Defining Aliases for Character Sets::) • ‘crypt-hook’ (*note Choosing the Cryptographic Key of the Recipient::) • ‘fcc-hook’ (*note Specify Default Fcc; Mailbox When Composing::) • ‘fcc-save-hook’ (*note Specify Default Save Filename and Default Fcc; Mailbox at Once::) • ‘folder-hook’ (*note Setting Variables Based Upon Mailbox::) • ‘iconv-hook’ (*note Defining Aliases for Character Sets::) • ‘index-format-hook’ (*note Dynamically Changing $index_format using Patterns::) • ‘mbox-hook’ (*note Using Multiple Spool Mailboxes::) • ‘message-hook’ (*note Change Settings Before Formatting a Message::) • ‘reply-hook’ (*note reply-hook::) • ‘save-hook’ (*note Specify Default Save Mailbox::) • ‘send-hook’ (*note Change Settings Based Upon Message Recipients::) • ‘send2-hook’ (*note send2-hook::) for specific details on each type of _hook_ available. Also see Message Composition Flow (*note Message Composition Flow::) for an overview of the composition process. *Note* If a hook changes configuration settings, these changes remain effective until the end of the current Mutt session. As this is generally not desired, a ‘default’ hook needs to be added before all other hooks of that type to restore configuration defaults. *Specifying a default hook* send-hook . 'unmy_hdr From:' send-hook ~C'^b@b\.b$' my_hdr from: c@c.c In *note Specifying a default hook::, by default the value of $from (*note from::) and $realname (*note realname::) is not overridden. When sending messages either To: or Cc: to ‘’, the From: header is changed to ‘’. * Menu: * Message Matching in Hooks:: * Mailbox Matching in Hooks::  File: mutt.info, Node: Message Matching in Hooks, Next: Mailbox Matching in Hooks, Up: Using Hooks 4.6.1 Message Matching in Hooks ------------------------------- Hooks that act upon messages (‘message-hook’, ‘reply-hook’, ‘send-hook’, ‘send2-hook’, ‘save-hook’, ‘fcc-hook’, ‘index-format-hook’) are evaluated in a slightly different manner. For the other types of hooks, a regular expression (*note Regular Expressions::) is sufficient. But in dealing with messages a finer grain of control is needed for matching since for different purposes you want to match different criteria. Mutt allows the use of the search pattern (*note Patterns; Searching; Limiting and Tagging::) language for matching messages in hook commands. This works in exactly the same way as it would when _limiting_ or _searching_ the mailbox, except that you are restricted to those operators which match information Mutt extracts from the header of the message (i.e., from, to, cc, date, subject, etc.). For example, if you wanted to set your return address based upon sending mail to a specific address, you could do something like: send-hook '~t ^me@cs\.hmc\.edu$' 'my_hdr From: Mutt User ' which would execute the given command when sending mail to _me@cs.hmc.edu_. However, it is not required that you write the pattern to match using the full searching language. You can still specify a simple _regular expression_ like the other hooks, in which case Mutt will translate your pattern into the full language, using the translation specified by the $default_hook (*note default_hook::) variable. The pattern is translated at the time the hook is declared, so the value of $default_hook (*note default_hook::) that is in effect at that time will be used.  File: mutt.info, Node: Mailbox Matching in Hooks, Prev: Message Matching in Hooks, Up: Using Hooks 4.6.2 Mailbox Matching in Hooks ------------------------------- Hooks that match against mailboxes (‘folder-hook’, ‘mbox-hook’) apply both regular expression (*note Regular Expressions::) syntax as well as mailbox shortcut (*note Mailbox Shortcuts::) expansion on the regexp parameter. There is some overlap between these, so special attention should be paid to the first character of the regexp. # Here, ^ will expand to "the current mailbox" not "beginning of string": folder-hook ^/home/user/Mail/bar "set sort=threads" # If you want ^ to be interpreted as "beginning of string", one workaround # is to enclose the regexp in parenthesis: folder-hook (^/home/user/Mail/bar) "set sort=threads" # This will expand to the default save folder for the alias "imap.example.com", which # is probably not what you want: folder-hook @imap.example.com "set sort=threads" # A workaround is to use parenthesis or a backslash: folder-hook (@imap.example.com) "set sort=threads" folder-hook '\@imap.example.com' "set sort=threads" Keep in mind that mailbox shortcut expansion on the regexp parameter takes place when the hook is initially parsed, not when the hook is matching against a mailbox. When Mutt starts up and is reading the .muttrc, some mailbox shortcuts may not be usable. For example, the "current mailbox" shortcut, ^, will expand to an empty string because no mailbox has been opened yet. Mutt will issue an error for this case or if the mailbox shortcut results in an empty regexp.  File: mutt.info, Node: Managing the Environment, Next: External Address Queries, Prev: Using Hooks, Up: Advanced Usage 4.7 Managing the Environment ============================ You can alter the environment that Mutt passes on to its child processes using the ‘setenv’ and ‘unsetenv’ operators. (N.B. These follow Mutt-style syntax, not shell-style!) You can also query current environment values by prefixing a ‘?’ character. setenv TERM vt100 setenv ORGANIZATION "The Mutt Development Team" unsetenv DISPLAY setenv ?LESS  File: mutt.info, Node: External Address Queries, Next: Mailbox Formats, Prev: Managing the Environment, Up: Advanced Usage 4.8 External Address Queries ============================ Mutt supports connecting to external directory databases such as LDAP, ph/qi, bbdb, or NIS through a wrapper script which connects to Mutt using a simple interface. Using the $query_command (*note query_command::) variable, you specify the wrapper command to use. For example: set query_command = "mutt_ldap_query.pl %s" The wrapper script should accept the query on the command-line. It should return a one line message, then each matching response on a single line, each line containing a tab separated address then name then some other optional information. On error, or if there are no matching addresses, return a non-zero exit code and a one line error message. An example multiple response output: Searching database ... 20 entries ... 3 matching: me@cs.hmc.edu Michael Elkins mutt dude blong@fiction.net Brandon Long mutt and more roessler@does-not-exist.org Thomas Roessler mutt pgp There are two mechanisms for accessing the query function of Mutt. One is to do a query from the index menu using the ‘’ function (default: Q). This will prompt for a query, then bring up the query menu which will list the matching responses. From the query menu, you can select addresses to create aliases, or to mail. You can tag multiple addresses to mail, start a new query, or have a new query appended to the current responses. The other mechanism for accessing the query function is for address completion, similar to the alias completion. In any prompt for address entry, you can use the ‘’ function (default: ^T) to run a query based on the current address you have typed. Like aliases, Mutt will look for what you have typed back to the last space or comma. If there is a single response for that query, Mutt will expand the address in place. If there are multiple responses, Mutt will activate the query menu. At the query menu, you can select one or more addresses to be added to the prompt.  File: mutt.info, Node: Mailbox Formats, Next: Mailbox Shortcuts, Prev: External Address Queries, Up: Advanced Usage 4.9 Mailbox Formats =================== Mutt supports reading and writing of four different local mailbox formats: mbox, MMDF, MH and Maildir. The mailbox type is auto detected, so there is no need to use a flag for different mailbox types. When creating new mailboxes, Mutt uses the default specified with the $mbox_type (*note mbox_type::) variable. A short description of the formats follows. _mbox_. This is a widely used mailbox format for UNIX. All messages are stored in a single file. Each message has a line of the form: From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST to denote the start of a new message (this is often referred to as the ‘From_’ line). The mbox format requires mailbox locking, is prone to mailbox corruption with concurrently writing clients or misinterpreted From_ lines. Depending on the environment, new mail detection can be unreliable. Mbox folders are fast to open and easy to archive. _MMDF_. This is a variant of the _mbox_ format. Each message is surrounded by lines containing ‘^A^A^A^A’ (four times control-A's). The same problems as for mbox apply (also with finding the right message separator as four control-A's may appear in message bodies). _MH_. A radical departure from _mbox_ and _MMDF_, a mailbox consists of a directory and each message is stored in a separate file. The filename indicates the message number (however, this is may not correspond to the message number Mutt displays). Deleted messages are renamed with a comma (‘,’) prepended to the filename. Mutt detects this type of mailbox by looking for either ‘.mh_sequences’ or ‘.xmhcache’ files (needed to distinguish normal directories from MH mailboxes). MH is more robust with concurrent clients writing the mailbox, but still may suffer from lost flags; message corruption is less likely to occur than with mbox/mmdf. It's usually slower to open compared to mbox/mmdf since many small files have to be read (Mutt provides *note Header Caching:: to greatly speed this process up). Depending on the environment, MH is not very disk-space efficient. _Maildir_. The newest of the mailbox formats, used by the Qmail MTA (a replacement for sendmail). Similar to _MH_, except that it adds three subdirectories of the mailbox: _tmp_, _new_ and _cur_. Filenames for the messages are chosen in such a way they are unique, even when two programs are writing the mailbox over NFS, which means that no file locking is needed and corruption is very unlikely. Maildir maybe slower to open without caching in Mutt, it too is not very disk-space efficient depending on the environment. Since no additional files are used for metadata (which is embedded in the message filenames) and Maildir is locking-free, it's easy to sync across different machines using file-level synchronization tools.  File: mutt.info, Node: Mailbox Shortcuts, Next: Handling Mailing Lists, Prev: Mailbox Formats, Up: Advanced Usage 4.10 Mailbox Shortcuts ====================== There are a number of built in shortcuts which refer to specific mailboxes. These shortcuts can be used anywhere you are prompted for a file or mailbox path or in path-related configuration variables. Note that these only work at the beginning of a string. *Mailbox shortcuts* Shortcut Refers to... ‘!’ your $spoolfile (*note spoolfile::) (incoming) mailbox ‘>’ your $mbox (*note mbox::) file ‘<’ your $record (*note record::) file ‘^’ the current mailbox ‘-’ or ‘!!’ the file you've last visited ‘~’ your home directory ‘=’ or ‘+’ your $folder (*note folder::) directory _@alias_ to the default save folder (*note Specify Default Save Mailbox::) as determined by the address of the alias For example, to store a copy of outgoing messages in the folder they were composed in, a ‘folder-hook’ (*note Setting Variables Based Upon Mailbox::) can be used to set $record (*note record::): folder-hook . 'set record=^' Note: the current mailbox shortcut, ‘‘^’’, has no value in some cases. No mailbox is opened when Mutt is invoked to send an email from the command-line. In interactive mode, Mutt reads the muttrc before opening the mailbox, so immediate expansion won't work as expected either. This can be an issue when trying to directly assign to $record (*note record::), but also affects the fcc-hook (*note Specify Default Fcc; Mailbox When Composing::) mailbox, which is expanded immediately too. The folder-hook example above works because the command is executed later, when the folder-hook fires. Note: the $record (*note record::) shortcut ‘‘<’’ is substituted without any regard to multiple mailboxes and $fcc_delimiter (*note fcc_delimiter::). If you use multiple Fcc mailboxes, and also want to use the ‘‘<’’ mailbox shortcut, it might be better to set $record (*note record::) to the primary mailbox and use a fcc-hook (*note Specify Default Fcc; Mailbox When Composing::) to set all mailboxes during message composition.  File: mutt.info, Node: Handling Mailing Lists, Next: Display Munging, Prev: Mailbox Shortcuts, Up: Advanced Usage 4.11 Handling Mailing Lists =========================== Mutt has a few configuration options that make dealing with large amounts of mail easier. The first thing you must do is to let Mutt know what addresses you consider to be mailing lists (technically this does not have to be a mailing list, but that is what it is most often used for), and what lists you are subscribed to. This is accomplished through the use of the ‘lists’ and ‘subscribe’ (*note Mailing Lists <1>::) commands in your ‘.muttrc’. Alternatively or additionally, you can set $auto_subscribe (*note auto_subscribe::) to automatically subscribe addresses found in a ‘List-Post’ header. Now that Mutt knows what your mailing lists are, it can do several things, the first of which is the ability to show the name of a list through which you received a message (i.e., of a subscribed list) in the _index_ menu display. This is useful to distinguish between personal and list mail in the same mailbox. In the $index_format (*note index_format::) variable, the expando ‘%L’ will print the string ‘To ’ when ‘list’ appears in the ‘To’ field, and ‘Cc ’ when it appears in the ‘Cc’ field (otherwise it prints the name of the author). Often times the ‘To’ and ‘Cc’ fields in mailing list messages tend to get quite large. Most people do not bother to remove the author of the message they reply to from the list, resulting in two or more copies being sent to that person. The ‘’ function, which by default is bound to ‘L’ in the _index_ menu and _pager_, helps reduce the clutter by only replying to the known mailing list addresses instead of all recipients (except as specified by ‘Mail-Followup-To’, see below). Mutt also supports the ‘Mail-Followup-To’ header. When you send a message to a list of recipients which includes one or several known mailing lists, and if the $followup_to (*note followup_to::) option is set, Mutt will generate a Mail-Followup-To header. If any of the recipients are subscribed mailing lists, this header will contain all the recipients to whom you send this message, but not your address. This indicates that group-replies or list-replies (also known as ‘followups’) to this message should only be sent to the original recipients of the message, and not separately to you - you'll receive your copy through one of the mailing lists you are subscribed to. If none of the recipients are subscribed mailing lists, the header will also contain your address, ensuring you receive a copy of replies. Conversely, when group-replying or list-replying to a message which has a ‘Mail-Followup-To’ header, Mutt will respect this header if the $honor_followup_to (*note honor_followup_to::) configuration variable is set. Using list-reply (*note list-reply::) will in this case also make sure that the reply goes to the mailing list, even if it's not specified in the list of recipients in the ‘Mail-Followup-To’. *Note* When header editing is enabled, you can create a ‘Mail-Followup-To’ header manually. Mutt will only auto-generate this header if it doesn't exist when you send the message. The other method some mailing list admins use is to generate a ‘Reply-To’ field which points back to the mailing list address rather than the author of the message. This can create problems when trying to reply directly to the author in private, since most mail clients will automatically reply to the address given in the ‘Reply-To’ field. Mutt uses the $reply_to (*note reply_to::) variable to help decide which address to use. If set to _ask-yes_ or _ask-no_, you will be prompted as to whether or not you would like to use the address given in the ‘Reply-To’ field, or reply directly to the address given in the ‘From’ field. When set to _yes_, the ‘Reply-To’ field will be used when present. While looking at an email message from a mailing list in the index or pager, you can interact with the list server in the ways defined by RFC 2369, provided the email message specifies how to do so. Invoke the list menu (*note Default List Menu Bindings::) (bound to "ESC L" by default) to see what options are available for a given message. Common options are: • Post to the list • Contact the list owner • Subscribe to the list • Unsubscribe from the list • Get help from the list server • Get list archive information Note that many list servers only specify some of these options. The ‘X-Label:’ header field can be used to further identify mailing lists or list subject matter (or just to annotate messages individually). The $index_format (*note index_format::) variable's ‘%y’ and ‘%Y’ expandos can be used to expand ‘X-Label:’ fields in the index, and Mutt's pattern-matcher can match regular expressions to ‘X-Label:’ fields with the ‘~y’ selector. ‘X-Label:’ is not a standard message header field, but it can easily be inserted by procmail and other mail filtering agents. You can change or delete the ‘X-Label:’ field within Mutt using the ‘edit-label’ command, bound to the ‘y’ key by default. This works for tagged messages, too. While in the edit-label function, pressing the binding (TAB, by default) will perform completion against all labels currently in use. Lastly, Mutt has the ability to sort (*note sort::) the mailbox into threads (*note Threaded Mode::). A thread is a group of messages which all relate to the same subject. This is usually organized into a tree-like structure where a message and all of its replies are represented graphically. If you've ever used a threaded news client, this is the same concept. It makes dealing with large volume mailing lists easier because you can easily delete uninteresting threads and quickly find topics of value.  File: mutt.info, Node: Display Munging, Next: New Mail Detection, Prev: Handling Mailing Lists, Up: Advanced Usage 4.12 Display Munging ==================== Working within the confines of a console or terminal window, it is often useful to be able to modify certain information elements in a non-destructive way - to change how they display, without changing the stored value of the information itself. This is especially so of message subjects, which may often be polluted with extraneous metadata that either is reproduced elsewhere, or is of secondary interest. subjectrx pattern replacement unsubjectrx { * | pattern } ‘subjectrx’ specifies a regular expression ‘pattern’ which, if detected in a message subject, causes the subject to be replaced with the ‘replacement’ value. The replacement is subject to substitutions in the same way as for the spam (*note Spam Detection::) command: ‘%L’ for the text to the left of the match, ‘%R’ for text to the right of the match, and ‘%1’ for the first subgroup in the match (etc). If you simply want to erase the match, set it to ‘%L%R’. Any number of ‘subjectrx’ commands may coexist. Note this well: the ‘replacement’ value replaces the entire subject, not just the match! ‘unsubjectrx’ removes a given subjectrx from the substitution list. If ‘*’ is used as the pattern, all substitutions will be removed. *Subject Munging* # Erase [rt #12345] tags from Request Tracker (RT) e-mails subjectrx '\[rt #[0-9]+\] *' '%L%R' # Servicedesk is another RT that sends more complex subjects. # Keep the ticket number. subjectrx '\[servicedesk #([0-9]+)\] ([^.]+)\.([^.]+) - (new|open|pending|update) - ' '%L[#%1] %R' # Strip out annoying [listname] prefixes in subjects subjectrx '\[[^]]*\]:? *' '%L%R'  File: mutt.info, Node: New Mail Detection, Next: Editing Threads, Prev: Display Munging, Up: Advanced Usage 4.13 New Mail Detection ======================= Mutt supports setups with multiple folders, allowing all of them to be monitored for new mail (see *note Monitoring Incoming Mail:: for details). * Menu: * How New Mail Detection Works:: * Polling For New Mail:: * Monitoring New Mail:: * Calculating Mailbox Message Counts::  File: mutt.info, Node: How New Mail Detection Works, Next: Polling For New Mail, Up: New Mail Detection 4.13.1 How New Mail Detection Works ----------------------------------- For Mbox and Mmdf folders, new mail is detected by comparing access and/or modification times of files: Mutt assumes a folder has new mail if it wasn't accessed after it was last modified. Utilities like ‘biff’ or ‘frm’ or any other program which accesses the mailbox might cause Mutt to never detect new mail for that mailbox if they do not properly reset the access time. Other possible causes of Mutt not detecting new mail in these folders are backup tools (updating access times) or filesystems mounted without access time update support (for Linux systems, see the ‘relatime’ option). *Note* Contrary to older Mutt releases, it now maintains the new mail status of a folder by properly resetting the access time if the folder contains at least one message which is neither read, nor deleted, nor marked as old. In cases where new mail detection for Mbox or Mmdf folders appears to be unreliable, the $check_mbox_size (*note check_mbox_size::) option can be used to make Mutt track and consult file sizes for new mail detection instead which won't work for size-neutral changes. New mail for Maildir is assumed if there is one message in the ‘new/’ subdirectory which is not marked deleted (see $maildir_trash (*note maildir_trash::)). For MH folders, a mailbox is considered having new mail if there's at least one message in the ‘unseen’ sequence as specified by $mh_seq_unseen (*note mh_seq_unseen::). Mutt does not poll POP3 folders for new mail, it only periodically checks the currently opened folder (if it's a POP3 folder). For IMAP, by default Mutt uses recent message counts provided by the server to detect new mail. If the $imap_idle (*note imap_idle::) option is set, it'll use the IMAP IDLE extension if advertised by the server. The $mail_check_recent (*note mail_check_recent::) option changes whether Mutt will notify you of new mail in an already visited mailbox. When set (the default) it will only notify you of new mail received since the last time you opened the mailbox. When unset, Mutt will notify you of any new mail in the mailbox.  File: mutt.info, Node: Polling For New Mail, Next: Monitoring New Mail, Prev: How New Mail Detection Works, Up: New Mail Detection 4.13.2 Polling For New Mail --------------------------- When in the index menu and being idle (also see $timeout (*note timeout::)), Mutt periodically checks for new mail in all folders which have been configured via the ‘mailboxes’ command (excepting those specified with the ‘-nopoll’ flag). The interval depends on the folder type: for local/IMAP folders it consults $mail_check (*note mail_check::) and $pop_checkinterval (*note pop_checkinterval::) for POP folders. Outside the index menu the directory browser supports checking for new mail using the ‘’ function which is unbound by default. Pressing TAB will bring up a menu showing the files specified by the ‘mailboxes’ command, and indicate which contain new messages. Mutt will automatically enter this mode when invoked from the command line with the ‘-y’ option, or from the index/pager via the ‘’ function. For the pager, index and directory browser menus, Mutt contains the ‘’ function (bound to ‘.’ by default) which will print a list of folders with new mail in the command line at the bottom of the screen. For the index, by default Mutt displays the number of mailboxes with new mail in the status bar, please refer to the $status_format (*note status_format::) variable for details. When changing folders, Mutt fills the prompt with the first folder from the mailboxes list containing new mail (if any), pressing ‘’ will cycle through folders with new mail. The (by default unbound) function ‘’ in the index can be used to immediately open the next folder with unread mail (if any).  File: mutt.info, Node: Monitoring New Mail, Next: Calculating Mailbox Message Counts, Prev: Polling For New Mail, Up: New Mail Detection 4.13.3 Monitoring New Mail -------------------------- When the _Inotify_ mechanism for monitoring of files is supported (Linux only) and not disabled at compilation time, Mutt immediately notifies about new mail for all folders configured via the ‘mailboxes’ (*note Monitoring Incoming Mail::) command (excepting those specified with the ‘-nopoll’ flag). Dependent on mailbox format (*note Mailbox Formats::) also added _old_ mails are tracked (not for Maildir). No configuration variables are available. Trace output is given when debugging is enabled via command line option (*note Command line options::) ‘-d3’. The lower level 2 only shows errors, the higher level 5 all including raw Inotify events. *Note* Getting events about new mail is limited to the capabilities of the underlying mechanism. _Inotify_ only reports local changes, i. e. new mail notification works for mails delivered by an agent on the same machine as Mutt, but not when delivered remotely on a network file system as NFS. Also the monitoring handles might fail in rare conditions, so you better don't completely rely on this feature.  File: mutt.info, Node: Calculating Mailbox Message Counts, Prev: Monitoring New Mail, Up: New Mail Detection 4.13.4 Calculating Mailbox Message Counts ----------------------------------------- If $mail_check_stats (*note mail_check_stats::) is set, Mutt will periodically calculate the unread, flagged, and total message counts for each mailbox watched by the ‘mailboxes’ command. (Note: IMAP mailboxes only support unread and total counts). This calculation takes place at the same time as new mail polling, but is controlled by a separate timer: $mail_check_stats_interval (*note mail_check_stats_interval::). The sidebar can display these message counts. See $sidebar_format (*note sidebar_format::).  File: mutt.info, Node: Editing Threads, Next: Delivery Status Notification [DSN] Support, Prev: New Mail Detection, Up: Advanced Usage 4.14 Editing Threads ==================== Mutt has the ability to dynamically restructure threads that are broken either by misconfigured software or bad behavior from some correspondents. This allows to clean your mailboxes from these annoyances which make it hard to follow a discussion. * Menu: * Linking Threads:: * Breaking Threads::  File: mutt.info, Node: Linking Threads, Next: Breaking Threads, Up: Editing Threads 4.14.1 Linking Threads ---------------------- Some mailers tend to ‘forget’ to correctly set the ‘In-Reply-To:’ and ‘References:’ headers when replying to a message. This results in broken discussions because Mutt has not enough information to guess the correct threading. You can fix this by tagging the reply, then moving to the parent message and using the ‘’ function (bound to & by default). The reply will then be connected to this parent message. You can also connect multiple children at once, tagging them and using the ‘’ command (‘;’) or the $auto_tag (*note auto_tag::) option.  File: mutt.info, Node: Breaking Threads, Prev: Linking Threads, Up: Editing Threads 4.14.2 Breaking Threads ----------------------- On mailing lists, some people are in the bad habit of starting a new discussion by hitting ‘reply’ to any message from the list and changing the subject to a totally unrelated one. You can fix such threads by using the ‘’ function (bound by default to #), which will turn the subthread starting from the current message into a whole different thread.  File: mutt.info, Node: Delivery Status Notification [DSN] Support, Next: Start a WWW Browser on URLs, Prev: Editing Threads, Up: Advanced Usage 4.15 Delivery Status Notification (DSN) Support =============================================== RFC1894 defines a set of MIME content types for relaying information about the status of electronic mail messages. These can be thought of as ‘return receipts.’ To support DSN, there are two variables. $dsn_notify (*note dsn_notify::) is used to request receipts for different results (such as failed message, message delivered, etc.). $dsn_return (*note dsn_return::) requests how much of your message should be returned with the receipt (headers or full message). When using $sendmail (*note sendmail::) for mail delivery, you need to use either Berkeley sendmail 8.8.x (or greater) a MTA supporting DSN command line options compatible to Sendmail: The -N and -R options can be used by the mail client to make requests as to what type of status messages should be returned. Please consider your MTA documentation whether DSN is supported. For SMTP delivery using $smtp_url (*note smtp_url::), it depends on the capabilities announced by the server whether Mutt will attempt to request DSN or not.  File: mutt.info, Node: Start a WWW Browser on URLs, Next: Echoing Text, Prev: Delivery Status Notification [DSN] Support, Up: Advanced Usage 4.16 Start a WWW Browser on URLs ================================ If a message contains URLs, it is efficient to get a menu with all the URLs and start a WWW browser on one of them. This functionality is provided by the external urlview program which can be retrieved at https://github.com/sigpipe/urlview (https://github.com/sigpipe/urlview) and the configuration commands: macro index \cb |urlview\n macro pager \cb |urlview\n  File: mutt.info, Node: Echoing Text, Next: Message Composition Flow, Prev: Start a WWW Browser on URLs, Up: Advanced Usage 4.17 Echoing Text ================= Usage: echo message You can print messages to the message window using the "echo" command. This might be useful after a macro finishes executing. After printing the message, echo will pause for the number of seconds specified by $sleep_time (*note sleep_time::). echo "Sourcing muttrc file" unset confirmappend macro index ,a "=archiveecho 'Saved to archive'"  File: mutt.info, Node: Message Composition Flow, Next: Batch Composition Flow, Prev: Echoing Text, Up: Advanced Usage 4.18 Message Composition Flow ============================= This is a brief overview of the steps Mutt takes during message composition. It also shows the order and timing of hook execution. • Reply envelope settings. $reverse_name (*note reverse_name::) processing. To, Cc, Subject, References header defaults. • my_hdr (*note User-Defined Headers::) processing for To, Cc, Bcc, Subject headers. • Prompts for To, Cc, Bcc, Subject headers. See $askcc (*note askcc::), $askbcc (*note askbcc::), $fast_reply (*note fast_reply::). • From header setting. Note: this is so send-hook (*note Change Settings Based Upon Message Recipients::)s below can match ~P, but From is re-set further below in case a send-hook changes the value. • reply-hook (*note reply-hook::) • send-hook (*note Change Settings Based Upon Message Recipients::) • From header setting. • my_hdr (*note User-Defined Headers::) processing for From, Reply-To, Message-ID and user-defined headers. The To, Cc, Bcc, and Subject headers are ignored at this stage. • Message body and signature generation. • send2-hook (*note send2-hook::) • $realname (*note realname::) part of From header setting. • $editor (*note editor::) invocation for the message. • send2-hook (*note send2-hook::) • Cryptographic settings. • fcc-hook (*note Specify Default Fcc; Mailbox When Composing::). Fcc setting. • Compose menu (*note The Compose Menu::). Note: send2-hook (*note send2-hook::) is evaluated each time the headers are changed. • $send_multipart_alternative (*note send_multipart_alternative::) generation. • Message encryption and signing. Key selection. • Fcc saving if $fcc_before_send (*note fcc_before_send::) is set. (Note the variable documentation for caveats of Fcc'ing before sending.) • Message sending. • Fcc saving if $fcc_before_send (*note fcc_before_send::) is unset (the default). Note: prior to version 1.12, the Fcc was saved before sending the message. It is now by default saved afterwards, but if the saving fails, the user is prompted.  File: mutt.info, Node: Batch Composition Flow, Next: Using MuttLisp [EXPERIMENTAL], Prev: Message Composition Flow, Up: Advanced Usage 4.19 Batch Composition Flow =========================== In batch mode, Mutt performs less steps than interactive mode. Encryption and Signing are not supported. • my_hdr (*note User-Defined Headers::) processing for To, Cc, Bcc headers. (Subject is not processed.) • From header setting. Note: this is so send-hook (*note Change Settings Based Upon Message Recipients::)s below can match ~P, but From is re-set further below in case a send-hook changes the value. • send-hook (*note Change Settings Based Upon Message Recipients::) • From header setting. • my_hdr (*note User-Defined Headers::) processing for From, Reply-To, Message-ID and user-defined headers. The To, Cc, Bcc, Subject, and Return-Path headers are ignored at this stage. • Message body is copied from stdin. $signature (*note signature::) is not appended in batch mode. • send2-hook (*note send2-hook::) • $realname (*note realname::) part of From header setting. • fcc-hook (*note Specify Default Fcc; Mailbox When Composing::). Fcc setting. • $send_multipart_alternative (*note send_multipart_alternative::) generation. • Fcc saving if $fcc_before_send (*note fcc_before_send::) is set. (Note the variable documentation for caveats of Fcc'ing before sending.) • Message sending. • Fcc saving if $fcc_before_send (*note fcc_before_send::) is unset (the default). Note: prior to version 1.12, the Fcc was saved before sending the message. It is now by default saved afterwards, but if the saving fails, the user is prompted.  File: mutt.info, Node: Using MuttLisp [EXPERIMENTAL], Next: Miscellany, Prev: Batch Composition Flow, Up: Advanced Usage 4.20 Using MuttLisp (EXPERIMENTAL) ================================== MuttLisp is a Lisp-like enhancement for the Mutt configuration file. It is currently experimental, meaning new releases may change or break syntax. MuttLisp is not a real language, and is not meant to be an alternative to macros. The features are purposely minimal, with the actual work still being done by Mutt commands (*note Configuration Commands::). There are two ways to invoke MuttLisp: via the ‘run’ command, or interpolated as a command argument. * Menu: * Running a command generated by MuttLisp:: * Interpolating MuttLisp in a Command Argument:: * MuttLisp Syntax:: * MuttLisp Functions:: * Examples: Examples <1>.  File: mutt.info, Node: Running a command generated by MuttLisp, Next: Interpolating MuttLisp in a Command Argument, Up: Using MuttLisp [EXPERIMENTAL] 4.20.1 Running a command generated by MuttLisp ---------------------------------------------- Usage: run MuttLisp The ‘run’ command evaluates the MuttLisp argument. The output of the MuttLisp is then executed as a Mutt command, as if it were typed in the muttrc instead. run (concat "set my_name = '" \ (or $ENV_NAME "Test User") "'") ==> generates and runs the line: set my_name = 'Test User' This will set the Mutt User-Defined Variable (*note User-Defined Variables::) ‘$my_name’ to either the environment variable $ENV_NAME, if defined, or else "Test User".  File: mutt.info, Node: Interpolating MuttLisp in a Command Argument, Next: MuttLisp Syntax, Prev: Running a command generated by MuttLisp, Up: Using MuttLisp [EXPERIMENTAL] 4.20.2 Interpolating MuttLisp in a Command Argument --------------------------------------------------- The second way of running is directly as a command argument. An unquoted parenthesis expression will be evaluated, and the result substituted as the argument. To avoid breaking existing configurations, this is disabled by default. It can be enabled by setting $muttlisp_inline_eval (*note muttlisp_inline_eval::). Before doing so, you should review your Mutt configuration to ensure you don't have any bare parenthesis expressions elsewhere, such as the regexp parameter of a folder-hook (*note Setting Variables Based Upon Mailbox::). These can typically be surrounded by single or double-quotes to prevent being evaluated as MuttLisp. set my_name = (or $ENV_NAME "Test User") The result of the MuttLisp is directly assigned as the argument. It isn't reinterpreted, so there is no need for the outer quotes. This is in contrast with the run (*note Running a command generated by MuttLisp::) command, where the output is reinterpreted by the muttrc parser.  File: mutt.info, Node: MuttLisp Syntax, Next: MuttLisp Functions, Prev: Interpolating MuttLisp in a Command Argument, Up: Using MuttLisp [EXPERIMENTAL] 4.20.3 MuttLisp Syntax ---------------------- MuttLisp was inspired by Lisp, and so follows the same basic syntax. All statements are surrounded by parenthesis. The first argument inside the parenthesis is a function to invoke. The remaining arguments are passed as parameters. The arguments to functions are read and evaluated using muttrc syntax (*note Syntax of Initialization Files::). This means Mutt variables or environment variables can be passed directly, or interpolated inside a double-quoted string. Although the arguments to a function are evaluated, the result of the function call is not. echo (concat '$' 'spoolfile') ==> $spoolfile MuttLisp has no types - everything is stored and evaluated as a string, just as with the muttrc. True is defined as a non-empty string, and false as the empty string. The muttrc is evaluated line by line, and MuttLisp is similarly constrained. Input can be continued on more than one line by placing a backslash at the end of the line.  File: mutt.info, Node: MuttLisp Functions, Next: Examples <1>, Prev: MuttLisp Syntax, Up: Using MuttLisp [EXPERIMENTAL] 4.20.4 MuttLisp Functions ------------------------- * Menu: * concat:: * quote:: * equal:: * not:: * and:: * or:: * if::  File: mutt.info, Node: concat, Next: quote, Up: MuttLisp Functions 4.20.4.1 concat ............... Combines all arguments into a single string. echo (concat one two three) ==> onetwothree  File: mutt.info, Node: quote, Next: equal, Prev: concat, Up: MuttLisp Functions 4.20.4.2 quote .............. Prevents interpretation of the list. Note that the list must still obey MuttLisp syntax: single quotes, double quotes, backticks, and parenthesis are still parsed prior to ‘quote’ running and must be matching. echo (quote one two three) ==> one two three echo (quote $spoolfile) ==> $spoolfile echo (quote (one two three)) ==> (one two three)  File: mutt.info, Node: equal, Next: not, Prev: quote, Up: MuttLisp Functions 4.20.4.3 equal .............. Performs a case-sensitive comparison of each argument. Stops evaluating arguments when it finds the first one that is not equal. Returns "t" if they are all equal, and the empty string if not. echo (equal one one) ==> "t" echo (equal one `echo one`) ==> "t" echo (equal one one two `echo three`) ==> "" note: `echo three` does not execute. echo (equal "one two" `echo one two`) ==> "" note: backticks generate two arguments "one" and "two" echo (equal "one two" "`echo one two`") ==> "t" note: backticks inside double quotes generates a single argument: "one two"  File: mutt.info, Node: not, Next: and, Prev: equal, Up: MuttLisp Functions 4.20.4.4 not ............ Accepts a single argument only. Returns "t" if the argument evaluates to the empty string. Otherwise returns the empty string. echo (not one) ==> "" echo (not "") ==> "t" echo (not (equal one two)) ==> "t"  File: mutt.info, Node: and, Next: or, Prev: not, Up: MuttLisp Functions 4.20.4.5 and ............ Returns the first argument that evaluates to the empty string. Otherwise returns the last argument, or "t" if there are no arguments. echo (and one two) ==> "two" echo (and "" two `echo three`) ==> "" note: `echo three` does not execute. echo (and) ==> "t"  File: mutt.info, Node: or, Next: if, Prev: and, Up: MuttLisp Functions 4.20.4.6 or ........... Returns the first argument that evaluates to a non-empty string. Otherwise returns the empty string. echo (or one two) ==> "one" echo (or "" two `echo three`) ==> "two" note: `echo three` does not execute. echo (or) ==> ""  File: mutt.info, Node: if, Prev: or, Up: MuttLisp Functions 4.20.4.7 if ........... Requires 2 or 3 arguments. The first is a conditional. If it evaluates to "true" (a non-empty string), the second argument is evaluated and returned. Otherwise the third argument is evaluated and returned. echo (if a one two) ==> "one" echo (if "" one two) ==> "two" set spoolfile = "/var/mail/user" echo (if (equal $spoolfile "/var/mail/user") yes no) ==> "yes" Note that boolean configuration variables evaluate to the strings "yes" or "no". You can see the value of other kinds of configuration variables using the echo (*note Echoing Text::) command. unset allow_ansi echo $allow_ansi ===> "no" # the correct way to test a boolean: echo (if (equal $allow_ansi "yes") "set" "unset") ===> "unset" # the incorrect way to test a boolean: echo (if $allow_ansi "set" "unset") ===> "set"  File: mutt.info, Node: Examples <1>, Prev: MuttLisp Functions, Up: Using MuttLisp [EXPERIMENTAL] 4.20.5 Examples --------------- It's important to remember that function arguments are evaluated, but the result is not. Also, the result of an interpolated command argument is used directly, and needs no quoting. # A three-way toggle of $index_format: set muttlisp_inline_eval set my_idx1 = "one" set my_idx2 = "two" set my_idx3 = "three" set index_format = $my_idx1 macro index i 'set index_format = \ (or \ (if (equal $index_format $my_idx1) $my_idx2) \ (if (equal $index_format $my_idx2) $my_idx3) \ $my_idx1) \ ' The output of the run command is re-evaluated by the muttrc parser. So it's important to pay more attention to quoting issues when generating the command string below. # Conditionally set up background editing in tmux or GNU Screen: run \ (if (or $STY $TMUX) \ (concat \ 'set background_edit;' \ 'set editor = "bgedit-screen-tmux.sh vim"') \ (concat \ 'unset background_edit;' \ 'set editor = "vim"')) Because backticks are evaluated by MuttLisp too, we need to use the run command below and pay close attention to quoting. # Use a Mutt variable inside backticks. set spoolfile = "/var/mail/testuser" # This will generate and then run the command string: # set my_var = "`~/bin/myscript.sh /var/mail/testuser`" run \ (concat \ 'set my_var = "`~/bin/myscript.sh ' \ $spoolfile \ '`"')  File: mutt.info, Node: Miscellany, Prev: Using MuttLisp [EXPERIMENTAL], Up: Advanced Usage 4.21 Miscellany =============== This section documents various features that fit nowhere else. Address normalization Mutt normalizes all e-mail addresses to the simplest form possible. If an address contains a realname, the form _Joe User _ is used and the pure e-mail address without angle brackets otherwise, i.e. just _joe@example.com_. This normalization affects all headers Mutt generates including aliases. Initial folder selection The folder Mutt opens at startup is determined as follows: the folder specified in the ‘$MAIL’ environment variable if present. Otherwise, the value of ‘$MAILDIR’ is taken into account. If that isn't present either, Mutt takes the user's mailbox in the mailspool as determined at compile-time (which may also reside in the home directory). The $spoolfile (*note spoolfile::) setting overrides this selection. Highest priority has the mailbox given with the ‘-f’ command line option.  File: mutt.info, Node: Mutt's MIME Support, Next: Optional Features, Prev: Advanced Usage, Up: Top 5 Mutt's MIME Support ********************* Quite a bit of effort has been made to make Mutt the premier text-mode MIME MUA. Every effort has been made to provide the functionality that the discerning MIME user requires, and the conformance to the standards wherever possible. When configuring Mutt for MIME, there are two extra types of configuration files which Mutt uses. One is the ‘mime.types’ file, which contains the mapping of file extensions to IANA MIME types. The other is the ‘mailcap’ file, which specifies the external commands to use for handling specific MIME types. * Menu: * Using MIME in Mutt:: * MIME Type Configuration with mime.types: MIME Type Configuration with mime_types. * MIME Viewer Configuration with Mailcap:: * MIME Autoview:: * MIME Multipart/Alternative:: * Attachment Searching and Counting:: * MIME Lookup::  File: mutt.info, Node: Using MIME in Mutt, Next: MIME Type Configuration with mime_types, Up: Mutt's MIME Support 5.1 Using MIME in Mutt ====================== * Menu: * MIME Overview:: * Viewing MIME Messages in the Pager:: * The Attachment Menu:: * The Compose Menu::  File: mutt.info, Node: MIME Overview, Next: Viewing MIME Messages in the Pager, Up: Using MIME in Mutt 5.1.1 MIME Overview ------------------- MIME is short for ‘Multipurpose Internet Mail Extension’ and describes mechanisms to internationalize and structure mail messages. Before the introduction of MIME, messages had a single text part and were limited to us-ascii header and content. With MIME, messages can have attachments (and even attachments which itself have attachments and thus form a tree structure), nearly arbitrary characters can be used for sender names, recipients and subjects. Besides the handling of non-ascii characters in message headers, to Mutt the most important aspect of MIME are so-called MIME types. These are constructed using a _major_ and _minor_ type separated by a forward slash. These specify details about the content that follows. Based upon these, Mutt decides how to handle this part. The most popular major type is ‘‘text’’ with minor types for plain text, HTML and various other formats. Major types also exist for images, audio, video and of course general application data (e.g. to separate cryptographically signed data with a signature, send office documents, and in general arbitrary binary data). There's also the ‘multipart’ major type which represents the root of a subtree of MIME parts. A list of supported MIME types can be found in *note Supported MIME types::. MIME also defines a set of encoding schemes for transporting MIME content over the network: ‘7bit’, ‘8bit’, ‘quoted-printable’, ‘base64’ and ‘binary’. There're some rules when to choose what for encoding headers and/or body (if needed), and Mutt will in general make a good choice. Mutt does most of MIME encoding/decoding behind the scenes to form messages conforming to MIME on the sending side. On reception, it can be flexibly configured as to how what MIME structure is displayed (and if it's displayed): these decisions are based on the content's MIME type. There are three areas/menus in dealing with MIME: the pager (while viewing a message), the attachment menu and the compose menu.  File: mutt.info, Node: Viewing MIME Messages in the Pager, Next: The Attachment Menu, Prev: MIME Overview, Up: Using MIME in Mutt 5.1.2 Viewing MIME Messages in the Pager ---------------------------------------- When you select a message from the index and view it in the pager, Mutt decodes as much of a message as possible to a text representation. Mutt internally supports a number of MIME types, including the ‘text’ major type (with all minor types), the ‘message/rfc822’ (mail messages) type and some ‘multipart’ types. In addition, it recognizes a variety of PGP MIME types, including PGP/MIME and ‘application/pgp’. Mutt will denote attachments with a couple lines describing them. These lines are of the form: [-- Attachment #1: Description --] [-- Type: text/plain, Encoding: 7bit, Size: 10000 --] Where the _Description_ is the description or filename given for the attachment, and the _Encoding_ is one of the already mentioned content encodings. If Mutt cannot deal with a MIME type, it will display a message like: [-- image/gif is unsupported (use 'v' to view this part) --]  File: mutt.info, Node: The Attachment Menu, Next: The Compose Menu, Prev: Viewing MIME Messages in the Pager, Up: Using MIME in Mutt 5.1.3 The Attachment Menu ------------------------- The default binding for ‘’ is ‘v’, which displays the attachment menu for a message. The attachment menu displays a list of the attachments in a message. From the attachment menu, you can save, print, pipe, delete, and view attachments. You can apply these operations to a group of attachments at once, by tagging the attachments and by using the ‘’ operator. You can also reply to the current message from this menu, and only the current attachment (or the attachments tagged) will be quoted in your reply. You can view attachments as text, or view them using the mailcap viewer definition (the mailcap mechanism is explained later in detail). Finally, you can apply the usual message-related functions (like ‘’ (*note resend-message::), and the ‘’ and ‘’ functions) to attachments of type ‘message/rfc822’. See table *note Default Attachment Menu Bindings:: for all available functions. * Menu: * Viewing Attachments::  File: mutt.info, Node: Viewing Attachments, Up: The Attachment Menu 5.1.3.1 Viewing Attachments ........................... There are four(!) ways of viewing attachments, so the functions deserve some extra explanation. ‘’ (default keybinding: m) This will use the first matching mailcap entry. If no matching mailcap entries are found, it will abort with an error message. ‘’ (default keybinding: ) Mutt will display internally supported MIME types (see *note Viewing MIME Messages in the Pager::) in the pager. This will respect auto_view (*note MIME Autoview::) settings, to determine whether to use a ‘copiousoutput’ mailcap entry or just directly display the attachment. Other MIME types will use the first matching mailcap entry. If no matching mailcap entries are found, the attachment will be displayed in the pager as raw text. ‘’ Mutt will use the first matching ‘copiousoutput’ mailcap entry to display the attachment in the pager (regardless of auto_view (*note MIME Autoview::) settings). If no matching mailcap entries are found, the attachment will be displayed in the pager as raw text. ‘’ (default keybinding: T) The attachment will always be displayed in the pager as raw text.  File: mutt.info, Node: The Compose Menu, Prev: The Attachment Menu, Up: Using MIME in Mutt 5.1.4 The Compose Menu ---------------------- The compose menu is the menu you see before you send a message. It allows you to edit the recipient list, the subject, and other aspects of your message. It also contains a list of the attachments of your message, including the main body. From this menu, you can print, copy, filter, pipe, edit, compose, review, and rename an attachment or a list of tagged attachments. You can also modifying the attachment information, notably the type, encoding and description. Attachments appear as follows by default: - 1 [text/plain, 7bit, 1K] /tmp/mutt-euler-8082-0 2 [applica/x-gunzip, base64, 422K] ~/src/mutt-0.85.tar.gz The ‘-’ denotes that Mutt will delete the file after sending (or postponing, or canceling) the message. It can be toggled with the ‘’ command (default: u). The next field is the MIME content-type, and can be changed with the ‘’ command (default: ^T). The next field is the encoding for the attachment, which allows a binary message to be encoded for transmission on 7bit links. It can be changed with the ‘’ command (default: ^E). The next field is the size of the attachment, rounded to kilobytes or megabytes. The next field is the filename, which can be changed with the ‘’ command (default: R). The final field is the description of the attachment, and can be changed with the ‘’ command (default: d). See $attach_format (*note attach_format::) for a full list of available expandos to format this display to your needs.  File: mutt.info, Node: MIME Type Configuration with mime_types, Next: MIME Viewer Configuration with Mailcap, Prev: Using MIME in Mutt, Up: Mutt's MIME Support 5.2 MIME Type Configuration with mime.types =========================================== To get most out of MIME, it's important that a MIME part's content type matches the content as closely as possible so that the recipient's client can automatically select the right viewer for the content. However, there's no reliable way for Mutt to know how to detect every possible file type. Instead, it uses a simple plain text mapping file that specifies what file extension corresponds to what MIME type. This file is called ‘mime.types’. When you add an attachment to your mail message, Mutt searches your personal ‘mime.types’ file at ‘$HOME/.mime.types’, and then the system ‘mime.types’ file at ‘/usr/local/share/mutt/mime.types’ or ‘/etc/mime.types’ Each line starts with the full MIME type, followed by a space and space-separated list of file extensions. For example you could use: *mime.types* application/postscript ps eps application/pgp pgp audio/x-aiff aif aifc aiff A sample ‘mime.types’ file comes with the Mutt distribution, and should contain most of the MIME types you are likely to use. If Mutt can not determine the MIME type by the extension of the file you attach, it will run the command specified in $mime_type_query_command (*note mime_type_query_command::). If that command is not specified, Mutt will look at the file. If the file is free of binary information, Mutt will assume that the file is plain text, and mark it as ‘text/plain’. If the file contains binary information, then Mutt will mark it as ‘application/octet-stream’. You can change the MIME type that Mutt assigns to an attachment by using the ‘’ command from the compose menu (default: ^T), see *note Supported MIME types:: for supported major types. Mutt recognizes all of these if the appropriate entry is found in the ‘mime.types’ file. Non-recognized mime types should only be used if the recipient of the message is likely to be expecting such attachments. *Supported MIME types* MIME major type Standard Description ‘application’ yes General application data ‘audio’ yes Audio data ‘image’ yes Image data ‘message’ yes Mail messages, message status information ‘model’ yes VRML and other modeling data ‘multipart’ yes Container for other MIME parts ‘text’ yes Text data ‘video’ yes Video data ‘chemical’ no Mostly molecular data MIME types are not arbitrary, they need to be assigned by IANA (http://www.iana.org/assignments/media-types/).  File: mutt.info, Node: MIME Viewer Configuration with Mailcap, Next: MIME Autoview, Prev: MIME Type Configuration with mime_types, Up: Mutt's MIME Support 5.3 MIME Viewer Configuration with Mailcap ========================================== Mutt supports RFC 1524 MIME Configuration, in particular the Unix specific format specified in Appendix A of RFC 1524. This file format is commonly referred to as the ‘mailcap’ format. Many MIME compliant programs utilize the mailcap format, allowing you to specify handling for all MIME types in one place for all programs. Programs known to use this format include Firefox, lynx and metamail. In order to handle various MIME types that Mutt doesn't have built-in support for, it parses a series of external configuration files to find an external handler. The default search string for these files is a colon delimited list containing the following files: 1. ‘$HOME/.mailcap’ 2. ‘$PKGDATADIR/mailcap’ 3. ‘$SYSCONFDIR/mailcap’ 4. ‘/etc/mailcap’ 5. ‘/usr/etc/mailcap’ 6. ‘/usr/local/etc/mailcap’ where ‘$HOME’ is your home directory. The ‘$PKGDATADIR’ and the ‘$SYSCONFDIR’ directories depend on where Mutt is installed: the former is the default for shared data, the latter for system configuration files. The default search path can be obtained by running the following command: mutt -nF /dev/null -Q mailcap_path In particular, the metamail distribution will install a mailcap file, usually as ‘/usr/local/etc/mailcap’, which contains some baseline entries. * Menu: * The Basics of the Mailcap File:: * Secure Use of Mailcap:: * Advanced Mailcap Usage:: * Example Mailcap Files::  File: mutt.info, Node: The Basics of the Mailcap File, Next: Secure Use of Mailcap, Up: MIME Viewer Configuration with Mailcap 5.3.1 The Basics of the Mailcap File ------------------------------------ A mailcap file consists of a series of lines which are comments, blank, or definitions. A comment line consists of a # character followed by anything you want. A blank line is blank. A definition line consists of a content type, a view command, and any number of optional fields. Each field of a definition line is divided by a semicolon ‘;’ character. The content type is specified in the MIME standard ‘type/subtype’ notation. For example, ‘text/plain’, ‘text/html’, ‘image/gif’, etc. In addition, the mailcap format includes two formats for wildcards, one using the special ‘*’ subtype, the other is the implicit wild, where you only include the major type. For example, ‘image/*’, or ‘video’ will match all image types and video types, respectively. The view command is a Unix command for viewing the type specified. There are two different types of commands supported. The default is to send the body of the MIME message to the command on stdin. You can change this behavior by using ‘%s’ as a parameter to your view command. This will cause Mutt to save the body of the MIME message to a temporary file, and then call the view command with the ‘%s’ replaced by the name of the temporary file. In both cases, Mutt will turn over the terminal to the view program until the program quits, at which time Mutt will remove the temporary file if it exists. This means that mailcap does _not_ work out of the box with programs which detach themselves from the terminal right after starting, like ‘open’ on Mac OS X. In order to nevertheless use these programs with mailcap, you probably need custom shell scripts. So, in the simplest form, you can send a ‘text/plain’ message to the external pager more on standard input: text/plain; more Or, you could send the message as a file: text/plain; more %s Perhaps you would like to use lynx to interactively view a ‘text/html’ message: text/html; lynx %s In this case, lynx does not support viewing a file from standard input, so you must use the ‘%s’ syntax. *Note* _Some older versions of lynx contain a bug where they will check the mailcap file for a viewer for ‘text/html’. They will find the line which calls lynx, and run it. This causes lynx to continuously spawn itself to view the object._ On the other hand, maybe you don't want to use lynx interactively, you just want to have it convert the ‘text/html’ to ‘text/plain’, then you can use: text/html; lynx -dump %s | more Perhaps you wish to use lynx to view ‘text/html’ files, and a pager on all other text formats, then you would use the following: text/html; lynx %s text/*; more  File: mutt.info, Node: Secure Use of Mailcap, Next: Advanced Mailcap Usage, Prev: The Basics of the Mailcap File, Up: MIME Viewer Configuration with Mailcap 5.3.2 Secure Use of Mailcap --------------------------- The interpretation of shell meta-characters embedded in MIME parameters can lead to security problems in general. Mutt tries to quote parameters in expansion of ‘%s’ syntaxes properly, and avoids risky characters by substituting them, see the $mailcap_sanitize (*note mailcap_sanitize::) variable. Although Mutt's procedures to invoke programs with mailcap seem to be safe, there are other applications parsing mailcap, maybe taking less care of it. Therefore you should pay attention to the following rules: _Keep the %-expandos away from shell quoting._ Don't quote them with single or double quotes. Mutt does this for you, the right way, as should any other program which interprets mailcap. Don't put them into backtick expansions. Be highly careful with evil statements, and avoid them if possible at all. Trying to fix broken behavior with quotes introduces new leaks — there is no alternative to correct quoting in the first place. If you have to use the %-expandos' values in context where you need quoting or backtick expansions, put that value into a shell variable and reference the shell variable where necessary, as in the following example (using ‘$charset’ inside the backtick expansion is safe, since it is not itself subject to any further expansion): text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \ && test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1  File: mutt.info, Node: Advanced Mailcap Usage, Next: Example Mailcap Files, Prev: Secure Use of Mailcap, Up: MIME Viewer Configuration with Mailcap 5.3.3 Advanced Mailcap Usage ---------------------------- * Menu: * Optional Fields:: * Search Order:: * Command Expansion::  File: mutt.info, Node: Optional Fields, Next: Search Order, Up: Advanced Mailcap Usage 5.3.3.1 Optional Fields ....................... In addition to the required content-type and view command fields, you can add semi-colon ‘;’ separated fields to set flags and other options. Mutt recognizes the following optional fields: copiousoutput This flag tells Mutt that the command passes possibly large amounts of text on standard output. This causes Mutt to invoke a pager (either the internal pager or the external pager defined by the pager variable) on the output of the view command. Without this flag, Mutt assumes that the command is interactive. One could use this to replace the pipe to ‘more’ in the ‘lynx -dump’ example in the Basic section: text/html; lynx -dump %s ; copiousoutput This will cause lynx to format the ‘text/html’ output as ‘text/plain’ and Mutt will use your standard pager to display the results. Mutt will set the ‘COLUMNS’ environment variable to the width of the pager. Some programs make use of this environment variable automatically. Others provide a command line argument that can use this to set the output width: text/html; lynx -dump -width ${COLUMNS:-80} %s; copiousoutput Note that when using the built-in pager, _only_ entries with this flag will be considered a handler for a MIME type — all other entries will be ignored. needsterminal Mutt uses this flag when viewing attachments with ‘auto_view’ (*note MIME Autoview::), in order to decide whether it should honor the setting of the $wait_key (*note wait_key::) variable or not. When an attachment is viewed using an interactive program, and the corresponding mailcap entry has a _needsterminal_ flag, Mutt will use $wait_key (*note wait_key::) and the exit status of the program to decide if it will ask you to press a key after the external program has exited. In all other situations it will not prompt you for a key. compose= This flag specifies the command to use to create a new attachment of a specific MIME type. Mutt supports this from the compose menu. composetyped= This flag specifies the command to use to create a new attachment of a specific MIME type. This command differs from the compose command in that Mutt will expect standard MIME headers on the data. This can be used to specify parameters, filename, description, etc. for a new attachment. Mutt supports this from the compose menu. print= This flag specifies the command to use to print a specific MIME type. Mutt supports this from the attachment and compose menus. edit= This flag specifies the command to use to edit a specific MIME type. Mutt supports this from the compose menu, and also uses it to compose new attachments. Mutt will default to the defined $editor (*note editor::) for text attachments. nametemplate=