コード例 #1
0
function relay_recipient_maps_build()
{
    $relay_recipient_maps = null;
    if (!isset($GLOBALS["LDAPDBS"])) {
        $GLOBALS["LDAPDBS"] = array();
    }
    if (!isset($GLOBALS["LDAPDBS"]["relay_recipient_maps"])) {
        $GLOBALS["LDAPDBS"]["relay_recipient_maps"] = array();
    }
    $relay_recipient_maps_by_transport = relay_recipient_maps_by_transport();
    $postdbs = new postfix_extern();
    $postdbData = $postdbs->build_extern("master", "relay_recipient_maps");
    if ($postdbData != null) {
        $GLOBALS["LDAPDBS"]["relay_recipient_maps"][] = $postdbData;
    }
    if ($relay_recipient_maps_by_transport != null) {
        $GLOBALS["LDAPDBS"]["relay_recipient_maps"][] = $relay_recipient_maps_by_transport;
    }
    if (count($GLOBALS["LDAPDBS"]["relay_recipient_maps"]) > 0) {
        $relay_recipient_maps = @implode(",", $GLOBALS["LDAPDBS"]["relay_recipient_maps"]);
    }
    shell_exec("{$GLOBALS["postconf"]} -e \"relay_recipient_maps = {$relay_recipient_maps}\" >/dev/null 2>&1");
}
コード例 #2
0
function DUMP_EXTERNALS_DBS()
{
    $dbmaps = new postfix_extern();
    while (list($type, $numeric) = each($dbmaps->classTypes)) {
        echo "DUMP class master:: {$type} [{$numeric}]:\n";
        $contz = $dbmaps->build_extern("master", $type);
        echo "Result: `{$contz}`\n";
    }
}