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