当前位置: 首页>>代码示例>>PHP>>正文


PHP clladp::CyrusPassword方法代码示例

本文整理汇总了PHP中clladp::CyrusPassword方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::CyrusPassword方法的具体用法?PHP clladp::CyrusPassword怎么用?PHP clladp::CyrusPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在clladp的用法示例。


在下文中一共展示了clladp::CyrusPassword方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: popup

function popup()
{
    $ldap = new clladp();
    $cyruspass = $ldap->CyrusPassword();
    $html = "<H1>{cyrus password}</H1>\n\t<div id='change_cyrus_password'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=1%><img src='img/cyrus-password-120.png'></td>\n\t\t<td valign='top'><p class=caption>{change_cyrus_password}</p>\n\t\t<br>" . RoundedLightWhite("\n\t\t\t<table style='width:99%'>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{password}:</td>\n\t\t\t\t<td>" . Field_password('cyruspassword', $cyruspass) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right'><hr><input type='button' Onclick=\"javascript:SaveCyrusPassword();\" value='{edit}&nbsp;'></td>\n\t\t\t</tr>\n\t\t</table>") . "\n\t\t</td>\n\t\t</tr>\n\t\t</table></div>";
    $tp = new templates();
    echo $tp->_ENGINE_parse_body($html, 'cyrus.index.php');
}
开发者ID:brucewu16899,项目名称:artica,代码行数:8,代码来源:cyrus.password.php

示例2: popup

function popup()
{
    $ldap = new clladp();
    $cyruspass = $ldap->CyrusPassword();
    $html = "\n\t<div id='change_cyrus_password' style='width:98%' class=form>\n\t<div class=text-info style='font-size:16px'>{change_cyrus_password}</div>\n\t<table style='width:99%'>\n\t<tr>\n\t<td class=legend style='font-size:16px'>{password}:</td>\n\t<td>" . Field_password('cyruspassword', $cyruspass, "font-size:16px") . "</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><hr>\n\t\t" . button("{apply}", "SaveCyrusPassword()", "22px") . "</td>\n\t</tr>\n\t</table>\n\t</div>";
    $tp = new templates();
    echo $tp->_ENGINE_parse_body($html, 'cyrus.index.php');
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:8,代码来源:cyrus.password.php

示例3: build_cyrus_lmtp_auth

function build_cyrus_lmtp_auth()
{
    $users = new usersMenus();
    $disable = false;
    if ($users->ZABBIX_INSTALLED) {
        $disable = true;
    } else {
        if (!$users->cyrus_imapd_installed) {
            $disable = true;
        }
    }
    if ($disable) {
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_auth_enable =no\" >/dev/null 2>&1");
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_password_maps =\" >/dev/null 2>&1");
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_security_options =\" >/dev/null 2>&1");
        return;
    }
    $sock = new sockets();
    $page = CurrentPageName();
    $CyrusEnableLMTPUnix = $sock->GET_INFO("CyrusEnableLMTPUnix");
    if ($CyrusEnableLMTPUnix == 1) {
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_auth_enable =no\" >/dev/null 2>&1");
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_password_maps =\" >/dev/null 2>&1");
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_security_options =\" >/dev/null 2>&1");
    } else {
        $ldap = new clladp();
        $CyrusLMTPListen = trim($sock->GET_INFO("CyrusLMTPListen"));
        $cyruspass = $ldap->CyrusPassword();
        @file_put_contents("/etc/postfix/lmtpauth", "{$CyrusLMTPListen}\tcyrus:{$cyruspass}");
        shell_exec("{$GLOBALS["postmap"]} hash:/etc/postfix/lmtpauth >/dev/null 2>&1");
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_auth_enable =yes\" >/dev/null 2>&1");
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_password_maps = hash:/etc/postfix/lmtpauth\" >/dev/null 2>&1");
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_mechanism_filter = plain, login\" >/dev/null 2>&1");
        shell_exec("{$GLOBALS["postconf"]} -e \"lmtp_sasl_security_options =\" >/dev/null 2>&1");
    }
}
开发者ID:brucewu16899,项目名称:artica,代码行数:36,代码来源:exec.postfix.hashtables.php

示例4: ChangeCyrusPassword

if (!CheckBranch()) {
    die;
}
CheckCyrusByDomains();
if (trim($username) == null) {
    writelogs("No username specified...", __FUNCTION__, __FILE__, __LINE__);
    die;
}
$ldap = new clladp();
if ($ldap->ldapFailed) {
    writelogs('Unable to logon to ldap server...', __FUNCTION__, __FILE__, __LINE__);
    die;
}
$users = new usersMenus();
$cyrus_text_password = $users->cyrus_ldap_admin_password;
$cyrus_password = $ldap->CyrusPassword();
if ($cyrus_password != $cyrus_text_password) {
    writelogs('Cyrus password did not match, modify it...', __FUNCTION__, __FILE__, __LINE__);
    if (!ChangeCyrusPassword("cyrus", $cyrus_text_password)) {
        return false;
    }
    $cyrus_password = $cyrus_text_password;
}
ChangeCyrusPassword($username, $cyrus_password);
UpdateMurderUser($cyrus_password);
function ChangeCyrusPassword($username, $password)
{
    $ldap = new clladp();
    if (strlen($password) == 0) {
        writelogs('ChangeCyrusPassword():: No password specified', __FUNCTION__, __FILE__, __LINE__);
        return false;
开发者ID:articatech,项目名称:artica,代码行数:31,代码来源:exec.check-cyrus-account.php

示例5: MailBoxTransport

function MailBoxTransport()
{
    $main = new maincf_multi();
    $sock = new sockets();
    $users = new usersMenus();
    $default = $main->getMailBoxTransport();
    system("{$GLOBALS["postconf"]} -e \"zarafa_destination_recipient_limit = 1\" >/dev/null 2>&1");
    system("{$GLOBALS["postconf"]} -e \"mailbox_transport = {$default}\" >/dev/null 2>&1");
    if (preg_match("#lmtp:(.+?):[0-9]+#", $default)) {
        if (!$users->ZARAFA_INSTALLED) {
            if (!$users->cyrus_imapd_installed) {
                disable_lmtp_sasl();
                return null;
            }
            echo "Starting......: Postfix LMTP is enabled {$default}\n";
            $ldap = new clladp();
            $CyrusLMTPListen = trim($sock->GET_INFO("CyrusLMTPListen"));
            $cyruspass = $ldap->CyrusPassword();
            @file_put_contents("/etc/postfix/lmtpauth", "{$CyrusLMTPListen}\tcyrus:{$cyruspass}");
            shell_exec("{$GLOBALS["postmap"]} hash:/etc/postfix/lmtpauth");
            system("{$GLOBALS["postconf"]} -e \"lmtp_sasl_auth_enable = yes\" >/dev/null 2>&1");
            system("{$GLOBALS["postconf"]} -e \"lmtp_sasl_password_maps = hash:/etc/postfix/lmtpauth\" >/dev/null 2>&1");
            system("{$GLOBALS["postconf"]} -e \"lmtp_sasl_mechanism_filter = plain, login\" >/dev/null 2>&1");
            system("{$GLOBALS["postconf"]} -e \"lmtp_sasl_security_options =\" >/dev/null 2>&1");
        }
    } else {
        disable_lmtp_sasl();
    }
}
开发者ID:brucewu16899,项目名称:artica,代码行数:29,代码来源:exec.postfix.maincf.php

示例6: MailBoxTransport

function MailBoxTransport()
{
    $main = new maincf_multi("master", "master");
    if (!isset($GLOBALS["CLASS_SOCKET"])) {
        $GLOBALS["CLASS_SOCKET"] = new sockets();
        $sock = $GLOBALS["CLASS_SOCKET"];
    } else {
        $sock = $GLOBALS["CLASS_SOCKET"];
    }
    if (!isset($GLOBALS["CLASS_USERS_MENUS"])) {
        $users = new usersMenus();
        $GLOBALS["CLASS_USERS_MENUS"] = $users;
    } else {
        $users = $GLOBALS["CLASS_USERS_MENUS"];
    }
    echo "Starting......: " . date("H:i:s") . " Postfix get mailbox transport\n";
    $mailbox_transport = trim($main->GET("mailbox_transport"));
    echo "Starting......: " . date("H:i:s") . " Postfix get mailbox transport = \"{$mailbox_transport}\"\n";
    if ($mailbox_transport != null) {
        postconf("mailbox_transport", $mailbox_transport);
        postconf("zarafa_destination_recipient_limit", 1);
        return;
    }
    $default = $main->getMailBoxTransport();
    if ($default == null) {
        postconf_X("mailbox_transport");
        postconf_X("virtual_transport");
        return;
    }
    postconf("zarafa_destination_recipient_limit", 1);
    echo "Starting......: " . date("H:i:s") . " Postfix mailbox_transport=`{$default}`\n";
    postconf("mailbox_transport", $default);
    postconf("virtual_transport", "\$mailbox_transport");
    postconf("local_transport", "local");
    postconf("lmtp_sasl_auth_enable", "no");
    postconf("lmtp_sasl_password_maps", "");
    postconf("lmtp_sasl_mechanism_filter", "plain, login");
    postconf("lmtp_sasl_security_options", null);
    if (!$users->ZARAFA_INSTALLED) {
        if (!$users->cyrus_imapd_installed) {
            echo "Starting......: " . date("H:i:s") . " Postfix None of Zarafa or cyrus imap installed on this server\n";
            return null;
        }
    }
    if (preg_match("#lmtp:(.+?):([0-9]+)#", $default, $re)) {
        echo "Starting......: " . date("H:i:s") . " Postfix \"LMTP\" is enabled ({$default})\n";
        $ldap = new clladp();
        $CyrusLMTPListen = $re[1] . ":" . $re[2];
        $cyruspass = $ldap->CyrusPassword();
        @file_put_contents("/etc/postfix/lmtpauth", "{$CyrusLMTPListen}\tcyrus:{$cyruspass}");
        shell_exec("{$GLOBALS["postmap"]} hash:/etc/postfix/lmtpauth");
        postconf("lmtp_sasl_auth_enable", "yes");
        postconf("lmtp_sasl_password_maps", "hash:/etc/postfix/lmtpauth");
        postconf("lmtp_sasl_mechanism_filter", "plain, login");
        postconf("lmtp_sasl_security_options", "noanonymous");
    }
}
开发者ID:articatech,项目名称:artica,代码行数:57,代码来源:exec.postfix.maincf.php

示例7: delete_mailbox

function delete_mailbox($user)
{
    $sock = new sockets();
    $cyradm = "cyrus";
    $CyrusEnableImapMurderedFrontEnd = $sock->GET_INFO("CyrusEnableImapMurderedFrontEnd");
    if ($CyrusEnableImapMurderedFrontEnd == 1) {
        shell_exec("/usr/share/artica-postfix/bin/artica-install --delete-mailbox {$user}");
        return;
    }
    $ldap = new clladp();
    $cyruspass = $ldap->CyrusPassword();
    if (preg_match("#(.+?)@(.+)#", $user, $re)) {
        $cyradm = "{$cyradm}@{$re[2]}";
        $user = $re[1];
    }
    $cmd = "/usr/share/artica-postfix/bin/cyrus-admin.pl -u cyrus -p \"{$cyruspass}\" -m \"{$user}\" --delete 2>&1";
    exec($cmd, $results);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:18,代码来源:exec.cyrus.php


注:本文中的clladp::CyrusPassword方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。