Subject: Re: Managesieve Reauthentification. Replication

From: Alexey Melnikov <[email-masked]>
Date: Sun, 21 Sep 2008 12:46:28 +0100

Дилян Палаузов wrote:

> Hello,
>
> Are there any reasons to include "Reauthentication is not supported by 
> ManageSieve protocol's profile of SASL.  I.e. after a successfully 
> completed AUTHENTICATE command, no more AUTHENTICATE commands may be 
> issued in the same session." in draft-martin-managesieve-10/2.1 
> AUTHENTICATE Command ?
>
> If for some reason a lot of sieve scripts are generated and need to be 
> uploaded, then the uploading application has to make several 
> connections to the managesieve server (using the same master authname 
> that can edit all scripts and different usernames). E.g. when the 
> scripts for a mailing list N2 are generated, the users owner-N2@, N2@, 
> N2-unsubscribe-request@, N2-subscribe-request@, N2-request@ need to be 
> uploaded in different connections to the managesieve server. This is 
> less efficient than using the same managesieve connection and 
> reauthenticating from time to time. Now imagine that one wants to 
> regenrate the scripts for all lists on her server ... a lot of 
> connections need to be established. (A mailing list needs sieve script 
> that does SMTP rejects and hence saves one bounce at later time).

As per various discussions I've addressed your concern differently: I've 
added a new UNAUTHENTICATE command/extension.
It is in extension, because I don't believe any existing client or 
server would support the AUTHENTICATE command behavior you've suggested.

> Moreover, if a domain has several MX DNS records, all scripts among 
> the mail servers shall be consistent to some extend. It would be 
> useful if the managesieve servers can use managesieve as protocol for 
> replication among each other. This could be achieved if the LISTSCRIPT 
> command (or a new command) can provide a timestamp when the script was 
> uploaded. And one more command shall allow the master user (the one 
> that can authenticate with different usernames) to list all users who 
> have uploaded scripts and the timestamp when the user last changed his 
> script. Going a step furhter, during the replication one server shall 
> be able to request the list of the users who changed their scripts 
> only after a given timestamp.

Speaking as an individual WG participant: if you write down a proposal 
that includes ABNF, I would be happy to review it and to consider its 
inclusion into the ManageSieve document.

---

From: Дилян Палаузов<[email-masked]>
Date: Tue, 23 Sep 2008 12:04:59 +0200

Hello,

> server would support the AUTHENTICATE command behavior you've suggested.

Excellent.

> inclusion into the ManageSieve document.

My suggestion is to extend the PUTSCRIPT and LISTSCRIPTS commands with 
one optional string paramter, conaining a RFC 2822 Date/Time parameter.

When provided as a paramter to the LISTSCRIPTS command, it lists all 
scripts, using URIs containing the owner, that can be accessed by the 
currently authorized user, which have been updated after that date.  A 
URI containing no script name indicates that the name of default script 
has been changed after that date.  The latter can be a result of doing 
RENAME on active script.

When this optional parameter is provided to the PUTSCRIPT command, and 
there is already a list with that name, the command will be successful 
only if the "old script" is older than the provided date.

Examples:

C: LISTSCRIPTS "Tue, 23 Sep 2008 11:24:52 +0200"
S: sieve:///peter/main.siv
S: sieve:///peter/my.sieve
S: sieve:///sandra/example.int.siv0x007F;
S: sieve:///sandra/

This means that after 23 Sep 2008 11:24:52 Peter has changed his scripts 
main.siv and my.sieve, while Sandra has deleted her example.int.siv 
script, and has updated the name of her active script.

C: AUTHENTICATE [as peter]
C: PUTSCRIPT "main.siv" [content] "Tue, 23 Sep 2008 11:24:52 +0200"
S: OK
C: PUTSCRIPT "main2.siv" [content] "Tue, 23 Sep 2008 11:24:52 +0200"
S: NO main2.siv does not exist
C: PUTSCRIPT "my.siv" [content] "Tue, 23 Sep 2007 11:24:52 +0200"
S: NO my.siv was updated after  23 Sep 2007

If you are aware of standartized shorter form for Date (like 23.09.2008 
11:24:52 +000) this can be used, instead of RFC 2822 Date/Time.

In case the this idea is welcomed, I would be glad to propose the text 
that fits into draft-martin-managesieve .

Със здраве,
	Дилян