mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 09:27:03 +03:00
Merge 34a02cba99 into 2a116612be
This commit is contained in:
commit
bf5e393199
44 changed files with 147 additions and 41 deletions
|
|
@ -11,7 +11,8 @@ import {
|
|||
DiscardCommand,
|
||||
FileIntoCommand,
|
||||
KeepCommand,
|
||||
RedirectCommand
|
||||
RedirectCommand,
|
||||
ForceUnspamCommand
|
||||
} from 'Sieve/Commands/Actions';
|
||||
|
||||
import {
|
||||
|
|
@ -75,6 +76,7 @@ export const
|
|||
FileIntoCommand,
|
||||
KeepCommand,
|
||||
RedirectCommand,
|
||||
ForceUnspamCommand,
|
||||
// Test commands
|
||||
AddressTest,
|
||||
AllOfTest,
|
||||
|
|
|
|||
|
|
@ -109,3 +109,10 @@ export class KeepCommand extends ActionCommand
|
|||
export class DiscardCommand extends ActionCommand
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* https://tools.ietf.org/html/rfc5228#section-4.4
|
||||
*/
|
||||
export class ForceUnspamCommand extends ActionCommand
|
||||
{
|
||||
}
|
||||
|
|
@ -16,7 +16,8 @@ export const FilterAction = {
|
|||
Discard: 'Discard',
|
||||
Vacation: 'Vacation',
|
||||
Reject: 'Reject',
|
||||
Forward: 'Forward'
|
||||
Forward: 'Forward',
|
||||
ForceUnspam: 'ForceUnspam'
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -93,6 +94,9 @@ export class FilterModel extends AbstractModel {
|
|||
case FilterAction.Discard:
|
||||
result = rl.i18n(root + 'DISCARD');
|
||||
break;
|
||||
case FilterAction.ForceUnspam:
|
||||
result = rl.i18n(root + 'FORCE_UNSPAM');
|
||||
break;
|
||||
// no default
|
||||
}
|
||||
|
||||
|
|
@ -112,6 +116,8 @@ export class FilterModel extends AbstractModel {
|
|||
return result + 'None';
|
||||
case FilterAction.Discard:
|
||||
return result + 'Discard';
|
||||
case FilterAction.ForceUnspam:
|
||||
return result + 'ForceUnspam';
|
||||
case FilterAction.MoveTo:
|
||||
default:
|
||||
return result + 'MoveToFolder';
|
||||
|
|
|
|||
|
|
@ -139,6 +139,10 @@ function filtersToSieveScript(filters)
|
|||
case 'Discard':
|
||||
result.push(sTab + 'discard;');
|
||||
break;
|
||||
case 'ForceUnspam':
|
||||
require.fileinto = 1;
|
||||
result.push(sTab + 'fileinto "INBOX";');
|
||||
break;
|
||||
case 'Vacation':
|
||||
if (value) {
|
||||
require.vacation = 1;
|
||||
|
|
|
|||
|
|
@ -148,6 +148,8 @@ export class FilterPopupView extends rl.pluginPopupView {
|
|||
|
||||
this.actionTypeOptions.push({ id: FilterAction.Discard, name: i18nFilter('ACTION_DISCARD') });
|
||||
|
||||
this.actionTypeOptions.push({ id: FilterAction.ForceUnspam, name: i18nFilter('FORCE_UNSPAM') });
|
||||
|
||||
this.typeOptionsSize([
|
||||
{ id: FilterConditionType.Over, name: i18nFilter('TYPE_OVER') },
|
||||
{ id: FilterConditionType.Under, name: i18nFilter('TYPE_UNDER') }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue