Hey, folks.  Following up on this thread about better fcc handling,
Jesse passed on a simple python script he wrote that uses the python
"mailbox" module to deliver a message on stdin to a specified maildir
directory.  It's very a simple, elegant and general purpose script

I then put the following in my notmuch .emacs to use the new script in
message-mode to fcc sent mail to my ~/.mail/sent directory:

;; fcc handler
(defun maildir-deliver-region(destdir)
   (point-min) (point-max)
   (concat "maildir-deliver.py -c -s -d " destdir)))
(setq message-fcc-handler-function 'maildir-deliver-region)
(defun my-message-header-setup ()
  (message-add-header "Fcc: ~/.mail/sent"))
(add-hook 'message-send-hook 'my-message-header-setup)

Works like a charm.  Thanks Jesse!

I think we should look at packaging this in a set of notmuch helper
scripts, hopefully including notmuchsync.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maildir-deliver.py
Type: text/x-python
Size: 1090 bytes
Desc: python maildir delivery script

Reply via email to