Display mail

This commit is contained in:
Frank Villaro-Dixon 2016-06-13 13:11:33 +02:00
parent 0928a2c51c
commit 2a7713b73b
2 changed files with 16 additions and 1 deletions

15
mutt/.mutt/displayMail.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
TMPFILE=$(mktemp)
# save the message to a file
cat - >"$TMPFILE"
# extract the date header
DATE=$( formail -xDate: < "$TMPFILE" )
# convert to the current timezone (defined by TZ)
DATE=$( date -R -d "$DATE" )
# output the modified message
echo "Date: $DATE"
formail -fI Date < "$TMPFILE"
# clean up
rm -f "$TMPFILE"

View file

@ -124,7 +124,7 @@ set sleep_time=0
macro attach 'V' "<pipe-entry>cat > /dev/shm/mail.html && firefox /dev/shm/mail.html && rm /dev/shm/mail.html<enter>" macro attach 'V' "<pipe-entry>cat > /dev/shm/mail.html && firefox /dev/shm/mail.html && rm /dev/shm/mail.html<enter>"
set display_filter=~/.mutt/test.sh set display_filter=~/.mutt/displayMail.sh
#Spamcop things. This file is public on git.. Meh #Spamcop things. This file is public on git.. Meh