dist with -nowhatnowproc

Michael Richardson <[email protected]> Mon, 22 Sep 2025 15:07:06 -0400
Newsgroups gmane.mail.nmh.devel
Message-ID <[email protected]>
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    [
signature.asc (application/pgp-signature, 487 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEbsyLEzg/qUTA43uogItw+93Q3WUFAmjRnloACgkQgItw+93Q
3WWd5QgAoQ3Wyi7bJAuUGOF0scCNPkdoyksLa4MnogY+TbBcknTam4g1Bmm9wERc
AOhQFpbzfyY/OBHoiCR8Te3BlYbOdvSNH7JGZz6wQ14QCr/QdixRW5xCBGwd2R5X
n14mxES20i8fRgqPQbJPJdpXn56UOi+kUElcDbrWmN5n/aGVthAumhz2T/eIO2D8
9R8IIA6Dg+/aq+gAMyh5BHjAl4zWTqhfVIVnTJdIyPAQFzkiMIjLqyMVMeejKa9A
/+A4m6cq/xeAXeEYrfNopaP2kZp6tLxpceAGXfScfrhrPuqDFDFleFjY82U4zkne
iEeZP7Go9QGmUovlFC4Imwz56WI90g==
=tRg3
-----END PGP SIGNATURE-----