aboutsummaryrefslogtreecommitdiff
path: root/local/sbin/newmail-notify
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2017-04-07 14:56:22 +0200
committerKarel Kočí <karel.koci@nic.cz>2017-04-07 14:56:22 +0200
commita793b23435567f2d4f49846196ceebcc47cd764c (patch)
tree5f542d40b11c55ff851724cbab21c27ba7a8ff0d /local/sbin/newmail-notify
parent6384224250a62e8b1ea913934db5dbae536ce153 (diff)
downloadmyconfigs-a793b23435567f2d4f49846196ceebcc47cd764c.tar.gz
myconfigs-a793b23435567f2d4f49846196ceebcc47cd764c.tar.bz2
myconfigs-a793b23435567f2d4f49846196ceebcc47cd764c.zip
Remove stuff not needed on server
Diffstat (limited to 'local/sbin/newmail-notify')
-rwxr-xr-xlocal/sbin/newmail-notify23
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