mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Added rfc5183, rfc5229, rfc5260 and rfc5293
Make comparator and match_type available for all Test classes Signed-off-by: djmaze <djmaze@djmaze.lan>
This commit is contained in:
parent
3ce123b536
commit
3566f4a538
9 changed files with 325 additions and 14 deletions
38
dev/Sieve/Extensions/rfc5183.js
Normal file
38
dev/Sieve/Extensions/rfc5183.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* https://tools.ietf.org/html/rfc5183
|
||||
*/
|
||||
|
||||
(Sieve => {
|
||||
|
||||
const Grammar = Sieve.Grammar;
|
||||
|
||||
class Environment extends Grammar.Test
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
super('environment');
|
||||
this.name = new Grammar.QuotedString;
|
||||
this.key_list = new Grammar.StringList;
|
||||
}
|
||||
|
||||
get require() { return 'environment'; }
|
||||
|
||||
toString()
|
||||
{
|
||||
return 'body'
|
||||
// + ' ' + this.comparator
|
||||
+ ' ' + this.match_type
|
||||
+ ' ' + this.name
|
||||
+ ' ' + this.key_list;
|
||||
}
|
||||
|
||||
pushArguments(args)
|
||||
{
|
||||
this.name = args[args.length-2];
|
||||
this.key_list = args[args.length-1];
|
||||
}
|
||||
}
|
||||
|
||||
Sieve.Commands.environment = Environment;
|
||||
|
||||
})(this.Sieve);
|
||||
Loading…
Add table
Add a link
Reference in a new issue