me, 2.0: jose nazario
beauty and the street
echo "new mails:"
grep -i folder ~/proclog | awk '{print $2}' | sort | uniq -c
cp /dev/null ~/proclog
of course i also use ifile
to sort between spam and non-spam:
$ cat .procmailrc
SHELL=/bin/sh
VERBOSE=no
PATH=/home/jose/bin:/usr/local/bin
DEFAULT=/var/spool/mail/jose
LOGFILE=$HOME/proclog
IFILEFOLDER=`/home/jose/bin/ifile -q | /bin/head -1 | /usr/bin/awk '{print \$1}'`
# Deliver to folder ifile told you to; this is for Berkeley folders
:0 :$IFILEFOLDER.lock
mail/$IFILEFOLDER
this is pretty handy. now when i log in i get my mail counts as part
of my login message:
new mails:
5 mail/spam
and at the end of it i get a blank procmail logfile, which makes it consume
less disk space and always be fresh. if you're not doing large scale trending
on your filtering this can be useful. (if you are, you can always push it
off to the side and keep your immediate logfile as a counter.)
next Tuesday, Jul 22, 2003 @ 03:53pm | previous Sunday, Jul 20, 2003 @ 12:09am | archives
| Last modified: Sunday, Jul 20, 2003 @ 10:27pm |
copyright © 2002-2005 jose nazario, all rights reserved.