jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

commit 86e4cb8772cce7de793155b26dcc35e53600fd84
parent 2f81a1a5efae8b40a855760dfafe77fbe32ff83d
Author: Jaromil <jaromil@dyne.org>
Date:   Tue,  5 Jun 2012 18:13:27 +0200

fixed learning with a tee

Diffstat:
Msrc/jaro | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/jaro b/src/jaro @@ -1221,13 +1221,14 @@ query() { learn() { { test ! -r ${WORKDIR}/addressbook } && { create_addressbook } - message="`cat`" - from="`echo ${message} | formail -xFrom: | sed -e 's/\"//g'`" + tmp=$TMPDIR/learn.$datestamp.$RANDOM + from="`tee $tmp | formail -xFrom: | sed -e 's/\"//g'`" if [ -z ${PARAM[1]} ]; then - email="`echo ${message} | ${WORKDIR}/bin/fetchaddr| awk '{print $1}'`" + email="`cat $tmp | ${WORKDIR}/bin/fetchaddr| awk '{print $1}'`" else - email="`echo ${message} | ${WORKDIR}/bin/fetchaddr -x ${PARAM[1]}| awk '{print $1}'`" + email="`cat $tmp | ${WORKDIR}/bin/fetchaddr -x ${PARAM[1]}| awk '{print $1}'`" fi + ${=rm} $tmp & insert_address "$email" "$from" } @@ -1253,7 +1254,6 @@ EOF | bzip2 > $WORKDIR/addressbook.bz2 notice "Backup of all addressbook created" act -n ""; ls -lh $WORKDIR/addressbook.bz2 - } ###################