diff options
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/thread.py | 10 | ||||
-rw-r--r-- | alot/defaults/alot.rc.spec | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 21e2721b..3c9c9658 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -119,7 +119,7 @@ class ReplyCommand(Command): :type message: `alot.db.message.Message` :param all: group reply; copies recipients from Bcc/Cc/To to the reply :type all: bool - :param listreply: reply to list + :param listreply: reply to list; autodetect if unset and enabled in config :type listreply: bool :param spawn: force spawning of editor in a new terminal :type spawn: bool @@ -166,6 +166,11 @@ class ReplyCommand(Command): subject = rsp + subject envelope.add('Subject', subject) + # Auto-detect ML + auto_replyto_mailinglist = settings.get('auto_replyto_mailinglist') + if auto_replyto_mailinglist and mail['List-Id']: + self.listreply = True + # set From-header and sending account try: from_header, account = determine_sender(mail, 'reply') @@ -229,7 +234,8 @@ class ReplyCommand(Command): to = mail['To'] logging.debug('mail list reply to: %s' % to) # Cleaning the 'To' in this case - envelope.__delitem__('To') + if envelope.get('To') is not None: + envelope.__delitem__('To') # Finally setup the 'To' header envelope.add('To', decode_header(to)) diff --git a/alot/defaults/alot.rc.spec b/alot/defaults/alot.rc.spec index 4efc7b4a..cf4fb6de 100644 --- a/alot/defaults/alot.rc.spec +++ b/alot/defaults/alot.rc.spec @@ -209,6 +209,9 @@ followup_to = boolean(default=False) # The list of addresses associated to the mailinglists you are subscribed to mailinglists = force_list(default=list()) +# Automatically switch to list reply mode if appropriate +auto_replyto_mailinglist = boolean(default=False) + # prefer plaintext alternatives over html content in multipart/alternative prefer_plaintext = boolean(default=False) |