diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/mailsync | 3 | ||||
-rwxr-xr-x | bin/mw | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/bin/mailsync b/bin/mailsync index fab980a..af7aa6c 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -61,8 +61,7 @@ syncandnotify() { newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) case 1 in $((newcount > 5)) ) notify "$acc" "$newcount" ;; - $((newcount > 0)) ) notify "$acc" "$newcount" - for file in $new; do + $((newcount > 0)) ) for file in $new; do # Extract subject and sender from mail. from=$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//') subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n 1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n') @@ -236,7 +236,7 @@ getboxes() { if [ -n "${force+x}" ] ; then *[Jj][Uu][Nn][Kk]*) formatShortcut j junk "$x" ;; *[Aa][Rr][Cc][Hh][Ii][Vv][Ee]*) formatShortcut a archive "$x" ;; *[Ss][Pp][Aa][Mm]*) formatShortcut S spam "$x" ;; - *[Ii][Nn][Bb][Oo][Xx]*) formatShortcut i inbox "$x"; setBox spoolfile "$x" inbox="$x" ;; + *[Ii][Nn][Bb][Oo][Xx]) formatShortcut i inbox "$x"; setBox spoolfile "$x" inbox="$x" ;; esac done } |