Environmental variables that Kiwi sets The Kiwi spam-protection program sets environmental variables in order to help facilitate it working with other processes. When used as a wrapper for outgoing mail, the environmental variable KIWI_STATUS is given the value of "OUTGOING" (without the quotes). When used as a filter for incoming data, the following environmental variables are set: * KIWI_FROM The environmental variable KIWI_FROM is given the email address that the incoming message is from. This is derermined from the mail headers as follows: 1. If there is a Reply-To: header, set the value to the email address visible in the Reply-To: header. 2. Otherwise, if there is a From: header, then set the value to the email address visible in the From: header. Note that it is trivial to forge this value. * KIWI_STATUS The environmental variable KIWI_STATUS tells the child process whether the message is going out from the sender to the internet, coming in from the internet, or if the message is being bounced. 1. If the message is going out to the internet, KIWI_STATUS has a value of OUTGOING. 2. If the message is coming in from the interent, KIWI_STATUS has a value of INCOMING. 3. If a bounce message is being sent to someone who sent mail to an invalid Kiwi cookie, KIWI_STATUS has a value of BOUNCING. * KIWI_DATATYPE The environmental variable KIWI_DATATYPE tells the child process the kind of data the decoded cookie has. This can have the following values: SHORT TIMEOUT MID TIMEOUT LONG TIMEOUT 28BIT IP BLOCK HIDDEN DIR FIVE LETTERS GOOD PASSWORD BAD PARITY INVALID * KIWI_DATA The environmental variable KIWI_DATA tells the child process the kind of data the decoded cookie has. Depending on the value of KIWI_DATATYPE, this will have the following values: 1. "SHORT TIMEOUT", "MID TIMEOUT", or "LONG TIMEOUT" If the data is one of these three types, then the data will be a single number: A timestampe of when the cookie was sent out, in a form of the number of seconds since the epoch (Jan 1, 1970, midnight GMT). For example: "972688017" or "176001069". 2. "28BIT IP BLOCK" If the data is of this datatype, then the data will be, in standard dotted notation, the lowest numbered ip of the /28 network in question. In other words, if the original ip was 1.2.3.25, this will have the value of "1.2.3.16". 3. "FIVE LETTERS" If the data is of this datatype, then the data will be the five-letter message in question. Example: "rdhat". 4. "GOOD PASSWORD" If the data is of this datatype, then the data will be the password in question. 5. "BAD PARITY" If the data is of this datatype, then the data will contain "N/A". 6. "INVALID" and "HIDDEN DIR" If the data is one of these data types, then the data will be undefined