nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Multi-homed postproc, v2

2015-03-15 15:39:45
Almost, set it at the start of one's own postproc before calling *whom*
to format the draft's addresses, and then calling the original post to
do the real work.

I'd think you want to do that for everything, just to cover other odd
cases where recursion might happen ... but, whatever.

But it occurs to me ... should switches like -whom (and -dist, and
-idanno, and all of the others) really be undocumented?  Maybe it's
tedious to check the arguments ... but you only have to write that
code once.

Well, the documentation either needs to explain that some nmh commands
that one's postproc might use can cause another invocation of post, and
thus postproc, and so recursion needs to be prevented, or document
whom's use of post and its -whom so when writing postproc and using whom
I can see why I've been caught out.

The documentation for send(1) is clear; the documentation for whom(1) sort
of hints at it, but doesn't really spell it out (it does mention post(8)
and postproc).  Are there other "hidden" uses?

Will it ever be useful for a user's postproc to be called on the
internal hidden uses of post rather than the public one the user
intends?  Maybe nmh should avoid calling postproc on these occasions
rather than every user having to stub their toe and discover the rock,
e.g. by an environment variable.

Well ... are these uses hidden?  I could maybe see some other programs
that want to use -idanno.  And it's not like dist(1) is hidden, but the
implementation details might not be obvious.  I mean, clearly it was
intended that people be able to supply their own postproc, so having
those switches documented would make sense.  What's the point of having
them undocumented, really?

For the curious ... -idanno is used by send(1) when annotations are in
use.  The argument to -idanno is the number of a file descriptor opened
by the caller; post(8) will write to this file a series of lines designating
the recipients of the message.  send(1) will then read this file and use
each line to add it to the annotation header in the message being replied
to, redistributed, forwarded, or something else that is not obvious to me.
So, for example, if you wanted to know every receipient of a message
AFTER it's been sent, you could read that file in your custom postproc.
Might be useful?

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>