Subject: Re: Notify extension to Sieve

From: <[email-masked]>
Date: Fri, 13 Jul 2001 16:56:16 -0700 (PDT)

Excerpts From [email-masked]:
Message
>There's also the whole issue of encoded-words and character sets. I think the
>way to go is for this document to be clear that the notification material it
>creates is in UTF-8, and that encoded-word and content decoding should be done
>
>as part of these substitution operations.
>
>The text[n] construct is also fairly problematic. For example, what happens
>when the cut off falls in the middle of a line terminator? What happen when th
>e
>number fall in the middle of a multibyte character?
>
>A line-oriented construct would avoid these issues, however, it wouldn't
>necessarily work right with message services that have limited text capacity.

This is a good point. Trying to deal with byte boundrys with different character sets is a major pain. I agree the output should be utf8 and the 'n' in text[n] should refer to n unicode characters not n octets (as currently implied).

btw Thank you to everyone for the comments in the last couple messages. We'll try to get them integrated and a new version out in the near future.

Thanks,
Tim

---

From: "Nigel Swinson" <[email-masked]>
Date: Sat, 14 Jul 2001 13:13:55 +0100

> This is a good point. Trying to deal with byte boundrys with different
character sets is a major pain. I agree the output should be utf8 and the
'n' in text[n] should refer to n unicode characters not n octets (as
currently implied).
>
> btw Thank you to everyone for the comments in the last couple messages.
We'll try to get them integrated and a new version out in the near future.

If there are going to be message services that have a limited text capacity,
then if we treat n as "n unicode characters", but then convert the "n
unicode characters" to utf8, then we have no accurate way of determining in
advance the size of the utf-8 string.

My Utf8 is a little rusty, but a character can end up as from 1 to 6 bytes,
so our output buffer may actually require to be anything from n to 6n bytes.

If we are to use UTF8, which I agree is a good idea, then perhaps we need
some kind of clause that protects the output buffer from being greater than
a certain limit while maintaining character boundaries?

Perhaps:

$text[n]$  - as many characters of the first text/* part, encoded as UTF8,
that will fit in an n byte buffer.

(Yuck?!)

Or maybe change the text[n] parameter to max-message-size[n] that is the
maximum size that the COMPLETE message can be where the message size
includes $from, $env-from$, $text$ etc.  This way you would specify how much
data you wanted to recieve, then just use the $text$ paramter and the system
will put as much UTF8 message data into the output message buffer as
possible.  The system MUST ensure that truncated messages are truncated at
the start of a character boundary.

On the other hand if we want to just rely on "implementations MAY shorten
the message for technical or aesthetic reasons" then I think that $text[n]$
would be better as n lines, as lines are always \n, and therefore easy to
find and convert as a onner, as opposed to finding character boundaries in
variable byte-to-character charsets like UTF8.

Incidentally if "implementations MAY shorten the message for technical or
aesthetic reasons", then we ought to say "Where they do, they MUST truncate
the message before a character boundary".

Just some ideas, I have little experience of the kinds of system that are
going to recieve these notifications...

As a side note, in the following examples from section 3.1, aren't they
missing a ":message":

         require ["notify","fileinto"];

            if header :contains "from" "[email-masked]" {
                notify :high "This is probably very important";
            }

            if header :contains "to" "[email-masked]" {
                notify :low "[SIEVE] $from$: $subject$";
                fileinto "INBOX.sieve";
            }

And also in section 3.1 shouldn't it be ":message" not "message:" ?

    Syntax:   notify [":method" string]
               [":id" string]
               [":options" 1*(string-list / number)]
               [<":low" / ":normal" / ":high">]
               ["message:" string]

Nigel

---

From: Tony Hansen <[email-masked]>
Date: Sat, 14 Jul 2001 17:40:51 -0400

Simple solution to text[n] possibly not ending in a CRLF:

	It includes the first n-2 characters followed by a CRLF.

Also, I think most SMS device length maximums are defined in terms of
bytes, not characters.

	Tony Hansen
	[email-masked]

---

From: Wolfgang Segmuller <[email-masked]>
Date: Mon, 16 Jul 2001 10:39:11 -0400

> 'n' in text[n] should refer to n unicode characters not n octets (as

I agree that UTF-8 should be used as the output charset and text[n] refers 
to unicode chars.  Maybe we should highlight that an implementation MAY 
shorten the message because some notification mechanisms have limited 
capabilities.

Simon Josefsson <[email-masked]> wrote:

> * I would be happier with two separate variables for the RFC 2822
>   "display name" and the "address".  Having both the name and the mail
>   address would fill up my entire cell phone display.  Maybe keep
>   $from$ as is, and add $from-address$ and $from-name$.
>
>   Q: Is it intended to exclude legacy address forms by using the term
>   "display name"?  Perhaps no parsing of From: was intended.  I.e.:
>   foo@bar (foo bar) rather than "foo bar" <foo@bar>.
>

My idea was that $from$ would be either display name or email address.  But
I can see we need $from-address$ and $from-name$ also.  An implementation
MUST support the RFC 2822 definition of display name.  An implementation 
MAY
support legacy address forms.  Should there be a default value for 
$from-name$ if none was found?  Possibly $from-address$.

>
> * Security consideration additions:
>
> The risk of creating mail loops must be considered, many instant
> messaging systems (e.g. ICQ) have capabilities to forward the
> notification by Internet Mail if you're not online.  Unless somehow
> prevented, this might easily cause huge workload for the servers
> involved.
>

Yes, we must add this.

>
> * Is the draft really copyright 1999? :) There are some control
>   characters (^M) in it as well.  Also perhaps update RFC 82{1,2} ->
>   RFC 282{1,2}.
>

Tony Hansen <[email-masked]> wrote:

> Shouldn't we be able to specify the address of the recipient, using an
> IM URL, as being defined in the IMPP working group? Also, how is it
> identified who the IM is coming from?

The exact format of the recipient of the notification would be determined
by the implementation.  The use of an IM URL for IM notifications is a good
idea, but this document deals with a notification frame work, not with an
individual notification mechanism.

The originator of an IM would be implementation defined.  A possible value
could be an ID dedicated to the sieve notify processor.

[email-masked] wrote:

> I agree that multiple variables of this sort are a good idea.
> Additionally,
> there probably needs to be some defensive text about not using Sender:,
> Resent-From:, and Reply-to: fields here.

I agree about the defensive text.

> One way to address this would be to allow implementations to ignore
> notification requests based on a telltale indicator that the message
> is itself a notification.
>

Yes, this must be added

>
> There's also the issue of denotify support. Plenty of notification
> schemes don't have the concept of undoing a notification. So it has
> to be clear that it is legal for denotification to be a no-op.
>

The denotify MUST be handled by the Sieve engine.  The sieve engine must
already hold the notifications to see which ones actually get sent based
on priority.

Wolfgang

Date: Mon, 16 Jul 2001 10:39:11 -0400
From: Wolfgang Segmuller <[email-masked]>
To: [email-masked], [email-masked]
Subject: Re: Notify extension to Sieve
Sender: [email-masked]

> 'n' in text[n] should refer to n unicode characters not n octets (as

I agree that UTF-8 should be used as the output charset and text[n] refers 
to unicode chars.  Maybe we should highlight that an implementation MAY 
shorten the message because some notification mechanisms have limited 
capabilities.

Simon Josefsson <[email-masked]> wrote:

> * I would be happier with two separate variables for the RFC 2822
>   "display name" and the "address".  Having both the name and the mail
>   address would fill up my entire cell phone display.  Maybe keep
>   $from$ as is, and add $from-address$ and $from-name$.
>
>   Q: Is it intended to exclude legacy address forms by using the term
>   "display name"?  Perhaps no parsing of From: was intended.  I.e.:
>   foo@bar (foo bar) rather than "foo bar" <foo@bar>.
>

My idea was that $from$ would be either display name or email address.  But
I can see we need $from-address$ and $from-name$ also.  An implementation
MUST support the RFC 2822 definition of display name.  An implementation 
MAY
support legacy address forms.  Should there be a default value for 
$from-name$ if none was found?  Possibly $from-address$.

>
> * Security consideration additions:
>
> The risk of creating mail loops must be considered, many instant
> messaging systems (e.g. ICQ) have capabilities to forward the
> notification by Internet Mail if you're not online.  Unless somehow
> prevented, this might easily cause huge workload for the servers
> involved.
>

Yes, we must add this.

>
> * Is the draft really copyright 1999? :) There are some control
>   characters (^M) in it as well.  Also perhaps update RFC 82{1,2} ->
>   RFC 282{1,2}.
>

Tony Hansen <[email-masked]> wrote:

> Shouldn't we be able to specify the address of the recipient, using an
> IM URL, as being defined in the IMPP working group? Also, how is it
> identified who the IM is coming from?

The exact format of the recipient of the notification would be determined
by the implementation.  The use of an IM URL for IM notifications is a good
idea, but this document deals with a notification frame work, not with an
individual notification mechanism.

The originator of an IM would be implementation defined.  A possible value
could be an ID dedicated to the sieve notify processor.

[email-masked] wrote:

> I agree that multiple variables of this sort are a good idea.
> Additionally,
> there probably needs to be some defensive text about not using Sender:,
> Resent-From:, and Reply-to: fields here.

I agree about the defensive text.

> One way to address this would be to allow implementations to ignore
> notification requests based on a telltale indicator that the message
> is itself a notification.
>

Yes, this must be added

>
> There's also the issue of denotify support. Plenty of notification
> schemes don't have the concept of undoing a notification. So it has
> to be clear that it is legal for denotification to be a no-op.
>

The denotify MUST be handled by the Sieve engine.  The sieve engine must
already hold the notifications to see which ones actually get sent based
on priority.

Wolfgang

Date: Sat, 14 Jul 2001 17:40:51 -0400
From: Tony Hansen <[email-masked]>
To: [email-masked]
Subject: Re: Notify extension to Sieve
Sender: [email-masked]

	Tony Hansen
	[email-masked]

>                [<":low" / ":normal" / ":high">]

From: "Nigel Swinson" <[email-masked]>
To: <[email-masked]>, <[email-masked]>
Subject: Re: Notify extension to Sieve
Date: Sat, 14 Jul 2001 13:13:55 +0100
Sender: [email-masked]

Perhaps:

(Yuck?!)

Nigel

Date: Fri, 13 Jul 2001 16:56:16 -0700 (PDT)
From: <[email-masked]>
To: [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: Notify extension to Sieve
Sender: [email-masked]

Thanks,
Tim

Date: Fri, 13 Jul 2001 08:21:09 -0700 (PDT)
From: [email-masked]
Subject: Re: Notify extension to Sieve
To: Simon Josefsson <[email-masked]>
Cc: Wolfgang Segmuller <[email-masked]>, [email-masked]
Sender: [email-masked]

> This looks cool!  Some random questions/suggestions from a bystander:

I agree that this is work that should be pursued.

> * I would be happier with two separate variables for the RFC 2822
>   "display name" and the "address".  Having both the name and the mail
>   address would fill up my entire cell phone display.  Maybe keep
>   $from$ as is, and add $from-address$ and $from-name$.

I agree that multiple variables of this sort are a good idea.  Additionally,
there probably needs to be some defensive text about not using Sender:,
Resent-From:, and Reply-to: fields here.

>   Q: Is it intended to exclude legacy address forms by using the term
>   "display name"?  Perhaps no parsing of From: was intended.  I.e.:
>   foo@bar (foo bar) rather than "foo bar" <foo@bar>.

More generally, "display name" is RFC 2822 terminology, not RFC 822
terminology. We know from experience that if you leave this unspecified people
will do odd things like use comment suffixes rather than a prefix phrase and
other gross things. I think the way to go at this point is to not try to
support all the legacy stuff.

So the reference needs to be to RFC 2822, not RFC 822, and it needs to be clear
that "display name" is a clearly defined construct there.

> * Are $subject$, $text$ etc QP/CTE-decoded?

The text[n] construct is also fairly problematic. For example, what happens
when the cut off falls in the middle of a line terminator? What happen when the
number fall in the middle of a multibyte character?

> * Security consideration additions:

> The risk of creating mail loops must be considered, many instant
> messaging systems (e.g. ICQ) have capabilities to forward the
> notification by Internet Mail if you're not online.  Unless somehow
> prevented, this might easily cause huge workload for the servers
> involved.

One way to address this would be to allow implementations to ignore
notification requests based on a telltale indicator that the message
is itself a notification.

There's also the issue of denotify support. Plenty of notification
schemes don't have the concept of undoing a notification. So it has
to be clear that it is legal for denotification to be a no-op.

> * Is the draft really copyright 1999? :) There are some control
>   characters (^M) in it as well.  Also perhaps update RFC 82{1,2} ->
>   RFC 282{1,2}.

And add the various documents cited to the bibliography.

				Ned

Date: Thu, 05 Jul 2001 14:32:32 -0400
From: Tony Hansen <[email-masked]>
To: Wolfgang Segmuller <[email-masked]>
CC: [email-masked]
Subject: Re: Notify extension to Sieve
Sender: [email-masked]

Shouldn't we be able to specify the address of the recipient, using an
IM URL, as being defined in the IMPP working group? Also, how is it
identified who the IM is coming from?

	Tony Hansen
	[email-masked]

Wolfgang Segmuller wrote:
> 
> Abstract
> 
>     Users go to great lengths to be notified as quickly as possible that
>     they have received new mail. Most of these methods involve polling
>     to check for new messages periodically. A push method handled by the
>     final delivery agent gives users quicker notifications and saves
>     server resources. This document does not specify the notification
>     method but is expected that using existing instant messaging
>     infrastructure such as Zephyr, ICQ, or SMS messages will be popular.
>     This draft describes an extension to the Sieve mail filtering
>     language that allows users to give specific preferences for
>     notification of Sieve actions.
> 
> http://www.ietf.org/internet-drafts/draft-martin-sieve-notify-01.txt
> 
> Wolfgang Segmuller

From: "Nigel Swinson" <[email-masked]>
To: "Wolfgang Segmuller" <[email-masked]>, "Simon Josefsson" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: Notify extension to Sieve
Date: Wed, 4 Jul 2001 13:24:01 +0100
Sender: [email-masked]

> This looks cool!  Some random questions/suggestions from a bystander:

I agree.  I'd use such an extension... if I had a mobile phone... which I don't.  :o)

> * I would be happier with two separate variables for the RFC 2822
>   "display name" and the "address".  Having both the name and the mail
>   address would fill up my entire cell phone display.  Maybe keep
>   $from$ as is, and add $from-address$ and $from-name$.

I'd also like to see this addition.  This is the kind of thing that irritates you every single time you use a feature, and wish someone had implemented.  It's like all those computer games with 60 second movies between levels that you watch about 200 times and end up wishing it wasn't there in the first place!

I recon you are most interested in $from-name$ and $subject$ and slightly interested in $from-address$.  Mobile phones make for crappy mail clients at the moment, so they aren't all that much use for lots of $text$, but I suppose you would typically use $text$ so that you could read the message if you wanted to.

Nigel

To: Wolfgang Segmuller <[email-masked]>
Cc: [email-masked]
Subject: Re: Notify extension to Sieve
From: Simon Josefsson <[email-masked]>
Date: Tue, 03 Jul 2001 21:57:15 +0200
Lines: 44
Sender: [email-masked]

This looks cool!  Some random questions/suggestions from a bystander:

* I would be happier with two separate variables for the RFC 2822
  "display name" and the "address".  Having both the name and the mail
  address would fill up my entire cell phone display.  Maybe keep
  $from$ as is, and add $from-address$ and $from-name$.

  Q: Is it intended to exclude legacy address forms by using the term
  "display name"?  Perhaps no parsing of From: was intended.  I.e.:
  foo@bar (foo bar) rather than "foo bar" <foo@bar>.

* Are $subject$, $text$ etc QP/CTE-decoded?

* Security consideration additions:

The risk of creating mail loops must be considered, many instant
messaging systems (e.g. ICQ) have capabilities to forward the
notification by Internet Mail if you're not online.  Unless somehow
prevented, this might easily cause huge workload for the servers
involved.

* Is the draft really copyright 1999? :) There are some control
  characters (^M) in it as well.  Also perhaps update RFC 82{1,2} ->
  RFC 282{1,2}.

Wolfgang Segmuller <[email-masked]> writes:

> Abstract
> 
>     Users go to great lengths to be notified as quickly as possible that
>     they have received new mail. Most of these methods involve polling
>     to check for new messages periodically. A push method handled by the
>     final delivery agent gives users quicker notifications and saves
>     server resources. This document does not specify the notification
>     method but is expected that using existing instant messaging
>     infrastructure such as Zephyr, ICQ, or SMS messages will be popular.
>     This draft describes an extension to the Sieve mail filtering
>     language that allows users to give specific preferences for
>     notification of Sieve actions.
> 
> 
> http://www.ietf.org/internet-drafts/draft-martin-sieve-notify-01.txt
> 
> Wolfgang Segmuller

Date: Tue, 03 Jul 2001 14:47:34 -0400
From: Wolfgang Segmuller <[email-masked]>
To: [email-masked]
Subject: Notify extension to Sieve
Sender: [email-masked]

Abstract

    Users go to great lengths to be notified as quickly as possible that
    they have received new mail. Most of these methods involve polling
    to check for new messages periodically. A push method handled by the
    final delivery agent gives users quicker notifications and saves
    server resources. This document does not specify the notification
    method but is expected that using existing instant messaging
    infrastructure such as Zephyr, ICQ, or SMS messages will be popular.
    This draft describes an extension to the Sieve mail filtering
    language that allows users to give specific preferences for
    notification of Sieve actions.

http://www.ietf.org/internet-drafts/draft-martin-sieve-notify-01.txt

Wolfgang Segmuller