mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 23:47:03 +03:00
Support Sieve extension rfc6131
This commit is contained in:
parent
b3c1723c5c
commit
57673384e9
2 changed files with 9 additions and 7 deletions
|
|
@ -3,6 +3,8 @@
|
||||||
* https://tools.ietf.org/html/rfc6131
|
* https://tools.ietf.org/html/rfc6131
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { capa } from 'Sieve/Utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
GrammarCommand,
|
GrammarCommand,
|
||||||
GrammarNumber,
|
GrammarNumber,
|
||||||
|
|
@ -16,7 +18,7 @@ export class VacationCommand extends GrammarCommand
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this._days = new GrammarNumber;
|
this._days = new GrammarNumber;
|
||||||
// this._seconds = new GrammarNumber;
|
this._seconds = new GrammarNumber;
|
||||||
this._subject = new GrammarQuotedString;
|
this._subject = new GrammarQuotedString;
|
||||||
this._from = new GrammarQuotedString;
|
this._from = new GrammarQuotedString;
|
||||||
this.addresses = new GrammarStringList;
|
this.addresses = new GrammarStringList;
|
||||||
|
|
@ -31,10 +33,10 @@ export class VacationCommand extends GrammarCommand
|
||||||
toString()
|
toString()
|
||||||
{
|
{
|
||||||
let result = 'vacation';
|
let result = 'vacation';
|
||||||
if (0 < this._days.value) {
|
if (0 < this._seconds.value && capa.includes('vacation-seconds')) {
|
||||||
|
result += ' :seconds ' + this._seconds;
|
||||||
|
} else if (0 < this._days.value) {
|
||||||
result += ' :days ' + this._days;
|
result += ' :days ' + this._days;
|
||||||
// } else if (0 < this._seconds.value) {
|
|
||||||
// result += ' :seconds ' + this._seconds;
|
|
||||||
}
|
}
|
||||||
if (this._subject.length) {
|
if (this._subject.length) {
|
||||||
result += ' :subject ' + this._subject;
|
result += ' :subject ' + this._subject;
|
||||||
|
|
@ -55,14 +57,14 @@ export class VacationCommand extends GrammarCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
get days() { return this._days.value; }
|
get days() { return this._days.value; }
|
||||||
// get seconds() { return this._seconds.value; }
|
get seconds() { return this._seconds.value; }
|
||||||
get subject() { return this._subject.value; }
|
get subject() { return this._subject.value; }
|
||||||
get from() { return this._from.value; }
|
get from() { return this._from.value; }
|
||||||
get handle() { return this._handle.value; }
|
get handle() { return this._handle.value; }
|
||||||
get reason() { return this._reason.value; }
|
get reason() { return this._reason.value; }
|
||||||
|
|
||||||
set days(int) { this._days.value = int; }
|
set days(int) { this._days.value = int; }
|
||||||
// set seconds(int) { this._seconds.value = int; }
|
set seconds(int) { this._seconds.value = int; }
|
||||||
set subject(str) { this._subject.value = str; }
|
set subject(str) { this._subject.value = str; }
|
||||||
set from(str) { this._from.value = str; }
|
set from(str) { this._from.value = str; }
|
||||||
set handle(str) { this._handle.value = str; }
|
set handle(str) { this._handle.value = str; }
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ https://www.iana.org/assignments/sieve-extensions/sieve-extensions.xhtml
|
||||||
- [x] RFC5463 ihave
|
- [x] RFC5463 ihave
|
||||||
- [x] RFC5490 mailbox / mboxmetadata / servermetadata
|
- [x] RFC5490 mailbox / mboxmetadata / servermetadata
|
||||||
- [ ] RFC5703 enclose / extracttext / foreverypart / mime / replace
|
- [ ] RFC5703 enclose / extracttext / foreverypart / mime / replace
|
||||||
- [ ] RFC6131 vacation-seconds
|
- [x] RFC6131 vacation-seconds
|
||||||
- [ ] RFC6134 extlists
|
- [ ] RFC6134 extlists
|
||||||
- [ ] RFC6558 convert
|
- [ ] RFC6558 convert
|
||||||
- [x] RFC6609 include
|
- [x] RFC6609 include
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue