[notmuch] keeping a copy of sent mail locally

Marten Veldthuis marten at veldthuis.com
Sun Dec 20 10:22:55 PST 2009


On Sat, 19 Dec 2009 21:02:18 -0800, Keith Packard <keithp at keithp.com> wrote:
> We actually want to let the user *select* an email address from the
> config file, and then automagically set the bcc: flag as
> appropriate. Without that, I'd end up bcc'ing all of my mail through my
> home address, which would end up sending work email unencrypted to my
> house. Sub-optimal

There's a message-send-hook, which we should probably use. Something
like:

  (add-hook 'message-send-hook 'notmuch-always-bcc-sender)
  (defun notmuch-always-bcc-sender ()
    (message-add-header (concat "Bcc: "
                                (message-fetch-field "From"))))

Though I've just scrabbled this together from the docs, I think it
should work (haven't tried it though).

-- 
- Marten


More information about the notmuch mailing list