unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: "Dan Čermák" <dan.cermak@posteo.net>
To: alan.schmitt@polytechnique.org, notmuch <notmuch@notmuchmail.org>
Subject: Re: changing smtp server and signature depending on from address
Date: Wed, 20 Apr 2022 10:15:29 +0000	[thread overview]
Message-ID: <87r15s6oxq.fsf@cgc-instruments.com> (raw)
In-Reply-To: <87czhcgks1.fsf@m4x.org>

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\r

  reply	other threads:[~2022-04-20 10:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  9:35 changing smtp server and signature depending on from address alan.schmitt
2022-04-20 10:15 ` Dan Čermák [this message]
2022-04-20 12:37   ` Alan Schmitt
2022-04-25 22:14 ` João Pedro
2022-04-26  5:54   ` Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r15s6oxq.fsf@cgc-instruments.com \
    --to=dan.cermak@posteo.net \
    --cc=alan.schmitt@polytechnique.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).