Skip to content

Commit 918cfd9

Browse files
Merge branch 'develop'
2 parents 105ed05 + a28571c commit 918cfd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+150
-121
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ FEATURES
1818

1919
- Supports all of the base Sieve spec from RFC 5228, except for
2020
features still listed under TODO below
21-
- multiline strings (since version 0.2.2)
21+
- multiline strings (since version 0.2.2)
22+
- bracketed comments (since version 0.2.4)
2223
- Extensions supported:
2324
- regex (draft-ietf-sieve-regex-01)
2425
- body (RFC 5173)
@@ -72,7 +73,6 @@ TODO
7273
- Base spec features not yet implemented:
7374
- encoded characters (section 2.4.2.4)
7475
- multi-line strings (section 2.4.2)
75-
- bracketed comments (section 2.3)
7676
- message uniqueness (section 2.10.3)
7777
- envelope test (section 5.4)
7878
- handle message loops (section 10)

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ FEATURES
1111
features still listed under TODO below
1212

1313
- multiline strings (since version 0.2.2)
14+
- bracketed comments (since version 0.2.4)
1415

1516
- Extensions supported:
1617

@@ -76,7 +77,6 @@ TODO
7677
- Base spec features not yet implemented:
7778

7879
- encoded characters (section 2.4.2.4)
79-
- bracketed comments (section 2.3)
8080
- message uniqueness (section 2.10.3)
8181
- envelope test (section 5.4)
8282
- handle message loops (section 10)

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name="sifter3",
13-
version="0.2.3",
13+
version="0.2.4",
1414
author="Manfred Kaiser, Gary Peck",
1515
author_email="manfred.kaiser@logfile.at, gary@realify.com",
1616
url="https://sifter3.readthedocs.io/en/latest/",
@@ -61,6 +61,7 @@
6161
'notify = sifter.commands.notify:CommandNotify',
6262
'redirect = sifter.commands.redirect:CommandRedirect',
6363
'reject = sifter.commands.reject:CommandReject',
64+
'ereject = sifter.commands.reject:CommandEReject',
6465
'require = sifter.commands.require:CommandRequire',
6566
'set = sifter.commands.variables:CommandSet',
6667
'stop = sifter.commands.stop:CommandStop',

sifter/commands/discard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# section 4.4
1212
class CommandDiscard(Command):
1313

14-
RULE_IDENTIFIER = 'DISCARD'
14+
HANDLER_ID = 'DISCARD'
1515

1616
def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions]:
1717
state.actions.cancel_implicit_keep()

sifter/commands/fileinto.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
# section 4.1
1414
class CommandFileInto(Command):
1515

16-
RULE_IDENTIFIER = 'FILEINTO'
16+
HANDLER_ID = 'FILEINTO'
17+
EXTENSION_NAME = 'fileinto'
1718
POSITIONAL_ARGS = [StringList(length=1)]
1819

1920
def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions]:

sifter/commands/if_cmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions
2525

2626
class CommandIf(CommandIfBase):
2727

28-
RULE_IDENTIFIER = 'IF'
28+
HANDLER_ID = 'IF'
2929

3030

3131
class CommandElsIf(CommandIfBase):
3232

33-
RULE_IDENTIFIER = 'ELSIF'
33+
HANDLER_ID = 'ELSIF'
3434

3535
def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions]:
3636
if state.last_if:
@@ -40,7 +40,7 @@ def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions
4040

4141
class CommandElse(Command):
4242

43-
RULE_IDENTIFIER = 'ELSE'
43+
HANDLER_ID = 'ELSE'
4444
TESTS_MIN = 0
4545
HAS_BLOCKS = False
4646

sifter/commands/imap4flags.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
class CommandSetFlag(Command):
1717

18-
RULE_IDENTIFIER = 'SETFLAG'
18+
HANDLER_ID = 'SETFLAG'
19+
EXTENSION_NAME = 'imap4flags'
1920
POSITIONAL_ARGS = [StringList()]
2021

2122
def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions]:
@@ -28,7 +29,8 @@ def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions
2829

2930
class CommandRemoveFlag(Command):
3031

31-
RULE_IDENTIFIER = 'REMOVEFLAG'
32+
HANDLER_ID = 'REMOVEFLAG'
33+
EXTENSION_NAME = 'imap4flags'
3234
POSITIONAL_ARGS = [StringList()]
3335

3436
def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions]:
@@ -41,7 +43,8 @@ def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions
4143

4244
class CommandAddFlag(Command):
4345

44-
RULE_IDENTIFIER = 'ADDFLAG'
46+
HANDLER_ID = 'ADDFLAG'
47+
EXTENSION_NAME = 'imap4flags'
4548
POSITIONAL_ARGS = [StringList()]
4649

4750
def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions]:

sifter/commands/keep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# section 4.3
1212
class CommandKeep(Command):
1313

14-
RULE_IDENTIFIER = 'KEEP'
14+
HANDLER_ID = 'KEEP'
1515
HAS_BLOCKS = False
1616

1717
def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions]:

sifter/commands/notify.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
# RFC 5435
1616
class CommandNotify(Command):
1717

18-
RULE_IDENTIFIER = 'NOTIFY'
18+
HANDLER_ID = 'NOTIFY'
19+
EXTENSION_NAME = 'enotify'
1920
TAGGED_ARGS = {
2021
'from': Tag('FROM', (StringList(1),)),
2122
'importance': Tag('IMPORTANCE', (StringList(1),)),

sifter/commands/redirect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# section 4.2
2727
class CommandRedirect(Command):
2828

29-
RULE_IDENTIFIER = 'REDIRECT'
29+
HANDLER_ID = 'REDIRECT'
3030
POSITIONAL_ARGS = [StringList(length=1)]
3131

3232
def __init__(

0 commit comments

Comments
 (0)