[Rspamd] More pushover options

This commit is contained in:
andryyy 2020-04-16 11:32:53 +02:00
parent 5d37f2af4f
commit c67bb75071
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
10 changed files with 137 additions and 19 deletions

View File

@ -51,8 +51,20 @@ $headers = getallheaders();
$qid = $headers['X-Rspamd-Qid']; $qid = $headers['X-Rspamd-Qid'];
$rcpts = $headers['X-Rspamd-Rcpt']; $rcpts = $headers['X-Rspamd-Rcpt'];
$sender = $headers['X-Rspamd-From'];
$ip = $headers['X-Rspamd-Ip']; $ip = $headers['X-Rspamd-Ip'];
$subject = $headers['X-Rspamd-Subject']; $subject = $headers['X-Rspamd-Subject'];
$priority = 0;
$symbols_array = json_decode($headers['X-Rspamd-Symbols'], true);
if (is_array($symbols_array)) {
foreach ($symbols_array as $symbol) {
if ($symbol['name'] == 'HAS_X_PRIO_ONE') {
$priority = 2;
break;
}
}
}
$rcpt_final_mailboxes = array(); $rcpt_final_mailboxes = array();
@ -177,7 +189,7 @@ foreach (json_decode($rcpts, true) as $rcpt) {
foreach ($rcpt_final_mailboxes as $rcpt_final) { foreach ($rcpt_final_mailboxes as $rcpt_final) {
error_log("NOTIFY: pushover pipe: processing pushover message for rcpt " . $rcpt_final . PHP_EOL); error_log("NOTIFY: pushover pipe: processing pushover message for rcpt " . $rcpt_final . " with priority " . $priority . PHP_EOL);
$stmt = $pdo->prepare("SELECT * FROM `pushover` $stmt = $pdo->prepare("SELECT * FROM `pushover`
WHERE `username` = :username AND `active` = '1'"); WHERE `username` = :username AND `active` = '1'");
$stmt->execute(array( $stmt->execute(array(
@ -187,14 +199,30 @@ foreach ($rcpt_final_mailboxes as $rcpt_final) {
if (isset($api_data['key']) && isset($api_data['token'])) { if (isset($api_data['key']) && isset($api_data['token'])) {
$title = (!empty($api_data['title'])) ? $api_data['title'] : 'Mail'; $title = (!empty($api_data['title'])) ? $api_data['title'] : 'Mail';
$text = (!empty($api_data['text'])) ? $api_data['text'] : 'You\'ve got mail 📧'; $text = (!empty($api_data['text'])) ? $api_data['text'] : 'You\'ve got mail 📧';
$attributes = json_decode($api_data['attributes'], true);
$senders = explode(',', $api_data['senders']);
if (!empty($senders) && !in_array($sender, $senders)) {
error_log("NOTIFY: pushover pipe: skipping unwanted sender " . $sender);
continue;
}
if ($attributes['only_x_prio'] == "1" && $priority == 0) {
error_log("NOTIFY: pushover pipe: mail has no X-Priority: 1 header, skipping");
continue;
}
$post_fields = array(
"token" => $api_data['token'],
"user" => $api_data['key'],
"title" => sprintf("%s", str_replace(array('{SUBJECT}', '{SENDER}'), array($subject, $sender), $title)),
"priority" => $priority,
"message" => sprintf("%s", str_replace(array('{SUBJECT}', '{SENDER}'), array($subject, $sender), $text))
);
if ($attributes['evaluate_x_prio'] == "1" && $priority == 2) {
$post_fields['expire'] = 600;
$post_fields['retry'] = 120;
}
curl_setopt_array($ch = curl_init(), array( curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "https://api.pushover.net/1/messages.json", CURLOPT_URL => "https://api.pushover.net/1/messages.json",
CURLOPT_POSTFIELDS => array( CURLOPT_POSTFIELDS => $post_fields,
"token" => $api_data['token'],
"user" => $api_data['key'],
"title" => $title,
"message" => sprintf("%s", str_replace('{SUBJECT}', $subject, $text))
),
CURLOPT_SAFE_UPLOAD => true, CURLOPT_SAFE_UPLOAD => true,
CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
)); ));

View File

@ -735,12 +735,16 @@ if (isset($_SESSION['mailcow_cc_role'])) {
</form> </form>
<hr> <hr>
<form data-id="pushover" class="form well" method="post"> <form data-id="pushover" class="form well" method="post">
<input type="hidden" value="0" name="evaluate_x_prio">
<input type="hidden" value="0" name="only_x_prio">
<input type="hidden" value="0" name="active"> <input type="hidden" value="0" name="active">
<input type="hidden" value="" name="senders">
<div class="row"> <div class="row">
<div class="col-sm-1"> <div class="col-sm-1">
<p class="help-block"><a href="https://pushover.net" target="_blank"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUg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q/C/HtDlXoSUIe3YkblhRPIX4E8Oo/9siLv8dRjV7SBlkdgTXvKS7nzsA/9AfeEuhKq9T8zWIDv1Sd6ETAP4D6/H/1V+1BojvruNa4SZXz4JhY84dV5MOF5agUvu5OsOo+KRpG30KalEnoeDccFlutPZYs38D5n3zcpr1/0fBhfb3DOY1z2tSAgLxWezz6zuoHhfUmOejf6blHQH/sFuJYfcMZX307ytKvRa3ifoV/586P5j+tICtS77BuJxzxYAPZsntX8k3eSIhlajK4p8b7iefCEKs03kD/I2LnxL9ovH+43y4fAv1YrI/mzDBsavAX/UppfzVOrZT/ydxk6lJ047MfLfVbcb6hS9ZEzWxekKQ5WrtPqZg3rV6tWrX6Tle3KQZj/q6KxQnmDoXwFY0VSrN9e8FRXBCTAvwAAAABJRU5ErkJggg==" class="img img-fluid"></a></p> <p class="help-block"><a href="https://pushover.net" target="_blank"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAACglBMVEUAAAAAAAEAAAAilecFGigAAAAAAAAAAAAAAAANj+c3n+Ypm+oeYI4KWI4MieAtkdQbleoJcLcjmeswmN4Rit4KgdMKUYQJKUAQSnILL0kMNlMSTngimOoNPF0hlOQBBgkNOlkRS3MHIjUhk+IPf8wKLUYsjM0AAAASTngAAAAAAAAPfckbdLIbdrYUWIgegsgce70knfEAAAAknfENOVkGHi8YaaIjnvEdgMUhkuAQSG8aca0hleQUh9YLjOM4nOEMgtMcbaYWa6YemO02ltkKhNktgLodYZEPXJEyi8kKesktfLUzj84cWYMiluckZ5YJXJYeW4Y0k9YKfs4yjs0pc6YHZaUviskLfMkqmugak+cqkNcViNcqeK4Iaq4XRmYGPmYMKDsFJTstgr0LdL0ti84CCQ4BCQ4Qgc8rlt8XjN8shcQsi8wZSGgEP2cRMEUDKkUAAAD///8dmvEamfExo/EXmPEWl/ERlvElnvEsofEjnfETl/Enn/Ezo/E4pvEvovEfm/E1pPEzpPEvofEOlfEpoPEamPEQlfEYm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Y5LHhED15G/isd5Hz4eKui/e/du02YoKFeD5mHzHIN/nxEDe25gQQwKorAid04CfyzwL4XutXvl1Pt1guMOwwKPkU8mYIFT8JHK+vv8prpDScUVL+j8s3lOctw1GIhbWHAS+HgKPk7xPM/4UtNAYmzizJkf6NgTb/gM8jePQLsewMdthS3g95tMpT1IhVm6v1s8fYmLeb13Odwp8Fh5KY048y/d14WUrwrb1e/X/rNp73nkD8kWS+wi/MZ4XuetG4mhKubJm3/WNEvi8SHwB56nPKjUam0LBdp9ARwupFemTYudvgN/L1+A/Ko/LGBuS8pPy+YR1fuCTWNKnUyoeUyYx2o2dyEVGmr5xTD42xzvkD16+Pb9WIIH6fmt1r3mbsTY7Bvw+n23naT8BUWh86bz6G/e259UXPUK3gfAxQDlo7Rpx3Geqb2e3wp83SGEdKpB7zvwYbzvT2n65xLwbH6YP+M9C8vA8E1wxLU8gkCbdhXGUyrMgwVrcbzLHonr78lzDvWM3q/C/HtDlXoSUIe3YkblhRPIX4E8Oo/9siLv8dRjV7SBlkdgTXvKS7nzsA/9AfeEuhKq9T8zWIDv1Sd6ETAP4D6/H/1V+1BojvruNa4SZXz4JhY84dV5MOF5agUvu5OsOo+KRpG30KalEnoeDccFlutPZYs38D5n3zcpr1/0fBhfb3DOY1z2tSAgLxWezz6zuoHhfUmOejf6blHQH/sFuJYfcMZX307ytKvRa3ifoV/586P5j+tICtS77BuJxzxYAPZsntX8k3eSIhlajK4p8b7iefCEKs03kD/I2LnxL9ovH+43y4fAv1YrI/mzDBsavAX/UppfzVOrZT/ydxk6lJ047MfLfVbcb6hS9ZEzWxekKQ5WrtPqZg3rV6tWrX6Tle3KQZj/q6KxQnmDoXwFY0VSrN9e8FRXBCTAvwAAAABJRU5ErkJggg==" class="img img-fluid"></a></p>
</div> </div>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="help-block"><?=$lang['admin']['pushover_vars'];?>: <code>{SUBJECT}</code>, <code>{SENDER}</code></p>
<div class="form-group"> <div class="form-group">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
@ -767,6 +771,22 @@ if (isset($_SESSION['mailcow_cc_role'])) {
<input type="text" class="form-control" name="text" value="<?=$pushover_data['text'];?>" placeholder="You've got mail 📧"> <input type="text" class="form-control" name="text" value="<?=$pushover_data['text'];?>" placeholder="You've got mail 📧">
</div> </div>
</div> </div>
<div class="col-sm-6">
<div class="form-group">
<label for="text"><?=$lang['admin']['pushover_sender_array'];?></label>
<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="evaluate_x_prio" <?=($pushover_data['attributes']['evaluate_x_prio']=="1") ? "checked" : null;?>> <?=$lang['edit']['evaluate_x_prio'];?></label>
</div>
</div>
<div class="col-sm-12">
<div class="checkbox">
<label><input type="checkbox" value="1" name="only_x_prio" <?=($pushover_data['attributes']['only_x_prio']=="1") ? "checked" : null;?>> <?=$lang['edit']['only_x_prio'];?></label>
</div>
</div>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="checkbox"> <div class="checkbox">
<label><input type="checkbox" value="1" name="active" <?=($pushover_data['active']=="1") ? "checked" : null;?>> <?=$lang['edit']['active'];?></label> <label><input type="checkbox" value="1" name="active" <?=($pushover_data['active']=="1") ? "checked" : null;?>> <?=$lang['edit']['active'];?></label>

View File

@ -3756,6 +3756,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
$stmt->execute(array( $stmt->execute(array(
':domain' => '%@'.$domain, ':domain' => '%@'.$domain,
)); ));
$stmt = $pdo->prepare("DELETE FROM `pushover` WHERE `username` LIKE :domain");
$stmt->execute(array(
':domain' => '%@'.$domain,
));
$stmt = $pdo->prepare("DELETE FROM `quota2replica` WHERE `username` LIKE :domain"); $stmt = $pdo->prepare("DELETE FROM `quota2replica` WHERE `username` LIKE :domain");
$stmt->execute(array( $stmt->execute(array(
':domain' => '%@'.$domain, ':domain' => '%@'.$domain,
@ -3954,6 +3958,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
$stmt->execute(array( $stmt->execute(array(
':username' => $username ':username' => $username
)); ));
$stmt = $pdo->prepare("DELETE FROM `pushover` WHERE `username` = :username");
$stmt->execute(array(
':username' => $username
));
$stmt = $pdo->prepare("DELETE FROM `quarantine` WHERE `rcpt` = :username"); $stmt = $pdo->prepare("DELETE FROM `quarantine` WHERE `rcpt` = :username");
$stmt->execute(array( $stmt->execute(array(
':username' => $username ':username' => $username

View File

@ -43,6 +43,21 @@ function pushover($_action, $_data = null) {
} }
$key = $_data['key']; $key = $_data['key'];
$token = $_data['token']; $token = $_data['token'];
$evaluate_x_prio = $_data['evaluate_x_prio'];
$only_x_prio = $_data['only_x_prio'];
$senders = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['senders']));
foreach ($senders as $i => &$sender) {
if (empty($sender)) {
continue;
}
if (!filter_var($sender, FILTER_VALIDATE_EMAIL) === true) {
unset($senders[$i]);
continue;
}
}
$senders = array_filter($senders);
if (empty($senders)) { $senders = ''; }
$senders = implode(",", $senders);
if (!ctype_alnum($key) || strlen($key) != 30) { if (!ctype_alnum($key) || strlen($key) != 30) {
$_SESSION['return'][] = array( $_SESSION['return'][] = array(
'type' => 'danger', 'type' => 'danger',
@ -62,11 +77,19 @@ function pushover($_action, $_data = null) {
$title = $_data['title']; $title = $_data['title'];
$text = $_data['text']; $text = $_data['text'];
$active = intval($_data['active']); $active = intval($_data['active']);
$stmt = $pdo->prepare("REPLACE INTO `pushover` (`username`, `key`, `token`, `title`, `text`, `active`) $po_attributes = json_encode(
VALUES (:username, :key, :token, :title, :text, :active)"); array(
'evaluate_x_prio' => strval(intval($evaluate_x_prio)),
'only_x_prio' => strval(intval($only_x_prio))
)
);
$stmt = $pdo->prepare("REPLACE INTO `pushover` (`username`, `key`, `attributes`, `senders`, `token`, `title`, `text`, `active`)
VALUES (:username, :key, :po_attributes, :senders, :token, :title, :text, :active)");
$stmt->execute(array( $stmt->execute(array(
':username' => $username, ':username' => $username,
':key' => $key, ':key' => $key,
':po_attributes' => $po_attributes,
':senders' => $senders,
':token' => $token, ':token' => $token,
':title' => $title, ':title' => $title,
':text' => $text, ':text' => $text,
@ -93,6 +116,7 @@ function pushover($_action, $_data = null) {
':username' => $_data ':username' => $_data
)); ));
$data = $stmt->fetch(PDO::FETCH_ASSOC); $data = $stmt->fetch(PDO::FETCH_ASSOC);
$data['attributes'] = json_decode($data['attributes'], true);
if (empty($data)) { if (empty($data)) {
return false; return false;
} }

View File

@ -3,7 +3,7 @@ function init_db_schema() {
try { try {
global $pdo; global $pdo;
$db_version = "09042020_1403"; $db_version = "16042020_1004";
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'"); $stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC)); $num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
@ -837,8 +837,10 @@ function init_db_schema() {
"username" => "VARCHAR(255) NOT NULL", "username" => "VARCHAR(255) NOT NULL",
"key" => "VARCHAR(255) NOT NULL", "key" => "VARCHAR(255) NOT NULL",
"token" => "VARCHAR(255) NOT NULL", "token" => "VARCHAR(255) NOT NULL",
"attributes" => "JSON",
"title" => "TEXT", "title" => "TEXT",
"text" => "TEXT", "text" => "TEXT",
"senders" => "TEXT",
"active" => "TINYINT(1) NOT NULL DEFAULT '1'" "active" => "TINYINT(1) NOT NULL DEFAULT '1'"
), ),
"keys" => array( "keys" => array(
@ -1142,6 +1144,11 @@ function init_db_schema() {
$stmt = $pdo->query("DELETE FROM `da_acl` WHERE `username` NOT IN (SELECT `username`FROM `domain_admins`);"); $stmt = $pdo->query("DELETE FROM `da_acl` WHERE `username` NOT IN (SELECT `username`FROM `domain_admins`);");
// Migrate attributes // Migrate attributes
// pushover
$stmt = $pdo->query("UPDATE `pushover` SET `attributes` = '{}' WHERE `attributes` = '' OR `attributes` IS NULL;");
$stmt = $pdo->query("UPDATE `pushover` SET `attributes` = JSON_SET(`attributes`, '$.evaluate_x_prio', \"0\") WHERE JSON_EXTRACT(`attributes`, '$.evaluate_x_prio') IS NULL;");
$stmt = $pdo->query("UPDATE `pushover` SET `attributes` = JSON_SET(`attributes`, '$.only_x_prio', \"0\") WHERE JSON_EXTRACT(`attributes`, '$.only_x_prio') IS NULL;");
// mailbox
$stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = '{}' WHERE `attributes` = '' OR `attributes` IS NULL;"); $stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = '{}' WHERE `attributes` = '' OR `attributes` IS NULL;");
$stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = JSON_SET(`attributes`, '$.force_pw_update', \"0\") WHERE JSON_EXTRACT(`attributes`, '$.force_pw_update') IS NULL;"); $stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = JSON_SET(`attributes`, '$.force_pw_update', \"0\") WHERE JSON_EXTRACT(`attributes`, '$.force_pw_update') IS NULL;");
$stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = JSON_SET(`attributes`, '$.sogo_access', \"1\") WHERE JSON_EXTRACT(`attributes`, '$.sogo_access') IS NULL;"); $stmt = $pdo->query("UPDATE `mailbox` SET `attributes` = JSON_SET(`attributes`, '$.sogo_access', \"1\") WHERE JSON_EXTRACT(`attributes`, '$.sogo_access') IS NULL;");

View File

@ -236,7 +236,9 @@
"title": "Title", "title": "Title",
"pushover_title": "Notification Titel", "pushover_title": "Notification Titel",
"text": "Text", "text": "Text",
"pushover_text": "Notification Text ({SUBJECT} entspricht dem Mail-Betreff)", "pushover_text": "Notification Text",
"pushover_vars": "Verwendbare Variablen für Titel und Text (Datenschutzrichtlinien beachten)",
"pushover_sender_array": "Nur folgende Sender E-Mail-Adressen berücksichtigen <small>(getrennt durch Komma)</small>",
"last_mail_login": "Letzter Mail-Login", "last_mail_login": "Letzter Mail-Login",
"no_last_login": "Keine letzte UI Anmeldung gespeichert", "no_last_login": "Keine letzte UI Anmeldung gespeichert",
"save": "Änderungen speichern", "save": "Änderungen speichern",
@ -354,7 +356,9 @@
"title": "Title", "title": "Title",
"pushover_title": "Notification Titel", "pushover_title": "Notification Titel",
"text": "Text", "text": "Text",
"pushover_text": "Notification Text ({SUBJECT} entspricht dem Mail-Betreff)", "pushover_text": "Notification Text",
"pushover_vars": "Verwendbare Variablen für Titel und Text (Datenschutzrichtlinien beachten)",
"pushover_sender_array": "Nur folgende Sender E-Mail-Adressen berücksichtigen <small>(getrennt durch Komma)</small>",
"spamfilter": "Spamfilter", "spamfilter": "Spamfilter",
"domain_s": "Domain(s)", "domain_s": "Domain(s)",
"rspamd-com_settings": "Ein Name wird automatisch generiert. Beispielinhalte zur Einsicht stehen nachstehend bereit. Siehe auch <a href=\"https://rspamd.com/doc/configuration/settings.html#settings-structure\" target=\"_blank\">Rspamd docs</a>", "rspamd-com_settings": "Ein Name wird automatisch generiert. Beispielinhalte zur Einsicht stehen nachstehend bereit. Siehe auch <a href=\"https://rspamd.com/doc/configuration/settings.html#settings-structure\" target=\"_blank\">Rspamd docs</a>",
@ -721,6 +725,8 @@
"sieve_preset_7": "Weiterleiten und behalten oder verwerfen" "sieve_preset_7": "Weiterleiten und behalten oder verwerfen"
}, },
"edit": { "edit": {
"evaluate_x_prio": "Hohe Priorität eskalieren [<code>X-Priority: 1</code>]",
"only_x_prio": "Nur Mail mit hoher Priorität berücksichtigen [<code>X-Priority: 1</code>]",
"generate": "generieren", "generate": "generieren",
"app_name": "App Name", "app_name": "App Name",
"app_passwd": "App Passwörter", "app_passwd": "App Passwörter",

View File

@ -236,7 +236,9 @@
"title": "Title", "title": "Title",
"pushover_title": "Notification title", "pushover_title": "Notification title",
"text": "Text", "text": "Text",
"pushover_text": "Notification text ({SUBJECT} will be replaced by mail subject)", "pushover_text": "Notification text",
"pushover_vars": "Useable variables for text and title (please take note of data protection)",
"pushover_sender_array": "Only consider the following sender email addresses <small>(comma-separated)</small>",
"no_last_login": "No last UI login information", "no_last_login": "No last UI login information",
"last_mail_login": "Last mail login", "last_mail_login": "Last mail login",
"save": "Save changes", "save": "Save changes",
@ -354,7 +356,9 @@
"title": "Title", "title": "Title",
"pushover_title": "Notification title", "pushover_title": "Notification title",
"text": "Text", "text": "Text",
"pushover_text": "Notification text ({SUBJECT} will be replaced by mail subject)", "pushover_text": "Notification text",
"pushover_vars": "Useable variables for text and title (please take note of data protection)",
"pushover_sender_array": "Only consider the following sender email addresses <small>(comma-separated)</small>",
"spamfilter": "Spam filter", "spamfilter": "Spam filter",
"domain": "Domain", "domain": "Domain",
"domain_s": "Domain/s", "domain_s": "Domain/s",
@ -720,8 +724,10 @@
"sieve_preset_7": "Redirect and keep/drop" "sieve_preset_7": "Redirect and keep/drop"
}, },
"edit": { "edit": {
"generate": "generate", "evaluate_x_prio": "Escalate high priority mail [<code>X-Priority: 1</code>]",
"only_x_prio": "Only consider high priority mail [<code>X-Priority: 1</code>]",
"app_name": "App name", "app_name": "App name",
"generate": "generate",
"app_passwd": "App password", "app_passwd": "App password",
"sogo_visible": "Alias is visible in SOGo", "sogo_visible": "Alias is visible in SOGo",
"sogo_visible_info": "This option only affects objects, that can be displayed in SOGo (shared or non-shared alias addresses pointing to at least one local mailbox). If hidden, an alias will not appear as selectable sender in SOGo.", "sogo_visible_info": "This option only affects objects, that can be displayed in SOGo (shared or non-shared alias addresses pointing to at least one local mailbox). If hidden, an alias will not appear as selectable sender in SOGo.",

View File

@ -207,7 +207,7 @@
"priority": "Приоритет", "priority": "Приоритет",
"private_key": "Закрытый ключ", "private_key": "Закрытый ключ",
"pushover_info": "Настройки Push-уведомления будут применяться ко всей не-спам почте доставляемой на <b>%s</b> включая псевдонимы (общие, не общие и с метками).", "pushover_info": "Настройки Push-уведомления будут применяться ко всей не-спам почте доставляемой на <b>%s</b> включая псевдонимы (общие, не общие и с метками).",
"pushover_text": "Текст уведомления ({SUBJECT} будет заменён на тему письма)", "pushover_text": "Текст уведомления",
"pushover_title": "Заголовок уведомления", "pushover_title": "Заголовок уведомления",
"pushover_verify": "Проверить доступ", "pushover_verify": "Проверить доступ",
"quarantine": "Карантин", "quarantine": "Карантин",
@ -902,7 +902,7 @@
"password_now": "Текущий пароль (подтверждение изменения)", "password_now": "Текущий пароль (подтверждение изменения)",
"password_repeat": "Подтверждение пароля (повтор)", "password_repeat": "Подтверждение пароля (повтор)",
"pushover_info": "Настройки Push-уведомления будут применяться ко всей не-спам почте доставляемой на <b>%s</b> включая псевдонимы (общие, не общие и с метками).", "pushover_info": "Настройки Push-уведомления будут применяться ко всей не-спам почте доставляемой на <b>%s</b> включая псевдонимы (общие, не общие и с метками).",
"pushover_text": "Текст уведомления ({SUBJECT} будет заменён на тему письма)", "pushover_text": "Текст уведомления",
"pushover_title": "Заголовок уведомления", "pushover_title": "Заголовок уведомления",
"pushover_verify": "Проверить доступ", "pushover_verify": "Проверить доступ",
"quarantine_notification": "Уведомления о спаме", "quarantine_notification": "Уведомления о спаме",

View File

@ -236,7 +236,7 @@
"title": "Titel", "title": "Titel",
"pushover_title": "Meddelande titel", "pushover_title": "Meddelande titel",
"text": "Text", "text": "Text",
"pushover_text": "Meddelandetext ({SUBJECT} byts ut mot ämnesraden)", "pushover_text": "Meddelandetext",
"last_mail_login": "Senaste inloggningen", "last_mail_login": "Senaste inloggningen",
"no_last_login": "Senaste inloggningen till UI saknas", "no_last_login": "Senaste inloggningen till UI saknas",
"save": "Spara ändringarna", "save": "Spara ändringarna",
@ -354,7 +354,7 @@
"title": "Titel", "title": "Titel",
"pushover_title": "Meddelandets titel", "pushover_title": "Meddelandets titel",
"text": "Text", "text": "Text",
"pushover_text": "Meddelandetext ({SUBJECT} byts ut mot ämnesraden)", "pushover_text": "Meddelandetext",
"spamfilter": "Spamfilter", "spamfilter": "Spamfilter",
"domain_s": "Domäner", "domain_s": "Domäner",
"rspamd-com_settings": "Ett inställningsnamn kommer att genereras automatiskt, se exemplet nedan. För mer detaljer se <a href=\"https://rspamd.com/doc/configuration/settings.html#settings-structure\" target=\"_blank\">Rspamd dokumentationen</a>", "rspamd-com_settings": "Ett inställningsnamn kommer att genereras automatiskt, se exemplet nedan. För mer detaljer se <a href=\"https://rspamd.com/doc/configuration/settings.html#settings-structure\" target=\"_blank\">Rspamd dokumentationen</a>",

View File

@ -476,7 +476,10 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == '
<div role="tabpanel" class="tab-pane" id="Pushover"> <div role="tabpanel" class="tab-pane" id="Pushover">
<form data-id="pushover" class="form well" method="post"> <form data-id="pushover" class="form well" method="post">
<input type="hidden" value="0" name="evaluate_x_prio">
<input type="hidden" value="0" name="only_x_prio">
<input type="hidden" value="0" name="active"> <input type="hidden" value="0" name="active">
<input type="hidden" value="" name="senders">
<div class="row"> <div class="row">
<div class="col-sm-1"> <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+cqkNcViNcqeK4Iaq4XRmYGPmYMKDsFJTstgr0LdL0ti84CCQ4BCQ4Qgc8rlt8XjN8shcQsi8wZSGgEP2cRMEUDKkUAAAD///8dmvEamfExo/EXmPEWl/ERlvElnvEsofEjnfETl/Enn/Ezo/E4pvEvovEfm/E1pPEzpPEvofEOlfEpoPEamPEQlfEYmfE6p/E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15G/isd5Hz4eKui/e/du02YoKFeD5mHzHIN/nxEDe25gQQwKorAid04CfyzwL4XutXvl1Pt1guMOwwKPkU8mYIFT8JHK+vv8prpDScUVL+j8s3lOctw1GIhbWHAS+HgKPk7xPM/4UtNAYmzizJkf6NgTb/gM8jePQLsewMdthS3g95tMpT1IhVm6v1s8fYmLeb13Odwp8Fh5KY048y/d14WUrwrb1e/X/rNp73nkD8kWS+wi/MZ4XuetG4mhKubJm3/WNEvi8SHwB56nPKjUam0LBdp9ARwupFemTYudvgN/L1+A/Ko/LGBuS8pPy+YR1fuCTWNKnUyoeUyYx2o2dyEVGmr5xTD42xzvkD16+Pb9WIIH6fmt1r3mbsTY7Bvw+n23naT8BUWh86bz6G/e259UXPUK3gfAxQDlo7Rpx3Geqb2e3wp83SGEdKpB7zvwYbzvT2n65xLwbH6YP+M9C8vA8E1wxLU8gkCbdhXGUyrMgwVrcbzLHonr78lzDvWM3q/C/HtDlXoSUIe3YkblhRPIX4E8Oo/9siLv8dRjV7SBlkdgTXvKS7nzsA/9AfeEuhKq9T8zWIDv1Sd6ETAP4D6/H/1V+1BojvruNa4SZXz4JhY84dV5MOF5agUvu5OsOo+KRpG30KalEnoeDccFlutPZYs38D5n3zcpr1/0fBhfb3DOY1z2tSAgLxWezz6zuoHhfUmOejf6blHQH/sFuJYfcMZX307ytKvRa3ifoV/586P5j+tICtS77BuJxzxYAPZsntX8k3eSIhlajK4p8b7iefCEKs03kD/I2LnxL9ovH+43y4fAv1YrI/mzDBsavAX/UppfzVOrZT/ydxk6lJ047MfLfVbcb6hS9ZEzWxekKQ5WrtPqZg3rV6tWrX6Tle3KQZj/q6KxQnmDoXwFY0VSrN9e8FRXBCTAvwAAAABJRU5ErkJggg==" class="img img-fluid"></a></p> <p class="help-block"><a href="https://pushover.net" target="_blank"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAACglBMVEUAAAAAAAEAAAAilecFGigAAAAAAAAAAAAAA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eEuhKq9T8zWIDv1Sd6ETAP4D6/H/1V+1BojvruNa4SZXz4JhY84dV5MOF5agUvu5OsOo+KRpG30KalEnoeDccFlutPZYs38D5n3zcpr1/0fBhfb3DOY1z2tSAgLxWezz6zuoHhfUmOejf6blHQH/sFuJYfcMZX307ytKvRa3ifoV/586P5j+tICtS77BuJxzxYAPZsntX8k3eSIhlajK4p8b7iefCEKs03kD/I2LnxL9ovH+43y4fAv1YrI/mzDBsavAX/UppfzVOrZT/ydxk6lJ047MfLfVbcb6hS9ZEzWxekKQ5WrtPqZg3rV6tWrX6Tle3KQZj/q6KxQnmDoXwFY0VSrN9e8FRXBCTAvwAAAABJRU5ErkJggg==" class="img img-fluid"></a></p>
@ -508,6 +511,22 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == '
<input type="text" class="form-control" name="text" value="<?=$pushover_data['text'];?>" placeholder="You've got mail 📧"> <input type="text" class="form-control" name="text" value="<?=$pushover_data['text'];?>" placeholder="You've got mail 📧">
</div> </div>
</div> </div>
<div class="col-sm-6">
<div class="form-group">
<label for="text"><?=$lang['user']['pushover_sender_array'];?></label>
<input type="text" class="form-control" name="senders" value="<?=$pushover_data['senders'];?>">
</div>
</div>
<div class="col-sm-12">
<div class="checkbox">
<label><input type="checkbox" value="1" name="active" <?=($pushover_data['attributes']['evaluate_x_prio']=="1") ? "checked" : null;?>> <?=$lang['edit']['evaluate_x_prio'];?></label>
</div>
</div>
<div class="col-sm-12">
<div class="checkbox">
<label><input type="checkbox" value="1" name="active" <?=($pushover_data['attributes']['only_x_prio']=="1") ? "checked" : null;?>> <?=$lang['edit']['only_x_prio'];?></label>
</div>
</div>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="checkbox"> <div class="checkbox">
<label><input type="checkbox" value="1" name="active" <?=($pushover_data['active']=="1") ? "checked" : null;?>> <?=$lang['edit']['active'];?></label> <label><input type="checkbox" value="1" name="active" <?=($pushover_data['active']=="1") ? "checked" : null;?>> <?=$lang['edit']['active'];?></label>