fix gpg on debian, aliases trailing ..., improve mailboxes.py

This commit is contained in:
2014-09-18 00:47:20 +02:00
parent 7c0689119a
commit 2c86319c01
3 changed files with 17 additions and 9 deletions

View File

@@ -1,3 +1,2 @@
alias NICKNAME1 LASTNAME1 FIRSTNAME1 <EMAIL1>
alias NICKNAME2 LASTNAME2 FIRSTNAME2 <EMAIL2>
...

View File

@@ -4,8 +4,8 @@ set pgp_verify_command = "gpg --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command = "gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command = "gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command = "gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command = "pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to #MYKEY -- -r %r -- %f"
set pgp_encrypt_sign_command = "pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f"
set pgp_encrypt_only_command = "/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to #MYKEY -- -r %r -- %f"
set pgp_encrypt_sign_command = "/usr/lib/mutt/pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f"
set pgp_import_command = "gpg --no-verbose --import -v %f"
set pgp_export_command = "gpg --no-verbose --export --armor %r"
set pgp_verify_key_command = "gpg --no-verbose --batch --fingerprint --check-sigs %r"

View File

@@ -1,17 +1,23 @@
#! /usr/bin/env python
import os
import sys
mail_location = os.path.expanduser("~/Mail/")
types = {
# dictionary: "mail -> list of directories"
# relative paths from mail_location
}
filters = [
# Directory not list in mutt
# relative paths from 'mail_location'
]
# mailboxes to hide, relative paths from mail_location
]
def get_addresses():
return sorted(os.listdir(mail_location))
def get_addresses(instance):
if not instance:
return sorted(os.listdir(mail_location))
return sorted(list(set(os.listdir(mail_location)) & set(types[instance])))
def get_maildirs(addresses):
@@ -31,4 +37,7 @@ def format(maildirs):
if __name__ == "__main__":
print format(get_maildirs(get_addresses()))
inst = None
if len(sys.argv) > 1:
inst = sys.argv[1]
print format(get_maildirs(get_addresses(inst)))