initial commit

This commit is contained in:
Luke
2018-02-09 23:47:29 -07:00
commit 914a1bf4d8
12 changed files with 427 additions and 0 deletions

4
credentials/getmuttpass Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
pass=$(gpg -d -q ~/.config/mutt/credentials/$1.gpg)
echo set smtp_pass=\"$pass\"
echo set imap_pass=\"$pass\"

11
credentials/imappwd.py Executable file
View File

@ -0,0 +1,11 @@
import os.path
import subprocess
home = os.path.expanduser("~")
def mailpasswd(acct):
acct = os.path.basename(acct)
path = "%s/.config/mutt/credentials/%s.gpg" % (home,acct)
args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path]
try:
return subprocess.check_output(args).strip()
except subprocess.CalledProcessError:
return ""