On Thu, 25 Jan 2001, Alex Pennace wrote:
>On Thu, Jan 25, 2001 at 05:47:48AM -0600, Matthew Patterson wrote:
>> I'm trying to make a Perl program that is called by the .qmail file for a
>> single account but recieves messages for several extension addresses. To
>> clarify, a single account, bob, will be recieving for bob-john, bob-jill, etc.
>> This program is supposed to database certain parts of the message, namely the
>> message body, the date the message was recieved, and the recipients. The most
>> important part of this is the recipient. These messages are support emails
>> going out to customers from an exchange (ugh!) server that will be Bcc'd to the
>> bob-whatever address. [...] I would prefer to
>> not have to write a program that I have to edit a single line of every time we
>> add a bob-whatever address, and the messages can only be sent to us via Bcc.
>> The way I understand qmail-command is that by the time the message gets sent
>> through whatever program the .qmail file calls, the envelope is gone, so
>> discerning the bob-whatever from there is not an option.
>
>Sure it is. The recipient address for that local delivery is stored in
>the environment variable RECIPIENT. Additionally if instructions for
>the delivery are in a .qmail-...-default file the part of the address
>covered by the -default wildcard is in the environment variable
>DEFAULT. See man qmail-command.
Sounds like just what I needed. The man page doesn't specify it the enviornment
variables are set locally to the program or are globally set, I assume local to
the program, but I want to make absolutely sure
--
***********************************
Matthew H Patterson
Unix Systems Administrator
National Support Center, LLC
Naperville, Illinois, USA
***********************************