-
Notifications
You must be signed in to change notification settings - Fork 0
/
draft-murchison-email-snooze.xml
1046 lines (964 loc) · 44.9 KB
/
draft-murchison-email-snooze.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
<!ENTITY nbsp " ">
<!ENTITY zwsp "​">
<!ENTITY nbhy "‑">
<!ENTITY wj "⁠">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc strict="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std"
ipr="trust200902"
docName="draft-murchison-email-snooze-00" obsoletes=""
submissionType="IETF" consensus="true" xml:lang="en"
tocInclude="true" symRefs="true" sortRefs="true" version="3">
<!-- xml2rfc v2v3 conversion 3.16.0 -->
<front>
<title abbrev="Email Snooze">Snoozing Email with IMAP, JMAP, and
Sieve</title>
<seriesInfo name="Internet-Draft" value="draft-murchison-email-snooze-00"/>
<author initials="K." surname="Murchison" fullname="Kenneth Murchison">
<organization abbrev="Fastmail">Fastmail US LLC</organization>
<address>
<postal>
<street>1429 Walnut Street - Suite 1201</street>
<city>Philadelphia</city>
<region>PA</region>
<code>19102</code>
<country>USA</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author initials="R." surname="Signes" fullname="Ricardo Signes">
<organization abbrev="Fastmail">Fastmail US LLC</organization>
<address>
<postal>
<street>1429 Walnut Street - Suite 1201</street>
<city>Philadelphia</city>
<region>PA</region>
<code>19102</code>
<country>USA</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author initials="N." surname="Jenkins" fullname="Neil Jenkins">
<organization abbrev="Fastmail">Fastmail Pty Ltd</organization>
<address>
<postal>
<street>Level 2, 114 William Street</street>
<city>Melbourne</city>
<region>VIC</region>
<code>3000</code>
<country>Australia</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<date/>
<area>ART</area>
<workgroup>EXTRA</workgroup>
<keyword>Sieve</keyword>
<abstract>
<t>This document describes the "snooze" extensions to IMAP,
JMAP for Mail, and the Sieve Email Filtering Language.
The "snooze" extensions give these protocols the ability to
postpone the appearance of an email message in a target
mailbox until a later point in time.</t>
</abstract>
<!--
<note title="Open Issues">
<t>
<list style="symbols">
</list>
</t>
</note>
-->
</front>
<middle>
<section numbered="true" toc="default">
<name>Introduction</name>
<t>Users are not always ready, willing, or able to read and
respond to email messages at the time of their arrival.
Sometimes it is desirable to have messages appear in a mailbox
at a more convenient time for the user to act upon them.</t>
<t>This document defines extensions to the
<xref target="RFC9051">Internet Message Access Protocol (IMAP)</xref>,
<xref target="RFC8621">The JSON Meta Application Protocol (JMAP) for Mail</xref>,
and the <xref target="RFC5228">Sieve Email Filtering Language</xref>
that enable postponing the appearance of a message in a target
mailbox until a later point in time, also known as "snoozing" a
message.</t>
<t>The IMAP and JMAP extensions allow for snoozing messages that
are already present in the mailstore. The Sieve extension
allows for snoozing a message at the time of final delivery.</t>
<t>A "snoozed" message is one that the user wants put into a less
obtrusive location for a fixed time. When that time is reached,
the messaged is "awakened" back into higher visibility.</t>
<section numbered="true" toc="default">
<name>Conventions Used in This Document</name>
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
"MAY", and "OPTIONAL" in this document are to be interpreted as
described in BCP 14
<xref target="RFC2119"/> <xref target="RFC8174"/>
when, and only when, they appear in all capitals, as shown
here.</t>
</section>
</section> <!-- Intro -->
<section anchor="snoozing" numbered="true" toc="default">
<name>Mechanics of Snoozing and Awakening a Message</name>
<t>The extensions defined in this specification use the
following procedure for snoozing and awakening messages:</t>
<ol>
<li>The message is delivered to, or moved into, a "snoozed" mailbox
in the mailstore.</li>
<li>
<t>The message is assigned three meta-data items:</t>
<ul>
<li>An awaken time - the time at which to move the message
out of the "snoozed" mailbox.</li>
<li>An optional target mailbox into which
the message will be moved at the awaken time.</li>
<li>An optional set of flag/keyword updates to be made
when the message is awakened.</li>
</ul>
</li>
<li>Messages MUST be accessible while in the "snoozed" mailbox.</li>
<li>At the awaken time, the message is moved from the "snoozed"
mailbox into the target mailbox, and any updates are made to
the message flags/keywords.
If the target mailbox is not specified, or is not a valid or
available target for the user, then the message is moved into
the user's main mailbox.</li>
</ol>
</section> <!-- snoozing -->
<section anchor="imap" numbered="true" toc="default">
<name>IMAP SNOOZE Extension</name>
<t>The SNOOZE extension is present in any IMAP implementation
that returns "SNOOZE" as one of the supported capabilities to
the CAPABILITY command.
</t>
<section numbered="true" toc="default">
<name>The \Snoozed Mailbox Attribute</name>
<t>Users may create a mailbox with an attribute of
<xref target="snoozed-attrib">\Snoozed</xref>, having the sole
purpose of holding snoozed emails.
This mailbox is exposed over JMAP as having the "snoozed"
role.</t>
<t>Implementations are REQUIRED to enforce the following
restrictions on the \Snoozed mailbox:</t>
<ul>
<li>Messages MUST NOT be added to the \Snoozed mailbox with
the APPEND, COPY, or MOVE commands. The server MUST reject
commands that attempt to use the \Snoozed mailbox as a
target with a tagged NO response having the CANNOT response
code.</li>
<li>When executing COPY or MOVE commands on the \Snoozed
mailbox, the server MUST NOT copy "snoozed" meta-data to the
new message.
The new message is effectively awakened.</li>
</ul>
</section>
<section numbered="true" toc="default">
<name>SNOOZE Command</name>
<dl newline="false" spacing="normal" indent="14">
<dt>Arguments:</dt>
<dd>
<t>sequence-set</t>
<t>date/time string</t>
<t>OPTIONAL add flag list</t>
<t>OPTIONAL remove flag list</t>
<t>OPTIONAL mailbox name</t>
</dd>
<dt>Responses:</dt>
<dd>no specific responses for this command</dd>
<dt>Result:</dt>
<dd>
<t>OK - snooze completed</t>
<t>NO - snooze error: can't snooze those messages</t>
<t>BAD - command unknown or arguments invalid</t>
</dd>
</dl>
</section>
<section numbered="true" toc="default">
<name>UID SNOOZE Command</name>
<t>This extends the first form of the UID command
(see <xref target="RFC9051" section="6.4.9" sectionFormat="comma"/>)
to add the SNOOZE command defined above as a valid argument.</t>
</section>
<section numbered="true" toc="default">
<name>Semantics of SNOOZE and UID SNOOZE</name>
<t>The SNOOZE command takes two mandatory arguments: a message
set (sequence numbers for SNOOZE, UIDs for UID SNOOZE) and a
date/time string (awaken time); and three optional arguments: a
named target mailbox, a list of flags to be added to the
awakened messages, and a list of flags to be removed from the
awakened messages.
Each message included in the set is moved (as per
<xref target="RFC9051" section="6.4.9" sectionFormat="comma"/>)
from the selected mailbox to the mailbox having the
\Snoozed attribute. Additionally, the awaken time, any
target mailbox name, and any flag lists are stored as "snoozed"
meta-data on the messages.
This process appears to the client as a single action
and has the same effect for each message as this sequence
(using syntax from
<xref target="RFC5257" section="4.5" sectionFormat="comma"/>):</t>
<ol>
<li>[UID] STORE ANNOTATION (/snoozed (value.shared ...))</li>
<li>[UID] MOVE</li>
</ol>
<t>At the awaken time, each message is moved from the \Snoozed
mailbox into the target mailbox, and any updates are made to
the message flags.
If no target mailbox was specified or it is inaccessible, then
the message is moved into the user's INBOX.
and has the same effect for each message as this sequence:</t>
<ol>
<li>[UID] STORE +FLAGS.SILENT</li>
<li>[UID] STORE -FLAGS.SILENT</li>
<li>[UID] MOVE</li>
</ol>
</section>
<section numbered="true" toc="default">
<name>Interaction with Other Extensions</name>
<t>Because of the similarity of SNOOZE to MOVE, extensions
that affect MOVE affect SNOOZE in the same way.
Response codes listed in
<xref target="RFC9051" section="7.1" sectionFormat="comma"/>,
as well as those defined by extensions, are sent as indicated
for MOVE.</t>
<section anchor="annotate" numbered="true" toc="default">
<name>ANNOTATE</name>
<t>Servers supporting <xref target="RFC5257">ANNOTATE</xref>
MAY expose the "snoozed" meta-data on messages as a read-only
shared <xref target="snoozed-attrib">/snoozed</xref> entry.
The value of the /snoozed entry MUST be a JSON string in the
form of a
<xref target="snoozeDetails">snoozeDetails object</xref>.</t>
</section>
</section> <!-- Interaction -->
<section numbered="true" toc="default">
<name>Formal Syntax</name>
<t>The following syntax specification uses the Augmented
Backus-Naur Form (ABNF) notation as specified in
<xref target="RFC5234"/>. <xref target="RFC9051"/> defines
the non-terminals "capability", "command-select",
"sequence-set", "mailbox", "date-time", and "flag-list".
</t>
<t>Except as noted otherwise, all alphabetic characters are
case insensitive.
The use of upper or lower case characters to define token
strings is for editorial clarity only.
Implementations MUST accept these strings in a
case-insensitive fashion.
</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
capability =/ "SNOOZE"
command-select =/ snooze
snooze = "SNOOZE" SP sequence-set SP date-time
[ SP "+FLAGS" SP flag-list ]
[ SP "-FLAGS" SP flag-list ]
[ SP mailbox ]
uid = "UID" SP
(copy / move / fetch / search / store /
uid-expunge / snooze)
]]></artwork>
</section> <!-- Syntax -->
</section> <!-- IMAP -->
<section anchor="jmap" numbered="true" toc="default">
<name>JMAP Mail Snooze Extension</name>
<t>The capabilities object is returned as part of the JMAP Session
object; see <xref target="RFC8620" section="2" sectionFormat="comma"/>.
Servers supporting this specification MUST add a property
named "urn:ietf:params:jmap:mail:snooze" to the capabilities
object. The value of this property is an empty object in both
the JMAP session "capabilities" property and an account's
"accountCapabilities" property.
</t>
<section numbered="true" toc="default">
<name>The "snoozed" Mailbox Role</name>
<t>Users may create a mailbox with a role of "snoozed", having
the sole purpose of holding snoozed emails.
This mailbox is exposed over IMAP as having the
<xref target="snoozed-attrib">\Snoozed</xref> attribute.</t>
</section>
<section anchor="snoozeDetails" numbered="true" toc="default">
<name>Extension to the Email Object</name>
<t>The
<xref target="RFC8621" section="4.1"
sectionFormat="comma">Email</xref>
object gains a new property:</t>
<ul spacing="normal">
<li>
<t><strong>snoozed</strong>:
<tt>SnoozeDetails|null</tt>
(immutable)
</t>
<t>
If in the mailbox with role snoozed, this Email will be
moved from there according to the details in this
object.
Otherwise, this is a record of when it was snoozed in
the past.
</t>
<t/>
</li>
</ul>
<t>A <strong>SnoozeDetails</strong> object has the
following properties:</t>
<ul spacing="normal">
<li>
<t><strong>until</strong>:
<tt>UTCDate</tt>
</t>
<t>
The time at which to move the message out of the
"snoozed" mailbox.
</t>
<t/>
</li>
<li>
<t><strong>moveToMailboxId</strong>:
<tt>String</tt>
(optional)
</t>
<t>
If set and a valid mailbox id for the user, this is
where the Email will be moved at the awaken
time. Otherwise, the Email will be moved to the user's
inbox.
</t>
<t/>
</li>
<li>
<t><strong>setKeywords</strong>:
<tt>String[Boolean]</tt>
(optional)
</t>
<t>
If set, when the message is awakened it will also have
keywords modified. The keys of the object are the
keyword names.
Names that map to <tt>true</tt> are keywords to be
added.
Names that map to <tt>false</tt> are keywords to remove.
</t>
</li>
</ul>
<t>The <strong>snoozed</strong> property has the
following rules and restrictions:</t>
<ul>
<li>It is treated as an immutable property,
i.e. it cannot be updated on an existing copy in a mailbox,
it must cause a new copy (with a new UID).</li>
<li>If an Email is in more than one mailbox (i.e. the same
GUID is in multiple mailboxes), <strong>snoozed</strong>
MUST only be set on one of the copies.</li>
<li>
<t>When setting <strong>snoozed</strong> to a non-null value in
an Email/set method:</t>
<ul>
<li>If the email is already in the Snoozed mailbox and not
being removed from this mailbox, replace the copy in the
Snoozed mailbox and set the SnoozeDetails on the new email.</li>
<li>Otherwise, if adding the Email to a single new mailbox,
set the SnoozeDetails on this copy.</li>
<li>
<t>Otherwise, if adding the Email to multiple mailboxes,
set the SnoozeDetails on the copy in:</t>
<ul>
<li>The Snoozed mailbox if this is being added.</li>
<li>Otherwise, the mailbox with the id in the
moveToMailboxId property of the SnoozeDetails object
(or inbox if this property is omitted), if this is being
added.</li>
</ul>
<t>If neither apply, reject the create/update with an
invalidProperties error.</t>
</li>
<li>If not adding the Email to a new mailbox, replace the
copy that currently has SnoozeDetails.
If none, reject the update with an invalidProperties
error.</li>
<li>Clear any existing SnoozeDetails from Emails in any
other mailbox (this will involve replacing the copy with a
new UID of course, as it's immutable).</li>
</ul>
</li>
<li>When removing the mailbox with which <strong>snoozed</strong>
is associated from an Email, the snooze is implicitly
cleared (i.e. it is not implicitly copied to another copy of
the message; it must be explicitly set if the client wants
to preserve it).</li>
</ul>
</section>
</section> <!-- JMAP -->
<section anchor="sieve-snooze" numbered="true" toc="default">
<name>Sieve Snooze Extension</name>
<t>Sieve implementations that support this extension have
an identifier of "snooze" for use with the capability mechanism.</t>
<t>Conventions for notations are as in
<xref target="RFC5228" section="1.1"/>,
including use of the "Usage:" label for the
definition of action and tagged arguments syntax.</t>
<section anchor="snooze-action" numbered="true" toc="default">
<name>Snooze Action</name>
<artwork name="" type="" align="left" alt=""><![CDATA[
Usage: snooze *AWAKEN-OPTIONS <times: string-list>
]]></artwork>
<t keepWithNext="true">The AWAKEN-OPTIONS argument is defined here
in <xref target="RFC5234" format="default">ABNF</xref> syntax
so that it can be modified by other extensions.</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
AWAKEN-OPTIONS = MAILBOX / WEEKDAYS / TZID
; each option MUST NOT appear more than once
; however, per Section 2.6.2 of RFC 5228,
; the tagged arguments in AWAKEN-OPTIONS
; may appear in any order
MAILBOX = ":mailbox" string
WEEKDAYS = ":weekdays" string-list
TZID = ":tzid" string
]]></artwork>
<t>The "snooze" action cancels the implicit keep and postpones
delivery of the message into the specified mailbox at a later
point in time.</t>
<t>The snooze action is semantically equivalent to a delayed
fileinto action (see <xref target="RFC5228" section="4.1"/>).
The arguments of the snooze action specify when, where, and
how the awakened message will be filed.</t>
<t>Implementations MUST snooze and awaken messages per
<xref target="snoozing"/>. Specifically, a Sieve interpreter
whose mailstore is accessible via IMAP and/or JMAP MUST utilize
a "snoozed" mailbox per Sections <xref target="imap"/> and
<xref target="jmap"/> respectively.</t>
<section anchor="mailboxarg" numbered="true" toc="default">
<name>Mailbox Argument</name>
<t>The optional :mailbox argument is used to specify the target
mailbox that the message will be filed into when it is awakened.
It is equivalent to the mailbox argument of the fileinto
action (see <xref target="RFC5228" section="4.1"/>).</t>
<t>If :mailbox is omitted, or if the specified mailbox doesn't
exist at the time of awakening, the message will be filed
into the user's main mailbox.
For instance, in an implementation where an IMAP server is
running scripts on behalf of the user at time of delivery,
the user's "INBOX" would be the implicit target for
awakening messages.</t>
</section>
<section anchor="times" numbered="true" toc="default">
<name>Times, TZID, and Weekdays Arguments</name>
<t>The required times argument, along with the optional :tzid
and :weekdays arguments, are used to specify when a snoozed
message will be awakened.
Each time is specified in "hh:mm:ss" format and is interpreted
as the local time in the time zone specified by the :tzid
argument.</t>
<t>The value of the :tzid argument MUST be a time zone
identifier from the
<xref target="tzdb">IANA Time Zone Database</xref>.
If :tzid is omitted, the time zone of the Sieve
interpreter is used.
</t>
<t>The :weekdays argument specifies the set of days
on which the specified set of times apply.
Each day of the week is expressed as an integer between
"0" and "6". "0" is Sunday, "1" is Monday, etc.
This syntax matches that of the "weekday" date-part argument
to the date test extension (see
<xref target="RFC5260" section="4.2"/>).
If :weekdays is omitted, the set of times applies
to every day of the week.</t>
<t>The combination of the weekdays and times form a
chronological list of awaken times. When a message is
snoozed, it is assigned the next future awaken time in the
list. If a message is snoozed on a day with no awaken times,
or after the last awaken time on a given day,
the first awaken time on the next available day is used.
</t>
<t>If the local time in the specified time zone occurs more
than once (daylight saving to standard time transition), the
first occurrence of the specified time value is used.
If the local time in the specified time zone does not occur
(standard to daylight saving time transition), the specified
time value is interpreted using the UTC offset prior to the
transition.</t>
<section numbered="true" toc="default">
<name>Awaken Times Examples</name>
<t>The following examples show, given the specified snooze
action and a set of message arrival times, the corresponding
times at which the message would be awakened and filed.</t>
<t keepWithNext="true">The following example shows awaken
times rolling into the next day or week.
Note that 2020-07-30 falls on a Thursday.</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
require "snooze";
snooze :weekdays ["1", "3", "5", "2", "4"]
:tzid "Australia/Melbourne" ["12:00:00",
"08:00:00", "16:00:00"];
]]></artwork>
<table align="center">
<thead>
<tr>
<th align="center">Arrival (UTC)</th>
<th align="center">Arrival (Melbourne)</th>
<th align="center">Awaken (Melbourne)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">2020-07-30T00:00:00Z</td>
<td align="center">--07-30T10:00:00+10</td>
<td align="center">--07-30T12:00:00+10</td>
</tr>
<tr>
<td align="center">2020-07-30T04:00:00Z</td>
<td align="center">--07-30T14:00:00+10</td>
<td align="center">--07-30T16:00:00+10</td>
</tr>
<tr>
<td align="center">2020-07-30T08:00:00Z</td>
<td align="center">--07-30T18:00:00+10</td>
<td align="center">--07-31T08:00:00+10</td>
</tr>
<tr>
<td align="center">2020-07-31T12:00:00Z</td>
<td align="center">--07-31T22:00:00+10</td>
<td align="center">--08-03T08:00:00+10</td>
</tr>
<tr>
<td align="center">2020-08-01T16:00:00Z</td>
<td align="center">--08-02T02:00:00+10</td>
<td align="center">--08-03T08:00:00+10</td>
</tr>
</tbody>
</table>
<t keepWithNext="true">The following example shows awaken
times falling before, during, and after a daylight saving
to standard time transition.
Note that the transition occurs at 2020-11-01T02:00:00-04.
</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
require "snooze";
snooze :tzid "America/New_York" "01:30:00";
]]></artwork>
<table align="center">
<thead>
<tr>
<th align="center">Arrival (UTC)</th>
<th align="center">Arrival (New York)</th>
<th align="center">Awaken (New York)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">2020-11-01T05:00:00Z</td>
<td align="center">--11-01T01:00:00-04</td>
<td align="center">--11-01T01:30:00-04</td>
</tr>
<tr>
<td align="center">2020-11-01T06:00:00Z</td>
<td align="center">--11-01T01:00:00-05</td>
<td align="center">--11-02T01:30:00-05</td>
</tr>
<tr>
<td align="center">2020-11-01T07:00:00Z</td>
<td align="center">--11-01T02:00:00-05</td>
<td align="center">--11-02T01:30:00-05</td>
</tr>
</tbody>
</table>
<t keepWithNext="true">The following example shows awaken
times falling before, during, and after a standard to
daylight saving time transition.
Note that the transition occurs at 2021-03-14T02:00:00-05.
</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
require "snooze";
snooze :tzid "America/New_York" "02:30:00";
]]></artwork>
<table align="center">
<thead>
<tr>
<th align="center">Arrival (UTC)</th>
<th align="center">Arrival (New York)</th>
<th align="center">Awaken (New York)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">2021-03-13T06:30:00Z</td>
<td align="center">--03-13T01:30:00-05</td>
<td align="center">--03-13T02:30:00-05</td>
</tr>
<tr>
<td align="center">2021-03-14T06:30:00Z</td>
<td align="center">--03-14T01:30:00-05</td>
<td align="center">--03-14T03:30:00-04</td>
</tr>
<tr>
<td align="center">2021-03-14T07:30:00Z</td>
<td align="center">--03-14T03:30:00-04</td>
<td align="center">--03-15T02:30:00-04</td>
</tr>
</tbody>
</table>
</section>
</section>
<section anchor="extensions" numbered="true" toc="default">
<name>Interaction with Extensions to the Fileinto Action</name>
<t>Some tagged arguments defined in extensions to the fileinto
action can be used together with the snooze action.
The sections below describe these interactions.
Tagged arguments in future extensions to the fileinto action
need to describe their interaction with the snooze extension,
if any.</t>
<t>When any fileinto extension arguments are used with the
snooze extension, the corresponding extension MUST be enabled,
and the arguments are defined to have the same syntax,
semantics, and treatment as they do with the fileinto action.</t>
<section anchor="imap4flags" numbered="true" toc="default">
<name>Imap4flags Extension</name>
<t>When the <xref target="RFC5232">"imap4flags"</xref>
extension is enabled in a script, two additional tagged
arguments are added to "snooze" that allow manipulating the
set of flags on a snoozed message.</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
AWAKEN-OPTIONS /= ADDFLAGS / REMOVEFLAGS
ADDFLAGS = ":addflags" string-list
REMOVEFLAGS = ":removeflags" string-list
]]></artwork>
<t>The optional :addflags and :removeflags arguments are used
to specify which <xref target="RFC9051">IMAP</xref> flags
should be added to and/or removed from the set of IMAP flags
present on the snoozed message at the time of awakening.
Note the set of IMAP flags present at the time of awakening may
be the empty set.</t>
<t>If the "setflag" and/or "addflag" actions have been used to
store IMAP flags in the imap4flags internal variable,
the Sieve interpreter MUST use the current value of the
internal variable as the set of flags to associate with the
message when storing it into the "snoozed" mailbox.</t>
<t>This document doesn't dictate how the Sieve interpreter
will set the IMAP flags.
In particular, the Sieve interpreter may work as an IMAP
client or may have direct access to the mailstore.</t>
<t>The general requirements for flag handling specified in
<xref target="RFC5232" section="2"/> MUST be followed.</t>
<section numbered="true" toc="default">
<name>Example</name>
<t>The following example leverages the
<xref target="RFC5260">Date</xref>,
<xref target="RFC5231">Relational</xref>, and
<xref target="RFC5232">Imap4flags</xref> extensions
to snooze messages received after business hours until the
following work day. Note that the message is marked as
important when it is snoozed, and will be marked as unread
when it is awakened.</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
require ["snooze", "imap4flags", "date", "relational"];
if anyof(header :is "from" "[email protected]",
currentdate :is "weekday" "0",
currentdate :is "weekday" "6",
currentdate :value "ge" "hour" "17") {
setflag "\\Important";
snooze :removeflags "\\Seen"
:weekdays ["1". "2", "3", "4", "5"]
:tzid "American/New_York", "09:00";
}
]]></artwork>
</section>
</section>
<section anchor="mailboxext" numbered="true" toc="default">
<name>Mailbox Extension</name>
<t>This document extends the definition of the
<xref target="RFC5490">":create"</xref> tagged argument so
that it can be used with the snooze action.</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
AWAKEN-OPTIONS /= CREATE
CREATE = ":create"
; MUST NOT be appear unless MAILBOX also appears
]]></artwork>
<t>If the optional ":create" argument is specified with
snooze, it instructs the Sieve interpreter to create the
target mailbox, if needed, before attempting to file the
awakened message into the target mailbox.</t>
</section>
<section anchor="specialuse" numbered="true" toc="default">
<name>Special-Use Extension</name>
<t>This document extends the definition of the
<xref target="RFC8579">":specialuse"</xref> tagged argument
so that it can be used with the snooze action.</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
AWAKEN-OPTIONS /= SPECIAL-USE
SPECIAL-USE = ":specialuse" string
]]></artwork>
<t>If the optional ":specialuse" argument is specified with
snooze, it instructs the Sieve interpreter to check whether
a mailbox exists with the specific special-use flag assigned
to it. If such a mailbox exists, the awakened message is filed
into the special-use mailbox. Otherwise, the awakened message
is filed into the target mailbox.</t>
<t>If both the optional ":specialuse" and ":create"
arguments are specified with snooze, the Sieve interpreter
is instructed to create the target mailbox per
<xref target="RFC8579" section="4.1"/>, if needed.</t>
</section>
<section anchor="mailboxid" numbered="true" toc="default">
<name>MailboxID Extension</name>
<t>This document extends the definition of the
<xref target="RFC9042">":mailboxid"</xref>
tagged argument so that it can be used with the snooze action.</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
AWAKEN-OPTIONS /= MAILBOXID
MAILBOXID = ":mailboxid" string
]]></artwork>
<t>If the optional ":mailboxid" argument is specified with
snooze, it instructs the Sieve interpreter to check whether
a mailbox exists in the user's
<xref target="RFC2342">personal namespace </xref> with the
specified <xref target="RFC8474">MAILBOXID</xref>.
If such a mailbox exists, the awakened message is filed
into that mailbox. Otherwise, the awakened message
is filed into the target mailbox.</t>
<t>It is an error to specify both ":mailboxid" and
":specialuse" in the same snooze action.</t>
</section>
</section> <!-- extensions -->
</section> <!-- snooze-action -->
</section> <!-- sieve-snooze -->
<section anchor="impl" numbered="true" toc="default">
<name>Implementation Status</name>
<t>< RFC Editor: before publication please remove this section
and the reference to <xref target="RFC7942"/> ></t>
<t>This section records the status of known implementations of
the protocol defined by this specification at the time of
posting of this Internet-Draft, and is based on a proposal
described in <xref target="RFC7942"/>. The
description of implementations in this section is intended to
assist the IETF in its decision processes in progressing
drafts to RFCs. Please note that the listing of any
individual implementation here does not imply endorsement by
the IETF. Furthermore, no effort has been spent to verify the
information presented here that was supplied by IETF
contributors. This is not intended as, and must not be
construed to be, a catalog of available implementations or
their features. Readers are advised to note that other
implementations may exist.</t>
<t>According to <xref target="RFC7942"/>,
"this will allow reviewers and working groups to assign due
consideration to documents that have the benefit of running
code, which may serve as evidence of valuable
experimentation and feedback that have made the implemented
protocols more mature. It is up to the individual working
groups to use this information as they see fit".</t>
<section anchor="cyrus" toc="exclude" numbered="true">
<name>Cyrus Server</name>
<t>The open source
<eref target="http://www.cyrusimap.org/">Cyrus Server</eref> project
is a highly scalable enterprise mail system which supports
IMAP, JMAP, and
Sieve email filtering at the point of final delivery. This
production level implementation supports all of the
requirements described in this document. This implementation
is freely distributable under a BSD style license from
<eref target="http://www.cmu.edu/computing/">
Computing Services at Carnegie Mellon University</eref>.</t>
</section>
</section> <!-- Implementations -->
<section anchor="security" numbered="true" toc="default">
<name>Security Considerations</name>
<t>Security considerations are discussed in
<xref target="RFC5228"/>, <xref target="RFC5232"/>,
<xref target="RFC8579"/>, and <xref target="RFC9042"/>.
</t>
<t>It is believed that this extension doesn't introduce any
additional security concerns.</t>
</section>
<section anchor="privacy" numbered="true" toc="default">
<name>Privacy Considerations</name>
<t>It is believed that this extension doesn't introduce any
privacy considerations beyond those in <xref target="RFC5228"/>.</t>
</section>
<section numbered="true" toc="default">
<name>IANA Considerations</name>
<section numbered="true" toc="default">
<name>Registration of JMAP Capability</name>
<t>This document defines the following new JMAP capability
to be added to the registry defined in
<xref target="RFC8620" section="9.4"/> and located here:
<eref target="https://www.iana.org/assignments/jmap/jmap.xhtml#jmap-capabilities"/>
</t>
<t>IANA are requested to add a capability to the JMAP Capabilities
registry:
</t>
<ul empty="true" spacing="normal">
<li>Capability Name: <tt>urn:ietf:params:jmap:mail:snooze</tt></li>
<li>Specification document: RFC XXXX</li>
<li>Intended use: common</li>
<li>Change Controller: IETF</li>
<li>Security and privacy considerations: RFC XXXX,
<xref target="security" format="default"/></li>
</ul>
</section>
<section numbered="true" toc="default">
<name>Registration of IMAP Capability</name>
<t>IANA are requested to add "SNOOZE" to the IMAP Capabilities
registry,
<eref target="https://www.iana.org/assignments/imap4-capabilities"/>
</t>
</section>
<section numbered="true" toc="default">
<name>Registration of Sieve Extension</name>
<t>This document defines the following new Sieve extension
to be added to the registry defined in
<xref target="RFC5228" section="6.2"/> and located here:
<eref target="https://www.iana.org/assignments/sieve-extensions/sieve-extensions.xhtml#sieve-extensions"/>
</t>
<t>IANA are requested to add a capability to the Sieve
Extensions registry:
</t>
<ul empty="true" spacing="normal">
<li>To: [email protected]</li>
<li>Subject: Registration of new Sieve extension</li>
<li>Capability name: snooze</li>
<li>Description: Adds the "snooze" action command to
postpone delivery of a message into a target mailbox until
a later point in time.</li>
<li>RFC number: RFC XXXX</li>
<li>Contact address: The Sieve discussion list
<[email protected]></li>
</ul>
</section>
<section numbered="true" toc="default">
<name>Registration of Sieve Action</name>
<t>This document defines the following new Sieve action
to be added to the registry defined in
<xref target="I-D.ietf-extra-sieve-action-registry" section="3.1"/>.
</t>
<t>IANA are requested to add an action to the Sieve Action
registry:
</t>
<ul empty="true" spacing="normal">
<li>Name: snooze</li>
<li>Description: Postpone delivery of a message into a
target mailbox until a later point in time.</li>
<li>References: RFC XXXX, <xref target="RFC5232"/>,
<xref target="RFC5490"/>, <xref target="RFC8579"/>,
<xref target="RFC9042"/></li>
<li>Capabilities: "snooze", "imap4flags", "mailbox",
"special-use", "mailboxid".</li>
<li>Interactions: Is not compatible with the reject or
ereject actions.</li>
<li>Cancels Implicit Keep?: Y</li>
<li>Use with IMAP Events?: Y</li>
<li>Comments: Requires a special "snoozed" mailbox in the
mailstore.</li>
</ul>
</section>
<section anchor="snoozed-attrib" numbered="true" toc="default">
<name>Registration of IMAP Mailbox Name Attribute</name>
<t>This document defines the following new IMAP mailbox name
attribute to be added to the registry defined in
<xref target="RFC8457" section="6.2"/> and located here:
<eref target="https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml#imap-mailbox-name-attributes"/>
</t>
<t>IANA are requested to add an attribute to the IMAP Mailbox
Name Attribute registry:
</t>
<ul empty="true" spacing="normal">
<li>To: [email protected]</li>
<li>Subject: Registration of new IMAP Mailbox Name Attribute</li>
<li>Attribute name: Snoozed</li>
<li>Description: Messages that have been snoozed.</li>
<li>Reference: RFC XXXX</li>
</ul>
</section>
<section anchor="snoozed-annot" numbered="true" toc="default">
<name>Registration of IMAP Annotation Entry</name>
<t>This document defines the following new IMAP annotation
entry to be added to the registry defined in
<xref target="RFC5257" section="6"/> and located here:
<eref target="https://www.iana.org/assignments/imap-annotate-extension/imap-annotate-extension.xhtml#imap-annotate-extension-entries"/>
</t>
<ul empty="true" spacing="normal">
<li>To: [email protected]</li>
<li>Subject: IMAP Annotate Registration</li>
<li>Please register the following Annotate item:</li>
<li>[X]Entry
[] Attribute</li>
<li>Name: /snoozed</li>
<li>Description: RFC XXXX, <xref target="annotate"/>.</li>
<li>Content-Type: application/json</li>
<li>Contact person: Ken Murchison</li>
<li>
email: [email protected]</li>
</ul>
</section>
</section>
<!-- IANA -->
<section numbered="true" toc="default">
<name>Acknowledgments</name>
<t>The authors would like to thank the following individuals for
contributing their ideas and support for writing this
specification: Ned Freed, Barry Leiba, Alexey Melnikov, and Pete
Resnick.</t>
</section>
</middle>
<back>
<references>
<name>References</name>
<references>
<name>Normative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2342.xml"/>