3 # * Copyright 2007 Tristan Chabredier <wwp@claws-mail.org>
5 # * This file is free software; you can redistribute it and/or modify it
6 # * under the terms of the GNU General Public License as published by
7 # * the Free Software Foundation; either version 3 of the License, or
8 # * (at your option) any later version.
10 # * This program is distributed in the hope that it will be useful, but
11 # * WITHOUT ANY WARRANTY; without even the implied warranty of
12 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # * General Public License for more details.
15 # * You should have received a copy of the GNU General Public License
16 # * along with this program; if not, write to the Free Software
17 # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 # popfile-link.sh helper script to open messages in POPFile's control center
20 # in order to edit their status
22 # Requires that POPFile is running and that the message has been processed
23 # by it (X-POPFile-Link: header present). POPFile control center opens with
24 # the web browser set in Claws Mail prefs.
29 TMPCMD=$(echo $OPEN_CMD | sed "s:%s:$1:")
37 CM_DIR=$(claws-mail --config-dir)
38 test -z "$CM_DIR" -o ! -d "$HOME/$CM_DIR" && \
41 OPEN_CMD=$(grep -Em 1 "^uri_open_command=" "$HOME/$CM_DIR/clawsrc" | cut -d '=' -f 2-)
42 test -z "$OPEN_CMD" || \
47 LINK=$(grep -Eim 1 "^X\-POPFile\-Link: " "$1")