本文整理汇总了PHP中maincf_multi::mailman_transport方法的典型用法代码示例。如果您正苦于以下问题:PHP maincf_multi::mailman_transport方法的具体用法?PHP maincf_multi::mailman_transport怎么用?PHP maincf_multi::mailman_transport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maincf_multi
的用法示例。
在下文中一共展示了maincf_multi::mailman_transport方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_transport_maps
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");
}