Subject: [lemonade] Notifications

From: Dave Cridland <[email-masked]>
Date: Fri, 19 May 2006 17:01:21 +0100

I have to confess to a certain amount of bewilderment regarding 
notifications, which I really ought to have caught earlier.

As far as I can tell, we currently have two entirely distinct 
mechanisms for out of band notifications.

In no particular order, we have Barry's imap-seive, which leverages 
Sieve to provide notifications via potentially any method that Sieve 
can support, filtering based on any filter that Sieve can support.

This is also referenced by Stéphane's notifications draft, which is 
essentially taking the provisioning subsystem from P-IMAP. It works 
by restricting the messages to notify about to those in a predefined 
view [VFOLDER], and notification methods are defined within it.

Both drafts were presented as "agreed" to be mandated by Profile Bis 
at IETF65, but I can't see how they fit together at all - both seem 
to aim to cover both what and how to notify.

Does anyone have an insight into how this is meant to work?

Dave.
-- 
           You see things; and you say "Why?"
   But I dream things that never were; and I say "Why not?"
    - George Bernard Shaw

_______________________________________________
lemonade mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/lemonade

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Fri, 19 May 2006 18:42:33 +0200

> view [VFOLDER], and notification methods are defined within it.

Eek. Don't like that.

As some of you know, I've implemented something essentially like 
VFOLDER, except more capable. One of the keys to getting pleasant 
performance in practice was to avoid per-view work on message 
injection.

Although I don't have concrete experience yet, I suspect that spam 
filtering also can benefit from doing view updates at SELECT time 
rather than at injection time.

I like the sieve approach much better. Just as capable, and with no 
nasty O(n)-to-O(m) changes.

Arnt

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Fri, 19 May 2006 18:45:58 +0200

> nasty O(n)-to-O(m) changes.

There is a difference, though. Sieve won't notify as a result of APPEND 
or COPY.

Arnt

---

From: Dave Cridland <[email-masked]>
Date: Fri, 19 May 2006 17:46:19 +0100

On Fri May 19 17:45:58 2006, Arnt Gulbrandsen wrote:
> Arnt Gulbrandsen writes:
>> I like the sieve approach much better. Just as capable, and with 
>> no nasty O(n)-to-O(m) changes.
> 
> There is a difference, though. Sieve won't notify as a result of 
> APPEND or COPY.

That's what imap-sieve provides, basically - extending Sieve's 
coverage across the full spectrum of message store events. My fault, 
I should have included actual filenames to the drafts.

Dave.

---

From: <[email-masked]>
Date: Mon, 22 May 2006 12:09:39 +0300

Hello all,
My understanding is that SIEVE or VFOLDER are simply filters - they do not provide notifications, they simply filter which emails need to be notified to the client (either online or offline) and it something has passed the filter, the server will send the notification about those emails that passed the filters.
While the client is offline, VFOLDER is not applicable, so only SIEVE can be used.
The client can additionally configure some setting in the server how it wants to be notified. (Related to this I had a question on how the clients can be identified to make sure that they update/configure their own filters/notification methods only - both of these are per-client settings).
So, in the end, when an email has passed the notification filters, the server will check whether the client is online or offline. If online: no problem with inband notification; if offline: the server will look up the client's offline notification settings, and send the notification accordingly.
Is this correct?

Now, I have one additional question - about outband notifications.
The definition of outband notification is that there is no IMAP session.
Now, if someone uses quick reconnect (IMAP session exists, but connection does not), which notification takes place? Outband or inband?
How about VFOLDER? Will the VFOLDER filter be executed when the client is in "quick disconnected" mode?
Thank You.

Best regards: Zoltán Ördögh
E-mail: [email-masked]
Phone: +358 50 386 0566

-----Original Message-----
From: ext Dave Cridland [mailto:[email-masked]] 
Sent: 19 May, 2006 19:01
To: Enhancements to Internet email to support diverse service enivronments
Subject: [lemonade] Notifications

I have to confess to a certain amount of bewilderment regarding notifications, which I really ought to have caught earlier.

As far as I can tell, we currently have two entirely distinct mechanisms for out of band notifications.

In no particular order, we have Barry's imap-seive, which leverages Sieve to provide notifications via potentially any method that Sieve can support, filtering based on any filter that Sieve can support.

This is also referenced by Stéphane's notifications draft, which is essentially taking the provisioning subsystem from P-IMAP. It works by restricting the messages to notify about to those in a predefined view [VFOLDER], and notification methods are defined within it.

Both drafts were presented as "agreed" to be mandated by Profile Bis at IETF65, but I can't see how they fit together at all - both seem to aim to cover both what and how to notify.

Dave.

---

From: Randall Gellens <[email-masked]>
Date: Wed, 24 May 2006 18:44:55 -0700

At 12:09 PM +0300 5/22/06, <[email-masked]> wrote:

>  My understanding is that SIEVE or VFOLDER are simply filters - they 
> do not provide notifications, they simply filter which emails need 
> to be notified to the client (either online or offline) and it 
> something has passed the filter, the server will send the 
> notification about those emails that passed the filters.

Not exactly.  Sieve has rules that trigger actions.  One of the 
actions can be to send a notification.

>  So, in the end, when an email has passed the notification filters, 
> the server will check whether the client is online or offline. If 
> online: no problem with inband notification; if offline: the server 
> will look up the client's offline notification settings, and send 
> the notification accordingly.

I'm not aware that Sieve has any knowledge of the connected state of 
any client.  My understanding is that Sieve rules might say "send 
notification to address foo", regardless if a client at address foo 
happens to be connected to the IMAP server at that moment.

>  INow, if someone uses quick reconnect (IMAP session exists, but 
> connection does not), which notification takes place? Outband or 
> inband?

As I understand it, updates to a virtual folder will be sent to a 
client with a non-active session (saved using reconnect) when it 
reconnects and the session becomes active.  Sieve may trigger 
notifications at any time, while the client is connected or not.  Is 
this correct?
-- 
Randall Gellens
Opinions are personal;    facts are suspect;    I speak for myself only
-------------- Randomly-selected tag: ---------------
I think we'd get fewer weird bug reports if we stopped selling our
software From [email-masked] Wed May 24 21:45:12 2006
Date: Wed, 24 May 2006 18:44:55 -0700
To: <[email-masked]>, <[email-masked]>, <[email-masked]>
From: Randall Gellens <[email-masked]>
Subject: RE: [lemonade] Notifications
Cc: 

At 12:09 PM +0300 5/22/06, <[email-masked]> wrote:

>  My understanding is that SIEVE or VFOLDER are simply filters - they 
> do not provide notifications, they simply filter which emails need 
> to be notified to the client (either online or offline) and it 
> something has passed the filter, the server will send the 
> notification about those emails that passed the filters.

Not exactly.  Sieve has rules that trigger actions.  One of the 
actions can be to send a notification.

>  So, in the end, when an email has passed the notification filters, 
> the server will check whether the client is online or offline. If 
> online: no problem with inband notification; if offline: the server 
> will look up the client's offline notification settings, and send 
> the notification accordingly.

I'm not aware that Sieve has any knowledge of the connected state of 
any client.  My understanding is that Sieve rules might say "send 
notification to address foo", regardless if a client at address foo 
happens to be connected to the IMAP server at that moment.

>  INow, if someone uses quick reconnect (IMAP session exists, but 
> connection does not), which notification takes place? Outband or 
> inband?

As I understand it, updates to a virtual folder will be sent to a 
client with a non-active session (saved using reconnect) when it 
reconnects and the session becomes active.  Sieve may trigger 
notifications at any time, while the client is connected or not.  Is 
this correct?
-- 
Randall Gellens
Opinions are personal;    facts are suspect;    I speak for myself only
-------------- Randomly-selected tag: ---------------
I think we'd get fewer weird bug reports if we stopped selling our
software off planet.

---

From: <[email-masked]>
Date: Fri, 26 May 2006 11:25:16 +0300

-----Original Message-----
From: ext Randall Gellens [mailto:[email-masked]] 
Sent: 25 May, 2006 04:45
To: Ordogh Zoltan (Nokia-TP-MSW/Tampere); [email-masked]; [email-masked]
Subject: RE: [lemonade] Notifications

At 12:09 PM +0300 5/22/06, <[email-masked]> wrote:

> do not provide notifications, they simply filter which emails need to 
> be notified to the client (either online or offline) and if something 
> has passed the filter, the server will send the notification about 
> those emails that passed the filters.

Not exactly.  Sieve has rules that trigger actions.  One of the actions can be to send a notification.

[ZÖr] SIEVE is responsible for triggering the notification only - not for sending it, right?

> will look up the client's offline notification settings, and send the 
> notification accordingly.

I'm not aware that Sieve has any knowledge of the connected state of any client.  My understanding is that Sieve rules might say "send notification to address foo", regardless if a client at address foo happens to be connected to the IMAP server at that moment.

[ZÖr] SIEVE triggers the notification only, isn't it? When the server is told that some mail needs to be notified, the server will check the online/offline state (not the SIEVE script). However, the SIEVE script could be also enhanced with built-in variables (like HAS_SESSION, IS_CONNECTED, etc whatever the syntax of SIEVE is) and then the SIEVE script could make the decisions as well. Server implementation people have more experience about which one would be better and why.

>  Now, if someone uses quick reconnect (IMAP session exists, but 

As I understand it, updates to a virtual folder will be sent to a client with a non-active session (saved using reconnect) when it reconnects and the session becomes active.  Sieve may trigger notifications at any time, while the client is connected or not.  Is this correct?

[ZÖr] I would say that this depends how we interpret the outband notification. In any case, it should be described in the draft to make sure that there are no misinderstandings.

Thank You Randall.

---

From: Randall Gellens <[email-masked]>
Date: Tue, 30 May 2006 12:10:59 -0700

At 11:25 AM +0300 5/26/06, <[email-masked]> wrote:

>  Not exactly.  Sieve has rules that trigger 
> actions.  One of the actions can be to send a 
> notification.
>
>  [ZÖr] SIEVE is responsible for triggering the 
> notification only - not for sending it, right?

My understanding is that the Sieve implementation 
will send notifications.  Sieve extensions are 
used to indicate that a notification is to be 
sent.  How it is sent will depend on the Sieve 
implementation, for example, it might support SMS.

>  I'm not aware that Sieve has any knowledge of 
> the connected state of any client.  My 
> understanding is that Sieve rules might say 
> "send notification to address foo", regardless 
> if a client at address foo happens to be 
> connected to the IMAP server at that moment.
>
>  [ZÖr] SIEVE triggers the notification only, 
> isn't it? When the server is told that some 
> mail needs to be notified, the server will 
> check the online/offline state (not the SIEVE 
> script). However, the SIEVE script could be 
> also enhanced with built-in variables (like 
> HAS_SESSION, IS_CONNECTED, etc whatever the 
> syntax of SIEVE is) and then the SIEVE script 
> could make the decisions as well. Server 
> implementation people have more experience 
> about which one would be better and why.

Enhancements to Sieve should be discussed in the 
Sieve group.  But there are always edge cases in 
doing this, for example, the client could connect 
or disconnect to the IMAP server immediately 
after the Sieve script has tested the condition. 
We'd want to make sure that any added complexity 
to Sieve is worth it.

-------------- Randomly-selected tag: ---------------
Dogs have owners.  Cats have staff.