2016-12-09 20:39:02 +01:00
|
|
|
<?php
|
2018-10-11 11:59:23 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
|
2017-01-25 19:07:30 +01:00
|
|
|
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'domainadmin') {
|
|
|
|
|
|
|
|
/*
|
|
|
|
/ DOMAIN ADMIN
|
|
|
|
*/
|
|
|
|
|
2018-10-11 11:59:23 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
2016-12-09 20:39:02 +01:00
|
|
|
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
2017-02-13 13:42:54 +01:00
|
|
|
$tfa_data = get_tfa();
|
2016-12-09 20:39:02 +01: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-29 22:01:23 +02:00
|
|
|
|
2016-12-09 20:39:02 +01:00
|
|
|
?>
|
|
|
|
<div class="container">
|
2017-01-25 19:07:30 +01: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>
|
2018-08-03 20:31:33 +02:00
|
|
|
<p><small>
|
|
|
|
<?php
|
|
|
|
if ($_SESSION['mailcow_cc_last_login']['remote']):
|
|
|
|
?>
|
|
|
|
<span style="margin-right:10px" class="glyphicon glyphicon-log-in"></span> <span data-time="<?=$_SESSION['mailcow_cc_last_login']['time'];?>" class="last_login_date"></span> (<?=$_SESSION['mailcow_cc_last_login']['remote'];?>)
|
|
|
|
<?php
|
|
|
|
else: echo "Last login: -"; endif;
|
|
|
|
?>
|
|
|
|
</small></p>
|
[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-29 22:01:23 +02:00
|
|
|
<p>
|
2017-01-09 11:08:45 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-25 19:07:30 +01:00
|
|
|
<hr>
|
|
|
|
<div class="row">
|
2017-12-09 13:17:15 +01:00
|
|
|
<div class="col-sm-3 col-xs-5 text-right"><?=$lang['tfa']['tfa'];?></div>
|
2017-02-13 13:42:54 +01:00
|
|
|
<div class="col-sm-9 col-xs-7">
|
|
|
|
<p id="tfa_pretty"><?=$tfa_data['pretty'];?></p>
|
|
|
|
<div id="tfa_additional">
|
2017-05-23 09:36:59 +02:00
|
|
|
<?php if (!empty($tfa_data['additional'])):
|
2017-02-13 13:42:54 +01:00
|
|
|
foreach ($tfa_data['additional'] as $key_info): ?>
|
2017-02-14 21:54:09 +01:00
|
|
|
<form style="display:inline;" method="post">
|
2017-02-13 13:42:54 +01:00
|
|
|
<input type="hidden" name="unset_tfa_key" value="<?=$key_info['id'];?>" />
|
2017-05-23 22:23:46 +02:00
|
|
|
<div class="label label-default">🔑 <?=$key_info['key_id'];?> <a href="#" style="font-weight:bold;color:white" onClick="$(this).closest('form').submit()">[<?=strtolower($lang['admin']['remove']);?>]</a></div>
|
2017-02-13 13:42:54 +01:00
|
|
|
</form>
|
|
|
|
<?php endforeach;
|
|
|
|
endif;?>
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
</div>
|
2017-01-09 11:08:45 +01:00
|
|
|
</div>
|
2017-01-25 19:07:30 +01:00
|
|
|
<div class="row">
|
2017-12-09 13:17:15 +01: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-25 19:07:30 +01:00
|
|
|
<select id="selectTFA" class="selectpicker" title="<?=$lang['tfa']['select'];?>">
|
|
|
|
<option value="yubi_otp"><?=$lang['tfa']['yubi_otp'];?></option>
|
2017-02-13 13:42:54 +01:00
|
|
|
<option value="u2f"><?=$lang['tfa']['u2f'];?></option>
|
2017-05-03 18:02:04 +02:00
|
|
|
<option value="totp"><?=$lang['tfa']['totp'];?></option>
|
2017-01-25 19:07:30 +01:00
|
|
|
<option value="none"><?=$lang['tfa']['none'];?></option>
|
|
|
|
</select>
|
2017-01-09 11:08:45 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-25 19:07:30 +01:00
|
|
|
</div>
|
2017-07-29 10:32:17 +02:00
|
|
|
</div>
|
2017-01-25 19:07:30 +01:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user') {
|
|
|
|
|
|
|
|
/*
|
|
|
|
/ USER
|
|
|
|
*/
|
|
|
|
|
2018-10-11 11:59:23 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
2017-09-16 13:33:27 +02:00
|
|
|
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|
|
|
$username = $_SESSION['mailcow_cc_username'];
|
2017-05-23 09:36:59 +02:00
|
|
|
$mailboxdata = mailbox('get', 'mailbox_details', $username);
|
2017-09-16 13:33:27 +02:00
|
|
|
|
2019-01-26 22:31:28 +01:00
|
|
|
$clientconfigstr = "host=" . urlencode($mailcow_hostname) . "&email=" . urlencode($username) . "&name=" . urlencode($mailboxdata['name']) . "&ui=" . urlencode($_SERVER['HTTP_HOST']) . "&port=" . urlencode($autodiscover_config['caldav']['port']);
|
2017-07-10 21:02:30 +02:00
|
|
|
if ($autodiscover_config['useEASforOutlook'] == 'yes')
|
2017-09-16 13:33:27 +02:00
|
|
|
$clientconfigstr .= "&outlookEAS=1";
|
|
|
|
if (file_exists('thunderbird-plugins/version.csv')) {
|
2017-07-10 21:02:30 +02:00
|
|
|
$fh = fopen('thunderbird-plugins/version.csv', 'r');
|
2017-09-16 13:33:27 +02:00
|
|
|
if ($fh) {
|
|
|
|
while (($row = fgetcsv($fh, 1000, ';')) !== FALSE) {
|
2017-07-10 21:02:30 +02:00
|
|
|
if ($row[0] == 'sogo-integrator@inverse.ca') {
|
|
|
|
$clientconfigstr .= "&integrator=" . urlencode($row[1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose($fh);
|
|
|
|
}
|
|
|
|
}
|
2017-01-25 19:07:30 +01:00
|
|
|
?>
|
|
|
|
<div class="container">
|
|
|
|
<h3><?=$lang['user']['user_settings'];?></h3>
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading"><?=$lang['user']['mailbox_details'];?></div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-offset-3 col-sm-9">
|
2018-02-16 22:40:51 +01:00
|
|
|
<?php if ($mailboxdata['attributes']['force_pw_update'] == "1"): ?>
|
|
|
|
<div class="alert alert-danger"><?=$lang['user']['force_pw_update'];?></div>
|
|
|
|
<?php endif; ?>
|
2017-01-25 19:07:30 +01:00
|
|
|
<p><a href="#pwChangeModal" data-toggle="modal">[<?=$lang['user']['change_password'];?>]</a></p>
|
2017-07-10 21:02:30 +02:00
|
|
|
<p><a target="_blank" href="https://mailcow.github.io/mailcow-dockerized-docs/client/#<?=$clientconfigstr;?>">[<?=$lang['user']['client_configuration'];?>]</a></p>
|
[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-29 22:01:23 +02:00
|
|
|
<p><a href="#userFilterModal" data-toggle="modal">[<?=$lang['user']['show_sieve_filters'];?>]</a></p>
|
2018-08-03 20:31:33 +02:00
|
|
|
<p><small>
|
|
|
|
<?php
|
|
|
|
if ($_SESSION['mailcow_cc_last_login']['remote']):
|
|
|
|
?>
|
|
|
|
<span style="margin-right:10px" class="glyphicon glyphicon-log-in"></span> <span data-time="<?=$_SESSION['mailcow_cc_last_login']['time'];?>" class="last_login_date"></span> (<?=$_SESSION['mailcow_cc_last_login']['remote'];?>)
|
|
|
|
<?php
|
|
|
|
else: echo "Last login: -"; endif;
|
|
|
|
?>
|
|
|
|
</small></p>
|
2017-01-09 11:08:45 +01:00
|
|
|
</div>
|
2017-01-25 19:07:30 +01:00
|
|
|
</div>
|
2017-01-09 11:08:45 +01:00
|
|
|
<hr>
|
|
|
|
<?php // Get user information about aliases
|
2017-08-18 22:18:14 +02:00
|
|
|
$user_get_alias_details = user_get_alias_details($username);
|
|
|
|
?>
|
2017-01-09 11:08:45 +01:00
|
|
|
<div class="row">
|
2018-01-21 15:02:56 +01:00
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['direct_aliases'];?>:
|
|
|
|
<p class="small"><?=$lang['user']['direct_aliases_desc'];?></p>
|
|
|
|
</div>
|
2017-01-09 11:08:45 +01:00
|
|
|
<div class="col-md-9 col-xs-7">
|
2019-01-29 00:20:39 +01:00
|
|
|
<?php
|
|
|
|
if ($user_get_alias_details['direct_aliases'] === false) {
|
|
|
|
echo '✘';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
foreach (array_filter($user_get_alias_details['direct_aliases']) as $direct_alias => $direct_alias_meta) {
|
|
|
|
(!empty($direct_alias_meta['public_comment'])) ?
|
2019-02-07 22:37:26 +01:00
|
|
|
printf('%s — <span class="bg-info">%s</span><br>', $direct_alias, $direct_alias_meta['public_comment']) :
|
2019-01-29 00:20:39 +01:00
|
|
|
printf('%s<br>', $direct_alias);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
2017-01-15 17:39:17 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-09 13:17:15 +01:00
|
|
|
<div class="row">
|
2018-01-21 15:02:56 +01:00
|
|
|
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['shared_aliases'];?>:
|
|
|
|
<p class="small"><?=$lang['user']['shared_aliases_desc'];?></p>
|
|
|
|
</div>
|
2017-12-09 13:17:15 +01:00
|
|
|
<div class="col-md-9 col-xs-7">
|
2019-01-29 00:20:39 +01:00
|
|
|
<?php
|
|
|
|
if ($user_get_alias_details['shared_aliases'] === false) {
|
|
|
|
echo '✘';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
foreach (array_filter($user_get_alias_details['shared_aliases']) as $shared_alias => $shared_alias_meta) {
|
|
|
|
(!empty($shared_alias_meta['public_comment'])) ?
|
2019-02-07 22:37:26 +01:00
|
|
|
printf('%s — <span class="bg-info">%s</span><br>', $shared_alias, $shared_alias_meta['public_comment']) :
|
|
|
|
|
2019-01-29 00:20:39 +01:00
|
|
|
printf('%s<br>', $shared_alias);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
2017-12-09 13:17:15 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr>
|
2017-01-09 11:08:45 +01:00
|
|
|
<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">
|
2018-09-09 21:17:59 +02:00
|
|
|
<p><?=($user_get_alias_details['aliases_also_send_as'] == '*') ? $lang['user']['sender_acl_disabled'] : $user_get_alias_details['aliases_also_send_as'];?></p>
|
2017-01-09 11:08:45 +01: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">
|
2017-01-15 17:39:17 +01:00
|
|
|
<p><?=$user_get_alias_details['aliases_send_as_all'];?></p>
|
2017-01-09 11:08:45 +01: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">
|
2017-01-15 17:39:17 +01:00
|
|
|
<p><?=$user_get_alias_details['is_catch_all'];?></p>
|
2017-01-09 11:08:45 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr>
|
2017-03-03 22:26:59 +01: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);?> / <?=formatBytes($mailboxdata['quota'], 2);?>, <?=$mailboxdata['messages'];?> <?=$lang['user']['messages'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
<hr>
|
2017-08-18 22:18:14 +02:00
|
|
|
<?php
|
|
|
|
// Show tagging options
|
|
|
|
$get_tagging_options = mailbox('get', 'delimiter_action', $username);
|
|
|
|
?>
|
2017-01-09 11:08:45 +01:00
|
|
|
<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">
|
2018-09-09 21:17:59 +02:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['delimiter_action'];?>">
|
2017-05-23 09:36:59 +02:00
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($get_tagging_options == "subfolder") ? 'active' : null; ?>"
|
2018-10-03 12:05:01 +02:00
|
|
|
data-action="edit_selected"
|
2018-02-10 22:42:46 +01:00
|
|
|
data-item="<?= htmlentities($username); ?>"
|
2017-05-23 09:36:59 +02:00
|
|
|
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; ?>"
|
2018-10-03 12:05:01 +02:00
|
|
|
data-action="edit_selected"
|
2018-02-10 22:42:46 +01:00
|
|
|
data-item="<?= htmlentities($username); ?>"
|
2017-05-23 09:36:59 +02:00
|
|
|
data-id="delimiter_action"
|
|
|
|
data-api-url='edit/delimiter_action'
|
|
|
|
data-api-attr='{"tagged_mail_handler":"subject"}'><?=$lang['user']['tag_in_subject'];?></button>
|
2018-01-16 12:47:59 +01:00
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($get_tagging_options == "none") ? 'active' : null; ?>"
|
2018-10-03 12:05:01 +02:00
|
|
|
data-action="edit_selected"
|
2018-02-10 22:42:46 +01:00
|
|
|
data-item="<?= htmlentities($username); ?>"
|
2018-01-16 12:47:59 +01:00
|
|
|
data-id="delimiter_action"
|
|
|
|
data-api-url='edit/delimiter_action'
|
|
|
|
data-api-attr='{"tagged_mail_handler":"none"}'><?=$lang['user']['tag_in_none'];?></button>
|
2017-05-23 09:36:59 +02:00
|
|
|
</div>
|
2017-01-09 11:08:45 +01:00
|
|
|
<p class="help-block"><?=$lang['user']['tag_help_explain'];?></p>
|
|
|
|
<p class="help-block"><?=$lang['user']['tag_help_example'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-18 22:18:14 +02:00
|
|
|
<?php
|
|
|
|
// Show TLS policy options
|
|
|
|
$get_tls_policy = mailbox('get', 'tls_policy', $username);
|
|
|
|
?>
|
2017-05-23 09:36:59 +02:00
|
|
|
<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">
|
2018-09-09 21:17:59 +02:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['tls_policy'];?>">
|
2017-05-23 09:36:59 +02:00
|
|
|
<button type="button" class="btn btn-sm btn-default <?=($get_tls_policy['tls_enforce_in'] == "1") ? "active" : null;?>"
|
2018-10-03 12:05:01 +02:00
|
|
|
data-action="edit_selected"
|
2018-02-10 22:42:46 +01:00
|
|
|
data-item="<?= htmlentities($username); ?>"
|
2017-05-23 09:36:59 +02:00
|
|
|
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;?>"
|
2018-10-03 12:05:01 +02:00
|
|
|
data-action="edit_selected"
|
2018-02-10 22:42:46 +01:00
|
|
|
data-item="<?= htmlentities($username); ?>"
|
2017-05-23 09:36:59 +02:00
|
|
|
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>
|
2019-01-29 00:20:39 +01:00
|
|
|
<?php
|
|
|
|
// Show quarantine_notification options
|
|
|
|
$quarantine_notification = mailbox('get', 'quarantine_notification', $username);
|
|
|
|
?>
|
|
|
|
<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>
|
2018-10-23 21:14:57 +02:00
|
|
|
<hr>
|
|
|
|
|
2017-01-28 23:17:57 +01:00
|
|
|
<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">
|
2018-10-03 12:05:01 +02:00
|
|
|
<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>
|
2017-01-28 23:17:57 +01:00
|
|
|
<p class="help-block"><?=$lang['user']['eas_reset_help'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2018-10-23 21:14:57 +02:00
|
|
|
<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>
|
|
|
|
|
2016-12-09 20:39:02 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Nav tabs -->
|
|
|
|
<ul class="nav nav-pills nav-justified" role="tablist">
|
|
|
|
<li role="presentation" class="active"><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>
|
2017-01-12 20:26:10 +01:00
|
|
|
<li role="presentation"><a href="#Syncjobs" aria-controls="Syncjobs" role="tab" data-toggle="tab"><?=$lang['user']['sync_jobs'];?></a></li>
|
2016-12-09 20:39:02 +01:00
|
|
|
</ul>
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="SpamAliases">
|
2017-05-23 09:36:59 +02:00
|
|
|
<div class="row">
|
2017-06-06 21:58:48 +02:00
|
|
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
2017-05-23 09:36:59 +02:00
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped" id="tla_table"></table>
|
|
|
|
</div>
|
2017-01-22 16:41:45 +01:00
|
|
|
</div>
|
2017-05-23 09:36:59 +02:00
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2017-05-23 09:36:59 +02:00
|
|
|
<div class="mass-actions-user">
|
2018-09-09 21:17:59 +02:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_alias'];?>">
|
2017-05-23 09:36:59 +02:00
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="tla" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
|
|
|
<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-16 20:08:52 +02: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":"6"}' href="#"><?=$lang['user']['expire_in'];?> 6 <?=$lang['user']['hours'];?></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>
|
|
|
|
<li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"672"}' href="#"><?=$lang['user']['expire_in'];?> 4 <?=$lang['user']['weeks'];?></a></li>
|
2017-05-23 09:36:59 +02:00
|
|
|
<li role="separator" class="divider"></li>
|
2018-10-03 12:05:01 +02: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 09:36:59 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group">
|
2017-05-29 21:51:06 +02:00
|
|
|
<a class="btn btn-sm btn-success dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['alias_create_random'];?> <span class="caret"></span></a>
|
2017-05-23 09:36:59 +02:00
|
|
|
<ul class="dropdown-menu">
|
2018-10-03 12:05:01 +02:00
|
|
|
<li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"1"}' href="#">1 <?=$lang['user']['hour'];?></a></li>
|
|
|
|
<li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"6"}' href="#">6 <?=$lang['user']['hours'];?></a></li>
|
|
|
|
<li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"24"}' href="#">1 <?=$lang['user']['day'];?></a></li>
|
|
|
|
<li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"168"}' href="#">1 <?=$lang['user']['week'];?></a></li>
|
|
|
|
<li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"672"}' href="#">4 <?=$lang['user']['weeks'];?></a></li>
|
2017-05-23 09:36:59 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
2017-01-22 16:41:45 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2016-12-09 20:39:02 +01:00
|
|
|
</div>
|
2017-05-23 09:36:59 +02:00
|
|
|
|
2016-12-09 20:39:02 +01:00
|
|
|
<div role="tabpanel" class="tab-pane" id="Spamfilter">
|
|
|
|
<h4><?=$lang['user']['spamfilter_behavior'];?></h4>
|
2017-05-23 09:36:59 +02:00
|
|
|
<form class="form-horizontal" role="form" data-id="spam_score" method="post">
|
2016-12-09 20:39:02 +01:00
|
|
|
<div class="form-group">
|
2017-10-26 10:21:12 +02:00
|
|
|
<div class="col-lg-6 col-sm-12">
|
2018-09-09 21:17:59 +02:00
|
|
|
<input data-acl="<?=$_SESSION['acl']['spam_score'];?>" name="spam_score" id="spam_score" type="text" style="width: 100%;"
|
2016-12-09 20:39:02 +01:00
|
|
|
data-provide="slider"
|
|
|
|
data-slider-min="1"
|
2017-09-07 20:20:36 +02:00
|
|
|
data-slider-max="2000"
|
|
|
|
data-slider-scale='logarithmic'
|
2016-12-09 20:39:02 +01:00
|
|
|
data-slider-step="0.5"
|
|
|
|
data-slider-range="true"
|
2016-12-10 09:18:00 +01:00
|
|
|
data-slider-tooltip='always'
|
2016-12-09 20:39:02 +01:00
|
|
|
data-slider-id="slider1"
|
2017-05-23 09:36:59 +02:00
|
|
|
data-slider-value="[<?=mailbox('get', 'spam_score', $username);?>]"
|
2016-12-09 20:39:02 +01:00
|
|
|
data-slider-step="1" />
|
|
|
|
<br /><br />
|
|
|
|
<ul>
|
|
|
|
<li><?=$lang['user']['spamfilter_green'];?></li>
|
|
|
|
<li><?=$lang['user']['spamfilter_yellow'];?></li>
|
|
|
|
<li><?=$lang['user']['spamfilter_red'];?></li>
|
|
|
|
</ul>
|
|
|
|
<p><?=$lang['user']['spamfilter_hint'];?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2017-08-18 22:18:14 +02:00
|
|
|
<div class="form-group">
|
2017-09-07 20:20:36 +02:00
|
|
|
<div class="col-sm-10">
|
2018-10-18 21:48:30 +02:00
|
|
|
|
2016-12-09 20:39:02 +01:00
|
|
|
</div>
|
2018-10-18 21:48:30 +02:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
|
|
|
<a data-acl="<?=$_SESSION['acl']['spam_score'];?>" type="button" class="btn btn-sm btn-success" data-action="edit_selected"
|
|
|
|
data-item="<?= htmlentities($username); ?>"
|
|
|
|
data-id="spam_score"
|
|
|
|
data-api-url='edit/spam-score'
|
|
|
|
data-api-attr='{}'><?=$lang['user']['save_changes'];?></a>
|
|
|
|
<a data-acl="<?=$_SESSION['acl']['spam_score'];?>" 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-09 20:39:02 +01:00
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2016-12-09 20:39:02 +01:00
|
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">
|
2017-05-23 09:36:59 +02:00
|
|
|
<h4><?=$lang['user']['spamfilter_wl'];?></h4>
|
|
|
|
<p><?=$lang['user']['spamfilter_wl_desc'];?></p>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped table-condensed" id="wl_policy_mailbox_table"></table>
|
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2017-05-23 09:36:59 +02:00
|
|
|
<div class="mass-actions-user">
|
2018-09-09 21:17:59 +02:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
2017-05-23 09:36:59 +02:00
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="policy_wl_mailbox" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
2018-10-03 12:05:01 +02: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-18 21:28:31 +01:00
|
|
|
</div>
|
2017-05-23 09:36:59 +02:00
|
|
|
</div>
|
2017-05-26 23:02:04 +02:00
|
|
|
<form class="form-inline" data-id="add_wl_policy_mailbox">
|
2018-09-09 21:17:59 +02:00
|
|
|
<div class="input-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
2019-01-31 15:45:31 +01:00
|
|
|
<input type="text" class="form-control" name="object_from" placeholder="*@example.org" required>
|
2017-05-23 09:36:59 +02:00
|
|
|
<span class="input-group-btn">
|
2018-10-03 12:05:01 +02: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="#"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['spamfilter_table_add'];?></button>
|
2017-05-23 09:36:59 +02:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</form>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2017-05-23 09:36:59 +02:00
|
|
|
</div>
|
2016-12-09 20:39:02 +01:00
|
|
|
<div class="col-sm-6">
|
2017-05-23 09:36:59 +02:00
|
|
|
<h4><?=$lang['user']['spamfilter_bl'];?></h4>
|
|
|
|
<p><?=$lang['user']['spamfilter_bl_desc'];?></p>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped table-condensed" id="bl_policy_mailbox_table"></table>
|
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2017-05-23 09:36:59 +02:00
|
|
|
<div class="mass-actions-user">
|
2018-09-09 21:17:59 +02:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
2017-05-23 09:36:59 +02:00
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="policy_bl_mailbox" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
2018-10-03 12:05:01 +02: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>
|
2017-01-18 21:28:31 +01:00
|
|
|
</div>
|
2017-05-23 09:36:59 +02:00
|
|
|
</div>
|
2017-05-26 23:02:04 +02:00
|
|
|
<form class="form-inline" data-id="add_bl_policy_mailbox">
|
2018-09-09 21:17:59 +02:00
|
|
|
<div class="input-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
2019-01-31 15:45:31 +01:00
|
|
|
<input type="text" class="form-control" name="object_from" placeholder="*@example.org" required>
|
2017-05-23 09:36:59 +02:00
|
|
|
<span class="input-group-btn">
|
2018-10-03 12:05:01 +02: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="#"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['spamfilter_table_add'];?></button>
|
2017-05-23 09:36:59 +02:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</form>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2017-05-23 09:36:59 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-01-12 20:26:10 +01:00
|
|
|
<div role="tabpanel" class="tab-pane" id="Syncjobs">
|
2017-01-15 17:39:17 +01:00
|
|
|
<div class="table-responsive">
|
2017-05-17 21:17:00 +02:00
|
|
|
<table class="table table-striped" id="sync_job_table"></table>
|
2017-01-12 20:26:10 +01:00
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2017-05-17 21:17:00 +02:00
|
|
|
<div class="mass-actions-user">
|
2018-09-09 21:17:59 +02:00
|
|
|
<div class="btn-group" data-acl="<?=$_SESSION['acl']['syncjobs'];?>">
|
2017-05-17 21:17:00 +02:00
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="syncjob" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
|
|
|
<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 12:05:01 +02: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-17 21:17:00 +02:00
|
|
|
<li role="separator" class="divider"></li>
|
2018-10-23 21:14:57 +02:00
|
|
|
<li><a data-action="delete_selected" data-id="syncjob" data-api-url='delete/syncjob' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
2017-05-17 21:17:00 +02:00
|
|
|
</ul>
|
2017-05-29 21:51:06 +02:00
|
|
|
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addSyncJobModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['create_syncjob'];?></a>
|
2017-05-17 21:17:00 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-09-09 21:17:59 +02:00
|
|
|
|
2017-01-15 17:39:17 +01:00
|
|
|
</div>
|
2017-01-12 20:26:10 +01:00
|
|
|
</div>
|
2017-01-25 19:07:30 +01:00
|
|
|
|
2017-07-29 10:32:17 +02:00
|
|
|
</div><!-- /container -->
|
2017-01-25 19:07:30 +01:00
|
|
|
<div style="margin-bottom:200px;"></div>
|
2017-05-26 23:02:04 +02:00
|
|
|
<?php
|
2017-07-29 10:32:17 +02:00
|
|
|
}
|
2018-10-04 14:38:12 +02:00
|
|
|
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] != 'admin') {
|
2017-05-26 23:02:04 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/user.php';
|
|
|
|
?>
|
2017-05-17 21:17:00 +02:00
|
|
|
<script type='text/javascript'>
|
|
|
|
<?php
|
|
|
|
$lang_user = json_encode($lang['user']);
|
|
|
|
echo "var lang = ". $lang_user . ";\n";
|
2017-08-18 22:18:14 +02:00
|
|
|
echo "var acl = '". json_encode($_SESSION['acl']) . "';\n";
|
2017-05-17 21:17:00 +02:00
|
|
|
echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n";
|
2017-07-29 10:32:17 +02:00
|
|
|
echo "var mailcow_cc_username = '". $_SESSION['mailcow_cc_username'] . "';\n";
|
2017-05-17 21:17:00 +02:00
|
|
|
echo "var pagination_size = '". $PAGINATION_SIZE . "';\n";
|
|
|
|
?>
|
|
|
|
</script>
|
2016-12-09 20:39:02 +01:00
|
|
|
<?php
|
2019-01-31 15:45:31 +01:00
|
|
|
$js_minifier->add('/web/js/site/user.js');
|
2018-10-11 11:59:23 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
|
2017-01-25 19:07:30 +01:00
|
|
|
}
|
|
|
|
else {
|
2016-12-09 20:39:02 +01:00
|
|
|
header('Location: /');
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
?>
|