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 579c0a3d643bcc981224437b9355dcaa139eba6a
parent de92c35b43ca1a9fc04093bf314094fc2e5673c6
Author: Jaromil <jaromil@dyne.org>
Date:   Wed,  7 May 2014 15:37:17 +0200

fix to filtering to priv/

Diffstat:
Msrc/zlibs/filters | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/zlibs/filters b/src/zlibs/filters @@ -255,8 +255,8 @@ filter_maildir() { typeset -alU ftos # recompile the array of destination addresses - ftos=(`hdr "$m" | ${WORKDIR}/bin/fetchaddr -x cc -a`) - ftos+=(`hdr "$m" | ${WORKDIR}/bin/fetchaddr -x to -a`) + ftos=(`hdr "$m" | ${WORKDIR}/bin/fetchaddr -x cc -a | cut -d, -f1`) + ftos+=(`hdr "$m" | ${WORKDIR}/bin/fetchaddr -x to -a | cut -d, -f1`) # run all filter regexps on the to: and cc: fields { test "$ftos" = "" } || { @@ -303,8 +303,9 @@ filter_maildir() { # parse own email and aliases for f in $ftos; do + func "CAZZZ -> $f" # check if destination address is in filter_own array - if [[ ${filter_own[(i)"$ftos"]} -le ${#filter_own} ]] ; then + if [[ ${filter_own[(r)$f]} == ${f} ]] ; then act "$c\t\t/ $numm\t\t-> priv" cat "$m" | deliver priv { test $? = 0 } && { rm "$m" }