function build_transport_maps() { if (!isset($GLOBALS["transport_maps_AT"])) { $GLOBALS["transport_maps_AT"] = array(); } $main = new maincf_multi("master", "master"); $main->bann_destination_domains(); $users = new usersMenus(); $CountDeMailMan = 0; if (!is_file("/etc/postfix/transport.throttle")) { @file_put_contents("/etc/postfix/transport.throttle", " "); } if (!is_array($GLOBALS["transport_maps"])) { shell_exec("{$GLOBALS["postconf"]} -e \"transport_maps = hash:/etc/postfix/transport.throttle\" >/dev/null 2>&1"); } if ($users->MAILMAN_INSTALLED) { $GLOBALS["transport_maps"] = $main->mailman_transport($GLOBALS["transport_maps"]); } while (list($num, $ligne) = each($GLOBALS["transport_maps"])) { if ($ligne == null) { continue; } $array[] = "{$num}\t{$ligne}"; } echo "Starting......: " . date("H:i:s") . " Postfix " . count($array) . " routings rules\n"; if (count($GLOBALS["transport_maps_AT"]) > 0) { while (list($num, $ligne) = each($GLOBALS["transport_maps_AT"])) { if ($ligne == null) { continue; } $array[] = "{$num}\t{$ligne}"; } } if ($users->MAILMAN_INSTALLED) { shell_exec("{$GLOBALS["postconf"]} -e \"mailman_destination_recipient_limit = 1\" >/dev/null 2>&1"); } @file_put_contents("/etc/postfix/transport", implode("\n", $array)); shell_exec("{$GLOBALS["postmap"]} hash:/etc/postfix/transport >/dev/null 2>&1"); shell_exec("{$GLOBALS["postmap"]} hash:/etc/postfix/transport.throttle >/dev/null 2>&1"); shell_exec("{$GLOBALS["postconf"]} -e \"transport_maps = hash:/etc/postfix/transport.throttle, hash:/etc/postfix/transport, hash:/etc/postfix/transport.banned,hash:/etc/postfix/copy.transport\" >/dev/null 2>&1"); }