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 2330c54d59df01b7636d0f0db69bf4fbf36b6b96
parent a1525a07cb6c365e613ee38ada11e08f9f06c1fa
Author: Jaromil <jaromil@dyne.org>
Date:   Wed, 15 Oct 2014 18:32:45 +0200

fix sieve to create mailboxes when not existing, plus fix to gnome-keyring detection

Diffstat:
Msrc/jaro | 2+-
Msrc/zlibs/filters | 18+++++++++++++-----
2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/jaro b/src/jaro @@ -272,7 +272,7 @@ MUTTDIR="$MAILDIRS/.mutt" # use gnome-keyring for passwords on GNU systems GNOMEKEY=0 -[[ -r $WORKDIR/bin/jaro-gnome-keyring ]] && { +pidof gnome-keyring > /dev/null && { act "using gnome-keyring to store secrets" GNOMEKEY=1 } diff --git a/src/zlibs/filters b/src/zlibs/filters @@ -462,7 +462,7 @@ EOF cat <<EOF >> "$MAILDIRS/Filters.sieve" ] -{ fileinto "$fileinto"; stop; } +{ fileinto :create "$fileinto"; stop; } EOF return 0 @@ -479,7 +479,8 @@ update_sieve() { touch "$MAILDIRS/Filters.sieve" chmod 600 "$MAILDIRS/Filters.sieve" cat <<EOF >> "$MAILDIRS/Filters.sieve" -require "fileinto"; +# mailbox supports fileinto :create +require ["fileinto","mailbox"]; EOF @@ -504,7 +505,7 @@ EOF cat <<EOF >> "$MAILDIRS/Filters.sieve" # bounces if header :contains "Sender" "mailman-bounce" { - fileinto "zz.bounces"; + fileinto :create "zz.bounces"; stop; } @@ -563,7 +564,7 @@ EOF cat <<EOF >> "$MAILDIRS/Filters.sieve" # spam if header :is "X-Spam-Flag" "YES" { - fileinto "zz.spam"; stop; + fileinto :create "zz.spam"; stop; } EOF @@ -576,7 +577,14 @@ EOF # unsorted cat <<EOF >> "$MAILDIRS/Filters.sieve" -fileinto "unsorted"; +if anyof (header :contains "X-BeenThere" "list", + header :contains "X-Mailman-Version" ".", + header :contains "List-Post" "@", + header :matches "List-Id" ".*", + header :matches "Mailing-List" ".*") +{ fileinto :create "ml.unsorted"; stop; } + +fileinto :create "unsorted"; EOF unlock "$MAILDIRS/Filters.sieve"