[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Ralph Corderoy
Subject: Re: [Nmh-workers] Multi-homed postproc, v2
Date: Sun, 15 Mar 2015 16:33:17 +0000

Hi Ken,

> > Using undocumented options and calling post directly seems wrong.
> > Checking arguments for -whom tedious.  Perhaps this is the occasion
> > when an environment variable can easily be used to check we've
> > recursed?
> You mean, set an environment variable in your OWN postproc before you
> call the real post(8) and check to see if it has been set at the
> beginning of the script?

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.

> 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.

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.

Cheers, Ralph.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]