diff --git a/install.sh b/install.sh index d92260a..f8a65ae 100755 --- a/install.sh +++ b/install.sh @@ -29,6 +29,7 @@ ln -s $WAI/mutt/passwords.gpg ./ ln -s $WAI/mutt/crypto ./ ln -s $WAI/mutt/colors.test1 ./ ln -s $WAI/mutt/colors.test2 ./ +ln -s $WAI/mutt/unlock-pass.sh ./ #VIM diff --git a/mutt/muttrc b/mutt/muttrc index 0b7207f..873ee88 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -18,7 +18,8 @@ set from = "Frank@Villaro-Dixon.eu" set realname = "Frank Villaro-Dixon" ##Passwords: -source "gpg -d ~/.mutt/passwords.gpg |" +####source "gpg -d ~/.mutt/passwords.gpg |" +source "~/.mutt/unlock-pass.sh |" # Change the following line to a different editor you prefer. #set editor = "vim" diff --git a/mutt/unlock-pass.sh b/mutt/unlock-pass.sh new file mode 100755 index 0000000..48bb3fb --- /dev/null +++ b/mutt/unlock-pass.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +PASS_FILE="/dev/shm/$USER-mutt-pass" +ENC_PASS_FILE=~/.mutt/passwords.gpg + +if [ ! -e $PASS_FILE ]; then + umask 077 + gpg -d $ENC_PASS_FILE > $PASS_FILE +fi + +cat $PASS_FILE