Hi, if you've read mh-e list, you might have seen me trying to write elisp that
would tweak my headers when forwarding emails.  Specifically, I wanted a
single key that would forward mails to tripit or my fastmail (where
calendaring occurs for me).    After some thought while cycling, I realized I
was being dumb.  I should just invoke *dist*, and make sure Sender: is right.
(Turns out, it does the right thing, and gets upset if I insert my own...)

I had stopped using M-d aka mh-redistribute because it stopped working.
I think because it does not result in an updated Sender:, so SPF, DKIM, etc. 
fail.
Well, I haven't tried it lately.

But,

% dist -form fmcomps +inbox 179

with Mail/fmcomps having:

Resent-From: [email protected]
Resent-To: [email protected]
--------

does exactly what I want.

Only I have no reason to edit the outgoing draft, so I used:

% dist -nowhatnowproc -form fmcomps +inbox 179

but that does nothing.  I strace it, no call to mhbuild, no call to post.
No activity in /var/log/mail.log.

% dist -noedit ...
does what I expected, but I still have to type "send".

My mh-e code, btw:

(defun mcr-forward-to-fastmail () "Forwards current email to FastMail Account, 
no outbox"
       (interactive)
       (let ((msglist (mh-interactive-range "")))
         (mh-exec-cmd "dist" "-nowhatnowproc" "-form" "fmcomps" 
mh-current-folder msglist)))



--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
]     [email protected]  http://www.sandelman.ca/        |   ruby on rails    [



Attachment: signature.asc
Description: PGP signature

Reply via email to