diff --git a/bin/mailsync b/bin/mailsync index 1ef2155..44c9756 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -28,13 +28,9 @@ syncandnotify() { if [ "$newcount" -gt "0" ]; then notify "$acc" "$newcount" & for file in $new; do - # Extract subject and sender from mail (room for improvement). - subject=$(grep "^Subject: " "$file" | sed 's/Subject: //' | head -n4) - from=$(grep "^From: " "$file" | awk '{ $1=""; $NF=""; print $0 }' | tr -d "\"\'\<\>" | sed 's/^ \(.*\) $/\1/') - substring="=?" - # Some html emails contain weird Subject and/or Sender formatting, in which case the html tag content is used (room for improvement). - [ "${subject#*$substring}" != "$subject" ] && subject=$(tr '\n' ' ' < "$file" | sed 's/.*