Nur für Dovecot Benutzer (Version >= 1.1)
Im englischsprachigen Bereich wurde gefragt ob man im GUI irgendwo die Mailbox Quota einstellen kann.
Da das nicht geht hab ich es mal gehend gemacht.
Hier mein HowTo dazu:
öffne /var/www/ispcp/gui/reseller/domain_edit.php:
nach:
Code:
require '../include/ispcp-lib.php';
einfügen:
Code:
include '../include/ispcp-mailquota.php
nähe Zeile 69 nach:
Code:
'TR_DISK' => tr('Disk limit [MB] <br /><i>(0 unlimited)</i>'),
einfügen:
Code:
'TR_MAIL_QUOTA' => tr('Mailbox Quota [MB]'),
Zeile 229 ändern von:
in
Code:
GLOBAL $username, $mailquota;
bei Zeile 282 nach:
Code:
'VL_DOM_DISK' => $disk,
einfügen:
Code:
'VL_MAIL_QUOTA' => $mailquota,
öffne /var/www/ispcp/gui/themes/omega_original/reseller/domain_edit.tpl
nach:
Code:
<tr>
<td width="25"> </td>
<td class="content2" width="193">{TR_MAIL_ACCOUNT}</td>
<td class="content"><input type="text" name="dom_mail_acCount" value="{VL_DOM_MAIL_ACCOUNT}" style="width:100px" class="textinput">
</td>
</tr>
einfügen:
Code:
<tr>
<td width="25"> </td>
<td class="content2" width="193">{TR_MAIL_QUOTA}</td>
<td class="content"><input type="text" name="mailboxquota" value="{VL_MAIL_QUOTA}" style="width:100px" class="textinput"></td>
</td>
</tr>
neue Datei erstellen /var/www/ispcp/gui/includes/ispcp-mailquota.php
Inhalt:
Code:
<?php
/**
* ispCP ω (OMEGA) a Virtual Hosting Control System
*
* @copyright 2001-2006 by moleSoftware GmbH
* @copyright 2006-2008 by ispCP | http://isp-control.net
* @version SVN: $ID$
* @link http://isp-control.net
* @author ispCP Team
*
* @license
* This program is free software; you can redistribute it and/or modify it under
* the terms of the MPL General Public License as published by the Free Software
* Foundation; either version 1.1 of the License, or (at your option) any later
* version.
* You should have received a copy of the MPL Mozilla Public License along with
* this program; if not, write to the Open Source Initiative (OSI)
* http://opensource.org | osi@opensource.org
*/
/** Connect to Database */
$dbUser="root"; // Database Username
$dbPass=""; // Database Password
$dbHost="localhost"; // Database Server
$dbName="ispcp"; // Database
$connect = @mysql_connect($dbHost, $dbUser, $dbPass) or die("Could not connect to Database-Server!");
$selectDB = @mysql_select_db($dbName, $connect) or die("Could not select <b>$dbName</b>!");
/** Read Mailbox Quota */
if(isset($_GET['edit_id']))
{
$id=$_GET['edit_id'];
$sql="SELECT `quota` FROM `mail_users` WHERE `domain_id` = '".$id."' LIMIT 1;";
$handle = mysql_query($sql);
$result=mysql_fetch_object($handle);
$mailquota = $result->quota/1024/1024;
mysql_close();
}
/** Write Mailbox Quota */
if(isset($_POST['Submit']))
{
$_POST['mailboxquota'] = $_POST['mailboxquota'] * 1024 * 1024;
$sql0="UPDATE `mail_users` SET `quota` = '".$_POST['mailboxquota']."' WHERE `domain_id` = '".$_SESSION['edit_id']."';";
$result = mysql_query($sql0);
mysql_close();
}
?>
Evtl. kann jemand helfen damit der Connect-Bereich aus der Datei raus kann. (include '../ich/weiss/nicht/welches/file.php'