Some changes in functions
parent
1587c73dad
commit
4146cec3b9
|
@ -259,7 +259,7 @@ if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "adm
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "user")) {
|
elseif (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "user")) {
|
||||||
if (isset($_GET['syncjob'])) {
|
if (isset($_GET['syncjob'])) {
|
||||||
?>
|
?>
|
||||||
<h4><?=$lang['add']['syncjob'];?></h4>
|
<h4><?=$lang['add']['syncjob'];?></h4>
|
||||||
|
@ -305,6 +305,18 @@ if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "use
|
||||||
<input type="number" class="form-control" name="mins_interval" min="10" max="3600" value="20" required>
|
<input type="number" class="form-control" name="mins_interval" min="10" max="3600" value="20" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-2" for="subfolder2"><?=$lang['edit']['subfolder2'];?></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="subfolder2" id="subfolder2" value="External">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-2" for="maxage"><?=$lang['edit']['maxage'];?></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="number" class="form-control" name="maxage" id="maxage" min="0" max="32000" value="0">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-sm-2" for="exclude"><?=$lang['add']['exclude'];?></label>
|
<label class="control-label col-sm-2" for="exclude"><?=$lang['add']['exclude'];?></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
|
|
|
@ -517,7 +517,7 @@ if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "adm
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "user")) {
|
elseif (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "user")) {
|
||||||
if (isset($_GET['syncjob']) &&
|
if (isset($_GET['syncjob']) &&
|
||||||
is_numeric($_GET["syncjob"]) &&
|
is_numeric($_GET["syncjob"]) &&
|
||||||
filter_var($_SESSION['mailcow_cc_username'], FILTER_VALIDATE_EMAIL)) {
|
filter_var($_SESSION['mailcow_cc_username'], FILTER_VALIDATE_EMAIL)) {
|
||||||
|
@ -582,6 +582,18 @@ if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "use
|
||||||
<input type="number" class="form-control" name="mins_interval" min="10" max="3600" value="<?=htmlspecialchars($result['mins_interval'], ENT_QUOTES, 'UTF-8');?>" required>
|
<input type="number" class="form-control" name="mins_interval" min="10" max="3600" value="<?=htmlspecialchars($result['mins_interval'], ENT_QUOTES, 'UTF-8');?>" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-2" for="subfolder2"><?=$lang['edit']['subfolder2'];?></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="subfolder2" id="subfolder2" value="<?=htmlspecialchars($result['subfolder2'], ENT_QUOTES, 'UTF-8');?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-2" for="maxage"><?=$lang['edit']['maxage'];?></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="number" class="form-control" name="maxage" id="maxage" value="<?=htmlspecialchars($result['maxage'], ENT_QUOTES, 'UTF-8');?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-sm-2" for="exclude"><?=$lang['edit']['exclude'];?></label>
|
<label class="control-label col-sm-2" for="exclude"><?=$lang['edit']['exclude'];?></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -232,10 +232,14 @@ endif;
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (isset($_SESSION['mailcow_cc_username'])):
|
if (!isset($_SESSION["dual-login"]) && isset($_SESSION['mailcow_cc_username'])):
|
||||||
?>
|
?>
|
||||||
<li><a style="border-left:1px solid #E7E7E7" href="#" onclick="logout.submit()"><?=sprintf($lang['header']['logged_in_as_logout'], $_SESSION['mailcow_cc_username']);?></a></li>
|
<li><a style="border-left:1px solid #E7E7E7" href="#" onclick="logout.submit()"><?=sprintf($lang['header']['logged_in_as_logout'], $_SESSION['mailcow_cc_username']);?></a></li>
|
||||||
<?php
|
<?php
|
||||||
|
elseif (isset($_SESSION["dual-login"])):
|
||||||
|
?>
|
||||||
|
<li><a style="border-left:1px solid #E7E7E7" href="#" onclick="logout.submit()"><?=sprintf($lang['header']['logged_in_as_logout_dual'], $_SESSION['mailcow_cc_username'], $_SESSION["dual-login"]["username"]);?></a></li>
|
||||||
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,120 +1,125 @@
|
||||||
CREATE TABLE IF NOT EXISTS `admin` (
|
CREATE TABLE IF NOT EXISTS `admin` (
|
||||||
`username` varchar(255) NOT NULL,
|
`username` VARCHAR(255) NOT NULL,
|
||||||
`password` varchar(255) NOT NULL,
|
`password` VARCHAR(255) NOT NULL,
|
||||||
`superadmin` tinyint(1) NOT NULL DEFAULT '0',
|
`superadmin` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`created` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`created` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`modified` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`modified` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`active` tinyint(1) NOT NULL DEFAULT '1',
|
`active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||||
PRIMARY KEY (`username`)
|
PRIMARY KEY (`username`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `alias` (
|
CREATE TABLE IF NOT EXISTS `alias` (
|
||||||
`address` varchar(255) NOT NULL,
|
`address` VARCHAR(255) NOT NULL,
|
||||||
`goto` text NOT NULL,
|
`goto` TEXT NOT NULL,
|
||||||
`domain` varchar(255) NOT NULL,
|
`domain` VARCHAR(255) NOT NULL,
|
||||||
`created` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`created` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`modified` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`modified` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`active` tinyint(1) NOT NULL DEFAULT '1',
|
`active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||||
PRIMARY KEY (`address`),
|
PRIMARY KEY (`address`),
|
||||||
KEY `domain` (`domain`)
|
KEY `domain` (`domain`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `sender_acl` (
|
CREATE TABLE IF NOT EXISTS `sender_acl` (
|
||||||
`logged_in_as` varchar(255) NOT NULL,
|
`logged_in_as` VARCHAR(255) NOT NULL,
|
||||||
`send_as` varchar(255) NOT NULL
|
`send_as` VARCHAR(255) NOT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `spamalias` (
|
CREATE TABLE IF NOT EXISTS `spamalias` (
|
||||||
`address` varchar(255) NOT NULL,
|
`address` VARCHAR(255) NOT NULL,
|
||||||
`goto` text NOT NULL,
|
`goto` TEXT NOT NULL,
|
||||||
`validity` int(11) NOT NULL,
|
`validity` INT(11) NOT NULL,
|
||||||
PRIMARY KEY (`address`)
|
PRIMARY KEY (`address`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `alias_domain` (
|
CREATE TABLE IF NOT EXISTS `alias_domain` (
|
||||||
`alias_domain` varchar(255) NOT NULL,
|
`alias_domain` VARCHAR(255) NOT NULL,
|
||||||
`target_domain` varchar(255) NOT NULL,
|
`target_domain` VARCHAR(255) NOT NULL,
|
||||||
`created` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`created` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`modified` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`modified` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`active` tinyint(1) NOT NULL DEFAULT '1',
|
`active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||||
PRIMARY KEY (`alias_domain`),
|
PRIMARY KEY (`alias_domain`),
|
||||||
KEY `active` (`active`),
|
KEY `active` (`active`),
|
||||||
KEY `target_domain` (`target_domain`)
|
KEY `target_domain` (`target_domain`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `domain` (
|
CREATE TABLE IF NOT EXISTS `domain` (
|
||||||
`domain` varchar(255) NOT NULL,
|
`domain` VARCHAR(255) NOT NULL,
|
||||||
`description` varchar(255),
|
`description` VARCHAR(255),
|
||||||
`aliases` int(10) NOT NULL DEFAULT '0',
|
`aliases` INT(10) NOT NULL DEFAULT '0',
|
||||||
`mailboxes` int(10) NOT NULL DEFAULT '0',
|
`mailboxes` INT(10) NOT NULL DEFAULT '0',
|
||||||
`maxquota` bigint(20) NOT NULL DEFAULT '0',
|
`maxquota` BIGINT(20) NOT NULL DEFAULT '0',
|
||||||
`quota` bigint(20) NOT NULL DEFAULT '0',
|
`quota` BIGINT(20) NOT NULL DEFAULT '0',
|
||||||
`transport` varchar(255) NOT NULL,
|
`transport` VARCHAR(255) NOT NULL,
|
||||||
`backupmx` tinyint(1) NOT NULL DEFAULT '0',
|
`backupmx` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`relay_all_recipients` tinyint(1) NOT NULL DEFAULT '0',
|
`relay_all_recipients` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`created` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`created` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`modified` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`modified` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`active` tinyint(1) NOT NULL DEFAULT '1',
|
`active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||||
PRIMARY KEY (`domain`)
|
PRIMARY KEY (`domain`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `domain_admins` (
|
CREATE TABLE IF NOT EXISTS `domain_admins` (
|
||||||
`username` varchar(255) NOT NULL,
|
`username` VARCHAR(255) NOT NULL,
|
||||||
`domain` varchar(255) NOT NULL,
|
`domain` VARCHAR(255) NOT NULL,
|
||||||
`created` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`created` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`active` tinyint(1) NOT NULL DEFAULT '1',
|
`active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||||
KEY `username` (`username`)
|
KEY `username` (`username`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `mailbox` (
|
CREATE TABLE IF NOT EXISTS `mailbox` (
|
||||||
`username` varchar(255) NOT NULL,
|
`username` VARCHAR(255) NOT NULL,
|
||||||
`password` varchar(255) NOT NULL,
|
`password` VARCHAR(255) NOT NULL,
|
||||||
`name` varchar(255),
|
`name` VARCHAR(255),
|
||||||
`maildir` varchar(255) NOT NULL,
|
`maildir` VARCHAR(255) NOT NULL,
|
||||||
`quota` bigint(20) NOT NULL DEFAULT '0',
|
`quota` BIGINT(20) NOT NULL DEFAULT '0',
|
||||||
`local_part` varchar(255) NOT NULL,
|
`local_part` VARCHAR(255) NOT NULL,
|
||||||
`domain` varchar(255) NOT NULL,
|
`domain` VARCHAR(255) NOT NULL,
|
||||||
`created` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`created` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`modified` datetime NOT NULL DEFAULT '2016-01-01 00:00:00',
|
`modified` DATETIME NOT NULL DEFAULT '2016-01-01 00:00:00',
|
||||||
`tls_enforce_in` tinyint(1) NOT NULL DEFAULT '0',
|
`tls_enforce_in` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`tls_enforce_out` tinyint(1) NOT NULL DEFAULT '0',
|
`tls_enforce_out` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`kind` varchar(100) NOT NULL DEFAULT '',
|
`kind` VARCHAR(100) NOT NULL DEFAULT '',
|
||||||
`multiple_bookings` tinyint(1) NOT NULL DEFAULT '0',
|
`multiple_bookings` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`wants_tagged_subject` tinyint(1) NOT NULL DEFAULT '0',
|
`wants_tagged_subject` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`active` tinyint(1) NOT NULL DEFAULT '1',
|
`active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||||
PRIMARY KEY (`username`),
|
PRIMARY KEY (`username`),
|
||||||
KEY `domain` (`domain`)
|
KEY `domain` (`domain`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `quota2` (
|
CREATE TABLE IF NOT EXISTS `quota2` (
|
||||||
`username` varchar(100) NOT NULL,
|
`username` VARCHAR(100) NOT NULL,
|
||||||
`bytes` bigint(20) NOT NULL DEFAULT '0',
|
`bytes` BIGINT(20) NOT NULL DEFAULT '0',
|
||||||
`messages` int(11) NOT NULL DEFAULT '0',
|
`messages` INT(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`username`)
|
PRIMARY KEY (`username`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `filterconf` (
|
CREATE TABLE IF NOT EXISTS `filterconf` (
|
||||||
`object` varchar(100) NOT NULL DEFAULT '',
|
`object` VARCHAR(100) NOT NULL DEFAULT '',
|
||||||
`option` varchar(50) NOT NULL DEFAULT '',
|
`option` VARCHAR(50) NOT NULL DEFAULT '',
|
||||||
`value` varchar(100) NOT NULL DEFAULT '',
|
`value` VARCHAR(100) NOT NULL DEFAULT '',
|
||||||
`prefid` int(11) NOT NULL AUTO_INCREMENT,
|
`prefid` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
PRIMARY KEY (`prefid`),
|
PRIMARY KEY (`prefid`),
|
||||||
KEY `object` (`object`)
|
KEY `object` (`object`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `imapsync` (
|
CREATE TABLE IF NOT EXISTS `imapsync` (
|
||||||
`id` int NOT NULL AUTO_INCREMENT,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`user2` varchar(255) NOT NULL,
|
`user2` VARCHAR(255) NOT NULL,
|
||||||
`host1` varchar(255) NOT NULL,
|
`host1` VARCHAR(255) NOT NULL,
|
||||||
`authmech1` ENUM('PLAIN','LOGIN','CRAM-MD5') DEFAULT 'PLAIN',
|
`authmech1` ENUM('PLAIN','LOGIN','CRAM-MD5') DEFAULT 'PLAIN',
|
||||||
`user1` varchar(255) NOT NULL,
|
`regextrans2` VARCHAR(255) DEFAULT '',
|
||||||
`password1` varchar(255) NOT NULL,
|
`authmd51` TINYINT(1) NOT NULL DEFAULT 0,
|
||||||
|
`domain2` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
|
`subfolder2` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
|
`user1` VARCHAR(255) NOT NULL,
|
||||||
|
`password1` VARCHAR(255) NOT NULL,
|
||||||
`exclude` VARCHAR(500) NOT NULL DEFAULT '',
|
`exclude` VARCHAR(500) NOT NULL DEFAULT '',
|
||||||
`mins_interval` VARCHAR(50) NOT NULL,
|
`maxage` SMALLINT NOT NULL DEFAULT '0',
|
||||||
|
`mins_INTerval` VARCHAR(50) NOT NULL,
|
||||||
`port1` SMALLINT NOT NULL,
|
`port1` SMALLINT NOT NULL,
|
||||||
`enc1` ENUM('TLS','SSL','PLAIN') DEFAULT 'TLS',
|
`enc1` ENUM('TLS','SSL','PLAIN') DEFAULT 'TLS',
|
||||||
`delete2duplicates` TINYINT(1) NOT NULL DEFAULT '1',
|
`delete2duplicates` TINYINT(1) NOT NULL DEFAULT '1',
|
||||||
`returned_text` TEXT,
|
`returned_TEXT` TEXT,
|
||||||
`last_run` TIMESTAMP NULL DEFAULT NULL,
|
`last_run` TIMESTAMP NULL DEFAULT NULL,
|
||||||
`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
@ -143,80 +148,80 @@ SELECT username, IFNULL(GROUP_CONCAT(local_part, '@', alias_domain SEPARATOR ' '
|
||||||
LEFT OUTER JOIN alias_domain on target_domain=domain GROUP BY username;
|
LEFT OUTER JOIN alias_domain on target_domain=domain GROUP BY username;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS sogo_acl (
|
CREATE TABLE IF NOT EXISTS sogo_acl (
|
||||||
c_folder_id integer NOT NULL,
|
c_folder_id INTeger NOT NULL,
|
||||||
c_object character varying(255) NOT NULL,
|
c_object character varying(255) NOT NULL,
|
||||||
c_uid character varying(255) NOT NULL,
|
c_uid character varying(255) NOT NULL,
|
||||||
c_role character varying(80) NOT NULL
|
c_role character varying(80) NOT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS sogo_alarms_folder (
|
CREATE TABLE IF NOT EXISTS sogo_alarms_folder (
|
||||||
c_path varchar(255) NOT NULL,
|
c_path VARCHAR(255) NOT NULL,
|
||||||
c_name varchar(255) NOT NULL,
|
c_name VARCHAR(255) NOT NULL,
|
||||||
c_uid varchar(255) NOT NULL,
|
c_uid VARCHAR(255) NOT NULL,
|
||||||
c_recurrence_id int(11) DEFAULT NULL,
|
c_recurrence_id INT(11) DEFAULT NULL,
|
||||||
c_alarm_number int(11) NOT NULL,
|
c_alarm_number INT(11) NOT NULL,
|
||||||
c_alarm_date int(11) NOT NULL
|
c_alarm_date INT(11) NOT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS sogo_cache_folder (
|
CREATE TABLE IF NOT EXISTS sogo_cache_folder (
|
||||||
c_uid varchar(255) NOT NULL,
|
c_uid VARCHAR(255) NOT NULL,
|
||||||
c_path varchar(255) NOT NULL,
|
c_path VARCHAR(255) NOT NULL,
|
||||||
c_parent_path varchar(255) DEFAULT NULL,
|
c_parent_path VARCHAR(255) DEFAULT NULL,
|
||||||
c_type tinyint(3) unsigned NOT NULL,
|
c_type TINYINT(3) unsigned NOT NULL,
|
||||||
c_creationdate int(11) NOT NULL,
|
c_creationdate INT(11) NOT NULL,
|
||||||
c_lastmodified int(11) NOT NULL,
|
c_lastmodified INT(11) NOT NULL,
|
||||||
c_version int(11) NOT NULL DEFAULT '0',
|
c_version INT(11) NOT NULL DEFAULT '0',
|
||||||
c_deleted tinyint(4) NOT NULL DEFAULT '0',
|
c_deleted TINYINT(4) NOT NULL DEFAULT '0',
|
||||||
c_content longtext,
|
c_content longTEXT,
|
||||||
PRIMARY KEY (c_uid,c_path)
|
PRIMARY KEY (c_uid,c_path)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS sogo_folder_info (
|
CREATE TABLE IF NOT EXISTS sogo_folder_info (
|
||||||
c_folder_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
c_folder_id BIGINT(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
c_path varchar(255) NOT NULL,
|
c_path VARCHAR(255) NOT NULL,
|
||||||
c_path1 varchar(255) NOT NULL,
|
c_path1 VARCHAR(255) NOT NULL,
|
||||||
c_path2 varchar(255) DEFAULT NULL,
|
c_path2 VARCHAR(255) DEFAULT NULL,
|
||||||
c_path3 varchar(255) DEFAULT NULL,
|
c_path3 VARCHAR(255) DEFAULT NULL,
|
||||||
c_path4 varchar(255) DEFAULT NULL,
|
c_path4 VARCHAR(255) DEFAULT NULL,
|
||||||
c_foldername varchar(255) NOT NULL,
|
c_foldername VARCHAR(255) NOT NULL,
|
||||||
c_location integer NULL,
|
c_location INTeger NULL,
|
||||||
c_quick_location varchar(2048) DEFAULT NULL,
|
c_quick_location VARCHAR(2048) DEFAULT NULL,
|
||||||
c_acl_location varchar(2048) DEFAULT NULL,
|
c_acl_location VARCHAR(2048) DEFAULT NULL,
|
||||||
c_folder_type varchar(255) NOT NULL,
|
c_folder_type VARCHAR(255) NOT NULL,
|
||||||
PRIMARY KEY (c_path),
|
PRIMARY KEY (c_path),
|
||||||
UNIQUE KEY c_folder_id (c_folder_id)
|
UNIQUE KEY c_folder_id (c_folder_id)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS sogo_quick_appointment (
|
CREATE TABLE IF NOT EXISTS sogo_quick_appoINTment (
|
||||||
c_folder_id integer NOT NULL,
|
c_folder_id INTeger NOT NULL,
|
||||||
c_name character varying(255) NOT NULL,
|
c_name character varying(255) NOT NULL,
|
||||||
c_uid character varying(255) NOT NULL,
|
c_uid character varying(255) NOT NULL,
|
||||||
c_startdate integer,
|
c_startdate INTeger,
|
||||||
c_enddate integer,
|
c_enddate INTeger,
|
||||||
c_cycleenddate integer,
|
c_cycleenddate INTeger,
|
||||||
c_title character varying(1000) NOT NULL,
|
c_title character varying(1000) NOT NULL,
|
||||||
c_participants text,
|
c_participants TEXT,
|
||||||
c_isallday integer,
|
c_isallday INTeger,
|
||||||
c_iscycle integer,
|
c_iscycle INTeger,
|
||||||
c_cycleinfo text,
|
c_cycleinfo TEXT,
|
||||||
c_classification integer NOT NULL,
|
c_classification INTeger NOT NULL,
|
||||||
c_isopaque integer NOT NULL,
|
c_isopaque INTeger NOT NULL,
|
||||||
c_status integer NOT NULL,
|
c_status INTeger NOT NULL,
|
||||||
c_priority integer,
|
c_priority INTeger,
|
||||||
c_location character varying(255),
|
c_location character varying(255),
|
||||||
c_orgmail character varying(255),
|
c_orgmail character varying(255),
|
||||||
c_partmails text,
|
c_partmails TEXT,
|
||||||
c_partstates text,
|
c_partstates TEXT,
|
||||||
c_category character varying(255),
|
c_category character varying(255),
|
||||||
c_sequence integer,
|
c_sequence INTeger,
|
||||||
c_component character varying(10) NOT NULL,
|
c_component character varying(10) NOT NULL,
|
||||||
c_nextalarm integer,
|
c_nextalarm INTeger,
|
||||||
c_description text,
|
c_description TEXT,
|
||||||
CONSTRAINT sogo_quick_appointment_pkey PRIMARY KEY (c_folder_id, c_name)
|
CONSTRAINT sogo_quick_appoINTment_pkey PRIMARY KEY (c_folder_id, c_name)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS sogo_quick_contact (
|
CREATE TABLE IF NOT EXISTS sogo_quick_contact (
|
||||||
c_folder_id integer NOT NULL,
|
c_folder_id INTeger NOT NULL,
|
||||||
c_name character varying(255) NOT NULL,
|
c_name character varying(255) NOT NULL,
|
||||||
c_givenname character varying(255),
|
c_givenname character varying(255),
|
||||||
c_cn character varying(255),
|
c_cn character varying(255),
|
||||||
|
@ -233,28 +238,28 @@ CREATE TABLE IF NOT EXISTS sogo_quick_contact (
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS sogo_sessions_folder (
|
CREATE TABLE IF NOT EXISTS sogo_sessions_folder (
|
||||||
c_id varchar(255) NOT NULL,
|
c_id VARCHAR(255) NOT NULL,
|
||||||
c_value varchar(255) NOT NULL,
|
c_value VARCHAR(255) NOT NULL,
|
||||||
c_creationdate int(11) NOT NULL,
|
c_creationdate INT(11) NOT NULL,
|
||||||
c_lastseen int(11) NOT NULL,
|
c_lastseen INT(11) NOT NULL,
|
||||||
PRIMARY KEY (c_id)
|
PRIMARY KEY (c_id)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS sogo_store (
|
CREATE TABLE IF NOT EXISTS sogo_store (
|
||||||
c_folder_id integer NOT NULL,
|
c_folder_id INTeger NOT NULL,
|
||||||
c_name character varying(255) NOT NULL,
|
c_name character varying(255) NOT NULL,
|
||||||
c_content mediumtext NOT NULL,
|
c_content mediumTEXT NOT NULL,
|
||||||
c_creationdate integer NOT NULL,
|
c_creationdate INTeger NOT NULL,
|
||||||
c_lastmodified integer NOT NULL,
|
c_lastmodified INTeger NOT NULL,
|
||||||
c_version integer NOT NULL,
|
c_version INTeger NOT NULL,
|
||||||
c_deleted integer,
|
c_deleted INTeger,
|
||||||
CONSTRAINT sogo_store_pkey PRIMARY KEY (c_folder_id, c_name)
|
CONSTRAINT sogo_store_pkey PRIMARY KEY (c_folder_id, c_name)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS sogo_user_profile (
|
CREATE TABLE IF NOT EXISTS sogo_user_profile (
|
||||||
c_uid varchar(255) NOT NULL,
|
c_uid VARCHAR(255) NOT NULL,
|
||||||
c_defaults text,
|
c_defaults TEXT,
|
||||||
c_settings text,
|
c_settings TEXT,
|
||||||
PRIMARY KEY (c_uid)
|
PRIMARY KEY (c_uid)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,17 @@
|
||||||
//ini_set("session.cookie_httponly", 1);
|
//ini_set("session.cookie_httponly", 1);
|
||||||
session_start();
|
session_start();
|
||||||
if (isset($_POST["logout"])) {
|
if (isset($_POST["logout"])) {
|
||||||
session_unset();
|
if (isset($_SESSION["dual-login"])) {
|
||||||
session_destroy();
|
$_SESSION["mailcow_cc_username"] = $_SESSION["dual-login"]["username"];
|
||||||
session_write_close();
|
$_SESSION["mailcow_cc_role"] = $_SESSION["dual-login"]["role"];
|
||||||
setcookie(session_name(),'',0,'/');
|
unset($_SESSION["dual-login"]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
session_unset();
|
||||||
|
session_destroy();
|
||||||
|
session_write_close();
|
||||||
|
setcookie(session_name(),'',0,'/');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once 'inc/vars.inc.php';
|
require_once 'inc/vars.inc.php';
|
||||||
|
@ -75,4 +82,4 @@ require_once 'lang/lang.en.php';
|
||||||
include 'lang/lang.'.$_SESSION['mailcow_locale'].'.php';
|
include 'lang/lang.'.$_SESSION['mailcow_locale'].'.php';
|
||||||
require_once 'inc/functions.inc.php';
|
require_once 'inc/functions.inc.php';
|
||||||
require_once 'inc/triggers.inc.php';
|
require_once 'inc/triggers.inc.php';
|
||||||
init_db_schema();
|
(!isset($_SESSION['mailcow_cc_username'])) ? init_db_schema() : null;
|
||||||
|
|
|
@ -25,6 +25,20 @@ if (isset($_POST["login_user"]) && isset($_POST["pass_user"])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admin") {
|
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admin") {
|
||||||
|
if (isset($_GET["duallogin"])) {
|
||||||
|
if (filter_var($_GET["duallogin"], FILTER_VALIDATE_EMAIL)) {
|
||||||
|
$stmt = $pdo->prepare("SELECT `username` FROM `mailbox` WHERE `username` = :duallogin");
|
||||||
|
$stmt->execute(array(':duallogin' => $_GET["duallogin"]));
|
||||||
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
|
if ($num_results != 0) {
|
||||||
|
$_SESSION["dual-login"]["username"] = $_SESSION['mailcow_cc_username'];
|
||||||
|
$_SESSION["dual-login"]["role"] = $_SESSION['mailcow_cc_role'];
|
||||||
|
$_SESSION['mailcow_cc_username'] = $_GET["duallogin"];
|
||||||
|
$_SESSION['mailcow_cc_role'] = "user";
|
||||||
|
header("Location: /user.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (isset($_POST["trigger_set_admin"])) {
|
if (isset($_POST["trigger_set_admin"])) {
|
||||||
set_admin_account($_POST);
|
set_admin_account($_POST);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,9 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
|
})
|
||||||
// Show generate button after time selection
|
// Show generate button after time selection
|
||||||
$('#trigger_set_time_limited_aliases').hide();
|
$('#trigger_set_time_limited_aliases').hide();
|
||||||
$('#validity').change(function(){
|
$('#validity').change(function(){
|
||||||
|
@ -29,6 +32,6 @@ $(document).ready(function() {
|
||||||
// Log modal
|
// Log modal
|
||||||
$('#logModal').on('show.bs.modal', function(e) {
|
$('#logModal').on('show.bs.modal', function(e) {
|
||||||
var logText = $(e.relatedTarget).data('log-text');
|
var logText = $(e.relatedTarget).data('log-text');
|
||||||
$(e.currentTarget).find('#logText').html('<pre>' + logText + '</pre>');
|
$(e.currentTarget).find('#logText').html('<pre style="background:none;font-size:11px;line-height:1.1;border:0px">' + logText + '</pre>');
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -66,7 +66,7 @@ $lang['danger']['is_alias'] = '%s lautet bereits eine Alias-Adresse';
|
||||||
$lang['danger']['is_alias_or_mailbox'] = "Eine Mailbox oder ein Alias mit der Adresse %s ist bereits vorhanden";
|
$lang['danger']['is_alias_or_mailbox'] = "Eine Mailbox oder ein Alias mit der Adresse %s ist bereits vorhanden";
|
||||||
$lang['danger']['is_spam_alias'] = '%s lautet bereits eine Spam-Alias-Adresse';
|
$lang['danger']['is_spam_alias'] = '%s lautet bereits eine Spam-Alias-Adresse';
|
||||||
$lang['danger']['quota_not_0_not_numeric'] = 'Speicherplatz muss numerisch und >= 0 sein';
|
$lang['danger']['quota_not_0_not_numeric'] = 'Speicherplatz muss numerisch und >= 0 sein';
|
||||||
$lang['danger']['domain_not_found'] = 'Domain nicht gefunden.';
|
$lang['danger']['domain_not_found'] = 'Domain "%s" nicht gefunden.';
|
||||||
$lang['danger']['max_mailbox_exceeded'] = 'Anzahl an Mailboxen überschritten (%d von %d)';
|
$lang['danger']['max_mailbox_exceeded'] = 'Anzahl an Mailboxen überschritten (%d von %d)';
|
||||||
$lang['danger']['mailbox_quota_exceeded'] = 'Speicherplatz überschreitet das Limit (max. %d MiB)';
|
$lang['danger']['mailbox_quota_exceeded'] = 'Speicherplatz überschreitet das Limit (max. %d MiB)';
|
||||||
$lang['danger']['mailbox_quota_left_exceeded'] = 'Nicht genügend Speicherplatz vorhanden (Speicherplatz anwendbar: %d MiB)';
|
$lang['danger']['mailbox_quota_left_exceeded'] = 'Nicht genügend Speicherplatz vorhanden (Speicherplatz anwendbar: %d MiB)';
|
||||||
|
@ -102,6 +102,7 @@ $lang['user']['did_you_know'] = '<b>Wussten Sie schon?</b> Sie können Ihre E-Ma
|
||||||
$lang['user']['spam_aliases'] = 'Temporäre E-Mail Aliasse';
|
$lang['user']['spam_aliases'] = 'Temporäre E-Mail Aliasse';
|
||||||
$lang['user']['alias'] = 'Alias';
|
$lang['user']['alias'] = 'Alias';
|
||||||
$lang['user']['aliases'] = 'Aliasse';
|
$lang['user']['aliases'] = 'Aliasse';
|
||||||
|
$lang['user']['domain_aliases'] = 'Domain-Alias Adressen';
|
||||||
$lang['user']['is_catch_all'] = 'Ist Catch-All Adresse für Domain(s)';
|
$lang['user']['is_catch_all'] = 'Ist Catch-All Adresse für Domain(s)';
|
||||||
$lang['user']['aliases_also_send_as'] = 'Darf außerdem versenden als';
|
$lang['user']['aliases_also_send_as'] = 'Darf außerdem versenden als';
|
||||||
$lang['user']['aliases_send_as_all'] = 'Absender für folgende Domains nicht prüfen';
|
$lang['user']['aliases_send_as_all'] = 'Absender für folgende Domains nicht prüfen';
|
||||||
|
@ -163,6 +164,7 @@ $lang['user']['active'] = 'Aktiv';
|
||||||
$lang['user']['action'] = 'Aktion';
|
$lang['user']['action'] = 'Aktion';
|
||||||
$lang['user']['edit'] = 'Bearbeiten';
|
$lang['user']['edit'] = 'Bearbeiten';
|
||||||
$lang['user']['remove'] = 'Entfernen';
|
$lang['user']['remove'] = 'Entfernen';
|
||||||
|
$lang['user']['delete_now'] = 'Sofort löschen';
|
||||||
$lang['user']['create_syncjob'] = 'Neuen Sync-Job erstellen';
|
$lang['user']['create_syncjob'] = 'Neuen Sync-Job erstellen';
|
||||||
|
|
||||||
$lang['start']['dashboard'] = '%s - Dashboard';
|
$lang['start']['dashboard'] = '%s - Dashboard';
|
||||||
|
@ -194,6 +196,7 @@ $lang['header']['mailboxes'] = 'Mailboxen';
|
||||||
$lang['header']['user_settings'] = 'Benutzereinstellungen';
|
$lang['header']['user_settings'] = 'Benutzereinstellungen';
|
||||||
$lang['header']['login'] = 'Anmeldung';
|
$lang['header']['login'] = 'Anmeldung';
|
||||||
$lang['header']['logged_in_as_logout'] = 'Eingeloggt als <b>%s</b> (abmelden)';
|
$lang['header']['logged_in_as_logout'] = 'Eingeloggt als <b>%s</b> (abmelden)';
|
||||||
|
$lang['header']['logged_in_as_logout_dual'] = 'Eingeloggt als <b>%s <span class="text-info">[%s]</span></b>';
|
||||||
$lang['header']['locale'] = 'Sprache';
|
$lang['header']['locale'] = 'Sprache';
|
||||||
$lang['mailbox']['domain'] = 'Domain';
|
$lang['mailbox']['domain'] = 'Domain';
|
||||||
$lang['mailbox']['alias'] = 'Alias';
|
$lang['mailbox']['alias'] = 'Alias';
|
||||||
|
@ -220,7 +223,7 @@ $lang['mailbox']['msg_num'] = 'Anzahl Nachrichten';
|
||||||
$lang['mailbox']['remove'] = 'Entfernen';
|
$lang['mailbox']['remove'] = 'Entfernen';
|
||||||
$lang['mailbox']['edit'] = 'Bearbeiten';
|
$lang['mailbox']['edit'] = 'Bearbeiten';
|
||||||
$lang['mailbox']['archive'] = 'Archiv-Zugriff';
|
$lang['mailbox']['archive'] = 'Archiv-Zugriff';
|
||||||
$lang['mailbox']['no_record'] = 'Kein Eintrag';
|
$lang['mailbox']['no_record'] = 'Kein Eintrag für Objekt %s';
|
||||||
$lang['mailbox']['add_domain'] = 'Domain hinzufügen';
|
$lang['mailbox']['add_domain'] = 'Domain hinzufügen';
|
||||||
$lang['mailbox']['add_domain_alias'] = 'Domain-Alias hinzufügen';
|
$lang['mailbox']['add_domain_alias'] = 'Domain-Alias hinzufügen';
|
||||||
$lang['mailbox']['add_mailbox'] = 'Mailbox hinzufügen';
|
$lang['mailbox']['add_mailbox'] = 'Mailbox hinzufügen';
|
||||||
|
@ -247,6 +250,8 @@ $lang['edit']['save'] = 'Änderungen speichern';
|
||||||
$lang['edit']['username'] = 'Benutzername';
|
$lang['edit']['username'] = 'Benutzername';
|
||||||
$lang['edit']['hostname'] = 'Servername';
|
$lang['edit']['hostname'] = 'Servername';
|
||||||
$lang['edit']['encryption'] = 'Verschlüsselungsmethode';
|
$lang['edit']['encryption'] = 'Verschlüsselungsmethode';
|
||||||
|
$lang['edit']['maxage'] = 'Maximales Alter in Tagen einer Nachricht, die kopiert werden soll</br ><small>(0 = alle Nachrichten kopieren)</small>';
|
||||||
|
$lang['edit']['subfolder2'] = 'Ziel-Ordner<br /><small>(leer = kein Unterordner)</small>';
|
||||||
$lang['edit']['mins_interval'] = 'Intervall (min)';
|
$lang['edit']['mins_interval'] = 'Intervall (min)';
|
||||||
$lang['edit']['exclude'] = 'Elemente ausschließen (Regex)';
|
$lang['edit']['exclude'] = 'Elemente ausschließen (Regex)';
|
||||||
$lang['edit']['archive'] = 'Archiv-Zugriff';
|
$lang['edit']['archive'] = 'Archiv-Zugriff';
|
||||||
|
@ -292,6 +297,8 @@ $lang['add']['syncjob_hint'] = 'Passwörter werden unverschlüsselt abgelegt!';
|
||||||
$lang['add']['hostname'] = 'Servername';
|
$lang['add']['hostname'] = 'Servername';
|
||||||
$lang['add']['username'] = 'Benutzername';
|
$lang['add']['username'] = 'Benutzername';
|
||||||
$lang['add']['enc_method'] = 'Verschlüsselungsmethode';
|
$lang['add']['enc_method'] = 'Verschlüsselungsmethode';
|
||||||
|
$lang['add']['maxage'] = 'Maximum age of messages that will be polled from remote (0 = ignore age)';
|
||||||
|
$lang['add']['subfolder2'] = 'Sync into subfolder on destination';
|
||||||
$lang['add']['mins_interval'] = 'Abrufintervall (Minuten)';
|
$lang['add']['mins_interval'] = 'Abrufintervall (Minuten)';
|
||||||
$lang['add']['exclude'] = 'Elemente ausschließen (Regex)';
|
$lang['add']['exclude'] = 'Elemente ausschließen (Regex)';
|
||||||
$lang['add']['delete2duplicates'] = 'Lösche Duplikate im Ziel';
|
$lang['add']['delete2duplicates'] = 'Lösche Duplikate im Ziel';
|
||||||
|
|
|
@ -104,6 +104,7 @@ $lang['user']['did_you_know'] = '<b>Did you know?</b> You can use tags in your e
|
||||||
$lang['user']['spam_aliases'] = 'Temporary email aliases';
|
$lang['user']['spam_aliases'] = 'Temporary email aliases';
|
||||||
$lang['user']['alias'] = 'Alias';
|
$lang['user']['alias'] = 'Alias';
|
||||||
$lang['user']['aliases'] = 'Aliases';
|
$lang['user']['aliases'] = 'Aliases';
|
||||||
|
$lang['user']['domain_aliases'] = 'Domain alias addresses';
|
||||||
$lang['user']['is_catch_all'] = 'Catch-all for domain/s';
|
$lang['user']['is_catch_all'] = 'Catch-all for domain/s';
|
||||||
$lang['user']['aliases_also_send_as'] = 'Also allowed to send as';
|
$lang['user']['aliases_also_send_as'] = 'Also allowed to send as';
|
||||||
$lang['user']['aliases_send_as_all'] = 'Do not check sender access for following domain/s';
|
$lang['user']['aliases_send_as_all'] = 'Do not check sender access for following domain/s';
|
||||||
|
@ -165,6 +166,7 @@ $lang['user']['active'] = 'Active';
|
||||||
$lang['user']['action'] = 'Action';
|
$lang['user']['action'] = 'Action';
|
||||||
$lang['user']['edit'] = 'Edit';
|
$lang['user']['edit'] = 'Edit';
|
||||||
$lang['user']['remove'] = 'Remove';
|
$lang['user']['remove'] = 'Remove';
|
||||||
|
$lang['user']['delete_now'] = 'Remove now';
|
||||||
$lang['user']['create_syncjob'] = 'Create new sync job';
|
$lang['user']['create_syncjob'] = 'Create new sync job';
|
||||||
|
|
||||||
$lang['start']['dashboard'] = '%s - dashboard';
|
$lang['start']['dashboard'] = '%s - dashboard';
|
||||||
|
@ -196,6 +198,7 @@ $lang['header']['mailboxes'] = 'Mailboxes';
|
||||||
$lang['header']['user_settings'] = 'User settings';
|
$lang['header']['user_settings'] = 'User settings';
|
||||||
$lang['header']['login'] = 'Login';
|
$lang['header']['login'] = 'Login';
|
||||||
$lang['header']['logged_in_as_logout'] = 'Logged in as <b>%s</b> (logout)';
|
$lang['header']['logged_in_as_logout'] = 'Logged in as <b>%s</b> (logout)';
|
||||||
|
$lang['header']['logged_in_as_logout_dual'] = 'Logged in as <b>%s <span class="text-info">[%s]</span></b>';
|
||||||
$lang['header']['locale'] = 'Language';
|
$lang['header']['locale'] = 'Language';
|
||||||
$lang['mailbox']['domain'] = 'Domain';
|
$lang['mailbox']['domain'] = 'Domain';
|
||||||
$lang['mailbox']['alias'] = 'Alias';
|
$lang['mailbox']['alias'] = 'Alias';
|
||||||
|
@ -222,7 +225,7 @@ $lang['mailbox']['msg_num'] = 'Message #';
|
||||||
$lang['mailbox']['remove'] = 'Remove';
|
$lang['mailbox']['remove'] = 'Remove';
|
||||||
$lang['mailbox']['edit'] = 'Edit';
|
$lang['mailbox']['edit'] = 'Edit';
|
||||||
$lang['mailbox']['archive'] = 'Archive';
|
$lang['mailbox']['archive'] = 'Archive';
|
||||||
$lang['mailbox']['no_record'] = 'No Record';
|
$lang['mailbox']['no_record'] = 'No Record for object %s';
|
||||||
$lang['mailbox']['add_domain'] = 'Add domain';
|
$lang['mailbox']['add_domain'] = 'Add domain';
|
||||||
$lang['mailbox']['add_domain_alias'] = 'Add domain alias';
|
$lang['mailbox']['add_domain_alias'] = 'Add domain alias';
|
||||||
$lang['mailbox']['add_mailbox'] = 'Add mailbox';
|
$lang['mailbox']['add_mailbox'] = 'Add mailbox';
|
||||||
|
@ -249,6 +252,8 @@ $lang['edit']['save'] = 'Save changes';
|
||||||
$lang['edit']['username'] = 'Save changes';
|
$lang['edit']['username'] = 'Save changes';
|
||||||
$lang['edit']['hostname'] = 'Hostname';
|
$lang['edit']['hostname'] = 'Hostname';
|
||||||
$lang['edit']['encryption'] = 'Encryption';
|
$lang['edit']['encryption'] = 'Encryption';
|
||||||
|
$lang['edit']['maxage'] = 'Maximum age of messages in days that will be polled from remote<br /><small>(0 = ignore age)</small>';
|
||||||
|
$lang['edit']['subfolder2'] = 'Sync into subfolder on destination<br /><small>(empty = do not use subfolder)</small>';
|
||||||
$lang['edit']['mins_interval'] = 'Interval (min)';
|
$lang['edit']['mins_interval'] = 'Interval (min)';
|
||||||
$lang['edit']['exclude'] = 'Exclude objects (regex)';
|
$lang['edit']['exclude'] = 'Exclude objects (regex)';
|
||||||
$lang['edit']['save'] = 'Save changes';
|
$lang['edit']['save'] = 'Save changes';
|
||||||
|
@ -296,6 +301,8 @@ $lang['add']['hostname'] = 'Hostname';
|
||||||
$lang['add']['username'] = 'Username';
|
$lang['add']['username'] = 'Username';
|
||||||
$lang['add']['enc_method'] = 'Encryption method';
|
$lang['add']['enc_method'] = 'Encryption method';
|
||||||
$lang['add']['mins_interval'] = 'Polling interval (minutes)';
|
$lang['add']['mins_interval'] = 'Polling interval (minutes)';
|
||||||
|
$lang['add']['maxage'] = 'Maximum age of messages that will be polled from remote (0 = ignore age)';
|
||||||
|
$lang['add']['subfolder2'] = 'Sync into subfolder on destination';
|
||||||
$lang['add']['exclude'] = 'Exclude objects (regex)';
|
$lang['add']['exclude'] = 'Exclude objects (regex)';
|
||||||
$lang['add']['delete2duplicates'] = 'Delete duplicates on destination';
|
$lang['add']['delete2duplicates'] = 'Delete duplicates on destination';
|
||||||
|
|
||||||
|
|
|
@ -49,80 +49,32 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
try {
|
$domains = mailbox_get_domains();
|
||||||
$stmt = $pdo->prepare("SELECT
|
if (!empty($domains)):
|
||||||
`domain`,
|
foreach ($domains as $domain):
|
||||||
`aliases`,
|
$domaindata = mailbox_get_domain_details($domain);
|
||||||
`mailboxes`,
|
|
||||||
`maxquota` * 1048576 AS `maxquota`,
|
|
||||||
`quota` * 1048576 AS `quota`,
|
|
||||||
CASE `backupmx` WHEN 1 THEN '".$lang['mailbox']['yes']."' ELSE '".$lang['mailbox']['no']."' END AS `backupmx`,
|
|
||||||
CASE `active` WHEN 1 THEN '".$lang['mailbox']['yes']."' ELSE '".$lang['mailbox']['no']."' END AS `active`
|
|
||||||
FROM `domain` WHERE
|
|
||||||
`domain` IN (
|
|
||||||
SELECT `domain` FROM `domain_admins` WHERE `username`= :username AND `active`='1'
|
|
||||||
)
|
|
||||||
OR 'admin'= :admin");
|
|
||||||
$stmt->execute(array(
|
|
||||||
':username' => $_SESSION['mailcow_cc_username'],
|
|
||||||
':admin' => $_SESSION['mailcow_cc_role'],
|
|
||||||
));
|
|
||||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
}
|
|
||||||
catch (PDOException $e) {
|
|
||||||
$_SESSION['return'] = array(
|
|
||||||
'type' => 'danger',
|
|
||||||
'msg' => 'MySQL: '.$e
|
|
||||||
);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(!empty($rows)):
|
|
||||||
while($row = array_shift($rows)):
|
|
||||||
try {
|
|
||||||
$stmt = $pdo->prepare("SELECT COUNT(*) AS `count` FROM `alias`
|
|
||||||
WHERE `domain`= :domain
|
|
||||||
AND `address` NOT IN (
|
|
||||||
SELECT `username` FROM `mailbox`)");
|
|
||||||
$stmt->execute(array(':domain' => $row['domain']));
|
|
||||||
$AliasData = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
||||||
|
|
||||||
$stmt = $pdo->prepare("SELECT
|
|
||||||
COUNT(*) AS `count`,
|
|
||||||
COALESCE(SUM(`quota`), '0') AS `quota`
|
|
||||||
FROM `mailbox`
|
|
||||||
WHERE `domain` = :domain");
|
|
||||||
$stmt->execute(array(':domain' => $row['domain']));
|
|
||||||
$MailboxData = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
||||||
}
|
|
||||||
catch (PDOException $e) {
|
|
||||||
$_SESSION['return'] = array(
|
|
||||||
'type' => 'danger',
|
|
||||||
'msg' => 'MySQL: '.$e
|
|
||||||
);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<tr id="data">
|
<tr id="data">
|
||||||
<td><?=htmlspecialchars($row['domain']);?></td>
|
<td><?=htmlspecialchars($domaindata['domain_name']);?></td>
|
||||||
<td><?=intval($AliasData['count']);?> / <?=intval($row['aliases']);?></td>
|
<td><?=$domaindata['aliases_in_domain'];?> / <?=$domaindata['max_num_aliases_for_domain'];?></td>
|
||||||
<td><?=$MailboxData['count'];?> / <?=$row['mailboxes'];?></td>
|
<td><?=$domaindata['mboxes_in_domain'];?> / <?=$domaindata['max_num_mboxes_for_domain'];?></td>
|
||||||
<td><?=formatBytes(intval($row['maxquota']), 2);?></td>
|
<td><?=$domaindata['max_quota_for_mbox'];?></td>
|
||||||
<td><?=formatBytes(intval($MailboxData['quota']), 2);?> / <?=formatBytes(intval($row['quota']));?></td>
|
<td><?=$domaindata['quota_used_in_domain'];?> / <?=$domaindata['max_quota_for_domain'];?></td>
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION['mailcow_cc_role'] == "admin"):
|
if ($_SESSION['mailcow_cc_role'] == "admin"):
|
||||||
?>
|
?>
|
||||||
<td><?=$row['backupmx'];?></td>
|
<td><?=$domaindata['backupmx'];?></td>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<td><?=$row['active'];?></td>
|
<td><?=$domaindata['active'];?></td>
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION['mailcow_cc_role'] == "admin"):
|
if ($_SESSION['mailcow_cc_role'] == "admin"):
|
||||||
?>
|
?>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a href="/edit.php?domain=<?=urlencode($row['domain']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
<a href="/edit.php?domain=<?=urlencode($domaindata['domain_name']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
||||||
<a href="/delete.php?domain=<?=urlencode($row['domain']);?>" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> <?=$lang['mailbox']['remove'];?></a>
|
<a href="/delete.php?domain=<?=urlencode($domaindata['domain_name']);?>" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> <?=$lang['mailbox']['remove'];?></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
|
@ -130,19 +82,19 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
||||||
?>
|
?>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a href="/edit.php?domain=<?=urlencode($row['domain']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
<a href="/edit.php?domain=<?=urlencode($domaindata['domain_name']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
endwhile;
|
endforeach;
|
||||||
else:
|
else:
|
||||||
?>
|
|
||||||
<tr id="no-data"><td colspan="8" style="text-align: center; font-style: italic;"><?=$lang['mailbox']['no_record'];?></td></tr>
|
|
||||||
<?php
|
|
||||||
endif;
|
|
||||||
?>
|
?>
|
||||||
|
<tr id="no-data"><td colspan="8" style="text-align: center; font-style: italic;"><?=$lang['mailbox']['no_record'];?></td></tr>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION['mailcow_cc_role'] == "admin"):
|
if ($_SESSION['mailcow_cc_role'] == "admin"):
|
||||||
|
@ -189,51 +141,33 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
try {
|
foreach (mailbox_get_domains() as $domain) {
|
||||||
$stmt = $pdo->prepare("SELECT
|
$alias_domains = mailbox_get_alias_domains($domain);
|
||||||
`alias_domain`,
|
if (!empty($alias_domains)) {
|
||||||
`target_domain`,
|
foreach ($alias_domains as $alias_domain) {
|
||||||
CASE `active` WHEN 1 THEN '".$lang['mailbox']['yes']."' ELSE '".$lang['mailbox']['no']."' END AS `active`
|
$aliasdomaindata = mailbox_get_alias_domain_details($alias_domain);
|
||||||
FROM `alias_domain`
|
?>
|
||||||
WHERE `target_domain` IN (
|
<tr id="data">
|
||||||
SELECT `domain` FROM `domain_admins`
|
<td><?=htmlspecialchars($aliasdomaindata['alias_domain']);?></td>
|
||||||
WHERE `username`= :username
|
<td><?=htmlspecialchars($aliasdomaindata['target_domain']);?></td>
|
||||||
AND `active`='1'
|
<td><?=$aliasdomaindata['active'];?></td>
|
||||||
)
|
<td style="text-align: right;">
|
||||||
OR 'admin' = :admin");
|
<div class="btn-group">
|
||||||
$stmt->execute(array(
|
<a href="/edit.php?aliasdomain=<?=urlencode($aliasdomaindata['alias_domain']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
||||||
':username' => $_SESSION['mailcow_cc_username'],
|
<a href="/delete.php?aliasdomain=<?=urlencode($aliasdomaindata['alias_domain']);?>" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> <?=$lang['mailbox']['remove'];?></a>
|
||||||
':admin' => $_SESSION['mailcow_cc_role'],
|
</div>
|
||||||
));
|
</td>
|
||||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
</tr>
|
||||||
} catch(PDOException $e) {
|
<?php
|
||||||
$_SESSION['return'] = array(
|
}
|
||||||
'type' => 'danger',
|
}
|
||||||
'msg' => 'MySQL: '.$e
|
else {
|
||||||
);
|
|
||||||
}
|
|
||||||
if(!empty($rows)):
|
|
||||||
while($row = array_shift($rows)):
|
|
||||||
?>
|
|
||||||
<tr id="data">
|
|
||||||
<td><?=htmlspecialchars($row['alias_domain']);?></td>
|
|
||||||
<td><?=htmlspecialchars($row['target_domain']);?></td>
|
|
||||||
<td><?=$row['active'];?></td>
|
|
||||||
<td style="text-align: right;">
|
|
||||||
<div class="btn-group">
|
|
||||||
<a href="/edit.php?aliasdomain=<?=urlencode($row['alias_domain']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
|
||||||
<a href="/delete.php?aliasdomain=<?=urlencode($row['alias_domain']);?>" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> <?=$lang['mailbox']['remove'];?></a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
endwhile;
|
|
||||||
else:
|
|
||||||
?>
|
?>
|
||||||
<tr id="no-data"><td colspan="4" style="text-align: center; font-style: italic;"><?=$lang['mailbox']['no_record'];?></td></tr>
|
<tr id="no-data"><td colspan="8" style="text-align: center; font-style: italic;"><?=sprintf($lang['mailbox']['no_record'], $domain);?></td></tr>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
}
|
||||||
?>
|
}
|
||||||
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr id="no-data">
|
<tr id="no-data">
|
||||||
|
@ -278,91 +212,45 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
try {
|
foreach (mailbox_get_domains() as $domain) {
|
||||||
$stmt = $pdo->prepare("SELECT
|
$mailboxes = mailbox_get_mailboxes($domain);
|
||||||
`domain`.`backupmx`,
|
if (!empty($mailboxes)) {
|
||||||
`mailbox`.`username`,
|
foreach ($mailboxes as $mailbox) {
|
||||||
`mailbox`.`name`,
|
$mailboxdata = mailbox_get_mailbox_details($mailbox);
|
||||||
CASE `mailbox`.`active` WHEN 1 THEN '".$lang['mailbox']['yes']."' ELSE '".$lang['mailbox']['no']."' END AS `active`,
|
|
||||||
`mailbox`.`domain`,
|
|
||||||
`mailbox`.`quota`,
|
|
||||||
`quota2`.`bytes`,
|
|
||||||
`quota2`.`messages`
|
|
||||||
FROM `mailbox`, `quota2`, `domain`
|
|
||||||
WHERE (`mailbox`.`username` = `quota2`.`username`)
|
|
||||||
AND (`domain`.`domain` = `mailbox`.`domain`)
|
|
||||||
AND (`mailbox`.`domain` IN (
|
|
||||||
SELECT `domain` FROM `domain_admins`
|
|
||||||
WHERE `username`= :username
|
|
||||||
AND `active`='1'
|
|
||||||
)
|
|
||||||
OR 'admin' = :admin)");
|
|
||||||
$stmt->execute(array(
|
|
||||||
':username' => $_SESSION['mailcow_cc_username'],
|
|
||||||
':admin' => $_SESSION['mailcow_cc_role'],
|
|
||||||
));
|
|
||||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
}
|
|
||||||
catch (PDOException $e) {
|
|
||||||
$_SESSION['return'] = array(
|
|
||||||
'type' => 'danger',
|
|
||||||
'msg' => 'MySQL: '.$e
|
|
||||||
);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(!empty($rows)):
|
|
||||||
while($row = array_shift($rows)):
|
|
||||||
?>
|
?>
|
||||||
<tr id="data">
|
<tr id="data">
|
||||||
<?php
|
<td><?=($mailboxdata['is_relayed'] == "0") ? htmlspecialchars($mailboxdata['username']) : '<span data-toggle="tooltip" title="Relayed"><i class="glyphicon glyphicon-forward"></i>' . htmlspecialchars($mailboxdata['username']) . '</span>';?></td>
|
||||||
if ($row['backupmx'] == "0"):
|
<td><?=htmlspecialchars($mailboxdata['name'], ENT_QUOTES, 'UTF-8');?></td>
|
||||||
?>
|
<td><?=htmlspecialchars($mailboxdata['domain']);?></td>
|
||||||
<td><?=htmlspecialchars($row['username']);?></td>
|
<td><?=$mailboxdata['quota_used'];?> / <?=$mailboxdata['quota'];?></td>
|
||||||
<?php
|
|
||||||
else:
|
|
||||||
?>
|
|
||||||
<td><span data-toggle="tooltip" title="Relayed"><i class="glyphicon glyphicon-forward"></i> <?=htmlspecialchars($row['username']);?></span></td>
|
|
||||||
<?php
|
|
||||||
endif;
|
|
||||||
?>
|
|
||||||
<td><?=htmlspecialchars($row['name'], ENT_QUOTES, 'UTF-8');?></td>
|
|
||||||
<td><?=htmlspecialchars($row['domain']);?></td>
|
|
||||||
<td><?=formatBytes(intval($row['bytes']), 2);?> / <?=formatBytes(intval($row['quota']), 2);?></td>
|
|
||||||
<td style="min-width:120px;">
|
<td style="min-width:120px;">
|
||||||
<?php
|
|
||||||
$percentInUse = round((intval($row['bytes']) / intval($row['quota'])) * 100);
|
|
||||||
if ($percentInUse >= 90) {
|
|
||||||
$pbar = "progress-bar-danger";
|
|
||||||
}
|
|
||||||
elseif ($percentInUse >= 75) {
|
|
||||||
$pbar = "progress-bar-warning";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$pbar = "progress-bar-success";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar <?=$pbar;?>" role="progressbar" aria-valuenow="<?=$percentInUse;?>" aria-valuemin="0" aria-valuemax="100" style="min-width:2em;width: <?=$percentInUse;?>%;">
|
<div class="progress-bar progress-bar-<?=$mailboxdata['percent_class'];?>" role="progressbar" aria-valuenow="<?=$mailboxdata['percent_in_use'];?>" aria-valuemin="0" aria-valuemax="100" style="min-width:2em;width: <?=$mailboxdata['percent_in_use'];?>%;">
|
||||||
<?=$percentInUse;?>%
|
<?=$mailboxdata['percent_in_use'];?>%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><?=$row['messages'];?></td>
|
<td><?=$mailboxdata['messages'];?></td>
|
||||||
<td><?=$row['active'];?></td>
|
<td><?=$mailboxdata['active'];?></td>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a href="/edit.php?mailbox=<?=urlencode($row['username']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
<a href="/edit.php?mailbox=<?=urlencode($mailboxdata['username']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
||||||
<a href="/delete.php?mailbox=<?=urlencode($row['username']);?>" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> <?=$lang['mailbox']['remove'];?></a>
|
<a href="/delete.php?mailbox=<?=urlencode($mailboxdata['username']);?>" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> <?=$lang['mailbox']['remove'];?></a>
|
||||||
|
<?php if ($_SESSION['mailcow_cc_role'] == "admin"): ?>
|
||||||
|
<a href="/index.php?duallogin=<?=urlencode($mailboxdata['username']);?>" class="btn btn-xs btn-success"><span class="glyphicon glyphicon-user"></span> Login</a>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
}
|
||||||
else:
|
}
|
||||||
?>
|
else {
|
||||||
<tr id="no-data"><td colspan="8" style="text-align: center; font-style: italic;"><?=$lang['mailbox']['no_record'];?></td></tr>
|
?>
|
||||||
<?php
|
<tr id="no-data"><td colspan="8" style="text-align: center; font-style: italic;"><?=sprintf($lang['mailbox']['no_record'], $domain);?></td></tr>
|
||||||
endif;
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
|
@ -405,76 +293,42 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
try {
|
foreach (mailbox_get_domains() as $domain) {
|
||||||
$stmt = $pdo->prepare("SELECT
|
$aliases = mailbox_get_aliases($domain);
|
||||||
`address`,
|
if (!empty($aliases)) {
|
||||||
`goto`,
|
foreach ($aliases as $alias) {
|
||||||
`domain`,
|
$aliasdata = mailbox_get_alias_details($alias);
|
||||||
CASE `active` WHEN 1 THEN '".$lang['mailbox']['yes']."' ELSE '".$lang['mailbox']['no']."' END AS `active`
|
|
||||||
FROM alias
|
|
||||||
WHERE (
|
|
||||||
`address` NOT IN (
|
|
||||||
SELECT `username` FROM `mailbox`
|
|
||||||
)
|
|
||||||
AND `address` != `goto`
|
|
||||||
) AND (`domain` IN (
|
|
||||||
SELECT `domain` FROM `domain_admins`
|
|
||||||
WHERE `username` = :username
|
|
||||||
AND active='1'
|
|
||||||
)
|
|
||||||
OR 'admin' = :admin)");
|
|
||||||
$stmt->execute(array(
|
|
||||||
':username' => $_SESSION['mailcow_cc_username'],
|
|
||||||
':admin' => $_SESSION['mailcow_cc_role'],
|
|
||||||
));
|
|
||||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
}
|
|
||||||
catch (PDOException $e) {
|
|
||||||
$_SESSION['return'] = array(
|
|
||||||
'type' => 'danger',
|
|
||||||
'msg' => 'MySQL: '.$e
|
|
||||||
);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(!empty($rows)):
|
|
||||||
while($row = array_shift($rows)):
|
|
||||||
?>
|
?>
|
||||||
<tr id="data">
|
<tr id="data">
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?= ($aliasdata['is_catch_all'] == "1") ? '<span class="glyphicon glyphicon-pushpin" aria-hidden="true"></span> Catch-all ' . htmlspecialchars($aliasdata['address']) : htmlspecialchars($aliasdata['address']); ?>
|
||||||
if(!filter_var($row['address'], FILTER_VALIDATE_EMAIL)):
|
|
||||||
?>
|
|
||||||
<span class="glyphicon glyphicon-pushpin" aria-hidden="true"></span> Catch-all @<?=htmlspecialchars($row['domain']);?>
|
|
||||||
<?php
|
|
||||||
else:
|
|
||||||
echo htmlspecialchars($row['address']);
|
|
||||||
endif;
|
|
||||||
?>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
foreach(explode(",", $row['goto']) as $goto) {
|
foreach(explode(",", $aliasdata['goto']) as $goto) {
|
||||||
echo nl2br(htmlspecialchars($goto.PHP_EOL));
|
echo nl2br(htmlspecialchars($goto.PHP_EOL));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td><?=htmlspecialchars($row['domain']);?></td>
|
<td><?=htmlspecialchars($aliasdata['domain']);?></td>
|
||||||
<td><?=$row['active'];?></td>
|
<td><?=$aliasdata['active'];?></td>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a href="/edit.php?alias=<?=urlencode($row['address']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
<a href="/edit.php?alias=<?=urlencode($aliasdata['address']);?>" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> <?=$lang['mailbox']['edit'];?></a>
|
||||||
<a href="/delete.php?alias=<?=urlencode($row['address']);?>" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> <?=$lang['mailbox']['remove'];?></a>
|
<a href="/delete.php?alias=<?=urlencode($aliasdata['address']);?>" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> <?=$lang['mailbox']['remove'];?></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
}
|
||||||
else:
|
}
|
||||||
?>
|
else {
|
||||||
<tr id="no-data"><td colspan="5" style="text-align: center; font-style: italic;"><?=$lang['mailbox']['no_record'];?></td></tr>
|
?>
|
||||||
<?php
|
<tr id="no-data"><td colspan="8" style="text-align: center; font-style: italic;"><?=sprintf($lang['mailbox']['no_record'], $domain);?></td></tr>
|
||||||
endif;
|
<?php
|
||||||
?>
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr id="no-data">
|
<tr id="no-data">
|
||||||
|
|
|
@ -51,29 +51,35 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user
|
||||||
</form>
|
</form>
|
||||||
<hr>
|
<hr>
|
||||||
<?php // Get user information about aliases
|
<?php // Get user information about aliases
|
||||||
$get_user_object_info = user_object_info('get');?>
|
$user_get_alias_details = user_get_alias_details($username);?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['aliases'];?>:</div>
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['aliases'];?>:</div>
|
||||||
<div class="col-md-9 col-xs-7">
|
<div class="col-md-9 col-xs-7">
|
||||||
<p><?=$get_user_object_info['aliases'];?></p>
|
<p><?=$user_get_alias_details['aliases'];?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['domain_aliases'];?>:</div>
|
||||||
|
<div class="col-md-9 col-xs-7">
|
||||||
|
<p><?=$user_get_alias_details['ad_alias'];?></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['aliases_also_send_as'];?>:</div>
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['aliases_also_send_as'];?>:</div>
|
||||||
<div class="col-md-9 col-xs-7">
|
<div class="col-md-9 col-xs-7">
|
||||||
<p><?=$get_user_object_info['aliases_also_send_as'];?></p>
|
<p><?=$user_get_alias_details['aliases_also_send_as'];?></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['aliases_send_as_all'];?>:</div>
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['aliases_send_as_all'];?>:</div>
|
||||||
<div class="col-md-9 col-xs-7">
|
<div class="col-md-9 col-xs-7">
|
||||||
<p><?=$get_user_object_info['aliases_send_as_all'];?></p>
|
<p><?=$user_get_alias_details['aliases_send_as_all'];?></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['is_catch_all'];?>:</div>
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['is_catch_all'];?>:</div>
|
||||||
<div class="col-md-9 col-xs-7">
|
<div class="col-md-9 col-xs-7">
|
||||||
<p><?=$get_user_object_info['is_catch_all'];?></p>
|
<p><?=$user_get_alias_details['is_catch_all'];?></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -107,16 +113,16 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div role="tabpanel" class="tab-pane active" id="SpamAliases">
|
<div role="tabpanel" class="tab-pane active" id="SpamAliases">
|
||||||
<form class="form-horizontal" role="form" method="post">
|
<div class="row">
|
||||||
<div class="table-responsive">
|
<div class="col-xs-5">
|
||||||
<table class="table table-striped sortable-theme-bootstrap" data-sortable id="timelimitedaliases">
|
<p><b><?=$lang['user']['alias'];?></b></p>
|
||||||
<thead>
|
</div>
|
||||||
<tr>
|
<div class="col-xs-4">
|
||||||
<th class="sort-table" style="min-width: 96px;"><?=$lang['user']['alias'];?></th>
|
<p><b><?=$lang['user']['alias_valid_until'];?></b></p>
|
||||||
<th class="sort-table" style="min-width: 135px;"><?=$lang['user']['alias_valid_until'];?></th>
|
</div>
|
||||||
</tr>
|
<div class="col-xs-3">
|
||||||
</thead>
|
<p><b><?=$lang['user']['action'];?></b></p>
|
||||||
<tbody>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
try {
|
try {
|
||||||
$stmt = $pdo->prepare("SELECT `address`,
|
$stmt = $pdo->prepare("SELECT `address`,
|
||||||
|
@ -137,21 +143,31 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user
|
||||||
if(!empty($rows)):
|
if(!empty($rows)):
|
||||||
while ($row = array_shift($rows)):
|
while ($row = array_shift($rows)):
|
||||||
?>
|
?>
|
||||||
<tr id="data">
|
<div class="col-xs-5">
|
||||||
<td><?=htmlspecialchars($row['address']);?></td>
|
<p><?=htmlspecialchars($row['address']);?></p>
|
||||||
<td><?=htmlspecialchars(date($lang['user']['alias_full_date'], $row['validity']));?></td>
|
</div>
|
||||||
</tr>
|
<div class="col-xs-4">
|
||||||
|
<p><?=htmlspecialchars(date($lang['user']['alias_full_date'], $row['validity']));?></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-3">
|
||||||
|
<form class="form-inline" role="form" method="post">
|
||||||
|
<a href="#" onclick="$(this).closest('form').submit()" data-toggle="tooltip" data-placement="left" title="<?=$lang['user']['delete_now'];?>"><span class="glyphicon glyphicon-remove"></span></a>
|
||||||
|
<input type="hidden" name="trigger_set_time_limited_aliases" value="delete">
|
||||||
|
<input type="hidden" name="item" value="<?=htmlspecialchars($row['address']);?>">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
else:
|
else:
|
||||||
?>
|
?>
|
||||||
<tr id="no-data"><td colspan="2" style="text-align: center; font-style: italic;"><?=$lang['user']['no_record'];?></td></tr>
|
<div class="col-xs-12">
|
||||||
|
<center><i><?=$lang['user']['no_record'];?></i></center>
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
<form class="form-horizontal" role="form" method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<select id="validity" name="validity" title="<?=$lang['user']['alias_select_validity'];?>">
|
<select id="validity" name="validity" title="<?=$lang['user']['alias_select_validity'];?>">
|
||||||
|
@ -166,7 +182,7 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<button style="border-color:#f5f5f5;background:none;color:red" type="submit" name="trigger_set_time_limited_aliases" value="delete" class="btn btn-sm">
|
<button style="border-color:#f5f5f5;background:none;color:red" type="submit" name="trigger_set_time_limited_aliases" value="deleteall" class="btn btn-sm">
|
||||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> <?=$lang['user']['alias_remove_all'];?>
|
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> <?=$lang['user']['alias_remove_all'];?>
|
||||||
</button>
|
</button>
|
||||||
<button style="border-color:#f5f5f5;background:none;color:grey" type="submit" name="trigger_set_time_limited_aliases" value="extend" class="btn btn-sm">
|
<button style="border-color:#f5f5f5;background:none;color:grey" type="submit" name="trigger_set_time_limited_aliases" value="extend" class="btn btn-sm">
|
||||||
|
@ -365,13 +381,14 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div role="tabpanel" class="tab-pane" id="Syncjobs">
|
<div role="tabpanel" class="tab-pane" id="Syncjobs">
|
||||||
|
<div class="table-responsive">
|
||||||
<table class="table table-striped sortable-theme-bootstrap" data-sortable id="timelimitedaliases">
|
<table class="table table-striped sortable-theme-bootstrap" data-sortable id="timelimitedaliases">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="sort-table" style="min-width: 96px;">Server:Port</th>
|
<th class="sort-table" style="min-width: 96px;">Server:Port</th>
|
||||||
<th class="sort-table" style="min-width: 96px;"><?=$lang['user']['encryption'];?></th>
|
<th class="sort-table" style="min-width: 96px;"><?=$lang['user']['encryption'];?></th>
|
||||||
<th class="sort-table" style="min-width: 96px;"><?=$lang['user']['username'];?></th>
|
<th class="sort-table" style="min-width: 96px;"><?=$lang['user']['username'];?></th>
|
||||||
<th class="sort-table" style="min-width: 35px;"><?=$lang['user']['excludes'];?></th>
|
<th class="sort-table" style="min-width: 96px;"><?=$lang['user']['excludes'];?></th>
|
||||||
<th class="sort-table" style="min-width: 35px;"><?=$lang['user']['interval'];?></th>
|
<th class="sort-table" style="min-width: 35px;"><?=$lang['user']['interval'];?></th>
|
||||||
<th class="sort-table" style="min-width: 35px;"><?=$lang['user']['last_run'];?></th>
|
<th class="sort-table" style="min-width: 35px;"><?=$lang['user']['last_run'];?></th>
|
||||||
<th class="sort-table" style="min-width: 35px;">Log</th>
|
<th class="sort-table" style="min-width: 35px;">Log</th>
|
||||||
|
@ -401,9 +418,9 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user
|
||||||
<td><?=htmlspecialchars($row['host1'] . ':' . $row['port1']);?></td>
|
<td><?=htmlspecialchars($row['host1'] . ':' . $row['port1']);?></td>
|
||||||
<td><?=htmlspecialchars($row['enc1']);?></td>
|
<td><?=htmlspecialchars($row['enc1']);?></td>
|
||||||
<td><?=htmlspecialchars($row['user1']);?></td>
|
<td><?=htmlspecialchars($row['user1']);?></td>
|
||||||
<td><?=($row['exclude'] == '') ? '✘' : $row['exclude'];?></td>
|
<td><?=($row['exclude'] == '') ? '✘' : '<code>' . $row['exclude'] . '</code>';?></td>
|
||||||
<td><?=htmlspecialchars($row['mins_interval']);?> min</td>
|
<td><?=htmlspecialchars($row['mins_interval']);?> min</td>
|
||||||
<td><?=(empty($row['last_run'])) ? '✘' : htmlspecialchars(date($lang['user']['syncjob_full_date'], strtotime($row['last_run'])));?></td>
|
<td><?=(empty($row['last_run'])) ? '✘' : htmlspecialchars(date($lang['user']['syncjob_full_date'], strtotime($row['last_run'] . ' UTC')));?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if (empty($row['returned_text'])) {
|
if (empty($row['returned_text'])) {
|
||||||
|
@ -442,11 +459,12 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="modal fade" id="logModal" tabindex="-1" role="dialog" aria-labelledby="logTextLabel">
|
<div class="modal fade" id="logModal" tabindex="-1" role="dialog" aria-labelledby="logTextLabel">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog" style="width:90%" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<span id="logText"></span>
|
<span id="logText"></span>
|
||||||
|
|
Loading…
Reference in New Issue