From 277521fa187f0774a5bb46016adf97e6afd3a6c2 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 31 May 2015 17:14:19 +0100 Subject: [PATCH] Tell mail clients about my email addresses. For Gnus, * Set `message-dont-reply-to-names' (Gnus) and fiddle with `alternates' (Mutt) to prune other addresses from the `Cc' list. * Set `message-alternative-emails' (Gnus) and configure `reverse_name' and `use_envelope_from' (Mutt) so as to set the right sender and `From' address. --- dot/gnus-local.el.distorted | 10 ++++++++++ dot/muttrc | 2 ++ dot/muttrc.local.distorted | 11 +++++------ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/dot/gnus-local.el.distorted b/dot/gnus-local.el.distorted index e061cf3..3d8e1b8 100644 --- a/dot/gnus-local.el.distorted +++ b/dot/gnus-local.el.distorted @@ -50,6 +50,16 @@ (setq gnus-auto-expirable-newsgroups "^nnimap\\+distorted:\\(crap\\|spam\\|admin\\|lists\\|nag\\)\\..*") +;; My various email addresses. +(setq message-alternative-emails + (concat "^" + "\\(" "\\(mdw\\|markw\\|postmaster\\)" + "\\([-+][^@]*\\|\\)" + "@\\(distorted\\.org\\.uk\\|escorted\\.org\\.uk\\|odin\\.gg\\)" + "\\|" "distorted\\.mdw@g\\(oogle\\|\\)mail\\.com" + "\\)$") + message-dont-reply-to-names message-alternative-emails) + ;; Mail sent to `mdw-nospam-THING' should appear to come from this address. (setq gnus-posting-styles '(((and (string-match "^nnimap\\+distorted:crap\\.\\(.*\\)$" diff --git a/dot/muttrc b/dot/muttrc index 051b577..3d52faf 100644 --- a/dot/muttrc +++ b/dot/muttrc @@ -31,6 +31,8 @@ set autoedit=yes set edit_headers=yes set use_domain=no set record=+mail.sent +set use_envelope_from=yes +set reverse_name=yes ## Replies. set attribution="%n <%a> writes:\n" diff --git a/dot/muttrc.local.distorted b/dot/muttrc.local.distorted index eab2f08..b22323f 100644 --- a/dot/muttrc.local.distorted +++ b/dot/muttrc.local.distorted @@ -6,7 +6,7 @@ ### IMAP configuration. ## Local mail. -account-hook ^imap://mail\.distorted\.org\.uk \ +account-hook '^imap://mail\.distorted\.org\.uk' \ 'set imap_user=mdw; set imap_pass=$my_distorted_mail_passwd' set my_distorted_imap=imap://mail.distorted.org.uk/ set spoolfile=$my_distorted_imap @@ -14,7 +14,7 @@ set folder=$my_distorted_imap mailboxes $my_distorted_imap ## Google mail. -account-hook ^imaps://imap\.gmail\.com \ +account-hook '^imaps://imap\.gmail\.com' \ 'set imap_user=distorted.mdw@gmail.com; set imap_pass=$my_gmail_passwd' mailboxes imaps://imap.gmail.com/ @@ -29,11 +29,10 @@ set smtp_pass=$my_distorted_mail_passwd ### Other issues. alternates -group me \ - ^mdw([-+][^@]*|)@distorted\.org\.uk$ \ - ^(markw|mdw)([-+][^@]*|)@odin\.gg$ \ - ^distorted\.mdw@(google|g)mail\.com$ + '^(mdw|markw)([-+][^@]*|)@(distorted\.org\.uk|escorted\.org\.uk|odin\.gg)$' \ + '^distorted\.mdw@g(oogle|)mail\.com$' alternates -group admin \ - ^(root|postmaster|abuse)@distorted\.org\.uk$ + '^(root|postmaster|abuse)@(distorted\.org\.uk|escorted\.org\.uk|odin\.gg)$' \ ###----- That's all, folks -------------------------------------------------- -- 2.11.0