summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2017-03-23 08:58:24 (GMT)
committer GitHub <noreply@github.com>2017-03-23 08:58:24 (GMT)
commitf36635d0e291997b4c2396f3b088acd018c9957a (patch)
tree31d920f6d1a1c172ac61f6f0016bc1dba661151d
parentaf025fedcfa65ac07bb86d911d3ba36be8acaa5c (diff)
parent69d02e617830b1f866dd82182a0940aabc2d8d55 (diff)
Merge pull request #29 from parazyd/opmsg
add opmsg support closes #23
-rwxr-xr-xsrc/zlibs/filters3
-rwxr-xr-xsrc/zlibs/mutt26
2 files changed, 29 insertions, 0 deletions
diff --git a/src/zlibs/filters b/src/zlibs/filters
index a84a86b..5433f49 100755
--- a/src/zlibs/filters
+++ b/src/zlibs/filters
@@ -543,6 +543,9 @@ source '$MAILDIRS/.mutt/mboxes'
# extra settings for mutt-kz (notmuch enabled)
source '$MAILDIRS/.mutt/notmuch'
+
+# opmsg support
+source '$MAILDIRS/.mutt/opmsg'
EOF
diff --git a/src/zlibs/mutt b/src/zlibs/mutt
index ed10e9a..4111d3a 100755
--- a/src/zlibs/mutt
+++ b/src/zlibs/mutt
@@ -59,6 +59,32 @@ x_mutt() {
return 1
}
+ rm -f "$MAILDIRS/.mutt/opmsg"
+ touch "$MAILDIRS/.mutt/opmsg"
+ opmux_path="$(command -v opmux)" && {
+ cat <<EOF > "$MAILDIRS/.mutt/opmsg"
+set pgp_long_ids
+
+set pgp_decode_command="OPMUX_MUA=mutt ${opmux_path} --passphrase-fd 0 \
+ --quiet --batch --output - %f"
+set pgp_verify_command="OPMUX_MUA=mutt ${opmux_path} --quiet --batch \
+ --output - --verify %s %f"
+set pgp_decrypt_command="OPMUX_MUA=mutt ${opmux_path} --passphrase-fd 0 \
+ --quiet --batch --output - %f"
+
+set pgp_encrypt_only_command="${opmux_path} --batch --quiet --output - \
+ --encrypt --textmode --armor --always-trust -r '%r' %f"
+set pgp_encrypt_sign_command="${opmux_path} --passphrase-fd 0 --batch \
+ --quiet --textmode --output - --encrypt --sign %?a?-u %a? --armor \
+ --always-trust -r '%r' %f"
+
+set pgp_list_pubring_command="${opmux_path} --batch --quiet --with-colons \
+ --list-keys %r"
+
+set pgp_decryption_okay="^opmux: SUCCESS\.$"
+EOF
+ }
+ unset opmux_path
rm -f "$MAILDIRS/.mutt/notmuch"
touch "$MAILDIRS/.mutt/notmuch"