analisi queue
METHOD=POST> tipo di coda:    campo di ricerca    chiave :   [ Inizia ricerca ]   [ >Restart ]
". "messaggio: ".$_REQUEST["kill_queue_uid"]. " cancellato !!!"; $result = shell_exec($cmdstr1); } ### analisi singolo queue_id #################################################################### if (isset($_REQUEST["queue_uid"])){ $cmdstr1 = "sudo /bin/cat /var/spool/mqueue/hf".$_REQUEST["queue_uid"]; $cmdstr2 = "sudo /bin/cat /var/spool/mqueue/df".$_REQUEST["queue_uid"]; echo "". "messaggio: ".$_REQUEST["queue_uid"]."". "   ". "delete from disk". "   ". "resend from queue". ""; echo "". "Analisi RAW headers

".
			shell_exec($cmdstr1).
		 	"".
			"Analisi RAW Body

".
			shell_exec($cmdstr2).
			"
"; } ### creazione lista queue ######################################################################## if (isset($_REQUEST["sendmail_type_queue"])){ $match1 = "|^(\S+)\s+(\d*)\s*(.+)<(.*)>$|i"; $match3 = "|^\s+<(.*)>$|i"; if ($_REQUEST["sendmail_type_queue"] == "quarantine"){ $cmdstr = "sudo /usr/bin/mailq -qQ "; $match2 = "|^\s+(QUARANTINE.*)$|i"; $color = "red"; } else { $cmdstr = "sudo /usr/bin/mailq -q -vv "; $match2 = "|^\s+\((.*)\)$|i"; $color = "green"; } if ($_REQUEST["key2"]){ switch ($_REQUEST["key1"]) { case "key1_uid": $cmdstr .= "-qI".$_REQUEST["key2"]; break; case "key1_sndr": $cmdstr .= "-qS".$_REQUEST["key2"]; break; case "key1_rcp": $cmdstr .= "-qR".$_REQUEST["key2"]; break; case "key1_qua": $cmdstr .= "-qQ".$_REQUEST["key2"]; break; } } $index=0; $fp = popen($cmdstr, 'r'); while ($line = fgets($fp, 4096)){ if (preg_match($match1,$line,$out)){ $index += 1; $id[$index] = $out[1]; $size[$index] = $out[2]; $date[$index] = $out[3]; $from[$index] = $out[4]; $rcp[$index] = ""; $msg[$index] = "undefined"; } if (preg_match($match2,$line,$out)){ $msg[$index] = $out[1]; } if (preg_match($match3,$line,$out)){ $rcp[$index] .= $out[1]." "; } } echo "". "-". "id". "mittente". "dim.". "data". "destinatari". "messaggio"; for ($i = 1; $i <= $index; $i++) { echo "". "".$i."". "".$id[$i]."". "".$from[$i]."". "".$size[$i]."". "".$date[$i]."". "".$rcp[$i]."". "".substr($msg[$i],0,60)."". ""; } } ?>