mutt-wizard

fork of Luke Smiths mutt-wizard
git clone git://git.jakekoroman.com/mutt-wizard
Log | Files | Refs | README | LICENSE

commit bd05be79e5a80dd4addad5135f395d8ce3cfd25d
parent e7a5ec954201808f7fed3f5aeb7e9f0c92002ee4
Author: Jake Koroman <jakekoroman@gmail.com>
Date:   Wed, 27 Mar 2024 09:46:49 -0400

sanitize subject line to account for multiline subjects

Diffstat:
Mbin/mailsync | 5++++-
Mshare/mutt-wizard.muttrc | 2+-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/bin/mailsync b/bin/mailsync @@ -55,7 +55,10 @@ syncandnotify() { echo "$newcount new mail for $2." [ -z "$MAILSYNC_MUTE" ] && for file in $new; do - subject=$(sed -n "/^Subject:.*$/{ p; n; p; }" "$file" | sed 's/MIME.*$//g' | tr -d '\n') + # used to parse the FULL subject. sometimes if its long enough it will wrap down a line. + # if its longer than 2 lines then the sender doesn't understand what a subject is supposed to be. + sanitize='s/MIME.*$//g; s/Content-Type.*$//g; s/X-MS-Exchange-Transport-Rules-IncidentReport:.*$//g; s/From:.*$//g; s/X-MS.*$//g' + subject=$(sed -n "/^Subject:.*$/{ p; n; p; }" "$file" | sed $sanitize | tr -d '\n') from="$(sed -n "/^From:/ s|From: *|| p" "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)')" diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc @@ -105,7 +105,7 @@ macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter macro index A "<limit>all\n" "show all messages (undo limit)" # Sidebar mappings -set sidebar_visible = yes +set sidebar_visible = no set sidebar_width = 20 set sidebar_short_path = yes set sidebar_next_new_wrap = yes