@@ -9,6 +9,7 @@ A native PHP library for managing the ManageSieve protocol (RFC5228) and generat
99# How to use
1010
1111### Connect to ManageSieve
12+
1213``` php
1314require_once "vendor/autoload.php";
1415
@@ -19,8 +20,8 @@ $client->connect("test@localhost", "mypass", false, "", "PLAIN");
1920$client->listScripts();
2021```
2122
22-
2323### Generate Sieve script
24+
2425``` php
2526$filter = \PhpSieveManager\Filters\FilterFactory::create('MaxFileSize');
2627
@@ -42,3 +43,145 @@ $size_condition->addAction(
4243$filter->setCondition($size_condition);
4344$filter->toScript();
4445```
46+
47+ ## Actions
48+
49+ [ \[ RFC5293\] ] ( https://www.rfc-editor.org/rfc/rfc5293.html )
50+
51+ ```
52+ addheader [":last"]
53+ <field-name: string>
54+ <value: string>
55+ ```
56+
57+ [ \[ RFC5293\] ] ( https://www.rfc-editor.org/rfc/rfc5293.html )
58+
59+ ```
60+ deleteheader [":index" <fieldno: number> [":last"]]
61+ [COMPARATOR] [MATCH-TYPE]
62+ <field-name: string>
63+ [<value-patterns: string-list>]
64+ ```
65+
66+ [ \[ RFC8580\] ] ( https://www.rfc-editor.org/rfc/rfc8580.html ) [ \[ RFC5435\] ] ( https://www.rfc-editor.org/rfc/rfc5434.html )
67+
68+ ```
69+ notify [":from" string]
70+ [":importance" <"1" / "2" / "3">]
71+ [":options" string-list]
72+ [":message" string]
73+ [:fcc "INBOX.Sent"]
74+ <method: string>
75+ ```
76+
77+ [ \[ RFC5230\] ] ( https://www.rfc-editor.org/rfc/rfc5230.html ) [ \[ RFC6131\] ] ( https://www.rfc-editor.org/rfc/rfc6131.html ) [ \[ RFC8580\] ] ( https://www.rfc-editor.org/rfc/rfc8580.html )
78+
79+ ```
80+ vacation [[":days" number] | [":seconds"]]
81+ [":subject" string]
82+ [":from" string]
83+ [":addresses" string-list]
84+ [":mime"]
85+ [":handle" string]
86+ <reason: string>
87+ ```
88+
89+ [ \[ RFC5232\] ] ( https://www.rfc-editor.org/rfc/rfc5232.html )
90+
91+ ```
92+ setflag [<variablename: string>]
93+ <list-of-flags: string-list>
94+ ```
95+
96+ [ \[ RFC5232\] ] ( https://www.rfc-editor.org/rfc/rfc5232.html )
97+
98+ ```
99+ addflag [<variablename: string>]
100+ <list-of-flags: string-list>
101+ ```
102+
103+ [ \[ RFC5232\] ] ( https://www.rfc-editor.org/rfc/rfc5232.html )
104+
105+ ```
106+ removeflag [<variablename: string>]
107+ <list-of-flags: string-list>
108+ ```
109+
110+ [ \[ RFC5703\] ] ( https://www.rfc-editor.org/rfc/rfc5703.html )
111+
112+ ```
113+ replace [":mime"]
114+ [":subject" string]
115+ [":from" string]
116+ <replacement: string>
117+ ```
118+
119+ [ \[ RFC5703\] ] ( https://www.rfc-editor.org/rfc/rfc5703.html )
120+
121+ ```
122+ enclose <:subject string>
123+ <:headers string-list>
124+ string
125+ ```
126+
127+ [ \[ RFC5229\] ] ( https://www.rfc-editor.org/rfc/rfc5229.html )
128+
129+ ```
130+ extracttext [MODIFIER]
131+ [":first" number]
132+ <varname: string>
133+ ```
134+
135+ [ \[ RFC6558\] ] ( https://www.rfc-editor.org/rfc/rfc6558.html )
136+
137+ ```
138+ convert <quoted-from-media-type: string>
139+ <quoted-to-media-type: string>
140+ <transcoding-params: string-list>
141+ ```
142+
143+ [ \[ RFC5229\] ] ( https://www.rfc-editor.org/rfc/rfc5232.html )
144+
145+ ```
146+ set [MODIFIER] <name: string>
147+ <value: string>
148+
149+ Modifiers: ":lower" / ":upper" / ":lowerfirst" / ":upperfirst" /
150+ ":quotewildcard" / ":length"
151+ ```
152+
153+ [ \[ RFC5232\] ] ( https://www.rfc-editor.org/rfc/rfc5232.html ) [ \[ RFC3894\] ] ( https://www.rfc-editor.org/rfc/rfc3894.html ) [ \[ RFC5228\] ] ( https://www.rfc-editor.org/rfc/rfc5228.html ) [ \[ RFC5490\] ] ( https://www.rfc-editor.org/rfc/rfc5490.html ) [ \[ RFC9042\] ] ( https://www.rfc-editor.org/rfc/rfc9042.html ) [ \[ RFC8579\] ] ( https://www.rfc-editor.org/rfc/rfc8579.html )
154+
155+ ```
156+ fileinto [:mailboxid <mailboxid: string>] [:specialuse <special-use-attr: string>] [:create] [":copy"] [":flags" <list-of-flags: string-list>] <mailbox: string>
157+ ```
158+
159+ [ \[ RFC5228\] ] ( https://www.rfc-editor.org/rfc/rfc5232.html ) [ \[ RFC3894\] ] ( https://www.rfc-editor.org/rfc/rfc3894.html ) [ \[ RFC6009\] ] ( https://www.rfc-editor.org/rfc/rfc6009.html )
160+
161+ ```
162+ redirect [":copy"] [:notify "value"] [:ret "FULL"|"HDRS"] [":copy"] <address: string>
163+ ```
164+
165+ [ \[ RFC5228\] ] ( https://www.rfc-editor.org/rfc/rfc5232.html ) [ \[ RFC5232\] ] ( https://www.rfc-editor.org/rfc/rfc5232.html )
166+
167+ ```
168+ keep [":flags" <list-of-flags: string-list>]
169+ ```
170+
171+ [ \[ RFC5228\] ] ( https://www.rfc-editor.org/rfc/rfc5232.html )
172+
173+ ```
174+ discard
175+ ```
176+
177+ [ \[ RFC5429\] ] ( https://www.rfc-editor.org/rfc/rfc5429.html )
178+
179+ ```
180+ reject
181+ ```
182+
183+ [ \[ RFC5429\] ] ( https://www.rfc-editor.org/rfc/rfc5429.html )
184+
185+ ```
186+ ereject
187+ ```
0 commit comments