diff options
Diffstat (limited to 'local/sbin/newmail-notify')
-rwxr-xr-x | local/sbin/newmail-notify | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/local/sbin/newmail-notify b/local/sbin/newmail-notify deleted file mode 100755 index 7c6b803..0000000 --- a/local/sbin/newmail-notify +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -cd ~/.mail - -if [ -f notify-notified ]; then - NOTIFIED=`cat notify-notified` - rm notify-notified -fi - -for account in `ls`; do - if cd "$account"/INBOX/new; then - for m in `ls`; do - echo $m - echo $m >> ~/.mail/notify-notified - if echo "$NOTIFIED" | grep "$m" >/dev/null; then continue; fi - FROM=`grep -E "^From: " "$m" | sed 's/^From: //' | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)'` - TO=`grep -E "^To: " "$m" | sed 's/^To: //' | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)'` - SUBJECT=`grep -E "^Subject: " "$m" | sed 's/^Subject: //' | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)'` - notify-send "$TO: $FROM" "$SUBJECT" - done - fi - cd ~/.mail -done |