[Web] Add two more maps and add a desc to maps

master
andryyy 2019-11-01 22:12:34 +01:00
parent ea4da60c36
commit 6b0fc219b2
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 11 additions and 8 deletions

View File

@ -1155,12 +1155,12 @@ if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CAC
</div>
<div id="rspamd_global_filters" class="<?=($_SESSION['show_rspamd_global_filters'] !== true) ? 'hidden' : '';?>">
<?php
foreach ($RSPAMD_MAPS as $rspamd_map):
foreach ($RSPAMD_MAPS as $rspamd_desc => $rspamd_map):
?>
<hr>
<form class="form-horizontal" data-id="<?=$rspamd_map;?>" role="form" method="post">
<div class="form-group">
<label class="control-label col-sm-3" for="<?=$rspamd_map;?>"><code><?=$rspamd_map;?></code>:</label>
<label class="control-label col-sm-3" for="<?=$rspamd_map;?>"><?=$rspamd_desc;?><br><small><?=$rspamd_map;?></small></label>
<div class="col-sm-9">
<textarea id="<?=$rspamd_map;?>" spellcheck="false" autocorrect="off" autocapitalize="none" class="form-control textarea-code" rows="10" name="rspamd_map_data" required><?=file_get_contents('/rspamd_custom_maps/' . $rspamd_map);?></textarea>
</div>

View File

@ -157,10 +157,13 @@ $MAILBOX_DEFAULT_ATTRIBUTES['mailbox_format'] = 'maildir:';
// Set visible Rspamd maps in mailcow UI, do not change unless you know what you are doing
$RSPAMD_MAPS = array(
'global_mime_from_blacklist.map',
'global_mime_from_whitelist.map',
'global_rcpt_blacklist.map',
'global_rcpt_whitelist.map',
'global_smtp_from_blacklist.map',
'global_smtp_from_whitelist.map'
'Header-From: Blacklist' => 'global_mime_from_blacklist.map',
'Header-From: Whitelist' => 'global_mime_from_whitelist.map',
'Envelope Sender Blacklist' => 'global_smtp_from_blacklist.map',
'Envelope Sender Whitelist' => 'global_smtp_from_whitelist.map',
'Recipient Blacklist' => 'global_rcpt_blacklist.map',
'Recipient Whitelist' => 'global_rcpt_whitelist.map',
'Fishy TLDS (only fired in combination with bad words)' => 'fishy_tlds.map',
'Bad Words (only fired in combination with fishy TLDs)' => 'bad_words.map',
'Bad Words DE (only fired in combination with fishy TLDs)' => 'bad_words_de.map'
);