4 $LOG_FILE = '/tmp/catch_mail.log';
7 if ($argv[1] == '-c') {
8 if (file_exists($LOG_FILE)) {
15 $stdin = fopen('php://stdin', 'r');
19 while (!feof($stdin)) {
20 $line = rtrim(fgets($stdin), "\n\r");
29 elseif (preg_match('/^(\w+):.*/', $line, $matches)) {
30 switch (strtolower($matches[1])) {
41 $fp = fopen($LOG_FILE, 'w');