Debian - Add the checking mail notification - mutt

UP HOME

add checking mail notification

Add the checking mail notification for Mutt - 为Mutt添加新邮件提醒

通过mailcheck

Install the notify-send app, in Debian, the package is libnotify-bin
$sudo aptitude install libnotify-bin
Install mailcheck app
$sudo aptitude install mailcheck
Configure the mailcheck

Create the file: ~/.mailcheckrc, and add the following lines:

$(HOME)/mail/inbox
$(HOME)/mail/work
Write shell script. to monite the mail

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
Auto run script. when login

Add the following line into your .bashprofile

. ~/mail/mail-notify.sh &

通过mail-notification

看来是我太原始了,才发现mail-notification这个好东西,几乎不需要配置

安装
$sudo aptitude install mail-notification
启动软件

打开 应用程序-互联网-Mail Notification

配置

配置相当简单,类型选择autodetected,路径选择mail文件夹,比如/home/shine/mail/work,搞定

Author: Shine Zhong

Date: 2011-01-11 16:49:18 CST

HTML generated by org-mode 7.4 in emacs 23

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/737564/viewspace-683521/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/737564/viewspace-683521/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值