Mutt 1.10.1: UTF-8 Subject lines may exceed length of the index_format
Mutt 1.10.1 appears to have a bug, possibly an off-by-one bug or maybe with general UTF-8 support, relating to subject lines. Certain characters in UTF8-encoded Subject lines can cause inadvertent line wrapping in the indexer. I don't know if this is a bug introduced in recent Mutt versions or not -- this is just the first time I've encountered it.
Please see the attached screenshot; note that the s in the final word success in the Subject wraps to the next line:
As for the Email itself: I can provide this privately to whoever takes up the issue/ticket. It's an eBay listings Email, which contains lots of HTML and therefore may contain links or information specific to my eBay account, and I'd rather not take the risks publicly disclosing it. I can provide the relevant headers and Subject line, as well as an xxd of all that, since UTF-8 bytecode can sometimes be confusing (esp. with MIME involved):
Subject: =?UTF-8?Q?=E2=9C=85_Dragon_Que..._is_li?=
=?UTF-8?Q?ve!_=F0=9F=9B=8E=EF=B8=8F_Check_our_sel?=
=?UTF-8?Q?ling_tips_to_increase_your_selling_success.?=
MIME-Version: 1.0
Content-Type: text/html;charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-eBay-MailTracker: 12000.000.0.0.6089d85e4b614802b823320a0d7453bd
Status: RO
Content-Length: 56701
00000000: 5375 626a 6563 743a 203d 3f55 5446 2d38 Subject: =?UTF-8
00000010: 3f51 3f3d 4532 3d39 433d 3835 5f44 7261 ?Q?=E2=9C=85_Dra
00000020: 676f 6e5f 5175 652e 2e2e 5f69 735f 6c69 gon_Que..._is_li
00000030: 3f3d 0a20 3d3f 5554 462d 383f 513f 7665 ?=. =?UTF-8?Q?ve
00000040: 215f 3d46 303d 3946 3d39 423d 3845 3d45 !_=F0=9F=9B=8E=E
00000050: 463d 4238 3d38 465f 4368 6563 6b5f 6f75 F=B8=8F_Check_ou
00000060: 725f 7365 6c3f 3d0a 203d 3f55 5446 2d38 r_sel?=. =?UTF-8
00000070: 3f51 3f6c 696e 675f 7469 7073 5f74 6f5f ?Q?ling_tips_to_
00000080: 696e 6372 6561 7365 5f79 6f75 725f 7365 increase_your_se
00000090: 6c6c 696e 675f 7375 6363 6573 732e 3f3d lling_success.?=
000000a0: 0a4d 494d 452d 5665 7273 696f 6e3a 2031 .MIME-Version: 1
000000b0: 2e30 0a43 6f6e 7465 6e74 2d54 7970 653a .0.Content-Type:
000000c0: 2074 6578 742f 6874 6d6c 3b63 6861 7273 text/html;chars
000000d0: 6574 3d55 5446 2d38 0a43 6f6e 7465 6e74 et=UTF-8.Content
000000e0: 2d54 7261 6e73 6665 722d 456e 636f 6469 -Transfer-Encodi
000000f0: 6e67 3a20 7175 6f74 6564 2d70 7269 6e74 ng: quoted-print
00000100: 6162 6c65 0a58 2d65 4261 792d 4d61 696c able.X-eBay-Mail
00000110: 5472 6163 6b65 723a 2031 3230 3030 2e30 Tracker: 12000.0
00000120: 3030 2e30 2e30 2e36 3038 3964 3835 6534 00.0.0.6089d85e4
00000130: 6236 3134 3830 3262 3832 3333 3230 6130 b614802b823320a0
00000140: 6437 3435 3362 640a 5374 6174 7573 3a20 d7453bd.Status:
00000150: 524f 0a43 6f6e 7465 6e74 2d4c 656e 6774 RO.Content-Lengt
00000160: 683a 2035 3637 3031 0a h: 56701.
Relevant muttrc, system, and environment details:
FreeBSD icarus.home.lan 11.2-STABLE FreeBSD 11.2-STABLE #0 r337400: Mon Aug 6 18:51:53 PDT 2018 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_11_amd64 amd64
Local relevant environment variables:
export LANG="en_GB.UTF-8"
export LC_COLLATE="C"
export NCURSES_NO_UTF8_ACS="1"
stty -a output so you can know my terminal size/details:
speed 38400 baud; 43 rows; 132 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl tab0 -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U;
lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
ldd /usr/local/bin/mutt output:
/usr/local/bin/mutt:
libncursesw.so.8 => /lib/libncursesw.so.8 (0x8008e2000)
libssl.so.8 => /usr/lib/libssl.so.8 (0x800b42000)
libcrypto.so.8 => /lib/libcrypto.so.8 (0x800e00000)
libz.so.6 => /lib/libz.so.6 (0x80126e000)
libc.so.7 => /lib/libc.so.7 (0x801486000)
mutt -v output:
Mutt 1.10.1 (2018-07-13)
Copyright (C) 1996-2016 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.
System: FreeBSD 11.2-STABLE (amd64)
ncurses: ncurses 5.9.20140222 (compiled with 5.9)
Compiler:
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin
cc: warning: argument unused during compilation: '-I /usr/local/include' [-Wunused-command-line-argument]
Configure options: '--disable-fcntl' '--with-ssl=/usr' '--with-docdir=/usr/local/share/doc/mutt' '--sysconfdir=/usr/local/etc' '--enable-external-dotlock' '--enable-pop' '--enable-imap' '--enable-compressed' '--enable-sidebar' '--disable-iconv' '--without-idn' '--disable-nls' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd11.1' 'build_alias=amd64-portbld-freebsd11.1' 'CC=cc -I/usr/local/include' 'CFLAGS=-O2 -pipe -fstack-protector -fno-strict-aliasing' 'LDFLAGS= -L/usr/local/lib -Wl,-rpath=/usr/local/lib:/usr/lib -ltinfow -fstack-protector' 'LIBS=' 'CPPFLAGS=' 'CPP=cpp'
Compilation CFLAGS: -Wall -pedantic -Wno-long-long -O2 -pipe -fstack-protector -fno-strict-aliasing
Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE -USE_FCNTL -USE_FLOCK
+USE_POP +USE_IMAP -USE_SMTP
+USE_SSL_OPENSSL -USE_SSL_GNUTLS -USE_SASL -USE_GSS +HAVE_GETADDRINFO
+HAVE_REGCOMP -USE_GNU_REGEX
+HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET
+HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM +HAVE_FUTIMENS
+CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME -CRYPT_BACKEND_GPGME
-EXACT_ADDRESS -SUN_ATTACHMENT
-ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR
-HAVE_ICONV -ICONV_NONTRANS -HAVE_LIBIDN -HAVE_LIBIDN2 +HAVE_GETSID -USE_HCACHE +USE_SIDEBAR +USE_COMPRESSED
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/local/share/mutt"
SYSCONFDIR="/usr/local/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@mutt.org>.
To report a bug, please contact the Mutt maintainers via gitlab:
https://gitlab.com/muttmua/mutt/issues
patch-1.5.0.ats.date_conditional.1
.muttrc contents (some contents omitted for privacy):
set abort_nosubject=no
set auto_tag=yes # http://www.rdrop.com/docs/mutt/manual110.html#114
set beep=no
set bounce_delivered=no # http://www.rdrop.com/docs/mutt/manual114.html#118
set check_mbox_size=yes # works around mbox atime issues
set confirmappend=no
set confirmcreate=no
set delete=yes # delete messages when closing mailbox
set encode_from=no
set fast_reply=yes
set forward_decode=yes # no=include full headers when forwarding
set forward_format="Fwd: %s"
set forward_quote=yes
set implicit_autoview=yes # http://www.mutt.org/doc/devel/manual.html#implicit-autoview
set include=yes # include quoted original message in reply
set indent_string="> "
set index_format="%4C %Z %{%m/%d %H:%M} %-19.19L (%4c) %s"
set mail_check=60
set mail_check_recent=no # show new (but unread) mails as new
set mailcap_path="$HOME/.mailcap"
set mark_old=no # don't mark unread new messages as old when quitting
set markers=no # don't show '+' character for continued lines
set mime_forward=no # relates to forward_decode
set pager_index_lines=12
set postpone=no # don't save mail in $postponed mailbox
set prompt_after=no # http://www.rdrop.com/docs/mutt/manual296.html#300
set read_inc=100 # http://www.mutt.org/doc/devel/manual.html#tuning-mailboxes
set reply_to=yes # http://www.mutt.org/doc/devel/manual.html#reply-to
set reverse_name=yes # http://www.rdrop.com/docs/mutt/manual312.html#316
set sig_on_top=$my_sigontop # induces top-posting (some people hate this ;) )
set signature="$HOME/.signature"
set sleep_time=0 # disable 1 second delay when switching folders
set sort=threads # sorting method
set sort_browser=unsorted
set status_on_top=yes
set strict_threads=yes # http://www.rdrop.com/docs/mutt/manual342.html#346
#set text_flowed=yes # http://wcm1.web.rice.edu/mutt-tips.html
set tilde=yes # show tilde at end of mail in reader
set use_envelope_from=no
set write_inc=100 # http://www.mutt.org/doc/devel/manual.html#tuning-mailboxes
##
# Mailbox-related settings
#
# Note that these must come *after* the above sets, because there are
# some options like check_mbox_size which need to be set *before* mailboxes
# are defined.
#
set mbox_type=mbox
set folder="~/Mail"
set mbox="~/Mail/inbox"
set spoolfile="~/Mail/inbox"
set move=no # read mail from $spoolfile will
set record="=sent" # ...go into $record mailbox
##
# Default Email address, and some related settings.
#
set from=$my_from
##
# Needed when siphoning mail through Gmail (they rewrite the From: envelope)
#
# my_hdr Reply-To: $my_from
##
# List of mailboxes
#
mailboxes =mutt-bug
# Bind the 'y' key in the index and browser to go back to the mutt mailbox listing
macro index "y" "c?\t"
macro browser "y" "\t\t"
# Bind the '$' key in the browser to check for new mail
bind browser "$" check-new
bind index "<Tab>" next-unread
bind pager "<Tab>" next-unread
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Color definitions
# NOTE: brightcolor0 is black+bold (dark gray).
#
color normal white default
color quoted cyan default
color signature brightblue default
color indicator brightwhite cyan
color error brightred default
color status brightwhite blue
color tree brightgreen default # the thread tree in the index menu
color tilde brightcolor0 default
color message brightcyan default
color markers brightcyan default
color attachment brightblue default
color search black green # how to hilite search patterns in the pager
color hdrdefault green default
color header brightgreen default "^(To|From|Subject|Reply-To|Cc|Bcc):"
# headers which aren't visible unless you hit "h"
color header brightyellow default "^(Delivered-To|List-Id):"
color body brightyellow default "(news|nntp|ftp|http|https)://[^ ]+" # point out URLs
color body brightyellow default "[-a-z_0-9.]+@[-a-z_0-9.]+" # e-mail addresses
color underline brightgreen default
# ~T is for tagged messages
# ~F is for flagged messages (those with "X-Status: F" header)
color index brightyellow red ~T
color index brightred default ~F
# Mark high importance Emails as red
color index brightwhite red '~h "^Importance: (high|High)"'
color index brightwhite red '~h "^Priority: (high|High|urgent|Urgent)"'
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Specify the order of the headers to appear when displaying a message
#
# hdr_order <hdr1> [ <hdr2> ... ]
#
ignore *
unignore Date: To: Reply-To: Cc: Subject: Importance: Priority: From: Bcc: X-Mailer: X-Originating-IP:
unhdr_order *
hdr_order Received: From: To: Date: Reply-To: Cc: Bcc: Subject: Importance: Priority: X-Mailer: X-Originating-IP:
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Automatically use entries from ~/.mailcap to view these MIME types
#
# auto_view <type> [ <type> ... ]
alternative_order text/plain text/html
auto_view text/html
auto_view application/x-gunzip
auto_view application/x-gzip
