$sudo aptitude install libnotify-bin
$sudo aptitude install mailcheck
Create the file: ~/.mailcheckrc, and add the following lines:
$(HOME)/mail/inbox $(HOME)/mail/work
Here is the shell file content
#/bin/bash
last=0
cur=0
while [ : ]
do
mailcheck | grep new 2>&1 >/dev/null
if [ $? -eq 0 ]
then
cur=$(mailcheck | awk 'BEGIN {sum=0} ; $4~/new/ {sum=sum+1}; END {print sum}')
if [ $cur -ne $last ]
then
notify-send -i "/usr/share/pixmaps/mutt.xpm" "New Mail: $cur"
last=$cur
fi
fi
sleep 300
done
Add the following line into your .bashprofile
. ~/mail/mail-notify.sh &
看来是我太原始了,才发现mail-notification这个好东西,几乎不需要配置
$sudo aptitude install mail-notification
打开 应用程序-互联网-Mail Notification
配置相当简单,类型选择autodetected,路径选择mail文件夹,比如/home/shine/mail/work,搞定
Date: 2011-01-11 16:49:18 CST
HTML generated by org-mode 7.4 in emacs 23
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/737564/viewspace-683521/ ,如需转载,请注明出处,否则将追究法律责任。