Re: changing smtp server and signature depending on from address

Subject: Re: changing smtp server and signature depending on from address

Date: Wed, 20 Apr 2022 10:15:29 +0000

To: alan.schmitt@polytechnique.org, notmuch

Cc:

From: Dan Čermák


Hi Alan,

alan.schmitt@polytechnique.org writes:

> Hello,
>
> I use several email addresses, and I would like to customize the smtp
> server and the signature I use for each of them. Is there a notmuch way
> of doing this? I’ve looked at
> https://www.emacswiki.org/emacs/SendingMail#SmtpMail and I see that I
> can set a particular header to set the smtp server, but I don’t know if
> there is a feature like gnus posting styles in notmuch.

I use gnus-alias for something like that:
--8<---------------cut here---------------start------------->8---
(use-package gnus-alias
  :ensure t
  :after notmuch
  :commands (gnus-alias-determine-identity)
  :hook ((message-setup . gnus-alias-determine-identity))
  :bind (:map notmuch-message-mode-map
              ("C-c i" . gnus-alias-select-identity))
  :config
  (setq
   gnus-alias-default-identity "default"
   gnus-alias-overlay-identities t
   gnus-alias-override-user-mail-address t
   gnus-alias-identity-alist
   '(("default"
      nil ;; Does not refer to any other identity
      "Dan Čermák <*snip*>" ;; From Header
      nil ;; Organization header
      (("Fcc" . "*snip*/sent-mail")) ;; List of extra headers
      nil ;; No extra body text
      nil ;; Signature
      )
     ("posteo"
      nil
      "Dan Čermák <dan.cermak@posteo.net>"
      nil
      (("Fcc" . "posteo/Sent"))
      nil
      nil
      ))

   gnus-alias-identity-rules
   '(("personal-redacted" ("any" "snip*" both) "default")
     ("personal-posteo" ("any" "dan.cermak@posteo.net" both) "posteo"))))
--8<---------------cut here---------------end--------------->8---


Hope this helps,

Dan
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: