Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managesieve plugin: add spam settings engine #9074

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions plugins/managesieve/config.inc.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@ $config['managesieve_vacation_addresses_init'] = false;
// This option enables automatic filling of :from field on initial vacation form creation.
$config['managesieve_vacation_from_init'] = false;

// Enables separate management interface for spam configuration
// 0 - no separate section (default),
// 1 - add Spam section,
// 2 - add Spam section, but hide Filters section
$config['managesieve_spam'] = 0;

// The header used in messages to identify the spam score
$config['managesieve_spam_header'] = 'x-spam-score';

// The default threshold when to classify a message as spam
$config['managesieve_spam_threshold'] = 5;

// The default folder to move messages to when the filter kicks in
$config['managesieve_spam_folder'] = 'INBOX.Junk';

// Supported methods of notify extension. Default: 'mailto'
$config['managesieve_notify_methods'] = ['mailto'];

Expand Down
2 changes: 1 addition & 1 deletion plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function start($mode = null)
$this->rc->session->remove('managesieve_current');
}

if ($mode != 'vacation' && $mode != 'forward') {
if ($mode != 'vacation' && $mode != 'forward' && $mode != 'spam') {
if (!empty($_GET['_set']) || !empty($_POST['_set'])) {
$script_name = rcube_utils::get_input_string('_set', rcube_utils::INPUT_GPC, true);
}
Expand Down
Loading