summaryrefslogtreecommitdiff
path: root/alot/account.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-09-25 20:22:30 +0200
committerRuben Pollan <meskio@sindominio.net>2017-09-26 08:49:16 +0200
commit7cd3cff8d858e411f8d84361d5a4bc6133c86d0e (patch)
tree61a9af9ac906185aa61581f0919c830dc87730d7 /alot/account.py
parent5904b86d09edb888c80f8f8ba7f1b2e18baf456a (diff)
commands/util: encrypt to self
Add account configuration variable 'encrypt_to_self' that if true when encrypting a message it will also be encrypted with the key defined for this account. Fixes #1140
Diffstat (limited to 'alot/account.py')
-rw-r--r--alot/account.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/alot/account.py b/alot/account.py
index b1223902..a4ce439a 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -190,6 +190,8 @@ class Account(object):
"""regex matching alternative addresses"""
realname = None
"""real name used to format from-headers"""
+ encrypt_to_self = None
+ """encrypt outgoing encrypted emails to this account's private key"""
gpg_key = None
"""gpg fingerprint for this account's private key"""
signature = None
@@ -207,8 +209,8 @@ class Account(object):
signature_filename=None, signature_as_attachment=False,
sent_box=None, sent_tags=None, draft_box=None,
draft_tags=None, abook=None, sign_by_default=False,
- encrypt_by_default=u"none", case_sensitive_username=False,
- **_):
+ encrypt_by_default=u"none", encrypt_to_self=None,
+ case_sensitive_username=False, **_):
sent_tags = sent_tags or []
if 'sent' not in sent_tags:
sent_tags.append('sent')
@@ -221,6 +223,7 @@ class Account(object):
for a in (aliases or [])]
self.alias_regexp = alias_regexp
self.realname = realname
+ self.encrypt_to_self = encrypt_to_self
self.gpg_key = gpg_key
self.signature = signature
self.signature_filename = signature_filename