The man pages in qmail (\man8\qmail-command.html) says that "qmail-local supplies several useful environment variables to command", like SENDER, RECIPIENT and RPLINE. I have successfully captured a message from stdin, but can't seem to be able to capture these environment variables qmail is said to supply. My stupid newbie logic came up with something like...
$qmail_vars = array("SENDER" => "$ENV[SENDER]", "RECIPIENT" => "$ENV[RECIPIENT]", "RPLINE" => "$_ENV[RPLINE]");
... but all variables turn out empty. Does anybody have any experience with that?
My main problem is that I want to be able to parse the messages that come from qmail, but they are too unpredictable. Messages sent by me always look the same, but when they come from others the number and position of lines in the header can be different. I am foreseeing a lot of headache trying to handle them appropriately. Anybody has any useful idea?
Thank you very much,
Luciano ES
Santos, SP - Brasil