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.

Reply via email to