Reviving a thread fromt the qmailadmin list a couple months back.  Looks
like this particular topic really belongs on the vchkpw list...

on 7/19/05 10:34 PM, Kurt Bigler <[EMAIL PROTECTED]> wrote:

> on 7/19/05 9:20 AM, Tom Collins <[EMAIL PROTECTED]> wrote:
>> An external delivery program could use
>> vuserinfo to see which flags are set, and act accordingly.  We could
>> even modify vdelivermail to set environment variables with those names,
>> in addition to setting all of the typical environment variables
>> typically set by qmail-local.
> Yes, I'd love to see an environment variable.

Tom mentioned (above) the possibility of modifying vdelivermail to make the
4 user flags available via environment variables.

Is this something that has any possibility of becoming a current priority?

I took a quick look at the 5.4.10 source to see if I could make any sense
out of it, in case I can help with this.  Please check the following to see
if I'm on target in my thinking.

It looks like vdelivermail currently does not do any manipulation of the
enviornment, but just lets what qmail set up be passed on to the commands it
invokes in its own .qmail files.

It looks like the flag info is readily available via the pw_flags field of
the vpw global.

So I think it is just a matter of calling putenv based on the flag info from
vpw.  I'm guessing this should be done after the fork and prior to the execv
in run_command.

A protocol would need to be decided on regarding the use of environment
variable(s) for this.  Should anything besides the user flags be included in
this?  Should there be separate environment variables for each flag?  Should
each flag be detected by the presence of the variable, or by a 0/1 value?
Or should a single environment variable be used for the entire pw_flags

I don't know if I'll have time to work on this, but I'd like to get the
thinking started in any case.  Maybe Tom or someone has already thought
through this.

Kurt Bigler

Reply via email to