diff options
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/thread.py | 4 | ||||
-rw-r--r-- | alot/defaults/alot.rc.spec | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 3dff6855..b6e91c47 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -64,8 +64,8 @@ def determine_sender(mail, action='reply'): # Process the headers in order of importance: if a mail was sent with # account X, with account Y in e.g. CC or delivered-to, make sure that # account X is the one selected and not account Y. - for candidate_header in ['From', 'To', 'Cc', 'Envelope-To', - 'X-Envelope-To', 'Delivered-To']: + candidate_headers = settings.get("determine_reply_account_from_headers") + for candidate_header in candidate_headers: if realname is not None: break candidate_addresses = getaddresses(mail.get_all(candidate_header, [])) diff --git a/alot/defaults/alot.rc.spec b/alot/defaults/alot.rc.spec index 0967bf4f..5c8bcd07 100644 --- a/alot/defaults/alot.rc.spec +++ b/alot/defaults/alot.rc.spec @@ -229,7 +229,13 @@ prefer_plaintext = boolean(default=False) # messages in that thread. msg_summary_hides_threadwide_tags = boolean(default=True) -# Key bindings +# The list of headers to match to determine sending account for a reply. +# Headers are searched in the order in which they are specified here, and the first match +# is used. If multiple accounts match the same header, the one defined first in the account +# block is used. +determine_reply_account_from_headers = force_list(default=list(From,To,Cc,Envelope-To,X-Envelope-To,Delivered-To)) + +# Key bindings [bindings] __many__ = string(default=None) [[___many___]] |