2016-12-10 03:39:02 +08:00
|
|
|
<?php
|
2018-10-11 17:59:23 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
|
2017-01-26 02:07:30 +08:00
|
|
|
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'domainadmin') {
|
|
|
|
|
|
|
|
/*
|
|
|
|
/ DOMAIN ADMIN
|
|
|
|
*/
|
|
|
|
|
2018-10-11 17:59:23 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
2016-12-10 03:39:02 +08:00
|
|
|
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
2017-02-13 20:42:54 +08:00
|
|
|
$tfa_data = get_tfa();
|
2020-11-16 02:32:37 +08:00
|
|
|
$fido2_data = fido2(array("action" => "get_friendly_names"));
|
2016-12-10 03:39:02 +08:00
|
|
|
$username = $_SESSION['mailcow_cc_username'];
|
[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)
[Docker API] Create pipe to pass Rspamd UI worker password
[Dovecot] Pull Spamassassin ruleset to be read by Rspamd (MANY THANKS to Peer Heinlein!)
[Dovecot] Garbage collector for deleted maildirs (set keep time via MAILDIR_GC_TIME which defaults to 1440 minutes)
[Web] Flush memcached after mailbox item changes, fixes #1808
[Web] Fix duplicate IDs, fixes #1792
[Compose] Use SQL sockets
[PHP-FPM] Update APCu and Redis libs
[Dovecot] Encrypt maildir with global key pair in crypt-vol-1 (BACKUP!), also fixes #1791
[Web] Fix deletion of spam aliases
[Helper] Add "crypt" to backup script
[Helper] Override file for external SQL socket (not supported!)
[Compose] New images for Rspamd, PHP-FPM, SOGo, Dovecot, Docker API, Watchdog, ACME, Postfix
2018-09-30 04:01:23 +08:00
|
|
|
|
2016-12-10 03:39:02 +08:00
|
|
|
?>
|
|
|
|
<div class="container">
|
2020-11-16 02:32:37 +08:00
|
|
|
|
2017-01-26 02:07:30 +08:00
|
|
|
<h3><?=$lang['user']['user_settings'];?></h3>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading"><?=$lang['user']['user_settings'];?></div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-offset-3 col-sm-9">
|
|
|
|
<p><a href="#pwChangeModal" data-toggle="modal">[<?=$lang['user']['change_password'];?>]</a></p>
|
2021-06-04 20:29:39 +08:00
|
|
|
<div class="last-login"></div>
|
2021-06-08 19:16:10 +08:00
|
|
|
<span class="clear-last-logins"><?=$lang['user']['clear_recent_successful_connections'];?></span>
|
2017-01-09 18:08:45 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-26 02:07:30 +08:00
|
|
|
<hr>
|
2021-06-22 13:17:55 +08:00
|
|
|
|
2020-11-16 02:32:37 +08:00
|
|
|
<? // TFA ?>
|
2017-01-26 02:07:30 +08:00
|
|
|
<div class="row">
|
2017-12-09 20:17:15 +08:00
|
|
|
<div class="col-sm-3 col-xs-5 text-right"><?=$lang['tfa']['tfa'];?></div>
|
2017-02-13 20:42:54 +08:00
|
|
|
<div class="col-sm-9 col-xs-7">
|
|
|
|
<p id="tfa_pretty"><?=$tfa_data['pretty'];?></p>
|
2021-06-22 13:17:55 +08:00
|
|
|
<div id="tfa_keys">
|
|
|
|
<?php
|
|
|
|
if (!empty($tfa_data['additional'])) {
|
|
|
|
foreach ($tfa_data['additional'] as $key_info) { ?>
|
2017-02-15 04:54:09 +08:00
|
|
|
<form style="display:inline;" method="post">
|
2021-06-22 13:17:55 +08:00
|
|
|
<input type="hidden" name="unset_tfa_key" value="<?=$key_info['id'];?>" />
|
|
|
|
<div class="label label-default"><i class="bi bi-key-fill"></i> <?=$key_info['key_id'];?> <a href="#" style="font-weight:bold;color:white" onClick='return confirm("<?=$lang['user']['delete_ays'];?>")?$(this).closest("form").submit():"";'>[<?=strtolower($lang['admin']['remove']);?>]</a></div>
|
|
|
|
</form>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<br>
|
2017-02-13 20:42:54 +08:00
|
|
|
</div>
|
2017-01-09 18:08:45 +08:00
|
|
|
</div>
|
2017-01-26 02:07:30 +08:00
|
|
|
<div class="row">
|
2017-12-09 20:17:15 +08:00
|
|
|
<div class="col-sm-3 col-xs-5 text-right"><?=$lang['tfa']['set_tfa'];?></div>
|
|
|
|
<div class="col-sm-9 col-xs-7">
|
2017-01-26 02:07:30 +08:00
|
|
|
<select id="selectTFA" class="selectpicker" title="<?=$lang['tfa']['select'];?>">
|
|
|
|
<option value="yubi_otp"><?=$lang['tfa']['yubi_otp'];?></option>
|
2017-02-13 20:42:54 +08:00
|
|
|
<option value="u2f"><?=$lang['tfa']['u2f'];?></option>
|
2017-05-04 00:02:04 +08:00
|
|
|
<option value="totp"><?=$lang['tfa']['totp'];?></option>
|
2017-01-26 02:07:30 +08:00
|
|
|
<option value="none"><?=$lang['tfa']['none'];?></option>
|
|
|
|
</select>
|
2017-01-09 18:08:45 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-16 02:32:37 +08:00
|
|
|
|
2021-06-22 13:17:55 +08:00
|
|
|
<hr>
|
2020-11-17 20:38:28 +08:00
|
|
|
<? // FIDO2 ?>
|
2021-06-22 13:17:55 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-3 col-xs-5 text-right">
|
|
|
|
<p><i class="bi bi-shield-fill-check"></i> <?=$lang['fido2']['fido2_auth'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-17 20:38:28 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-3 col-xs-5 text-right"><?=$lang['fido2']['known_ids'];?>:</div>
|
|
|
|
<div class="col-sm-9 col-xs-7">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped table-hover table-condensed" id="fido2_keys">
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
|
|
|
<th style="min-width:240px;text-align: right"><?=$lang['admin']['action'];?></th>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
if (!empty($fido2_data)) {
|
|
|
|
foreach ($fido2_data as $key_info) {
|
|
|
|
?>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<?=($_SESSION['fido2_cid'] == $key_info['cid']) ? '→ ' : NULL; ?><?=(!empty($key_info['fn']))?$key_info['fn']:$key_info['subject'];?>
|
|
|
|
</td>
|
|
|
|
<td style="min-width:240px;text-align: right">
|
2020-11-16 02:32:37 +08:00
|
|
|
<form style="display:inline;" method="post">
|
2020-11-17 20:38:28 +08:00
|
|
|
<input type="hidden" name="unset_fido2_key" value="<?=$key_info['cid'];?>" />
|
|
|
|
<div class="btn-group">
|
2021-05-22 18:13:37 +08:00
|
|
|
<a href="#" class="btn btn-xs btn-default" data-cid="<?=$key_info['cid'];?>" data-subject="<?=base64_encode($key_info['subject']);?>" data-toggle="modal" data-target="#fido2ChangeFn"><i class="bi bi-pencil-fill"></i> <?=strtolower($lang['fido2']['rename']);?></a>
|
2021-06-22 13:17:55 +08:00
|
|
|
<a href="#" onClick='return confirm("<?=$lang['user']['delete_ays'];?>")?$(this).closest("form").submit():"";' class="btn btn-xs btn-danger"><i class="bi bi-trash"></i> <?=strtolower($lang['admin']['remove']);?></a>
|
2020-11-16 02:32:37 +08:00
|
|
|
</form>
|
2020-11-17 20:38:28 +08:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
2020-11-16 02:32:37 +08:00
|
|
|
</div>
|
|
|
|
<br>
|
2020-11-17 20:38:28 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-offset-3 col-sm-9">
|
|
|
|
<button class="btn btn-sm btn-primary" id="register-fido2"><?=$lang['fido2']['set_fido2'];?></button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<div class="row" id="status-fido2">
|
|
|
|
<div class="col-sm-3 col-xs-5 text-right"><?=$lang['fido2']['register_status'];?>:</div>
|
|
|
|
<div class="col-sm-9 col-xs-7">
|
|
|
|
<div id="fido2-alerts">-</div>
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
</div>
|
2020-11-16 02:32:37 +08:00
|
|
|
|
2017-01-26 02:07:30 +08:00
|
|
|
</div>
|
2017-07-29 16:32:17 +08:00
|
|
|
</div>
|
2019-02-16 03:20:14 +08:00
|
|
|
</div>
|
2017-01-26 02:07:30 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user') {
|
|
|
|
|
|
|
|
/*
|
|
|
|
/ USER
|
|
|
|
*/
|
|
|
|
|
2018-10-11 17:59:23 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
2017-09-16 19:33:27 +08:00
|
|
|
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|
|
|
$username = $_SESSION['mailcow_cc_username'];
|
2017-05-23 15:36:59 +08:00
|
|
|
$mailboxdata = mailbox('get', 'mailbox_details', $username);
|
2020-04-11 02:57:01 +08:00
|
|
|
$pushover_data = pushover('get', $username);
|
2021-06-22 13:17:55 +08:00
|
|
|
$tfa_data = get_tfa();
|
|
|
|
$fido2_data = fido2(array("action" => "get_friendly_names"));
|
2017-09-16 19:33:27 +08:00
|
|
|
|
2019-07-17 04:24:19 +08:00
|
|
|
$clientconfigstr = "host=" . urlencode($mailcow_hostname) . "&email=" . urlencode($username) . "&name=" . urlencode($mailboxdata['name']) . "&ui=" . urlencode(strtok($_SERVER['HTTP_HOST'], ':')) . "&port=" . urlencode($autodiscover_config['caldav']['port']);
|
2017-07-11 03:02:30 +08:00
|
|
|
if ($autodiscover_config['useEASforOutlook'] == 'yes')
|
2017-09-16 19:33:27 +08:00
|
|
|
$clientconfigstr .= "&outlookEAS=1";
|
|
|
|
if (file_exists('thunderbird-plugins/version.csv')) {
|
2017-07-11 03:02:30 +08:00
|
|
|
$fh = fopen('thunderbird-plugins/version.csv', 'r');
|
2017-09-16 19:33:27 +08:00
|
|
|
if ($fh) {
|
|
|
|
while (($row = fgetcsv($fh, 1000, ';')) !== FALSE) {
|
2019-10-20 16:07:27 +08:00
|
|
|
if ($row[0] == 'sogo-connector@inverse.ca') {
|
|
|
|
$clientconfigstr .= "&connector=" . urlencode($row[1]);
|
2017-07-11 03:02:30 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose($fh);
|
|
|
|
}
|
|
|
|
}
|
2017-01-26 02:07:30 +08:00
|
|
|
?>
|
|
|
|
<div class="container">
|
|
|
|
|
2019-02-16 03:20:14 +08:00
|
|
|
<!-- Nav tabs -->
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
2021-06-22 13:17:55 +08:00
|
|
|
<li class="dropdown active">
|
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['user']['mailbox'];?><span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li role="presentation" class="active" data-dont-remember="1"><a href="#tab-user-auth" aria-controls="tab-user-auth" role="tab" data-toggle="tab"><?=$lang['user']['mailbox_general'];?></a></li>
|
|
|
|
<li role="presentation"><a href="#tab-user-details" aria-controls="tab-config-fwdhosts" role="tab" data-toggle="tab"><?=$lang['user']['mailbox_details'];?></a></li>
|
|
|
|
<li role="presentation"><a href="#tab-user-settings" aria-controls="tab-config-f2b" role="tab" data-toggle="tab"><?=$lang['user']['mailbox_settings'];?></a></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
2019-02-16 03:20:14 +08:00
|
|
|
<li role="presentation"><a href="#SpamAliases" aria-controls="SpamAliases" role="tab" data-toggle="tab"><?=$lang['user']['spam_aliases'];?></a></li>
|
|
|
|
<li role="presentation"><a href="#Spamfilter" aria-controls="Spamfilter" role="tab" data-toggle="tab"><?=$lang['user']['spamfilter'];?></a></li>
|
|
|
|
<li role="presentation"><a href="#Syncjobs" aria-controls="Syncjobs" role="tab" data-toggle="tab"><?=$lang['user']['sync_jobs'];?></a></li>
|
2019-12-04 01:52:06 +08:00
|
|
|
<li role="presentation"><a href="#AppPasswds" aria-controls="AppPasswds" role="tab" data-toggle="tab"><?=$lang['user']['app_passwds'];?></a></li>
|
2020-04-11 02:57:01 +08:00
|
|
|
<li role="presentation"><a href="#Pushover" aria-controls="Pushover" role="tab" data-toggle="tab">Pushover API</a></li>
|
2019-02-16 03:20:14 +08:00
|
|
|
</ul>
|
2017-01-09 18:08:45 +08:00
|
|
|
<hr>
|
2019-02-08 05:37:26 +08:00
|
|
|
|
2019-02-16 03:20:14 +08:00
|
|
|
<div class="tab-content">
|
2018-10-24 03:14:57 +08:00
|
|
|
|
2021-06-22 13:17:55 +08:00
|
|
|
<div role="tabpanel" class="tab-pane active" id="tab-user-auth">
|
2019-02-16 03:20:14 +08:00
|
|
|
<div class="panel panel-default">
|
2021-06-22 13:17:55 +08:00
|
|
|
<div class="panel-heading"><?=$lang['user']['mailbox_general'];?></div>
|
2019-02-16 03:20:14 +08:00
|
|
|
<div class="panel-body">
|
2021-06-22 13:17:55 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['in_use'];?>:</div>
|
|
|
|
<div class="col-md-5 col-xs-7">
|
|
|
|
<div class="progress">
|
|
|
|
<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'];?>%;">
|
|
|
|
<?=$mailboxdata['percent_in_use'];?>%
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p><?=formatBytes($mailboxdata['quota_used'], 2);?> / <?=($mailboxdata['quota'] == 0) ? '∞' : formatBytes($mailboxdata['quota'], 2);?><br><?=$mailboxdata['messages'];?> <?=$lang['user']['messages'];?></p>
|
|
|
|
<hr>
|
|
|
|
<p><a href="#pwChangeModal" data-toggle="modal"><i class="bi bi-pencil-fill"></i> <?=$lang['user']['change_password'];?></a></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<? // FIDO2 ?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-3 col-xs-5 text-right">
|
|
|
|
<p><i class="bi bi-shield-fill-check"></i> <?=$lang['fido2']['fido2_auth'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-3 col-xs-5 text-right">
|
|
|
|
<?=$lang['fido2']['known_ids'];?>:
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-9 col-xs-7">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped table-hover table-condensed" id="fido2_keys">
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
|
|
|
<th style="min-width:240px;text-align: right"><?=$lang['admin']['action'];?></th>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
if (!empty($fido2_data)) {
|
|
|
|
foreach ($fido2_data as $key_info) {
|
|
|
|
?>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<?=($_SESSION['fido2_cid'] == $key_info['cid']) ? '<i class="bi bi-unlock-fill"></i> ' : NULL; ?><?=(!empty($key_info['fn']))?$key_info['fn']:$key_info['subject'];?>
|
|
|
|
</td>
|
|
|
|
<td style="min-width:240px;text-align: right">
|
|
|
|
<form style="display:inline;" method="post">
|
|
|
|
<input type="hidden" name="unset_fido2_key" value="<?=$key_info['cid'];?>" />
|
|
|
|
<div class="btn-group">
|
|
|
|
<a href="#" class="btn btn-xs btn-default" data-cid="<?=$key_info['cid'];?>" data-subject="<?=base64_encode($key_info['subject']);?>" data-toggle="modal" data-target="#fido2ChangeFn"><i class="bi bi-pencil-fill"></i> <?=strtolower($lang['fido2']['rename']);?></a>
|
|
|
|
<a href="#" onClick='return confirm("<?=$lang['user']['delete_ays'];?>")?$(this).closest("form").submit():"";' class="btn btn-xs btn-danger"><i class="bi bi-trash"></i> <?=strtolower($lang['admin']['remove']);?></a>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-offset-3 col-sm-9">
|
|
|
|
<button class="btn btn-sm btn-primary" id="register-fido2"><?=$lang['fido2']['set_fido2'];?></button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<div class="row" id="status-fido2">
|
|
|
|
<div class="col-sm-3 col-xs-5 text-right"><?=$lang['fido2']['register_status'];?>:</div>
|
|
|
|
<div class="col-sm-9 col-xs-7">
|
|
|
|
<div id="fido2-alerts">-</div>
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right"><i class="bi bi-file-earmark-text"></i> <?=$lang['user']['apple_connection_profile'];?>:</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<p><i class="bi bi-file-earmark-post"></i> <a href="/mobileconfig.php?only_email"><?=$lang['user']['email'];?></a> <small>IMAP, SMTP</small></p>
|
|
|
|
<p class="help-block"><?=$lang['user']['apple_connection_profile_mailonly'];?></p>
|
|
|
|
<?php if (getenv('SKIP_SOGO') != "y") { ?>
|
|
|
|
<p><i class="bi bi-file-earmark-post"></i> <a href="/mobileconfig.php"><?=$lang['user']['email_and_dav'];?></a> <small>IMAP, SMTP, Cal/CardDAV</small></p>
|
|
|
|
<p class="help-block"><?=$lang['user']['apple_connection_profile_complete'];?></p>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr>
|
2019-02-16 03:20:14 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-offset-3 col-sm-9">
|
|
|
|
<?php if ($mailboxdata['attributes']['force_pw_update'] == "1"): ?>
|
|
|
|
<div class="alert alert-danger"><?=$lang['user']['force_pw_update'];?></div>
|
|
|
|
<?php endif; ?>
|
|
|
|
<p><a target="_blank" href="https://mailcow.github.io/mailcow-dockerized-docs/client/#<?=$clientconfigstr;?>">[<?=$lang['user']['client_configuration'];?>]</a></p>
|
|
|
|
<p><a href="#userFilterModal" data-toggle="modal">[<?=$lang['user']['show_sieve_filters'];?>]</a></p>
|
2021-06-04 20:29:39 +08:00
|
|
|
<hr>
|
2021-06-09 13:19:57 +08:00
|
|
|
<h4 class="recent-login-success pull-left"><?=$lang['user']['recent_successful_connections'];?></h4>
|
|
|
|
<div class="dropdown pull-left">
|
|
|
|
<button class="btn btn-default btn-xs dropdown-toggle" type="button" id="history_sasl_days" data-toggle="dropdown"><?=$lang['user']['login_history'];?> <span class="caret"></span></button>
|
|
|
|
<ul class="dropdown-menu">
|
2021-06-22 13:17:55 +08:00
|
|
|
<li class="login-history active" data-days="1"><a href="#">1 <?=$lang['user']['day'];?></a></li>
|
2021-06-09 13:19:57 +08:00
|
|
|
<li class="login-history" data-days="7"><a href="#">1 <?=$lang['user']['week'];?></a></li>
|
2021-06-22 13:17:55 +08:00
|
|
|
<li class="login-history" data-days="14"><a href="#">2 <?=$lang['user']['weeks'];?></a></li>
|
2021-06-09 13:19:57 +08:00
|
|
|
<li class="login-history" data-days="31"><a href="#">1 <?=$lang['user']['month'];?></a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<div class="last-login"></div>
|
|
|
|
<span class="clear-last-logins">
|
|
|
|
<?=$lang['user']['clear_recent_successful_connections'];?>
|
|
|
|
</span>
|
2019-02-16 03:20:14 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-22 13:17:55 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-user-details">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading"><?=$lang['user']['mailbox_details'];?></div>
|
|
|
|
<div class="panel-body">
|
2021-02-11 16:33:46 +08:00
|
|
|
<?php if ($mailboxdata['attributes']['xmpp_access'] == 1 && $mailboxdata['domain_xmpp'] == 1) { ?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right">
|
2021-06-06 17:57:15 +08:00
|
|
|
<img class="img-responsive pull-right xmpp-logo-user" alt="XMPP Logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAAlwSFlzAAAJcwAACXMB+Yg9ogAAAqNQTFRFR3BMEERaAAAAAAAAAAAAAAAAAAAAAAAAdIFfAAAABBEVAAAAAAAAAAAAAAAAFYSszZA8BxUkAAAAAAAAAAAAmsplAAAAn81nFYi7AAAAAAAAF3utAAAA52wfEpbK4mcg5WYgncxnD3OmAAAAnsxnAAAAAAAA5mwg520gEZbJAAAA0FYjoM5m6W0fEpfLAAAAR5VD3WkjEWGRE26fnctn6W0fE6ban85noc9o5mwhAAAAAAAAFHeq6m0fAAAAoM5nAAAAATtsATlqoc5mAjlrAjhqATdqATxt6W0eEp/SE6LXEmOUDmibE5DDzVokEmaXUZlIATVm6W0f52wgE5/T42simL5fulouAAAADnuvslw4FIm8m8loS45P6W0eAAAAAjxtE6/kD5zRADJiATJjD5zR52sgwFYprlMxDnCiK2SIEmCSD4C0nMpnTZZGnVxBEnaom8hnoc1nBFCDEq/kP4tQBk2AErLnFqrcATBhwlQoEHutkL9oSIddTZJHQZc7F3CiSpBHE7TpFLPouVMo4mUfgbVdQYxDo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IY1ABPG1Ep6ZqRKYQJ7uI+CBeP09Fc7rXVyhEIE4KItQ+NV5Doo/3pAAumCWSEBK5NXMMAinMj
|
2021-02-11 16:33:46 +08:00
|
|
|
</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<p><?=$mailboxdata['local_part'];?>@<b><?=$mailboxdata['domain_xmpp_prefix'];?>.<?=$mailboxdata['domain'];?></b>
|
2021-02-13 03:07:08 +08:00
|
|
|
<?php if ($mailboxdata['attributes']['xmpp_admin'] == 1) { ?>
|
2021-02-11 16:33:46 +08:00
|
|
|
<div class="label label-warning">Administrator</div>
|
|
|
|
<?php } ?>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2019-12-15 20:02:38 +08:00
|
|
|
<hr>
|
2019-02-16 03:20:14 +08:00
|
|
|
<?php // Get user information about aliases
|
|
|
|
$user_get_alias_details = user_get_alias_details($username);
|
2021-05-21 18:48:19 +08:00
|
|
|
$user_domains[] = mailbox('get', 'mailbox_details', $username)['domain'];
|
|
|
|
$user_alias_domains = $user_get_alias_details['alias_domains'];
|
|
|
|
if (!empty($user_alias_domains)) {
|
|
|
|
$user_domains = array_merge($user_domains, $user_alias_domains);
|
|
|
|
}
|
2019-02-16 03:20:14 +08:00
|
|
|
?>
|
|
|
|
<div class="row">
|
2021-05-26 20:02:27 +08:00
|
|
|
<div class="col-md-3 col-xs-5 text-right"><i class="bi bi-pin-angle"></i> <?=$lang['user']['direct_aliases'];?>:
|
2019-02-16 03:20:14 +08:00
|
|
|
<p class="small"><?=$lang['user']['direct_aliases_desc'];?></p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<?php
|
2021-05-26 20:02:27 +08:00
|
|
|
if (empty($user_get_alias_details['direct_aliases'])) {
|
|
|
|
echo '<i class="bi bi-x-lg"></i>';
|
2019-02-16 03:20:14 +08:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
foreach (array_filter($user_get_alias_details['direct_aliases']) as $direct_alias => $direct_alias_meta) {
|
|
|
|
(!empty($direct_alias_meta['public_comment'])) ?
|
2021-05-26 20:02:27 +08:00
|
|
|
printf('%s — <i class="bi bi-chat-left"></i> %s<br>', $direct_alias, $direct_alias_meta['public_comment']) :
|
2019-02-16 03:20:14 +08:00
|
|
|
printf('%s<br>', $direct_alias);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-26 20:02:27 +08:00
|
|
|
<br>
|
2019-02-16 03:20:14 +08:00
|
|
|
<div class="row">
|
2021-05-26 20:02:27 +08:00
|
|
|
<div class="col-md-3 col-xs-5 text-right"><i class="bi bi-share"></i> <?=$lang['user']['shared_aliases'];?>:
|
2019-02-16 03:20:14 +08:00
|
|
|
<p class="small"><?=$lang['user']['shared_aliases_desc'];?></p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<?php
|
2021-05-26 20:02:27 +08:00
|
|
|
if (empty($user_get_alias_details['shared_aliases'])) {
|
|
|
|
echo '<i class="bi bi-x-lg"></i>';
|
2019-02-16 03:20:14 +08:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
foreach (array_filter($user_get_alias_details['shared_aliases']) as $shared_alias => $shared_alias_meta) {
|
|
|
|
(!empty($shared_alias_meta['public_comment'])) ?
|
|
|
|
printf('%s — <span class="bg-info">%s</span><br>', $shared_alias, $shared_alias_meta['public_comment']) :
|
|
|
|
printf('%s<br>', $shared_alias);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="row">
|
|
|
|
<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">
|
2021-06-09 17:05:27 +08:00
|
|
|
<p><?=($user_get_alias_details['aliases_also_send_as'] == '*') ? $lang['user']['sender_acl_disabled'] : (empty($user_get_alias_details['aliases_also_send_as'])) ? '<i class="bi bi-x-lg"></i>' : $user_get_alias_details['aliases_also_send_as'] ;?></p>
|
2019-02-16 03:20:14 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<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">
|
2021-05-26 20:02:27 +08:00
|
|
|
<p><?=(empty($user_get_alias_details['aliases_send_as_all'])) ? '<i class="bi bi-x-lg"></i>' : '' ;?></p>
|
2019-02-16 03:20:14 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['is_catch_all'];?>:</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
2021-05-26 20:02:27 +08:00
|
|
|
<p><?=(empty($user_get_alias_details['is_catch_all'])) ? '<i class="bi bi-x-lg"></i>' : '' ;?></p>
|
2019-02-16 03:20:14 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-22 13:17:55 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-user-settings">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading"><?=$lang['user']['mailbox_settings'];?></div>
|
|
|
|
<div class="panel-body">
|
2019-02-16 03:20:14 +08:00
|
|
|
<?php
|
|
|
|
// Show tagging options
|
|
|
|
$get_tagging_options = mailbox('get', 'delimiter_action', $username);
|
|
|
|
?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['tag_handling'];?>:</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['delimiter_action'];?>">
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($get_tagging_options == "subfolder") ? 'active' : null; ?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="delimiter_action"
|
|
|
|
data-api-url='edit/delimiter_action'
|
|
|
|
data-api-attr='{"tagged_mail_handler":"subfolder"}'><?=$lang['user']['tag_in_subfolder'];?></button>
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($get_tagging_options == "subject") ? 'active' : null; ?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="delimiter_action"
|
|
|
|
data-api-url='edit/delimiter_action'
|
|
|
|
data-api-attr='{"tagged_mail_handler":"subject"}'><?=$lang['user']['tag_in_subject'];?></button>
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($get_tagging_options == "none") ? 'active' : null; ?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="delimiter_action"
|
|
|
|
data-api-url='edit/delimiter_action'
|
|
|
|
data-api-attr='{"tagged_mail_handler":"none"}'><?=$lang['user']['tag_in_none'];?></button>
|
|
|
|
</div>
|
|
|
|
<p class="help-block"><?=$lang['user']['tag_help_explain'];?></p>
|
|
|
|
<p class="help-block"><?=$lang['user']['tag_help_example'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
// Show TLS policy options
|
|
|
|
$get_tls_policy = mailbox('get', 'tls_policy', $username);
|
|
|
|
?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['tls_policy'];?>:</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['tls_policy'];?>">
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($get_tls_policy['tls_enforce_in'] == "1") ? "active" : null;?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="tls_policy"
|
|
|
|
data-api-url='edit/tls_policy'
|
|
|
|
data-api-attr='{"tls_enforce_in":<?=($get_tls_policy['tls_enforce_in'] == "1") ? "0" : "1";?>}'><?=$lang['user']['tls_enforce_in'];?></button>
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($get_tls_policy['tls_enforce_out'] == "1") ? "active" : null;?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="tls_policy"
|
|
|
|
data-api-url='edit/tls_policy'
|
|
|
|
data-api-attr='{"tls_enforce_out":<?=($get_tls_policy['tls_enforce_out'] == "1") ? "0" : "1";?>}'><?=$lang['user']['tls_enforce_out'];?></button>
|
|
|
|
</div>
|
|
|
|
<p class="help-block"><?=$lang['user']['tls_policy_warning'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
// Show quarantine_notification options
|
|
|
|
$quarantine_notification = mailbox('get', 'quarantine_notification', $username);
|
2020-11-29 00:41:48 +08:00
|
|
|
$quarantine_category = mailbox('get', 'quarantine_category', $username);
|
2019-02-16 03:20:14 +08:00
|
|
|
?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['quarantine_notification'];?>:</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['quarantine_notification'];?>">
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "never") ? "active" : null;?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="quarantine_notification"
|
|
|
|
data-api-url='edit/quarantine_notification'
|
|
|
|
data-api-attr='{"quarantine_notification":"never"}'><?=$lang['user']['never'];?></button>
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "hourly") ? "active" : null;?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="quarantine_notification"
|
|
|
|
data-api-url='edit/quarantine_notification'
|
|
|
|
data-api-attr='{"quarantine_notification":"hourly"}'><?=$lang['user']['hourly'];?></button>
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "daily") ? "active" : null;?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="quarantine_notification"
|
|
|
|
data-api-url='edit/quarantine_notification'
|
|
|
|
data-api-attr='{"quarantine_notification":"daily"}'><?=$lang['user']['daily'];?></button>
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "weekly") ? "active" : null;?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="quarantine_notification"
|
|
|
|
data-api-url='edit/quarantine_notification'
|
|
|
|
data-api-attr='{"quarantine_notification":"weekly"}'><?=$lang['user']['weekly'];?></button>
|
|
|
|
</div>
|
|
|
|
<p class="help-block"><?=$lang['user']['quarantine_notification_info'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-29 00:41:48 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['quarantine_category'];?>:</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['quarantine_category'];?>">
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($quarantine_category == "reject") ? "active" : null;?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="quarantine_category"
|
|
|
|
data-api-url='edit/quarantine_category'
|
|
|
|
data-api-attr='{"quarantine_category":"reject"}'><?=$lang['user']['q_reject'];?></button>
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($quarantine_category == "add_header") ? "active" : null;?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="quarantine_category"
|
|
|
|
data-api-url='edit/quarantine_category'
|
|
|
|
data-api-attr='{"quarantine_category":"add_header"}'><?=$lang['user']['q_add_header'];?></button>
|
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($quarantine_category == "all") ? "active" : null;?>"
|
|
|
|
data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="quarantine_category"
|
|
|
|
data-api-url='edit/quarantine_category'
|
|
|
|
data-api-attr='{"quarantine_category":"all"}'><?=$lang['user']['q_all'];?></button>
|
|
|
|
</div>
|
|
|
|
<p class="help-block"><?=$lang['user']['quarantine_category_info'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-29 16:57:49 +08:00
|
|
|
<?php if (getenv('SKIP_SOGO') != "y") { ?>
|
2019-02-16 03:20:14 +08:00
|
|
|
<hr>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['eas_reset'];?>:</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<button class="btn btn-xs btn-default" data-acl="<?=$_SESSION['acl']['eas_reset'];?>" data-action="delete_selected" data-text="<?=$lang['user']['eas_reset'];?>?" data-item="<?= htmlentities($username); ?>" data-id="eas_cache" data-api-url='delete/eas_cache' href="#"><?=$lang['user']['eas_reset_now'];?></button>
|
|
|
|
<p class="help-block"><?=$lang['user']['eas_reset_help'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['sogo_profile_reset'];?>:</div>
|
|
|
|
<div class="col-md-9 col-xs-7">
|
|
|
|
<button class="btn btn-xs btn-default" data-acl="<?=$_SESSION['acl']['sogo_profile_reset'];?>" data-action="delete_selected" data-text="<?=$lang['user']['sogo_profile_reset'];?>?" data-item="<?= htmlentities($username); ?>" data-id="sogo_profile" data-api-url='delete/sogo_profile' href="#"><?=$lang['user']['sogo_profile_reset_now'];?></button>
|
|
|
|
<p class="help-block"><?=$lang['user']['sogo_profile_reset_help'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-29 16:57:49 +08:00
|
|
|
<?php } ?>
|
2019-02-16 03:20:14 +08:00
|
|
|
</div>
|
2018-10-24 03:14:57 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-02-16 03:20:14 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="SpamAliases">
|
2017-05-23 15:36:59 +08:00
|
|
|
<div class="row">
|
2017-06-07 03:58:48 +08:00
|
|
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
2017-05-23 15:36:59 +08:00
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped" id="tla_table"></table>
|
|
|
|
</div>
|
2017-01-22 23:41:45 +08:00
|
|
|
</div>
|
2017-05-23 15:36:59 +08:00
|
|
|
</div>
|
|
|
|
<div class="mass-actions-user">
|
2018-09-10 03:17:59 +08:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_alias'];?>">
|
2017-05-23 15:36:59 +08:00
|
|
|
<div class="btn-group">
|
2021-05-22 18:13:37 +08:00
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="tla" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
|
2017-05-23 15:36:59 +08:00
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
2018-10-17 02:08:52 +08:00
|
|
|
<li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"1"}' href="#"><?=$lang['user']['expire_in'];?> 1 <?=$lang['user']['hour'];?></a></li>
|
|
|
|
<li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"24"}' href="#"><?=$lang['user']['expire_in'];?> 1 <?=$lang['user']['day'];?></a></li>
|
|
|
|
<li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"168"}' href="#"><?=$lang['user']['expire_in'];?> 1 <?=$lang['user']['week'];?></a></li>
|
2021-05-21 18:48:19 +08:00
|
|
|
<li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"744"}' href="#"><?=$lang['user']['expire_in'];?> 1 <?=$lang['user']['month'];?></a></li>
|
|
|
|
<li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"8760"}' href="#"><?=$lang['user']['expire_in'];?> 1 <?=$lang['user']['year'];?></a></li>
|
|
|
|
<li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"87600"}' href="#"><?=$lang['user']['expire_in'];?> 10 <?=$lang['user']['years'];?></a></li>
|
2017-05-23 15:36:59 +08:00
|
|
|
<li role="separator" class="divider"></li>
|
2018-10-03 18:05:01 +08:00
|
|
|
<li><a data-action="delete_selected" data-id="tla" data-api-url='delete/time_limited_alias' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
2017-05-23 15:36:59 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group">
|
2021-05-22 18:13:37 +08:00
|
|
|
<a class="btn btn-sm btn-success dropdown-toggle" data-toggle="dropdown" href="#"><i class="bi bi-plus-lg"></i> <?=$lang['user']['alias_create_random'];?>, 1 <?=$lang['user']['year'];?> <span class="caret"></span></a>
|
2017-05-23 15:36:59 +08:00
|
|
|
<ul class="dropdown-menu">
|
2021-05-21 18:48:19 +08:00
|
|
|
<?php
|
|
|
|
foreach($user_domains as $domain) {
|
|
|
|
?>
|
|
|
|
<li>
|
|
|
|
<a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"domain":"<?=$domain;?>"}' href="#">
|
|
|
|
@ <?=$domain;?>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2017-05-23 15:36:59 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
2017-01-22 23:41:45 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-12-10 03:39:02 +08:00
|
|
|
</div>
|
2021-06-22 13:17:55 +08:00
|
|
|
|
2016-12-10 03:39:02 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="Spamfilter">
|
|
|
|
<h4><?=$lang['user']['spamfilter_behavior'];?></h4>
|
2017-05-23 15:36:59 +08:00
|
|
|
<form class="form-horizontal" role="form" data-id="spam_score" method="post">
|
2016-12-10 03:39:02 +08:00
|
|
|
<div class="form-group">
|
2021-05-21 18:48:19 +08:00
|
|
|
<div class="col-lg-8 col-sm-12">
|
|
|
|
<div id="spam_score" data-provide="slider" data-acl="<?=$_SESSION['acl']['spam_score'];?>"></div>
|
|
|
|
<input id="spam_score_value" name="spam_score" type="hidden" value="<?=mailbox('get', 'spam_score', $username);?>">
|
|
|
|
<ul class="list-group list-group-flush">
|
|
|
|
<li class="list-group-item"><span class="label label-ham spam-ham-score"></span> <?=$lang['user']['spamfilter_green'];?></li>
|
|
|
|
<li class="list-group-item"><span class="label label-spam spam-spam-score"></span> <?=$lang['user']['spamfilter_yellow'];?></li>
|
|
|
|
<li class="list-group-item"><span class="label label-reject spam-reject-score"></span> <?=$lang['user']['spamfilter_red'];?></li>
|
2016-12-10 03:39:02 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-21 18:48:19 +08:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
2021-05-22 18:13:37 +08:00
|
|
|
<a type="button" class="btn btn-sm btn-default" data-action="edit_selected"
|
2021-05-21 18:48:19 +08:00
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="spam_score"
|
|
|
|
data-api-url='edit/spam-score'
|
2021-05-22 18:13:37 +08:00
|
|
|
data-api-attr='{}'><i class="bi bi-save"></i> <?=$lang['user']['save_changes'];?></a>
|
2021-05-21 18:48:19 +08:00
|
|
|
<a type="button" class="btn btn-sm btn-default" data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="spam_score_reset"
|
|
|
|
data-api-url='edit/spam-score'
|
|
|
|
data-api-attr='{"spam_score":"default"}'><?=$lang['user']['spam_score_reset'];?></a>
|
|
|
|
</div>
|
2016-12-10 03:39:02 +08:00
|
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">
|
2017-05-23 15:36:59 +08:00
|
|
|
<h4><?=$lang['user']['spamfilter_wl'];?></h4>
|
|
|
|
<p><?=$lang['user']['spamfilter_wl_desc'];?></p>
|
2017-05-27 05:02:04 +08:00
|
|
|
<form class="form-inline" data-id="add_wl_policy_mailbox">
|
2018-09-10 03:17:59 +08:00
|
|
|
<div class="input-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
2019-01-31 22:45:31 +08:00
|
|
|
<input type="text" class="form-control" name="object_from" placeholder="*@example.org" required>
|
2017-05-23 15:36:59 +08:00
|
|
|
<span class="input-group-btn">
|
2021-05-22 18:13:37 +08:00
|
|
|
<button class="btn btn-default" data-action="add_item" data-id="add_wl_policy_mailbox" data-api-url='add/mailbox-policy' data-api-attr='{"username":<?= json_encode($username); ?>,"object_list":"wl"}' href="#"><i class="bi bi-plus-lg"></i> <?=$lang['user']['spamfilter_table_add'];?></button>
|
2017-05-23 15:36:59 +08:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<div class="mass-actions-user">
|
2018-09-10 03:17:59 +08:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
2021-05-22 18:13:37 +08:00
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="policy_wl_mailbox" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
|
2021-02-11 20:09:19 +08:00
|
|
|
<a class="btn btn-sm btn-danger" data-action="delete_selected" data-id="policy_wl_mailbox" data-api-url='delete/mailbox-policy' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
2017-01-19 04:28:31 +08:00
|
|
|
</div>
|
2017-05-23 15:36:59 +08:00
|
|
|
</div>
|
2021-02-11 20:09:19 +08:00
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped table-condensed" id="wl_policy_mailbox_table"></table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<h4><?=$lang['user']['spamfilter_bl'];?></h4>
|
|
|
|
<p><?=$lang['user']['spamfilter_bl_desc'];?></p>
|
2017-05-27 05:02:04 +08:00
|
|
|
<form class="form-inline" data-id="add_bl_policy_mailbox">
|
2018-09-10 03:17:59 +08:00
|
|
|
<div class="input-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
2019-01-31 22:45:31 +08:00
|
|
|
<input type="text" class="form-control" name="object_from" placeholder="*@example.org" required>
|
2017-05-23 15:36:59 +08:00
|
|
|
<span class="input-group-btn">
|
2021-05-22 18:13:37 +08:00
|
|
|
<button class="btn btn-default" data-action="add_item" data-id="add_bl_policy_mailbox" data-api-url='add/mailbox-policy' data-api-attr='{"username":<?= json_encode($username); ?>,"object_list":"bl"}' href="#"><i class="bi bi-plus-lg"></i> <?=$lang['user']['spamfilter_table_add'];?></button>
|
2017-05-23 15:36:59 +08:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</form>
|
2021-02-11 20:09:19 +08:00
|
|
|
<div class="mass-actions-user">
|
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
2021-05-22 18:13:37 +08:00
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="policy_bl_mailbox" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
|
2021-02-11 20:09:19 +08:00
|
|
|
<a class="btn btn-sm btn-danger" data-action="delete_selected" data-id="policy_bl_mailbox" data-api-url='delete/mailbox-policy' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped table-condensed" id="bl_policy_mailbox_table"></table>
|
|
|
|
</div>
|
2017-05-23 15:36:59 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-01-13 03:26:10 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="Syncjobs">
|
2017-01-16 00:39:17 +08:00
|
|
|
<div class="table-responsive">
|
2017-05-18 03:17:00 +08:00
|
|
|
<table class="table table-striped" id="sync_job_table"></table>
|
2017-01-13 03:26:10 +08:00
|
|
|
</div>
|
2017-05-18 03:17:00 +08:00
|
|
|
<div class="mass-actions-user">
|
2018-09-10 03:17:59 +08:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['syncjobs'];?>">
|
2021-05-22 18:13:37 +08:00
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="syncjob" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
|
2017-05-18 03:17:00 +08:00
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
2018-10-03 18:05:01 +08:00
|
|
|
<li><a data-action="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
|
|
|
|
<li><a data-action="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
|
2017-05-18 03:17:00 +08:00
|
|
|
<li role="separator" class="divider"></li>
|
2018-10-24 03:14:57 +08:00
|
|
|
<li><a data-action="delete_selected" data-id="syncjob" data-api-url='delete/syncjob' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
2017-05-18 03:17:00 +08:00
|
|
|
</ul>
|
2021-05-22 18:13:37 +08:00
|
|
|
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addSyncJobModal"><i class="bi bi-plus-lg"></i> <?=$lang['user']['create_syncjob'];?></a>
|
2017-05-18 03:17:00 +08:00
|
|
|
</div>
|
2019-12-02 18:02:19 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-04-11 02:57:01 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="Pushover">
|
|
|
|
<form data-id="pushover" class="form well" method="post">
|
2020-04-16 17:32:53 +08:00
|
|
|
<input type="hidden" value="0" name="evaluate_x_prio">
|
|
|
|
<input type="hidden" value="0" name="only_x_prio">
|
2020-04-11 02:57:01 +08:00
|
|
|
<input type="hidden" value="0" name="active">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-1">
|
|
|
|
<p class="help-block"><a href="https://pushover.net" target="_blank"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAACglBMVEUAAAAAAAEAAAAilecFGigAAAAAAAAAAAAAAAANj+c3n+Ypm+oeYI4KWI4MieAtkdQbleoJcLcjmeswmN4Rit4KgdMKUYQJKUAQSnILL0kMNlMSTngimOoNPF0hlOQBBgkNOlkRS3MHIjUhk+IPf8wKLUYsjM0AAAASTngAAAAAAAAPfckbdLIbdrYUWIgegsgce70knfEAAAAknfENOVkGHi8YaaIjnvEdgMUhkuAQSG8aca0hleQUh9YLjOM4nOEMgtMcbaYWa6YemO02ltkKhNktgLodYZEPXJEyi8kKesktfLUzj84cWYMiluckZ5YJXJYeW4Y0k9YKfs4yjs0pc6YHZaUviskLfMkqmugak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3KQZj/q6KxQnmDoXwFY0VSrN9e8FRXBCTAvwAAAABJRU5ErkJggg==" class="img img-fluid"></a></p>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-10">
|
2020-04-18 16:04:54 +08:00
|
|
|
<p class="help-block"><?=sprintf($lang['user']['pushover_info'], $username);?></p>
|
2020-04-18 16:06:02 +08:00
|
|
|
<p class="help-block"><?=$lang['user']['pushover_vars'];?>: <code>{SUBJECT}</code>, <code>{SENDER}</code></p>
|
2020-04-17 22:56:28 +08:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="token">API Token/Key (Application)</label>
|
|
|
|
<input type="text" class="form-control" name="token" maxlength="30" value="<?=$pushover_data['token'];?>" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="key">User/Group Key</label>
|
|
|
|
<input type="text" class="form-control" name="key" maxlength="30" value="<?=$pushover_data['key'];?>" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group">
|
2020-04-18 16:04:54 +08:00
|
|
|
<label for="title"><?=$lang['user']['pushover_title'];?></label>
|
2020-04-17 22:56:28 +08:00
|
|
|
<input type="text" class="form-control" name="title" value="<?=$pushover_data['title'];?>" placeholder="Mail">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group">
|
2020-04-18 16:04:54 +08:00
|
|
|
<label for="text"><?=$lang['user']['pushover_text'];?></label>
|
2020-04-17 22:56:28 +08:00
|
|
|
<input type="text" class="form-control" name="text" value="<?=$pushover_data['text'];?>" placeholder="You've got mail 📧">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="form-group">
|
2020-04-18 16:04:54 +08:00
|
|
|
<label for="text"><?=$lang['user']['pushover_sender_array'];?></label>
|
2020-04-17 22:56:28 +08:00
|
|
|
<input type="text" class="form-control" name="senders" value="<?=$pushover_data['senders'];?>" placeholder="sender1@example.com, sender2@example.com">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="checkbox">
|
|
|
|
<label><input type="checkbox" value="1" name="active" <?=($pushover_data['active']=="1") ? "checked" : null;?>> <?=$lang['user']['active'];?></label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
2021-05-22 18:13:37 +08:00
|
|
|
<legend style="cursor:pointer;margin-top:10px" data-target="#po_advanced" unselectable="on" data-toggle="collapse">
|
|
|
|
<i style="font-size:10pt;" class="bi bi-plus-square"></i> <?=$lang['user']['advanced_settings'];?>
|
2020-04-17 22:56:28 +08:00
|
|
|
</legend>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div id="po_advanced" class="collapse">
|
|
|
|
<div class="form-group">
|
2020-04-18 16:04:54 +08:00
|
|
|
<label for="text"><?=$lang['user']['pushover_sender_regex'];?></label>
|
2020-04-17 22:56:28 +08:00
|
|
|
<input type="text" class="form-control" name="senders_regex" value="<?=$pushover_data['senders_regex'];?>" placeholder="/(.*@example\.org$|^foo@example\.com$)/i" regex="true">
|
|
|
|
<div class="checkbox">
|
2020-04-18 16:04:54 +08:00
|
|
|
<label><input type="checkbox" value="1" name="evaluate_x_prio" <?=($pushover_data['attributes']['evaluate_x_prio']=="1") ? "checked" : null;?>> <?=$lang['user']['pushover_evaluate_x_prio'];?></label>
|
2020-04-17 22:56:28 +08:00
|
|
|
</div>
|
|
|
|
<div class="checkbox">
|
2020-04-18 16:04:54 +08:00
|
|
|
<label><input type="checkbox" value="1" name="only_x_prio" <?=($pushover_data['attributes']['only_x_prio']=="1") ? "checked" : null;?>> <?=$lang['user']['pushover_only_x_prio'];?></label>
|
2020-04-17 22:56:28 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-11 02:57:01 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['pushover'];?>">
|
|
|
|
<a class="btn btn-sm btn-default" data-action="edit_selected" data-id="pushover" data-item="<?=htmlspecialchars($username);?>" data-api-url='edit/pushover' data-api-attr='{}' href="#"><?=$lang['user']['save'];?></a>
|
2021-05-22 18:13:37 +08:00
|
|
|
<a class="btn btn-sm btn-default" data-action="edit_selected" data-id="pushover-test" data-item="<?=htmlspecialchars($username);?>" data-api-url='edit/pushover-test' data-api-attr='{}' href="#"><i class="bi bi-check-all"></i> <?=$lang['user']['pushover_verify'];?></a>
|
2021-05-26 20:02:27 +08:00
|
|
|
<a id="pushover_delete" class="btn btn-sm btn-danger" data-action="edit_selected" data-id="pushover-delete" data-item="<?=htmlspecialchars($username);?>" data-api-url='edit/pushover' data-api-attr='{"delete":"true"}' href="#"><i class="bi bi-trash"></i> <?=$lang['user']['remove'];?></a>
|
2020-04-11 02:57:01 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2019-12-02 18:02:19 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="AppPasswds">
|
|
|
|
<p><?=$lang['user']['app_hint'];?></p>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped" id="app_passwd_table"></table>
|
|
|
|
</div>
|
|
|
|
<div class="mass-actions-user">
|
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['app_passwds'];?>">
|
2021-05-22 18:13:37 +08:00
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="apppasswd" href="#"><i class="bi bi-check-all"></i> <?=$lang['mailbox']['toggle_all'];?></a>
|
2019-12-02 18:02:19 +08:00
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a data-action="edit_selected" data-id="apppasswd" data-api-url='edit/app-passwd' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
|
|
|
|
<li><a data-action="edit_selected" data-id="apppasswd" data-api-url='edit/app-passwd' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
|
|
|
|
<li role="separator" class="divider"></li>
|
|
|
|
<li><a data-action="delete_selected" data-id="apppasswd" data-api-url='delete/app-passwd' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
|
|
|
</ul>
|
2021-05-22 18:13:37 +08:00
|
|
|
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addAppPasswdModal"><i class="bi bi-plus-lg"></i> <?=$lang['user']['create_app_passwd'];?></a>
|
2019-12-02 18:02:19 +08:00
|
|
|
</div>
|
2017-05-18 03:17:00 +08:00
|
|
|
</div>
|
2017-01-16 00:39:17 +08:00
|
|
|
</div>
|
2019-12-02 18:02:19 +08:00
|
|
|
|
2017-01-13 03:26:10 +08:00
|
|
|
</div>
|
2019-02-16 03:20:14 +08:00
|
|
|
|
2017-07-29 16:32:17 +08:00
|
|
|
</div><!-- /container -->
|
2017-01-26 02:07:30 +08:00
|
|
|
<div style="margin-bottom:200px;"></div>
|
2017-05-27 05:02:04 +08:00
|
|
|
<?php
|
2017-07-29 16:32:17 +08:00
|
|
|
}
|
2018-10-04 20:38:12 +08:00
|
|
|
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] != 'admin') {
|
2017-05-27 05:02:04 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/user.php';
|
|
|
|
?>
|
2017-05-18 03:17:00 +08:00
|
|
|
<script type='text/javascript'>
|
|
|
|
<?php
|
|
|
|
$lang_user = json_encode($lang['user']);
|
2021-05-21 18:48:19 +08:00
|
|
|
echo "var lang = " . $lang_user . ";\n";
|
|
|
|
echo "var user_spam_score = [" . mailbox('get', 'spam_score', $username) . "];\n";
|
|
|
|
echo "var acl = '" . json_encode($_SESSION['acl']) . "';\n";
|
|
|
|
echo "var csrf_token = '" . $_SESSION['CSRF']['TOKEN'] . "';\n";
|
|
|
|
echo "var mailcow_cc_username = '" . $_SESSION['mailcow_cc_username'] . "';\n";
|
|
|
|
echo "var pagination_size = '" . $PAGINATION_SIZE . "';\n";
|
2017-05-18 03:17:00 +08:00
|
|
|
?>
|
|
|
|
</script>
|
2016-12-10 03:39:02 +08:00
|
|
|
<?php
|
2019-01-31 22:45:31 +08:00
|
|
|
$js_minifier->add('/web/js/site/user.js');
|
2019-12-08 04:41:15 +08:00
|
|
|
$js_minifier->add('/web/js/site/pwgen.js');
|
2018-10-11 17:59:23 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
|
2017-01-26 02:07:30 +08:00
|
|
|
}
|
|
|
|
else {
|
2016-12-10 03:39:02 +08:00
|
|
|
header('Location: /');
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
?>
|