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 2708e255e2876536286b2b6e403de0bc0d8b6343
parent 977d918b491c7ab88a66e9d668af57a5ee3313ff
Author: Jaromil <jaromil@dyne.org>
Date:   Wed, 31 Dec 2014 19:24:13 +0100

fix on deliver and year update

Diffstat:
Msrc/zlibs/accounts | 2+-
Msrc/zlibs/email | 2+-
Msrc/zlibs/filters | 2+-
Msrc/zlibs/maildirs | 31+++++++++----------------------
Msrc/zlibs/publish | 2+-
Msrc/zlibs/search | 10+++++++---
6 files changed, 20 insertions(+), 29 deletions(-)

diff --git a/src/zlibs/accounts b/src/zlibs/accounts @@ -4,7 +4,7 @@ # # a tool to easily and privately handle your e-mail communication # -# Copyleft (C) 2010-2014 Denis Roio <jaromil@dyne.org> +# Copyleft (C) 2010-2015 Denis Roio <jaromil@dyne.org> # # This source code is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by diff --git a/src/zlibs/email b/src/zlibs/email @@ -4,7 +4,7 @@ # # a tool to easily and privately handle your e-mail communication # -# Copyleft (C) 2010-2014 Denis Roio <jaromil@dyne.org> +# Copyleft (C) 2010-2015 Denis Roio <jaromil@dyne.org> # # This source code is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by diff --git a/src/zlibs/filters b/src/zlibs/filters @@ -4,7 +4,7 @@ # # a tool to easily and privately handle your e-mail communication # -# Copyleft (C) 2010-2014 Denis Roio <jaromil@dyne.org> +# Copyleft (C) 2010-2015 Denis Roio <jaromil@dyne.org> # # This source code is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by diff --git a/src/zlibs/maildirs b/src/zlibs/maildirs @@ -253,37 +253,24 @@ deliver() { # tag +inbox [[ "$dest" = "known" ]] \ - || [[ "$dest" = "priv" ]] \ || [[ "$dest" = "sent" ]] && { - - cat | nm insert --folder="$dest" +inbox - [[ $? = 0 ]] || { - error "Could not write email file into maildir $dest using notmuch insert." - func "Returning error to caller." - return 1 - } - return 0 + cat | nm insert --folder="$dest" +inbox +priv + return $? } + [[ "$dest" = "priv" ]] && { + cat | nm insert --folder="$dest" +priv + return $? + } + # tag +unsorted [[ "$dest" = "unsorted" ]] \ || [[ "$dest" =~ "^lists." ]] && { - cat | nm insert --folder="$dest" +unsorted - [[ $? = 0 ]] || { - error "Could not write email file into maildir $dest using notmuch insert." - func "Returning error to caller." - return 1 - } - return 0 + return $? } # anything else +filters cat | nm insert --folder="$dest" +filters - [[ $? = 0 ]] || { - error "Could not write email file into maildir $dest using notmuch insert." - func "Returning error to caller." - return 1 - } - return 0 + return $? } diff --git a/src/zlibs/publish b/src/zlibs/publish @@ -4,7 +4,7 @@ # # a tool to easily and privately handle your e-mail communication # -# Copyleft (C) 2010-2014 Denis Roio <jaromil@dyne.org> +# Copyleft (C) 2010-2015 Denis Roio <jaromil@dyne.org> # # This source code is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by diff --git a/src/zlibs/search b/src/zlibs/search @@ -28,9 +28,13 @@ # internal use nm() { [[ -r "$MAILDIRS"/cache/notmuch/rc ]] || nm_setup - notmuch --config="$MAILDIRS"/cache/notmuch/rc ${@} \ - 2>&1 | grep -v '^Note: Ignoring non-mail' - + notmuch --config="$MAILDIRS"/cache/notmuch/rc ${@} + _res=$? + [[ $_res = 0 ]] || { + error "Notmuch error on command: ${@}" + func "Returning status to caller: $_res" + } + return $_res } nm_setup() {